managed-deepagents 0.5.3-dev.112 → 0.5.3-dev.113
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 +32 -18
- package/dist/channels/manifest.d.ts +0 -2
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/extension.d.ts +2 -2
- package/dist/extension.js +2 -2
- package/dist/identity/index.d.ts +2 -4
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +8 -55
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/options.js +5 -0
- package/dist/identity/options.js.map +1 -1
- package/dist/identity/supabase.d.ts.map +1 -1
- package/dist/identity/supabase.js +2 -0
- package/dist/identity/supabase.js.map +1 -1
- package/dist/identity/types.d.ts +8 -60
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/namespaces.d.ts +0 -6
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +0 -6
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/auth.d.ts +11 -14
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +15 -54
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/cors.d.ts +4 -4
- package/dist/runtime/cors.d.ts.map +1 -1
- package/dist/runtime/cors.js +4 -8
- package/dist/runtime/cors.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +2 -10
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +2 -38
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +15 -3
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +8 -9
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/managed-middleware.d.ts +2 -3
- package/dist/runtime/managed-middleware.d.ts.map +1 -1
- package/dist/runtime/managed-middleware.js +12 -12
- package/dist/runtime/managed-middleware.js.map +1 -1
- package/dist/runtime/managed-tools.d.ts +4 -11
- package/dist/runtime/managed-tools.d.ts.map +1 -1
- package/dist/runtime/managed-tools.js +11 -18
- package/dist/runtime/managed-tools.js.map +1 -1
- package/dist/runtime/memory/context-io.d.ts +0 -1
- package/dist/runtime/memory/context-io.d.ts.map +1 -1
- package/dist/runtime/memory/context-io.js +0 -10
- package/dist/runtime/memory/context-io.js.map +1 -1
- package/dist/runtime/memory/mounts.d.ts.map +1 -1
- package/dist/runtime/memory/mounts.js +0 -10
- package/dist/runtime/memory/mounts.js.map +1 -1
- package/dist/runtime/validated-token.d.ts.map +1 -1
- package/dist/runtime/validated-token.js +7 -1
- package/dist/runtime/validated-token.js.map +1 -1
- package/package.json +15 -14
- package/types/index.d.ts +6 -0
- package/types/markdown-md.d.ts +14 -0
- package/dist/channels/index.d.ts +0 -25
- package/dist/channels/index.d.ts.map +0 -1
- package/dist/channels/index.js +0 -18
- package/dist/channels/index.js.map +0 -1
- package/dist/identity/credential-resolvers.d.ts +0 -21
- package/dist/identity/credential-resolvers.d.ts.map +0 -1
- package/dist/identity/credential-resolvers.js +0 -31
- package/dist/identity/credential-resolvers.js.map +0 -1
- package/dist/identity/github/credentials-store.d.ts +0 -76
- package/dist/identity/github/credentials-store.d.ts.map +0 -1
- package/dist/identity/github/credentials-store.js +0 -270
- package/dist/identity/github/credentials-store.js.map +0 -1
- package/dist/identity/github/credentials.d.ts +0 -85
- package/dist/identity/github/credentials.d.ts.map +0 -1
- package/dist/identity/github/credentials.js +0 -183
- package/dist/identity/github/credentials.js.map +0 -1
- package/dist/identity/github/index.d.ts +0 -5
- package/dist/identity/github/index.d.ts.map +0 -1
- package/dist/identity/github/index.js +0 -5
- package/dist/identity/github/index.js.map +0 -1
- package/dist/runtime/credentials.d.ts +0 -68
- package/dist/runtime/credentials.d.ts.map +0 -1
- package/dist/runtime/credentials.js +0 -235
- package/dist/runtime/credentials.js.map +0 -1
package/README.md
CHANGED
|
@@ -45,14 +45,18 @@ per-platform optional dependencies, so install only downloads the binary for you
|
|
|
45
45
|
OS and CPU architecture. This npm-installed CLI scaffolds and compiles TypeScript
|
|
46
46
|
projects only and vendors the TypeScript runtime bundled with this package.
|
|
47
47
|
|
|
48
|
-
To start a new project:
|
|
48
|
+
To start a new project, run `mda init` and follow the guided setup:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
mda init
|
|
52
|
-
cd my-agent
|
|
53
|
-
npm install
|
|
51
|
+
mda init
|
|
54
52
|
```
|
|
55
53
|
|
|
54
|
+
After scaffolding, choose a coding agent to continue building or choose
|
|
55
|
+
**View raw prompt** to copy the setup instructions. The CLI supports Deep Agents
|
|
56
|
+
Code, Claude Code, Codex, Cursor, Droid, Gemini CLI, opencode, and Pi. If Deep
|
|
57
|
+
Agents Code is not installed, selecting it offers the official install command;
|
|
58
|
+
on native Windows, use WSL. Coding agents open in the new project directory.
|
|
59
|
+
|
|
56
60
|
`mda init` can shape the project up front — `--instructions "..."` (or
|
|
57
61
|
`--instructions-file <path>`) writes the system prompt, `--model <spec>` picks
|
|
58
62
|
the model, `--memory agent` opts into deployment-shared durable memory, and
|
|
@@ -60,8 +64,7 @@ the model, `--memory agent` opts into deployment-shared durable memory, and
|
|
|
60
64
|
`identity.ts` that explicitly selects `auth.langsmithApiKey()` authentication.
|
|
61
65
|
Managed Deep Agent evals are Harbor tasks under `evals/tasks/`. Optionally create
|
|
62
66
|
a minimal source task under `evals/scaffold/` with `mda evals init <name>`, then
|
|
63
|
-
package the managed agent and scaffolded tasks with `mda evals compile
|
|
64
|
-
Nothing prompts, so these commands also work in coding agents and CI scripts.
|
|
67
|
+
package the managed agent and scaffolded tasks with `mda evals compile`.
|
|
65
68
|
|
|
66
69
|
`mda init my-agent --gateway` runs the agent on
|
|
67
70
|
[LangSmith Gateway](https://docs.langchain.com/langsmith/gateway) — a model
|
|
@@ -136,14 +139,25 @@ Create one file per schedule under `schedules/` and export a named `schedule`:
|
|
|
136
139
|
```ts
|
|
137
140
|
// schedules/daily-digest.ts
|
|
138
141
|
import { defineSchedule } from "managed-deepagents";
|
|
142
|
+
import prompt from "./daily-digest.md" with { type: "text" };
|
|
139
143
|
|
|
140
144
|
export const schedule = defineSchedule({
|
|
141
145
|
cron: "0 8 * * 1-5",
|
|
142
146
|
timezone: "America/Los_Angeles",
|
|
143
|
-
prompt
|
|
147
|
+
prompt,
|
|
144
148
|
});
|
|
145
149
|
```
|
|
146
150
|
|
|
151
|
+
```md
|
|
152
|
+
<!-- schedules/daily-digest.md -->
|
|
153
|
+
Write the daily digest.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`mda` inlines `import … with { type: "text" }` into a string constant at compile
|
|
157
|
+
time. The package also ships ambient `*.md` typings, so TypeScript accepts the
|
|
158
|
+
import once you depend on `managed-deepagents` — no project-local
|
|
159
|
+
`declare module "*.md"` needed.
|
|
160
|
+
|
|
147
161
|
`mda deploy` reconciles schedules as LangSmith cron jobs after the deployment is
|
|
148
162
|
live. Declarations must be statically serializable literals or top-level
|
|
149
163
|
constants; prompt schedules become user-message input, and stateless runs clean
|
|
@@ -249,11 +263,11 @@ mda delete ./my-agent
|
|
|
249
263
|
```
|
|
250
264
|
|
|
251
265
|
`mda delete` (alias `mda destroy`) removes the LangSmith deployment, the tracing
|
|
252
|
-
project created alongside it, the deployment's Context Hub repo
|
|
253
|
-
per-user memory repos
|
|
254
|
-
deployment created. It asks for confirmation first; pass `--yes`
|
|
255
|
-
prompt in scripts. Agent memory and thread history are not
|
|
256
|
-
afterwards.
|
|
266
|
+
project created alongside it, the deployment's Context Hub repo (plus any legacy
|
|
267
|
+
per-user or org child memory repos left from older runtimes), and the managed
|
|
268
|
+
sandboxes the deployment created. It asks for confirmation first; pass `--yes`
|
|
269
|
+
to skip the prompt in scripts. Agent memory and thread history are not
|
|
270
|
+
recoverable afterwards.
|
|
257
271
|
|
|
258
272
|
Sandboxes are matched by name: the runtime names each one
|
|
259
273
|
`{deployment}--{digest}`, which also lets a restarted deployment re-adopt its
|
|
@@ -264,9 +278,9 @@ Sandboxes created before this behavior existed are unnamed and are left to
|
|
|
264
278
|
LangSmith's idle-stop and retention window.
|
|
265
279
|
|
|
266
280
|
Before deploying, make sure your model provider key such as `OPENAI_API_KEY`
|
|
267
|
-
or `ANTHROPIC_API_KEY` is available in the project `.env
|
|
268
|
-
|
|
269
|
-
`LANGSMITH_API_KEY`
|
|
270
|
-
prompt to sign in with your browser (the
|
|
271
|
-
`.env`). TypeScript deploys also require
|
|
272
|
-
generates a lockfile for the remote build.
|
|
281
|
+
or `ANTHROPIC_API_KEY` is available in the project `.env` or LangSmith
|
|
282
|
+
workspace secrets; a value exported in your shell is not deployed. For
|
|
283
|
+
LangSmith itself, set `LANGSMITH_API_KEY` in `.env` or your shell, or run
|
|
284
|
+
interactively and press Enter at the prompt to sign in with your browser (the
|
|
285
|
+
CLI creates a key and writes it to `.env`). TypeScript deploys also require
|
|
286
|
+
`npm` on `PATH` because the CLI generates a lockfile for the remote build.
|
|
@@ -32,6 +32,4 @@ export interface ChannelManifest {
|
|
|
32
32
|
/** Opaque-to-core provider config (Slack filters/conversation, …). */
|
|
33
33
|
providerConfig: JsonObject;
|
|
34
34
|
}
|
|
35
|
-
/** Author-supplied requirements fields; `name` / `provider` are stamped by the factory. */
|
|
36
|
-
export type ChannelManifestBody = Omit<ChannelManifest, "name" | "provider">;
|
|
37
35
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/channels/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,gEAAgE;IAChE,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,sEAAsE;IACtE,cAAc,EAAE,UAAU,CAAC;CAC5B
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/channels/manifest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,gEAAgE;IAChE,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,sEAAsE;IACtE,cAAc,EAAE,UAAU,CAAC;CAC5B"}
|
package/dist/extension.d.ts
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* project cannot mount its own adapter or HTTP route into the managed runtime.
|
|
17
17
|
* Opening it up to third-party packages is a later step.
|
|
18
18
|
*
|
|
19
|
-
* The `auth`
|
|
20
|
-
* than through here:
|
|
19
|
+
* The `auth` primitive is extended by a plain factory rather
|
|
20
|
+
* than through here: it returns inert configuration objects with no brand,
|
|
21
21
|
* hooks, or normalization to share. They gain an envelope when this API is
|
|
22
22
|
* exported and their inputs need validating at the boundary.
|
|
23
23
|
*/
|
package/dist/extension.js
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* project cannot mount its own adapter or HTTP route into the managed runtime.
|
|
17
17
|
* Opening it up to third-party packages is a later step.
|
|
18
18
|
*
|
|
19
|
-
* The `auth`
|
|
20
|
-
* than through here:
|
|
19
|
+
* The `auth` primitive is extended by a plain factory rather
|
|
20
|
+
* than through here: it returns inert configuration objects with no brand,
|
|
21
21
|
* hooks, or normalization to share. They gain an envelope when this API is
|
|
22
22
|
* exported and their inputs need validating at the boundary.
|
|
23
23
|
*/
|
package/dist/identity/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A project's root `identity.ts` exports a named `identity` created with
|
|
5
5
|
* `defineIdentity(...)`. The compiler discovers it, generates the custom-auth
|
|
6
|
-
* handler, and wires thread
|
|
6
|
+
* handler, and wires thread ownership for authenticated callers.
|
|
7
7
|
*
|
|
8
8
|
* This module is pure authoring-time config construction plus eager validation —
|
|
9
9
|
* it has no runtime dependency (the `auth.*` helpers return plain data).
|
|
@@ -14,9 +14,7 @@ import type { IdentityConfig, IdentityDefinition, LangSmithApiKeyIngress, Valida
|
|
|
14
14
|
export { normalizeGroups, userClaimName } from "./claims.js";
|
|
15
15
|
export { normalizeIdentity } from "./options.js";
|
|
16
16
|
export type { IdentityAuth, IdentityOptions } from "./options.js";
|
|
17
|
-
export {
|
|
18
|
-
export type { ClaimMapping, CredentialResolver, CredentialResolverConfig, CredentialResolvers, CredentialScope, CredentialTarget, HttpIngress, IdentityConfig, IdentityDefinition, LangSmithApiKeyIngress, ResolvedCredential, RuntimeIdentity, ValidatedTokenIngress, ValidatedTokenProvider, } from "./types.js";
|
|
19
|
-
export type { GitHubAppJwtArgs, GitHubCredentialsOptions, GitHubTokenSource, GitHubUserTokenArgs, } from "./github/credentials.js";
|
|
17
|
+
export type { ClaimMapping, CredentialScope, HttpIngress, IdentityConfig, IdentityDefinition, LangSmithApiKeyIngress, RuntimeIdentity, ValidatedTokenIngress, ValidatedTokenProvider, } from "./types.js";
|
|
20
18
|
/**
|
|
21
19
|
* Declare the identity contract for the deployment.
|
|
22
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,KAAK,uBAAuB,EAAoB,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EAEtB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAElE,YAAY,EACV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAI3E;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI;IACf,2EAA2E;IAC3E,eAAe,IAAI,sBAAsB;IAGzC,oCAAoC;IACpC,QAAQ,UAAU,uBAAuB,GAAG,sBAAsB;CAGnE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAuC7D"}
|
package/dist/identity/index.js
CHANGED
|
@@ -3,18 +3,16 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A project's root `identity.ts` exports a named `identity` created with
|
|
5
5
|
* `defineIdentity(...)`. The compiler discovers it, generates the custom-auth
|
|
6
|
-
* handler, and wires thread
|
|
6
|
+
* handler, and wires thread ownership for authenticated callers.
|
|
7
7
|
*
|
|
8
8
|
* This module is pure authoring-time config construction plus eager validation —
|
|
9
9
|
* it has no runtime dependency (the `auth.*` helpers return plain data).
|
|
10
10
|
*/
|
|
11
11
|
import { userClaimName } from "./claims.js";
|
|
12
|
-
import { isSingleCredentialResolver } from "./credential-resolvers.js";
|
|
13
12
|
import { normalizeIdentity } from "./options.js";
|
|
14
13
|
import { supabaseProvider } from "./supabase.js";
|
|
15
14
|
export { normalizeGroups, userClaimName } from "./claims.js";
|
|
16
15
|
export { normalizeIdentity } from "./options.js";
|
|
17
|
-
export { credentialTargetNames, isSingleCredentialResolver, } from "./credential-resolvers.js";
|
|
18
16
|
/**
|
|
19
17
|
* Declare the identity contract for the deployment.
|
|
20
18
|
*
|
|
@@ -54,8 +52,6 @@ export const auth = {
|
|
|
54
52
|
return supabaseProvider(options);
|
|
55
53
|
},
|
|
56
54
|
};
|
|
57
|
-
/** Non-custom credentials modes currently selectable on `CredentialScope`. */
|
|
58
|
-
const MANAGED_CREDENTIAL_MODES = ["user", "agent", "none"];
|
|
59
55
|
/**
|
|
60
56
|
* Eagerly reject illegal identity configs at authoring time so misconfig never
|
|
61
57
|
* reaches the compiler or runtime.
|
|
@@ -78,21 +74,6 @@ export function validateIdentity(config) {
|
|
|
78
74
|
"has its own root declaration: export `memory` from `memory.ts` with " +
|
|
79
75
|
'`defineMemory({ scope: "agent" })`, and drop `scope.memory` here.');
|
|
80
76
|
}
|
|
81
|
-
// Credentials axis must agree with the presence of a resolver/endpoint.
|
|
82
|
-
const hasResolver = config.credentials !== undefined;
|
|
83
|
-
const credentialsMode = scope.credentials;
|
|
84
|
-
if (credentialsMode === "custom" && !hasResolver) {
|
|
85
|
-
throw new Error('defineIdentity(...) with scope.credentials: "custom" requires a `credentials` resolver or endpoint.');
|
|
86
|
-
}
|
|
87
|
-
if (hasResolver &&
|
|
88
|
-
typeof credentialsMode === "string" &&
|
|
89
|
-
MANAGED_CREDENTIAL_MODES.includes(credentialsMode)) {
|
|
90
|
-
throw new Error(`defineIdentity(...) provides a \`credentials\` resolver but scope.credentials is "${credentialsMode}". ` +
|
|
91
|
-
'Set scope.credentials: "custom" (or remove the resolver).');
|
|
92
|
-
}
|
|
93
|
-
if (hasResolver) {
|
|
94
|
-
validateCredentialResolver(config.credentials);
|
|
95
|
-
}
|
|
96
77
|
// validated_token ingress needs at least one provider, each with claims.user.
|
|
97
78
|
const http = ingress.http;
|
|
98
79
|
if (isLangSmithApiKey(http)) {
|
|
@@ -139,44 +120,16 @@ function validateValidatedToken(http) {
|
|
|
139
120
|
provider.discover === true ||
|
|
140
121
|
typeof provider.discoveryUrl === "string" ||
|
|
141
122
|
provider.introspect !== undefined;
|
|
123
|
+
// Local JWKS/OIDC verification must reject tokens minted for another app.
|
|
124
|
+
// Introspection leaves audience checks to the IdP.
|
|
125
|
+
if (hasVerifier &&
|
|
126
|
+
provider.introspect === undefined &&
|
|
127
|
+
(typeof provider.audience !== "string" || provider.audience.length === 0)) {
|
|
128
|
+
throw new Error(`defineIdentity(...) validated_token provider ${label} requires a non-empty audience for JWKS verification.`);
|
|
129
|
+
}
|
|
142
130
|
if (!hasVerifier) {
|
|
143
131
|
throw new Error(`defineIdentity(...) validated_token provider ${label} must declare one of \`jwks\`, \`discover\`, \`discoveryUrl\`, or \`introspect\`.`);
|
|
144
132
|
}
|
|
145
133
|
}
|
|
146
134
|
}
|
|
147
|
-
function validateCredentialResolver(credentials) {
|
|
148
|
-
if (credentials === null || typeof credentials !== "object") {
|
|
149
|
-
throw new Error("defineIdentity(...) `credentials` must be a resolver ({ resolve }), an endpoint " +
|
|
150
|
-
"({ endpoint }), or a map of target name to either.");
|
|
151
|
-
}
|
|
152
|
-
if (isSingleCredentialResolver(credentials)) {
|
|
153
|
-
validateOneCredentialResolver(credentials, "`credentials`");
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
// Per-target map. An empty one resolves nothing, which is always a mistake.
|
|
157
|
-
const entries = Object.entries(credentials);
|
|
158
|
-
if (entries.length === 0) {
|
|
159
|
-
throw new Error("defineIdentity(...) `credentials` map must declare at least one target, " +
|
|
160
|
-
"e.g. `{ github: credentials.github({ … }) }`.");
|
|
161
|
-
}
|
|
162
|
-
for (const [name, entry] of entries) {
|
|
163
|
-
if (!name.trim()) {
|
|
164
|
-
throw new Error("defineIdentity(...) `credentials` map keys must be non-empty target names.");
|
|
165
|
-
}
|
|
166
|
-
validateOneCredentialResolver(entry, `\`credentials.${name}\``);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function validateOneCredentialResolver(entry, label) {
|
|
170
|
-
if (entry === null || typeof entry !== "object") {
|
|
171
|
-
throw new Error(`defineIdentity(...) ${label} must be a resolver ({ resolve }) or endpoint ({ endpoint }) config.`);
|
|
172
|
-
}
|
|
173
|
-
const cfg = entry;
|
|
174
|
-
const hasResolveFn = typeof cfg.resolve === "function";
|
|
175
|
-
const hasEndpoint = typeof cfg.endpoint === "object" &&
|
|
176
|
-
cfg.endpoint !== null &&
|
|
177
|
-
typeof cfg.endpoint.url === "string";
|
|
178
|
-
if (hasResolveFn === hasEndpoint) {
|
|
179
|
-
throw new Error(`defineIdentity(...) ${label} requires exactly one of \`resolve\` (function) or \`endpoint\` ({ url }).`);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
135
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"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C;QACJ,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,gDAAgD,KAAK,mFAAmF,CACzI,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/identity/options.js
CHANGED
|
@@ -65,6 +65,11 @@ function assertOptionKeys(options) {
|
|
|
65
65
|
"declare. Durable memory has its own root declaration: export `memory` " +
|
|
66
66
|
'from `memory.ts` with `defineMemory({ scope: "agent" })`.');
|
|
67
67
|
}
|
|
68
|
+
if ("credentials" in options) {
|
|
69
|
+
throw new Error("defineIdentity(...) `credentials` is no longer supported. Downstream " +
|
|
70
|
+
"credentials are always per-caller. Mint tokens in your own tools " +
|
|
71
|
+
"(for example from `GITHUB_TOKEN`) rather than declaring a resolver.");
|
|
72
|
+
}
|
|
68
73
|
const unknown = Object.keys(options).filter((key) => !KNOWN_OPTION_KEYS.has(key));
|
|
69
74
|
if (unknown.length > 0) {
|
|
70
75
|
throw new Error(`defineIdentity(...) unknown option(s): ${unknown.join(", ")}. ` +
|
|
@@ -1 +1 @@
|
|
|
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,S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IAAI,CAAC,IAAI,CAAC,GAAG,CACzD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/identity/supabase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN;IACE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEN,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACzC,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAStD;AAyDD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/identity/supabase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN;IACE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEN,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACzC,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAStD;AAyDD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CAkFxB"}
|
|
@@ -120,6 +120,7 @@ export function supabaseProvider(options) {
|
|
|
120
120
|
return {
|
|
121
121
|
id: "supabase",
|
|
122
122
|
discoveryUrl: supabaseAuthV1Base(url),
|
|
123
|
+
audience: "authenticated",
|
|
123
124
|
algorithms: ["ES256", "RS256"],
|
|
124
125
|
claims: { user: "email" },
|
|
125
126
|
};
|
|
@@ -132,6 +133,7 @@ export function supabaseProvider(options) {
|
|
|
132
133
|
id: "supabase",
|
|
133
134
|
issuer: base,
|
|
134
135
|
jwks: `${base}/.well-known/jwks.json`,
|
|
136
|
+
audience: "authenticated",
|
|
135
137
|
algorithms: ["ES256", "RS256"],
|
|
136
138
|
claims: { user: "email" },
|
|
137
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supabase.js","sourceRoot":"","sources":["../../src/identity/supabase.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuCH,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,WAAW,UAAU,sBAAsB,CAAC;AACrD,CAAC;AAED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QACZ,IAAI,EAAE,GAAG,IAAI,wBAAwB;QACrC,QAAQ,EAAE,eAAe;QACzB,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KAC1B,CAAC;AACJ,CAAC"}
|
package/dist/identity/types.d.ts
CHANGED
|
@@ -34,7 +34,10 @@ export interface ValidatedTokenProvider {
|
|
|
34
34
|
* introspect provider).
|
|
35
35
|
*/
|
|
36
36
|
issuers?: string[];
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Expected audience (`aud`). Required for local JWKS/OIDC verification;
|
|
39
|
+
* optional for introspection, where the IdP validates the token.
|
|
40
|
+
*/
|
|
38
41
|
audience?: string;
|
|
39
42
|
/** Accepted signing algorithms, e.g. `["RS256"]`. */
|
|
40
43
|
algorithms?: string[];
|
|
@@ -98,26 +101,6 @@ export interface ClaimMapping {
|
|
|
98
101
|
/** Claim used as `runtime.identity.user.email`. */
|
|
99
102
|
email?: string;
|
|
100
103
|
}
|
|
101
|
-
/** Which downstream call needs a credential right now. */
|
|
102
|
-
export interface CredentialTarget {
|
|
103
|
-
/** What is being called. */
|
|
104
|
-
kind: "subagent" | "mcp" | "connection";
|
|
105
|
-
/** The configured name, e.g. "code-reviewer" | "docs" | "github". */
|
|
106
|
-
name: string;
|
|
107
|
-
/** Optional read/write hint so the resolver can mint different tokens. */
|
|
108
|
-
intent?: "read" | "write";
|
|
109
|
-
/** Current thread, when the credential is thread-specific. */
|
|
110
|
-
threadId?: string;
|
|
111
|
-
/** Free-form context (e.g. `{ repo, installationId }`); part of the cache key. */
|
|
112
|
-
metadata?: Record<string, unknown>;
|
|
113
|
-
}
|
|
114
|
-
/** What a credential resolver returns. */
|
|
115
|
-
export interface ResolvedCredential {
|
|
116
|
-
/** Headers MDA attaches to the downstream call (usually Authorization). */
|
|
117
|
-
headers: Record<string, string>;
|
|
118
|
-
/** ISO expiry; MDA caches per (user, target) until then. */
|
|
119
|
-
expiresAt?: string;
|
|
120
|
-
}
|
|
121
104
|
/** The frozen identity envelope tools and middleware see. */
|
|
122
105
|
export interface RuntimeIdentity {
|
|
123
106
|
/** The caller. `kind: "service"` for machine callers (schedules, channels, Studio). */
|
|
@@ -141,40 +124,13 @@ export interface RuntimeIdentity {
|
|
|
141
124
|
};
|
|
142
125
|
claims?: Record<string, unknown>;
|
|
143
126
|
}
|
|
144
|
-
/** An in-process resolver callback. */
|
|
145
|
-
export type CredentialResolver = (args: {
|
|
146
|
-
identity: RuntimeIdentity;
|
|
147
|
-
target: CredentialTarget;
|
|
148
|
-
}) => Promise<ResolvedCredential>;
|
|
149
|
-
/**
|
|
150
|
-
* Provide this to mint your own downstream credentials per caller: an in-process
|
|
151
|
-
* callback or a hosted token-exchange endpoint. Providing it puts the
|
|
152
|
-
* credentials axis in custom mode.
|
|
153
|
-
*/
|
|
154
|
-
export type CredentialResolverConfig = {
|
|
155
|
-
resolve: CredentialResolver;
|
|
156
|
-
} | {
|
|
157
|
-
endpoint: {
|
|
158
|
-
url: string;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* One resolver per downstream platform, keyed by {@link CredentialTarget.name}.
|
|
163
|
-
*
|
|
164
|
-
* Use this instead of a single resolver when an agent integrates more than one
|
|
165
|
-
* platform. MDA dispatches on the target name, so each entry stays a focused
|
|
166
|
-
* config rather than being folded into a hand-written switch.
|
|
167
|
-
*/
|
|
168
|
-
export type CredentialResolvers = Record<string, CredentialResolverConfig>;
|
|
169
127
|
/**
|
|
170
128
|
* Whose token downstream calls carry.
|
|
171
129
|
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* - `"custom"` — author-supplied resolver/endpoint (`CredentialsProvider`).
|
|
175
|
-
* - `"none"` — no managed credential owner.
|
|
130
|
+
* Managed identity always keys credentials on the caller. This axis is not an
|
|
131
|
+
* authoring knob — `defineIdentity` always resolves it to `"user"`.
|
|
176
132
|
*/
|
|
177
|
-
export type CredentialScope = "user"
|
|
133
|
+
export type CredentialScope = "user";
|
|
178
134
|
/**
|
|
179
135
|
* The resolved identity contract the runtime reads.
|
|
180
136
|
*
|
|
@@ -192,17 +148,9 @@ export interface IdentityConfig {
|
|
|
192
148
|
* identity axis — it is declared in `memory.ts` (see `MemoryConfig`).
|
|
193
149
|
*/
|
|
194
150
|
scope: {
|
|
195
|
-
/**
|
|
196
|
-
* Whose downstream tokens apply. `"custom"` when a resolver/endpoint is
|
|
197
|
-
* provided below.
|
|
198
|
-
*/
|
|
151
|
+
/** Whose downstream tokens apply. Always `"user"` for managed identity. */
|
|
199
152
|
credentials?: CredentialScope;
|
|
200
153
|
};
|
|
201
|
-
/**
|
|
202
|
-
* Present when `scope.credentials` is "custom" (or a resolver is set).
|
|
203
|
-
* Either one resolver for every target, or one per target name.
|
|
204
|
-
*/
|
|
205
|
-
credentials?: CredentialResolverConfig | CredentialResolvers;
|
|
206
154
|
}
|
|
207
155
|
/** The object exported from the project's root `identity.ts`. */
|
|
208
156
|
export interface IdentityDefinition {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/identity/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,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,OA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CAAC,MAAM,EAAE,cAAc,CAAC;CACjC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { defineDeepAgent } from "./define-deep-agent.js";
|
|
|
2
2
|
export { defineSchedule } from "./schedules.js";
|
|
3
3
|
export { defineIdentity } from "./identity/index.js";
|
|
4
4
|
export { defineMemory } from "./memory/index.js";
|
|
5
|
-
export { auth, channels
|
|
5
|
+
export { auth, channels } from "./namespaces.js";
|
|
6
6
|
export { defineSandbox } from "./sandbox.js";
|
|
7
7
|
export type { Channels } from "./namespaces.js";
|
|
8
8
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
@@ -36,7 +36,7 @@ export interface Connectors {
|
|
|
36
36
|
export declare const connectors: Connectors;
|
|
37
37
|
export type { DeepAgentDefinition, DefineDeepAgentConfig, ManagedDeepAgentKey, } from "./types.js";
|
|
38
38
|
export type { ScheduleConfig, ScheduleDefinition, ScheduleDeliveryTarget, ScheduleThreadConfig, } from "./schedules.js";
|
|
39
|
-
export type { ClaimMapping,
|
|
39
|
+
export type { ClaimMapping, CredentialScope, HttpIngress, IdentityAuth, IdentityConfig, IdentityDefinition, IdentityOptions, LangSmithApiKeyIngress, RuntimeIdentity, ValidatedTokenIngress, ValidatedTokenProvider, } from "./identity/index.js";
|
|
40
40
|
export type { MemoryConfig, MemoryDefinition, MemoryOptions, MemoryScope, MemoryScopeInput, MemorySliceInput, MemorySliceKind, ResolvedMemorySlice, } from "./memory/index.js";
|
|
41
41
|
export type { HttpMcpServerConfig, McpServersConfig, McpServersDefinition, McpToolSelectionConfig, RemoteMcpServerBaseConfig, RemoteMcpServerConfig, SseMcpServerConfig, } from "./connectors/mcp/index.js";
|
|
42
42
|
export type { ChannelManifest, RequiredSlackChannelConfig, SlackChannel, SlackChannelConfig, SlackChannelFilters, SlackChannelTrigger, SlackConversationPolicy, SlackMentionBehavior, } from "./channels/slack/index.js";
|
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,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,
|
|
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,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,EAAE,OAAO,YAAY,CAAC;CAC1B;AAED,+DAA+D;AAC/D,eAAO,MAAM,UAAU,EAAE,UAExB,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,eAAe,EACf,0BAA0B,EAC1B,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,GACrB,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
|
@@ -2,7 +2,7 @@ export { defineDeepAgent } from "./define-deep-agent.js";
|
|
|
2
2
|
export { defineSchedule } from "./schedules.js";
|
|
3
3
|
export { defineIdentity } from "./identity/index.js";
|
|
4
4
|
export { defineMemory } from "./memory/index.js";
|
|
5
|
-
export { auth, channels
|
|
5
|
+
export { auth, channels } from "./namespaces.js";
|
|
6
6
|
export { defineSandbox } from "./sandbox.js";
|
|
7
7
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
8
8
|
/** Public connectors namespace — MCP only for this release. */
|
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,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,
|
|
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,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AA6BzD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,GAAG,EAAE,YAAY;CAClB,CAAC"}
|
package/dist/namespaces.d.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* connectors.mcp({ mcpServers: { docs: { transport: "http", url: "https://docs.example.com/mcp" } } });
|
|
11
11
|
* defineSandbox({ defaultTimeout: 600 });
|
|
12
12
|
* auth.supabase({ projectRef: "abc" });
|
|
13
|
-
* credentials.github({ read: ["user"] });
|
|
14
13
|
* ```
|
|
15
14
|
*
|
|
16
15
|
* These are the only primitives the managed runtime will mount. A project
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
*/
|
|
19
18
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
20
19
|
import { slackChannel } from "./channels/slack/index.js";
|
|
21
|
-
import { credentials as githubCredentials } from "./identity/github/credentials.js";
|
|
22
20
|
export { auth } from "./identity/index.js";
|
|
23
21
|
/**
|
|
24
22
|
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
@@ -83,8 +81,4 @@ export interface Channels {
|
|
|
83
81
|
* stay in step with the channel modules. Hover docs come from {@link Channels}.
|
|
84
82
|
*/
|
|
85
83
|
export declare const channels: Channels;
|
|
86
|
-
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
87
|
-
export declare const credentials: {
|
|
88
|
-
github: typeof githubCredentials;
|
|
89
|
-
};
|
|
90
84
|
//# sourceMappingURL=namespaces.d.ts.map
|
package/dist/namespaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;OAcG;IACH,GAAG,EAAE,OAAO,YAAY,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,UAExB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,OAAO,YAAY,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,QAEtB,CAAC"}
|
package/dist/namespaces.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* connectors.mcp({ mcpServers: { docs: { transport: "http", url: "https://docs.example.com/mcp" } } });
|
|
11
11
|
* defineSandbox({ defaultTimeout: 600 });
|
|
12
12
|
* auth.supabase({ projectRef: "abc" });
|
|
13
|
-
* credentials.github({ read: ["user"] });
|
|
14
13
|
* ```
|
|
15
14
|
*
|
|
16
15
|
* These are the only primitives the managed runtime will mount. A project
|
|
@@ -18,7 +17,6 @@
|
|
|
18
17
|
*/
|
|
19
18
|
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
20
19
|
import { slackChannel } from "./channels/slack/index.js";
|
|
21
|
-
import { credentials as githubCredentials } from "./identity/github/credentials.js";
|
|
22
20
|
export { auth } from "./identity/index.js";
|
|
23
21
|
/**
|
|
24
22
|
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
@@ -38,8 +36,4 @@ export const connectors = {
|
|
|
38
36
|
export const channels = {
|
|
39
37
|
slack: slackChannel,
|
|
40
38
|
};
|
|
41
|
-
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
42
|
-
export const credentials = {
|
|
43
|
-
github: githubCredentials,
|
|
44
|
-
};
|
|
45
39
|
//# sourceMappingURL=namespaces.js.map
|
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;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AA+B3C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,GAAG,EAAE,YAAY;CAClB,CAAC;AAwBF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,KAAK,EAAE,YAAY;CACpB,CAAC"}
|