@agentage/extension 0.24.0 → 0.25.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/README.md CHANGED
@@ -31,8 +31,8 @@ export function create(ctx: McpContext) {
31
31
  }
32
32
  ```
33
33
 
34
- Since 0.24.0 the kit names each tool `{id}_{name}`, with one underscore. Its schemas still accept
35
- the old `{id}__{name}` for now, and refuse a tool of another id.
34
+ Since 0.24.0 the kit names each tool `{id}_{name}`, with one underscore. Since 0.25.0 its schemas refuse
35
+ the old two-underscore form, and a tool of another id.
36
36
 
37
37
  Start a new extension with `npx @agentage/cli extension create my-ext`: it pins this kit for you.
38
38
 
@@ -92,7 +92,7 @@ const openapiNamesItsExtension = ({ id, openapi }) => !openapi || /^\/api\/v[0-9
92
92
  const OPENAPI_RULE = { message: 'openapi is /api/{id}/openapi.json', path: ['openapi'] };
93
93
  // A served document has no old /api/v{N} form: what serves it now runs this kit.
94
94
  const openapiIsOwn = ({ id, openapi }) => !openapi || openapi === `/api/${id}/openapi.json`;
95
- // A served tool is {id}_{name} (or the old {id}__{name}) of this id: the host names it so.
95
+ // A served tool is {id}_{name} of this id: the host names it so.
96
96
  export const toolsAreOwn = ({ id, tools }) => (tools ?? []).every((t) => ownsTool(id, t.name));
97
97
  export const TOOLS_RULE = { message: 'every tool is {id}_{name}', path: ['tools'] };
98
98
  // A scoped name lives only in secretParts, so an estate that does not read it mounts nothing.
@@ -55,12 +55,12 @@ export const SERVED_KINDS = ['postgres', 'signoz', 'git', 'clickhouse'];
55
55
  export const StoreKindSchema = z.enum(Object.keys(STORE_KINDS));
56
56
  export const FULL_SHA = /^[0-9a-f]{40}$/;
57
57
  export const CommitSchema = z.string().regex(FULL_SHA, { message: 'full 40-hex git sha' });
58
- // {id}_{name} or the old {id}__{name}: an id has no _ and a name starts with a letter.
59
- const OWN_TOOL_REST = /^__?[a-z][a-z0-9_-]*$/;
58
+ // {id}_{name}: an id has no _ and a name starts with a letter.
59
+ const OWN_TOOL_REST = /^_[a-z][a-z0-9_-]*$/;
60
60
  export const PrefixedToolNameSchema = z
61
61
  .string()
62
62
  .max(64)
63
- .regex(/^[a-z][a-z0-9-]*__?[a-z][a-z0-9_-]*$/);
63
+ .regex(/^[a-z][a-z0-9-]*_[a-z][a-z0-9_-]*$/);
64
64
  export const ownsTool = (id, name) => name.startsWith(id) && OWN_TOOL_REST.test(name.slice(id.length));
65
65
  export const IMAGE_PART_KINDS = ['pages', 'ui', 'api', 'mcp', 'worker'];
66
66
  export const camelName = (name) => name.replace(/-([a-z0-9])/g, (_, c) => c.toUpperCase());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/extension",
3
- "version": "0.24.0",
3
+ "version": "0.25.1",
4
4
  "description": "The agentage extension kit: create(ctx) per part (pages, ui, api, mcp, worker, cli), the store, /health, discovery, the envelope, and the build tool with up and token",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@agentage/components": "^0.21",
90
- "@electric-sql/pglite": "^0.5.0",
90
+ "@electric-sql/pglite": "^0.5.0 || ^0.6.0",
91
91
  "@tailwindcss/postcss": "^4.3.0",
92
92
  "esbuild": ">=0.25.0",
93
93
  "express": "^5.1.0",
@@ -186,7 +186,7 @@
186
186
  "name": {
187
187
  "type": "string",
188
188
  "maxLength": 64,
189
- "pattern": "^[a-z][a-z0-9-]*__?[a-z][a-z0-9_-]*$"
189
+ "pattern": "^[a-z][a-z0-9-]*_[a-z][a-z0-9_-]*$"
190
190
  },
191
191
  "scope": {
192
192
  "type": "string",
@@ -141,7 +141,7 @@
141
141
  "name": {
142
142
  "type": "string",
143
143
  "maxLength": 64,
144
- "pattern": "^[a-z][a-z0-9-]*__?[a-z][a-z0-9_-]*$"
144
+ "pattern": "^[a-z][a-z0-9-]*_[a-z][a-z0-9_-]*$"
145
145
  },
146
146
  "scope": {
147
147
  "type": "string",
@@ -94,7 +94,7 @@
94
94
  "name": {
95
95
  "type": "string",
96
96
  "maxLength": 64,
97
- "pattern": "^[a-z][a-z0-9-]*__?[a-z][a-z0-9_-]*$"
97
+ "pattern": "^[a-z][a-z0-9-]*_[a-z][a-z0-9_-]*$"
98
98
  },
99
99
  "scope": {
100
100
  "type": "string",