@tangle-network/agent-integrations 0.31.0 → 0.33.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 (49) hide show
  1. package/dist/bin/tangle-catalog-runtime.js +7 -7
  2. package/dist/catalog.d.ts +74 -8
  3. package/dist/catalog.js +7 -7
  4. package/dist/{chunk-JCHD6L3B.js → chunk-43VQSANC.js} +2 -2
  5. package/dist/{chunk-F4YILONK.js → chunk-6N23S4JY.js} +21530 -257
  6. package/dist/chunk-6N23S4JY.js.map +1 -0
  7. package/dist/{chunk-VVC7U7W7.js → chunk-7T5YTVER.js} +51 -2
  8. package/dist/chunk-7T5YTVER.js.map +1 -0
  9. package/dist/{chunk-Q5X3QNHR.js → chunk-NQ7OPDUM.js} +261 -1
  10. package/dist/chunk-NQ7OPDUM.js.map +1 -0
  11. package/dist/{chunk-S2MVWQYL.js → chunk-RF3RH374.js} +2 -2
  12. package/dist/{chunk-M2RFFAMB.js → chunk-XO2RSS6Y.js} +300 -13
  13. package/dist/chunk-XO2RSS6Y.js.map +1 -0
  14. package/dist/{chunk-CDY2ETYT.js → chunk-YPZORI3G.js} +2 -2
  15. package/dist/connect/index.d.ts +2 -1
  16. package/dist/connect/index.js +2 -2
  17. package/dist/connectors/adapters/index.d.ts +113 -25
  18. package/dist/connectors/adapters/index.js +4 -2
  19. package/dist/connectors/index.d.ts +3 -2
  20. package/dist/connectors/index.js +4 -2
  21. package/dist/consumer-CzJgntej.d.ts +292 -0
  22. package/dist/consumer.d.ts +6 -8
  23. package/dist/consumer.js +2 -2
  24. package/dist/core-types-D5Dc65Ud.d.ts +355 -0
  25. package/dist/index.d.ts +1282 -4
  26. package/dist/index.js +13 -7
  27. package/dist/middleware/index.d.ts +2 -1
  28. package/dist/middleware/index.js +2 -2
  29. package/dist/registry.d.ts +3 -2407
  30. package/dist/registry.js +7 -7
  31. package/dist/runtime.d.ts +137 -8
  32. package/dist/runtime.js +7 -7
  33. package/dist/specs.d.ts +208 -8
  34. package/dist/specs.js +1 -1
  35. package/dist/tangle-catalog-runtime-2HddXxoM.d.ts +242 -0
  36. package/dist/tangle-catalog-runtime.d.ts +3 -8
  37. package/dist/tangle-catalog-runtime.js +7 -7
  38. package/dist/tangle-id-DA_qj-O_.d.ts +192 -0
  39. package/dist/{tangle-id-Dj0ipP4E.d.ts → types-XdpvaIzW.d.ts} +1 -167
  40. package/docs/integration-execution-audit.md +7 -5
  41. package/docs/integration-execution-matrix.json +32 -0
  42. package/package.json +12 -10
  43. package/dist/chunk-F4YILONK.js.map +0 -1
  44. package/dist/chunk-M2RFFAMB.js.map +0 -1
  45. package/dist/chunk-Q5X3QNHR.js.map +0 -1
  46. package/dist/chunk-VVC7U7W7.js.map +0 -1
  47. /package/dist/{chunk-JCHD6L3B.js.map → chunk-43VQSANC.js.map} +0 -0
  48. /package/dist/{chunk-S2MVWQYL.js.map → chunk-RF3RH374.js.map} +0 -0
  49. /package/dist/{chunk-CDY2ETYT.js.map → chunk-YPZORI3G.js.map} +0 -0
