@tangle-network/agent-integrations 1.0.3 → 1.0.5

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 (119) hide show
  1. package/README.md +40 -31
  2. package/data/bundled-adapter-manifests.json +1 -1
  3. package/dist/{adapters-SSISY8Yg.js → adapters-DBNiLfQN.js} +133 -113
  4. package/dist/{adapters-SSISY8Yg.js.map → adapters-DBNiLfQN.js.map} +1 -1
  5. package/dist/{billing-access-policy-CtvuHvM8.d.ts → billing-access-policy-Ce3WWxG5.d.ts} +2 -3
  6. package/dist/billing-access-policy-Ce3WWxG5.d.ts.map +1 -0
  7. package/dist/billing-access-policy-DJ63AxZ5.js.map +1 -1
  8. package/dist/{bundled-manifest-data-y4NLBbZM.js → bundled-manifest-data-4LjLh6q9.js} +57 -1
  9. package/dist/{bundled-manifest-data-y4NLBbZM.js.map → bundled-manifest-data-4LjLh6q9.js.map} +1 -1
  10. package/dist/{bundled-manifest-runtime-EpjLQKA9.d.ts → bundled-manifest-runtime-nc86Eowo.d.ts} +2 -2
  11. package/dist/{bundled-manifest-runtime-EpjLQKA9.d.ts.map → bundled-manifest-runtime-nc86Eowo.d.ts.map} +1 -1
  12. package/dist/{catalog-CFvKzwVj.js → catalog-DEbD4Cn3.js} +6 -10
  13. package/dist/catalog-DEbD4Cn3.js.map +1 -0
  14. package/dist/{catalog-z4zNeXVL.d.ts → catalog-VQlC1Ew0.d.ts} +8 -12
  15. package/dist/{catalog-z4zNeXVL.d.ts.map → catalog-VQlC1Ew0.d.ts.map} +1 -1
  16. package/dist/catalog.d.ts +1 -1
  17. package/dist/catalog.js +1 -1
  18. package/dist/connect/index.d.ts +1 -1
  19. package/dist/connectors/adapters/index.d.ts +3 -2
  20. package/dist/connectors/adapters/index.js +1 -1
  21. package/dist/connectors/index.d.ts +7 -7
  22. package/dist/connectors/index.js +2 -2
  23. package/dist/connectors/oauth.d.ts +1 -1
  24. package/dist/{consumer-PHOoRorX.d.ts → consumer-BMWxApGG.d.ts} +10 -122
  25. package/dist/consumer-BMWxApGG.d.ts.map +1 -0
  26. package/dist/consumer.d.ts +1 -1
  27. package/dist/{types-Bq85dJDW.d.ts → core-types-ZuEjjJAr.d.ts} +546 -14
  28. package/dist/core-types-ZuEjjJAr.d.ts.map +1 -0
  29. package/dist/{coverage-catalog-5LheuThC.d.ts → coverage-catalog-CsJmShn5.d.ts} +3 -4
  30. package/dist/{coverage-catalog-5LheuThC.d.ts.map → coverage-catalog-CsJmShn5.d.ts.map} +1 -1
  31. package/dist/coverage-catalog.d.ts +2 -2
  32. package/dist/coverage-catalog.js +1 -22
  33. package/dist/coverage-catalog.js.map +1 -1
  34. package/dist/{errors-8ePwEZRM.d.ts → errors-CvjrGB5r.d.ts} +4 -1
  35. package/dist/errors-CvjrGB5r.d.ts.map +1 -0
  36. package/dist/{errors-CvO_y8JO.js → errors-DSdeYms8.js} +16 -3
  37. package/dist/errors-DSdeYms8.js.map +1 -0
  38. package/dist/{hub-DkiKVWJX.d.ts → hub-CRteFmOR.d.ts} +3 -3
  39. package/dist/{hub-DkiKVWJX.d.ts.map → hub-CRteFmOR.d.ts.map} +1 -1
  40. package/dist/{hub-Du6wsA1o.js → hub-DnPkr4xn.js} +2 -1
  41. package/dist/hub-DnPkr4xn.js.map +1 -0
  42. package/dist/hub.d.ts +1 -1
  43. package/dist/hub.js +1 -1
  44. package/dist/{index-BFK-G6g1.d.ts → index-BAI3O7bc.d.ts} +2 -2
  45. package/dist/{index-BFK-G6g1.d.ts.map → index-BAI3O7bc.d.ts.map} +1 -1
  46. package/dist/{index-poLalSQ6.d.ts → index-BbluAb0U.d.ts} +3 -12
  47. package/dist/index-BbluAb0U.d.ts.map +1 -0
  48. package/dist/{index-HBXVPkSs.d.ts → index-C5W0VfzQ.d.ts} +19 -194
  49. package/dist/index-C5W0VfzQ.d.ts.map +1 -0
  50. package/dist/{index-CkCYzn8f.d.ts → index-CezgaMuD.d.ts} +3 -3
  51. package/dist/{index-CkCYzn8f.d.ts.map → index-CezgaMuD.d.ts.map} +1 -1
  52. package/dist/{index-DoJFdW9K.d.ts → index-Dev4r3_u.d.ts} +3 -3
  53. package/dist/{index-DoJFdW9K.d.ts.map → index-Dev4r3_u.d.ts.map} +1 -1
  54. package/dist/index.d.ts +19 -20
  55. package/dist/index.js +11 -11
  56. package/dist/internal/bundled-manifest-runtime.d.ts +1 -1
  57. package/dist/internal/bundled-manifest-runtime.js +1 -1
  58. package/dist/mcp.d.ts +2 -2
  59. package/dist/mcp.js +2 -2
  60. package/dist/middleware/index.d.ts +1 -1
  61. package/dist/{oauth-DoUCpYU_.d.ts → oauth-Br5r5Ms0.d.ts} +2 -2
  62. package/dist/{oauth-DoUCpYU_.d.ts.map → oauth-Br5r5Ms0.d.ts.map} +1 -1
  63. package/dist/{policy-C8jynxf9.d.ts → policy-BH4ZAZ4s.d.ts} +3 -14
  64. package/dist/policy-BH4ZAZ4s.d.ts.map +1 -0
  65. package/dist/{policy-UOPcZqdE.js → policy-C0XpcajG.js} +5 -30
  66. package/dist/policy-C0XpcajG.js.map +1 -0
  67. package/dist/{redaction-B6R-ZeWT.js → redaction-dXj4op-I.js} +16 -2
  68. package/dist/redaction-dXj4op-I.js.map +1 -0
  69. package/dist/{registry-0xWMSBUu.d.ts → registry-CJFl46d3.d.ts} +3 -3
  70. package/dist/{registry-0xWMSBUu.d.ts.map → registry-CJFl46d3.d.ts.map} +1 -1
  71. package/dist/{registry-core-B1ApiG47.d.ts → registry-core-_BnkpeSe.d.ts} +2 -2
  72. package/dist/{registry-core-B1ApiG47.d.ts.map → registry-core-_BnkpeSe.d.ts.map} +1 -1
  73. package/dist/registry.d.ts +2 -2
  74. package/dist/registry.js +1 -1
  75. package/dist/runtime.d.ts +1 -1
  76. package/dist/runtime.js +1 -1
  77. package/dist/sandbox.d.ts +2 -2
  78. package/dist/sandbox.js +5 -20
  79. package/dist/sandbox.js.map +1 -1
  80. package/dist/{specs-B7c5wARo.js → specs-Cy0EZELv.js} +4 -23
  81. package/dist/specs-Cy0EZELv.js.map +1 -0
  82. package/dist/specs.d.ts +2 -2
  83. package/dist/specs.js +2 -2
  84. package/dist/{src-ZNpLV5ka.js → src-BPV-clp-.js} +8 -186
  85. package/dist/src-BPV-clp-.js.map +1 -0
  86. package/dist/stripe/index.d.ts +3 -79
  87. package/dist/stripe/index.d.ts.map +1 -1
  88. package/dist/stripe/index.js +5 -52
  89. package/dist/stripe/index.js.map +1 -1
  90. package/dist/{tangle-id-BW5dTiGi.d.ts → tangle-id-BnzGOA_W.d.ts} +2 -2
  91. package/dist/{tangle-id-BW5dTiGi.d.ts.map → tangle-id-BnzGOA_W.d.ts.map} +1 -1
  92. package/dist/triggers/index.d.ts +20 -1
  93. package/dist/triggers/index.d.ts.map +1 -1
  94. package/dist/triggers/index.js +183 -14
  95. package/dist/triggers/index.js.map +1 -1
  96. package/dist/types-CjrugGcd.js.map +1 -1
  97. package/dist/worker.d.ts +3 -3
  98. package/dist/worker.js +2 -2
  99. package/docs/external-product-integration.md +14 -5
  100. package/docs/integration-coverage-checklist.md +1 -12
  101. package/docs/private-audio-transcription.md +1 -1
  102. package/package.json +2 -1
  103. package/dist/billing-access-policy-CtvuHvM8.d.ts.map +0 -1
  104. package/dist/catalog-CFvKzwVj.js.map +0 -1
  105. package/dist/consumer-PHOoRorX.d.ts.map +0 -1
  106. package/dist/core-types-0BenSoZJ.d.ts +0 -365
  107. package/dist/core-types-0BenSoZJ.d.ts.map +0 -1
  108. package/dist/errors-8ePwEZRM.d.ts.map +0 -1
  109. package/dist/errors-CvO_y8JO.js.map +0 -1
  110. package/dist/hub-Du6wsA1o.js.map +0 -1
  111. package/dist/index-HBXVPkSs.d.ts.map +0 -1
  112. package/dist/index-poLalSQ6.d.ts.map +0 -1
  113. package/dist/policy-C8jynxf9.d.ts.map +0 -1
  114. package/dist/policy-UOPcZqdE.js.map +0 -1
  115. package/dist/redaction-B6R-ZeWT.js.map +0 -1
  116. package/dist/specs-B7c5wARo.js.map +0 -1
  117. package/dist/src-ZNpLV5ka.js.map +0 -1
  118. package/dist/types-Bq85dJDW.d.ts.map +0 -1
  119. package/docs/generated-integration-coverage-checklist.md +0 -156
