@adhd/agent-store-tools 2.1.0

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.
Files changed (66) hide show
  1. package/drizzle/0000_dry_roulette.sql +18 -0
  2. package/drizzle/0001_gray_talkback.sql +20 -0
  3. package/drizzle/0002_aberrant_blink.sql +7 -0
  4. package/drizzle/0003_foamy_otto_octavius.sql +10 -0
  5. package/drizzle/meta/0000_snapshot.json +129 -0
  6. package/drizzle/meta/0001_snapshot.json +251 -0
  7. package/drizzle/meta/0002_snapshot.json +298 -0
  8. package/drizzle/meta/0003_snapshot.json +358 -0
  9. package/drizzle/meta/_journal.json +34 -0
  10. package/package.json +50 -0
  11. package/src/db/client.d.ts +7 -0
  12. package/src/db/client.d.ts.map +1 -0
  13. package/src/db/client.js +18 -0
  14. package/src/db/client.js.map +1 -0
  15. package/src/db/migrate-runner.d.ts +30 -0
  16. package/src/db/migrate-runner.d.ts.map +1 -0
  17. package/src/db/migrate-runner.js +34 -0
  18. package/src/db/migrate-runner.js.map +1 -0
  19. package/src/db/migrate.d.ts +9 -0
  20. package/src/db/migrate.d.ts.map +1 -0
  21. package/src/db/migrate.js +13 -0
  22. package/src/db/migrate.js.map +1 -0
  23. package/src/db/schema.d.ts +584 -0
  24. package/src/db/schema.d.ts.map +1 -0
  25. package/src/db/schema.js +150 -0
  26. package/src/db/schema.js.map +1 -0
  27. package/src/index.d.ts +13 -0
  28. package/src/index.d.ts.map +1 -0
  29. package/src/index.js +11 -0
  30. package/src/index.js.map +1 -0
  31. package/src/seed/bindings.d.ts +21 -0
  32. package/src/seed/bindings.d.ts.map +1 -0
  33. package/src/seed/bindings.js +167 -0
  34. package/src/seed/bindings.js.map +1 -0
  35. package/src/seed/index.d.ts +29 -0
  36. package/src/seed/index.d.ts.map +1 -0
  37. package/src/seed/index.js +80 -0
  38. package/src/seed/index.js.map +1 -0
  39. package/src/seed/platforms.d.ts +17 -0
  40. package/src/seed/platforms.d.ts.map +1 -0
  41. package/src/seed/platforms.js +48 -0
  42. package/src/seed/platforms.js.map +1 -0
  43. package/src/seed/tool-types.d.ts +15 -0
  44. package/src/seed/tool-types.d.ts.map +1 -0
  45. package/src/seed/tool-types.js +35 -0
  46. package/src/seed/tool-types.js.map +1 -0
  47. package/src/seed/tools.d.ts +18 -0
  48. package/src/seed/tools.d.ts.map +1 -0
  49. package/src/seed/tools.js +117 -0
  50. package/src/seed/tools.js.map +1 -0
  51. package/src/store/agent-tool-store.d.ts +63 -0
  52. package/src/store/agent-tool-store.d.ts.map +1 -0
  53. package/src/store/agent-tool-store.js +100 -0
  54. package/src/store/agent-tool-store.js.map +1 -0
  55. package/src/store/binding-store.d.ts +75 -0
  56. package/src/store/binding-store.d.ts.map +1 -0
  57. package/src/store/binding-store.js +144 -0
  58. package/src/store/binding-store.js.map +1 -0
  59. package/src/store/mcp-server-store.d.ts +46 -0
  60. package/src/store/mcp-server-store.d.ts.map +1 -0
  61. package/src/store/mcp-server-store.js +89 -0
  62. package/src/store/mcp-server-store.js.map +1 -0
  63. package/src/store/tool-store.d.ts +55 -0
  64. package/src/store/tool-store.d.ts.map +1 -0
  65. package/src/store/tool-store.js +115 -0
  66. package/src/store/tool-store.js.map +1 -0
