@tangle-network/agent-integrations 0.14.0 → 0.16.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.
package/README.md CHANGED
@@ -45,6 +45,11 @@ agent-facing tool contract.
45
45
  same user-owned connections safely.
46
46
  - Workflow trigger installation and normalized event dispatch for non-agent UI
47
47
  automation, sync jobs, webhooks, and product workflows.
48
+ - Approval persistence, audit events, healthchecks, credential resolution,
49
+ webhook ingestion, idempotency guards, and sandbox/CLI bridge payloads.
50
+ - Generated-app client helpers, manifest inference/validation, consent copy,
51
+ platform policy presets, canonical launch action schemas, and controlled
52
+ provider-native passthrough validation.
48
53
  - A generated `IntegrationSpec` registry used for setup docs, admin UI steps,
49
54
  normalized permissions, healthcheck plans, and tool descriptions.
50
55
 
@@ -86,6 +91,18 @@ pnpm add @tangle-network/agent-integrations
86
91
  | `IntegrationGrant` | Persistent grant from a user-owned connection to an app, agent, or sandbox consumer. |
87
92
  | `createIntegrationRuntime` | Facade for manifest resolution, grant creation, and sandbox capability bundles. |
88
93
  | `createIntegrationWorkflowRuntime` | Installs trigger workflows and dispatches normalized provider events. |
94
+ | `createApprovalBackedPolicyEngine` | Persists approval requests and allows approved invocations to resume. |
95
+ | `createDefaultIntegrationActionGuard` | Adds idempotency replay, dry-run mutation handling, rate-limit hooks, and audit events. |
96
+ | `createConnectionCredentialResolver` | Resolves secret refs into in-memory connector credentials and refreshes expired OAuth credentials. |
97
+ | `runIntegrationHealthchecks` | Checks connection status, registry executability, scope shape, and optional live provider tests. |
98
+ | `receiveIntegrationWebhook` | Verifies inbound webhooks, dedupes provider events, and dispatches normalized trigger events. |
99
+ | `buildIntegrationBridgeEnvironment` | Encodes scoped sandbox capabilities for sandbox processes or executor-style CLIs. |
100
+ | `createTangleIntegrationsClient` | Tiny generated-app/sandbox client for platform `/v1/integrations/invoke`. |
101
+ | `inferIntegrationManifestFromTools` / `validateIntegrationManifest` | Deterministic manifest helpers for Builder and platform APIs. |
102
+ | `renderConsentSummary` / `renderApprovalCopy` | User-facing consent and approval copy from manifests/actions. |
103
+ | `createPlatformIntegrationPolicyPreset` | Secure defaults: reads allowed after grant, writes need approval, destructive denied, passthrough disabled. |
104
+ | `buildCanonicalLaunchConnectors` | Product-ready launch action schemas for Calendar, Gmail, Drive, GitHub, and Slack. |
105
+ | `validateProviderPassthroughRequest` | Policy-gated provider-native HTTP escape hatch validation. |
89
106
  | `buildIntegrationToolCatalog` | Converts connector actions into agent/tool definitions. |
90
107
  | `searchIntegrationTools` | Intent search over normalized integration tools. |
91
108
  | `buildDefaultIntegrationRegistry` | Composes setup specs and vendored catalog metadata into one deduplicated connector registry. |
@@ -142,6 +159,22 @@ const bundle = await runtime.buildSandboxBundle({
142
159
 
143
160
  Generated apps and sandboxes receive scoped capability tokens and tool
144
161
  definitions. They never receive OAuth refresh tokens, API keys, or raw secrets.
162
+ For sandbox processes, pass the bundle through `buildIntegrationBridgeEnvironment()`;
163
+ the payload contains short-lived capability tokens and tool names only.
164
+
165
+ Generated app code should use the tiny client instead of raw provider tokens:
166
+
167
+ ```ts
168
+ const integrations = createTangleIntegrationsClient({
169
+ endpoint: 'https://id.tangle.tools',
170
+ env: process.env,
171
+ })
172
+
173
+ await integrations.invoke({
174
+ tool: 'google-calendar.events.list',
175
+ input: { calendarId: 'primary', timeMin, timeMax },
176
+ })
177
+ ```
145
178
 
146
179
  The same manifest/grant model works for non-agent workflows:
147
180
 
@@ -205,6 +238,8 @@ Runnable examples live in [`examples/`](./examples):
205
238
  first-party adapter provider wiring.
206
239
  - [`examples/declarative-rest.ts`](./examples/declarative-rest.ts) - compact
207
240
  REST connector spec.
241
+ - [`examples/calendar-exercise-app.ts`](./examples/calendar-exercise-app.ts) -
242
+ generated-app golden path: manifest, consent copy, bridge env, and invoke.
208
243
 
209
244
  The README stays short; examples are separate so they can be copied and expanded
210
245
  without obscuring the package contract.
@@ -214,9 +249,16 @@ without obscuring the package contract.
214
249
  - Capability tokens expire.
215
250
  - Capability tokens do not contain provider credentials.
216
251
  - Connection records carry secret references, not raw secrets.
252
+ - Secret stores are consumer-pluggable; the package only resolves secret refs at
253
+ call time and keeps raw credentials in memory.
217
254
  - Write and destructive actions can require approval.
255
+ - Approval records are bound to the subject, connection, connector, and action.
256
+ - Default guards provide idempotency replay and same-key drift detection.
218
257
  - Invocation envelopes validate action/tool consistency, idempotency keys,
219
258
  metadata shape, known tools, and input size.
259
+ - Webhook ingestion supports signature verification and provider-event dedupe.
260
+ - Provider-native passthrough is disabled by default and must be explicitly
261
+ policy-enabled with method/path/body limits.
220
262
  - Action invocation checks ownership, connection status, scopes, allowed actions,
221
263
  and expiration.
222
264
  - `IntegrationActionGuard` can enforce idempotency, approval, audit logging,