@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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- The hosted tag surface (T7) queries tag membership from this relational
|
|
2
|
+
-- projection of skills_registry.tags_json, in both dialects with one identical
|
|
3
|
+
-- shape. SQLite cannot index json_each() over the JSON column, so the tag
|
|
4
|
+
-- lookup becomes an indexed read here: the PRIMARY KEY serves (org_id, slug)
|
|
5
|
+
-- maintenance and the org_tag index serves (org_id, tag) filters. The write
|
|
6
|
+
-- paths keep it in step; the backfill below covers rows that predate it.
|
|
7
|
+
-- No composite FK to skills_registry: the schema-parity parser cannot
|
|
8
|
+
-- represent a multi-column FK identically in both dialects, and every write
|
|
9
|
+
-- path here maintains the projection explicitly (publish/update replace its
|
|
10
|
+
-- rows, the tombstone purge removes them with the row), so the constraint
|
|
11
|
+
-- would be redundancy.
|
|
12
|
+
CREATE TABLE skills_tags (
|
|
13
|
+
org_id text NOT NULL REFERENCES organizations(id) ON DELETE CASCADE,
|
|
14
|
+
slug text NOT NULL,
|
|
15
|
+
tag text NOT NULL,
|
|
16
|
+
PRIMARY KEY (org_id, slug, tag)
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
CREATE INDEX skills_tags_org_tag_idx ON skills_tags (org_id, tag);
|
|
20
|
+
|
|
21
|
+
-- Backfill every existing row's tags from the stored JSON array.
|
|
22
|
+
INSERT INTO skills_tags (org_id, slug, tag)
|
|
23
|
+
SELECT DISTINCT r.org_id, r.slug, je.value
|
|
24
|
+
FROM skills_registry r, json_each(r.tags_json) AS je
|
|
25
|
+
WHERE je.value <> '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/skills",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.64",
|
|
4
4
|
"description": "Skills library for AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"license": "Apache-2.0",
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/bun": "latest",
|
|
77
|
+
"@types/node": "25.2.3",
|
|
77
78
|
"@types/react": "^18.2.0",
|
|
78
79
|
"bun-types": "1.3.14",
|
|
79
80
|
"react-devtools-core": "^7.0.1",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
"dependencies": {
|
|
83
84
|
"@aws-sdk/client-ecs": "^3.1079.0",
|
|
84
85
|
"@aws-sdk/client-s3": "^3.1079.0",
|
|
85
|
-
"@hasna/events": "0.1.
|
|
86
|
+
"@hasna/events": "0.1.16",
|
|
86
87
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
87
88
|
"chalk": "^5.3.0",
|
|
88
89
|
"commander": "^12.1.0",
|