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
|
@@ -44,7 +44,7 @@ import type { Connector } from "../../runtime/connector.js";
|
|
|
44
44
|
import { type ToolSelection, type ToolSelectionConnectorConfig } from "../tool-selection.js";
|
|
45
45
|
import { type ToolServerSlug } from "./catalog.js";
|
|
46
46
|
import type { ToolServerConnectors } from "./connectors.js";
|
|
47
|
-
export {
|
|
47
|
+
export { SLACK_SLUG, STANDALONE_TOOL_SERVER_INTEGRATIONS, TOOL_SERVER_INTEGRATIONS, integrationForFactory, } from "./catalog.js";
|
|
48
48
|
export type { ToolServerFactoryName, ToolServerIntegration, ToolServerIntegrationEntry, ToolServerSlug, ToolsForFactory, } from "./catalog.js";
|
|
49
49
|
export type { ToolServerConnectorFactoryFor, ToolServerConnectors, } from "./connectors.js";
|
|
50
50
|
/**
|
|
@@ -63,7 +63,7 @@ export type ToolServerToolSelection<TTool extends string = string> = ToolSelecti
|
|
|
63
63
|
* When `TTool` is a catalog tool-name union (via {@link ToolsForFactory}),
|
|
64
64
|
* `includeTools` / `excludeTools` autocomplete the integration's tools.
|
|
65
65
|
* Omitting both means every tool the integration publishes; an empty
|
|
66
|
-
* `includeTools` selects none
|
|
66
|
+
* `includeTools` selects none.
|
|
67
67
|
*/
|
|
68
68
|
export type ToolServerConnectorConfig<TTool extends string = string> = ToolSelectionConnectorConfig<TTool>;
|
|
69
69
|
/**
|
|
@@ -103,7 +103,7 @@ export type ToolServerConnectorFactory = (config?: ToolServerConnectorConfig) =>
|
|
|
103
103
|
* Delegates to {@link toolSelectionConnectorSchema} so marketplace bridges and
|
|
104
104
|
* tool-server factories reject blank/duplicate names and include∩exclude
|
|
105
105
|
* overlap the same way. `extra` adds whatever the integration accepts on top
|
|
106
|
-
* of the shared options
|
|
106
|
+
* of the shared options.
|
|
107
107
|
*
|
|
108
108
|
* Strict, so an option that does not exist is an error rather than a silently
|
|
109
109
|
* ignored key — which matches the Python model's `extra="forbid"`, and is what
|
|
@@ -117,9 +117,7 @@ export declare function toolServerConnectorSchema<TArgs, TInput>(extra?: ZodRawS
|
|
|
117
117
|
/**
|
|
118
118
|
* Build the `tools` hook that loads one integration's tools.
|
|
119
119
|
*
|
|
120
|
-
* Shared so every integration reaches the gateway the same way
|
|
121
|
-
* all it does (`connectors.gmail`) or one of the things it does
|
|
122
|
-
* (`connectors.github`, which also provisions the sandbox).
|
|
120
|
+
* Shared so every integration reaches the gateway the same way.
|
|
123
121
|
*
|
|
124
122
|
* The hook runs at agent-graph construction, so the loader is imported lazily —
|
|
125
123
|
* an authoring-only install never pulls in the MCP client.
|
|
@@ -129,7 +127,7 @@ export declare function toolServerTools(slug: ToolServerSlug, label: string): (c
|
|
|
129
127
|
* Build the factory for one tool server integration.
|
|
130
128
|
*
|
|
131
129
|
* For the integrations that are only their tools. An integration with more to
|
|
132
|
-
* contribute
|
|
130
|
+
* contribute (e.g. `connectors.slack`) calls `defineExtension` itself with
|
|
133
131
|
* {@link toolServerConnectorSchema} and {@link toolServerTools}.
|
|
134
132
|
*/
|
|
135
133
|
export declare function toolServerConnector(slug: ToolServerSlug, label: string): ToolServerConnectorFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/toolserver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,kCAAkC,EAClC,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/toolserver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,kCAAkC,EAClC,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,4BAA4B,EAClC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC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MG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,GACZ,0BAA0B,CAU5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,oBAKC,CAAC"}
|
|
@@ -42,14 +42,14 @@ export { FLEET_OAUTH_INTEGRATIONS, GOOGLE_INTEGRATION, GOOGLE_TOOLSERVER_SLUGS,
|
|
|
42
42
|
import { defineExtension } from "../../extension.js";
|
|
43
43
|
import { toolSelectionConnectorSchema, } from "../tool-selection.js";
|
|
44
44
|
import { STANDALONE_TOOL_SERVER_INTEGRATIONS, } from "./catalog.js";
|
|
45
|
-
export {
|
|
45
|
+
export { SLACK_SLUG, STANDALONE_TOOL_SERVER_INTEGRATIONS, TOOL_SERVER_INTEGRATIONS, integrationForFactory, } from "./catalog.js";
|
|
46
46
|
/**
|
|
47
47
|
* Build the argument schema for one tool server integration.
|
|
48
48
|
*
|
|
49
49
|
* Delegates to {@link toolSelectionConnectorSchema} so marketplace bridges and
|
|
50
50
|
* tool-server factories reject blank/duplicate names and include∩exclude
|
|
51
51
|
* overlap the same way. `extra` adds whatever the integration accepts on top
|
|
52
|
-
* of the shared options
|
|
52
|
+
* of the shared options.
|
|
53
53
|
*
|
|
54
54
|
* Strict, so an option that does not exist is an error rather than a silently
|
|
55
55
|
* ignored key — which matches the Python model's `extra="forbid"`, and is what
|
|
@@ -65,9 +65,7 @@ export function toolServerConnectorSchema(extra = {}) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Build the `tools` hook that loads one integration's tools.
|
|
67
67
|
*
|
|
68
|
-
* Shared so every integration reaches the gateway the same way
|
|
69
|
-
* all it does (`connectors.gmail`) or one of the things it does
|
|
70
|
-
* (`connectors.github`, which also provisions the sandbox).
|
|
68
|
+
* Shared so every integration reaches the gateway the same way.
|
|
71
69
|
*
|
|
72
70
|
* The hook runs at agent-graph construction, so the loader is imported lazily —
|
|
73
71
|
* an authoring-only install never pulls in the MCP client.
|
|
@@ -82,7 +80,7 @@ export function toolServerTools(slug, label) {
|
|
|
82
80
|
* Build the factory for one tool server integration.
|
|
83
81
|
*
|
|
84
82
|
* For the integrations that are only their tools. An integration with more to
|
|
85
|
-
* contribute
|
|
83
|
+
* contribute (e.g. `connectors.slack`) calls `defineExtension` itself with
|
|
86
84
|
* {@link toolServerConnectorSchema} and {@link toolServerTools}.
|
|
87
85
|
*/
|
|
88
86
|
export function toolServerConnector(slug, label) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connectors/toolserver/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,kCAAkC,GAMnC,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EACL,4BAA4B,GAG7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mCAAmC,GAEpC,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connectors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1D,OAAO,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAoB,EACpB,KAAa;IAEb,OAAO,eAAe,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,IAAI;QACV,KAAK;QACL,IAAI,EAAE,yBAAyB,EAG5B;QACH,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC;KACpC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAyB,MAAM,CAAC,WAAW,CAC1E,mCAAmC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC7D,OAAO;IACP,mBAAmB,CAAC,IAAsB,EAAE,cAAc,OAAO,EAAE,CAAC;CACrE,CAAC,CACgC,CAAC"}
|
|
@@ -54,7 +54,7 @@ export declare function scopesForIntegrationConnectorKinds(integration: FleetOAu
|
|
|
54
54
|
export declare function readIntegrationProviderSlug(integration: FleetOAuthIntegration, env?: NodeJS.ProcessEnv): string;
|
|
55
55
|
/** Google integration convenience — same UUID namespace / slug set as before. */
|
|
56
56
|
export declare const GOOGLE_INTEGRATION: FleetOAuthIntegration;
|
|
57
|
-
export declare const GOOGLE_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "
|
|
57
|
+
export declare const GOOGLE_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "gmail" | "google_bigquery" | "google_calendar" | "google_docs" | "google_drive" | "google_meet" | "google_sheets" | "google_slides" | "linear" | "linkedin" | "outlook" | "powerpoint" | "pylon" | "salesforce" | "sharepoint" | "slack" | "tavily" | "teams" | "word" | "x_com")[];
|
|
58
58
|
export type GoogleToolServerSlug = (typeof GOOGLE_TOOLSERVER_SLUGS)[number];
|
|
59
59
|
export declare function isGoogleToolServerSlug(slug: string | undefined): slug is GoogleToolServerSlug;
|
|
60
60
|
export declare function googleConnectorKinds(kinds: readonly (string | undefined)[] | undefined): GoogleToolServerSlug[];
|
|
@@ -66,7 +66,7 @@ export declare const DEFAULT_GOOGLE_PROVIDER_SLUG: string;
|
|
|
66
66
|
export declare function readGoogleProviderSlug(env?: NodeJS.ProcessEnv): string;
|
|
67
67
|
/** Microsoft Graph integration convenience helpers. */
|
|
68
68
|
export declare const MICROSOFT_INTEGRATION: FleetOAuthIntegration;
|
|
69
|
-
export declare const MICROSOFT_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "
|
|
69
|
+
export declare const MICROSOFT_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "gmail" | "google_bigquery" | "google_calendar" | "google_docs" | "google_drive" | "google_meet" | "google_sheets" | "google_slides" | "linear" | "linkedin" | "outlook" | "powerpoint" | "pylon" | "salesforce" | "sharepoint" | "slack" | "tavily" | "teams" | "word" | "x_com")[];
|
|
70
70
|
export type MicrosoftToolServerSlug = (typeof MICROSOFT_TOOLSERVER_SLUGS)[number];
|
|
71
71
|
export declare function isMicrosoftToolServerSlug(slug: string | undefined): slug is MicrosoftToolServerSlug;
|
|
72
72
|
export declare function microsoftConnectorKinds(kinds: readonly (string | undefined)[] | undefined): MicrosoftToolServerSlug[];
|
|
@@ -78,7 +78,7 @@ export declare const DEFAULT_MICROSOFT_PROVIDER_SLUG: string;
|
|
|
78
78
|
export declare function readMicrosoftProviderSlug(env?: NodeJS.ProcessEnv): string;
|
|
79
79
|
/** LinkedIn integration convenience helpers. */
|
|
80
80
|
export declare const LINKEDIN_INTEGRATION: FleetOAuthIntegration;
|
|
81
|
-
export declare const LINKEDIN_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "
|
|
81
|
+
export declare const LINKEDIN_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "gmail" | "google_bigquery" | "google_calendar" | "google_docs" | "google_drive" | "google_meet" | "google_sheets" | "google_slides" | "linear" | "linkedin" | "outlook" | "powerpoint" | "pylon" | "salesforce" | "sharepoint" | "slack" | "tavily" | "teams" | "word" | "x_com")[];
|
|
82
82
|
export type LinkedInToolServerSlug = (typeof LINKEDIN_TOOLSERVER_SLUGS)[number];
|
|
83
83
|
export declare function isLinkedInToolServerSlug(slug: string | undefined): slug is LinkedInToolServerSlug;
|
|
84
84
|
export declare function linkedinConnectorKinds(kinds: readonly (string | undefined)[] | undefined): LinkedInToolServerSlug[];
|
|
@@ -90,7 +90,7 @@ export declare const DEFAULT_LINKEDIN_PROVIDER_SLUG: string;
|
|
|
90
90
|
export declare function readLinkedInProviderSlug(env?: NodeJS.ProcessEnv): string;
|
|
91
91
|
/** X (Twitter) integration convenience helpers. */
|
|
92
92
|
export declare const X_INTEGRATION: FleetOAuthIntegration;
|
|
93
|
-
export declare const X_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "
|
|
93
|
+
export declare const X_TOOLSERVER_SLUGS: readonly ("apollo" | "ashby" | "base" | "exa" | "excel" | "gmail" | "google_bigquery" | "google_calendar" | "google_docs" | "google_drive" | "google_meet" | "google_sheets" | "google_slides" | "linear" | "linkedin" | "outlook" | "powerpoint" | "pylon" | "salesforce" | "sharepoint" | "slack" | "tavily" | "teams" | "word" | "x_com")[];
|
|
94
94
|
export type XToolServerSlug = (typeof X_TOOLSERVER_SLUGS)[number];
|
|
95
95
|
export declare function isXToolServerSlug(slug: string | undefined): slug is XToolServerSlug;
|
|
96
96
|
export declare function xConnectorKinds(kinds: readonly (string | undefined)[] | undefined): XToolServerSlug[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/connectors/toolserver/integrations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE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G,SAAS,CAAC,EAAE,GAAG,SAAS,GACjD,MAAM,EAAE,CAEV;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,SAAS,GACjD,OAAO,CAET;AAED,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,eAAO,MAAM,uBAAuB,QAAoC,CAAC;AAEzE,wBAAgB,iBAAiB,CAC/B,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-deep-agent.d.ts","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,qBAAqB,EACzE,MAAM,EAAE,OAAO,GACd,mBAAmB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"define-deep-agent.d.ts","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EAEtB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,qBAAqB,EACzE,MAAM,EAAE,OAAO,GACd,mBAAmB,CAAC,OAAO,CAAC,CAoD9B"}
|
|
@@ -44,9 +44,15 @@ export function defineDeepAgent(config) {
|
|
|
44
44
|
"Write your agent's system prompt in instructions.md next to agent.ts; " +
|
|
45
45
|
"the CLI embeds it at deploy time.");
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
// Memory is no longer a knob on the agent definition: it is declared once, in
|
|
48
|
+
// `memory.ts`. Rejecting the old flag outright (rather than treating it as a
|
|
49
|
+
// redundant "off") keeps `disableMemory: false` from silently meaning the
|
|
50
|
+
// opposite of what it used to.
|
|
51
|
+
if ("disableMemory" in provided) {
|
|
52
|
+
throw new Error("disableMemory is no longer supported in defineDeepAgent(...). Durable " +
|
|
53
|
+
"memory is opt-in and declared in memory.ts: export `memory` with " +
|
|
54
|
+
'`defineMemory({ scope: "agent" })` to enable it, or leave the file out ' +
|
|
55
|
+
"to keep no memory (the default). Remove `disableMemory` here.");
|
|
50
56
|
}
|
|
51
57
|
const managed = ["backend", "store", "checkpointer", "memory", "skills"].filter((key) => key in provided);
|
|
52
58
|
if (managed.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-deep-agent.js","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAe;IAEf,+EAA+E;IAC/E,6EAA6E;IAC7E,8EAA8E;IAC9E,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,MAAiC,CAAC;IAEnD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CACb,iEAAiE;YAC/D,kEAAkE;YAClE,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IAED,IAAI,cAAc,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,4EAA4E;YAC1E,wEAAwE;YACxE,mCAAmC,CACtC,CAAC;IACJ,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"define-deep-agent.js","sourceRoot":"","sources":["../src/define-deep-agent.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,e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
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The contribution API behind the extensible MDA primitives.
|
|
3
3
|
*
|
|
4
|
-
* `defineExtension(kind, options)` returns the factory
|
|
5
|
-
* `connectors.slack({ … })
|
|
6
|
-
*
|
|
7
|
-
* branding, and manifest stamping are shared.
|
|
4
|
+
* `defineExtension(kind, options)` returns the factory a connector namespace
|
|
5
|
+
* calls, such as `connectors.slack({ … })`. Argument parsing, branding, and
|
|
6
|
+
* manifest stamping are shared.
|
|
8
7
|
*
|
|
9
8
|
* Every kind declares its input through `args`, which takes a schema from any
|
|
10
9
|
* [Standard Schema](https://standardschema.dev) library — Zod, Valibot,
|
|
@@ -14,8 +13,8 @@
|
|
|
14
13
|
*
|
|
15
14
|
* This module is deliberately absent from the package barrel. Only the
|
|
16
15
|
* first-party namespaces in `namespaces.ts` contribute primitives, so an agent
|
|
17
|
-
* project cannot mount its own adapter
|
|
18
|
-
*
|
|
16
|
+
* project cannot mount its own adapter or HTTP route into the managed runtime.
|
|
17
|
+
* Opening it up to third-party packages is a later step.
|
|
19
18
|
*
|
|
20
19
|
* The `auth`, `credentials`, and `connect` primitives are extended by plain
|
|
21
20
|
* factories rather than through here: they return inert configuration objects
|
|
@@ -25,9 +24,8 @@
|
|
|
25
24
|
import type { StandardSchemaV1 } from "@standard-schema/spec";
|
|
26
25
|
import type { ChannelTransport } from "./channels/runtime.js";
|
|
27
26
|
import { type Connector, type ConnectorRequirements, type ConnectorToolList, type EventsContext, type HttpContext, type SandboxContext, type ToolContext } from "./runtime/connector.js";
|
|
28
|
-
import { type SandboxOptions, type SandboxDefinition, type SandboxProviderClass } from "./sandbox.js";
|
|
29
27
|
/** The primitives that carry a shared construction envelope. */
|
|
30
|
-
export type ExtensionKind = "connector"
|
|
28
|
+
export type ExtensionKind = "connector";
|
|
31
29
|
/**
|
|
32
30
|
* How author input becomes the arguments a primitive is built from.
|
|
33
31
|
*
|
|
@@ -66,12 +64,6 @@ export interface ConnectorExtensionOptions<TInput, TArgs extends object, TKind e
|
|
|
66
64
|
export type ConnectorInstance<TArgs extends object, TKind extends string> = Connector & TArgs & {
|
|
67
65
|
readonly kind: TKind;
|
|
68
66
|
};
|
|
69
|
-
/** A sandbox contributes the execution environment the agent's shell runs in. */
|
|
70
|
-
export interface SandboxExtensionOptions<TInput, TProvider extends SandboxProviderClass<any, any>> extends ExtensionEnvelope<TInput, SandboxOptions<TProvider>> {
|
|
71
|
-
/** Backend class MDA constructs with `new Provider({ sandbox, … })`. */
|
|
72
|
-
provider: TProvider;
|
|
73
|
-
}
|
|
74
67
|
export declare function defineExtension<TInput, TArgs extends object, TKind extends string>(kind: "connector", options: ConnectorExtensionOptions<TInput, TArgs, TKind>): (input: TInput) => ConnectorInstance<TArgs, TKind>;
|
|
75
|
-
export declare function defineExtension<TInput, TProvider extends SandboxProviderClass<any, any>>(kind: "sandbox", options: SandboxExtensionOptions<TInput, TProvider>): (input: TInput) => SandboxDefinition<TProvider>;
|
|
76
68
|
export {};
|
|
77
69
|
//# sourceMappingURL=extension.d.ts.map
|
package/dist/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,wBAAwB,CAAC;AAEhC,gEAAgE;AAChE,MAAM,MAAM,aA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AC,KAAK,EAAE,KAAK,CAAC,GACpC,gBAAgB,GAAG,SAAS,CAAC;IAChC,YAAY,CAAC,CACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,GACpC,qBAAqB,CAAC;CAC1B;AAED,iFAAiF;AACjF,MAAM,MAAM,iBAAiB,CAC3B,KAAK,SAAS,MAAM,EACpB,KAAK,SAAS,MAAM,IAClB,SAAS,GAAG,KAAK,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAEjD,wBAAgB,eAAe,CAC7B,MAAM,EACN,KAAK,SAAS,MAAM,EACpB,KAAK,SAAS,MAAM,EAEpB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,yBAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,GACvD,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC"}
|
package/dist/extension.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The contribution API behind the extensible MDA primitives.
|
|
3
3
|
*
|
|
4
|
-
* `defineExtension(kind, options)` returns the factory
|
|
5
|
-
* `connectors.slack({ … })
|
|
6
|
-
*
|
|
7
|
-
* branding, and manifest stamping are shared.
|
|
4
|
+
* `defineExtension(kind, options)` returns the factory a connector namespace
|
|
5
|
+
* calls, such as `connectors.slack({ … })`. Argument parsing, branding, and
|
|
6
|
+
* manifest stamping are shared.
|
|
8
7
|
*
|
|
9
8
|
* Every kind declares its input through `args`, which takes a schema from any
|
|
10
9
|
* [Standard Schema](https://standardschema.dev) library — Zod, Valibot,
|
|
@@ -14,8 +13,8 @@
|
|
|
14
13
|
*
|
|
15
14
|
* This module is deliberately absent from the package barrel. Only the
|
|
16
15
|
* first-party namespaces in `namespaces.ts` contribute primitives, so an agent
|
|
17
|
-
* project cannot mount its own adapter
|
|
18
|
-
*
|
|
16
|
+
* project cannot mount its own adapter or HTTP route into the managed runtime.
|
|
17
|
+
* Opening it up to third-party packages is a later step.
|
|
19
18
|
*
|
|
20
19
|
* The `auth`, `credentials`, and `connect` primitives are extended by plain
|
|
21
20
|
* factories rather than through here: they return inert configuration objects
|
|
@@ -23,13 +22,10 @@
|
|
|
23
22
|
* this API is exported and their inputs need validating at the boundary.
|
|
24
23
|
*/
|
|
25
24
|
import { CONNECTOR_BRAND, } from "./runtime/connector.js";
|
|
26
|
-
import { normalizeSandboxOptions, sandboxProviderKey, } from "./sandbox.js";
|
|
27
25
|
export function defineExtension(kind, options) {
|
|
28
26
|
switch (kind) {
|
|
29
27
|
case "connector":
|
|
30
28
|
return connectorExtension(options);
|
|
31
|
-
case "sandbox":
|
|
32
|
-
return sandboxExtension(options);
|
|
33
29
|
default:
|
|
34
30
|
throw new TypeError(`Unknown extension kind: ${String(kind)}`);
|
|
35
31
|
}
|
|
@@ -69,21 +65,6 @@ function connectorExtension(options) {
|
|
|
69
65
|
return self;
|
|
70
66
|
};
|
|
71
67
|
}
|
|
72
|
-
function sandboxExtension(options) {
|
|
73
|
-
const parse = parser(options);
|
|
74
|
-
return (input) => {
|
|
75
|
-
if (sandboxProviderKey(options.provider) !== "LangSmithSandbox") {
|
|
76
|
-
throw new TypeError("MDA only supports deepagents' LangSmithSandbox provider");
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
kind: "sandbox",
|
|
80
|
-
provider: options.provider,
|
|
81
|
-
// The managed-key rule is MDA policy, not the provider's, so it runs
|
|
82
|
-
// here rather than in each provider's `args`.
|
|
83
|
-
options: normalizeSandboxOptions(parse(input)),
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
68
|
/**
|
|
88
69
|
* Resolve `args` into the function the factory runs on its input.
|
|
89
70
|
*
|
package/dist/extension.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../src/extension.ts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E,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* deployment needs their OAuth routes.
|
|
4
4
|
*
|
|
5
5
|
* Authors should not have to list a connect provider that the rest of their
|
|
6
|
-
* identity already implies — a
|
|
7
|
-
*
|
|
8
|
-
* a
|
|
9
|
-
* accounts.
|
|
6
|
+
* identity already implies — a credential chain that reads user GitHub tokens
|
|
7
|
+
* on a user-scoped deployment needs Connect-with-GitHub, and a Slack channel on
|
|
8
|
+
* a per-user deployment needs somewhere to link Slack accounts.
|
|
10
9
|
*/
|
|
11
10
|
import type { IdentityConnectMountContext } from "./connect-provider-types.js";
|
|
12
11
|
export { FLEET_OAUTH_INTEGRATIONS, GOOGLE_TOOLSERVER_SLUGS, LINKEDIN_TOOLSERVER_SLUGS, MICROSOFT_TOOLSERVER_SLUGS, integrationConnectorKinds, integrationById, integrationForSlug, googleConnectorKinds, googleScopesForConnectorKinds, hasIntegrationToolServerConnector, hasGoogleToolServerConnector, hasLinkedInToolServerConnector, hasMicrosoftToolServerConnector, isFleetOAuthSlug, isGoogleToolServerSlug, isLinkedInToolServerSlug, isMicrosoftToolServerSlug, linkedinConnectorKinds, linkedinScopesForConnectorKinds, microsoftConnectorKinds, microsoftScopesForConnectorKinds, scopesForIntegrationConnectorKinds, type FleetOAuthIntegration, type GoogleToolServerSlug, type LinkedInToolServerSlug, type MicrosoftToolServerSlug, } from "../connectors/toolserver/integrations.js";
|
|
@@ -21,10 +20,10 @@ export declare function isUserScopedDeployment(scope: IdentityConnectMountContex
|
|
|
21
20
|
/** True when a channel of `provider` is declared (e.g. a Slack channel). */
|
|
22
21
|
export declare function hasChannelForProvider(channels: IdentityConnectMountContext["channels"], provider: string): boolean;
|
|
23
22
|
/**
|
|
24
|
-
* True when the deployment declares `
|
|
23
|
+
* True when the deployment declares a connector whose kind is `"github"`.
|
|
25
24
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* Retained for Connect-with-GitHub inference if a future surface reintroduces a
|
|
26
|
+
* GitHub connector kind; today Connect mounts from `credentials.github` instead.
|
|
28
27
|
*/
|
|
29
28
|
export declare function hasGithubConnector(connectorKinds: IdentityConnectMountContext["connectorKinds"]): boolean;
|
|
30
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-inference.d.ts","sourceRoot":"","sources":["../../src/identity/connect-inference.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connect-inference.d.ts","sourceRoot":"","sources":["../../src/identity/connect-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,kCAAkC,EAClC,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,0CAA0C,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,2BAA2B,CAAC,OAAO,CAAC,GAC1C,OAAO,CAOT;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,2BAA2B,CAAC,UAAU,CAAC,EACjD,QAAQ,EAAE,MAAM,GACf,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,2BAA2B,CAAC,gBAAgB,CAAC,GAC5D,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,2BAA2B,CAAC,aAAa,CAAC,GACtD,GAAG,CAAC,MAAM,CAAC,CAIb;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEvE"}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* deployment needs their OAuth routes.
|
|
4
4
|
*
|
|
5
5
|
* Authors should not have to list a connect provider that the rest of their
|
|
6
|
-
* identity already implies — a
|
|
7
|
-
*
|
|
8
|
-
* a
|
|
9
|
-
* accounts.
|
|
6
|
+
* identity already implies — a credential chain that reads user GitHub tokens
|
|
7
|
+
* on a user-scoped deployment needs Connect-with-GitHub, and a Slack channel on
|
|
8
|
+
* a per-user deployment needs somewhere to link Slack accounts.
|
|
10
9
|
*/
|
|
11
|
-
import { GITHUB_SLUG } from "../connectors/toolserver/catalog.js";
|
|
12
10
|
import { isGoogleToolServerSlug } from "../connectors/toolserver/integrations.js";
|
|
13
11
|
import { credentialConnectProviders } from "./credential-resolvers.js";
|
|
14
12
|
export { FLEET_OAUTH_INTEGRATIONS, GOOGLE_TOOLSERVER_SLUGS, LINKEDIN_TOOLSERVER_SLUGS, MICROSOFT_TOOLSERVER_SLUGS, integrationConnectorKinds, integrationById, integrationForSlug, googleConnectorKinds, googleScopesForConnectorKinds, hasIntegrationToolServerConnector, hasGoogleToolServerConnector, hasLinkedInToolServerConnector, hasMicrosoftToolServerConnector, isFleetOAuthSlug, isGoogleToolServerSlug, isLinkedInToolServerSlug, isMicrosoftToolServerSlug, linkedinConnectorKinds, linkedinScopesForConnectorKinds, microsoftConnectorKinds, microsoftScopesForConnectorKinds, scopesForIntegrationConnectorKinds, } from "../connectors/toolserver/integrations.js";
|
|
@@ -32,13 +30,13 @@ export function hasChannelForProvider(channels, provider) {
|
|
|
32
30
|
return Object.values(channels ?? {}).some((manifest) => manifest?.provider === provider);
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
|
-
* True when the deployment declares `
|
|
33
|
+
* True when the deployment declares a connector whose kind is `"github"`.
|
|
36
34
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* Retained for Connect-with-GitHub inference if a future surface reintroduces a
|
|
36
|
+
* GitHub connector kind; today Connect mounts from `credentials.github` instead.
|
|
39
37
|
*/
|
|
40
38
|
export function hasGithubConnector(connectorKinds) {
|
|
41
|
-
return (connectorKinds ?? []).some((kind) => kind ===
|
|
39
|
+
return (connectorKinds ?? []).some((kind) => kind === "github");
|
|
42
40
|
}
|
|
43
41
|
/**
|
|
44
42
|
* Connect provider ids the deployment's credential resolvers depend on.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-inference.js","sourceRoot":"","sources":["../../src/identity/connect-inference.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connect-inference.js","sourceRoot":"","sources":["../../src/identity/connect-inference.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAElF,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,+BAA+B,EAC/B,uBAAuB,EACvB,gCAAgC,EAChC,kCAAkC,GAKnC,MAAM,0CAA0C,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA2C;IAE3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IACD,4EAA4E;IAC5E,wEAAwE;IACxE,OAAO,KAAK,CAAC,WAAW,KAAK,MAAM,IAAI,KAAK,CAAC,WAAW,KAAK,QAAQ,CAAC;AACxE,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,qBAAqB,CACnC,QAAiD,EACjD,QAAgB;IAEhB,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,IAAI,CACvC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,QAAQ,CAC9C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,cAA6D;IAE7D,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;AAClE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,WAAuD;IAEvD,OAAO,IAAI,GAAG,CACZ,0BAA0B,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CACvE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAwB;IAC5D,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Connect-with-GitHub — {@link IdentityConnectProvider} for actor OAuth tokens.
|
|
3
3
|
*
|
|
4
4
|
* Mounted under `/identity/github/*` when listed on `identity.connect`, or when
|
|
5
|
-
* a user-scoped deployment declares
|
|
6
|
-
* that reads per-user GitHub tokens.
|
|
5
|
+
* a user-scoped deployment declares a GitHub connector.
|
|
7
6
|
*/
|
|
8
7
|
import type { IdentityConnectProvider } from "../connect-provider-types.js";
|
|
9
8
|
import { type GitHubCredentialStore } from "./credentials-store.js";
|
|
@@ -22,8 +21,8 @@ export declare const githubIdentityConnectProvider: IdentityConnectProvider;
|
|
|
22
21
|
/**
|
|
23
22
|
* Opt into Connect-with-GitHub on `defineIdentity({ connect: […] })`.
|
|
24
23
|
*
|
|
25
|
-
* Usually unnecessary: `
|
|
26
|
-
* these routes by inference.
|
|
24
|
+
* Usually unnecessary: `credentials.github(...)` on a user-scoped deployment
|
|
25
|
+
* mounts these routes by inference.
|
|
27
26
|
*
|
|
28
27
|
* @example
|
|
29
28
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.d.ts","sourceRoot":"","sources":["../../../src/identity/github/connect-http.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connect-http.d.ts","sourceRoot":"","sources":["../../../src/identity/github/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAKV,uBAAuB,EAExB,MAAM,8BAA8B,CAAC;AAWtC,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,wBAAwB,CAAC;AAWhC,eAAO,MAAM,0BAA0B,QAAe,CAAC;AACvD,eAAO,MAAM,yBAAyB,QAAgB,CAAC;AACvD,eAAO,MAAM,4BAA4B,QAAiB,CAAC;AAC3D,eAAO,MAAM,wBAAwB,QAAa,CAAC;AAEnD,+DAA+D;AAC/D,MAAM,WAAW,oCAAoC;IACnD,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED,oEAAoE;AACpE,wBAAgB,mCAAmC,CACjD,OAAO,GAAE,oCAAyC,GACjD,uBAAuB,CAiGzB;AAED,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,EAAE,uBACL,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CACrB,OAAO,CAAC,EAAE,oCAAoC,GAC7C,uBAAuB,CAIzB"}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Connect-with-GitHub — {@link IdentityConnectProvider} for actor OAuth tokens.
|
|
3
3
|
*
|
|
4
4
|
* Mounted under `/identity/github/*` when listed on `identity.connect`, or when
|
|
5
|
-
* a user-scoped deployment declares
|
|
6
|
-
* that reads per-user GitHub tokens.
|
|
5
|
+
* a user-scoped deployment declares a GitHub connector.
|
|
7
6
|
*/
|
|
8
7
|
import { identityConnectPaths } from "../connect-paths.js";
|
|
9
|
-
import {
|
|
8
|
+
import { hasGithubConnector, isUserScopedDeployment, } from "../connect-inference.js";
|
|
10
9
|
import { MDA_PUBLIC_APP_URL_ENV, OAUTH_STATE_SIGNING_KEY_ENV, readOauthStateSigningKey, } from "../oauth-env.js";
|
|
11
10
|
import { buildGitHubCredentialRecord, getGitHubCredentialStore, } from "./credentials-store.js";
|
|
12
11
|
import { buildGitHubAuthorizeUrl, exchangeGitHubOauthCode, githubOauthTickets, readGitHubOauthConfig, resolveGitHubOauthRedirectBase, } from "./oauth.js";
|
|
@@ -28,14 +27,12 @@ export function createGitHubIdentityConnectProvider(options = {}) {
|
|
|
28
27
|
if (ctx.declared) {
|
|
29
28
|
return true;
|
|
30
29
|
}
|
|
31
|
-
// Otherwise mirror Google/Microsoft: a GitHub connector
|
|
32
|
-
//
|
|
33
|
-
// somewhere for the caller to grant an actor OAuth token.
|
|
30
|
+
// Otherwise mirror Google/Microsoft: a GitHub connector on a user-scoped
|
|
31
|
+
// deployment needs somewhere for the caller to grant an actor OAuth token.
|
|
34
32
|
if (!isUserScopedDeployment(ctx.scope)) {
|
|
35
33
|
return false;
|
|
36
34
|
}
|
|
37
|
-
return
|
|
38
|
-
credentialConnectIds(ctx.credentials).has("github"));
|
|
35
|
+
return hasGithubConnector(ctx.connectorKinds);
|
|
39
36
|
},
|
|
40
37
|
async status(userId) {
|
|
41
38
|
const configured = Boolean(readGitHubOauthConfig());
|
|
@@ -111,8 +108,8 @@ export const githubIdentityConnectProvider = createGitHubIdentityConnectProvider
|
|
|
111
108
|
/**
|
|
112
109
|
* Opt into Connect-with-GitHub on `defineIdentity({ connect: […] })`.
|
|
113
110
|
*
|
|
114
|
-
* Usually unnecessary: `
|
|
115
|
-
* these routes by inference.
|
|
111
|
+
* Usually unnecessary: `credentials.github(...)` on a user-scoped deployment
|
|
112
|
+
* mounts these routes by inference.
|
|
116
113
|
*
|
|
117
114
|
* @example
|
|
118
115
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-http.js","sourceRoot":"","sources":["../../../src/identity/github/connect-http.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"connect-http.js","sourceRoot":"","sources":["../../../src/identity/github/connect-http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GAEzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAEpB,MAAM,KAAK,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,MAAM,CAAC;AACvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CAAC;AACvD,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC,QAAQ,CAAC;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,IAAI,CAAC;AAOnD,oEAAoE;AACpE,MAAM,UAAU,mCAAmC,CACjD,OAAO,GAAyC,EAAE;IAElD,MAAM,KAAK,GAA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AC;gBAC1D,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9C,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC/C,CAAC,CAAC;YACH,MAAM,KAAK,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC7B,OAAO;gBACL,eAAe,EAAE,GAAG,KAAK,CAAC,YAAY,4BAA4B;aACnE,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,MAAc;YACzB,MAAM,KAAK,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,mBAAmB,CAAC,OAA2C;YAC7D,OAAO,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACjD,CAAC;QACD,mBAAmB;YACjB,MAAM,KAAK,GAAG,qBAAqB,EAAE,CAAC;YACtC,OAAO,CACL,KAAK,EAAE,YAAY;gBACnB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACxD,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,6BAA6B,GACxC,mCAAmC,EAAE,CAAC;AAExC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,OAAO,CACrB,OAA8C;IAE9C,OAAO,OAAO;QACZ,CAAC,CAAC,mCAAmC,CAAC,OAAO,CAAC;QAC9C,CAAC,CAAC,6BAA6B,CAAC;AACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-store.d.ts","sourceRoot":"","sources":["../../../src/identity/github/credentials-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GA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,sBAAsB,CAazB"}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { getStore } from "@langchain/langgraph";
|
|
18
18
|
import { Client } from "@langchain/langgraph-sdk";
|
|
19
|
-
import { USER_HEADER, GITHUB_CREDENTIALS_STORE_PREFIX, IDENTITY_LINKS_SERVICE_USER, INGRESS_SECRET_ENV, INGRESS_SECRET_HEADER, } from "../../runtime/auth.js";
|
|
20
|
-
import { resolveLoopbackApiKey, resolveLoopbackApiUrl } from "../loopback.js";
|
|
19
|
+
import { HANDOFF_SECRET_ENV, HANDOFF_SECRET_HEADER, USER_HEADER, GITHUB_CREDENTIALS_STORE_PREFIX, IDENTITY_LINKS_SERVICE_USER, INGRESS_SECRET_ENV, INGRESS_SECRET_HEADER, LANGSMITH_API_KEY_ENV, } from "../../runtime/auth.js";
|
|
20
|
+
import { isLoopbackUrl, resolveLoopbackApiKey, resolveLoopbackApiUrl, } from "../loopback.js";
|
|
21
21
|
export { GITHUB_CREDENTIALS_STORE_PREFIX };
|
|
22
22
|
export const GITHUB_CREDENTIALS_NAMESPACE = [
|
|
23
23
|
GITHUB_CREDENTIALS_STORE_PREFIX,
|
|
@@ -113,19 +113,35 @@ export function getGitHubCredentialStore() {
|
|
|
113
113
|
return defaultStore;
|
|
114
114
|
}
|
|
115
115
|
export function createLangGraphGitHubCredentialStore(options = {}) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
const serverApiKey = process.env[LANGSMITH_API_KEY_ENV]?.trim();
|
|
117
|
+
const configuredHandoffSecret = process.env[HANDOFF_SECRET_ENV]?.trim();
|
|
118
|
+
const explicitIngressSecret = options.ingressSecret?.trim();
|
|
119
|
+
const configuredIngressSecret = explicitIngressSecret || process.env[INGRESS_SECRET_ENV]?.trim();
|
|
120
120
|
const apiUrl = resolveLoopbackApiUrl(options.apiUrl);
|
|
121
121
|
const apiKey = resolveLoopbackApiKey(options.apiKey);
|
|
122
|
+
const isLocal = isLoopbackUrl(apiUrl);
|
|
123
|
+
const handoffSecret = isLocal ? configuredHandoffSecret : undefined;
|
|
124
|
+
const ingressSecret = isLocal ? configuredIngressSecret : undefined;
|
|
125
|
+
const usesServerApiKey = Boolean(serverApiKey && apiKey === serverApiKey);
|
|
126
|
+
if (!usesServerApiKey && !handoffSecret && !ingressSecret) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
const defaultHeaders = {
|
|
130
|
+
[USER_HEADER]: IDENTITY_LINKS_SERVICE_USER,
|
|
131
|
+
};
|
|
132
|
+
if (!usesServerApiKey && explicitIngressSecret && ingressSecret) {
|
|
133
|
+
defaultHeaders[INGRESS_SECRET_HEADER] = ingressSecret;
|
|
134
|
+
}
|
|
135
|
+
else if (handoffSecret) {
|
|
136
|
+
defaultHeaders[HANDOFF_SECRET_HEADER] = handoffSecret;
|
|
137
|
+
}
|
|
138
|
+
else if (!usesServerApiKey && ingressSecret) {
|
|
139
|
+
defaultHeaders[INGRESS_SECRET_HEADER] = ingressSecret;
|
|
140
|
+
}
|
|
122
141
|
const client = new Client({
|
|
123
142
|
apiUrl,
|
|
124
143
|
apiKey,
|
|
125
|
-
defaultHeaders
|
|
126
|
-
[INGRESS_SECRET_HEADER]: ingressSecret,
|
|
127
|
-
[USER_HEADER]: IDENTITY_LINKS_SERVICE_USER,
|
|
128
|
-
},
|
|
144
|
+
defaultHeaders,
|
|
129
145
|
});
|
|
130
146
|
return new LangGraphGitHubCredentialStore(client);
|
|
131
147
|
}
|