@@ -1,3 +1,169 @@
1
+ //#region src/connectors/adapters/declarative-rest.d.ts
2
+ type RestCredentialPlacement = {
3
+ kind: 'bearer';
4
+ } |
5
+ /** Authorization header whose scheme depends on the selected auth mode.
6
+ * Some providers use Bearer for OAuth but require a raw personal token in
7
+ * the same header for API-key connections (for example ClickUp). */
8
+ {
9
+ kind: 'authorization-by-auth';
10
+ oauth2Prefix?: string;
11
+ apiKeyPrefix?: string;
12
+ } |
13
+ /** HTTP Basic with the API key as the username and an empty password.
14
+ * Insightly uses this convention for its otherwise single-secret auth. */
15
+ {
16
+ kind: 'basic-api-key';
17
+ } | {
18
+ kind: 'header';
19
+ header: string;
20
+ prefix?: string;
21
+ suffix?: string;
22
+ } |
23
+ /** HTTP Basic from a JSON credential bundle. The two named fields are
24
+ * encoded as `username:password` without exposing either in metadata. */
25
+ {
26
+ kind: 'basic-structured';
27
+ usernameField: string;
28
+ passwordField: string;
29
+ } | {
30
+ kind: 'query';
31
+ parameter: string;
32
+ } |
33
+ /** Multi-part credentials stored as either `custom.values` or a JSON object
34
+ * in the api-key field. Keys are copied into provider headers. This keeps
35
+ * Bill.com's developer key + session id inside the encrypted credential
36
+ * envelope instead of leaking either through connection metadata. */
37
+ {
38
+ kind: 'structured-headers';
39
+ fields: Readonly<Record<string, string>>;
40
+ } |
41
+ /** OAuth 1.0a user credentials in the existing protected structured envelope. */
42
+ {
43
+ kind: 'oauth1';
44
+ } |
45
+ /** Multi-part credentials copied into a JSON request body. Plaid requires
46
+ * client_id, secret, and access_token on every request rather than using an
47
+ * Authorization header. Credential values override model-authored args. */
48
+ {
49
+ kind: 'structured-json-body';
50
+ fields: Readonly<Record<string, string>>;
51
+ } |
52
+ /** AWS Signature Version 4. The api-key credential field carries a JSON
53
+ * bundle (accessKeyId + secretAccessKey + region [+ sessionToken, endpoint]);
54
+ * the runtime signs each request at fetch time. `service` is the SigV4
55
+ * signing name (e.g. `sqs`, `s3`); `defaultRegion` is used only when neither
56
+ * the bundle nor connection metadata supplies a region. The target host is
57
+ * derived from the region via the adapter's `{region}`-templated baseUrl. */
58
+ {
59
+ kind: 'aws-sigv4';
60
+ service: string;
61
+ defaultRegion?: string;
62
+ };
63
+ interface RestConnectorSpec {
64
+ kind: string;
65
+ displayName: string;
66
+ description: string;
67
+ auth: ConnectorAdapter['manifest']['auth'];
68
+ category: ConnectorAdapter['manifest']['category'];
69
+ defaultConsistencyModel: ConnectorAdapter['manifest']['defaultConsistencyModel'];
70
+ baseUrl: string | {
71
+ metadataKey: string;
72
+ fallback?: string;
73
+ };
74
+ /** Exact upstream base URLs accepted after connection-metadata resolution.
75
+ * Use this for regional SaaS hosts so a user-controlled metadata value
76
+ * cannot redirect provider credentials to an arbitrary server. */
77
+ allowedBaseUrls?: readonly string[];
78
+ /** HTTPS hostname suffixes accepted for tenant-specific provider hosts.
79
+ * A suffix `.example.com` accepts `tenant.example.com`, never
80
+ * `example.com.attacker.test`. */
81
+ allowedBaseUrlSuffixes?: readonly string[];
82
+ /** Require a user-supplied host to use HTTPS and reject literal/private
83
+ * network targets. Use this for federated providers that cannot be pinned
84
+ * to one vendor suffix, such as Mastodon. */
85
+ requirePublicHttpsBaseUrl?: boolean;
86
+ /** HTTP statuses that mean the stored credential is unusable. Defaults to
87
+ * 401 and 403. Some providers use 403 for content-policy failures, so they
88
+ * can narrow this list to 401 and preserve the provider error body. */
89
+ credentialsExpiredStatuses?: readonly number[];
90
+ credentialPlacement?: RestCredentialPlacement;
91
+ defaultHeaders?: Record<string, string>;
92
+ /** Header the provider deduplicates retried mutations on (Notion:
93
+ * `Idempotency-Key`). Forwarded for native-idempotency mutations only;
94
+ * opt-in per spec because a wrong name can poison caches or fail validation. */
95
+ idempotencyHeader?: string;
96
+ /** Server-owned app credentials, never copied to the public manifest or model arguments. */
97
+ credentialHeaders?: Readonly<Record<string, string>>;
98
+ capabilities: RestOperationSpec[];
99
+ test?: RestTestSpec;
100
+ }
101
+ interface RestOperationSpec {
102
+ name: string;
103
+ class: 'read' | 'mutation';
104
+ description: string;
105
+ parameters: Record<string, unknown>;
106
+ requiredScopes?: string[];
107
+ request: RestRequestSpec;
108
+ cas?: 'etag-if-match' | 'native-idempotency' | 'optimistic-read-verify' | 'none';
109
+ externalEffect?: boolean;
110
+ /** Overrides heuristic preview redaction for this op's args on the
111
+ * approval, audit, sandbox, and error paths. */
112
+ inputPreview?: IntegrationInputPreview;
113
+ /** Values the schema's type admits but the provider would answer
114
+ * misleadingly, refused before any request. They stay out of the published
115
+ * schema so a model provider never has to compile them. */
116
+ refuseArguments?: readonly RestArgumentRefusal[];
117
+ }
118
+ interface RestArgumentRefusal {
119
+ /** Top-level argument name. */
120
+ field: string;
121
+ /** Regular expression source. A string argument matching it is refused. */
122
+ pattern: string;
123
+ /** Why the value is wrong and what to pass instead. */
124
+ message: string;
125
+ }
126
+ interface RestRequestSpec {
127
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
128
+ path: string;
129
+ /** Operation-owned endpoint selection (e.g. vector data vs control plane). Same host policy applies. */
130
+ baseUrl?: RestConnectorSpec['baseUrl'];
131
+ /** Refuse redirects for credential-bound object fetches. */
132
+ redirect?: 'error';
133
+ /** Object-key placeholders whose slashes separate path segments. Dot segments are refused. */
134
+ pathSegmentParameters?: readonly string[];
135
+ query?: Record<string, string | number | boolean | undefined>;
136
+ headers?: Record<string, string>;
137
+ body?: 'args' | string | Record<string, unknown> | readonly unknown[];
138
+ /** Request-body serialization. JSON remains the default. Form encoding
139
+ * accepts only a flat object of scalar values and omits nullish fields. */
140
+ bodyEncoding?: 'json' | 'form';
141
+ /** Existence-probe operations (e.g. GitHub star/follow/membership checks)
142
+ * encode the answer in the HTTP status: 204 = present, 404 = absent. Set
143
+ * this so the adapter maps both to an explicit `{ exists: boolean }` instead
144
+ * of returning a null body on 204 and THROWING on 404. Any other non-2xx
145
+ * status still fails loud through the normal error path. */
146
+ existenceCheck?: boolean;
147
+ /** Build the successful result from one response header. Some create APIs
148
+ * return an empty body and put the new resource id in a header instead. */
149
+ resultFromHeader?: {
150
+ header: string;
151
+ field: string;
152
+ };
153
+ /** Return a successful binary response as base64 instead of decoding it as UTF-8 text. */
154
+ responseBody?: 'json-or-text' | 'base64';
155
+ /** Hard response-byte budget, enforced while streaming before parsing/decoding. */
156
+ maxResponseBytes?: number;
157
+ }
158
+ interface RestTestSpec extends RestRequestSpec {
159
+ expectResponse?: RestResponseExpectation | RestResponseExpectation[];
160
+ }
161
+ interface RestResponseExpectation {
162
+ path: string;
163
+ equals: unknown;
164
+ }
165
+ declare function declarativeRestConnector(spec: RestConnectorSpec): ConnectorAdapter;
166
+ //#endregion
1
167
  //#region src/connectors/types.d.ts
