@tangle-network/agent-integrations 0.2.1 → 0.3.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.
@@ -0,0 +1,220 @@
1
+ # Agent Integrations Execution Layer Launch Plan
2
+
3
+ ## Goal
4
+
5
+ Make `agent-integrations` the shared execution layer for Tangle products, generated sandbox apps, and agents that need external systems.
6
+
7
+ The package should own the stable product contract for:
8
+
9
+ - connector catalog and tool discovery
10
+ - user/team-owned connections
11
+ - OAuth/API-key/HMAC connection flows
12
+ - short-lived sandbox-safe capabilities
13
+ - policy checks and approval gates
14
+ - action execution
15
+ - trigger/webhook normalization
16
+ - MCP/tool export surfaces
17
+ - first-party and vendor-backed provider adapters
18
+
19
+ The product value is direct: a user can ask Agent Builder to create an app that uses Gmail, Slack, Calendar, HubSpot, Stripe, Notion, or a webhook; the app can request the right connections; the sandbox receives only scoped capabilities; and every read, write, trigger, and approval is auditable.
20
+
21
+ ## Current Status
22
+
23
+ Shipped:
24
+
25
+ - vendor-neutral `IntegrationHub`
26
+ - connection store contract
27
+ - short-lived signed capabilities
28
+ - action invocation with scope/action checks
29
+ - `IntegrationActionGuard` hook for idempotency, audit, rate limits, and approvals
30
+ - generic HTTP provider adapter for hosted gateways
31
+ - OAuth helper
32
+ - webhook signature helpers
33
+ - first-party adapter contracts
34
+ - first-party adapters for Google Calendar, Google Sheets, Microsoft Calendar, HubSpot, Slack, Notion, Twilio SMS, Stripe, generic webhooks, Slack events, and Stripe webhooks
35
+ - adapter manifest contract tests
36
+
37
+ Missing for full launch:
38
+
39
+ - typed, searchable tool catalog that agents can query by intent
40
+ - canonical policy engine with approval decisions, not only a hook
41
+ - approval request/result types and helpers
42
+ - MCP/tool-call export helpers
43
+ - runtime invocation envelope for sandboxes
44
+ - connection requirement planning for generated apps
45
+ - provider import pipeline for OpenAPI/GraphQL/MCP catalogs
46
+ - first-party provider registry that wraps `ConnectorAdapter[]` into `IntegrationProvider`
47
+ - live provider smoke tests for top connectors
48
+ - security hardening gates for secret redaction, scope minimization, replay, and writes
49
+
50
+ ## Architecture Target
51
+
52
+ ```txt
53
+ Generated app / agent / sandbox
54
+ -> Integration tool catalog search
55
+ -> connection requirements
56
+ -> user connects provider account
57
+ -> capability issued for sandbox/session
58
+ -> policy engine decides allow / approve / deny
59
+ -> action executor calls first-party or vendor-backed provider
60
+ -> audit event emitted
61
+ -> trigger receiver wakes sandbox workflows
62
+ ```
63
+
64
+ `agent-integrations` owns contracts and reusable enforcement. Product repos own UI, tenant policy, persistence, and provider credentials.
65
+
66
+ ## Tactical PR Sequence
67
+
68
+ ### PR 1: Execution Plan
69
+
70
+ - Add this tracking doc.
71
+
72
+ Exit criteria:
73
+
74
+ - The repo has a durable, concrete launch map.
75
+
76
+ ### PR 2: Catalog Search and Tool Export
77
+
78
+ - [x] Add `IntegrationToolDefinition`.
79
+ - [x] Add `buildIntegrationToolCatalog(connectors)`.
80
+ - [x] Add `searchIntegrationTools(catalog, query, filters)`.
81
+ - [x] Add `integrationToolName(providerId, connectorId, actionId)`.
82
+ - [x] Add `parseIntegrationToolName(name)`.
83
+ - [x] Add MCP-compatible tool export shape.
84
+
85
+ Exit criteria:
86
+
87
+ - Agents can discover tools by intent instead of stuffing every schema into context.
88
+ - Tool names round-trip deterministically to provider/connector/action.
89
+
90
+ ### PR 3: Policy Engine and Approvals
91
+
92
+ - [x] Add `IntegrationPolicyRule`.
93
+ - [x] Add `IntegrationPolicyEngine`.
94
+ - [x] Add decision states: `allow`, `require_approval`, `deny`.
95
+ - [x] Add approval artifact types: `IntegrationApprovalRequest`, `IntegrationApprovalResolution`.
96
+ - [x] Add default policy: reads allowed, writes require approval by default, destructive denied unless explicitly allowed.
97
+
98
+ Exit criteria:
99
+
100
+ - Product apps can enforce a consistent approval boundary before any external write.
101
+ - Policy decisions include reasons and audit-safe metadata.
102
+
103
+ ### PR 4: Sandbox Invocation Envelope
104
+
105
+ - [x] Add `IntegrationInvocationEnvelope`.
106
+ - [x] Add helper to build a sandbox-safe invocation request from a capability and tool call.
107
+ - [x] Add redaction helpers for logs/events.
108
+ - [x] Add action result normalization for conflict/rate-limit/approval states.
109
+
110
+ Exit criteria:
111
+
112
+ - Sandboxes can invoke integrations without ever receiving reusable provider credentials.
113
+
114
+ ### PR 5: First-Party Provider Registry
115
+
116
+ - [x] Add `createConnectorAdapterProvider`.
117
+ - [x] Convert `ConnectorAdapter` manifests into `IntegrationConnector` catalog entries.
118
+ - [x] Route read/mutation calls to adapter methods.
119
+ - [x] Enforce capability class alignment and idempotency key defaults.
120
+
121
+ Exit criteria:
122
+
123
+ - The shipped first-party adapters become directly usable through `IntegrationHub`.
124
+
125
+ ### PR 6: Catalog Importers
126
+
127
+ - Add source importer contracts for OpenAPI, GraphQL, and MCP catalogs.
128
+ - Add manifest normalization helpers.
129
+ - Add license-safe notes for importing MIT/open catalogs and deriving patterns from restricted-license systems.
130
+
131
+ Exit criteria:
132
+
133
+ - We can mine open-source catalogs and API specs without making product code vendor-shaped.
134
+
135
+ ### PR 7: Launch Smoke Tests
136
+
137
+ - Add live-test harness contracts with environment-gated tests.
138
+ - Cover OAuth start/complete where practical.
139
+ - Cover reads, writes, approval-required writes, webhook verification, replay rejection, and scope denial.
140
+
141
+ Exit criteria:
142
+
143
+ - Top connectors have real non-mocked verification paths before public launch.
144
+
145
+ ## First Provider Priorities
146
+
147
+ Tier 1 first-party:
148
+
149
+ - Gmail
150
+ - Google Calendar
151
+ - Slack
152
+ - GitHub
153
+ - Notion
154
+ - Stripe
155
+ - HubSpot
156
+ - Airtable
157
+ - Microsoft Calendar / Outlook
158
+ - Linear
159
+
160
+ Tier 2 first-party or vendor-backed:
161
+
162
+ - Google Sheets
163
+ - Google Drive
164
+ - Salesforce
165
+ - Zendesk
166
+ - Intercom
167
+ - Jira
168
+ - Asana
169
+ - Trello
170
+ - Resend
171
+ - Twilio
172
+ - Supabase
173
+ - Postgres
174
+
175
+ Long tail:
176
+
177
+ - Import from OpenAPI/GraphQL/MCP catalogs.
178
+ - Use vendor-backed providers only as coverage accelerators.
179
+ - Promote high-volume or high-trust integrations to first-party.
180
+
181
+ ## OSS Mining Policy
182
+
183
+ Use permissively licensed projects aggressively, especially MIT and Apache-2.0.
184
+
185
+ Allowed:
186
+
187
+ - copy, fork, or port license-compatible code with attribution
188
+ - import connector definitions and catalog structure
189
+ - reuse MCP bridge and policy patterns where license permits
190
+ - derive architecture lessons from any public repo
191
+
192
+ Not allowed without explicit legal/product decision:
193
+
194
+ - copying restricted-license source into this package
195
+ - inheriting a vendor's auth, storage, tenancy, or billing model as our product contract
196
+ - exposing provider secrets to generated apps or sandboxes
197
+
198
+ Executor-style systems are priority inspiration for catalog, policy, MCP, and local/dev ergonomics. Nango-style systems are useful for OAuth, sync, and provider quirks, but restricted-license source should be treated as reference material rather than vendored code.
199
+
200
+ ## Launch Gate Checklist
201
+
202
+ - [x] Tool catalog search works over first-party tools.
203
+ - [x] MCP-compatible tool export is stable.
204
+ - [x] Default policy engine gates writes and destructive actions.
205
+ - [x] Approval artifacts are typed and audit-safe.
206
+ - [x] Sandbox invocation envelope never contains provider credentials.
207
+ - [x] First-party adapters are callable through `IntegrationHub`.
208
+ - [ ] Webhook receivers verify signatures and reject replay where provider supports timestamps.
209
+ - [x] Redaction helper covers connections, capabilities, approvals, and invocation logs.
210
+ - [ ] Agent Builder can declare required connectors from generated app specs.
211
+ - [ ] Agent Builder can ask users to connect missing accounts.
212
+ - [ ] Agent Builder can pass scoped capabilities to generated sandbox apps.
213
+ - [ ] Generated sandbox apps can call integrations through the runtime envelope.
214
+ - [ ] Human approval flow exists for writes.
215
+ - [ ] Top provider live smoke tests are documented and environment-gated.
216
+ - [ ] Package README explains the concrete product UX, not only abstractions.
217
+
218
+ ## Definition Of Done
219
+
220
+ The package is launch-ready when Agent Builder can generate an app that needs at least Gmail, Slack, Calendar, or Stripe; the user can connect the account; the app runs in a sandbox with a scoped capability; reads execute without extra user friction; writes pause for approval; triggers can wake workflows; and every step is observable without leaking secrets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-integrations",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Vendor-neutral integration contracts and runtime helpers for sandbox and agent apps.",
5
5
  "homepage": "https://github.com/tangle-network/agent-integrations#readme",
6
6
  "repository": {