@zackbart/connecta 0.12.2 → 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.
Files changed (50) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/README.md +4 -1
  3. package/dist/catalog-service.d.ts +41 -0
  4. package/dist/catalog-service.d.ts.map +1 -1
  5. package/dist/catalog-service.js +94 -5
  6. package/dist/catalog-service.js.map +1 -1
  7. package/dist/connectors/api.d.ts +5 -4
  8. package/dist/connectors/api.d.ts.map +1 -1
  9. package/dist/connectors/api.js.map +1 -1
  10. package/dist/connectors/remote-mcp.d.ts +5 -4
  11. package/dist/connectors/remote-mcp.d.ts.map +1 -1
  12. package/dist/connectors/remote-mcp.js.map +1 -1
  13. package/dist/execute.d.ts.map +1 -1
  14. package/dist/execute.js +12 -10
  15. package/dist/execute.js.map +1 -1
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/meta-tools.d.ts.map +1 -1
  20. package/dist/meta-tools.js +5 -4
  21. package/dist/meta-tools.js.map +1 -1
  22. package/dist/providers/mixpanel.d.ts +21 -0
  23. package/dist/providers/mixpanel.d.ts.map +1 -0
  24. package/dist/providers/mixpanel.js +183 -0
  25. package/dist/providers/mixpanel.js.map +1 -0
  26. package/dist/skills.d.ts +7 -9
  27. package/dist/skills.d.ts.map +1 -1
  28. package/dist/skills.js +58 -24
  29. package/dist/skills.js.map +1 -1
  30. package/dist/types.d.ts +26 -6
  31. package/dist/types.d.ts.map +1 -1
  32. package/dist/version.d.ts +1 -1
  33. package/dist/version.js +1 -1
  34. package/documentation/code-mode.md +6 -6
  35. package/documentation/connectors.md +116 -4
  36. package/documentation/meta-tools.md +80 -8
  37. package/documentation/mixpanel.md +72 -0
  38. package/ethos.md +8 -3
  39. package/package.json +5 -1
  40. package/src/catalog-service.ts +139 -4
  41. package/src/connectors/api.ts +5 -3
  42. package/src/connectors/remote-mcp.ts +5 -3
  43. package/src/execute.ts +18 -10
  44. package/src/index.ts +1 -0
  45. package/src/meta-tools.ts +10 -4
  46. package/src/providers/mixpanel.ts +220 -0
  47. package/src/skills.ts +64 -23
  48. package/src/types.ts +27 -6
  49. package/src/version.ts +1 -1
  50. package/templates/node/package.json +1 -1
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 (markdown) for this connector preferred
193
- * tools, address quirks, pagination conventions, rate-limit etiquette, good
194
- * query patterns. Listed by the `skills` meta-tool as `connector:<id>` and
195
- * returned verbatim by `skills({ name: "connector:<id>" })`. Keep it concise
196
- * and imperative; it is read by agents, not operators.
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;
@@ -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,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,oEAAoE;IACpE,YAAY,CAAC,EAA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AC;IACnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,UAAU,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;OAIG;IACH,kBAAkB,CAAC,CACjB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,+EAA+E;IAC/E,cAAc,CAAC,CACb,OAAO,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.12.2";
7
+ export declare const CONNECTA_VERSION = "0.13.0";
8
8
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js 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 const CONNECTA_VERSION = "0.12.2";
7
+ export const CONNECTA_VERSION = "0.13.0";
8
8
  //# sourceMappingURL=version.js.map
@@ -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", // optional single-connector filter
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. This filters rows only: it grants no authority and changes no admission decision.
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.** With schemas requested, a match whose input (or output) schema resolves
227
- to an object shape also carries `inputKeys`, `requiredInputKeys`, and
228
- `outputKeys`: the same names the rendered schema shows, ready to check before
229
- building arguments. A schema that is not an object shape — a union, an array, an
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
@@ -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. `api()` defines a deliberate HTTP API surface;
5
- `remoteMcp()` aggregates another MCP endpoint. Both publish the same tool
6
- definitions and pass through the same catalog, read-only admission, invocation,
7
- result-size, and activity paths.
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
@@ -19,6 +19,21 @@ The consolidation removed overlapping routing choices while preserving the
19
19
  cheaper direct path for one cold call. The [guest API contract](./code-mode.md)
20
20
  is what a program is promised.
21
21
 