2
168
  /**
3
169
  * Connector primitives — the contract a concrete first-party integration
@@ -44,10 +210,6 @@
44
210
  type CapabilityParameterSchema = Record<string, unknown>;
45
211
  /** What the rest of the system is allowed to assume about freshness. */
46
212
  type ConsistencyModel = 'authoritative' | 'cache' | 'advisory';
47
- /** Capability classes. `read` is safe to retry; `mutation` must go through
48
- * MutationGuard (CAS + idempotency). `subscribe` is reserved for future
49
- * push-driven sources (webhook callbacks) and is not yet wired. */
50
- type CapabilityClass = 'read' | 'mutation' | 'subscribe';
51
213
  /** Compare-and-swap strategy a mutation uses to detect conflicts. */
52
214
  type CASStrategy =
53
215
  /** Upstream returns an etag/sequence on read, accepts If-Match on write
@@ -78,6 +240,9 @@ interface CapabilityRead {
78
240
  * capability requires. The capability is hidden from the agent's
79
241
  * tool registry if the user's grant didn't include them. */
80
242
  requiredScopes?: string[];
243
+ /** How input previews (approval, audit, sandbox, errors) project this
244
+ * capability's args; defaults to heuristic redaction. */
245
+ inputPreview?: IntegrationInputPreview;
81
246
  }
