@zackbart/connecta 0.33.0 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +100 -128
  3. package/SECURITY.md +1 -1
  4. package/bin/version.mjs +1 -1
  5. package/dist/activity.d.ts +3 -0
  6. package/dist/branding.d.ts +7 -0
  7. package/dist/branding.js +76 -9
  8. package/dist/catalog-drift.d.ts +30 -26
  9. package/dist/catalog-drift.js +169 -84
  10. package/dist/catalog-service.js +16 -2
  11. package/dist/config-value-sources.js +6 -1
  12. package/dist/config.d.ts +13 -2
  13. package/dist/config.js +36 -2
  14. package/dist/connector-caller.js +2 -1
  15. package/dist/connectors/api-connector.d.ts +3 -0
  16. package/dist/connectors/api-connector.js +5 -1
  17. package/dist/connectors/option-shapes.js +1 -1
  18. package/dist/connectors/remote-mcp.d.ts +2 -0
  19. package/dist/connectors/remote-mcp.js +5 -1
  20. package/dist/describe-config.d.ts +5 -1
  21. package/dist/describe-config.js +2 -0
  22. package/dist/execute.js +1 -11
  23. package/dist/fix-prompt.js +2 -2
  24. package/dist/index.js +1 -0
  25. package/dist/invocation.js +3 -2
  26. package/dist/membership.d.ts +2 -0
  27. package/dist/meta-tools.js +3 -2
  28. package/dist/oauth-callback-outcome.js +2 -2
  29. package/dist/operator-ui/agents.d.ts +1 -1
  30. package/dist/operator-ui/agents.js +16 -16
  31. package/dist/operator-ui/config-summary.js +565 -0
  32. package/dist/operator-ui/connection-map.js +376 -0
  33. package/dist/operator-ui/endpoints.js +45 -16
  34. package/dist/operator-ui/fix-prompts.js +1 -1
  35. package/dist/operator-ui/generated.js +4 -4
  36. package/dist/operator-ui/health.js +52 -0
  37. package/dist/operator-ui/member-page.js +13 -28
  38. package/dist/operator-ui/overview.js +123 -0
  39. package/dist/operator-ui/view.d.ts +26 -22
  40. package/dist/operator-ui/view.js +130 -96
  41. package/dist/page-styles.js +5 -3
  42. package/dist/provider.d.ts +6 -1
  43. package/dist/provider.js +18 -1
  44. package/dist/providers/_shared/google/workspace.d.ts +9 -4
  45. package/dist/providers/_shared/google/workspace.js +7 -3
  46. package/dist/providers/basecamp/index.d.ts +2 -0
  47. package/dist/providers/breeze/index.d.ts +2 -0
  48. package/dist/providers/ccb/index.d.ts +2 -0
  49. package/dist/providers/ccb/index.js +2 -2
  50. package/dist/providers/cloudflare/index.d.ts +2 -0
  51. package/dist/providers/cloudflare/index.js +5 -1
  52. package/dist/providers/cloudflare/openapi.generated.js +3296 -3206
  53. package/dist/providers/cloudflare/rest.js +19 -0
  54. package/dist/providers/cloudflare/skill.generated.js +2 -2
  55. package/dist/providers/cloudflare/value-safety.js +51 -18
  56. package/dist/providers/docs/index.js +1 -1
  57. package/dist/providers/docs/skill.generated.js +2 -2
  58. package/dist/providers/drive/index.js +1 -1
  59. package/dist/providers/drive/skill.generated.js +2 -2
  60. package/dist/providers/forms/index.js +1 -1
  61. package/dist/providers/forms/skill.generated.js +2 -2
  62. package/dist/providers/gmail/index.js +1 -1
  63. package/dist/providers/gmail/skill.generated.js +2 -2
  64. package/dist/providers/intercom/index.d.ts +24 -0
  65. package/dist/providers/intercom/index.js +121 -0
  66. package/dist/providers/intercom/skill.generated.js +8 -0
  67. package/dist/providers/linear/index.js +204 -19
  68. package/dist/providers/linear/skill.generated.js +2 -2
  69. package/dist/providers/mixpanel/index.d.ts +2 -0
  70. package/dist/providers/mixpanel/index.js +21 -17
  71. package/dist/providers/mixpanel/skill.generated.js +3 -3
  72. package/dist/providers/notion/index.d.ts +2 -0
  73. package/dist/providers/notion/index.js +1 -1
  74. package/dist/providers/notion/skill.generated.js +1 -1
  75. package/dist/providers/overflow/index.d.ts +2 -0
  76. package/dist/providers/overflow/index.js +1 -1
  77. package/dist/providers/overflow/skill.generated.js +2 -2
  78. package/dist/providers/planning-center/index.d.ts +2 -0
  79. package/dist/providers/planning-center/index.js +1 -1
  80. package/dist/providers/planning-center/skill.generated.js +4 -4
  81. package/dist/providers/revenuecat/index.d.ts +5 -3
  82. package/dist/providers/revenuecat/index.js +147 -7
  83. package/dist/providers/revenuecat/skill.generated.js +3 -3
  84. package/dist/providers/sheets/index.js +1 -1
  85. package/dist/providers/sheets/skill.generated.js +2 -2
  86. package/dist/providers/slides/index.js +1 -1
  87. package/dist/providers/slides/skill.generated.js +2 -2
  88. package/dist/providers/stripe/index.d.ts +2 -0
  89. package/dist/providers/stripe/index.js +50 -30
  90. package/dist/providers/stripe/skill.generated.js +2 -1
  91. package/dist/providers/tithely/index.d.ts +2 -0
  92. package/dist/providers/tithely/index.js +1 -1
  93. package/dist/providers/vercel/index.d.ts +2 -0
  94. package/dist/providers/vercel/index.js +2 -2
  95. package/dist/providers/vercel/openapi.generated.js +391 -374
  96. package/dist/providers/vercel/skill.generated.js +2 -2
  97. package/dist/providers/vercel/value-safety.js +14 -4
  98. package/dist/registry.d.ts +10 -14
  99. package/dist/registry.js +77 -62
  100. package/dist/routes/mcp.js +20 -13
  101. package/dist/routes/oauth.js +2 -2
  102. package/dist/routes/ui-data.js +8 -2
  103. package/dist/skills.js +18 -2
  104. package/dist/storage/sql.js +5 -1
  105. package/dist/types.d.ts +36 -11
  106. package/dist/ui.js +9 -4
  107. package/dist/usage-guide.js +1 -1
  108. package/dist/version.d.ts +1 -1
  109. package/dist/version.js +1 -1
  110. package/documentation/README.md +2 -2
  111. package/documentation/architecture.md +66 -18
  112. package/documentation/auth.md +183 -67
  113. package/documentation/code-mode.md +30 -10
  114. package/documentation/deploying.md +5 -1
  115. package/documentation/integrating.md +64 -7
  116. package/documentation/meta-tools.md +38 -24
  117. package/documentation/migration-0.33.md +21 -13
  118. package/documentation/migration-0.34.md +67 -0
  119. package/documentation/operating.md +1 -1
  120. package/documentation/operator-tests.md +52 -20
  121. package/documentation/operator-ui.md +341 -104
  122. package/documentation/provider-auth-migration.md +22 -0
  123. package/examples/worker/AGENTS.md +15 -9
  124. package/examples/worker/README.md +41 -14
  125. package/examples/worker/src/connecta.config.ts +5 -4
  126. package/examples/worker/wrangler.jsonc +1 -1
  127. package/package.json +23 -19
  128. package/templates/node/AGENTS.md +13 -7
  129. package/templates/node/README.md +14 -11
  130. package/templates/node/package.json +1 -1
  131. package/templates/node/src/connecta.config.ts +2 -2
