@cat-factory/worker 0.198.1 → 0.199.1
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/dist/infrastructure/repositories/D1AccountSkillRepository.d.ts.map +1 -1
- package/dist/infrastructure/repositories/D1AccountSkillRepository.js +5 -3
- package/dist/infrastructure/repositories/D1AccountSkillRepository.js.map +1 -1
- package/migrations/0096_account_skill_group.sql +25 -0
- package/package.json +28 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1AccountSkillRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountSkillRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAiB,MAAM,qBAAqB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"D1AccountSkillRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountSkillRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAiB,MAAM,qBAAqB,CAAA;AACpG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAgD3D,8DAA8D;AAC9D,qBAAa,wBAAyB,YAAW,sBAAsB;IACrE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAY;IAE/B,YAAY,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,UAAU,CAAA;KAAE,EAErC;IAEK,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,UAAQ,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAM5F;IAEK,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAMhF;IAEK,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqCtD;IAEK,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9E;IAEK,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOpE;IAEK,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAMlE;CACF"}
|
|
@@ -15,6 +15,7 @@ function rowToRecord(row) {
|
|
|
15
15
|
accountId: row.account_id,
|
|
16
16
|
name: row.name,
|
|
17
17
|
description: row.description,
|
|
18
|
+
group: row.skill_group,
|
|
18
19
|
instructions: row.instructions,
|
|
19
20
|
resources: parseResources(row.resources),
|
|
20
21
|
sourceId: row.source_id,
|
|
@@ -49,12 +50,13 @@ export class D1AccountSkillRepository {
|
|
|
49
50
|
async upsert(record) {
|
|
50
51
|
await this.db
|
|
51
52
|
.prepare(`INSERT INTO account_skills
|
|
52
|
-
(skill_id, account_id, name, description, instructions, resources,
|
|
53
|
+
(skill_id, account_id, name, description, skill_group, instructions, resources,
|
|
53
54
|
source_id, source_path, source_sha, pinned_commit, created_at, updated_at, deleted_at)
|
|
54
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
55
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
55
56
|
ON CONFLICT (account_id, skill_id) DO UPDATE SET
|
|
56
57
|
name = excluded.name,
|
|
57
58
|
description = excluded.description,
|
|
59
|
+
skill_group = excluded.skill_group,
|
|
58
60
|
instructions = excluded.instructions,
|
|
59
61
|
resources = excluded.resources,
|
|
60
62
|
source_id = excluded.source_id,
|
|
@@ -63,7 +65,7 @@ export class D1AccountSkillRepository {
|
|
|
63
65
|
pinned_commit = excluded.pinned_commit,
|
|
64
66
|
updated_at = excluded.updated_at,
|
|
65
67
|
deleted_at = excluded.deleted_at`)
|
|
66
|
-
.bind(record.skillId, record.accountId, record.name, record.description, record.instructions, JSON.stringify(record.resources), record.sourceId, record.sourcePath, record.sourceSha, record.pinnedCommit, record.createdAt, record.updatedAt, record.deletedAt)
|
|
68
|
+
.bind(record.skillId, record.accountId, record.name, record.description, record.group, record.instructions, JSON.stringify(record.resources), record.sourceId, record.sourcePath, record.sourceSha, record.pinnedCommit, record.createdAt, record.updatedAt, record.deletedAt)
|
|
67
69
|
.run();
|
|
68
70
|
}
|
|
69
71
|
async softDelete(accountId, skillId, at) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"D1AccountSkillRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountSkillRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"D1AccountSkillRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountSkillRepository.ts"],"names":[],"mappings":"AAoBA,SAAS,cAAc,CAAC,GAAkB;IACxC,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAA0B,CAAC,CAAC,CAAC,EAAE,CAAA;IACjE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAAoB;IACvC,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,KAAK,EAAE,GAAG,CAAC,WAAW;QACtB,YAAY,EAAE,GAAG,CAAC,YAAY;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|
+
-- A skill catalog grows past the point where one flat list is a usable picker, and a surface that
|
|
4
|
+
-- offers skills usually wants a SUBSET of it: a review task queues specialist review playbooks
|
|
5
|
+
-- ("Performance review", "Security review") and has no business offering a release-notes writer.
|
|
6
|
+
-- The group is what makes that filter possible without the picker guessing from a name.
|
|
7
|
+
--
|
|
8
|
+
-- Stored as the RAW declared value (lowercased and trimmed by the sync), not as the narrowed wire
|
|
9
|
+
-- vocabulary: a value this build does not know is shown back to its author by the management
|
|
10
|
+
-- surface rather than silently reclassified. Readers narrow with `normalizeSkillGroup`, which
|
|
11
|
+
-- lands an unknown value on the `other` shelf.
|
|
12
|
+
--
|
|
13
|
+
-- `NOT NULL DEFAULT 'other'` because every existing row predates the field and declared nothing:
|
|
14
|
+
-- unclassified is precisely what they are, and it is the same value the parser assigns a manifest
|
|
15
|
+
-- with no `group:`.
|
|
16
|
+
--
|
|
17
|
+
-- The default is not a placeholder a sweep replaces, and it does not need to be. A sync re-reads a
|
|
18
|
+
-- source dir only when its head commit moved, and re-parses a skill only when its `SKILL.md` blob
|
|
19
|
+
-- moved, so an existing row keeps `other` until its own manifest is next edited. That is the same
|
|
20
|
+
-- edit that can first give the field a value: declaring `group:` rewrites the blob, so the
|
|
21
|
+
-- declaration and the row that carries it arrive together. The one row this strands is a manifest
|
|
22
|
+
-- that already spelled `group:` before this build knew the key, which reads as `other` until its
|
|
23
|
+
-- next edit.
|
|
24
|
+
|
|
25
|
+
ALTER TABLE account_skills ADD COLUMN skill_group TEXT NOT NULL DEFAULT 'other';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.199.1",
|
|
4
4
|
"description": "Reusable Cloudflare Worker library (Hono + D1) exposing the Agent Architecture Board core: the `createApp()` Hono factory, the default fetch/scheduled/queue handler, and the Durable Object + Workflow classes. Deployments (see deploy/backend) supply the wrangler.toml + config and re-export these.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,41 +33,41 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
37
|
-
"@ai-sdk/openai": "^4.0.
|
|
38
|
-
"@ai-sdk/openai-compatible": "^3.0.
|
|
36
|
+
"@ai-sdk/anthropic": "^4.0.39",
|
|
37
|
+
"@ai-sdk/openai": "^4.0.43",
|
|
38
|
+
"@ai-sdk/openai-compatible": "^3.0.31",
|
|
39
39
|
"@cloudflare/containers": "^0.3.7",
|
|
40
40
|
"@hono/valibot-validator": "^0.6.1",
|
|
41
|
-
"ai": "^7.0.
|
|
42
|
-
"hono": "^4.13.
|
|
41
|
+
"ai": "^7.0.68",
|
|
42
|
+
"hono": "^4.13.3",
|
|
43
43
|
"pino": "^10.3.1",
|
|
44
44
|
"valibot": "^1.4.2",
|
|
45
45
|
"workers-ai-provider": "^4.0.0",
|
|
46
|
-
"@cat-factory/
|
|
47
|
-
"@cat-factory/
|
|
48
|
-
"@cat-factory/
|
|
49
|
-
"@cat-factory/
|
|
50
|
-
"@cat-factory/
|
|
51
|
-
"@cat-factory/eks": "0.1.
|
|
52
|
-
"@cat-factory/gates": "0.11.
|
|
53
|
-
"@cat-factory/gitlab": "0.22.
|
|
54
|
-
"@cat-factory/integrations": "0.166.
|
|
55
|
-
"@cat-factory/kernel": "0.
|
|
56
|
-
"@cat-factory/observability-langfuse": "0.11.
|
|
57
|
-
"@cat-factory/observability-otel": "0.22.
|
|
58
|
-
"@cat-factory/orchestration": "0.
|
|
59
|
-
"@cat-factory/prompt-fragments": "1.0.
|
|
60
|
-
"@cat-factory/
|
|
61
|
-
"@cat-factory/
|
|
62
|
-
"@cat-factory/
|
|
46
|
+
"@cat-factory/binary-generators": "0.3.2",
|
|
47
|
+
"@cat-factory/caching": "0.20.36",
|
|
48
|
+
"@cat-factory/consensus": "0.16.36",
|
|
49
|
+
"@cat-factory/contracts": "0.323.1",
|
|
50
|
+
"@cat-factory/agents": "0.139.1",
|
|
51
|
+
"@cat-factory/eks": "0.1.340",
|
|
52
|
+
"@cat-factory/gates": "0.11.2",
|
|
53
|
+
"@cat-factory/gitlab": "0.22.2",
|
|
54
|
+
"@cat-factory/integrations": "0.166.2",
|
|
55
|
+
"@cat-factory/kernel": "0.314.1",
|
|
56
|
+
"@cat-factory/observability-langfuse": "0.11.2",
|
|
57
|
+
"@cat-factory/observability-otel": "0.22.2",
|
|
58
|
+
"@cat-factory/orchestration": "0.283.1",
|
|
59
|
+
"@cat-factory/prompt-fragments": "1.0.91",
|
|
60
|
+
"@cat-factory/server": "0.299.1",
|
|
61
|
+
"@cat-factory/spend": "0.16.7",
|
|
62
|
+
"@cat-factory/provider-cloudflare": "0.7.489"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@cloudflare/vitest-pool-workers": "^0.
|
|
66
|
-
"@cloudflare/workers-types": "^5.
|
|
65
|
+
"@cloudflare/vitest-pool-workers": "^0.22.0",
|
|
66
|
+
"@cloudflare/workers-types": "^5.20260819.1",
|
|
67
67
|
"typescript": "7.0.2",
|
|
68
|
-
"vitest": "^4.1.
|
|
69
|
-
"wrangler": "^4.
|
|
70
|
-
"@cat-factory/conformance": "0.45.
|
|
68
|
+
"vitest": "^4.1.11",
|
|
69
|
+
"wrangler": "^4.124.0",
|
|
70
|
+
"@cat-factory/conformance": "0.45.18"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"build": "tsc -b tsconfig.build.json",
|