@zackbart/connecta 0.30.0 → 0.31.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 (66) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +6 -3
  3. package/bin/version.mjs +1 -1
  4. package/dist/call-recovery.js +25 -0
  5. package/dist/config-schema.d.ts +14 -7
  6. package/dist/config-schema.js +29 -10
  7. package/dist/connectors/guarded-fetch.d.ts +9 -1
  8. package/dist/connectors/guarded-fetch.js +14 -2
  9. package/dist/errors.d.ts +2 -0
  10. package/dist/invocation.js +32 -0
  11. package/dist/operator-ui/generated.js +2 -2
  12. package/dist/operator-ui/view.d.ts +9 -0
  13. package/dist/operator-ui/view.js +11 -0
  14. package/dist/program-writes.js +2 -47
  15. package/dist/provider.d.ts +7 -5
  16. package/dist/provider.js +3 -4
  17. package/dist/providers/_shared/rest/dispatch.js +41 -0
  18. package/dist/providers/_shared/rest/operation-index.d.ts +133 -0
  19. package/dist/providers/_shared/rest/operation-index.js +527 -0
  20. package/dist/providers/_shared/rest/tools.d.ts +141 -0
  21. package/dist/providers/_shared/rest/tools.js +569 -0
  22. package/dist/providers/_shared/rest/value-safety.d.ts +151 -0
  23. package/dist/providers/_shared/rest/value-safety.js +580 -0
  24. package/dist/providers/cloudflare/graphql.js +385 -0
  25. package/dist/providers/cloudflare/index.d.ts +47 -51
  26. package/dist/providers/cloudflare/index.js +188 -1997
  27. package/dist/providers/cloudflare/openapi.generated.js +3347 -0
  28. package/dist/providers/cloudflare/rest.d.ts +37 -0
  29. package/dist/providers/cloudflare/rest.js +1056 -0
  30. package/dist/providers/cloudflare/skill.generated.js +7 -4
  31. package/dist/providers/cloudflare/value-safety.js +1247 -0
  32. package/dist/providers/notion/index.d.ts +35 -31
  33. package/dist/providers/notion/index.js +60 -1499
  34. package/dist/providers/notion/openapi.generated.js +75 -0
  35. package/dist/providers/notion/rest.d.ts +24 -0
  36. package/dist/providers/notion/rest.js +1067 -0
  37. package/dist/providers/notion/skill.generated.js +5 -4
  38. package/dist/providers/notion/value-safety.js +31 -0
  39. package/dist/providers/stripe/index.d.ts +26 -20
  40. package/dist/providers/stripe/index.js +103 -130
  41. package/dist/providers/stripe/openapi.generated.js +649 -0
  42. package/dist/providers/stripe/rest.d.ts +14 -0
  43. package/dist/providers/stripe/rest.js +395 -0
  44. package/dist/providers/stripe/skill.generated.js +7 -5
  45. package/dist/providers/stripe/value-safety.js +705 -0
  46. package/dist/providers/vercel/index.d.ts +31 -22
  47. package/dist/providers/vercel/index.js +96 -853
  48. package/dist/providers/vercel/openapi.generated.js +456 -0
  49. package/dist/providers/vercel/rest.d.ts +20 -0
  50. package/dist/providers/vercel/rest.js +1002 -0
  51. package/dist/providers/vercel/skill.generated.js +4 -5
  52. package/dist/providers/vercel/value-safety.js +328 -0
  53. package/dist/version.d.ts +1 -1
  54. package/dist/version.js +1 -1
  55. package/dist/write-outcome.js +47 -0
  56. package/documentation/README.md +1 -0
  57. package/documentation/architecture.md +120 -8
  58. package/documentation/integrating.md +16 -5
  59. package/documentation/meta-tools.md +9 -2
  60. package/documentation/provider-auth-migration.md +307 -0
  61. package/documentation/provider-migration-0.29.md +17 -5
  62. package/examples/worker/README.md +2 -2
  63. package/package.json +3 -2
  64. package/templates/node/README.md +2 -2
  65. package/templates/node/package.json +1 -1
  66. package/dist/providers/vercel/mcp-ownership.js +0 -212
@@ -1,19 +1,9 @@
1
1
  import type { ConnectorCallAdmissionPolicy } from "../../types.js";
2
- /** Notion's REST origin. Every tool below speaks to exactly this host. */
3
- export declare const NOTION_API_BASE_URL = "https://api.notion.com";
2
+ export { NOTION_API_BASE_URL, NOTION_API_VERSION } from "./rest.js";
4
3
  /** Notion's official hosted MCP endpoint. */