@@ -12,8 +12,10 @@
12
12
  * Workspace address, and the provider reads the identity core attached beside
13
13
  * the context. An agent, which has no Workspace account, acts instead as the
14
14
  * `owner` of the pool it came through, which core copies from that pool's
15
- * config beside the identity; the mapping never sees an agent, and an agent
16
- * in a pool without an owner fails `auth_required` (decisions/0006). A fixed
15
+ * config beside the identity; the mapping never sees an agent. In a pool
16
+ * without an owner the connector is absent for agents (core's scoped
17
+ * registry view hides it), and this provider still fails `auth_required` if
18
+ * one reaches it anyway (decisions/0006). A fixed
17
19
  * `subject` address is every caller's, owners aside. No tool argument,
18
20
  * header, or program can name the subject — every product's base URL is
19
21
  * confined beneath `users/me`, or its product's equivalent, so the token's
@@ -59,7 +61,7 @@ import { tagWorkspaceSubject } from "../../../workspace-subject.js";
59
61
  import { delegatedToken, forgetDelegatedToken, parseServiceAccount, } from "./service-account.js";
60
62
  /** The closed options every Workspace provider accepts; see `assertKnownOptions`. */
61
63
  export const GOOGLE_WORKSPACE_OPTIONS = optionsOf()({
62
- ...keys("purpose", "subject", "title", "instructions", "maxResultBytes", "baseUrl"),
64
+ ...keys("purpose", "subject", "title", "instructions", "maxResultBytes", "baseUrl", "readOnly"),
63
65
  // A string is the key's JSON; only the object form has keys to check.
64
66
  serviceAccount: optionsOf()(keys("clientEmail", "privateKey", "clientId")),
65
67
  callAdmission: CALL_ADMISSION,
@@ -109,6 +111,8 @@ async function subjectFor(provider, subject, ctx) {
109
111
  // An agent has no Workspace account of its own. It acts as the owner of the
110
112
  // pool it came through, which core copied from that pool's config, and the
111
113
  // mapping, which answers for people, is never asked about it (decisions/0006).
114
+ // Core's scoped view already hides the connector from an agent without an
115
+ // owner; this refusal is the fallback for any context built without it.
112
116
  if (caller.identity.agent !== undefined) {
113
117
  if (caller.pool !== undefined && isWorkspaceAddress(caller.poolOwner))
114
118
  return caller.poolOwner;
@@ -27,6 +27,8 @@ export interface BasecampOptions {
27
27
  instructions?: string;
28
28
  /** Connector-specific inline result limit; omit to inherit the deployment. */
29
29
  maxResultBytes?: number;
30
+ /** Serve only read-classified tools on every endpoint. Defaults to false. */
31
+ readOnly?: boolean;
30
32
  /**
31
33
  * Optional per-runtime policy. There is no default: Basecamp's API documents
32
34
  * several dynamically adjusted limits (GET versus POST, per second, hour,
@@ -27,6 +27,8 @@ export interface BreezeOptions {
27
27
  callAdmission?: ConnectorCallAdmissionPolicy;
28
28
  /** Connector-specific inline result limit; omit to inherit the deployment. */
29
29
  maxResultBytes?: number;
30
+ /** Serve only read-classified tools on every endpoint. Defaults to false. */
31
+ readOnly?: boolean;
30
32
  /** Default `list_people` page size. Defaults to 100; connecta's cap is 1,000. */
31
33
  defaultPageSize?: number;
32
34
  }
@@ -98,6 +98,8 @@ export interface CcbOptions {
98
98
  callAdmission?: ConnectorCallAdmissionPolicy;
99
99
  /** Connector-specific inline result limit; omit to inherit the deployment. */
100
100
  maxResultBytes?: number;
101
+ /** Serve only read-classified tools on every endpoint. Defaults to false. */
102
+ readOnly?: boolean;
101
103
  }
102
104
  /** A maintained Church Community Builder (Pushpay ChMS) v2 connection. */
103
105
  export declare const ccb: import("../../provider.js").ProviderFactory<CcbOptions>;
@@ -25,7 +25,7 @@ import { skill } from "./skill.generated.js";
25
25
  *
26
26
  * Drift is handled the Vercel way: `src/providers/ccb/drift.json` records
27
27
  * every endpoint a named tool touches, and
28
- * `npm run providers:check -- --provider ccb` compares those rows with the
28
+ * `pnpm run providers:check --provider ccb` compares those rows with the
29
29
  * published, credential-free OpenAPI document at
30
30
  * https://docs.pushpay.io/chms-v2/openapi/chms-api-specs.json.
31
31
  */
@@ -1651,7 +1651,7 @@ function defaultTitle(environment, mode, writable) {
1651
1651
  }
1652
1652
  /** The closed options ccb() accepts; see `assertKnownOptions`. */
1653
1653
  const CCB_OPTIONS = optionsOf()({
1654
- ...keys("purpose", "title", "instructions", "environment", "mode", "clientId", "clientSecret", "access", "scopes", "subdomain", "defaultPerPage", "maxResultBytes"),
1654
+ ...keys("purpose", "title", "instructions", "environment", "mode", "clientId", "clientSecret", "access", "scopes", "subdomain", "defaultPerPage", "maxResultBytes", "readOnly"),
1655
1655
  callAdmission: CALL_ADMISSION,
1656
1656
  });
1657
1657
  /** A maintained Church Community Builder (Pushpay ChMS) v2 connection. */
@@ -15,6 +15,8 @@ interface CloudflareCommonOptions {
15
15
  instructions?: string;
16
16
  /** Connector-specific inline result limit; omit to inherit the deployment. */
17
17
  maxResultBytes?: number;
18
+ /** Serve only read-classified tools on every endpoint. Defaults to false. */
19
+ readOnly?: boolean;
18
20
  }
19
21
  /** Cloudflare's hosted MCP server (`search` and `execute`) over OAuth. */
20
22
  export interface CloudflareOAuthOptions extends CloudflareCommonOptions {
@@ -68,6 +68,10 @@ const GLOBAL_API_KEY_CREDENTIAL = {
68
68
  */
69
69
  const CLOUDFLARE_MCP_CLASSIFICATION = {
70
70
  tools: {
71
+ docs: {
72
+ verdict: "read",
73
+ reason: "Searches Cloudflare documentation without executing API methods.",
74
+ },
71
75
  search: {
72
76
  verdict: "read",
73
77
  reason: "Searches the Cloudflare OpenAPI contract without executing API methods.",
@@ -116,7 +120,7 @@ function keyUsageGuide(auth, options) {
116
120
 
117
121
  REST with ${scheme}. Connector purpose: ${options.purpose}${auth === "globalApiKey" ? global_warning.trimEnd() : ""}${pin}${defaultLine}${key}${shared}${key_tail}${instructionsSection(options.instructions)}`;
118
122
  }
119
- const COMMON = keys("title", "authScope", "purpose", "instructions", "maxResultBytes");
123
+ const COMMON = keys("title", "authScope", "purpose", "instructions", "maxResultBytes", "readOnly");
120
124
  const KEY_COMMON = keys("accountId", "zoneId", "baseUrl", "maxConcurrency");
121
125
  const PIN = optionsOf()(keys("accountIds", "zoneIds"));
122
126
  /** The closed options cloudflare() accepts, selected by `auth.type`; see `assertKnownOptions`. */