managed-deepagents 0.5.0-dev.89 → 0.5.0-dev.96
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 +36 -37
- package/dist/channels/index.d.ts +6 -5
- package/dist/channels/index.d.ts.map +1 -1
- package/dist/channels/index.js +6 -5
- package/dist/channels/index.js.map +1 -1
- package/dist/channels/manifest.d.ts +1 -1
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/channels/messaging-registry.d.ts +8 -4
- package/dist/channels/messaging-registry.d.ts.map +1 -1
- package/dist/channels/messaging-registry.js +22 -16
- package/dist/channels/messaging-registry.js.map +1 -1
- package/dist/channels/registry-types.d.ts +1 -1
- package/dist/channels/registry-types.d.ts.map +1 -1
- package/dist/channels/registry.d.ts.map +1 -1
- package/dist/channels/registry.js +1 -3
- package/dist/channels/registry.js.map +1 -1
- package/dist/channels/schedule-delivery.js +1 -1
- package/dist/channels/schedule-delivery.js.map +1 -1
- package/dist/{connectors → channels}/slack/adapter-core.d.ts +1 -1
- package/dist/channels/slack/adapter-core.d.ts.map +1 -0
- package/dist/channels/slack/adapter-core.js.map +1 -0
- package/dist/{connectors → channels}/slack/adapter.d.ts +3 -3
- package/dist/channels/slack/adapter.d.ts.map +1 -0
- package/dist/{connectors → channels}/slack/adapter.js +0 -1
- package/dist/channels/slack/adapter.js.map +1 -0
- package/dist/{connectors → channels}/slack/http.d.ts +7 -5
- package/dist/channels/slack/http.d.ts.map +1 -0
- package/dist/{connectors → channels}/slack/http.js +46 -11
- package/dist/channels/slack/http.js.map +1 -0
- package/dist/channels/slack/index.d.ts +104 -0
- package/dist/channels/slack/index.d.ts.map +1 -0
- package/dist/channels/slack/index.js +151 -0
- package/dist/channels/slack/index.js.map +1 -0
- package/dist/{connectors → channels}/slack/normalize.d.ts +7 -4
- package/dist/channels/slack/normalize.d.ts.map +1 -0
- package/dist/{connectors → channels}/slack/normalize.js +47 -11
- package/dist/channels/slack/normalize.js.map +1 -0
- package/dist/channels/slack/source-thread.d.ts.map +1 -0
- package/dist/channels/slack/source-thread.js.map +1 -0
- package/dist/{connectors → channels}/slack/transport.d.ts +1 -1
- package/dist/channels/slack/transport.d.ts.map +1 -0
- package/dist/{connectors → channels}/slack/transport.js +1 -1
- package/dist/channels/slack/transport.js.map +1 -0
- package/dist/channels/store.d.ts +14 -0
- package/dist/channels/store.d.ts.map +1 -1
- package/dist/channels/store.js +41 -27
- package/dist/channels/store.js.map +1 -1
- package/dist/connectors/slack/index.d.ts +10 -79
- package/dist/connectors/slack/index.d.ts.map +1 -1
- package/dist/connectors/slack/index.js +24 -127
- package/dist/connectors/slack/index.js.map +1 -1
- package/dist/connectors/toolserver/catalog.d.ts +4 -10
- package/dist/connectors/toolserver/catalog.d.ts.map +1 -1
- package/dist/connectors/toolserver/catalog.js +6 -54
- package/dist/connectors/toolserver/catalog.js.map +1 -1
- package/dist/connectors/toolserver/index.d.ts +5 -7
- package/dist/connectors/toolserver/index.d.ts.map +1 -1
- package/dist/connectors/toolserver/index.js +4 -6
- package/dist/connectors/toolserver/index.js.map +1 -1
- package/dist/connectors/toolserver/integrations.d.ts +4 -4
- package/dist/connectors/toolserver/integrations.d.ts.map +1 -1
- package/dist/define-deep-agent.d.ts.map +1 -1
- package/dist/define-deep-agent.js +9 -3
- package/dist/define-deep-agent.js.map +1 -1
- package/dist/extension.d.ts +6 -14
- package/dist/extension.d.ts.map +1 -1
- package/dist/extension.js +5 -24
- package/dist/extension.js.map +1 -1
- package/dist/identity/connect-inference.d.ts +6 -7
- package/dist/identity/connect-inference.d.ts.map +1 -1
- package/dist/identity/connect-inference.js +7 -9
- package/dist/identity/connect-inference.js.map +1 -1
- package/dist/identity/github/connect-http.d.ts +3 -4
- package/dist/identity/github/connect-http.d.ts.map +1 -1
- package/dist/identity/github/connect-http.js +7 -10
- package/dist/identity/github/connect-http.js.map +1 -1
- package/dist/identity/github/credentials-store.d.ts.map +1 -1
- package/dist/identity/github/credentials-store.js +26 -10
- package/dist/identity/github/credentials-store.js.map +1 -1
- package/dist/identity/github/index.d.ts +0 -2
- package/dist/identity/github/index.d.ts.map +1 -1
- package/dist/identity/github/index.js +0 -2
- package/dist/identity/github/index.js.map +1 -1
- package/dist/identity/index.d.ts +15 -71
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +30 -223
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/oauth-env.d.ts +4 -3
- package/dist/identity/oauth-env.d.ts.map +1 -1
- package/dist/identity/oauth-env.js +4 -3
- package/dist/identity/oauth-env.js.map +1 -1
- package/dist/identity/options.d.ts +12 -72
- package/dist/identity/options.d.ts.map +1 -1
- package/dist/identity/options.js +38 -112
- package/dist/identity/options.js.map +1 -1
- package/dist/identity/slack/connect-http.d.ts +3 -1
- package/dist/identity/slack/connect-http.d.ts.map +1 -1
- package/dist/identity/slack/connect-http.js +3 -1
- package/dist/identity/slack/connect-http.js.map +1 -1
- package/dist/identity/slack/links.d.ts +3 -2
- package/dist/identity/slack/links.d.ts.map +1 -1
- package/dist/identity/slack/links.js +29 -12
- package/dist/identity/slack/links.js.map +1 -1
- package/dist/identity/types.d.ts +12 -43
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +8 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/ingress/index.d.ts.map +1 -1
- package/dist/ingress/index.js +26 -10
- package/dist/ingress/index.js.map +1 -1
- package/dist/memory/define-memory.d.ts +39 -0
- package/dist/memory/define-memory.d.ts.map +1 -0
- package/dist/memory/define-memory.js +78 -0
- package/dist/memory/define-memory.js.map +1 -0
- package/dist/memory/index.d.ts +9 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +8 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/instructions-middleware.d.ts +74 -0
- package/dist/memory/instructions-middleware.d.ts.map +1 -0
- package/dist/memory/instructions-middleware.js +115 -0
- package/dist/memory/instructions-middleware.js.map +1 -0
- package/dist/memory/slices.d.ts +21 -0
- package/dist/memory/slices.d.ts.map +1 -0
- package/dist/memory/slices.js +61 -0
- package/dist/memory/slices.js.map +1 -0
- package/dist/memory/types.d.ts +71 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +10 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/namespaces.d.ts +46 -90
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +13 -39
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/auth.d.ts +31 -19
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +192 -68
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/backend.d.ts.map +1 -1
- package/dist/runtime/backend.js +26 -18
- package/dist/runtime/backend.js.map +1 -1
- package/dist/runtime/channel.d.ts +91 -0
- package/dist/runtime/channel.d.ts.map +1 -0
- package/dist/runtime/channel.js +98 -0
- package/dist/runtime/channel.js.map +1 -0
- package/dist/runtime/connector.d.ts +1 -1
- package/dist/runtime/connector.js +5 -1
- package/dist/runtime/connector.js.map +1 -1
- package/dist/runtime/cors.d.ts +1 -1
- package/dist/runtime/cors.d.ts.map +1 -1
- package/dist/runtime/cors.js +5 -1
- package/dist/runtime/cors.js.map +1 -1
- package/dist/runtime/http.d.ts +1 -2
- package/dist/runtime/http.d.ts.map +1 -1
- package/dist/runtime/http.js +1 -2
- package/dist/runtime/http.js.map +1 -1
- package/dist/runtime/identity-http.d.ts +9 -6
- package/dist/runtime/identity-http.d.ts.map +1 -1
- package/dist/runtime/identity-http.js +67 -42
- package/dist/runtime/identity-http.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +0 -18
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +0 -27
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +4 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +33 -31
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/memory/index.d.ts +0 -3
- package/dist/runtime/memory/index.d.ts.map +1 -1
- package/dist/runtime/memory/index.js +0 -3
- package/dist/runtime/memory/index.js.map +1 -1
- package/dist/runtime/memory/mounts.d.ts +2 -10
- package/dist/runtime/memory/mounts.d.ts.map +1 -1
- package/dist/runtime/memory/mounts.js +3 -11
- package/dist/runtime/memory/mounts.js.map +1 -1
- package/dist/runtime/sandbox-manager.d.ts +5 -0
- package/dist/runtime/sandbox-manager.d.ts.map +1 -1
- package/dist/runtime/sandbox-manager.js +21 -15
- package/dist/runtime/sandbox-manager.js.map +1 -1
- package/dist/runtime/sandbox-stream-retry.d.ts +15 -7
- package/dist/runtime/sandbox-stream-retry.d.ts.map +1 -1
- package/dist/runtime/sandbox-stream-retry.js +24 -12
- package/dist/runtime/sandbox-stream-retry.js.map +1 -1
- package/dist/runtime/types.d.ts +16 -0
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/validated-token.d.ts +7 -12
- package/dist/runtime/validated-token.d.ts.map +1 -1
- package/dist/runtime/validated-token.js +10 -66
- package/dist/runtime/validated-token.js.map +1 -1
- package/dist/sandbox.d.ts +16 -38
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sandbox.js +9 -16
- package/dist/sandbox.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +8 -8
- package/dist/connectors/github/adapter-core.d.ts +0 -15
- package/dist/connectors/github/adapter-core.d.ts.map +0 -1
- package/dist/connectors/github/adapter-core.js +0 -52
- package/dist/connectors/github/adapter-core.js.map +0 -1
- package/dist/connectors/github/define.d.ts +0 -168
- package/dist/connectors/github/define.d.ts.map +0 -1
- package/dist/connectors/github/define.js +0 -72
- package/dist/connectors/github/define.js.map +0 -1
- package/dist/connectors/github/http.d.ts +0 -25
- package/dist/connectors/github/http.d.ts.map +0 -1
- package/dist/connectors/github/http.js +0 -146
- package/dist/connectors/github/http.js.map +0 -1
- package/dist/connectors/github/index.d.ts +0 -121
- package/dist/connectors/github/index.d.ts.map +0 -1
- package/dist/connectors/github/index.js +0 -192
- package/dist/connectors/github/index.js.map +0 -1
- package/dist/connectors/github/match.d.ts +0 -20
- package/dist/connectors/github/match.d.ts.map +0 -1
- package/dist/connectors/github/match.js +0 -41
- package/dist/connectors/github/match.js.map +0 -1
- package/dist/connectors/github/normalize.d.ts +0 -32
- package/dist/connectors/github/normalize.d.ts.map +0 -1
- package/dist/connectors/github/normalize.js +0 -152
- package/dist/connectors/github/normalize.js.map +0 -1
- package/dist/connectors/github/sandbox.d.ts +0 -54
- package/dist/connectors/github/sandbox.d.ts.map +0 -1
- package/dist/connectors/github/sandbox.js +0 -532
- package/dist/connectors/github/sandbox.js.map +0 -1
- package/dist/connectors/github/source-thread.d.ts +0 -24
- package/dist/connectors/github/source-thread.d.ts.map +0 -1
- package/dist/connectors/github/source-thread.js +0 -54
- package/dist/connectors/github/source-thread.js.map +0 -1
- package/dist/connectors/github/transport.d.ts +0 -25
- package/dist/connectors/github/transport.d.ts.map +0 -1
- package/dist/connectors/github/transport.js +0 -106
- package/dist/connectors/github/transport.js.map +0 -1
- package/dist/connectors/langsmith/index.d.ts +0 -397
- package/dist/connectors/langsmith/index.d.ts.map +0 -1
- package/dist/connectors/langsmith/index.js +0 -436
- package/dist/connectors/langsmith/index.js.map +0 -1
- package/dist/connectors/langsmith/routes.d.ts +0 -236
- package/dist/connectors/langsmith/routes.d.ts.map +0 -1
- package/dist/connectors/langsmith/routes.js +0 -1154
- package/dist/connectors/langsmith/routes.js.map +0 -1
- package/dist/connectors/slack/adapter-core.d.ts.map +0 -1
- package/dist/connectors/slack/adapter-core.js.map +0 -1
- package/dist/connectors/slack/adapter.d.ts.map +0 -1
- package/dist/connectors/slack/adapter.js.map +0 -1
- package/dist/connectors/slack/http.d.ts.map +0 -1
- package/dist/connectors/slack/http.js.map +0 -1
- package/dist/connectors/slack/normalize.d.ts.map +0 -1
- package/dist/connectors/slack/normalize.js.map +0 -1
- package/dist/connectors/slack/source-thread.d.ts.map +0 -1
- package/dist/connectors/slack/source-thread.js.map +0 -1
- package/dist/connectors/slack/transport.d.ts.map +0 -1
- package/dist/connectors/slack/transport.js.map +0 -1
- package/dist/identity/memory-slices.d.ts +0 -21
- package/dist/identity/memory-slices.d.ts.map +0 -1
- package/dist/identity/memory-slices.js +0 -105
- package/dist/identity/memory-slices.js.map +0 -1
- package/dist/runtime/memory/lazy-context-backend.d.ts +0 -74
- package/dist/runtime/memory/lazy-context-backend.d.ts.map +0 -1
- package/dist/runtime/memory/lazy-context-backend.js +0 -166
- package/dist/runtime/memory/lazy-context-backend.js.map +0 -1
- package/dist/runtime/memory/seed.d.ts +0 -30
- package/dist/runtime/memory/seed.d.ts.map +0 -1
- package/dist/runtime/memory/seed.js +0 -199
- package/dist/runtime/memory/seed.js.map +0 -1
- package/dist/runtime/memory/user-repo.d.ts +0 -18
- package/dist/runtime/memory/user-repo.d.ts.map +0 -1
- package/dist/runtime/memory/user-repo.js +0 -50
- package/dist/runtime/memory/user-repo.js.map +0 -1
- /package/dist/{connectors → channels}/slack/adapter-core.js +0 -0
- /package/dist/{connectors → channels}/slack/source-thread.d.ts +0 -0
- /package/dist/{connectors → channels}/slack/source-thread.js +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `defineMemory(...)` input and the resolved contract the runtime reads.
|
|
3
|
+
*
|
|
4
|
+
* Durable memory is opt-in and owned by one root declaration: a project with no
|
|
5
|
+
* `memory.ts` mounts nothing. The resolved form is a list of slices rather than a
|
|
6
|
+
* flag, so later slice kinds (a private user slice, a group mount keyed by a JWT
|
|
7
|
+
* claim) are data the runtime already knows how to carry — not a new shape.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* One enabled memory mount after normalize. Mounts are always read/write.
|
|
11
|
+
*
|
|
12
|
+
* One kind today. The resolved shape is a list so later kinds (a private user
|
|
13
|
+
* slice, a group mount keyed by a claim) are added here without changing what
|
|
14
|
+
* consumers read.
|
|
15
|
+
*/
|
|
16
|
+
export type ResolvedMemorySlice = {
|
|
17
|
+
kind: "agent";
|
|
18
|
+
};
|
|
19
|
+
/** Slice kinds the runtime can mount, authorable or not. */
|
|
20
|
+
export type MemorySliceKind = ResolvedMemorySlice["kind"];
|
|
21
|
+
/**
|
|
22
|
+
* Resolved durable memory: which slices are mounted.
|
|
23
|
+
*
|
|
24
|
+
* Empty array means no durable memory.
|
|
25
|
+
*/
|
|
26
|
+
export type MemoryScope = ResolvedMemorySlice[];
|
|
27
|
+
/**
|
|
28
|
+
* Authoring form of a single memory slice.
|
|
29
|
+
*
|
|
30
|
+
* Deployment-shared agent memory is the whole launch surface. `"user"` and the
|
|
31
|
+
* object slice form (`{ kind, mount, access }`) are recognized and rejected with
|
|
32
|
+
* a "not implemented yet" error rather than being silently accepted.
|
|
33
|
+
*/
|
|
34
|
+
export type MemorySliceInput = "agent";
|
|
35
|
+
/**
|
|
36
|
+
* Authoring form of `defineMemory({ scope })`.
|
|
37
|
+
*
|
|
38
|
+
* - `"none"` / `[]` / omitted — no durable memory
|
|
39
|
+
* - `"agent"` / `["agent"]` — deployment-shared memory at `/memories/agent/`
|
|
40
|
+
*/
|
|
41
|
+
export type MemoryScopeInput = "none" | MemorySliceInput | MemorySliceInput[];
|
|
42
|
+
/** The memory declaration. Every key is optional. */
|
|
43
|
+
export interface MemoryOptions {
|
|
44
|
+
/**
|
|
45
|
+
* Which memory slices runs of this deployment may use. Defaults to `"none"`,
|
|
46
|
+
* so a declaration that names no scope mounts nothing.
|
|
47
|
+
*/
|
|
48
|
+
scope?: MemoryScopeInput;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The resolved memory contract the managed runtime reads.
|
|
52
|
+
*
|
|
53
|
+
* Versioned because the authoring surface will grow slice kinds and per-slice
|
|
54
|
+
* options: a consumer can branch on `version` instead of guessing from shape.
|
|
55
|
+
*/
|
|
56
|
+
export interface MemoryConfig {
|
|
57
|
+
readonly version: 1;
|
|
58
|
+
/** Enabled slices, agent first (empty = no durable memory). */
|
|
59
|
+
readonly slices: MemoryScope;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The pre-runtime spec returned by `defineMemory`.
|
|
63
|
+
*
|
|
64
|
+
* The CLI discovers the `memory` export from a root `memory.{ts,tsx,mts,cts}`
|
|
65
|
+
* and hands this config to the managed runtime, which mounts the named slices.
|
|
66
|
+
*/
|
|
67
|
+
export interface MemoryDefinition {
|
|
68
|
+
readonly kind: "memory";
|
|
69
|
+
readonly config: MemoryConfig;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/memory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpD,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,EAAE,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;AAE9E,qDAAqD;AACrD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `defineMemory(...)` input and the resolved contract the runtime reads.
|
|
3
|
+
*
|
|
4
|
+
* Durable memory is opt-in and owned by one root declaration: a project with no
|
|
5
|
+
* `memory.ts` mounts nothing. The resolved form is a list of slices rather than a
|
|
6
|
+
* flag, so later slice kinds (a private user slice, a group mount keyed by a JWT
|
|
7
|
+
* claim) are data the runtime already knows how to carry — not a new shape.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/memory/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/dist/namespaces.d.ts
CHANGED
|
@@ -6,12 +6,9 @@
|
|
|
6
6
|
* and providers can be added without growing the barrel:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
*
|
|
10
|
-
* connectors.
|
|
11
|
-
*
|
|
12
|
-
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
13
|
-
* });
|
|
14
|
-
* sandboxes.langsmith({ defaultTimeout: 600 });
|
|
9
|
+
* channels.slack();
|
|
10
|
+
* connectors.slack({ includeTools: ["slack_list_channels"] });
|
|
11
|
+
* defineSandbox({ defaultTimeout: 600 });
|
|
15
12
|
* auth.supabase({ projectRef: "abc" });
|
|
16
13
|
* credentials.github({ read: ["user"] });
|
|
17
14
|
* connect.github();
|
|
@@ -24,11 +21,9 @@
|
|
|
24
21
|
* These are the only primitives the managed runtime will mount. A project
|
|
25
22
|
* cannot contribute its own — `defineExtension` stays internal.
|
|
26
23
|
*/
|
|
27
|
-
import { LangSmithSandbox } from "deepagents";
|
|
28
|
-
import { githubConnector } from "./connectors/github/index.js";
|
|
29
|
-
import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer } from "./connectors/langsmith/index.js";
|
|
30
24
|
import { type MarketplaceConnectors } from "./connectors/marketplace/index.js";
|
|
31
25
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
26
|
+
import { slackChannel } from "./channels/slack/index.js";
|
|
32
27
|
import { slackConnector } from "./connectors/slack/index.js";
|
|
33
28
|
import { type ToolServerConnectors } from "./connectors/toolserver/index.js";
|
|
34
29
|
import { connect as githubConnect } from "./identity/github/connect-http.js";
|
|
@@ -39,34 +34,7 @@ import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js"
|
|
|
39
34
|
import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
|
|
40
35
|
import { connect as slackConnect } from "./identity/slack/connect-http.js";
|
|
41
36
|
import { connect as xConnect } from "./identity/x/connect-http.js";
|
|
42
|
-
import { type LangSmithSandboxOptions, type SandboxDefinition } from "./sandbox.js";
|
|
43
37
|
export { auth } from "./identity/index.js";
|
|
44
|
-
/** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
|
|
45
|
-
export declare const sandboxes: {
|
|
46
|
-
langsmith(options?: LangSmithSandboxOptions): SandboxDefinition<typeof LangSmithSandbox>;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* `connectors.langsmith` — the connector factory plus its capability builders.
|
|
50
|
-
*
|
|
51
|
-
* Call `connectors.langsmith({ capabilities })` to declare the connector; use
|
|
52
|
-
* the attached builders / presets to compose grants without a second import.
|
|
53
|
-
*
|
|
54
|
-
* Builder properties are typed as `typeof` the exported functions so hover
|
|
55
|
-
* docs stay on those symbols (`runs`, `chatFeedback`, …) rather than being
|
|
56
|
-
* restated here.
|
|
57
|
-
*
|
|
58
|
-
* @see {@link langsmithConnector}
|
|
59
|
-
*/
|
|
60
|
-
export type LangSmithConnectorsNamespace = typeof langsmithConnector & {
|
|
61
|
-
readonly runs: typeof runs;
|
|
62
|
-
readonly feedback: typeof feedback;
|
|
63
|
-
readonly examples: typeof examples;
|
|
64
|
-
readonly annotationQueues: typeof annotationQueues;
|
|
65
|
-
readonly prompts: typeof prompts;
|
|
66
|
-
readonly threads: typeof threads;
|
|
67
|
-
readonly chatFeedback: typeof chatFeedback;
|
|
68
|
-
readonly traceViewer: typeof traceViewer;
|
|
69
|
-
};
|
|
70
38
|
/**
|
|
71
39
|
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
72
40
|
* named messaging. Exported from `connectors/*`.
|
|
@@ -77,11 +45,8 @@ export type LangSmithConnectorsNamespace = typeof langsmithConnector & {
|
|
|
77
45
|
* LangSmith. They are spread from the catalog so adding an integration is one
|
|
78
46
|
* entry there rather than a line here as well. Marketplace bridges
|
|
79
47
|
* (`connectors.notion`, `connectors.cloudflare`, …) are spread the same way
|
|
80
|
-
* from the Fleet marketplace catalog.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* `langsmith` doubles as the namespace for its capability builders, so a
|
|
84
|
-
* project selects grants without a second import.
|
|
48
|
+
* from the Fleet marketplace catalog. Slack tool-server tools live here;
|
|
49
|
+
* Slack Events ingress lives on {@link channels}.
|
|
85
50
|
*
|
|
86
51
|
* Docs live on this interface (not the value) so IDE hover on `connectors.<name>`
|
|
87
52
|
* stays useful — TypeScript surfaces property docs from the annotation.
|
|
@@ -104,67 +69,58 @@ export interface Connectors extends ToolServerConnectors, MarketplaceConnectors
|
|
|
104
69
|
*/
|
|
105
70
|
mcp: typeof mcpConnector;
|
|
106
71
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
72
|
+
* Slack tool-server tools (`includeTools` / `excludeTools`). Names are typed
|
|
73
|
+
* from the catalog's `slack` entry.
|
|
109
74
|
*
|
|
110
|
-
*
|
|
111
|
-
* tools via `includeTools` / `excludeTools` or set `installCLI: false` to
|
|
112
|
-
* expose them. Tool names are typed from the catalog's `github` entry.
|
|
75
|
+
* For Slack Events ingress / messaging, use {@link channels.slack}.
|
|
113
76
|
*
|
|
114
77
|
* @example
|
|
115
78
|
* ```ts
|
|
116
|
-
* export const connector = connectors.
|
|
117
|
-
*
|
|
118
|
-
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
79
|
+
* export const connector = connectors.slack({
|
|
80
|
+
* includeTools: ["slack_list_channels"],
|
|
119
81
|
* });
|
|
120
82
|
* ```
|
|
121
83
|
*
|
|
122
|
-
* @see {@link githubConnector}
|
|
123
|
-
*/
|
|
124
|
-
github: typeof githubConnector;
|
|
125
|
-
/**
|
|
126
|
-
* Slack Events ingress, named messaging, and optional tool-server Slack tools.
|
|
127
|
-
*
|
|
128
|
-
* Events (`on`) mount ingress + messaging; `includeTools` / `excludeTools`
|
|
129
|
-
* enable Slack tool-server tools (names typed from the catalog's `slack`
|
|
130
|
-
* entry).
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```ts
|
|
134
|
-
* export const connector = connectors.slack({ on: ["app_mention"] });
|
|
135
|
-
* ```
|
|
136
|
-
*
|
|
137
84
|
* @see {@link slackConnector}
|
|
138
85
|
*/
|
|
139
86
|
slack: typeof slackConnector;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
90
|
+
* named messaging. Exported from `connectors/*`.
|
|
91
|
+
*
|
|
92
|
+
* Factories are assigned by reference (same pattern as the Python namespace) so
|
|
93
|
+
* signatures stay in step with the connector modules. Hover docs come from
|
|
94
|
+
* {@link Connectors}.
|
|
95
|
+
*/
|
|
96
|
+
export declare const connectors: Connectors;
|
|
97
|
+
/**
|
|
98
|
+
* Inbound messaging surfaces (Events ingress + outbound messaging). Exported
|
|
99
|
+
* from `channels/*`. Slack-only for now.
|
|
100
|
+
*
|
|
101
|
+
* Docs live on this interface so IDE hover on `channels.<name>` stays useful.
|
|
102
|
+
*/
|
|
103
|
+
export interface Channels {
|
|
140
104
|
/**
|
|
141
|
-
*
|
|
142
|
-
* channels, schedules). Declares constrained LangSmith grants; MDA performs
|
|
143
|
-
* them server-side so the caller never receives `LANGSMITH_API_KEY`.
|
|
105
|
+
* Slack Events ingress, named messaging, and deploy requirements.
|
|
144
106
|
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
107
|
+
* Mounts public Events at `/channels/{name}/events`. For Slack tool-server
|
|
108
|
+
* tools, use {@link connectors.slack}.
|
|
147
109
|
*
|
|
148
110
|
* @example
|
|
149
111
|
* ```ts
|
|
150
|
-
* export const
|
|
151
|
-
* capabilities: [connectors.langsmith.traceViewer()],
|
|
152
|
-
* });
|
|
112
|
+
* export const channel = channels.slack();
|
|
153
113
|
* ```
|
|
154
114
|
*
|
|
155
|
-
* @see {@link
|
|
115
|
+
* @see {@link slackChannel}
|
|
156
116
|
*/
|
|
157
|
-
|
|
117
|
+
slack: typeof slackChannel;
|
|
158
118
|
}
|
|
159
119
|
/**
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* Factories are assigned by reference (same pattern as the Python namespace) so
|
|
164
|
-
* signatures stay in step with the connector modules. Hover docs come from
|
|
165
|
-
* {@link Connectors}.
|
|
120
|
+
* Inbound messaging surfaces. Factories are assigned by reference so signatures
|
|
121
|
+
* stay in step with the channel modules. Hover docs come from {@link Channels}.
|
|
166
122
|
*/
|
|
167
|
-
export declare const
|
|
123
|
+
export declare const channels: Channels;
|
|
168
124
|
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
169
125
|
export declare const credentials: {
|
|
170
126
|
github: typeof githubCredentials;
|
|
@@ -177,12 +133,12 @@ export declare const credentials: {
|
|
|
177
133
|
export interface Connect extends MarketplaceConnect {
|
|
178
134
|
/**
|
|
179
135
|
* Connect-with-GitHub — link a caller's GitHub account for actor OAuth tokens
|
|
180
|
-
* used by
|
|
136
|
+
* used by GitHub credentials.
|
|
181
137
|
*
|
|
182
|
-
* Usually unnecessary: declaring `
|
|
183
|
-
* deployment mounts this automatically (same pattern as
|
|
184
|
-
* Also mounts when a credential chain reads per-user
|
|
185
|
-
* listed on `identity.connect`.
|
|
138
|
+
* Usually unnecessary: declaring `credentials.github(...)` on a user-scoped
|
|
139
|
+
* identity deployment mounts this automatically (same pattern as
|
|
140
|
+
* Google/Microsoft). Also mounts when a credential chain reads per-user
|
|
141
|
+
* GitHub tokens, or when listed on `identity.connect`.
|
|
186
142
|
*
|
|
187
143
|
* @example
|
|
188
144
|
* ```ts
|
|
@@ -257,10 +213,10 @@ export interface Connect extends MarketplaceConnect {
|
|
|
257
213
|
x: typeof xConnect;
|
|
258
214
|
/**
|
|
259
215
|
* Connect-with-Slack — link a caller's Slack identity via OIDC for per-user
|
|
260
|
-
*
|
|
216
|
+
* Events remapping and credential resolution.
|
|
261
217
|
*
|
|
262
218
|
* Mounts under `/identity/slack/*` when listed on `identity.connect`, or when
|
|
263
|
-
* a Slack channel routes into a user-scoped deployment.
|
|
219
|
+
* a Slack channel routes into a user-scoped / custom-credentials deployment.
|
|
264
220
|
*
|
|
265
221
|
* @example
|
|
266
222
|
* ```ts
|
|
@@ -286,8 +242,8 @@ export interface Connect extends MarketplaceConnect {
|
|
|
286
242
|
* per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
|
|
287
243
|
*
|
|
288
244
|
* Authors rarely list providers by hand. Prefer inference: a user-scoped
|
|
289
|
-
* identity plus `
|
|
290
|
-
*
|
|
245
|
+
* identity plus `credentials.github({ read: ["user"] })`, Slack Events,
|
|
246
|
+
* Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
|
|
291
247
|
* bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
|
|
292
248
|
* Connect flow automatically. Use this namespace when you need an explicit
|
|
293
249
|
* opt-in or a custom options bag.
|
package/dist/namespaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA
|
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;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,OAAO,YAAY,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,QAEtB,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,WAAW;IACtB,MAAM;CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,kBAAkB;IACjD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,EAAE,OAAO,aAAa,CAAC;IAE7B;;;;;;;;;;;;;;OAcG;IACH,MAAM,EAAE,OAAO,aAAa,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,SAAS,EAAE,OAAO,gBAAgB,CAAC;IAEnC;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,OAAO,eAAe,CAAC;IAEjC;;;;;;;;;;;;;OAaG;IACH,CAAC,EAAE,OAAO,QAAQ,CAAC;IAEnB;;;;;;;;;;;;;;;OAeG;IACH,KAAK,EAAE,OAAO,YAAY,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,OAAO,EAAE,OAQrB,CAAC"}
|
package/dist/namespaces.js
CHANGED
|
@@ -6,12 +6,9 @@
|
|
|
6
6
|
* and providers can be added without growing the barrel:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
*
|
|
10
|
-
* connectors.
|
|
11
|
-
*
|
|
12
|
-
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
13
|
-
* });
|
|
14
|
-
* sandboxes.langsmith({ defaultTimeout: 600 });
|
|
9
|
+
* channels.slack();
|
|
10
|
+
* connectors.slack({ includeTools: ["slack_list_channels"] });
|
|
11
|
+
* defineSandbox({ defaultTimeout: 600 });
|
|
15
12
|
* auth.supabase({ projectRef: "abc" });
|
|
16
13
|
* credentials.github({ read: ["user"] });
|
|
17
14
|
* connect.github();
|
|
@@ -24,14 +21,11 @@
|
|
|
24
21
|
* These are the only primitives the managed runtime will mount. A project
|
|
25
22
|
* cannot contribute its own — `defineExtension` stays internal.
|
|
26
23
|
*/
|
|
27
|
-
import { LangSmithSandbox } from "deepagents";
|
|
28
|
-
import { githubConnector } from "./connectors/github/index.js";
|
|
29
|
-
import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer, } from "./connectors/langsmith/index.js";
|
|
30
24
|
import { marketplaceConnectors, } from "./connectors/marketplace/index.js";
|
|
31
25
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
26
|
+
import { slackChannel } from "./channels/slack/index.js";
|
|
32
27
|
import { slackConnector } from "./connectors/slack/index.js";
|
|
33
28
|
import { toolServerConnectors, } from "./connectors/toolserver/index.js";
|
|
34
|
-
import { defineExtension } from "./extension.js";
|
|
35
29
|
import { connect as githubConnect } from "./identity/github/connect-http.js";
|
|
36
30
|
import { credentials as githubCredentials } from "./identity/github/credentials.js";
|
|
37
31
|
import { connect as googleConnect } from "./identity/google/connect-http.js";
|
|
@@ -40,32 +34,7 @@ import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js"
|
|
|
40
34
|
import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
|
|
41
35
|
import { connect as slackConnect } from "./identity/slack/connect-http.js";
|
|
42
36
|
import { connect as xConnect } from "./identity/x/connect-http.js";
|
|
43
|
-
import {} from "./sandbox.js";
|
|
44
37
|
export { auth } from "./identity/index.js";
|
|
45
|
-
const langsmithSandbox = defineExtension("sandbox", {
|
|
46
|
-
label: "sandboxes.langsmith",
|
|
47
|
-
provider: LangSmithSandbox,
|
|
48
|
-
// Not a schema: a sandbox's options are inferred from the provider class's
|
|
49
|
-
// own `create(...)` types, so a hand-written one would restate deepagents'
|
|
50
|
-
// surface and drift from it.
|
|
51
|
-
args: (options) => options ?? {},
|
|
52
|
-
});
|
|
53
|
-
/** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
|
|
54
|
-
export const sandboxes = {
|
|
55
|
-
langsmith(options) {
|
|
56
|
-
return langsmithSandbox(options);
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
const langsmithConnectors = Object.assign(langsmithConnector, {
|
|
60
|
-
runs,
|
|
61
|
-
feedback,
|
|
62
|
-
examples,
|
|
63
|
-
annotationQueues,
|
|
64
|
-
prompts,
|
|
65
|
-
threads,
|
|
66
|
-
chatFeedback,
|
|
67
|
-
traceViewer,
|
|
68
|
-
});
|
|
69
38
|
/**
|
|
70
39
|
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
71
40
|
* named messaging. Exported from `connectors/*`.
|
|
@@ -78,9 +47,14 @@ export const connectors = {
|
|
|
78
47
|
...toolServerConnectors,
|
|
79
48
|
...marketplaceConnectors,
|
|
80
49
|
mcp: mcpConnector,
|
|
81
|
-
github: githubConnector,
|
|
82
50
|
slack: slackConnector,
|
|
83
|
-
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Inbound messaging surfaces. Factories are assigned by reference so signatures
|
|
54
|
+
* stay in step with the channel modules. Hover docs come from {@link Channels}.
|
|
55
|
+
*/
|
|
56
|
+
export const channels = {
|
|
57
|
+
slack: slackChannel,
|
|
84
58
|
};
|
|
85
59
|
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
86
60
|
export const credentials = {
|
|
@@ -99,8 +73,8 @@ export const credentials = {
|
|
|
99
73
|
* per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
|
|
100
74
|
*
|
|
101
75
|
* Authors rarely list providers by hand. Prefer inference: a user-scoped
|
|
102
|
-
* identity plus `
|
|
103
|
-
*
|
|
76
|
+
* identity plus `credentials.github({ read: ["user"] })`, Slack Events,
|
|
77
|
+
* Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
|
|
104
78
|
* bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
|
|
105
79
|
* Connect flow automatically. Use this namespace when you need an explicit
|
|
106
80
|
* opt-in or a custom options bag.
|
package/dist/namespaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,qBAAqB,GAEtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACL,oBAAoB,GAErB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,kBAAkB,GAEnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAuD3C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,GAAG,oBAAoB;IACvB,GAAG,qBAAqB;IACxB,GAAG,EAAE,YAAY;IACjB,KAAK,EAAE,cAAc;CACtB,CAAC;AAyBF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAgHF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,OAAO,GAAY;IAC9B,GAAG,kBAAkB;IACrB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,eAAe;IACzB,CAAC,EAAE,QAAQ;IACX,KAAK,EAAE,YAAY;CACpB,CAAC"}
|
package/dist/runtime/auth.d.ts
CHANGED
|
@@ -8,18 +8,24 @@ import { type IdentityConfig, type IdentityDefinition, type RuntimeIdentity } fr
|
|
|
8
8
|
*/
|
|
9
9
|
/** Trusted-backend / channel-loopback identity headers (single source of truth). */
|
|
10
10
|
export declare const USER_HEADER = "x-mda-user-id";
|
|
11
|
-
/** Comma- or space-delimited group memberships. */
|
|
12
|
-
export declare const GROUPS_HEADER = "x-mda-groups";
|
|
13
11
|
export declare const INGRESS_SECRET_HEADER = "x-mda-ingress-secret";
|
|
14
12
|
/**
|
|
15
|
-
* Internal channel handoff headers. Accepted only after
|
|
16
|
-
* validates — never part of the public HTTP identity
|
|
17
|
-
* not allowlisted into `config.configurable`.
|
|
13
|
+
* Internal channel handoff headers. Accepted only after a server API key or
|
|
14
|
+
* legacy ingress secret validates — never part of the public HTTP identity
|
|
15
|
+
* surface, and deliberately not allowlisted into `config.configurable`.
|
|
18
16
|
*/
|
|
19
17
|
export declare const SOURCE_PROVIDER_HEADER = "x-mda-source-provider";
|
|
20
18
|
export declare const SOURCE_THREAD_HEADER = "x-mda-source-thread-id";
|
|
21
19
|
/** Deployment env var carrying the shared secret the trusted backend presents. */
|
|
22
20
|
export declare const INGRESS_SECRET_ENV = "MDA_INGRESS_SECRET";
|
|
21
|
+
/** Deploy/dev-owned credential used only for internal identity handoffs. */
|
|
22
|
+
export declare const HANDOFF_SECRET_ENV = "MDA_HANDOFF_SECRET";
|
|
23
|
+
export declare const HANDOFF_SECRET_HEADER = "x-mda-handoff-secret";
|
|
24
|
+
/** Platform-owned LangSmith auth configuration. */
|
|
25
|
+
export declare const LANGSMITH_AUTH_ENDPOINT_ENV = "LANGSMITH_AUTH_ENDPOINT";
|
|
26
|
+
export declare const LANGSMITH_TENANT_ID_ENV = "LANGSMITH_TENANT_ID";
|
|
27
|
+
export declare const LANGSMITH_API_KEY_HEADER = "x-api-key";
|
|
28
|
+
export declare const LANGSMITH_API_KEY_ENV = "LANGSMITH_API_KEY";
|
|
23
29
|
/**
|
|
24
30
|
* The user object `@auth.authenticate` returns. `identity`/`permissions` satisfy
|
|
25
31
|
* the LangGraph base shape; the `mda_*` fields carry the identity envelope into
|
|
@@ -30,7 +36,7 @@ export interface ManagedUser {
|
|
|
30
36
|
permissions: string[];
|
|
31
37
|
mda_user_id: string;
|
|
32
38
|
mda_user_email?: string;
|
|
33
|
-
/**
|
|
39
|
+
/** Resolved group memberships; read-only, never an isolation key. */
|
|
34
40
|
mda_groups?: string[];
|
|
35
41
|
mda_claims?: Record<string, unknown>;
|
|
36
42
|
/** Trusted source provider stamped by managed ingress (never client-supplied). */
|
|
@@ -42,10 +48,8 @@ export interface ManagedUser {
|
|
|
42
48
|
/**
|
|
43
49
|
* Build the managed LangGraph custom-auth handler from a declared identity.
|
|
44
50
|
*
|
|
45
|
-
* Handles
|
|
46
|
-
*
|
|
47
|
-
* verified via JWKS / introspection / MDA-signed guest). Also registers thread
|
|
48
|
-
* and store scoping with a studio bypass.
|
|
51
|
+
* Handles trusted-backend, LangSmith API-key, and validated-token ingress.
|
|
52
|
+
* Also registers thread and store scoping with a studio bypass.
|
|
49
53
|
*/
|
|
50
54
|
export declare function buildManagedAuth(identity: IdentityDefinition): Auth;
|
|
51
55
|
/**
|
|
@@ -72,11 +76,19 @@ export declare const GITHUB_CREDENTIALS_STORE_PREFIX = "mda_github_credentials";
|
|
|
72
76
|
*/
|
|
73
77
|
export declare const IDENTITY_LINKS_SERVICE_USER = "mda:identity-links";
|
|
74
78
|
/**
|
|
75
|
-
* Fail-closed (403)
|
|
76
|
-
*
|
|
77
|
-
*
|
|
79
|
+
* Fail-closed (403) on the managed reserved namespaces.
|
|
80
|
+
*
|
|
81
|
+
* `mda_identity_links` and `mda_github_credentials` are deployment-wide managed
|
|
82
|
+
* tables — account links and OAuth tokens for every caller — so only the trusted
|
|
83
|
+
* identity-links service principal may touch them. This check deliberately does
|
|
84
|
+
* not consult memory: it used to sit behind a per-caller memory check, which left
|
|
85
|
+
* the tables open to any authenticated caller on deployments without a user
|
|
86
|
+
* slice.
|
|
87
|
+
*
|
|
88
|
+
* There is no per-caller store partition to enforce beyond that, because no
|
|
89
|
+
* declaration mounts per-caller state in this release.
|
|
78
90
|
*/
|
|
79
|
-
export declare function assertStoreAccess(
|
|
91
|
+
export declare function assertStoreAccess(user: ManagedUser, value: unknown): void;
|
|
80
92
|
/** True when `required` appears as a contiguous ordered subsequence of `namespace`. */
|
|
81
93
|
export declare function namespaceHasOrderedSegments(namespace: string[], required: string[]): boolean;
|
|
82
94
|
/**
|
|
@@ -93,6 +105,8 @@ export declare function namespaceHasOrderedSegments(namespace: string[], require
|
|
|
93
105
|
* loopback handoff — ordinary clients without the secret cannot stamp them.
|
|
94
106
|
*/
|
|
95
107
|
export declare function resolveTrustedBackendUser(cfg: IdentityConfig, request: Request): ManagedUser;
|
|
108
|
+
/** Verify a LangSmith API key without replacing MDA's authorization hooks. */
|
|
109
|
+
export declare function resolveLangSmithApiKeyUser(request: Request): Promise<ManagedUser>;
|
|
96
110
|
/**
|
|
97
111
|
* Under `mda dev`, synthetic local/Companion service principals are unscoped
|
|
98
112
|
* for thread search + store so authors can see Studio-created Local threads.
|
|
@@ -108,14 +122,12 @@ export declare function isLocalDevUnscopedUser(user: unknown): boolean;
|
|
|
108
122
|
export declare function tryLocalDevTrustedUser(_cfg: IdentityConfig, request: Request): ManagedUser | null;
|
|
109
123
|
/** Derive the owner value `@auth.on.threads` filters on (the caller user id). */
|
|
110
124
|
export declare function threadOwnerKey(user: ManagedUser): string;
|
|
111
|
-
/** True when
|
|
112
|
-
export declare function isGuestIssuanceRequest(request: Request, cfg: IdentityConfig): boolean;
|
|
113
|
-
/** True when the request targets a public connector Events ingress route. */
|
|
125
|
+
/** True when the request targets a public channel/connector Events ingress route. */
|
|
114
126
|
export declare function isChannelEventsRequest(request: Request): boolean;
|
|
115
127
|
/** True when the request is a public identity-provider OAuth/OIDC callback. */
|
|
116
128
|
export declare function isIdentityProviderCallbackRequest(request: Request): boolean;
|
|
117
|
-
/** Placeholder identity so LangGraph auth middleware allows
|
|
118
|
-
export declare function
|
|
129
|
+
/** Placeholder identity so LangGraph auth middleware allows public routes. */
|
|
130
|
+
export declare function publicRouteBypassUser(): ManagedUser;
|
|
119
131
|
/** Placeholder identity so middleware allows provider-signed channel Events. */
|
|
120
132
|
export declare function channelEventsBypassUser(): ManagedUser;
|
|
121
133
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/runtime/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAGL,MAAM,+BAA+B,CAAC;AAIvC,OAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/runtime/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAGL,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAC;AAI9B;;;;;GAKG;AACH,oFAAoF;AACpF,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAC3C,eAAO,MAAM,qBAAqB,yBAAyB,CAAC;AAC5D;;;;GAIG;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