5
4
  export declare const NOTION_MCP_ENDPOINT = "https://mcp.notion.com/mcp";
6
- /**
7
- * Pinned with no override. Notion's date-named versions keep working
8
- * indefinitely, which makes an override look harmless; it is not. `2026-03-11`
9
- * is where databases split into data sources, `archived` became `in_trash`, and
10
- * block append took a `position` object instead of an `after` string. Every
11
- * projection and write body here assumes those shapes, so an older version would
12
- * return quietly wrong results rather than fail loudly.
13
- */
14
- export declare const NOTION_API_VERSION = "2026-03-11";
15
5
  interface NotionCommonOptions {
16
- /** Human-readable display name; defaults identify the selected interface. */
6
+ /** Human-readable display name; defaults identify the selected implementation. */
17
7
  title?: string;
18
8
  /** Downstream auth ownership. Defaults to one shared deployment grant. */
19
9
  authScope?: "shared" | "personal";
@@ -24,31 +14,45 @@ interface NotionCommonOptions {
24
14
  /** Connector-specific inline result limit; omit to inherit the deployment. */
25
15
  maxResultBytes?: number;
26
16
  }
27
- /** Connecta's maintained hand-written Notion REST interface. */
28
- export interface NotionApiOptions extends NotionCommonOptions {
29
- /** Select integration-owned REST operations explicitly; hosted user MCP is the default. */
30
- surface: "api";
17
+ /**
18
+ * Notion's official hosted MCP server, acting as the OAuth-authorized user.
19
+ * OAuth only: no integration token reaches the hosted endpoint.
20
+ */
21
+ export interface NotionOAuthOptions extends NotionCommonOptions {
22
+ auth: {
23
+ type: "oauth";
24
+ };
25
+ /** Optional per-runtime downstream call-admission policy. */
26
+ callAdmission?: ConnectorCallAdmissionPolicy;
27
+ /** Refused: the hosted server holds no operator credential. */
28
+ credentialLabel?: never;
29
+ /** Refused: hosted tools own their own paging. */
30
+ defaultPageSize?: never;
31
+ }
32
+ /**
33
+ * Connecta's REST connector to `api.notion.com`, acting as one internal
34
+ * integration with an operator-managed token pasted into the connection in
35
+ * the operator UI.
36
+ */
37
+ export interface NotionTokenOptions extends NotionCommonOptions {
38
+ auth: {
39
+ type: "token";
40
+ };
31
41
  /** Operator-facing label for the integration token. */
32
42
  credentialLabel?: string;
33
43
  /**
34
- * Default `page_size` for list-shaped tools when the caller omits one.
44
+ * Default `page_size` for the named list tools when the caller omits one.
35
45
  * Defaults to 25; Notion's maximum is 100.
36
46
  */
37
47
  defaultPageSize?: number;
38
48
  }
39
- /** Notion's official hosted MCP interface, authenticated through OAuth. */
40
- export interface NotionMcpOptions extends NotionCommonOptions {
41
- surface?: "mcp";
42
- /** Optional per-runtime downstream call-admission policy. */
43
- callAdmission?: ConnectorCallAdmissionPolicy;
44
- }
45
- /** Explicit integration-owned REST options; use NotionConnectionOptions for either identity. */
46
- export interface NotionOptions extends NotionApiOptions {
47
- }
48
- /** Select one Notion interface when deployment configuration constructs it. */
49
- export type NotionConnectionOptions = NotionOptions | NotionMcpOptions;
50
- /** A maintained Notion connection using the selected provider interface. */
51
- export declare const notion: import("../../provider.js").ProviderFactory<NotionConnectionOptions>;
49
+ /** `auth` selects the implementation: hosted MCP over OAuth, or REST with a token. */
50
+ export type NotionOptions = NotionOAuthOptions | NotionTokenOptions;
51
+ /**
52
+ * A maintained Notion connection. `auth` selects the implementation: OAuth
53
+ * reaches Notion's hosted MCP server as the authorizing user; an integration
54
+ * token reaches Connecta's REST connector to `api.notion.com` as that bot.
55
+ */
56
+ export declare const notion: import("../../provider.js").ProviderFactory<NotionOptions>;
52
57
  /** @deprecated Read `notion.definition.classify` instead. Kept for existing imports. */
53
58
  export declare const NOTION_MCP_VETTED_CATALOG: import("../../catalog-drift.js").VettedCatalog;
54
- export {};