@@ -1,8 +1,3 @@
1
- export { T as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, N as TangleCatalogAuthResolverOptions, O as TangleCatalogHttpAuthResolverOptions, P as TangleCatalogHttpAuthResolverRequest, Q as TangleCatalogInstalledPackageExecutorOptions, S as TangleCatalogRuntimeHandlerOptions, U as TangleCatalogRuntimeHttpRequest, V as TangleCatalogRuntimeHttpResponse, W as TangleCatalogRuntimeInvocation, X as TangleCatalogRuntimeModuleAction, Y as TangleCatalogRuntimePackageCoverageOptions, Z as TangleCatalogRuntimePackageCoverageRow, _ as auditTangleCatalogRuntimePackages, $ as createTangleCatalogCredentialAuthResolver, a0 as createTangleCatalogHttpAuthResolver, a1 as createTangleCatalogInstalledPackageExecutor, a2 as createTangleCatalogRuntimeHandler, a3 as signTangleCatalogRuntimeRequest, a4 as tangleCatalogAuthValue, a5 as verifyTangleCatalogRuntimeSignature } from './registry.js';
2
- import './tangle-id-Dj0ipP4E.js';
3
- import './errors-Bg3_rxnQ.js';
4
- import './connect/index.js';
5
- import './middleware/index.js';
6
- import './connectors/index.js';
7
- import './connectors/adapters/index.js';
8
- import 'node:http';
1
+ export { h as TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER, i as TangleCatalogAuthResolverOptions, T as TangleCatalogHttpAuthResolverOptions, j as TangleCatalogHttpAuthResolverRequest, a as TangleCatalogInstalledPackageExecutorOptions, n as TangleCatalogRuntimeHandlerOptions, o as TangleCatalogRuntimeHttpRequest, p as TangleCatalogRuntimeHttpResponse, q as TangleCatalogRuntimeInvocation, r as TangleCatalogRuntimeModuleAction, s as TangleCatalogRuntimePackageCoverageOptions, t as TangleCatalogRuntimePackageCoverageRow, w as auditTangleCatalogRuntimePackages, D as createTangleCatalogCredentialAuthResolver, E as createTangleCatalogHttpAuthResolver, G as createTangleCatalogInstalledPackageExecutor, H as createTangleCatalogRuntimeHandler, K as signTangleCatalogRuntimeRequest, L as tangleCatalogAuthValue, N as verifyTangleCatalogRuntimeSignature } from './tangle-catalog-runtime-2HddXxoM.js';
2
+ import './core-types-D5Dc65Ud.js';
3
+ import './types-XdpvaIzW.js';
@@ -8,16 +8,16 @@ import {
8
8
  signTangleCatalogRuntimeRequest,
9
9
  tangleCatalogAuthValue,
10
10
  verifyTangleCatalogRuntimeSignature
11
- } from "./chunk-M2RFFAMB.js";
12
- import "./chunk-JCHD6L3B.js";
13
- import "./chunk-CDY2ETYT.js";
11
+ } from "./chunk-XO2RSS6Y.js";
12
+ import "./chunk-43VQSANC.js";
13
+ import "./chunk-YPZORI3G.js";
14
14
  import "./chunk-H4XYLS7T.js";
15
- import "./chunk-S2MVWQYL.js";
16
- import "./chunk-VVC7U7W7.js";
15
+ import "./chunk-RF3RH374.js";
16
+ import "./chunk-7T5YTVER.js";
17
17
  import "./chunk-376UBTNB.js";
18
- import "./chunk-F4YILONK.js";
18
+ import "./chunk-6N23S4JY.js";
19
19
  import "./chunk-2TW2QKGZ.js";
