@hasna/skills 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -6
- package/bin/index.js +1593 -228
- package/bin/mcp.js +290 -24
- package/bin/migrate.js +229 -33
- package/bin/server.js +774 -116
- package/bin/worker.js +558 -79
- package/dist/cli/commands/registry-reconcile.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +559 -251
- package/dist/lib/agent-sync.d.ts +26 -6
- package/dist/lib/auth-store.d.ts +37 -0
- package/dist/lib/config.d.ts +51 -0
- package/dist/lib/home-census.d.ts +4 -0
- package/dist/lib/home-migration.d.ts +8 -9
- package/dist/lib/native-storage.d.ts +1 -1
- package/dist/lib/portable-skills.d.ts +35 -6
- package/dist/lib/pull.d.ts +31 -0
- package/dist/lib/registry-reconcile.d.ts +114 -0
- package/dist/lib/registry.d.ts +7 -4
- package/dist/lib/remote-client.d.ts +118 -1
- package/dist/lib/remote-registry.d.ts +26 -0
- package/dist/lib/revision.d.ts +29 -0
- package/dist/sdk/index.js +1351 -353
- package/dist/server/app.d.ts +1 -1
- package/dist/server/config.d.ts +12 -2
- package/dist/server/rows.d.ts +2 -1
- package/dist/server/skills-api.d.ts +108 -6
- package/dist/server/sqlite-store.d.ts +20 -3
- package/dist/server/store.d.ts +31 -5
- package/dist/server/types.d.ts +98 -3
- package/dist/storage.js +7 -2
- package/migrations/postgres/0004_hosted_pins.sql +28 -0
- package/migrations/postgres/0005_revision_tombstone_registry.sql +37 -0
- package/migrations/postgres/0005_tag_projection.sql +36 -0
- package/migrations/sqlite/0004_hosted_pins.sql +21 -0
- package/migrations/sqlite/0005_revision_tombstone_registry.sql +18 -0
- package/migrations/sqlite/0005_tag_projection.sql +25 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -215,6 +215,12 @@ If the URL is an origin such as `https://your-server.example`, the CLI requests
|
|
|
215
215
|
Authenticated registry listing and premium server-side execution use
|
|
216
216
|
`SKILLS_API_KEY` or the credential saved by `skills auth login --api-key`.
|
|
217
217
|
|
|
218
|
+
The typed `RemoteSkillsClient` also exposes pin, tag, and cursor-based
|
|
219
|
+
incremental-sync methods (`listPins`/`pin`/`unpin`, `listTags`/`skillsByTag`,
|
|
220
|
+
`listUpdatedSince`). A server that predates those routes fails closed with an
|
|
221
|
+
explicit unsupported-route error — never a silent empty listing. Route table
|
|
222
|
+
and version-skew contract: `docs/architecture/remote-client-pins-tags-sync.md`.
|
|
223
|
+
|
|
218
224
|
For the reusable upstream contract, see
|
|
219
225
|
`docs/architecture/reusable-skills-engine.md`.
|
|
220
226
|
|
|
@@ -303,8 +309,8 @@ identical either way.
|
|
|
303
309
|
|
|
304
310
|
```bash
|
|
305
311
|
skills-server # SQLite at ~/.hasna/skills/server.db
|
|
306
|
-
HASNA_SKILLS_DATABASE_URL
|
|
307
|
-
HASNA_SKILLS_DATABASE_URL=postgres://user:
|
|
312
|
+
HASNA_SKILLS_DATABASE_URL=<path>/server.db skills-server
|
|
313
|
+
HASNA_SKILLS_DATABASE_URL=postgres://user:CHANGEME@host/skills skills-server
|
|
308
314
|
```
|
|
309
315
|
|
|
310
316
|
| `HASNA_SKILLS_DATABASE_URL` | Backend | Survives restart |
|
|
@@ -338,12 +344,19 @@ explicitly, because several replicas racing to migrate one shared database is no
|
|
|
338
344
|
something to do implicitly:
|
|
339
345
|
|
|
340
346
|
```bash
|
|
341
|
-
HASNA_SKILLS_DATABASE_URL=postgres
|
|
347
|
+
HASNA_SKILLS_DATABASE_URL=postgres://user:CHANGEME@host/skills skills-migrate
|
|
342
348
|
```
|
|
343
349
|
|
|
344
350
|
`skills-migrate` fails if no database is configured rather than migrating a default
|
|
345
351
|
SQLite file, so it stays usable as a deploy gate.
|
|
346
352
|
|
|
353
|
+
`HASNA_SKILLS_DATABASE_URL` and `DATABASE_URL` are server-only. CLI, MCP, and SDK
|
|
354
|
+
clients never read them and never open a database connection: a client reaches
|
|
355
|
+
the cloud only through `SKILLS_API_URL` plus an API key (the `apiKey` stored by
|
|
356
|
+
`skills auth`, or `SKILLS_API_KEY`). The one exception is the repo-native storage
|
|
357
|
+
sync under [Storage Boundary](#storage-boundary), an operator tool that
|
|
358
|
+
intentionally reads the same variables.
|
|
359
|
+
|
|
347
360
|
Three things the server will not do:
|
|
348
361
|
|
|
349
362
|
- Fall back to another backend when a configured Postgres URL cannot be reached.
|
|
@@ -421,7 +434,7 @@ skills/ # Public skill contracts and local OSS skills
|
|
|
421
434
|
|
|
422
435
|
| Count | Value | Derived from |
|
|
423
436
|
|---|---|---|
|
|
424
|
-
| Catalog skills |
|
|
437
|
+
| Catalog skills | 86 | `SKILLS.length` (`src/lib/registry-data/`) |
|
|
425
438
|
| Categories | 17 | `CATEGORIES` (`src/lib/registry-types.ts`) |
|
|
426
439
|
| MCP tools | 37 | `tools/list` against a live `buildServer()` |
|
|
427
440
|
|
|
@@ -450,7 +463,8 @@ folders are never used as skill libraries.
|
|
|
450
463
|
└── tmp/
|
|
451
464
|
```
|
|
452
465
|
|
|
453
|
-
Auth stays global in
|
|
466
|
+
Auth stays global in `<app folder>/auth.json` (default
|
|
467
|
+
`~/.hasna/skills/auth.json`). Registry and doc caches
|
|
454
468
|
belong in `~/.cache/skills` or the Skills API, not inside project
|
|
455
469
|
`.skills`.
|
|
456
470
|
|
|
@@ -513,7 +527,15 @@ overridden folder. `skills config path` reports the config file actually in use.
|
|
|
513
527
|
| Installed skills | `<app folder>/installed/<name>/` | yes |
|
|
514
528
|
| Global config | `<app folder>/config.json` | yes |
|
|
515
529
|
| Feedback database | `<app folder>/skills.db` | yes |
|
|
516
|
-
| Auth |
|
|
530
|
+
| Auth | `<app folder>/auth.json` | yes |
|
|
531
|
+
|
|
532
|
+
There is no separate local-skills-folder override, and none is needed: one
|
|
533
|
+
variable relocates the whole app folder, so the corpus is always
|
|
534
|
+
`<app folder>/installed`. With the default app folder that is exactly the
|
|
535
|
+
migrated corpus location — the former `~/.skills` and `custom/` trees are folded
|
|
536
|
+
into `<app folder>/installed` on first resolution (see "Migrating from the older
|
|
537
|
+
layout"). Extension corpora are a separate concern and keep their own
|
|
538
|
+
`extensionsDir` config key.
|
|
517
539
|
|
|
518
540
|
### Migrating from the older layout
|
|
519
541
|
|