@@ -0,0 +1,150 @@
1
+ import { index, integer, primaryKey, sqliteTable, text, } from 'drizzle-orm/sqlite-core';
2
+ // ──────────────────────────────────────────────
3
+ // tool_types — seeded text-PK lookup table
4
+ //
5
+ // [inv:lookup-not-enum]: this MUST remain a sqliteTable with a text PK.
6
+ // Never use a SQL enum or a drizzle enum() here — a new tool type is
7
+ // added by seeding a row, no migration required.
8
+ // Seeded slugs: io | compute | network | memory | ui | meta | lsp | notebook
9
+ // ──────────────────────────────────────────────
10
+ export const toolTypesTable = sqliteTable('tool_types', {
11
+ slug: text('slug').primaryKey(),
12
+ description: text('description').notNull(),
13
+ });
14
+ // ──────────────────────────────────────────────
15
+ // tools — canonical, platform-independent agent capabilities
16
+ //
17
+ // Keyed by canonical name (e.g. file_read, shell_exec, web_fetch).
18
+ // type FK → tool_types.slug (within-package FK; no cross-package FK).
19
+ // [inv:version-retained]: bumping version never deletes the prior row.
20
+ // ──────────────────────────────────────────────
21
+ export const toolsTable = sqliteTable('tools', {
22
+ name: text('name').primaryKey(),
23
+ type: text('type')
24
+ .notNull()
25
+ .references(() => toolTypesTable.slug),
26
+ description: text('description').notNull(),
27
+ version: integer('version').notNull().default(1),
28
+ // Boolean flags stored as SQLite integers (mode:'boolean')
29
+ requiresApproval: integer('requires_approval', { mode: 'boolean' })
30
+ .notNull()
31
+ .default(false),
32
+ isDestructive: integer('is_destructive', { mode: 'boolean' })
33
+ .notNull()
34
+ .default(false),
35
+ // JSON arrays stored as text (mode:'json')
36
+ dependencyToolIds: text('dependency_tool_ids', { mode: 'json' })
37
+ .$type()
38
+ .notNull()
39
+ .default([]),
40
+ capabilities: text('capabilities', { mode: 'json' })
41
+ .$type()
42
+ .notNull()
43
+ .default([]),
44
+ }, (table) => [index('idx_tools_type').on(table.type)]);
45
+ // ──────────────────────────────────────────────
46
+ // platforms — runtime environments an agent deploys to
47
+ //
48
+ // [def:platform]: keyed by id (e.g. claude_code, claude_api, openai, bedrock,
49
+ // cursor, vscode). header_format is a plain text column seeded with one of:
50
+ // yaml_frontmatter | json_object | none — [inv:lookup-not-enum] applies here
51
+ // too: never a SQL enum. supports_tool_selection stored as SQLite integer
52
+ // with mode:'boolean'.
53
+ // ──────────────────────────────────────────────
54
+ export const platformsTable = sqliteTable('platforms', {
55
+ id: text('id').primaryKey(),
56
+ name: text('name').notNull(),
57
+ // plain text column: yaml_frontmatter | json_object | none
58
+ headerFormat: text('header_format').notNull(),
59
+ supportsToolSelection: integer('supports_tool_selection', { mode: 'boolean' })
60
+ .notNull()
61
+ .default(false),
62
+ });
63
+ // ──────────────────────────────────────────────
64
+ // tool_platform_bindings — per-platform alias for each canonical tool
65
+ //
66
+ // [def:binding]: PK is (tool_name, platform_id). Both FKs are within-package
67
+ // ([inv:no-cross-pkg-fk]). availability is a plain text column:
68
+ // available | restricted | unavailable | requires_permission.
69
+ // invocation_note is nullable (e.g. "requires --chrome").
70
+ // ──────────────────────────────────────────────
71
+ export const toolPlatformBindingsTable = sqliteTable('tool_platform_bindings', {
72
+ toolName: text('tool_name')
73
+ .notNull()
74
+ .references(() => toolsTable.name),
75
+ platformId: text('platform_id')
76
+ .notNull()
77
+ .references(() => platformsTable.id),
78
+ // The name this tool is known by on this platform (e.g. "Bash", "bash_tool")
79
+ platformToolName: text('platform_tool_name').notNull(),
80
+ // plain text column: available | restricted | unavailable | requires_permission
81
+ availability: text('availability').notNull(),
82
+ requiresMcp: integer('requires_mcp', { mode: 'boolean' })
83
+ .notNull()
84
+ .default(false),
85
+ // nullable: e.g. "requires --chrome"
86
+ invocationNote: text('invocation_note'),
87
+ }, (table) => [
88
+ primaryKey({ columns: [table.toolName, table.platformId] }),
89
+ index('idx_bindings_platform').on(table.platformId),
90
+ ]);
91
+ // ──────────────────────────────────────────────
92
+ // mcp_servers — MCP server registrations
93
+ //
94
+ // [def:mcp-server]: keyed by server package identifier (id). transport is a
95
+ // plain text column seeded with one of: stdio | SSE | HTTP — NOT a SQL enum
96
+ // ([inv:lookup-not-enum] principle applies: seeded text value, never enum).
97
+ // provided_tool_ids is a JSON array of canonical tool NAMES (logical references
98
+ // to tools.name — [inv:no-cross-pkg-fk]: no FK on a JSON column; resolution is
99
+ // a compile-time join in @adhd/agent-engine-compiler).
100
+ // config_schema is a JSON-Schema object stored as text with mode:'json'.
101
+ // Read by the compiler to build the mcpServers block when a binding has
102
+ // requires_mcp = true.
103
+ // ──────────────────────────────────────────────
104
+ export const mcpServersTable = sqliteTable('mcp_servers', {
105
+ id: text('id').primaryKey(),
106
+ // plain text column: stdio | SSE | HTTP
107
+ transport: text('transport').notNull(),
108
+ name: text('name').notNull(),
109
+ // JSON array of canonical tool names (logical refs; no FK — [inv:no-cross-pkg-fk])
110
+ providedToolIds: text('provided_tool_ids', { mode: 'json' })
111
+ .$type()
112
+ .notNull()
113
+ .default([]),
114
+ // JSON-Schema object for this server's configuration
115
+ configSchema: text('config_schema', { mode: 'json' })
116
+ .$type()
117
+ .notNull()
118
+ .default({}),
119
+ });
120
+ // ──────────────────────────────────────────────
121
+ // agent_tools — agent↔tool permission junction
122
+ //
123
+ // [def:agent-tool-grant]: PK is (agent_slug, tool_name). agent_slug is a
124
+ // LOGICAL key into the agent-registry package's `agents` table — it MUST NOT
125
+ // be a SQLite FK ([inv:no-cross-pkg-fk]: there is no `agents` table in this
126
+ // package; the linkage is resolved at compile time by @adhd/agent-engine-compiler).
127
+ // tool_name → tools.name IS a real within-package FK.
128
+ //
129
+ // permission is a plain text column: full | read_only | restricted.
130
+ // ([inv:lookup-not-enum]: seeded text value, never a SQL enum.)
131
+ // context_condition is a nullable JSON value (null = always applies).
132
+ // ──────────────────────────────────────────────
133
+ export const agentToolsTable = sqliteTable('agent_tools', {
134
+ // LOGICAL reference — NOT a SQLite FK ([inv:no-cross-pkg-fk])
135
+ agentSlug: text('agent_slug').notNull(),
136
+ // Within-package FK to tools.name — real SQLite FK is fine here
137
+ toolName: text('tool_name')
138
+ .notNull()
139
+ .references(() => toolsTable.name),
140
+ // Plain text column: full | read_only | restricted
141
+ permission: text('permission').notNull(),
142
+ // Nullable JSON — null means the grant always applies
143
+ contextCondition: text('context_condition', { mode: 'json' })
144
+ .$type()
145
+ .default(null),
146
+ }, (table) => [
147
+ primaryKey({ columns: [table.agentSlug, table.toolName] }),
148
+ index('idx_agent_tools_agent_slug').on(table.agentSlug),
149
+ ]);
150
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/db/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,IAAI,GACL,MAAM,yBAAyB,CAAC;AAEjC,iDAAiD;AACjD,2CAA2C;AAC3C,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MAAM,EAAE,CAAC;SAClD,KAAK,EAA2B;SAChC,OAAO,EAAE;SACT,OAAO,CAAC,EAAE,CAAC;CACf,CAAC,CAAC;AAEH,iDAAiD;AACjD,+CAA+C;AAC/C,EAAE;AACF,yEAAyE;AACzE,6EAA6E;AAC7E,4EAA4E;AAC5E,oFAAoF;AACpF,sDAAsD;AACtD,EAAE;AACF,oEAAoE;AACpE,gEAAgE;AAChE,sEAAsE;AACtE,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CACxC,aAAa,EACb;IACE,8DAA8D;IAC9D,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACvC,gEAAgE;IAChE,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC;SACxB,OAAO,EAAE;SACT,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IACpC,mDAAmD;IACnD,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IACxC,sDAAsD;IACtD,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SAC1D,KAAK,EAAkC;SACvC,OAAO,CAAC,IAAI,CAAC;CACjB,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1D,KAAK,CAAC,4BAA4B,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;CACxD,CACF,CAAC"}
package/src/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ export { seed } from './seed/index.js';
2
+ export { db, sqlite } from './db/client.js';
3
+ export { runMigrations } from './db/migrate.js';
4
+ export { agentToolsTable, mcpServersTable, platformsTable, toolPlatformBindingsTable, toolTypesTable, toolsTable, } from './db/schema.js';
5
+ export { ToolStore, ToolStoreError } from './store/tool-store.js';
6
+ export type { Tool, ToolCreateInput, ToolType, ToolStoreErrorCode, } from './store/tool-store.js';
7
+ export { BindingStore, BindingStoreError } from './store/binding-store.js';
8
+ export type { BindingCreateInput, BindingStoreErrorCode, Platform, PlatformSeedInput, ToolPlatformBinding, } from './store/binding-store.js';
9
+ export { McpServerStore, McpServerStoreError, } from './store/mcp-server-store.js';
10
+ export type { McpServer, McpServerCreateInput, McpServerStoreErrorCode, } from './store/mcp-server-store.js';
11
+ export { AgentToolStore, AgentToolStoreError, } from './store/agent-tool-store.js';
12
+ export type { AgentToolGrant, AgentToolGrantInput, AgentToolStoreErrorCode, PermissionLevel, } from './store/agent-tool-store.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/agent/agent-store-tools/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,YAAY,EACV,IAAI,EACJ,eAAe,EACf,QAAQ,EACR,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,SAAS,EACT,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,GAChB,MAAM,6BAA6B,CAAC"}
package/src/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // Public barrel — every store and schema table added by subsequent plan states
2
+ // should be re-exported here.
3
+ export { seed } from './seed/index.js';
4
+ export { db, sqlite } from './db/client.js';
5
+ export { runMigrations } from './db/migrate.js';
6
+ export { agentToolsTable, mcpServersTable, platformsTable, toolPlatformBindingsTable, toolTypesTable, toolsTable, } from './db/schema.js';
7
+ export { ToolStore, ToolStoreError } from './store/tool-store.js';
8
+ export { BindingStore, BindingStoreError } from './store/binding-store.js';
9
+ export { McpServerStore, McpServerStoreError, } from './store/mcp-server-store.js';
10
+ export { AgentToolStore, AgentToolStoreError, } from './store/agent-tool-store.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/agent/agent-store-tools/src/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8BAA8B;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAOlE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAQ3E,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,cAAc,EACd,mBAAmB,GACpB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Canonical tool-platform binding seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §6
5
+ * — Platform Bindings (claude_code) and Platform Bindings (claude_api).
6
+ *
7
+ * Each row maps (tool_name, platform_id) → platform_tool_name.
8
+ * availability is one of: available | restricted | unavailable | requires_permission
9
+ * Tools absent from a platform are seeded as availability: "unavailable".
10
+ */
11
+ export interface BindingSeedRow {
12
+ toolName: string;
13
+ platformId: string;
14
+ platformToolName: string;
15
+ availability: string;
16
+ requiresMcp?: boolean;
17
+ invocationNote?: string | null;
18
+ }
19
+ /** All canonical platform bindings shipped with the registry. */
20
+ export declare const BINDING_SEEDS: BindingSeedRow[];
21
+ //# sourceMappingURL=bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/bindings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AA2JD,iEAAiE;AACjE,eAAO,MAAM,aAAa,EAAE,cAAc,EAGzC,CAAC"}
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Canonical tool-platform binding seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §6
5
+ * — Platform Bindings (claude_code) and Platform Bindings (claude_api).
6
+ *
7
+ * Each row maps (tool_name, platform_id) → platform_tool_name.
8
+ * availability is one of: available | restricted | unavailable | requires_permission
9
+ * Tools absent from a platform are seeded as availability: "unavailable".
10
+ */
11
+ /** Platform bindings for claude_code (PascalCase built-in tool names). */
12
+ const CLAUDE_CODE_BINDINGS = [
13
+ {
14
+ toolName: 'file_read',
15
+ platformId: 'claude_code',
16
+ platformToolName: 'Read',
17
+ availability: 'available',
18
+ },
19
+ {
20
+ toolName: 'file_write',
21
+ platformId: 'claude_code',
22
+ platformToolName: 'Write',
23
+ availability: 'available',
24
+ },
25
+ {
26
+ toolName: 'file_edit',
27
+ platformId: 'claude_code',
28
+ platformToolName: 'Edit',
29
+ availability: 'available',
30
+ },
31
+ {
32
+ toolName: 'file_glob',
33
+ platformId: 'claude_code',
34
+ platformToolName: 'Glob',
35
+ availability: 'available',
36
+ },
37
+ {
38
+ toolName: 'file_grep',
39
+ platformId: 'claude_code',
40
+ platformToolName: 'Grep',
41
+ availability: 'available',
42
+ },
43
+ {
44
+ toolName: 'shell_exec',
45
+ platformId: 'claude_code',
46
+ platformToolName: 'Bash',
47
+ availability: 'available',
48
+ },
49
+ {
50
+ toolName: 'web_fetch',
51
+ platformId: 'claude_code',
52
+ platformToolName: 'WebFetch',
53
+ availability: 'available',
54
+ },
55
+ {
56
+ toolName: 'web_search',
57
+ platformId: 'claude_code',
58
+ platformToolName: 'WebSearch',
59
+ availability: 'available',
60
+ },
61
+ {
62
+ toolName: 'mcp_list_resources',
63
+ platformId: 'claude_code',
64
+ platformToolName: 'ListMcpResourcesTool',
65
+ availability: 'available',
66
+ },
67
+ {
68
+ toolName: 'mcp_read_resource',
69
+ platformId: 'claude_code',
70
+ platformToolName: 'ReadMcpResourceTool',
71
+ availability: 'available',
72
+ },
73
+ {
74
+ toolName: 'mcp_wait',
75
+ platformId: 'claude_code',
76
+ platformToolName: 'WaitForMcpServers',
77
+ availability: 'available',
78
+ },
79
+ {
80
+ toolName: 'human_input',
81
+ platformId: 'claude_code',
82
+ platformToolName: 'AskUserQuestion',
83
+ availability: 'available',
84
+ },
85
+ {
86
+ toolName: 'process_monitor',
87
+ platformId: 'claude_code',
88
+ platformToolName: 'Monitor',
89
+ availability: 'available',
90
+ },
91
+ {
92
+ toolName: 'code_analysis',
93
+ platformId: 'claude_code',
94
+ platformToolName: 'LSP',
95
+ availability: 'available',
96
+ },
97
+ {
98
+ toolName: 'notebook_edit',
99
+ platformId: 'claude_code',
100
+ platformToolName: 'NotebookEdit',
101
+ availability: 'available',
102
+ },
103
+ ];
104
+ /**
105
+ * Platform bindings for claude_api (structured API tool definitions).
106
+ * Tools without a built-in equivalent are seeded as unavailable.
107
+ */
108
+ const CLAUDE_API_BINDINGS = [
109
+ {
110
+ toolName: 'file_read',
111
+ platformId: 'claude_api',
112
+ platformToolName: 'read_file',
113
+ availability: 'available',
114
+ invocationNote: 'computer-use or custom tool',
115
+ },
116
+ {
117
+ toolName: 'file_write',
118
+ platformId: 'claude_api',
119
+ platformToolName: 'write_file',
120
+ availability: 'available',
121
+ },
122
+ {
123
+ toolName: 'shell_exec',
124
+ platformId: 'claude_api',
125
+ platformToolName: 'bash',
126
+ availability: 'available',
127
+ },
128
+ {
129
+ toolName: 'web_fetch',
130
+ platformId: 'claude_api',
131
+ platformToolName: 'web_fetch',
132
+ availability: 'available',
133
+ },
134
+ {
135
+ toolName: 'web_search',
136
+ platformId: 'claude_api',
137
+ platformToolName: 'web_search',
138
+ availability: 'available',
139
+ },
140
+ {
141
+ toolName: 'human_input',
142
+ platformId: 'claude_api',
143
+ platformToolName: '',
144
+ availability: 'unavailable',
145
+ invocationNote: 'No built-in HITL on raw API',
146
+ },
147
+ {
148
+ toolName: 'code_analysis',
149
+ platformId: 'claude_api',
150
+ platformToolName: '',
151
+ availability: 'unavailable',
152
+ invocationNote: 'No built-in LSP on raw API',
153
+ },
154
+ {
155
+ toolName: 'mcp_wait',
156
+ platformId: 'claude_api',
157
+ platformToolName: '',
158
+ availability: 'unavailable',
159
+ invocationNote: 'Not applicable',
160
+ },
161
+ ];
162
+ /** All canonical platform bindings shipped with the registry. */
163
+ export const BINDING_SEEDS = [
164
+ ...CLAUDE_CODE_BINDINGS,
165
+ ...CLAUDE_API_BINDINGS,
166
+ ];
167
+ //# sourceMappingURL=bindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bindings.js","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/bindings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,0EAA0E;AAC1E,MAAM,oBAAoB,GAAqB;IAC7C;QACE,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,MAAM;QACxB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,OAAO;QACzB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,MAAM;QACxB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,MAAM;QACxB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,MAAM;QACxB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,MAAM;QACxB,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,UAAU;QAC5B,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,aAAa;QACzB,gBAAgB,EAAE,WAAW;QAC7B,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,oBAAoB;QAC9B,UAAU,EAAE,aAAa;QACzB,gBAAgB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Y,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,YAAY;QACxB,gBAAgB,EAAE,YAAY;QAC9B,YAAY,EAAE,WAAW;KAC1B;IACD;QACE,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,YAAY;QACxB,gBAAgB,EAAE,EAAE;QACpB,YAAY,EAAE,aAAa;QAC3B,cAAc,EAAE,6BAA6B;KAC9C;IACD;QACE,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,YAAY;QACxB,gBAAgB,EAAE,EAAE;QACpB,YAAY,EAAE,aAAa;QAC3B,cAAc,EAAE,4BAA4B;KAC7C;IACD;QACE,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,YAAY;QACxB,gBAAgB,EAAE,EAAE;QACpB,YAAY,EAAE,aAAa;QAC3B,cAAc,EAAE,gBAAgB;KACjC;CACF,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAqB;IAC7C,GAAG,oBAAoB;IACvB,GAAG,mBAAmB;CACvB,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Idempotent seeder for the full tool catalog.
3
+ *
4
+ * seed(db) inserts tool types → platforms → tools → bindings in FK order.
5
+ * Every insert uses onConflictDoNothing() so running twice is a safe no-op
6
+ * and never bumps row versions. [inv:version-retained]
7
+ *
8
+ * Usage:
9
+ * import Database from 'better-sqlite3';
10
+ * import { drizzle } from 'drizzle-orm/better-sqlite3';
11
+ * import { runMigrationsOn } from '@adhd/agent-store-tools';
12
+ * import { seed } from '@adhd/agent-tool-registry/seed';
13
+ *
14
+ * const sqlite = new Database('/path/to/registry.db');
15
+ * const db = drizzle(sqlite);
16
+ * runMigrationsOn(sqlite, db);
17
+ * seed(db);
18
+ */
19
+ import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
20
+ /**
21
+ * Populate the tool catalog from canonical seed data.
22
+ *
23
+ * Idempotent: safe to call on a DB that already has the seed rows.
24
+ * Re-running produces zero new rows and zero errors.
25
+ *
26
+ * FK insertion order: tool_types → platforms → tools → tool_platform_bindings
27
+ */
28
+ export declare function seed(db: BetterSQLite3Database<Record<string, never>>): void;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAUxE;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,qBAAqB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAiD3E"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Idempotent seeder for the full tool catalog.
3
+ *
4
+ * seed(db) inserts tool types → platforms → tools → bindings in FK order.
5
+ * Every insert uses onConflictDoNothing() so running twice is a safe no-op
6
+ * and never bumps row versions. [inv:version-retained]
7
+ *
8
+ * Usage:
9
+ * import Database from 'better-sqlite3';
10
+ * import { drizzle } from 'drizzle-orm/better-sqlite3';
11
+ * import { runMigrationsOn } from '@adhd/agent-store-tools';
12
+ * import { seed } from '@adhd/agent-tool-registry/seed';
13
+ *
14
+ * const sqlite = new Database('/path/to/registry.db');
15
+ * const db = drizzle(sqlite);
16
+ * runMigrationsOn(sqlite, db);
17
+ * seed(db);
18
+ */
19
+ import { toolPlatformBindingsTable, toolsTable } from '../db/schema.js';
20
+ import { BindingStore } from '../store/binding-store.js';
21
+ import { ToolStore } from '../store/tool-store.js';
22
+ import { BINDING_SEEDS } from './bindings.js';
23
+ import { PLATFORM_SEEDS } from './platforms.js';
24
+ import { TOOL_SEEDS } from './tools.js';
25
+ import { TOOL_TYPE_SEEDS } from './tool-types.js';
26
+ /**
27
+ * Populate the tool catalog from canonical seed data.
28
+ *
29
+ * Idempotent: safe to call on a DB that already has the seed rows.
30
+ * Re-running produces zero new rows and zero errors.
31
+ *
32
+ * FK insertion order: tool_types → platforms → tools → tool_platform_bindings
33
+ */
34
+ export function seed(db) {
35
+ const toolStore = new ToolStore(db);
36
+ const bindingStore = new BindingStore(db);
37
+ // 1. tool_types (no FK dependencies)
38
+ // ToolStore.seedToolType already uses onConflictDoNothing.
39
+ for (const tt of TOOL_TYPE_SEEDS) {
40
+ toolStore.seedToolType(tt);
41
+ }
42
+ // 2. platforms (no FK dependencies)
43
+ // BindingStore.seedPlatform already uses onConflictDoNothing.
44
+ for (const p of PLATFORM_SEEDS) {
45
+ bindingStore.seedPlatform(p);
46
+ }
47
+ // 3. tools (FK → tool_types)
48
+ // Use onConflictDoNothing for idempotent upsert semantics.
49
+ for (const t of TOOL_SEEDS) {
50
+ db.insert(toolsTable)
51
+ .values({
52
+ name: t.name,
53
+ type: t.type,
54
+ description: t.description,
55
+ version: 1,
56
+ requiresApproval: t.requiresApproval,
57
+ isDestructive: t.isDestructive,
58
+ dependencyToolIds: [],
59
+ capabilities: [],
60
+ })
61
+ .onConflictDoNothing()
62
+ .run();
63
+ }
64
+ // 4. tool_platform_bindings (FK → tools + platforms)
65
+ // onConflictDoNothing ignores any (tool_name, platform_id) that already exists.
66
+ for (const b of BINDING_SEEDS) {
67
+ db.insert(toolPlatformBindingsTable)
68
+ .values({
69
+ toolName: b.toolName,
70
+ platformId: b.platformId,
71
+ platformToolName: b.platformToolName,
72
+ availability: b.availability,
73
+ requiresMcp: b.requiresMcp ?? false,
74
+ invocationNote: b.invocationNote ?? null,
75
+ })
76
+ .onConflictDoNothing()
77
+ .run();
78
+ }
79
+ }
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,iB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IAED,qDAAqD;IACrD,mFAAmF;IACnF,KAAK,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QAC9B,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;aACjC,MAAM,CAAC;YACN,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,UAAU,EAAE,CAAC,CAAC,UAAU;YACxB,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;YACpC,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,KAAK;YACnC,cAAc,EAAE,CAAC,CAAC,cAAc,IAAI,IAAI;SACzC,CAAC;aACD,mBAAmB,EAAE;aACrB,GAAG,EAAE,CAAC;IACX,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Canonical platform seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §5
5
+ *
6
+ * header_format is one of: yaml_frontmatter | json_object | none
7
+ * supports_tool_selection controls whether the compiler emits a tools: header.
8
+ */
9
+ export interface PlatformSeedRow {
10
+ id: string;
11
+ name: string;
12
+ headerFormat: string;
13
+ supportsToolSelection: boolean;
14
+ }
15
+ /** All 6 canonical platforms shipped with the registry. */
16
+ export declare const PLATFORM_SEEDS: PlatformSeedRow[];
17
+ //# sourceMappingURL=platforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/platforms.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED,2DAA2D;AAC3D,eAAO,MAAM,cAAc,EAAE,eAAe,EAqC3C,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Canonical platform seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §5
5
+ *
6
+ * header_format is one of: yaml_frontmatter | json_object | none
7
+ * supports_tool_selection controls whether the compiler emits a tools: header.
8
+ */
9
+ /** All 6 canonical platforms shipped with the registry. */
10
+ export const PLATFORM_SEEDS = [
11
+ {
12
+ id: 'claude_code',
13
+ name: 'Claude Code CLI',
14
+ headerFormat: 'yaml_frontmatter',
15
+ supportsToolSelection: true,
16
+ },
17
+ {
18
+ id: 'claude_api',
19
+ name: 'Anthropic Claude API',
20
+ headerFormat: 'json_object',
21
+ supportsToolSelection: true,
22
+ },
23
+ {
24
+ id: 'openai',
25
+ name: 'OpenAI API',
26
+ headerFormat: 'json_object',
27
+ supportsToolSelection: true,
28
+ },
29
+ {
30
+ id: 'bedrock',
31
+ name: 'AWS Bedrock',
32
+ headerFormat: 'json_object',
33
+ supportsToolSelection: true,
34
+ },
35
+ {
36
+ id: 'cursor',
37
+ name: 'Cursor IDE',
38
+ headerFormat: 'none',
39
+ supportsToolSelection: false,
40
+ },
41
+ {
42
+ id: 'vscode',
43
+ name: 'VS Code Extension',
44
+ headerFormat: 'none',
45
+ supportsToolSelection: false,
46
+ },
47
+ ];
48
+ //# sourceMappingURL=platforms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platforms.js","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/platforms.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C;QACE,EAAE,EAAE,aAAa;QACjB,IAAI,EAAE,iBAAiB;QACvB,YAAY,EAAE,kBAAkB;QAChC,qBAAqB,EAAE,IAAI;KAC5B;IACD;QACE,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,aAAa;QAC3B,qBAAqB,EAAE,IAAI;KAC5B;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,aAAa;QAC3B,qBAAqB,EAAE,IAAI;KAC5B;IACD;QACE,EAAE,EAAE,SAAS;QACb,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,aAAa;QAC3B,qBAAqB,EAAE,IAAI;KAC5B;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,YAAY;QAClB,YAAY,EAAE,MAAM;QACpB,qBAAqB,EAAE,KAAK;KAC7B;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,MAAM;QACpB,qBAAqB,EAAE,KAAK;KAC7B;CACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Canonical tool-type seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §2
5
+ *
6
+ * tool_types uses a text PK (never a SQL enum) so new types are added by
7
+ * seeding a row, not by migrating a schema. [inv:lookup-not-enum]
8
+ */
9
+ export interface ToolTypeSeedRow {
10
+ slug: string;
11
+ description: string;
12
+ }
13
+ /** All 8 canonical tool types shipped with the registry. */
14
+ export declare const TOOL_TYPE_SEEDS: ToolTypeSeedRow[];
15
+ //# sourceMappingURL=tool-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-types.d.ts","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/tool-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,eAAe,EAyB5C,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Canonical tool-type seed data.
3
+ *
4
+ * Source of truth: docs/plan/agent-registry/SEED_DATA.md §2
5
+ *
6
+ * tool_types uses a text PK (never a SQL enum) so new types are added by
7
+ * seeding a row, not by migrating a schema. [inv:lookup-not-enum]
8
+ */
9
+ /** All 8 canonical tool types shipped with the registry. */
10
+ export const TOOL_TYPE_SEEDS = [
11
+ {
12
+ slug: 'io',
13
+ description: 'File system read, write, edit, search operations',
14
+ },
15
+ {
16
+ slug: 'compute',
17
+ description: 'Shell execution, script running, process management',
18
+ },
19
+ { slug: 'network', description: 'Web fetch, HTTP requests, web search' },
20
+ {
21
+ slug: 'memory',
22
+ description: 'MCP resource access, cross-agent recall, tag operations',
23
+ },
24
+ { slug: 'ui', description: 'Human input requests, interactive prompts' },
25
+ {
26
+ slug: 'meta',
27
+ description: 'MCP server lifecycle, server waiting, platform utilities',
28
+ },
29
+ {
30
+ slug: 'lsp',
31
+ description: 'Language server protocol: go-to-definition, diagnostics, hover',
32
+ },
33
+ { slug: 'notebook', description: 'Jupyter notebook cell operations' },
34
+ ];
35
+ //# sourceMappingURL=tool-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-types.js","sourceRoot":"","sources":["../../../../../../packages/agent/agent-store-tools/src/seed/tool-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD;QACE,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,kDAAkD;KAChE;IACD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,qDAAqD;KACnE;IACD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,yDAAyD;KACvE;IACD,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,2CAA2C,EAAE;IACxE;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0DAA0D;KACxE;IACD;QACE,IAAI,EAAE,KAAK;QACX,WAAW,EACT,gEAAgE;KACnE;IACD,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kCAAkC,EAAE;CACtE,CAAC"}