20
- import "./chunk-Q5X3QNHR.js";
20
+ import "./chunk-NQ7OPDUM.js";
21
21
  export {
22
22
  TANGLE_CATALOG_RUNTIME_SIGNATURE_HEADER,
23
23
  auditTangleCatalogRuntimePackages,
@@ -0,0 +1,192 @@
1
+ import { C as ConnectorAdapter } from './types-XdpvaIzW.js';
2
+
3
+ /**
4
+ * @stable Tangle Identity — `id.tangle.tools` connector + verifier.
5
+ *
6
+ * This is the *identity* substrate every Tangle product (legal, tax, gtm,
7
+ * creative, agent-builder, sandbox, evals, …) sits on. The shape mirrors
8
+ * what `tcloud` and the sandbox `PlatformClient` already implement against
9
+ * the platform repo at `agent-dev-container-collab-m1/products/platform`,
10
+ * so consumers can switch from a hand-rolled fetch loop to this adapter
11
+ * without changing the wire protocol.
12
+ *
13
+ * What it covers, end-to-end:
14
+ *
15
+ * verify_token({ token })
16
+ * → { kind: 'api_key' | 'session', valid, userId?, workspaceId?, scopes, expiresAt? }
17
+ * Verifies a single credential. Two token shapes are recognized:
18
+ * - `sk-tan-*` API keys — POST /v1/keys/verify with the service token.
19
+ * Returns `userId`, `keyId`, `product`, granted scopes (`allowedModels`
20
+ * + product flag), and budget metadata.
21
+ * - Better Auth session cookies / Bearer session tokens — GET
22
+ * /api/auth/get-session with the credential forwarded as-is.
23
+ * Returns the user row.
24
+ * Wrong-issuer / tampered / expired all surface as `{ valid: false }`
25
+ * with a stable `reason`. Never throws on bad-token; only throws when
26
+ * id.tangle.tools itself is unreachable or returns a 5xx (lets callers
27
+ * fail closed without confusing token failures with platform failures).
28
+ *
29
+ * get_user({ userId })
30
+ * → { id, email, name?, image? }
31
+ * Read-only profile lookup. Service-token authenticated. Used by
32
+ * `requireTangleAuth` middleware to hydrate the request context when
33
+ * a downstream wants the user's email without re-verifying.
34
+ *
35
+ * list_workspaces({ userId })
36
+ * → { workspaces: [{ id, name, role, isPersonal }] }
37
+ * A workspace = a Tangle team. Personal workspace is rendered with
38
+ * `isPersonal: true` (own id === userId on the platform schema).
39
+ * Mirrors `GET /v1/teams` on the platform side.
40
+ *
41
+ * switch_workspace({ workspaceId })
42
+ * → { ok: true, workspaceId, scopes }
43
+ * Stateless on this adapter — the caller persists the workspaceId in
44
+ * its own session. The connector returns the workspace's effective
45
+ * scope set so the caller can immediately filter capability discovery
46
+ * against the new workspace's grant matrix.
47
+ *
48
+ * revoke_session({ token })
49
+ * → { ok: true }
50
+ * For session tokens: POST /api/auth/sign-out. For API keys: DELETE
51
+ * /v1/keys/{id}. The adapter detects the kind from the prefix.
52
+ *
53
+ * Auth:
54
+ * - **Service token** (`Bearer svc_*`) is required for `verify_token` of
55
+ * `sk-tan-*` keys, `get_user`, `list_workspaces`, and `revoke_session`
56
+ * of API keys.
57
+ * - **Session cookie / Bearer session** is forwarded as-is for session
58
+ * verification and session revocation.
59
+ *
60
+ * The adapter is stateless. Caller resolves `serviceToken` + `baseUrl` from
61
+ * env (`TANGLE_PLATFORM_URL`, `TANGLE_SERVICE_TOKEN`) and passes them at
62
+ * construction. The adapter never reads from `process.env` itself — this
63
+ * keeps it CF Worker compatible (no Node-only env semantics) and lets
64
+ * tests inject a fake fetch + service token in one place.
65
+ */
66
+
67
+ /** Default platform URL (matches `DEFAULT_PLATFORM_URL` in tcloud). */
68
+ declare const DEFAULT_TANGLE_PLATFORM_URL = "https://id.tangle.tools";
69
+ /** API-key prefix the platform issues. Used to disambiguate token kind
70
+ * without a round-trip. */
71
+ declare const TANGLE_API_KEY_PREFIX = "sk-tan-";
72
+ /** Service-token prefix. Mirrored from the platform's middleware so we
73
+ * can refuse to forward service tokens through the user-session path. */
74
+ declare const TANGLE_SERVICE_TOKEN_PREFIX = "svc_";
75
+ interface TangleIdentityOptions {
76
+ /** Base URL of the id.tangle.tools deployment (no trailing slash). */
77
+ baseUrl?: string;
78
+ /**
79
+ * Service token (`svc_*`) used for S2S calls (verify, provision, etc.).
80
+ * Required for API-key verification and the user/workspace read paths.
81
+ * Omit only for session-only flows on a deployment that exposes those
82
+ * routes unauthenticated (rare; never in production).
83
+ */
84
+ serviceToken?: string;
85
+ /** Service identity claimed in the `X-Service-Name` header. */
86
+ serviceName?: string;
87
+ /** Injected fetch — defaults to global. Tests pass a vi mock. */
88
+ fetchImpl?: typeof fetch;
89
+ /** Per-call timeout override (default {@link PLATFORM_FETCH_TIMEOUT_MS}). */
90
+ timeoutMs?: number;
91
+ }
92
+ /** Stable result of a token verification. `valid: false` is returned for
93
+ * every recognizable bad-token shape (expired, tampered, wrong issuer,
94
+ * unknown kind); only true platform unreachability throws. */
95
+ type TangleTokenVerifyResult = {
96
+ valid: true;
97
+ kind: 'api_key' | 'session';
98
+ userId: string;
99
+ /** Active workspace at the moment of issue, if the credential is
100
+ * workspace-scoped (team-owned API key). Personal credentials
101
+ * return the user's personal workspace (== `userId`). */
102
+ workspaceId: string;
103
+ scopes: string[];
104
+ /** Wall-clock ms epoch when the credential expires. Undefined for
105
+ * non-expiring credentials (most session cookies are sliding). */
106
+ expiresAt?: number;
107
+ /** Stable id of the credential row, when known (key.id for API
108
+ * keys, session.id for sessions). Useful for revoke + audit. */
109
+ credentialId?: string;
110
+ /** Product the credential is scoped to, when known. */
111
+ product?: string;
112
+ /** Owner shape — `user` for personal credentials, `team` for
113
+ * team-owned API keys. Always matches the workspace's owner type. */
114
+ ownerType: 'user' | 'team';
115
+ } | {
116
+ valid: false;
117
+ /** Stable reason code: `tampered`, `expired`, `revoked`,
118
+ * `wrong_issuer`, `unknown_kind`, `service_token_refused`. */
119
+ reason: TangleTokenVerifyFailure;
120
+ };
121
+ type TangleTokenVerifyFailure = 'tampered' | 'expired' | 'revoked' | 'wrong_issuer' | 'unknown_kind' | 'service_token_refused' | 'malformed';
122
+ interface TangleUserSummary {
123
+ id: string;
124
+ email?: string;
125
+ name?: string | null;
126
+ image?: string | null;
127
+ }
128
+ interface TangleWorkspaceSummary {
129
+ id: string;
130
+ name: string;
131
+ role: 'owner' | 'admin' | 'member';
132
+ isPersonal: boolean;
133
+ /** Effective scope set for the calling user inside this workspace.
134
+ * Sourced from the team's plan + per-product policy on the platform. */
135
+ scopes: string[];
136
+ }
137
+ /** Thrown when id.tangle.tools is unreachable or returns 5xx. NOT thrown
138
+ * for bad-token responses — those round-trip as `{ valid: false }`. */
139
+ declare class TangleIdentityUnreachableError extends Error {
140
+ readonly name = "TangleIdentityUnreachableError";
141
+ readonly status?: number;
142
+ constructor(message: string, opts?: {
143
+ status?: number;
144
+ cause?: unknown;
145
+ });
146
+ }
147
+ /** Build a `ConnectorAdapter` exposing id.tangle.tools as a first-party
148
+ * integration. The adapter participates in the standard discovery /
149
+ * capability gating loop, so a product can list identity ops alongside
150
+ * Gmail / Stripe / etc. in the same tool registry. */
151
+ declare function tangleIdentity(opts?: TangleIdentityOptions): ConnectorAdapter;
152
+ /** Low-level HTTP client used by the adapter. Exported so consumers
153
+ * (middleware, connect routes, custom apps) can hit id.tangle.tools
154
+ * without going through the connector pipeline. */
155
+ interface TangleIdentityClient {
156
+ verifyToken(token: string): Promise<TangleTokenVerifyResult>;
157
+ getUser(userId: string): Promise<TangleUserSummary>;
158
+ listWorkspaces(userId: string): Promise<TangleWorkspaceSummary[]>;
159
+ switchWorkspace(userId: string, workspaceId: string): Promise<{
160
+ ok: true;
161
+ workspaceId: string;
162
+ scopes: string[];
163
+ }>;
164
+ revokeSession(token: string): Promise<void>;
165
+ /** Create a new workspace owned by `userId`. The platform's
166
+ * `POST /v1/teams` returns the persisted row. Idempotent on
167
+ * `(ownerId, name)` upstream; conflicts are unwrapped to the
168
+ * existing row, not surfaced as errors. */
169
+ createWorkspace(userId: string, spec: {
170
+ name: string;
171
+ slug?: string;
172
+ }): Promise<TangleWorkspaceSummary>;
173
+ /** Delete a workspace. Refuses to delete the user's personal
174
+ * workspace (the platform-side `/v1/teams/{id}` returns 409). */
175
+ deleteWorkspace(workspaceId: string): Promise<void>;
176
+ /** Invite a member to a workspace by email. Idempotent: re-issuing
177
+ * the same invite returns the existing pending invitation row. */
178
+ inviteMember(workspaceId: string, email: string, role?: TangleWorkspaceSummary['role']): Promise<TangleInvitationSummary>;
179
+ /** Remove a member from a workspace by `userId`. 404 is a no-op. */
180
+ removeMember(workspaceId: string, userId: string): Promise<void>;
181
+ ping(): Promise<boolean>;
182
+ }
183
+ interface TangleInvitationSummary {
184
+ id: string;
185
+ workspaceId: string;
186
+ email: string;
187
+ role: TangleWorkspaceSummary['role'];
188
+ status: 'pending' | 'accepted' | 'revoked';
189
+ }
190
+ declare function createTangleIdentityClient(opts?: TangleIdentityOptions): TangleIdentityClient;
191
+
192
+ export { DEFAULT_TANGLE_PLATFORM_URL as D, type TangleIdentityOptions as T, type TangleUserSummary as a, type TangleIdentityClient as b, type TangleTokenVerifyFailure as c, TANGLE_API_KEY_PREFIX as d, TANGLE_SERVICE_TOKEN_PREFIX as e, TangleIdentityUnreachableError as f, type TangleTokenVerifyResult as g, type TangleWorkspaceSummary as h, createTangleIdentityClient as i, tangleIdentity as t };
@@ -391,170 +391,4 @@ interface ConnectorManifestValidationResult {
391
391
  declare function validateConnectorManifest(manifest: ConnectorManifest): ConnectorManifestValidationResult;
392
392
  declare function assertValidConnectorManifest(manifest: ConnectorManifest): void;
393
393
 
394
- /**
395
- * @stable Tangle Identity — `id.tangle.tools` connector + verifier.
396
- *
397
- * This is the *identity* substrate every Tangle product (legal, tax, gtm,
398
- * creative, agent-builder, sandbox, evals, …) sits on. The shape mirrors
399
- * what `tcloud` and the sandbox `PlatformClient` already implement against
400
- * the platform repo at `agent-dev-container-collab-m1/products/platform`,
401
- * so consumers can switch from a hand-rolled fetch loop to this adapter
402
- * without changing the wire protocol.
403
- *
404
- * What it covers, end-to-end:
405
- *
406
- * verify_token({ token })
407
- * → { kind: 'api_key' | 'session', valid, userId?, workspaceId?, scopes, expiresAt? }
408
- * Verifies a single credential. Two token shapes are recognized:
409
- * - `sk-tan-*` API keys — POST /v1/keys/verify with the service token.
410
- * Returns `userId`, `keyId`, `product`, granted scopes (`allowedModels`
411
- * + product flag), and budget metadata.
412
- * - Better Auth session cookies / Bearer session tokens — GET
413
- * /api/auth/get-session with the credential forwarded as-is.
414
- * Returns the user row.
415
- * Wrong-issuer / tampered / expired all surface as `{ valid: false }`
416
- * with a stable `reason`. Never throws on bad-token; only throws when
417
- * id.tangle.tools itself is unreachable or returns a 5xx (lets callers
418
- * fail closed without confusing token failures with platform failures).
419
- *
420
- * get_user({ userId })
421
- * → { id, email, name?, image? }
422
- * Read-only profile lookup. Service-token authenticated. Used by
423
- * `requireTangleAuth` middleware to hydrate the request context when
424
- * a downstream wants the user's email without re-verifying.
425
- *
426
- * list_workspaces({ userId })
427
- * → { workspaces: [{ id, name, role, isPersonal }] }
428
- * A workspace = a Tangle team. Personal workspace is rendered with
429
- * `isPersonal: true` (own id === userId on the platform schema).
430
- * Mirrors `GET /v1/teams` on the platform side.
431
- *
432
- * switch_workspace({ workspaceId })
433
- * → { ok: true, workspaceId, scopes }
434
- * Stateless on this adapter — the caller persists the workspaceId in
435
- * its own session. The connector returns the workspace's effective
436
- * scope set so the caller can immediately filter capability discovery
437
- * against the new workspace's grant matrix.
438
- *
439
- * revoke_session({ token })
440
- * → { ok: true }
441
- * For session tokens: POST /api/auth/sign-out. For API keys: DELETE
442
- * /v1/keys/{id}. The adapter detects the kind from the prefix.
443
- *
444
- * Auth:
445
- * - **Service token** (`Bearer svc_*`) is required for `verify_token` of
446
- * `sk-tan-*` keys, `get_user`, `list_workspaces`, and `revoke_session`
447
- * of API keys.
448
- * - **Session cookie / Bearer session** is forwarded as-is for session
449
- * verification and session revocation.
450
- *
451
- * The adapter is stateless. Caller resolves `serviceToken` + `baseUrl` from
452
- * env (`TANGLE_PLATFORM_URL`, `TANGLE_SERVICE_TOKEN`) and passes them at
453
- * construction. The adapter never reads from `process.env` itself — this
454
- * keeps it CF Worker compatible (no Node-only env semantics) and lets
455
- * tests inject a fake fetch + service token in one place.
456
- */
457
-
458
- /** Default platform URL (matches `DEFAULT_PLATFORM_URL` in tcloud). */
459
- declare const DEFAULT_TANGLE_PLATFORM_URL = "https://id.tangle.tools";
460
- /** API-key prefix the platform issues. Used to disambiguate token kind
461
- * without a round-trip. */
462
- declare const TANGLE_API_KEY_PREFIX = "sk-tan-";
463
- /** Service-token prefix. Mirrored from the platform's middleware so we
464
- * can refuse to forward service tokens through the user-session path. */
465
- declare const TANGLE_SERVICE_TOKEN_PREFIX = "svc_";
466
- interface TangleIdentityOptions {
467
- /** Base URL of the id.tangle.tools deployment (no trailing slash). */
468
- baseUrl?: string;
469
- /**
470
- * Service token (`svc_*`) used for S2S calls (verify, provision, etc.).
471
- * Required for API-key verification and the user/workspace read paths.
472
- * Omit only for session-only flows on a deployment that exposes those
473
- * routes unauthenticated (rare; never in production).
474
- */
475
- serviceToken?: string;
476
- /** Service identity claimed in the `X-Service-Name` header. */
477
- serviceName?: string;
478
- /** Injected fetch — defaults to global. Tests pass a vi mock. */
479
- fetchImpl?: typeof fetch;
480
- /** Per-call timeout override (default {@link PLATFORM_FETCH_TIMEOUT_MS}). */
481
- timeoutMs?: number;
482
- }
483
- /** Stable result of a token verification. `valid: false` is returned for
484
- * every recognizable bad-token shape (expired, tampered, wrong issuer,
485
- * unknown kind); only true platform unreachability throws. */
486
- type TangleTokenVerifyResult = {
487
- valid: true;
488
- kind: 'api_key' | 'session';
489
- userId: string;
490
- /** Active workspace at the moment of issue, if the credential is
491
- * workspace-scoped (team-owned API key). Personal credentials
492
- * return the user's personal workspace (== `userId`). */
493
- workspaceId: string;
494
- scopes: string[];
495
- /** Wall-clock ms epoch when the credential expires. Undefined for
496
- * non-expiring credentials (most session cookies are sliding). */
497
- expiresAt?: number;
498
- /** Stable id of the credential row, when known (key.id for API
499
- * keys, session.id for sessions). Useful for revoke + audit. */
500
- credentialId?: string;
501
- /** Product the credential is scoped to, when known. */
502
- product?: string;
503
- /** Owner shape — `user` for personal credentials, `team` for
504
- * team-owned API keys. Always matches the workspace's owner type. */
505
- ownerType: 'user' | 'team';
506
- } | {
507
- valid: false;
508
- /** Stable reason code: `tampered`, `expired`, `revoked`,
509
- * `wrong_issuer`, `unknown_kind`, `service_token_refused`. */
510
- reason: TangleTokenVerifyFailure;
511
- };
512
- type TangleTokenVerifyFailure = 'tampered' | 'expired' | 'revoked' | 'wrong_issuer' | 'unknown_kind' | 'service_token_refused' | 'malformed';
513
- interface TangleUserSummary {
514
- id: string;
515
- email?: string;
516
- name?: string | null;
517
- image?: string | null;
518
- }
519
- interface TangleWorkspaceSummary {
520
- id: string;
521
- name: string;
522
- role: 'owner' | 'admin' | 'member';
523
- isPersonal: boolean;
524
- /** Effective scope set for the calling user inside this workspace.
525
- * Sourced from the team's plan + per-product policy on the platform. */
526
- scopes: string[];
527
- }
528
- /** Thrown when id.tangle.tools is unreachable or returns 5xx. NOT thrown
529
- * for bad-token responses — those round-trip as `{ valid: false }`. */
530
- declare class TangleIdentityUnreachableError extends Error {
531
- readonly name = "TangleIdentityUnreachableError";
532
- readonly status?: number;
533
- constructor(message: string, opts?: {
534
- status?: number;
535
- cause?: unknown;
536
- });
537
- }
538
- /** Build a `ConnectorAdapter` exposing id.tangle.tools as a first-party
539
- * integration. The adapter participates in the standard discovery /
540
- * capability gating loop, so a product can list identity ops alongside
541
- * Gmail / Stripe / etc. in the same tool registry. */
542
- declare function tangleIdentity(opts?: TangleIdentityOptions): ConnectorAdapter;
543
- /** Low-level HTTP client used by the adapter. Exported so consumers
544
- * (middleware, connect routes, custom apps) can hit id.tangle.tools
545
- * without going through the connector pipeline. */
546
- interface TangleIdentityClient {
547
- verifyToken(token: string): Promise<TangleTokenVerifyResult>;
548
- getUser(userId: string): Promise<TangleUserSummary>;
549
- listWorkspaces(userId: string): Promise<TangleWorkspaceSummary[]>;
550
- switchWorkspace(userId: string, workspaceId: string): Promise<{
551
- ok: true;
552
- workspaceId: string;
553
- scopes: string[];
554
- }>;
555
- revokeSession(token: string): Promise<void>;
556
- ping(): Promise<boolean>;
557
- }
558
- declare function createTangleIdentityClient(opts?: TangleIdentityOptions): TangleIdentityClient;
559
-
560
- export { type AuthSpec as A, assertValidConnectorManifest as B, type ConnectorAdapter as C, DEFAULT_TANGLE_PLATFORM_URL as D, type EventHandlerResult as E, createTangleIdentityClient as F, tangleIdentity as G, validateConnectorManifest as H, type InboundEvent as I, type ResolvedDataSource as R, type TangleIdentityOptions as T, type TangleUserSummary as a, type TangleIdentityClient as b, type TangleTokenVerifyFailure as c, type ConnectorCredentials as d, type CASStrategy as e, type Capability as f, type CapabilityClass as g, type CapabilityMutation as h, type CapabilityMutationResult as i, type CapabilityParameterSchema as j, type CapabilityRead as k, type CapabilityReadResult as l, type ConnectorInvocation as m, type ConnectorManifest as n, type ConnectorManifestValidationIssue as o, type ConnectorManifestValidationResult as p, type ConsistencyModel as q, CredentialsExpired as r, type DataSourceMetadata as s, type RateLimitSpec as t, ResourceContention as u, TANGLE_API_KEY_PREFIX as v, TANGLE_SERVICE_TOKEN_PREFIX as w, TangleIdentityUnreachableError as x, type TangleTokenVerifyResult as y, type TangleWorkspaceSummary as z };
394
+ export { type AuthSpec as A, type ConnectorAdapter as C, type DataSourceMetadata as D, type EventHandlerResult as E, type InboundEvent as I, type ResolvedDataSource as R, type ConnectorCredentials as a, type CASStrategy as b, type Capability as c, type CapabilityClass as d, type CapabilityMutation as e, type CapabilityMutationResult as f, type CapabilityParameterSchema as g, type CapabilityRead as h, type CapabilityReadResult as i, type ConnectorInvocation as j, type ConnectorManifest as k, type ConnectorManifestValidationIssue as l, type ConnectorManifestValidationResult as m, type ConsistencyModel as n, CredentialsExpired as o, type RateLimitSpec as p, ResourceContention as q, assertValidConnectorManifest as r, validateConnectorManifest as v };
@@ -22,8 +22,8 @@ This audit separates product contracts from implementation backends:
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 |
25
- | Setup specs | 142 |
26
- | Executable setup specs | 14 |
25
+ | Setup specs | 143 |
26
+ | Executable setup specs | 15 |
27
27
  | Catalog/setup-only specs | 128 |
28
28
  | Tangle first-class contracts | 669 |
29
29
  | Contracts with runtime packages | 669 |
@@ -31,7 +31,7 @@ This audit separates product contracts from implementation backends:
31
31
  | Contracts with mapped triggers | 669 |
32
32
  | Contracts with mapped auth | 669 |
33
33
  | Native adapter backends | 10 |
34
- | Native adapter surfaces shipped | 16 |
34
+ | Native adapter surfaces shipped | 17 |
35
35
  | Package-runtime backends | 659 |
36
36
  | Runtime manifest dependencies | 670 |
37
37
  | Tangle catalog connectors exposable behind runtime | 669 |
@@ -74,6 +74,7 @@ These are direct in-repo implementations. They are not the only first-class cont
74
74
  - `slack`
75
75
  - `notion-database`
76
76
  - `twilio-sms`
77
+ - `phony`
77
78
  - `stripe-pack`
78
79
  - `webhook`
79
80
  - `stripe`
@@ -95,6 +96,7 @@ Executable setup specs:
95
96
  - `hubspot`
96
97
  - `microsoft-calendar`
97
98
  - `notion-database`
99
+ - `phony`
98
100
  - `salesforce`
99
101
  - `slack`
100
102
  - `stripe-pack`
@@ -107,7 +109,7 @@ Executable setup specs:
107
109
  | --- | --- | --- |
108
110
  | Tangle first-class contracts | Done | 669 connectors have Tangle-owned action/trigger/auth/runtime contracts. |
109
111
  | Connector discovery/catalog search | Done | 669 catalog connectors, 3790 actions, 998 triggers normalized into Tangle catalog shapes. |
110
- | Native adapter execution | Done for listed native backends | 16 reviewed native adapter surfaces ship from this package; 10 overlap the 669 catalog contracts. |
112
+ | Native adapter execution | Done for listed native backends | 17 reviewed native adapter surfaces ship from this package; 10 overlap the 669 catalog contracts. |
111
113
  | OAuth/API-key setup metadata | Partial | 142 setup specs exist; 14 are executable setup specs and 128 are catalog/setup-only. |
112
114
  | 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
115
  | Runtime dependency manifest | Done | `buildTangleCatalogRuntimePackageManifest()` emits 670 dependencies for a complete package-runtime worker install. |
@@ -186,7 +188,7 @@ Manual custom auth mapping gap: none.
186
188
  There are 998 catalog triggers and 998 upstream trigger names. The provider flow supports trigger subscribe/unsubscribe/normalize hooks. Runtime services still need live webhook/polling smoke verification.
187
189
 
188
190
  5. **Native adapter coverage is intentionally smaller than contract breadth.**
189
- This repo ships 16 native adapter surfaces. 10 overlap the 669 catalog contracts; the other first-class contracts use package-runtime backends.
191
+ This repo ships 17 native adapter surfaces. 10 overlap the 669 catalog contracts; the other first-class contracts use package-runtime backends.
190
192
 
191
193
  ## Concrete Launch Interpretation
192
194
 
@@ -69773,6 +69773,38 @@
69773
69773
  "executable_setup_spec"
69774
69774
  ]
69775
69775
  },
