@tangle-network/agent-integrations 0.24.0 → 0.25.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.
- package/README.md +92 -21
- package/dist/bin/tangle-catalog-runtime.js +23 -2
- package/dist/bin/tangle-catalog-runtime.js.map +1 -1
- package/dist/{chunk-L6WBPDUP.js → chunk-4JQ754PA.js} +2 -2
- package/dist/chunk-4JQ754PA.js.map +1 -0
- package/dist/{chunk-6SSYWA3J.js → chunk-VJ57GPYO.js} +110 -9
- package/dist/chunk-VJ57GPYO.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/dist/specs.d.ts +93 -31
- package/dist/specs.js +1 -1
- package/docs/adapter-triage.md +19 -10
- package/docs/catalog-registry.md +6 -3
- package/docs/external-product-integration.md +203 -0
- package/docs/generated-integration-coverage-checklist.md +3 -3
- package/docs/integration-coverage-checklist.md +3 -3
- package/docs/integration-execution-audit.md +18 -20
- package/docs/integration-execution-matrix.json +675 -675
- package/docs/production-completion-checklist.md +3 -2
- package/docs/repo-structure.md +2 -2
- package/docs/third-party/activepieces.md +6 -2
- package/package.json +1 -1
- package/dist/chunk-6SSYWA3J.js.map +0 -1
- package/dist/chunk-L6WBPDUP.js.map +0 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# External Product Integration
|
|
2
|
+
|
|
3
|
+
This guide is for product teams using `@tangle-network/agent-integrations`
|
|
4
|
+
outside this repository. The package gives you stable contracts and runtime
|
|
5
|
+
helpers; your product supplies persistence, secret storage, UI, and deployment
|
|
6
|
+
policy.
|
|
7
|
+
|
|
8
|
+
## Mental Model
|
|
9
|
+
|
|
10
|
+
```txt
|
|
11
|
+
user connects account
|
|
12
|
+
-> product stores IntegrationConnection + secret refs
|
|
13
|
+
-> app/agent declares IntegrationManifest
|
|
14
|
+
-> product creates IntegrationGrant
|
|
15
|
+
-> sandbox/app receives short-lived capability bundle
|
|
16
|
+
-> sandbox/app invokes product /integrations/invoke endpoint
|
|
17
|
+
-> IntegrationHub validates capability, policy, approval, idempotency
|
|
18
|
+
-> provider backend executes action
|
|
19
|
+
-> product stores audit event and returns normalized result
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The invariant: generated apps and agents call the same Tangle integration tools
|
|
23
|
+
no matter whether a connector is backed by a native adapter, hosted gateway, or
|
|
24
|
+
catalog runtime.
|
|
25
|
+
|
|
26
|
+
## Product-Owned Pieces
|
|
27
|
+
|
|
28
|
+
You must provide:
|
|
29
|
+
|
|
30
|
+
- `IntegrationConnection` storage in your database.
|
|
31
|
+
- `IntegrationGrant` storage mapping user-owned connections to apps, agents, or
|
|
32
|
+
sandboxes.
|
|
33
|
+
- Approval, audit, healthcheck, workflow, and event stores.
|
|
34
|
+
- `IntegrationSecretStore` backed by your vault or KMS.
|
|
35
|
+
- OAuth/API-key connect UI built from `IntegrationSpec` renderers.
|
|
36
|
+
- Tenant policy for which connectors are enabled.
|
|
37
|
+
- Human approval UX for write/destructive actions.
|
|
38
|
+
- A deployed invocation endpoint such as `/v1/integrations/invoke`.
|
|
39
|
+
|
|
40
|
+
The package provides interfaces and helpers for all of these. It does not store
|
|
41
|
+
your secrets or run your product UI.
|
|
42
|
+
|
|
43
|
+
## Setup Flow
|
|
44
|
+
|
|
45
|
+
1. Build the registry.
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { buildDefaultIntegrationRegistry } from '@tangle-network/agent-integrations'
|
|
49
|
+
|
|
50
|
+
const registry = buildDefaultIntegrationRegistry({
|
|
51
|
+
tangleCatalogRuntimeExecutable: process.env.TANGLE_CATALOG_RUNTIME === '1',
|
|
52
|
+
})
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. Render setup UI from specs.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import {
|
|
59
|
+
listIntegrationSpecs,
|
|
60
|
+
renderConsoleSteps,
|
|
61
|
+
validateCredentialSet,
|
|
62
|
+
} from '@tangle-network/agent-integrations'
|
|
63
|
+
|
|
64
|
+
const spec = listIntegrationSpecs().find((candidate) => candidate.kind === 'google-calendar')
|
|
65
|
+
const steps = renderConsoleSteps(spec!, { host: 'id.example.com' })
|
|
66
|
+
const validation = validateCredentialSet(spec!, submittedCredentials)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. Store provider credentials in your vault, then persist an
|
|
70
|
+
`IntegrationConnection` with secret refs, scopes, owner, connector id, and
|
|
71
|
+
status.
|
|
72
|
+
|
|
73
|
+
4. Run `runIntegrationHealthchecks()` after setup and on a schedule.
|
|
74
|
+
|
|
75
|
+
## Runtime Flow
|
|
76
|
+
|
|
77
|
+
Create one hub per product runtime.
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
import {
|
|
81
|
+
createConnectorAdapterProvider,
|
|
82
|
+
createDefaultIntegrationActionGuard,
|
|
83
|
+
IntegrationHub,
|
|
84
|
+
createPlatformIntegrationPolicyPreset,
|
|
85
|
+
} from '@tangle-network/agent-integrations'
|
|
86
|
+
|
|
87
|
+
const hub = new IntegrationHub({
|
|
88
|
+
providers: [
|
|
89
|
+
createConnectorAdapterProvider({
|
|
90
|
+
adapters,
|
|
91
|
+
resolveDataSource: (connection) => credentialResolver.resolve(connection),
|
|
92
|
+
}),
|
|
93
|
+
// createHttpIntegrationProvider(...) or createTangleCatalogExecutorProvider(...)
|
|
94
|
+
],
|
|
95
|
+
store: connections,
|
|
96
|
+
capabilitySecret: process.env.INTEGRATION_CAPABILITY_SECRET!,
|
|
97
|
+
policy: createPlatformIntegrationPolicyPreset(),
|
|
98
|
+
guard: createDefaultIntegrationActionGuard({
|
|
99
|
+
audit,
|
|
100
|
+
idempotency,
|
|
101
|
+
}),
|
|
102
|
+
})
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Your `/v1/integrations/invoke` route should:
|
|
106
|
+
|
|
107
|
+
1. Parse the invocation envelope.
|
|
108
|
+
2. Validate the capability token.
|
|
109
|
+
3. Resolve the user's connection and credentials.
|
|
110
|
+
4. Run policy and approval checks.
|
|
111
|
+
5. Execute through the matching provider.
|
|
112
|
+
6. Store an audit event.
|
|
113
|
+
7. Return a normalized result or `approval_required`.
|
|
114
|
+
|
|
115
|
+
## Generated Apps And Sandboxes
|
|
116
|
+
|
|
117
|
+
Generated apps declare needs through `IntegrationManifest`.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const manifest = {
|
|
121
|
+
id: 'calendar-workout-planner',
|
|
122
|
+
requirements: [
|
|
123
|
+
{
|
|
124
|
+
connectorId: 'google-calendar',
|
|
125
|
+
mode: 'read',
|
|
126
|
+
reason: 'Find open workout windows from calendar events.',
|
|
127
|
+
requiredActions: ['events.list'],
|
|
128
|
+
scopes: ['calendar.read'],
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
When a user previews or installs the app:
|
|
135
|
+
|
|
136
|
+
1. Resolve the manifest against the user's existing connections.
|
|
137
|
+
2. Ask the user to connect missing accounts.
|
|
138
|
+
3. Show consent using `renderConsentSummary()`.
|
|
139
|
+
4. Create grants from the user's connections to the app.
|
|
140
|
+
5. Build a sandbox bundle with short-lived capabilities.
|
|
141
|
+
6. Inject the bridge environment into the sandbox.
|
|
142
|
+
|
|
143
|
+
Generated app code should use `createTangleIntegrationsClient()` or the product
|
|
144
|
+
equivalent. It should not call Google, Slack, GitHub, or any provider directly
|
|
145
|
+
with user credentials.
|
|
146
|
+
|
|
147
|
+
## Workflows And Triggers
|
|
148
|
+
|
|
149
|
+
Use `createIntegrationWorkflowRuntime()` for non-agent automations:
|
|
150
|
+
|
|
151
|
+
- GitHub issue or pull-request sync.
|
|
152
|
+
- Slack message triggers.
|
|
153
|
+
- Calendar event updates.
|
|
154
|
+
- CRM record changes.
|
|
155
|
+
- Webhook-to-sandbox workflows.
|
|
156
|
+
|
|
157
|
+
Inbound provider webhooks should go through `receiveIntegrationWebhook()` for
|
|
158
|
+
signature verification, provider-event dedupe, and normalized event dispatch.
|
|
159
|
+
|
|
160
|
+
## Long-Tail Connectors
|
|
161
|
+
|
|
162
|
+
The registry distinguishes connector contracts from executable backend state.
|
|
163
|
+
Products can expose long-tail connectors only when they have configured a
|
|
164
|
+
backend:
|
|
165
|
+
|
|
166
|
+
- native adapter
|
|
167
|
+
- hosted integration gateway
|
|
168
|
+
- Tangle catalog runtime
|
|
169
|
+
- product-specific provider
|
|
170
|
+
|
|
171
|
+
Use `buildDefaultIntegrationRegistry({ tangleCatalogRuntimeExecutable: true })`
|
|
172
|
+
only after the catalog runtime is deployed and audited with
|
|
173
|
+
`auditTangleCatalogRuntimePackages()`.
|
|
174
|
+
|
|
175
|
+
## Security Requirements
|
|
176
|
+
|
|
177
|
+
- Never pass provider refresh tokens or API keys into a sandbox.
|
|
178
|
+
- Use short-lived capability tokens scoped to connector, action, subject, and
|
|
179
|
+
connection.
|
|
180
|
+
- Require approval for writes by default.
|
|
181
|
+
- Deny destructive actions unless the product explicitly enables them.
|
|
182
|
+
- Use idempotency keys for state-changing actions.
|
|
183
|
+
- Store audit events for connect, grant, invoke, approve, revoke, rotate, and
|
|
184
|
+
webhook flows.
|
|
185
|
+
- Redact provider credentials from logs, traces, errors, and generated app
|
|
186
|
+
payloads.
|
|
187
|
+
|
|
188
|
+
## Launch Checklist
|
|
189
|
+
|
|
190
|
+
- [ ] Connection, grant, approval, audit, healthcheck, workflow, and event stores
|
|
191
|
+
are backed by production persistence.
|
|
192
|
+
- [ ] Secret refs resolve through vault/KMS and never serialize raw credentials.
|
|
193
|
+
- [ ] OAuth/API-key setup UI renders from `IntegrationSpec`.
|
|
194
|
+
- [ ] Connect, revoke, rotate, approve, and audit-log screens exist.
|
|
195
|
+
- [ ] Generated app manifests feed into `resolveManifest()` and
|
|
196
|
+
`createGrants()`.
|
|
197
|
+
- [ ] Sandbox launches receive `buildIntegrationBridgeEnvironment()` output.
|
|
198
|
+
- [ ] Sandbox invocations route through your product integration endpoint.
|
|
199
|
+
- [ ] Writes require approval and idempotency.
|
|
200
|
+
- [ ] Webhooks verify signatures and dedupe provider event ids.
|
|
201
|
+
- [ ] Healthchecks run after setup and on a schedule.
|
|
202
|
+
- [ ] Browser E2E covers connect, consent, preview, invoke, approval, revoke,
|
|
203
|
+
and failure recovery.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Integrations Coverage Checklist
|
|
2
2
|
|
|
3
|
-
Generated from `listIntegrationCoverageSpecs()`. Catalog presence means the product can plan/request/connect the integration;
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
5
|
## Summary
|
|
6
6
|
|
|
@@ -135,8 +135,8 @@ Generated from `listIntegrationCoverageSpecs()`. Catalog presence means the prod
|
|
|
135
135
|
- [ ] tier_1 / database / Qdrant (qdrant) - vector, database, ai
|
|
136
136
|
- [ ] tier_1 / workflow / Zapier (zapier) - automation, workflow
|
|
137
137
|
- [ ] tier_1 / workflow / Make (make) - automation, workflow
|
|
138
|
-
- [ ] tier_1 / workflow /
|
|
139
|
-
- [ ] tier_1 / workflow /
|
|
138
|
+
- [ ] tier_1 / workflow / Nango (nango) - integration-platform, oauth
|
|
139
|
+
- [ ] tier_1 / workflow / Pipedream (pipedream) - integration-platform, workflow
|
|
140
140
|
- [ ] tier_1 / workflow / Open Automation Catalog (open-automation-catalog) - automation, workflow, open-source
|
|
141
141
|
- [ ] tier_0 / webhook / Generic Webhook (webhook) - webhook, http, events
|
|
142
142
|
- [ ] tier_0 / workflow / HTTP Request (http) - http, api, webhook
|
|
@@ -6,7 +6,7 @@ Goal: cover the integrations that make agents useful for 99% of practical produc
|
|
|
6
6
|
|
|
7
7
|
- Use `buildIntegrationCoverageConnectors()` for broad planning/catalog coverage.
|
|
8
8
|
- Use hosted gateways, imported connector catalogs, and custom HTTP providers for long-tail OAuth/API coverage.
|
|
9
|
-
-
|
|
9
|
+
- Implement high-volume, sensitive, or moat-critical connectors as native `ConnectorAdapter`s.
|
|
10
10
|
- Do not claim a connector is executable until it has auth, scope, action, error, rate-limit, idempotency, and approval-path tests.
|
|
11
11
|
- Keep every connector behind `IntegrationHub`, capability tokens, policy checks, and sandbox invocation envelopes.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Goal: cover the integrations that make agents useful for 99% of practical produc
|
|
|
16
16
|
- [x] Central sandbox invocation envelope validation.
|
|
17
17
|
- [x] Coverage catalog for 100+ high-value integrations.
|
|
18
18
|
- [x] Builder API consumes the coverage catalog for app planning.
|
|
19
|
-
- [x] Declarative REST adapter factory for fast
|
|
19
|
+
- [x] Declarative REST adapter factory for fast native implementation of REST-shaped APIs.
|
|
20
20
|
- [x] Provider gateway catalog adapter can normalize 500+ external catalog connectors.
|
|
21
21
|
- [x] Canonical registry dedupes overlapping catalogs, aliases, support tiers, and conflict diagnostics.
|
|
22
22
|
- [ ] Generated sandbox apps can request missing connections from the catalog.
|
|
@@ -25,7 +25,7 @@ Goal: cover the integrations that make agents useful for 99% of practical produc
|
|
|
25
25
|
- [ ] Tier 0 write actions have idempotency and approval tests.
|
|
26
26
|
- [x] Provider gateway adapters can import/sync catalog metadata from external registries.
|
|
27
27
|
- [x] Adapter execution triage is documented in [`adapter-triage.md`](./adapter-triage.md).
|
|
28
|
-
- [x] Tangle Integrations Catalog
|
|
28
|
+
- [x] Tangle Integrations Catalog contracts can execute through `createTangleCatalogExecutorProvider`.
|
|
29
29
|
- [x] Tangle Integrations Catalog executable actions can dispatch through a signed HTTP runtime executor protocol.
|
|
30
30
|
|
|
31
31
|
## Tier 0 First-Party Promotion Queue
|
|
@@ -17,8 +17,8 @@ This audit separates product contracts from implementation backends:
|
|
|
17
17
|
| Catalog connectors with runtime package names | 669 |
|
|
18
18
|
| Catalog actions | 3790 |
|
|
19
19
|
| Catalog triggers | 998 |
|
|
20
|
-
| Catalog triggers with
|
|
21
|
-
| Catalog actions with
|
|
20
|
+
| Catalog triggers with upstream names | 998 |
|
|
21
|
+
| Catalog actions with upstream action names | 3790 |
|
|
22
22
|
| Catalog connectors with auth field metadata | 648 |
|
|
23
23
|
| Custom-auth connectors with auth field metadata | 11 |
|
|
24
24
|
| Runtime package dependencies declared by this package | 0 |
|
|
@@ -33,6 +33,7 @@ This audit separates product contracts from implementation backends:
|
|
|
33
33
|
| Native adapter backends | 10 |
|
|
34
34
|
| Native adapter surfaces shipped | 16 |
|
|
35
35
|
| Package-runtime backends | 659 |
|
|
36
|
+
| Runtime manifest dependencies | 670 |
|
|
36
37
|
| Tangle catalog connectors exposable behind runtime | 669 |
|
|
37
38
|
| Tangle catalog actions exposable behind runtime | 3970 |
|
|
38
39
|
|
|
@@ -108,7 +109,9 @@ Executable setup specs:
|
|
|
108
109
|
| Connector discovery/catalog search | Done | 669 catalog connectors, 3790 actions, 998 triggers normalized into Tangle catalog shapes. |
|
|
109
110
|
| Native adapter execution | Done for listed native backends | 16 reviewed native adapter surfaces ship from this package; 10 overlap the 669 catalog contracts. |
|
|
110
111
|
| OAuth/API-key setup metadata | Partial | 142 setup specs exist; 14 are executable setup specs and 128 are catalog/setup-only. |
|
|
111
|
-
| Package-runtime action execution | Wiring done; runtime deployment/smoke pending | 659 contracts use package-runtime backends with package names and 3790
|
|
112
|
+
| Package-runtime action execution | Wiring done; runtime deployment/smoke pending | 659 contracts use package-runtime backends with package names and 3790 catalog upstream action names. |
|
|
113
|
+
| Runtime dependency manifest | Done | `buildTangleCatalogRuntimePackageManifest()` emits 670 dependencies for a complete package-runtime worker install. |
|
|
114
|
+
| Runtime package coverage audit | Done | `auditTangleCatalogRuntimePackages()` and `tangle-catalog-runtime --audit-packages` verify installed packages, piece exports, exact action mappings, and trigger surfaces in a deployed worker. |
|
|
112
115
|
| Long-tail credential mapping | Mostly mapped | 648 connectors have auth field metadata. 0 custom-auth connectors still need exact manual auth fields. |
|
|
113
116
|
| Trigger provider flow | Done structurally | 998 triggers are cataloged, 998 have upstream names, and catalog providers can route subscribe/unsubscribe/normalize hooks. Runtime services still need package-specific trigger hosting. |
|
|
114
117
|
| Sandbox/app invocation envelope | Done | The library has capability bundles, invocation envelopes, policy checks, guard hooks, signed catalog runtime HTTP calls, and generated-app client helpers. |
|
|
@@ -119,7 +122,7 @@ Executable setup specs:
|
|
|
119
122
|
| Bucket | Count | What it means |
|
|
120
123
|
| --- | ---: | --- |
|
|
121
124
|
| Package-runtime contracts needing deployed runtime smoke verification | 659 | Connector has a Tangle contract and package backend; deployed runtime still needs package-load/live-smoke proof. |
|
|
122
|
-
| Catalog connectors with zero
|
|
125
|
+
| Catalog connectors with zero upstream action names | 0 | These entries need catalog action-name mapping before exact package-runtime invocation can work. |
|
|
123
126
|
| Custom-auth catalog connectors needing manual credential-field mapping | 0 | These are still custom auth and no field names were extracted from source. |
|
|
124
127
|
| Catalog connectors with triggers needing runtime-service hosting | 288 | Trigger metadata and provider hooks exist; runtime services still need package-specific webhook/polling hosting. |
|
|
125
128
|
|
|
@@ -166,17 +169,15 @@ Examples needing deployed runtime smoke verification:
|
|
|
166
169
|
- `assembled` -> `@activepieces/piece-assembled`
|
|
167
170
|
- `assemblyai` -> `@activepieces/piece-assemblyai`
|
|
168
171
|
|
|
169
|
-
|
|
172
|
+
Manual custom auth mapping gap: none.
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
## What Is Not Done
|
|
174
|
+
## Completion Claims And Remaining Proof Gates
|
|
174
175
|
|
|
175
176
|
1. **Tangle first-class connector contracts are complete.**
|
|
176
177
|
All 669 catalog entries have Tangle-owned contracts. 10 use native adapter backends; 659 use package-runtime backends.
|
|
177
178
|
|
|
178
|
-
2. **Action-name mapping
|
|
179
|
-
Done for cataloged actions: the catalog currently has 3790 actions and 3790
|
|
179
|
+
2. **Action-name mapping exists for cataloged actions.**
|
|
180
|
+
Done for cataloged actions: the catalog currently has 3790 actions and 3790 upstream action-name mappings in the checked-in catalog. The runtime executor uses those names automatically and still accepts explicit `actionAliases` for overrides. Deployed smoke verification proves those names against the installed packages.
|
|
180
181
|
|
|
181
182
|
3. **Credential field mapping is complete for catalog auth setup.**
|
|
182
183
|
Auth shapes are api_key: 519, oauth2: 118, none: 21, custom: 11. The catalog now includes auth field metadata for all 648 connectors that require credentials. 0 custom-auth connectors need manual auth-field mapping.
|
|
@@ -193,14 +194,11 @@ Examples needing manual custom auth mapping:
|
|
|
193
194
|
- It is accurate to say: **all product code can use one IntegrationHub/tool contract across native and package-runtime backends.**
|
|
194
195
|
- It is accurate to say: **deployed runtime smoke verification is the remaining proof step for package-runtime connectors.**
|
|
195
196
|
|
|
196
|
-
##
|
|
197
|
-
|
|
198
|
-
Build a runtime coverage generator that installs/imports each package in isolation, extracts real action names, writes `actionAliases`, and emits a pass/fail matrix per connector:
|
|
197
|
+
## Runtime Proof Gate
|
|
199
198
|
|
|
200
|
-
-
|
|
201
|
-
|
|
202
|
-
- package
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- live smoke credential available
|
|
199
|
+
Run `tangle-catalog-runtime --audit-packages` inside the deployed runtime image
|
|
200
|
+
after installing the manifest from `--print-package-json` or
|
|
201
|
+
`--print-pnpm-add`. That produces the concrete package-load/action-map/trigger
|
|
202
|
+
surface matrix for the exact runtime image products will call. Live provider
|
|
203
|
+
smoke tests still require real OAuth/API-key credentials from the product
|
|
204
|
+
environment.
|