82
247
  interface CapabilityMutation {
83
248
  name: string;
@@ -94,16 +259,11 @@ interface CapabilityMutation {
94
259
  * before the call. */
95
260
  externalEffect: boolean;
96
261
  requiredScopes?: string[];
262
+ /** How input previews (approval, audit, sandbox, errors) project this
263
+ * capability's args; defaults to heuristic redaction. */
264
+ inputPreview?: IntegrationInputPreview;
97
265
  }
98
266
  type Capability = CapabilityRead | CapabilityMutation;
99
- /** OAuth2 scope catalog the user has granted us, plus arbitrary metadata
100
- * the connector pinned at connect-time (calendar id, sheet id, webhook
101
- * url, …). `metadata` MUST NOT contain secrets — those go in the
102
- * encrypted credentials envelope. */
103
- interface DataSourceMetadata {
104
- scopes: string[];
105
- [key: string]: unknown;
106
- }
107
267
  /** A connected, authenticated, ready-to-call data source for a project.
108
268
  * Persistence shape mirrors the product's connection/source row but normalized — the
109
269
  * encrypted credentials envelope is decrypted at hand-out time and held
@@ -234,6 +394,8 @@ interface EventHandlerResult {
234
394
  interface ConnectorAdapter {
235
395
  /** Manifest entry the registry uses to render UI + validate args. */
236
396
  manifest: ConnectorManifest;
397
+ /** Declarative REST spec the adapter was generated from; present when built by declarativeRestConnector. */
398
+ rest?: RestConnectorSpec;
237
399
  /** Strict normalization of caller-supplied connection metadata; null rejects it. */
238
400
  validateConnectionMetadata?(metadata: Record<string, unknown>): Record<string, unknown> | null;
239
401
  /**
@@ -581,5 +743,375 @@ interface ConnectorManifestValidationResult {
581
743
  declare function validateConnectorManifest(manifest: ConnectorManifest): ConnectorManifestValidationResult;
582
744
  declare function assertValidConnectorManifest(manifest: ConnectorManifest): void;
583
745
  //#endregion
584
- export { ResolvedDataSource as A, OAuth2UrlTemplateMetadataSpec as C, ProviderRateLimitedInit as D, ProviderRateLimited as E, TokenMetadataSource as M, assertValidConnectorManifest as N, ProviderRequestError as O, validateConnectorManifest as P, OAuth2TokenClientAuthMethod as S, ProviderHttpErrorInit as T, CredentialsExpired as _, CapabilityMutation as a, InboundEvent as b, CapabilityRead as c, ConnectorCredentials as d, ConnectorInvocation as f, ConsistencyModel as g, ConnectorManifestValidationResult as h, CapabilityClass as i, ResourceContention as j, RateLimitSpec as k, CapabilityReadResult as l, ConnectorManifestValidationIssue as m, CASStrategy as n, CapabilityMutationResult as o, ConnectorManifest as p, Capability as r, CapabilityParameterSchema as s, AuthSpec as t, ConnectorAdapter as u, DataSourceMetadata as v, ProviderConfigError as w, InvalidCapabilityArgument as x, EventHandlerResult as y };
585
- //# sourceMappingURL=types-Bq85dJDW.d.ts.map
746
+ //#region src/core-types.d.ts
747
+ type IntegrationProviderKind = 'first_party' | 'nango' | 'pipedream' | 'zapier' | 'activepieces' | 'tangle_catalog' | 'executor' | 'custom' | 'mcp';
748
+ type IntegrationConnectorCategory = 'email' | 'calendar' | 'chat' | 'crm' | 'storage' | 'docs' | 'database' | 'webhook' | 'workflow' | 'internal' | 'other';
749
+ type IntegrationActionRisk = 'read' | 'write' | 'destructive';
750
+ type IntegrationDataClass = 'public' | 'internal' | 'private' | 'sensitive' | 'secret';
751
+ interface IntegrationActor {
752
+ type: 'user' | 'team' | 'app' | 'agent' | 'sandbox' | 'system';
753
+ id: string;
754
+ }
755
+ /** Per-action input preview policy. `'none'` stores no input preview on any
756
+ * path; `{ include: [...] }` previews only those top-level argument names
757
+ * (each value still passes the shared redactor). Unset keeps the default
758
+ * heuristic redaction. */
759
+ type IntegrationInputPreview = 'none' | {
760
+ include: readonly string[];
761
+ };
762
+ interface IntegrationConnectorAction {
763
+ id: string;
764
+ title: string;
765
+ risk: IntegrationActionRisk;
766
+ requiredScopes: string[];
767
+ dataClass: IntegrationDataClass;
768
+ /** Present when an action overrides its connector's default consistency. */
769
+ consistencyModel?: 'authoritative' | 'cache' | 'advisory';
770
+ description?: string;
771
+ approvalRequired?: boolean;
772
+ inputPreview?: IntegrationInputPreview;
773
+ inputSchema?: unknown;
774
+ outputSchema?: unknown;
775
+ }
776
+ interface IntegrationConnectorTrigger {
777
+ id: string;
778
+ title: string;
779
+ requiredScopes: string[];
780
+ dataClass: IntegrationDataClass;
781
+ description?: string;
782
+ payloadSchema?: unknown;
783
+ }
784
+ interface IntegrationConnector {
785
+ id: string;
786
+ providerId: string;
787
+ title: string;
788
+ category: IntegrationConnectorCategory;
789
+ auth: 'oauth2' | 'api_key' | 'none' | 'custom';
790
+ scopes: string[];
791
+ actions: IntegrationConnectorAction[];
792
+ triggers?: IntegrationConnectorTrigger[];
793
+ metadata?: Record<string, unknown>;
794
+ }
795
+ interface SecretRef {
796
+ provider: string;
797
+ id: string;
798
+ label?: string;
799
+ }
800
+ interface IntegrationConnection {
801
+ id: string;
802
+ owner: IntegrationActor;
803
+ providerId: string;
804
+ connectorId: string;
805
+ status: 'pending' | 'active' | 'expired' | 'revoked' | 'error';
806
+ grantedScopes: string[];
807
+ account?: {
808
+ id?: string;
809
+ email?: string;
810
+ displayName?: string;
811
+ };
812
+ secretRef?: SecretRef;
813
+ createdAt: string;
814
+ updatedAt: string;
815
+ expiresAt?: string;
816
+ lastUsedAt?: string;
817
+ metadata?: Record<string, unknown>;
818
+ }
819
+ interface StartAuthRequest {
820
+ connectorId: string;
821
+ owner: IntegrationActor;
822
+ requestedScopes: string[];
823
+ redirectUri: string;
824
+ state?: string;
825
+ /** S256 PKCE challenge injected by the host. IntegrationHub replaces any
826
+ * caller value with a challenge derived from its server-held verifier. */
827
+ codeChallenge?: string;
828
+ metadata?: Record<string, unknown>;
829
+ }
830
+ interface StartAuthResult {
831
+ /** Effective scope request, including provider defaults. */
832
+ requestedScopes?: string[];
833
+ providerId: string;
834
+ connectorId: string;
835
+ authUrl: string;
836
+ state: string;
837
+ expiresAt?: string;
838
+ metadata?: Record<string, unknown>;
839
+ }
840
+ interface CompleteAuthRequest {
841
+ connectorId: string;
842
+ owner: IntegrationActor;
843
+ code?: string;
844
+ state: string;
845
+ redirectUri: string;
846
+ /** PKCE verifier injected by the host. IntegrationHub replaces any caller
847
+ * value with the verifier stored against the single-use OAuth state. */
848
+ codeVerifier?: string;
849
+ signal?: AbortSignal;
850
+ /** Host-pinned start scopes; used only when the provider omits its grant scopes. */
851
+ requestedScopes?: string[];
852
+ metadata?: Record<string, unknown>;
853
+ }
854
+ interface IntegrationActionRequest {
855
+ connectionId: string;
856
+ action: string;
857
+ input?: unknown;
858
+ idempotencyKey?: string;
859
+ dryRun?: boolean;
860
+ metadata?: Record<string, unknown>;
861
+ }
862
+ interface IntegrationActionResult<T = unknown> {
863
+ ok: boolean;
864
+ action: string;
865
+ output?: T;
866
+ externalId?: string;
867
+ warnings?: string[];
868
+ metadata?: Record<string, unknown>;
869
+ }
870
+ interface IntegrationTriggerSubscription {
871
+ id: string;
872
+ connectionId: string;
873
+ trigger: string;
874
+ targetUrl?: string;
875
+ status: 'active' | 'paused' | 'error';
876
+ createdAt: string;
877
+ metadata?: Record<string, unknown>;
878
+ }
879
+ interface IntegrationTriggerEvent<T = unknown> {
880
+ id: string;
881
+ providerId: string;
882
+ connectorId: string;
883
+ connectionId: string;
884
+ trigger: string;
885
+ occurredAt: string;
886
+ payload: T;
887
+ metadata?: Record<string, unknown>;
888
+ }
889
+ type IntegrationConnectionTestStatus = 'healthy' | 'reconnect_required' | 'rate_limited' | 'network' | 'provider_failure' | 'credential_persistence_failure' | 'unsupported';
890
+ interface ConnectApiKeyRequest {
891
+ connectorId: string;
892
+ owner: IntegrationActor;
893
+ apiKey: string;
894
+ metadata?: Record<string, unknown>;
895
+ }
896
+ interface IntegrationProvider {
897
+ id: string;
898
+ kind: IntegrationProviderKind;
899
+ listConnectors(): Promise<IntegrationConnector[]> | IntegrationConnector[];
900
+ testConnection?(connection: IntegrationConnection): Promise<IntegrationConnectionTestStatus>;
901
+ connectApiKey?(request: ConnectApiKeyRequest): Promise<IntegrationConnection>;
902
+ startAuth?(request: StartAuthRequest): Promise<StartAuthResult> | StartAuthResult;
903
+ completeAuth?(request: CompleteAuthRequest): Promise<IntegrationConnection> | IntegrationConnection;
904
+ invokeAction(connection: IntegrationConnection, request: IntegrationActionRequest): Promise<IntegrationActionResult> | IntegrationActionResult;
905
+ subscribeTrigger?(connection: IntegrationConnection, trigger: string, targetUrl?: string): Promise<IntegrationTriggerSubscription> | IntegrationTriggerSubscription;
906
+ unsubscribeTrigger?(subscriptionId: string): Promise<void> | void;
907
+ normalizeTriggerEvent?(raw: unknown): Promise<IntegrationTriggerEvent> | IntegrationTriggerEvent;
908
+ }
909
+ interface IntegrationConnectionStore {
910
+ get(connectionId: string): Promise<IntegrationConnection | undefined> | IntegrationConnection | undefined;
911
+ put(connection: IntegrationConnection): Promise<void> | void;
912
+ listByOwner(owner: IntegrationActor): Promise<IntegrationConnection[]> | IntegrationConnection[];
913
+ delete?(connectionId: string): Promise<void> | void;
914
+ }
915
+ interface IssueCapabilityRequest {
916
+ subject: IntegrationActor;
917
+ connectionId: string;
918
+ scopes: string[];
919
+ allowedActions: string[];
920
+ ttlMs: number;
921
+ metadata?: Record<string, unknown>;
922
+ }
923
+ interface IntegrationCapability {
924
+ id: string;
925
+ subject: IntegrationActor;
926
+ connectionId: string;
927
+ scopes: string[];
928
+ allowedActions: string[];
929
+ issuedAt: string;
930
+ expiresAt: string;
931
+ metadata?: Record<string, unknown>;
932
+ }
933
+ interface IssuedIntegrationCapability {
934
+ capability: IntegrationCapability;
935
+ token: string;
936
+ }
937
+ /**
938
+ * Wraps every action invocation with cross-cutting discipline (idempotency,
939
+ * conflict detection, rate-limiting, audit logging). Optional. When set on
940
+ * the hub, runs BEFORE provider.invokeAction; can short-circuit (return a
941
+ * result directly) or pass through (call `proceed()` to invoke the provider).
942
+ *
943
+ * Why this hook exists: production deployments need conflict-resolution
944
+ * guarantees that span every provider, gateway, and webhook receiver. The
945
+ * canonical implementation is a "MutationGuard" that:
946
+ * 1. Short-circuits on a known idempotency key (returns recorded response).
947
+ * 2. Refuses same-key-different-args (drift detection).
948
+ * 3. Wraps `proceed()` and audit-logs the outcome.
949
+ * 4. Translates upstream conflict signals into a structured result with
950
+ * alternatives the agent can act on.
951
+ *
952
+ * Implementations live in consumers (every product has different
953
+ * persistence + telemetry needs); this interface is the contract.
954
+ */
955
+ interface IntegrationActionGuard {
956
+ /** Wrap an invokeAction call. Implementations MUST call `proceed()` to
957
+ * invoke the underlying provider unless they're returning a cached or
958
+ * short-circuited result.
959
+ *
960
+ * @param ctx connection + request the hub is about to dispatch
961
+ * @param proceed call to invoke the wrapped provider; returns the
962
+ * underlying IntegrationActionResult
963
+ * @returns the result the hub should return to the caller
964
+ */
965
+ invokeAction(ctx: IntegrationGuardContext, proceed: () => Promise<IntegrationActionResult>): Promise<IntegrationActionResult>;
966
+ }
967
+ interface IntegrationGuardContext {
968
+ connection: IntegrationConnection;
969
+ request: IntegrationActionRequest;
970
+ /** The action descriptor from the connector manifest, if discovered. */
971
+ action?: IntegrationConnectorAction;
972
+ }
973
+ type IntegrationPolicyDecision = {
974
+ decision: 'allow';
975
+ reason: string;
976
+ metadata?: Record<string, unknown>;
977
+ } | {
978
+ decision: 'require_approval';
979
+ reason: string;
980
+ approval: IntegrationApprovalRequest;
981
+ metadata?: Record<string, unknown>;
982
+ } | {
983
+ decision: 'deny';
984
+ reason: string;
985
+ metadata?: Record<string, unknown>;
986
+ };
987
+ interface IntegrationApprovalRequest {
988
+ id: string;
989
+ connectionId: string;
990
+ providerId: string;
991
+ connectorId: string;
992
+ action: string;
993
+ actor: IntegrationActor;
994
+ risk: IntegrationActionRisk;
995
+ dataClass: IntegrationDataClass;
996
+ reason: string;
997
+ requestedAt: string;
998
+ inputPreview?: unknown;
999
+ metadata?: Record<string, unknown>;
1000
+ }
1001
+ interface IntegrationPolicyEngine {
1002
+ decide(ctx: IntegrationGuardContext & {
1003
+ subject: IntegrationActor;
1004
+ }): Promise<IntegrationPolicyDecision> | IntegrationPolicyDecision;
1005
+ }
1006
+ interface IntegrationHubOptions {
1007
+ providers: IntegrationProvider[];
1008
+ store: IntegrationConnectionStore;
1009
+ capabilitySecret: string;
1010
+ /** Optional cross-cutting guard. If provided, every invokeAction call
1011
+ * passes through it before reaching the provider. See {@link IntegrationActionGuard}. */
1012
+ guard?: IntegrationActionGuard;
1013
+ /** Optional policy engine. Runs after capability/scope checks and before
1014
+ * provider invocation. Use it to pause writes, deny destructive actions,
1015
+ * or apply tenant-specific allow rules. */
1016
+ policy?: IntegrationPolicyEngine;
1017
+ /** Host-injectable secret store. Multi-tenant hubs inject a durable
1018
+ * encrypted store; defaults to InMemoryIntegrationSecretStore for
1019
+ * local/dev and tests. The interface is the contract — the lib never
1020
+ * ships a D1/KV/encryption impl. */
1021
+ secretStore?: IntegrationSecretStore;
1022
+ /** Host-injectable single-use OAuth-state store guarding the start →
1023
+ * callback CSRF boundary. Defaults to InMemoryIntegrationOAuthStateStore. */
1024
+ oauthStateStore?: IntegrationOAuthStateStore;
1025
+ /** TTL applied to OAuth-state records the hub stashes at startAuth.
1026
+ * Defaults to 10 minutes. */
1027
+ oauthStateTtlMs?: number;
1028
+ /** Fired whenever a provider surfaces rotated credentials during an
1029
+ * invoke (e.g. an OAuth access token refreshed on expiry). The host
1030
+ * re-encrypts + persists the rotated envelope so the next expiry does
1031
+ * not force a reconnect. The hub also writes the rotated credentials to
1032
+ * {@link secretStore} when the connection carries a secretRef. */
1033
+ credentialsRotated?: (event: IntegrationCredentialsRotatedEvent) => Promise<void> | void;
1034
+ now?: () => Date;
1035
+ }
1036
+ /** Emitted when a provider rotates credentials mid-invoke. The host
1037
+ * re-persists `credentials` against `secretRef` (when present) so the
1038
+ * refreshed token survives the call. */
1039
+ interface IntegrationCredentialsRotatedEvent {
1040
+ connection: IntegrationConnection;
1041
+ secretRef?: SecretRef;
1042
+ credentials: ConnectorCredentials;
1043
+ }
1044
+ interface HttpIntegrationProviderOptions {
1045
+ id: string;
1046
+ kind?: IntegrationProviderKind;
1047
+ connectors: IntegrationConnector[];
1048
+ baseUrl: string;
1049
+ bearer?: string;
1050
+ fetchImpl?: typeof fetch;
1051
+ }
1052
+ interface InvokeWithCapabilityRequest extends Omit<IntegrationActionRequest, 'connectionId'> {
1053
+ connectionId?: never;
1054
+ }
1055
+ /** A catalog of connectors keyed by stable source id. The registry merges
1056
+ * multiple sources (first-party adapter packs, Activepieces import, custom
1057
+ * HTTP catalog, …) into a canonical view with conflict reporting. */
1058
+ interface IntegrationCatalogSource {
1059
+ id: string;
1060
+ connectors: IntegrationConnector[];
1061
+ precedence?: number;
1062
+ }
1063
+ /** Host-injectable persistent store for OAuth tokens and other connector
1064
+ * credentials. Multi-tenant hubs inject a durable encrypted store; defaults
1065
+ * to an in-memory implementation for local/dev and tests. The interface is
1066
+ * the contract — the lib never ships a D1/KV/encryption impl. */
1067
+ interface IntegrationSecretStore {
1068
+ get(ref: SecretRef): Promise<ConnectorCredentials | undefined> | ConnectorCredentials | undefined;
1069
+ put(ref: SecretRef, credentials: ConnectorCredentials): Promise<void> | void;
1070
+ delete?(ref: SecretRef): Promise<void> | void;
1071
+ }
1072
+ /** Single-use record stashed at OAuth-start and consumed once at callback to
1073
+ * guard against CSRF / replay. The hub injects its own durable
1074
+ * implementation (KV/Redis/D1) so the callback can land on any worker. */
1075
+ interface IntegrationOAuthState {
1076
+ /** Opaque value round-tripped through the provider redirect. */
1077
+ state: string;
1078
+ /** Provider the auth flow targets. */
1079
+ providerId: string;
1080
+ /** Connector the user is connecting. */
1081
+ connectorId: string;
1082
+ /** Owner initiating the flow. */
1083
+ owner: IntegrationActor;
1084
+ /** Scopes requested at start; verified against the granted scopes on callback. */
1085
+ requestedScopes: string[];
1086
+ /** Redirect URI used at start; MUST match exactly on callback exchange. */
1087
+ redirectUri: string;
1088
+ /** PKCE code_verifier, when the connector uses PKCE. */
1089
+ codeVerifier?: string;
1090
+ /** Absolute expiry (UTC ms since epoch). consume() MUST treat an expired
1091
+ * record as a miss. */
1092
+ expiresAt: number;
1093
+ /** Arbitrary non-secret context the host pinned at start-time. */
1094
+ metadata?: Record<string, unknown>;
1095
+ }
1096
+ /** Outcome of consuming an OAuth state record. Callers MUST inspect `ok`
1097
+ * before using `state`; a miss (`unknown`/`expired`) is the CSRF/replay
1098
+ * guard firing, not an exception. */
1099
+ type IntegrationOAuthStateOutcome = {
1100
+ ok: true;
1101
+ state: IntegrationOAuthState;
1102
+ } | {
1103
+ ok: false;
1104
+ reason: 'unknown' | 'expired';
1105
+ };
1106
+ /** Host-injectable store for single-use OAuth-start records. The default is
1107
+ * in-memory for local/dev and tests; multi-tenant hubs inject a durable
1108
+ * encrypted store so callbacks survive worker hops. consume() MUST be
1109
+ * single-use: a second consume of the same state returns `{ ok: false }`. */
1110
+ interface IntegrationOAuthStateStore {
1111
+ put(state: IntegrationOAuthState): Promise<void> | void;
1112
+ consume(state: string): Promise<IntegrationOAuthStateOutcome> | IntegrationOAuthStateOutcome;
1113
+ sweep?(now: number): Promise<void> | void;
1114
+ }
1115
+ //#endregion
1116
+ export { ConnectorManifestValidationResult as $, IntegrationProviderKind as A, AuthSpec as B, IntegrationInputPreview as C, IntegrationPolicyDecision as D, IntegrationOAuthStateStore as E, IssueCapabilityRequest as F, CapabilityParameterSchema as G, Capability as H, IssuedIntegrationCapability as I, ConnectorAdapter as J, CapabilityRead as K, SecretRef as L, IntegrationTriggerEvent as M, IntegrationTriggerSubscription as N, IntegrationPolicyEngine as O, InvokeWithCapabilityRequest as P, ConnectorManifestValidationIssue as Q, StartAuthRequest as R, IntegrationHubOptions as S, declarativeRestConnector as St, IntegrationOAuthStateOutcome as T, CapabilityMutation as U, CASStrategy as V, CapabilityMutationResult as W, ConnectorInvocation as X, ConnectorCredentials as Y, ConnectorManifest as Z, IntegrationConnectorCategory as _, validateConnectorManifest as _t, IntegrationActionRequest as a, OAuth2TokenClientAuthMethod as at, IntegrationDataClass as b, RestOperationSpec as bt, IntegrationActor as c, ProviderHttpErrorInit as ct, IntegrationCatalogSource as d, ProviderRequestError as dt, ConsistencyModel as et, IntegrationConnection as f, RateLimitSpec as ft, IntegrationConnectorAction as g, assertValidConnectorManifest as gt, IntegrationConnector as h, TokenMetadataSource as ht, IntegrationActionGuard as i, InvalidCapabilityArgument as it, IntegrationSecretStore as j, IntegrationProvider as k, IntegrationApprovalRequest as l, ProviderRateLimited as lt, IntegrationConnectionTestStatus as m, ResourceContention as mt, ConnectApiKeyRequest as n, EventHandlerResult as nt, IntegrationActionResult as o, OAuth2UrlTemplateMetadataSpec as ot, IntegrationConnectionStore as p, ResolvedDataSource as pt, CapabilityReadResult as q, HttpIntegrationProviderOptions as r, InboundEvent as rt, IntegrationActionRisk as s, ProviderConfigError as st, CompleteAuthRequest as t, CredentialsExpired as tt, IntegrationCapability as u, ProviderRateLimitedInit as ut, IntegrationConnectorTrigger as v, RestConnectorSpec as vt, IntegrationOAuthState as w, IntegrationGuardContext as x, RestRequestSpec as xt, IntegrationCredentialsRotatedEvent as y, RestCredentialPlacement as yt, StartAuthResult as z };
1117
+ //# sourceMappingURL=core-types-ZuEjjJAr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-types-ZuEjjJAr.d.ts","names":[],"sources":["../src/connectors/adapters/declarative-rest.ts","../src/connectors/types.ts","../src/core-types.ts"],"mappings":";KAwBY;EACN;;;;;;EAIA;EAA+B;EAAuB;;;;;EAGtD;;EACA;EAAgB;EAAgB;EAAiB;;;;;EAGjD;EAA0B;EAAuB;;EACjD;EAAe;;;;;;;EAKf;EAA4B,QAAQ,SAAS;;;;EAE7C;;;;;;EAIA;EAA8B,QAAQ,SAAS;;;;;;;;;EAO/C;EAAmB;EAAiB;;UAEzB;EACf;EACA;EACA;EACA,MAAM;EACN,UAAU;EACV,yBAAyB;EACzB;IAAoB;IAAqB;;;;;EAIzC;;;;EAIA;;;;EAIA;;;;EAIA;EACA,sBAAsB;EACtB,iBAAiB;;;;EAIjB;;EAEA,oBAAoB,SAAS;EAC7B,cAAc;EACd,OAAO;;UAGQ;EACf;EACA;EACA;EACA,YAAY;EACZ;EACA,SAAS;EACT;EACA;;;EAGA,eAAe;;;;EAIf,2BAA2B;;UAGZ;;EAEf;;EAEA;;EAEA;;UAGe;EACf;EACA;;EAEA,UAAU;;EAEV;;EAEA;EACA,QAAQ;EACR,UAAU;EACV,yBAAyB;;;EAGzB;;;;;;EAMA;;;EAGA;IA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MAAM;;;;;;;;cAeG,kCAAkC;WAM3B;WALA;WACT;WACA;EACT,YACE,iBACgB;;UAMH;EACf;EACA;;UAGe;EACf;EACA,QAAQ;;;;;;iBAOM,0BAA0B,UAAU,oBAAoB;iBAoLxD,6BAA6B,UAAU;;;KC1yB3C;KAWA;KAaA;KACA;UAEK;EACf;EACA;;;;;;KAOU;EAAqC;;UAEhC;EACf;EACA;EACA,MAAM;EACN;EACA,WAAW;;EAEX;EACA;EACA;EACA,eAAe;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,WAAW;EACX;EACA;;UAGe;EACf;EACA;EACA;EACA,UAAU;EACV;EACA;EACA,SAAS;EACT,WAAW;EACX,WAAW;;UAGI;EACf;EACA;EACA;;UAGe;EACf;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;IACE;IACA;IACA;;EAEF,YAAY;EACZ;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA,OAAO;EACP;EACA;EACA;;;EAGA;EACA,WAAW;;UAGI;;EAEf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI;EACf;EACA,OAAO;EACP;EACA;EACA;;;EAGA;EACA,SAAS;;EAET;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI,wBAAwB;EACvC;EACA;EACA,SAAS;EACT;EACA;EACA,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;;UAGI,wBAAwB;EACvC;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT,WAAW;;KAGD;UAEK;EACf;EACA,OAAO;EACP;EACA,WAAW;;UAGI;EACf;EACA,MAAM;EACN,kBAAkB,QAAQ,0BAA0B;EACpD,gBAAgB,YAAY,wBAAwB,QAAQ;EAC5D,eAAe,SAAS,uBAAuB,QAAQ;EACvD,WAAW,SAAS,mBAAmB,QAAQ,mBAAmB;EAClE,cAAc,SAAS,sBAAsB,QAAQ,yBAAyB;EAC9E,aAAa,YAAY,uBAAuB,S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AAY;;;;;UAMV;;EAEf;;EAEA;;EAEA;;EAEA,OAAO;;EAEP;;EAEA;;EAEA;;;EAGA;;EAEA,WAAW;;;;;KAMD;EACN;EAAU,OAAO;;EACjB;EAAW;;;;;;UAMA;EACf,IAAI,OAAO,wBAAwB;EACnC,QAAQ,gBAAgB,QAAQ,gCAAgC;EAChE,OAAO,cAAc"}
@@ -1,4 +1,4 @@
1
- import { _ as IntegrationConnectorCategory, h as IntegrationConnector, k as IntegrationProviderKind } from "./core-types-0BenSoZJ.js";
1
+ import { A as IntegrationProviderKind, _ as IntegrationConnectorCategory, h as IntegrationConnector } from "./core-types-ZuEjjJAr.js";
2
2
  //#region src/coverage-catalog.d.ts
3
3
  type IntegrationCoveragePriority = 'tier_0' | 'tier_1' | 'tier_2' | 'long_tail';
4
4
  interface IntegrationCoverageSpec {
@@ -20,7 +20,6 @@ declare function buildIntegrationCoverageConnectors(options?: {
20
20
  categories?: IntegrationConnectorCategory[];
21
21
  actionPacks?: IntegrationActionPack[];
22
22
  }): IntegrationConnector[];
23
- declare function integrationCoverageChecklistMarkdown(): string;
24
23
  //#endregion
25
- export { integrationCoverageChecklistMarkdown as a, buildIntegrationCoverageConnectors as i, IntegrationCoveragePriority as n, listIntegrationCoverageSpecs as o, IntegrationCoverageSpec as r, IntegrationActionPack as t };
26
- //# sourceMappingURL=coverage-catalog-5LheuThC.d.ts.map
24
+ export { listIntegrationCoverageSpecs as a, buildIntegrationCoverageConnectors as i, IntegrationCoveragePriority as n, IntegrationCoverageSpec as r, IntegrationActionPack as t };
25
+ //# sourceMappingURL=coverage-catalog-CsJmShn5.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coverage-catalog-5LheuThC.d.ts","names":[],"sources":["../src/coverage-catalog.ts"],"mappings":";;KAQY;UAEK;EACf;EACA;EACA,UAAU;EACV,MAAM;EACN,UAAU;EACV,eAAe;EACf;EACA,YAAY;EACZ;;KAGU;iBA6SI,gCAAgC;iBAchC,mCAAmC;EACjD;EACA,aAAa;EACb,aAAa;EACb,cAAc;IACP;iBASO"}
1
+ {"version":3,"file":"coverage-catalog-CsJmShn5.d.ts","names":[],"sources":["../src/coverage-catalog.ts"],"mappings":";;KAQY;UAEK;EACf;EACA;EACA,UAAU;EACV,MAAM;EACN,UAAU;EACV,eAAe;EACf;EACA,YAAY;EACZ;;KAGU;iBA6SI,gCAAgC;iBAchC,mCAAmC;EACjD;EACA,aAAa;EACb,aAAa;EACb,cAAc;IACP"}
@@ -1,2 +1,2 @@
1
- import { a as integrationCoverageChecklistMarkdown, i as buildIntegrationCoverageConnectors, n as IntegrationCoveragePriority, o as listIntegrationCoverageSpecs, r as IntegrationCoverageSpec, t as IntegrationActionPack } from "./coverage-catalog-5LheuThC.js";
2
- export { IntegrationActionPack, IntegrationCoveragePriority, IntegrationCoverageSpec, buildIntegrationCoverageConnectors, integrationCoverageChecklistMarkdown, listIntegrationCoverageSpecs };
1
+ import { a as listIntegrationCoverageSpecs, i as buildIntegrationCoverageConnectors, n as IntegrationCoveragePriority, r as IntegrationCoverageSpec, t as IntegrationActionPack } from "./coverage-catalog-CsJmShn5.js";
2
+ export { IntegrationActionPack, IntegrationCoveragePriority, IntegrationCoverageSpec, buildIntegrationCoverageConnectors, listIntegrationCoverageSpecs };
@@ -2227,27 +2227,6 @@ function buildIntegrationCoverageConnectors(options = {}) {
2227
2227
  const providerId = options.providerId ?? "coverage";
2228
2228
  return listIntegrationCoverageSpecs().filter((spec) => !options.priorities || options.priorities.includes(spec.priority)).filter((spec) => !options.categories || options.categories.includes(spec.category)).filter((spec) => !options.actionPacks || options.actionPacks.includes(spec.actionPack)).map((spec) => specToConnector(spec, providerId));
2229
2229
  }
2230
- function integrationCoverageChecklistMarkdown() {
2231
- const specs = listIntegrationCoverageSpecs();
2232
- const lines = [
2233
- "# Agent Integrations Coverage Checklist",
2234
- "",
2235
- "Generated from `listIntegrationCoverageSpecs()`. Catalog presence means the product can plan/request/connect the integration; native adapters and runtime backends execute behind the same provider contract.",
2236
- "",
2237
- "## Summary",
2238
- "",
2239
- `- Total cataloged integrations: ${specs.length}`,
2240
- `- Tier 0: ${specs.filter((spec) => spec.priority === "tier_0").length}`,
2241
- `- Tier 1: ${specs.filter((spec) => spec.priority === "tier_1").length}`,
2242
- `- Tier 2: ${specs.filter((spec) => spec.priority === "tier_2").length}`,
2243
- `- Long tail: ${specs.filter((spec) => spec.priority === "long_tail").length}`,
2244
- "",
2245
- "## Checklist",
2246
- ""
2247
- ];
2248
- for (const spec of specs) lines.push(`- [ ] ${spec.priority} / ${spec.category} / ${spec.title} (${spec.id}) - ${spec.domains.join(", ")}`);
2249
- return `${lines.join("\n")}\n`;
2250
- }
2251
2230
  function specToConnector(spec, providerId) {
2252
2231
  const actions = actionPack(spec.actionPack, spec.scopes ?? []);
2253
2232
  return {
@@ -2621,6 +2600,6 @@ function objectSchema() {
2621
2600
  };
2622
2601
  }
2623
2602
  //#endregion
2624
- export { buildIntegrationCoverageConnectors, integrationCoverageChecklistMarkdown, listIntegrationCoverageSpecs };
2603
+ export { buildIntegrationCoverageConnectors, listIntegrationCoverageSpecs };
2625
2604
 
2626
2605
  //# sourceMappingURL=coverage-catalog.js.map