69776
+ {
69777
+ "id": "phony",
69778
+ "title": "phony",
69779
+ "category": "internal",
69780
+ "catalogAuth": null,
69781
+ "setupAuth": {
69782
+ "mode": "api_key",
69783
+ "credential": {
69784
+ "label": "phony API key",
69785
+ "description": "API key or token for phony.",
69786
+ "secret": true
69787
+ },
69788
+ "placement": "bearer"
69789
+ },
69790
+ "runtimePackage": null,
69791
+ "actionCount": null,
69792
+ "triggerCount": null,
69793
+ "setupStatus": "executable",
69794
+ "tangleContractStatus": "native_backed",
69795
+ "implementationKind": "native_adapter",
69796
+ "nativeAdapter": true,
69797
+ "catalogActionMappings": null,
69798
+ "quality": {
69799
+ "tangleContract": true,
69800
+ "authFieldsMapped": true,
69801
+ "actionNamesMapped": true,
69802
+ "triggerNamesMapped": true,
69803
+ "runtimePackageMapped": false,
69804
+ "nativeAdapter": true
69805
+ },
69806
+ "missing": []
69807
+ },
69776
69808
  {
69777
69809
  "id": "photoroom",
69778
69810
  "title": "API key",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-integrations",
3
- "version": "0.31.0",
3
+ "version": "0.33.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": {
@@ -93,6 +93,15 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
+ "scripts": {
97
+ "build": "tsup",
98
+ "dev": "tsup --watch",
99
+ "audit:execution": "pnpm build >/dev/null && node scripts/audit-integration-execution.mjs",
100
+ "prepare": "tsup",
101
+ "test": "vitest run",
102
+ "test:watch": "vitest",
103
+ "typecheck": "tsc --noEmit"
104
+ },
96
105
  "devDependencies": {
97
106
  "@activepieces/piece-gmail": "0.12.3",
98
107
  "@activepieces/piece-hackernews": "0.4.3",
@@ -109,12 +118,5 @@
109
118
  "node": ">=20"
110
119
  },
111
120
  "license": "MIT",
112
- "scripts": {
113
- "build": "tsup",
114
- "dev": "tsup --watch",
115
- "audit:execution": "pnpm build >/dev/null && node scripts/audit-integration-execution.mjs",
116
- "test": "vitest run",
117
- "test:watch": "vitest",
118
- "typecheck": "tsc --noEmit"
119
- }
120
- }
121
+ "packageManager": "pnpm@10.28.0"
122
+ }