22
+ The route is chosen before discovery. A result that will be reduced, a call
23
+ whose arguments depend on an earlier result, or work with multiple operations
24
+ starts with one `execute_code` call and keeps discovery, calls, and reduction
25
+ inside it. Distinct operations get distinct short `connecta.search` queries in
26
+ that program. Only one unknown-address read takes the cheaper top-level
27
+ `search_tools` → `call_tool` path; a known address needs only `call_tool`.
28
+
29
+ That routing is about read-only work, because that is the only work a program
30
+ can do. Anything unannotated, write-capable, or destructive is inadmissible
31
+ inside the sandbox, so multi-step destructive work discovers at the top level
32
+ and runs each step through `call_destructive_tool` — where the host can put the
33
+ question to a human. Telling an agent never to search at the top level for
34
+ multiple calls would close the only route that work has
35
+ ([#295](https://github.com/zackbart/connecta/issues/295)).
36
+
22
37
  `execute_code` accepts optional `diagnostics: true` when a caller is measuring
23
38
  a workflow. It adds only compact request-local timing and serialized-size
24
39
  aggregates; normal calls carry no diagnostics block or response-context cost.
@@ -35,17 +50,23 @@ probing is an operator concern: the operator pages and `/health` own it.
35
50
 
36
51
  Start an unknown-address lookup with two to four distinctive action/object
37
52
  terms, not the full request, and omit `limit` so the default eight-result page
38
- stays small. Set `safety: "readOnly"` when the result is headed to `call_tool`
39
- or generated code; `safety: "approvalRequired"` finds the complementary set
40
- that must cross `call_destructive_tool`. Omitting `safety`, or setting it to
41
- `"all"`, preserves the complete configured catalog. This is only a discovery
42
- filter: it neither grants authority nor changes invocation admission.
53
+ stays small. When the integration is obvious, set `connector` to its id: a
54
+ scoped search loads that catalog alone, while an unscoped search must fan out
55
+ across every configured connector. Leave the search unscoped when the right
56
+ integration is genuinely ambiguous. Set `safety: "readOnly"` when the result is
57
+ headed to `call_tool` or generated code; `safety: "approvalRequired"` finds the
58
+ complementary set that must cross `call_destructive_tool`. Omitting `safety`,
59
+ or setting it to `"all"`, preserves the complete configured catalog. This is
60
+ only a discovery filter: it neither grants authority nor changes invocation admission.
43
61
  `includeSchemas: "compact"` adds each match's input and any declared output
44
62
  shape. Bounded plain-object schemas also expose `inputKeys`,
45
63
  `requiredInputKeys`, and `outputKeys`; a truncated shape omits its corresponding
46
64
  list rather than repeating a large partial inventory. Matches carry declared
47
- behavior annotations. When
48
- that shape is sufficient, call the returned address directly. Reserve schema
65
+ behavior annotations. Lexical rank is only one signal: select a candidate whose
66
+ required inputs are available, whose schema is complete enough for the call,
67
+ and whose safety and declared outputs fit the work. A reducer uses `outputKeys`
68
+ before inspecting the value; it does not assume a collection is named `items`
69
+ or `results`. When that shape is sufficient, call the returned address directly. Reserve schema
49
70
  expansion through `connecta.describe` for a search without schemas, an
50
71
  ambiguous compact shape, or exact
51
72
  constraints that require `format: "json"`.
@@ -60,6 +81,51 @@ types; other shapes become `unknown /* truncated */`. The match also carries
60
81
  `includeSchemas: "json"` or use the existing describe path when exact
61
82
  constraints matter.
62
83
 
84
+ ## Connector guide selection
85
+
86
+ A connector may attach a deployment-owned guide as markdown, preserving the
87
+ original `usageGuide: string` configuration, or as
88
+ `{ content, summary?, required? }`. The structured form does not register a
89
+ connector or create a shared runtime template. `content` remains the markdown
90
+ returned verbatim by `skills`; `summary` is normalized and capped at 120
91
+ characters for discovery. When it is absent, Connecta derives the same bounded
92
+ fallback used by the skills listing: the first meaningful body line, with a
93
+ heading used only when the guide has no body. `required: true` is reserved for generic
94
+ API wrappers and cross-operation conventions a complete downstream schema
95
+ cannot express.
96
+
97
+ Search and describe results keep the existing `guide: "connector:<id>"`
98
+ pointer and add `guideSummary`. A matching tool also carries
99
+ `guideRequired: true` and `guideRequiredReasons` when Connecta can prove review
100
+ is necessary:
101
+ `connector_required` for the explicit configuration above,
102
+ `approval_required` for an unannotated or write-capable tool, and
103
+ `schema_truncated` when a requested compact input or output shape was capped.
104
+ The boolean is an instruction, not a server-side gate — nothing refuses the
105
+ call, so the agent is told to fetch the guide before making it, for any reason
106
+ listed. `connector_required` and `approval_required` survive exact schema
107
+ expansion; `schema_truncated` is cleared by the describe that returns the exact
108
+ shape, and describe reports whatever reasons remain in the same two fields.
109
+ Otherwise it reads the
110
+ bounded summary: connector-specific sequencing, units, pagination, aliases,
111
+ and generic API conventions still require the guide when they affect the task,
112
+ while a complete and unambiguous one-read schema proceeds directly.
113
+ Guide lookup always uses an exact name returned by `skills({})`, search, or
114
+ describe; callers do not manufacture `connector:<id>` from an unmarked
115
+ connector.
116
+
117
+ A connector-scoped lexical miss retains that connector's guide metadata under
118
+ `queryAnalysis`. This matters for generic wrappers whose broad tool name does
119
+ not contain endpoint vocabulary: a required guide remains discoverable before
120
+ the caller falls back to an empty-query browse, rather than disappearing with
121
+ the zero-tool page.
122
+
123
+ The built-in `usage` skill is byte-identical across deployments and says to
124
+ read it at most once per task. Connector guides remain scoped to the deployment
125
+ that listed them, even when two deployments happen to use identical content.
126
+ Deployments without connector guides receive none of the conditional guide
127
+ sentences in their always-loaded tool descriptions.
128
+
63
129
  ## Result representation
64
130
 
65
131
  For object results, `structuredContent` is the canonical full-fidelity value.
@@ -122,7 +188,13 @@ results explain that no single tool covered every term and recommend splitting
122
188
  distinct intents. A true negative says that no matching capability is
123
189
  configured and recommends refining, connector-scoping, or browsing; when a
124
190
  connector catalog was unavailable, the response includes
125
- `unavailableConnectorCount` instead of making that stronger claim. Analysis
191
+ `unavailableConnectorCount` instead of making that stronger claim. A search
192
+ explicitly scoped to that unavailable connector also receives `catalogError` —
193
+ the bounded classified failure (`code`, `message`, `retryable`, and any
194
+ `retryAfterMs`) so the caller can tell a transient outage from one a deployment
195
+ operator must clear. It carries nothing else the call-path classifier knows: a
196
+ discovery read is not a call. Unscoped searches keep the count only — one
197
+ connector's failure is not another search's context. Analysis
126
198
  from a connector-filtered search includes `connectorScope` and speaks only
127
199
  about that connector; `unknownConnector` distinguishes an unconfigured ID from
128
200
  a known connector with no match. Analysis covers at most eight distinct terms
@@ -0,0 +1,72 @@
1
+ # Mixpanel prebuilt connection
2
+
3
+ Import `mixpanel()` independently from
4
+ `@zackbart/connecta/providers/mixpanel`. It wraps Mixpanel's hosted MCP server
5
+ with regional endpoint selection, OAuth by default, a provider-rate admission
6
+ budget, a task-oriented usage guide, and a vetted safety classification. It
7
+ adds no provider dependency and is not reachable from Connecta's root entry.
8
+
9
+ ```ts
10
+ import { mixpanel } from "@zackbart/connecta/providers/mixpanel";
11
+
12
+ const analytics = mixpanel("product_analytics", {
13
+ title: "Production product analytics",
14
+ purpose: "Product and growth decisions for the production app",
15
+ region: "us",
16
+ instructions: "Use the Core Product project unless the request says otherwise.",
17
+ });
18
+ ```
19
+
20
+ The `id` owns the ordinary connector namespaces; use a different id for every
21
+ Mixpanel account. `purpose` is required because an agent choosing between two
22
+ instances needs to know which account answers the question. Account
23
+ `instructions` are appended to the maintained guide and cannot change the
24
+ connector's safety classification.
25
+
26
+ `region` accepts `"us"` (the default), `"eu"`, or `"in"` and selects the
27
+ corresponding [official hosted endpoint](https://docs.mixpanel.com/docs/mcp#mcp-server-urls).
28
+ OAuth is the recommended default and keeps each connector instance's flow and
29
+ tokens in its connector-scoped storage. Mixpanel service accounts are also
30
+ supported with an explicit header override:
31
+
32
+ ```ts
33
+ mixpanel("automation_analytics", {
34
+ purpose: "Headless release-health reporting",
35
+ auth: {
36
+ type: "headers",
37
+ headers: { Authorization: `Bearer Basic ${env.MIXPANEL_SA_TOKEN}` },
38
+ },
39
+ });
40
+ ```
41
+
42
+ Keep that encoded service-account value in the runtime's secret store; it is a
43
+ password, not ordinary configuration. Mixpanel currently labels service-account
44
+ MCP authentication beta. Prefer OAuth unless the deployment is intentionally
45
+ headless.
46
+
47
+ The wrapper classifies the documented observational tools as reads and the
48
+ documented create, update, edit, merge, dismiss, duplicate, and delete tools as
49
+ writes. An unfamiliar tool added by the downstream fails closed onto
50
+ `call_destructive_tool` until a Connecta release reviews it.
51
+
52
+ That classification is **fill-in only**. It supplies the annotations Mixpanel
53
+ leaves unset and may always tighten one — but it never contradicts an explicit
54
+ downstream annotation. A tool on the read allowlist that arrives carrying
55
+ `destructiveHint: true` or `readOnlyHint: false` keeps exactly what the
56
+ downstream said and stays behind `call_destructive_tool`: the downstream is
57
+ telling you this release's allowlist is stale, and the fail-closed invariant
58
+ does not bend for a maintained connection. Maintained writes that only create
59
+ something new (`Create-Dashboard`, `Create-Cohort`, `Create-Metric`, and the
60
+ rest) leave `destructiveHint` unset; `readOnlyHint: false` already routes them
61
+ through the destructive path, and asserting destruction only inflates the
62
+ approval copy the host shows a human.
63
+
64
+ Experiments and Feature Flags — 15 of the 63 classified tools — are Mixpanel
65
+ beta surfaces. Expect their names and schemas to move faster than the rest.
66
+
67
+ The connection also declares a per-runtime call-admission budget matching
68
+ Mixpanel's documented 600 requests per hour — a best-effort approximation of
69
+ the per-user limit, not an enforcement of it. Each runtime keeps its own
70
+ counter, so N Worker isolates or Node processes serving one deployment can each
71
+ admit up to 600. Discovery traffic is outside connector call admission and
72
+ still needs restrained use.
package/ethos.md CHANGED
@@ -15,9 +15,12 @@ order, and amending it is a design decision, not a drive-by edit.
15
15
  - **A deployment is a small config-as-code file.** Changing what agents can
16
16
  reach is an edit and a redeploy. One deployment, one tenant, one audience —
17
17
  more audiences means more deployments.
18
- - **Two equal ways in.** `remoteMcp()` proxies a downstream MCP server;
19
- `api()` hand-writes a deliberate tool surface over a plain HTTP API. Both
20
- come out identical: same addresses, same catalog, same safety rules.
18
+ - **Curated when available, open when not.** Prefer an explicitly imported
19
+ prebuilt connection when Connecta maintains one: it carries the provider's
20
+ known-good endpoint, authentication defaults, tool ergonomics, and concise
21
+ usage guidance. `remoteMcp()` and `api()` remain equal, first-class
22
+ primitives for custom and unsupported integrations. Every path produces the
23
+ same `Connector`: same addresses, same catalog, same safety rules.
21
24
  - **Seven tools, an executor required.** The primary surface is a program, so
22
25
  every deployment runs an executor — a Dynamic Worker on Cloudflare, QuickJS
23
26
  behind its optional-peer subpath on Node — and one without refuses to boot
@@ -66,6 +69,8 @@ proposing one without a new argument is not.
66
69
  | Multi-tenancy / account model | refused | one deployment per tenant; deploy again instead |
67
70
  | Policy engine, approvals, pauses | refused | the host asks the human; connecta only annotates |
68
71
  | Runtime connector registration | refused | config-as-code is the security model |
72
+ | Prebuilt connections as the preferred authoring path | accepted | an a-la-carte provider constructor, imported and constructed in the deployment file, encodes maintained defaults for providers connecta actually uses — preferred *when maintained*, with no promise of one per provider; it returns exactly one ordinary `Connector` with no extra privileges — never a bundle, a group, a preset, or a registry — its tools are hand-written or proxied from a downstream MCP catalog, never generated from a schema document; its vetted annotations classify what the downstream leaves unannotated and never overrule an explicit one; `remoteMcp()` and `api()` stay first-class ([#297](https://github.com/zackbart/connecta/issues/297)) |
73
+ | Provider registry / integration marketplace | refused | prebuilt connections are imports, not listings; discovery happens in documentation, never at runtime ([#297](https://github.com/zackbart/connecta/issues/297)) |
69
74
  | Protocol sessions & server push | refused | stateless per request |
70
75
  | Resources & prompts aggregation | refused | tools only; connecta's own Apps shell is the one `resources/read` carve-out ([#266](https://github.com/zackbart/connecta/issues/266)) |
71
76
  | Elicitation passthrough | refused | no route through a stateless aggregator |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zackbart/connecta",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "One MCP to rule them all — a single MCP endpoint aggregating many downstream connectors behind a code-first surface of seven meta-tools.",
@@ -64,6 +64,10 @@
64
64
  "./auth/clerk": {
65
65
  "types": "./dist/auth/clerk.d.ts",
66
66
  "import": "./dist/auth/clerk.js"
67
+ },
68
+ "./providers/mixpanel": {
69
+ "types": "./dist/providers/mixpanel.d.ts",
70
+ "import": "./dist/providers/mixpanel.js"
67
71
  }
68
72
  },
69
73
  "scripts": {