@agentage/extension 0.16.0 → 0.17.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 (52) hide show
  1. package/dist/api/files-registry.d.ts +17 -0
  2. package/dist/api/files-registry.js +10 -0
  3. package/dist/api/files.d.ts +8 -0
  4. package/dist/api/files.js +82 -0
  5. package/dist/api/routes.d.ts +6 -0
  6. package/dist/api/routes.js +3 -1
  7. package/dist/auth/token-check.d.ts +1 -1
  8. package/dist/auth/verify-token.js +9 -9
  9. package/dist/context/test-context.d.ts +5 -1
  10. package/dist/context/test-context.js +2 -1
  11. package/dist/host/daemon/child.js +6 -4
  12. package/dist/host/daemon/health-routes.js +13 -8
  13. package/dist/host/daemon/routes.js +3 -1
  14. package/dist/host/daemon/seal.d.ts +6 -2
  15. package/dist/host/daemon/seal.js +9 -2
  16. package/dist/host/host-extension.js +4 -1
  17. package/dist/host/host-git-store.d.ts +10 -0
  18. package/dist/host/host-git-store.js +36 -0
  19. package/dist/host/host-parts.d.ts +2 -2
  20. package/dist/host/host-parts.js +1 -1
  21. package/dist/host/host-url-store.d.ts +2 -1
  22. package/dist/host/host-url-store.js +1 -1
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/manifest/primitives.schema.js +1 -1
  26. package/dist/mcp/connector.d.ts +4 -0
  27. package/dist/mcp/connector.js +11 -0
  28. package/dist/mcp/mcp-app.d.ts +3 -1
  29. package/dist/mcp/mcp-app.js +27 -17
  30. package/dist/mcp/server.d.ts +6 -3
  31. package/dist/mcp/server.js +52 -14
  32. package/dist/mcp/tools.d.ts +22 -4
  33. package/dist/mcp/tools.js +22 -12
  34. package/dist/runtime/part-mounts.js +12 -6
  35. package/dist/server/api-routes.d.ts +5 -2
  36. package/dist/server/api-routes.js +8 -6
  37. package/dist/server/app.d.ts +3 -0
  38. package/dist/server/app.js +11 -1
  39. package/dist/store/git-env.d.ts +11 -0
  40. package/dist/store/git-env.js +44 -0
  41. package/dist/store/store-url.d.ts +1 -1
  42. package/dist/store/store-url.js +2 -0
  43. package/dist/store/store.types.d.ts +3 -0
  44. package/dist/store/store.types.js +1 -1
  45. package/dist/testing/test-server.js +11 -12
  46. package/dist/tool/container-recipe.d.ts +5 -2
  47. package/dist/tool/container-recipe.js +6 -5
  48. package/dist/tool/container-stage.js +1 -1
  49. package/dist/tool/record-extras.js +4 -3
  50. package/dist/tool/rules/store.js +0 -3
  51. package/dist/tool/rules/surface.js +4 -1
  52. package/package.json +1 -1
@@ -46,6 +46,6 @@ export const stageContainer = async (dir, pkg, tmpRoot = tmpdir()) => {
46
46
  for (const path of await containerPaths(dir, pkg))
47
47
  await cp(join(dir, path), join(root, 'app', path), { recursive: true, filter });
48
48
  const pglite = hasStore(pkg, 'postgres') ? await pgliteVersion(dir) : undefined;
49
- await writeFile(join(root, 'Dockerfile'), containerRecipe({ pglite }));
49
+ await writeFile(join(root, 'Dockerfile'), containerRecipe({ pglite, git: hasStore(pkg, 'git') }));
50
50
  return root;
51
51
  };
@@ -31,14 +31,15 @@ export const recordingContext = (pkg, part) => createContext({
31
31
  });
32
32
  export const registeredTools = async (create, pkg) => {
33
33
  const registry = createToolRegistry();
34
- await create({ ...recordingContext(pkg, 'mcp'), tool: registry.tool });
34
+ const { tool, instructions, connector } = registry;
35
+ await create({ ...recordingContext(pkg, 'mcp'), tool, instructions, connector });
35
36
  return registry.tools;
36
37
  };
37
38
  // What an api part's create(ctx) registers with ctx.route, and what it returns.
38
39
  export const registeredRoutes = async (create, pkg) => {
39
40
  const registry = createRouteRegistry();
40
- const { route, wellKnown } = registry;
41
- const returned = await create({ ...recordingContext(pkg, 'api'), route, wellKnown });
41
+ const { route, wellKnown, files } = registry;
42
+ const returned = await create({ ...recordingContext(pkg, 'api'), route, wellKnown, files });
42
43
  return { routes: registry.routes, returned };
43
44
  };
44
45
  export const toolsOf = async (dir, pkg) => {
@@ -1,7 +1,6 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { join, resolve } from 'node:path';
3
3
  import { migratesStore, storeOf } from '../../manifest/parts.js';
4
- import { SERVED_KINDS } from '../../manifest/primitives.schema.js';
5
4
  import { sqlFiles } from '../../store/migrations.js';
6
5
  import {} from '../check.js';
7
6
  import {} from '../exec.js';
@@ -45,8 +44,6 @@ export const store = {
45
44
  const kind = storeOf(pkg);
46
45
  if (!kind)
47
46
  return { skipped: 'no store' };
48
- if (!SERVED_KINDS.includes(kind))
49
- return [{ problem: `kind ${kind} is not served yet; served: ${SERVED_KINDS.join(', ')}` }];
50
47
  if (!migratesStore(pkg))
51
48
  return { skipped: `kind ${kind} has no migrations` };
52
49
  const files = await sqlFiles(join(dir, 'migrations'));
@@ -71,11 +71,14 @@ const apiSurface = async ({ dir, pkg }) => {
71
71
  : routerProblems(pkg, doc, returned);
72
72
  return found.map((problem) => ({ file: OPENAPI_FILE, problem }));
73
73
  };
74
+ // As the server lists it: title, annotations and outputSchema only when set.
74
75
  const listed = (id, { name, spec }) => ({
75
76
  name: prefixed(id, name),
77
+ ...(spec.title !== undefined && { title: spec.title }),
76
78
  description: spec.description,
77
79
  inputSchema: schemaOf(spec.input, 'input'),
78
- outputSchema: schemaOf(spec.output, 'output'),
80
+ ...(spec.output && { outputSchema: schemaOf(spec.output, 'output') }),
81
+ ...(spec.annotations && { annotations: spec.annotations }),
79
82
  });
80
83
  const byName = ({ serverInfo, tools }) => ({
81
84
  serverInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/extension",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
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",