@zackbart/connecta 0.10.6 → 0.12.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 (97) hide show
  1. package/AGENTS.md +8 -6
  2. package/CHANGELOG.md +80 -0
  3. package/README.md +5 -4
  4. package/bin/connecta.mjs +0 -7
  5. package/dist/activity.d.ts.map +1 -1
  6. package/dist/activity.js.map +1 -1
  7. package/dist/apps-shell.d.ts +38 -0
  8. package/dist/apps-shell.d.ts.map +1 -0
  9. package/dist/apps-shell.js +175 -0
  10. package/dist/apps-shell.js.map +1 -0
  11. package/dist/catalog-service.d.ts +2 -17
  12. package/dist/catalog-service.d.ts.map +1 -1
  13. package/dist/catalog-service.js +4 -6
  14. package/dist/catalog-service.js.map +1 -1
  15. package/dist/connectors/api.d.ts +2 -2
  16. package/dist/connectors/remote-mcp.d.ts +1 -1
  17. package/dist/errors.d.ts +1 -3
  18. package/dist/errors.d.ts.map +1 -1
  19. package/dist/errors.js +1 -1
  20. package/dist/errors.js.map +1 -1
  21. package/dist/execute.d.ts +37 -8
  22. package/dist/execute.d.ts.map +1 -1
  23. package/dist/execute.js +137 -42
  24. package/dist/execute.js.map +1 -1
  25. package/dist/executor-admission.d.ts +8 -0
  26. package/dist/executor-admission.d.ts.map +1 -1
  27. package/dist/executor-admission.js +11 -0
  28. package/dist/executor-admission.js.map +1 -1
  29. package/dist/executors/quickjs.d.ts.map +1 -1
  30. package/dist/executors/quickjs.js +2 -2
  31. package/dist/executors/quickjs.js.map +1 -1
  32. package/dist/index.d.ts +15 -31
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +23 -37
  35. package/dist/index.js.map +1 -1
  36. package/dist/invocation.js +2 -2
  37. package/dist/invocation.js.map +1 -1
  38. package/dist/meta-tools.d.ts +19 -58
  39. package/dist/meta-tools.d.ts.map +1 -1
  40. package/dist/meta-tools.js +34 -431
  41. package/dist/meta-tools.js.map +1 -1
  42. package/dist/registry.d.ts +1 -10
  43. package/dist/registry.d.ts.map +1 -1
  44. package/dist/registry.js +3 -15
  45. package/dist/registry.js.map +1 -1
  46. package/dist/routes/mcp.d.ts.map +1 -1
  47. package/dist/routes/mcp.js +67 -30
  48. package/dist/routes/mcp.js.map +1 -1
  49. package/dist/routes/shared.d.ts +5 -11
  50. package/dist/routes/shared.d.ts.map +1 -1
  51. package/dist/routes/shared.js.map +1 -1
  52. package/dist/server.js +5 -4
  53. package/dist/server.js.map +1 -1
  54. package/dist/skills.d.ts +8 -18
  55. package/dist/skills.d.ts.map +1 -1
  56. package/dist/skills.js +13 -60
  57. package/dist/skills.js.map +1 -1
  58. package/dist/types.d.ts +6 -20
  59. package/dist/types.d.ts.map +1 -1
  60. package/dist/version.d.ts +1 -1
  61. package/dist/version.js +1 -1
  62. package/documentation/code-first-exploration.md +16 -16
  63. package/documentation/code-mode.md +130 -41
  64. package/documentation/connectors.md +1 -1
  65. package/documentation/mcp-2026-07-28.md +1 -1
  66. package/documentation/mcp-ui-design.md +382 -0
  67. package/documentation/meta-tools.md +30 -43
  68. package/documentation/rich-output-design.md +4 -4
  69. package/ethos.md +7 -2
  70. package/examples/node/README.md +1 -2
  71. package/examples/node/src/index.ts +1 -3
  72. package/examples/worker/README.md +8 -13
  73. package/examples/worker/src/index.ts +6 -14
  74. package/examples/worker/wrangler.jsonc +3 -6
  75. package/package.json +1 -1
  76. package/src/activity.ts +5 -0
  77. package/src/apps-shell.ts +179 -0
  78. package/src/catalog-service.ts +6 -26
  79. package/src/connectors/api.ts +2 -2
  80. package/src/connectors/remote-mcp.ts +1 -1
  81. package/src/errors.ts +2 -2
  82. package/src/execute.ts +150 -49
  83. package/src/executor-admission.ts +12 -0
  84. package/src/executors/quickjs.ts +2 -1
  85. package/src/index.ts +40 -69
  86. package/src/invocation.ts +2 -2
  87. package/src/meta-tools.ts +38 -565
  88. package/src/registry.ts +2 -33
  89. package/src/routes/mcp.ts +79 -30
  90. package/src/routes/shared.ts +4 -11
  91. package/src/server.ts +7 -7
  92. package/src/skills.ts +11 -74
  93. package/src/types.ts +6 -21
  94. package/src/version.ts +1 -1
  95. package/templates/node/README.md +2 -1
  96. package/templates/node/package.json +1 -1
  97. package/templates/node/src/index.ts +1 -1
