Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ and [PRODUCT.md](PRODUCT.md)'s surface.
database, reached through `DATABASE_URL`.
- **[Drizzle](https://orm.drizzle.team)** — the ORM/query layer, both in
vendored `@intx/db` and in workbench-owned packages that need their own
tables (e.g. `packages/chat`'s `chat` schema, `packages/skills`'s
`skills.skill_access`).
tables (e.g. `packages/chat`'s `chat` schema).
- Package-owned migrations run through each package's own migration
runner; see [docs/package-migrations.md](docs/package-migrations.md).

Expand Down
2 changes: 0 additions & 2 deletions apps/hub/src/skills-mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
} from "@corbits/agent-directory";
import { reportError } from "@corbits/error-sink";
import {
createDrizzleSkillAccessStore,
createHubSkillAssetStore,
createSkillRegistry,
SkillRegistryError,
Expand Down Expand Up @@ -72,7 +71,6 @@ export function mountSkills(deps: {
assetService: deps.assetService,
repoStore: deps.repoStore,
}),
access: createDrizzleSkillAccessStore(deps.db),
});

const pinnedBy: PinnedByResolver = {
Expand Down
26 changes: 10 additions & 16 deletions packages/skills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,19 @@ and scope access to per-principal.

## Composition with @intx/*

A skill's storage, version history, and body are entirely the platform's
own asset/git machinery — this package writes no versions table and no
content cache, only reading and committing through the asset store. Routes
are built on `@intx/hub-api`'s `TenantEnv`/`requireGrant` convention, with
`@intx/hub-sessions` for session-authenticated calls; persistence for the
one table this package does own goes through `@intx/db`.
A skill's storage, version history, body, and visibility are entirely
the platform's own asset/git machinery — this package owns no tables
and ships no migrations, only reading and committing through the asset
store. Routes are built on `@intx/hub-api`'s `TenantEnv`/`requireGrant`
convention, with `@intx/hub-sessions` for session-authenticated calls.

## Key modules

- `src/registry.ts` — `SkillRegistry`: create/list/get/versions/restore
over the `kind:"skill"` asset, with no intermediate pending/draft state.
- `src/access.ts` / `src/access-store.ts` — the `skill_access` table and
visibility rules (`private` to the author, `tenant`-wide, or scoped),
the one thing this package persists beyond the asset itself.
- `src/skill-md.ts` — `SKILL.md` frontmatter parsing/building and the
`name`/`description` validation schemas.
- `src/skill-md.ts` — the SKILL.md grammar: builds, parses, and validates
the `name`/`description`/`scope` frontmatter and the markdown body. This
is the only place visibility is decided — there is no side table.
- `src/hub-asset-store.ts` — the production `SkillAssetStore` binding
against the platform's native asset kind handler.
- `src/routes.ts` — `createSkillRoutes`: tenant-session routes under
Expand All @@ -33,15 +30,12 @@ one table this package does own goes through `@intx/db`.
- `src/prompt.ts` — `withAvailableSkills`: appends/replaces the
`<available_skills>` system-prompt stanza for a definition's pinned
skills.
- `src/migrations.ts` — this package's own `skills_migrations` ledger,
covering only the `skill_access` table.

## Running tests

```
cd packages/skills && bun test
```

No drizzle suite in this package's `test/` directory; no `DATABASE_URL`
needed for `bun test` here (`src/migrations.ts` applies against a real
Postgres only when a host runs it).
No drizzle suite in this package's `test/` directory and no migrations
to apply; no `DATABASE_URL` needed for `bun test` here.
3 changes: 1 addition & 2 deletions packages/skills/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"license": "LGPL-2.1-or-later",
"type": "module",
"exports": {
".": "./src/index.ts",
"./migrations": "./src/migrations.ts"
".": "./src/index.ts"
},
"scripts": {
"typecheck": "tsc --noEmit",
Expand Down
96 changes: 0 additions & 96 deletions packages/skills/src/access-store.ts

This file was deleted.

106 changes: 0 additions & 106 deletions packages/skills/src/access.test.ts

This file was deleted.

69 changes: 0 additions & 69 deletions packages/skills/src/access.ts

This file was deleted.

Loading
Loading