@zackbart/connecta 0.12.1 → 0.13.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.
- package/CHANGELOG.md +173 -0
- package/README.md +4 -1
- package/dist/apps-shell.d.ts +13 -11
- package/dist/apps-shell.d.ts.map +1 -1
- package/dist/apps-shell.js +221 -30
- package/dist/apps-shell.js.map +1 -1
- package/dist/catalog-service.d.ts +41 -0
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog-service.js +94 -5
- package/dist/catalog-service.js.map +1 -1
- package/dist/connectors/api.d.ts +5 -4
- package/dist/connectors/api.d.ts.map +1 -1
- package/dist/connectors/api.js.map +1 -1
- package/dist/connectors/remote-mcp.d.ts +5 -4
- package/dist/connectors/remote-mcp.d.ts.map +1 -1
- package/dist/connectors/remote-mcp.js.map +1 -1
- package/dist/execute.d.ts +12 -4
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +142 -20
- package/dist/execute.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/meta-tools.d.ts.map +1 -1
- package/dist/meta-tools.js +14 -4
- package/dist/meta-tools.js.map +1 -1
- package/dist/providers/mixpanel.d.ts +21 -0
- package/dist/providers/mixpanel.d.ts.map +1 -0
- package/dist/providers/mixpanel.js +183 -0
- package/dist/providers/mixpanel.js.map +1 -0
- package/dist/skills.d.ts +7 -9
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +60 -25
- package/dist/skills.js.map +1 -1
- package/dist/types.d.ts +26 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/code-mode.md +32 -20
- package/documentation/connectors.md +116 -4
- package/documentation/mcp-ui-design.md +8 -8
- package/documentation/meta-tools.md +80 -8
- package/documentation/mixpanel.md +72 -0
- package/documentation/program-ui-read-calls.md +213 -0
- package/ethos.md +10 -4
- package/package.json +5 -1
- package/src/apps-shell.ts +221 -30
- package/src/catalog-service.ts +139 -4
- package/src/connectors/api.ts +5 -3
- package/src/connectors/remote-mcp.ts +5 -3
- package/src/execute.ts +215 -21
- package/src/index.ts +1 -0
- package/src/meta-tools.ts +19 -4
- package/src/providers/mixpanel.ts +220 -0
- package/src/skills.ts +66 -24
- package/src/types.ts +27 -6
- package/src/version.ts +1 -1
- package/templates/node/package.json +1 -1
package/dist/skills.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const CONNECTA_INSTRUCTIONS = 'Connecta exposes
|
|
2
|
-
|
|
1
|
+
export const CONNECTA_INSTRUCTIONS = 'Connecta exposes seven meta-tools. For one read at an unknown address, search_tools with 2–4 distinctive action/object terms and includeSchemas="compact", then one call_tool — a lone cold call is cheaper direct than a program. For read-only reduction, multiple or dependent calls, loops, joins, or branches, do not call top-level search_tools: make one execute_code call whose program searches, selects, calls, and reduces; never return discovery for another call. connecta.ui(html) is a guest function inside execute_code, never a connector address or search_tools result; pass one HTML string for display-only, or bind named read-only refresh/drill-down calls in its optional reads argument, and return the same initial summary data the HTML renders. Unannotated, write-capable, or destructive tools stay top level: search_tools, then call_destructive_tool; authorize_connector follows auth_required; get_result follows truncation. If this routing is unfamiliar, fetch skills({ name: "usage" }).';
|
|
2
|
+
const USAGE_SKILL_BASE = `# Connecta usage
|
|
3
3
|
|
|
4
4
|
## The surface
|
|
5
5
|
|
|
@@ -19,7 +19,7 @@ Use exact addresses from discovery; never invent one. Search 2–4 distinctive a
|
|
|
19
19
|
|
|
20
20
|
One async arrow function. The only capabilities are one global per connector (\`<connectorId>.<toolName>(args)\`), the \`connecta\` functions, and \`console.log\`.
|
|
21
21
|
|
|
22
|
-
- \`connecta.search({})\`
|
|
22
|
+
- \`connecta.search({})\` loads all catalogs; pass \`connector: "<id>"\` when obvious to load one. \`safety: "readOnly"\` keeps executable calls. Neither grants authority. Matches carry \`address\` and annotations.
|
|
23
23
|
- Exact schemas: \`connecta.describe({ address: "connector.tool" })\` for one, \`{ addresses: [...] }\` for many; \`format: "json"\` only for exact constraints.
|
|
24
24
|
- Two to ten independent calls: \`connecta.batch([...])\`. Each outcome is \`{ address, ok: true, data }\` or \`{ address, ok: false, error, errorDetails: { code, retryable } }\` — how a program tells a policy refusal from a transient failure.
|
|
25
25
|
- Search inside the run, not before it; return only the reduction the answer needs, never raw payloads.
|
|
@@ -27,19 +27,17 @@ One async arrow function. The only capabilities are one global per connector (\`
|
|
|
27
27
|
|
|
28
28
|
## Rendering a view
|
|
29
29
|
|
|
30
|
-
\`connecta.ui(html)\` renders
|
|
30
|
+
\`connecta.ui(html)\` renders a display-only view on success for the client, never for the model. Fetch first, check the shape in code. On a surprise — empty array, missing key — return a trimmed first record instead of rendering: the wrong view becomes the sample you needed. Otherwise render from the variables you return; the model reads the return value, not the view.
|
|
31
|
+
|
|
31
32
|
`;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
* connector guide. A deployment with none — every deployment that has not
|
|
35
|
-
* adopted the feature — keeps the base guide byte-for-byte, rather than paying
|
|
36
|
-
* context for an instruction to fetch guides that do not exist.
|
|
37
|
-
*/
|
|
38
|
-
export const CONNECTOR_GUIDES_SECTION = `
|
|
33
|
+
/** Deployment-scoped guide routing appended to the shared usage guide. */
|
|
34
|
+
const CONNECTOR_GUIDES_SECTION = `
|
|
39
35
|
## Per-connector guides
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
When a connector here ships a deployment-scoped usage guide, \`skills({})\` and discovery return the exact \`guide\` name plus a bounded \`guideSummary\` saying what it covers. Fetch only a listed or carried name with \`skills({ name: <guide> })\`; never infer one from a connector id. \`guideRequired: true\` is a hard stop: fetch before calling. \`guideRequiredReasons\` says why — \`connector_required\` and \`approval_required\` stand however you expand the schema; \`schema_truncated\` clears once describe returns the exact one. Otherwise fetch when the summary names a connector-specific sequence, unit, pagination rule, alias, or generic API convention relevant to the task. A read-only call whose compact schema is complete and unambiguous may proceed without fetching an otherwise irrelevant guide. Connector guides do not replace the shared Connecta usage guide and never apply to another deployment implicitly.
|
|
42
38
|
`;
|
|
39
|
+
/** Shared Connecta routing guidance, byte-identical across deployments. */
|
|
40
|
+
export const USAGE_SKILL = USAGE_SKILL_BASE + CONNECTOR_GUIDES_SECTION;
|
|
43
41
|
/** The always-loaded MCP `instructions` string. */
|
|
44
42
|
export function instructionsFor() {
|
|
45
43
|
return CONNECTA_INSTRUCTIONS;
|
|
@@ -48,11 +46,14 @@ export function instructionsFor() {
|
|
|
48
46
|
export function hasConnectorGuides(connectors) {
|
|
49
47
|
return connectors.some((connector) => connectorGuide(connector) !== undefined);
|
|
50
48
|
}
|
|
51
|
-
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
/**
|
|
50
|
+
* The built-in usage guide is byte-identical across deployments, so an agent
|
|
51
|
+
* that has read it once in a task never needs an equivalent deployment-local
|
|
52
|
+
* copy. Guide-free deployments still pay no fixed tool-description cost: the
|
|
53
|
+
* conditional notes in meta-tools.ts remain absent.
|
|
54
|
+
*/
|
|
55
|
+
function usageSkill(_connectors) {
|
|
56
|
+
return USAGE_SKILL;
|
|
56
57
|
}
|
|
57
58
|
const AVAILABLE_SKILLS = [
|
|
58
59
|
{
|
|
@@ -76,7 +77,8 @@ export function connectorSkillName(connectorId) {
|
|
|
76
77
|
/** The connector's guide, or undefined when it declares none (or a blank one). */
|
|
77
78
|
export function connectorGuide(connector) {
|
|
78
79
|
const guide = connector.usageGuide;
|
|
79
|
-
|
|
80
|
+
const content = typeof guide === "string" ? guide : guide?.content;
|
|
81
|
+
return content && content.trim() !== "" ? content : undefined;
|
|
80
82
|
}
|
|
81
83
|
const SUMMARY_LENGTH = 120;
|
|
82
84
|
/** A `---`/`***`/`___` rule, which also opens and closes YAML frontmatter. */
|
|
@@ -106,8 +108,17 @@ function withoutFrontmatter(lines) {
|
|
|
106
108
|
* the connector's own description when the guide opens with nothing but
|
|
107
109
|
* markup.
|
|
108
110
|
*/
|
|
111
|
+
function boundedSummary(summary) {
|
|
112
|
+
const line = summary.replace(/\s+/g, " ").trim();
|
|
113
|
+
if (line === "")
|
|
114
|
+
return undefined;
|
|
115
|
+
return line.length <= SUMMARY_LENGTH
|
|
116
|
+
? line
|
|
117
|
+
: `${line.slice(0, SUMMARY_LENGTH - 1).trimEnd()}…`;
|
|
118
|
+
}
|
|
109
119
|
function summarizeGuide(connector, guide) {
|
|
110
120
|
let inFence = false;
|
|
121
|
+
let headingFallback;
|
|
111
122
|
for (const raw of withoutFrontmatter(guide.split("\n"))) {
|
|
112
123
|
if (FENCE_RE.test(raw)) {
|
|
113
124
|
inFence = !inFence;
|
|
@@ -117,6 +128,7 @@ function summarizeGuide(connector, guide) {
|
|
|
117
128
|
continue;
|
|
118
129
|
if (raw.trim() === "" || NOT_SUMMARY_RE.test(raw))
|
|
119
130
|
continue;
|
|
131
|
+
const heading = /^\s*#{1,6}/.test(raw);
|
|
120
132
|
const line = raw
|
|
121
133
|
// `\s*` (not `\s+`) so a bare `#` strips to nothing and is skipped, and
|
|
122
134
|
// an unspaced `#Heading` is still read as a heading.
|
|
@@ -126,11 +138,32 @@ function summarizeGuide(connector, guide) {
|
|
|
126
138
|
.trim();
|
|
127
139
|
if (line === "")
|
|
128
140
|
continue;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
if (heading) {
|
|
142
|
+
headingFallback ??= boundedSummary(line);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
return boundedSummary(line) ?? line;
|
|
132
146
|
}
|
|
133
|
-
|
|
147
|
+
if (headingFallback)
|
|
148
|
+
return headingFallback;
|
|
149
|
+
const fallback = connector.description ?? `Usage guide for "${connector.id}".`;
|
|
150
|
+
return boundedSummary(fallback) ?? `Usage guide for "${connector.id}".`;
|
|
151
|
+
}
|
|
152
|
+
/** Bounded, decision-useful discovery summary for a connector guide. */
|
|
153
|
+
export function connectorGuideSummary(connector) {
|
|
154
|
+
const guide = connectorGuide(connector);
|
|
155
|
+
if (!guide)
|
|
156
|
+
return undefined;
|
|
157
|
+
const configured = typeof connector.usageGuide === "object"
|
|
158
|
+
? boundedSummary(connector.usageGuide.summary ?? "")
|
|
159
|
+
: undefined;
|
|
160
|
+
return configured ?? summarizeGuide(connector, guide);
|
|
161
|
+
}
|
|
162
|
+
/** Whether correct use always depends on conventions outside the tool schema. */
|
|
163
|
+
export function connectorGuideRequired(connector) {
|
|
164
|
+
return (connectorGuide(connector) !== undefined &&
|
|
165
|
+
typeof connector.usageGuide === "object" &&
|
|
166
|
+
connector.usageGuide.required === true);
|
|
134
167
|
}
|
|
135
168
|
/**
|
|
136
169
|
* Every fetchable skill: the built-in guides plus one entry per connector that
|
|
@@ -143,12 +176,14 @@ export function listSkills(connectors) {
|
|
|
143
176
|
description: skill.description,
|
|
144
177
|
}));
|
|
145
178
|
for (const connector of connectors) {
|
|
146
|
-
|
|
147
|
-
|
|
179
|
+
// Undefined here means "no guide" and nothing else: a connector that has
|
|
180
|
+
// one always summarizes to a non-empty line, configured or derived.
|
|
181
|
+
const summary = connectorGuideSummary(connector);
|
|
182
|
+
if (!summary)
|
|
148
183
|
continue;
|
|
149
184
|
listing.push({
|
|
150
185
|
name: connectorSkillName(connector.id),
|
|
151
|
-
description:
|
|
186
|
+
description: summary,
|
|
152
187
|
});
|
|
153
188
|
}
|
|
154
189
|
return listing;
|
package/dist/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAChC,
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../src/skills.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAChC,u+BAAu+B,CAAC;AAE1+B,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxB,CAAC;AAEF,0EAA0E;AAC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Z,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC;gBAC3B,CAAC,CAAC,kBAAkB,IAAI,uCAAuC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,SAAS,EAAE,GAAG;gBAC7H,CAAC,CAAC,cAAc,IAAI,2CAA2C,SAAS,EAAE,GAAG;SAChF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,kBAAkB,IAAI,wBAAwB,SAAS,EAAE,GAAG;KACtE,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -189,13 +189,17 @@ export interface Connector {
|
|
|
189
189
|
*/
|
|
190
190
|
callAdmission?: ConnectorCallAdmissionPolicy;
|
|
191
191
|
/**
|
|
192
|
-
* Optional agent-facing usage guide
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
192
|
+
* Optional agent-facing usage guide for this connector. A string preserves
|
|
193
|
+
* the original markdown-only contract. The structured form can add a short
|
|
194
|
+
* discovery summary and require review when even a complete compact schema
|
|
195
|
+
* cannot describe correct use (for example a generic API wrapper or a
|
|
196
|
+
* cross-operation sequencing rule).
|
|
197
|
+
*
|
|
198
|
+
* Listed by `skills` as `connector:<id>` and returned verbatim by
|
|
199
|
+
* `skills({ name: "connector:<id>" })`. The guide remains deployment-owned
|
|
200
|
+
* configuration; no runtime registration or shared mutable copy exists.
|
|
197
201
|
*/
|
|
198
|
-
usageGuide?: string;
|
|
202
|
+
usageGuide?: string | ConnectorUsageGuide;
|
|
199
203
|
/** Optional operator-managed credential slot rendered on /credentials. */
|
|
200
204
|
credential?: ConnectorCredentialConfig;
|
|
201
205
|
/** Optional server-side check used by /credentials' Test action. */
|
|
@@ -267,6 +271,22 @@ export interface Connector {
|
|
|
267
271
|
*/
|
|
268
272
|
handleRequest?(request: Request, ctx: ConnectorContext): Promise<Response | null>;
|
|
269
273
|
}
|
|
274
|
+
export interface ConnectorUsageGuide {
|
|
275
|
+
/** Markdown returned verbatim by `skills({ name: "connector:<id>" })`. */
|
|
276
|
+
content: string;
|
|
277
|
+
/**
|
|
278
|
+
* Bounded discovery hint describing the conventions the guide covers. When
|
|
279
|
+
* omitted, Connecta derives a summary from the guide's first meaningful line.
|
|
280
|
+
*/
|
|
281
|
+
summary?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Require review before every operation on this connector. Reserve this for
|
|
284
|
+
* cases whose correct arguments or sequence cannot be expressed by the
|
|
285
|
+
* downstream tool schema; mutations and truncated schemas are required
|
|
286
|
+
* automatically and do not need this flag.
|
|
287
|
+
*/
|
|
288
|
+
required?: boolean;
|
|
289
|
+
}
|
|
270
290
|
/** Result of one sandboxed code execution. */
|
|
271
291
|
export interface ExecuteResult {
|
|
272
292
|
result: unknown;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CACD,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;OAGG;IACH,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,G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EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC9C,sCAAsC;IACtC,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACrC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* a bump that forgets this file fails the build rather than shipping a stale
|
|
5
5
|
* version to `/health` and to downstream MCP handshakes.
|
|
6
6
|
*/
|
|
7
|
-
export declare const CONNECTA_VERSION = "0.
|
|
7
|
+
export declare const CONNECTA_VERSION = "0.13.0";
|
|
8
8
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -209,7 +209,7 @@ documented functions as the whole surface.
|
|
|
209
209
|
```js
|
|
210
210
|
const page = await connecta.search({
|
|
211
211
|
query: "pipeline run job logs", // 2–4 distinctive action/object terms
|
|
212
|
-
connector: "ci", //
|
|
212
|
+
connector: "ci", // load one obvious connector, not every catalog
|
|
213
213
|
safety: "readOnly", // or "approvalRequired" / "all"
|
|
214
214
|
limit: 8, // 1–100, default 8
|
|
215
215
|
offset: 0,
|
|
@@ -221,12 +221,12 @@ const page = await connecta.search({
|
|
|
221
221
|
|
|
222
222
|
**S1.** Returns one flat page: `{ tools, total, offset, limit, hasMore }`, plus `nextOffset` when more remains and `matchMode: "partial"` when no tool matched every term. Each entry in `tools` carries `address`, `name`, and — when requested — `description`, `inputSchema`, `outputSchema`, `annotations`, and the connector's `guide`. Compact shapes omit property prose, put required fields first, and cap each shape at 1,024 UTF-8 bytes; capped shapes remain structurally valid with `unknown` types plus `/* truncated */`, and carry `inputSchemaTruncated` or `outputSchemaTruncated`. Use `connecta.describe` (or JSON search) for omitted exact constraints.
|
|
223
223
|
|
|
224
|
-
**S1a.** `safety: "readOnly"` returns exactly the tools available through `connecta.call`, connector shortcuts, and `connecta.batch`; `"approvalRequired"` returns the complementary fail-closed class, including false, missing, and contradictory annotations. Omitted or `"all"` preserves the complete catalog.
|
|
224
|
+
**S1a.** `connector` loads only the named catalog; omit it only when the integration is ambiguous, because an unscoped search fans out across every configured connector. `safety: "readOnly"` returns exactly the tools available through `connecta.call`, connector shortcuts, and `connecta.batch`; `"approvalRequired"` returns the complementary fail-closed class, including false, missing, and contradictory annotations. Omitted or `"all"` preserves the complete catalog. These filters grant no authority and change no admission decision.
|
|
225
225
|
|
|
226
|
-
**S2.**
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
**S2.** A requested object schema carries `inputKeys`, `requiredInputKeys`, and `outputKeys`:
|
|
227
|
+
the same names the rendered schema shows, ready to check before
|
|
228
|
+
building arguments. Match inputs, truncation, safety, and outputs, not lexical
|
|
229
|
+
rank; search distinct operations separately and use `outputKeys`, not guessed roots. A non-object schema — a union, an array, an
|
|
230
230
|
unresolvable `$ref` — carries no lists rather than empty ones, because absent
|
|
231
231
|
means "read the schema" where `[]` would claim the tool takes no fields. The
|
|
232
232
|
lists come from the same walk that renders the compact schema, so a top-level
|
|
@@ -503,10 +503,9 @@ the security posture live in the [design record](./mcp-ui-design.md)
|
|
|
503
503
|
[#277](https://github.com/zackbart/connecta/issues/277)); this section is the
|
|
504
504
|
contract, and it wins where the two disagree.
|
|
505
505
|
|
|
506
|
-
**U1.** `connecta.ui(html)` accepts
|
|
507
|
-
|
|
508
|
-
throws catchably and nothing
|
|
509
|
-
sugar form, for `M1`'s reason: sugar is how a one-shape contract grows hair.
|
|
506
|
+
**U1.** `connecta.ui(html, options?)` accepts one non-empty HTML string and at
|
|
507
|
+
most the bounded read manifest `V1` defines. The one-argument call stays
|
|
508
|
+
display-only; every other shape throws catchably and accepts nothing.
|
|
510
509
|
|
|
511
510
|
**U2.** At most one payload per run. A second call throws catchably, naming the
|
|
512
511
|
constraint; the first accepted payload stands. One tool result renders one view,
|
|
@@ -514,7 +513,7 @@ and last-wins would silently discard a payload the program deliberately
|
|
|
514
513
|
supplied.
|
|
515
514
|
|
|
516
515
|
**U3.** Delivered on success only, and out of model context: the tool result
|
|
517
|
-
gains `_meta["connecta/ui"] = { html }` and the JSON envelope gains `ui: true`,
|
|
516
|
+
gains `_meta["connecta/ui"] = { html, reads? }` and the JSON envelope gains `ui: true`,
|
|
518
517
|
so the model learns a view rendered without seeing its bytes. `structuredContent`
|
|
519
518
|
stays the envelope alone. The single-label `connecta/ui` prefix is deliberate —
|
|
520
519
|
connecta has no domain to reverse, and fabricating one to satisfy MCP's
|
|
@@ -527,27 +526,27 @@ with `emittedDiscarded: N` when one failure discards both.
|
|
|
527
526
|
|
|
528
527
|
**U4.** The payload spends the aggregate emit byte budget
|
|
529
528
|
(`ConnectaConfig.execute.maxEmittedBytes`), measured at the call as the
|
|
530
|
-
serialized bytes of `{ html }` — `M5`'s measurement. Over budget throws
|
|
529
|
+
serialized bytes of `{ html, reads? }` — `M5`'s measurement. Over budget throws
|
|
531
530
|
catchably, naming the budget and the room remaining, with nothing partially
|
|
532
531
|
accepted. It spends no block count (`maxEmittedBlocks`: it is not a block) and no
|
|
533
532
|
host-call budget (`L4`). One transport bound covers everything rich a program
|
|
534
533
|
delivers.
|
|
535
534
|
|
|
536
535
|
**U5.** One static shell: a connecta-authored HTML5 document at
|
|
537
|
-
`ui://connecta/program-ui/
|
|
536
|
+
`ui://connecta/program-ui/v2`, mimeType `text/html;profile=mcp-app`, declared on
|
|
538
537
|
`execute_code` via `_meta.ui.resourceUri` together with an explicit
|
|
539
|
-
`_meta.ui.visibility: ["model"]
|
|
540
|
-
|
|
538
|
+
`_meta.ui.visibility: ["model"]`. Only `call_tool` declares app visibility; all
|
|
539
|
+
other tools say model-only. A `resources/read` handler answers exactly that
|
|
541
540
|
URI and fails on any other; `resources/list` is served and returns an empty list.
|
|
542
541
|
The version segment bumps whenever the shell's bytes change, because hosts cache
|
|
543
542
|
templates by URI.
|
|
544
543
|
|
|
545
|
-
**U6.** The shell
|
|
544
|
+
**U6.** The shell renders the payload in a nested iframe
|
|
546
545
|
(`srcdoc`, `sandbox="allow-scripts"`, no `allow-same-origin`) and declares no CSP
|
|
547
546
|
domains, so the host applies its restrictive default and the `about:srcdoc` frame
|
|
548
|
-
inherits `default-src 'none'; connect-src 'none'`.
|
|
549
|
-
|
|
550
|
-
|
|
547
|
+
inherits `default-src 'none'; connect-src 'none'`. One argument stays display-only;
|
|
548
|
+
a `V1` manifest installs only named `connecta.read`, with no direct network, raw
|
|
549
|
+
tool calls, discovery, conversation, writes, or links. The shell participates in the Apps lifecycle —
|
|
551
550
|
initialize, tool-result, size-changed, resource-teardown — and forwards no
|
|
552
551
|
channel whatsoever from the inner frame to the host. That isolation makes
|
|
553
552
|
program views fixed-height by construction: with no bridge there is no
|
|
@@ -583,13 +582,25 @@ declaration in order to register tool metadata conditionally stays refused
|
|
|
583
582
|
|
|
584
583
|
**U12.** The return value, not the view, is what the model reads. `U3` puts the
|
|
585
584
|
view out of model context, so a program that renders one also returns the summary
|
|
586
|
-
the model should reason over, built from the same variables the view renders — a
|
|
585
|
+
the model should reason over, built from the same variables the initial view renders — a
|
|
587
586
|
view the return value does not mirror is a view nobody in the loop can check.
|
|
588
587
|
This binds program authors and nothing else: connecta never reads the HTML, diffs
|
|
589
588
|
it against the return, or enforces the correspondence. A heuristic there would be
|
|
590
589
|
the same mistake as automatic host-side projection, refused in `ethos.md`
|
|
591
590
|
([#282](https://github.com/zackbart/connecta/issues/282)).
|
|
592
591
|
|
|
592
|
+
**U13.** The always-loaded MCP instructions locate `connecta.ui(html)` before an
|
|
593
|
+
agent chooses a route: it is a guest function inside `execute_code`, never a
|
|
594
|
+
connector address or catalog result, takes one HTML string, and carries `U12`'s
|
|
595
|
+
mirrored-return duty. The detailed tool description proved too late to stop cold
|
|
596
|
+
agents from searching downstream catalogs for UI; the location distinction
|
|
597
|
+
therefore rides `initialize`, under a 1,000-character ceiling for the complete
|
|
598
|
+
instructions string. This promotes existing contract, not capability: the
|
|
599
|
+
seven-tool surface, guest API, catalog, Apps delivery, and runtime do not change
|
|
600
|
+
([#286](https://github.com/zackbart/connecta/issues/286)).
|
|
601
|
+
|
|
602
|
+
Bounded view reads follow normative [`V1`–`V8`](./program-ui-read-calls.md) ([#287](https://github.com/zackbart/connecta/issues/287), [#289](https://github.com/zackbart/connecta/issues/289)).
|
|
603
|
+
|
|
593
604
|
## Retry semantics
|
|
594
605
|
|
|
595
606
|
**Y1.** Connecta retries nothing beneath a program. `call_tool` accepts an
|
|
@@ -872,6 +883,7 @@ the upstream `Executor` shape assignable.
|
|
|
872
883
|
| `U7`, `U8` | two arms passing one case table, `test/codemode-compat.test.ts` |
|
|
873
884
|
| `U9` | `test/execute-ui.test.ts` (a `ui` byte aggregate distinct from `emitted`, absent when nothing was accepted) |
|
|
874
885
|
| `U12` | `test/server.test.ts` (the `connecta.ui` bullet carries the return-value clause); a duty on program authors, so the description is the only place it can be enforced |
|
|
886
|
+
| `U13` | `test/code-first-surface.test.ts`, `test/server.test.ts` (served `initialize.instructions` locate UI inside `execute_code`, exclude it from catalog search, state the one-string call and mirrored return, and stay within the complete 1,000-character budget) |
|
|
875
887
|
| `X3` | `test/quickjs-executor.test.ts` (cancels a running child) |
|
|
876
888
|
| `X4` | `test/guest-api-contract.test.ts` (string logs only) |
|
|
877
889
|
| `X6` | `test/quickjs-executor.test.ts` (never-settling await) |
|
|
@@ -1,15 +1,116 @@
|
|
|
1
1
|
# Connectors
|
|
2
2
|
|
|
3
3
|
Connectors are the boundary between Connecta's fixed meta-tool surface and
|
|
4
|
-
downstream capabilities.
|
|
5
|
-
`
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
downstream capabilities. Prefer a prebuilt connection when Connecta maintains
|
|
5
|
+
one for the provider. Use `api()` to define a deliberate HTTP API surface and
|
|
6
|
+
`remoteMcp()` to aggregate any other MCP endpoint. All three authoring paths
|
|
7
|
+
produce ordinary `Connector` instances and pass through the same catalog,
|
|
8
|
+
read-only admission, credentials, storage, invocation, result-size, and
|
|
9
|
+
activity paths.
|
|
8
10
|
|
|
9
11
|
Connector instances are deployment configuration. They are not registered or
|
|
10
12
|
reconfigured at runtime. Request-local clients, transports, abort signals, and
|
|
11
13
|
catalogs must be released with the request that created them.
|
|
12
14
|
|
|
15
|
+
## Prebuilt connections
|
|
16
|
+
|
|
17
|
+
A prebuilt connection is an independently imported provider constructor, not a
|
|
18
|
+
registry or a second connector interface. It packages behavior Connecta can
|
|
19
|
+
maintain universally: provider endpoints and authentication defaults, tool
|
|
20
|
+
definitions or downstream catalog behavior, schemas and annotations, lean
|
|
21
|
+
result shapes, typed errors, pagination and retry conventions, and a short
|
|
22
|
+
usage guide where schemas cannot carry the advice.
|
|
23
|
+
|
|
24
|
+
The deployment still supplies the account-specific identity and policy:
|
|
25
|
+
|
|
26
|
+
- a unique connector `id`, which owns its address, storage, credential,
|
|
27
|
+
catalog, admission, and activity namespaces;
|
|
28
|
+
- a human-readable `title` and a concrete `purpose` or audience;
|
|
29
|
+
- supported authentication overrides; and
|
|
30
|
+
- account-specific instructions appended to, rather than replacing, the safe
|
|
31
|
+
provider guidance.
|
|
32
|
+
|
|
33
|
+
Imports and registration stay explicit and a la carte:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { mixpanel } from "@zackbart/connecta/providers/mixpanel";
|
|
37
|
+
|
|
38
|
+
const analytics = mixpanel("product_analytics", {
|
|
39
|
+
title: "Product analytics",
|
|
40
|
+
purpose: "Production product decisions for the growth team",
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The constructor may use `remoteMcp()` or `api()` internally. Callers should not
|
|
45
|
+
need to care which transport gives the better agent-facing surface, and the
|
|
46
|
+
choice does not grant the connection different runtime privileges. Two
|
|
47
|
+
instances of the same provider are isolated in exactly the same way as two
|
|
48
|
+
hand-written connectors with different ids.
|
|
49
|
+
|
|
50
|
+
A prebuilt connection's vetted annotations are fill-in only. They classify what
|
|
51
|
+
the downstream leaves unannotated and may always tighten a classification; they
|
|
52
|
+
never overrule an explicit downstream `destructiveHint: true` or
|
|
53
|
+
`readOnlyHint: false`. The fail-closed read-only invariant is unchanged by the
|
|
54
|
+
authoring path.
|
|
55
|
+
|
|
56
|
+
Prebuilt means preferred when available, not mandatory. A deployment may mix
|
|
57
|
+
prebuilt connections, custom `remoteMcp()` connections, and custom `api()`
|
|
58
|
+
connections. Connecta makes no completeness promise: providers without a
|
|
59
|
+
maintained prebuilt connection continue to use the public primitives without
|
|
60
|
+
loss of support.
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { createConnecta, remoteMcp, api } from "@zackbart/connecta";
|
|
64
|
+
import { mixpanel } from "@zackbart/connecta/providers/mixpanel";
|
|
65
|
+
import { quickJsExecutor } from "@zackbart/connecta/quickjs";
|
|
66
|
+
|
|
67
|
+
export const connecta = createConnecta({
|
|
68
|
+
executor: quickJsExecutor(),
|
|
69
|
+
connectors: [
|
|
70
|
+
// Maintained prebuilt connection.
|
|
71
|
+
mixpanel("product_analytics", {
|
|
72
|
+
purpose: "Production product decisions for the growth team",
|
|
73
|
+
}),
|
|
74
|
+
// Custom downstream MCP server, no prebuilt connection needed.
|
|
75
|
+
remoteMcp("linear", {
|
|
76
|
+
url: "https://mcp.linear.app/mcp",
|
|
77
|
+
description: "Issue tracking for the platform team",
|
|
78
|
+
}),
|
|
79
|
+
// Deliberate in-house HTTP surface, hand-written tool by hand-written tool.
|
|
80
|
+
api("billing", {
|
|
81
|
+
description: "Internal billing reads",
|
|
82
|
+
credential: { label: "Billing API token" },
|
|
83
|
+
tools: [
|
|
84
|
+
{
|
|
85
|
+
name: "get_invoice",
|
|
86
|
+
description: "Fetch one invoice by id.",
|
|
87
|
+
annotations: { readOnlyHint: true },
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: "object",
|
|
90
|
+
properties: { id: { type: "string" } },
|
|
91
|
+
required: ["id"],
|
|
92
|
+
},
|
|
93
|
+
handler: async ({ id }, ctx) => {
|
|
94
|
+
const response = await fetch(
|
|
95
|
+
`https://billing.internal.example/invoices/${id}`,
|
|
96
|
+
{ headers: { Authorization: `Bearer ${await ctx.credential?.get()}` } },
|
|
97
|
+
);
|
|
98
|
+
return response.json();
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
}),
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
All three are ordinary `Connector` instances by the time the registry sees
|
|
108
|
+
them. Nothing in the list is privileged by how it was authored.
|
|
109
|
+
|
|
110
|
+
Maintained provider guides:
|
|
111
|
+
|
|
112
|
+
- [Mixpanel](./mixpanel.md)
|
|
113
|
+
|
|
13
114
|
## MCP version skew
|
|
14
115
|
|
|
15
116
|
Connecta deliberately sits between protocol generations
|
|
@@ -53,6 +154,17 @@ Tool calls must use the shared invocation path. That keeps direct calls, batch
|
|
|
53
154
|
children, and code-mode host calls aligned on safety, retries, admission,
|
|
54
155
|
timeouts, validation, result guards, and typed failures.
|
|
55
156
|
|
|
157
|
+
Connector usage guides are configuration too. `usageGuide` accepts the
|
|
158
|
+
historical markdown string or `{ content, summary?, required? }`; the latter
|
|
159
|
+
lets discovery explain what the guide covers without loading it. The summary
|
|
160
|
+
is only a bounded routing hint. Mark a guide `required` only when no complete
|
|
161
|
+
tool schema can describe correct use, such as a generic operation wrapper or a
|
|
162
|
+
mandatory cross-tool sequence. Mutations and truncated compact schemas already
|
|
163
|
+
produce automatic review requirements. Two deployments may reuse the same
|
|
164
|
+
constant and override its summary or requirement in their own config, but
|
|
165
|
+
Connecta stores no runtime template and never lets one deployment's guide apply
|
|
166
|
+
to another.
|
|
167
|
+
|
|
56
168
|
For remote MCP tools, that path checks the catalog's advertised `inputSchema`
|
|
57
169
|
before provider dispatch. Supported mismatches become bounded, payload-free
|
|
58
170
|
`invalid_args` findings; a schema the local validator cannot evaluate passes
|
|
@@ -319,14 +319,14 @@ official spec at all — it survives there as background prose, not as a deferre
|
|
|
319
319
|
item with a queue position. Adopting a payload format the official spec never
|
|
320
320
|
took, on the path the official spec superseded, is two bets on one square.
|
|
321
321
|
|
|
322
|
-
**View-initiated tool calls from program UI.**
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
322
|
+
**View-initiated tool calls from program UI.** This original gate was split by
|
|
323
|
+
[#287](https://github.com/zackbart/connecta/issues/287) on 2026-08-02. Bounded
|
|
324
|
+
refresh, pagination, and drill-down reads are accepted through named bindings
|
|
325
|
+
and the existing `call_tool`; mutations remain gated. The evidence, threat
|
|
326
|
+
trace, and boundary between live reads and Executor's artifact product live in
|
|
327
|
+
[`program-ui-read-calls.md`](./program-ui-read-calls.md). The normative contract
|
|
328
|
+
is `V1`–`V8` in [`code-mode.md`](./code-mode.md); it supersedes this record's
|
|
329
|
+
display-only clauses where they disagree.
|
|
330
330
|
|
|
331
331
|
**Downstream MCP Apps template passthrough** (downstream connectors declaring
|
|
332
332
|
their own `ui://` templates, proxied through connecta's `resources/read`).
|