package/AGENTS.md CHANGED
@@ -4,10 +4,10 @@ This is the canonical instruction file for coding agents. `CLAUDE.md` is a
4
4
  symlink to this file so every agent works from the same conventions.
5
5
 
6
6
  A single MCP endpoint aggregating downstream connectors (remote MCP servers and
7
- plain HTTP APIs) behind a small fixed set of meta-tools. A deployment with an
8
- executor serves seven, `execute_code` among them, and agents reach connectors by
9
- writing JavaScript against it; one without an executor serves the nine classic
10
- tools. One fetch-native core, running on both Node and Cloudflare Workers.
7
+ plain HTTP APIs) behind seven meta-tools, `execute_code` among them. Every
8
+ deployment configures an executor, and agents reach connectors by writing
9
+ JavaScript against it. One fetch-native core, running on both Node and
10
+ Cloudflare Workers.
11
11
 
12
12
  - **[`ethos.md`](./ethos.md) is the constitution.** It states what connecta is
13
13
  and isn't, and its decisions table carries a verdict for every shape already
@@ -15,8 +15,10 @@ tools. One fetch-native core, running on both Node and Cloudflare Workers.
15
15
  designing or building anything: a `refused` row is a "no" with the reason
16
16
  attached, and a `removed` row (toolkits
17
17
  [#178](https://github.com/zackbart/connecta/issues/178), proactive credential
18
- liveness [#179](https://github.com/zackbart/connecta/issues/179)) records a
19
- surface that no longer exists — do not reintroduce it without a new decision.
18
+ liveness [#179](https://github.com/zackbart/connecta/issues/179), the classic
19
+ executor-free surface
20
+ [#273](https://github.com/zackbart/connecta/issues/273)) records a surface
21
+ that no longer exists — do not reintroduce it without a new decision.
20
22
  - There is no TODO.md — the roadmap lives in
21
23
  [GitHub issues](https://github.com/zackbart/connecta/issues). When you find
22
24
  TODO items (in code comments, docs, or conversation), don't accumulate them
package/CHANGELOG.md CHANGED
@@ -2,6 +2,86 @@
2
2
 
3
3
  All notable changes to this package are documented here.
4
4
 
5
+ ## 0.12.0 — 2026-08-01
6
+
7
+ Programs gained a *view*. `execute_code` code can now call `connecta.ui(html)`
8
+ to hand the client one rendered MCP Apps view of the run — the thing
9
+ `connecta.emit` could not do, which is give a human something to look at while
10
+ the model keeps its cheap textual summary. Programs supply HTML content and
11
+ nothing else: the only `ui://` URI in the system is connecta's build-time shell,
12
+ so nothing a client could dereference is derived from anything a program said,
13
+ and the shell forwards no channel from the program's markup back to the host.
14
+ The channel is additive — a program that never calls `connecta.ui` produces the
15
+ byte-for-byte prior response, no executor changed to carry it, and there is no
16
+ new budget knob. Deployments do gain a `resources` capability and one extension
17
+ declaration, both of which the design requires before any host will render.
18
+ The design record is `documentation/mcp-ui-design.md` (#266); the contract is
19
+ `code-mode.md`'s "Rendered output" clauses (#277).
20
+
21
+ ### Added
22
+
23
+ - **`connecta.ui(html)` inside `execute_code`.** One non-empty HTML string, at
24
+ most one payload per run, delivered on success only in the tool result's
25
+ `_meta["connecta/ui"]` with `ui: true` on the JSON envelope. A failed program
26
+ discards it visibly (`uiDiscarded: true`), alongside `emittedDiscarded` when
27
+ one failure loses both. The payload spends the existing
28
+ `execute.maxEmittedBytes` aggregate, no block count, and no host calls.
29
+ - **The MCP Apps shell.** A static connecta-authored HTML5 template at
30
+ `ui://connecta/program-ui/v1` (`text/html;profile=mcp-app`), served by a
31
+ `resources/read` handler that answers exactly that URI; `resources/list` is
32
+ served and returns an empty list. `execute_code` declares it through
33
+ `_meta.ui.resourceUri` with `_meta.ui.visibility: ["model"]`, and the server
34
+ declares the `io.modelcontextprotocol/ui` extension — the one extension
35
+ connecta advertises, without which no host renders anything.
36
+ - **`diagnostics.ui`.** With `diagnostics: true`, the accepted payload's
37
+ serialized byte size, distinct from the `emitted` aggregate.
38
+
39
+ ### Fixed
40
+
41
+ - **Visible output discarded during QuickJS shutdown.** Closing the executor
42
+ after a program starts now reports accepted blocks and UI as discarded on
43
+ both error paths; admission failures before execution remain unchanged. (#279)
44
+
45
+ ## 0.11.0 — 2026-07-31
46
+
47
+ **This is a breaking deployment release.** Connecta no longer carries the old
48
+ executor-free compatibility surface. Every deployment must configure an
49
+ executor and now exposes the same seven tools; construction refuses to boot
50
+ without one. Existing code-first deployments keep their model-facing surface.
51
+ Node deployments that omitted an executor must add `quickJsExecutor()`, while
52
+ Workers deployments must configure a `DynamicWorkerExecutor` and its paid-plan
53
+ Worker Loader binding. Remove any `surface` setting during the upgrade. (#273)
54
+
55
+ The consolidation also removes the classic-only handlers and configuration
56
+ that had become two implementations of the same work. Discovery and batching
57
+ now have one home inside `execute_code`, while `call_tool`,
58
+ `call_destructive_tool`, and result retrieval remain explicit host boundaries.
59
+ The superseded code-first gate has been reduced to its surviving measurement
60
+ record instead of retaining a second executable version of the product.
61
+
62
+ ### Changed
63
+
64
+ - **An executor is required.** `ConnectaConfig.executor` is no longer optional;
65
+ use `quickJsExecutor()` from `@zackbart/connecta/quickjs` on Node or
66
+ `DynamicWorkerExecutor` from `@cloudflare/codemode` on Workers. The CLI
67
+ template, examples, doctor, documentation, and package smoke test all enforce
68
+ the same deployment shape.
69
+ - **Every MCP connection advertises exactly seven tools.** The former
70
+ top-level `list_connectors`, `describe_tools`, and `batch_call` registrations
71
+ are removed. Their supported equivalents are `connecta.search`,
72
+ `connecta.describe`, and `connecta.batch` inside `execute_code`.
73
+ - **The old surface controls fail explicitly.** Supplying the removed
74
+ `ConnectaConfig.surface` option throws instead of being ignored. The
75
+ classic-only `calls.maxBatchResultBytes` option also throws; program batching
76
+ is bounded by the executor and `connecta.batch` limits, while individual
77
+ calls still honor `calls.maxResultBytes` and connector overrides.
78
+ - **Cloudflare deployments require code mode.** The Worker example now requires
79
+ its `worker_loaders` binding and the Workers Paid plan rather than falling
80
+ back to the classic surface when the binding is absent.
81
+ - **The retired code-first gate is archival.** Its executable harness is
82
+ removed now that code-first is the sole product surface; the current-version
83
+ audit remains the live measurement path.
84
+
5
85
  ## 0.10.6 — 2026-07-31
6
86
 
7
87
  Programs gained a rich-output channel. `execute_code` code can now call
package/README.md CHANGED
@@ -69,7 +69,8 @@ my-connecta/
69
69
  For an agent setting this up, the contract is:
70
70
 
71
71
  1. Edit `src/index.ts`; do not copy Connecta internals into the deployment.
72
- 2. Keep `executor: quickJsExecutor()` for the prescribed seven-tool surface.
72
+ 2. Keep the required `executor: quickJsExecutor()` configuration; without an
73
+ executor the deployment refuses to boot.
73
74
  3. Keep secrets in environment variables or a secret store, never source.
74
75
  4. Add code only for deliberate `api()` connectors.
75
76
  5. Run `npm run typecheck`, start the server, and run
@@ -92,9 +93,9 @@ Other supported deployment shapes:
92
93
  - [Cloudflare Worker deployment](./examples/worker/)
93
94
  - [Subsystem documentation](./documentation/)
94
95
 
95
- Configuring a sandbox QuickJS on Node or a Dynamic Worker on Cloudflare — is
96
- what selects the code-first surface and is the assumed posture. A deployment
97
- without one keeps the earlier nine-tool compatibility interface.
96
+ Every deployment configures a sandbox: QuickJS on Node or a Dynamic Worker on
97
+ Cloudflare. Construction fails with an actionable error when the executor is
98
+ missing, so the model-facing interface is always the same seven tools.
98
99
 
99
100
  ## Project status
100
101
 
package/bin/connecta.mjs CHANGED
@@ -186,13 +186,6 @@ async function doctor() {
186
186
  if (health.status !== "ok") {
187
187
  throw new Error(`Unexpected health status: ${String(health.status)}`);
188
188
  }
189
- if (health.admission?.code === null) {
190
- throw new Error(
191
- "The server has no executor and is serving classic compatibility. " +
192
- "Keep executor: quickJsExecutor() for the prescribed surface.",
193
- );
194
- }
195
-
196
189
  let requestId = 0;
197
190
  const mcp = async (method, params) =>
198
191
  jsonResponse(
@@ -1 +1 @@
1
- {"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../src/activity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAqBzC,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,uBAAuB,GACvB,YAAY,GACZ,cAAc,CAAC;AAEnB,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,OAAO,GACP,SAAS,GACT,WAAW,CAAC;AAEhB,MAAM,MAA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AAC,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,KAAK;YAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The one MCP Apps template connecta serves (`U5`, `U6`).
3
+ *
4
+ * A build-time string constant, not a file read at startup: the core is
5
+ * Web-API-only so it runs unchanged on Workers, and the same bytes have to
6
+ * serve everywhere. The shell is display-only — it renders whatever HTML a
7
+ * program handed `connecta.ui` inside a nested `srcdoc` frame and forwards no
8
+ * channel back from that frame to the host, so program-authored markup is
9
+ * inert beyond its own pixels.
10
+ *
11
+ * The address carries a version segment because hosts are permitted to
12
+ * prefetch and cache templates by URI: change these bytes, bump `v1`.
13
+ */
14
+ /** The only `ui://` URI in the system. No program input reaches it. */
15
+ export declare const PROGRAM_UI_RESOURCE_URI = "ui://connecta/program-ui/v1";
16
+ /** The mimeType the Apps spec requires of an HTML template. */
17
+ export declare const PROGRAM_UI_MIME_TYPE = "text/html;profile=mcp-app";
18
+ /**
19
+ * The result `_meta` key carrying the payload (`U3`). A plain single-label
20
+ * prefix rather than the reverse-DNS form MCP's SHOULD prefers: connecta has
21
+ * no domain to reverse, and fabricating one to satisfy a SHOULD is a worse
22
+ * answer than the shape the key format's MUST already permits.
23
+ */
24
+ export declare const PROGRAM_UI_META_KEY = "connecta/ui";
25
+ /** The one extension identifier connecta advertises (`U11`). */
26
+ export declare const MCP_APPS_EXTENSION = "io.modelcontextprotocol/ui";
27
+ /**
28
+ * The shell document. Dependency-free and deliberately small: it speaks the
29
+ * Apps postMessage dialect (`ui/initialize`, `ui/notifications/initialized`,
30
+ * `ui/notifications/tool-result`, `ui/notifications/size-changed`,
31
+ * `ui/resource-teardown`), lifts `_meta["connecta/ui"].html` out of the
32
+ * delivered tool result, and puts it in a frame. It declares no CSP domains,
33
+ * so the host applies its restrictive default and the `srcdoc` frame inherits
34
+ * `default-src 'none'` — the payload gets scripts and local interactivity,
35
+ * and no network.
36
+ */
37
+ export declare const PROGRAM_UI_SHELL_HTML = "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>connecta program view</title>\n <style>\n html,\n body {\n margin: 0;\n padding: 0;\n background: transparent;\n }\n #program-view {\n display: block;\n width: 100%;\n min-height: 480px;\n border: 0;\n }\n </style>\n </head>\n <body>\n <iframe\n id=\"program-view\"\n title=\"Program-rendered view\"\n sandbox=\"allow-scripts\"\n srcdoc=\"\"\n ></iframe>\n <script>\n (function () {\n \"use strict\";\n // The host frame is the only peer this shell speaks to, in either\n // direction. The payload frame below is sandboxed to scripts alone,\n // with no same-origin escape, and is never handed a reply path:\n // anything it posts fails the source check and is dropped. There is\n // no bridge from program HTML to the host, by construction rather\n // than by validation.\n var host = window.parent;\n var view = document.getElementById(\"program-view\");\n var initializeId = \"connecta-ui-initialize\";\n var lastWidth = 0;\n var lastHeight = 0;\n\n function send(message) {\n if (!host || host === window) return;\n host.postMessage(message, \"*\");\n }\n\n function notify(method, params) {\n send({ jsonrpc: \"2.0\", method: method, params: params });\n }\n\n // Program views are fixed-height by construction. The shell has no\n // bridge to the payload frame \u2014 that is the security posture, not an\n // omission \u2014 so it can never learn the payload's content height, and\n // what it reports here is its own box: the min-height above, unless\n // the host has given it more. Taller content scrolls inside the inner\n // frame rather than growing the view. Raising the min-height is the\n // only lever; a content-height signal would cost the isolation.\n function reportSize() {\n var width = Math.ceil(document.documentElement.clientWidth);\n var height = Math.ceil(document.documentElement.scrollHeight);\n if (width === lastWidth && height === lastHeight) return;\n lastWidth = width;\n lastHeight = height;\n notify(\"ui/notifications/size-changed\", {\n width: width,\n height: height\n });\n }\n\n function payloadHtml(result) {\n if (!result || typeof result !== \"object\") return null;\n var meta = result._meta;\n if (!meta || typeof meta !== \"object\") return null;\n var payload = meta[\"connecta/ui\"];\n if (!payload || typeof payload !== \"object\") return null;\n var html = payload.html;\n return typeof html === \"string\" && html.length > 0 ? html : null;\n }\n\n function render(params) {\n var html =\n payloadHtml(params) ||\n payloadHtml(params && params.result) ||\n payloadHtml(params && params.toolResult);\n if (html === null) return;\n view.srcdoc = html;\n reportSize();\n }\n\n window.addEventListener(\"message\", function (event) {\n if (event.source !== host) return;\n var message = event.data;\n if (!message || message.jsonrpc !== \"2.0\") return;\n if (message.method === \"ui/notifications/tool-result\") {\n render(message.params);\n return;\n }\n if (message.method === \"ui/resource-teardown\") {\n // A host->view request, not a notification: the host waits for\n // this reply before it tears the view down. There is nothing to\n // release, so answer immediately rather than make it time out.\n if (message.id !== undefined && message.id !== null) {\n send({ jsonrpc: \"2.0\", id: message.id, result: {} });\n }\n return;\n }\n // Only a completed handshake earns \"initialized\". A JSON-RPC error\n // response carries the same id, and announcing initialization on one\n // would assert a handshake that never happened.\n if (message.id === initializeId && message.result !== undefined) {\n notify(\"ui/notifications/initialized\", {});\n }\n });\n\n window.addEventListener(\"resize\", reportSize);\n view.addEventListener(\"load\", reportSize);\n\n // Every field here is required by the Apps initialize schema, and a\n // conforming host rejects the request outright when one is missing \u2014\n // which would strand the shell before any tool result arrives.\n send({\n jsonrpc: \"2.0\",\n id: initializeId,\n method: \"ui/initialize\",\n params: {\n appInfo: { name: \"connecta program view\", version: \"1\" },\n appCapabilities: {},\n protocolVersion: \"2026-01-26\"\n }\n });\n reportSize();\n })();\n </script>\n </body>\n</html>\n";
38
+ //# sourceMappingURL=apps-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps-shell.d.ts","sourceRoot":"","sources":["../src/apps-shell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAErE,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,ssKAyIjC,CAAC"}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * The one MCP Apps template connecta serves (`U5`, `U6`).
3
+ *
4
+ * A build-time string constant, not a file read at startup: the core is
5
+ * Web-API-only so it runs unchanged on Workers, and the same bytes have to
6
+ * serve everywhere. The shell is display-only — it renders whatever HTML a
7
+ * program handed `connecta.ui` inside a nested `srcdoc` frame and forwards no
8
+ * channel back from that frame to the host, so program-authored markup is
9
+ * inert beyond its own pixels.
10
+ *
11
+ * The address carries a version segment because hosts are permitted to
12
+ * prefetch and cache templates by URI: change these bytes, bump `v1`.
13
+ */
14
+ /** The only `ui://` URI in the system. No program input reaches it. */
15
+ export const PROGRAM_UI_RESOURCE_URI = "ui://connecta/program-ui/v1";
16
+ /** The mimeType the Apps spec requires of an HTML template. */
17
+ export const PROGRAM_UI_MIME_TYPE = "text/html;profile=mcp-app";
18
+ /**
19
+ * The result `_meta` key carrying the payload (`U3`). A plain single-label
20
+ * prefix rather than the reverse-DNS form MCP's SHOULD prefers: connecta has
21
+ * no domain to reverse, and fabricating one to satisfy a SHOULD is a worse
22
+ * answer than the shape the key format's MUST already permits.
23
+ */
24
+ export const PROGRAM_UI_META_KEY = "connecta/ui";
25
+ /** The one extension identifier connecta advertises (`U11`). */
26
+ export const MCP_APPS_EXTENSION = "io.modelcontextprotocol/ui";
27
+ /**
28
+ * The shell document. Dependency-free and deliberately small: it speaks the
29
+ * Apps postMessage dialect (`ui/initialize`, `ui/notifications/initialized`,
30
+ * `ui/notifications/tool-result`, `ui/notifications/size-changed`,
31
+ * `ui/resource-teardown`), lifts `_meta["connecta/ui"].html` out of the
32
+ * delivered tool result, and puts it in a frame. It declares no CSP domains,
33
+ * so the host applies its restrictive default and the `srcdoc` frame inherits
34
+ * `default-src 'none'` — the payload gets scripts and local interactivity,
35
+ * and no network.
36
+ */
37
+ export const PROGRAM_UI_SHELL_HTML = `<!doctype html>
38
+ <html lang="en">
39
+ <head>
40
+ <meta charset="utf-8" />
41
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
42
+ <title>connecta program view</title>
43
+ <style>
44
+ html,
45
+ body {
46
+ margin: 0;
47
+ padding: 0;
48
+ background: transparent;
49
+ }
50
+ #program-view {
51
+ display: block;
52
+ width: 100%;
53
+ min-height: 480px;
54
+ border: 0;
55
+ }
56
+ </style>
57
+ </head>
58
+ <body>
59
+ <iframe
60
+ id="program-view"
61
+ title="Program-rendered view"
62
+ sandbox="allow-scripts"
63
+ srcdoc=""
64
+ ></iframe>
65
+ <script>
66
+ (function () {
67
+ "use strict";
68
+ // The host frame is the only peer this shell speaks to, in either
69
+ // direction. The payload frame below is sandboxed to scripts alone,
70
+ // with no same-origin escape, and is never handed a reply path:
71
+ // anything it posts fails the source check and is dropped. There is
72
+ // no bridge from program HTML to the host, by construction rather
73
+ // than by validation.
74
+ var host = window.parent;
75
+ var view = document.getElementById("program-view");
76
+ var initializeId = "connecta-ui-initialize";
77
+ var lastWidth = 0;
78
+ var lastHeight = 0;
79
+
80
+ function send(message) {
81
+ if (!host || host === window) return;
82
+ host.postMessage(message, "*");
83
+ }
84
+
85
+ function notify(method, params) {
86
+ send({ jsonrpc: "2.0", method: method, params: params });
87
+ }
88
+
89
+ // Program views are fixed-height by construction. The shell has no
90
+ // bridge to the payload frame — that is the security posture, not an
91
+ // omission — so it can never learn the payload's content height, and
92
+ // what it reports here is its own box: the min-height above, unless
93
+ // the host has given it more. Taller content scrolls inside the inner
94
+ // frame rather than growing the view. Raising the min-height is the
95
+ // only lever; a content-height signal would cost the isolation.
96
+ function reportSize() {
97
+ var width = Math.ceil(document.documentElement.clientWidth);
98
+ var height = Math.ceil(document.documentElement.scrollHeight);
99
+ if (width === lastWidth && height === lastHeight) return;
100
+ lastWidth = width;
101
+ lastHeight = height;
102
+ notify("ui/notifications/size-changed", {
103
+ width: width,
104
+ height: height
105
+ });
106
+ }
107
+
108
+ function payloadHtml(result) {
109
+ if (!result || typeof result !== "object") return null;
110
+ var meta = result._meta;
111
+ if (!meta || typeof meta !== "object") return null;
112
+ var payload = meta["connecta/ui"];
113
+ if (!payload || typeof payload !== "object") return null;
114
+ var html = payload.html;
115
+ return typeof html === "string" && html.length > 0 ? html : null;
116
+ }
117
+
118
+ function render(params) {
119
+ var html =
120
+ payloadHtml(params) ||
121
+ payloadHtml(params && params.result) ||
122
+ payloadHtml(params && params.toolResult);
123
+ if (html === null) return;
124
+ view.srcdoc = html;
125
+ reportSize();
126
+ }
127
+
128
+ window.addEventListener("message", function (event) {
129
+ if (event.source !== host) return;
130
+ var message = event.data;
131
+ if (!message || message.jsonrpc !== "2.0") return;
132
+ if (message.method === "ui/notifications/tool-result") {
133
+ render(message.params);
134
+ return;
135
+ }
136
+ if (message.method === "ui/resource-teardown") {
137
+ // A host->view request, not a notification: the host waits for
138
+ // this reply before it tears the view down. There is nothing to
139
+ // release, so answer immediately rather than make it time out.
140
+ if (message.id !== undefined && message.id !== null) {
141
+ send({ jsonrpc: "2.0", id: message.id, result: {} });
142
+ }
143
+ return;
144
+ }
145
+ // Only a completed handshake earns "initialized". A JSON-RPC error
146
+ // response carries the same id, and announcing initialization on one
147
+ // would assert a handshake that never happened.
148
+ if (message.id === initializeId && message.result !== undefined) {
149
+ notify("ui/notifications/initialized", {});
150
+ }
151
+ });
152
+
153
+ window.addEventListener("resize", reportSize);
154
+ view.addEventListener("load", reportSize);
155
+
156
+ // Every field here is required by the Apps initialize schema, and a
157
+ // conforming host rejects the request outright when one is missing —
158
+ // which would strand the shell before any tool result arrives.
159
+ send({
160
+ jsonrpc: "2.0",
161
+ id: initializeId,
162
+ method: "ui/initialize",
163
+ params: {
164
+ appInfo: { name: "connecta program view", version: "1" },
165
+ appCapabilities: {},
166
+ protocolVersion: "2026-01-26"
167
+ }
168
+ });
169
+ reportSize();
170
+ })();
171
+ </script>
172
+ </body>
173
+ </html>
174
+ `;
175
+ //# sourceMappingURL=apps-shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps-shell.js","sourceRoot":"","sources":["../src/apps-shell.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AAErE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAEjD,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAE/D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIpC,CAAC"}
@@ -5,22 +5,10 @@ export declare const DEFAULT_SEARCH_LIMIT = 8;
5
5
  export declare const MAX_SEARCH_LIMIT = 100;
6
6
  export declare const MAX_DESCRIBE_ADDRESSES = 100;
7
7
  export declare const MAX_DISCOVERY_RESULT_BYTES = 256000;
8
- /**
9
- * The tool a describe-path error should name when it tells a caller to retry.
10
- * This is the route the *caller* took, not the deployment's advertised surface:
11
- * a classic deployment with an executor serves `describe_tools` at top level
12
- * while every in-program describe still arrives through `connecta.describe`, so
13
- * one CatalogService cannot infer the answer from `surface` alone. Callers pass
14
- * the route they own.
15
- */
16
- export type DescribeRoute = "describe_tools" | "connecta.describe";
17
8
  /**
18
9
  * The discovery route a routing failure should send a caller back through. Same
19
- * rule as {@link DescribeRoute} the route the *caller* took, not the
20
- * deployment's advertised surface with one difference worth keeping the two
21
- * options separate for: `search_tools` exists on both advertised surfaces, so a
22
- * top-level handler never has to derive this one, while an in-program caller
23
- * still has to be told about `connecta.search` because it cannot call a tool.
10
+ * catalog logic serves both the top-level `search_tools` path and the
11
+ * in-program `connecta.search` path, so callers pass the route they own.
24
12
  */
25
13
  export type SearchRoute = "search_tools" | "connecta.search";
26
14
  export declare class DiscoveryPolicyError extends Error {
@@ -124,7 +112,6 @@ export declare class CatalogService {
124
112
  readonly requestScope: object;
125
113
  private readonly probeTimeoutMs;
126
114
  private readonly concurrency;
127
- private readonly describeRoute;
128
115
  private readonly searchRoute;
129
116
  private readonly loaded;
130
117
  private readonly loading;
@@ -132,8 +119,6 @@ export declare class CatalogService {
132
119
  requestScope?: object;
133
120
  probeTimeoutMs?: number;
134
121
  concurrency?: number;
135
- /** The tool describe-path errors name. Default `describe_tools`. */
136
- describeRoute?: DescribeRoute;
137
122
  /** The discovery route recovery records name. Default `search_tools`. */
138
123
  searchRoute?: SearchRoute;
139
124
  });
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-service.d.ts","sourceRoot":"","sources":["../src/catalog-service.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EACV,yBAAyB,EACzB,YAAY,EACb,MAAM,eAAe,CAAC;AAWvB,OAAO,KAAK,EACV,SAAS,EAET,OAAO,EACR,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,0BAA0B,SAAU,CAAC;AAMlD;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAE7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A6BtC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB;;0BAtpBlC,MAAM,EAAE;0BACR,MAAM,EAAE;wBACV,MAAM,EAAE;oBACZ,IAAI;yBACC,MAAM;2BACJ,IAAI;oCACK,MAAM;mBACvB,MAAM;;;;;;cAxDX,MAAM;iBACH,MAAM;sBACD,MAAM;sBACN,OAAO;uBACN,OAAO;+BACC,IAAI;gCACH,IAAI;oBAChB,MAAM,EAAE;4BACA,MAAM,EAAE;qBACf,MAAM,EAAE;sBACP,OAAO,CAAC,aAAa,CAAC;;;;;;EA2sBvC"}
@@ -32,7 +32,7 @@ function discoverySearchLimit(value) {
32
32
  return value;
33
33
  }
34
34
  /** Normalize the single-address convenience form, then validate the bounded list. */
35
- function discoveryAddresses(args, describeRoute) {
35
+ function discoveryAddresses(args) {
36
36
  if (args.address !== undefined && args.addresses !== undefined) {
37
37
  throw new DiscoveryPolicyError("invalid_args", "describe takes either address or addresses, not both.");
38
38
  }
@@ -45,7 +45,7 @@ function discoveryAddresses(args, describeRoute) {
45
45
  throw new DiscoveryPolicyError("invalid_args", 'describe takes { address: "<connectorId>.<toolName>" } or { addresses: ["<connectorId>.<toolName>", ...] }.');
46
46
  }
47
47
  if (value.length > MAX_DESCRIBE_ADDRESSES) {
48
- throw new DiscoveryPolicyError("invalid_args", `addresses must contain at most ${MAX_DESCRIBE_ADDRESSES} entries. Split a larger list across ${describeRoute} calls.`);
48
+ throw new DiscoveryPolicyError("invalid_args", `addresses must contain at most ${MAX_DESCRIBE_ADDRESSES} entries. Split a larger list across connecta.describe calls.`);
49
49
  }
50
50
  return value;
51
51
  }
@@ -127,7 +127,6 @@ export class CatalogService {
127
127
  requestScope;
128
128
  probeTimeoutMs;
129
129
  concurrency;
130
- describeRoute;
131
130
  searchRoute;
132
131
  loaded = new Map();
133
132
  loading = new Map();
@@ -138,7 +137,6 @@ export class CatalogService {
138
137
  this.probeTimeoutMs =
139
138
  normalizeTimeoutMs(options.probeTimeoutMs) ?? DEFAULT_PROBE_TIMEOUT_MS;
140
139
  this.concurrency = resolveDiscoveryConcurrency(options.concurrency);
141
- this.describeRoute = options.describeRoute ?? "describe_tools";
142
140
  this.searchRoute = options.searchRoute ?? "search_tools";
143
141
  }
144
142
  /**
@@ -519,7 +517,7 @@ export class CatalogService {
519
517
  };
520
518
  }
521
519
  async describe(args) {
522
- const addresses = discoveryAddresses(args, this.describeRoute);
520
+ const addresses = discoveryAddresses(args);
523
521
  const format = args.format ?? "compact";
524
522
  const resolved = addresses.map((rawAddress) => {
525
523
  const address = String(rawAddress);
@@ -530,7 +528,7 @@ export class CatalogService {
530
528
  .map((entry) => entry.resolved?.connector.id)
531
529
  .filter((id) => Boolean(id))),
532
530
  ];
533
- const loaded = await mapSettledWithConcurrency(connectorIds, this.concurrency, (id) => this.loadForDiscovery(id, `${this.describeRoute} probe of "${id}"`));
531
+ const loaded = await mapSettledWithConcurrency(connectorIds, this.concurrency, (id) => this.loadForDiscovery(id, `connecta.describe probe of "${id}"`));
534
532
  const catalogs = new Map();
535
533
  loaded.forEach((result, index) => {
536
534
  const connectorId = connectorIds[index];