managed-deepagents 0.5.0-dev.90 → 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/manifest.d.ts +1 -1
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/channels/slack/adapter.d.ts.map +1 -1
- package/dist/channels/slack/adapter.js +0 -1
- package/dist/channels/slack/adapter.js.map +1 -1
- package/dist/channels/slack/http.d.ts +3 -1
- package/dist/channels/slack/http.d.ts.map +1 -1
- package/dist/channels/slack/http.js +40 -5
- package/dist/channels/slack/http.js.map +1 -1
- package/dist/channels/slack/index.d.ts +23 -8
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +32 -29
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/channels/slack/normalize.d.ts +4 -1
- package/dist/channels/slack/normalize.d.ts.map +1 -1
- package/dist/channels/slack/normalize.js +46 -10
- package/dist/channels/slack/normalize.js.map +1 -1
- 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/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/github/connect-http.d.ts +1 -2
- package/dist/identity/github/connect-http.d.ts.map +1 -1
- package/dist/identity/github/connect-http.js +5 -8
- 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/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 -71
- 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/links.d.ts +1 -1
- package/dist/identity/slack/links.d.ts.map +1 -1
- package/dist/identity/slack/links.js +27 -11
- package/dist/identity/slack/links.js.map +1 -1
- package/dist/identity/types.d.ts +11 -42
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +7 -9
- 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 +3 -9
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +2 -19
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/auth.d.ts +30 -18
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +179 -65
- 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/identity-http.d.ts +1 -3
- package/dist/runtime/identity-http.d.ts.map +1 -1
- package/dist/runtime/identity-http.js +23 -40
- 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 +2 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +29 -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 +8 -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/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
|
@@ -2,85 +2,27 @@
|
|
|
2
2
|
* The `defineIdentity(...)` input, and its normalization into the resolved
|
|
3
3
|
* {@link IdentityConfig}.
|
|
4
4
|
*
|
|
5
|
-
* Authors describe
|
|
6
|
-
* isolation
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Authors describe how callers authenticate. The runtime supplies the managed
|
|
6
|
+
* user-isolation policy, so credential ownership and Connect routing do not
|
|
7
|
+
* become authoring knobs. Durable memory is not an identity concern at all —
|
|
8
|
+
* it has its own root declaration in `memory.ts`.
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
11
|
-
import type { CredentialResolverConfig, CredentialResolvers, CredentialScope, IdentityConfig, MemoryScope, MemoryScopeInput, ValidatedTokenProvider } from "./types.js";
|
|
10
|
+
import type { IdentityConfig, LangSmithApiKeyIngress, ValidatedTokenProvider } from "./types.js";
|
|
12
11
|
/**
|
|
13
12
|
* How MDA learns who is calling.
|
|
14
13
|
*
|
|
15
14
|
* - `"backend"` — a backend you operate has already authenticated the caller and
|
|
16
15
|
* asserts the user id over the reserved ingress headers.
|
|
16
|
+
* - `auth.langsmithApiKey()` — MDA verifies a LangSmith workspace API key and
|
|
17
|
+
* treats the result as a service identity.
|
|
17
18
|
* - one or more `providers.*` entries — MDA verifies the caller's own token
|
|
18
19
|
* server-side (browser-direct).
|
|
19
20
|
*/
|
|
20
|
-
export type IdentityAuth = "backend" | ValidatedTokenProvider | ValidatedTokenProvider[];
|
|
21
|
-
/**
|
|
22
|
-
* The isolation boundary for the deployment — the one decision most projects
|
|
23
|
-
* make about identity.
|
|
24
|
-
*
|
|
25
|
-
* - `"agent"` (default) — shared agent memory only; the agent acts as itself
|
|
26
|
-
* with the shared LangSmith vault (`mda connect` / Settings → Integrations).
|
|
27
|
-
* - `"user"` — private threads, per-caller credentials, and both agent
|
|
28
|
-
* (procedural) + user (personal) memory slices.
|
|
29
|
-
* - `"none"` — no durable memory and no downstream credentials.
|
|
30
|
-
*/
|
|
31
|
-
export type IdentityScope = "user" | "agent" | "none";
|
|
32
|
-
/**
|
|
33
|
-
* Per-axis overrides for authors whose deployment does not fit a single
|
|
34
|
-
* {@link IdentityScope}. Anything left unset follows `default`.
|
|
35
|
-
*
|
|
36
|
-
* Threads are always user-owned; there is no `threads` override.
|
|
37
|
-
*/
|
|
38
|
-
export interface IdentityScopeOverrides {
|
|
39
|
-
/** Base scope the unset axes follow. Defaults to `"agent"`. */
|
|
40
|
-
default?: IdentityScope;
|
|
41
|
-
/**
|
|
42
|
-
* Which memory slices a run may use.
|
|
43
|
-
*
|
|
44
|
-
* See {@link MemoryScopeInput}. Shorthand `"user"` means user-only; the
|
|
45
|
-
* identity shorthand `scope: "user"` expands to agent+user.
|
|
46
|
-
*/
|
|
47
|
-
memory?: MemoryScopeInput;
|
|
48
|
-
/**
|
|
49
|
-
* Whose credentials downstream calls carry. `"custom"` is implied by
|
|
50
|
-
* `credentials`. `"user"` enables per-caller Connect; `"agent"` uses the
|
|
51
|
-
* shared LangSmith vault.
|
|
52
|
-
*/
|
|
53
|
-
credentials?: CredentialScope;
|
|
54
|
-
}
|
|
55
|
-
/** The identity declaration. Every key is optional. */
|
|
21
|
+
export type IdentityAuth = "backend" | LangSmithApiKeyIngress | ValidatedTokenProvider | ValidatedTokenProvider[];
|
|
22
|
+
/** The identity declaration. Authentication must be chosen explicitly. */
|
|
56
23
|
export interface IdentityOptions {
|
|
57
|
-
/** How callers authenticate.
|
|
58
|
-
auth
|
|
59
|
-
/** The isolation boundary, or per-axis overrides. Defaults to `"agent"`. */
|
|
60
|
-
scope?: IdentityScope | IdentityScopeOverrides;
|
|
61
|
-
/**
|
|
62
|
-
* Mint your own downstream credentials per caller. Providing this puts the
|
|
63
|
-
* credentials axis in custom mode — there is no separate flag to set.
|
|
64
|
-
*
|
|
65
|
-
* Pass one resolver, or a map keyed by target name when the agent integrates
|
|
66
|
-
* several platforms:
|
|
67
|
-
*
|
|
68
|
-
* ```ts
|
|
69
|
-
* credentials: {
|
|
70
|
-
* github: credentials.github({ read: ["user", "pat"] }),
|
|
71
|
-
* jira: { resolve: mintJiraToken },
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
credentials?: CredentialResolverConfig | CredentialResolvers;
|
|
76
|
-
/**
|
|
77
|
-
* Extra Connect-with-X providers to mount under `/identity/{id}/…`.
|
|
78
|
-
*
|
|
79
|
-
* Providers the deployment already implies are added automatically (a
|
|
80
|
-
* `credentials.github(...)` chain that reads user tokens brings
|
|
81
|
-
* Connect-with-GitHub with it), so this is only needed for custom providers.
|
|
82
|
-
*/
|
|
83
|
-
connect?: IdentityConnectProvider[];
|
|
24
|
+
/** How callers authenticate. */
|
|
25
|
+
auth: IdentityAuth;
|
|
84
26
|
}
|
|
85
27
|
/**
|
|
86
28
|
* Derive the resolved {@link IdentityConfig} from the declared options.
|
|
@@ -89,6 +31,5 @@ export interface IdentityOptions {
|
|
|
89
31
|
* `validateIdentity` accepts, so the errors that exist only to police two
|
|
90
32
|
* fields agreeing with each other are unreachable from this path.
|
|
91
33
|
*/
|
|
92
|
-
export declare function normalizeIdentity(options
|
|
93
|
-
export type { MemoryScope, MemoryScopeInput };
|
|
34
|
+
export declare function normalizeIdentity(options: IdentityOptions): IdentityConfig;
|
|
94
35
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/identity/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/identity/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,EAAE,CAAC;AAE7B,0EAA0E;AAC1E,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,IAAI,EAAE,YAAY,CAAC;CACpB;AAYD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAa1E"}
|
package/dist/identity/options.js
CHANGED
|
@@ -2,34 +2,20 @@
|
|
|
2
2
|
* The `defineIdentity(...)` input, and its normalization into the resolved
|
|
3
3
|
* {@link IdentityConfig}.
|
|
4
4
|
*
|
|
5
|
-
* Authors describe
|
|
6
|
-
* isolation
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Authors describe how callers authenticate. The runtime supplies the managed
|
|
6
|
+
* user-isolation policy, so credential ownership and Connect routing do not
|
|
7
|
+
* become authoring knobs. Durable memory is not an identity concern at all —
|
|
8
|
+
* it has its own root declaration in `memory.ts`.
|
|
9
9
|
*/
|
|
10
|
-
import { credentialConnectProviders } from "./credential-resolvers.js";
|
|
11
|
-
import { normalizeMemoryScope } from "./memory-slices.js";
|
|
12
|
-
const AGENT_SLICE = { kind: "agent" };
|
|
13
|
-
const USER_SLICE = { kind: "user" };
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
11
|
+
* Managed identity keys downstream credentials on the caller.
|
|
16
12
|
*
|
|
17
|
-
*
|
|
13
|
+
* Threads are always user-owned, and durable memory is declared by `memory.ts`,
|
|
14
|
+
* so credentials are the only axis left for identity to resolve.
|
|
18
15
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
credentials: "user",
|
|
23
|
-
},
|
|
24
|
-
agent: { memory: [AGENT_SLICE], credentials: "agent" },
|
|
25
|
-
none: { memory: [], credentials: "none" },
|
|
26
|
-
};
|
|
27
|
-
const CREDENTIAL_SCOPES = [
|
|
28
|
-
"user",
|
|
29
|
-
"agent",
|
|
30
|
-
"none",
|
|
31
|
-
"custom",
|
|
32
|
-
];
|
|
16
|
+
function managedUserScope() {
|
|
17
|
+
return { credentials: "user" };
|
|
18
|
+
}
|
|
33
19
|
/**
|
|
34
20
|
* Derive the resolved {@link IdentityConfig} from the declared options.
|
|
35
21
|
*
|
|
@@ -37,113 +23,53 @@ const CREDENTIAL_SCOPES = [
|
|
|
37
23
|
* `validateIdentity` accepts, so the errors that exist only to police two
|
|
38
24
|
* fields agreeing with each other are unreachable from this path.
|
|
39
25
|
*/
|
|
40
|
-
export function normalizeIdentity(options
|
|
26
|
+
export function normalizeIdentity(options) {
|
|
41
27
|
assertOptionKeys(options);
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
if (options.auth === undefined) {
|
|
29
|
+
throw new Error("defineIdentity(...) requires `auth`. Use auth.langsmithApiKey() for LangSmith workspace API keys.");
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
44
32
|
ingress: { http: resolveIngress(options.auth) },
|
|
45
|
-
scope,
|
|
33
|
+
scope: managedUserScope(),
|
|
46
34
|
};
|
|
47
|
-
if (options.credentials !== undefined) {
|
|
48
|
-
config.credentials = options.credentials;
|
|
49
|
-
}
|
|
50
|
-
const connect = resolveConnect(options);
|
|
51
|
-
if (connect.length > 0) {
|
|
52
|
-
config.connect = connect;
|
|
53
|
-
}
|
|
54
|
-
return config;
|
|
55
35
|
}
|
|
56
36
|
function resolveIngress(auth) {
|
|
57
|
-
if (auth ===
|
|
37
|
+
if (auth === "backend") {
|
|
58
38
|
return "backend";
|
|
59
39
|
}
|
|
60
40
|
if (typeof auth === "string") {
|
|
61
|
-
throw new Error(`defineIdentity(...) unknown \`auth\` value "${auth}". Use "backend" or one or more providers.* entries.`);
|
|
41
|
+
throw new Error(`defineIdentity(...) unknown \`auth\` value "${auth}". Use "backend", auth.langsmithApiKey(), or one or more providers.* entries.`);
|
|
42
|
+
}
|
|
43
|
+
if (isLangSmithApiKeyAuth(auth)) {
|
|
44
|
+
return auth;
|
|
62
45
|
}
|
|
63
46
|
const providers = Array.isArray(auth) ? auth : [auth];
|
|
64
47
|
return { mode: "validated_token", providers };
|
|
65
48
|
}
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
const overrides = typeof scope === "string" ? { default: scope } : scope;
|
|
69
|
-
if (typeof scope !== "string" &&
|
|
70
|
-
scope !== null &&
|
|
71
|
-
typeof scope === "object") {
|
|
72
|
-
assertNoThreads(scope);
|
|
73
|
-
}
|
|
74
|
-
const base = SCOPE_AXES[overrides.default ?? "agent"];
|
|
75
|
-
if (base === undefined) {
|
|
76
|
-
throw new Error(`defineIdentity(...) unknown \`scope\` "${String(overrides.default)}". ` +
|
|
77
|
-
`Valid scopes: ${Object.keys(SCOPE_AXES).join(", ")}.`);
|
|
78
|
-
}
|
|
79
|
-
const memory = overrides.memory !== undefined
|
|
80
|
-
? normalizeMemoryScope(overrides.memory)
|
|
81
|
-
: base.memory;
|
|
82
|
-
// A resolver is the declaration of custom mode; the axis follows from it.
|
|
83
|
-
const credentials = options.credentials !== undefined
|
|
84
|
-
? requireCustomCompatible(overrides.credentials)
|
|
85
|
-
: (assertAxis("credentials", overrides.credentials, CREDENTIAL_SCOPES) ??
|
|
86
|
-
base.credentials);
|
|
87
|
-
return { memory, credentials };
|
|
88
|
-
}
|
|
89
|
-
function assertNoThreads(scope) {
|
|
90
|
-
if (!("threads" in scope)) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
throw new Error("defineIdentity(...) `scope.threads` is not supported. " +
|
|
94
|
-
"Threads are always user-owned — omit `threads`.");
|
|
95
|
-
}
|
|
96
|
-
function assertAxis(axis, value, allowed) {
|
|
97
|
-
if (value === undefined) {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
if (!allowed.includes(value)) {
|
|
101
|
-
throw new Error(`defineIdentity(...) unknown \`scope.${axis}\` value "${String(value)}". ` +
|
|
102
|
-
`Valid values: ${allowed.join(", ")}.`);
|
|
103
|
-
}
|
|
104
|
-
return value;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* A resolver plus an explicitly managed credentials owner is a genuine conflict
|
|
108
|
-
* of intent (unlike a redundant `"custom"` sentinel), so it fails.
|
|
109
|
-
*/
|
|
110
|
-
function requireCustomCompatible(declared) {
|
|
111
|
-
if (declared !== undefined && declared !== "custom") {
|
|
112
|
-
throw new Error(`defineIdentity(...) provides a \`credentials\` resolver but \`scope.credentials\` is "${declared}". ` +
|
|
113
|
-
"Drop `scope.credentials` (the resolver implies custom mode) or remove the resolver.");
|
|
114
|
-
}
|
|
115
|
-
return "custom";
|
|
49
|
+
function isLangSmithApiKeyAuth(auth) {
|
|
50
|
+
return (!Array.isArray(auth) && "mode" in auth && auth.mode === "langsmith_api_key");
|
|
116
51
|
}
|
|
117
|
-
|
|
118
|
-
* Connect providers the deployment declared, plus the ones its credential
|
|
119
|
-
* resolvers depend on. A resolver that reads per-user OAuth tokens needs a place
|
|
120
|
-
* for the user to grant them, so the routes follow from the resolver rather than
|
|
121
|
-
* from a second opt-in that has to agree with it.
|
|
122
|
-
*
|
|
123
|
-
* For a per-target map this unions across every entry, so a multi-platform
|
|
124
|
-
* deployment gets each platform's routes without repeating any of them.
|
|
125
|
-
*/
|
|
126
|
-
function resolveConnect(options) {
|
|
127
|
-
const declared = options.connect ?? [];
|
|
128
|
-
const required = credentialConnectProviders(options.credentials);
|
|
129
|
-
const out = [...declared];
|
|
130
|
-
for (const provider of required) {
|
|
131
|
-
if (!out.some((existing) => existing.id === provider.id)) {
|
|
132
|
-
out.push(provider);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return out;
|
|
136
|
-
}
|
|
137
|
-
const KNOWN_OPTION_KEYS = new Set(["auth", "scope", "credentials", "connect"]);
|
|
52
|
+
const KNOWN_OPTION_KEYS = new Set(["auth"]);
|
|
138
53
|
/**
|
|
139
54
|
* Reject unknown keys so a typo fails loudly instead of being silently ignored.
|
|
140
55
|
*/
|
|
141
56
|
function assertOptionKeys(options) {
|
|
142
57
|
if (options === null || typeof options !== "object") {
|
|
143
|
-
throw new Error("defineIdentity(...)
|
|
58
|
+
throw new Error("defineIdentity(...) requires an options object ({ auth }).");
|
|
59
|
+
}
|
|
60
|
+
// `scope` carried three different removals, so a bare "unknown option" would
|
|
61
|
+
// leave a migrator guessing which one they hit.
|
|
62
|
+
if ("scope" in options) {
|
|
63
|
+
throw new Error("defineIdentity(...) `scope` is no longer supported. Threads and " +
|
|
64
|
+
"downstream credentials are always per-caller, so there is nothing to " +
|
|
65
|
+
"declare. Durable memory has its own root declaration: export `memory` " +
|
|
66
|
+
'from `memory.ts` with `defineMemory({ scope: "agent" })`.');
|
|
144
67
|
}
|
|
145
|
-
|
|
146
|
-
|
|
68
|
+
// Connect-with-X is hidden for this release (#235), so say that rather than
|
|
69
|
+
// reporting `connect` as a typo.
|
|
70
|
+
if ("connect" in options) {
|
|
71
|
+
throw new Error("defineIdentity(...) `connect` is not available in this release. " +
|
|
72
|
+
"Connect-with-X providers cannot be declared yet.");
|
|
147
73
|
}
|
|
148
74
|
const unknown = Object.keys(options).filter((key) => !KNOWN_OPTION_KEYS.has(key));
|
|
149
75
|
if (unknown.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/identity/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/identity/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8BH;;;;;GAKG;AACH,SAAS,gBAAgB;IACvB,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAwB;IACxD,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE1B,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC/C,KAAK,EAAE,gBAAgB,EAAE;KAC1B,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,IAAkB;IACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,+CAA+C,IAAI,+EAA+E,CACnI,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtD,OAAO,EAAE,IAAI,EAAE,iBAAiB,E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export declare class LangGraphIdentityLinkStore implements IdentityLinkStore {
|
|
|
47
47
|
export declare function setIdentityLinkStore(store: IdentityLinkStore | null): void;
|
|
48
48
|
/** Resolve the process-default link store (in-memory until a Client is wired). */
|
|
49
49
|
export declare function getIdentityLinkStore(): IdentityLinkStore;
|
|
50
|
-
/** Build a Store-backed client when
|
|
50
|
+
/** Build a Store-backed client when a trusted loopback credential is available. */
|
|
51
51
|
export declare function createLangGraphIdentityLinkStore(options?: {
|
|
52
52
|
apiUrl?: string;
|
|
53
53
|
apiKey?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../src/identity/slack/links.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../src/identity/slack/links.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAkBlD,eAAO,MAAM,wBAAwB,iCAAyC,CAAC;AAE/E,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACpE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAChE,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,C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AC9C,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GACzE,0BAA0B,GAAG,IAAI,CA+BnC;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,kBAAkB,CAWrB"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* upserts after OIDC.
|
|
8
8
|
*/
|
|
9
9
|
import { Client } from "@langchain/langgraph-sdk";
|
|
10
|
-
import { USER_HEADER, IDENTITY_LINKS_SERVICE_USER, IDENTITY_LINKS_STORE_PREFIX, INGRESS_SECRET_ENV, INGRESS_SECRET_HEADER, } from "../../runtime/auth.js";
|
|
11
|
-
import { resolveLoopbackApiKey, resolveLoopbackApiUrl } from "../loopback.js";
|
|
10
|
+
import { HANDOFF_SECRET_ENV, HANDOFF_SECRET_HEADER, USER_HEADER, IDENTITY_LINKS_SERVICE_USER, IDENTITY_LINKS_STORE_PREFIX, INGRESS_SECRET_ENV, INGRESS_SECRET_HEADER, LANGSMITH_API_KEY_ENV, } from "../../runtime/auth.js";
|
|
11
|
+
import { isLoopbackUrl, resolveLoopbackApiKey, resolveLoopbackApiUrl, } from "../loopback.js";
|
|
12
12
|
export const IDENTITY_LINKS_NAMESPACE = [IDENTITY_LINKS_STORE_PREFIX];
|
|
13
13
|
/** In-memory store for tests (and as a process-local cache layer). */
|
|
14
14
|
export class InMemoryIdentityLinkStore {
|
|
@@ -96,21 +96,37 @@ export function getIdentityLinkStore() {
|
|
|
96
96
|
createLangGraphIdentityLinkStore() ?? new InMemoryIdentityLinkStore();
|
|
97
97
|
return defaultStore;
|
|
98
98
|
}
|
|
99
|
-
/** Build a Store-backed client when
|
|
99
|
+
/** Build a Store-backed client when a trusted loopback credential is available. */
|
|
100
100
|
export function createLangGraphIdentityLinkStore(options = {}) {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
const serverApiKey = process.env[LANGSMITH_API_KEY_ENV]?.trim();
|
|
102
|
+
const configuredHandoffSecret = process.env[HANDOFF_SECRET_ENV]?.trim();
|
|
103
|
+
const explicitIngressSecret = options.ingressSecret?.trim();
|
|
104
|
+
const configuredIngressSecret = explicitIngressSecret || process.env[INGRESS_SECRET_ENV]?.trim();
|
|
105
105
|
const apiUrl = resolveLoopbackApiUrl(options.apiUrl);
|
|
106
106
|
const apiKey = resolveLoopbackApiKey(options.apiKey);
|
|
107
|
+
const isLocal = isLoopbackUrl(apiUrl);
|
|
108
|
+
const handoffSecret = isLocal ? configuredHandoffSecret : undefined;
|
|
109
|
+
const ingressSecret = isLocal ? configuredIngressSecret : undefined;
|
|
110
|
+
const usesServerApiKey = Boolean(serverApiKey && apiKey === serverApiKey);
|
|
111
|
+
if (!usesServerApiKey && !handoffSecret && !ingressSecret) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const defaultHeaders = {
|
|
115
|
+
[USER_HEADER]: IDENTITY_LINKS_SERVICE_USER,
|
|
116
|
+
};
|
|
117
|
+
if (!usesServerApiKey && explicitIngressSecret && ingressSecret) {
|
|
118
|
+
defaultHeaders[INGRESS_SECRET_HEADER] = ingressSecret;
|
|
119
|
+
}
|
|
120
|
+
else if (handoffSecret) {
|
|
121
|
+
defaultHeaders[HANDOFF_SECRET_HEADER] = handoffSecret;
|
|
122
|
+
}
|
|
123
|
+
else if (!usesServerApiKey && ingressSecret) {
|
|
124
|
+
defaultHeaders[INGRESS_SECRET_HEADER] = ingressSecret;
|
|
125
|
+
}
|
|
107
126
|
const client = new Client({
|
|
108
127
|
apiUrl,
|
|
109
128
|
apiKey,
|
|
110
|
-
defaultHeaders
|
|
111
|
-
[INGRESS_SECRET_HEADER]: ingressSecret,
|
|
112
|
-
[USER_HEADER]: IDENTITY_LINKS_SERVICE_USER,
|
|
113
|
-
},
|
|
129
|
+
defaultHeaders,
|
|
114
130
|
});
|
|
115
131
|
return new LangGraphIdentityLinkStore(client);
|
|
116
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../../src/identity/slack/links.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,WAAW,EACX,2BAA2B,EAC3B,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../../src/identity/slack/links.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,2BAA2B,EAC3B,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,2BAA2B,CAAU,CAAC;AAoB/E,sEAAsE;AACtE,MAAM,OAAO,yBAAyB;IACnB,OAAO,GAAG,IAAI,GAAG,EAA8B,CAAC;IAChD,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IAEhE,KAAK,CAAC,aAAa,CAAC,QAAgB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI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AAED,SAAS,YAAY,CAAC,MAAc;IAClC,OAAO,SAAS,MAAM,EAAE,CAAC;AAC3B,CAAC;AAED,SAAS,aAAa,CAAC,MAA0B;IAC/C,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;AACvB,CAAC;AAED,SAAS,aAAa,CACpB,KAA8B;IAE9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,IACE,OAAO,MAAM,KAAK,QAAQ;QAC1B,OAAO,WAAW,KAAK,QAAQ;QAC/B,OAAO,QAAQ,KAAK,QAAQ,EAC5B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO;QACL,MAAM;QACN,WAAW;QACX,QAAQ;QACR,GAAG,CAAC,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ;YACvC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE;YACpC,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,QAAQ,EACN,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ;YAChC,CAAC,CAAC,KAAK,CAAC,QAAQ;YAChB,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,MAAM,EAAE,aAAa;KACtB,CAAC;AACJ,CAAC"}
|
package/dist/identity/types.d.ts
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
import type { IdentityConnectProvider } from "./connect-provider-types.js";
|
|
8
8
|
export type { IdentityConnectProvider } from "./connect-provider-types.js";
|
|
9
9
|
/** How MDA learns who is calling on the HTTP ingress path. */
|
|
10
|
-
export type HttpIngress = "backend" | ValidatedTokenIngress;
|
|
10
|
+
export type HttpIngress = "backend" | LangSmithApiKeyIngress | ValidatedTokenIngress;
|
|
11
|
+
/** LangSmith workspace API-key ingress, verified by managed auth. */
|
|
12
|
+
export interface LangSmithApiKeyIngress {
|
|
13
|
+
mode: "langsmith_api_key";
|
|
14
|
+
}
|
|
11
15
|
/**
|
|
12
16
|
* Browser-direct ingress: MDA verifies the caller's own IdP token server-side
|
|
13
17
|
* and derives identity from its claims.
|
|
@@ -77,15 +81,6 @@ export interface ValidatedTokenProvider {
|
|
|
77
81
|
/** Custom header name when `tokenIn` is "header". */
|
|
78
82
|
header?: string;
|
|
79
83
|
};
|
|
80
|
-
/** MDA issues + verifies short-lived signed tokens for anonymous/guest users. */
|
|
81
|
-
guest?: {
|
|
82
|
-
/** Enable an issue/reissue path for this provider. */
|
|
83
|
-
issue: boolean;
|
|
84
|
-
/** Token lifetime, e.g. "24h". */
|
|
85
|
-
ttl?: string;
|
|
86
|
-
/** Prefix applied to the generated user id, e.g. "guest:". */
|
|
87
|
-
userPrefix?: string;
|
|
88
|
-
};
|
|
89
84
|
/** Maps verified token claims → identity envelope fields. */
|
|
90
85
|
claims: ClaimMapping;
|
|
91
86
|
}
|
|
@@ -185,33 +180,6 @@ export type CredentialResolverConfig = ({
|
|
|
185
180
|
* folded into a hand-written switch.
|
|
186
181
|
*/
|
|
187
182
|
export type CredentialResolvers = Record<string, CredentialResolverConfig>;
|
|
188
|
-
/** One enabled memory mount after normalize. Mounts are always read/write. */
|
|
189
|
-
export type ResolvedMemorySlice = {
|
|
190
|
-
kind: "user";
|
|
191
|
-
} | {
|
|
192
|
-
kind: "agent";
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* Resolved durable memory config: which slices are mounted.
|
|
196
|
-
*
|
|
197
|
-
* Empty array means no durable memory. Order is agent then user when both are
|
|
198
|
-
* present. User memory is always per-caller keyed (`{deploy}--u--{user}`).
|
|
199
|
-
*/
|
|
200
|
-
export type MemoryScope = ResolvedMemorySlice[];
|
|
201
|
-
/** Authoring form of a single memory slice. */
|
|
202
|
-
export type MemorySliceInput = "user" | "agent";
|
|
203
|
-
/**
|
|
204
|
-
* Authoring form of `scope.memory`.
|
|
205
|
-
*
|
|
206
|
-
* - `"none"` / `[]` — no durable memory
|
|
207
|
-
* - `"user"` / `"agent"` — that slice only
|
|
208
|
-
* - `["agent", "user"]` — both (procedural + personal)
|
|
209
|
-
*
|
|
210
|
-
* Object slice syntax (`{ kind }`) is not part of the authoring surface yet.
|
|
211
|
-
* Legacy flat `"organization"`, any `partition` field, and any `access` field
|
|
212
|
-
* are rejected (mounts are always R/W).
|
|
213
|
-
*/
|
|
214
|
-
export type MemoryScopeInput = "none" | MemorySliceInput | MemorySliceInput[];
|
|
215
183
|
/**
|
|
216
184
|
* Whose token downstream calls carry.
|
|
217
185
|
*
|
|
@@ -227,18 +195,19 @@ export type CredentialScope = "user" | "agent" | "none" | "custom";
|
|
|
227
195
|
* The resolved identity contract the runtime reads.
|
|
228
196
|
*
|
|
229
197
|
* `defineIdentity` derives this from {@link IdentityOptions}; it is not an
|
|
230
|
-
* authoring surface.
|
|
231
|
-
*
|
|
198
|
+
* authoring surface. Scope remains explicit here so runtime policy is inspectable
|
|
199
|
+
* without exposing it as a declaration knob.
|
|
232
200
|
*/
|
|
233
201
|
export interface IdentityConfig {
|
|
234
202
|
/** How MDA learns who is calling. */
|
|
235
203
|
ingress: {
|
|
236
204
|
http: HttpIngress;
|
|
237
205
|
};
|
|
238
|
-
/**
|
|
206
|
+
/**
|
|
207
|
+
* Isolation axes. Threads are always user-owned, and durable memory is not an
|
|
208
|
+
* identity axis — it is declared in `memory.ts` (see `MemoryConfig`).
|
|
209
|
+
*/
|
|
239
210
|
scope: {
|
|
240
|
-
/** Enabled memory slices (empty = none). */
|
|
241
|
-
memory: MemoryScope;
|
|
242
211
|
/**
|
|
243
212
|
* Whose downstream tokens / Connect ownership apply. `"custom"` when a
|
|
244
213
|
* resolver/endpoint is provided below.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/identity/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,8DAA8D;AAC9D,MAAM,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/identity/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,qEAAqE;AACrE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB;;;;OAIG;IACH,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAED,qDAAqD;AACrD,MAAM,WAAW,sBAAsB;IACrC,kFAAkF;IAClF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,C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M,WAAW,cAAc;IAC7B,qCAAqC;IACrC,OAAO,EAAE;QACP,IAAI,EAAE,WAAW,CAAC;KACnB,CAAC;IACF;;;OAGG;IACH,KAAK,EAAE;QACL;;;WAGG;QACH,WAAW,CAAC,EAAE,eAAe,CAAC;KAC/B,CAAC;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,wBAAwB,GAAG,mBAAmB,CAAC;IAC7D;;;OAGG;IACH,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACrC;AAED,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
export { defineDeepAgent } from "./define-deep-agent.js";
|
|
2
2
|
export { defineSchedule } from "./schedules.js";
|
|
3
3
|
export { defineIdentity } from "./identity/index.js";
|
|
4
|
-
export {
|
|
5
|
-
export
|
|
4
|
+
export { defineMemory } from "./memory/index.js";
|
|
5
|
+
export { auth, channels, credentials } from "./namespaces.js";
|
|
6
|
+
export { defineSandbox } from "./sandbox.js";
|
|
7
|
+
export type { Channels } from "./namespaces.js";
|
|
6
8
|
export type { DeepAgentDefinition, DefineDeepAgentConfig, ManagedDeepAgentKey, } from "./types.js";
|
|
7
9
|
export type { ScheduleConfig, ScheduleDefinition, ScheduleDeliveryTarget, ScheduleThreadConfig, } from "./schedules.js";
|
|
8
|
-
export type { ClaimMapping, CredentialConnectRequirements, CredentialResolver, CredentialResolverConfig, CredentialResolvers, CredentialScope, CredentialTarget, GitHubAppJwtArgs, GitHubCredentialsOptions, GitHubTokenSource, GitHubUserTokenArgs, HttpIngress, IdentityAuth, IdentityConfig,
|
|
9
|
-
export type {
|
|
10
|
-
export type { ToolSelection, ToolSelectionConnectorConfig, } from "./connectors/tool-selection.js";
|
|
11
|
-
export type { ToolServerConnector, ToolServerConnectorConfig, ToolServerConnectorFactory, ToolServerConnectorFactoryFor, ToolServerConnectors, ToolServerFactoryName, ToolServerIntegration, ToolServerIntegrationEntry, ToolServerSlug, ToolServerToolSelection, ToolsForFactory, } from "./connectors/toolserver/index.js";
|
|
12
|
-
export { integrationForFactory } from "./connectors/toolserver/index.js";
|
|
10
|
+
export type { ClaimMapping, CredentialConnectRequirements, CredentialResolver, CredentialResolverConfig, CredentialResolvers, CredentialScope, CredentialTarget, GitHubAppJwtArgs, GitHubCredentialsOptions, GitHubTokenSource, GitHubUserTokenArgs, HttpIngress, IdentityAuth, IdentityConfig, IdentityDefinition, IdentityOptions, LangSmithApiKeyIngress, ResolvedCredential, RuntimeIdentity, ValidatedTokenIngress, ValidatedTokenProvider, } from "./identity/index.js";
|
|
11
|
+
export type { MemoryConfig, MemoryDefinition, MemoryOptions, MemoryScope, MemoryScopeInput, MemorySliceInput, MemorySliceKind, ResolvedMemorySlice, } from "./memory/index.js";
|
|
13
12
|
export type { ChannelManifest, RequiredSlackChannelConfig, SlackChannel, SlackChannelConfig, SlackChannelFilters, SlackChannelTrigger, SlackConversationPolicy, SlackMentionBehavior, } from "./channels/slack/index.js";
|
|
14
|
-
export type {
|
|
15
|
-
export type { LangSmithSandboxOptions, SandboxDefinition, SandboxScope, } from "./sandbox.js";
|
|
13
|
+
export type { SandboxDefinition, SandboxOptions, SandboxScope, } from "./sandbox.js";
|
|
16
14
|
export type { ManagedDeepAgentRuntime, ManagedRuntimeExtras, } from "./runtime/managed-tools.js";
|
|
17
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAA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rB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { defineDeepAgent } from "./define-deep-agent.js";
|
|
2
2
|
export { defineSchedule } from "./schedules.js";
|
|
3
3
|
export { defineIdentity } from "./identity/index.js";
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { defineMemory } from "./memory/index.js";
|
|
5
|
+
export { auth, channels, credentials } from "./namespaces.js";
|
|
6
|
+
export { defineSandbox } from "./sandbox.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ingress/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ingress/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAkBhC,6EAA6E;AAC7E,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EACzB,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAChD,GACA,IAAI,CASN;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAelB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CA6CnC;AA4CD,2EAA2E;AAC3E,wB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