managed-deepagents 0.5.0-dev.79 → 0.5.0-dev.81
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 +56 -13
- package/dist/channels/assistant-text.js +1 -1
- package/dist/channels/assistant-text.js.map +1 -1
- package/dist/channels/binding.d.ts.map +1 -1
- package/dist/channels/binding.js +3 -1
- package/dist/channels/binding.js.map +1 -1
- package/dist/channels/index.d.ts +6 -8
- package/dist/channels/index.d.ts.map +1 -1
- package/dist/channels/index.js +5 -5
- package/dist/channels/index.js.map +1 -1
- package/dist/channels/manifest.d.ts +36 -3
- package/dist/channels/manifest.d.ts.map +1 -1
- package/dist/channels/messaging-registry.d.ts +17 -0
- package/dist/channels/messaging-registry.d.ts.map +1 -0
- package/dist/channels/messaging-registry.js +44 -0
- package/dist/channels/messaging-registry.js.map +1 -0
- package/dist/channels/registry.d.ts +4 -3
- package/dist/channels/registry.d.ts.map +1 -1
- package/dist/channels/registry.js +6 -5
- package/dist/channels/registry.js.map +1 -1
- package/dist/channels/schedule-delivery.d.ts +4 -1
- package/dist/channels/schedule-delivery.d.ts.map +1 -1
- package/dist/channels/schedule-delivery.js +4 -2
- package/dist/channels/schedule-delivery.js.map +1 -1
- package/dist/connectors/github/adapter-core.d.ts +15 -0
- package/dist/connectors/github/adapter-core.d.ts.map +1 -0
- package/dist/connectors/github/adapter-core.js +52 -0
- package/dist/connectors/github/adapter-core.js.map +1 -0
- package/dist/{channels → connectors}/github/define.d.ts +28 -58
- package/dist/connectors/github/define.d.ts.map +1 -0
- package/dist/connectors/github/define.js +72 -0
- package/dist/connectors/github/define.js.map +1 -0
- package/dist/{channels → connectors}/github/http.d.ts +4 -4
- package/dist/connectors/github/http.d.ts.map +1 -0
- package/dist/{channels → connectors}/github/http.js +24 -25
- package/dist/connectors/github/http.js.map +1 -0
- package/dist/connectors/github/index.d.ts +59 -16
- package/dist/connectors/github/index.d.ts.map +1 -1
- package/dist/connectors/github/index.js +159 -73
- package/dist/connectors/github/index.js.map +1 -1
- package/dist/connectors/github/match.d.ts +20 -0
- package/dist/connectors/github/match.d.ts.map +1 -0
- package/dist/connectors/github/match.js +41 -0
- package/dist/connectors/github/match.js.map +1 -0
- package/dist/{channels → connectors}/github/normalize.d.ts +1 -1
- package/dist/connectors/github/normalize.d.ts.map +1 -0
- package/dist/{channels → connectors}/github/normalize.js +2 -2
- package/dist/connectors/github/normalize.js.map +1 -0
- package/dist/connectors/github/sandbox.d.ts.map +1 -1
- package/dist/connectors/github/sandbox.js +30 -23
- package/dist/connectors/github/sandbox.js.map +1 -1
- package/dist/connectors/github/source-thread.d.ts.map +1 -0
- package/dist/connectors/github/source-thread.js.map +1 -0
- package/dist/{channels → connectors}/github/transport.d.ts +7 -1
- package/dist/connectors/github/transport.d.ts.map +1 -0
- package/dist/{channels → connectors}/github/transport.js +18 -4
- package/dist/connectors/github/transport.js.map +1 -0
- package/dist/connectors/langsmith/index.d.ts +29 -17
- package/dist/connectors/langsmith/index.d.ts.map +1 -1
- package/dist/connectors/langsmith/index.js +34 -29
- package/dist/connectors/langsmith/index.js.map +1 -1
- package/dist/connectors/langsmith/routes.d.ts +4 -15
- package/dist/connectors/langsmith/routes.d.ts.map +1 -1
- package/dist/connectors/langsmith/routes.js +63 -72
- package/dist/connectors/langsmith/routes.js.map +1 -1
- package/dist/connectors/marketplace/catalog.d.ts +96 -0
- package/dist/connectors/marketplace/catalog.d.ts.map +1 -0
- package/dist/connectors/marketplace/catalog.js +213 -0
- package/dist/connectors/marketplace/catalog.js.map +1 -0
- package/dist/connectors/marketplace/fleet-mcp.d.ts +62 -0
- package/dist/connectors/marketplace/fleet-mcp.d.ts.map +1 -0
- package/dist/connectors/marketplace/fleet-mcp.js +215 -0
- package/dist/connectors/marketplace/fleet-mcp.js.map +1 -0
- package/dist/connectors/marketplace/index.d.ts +31 -0
- package/dist/connectors/marketplace/index.d.ts.map +1 -0
- package/dist/connectors/marketplace/index.js +39 -0
- package/dist/connectors/marketplace/index.js.map +1 -0
- package/dist/connectors/marketplace/load.d.ts +15 -0
- package/dist/connectors/marketplace/load.d.ts.map +1 -0
- package/dist/connectors/marketplace/load.js +265 -0
- package/dist/connectors/marketplace/load.js.map +1 -0
- package/dist/connectors/mcp/index.d.ts +13 -20
- package/dist/connectors/mcp/index.d.ts.map +1 -1
- package/dist/connectors/mcp/index.js +92 -112
- package/dist/connectors/mcp/index.js.map +1 -1
- package/dist/connectors/mcp/load.d.ts.map +1 -1
- package/dist/connectors/mcp/load.js +16 -40
- package/dist/connectors/mcp/load.js.map +1 -1
- package/dist/{channels → connectors}/slack/adapter-core.d.ts +1 -1
- package/dist/connectors/slack/adapter-core.d.ts.map +1 -0
- package/dist/connectors/slack/adapter-core.js.map +1 -0
- package/dist/{channels → connectors}/slack/adapter.d.ts +3 -4
- package/dist/connectors/slack/adapter.d.ts.map +1 -0
- package/dist/{channels → connectors}/slack/adapter.js +1 -1
- package/dist/connectors/slack/adapter.js.map +1 -0
- package/dist/{channels → connectors}/slack/http.d.ts +6 -40
- package/dist/connectors/slack/http.d.ts.map +1 -0
- package/dist/{channels → connectors}/slack/http.js +38 -127
- package/dist/connectors/slack/http.js.map +1 -0
- package/dist/connectors/slack/index.d.ts +108 -0
- package/dist/connectors/slack/index.d.ts.map +1 -0
- package/dist/connectors/slack/index.js +191 -0
- package/dist/connectors/slack/index.js.map +1 -0
- package/dist/{channels → connectors}/slack/normalize.d.ts +5 -5
- package/dist/connectors/slack/normalize.d.ts.map +1 -0
- package/dist/{channels → connectors}/slack/normalize.js +21 -20
- package/dist/connectors/slack/normalize.js.map +1 -0
- package/dist/connectors/slack/source-thread.d.ts.map +1 -0
- package/dist/connectors/slack/source-thread.js.map +1 -0
- package/dist/{channels → connectors}/slack/transport.d.ts +1 -1
- package/dist/connectors/slack/transport.d.ts.map +1 -0
- package/dist/{channels → connectors}/slack/transport.js +4 -3
- package/dist/connectors/slack/transport.js.map +1 -0
- package/dist/connectors/tool-selection.d.ts +55 -0
- package/dist/connectors/tool-selection.d.ts.map +1 -0
- package/dist/connectors/tool-selection.js +112 -0
- package/dist/connectors/tool-selection.js.map +1 -0
- package/dist/connectors/toolserver/catalog.d.ts +332 -0
- package/dist/connectors/toolserver/catalog.d.ts.map +1 -0
- package/dist/connectors/toolserver/catalog.js +463 -0
- package/dist/connectors/toolserver/catalog.js.map +1 -0
- package/dist/connectors/toolserver/connectors.d.ts +698 -0
- package/dist/connectors/toolserver/connectors.d.ts.map +1 -0
- package/dist/connectors/toolserver/connectors.js +13 -0
- package/dist/connectors/toolserver/connectors.js.map +1 -0
- package/dist/connectors/toolserver/index.d.ts +144 -0
- package/dist/connectors/toolserver/index.d.ts.map +1 -0
- package/dist/connectors/toolserver/index.js +107 -0
- package/dist/connectors/toolserver/index.js.map +1 -0
- package/dist/connectors/toolserver/integrations.d.ts +103 -0
- package/dist/connectors/toolserver/integrations.d.ts.map +1 -0
- package/dist/connectors/toolserver/integrations.js +277 -0
- package/dist/connectors/toolserver/integrations.js.map +1 -0
- package/dist/connectors/toolserver/load.d.ts +55 -0
- package/dist/connectors/toolserver/load.d.ts.map +1 -0
- package/dist/connectors/toolserver/load.js +290 -0
- package/dist/connectors/toolserver/load.js.map +1 -0
- package/dist/extension.d.ts +77 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +127 -0
- package/dist/extension.js.map +1 -0
- package/dist/identity/actor-subject.d.ts +60 -0
- package/dist/identity/actor-subject.d.ts.map +1 -0
- package/dist/identity/actor-subject.js +107 -0
- package/dist/identity/actor-subject.js.map +1 -0
- package/dist/identity/byo-oauth.d.ts +81 -0
- package/dist/identity/byo-oauth.d.ts.map +1 -0
- package/dist/identity/byo-oauth.js +145 -0
- package/dist/identity/byo-oauth.js.map +1 -0
- package/dist/identity/claims.d.ts +18 -0
- package/dist/identity/claims.d.ts.map +1 -0
- package/dist/identity/claims.js +37 -0
- package/dist/identity/claims.js.map +1 -0
- package/dist/identity/connect-inference.d.ts +38 -0
- package/dist/identity/connect-inference.d.ts.map +1 -0
- package/dist/identity/connect-inference.js +55 -0
- package/dist/identity/connect-inference.js.map +1 -0
- package/dist/identity/connect-provider-types.d.ts +35 -6
- package/dist/identity/connect-provider-types.d.ts.map +1 -1
- package/dist/identity/connect-provider-types.js +3 -1
- package/dist/identity/connect-provider-types.js.map +1 -1
- package/dist/identity/connect-provider.d.ts +9 -4
- package/dist/identity/connect-provider.d.ts.map +1 -1
- package/dist/identity/connect-provider.js +38 -12
- package/dist/identity/connect-provider.js.map +1 -1
- package/dist/identity/credential-resolvers.d.ts +33 -0
- package/dist/identity/credential-resolvers.d.ts.map +1 -0
- package/dist/identity/credential-resolvers.js +62 -0
- package/dist/identity/credential-resolvers.js.map +1 -0
- package/dist/identity/fleet-connect-hint.d.ts +39 -0
- package/dist/identity/fleet-connect-hint.d.ts.map +1 -0
- package/dist/identity/fleet-connect-hint.js +134 -0
- package/dist/identity/fleet-connect-hint.js.map +1 -0
- package/dist/identity/fleet-connect.d.ts +92 -0
- package/dist/identity/fleet-connect.d.ts.map +1 -0
- package/dist/identity/fleet-connect.js +256 -0
- package/dist/identity/fleet-connect.js.map +1 -0
- package/dist/identity/fleet-integration-connect.d.ts +32 -0
- package/dist/identity/fleet-integration-connect.d.ts.map +1 -0
- package/dist/identity/fleet-integration-connect.js +35 -0
- package/dist/identity/fleet-integration-connect.js.map +1 -0
- package/dist/identity/fleet.d.ts +56 -0
- package/dist/identity/fleet.d.ts.map +1 -0
- package/dist/identity/fleet.js +133 -0
- package/dist/identity/fleet.js.map +1 -0
- package/dist/identity/github/connect-http.d.ts +9 -4
- package/dist/identity/github/connect-http.d.ts.map +1 -1
- package/dist/identity/github/connect-http.js +34 -15
- package/dist/identity/github/connect-http.js.map +1 -1
- package/dist/identity/github/credentials-store.d.ts +10 -10
- package/dist/identity/github/credentials-store.d.ts.map +1 -1
- package/dist/identity/github/credentials-store.js +40 -43
- package/dist/identity/github/credentials-store.js.map +1 -1
- package/dist/identity/github/credentials.d.ts +16 -13
- package/dist/identity/github/credentials.d.ts.map +1 -1
- package/dist/identity/github/credentials.js +43 -23
- package/dist/identity/github/credentials.js.map +1 -1
- package/dist/identity/github/index.d.ts +2 -3
- package/dist/identity/github/index.d.ts.map +1 -1
- package/dist/identity/github/index.js +1 -2
- package/dist/identity/github/index.js.map +1 -1
- package/dist/identity/github/oauth.d.ts +3 -6
- package/dist/identity/github/oauth.d.ts.map +1 -1
- package/dist/identity/github/oauth.js +9 -48
- package/dist/identity/github/oauth.js.map +1 -1
- package/dist/identity/google/connect-http.d.ts +38 -0
- package/dist/identity/google/connect-http.d.ts.map +1 -0
- package/dist/identity/google/connect-http.js +59 -0
- package/dist/identity/google/connect-http.js.map +1 -0
- package/dist/identity/google/index.d.ts +7 -0
- package/dist/identity/google/index.d.ts.map +1 -0
- package/dist/identity/google/index.js +6 -0
- package/dist/identity/google/index.js.map +1 -0
- package/dist/identity/google/oauth.d.ts +22 -0
- package/dist/identity/google/oauth.d.ts.map +1 -0
- package/dist/identity/google/oauth.js +48 -0
- package/dist/identity/google/oauth.js.map +1 -0
- package/dist/identity/index.d.ts +51 -29
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +122 -131
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/linkedin/connect-http.d.ts +38 -0
- package/dist/identity/linkedin/connect-http.d.ts.map +1 -0
- package/dist/identity/linkedin/connect-http.js +59 -0
- package/dist/identity/linkedin/connect-http.js.map +1 -0
- package/dist/identity/linkedin/index.d.ts +7 -0
- package/dist/identity/linkedin/index.d.ts.map +1 -0
- package/dist/identity/linkedin/index.js +6 -0
- package/dist/identity/linkedin/index.js.map +1 -0
- package/dist/identity/linkedin/oauth.d.ts +22 -0
- package/dist/identity/linkedin/oauth.d.ts.map +1 -0
- package/dist/identity/linkedin/oauth.js +47 -0
- package/dist/identity/linkedin/oauth.js.map +1 -0
- package/dist/identity/loopback.d.ts +27 -2
- package/dist/identity/loopback.d.ts.map +1 -1
- package/dist/identity/loopback.js +61 -8
- package/dist/identity/loopback.js.map +1 -1
- package/dist/identity/marketplace/connect-hint.d.ts +31 -0
- package/dist/identity/marketplace/connect-hint.d.ts.map +1 -0
- package/dist/identity/marketplace/connect-hint.js +59 -0
- package/dist/identity/marketplace/connect-hint.js.map +1 -0
- package/dist/identity/marketplace/connect.d.ts +51 -0
- package/dist/identity/marketplace/connect.d.ts.map +1 -0
- package/dist/identity/marketplace/connect.js +88 -0
- package/dist/identity/marketplace/connect.js.map +1 -0
- package/dist/identity/marketplace/index.d.ts +9 -0
- package/dist/identity/marketplace/index.d.ts.map +1 -0
- package/dist/identity/marketplace/index.js +9 -0
- package/dist/identity/marketplace/index.js.map +1 -0
- package/dist/identity/microsoft/connect-http.d.ts +39 -0
- package/dist/identity/microsoft/connect-http.d.ts.map +1 -0
- package/dist/identity/microsoft/connect-http.js +60 -0
- package/dist/identity/microsoft/connect-http.js.map +1 -0
- package/dist/identity/microsoft/index.d.ts +7 -0
- package/dist/identity/microsoft/index.d.ts.map +1 -0
- package/dist/identity/microsoft/index.js +6 -0
- package/dist/identity/microsoft/index.js.map +1 -0
- package/dist/identity/microsoft/oauth.d.ts +24 -0
- package/dist/identity/microsoft/oauth.d.ts.map +1 -0
- package/dist/identity/microsoft/oauth.js +65 -0
- package/dist/identity/microsoft/oauth.js.map +1 -0
- package/dist/identity/oauth-tickets.d.ts +37 -0
- package/dist/identity/oauth-tickets.d.ts.map +1 -0
- package/dist/identity/oauth-tickets.js +114 -0
- package/dist/identity/oauth-tickets.js.map +1 -0
- package/dist/identity/options.d.ts +95 -0
- package/dist/identity/options.d.ts.map +1 -0
- package/dist/identity/options.js +175 -0
- package/dist/identity/options.js.map +1 -0
- package/dist/identity/slack/connect-http.d.ts +3 -3
- package/dist/identity/slack/connect-http.d.ts.map +1 -1
- package/dist/identity/slack/connect-http.js +23 -15
- package/dist/identity/slack/connect-http.js.map +1 -1
- package/dist/identity/slack/index.d.ts +1 -2
- package/dist/identity/slack/index.d.ts.map +1 -1
- package/dist/identity/slack/index.js +1 -2
- package/dist/identity/slack/index.js.map +1 -1
- package/dist/identity/slack/links.d.ts +15 -15
- package/dist/identity/slack/links.d.ts.map +1 -1
- package/dist/identity/slack/links.js +50 -53
- package/dist/identity/slack/links.js.map +1 -1
- package/dist/identity/slack/oauth.d.ts +2 -5
- package/dist/identity/slack/oauth.d.ts.map +1 -1
- package/dist/identity/slack/oauth.js +8 -63
- package/dist/identity/slack/oauth.js.map +1 -1
- package/dist/identity/supabase.js +9 -9
- package/dist/identity/supabase.js.map +1 -1
- package/dist/identity/types.d.ts +96 -38
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/identity/x/connect-http.d.ts +39 -0
- package/dist/identity/x/connect-http.d.ts.map +1 -0
- package/dist/identity/x/connect-http.js +69 -0
- package/dist/identity/x/connect-http.js.map +1 -0
- package/dist/identity/x/index.d.ts +6 -0
- package/dist/identity/x/index.d.ts.map +1 -0
- package/dist/identity/x/index.js +5 -0
- package/dist/identity/x/index.js.map +1 -0
- package/dist/index.d.ts +14 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/dist/ingress/index.d.ts +54 -0
- package/dist/ingress/index.d.ts.map +1 -0
- package/dist/ingress/index.js +128 -0
- package/dist/ingress/index.js.map +1 -0
- package/dist/namespaces.d.ts +306 -0
- package/dist/namespaces.d.ts.map +1 -0
- package/dist/namespaces.js +127 -0
- package/dist/namespaces.js.map +1 -0
- package/dist/runtime/auth.d.ts +18 -14
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +88 -68
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/backend.d.ts +1 -1
- package/dist/runtime/backend.d.ts.map +1 -1
- package/dist/runtime/connector.d.ts +66 -23
- package/dist/runtime/connector.d.ts.map +1 -1
- package/dist/runtime/connector.js +63 -27
- package/dist/runtime/connector.js.map +1 -1
- package/dist/runtime/cors.d.ts +2 -3
- package/dist/runtime/cors.d.ts.map +1 -1
- package/dist/runtime/cors.js +2 -7
- package/dist/runtime/cors.js.map +1 -1
- package/dist/runtime/credentials.d.ts +2 -2
- package/dist/runtime/credentials.d.ts.map +1 -1
- package/dist/runtime/credentials.js +41 -16
- package/dist/runtime/credentials.js.map +1 -1
- package/dist/runtime/http.d.ts +47 -0
- package/dist/runtime/http.d.ts.map +1 -0
- package/dist/runtime/http.js +54 -0
- package/dist/runtime/http.js.map +1 -0
- package/dist/runtime/identity-http.d.ts +6 -16
- package/dist/runtime/identity-http.d.ts.map +1 -1
- package/dist/runtime/identity-http.js +112 -54
- package/dist/runtime/identity-http.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +18 -17
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +55 -39
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +85 -222
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +73 -34
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/memory/index.d.ts +1 -0
- package/dist/runtime/memory/index.d.ts.map +1 -1
- package/dist/runtime/memory/index.js +1 -0
- package/dist/runtime/memory/index.js.map +1 -1
- package/dist/runtime/memory/lazy-context-backend.d.ts +66 -0
- package/dist/runtime/memory/lazy-context-backend.d.ts.map +1 -0
- package/dist/runtime/memory/lazy-context-backend.js +154 -0
- package/dist/runtime/memory/lazy-context-backend.js.map +1 -0
- package/dist/runtime/memory/user-repo.js +3 -3
- package/dist/runtime/memory/user-repo.js.map +1 -1
- package/dist/runtime/recursion-limit.d.ts +22 -0
- package/dist/runtime/recursion-limit.d.ts.map +1 -0
- package/dist/runtime/recursion-limit.js +46 -0
- package/dist/runtime/recursion-limit.js.map +1 -0
- package/dist/runtime/sandbox-manager.d.ts +33 -0
- package/dist/runtime/sandbox-manager.d.ts.map +1 -1
- package/dist/runtime/sandbox-manager.js +173 -9
- package/dist/runtime/sandbox-manager.js.map +1 -1
- package/dist/runtime/sandbox-stream-retry.d.ts +16 -0
- package/dist/runtime/sandbox-stream-retry.d.ts.map +1 -0
- package/dist/runtime/sandbox-stream-retry.js +61 -0
- package/dist/runtime/sandbox-stream-retry.js.map +1 -0
- package/dist/runtime/setup-script.d.ts.map +1 -1
- package/dist/runtime/setup-script.js +4 -2
- package/dist/runtime/setup-script.js.map +1 -1
- package/dist/runtime/validated-token.d.ts +1 -1
- package/dist/runtime/validated-token.d.ts.map +1 -1
- package/dist/runtime/validated-token.js +75 -33
- package/dist/runtime/validated-token.js.map +1 -1
- package/dist/sandbox.d.ts +19 -22
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sandbox.js +20 -34
- package/dist/sandbox.js.map +1 -1
- package/dist/schedules.js +8 -9
- package/dist/schedules.js.map +1 -1
- package/package.json +19 -28
- package/dist/channels/collect.d.ts +0 -26
- package/dist/channels/collect.d.ts.map +0 -1
- package/dist/channels/collect.js +0 -42
- package/dist/channels/collect.js.map +0 -1
- package/dist/channels/github/adapter-core.d.ts +0 -6
- package/dist/channels/github/adapter-core.d.ts.map +0 -1
- package/dist/channels/github/adapter-core.js +0 -27
- package/dist/channels/github/adapter-core.js.map +0 -1
- package/dist/channels/github/adapter.d.ts +0 -16
- package/dist/channels/github/adapter.d.ts.map +0 -1
- package/dist/channels/github/adapter.js +0 -52
- package/dist/channels/github/adapter.js.map +0 -1
- package/dist/channels/github/define.d.ts.map +0 -1
- package/dist/channels/github/define.js +0 -166
- package/dist/channels/github/define.js.map +0 -1
- package/dist/channels/github/http.d.ts.map +0 -1
- package/dist/channels/github/http.js.map +0 -1
- package/dist/channels/github/index.d.ts +0 -12
- package/dist/channels/github/index.d.ts.map +0 -1
- package/dist/channels/github/index.js +0 -10
- package/dist/channels/github/index.js.map +0 -1
- package/dist/channels/github/normalize.d.ts.map +0 -1
- package/dist/channels/github/normalize.js.map +0 -1
- package/dist/channels/github/source-thread.d.ts.map +0 -1
- package/dist/channels/github/source-thread.js.map +0 -1
- package/dist/channels/github/transport.d.ts.map +0 -1
- package/dist/channels/github/transport.js.map +0 -1
- package/dist/channels/plugin.d.ts +0 -61
- package/dist/channels/plugin.d.ts.map +0 -1
- package/dist/channels/plugin.js +0 -80
- package/dist/channels/plugin.js.map +0 -1
- package/dist/channels/slack/adapter-core.d.ts.map +0 -1
- package/dist/channels/slack/adapter-core.js.map +0 -1
- package/dist/channels/slack/adapter.d.ts.map +0 -1
- package/dist/channels/slack/adapter.js.map +0 -1
- package/dist/channels/slack/define.d.ts +0 -74
- package/dist/channels/slack/define.d.ts.map +0 -1
- package/dist/channels/slack/define.js +0 -160
- package/dist/channels/slack/define.js.map +0 -1
- package/dist/channels/slack/http.d.ts.map +0 -1
- package/dist/channels/slack/http.js.map +0 -1
- package/dist/channels/slack/index.d.ts +0 -18
- package/dist/channels/slack/index.d.ts.map +0 -1
- package/dist/channels/slack/index.js +0 -13
- package/dist/channels/slack/index.js.map +0 -1
- package/dist/channels/slack/normalize.d.ts.map +0 -1
- package/dist/channels/slack/normalize.js.map +0 -1
- package/dist/channels/slack/source-thread.d.ts.map +0 -1
- package/dist/channels/slack/source-thread.js.map +0 -1
- package/dist/channels/slack/transport.d.ts.map +0 -1
- package/dist/channels/slack/transport.js.map +0 -1
- /package/dist/{channels → connectors}/github/source-thread.d.ts +0 -0
- /package/dist/{channels → connectors}/github/source-thread.js +0 -0
- /package/dist/{channels → connectors}/slack/adapter-core.js +0 -0
- /package/dist/{channels → connectors}/slack/source-thread.d.ts +0 -0
- /package/dist/{channels → connectors}/slack/source-thread.js +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Managed ingress pipeline: verified inbound event → agent run.
|
|
3
|
+
*
|
|
4
|
+
* Providers keep signature verification, event normalization, and reply
|
|
5
|
+
* transport. This module owns the shared pieces: deterministic thread ids,
|
|
6
|
+
* trusted loopback invoke with source-provider stamps, and source-thread
|
|
7
|
+
* existence probes.
|
|
8
|
+
*/
|
|
9
|
+
import { createHash } from "node:crypto";
|
|
10
|
+
import { Client } from "@langchain/langgraph-sdk";
|
|
11
|
+
import { extractAssistantText } from "../channels/assistant-text.js";
|
|
12
|
+
import { CHANNEL_BINDING_KEY, } from "../channels/binding.js";
|
|
13
|
+
import { ChannelError } from "../channels/errors.js";
|
|
14
|
+
import { resolveLoopbackApiKey, resolveLoopbackApiUrl, } from "../identity/loopback.js";
|
|
15
|
+
import { USER_HEADER, INGRESS_SECRET_ENV, INGRESS_SECRET_HEADER, SOURCE_PROVIDER_HEADER, SOURCE_THREAD_HEADER, ORGANIZATION_HEADER, } from "../runtime/auth.js";
|
|
16
|
+
/**
|
|
17
|
+
* Schedule background work after the provider ACK. Defaults to fire-and-forget
|
|
18
|
+
* with error logging; tests pass an inline runner.
|
|
19
|
+
*/
|
|
20
|
+
export function scheduleIngressWork(work, options) {
|
|
21
|
+
const schedule = options.schedule ??
|
|
22
|
+
((fn) => {
|
|
23
|
+
fn().catch((error) => {
|
|
24
|
+
console.error(`[mda] ${options.label} failed:`, error);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
schedule(work);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* True when an MDA thread already exists for this source-thread key.
|
|
31
|
+
*
|
|
32
|
+
* Call with the **resolved** actor (post identity remap) so ownership matches
|
|
33
|
+
* the thread created on the first run.
|
|
34
|
+
*/
|
|
35
|
+
export async function ingressSourceThreadExists(input) {
|
|
36
|
+
const ingressSecret = process.env[INGRESS_SECRET_ENV];
|
|
37
|
+
if (!ingressSecret) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const client = createIngressLoopbackClient({
|
|
41
|
+
userId: input.userId,
|
|
42
|
+
organizationId: input.organizationId,
|
|
43
|
+
sourceThreadKey: input.sourceThreadKey,
|
|
44
|
+
ingressSecret,
|
|
45
|
+
});
|
|
46
|
+
const threadId = stableThreadId(input.sourceThreadKey);
|
|
47
|
+
try {
|
|
48
|
+
await client.threads.get(threadId);
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Invoke the managed graph over a trusted loopback with ingress identity stamped.
|
|
57
|
+
*
|
|
58
|
+
* Only this path may set `x-mda-source-provider` / `x-mda-source-thread-id`.
|
|
59
|
+
*/
|
|
60
|
+
export async function invokeIngressAgent(input) {
|
|
61
|
+
const ingressSecret = process.env[INGRESS_SECRET_ENV];
|
|
62
|
+
if (!ingressSecret) {
|
|
63
|
+
throw new ChannelError("channel_run_failed", "MDA_INGRESS_SECRET is required for channel agent invocation");
|
|
64
|
+
}
|
|
65
|
+
const client = createIngressLoopbackClient({
|
|
66
|
+
userId: input.userId,
|
|
67
|
+
organizationId: input.organizationId,
|
|
68
|
+
sourceThreadKey: input.sourceThreadKey,
|
|
69
|
+
ingressSecret,
|
|
70
|
+
sourceProvider: input.sourceProvider ?? input.binding.provider,
|
|
71
|
+
});
|
|
72
|
+
const threadId = stableThreadId(input.sourceThreadKey);
|
|
73
|
+
try {
|
|
74
|
+
await client.threads.create({
|
|
75
|
+
threadId,
|
|
76
|
+
metadata: { owner: input.sourceThreadKey },
|
|
77
|
+
ifExists: "do_nothing",
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// Some SDK versions use different ifExists semantics; continue and let run fail loudly.
|
|
82
|
+
}
|
|
83
|
+
const run = (await client.runs.wait(threadId, input.assistantId, {
|
|
84
|
+
input: {
|
|
85
|
+
messages: [{ role: "human", content: input.text }],
|
|
86
|
+
},
|
|
87
|
+
config: {
|
|
88
|
+
configurable: {
|
|
89
|
+
[CHANNEL_BINDING_KEY]: input.binding,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
}));
|
|
93
|
+
return {
|
|
94
|
+
replyText: extractAssistantText(run),
|
|
95
|
+
runId: run.runId ?? run.run_id,
|
|
96
|
+
threadId,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function createIngressLoopbackClient(input) {
|
|
100
|
+
const apiUrl = resolveLoopbackApiUrl();
|
|
101
|
+
const apiKey = resolveLoopbackApiKey();
|
|
102
|
+
const headers = {
|
|
103
|
+
[INGRESS_SECRET_HEADER]: input.ingressSecret,
|
|
104
|
+
[USER_HEADER]: input.userId,
|
|
105
|
+
[SOURCE_PROVIDER_HEADER]: input.sourceProvider ?? "slack",
|
|
106
|
+
[SOURCE_THREAD_HEADER]: input.sourceThreadKey,
|
|
107
|
+
};
|
|
108
|
+
if (input.organizationId) {
|
|
109
|
+
headers[ORGANIZATION_HEADER] = input.organizationId;
|
|
110
|
+
}
|
|
111
|
+
return new Client({
|
|
112
|
+
apiUrl,
|
|
113
|
+
apiKey,
|
|
114
|
+
defaultHeaders: headers,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** Deterministic LangGraph thread id from a provider source-thread key. */
|
|
118
|
+
export function stableThreadId(sourceThreadKey) {
|
|
119
|
+
const hex = createHash("sha256").update(sourceThreadKey).digest("hex");
|
|
120
|
+
return [
|
|
121
|
+
hex.slice(0, 8),
|
|
122
|
+
hex.slice(8, 12),
|
|
123
|
+
`5${hex.slice(13, 16)}`,
|
|
124
|
+
`a${hex.slice(17, 20)}`,
|
|
125
|
+
hex.slice(20, 32),
|
|
126
|
+
].join("-");
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ingress/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,mBAAmB,GAEpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,E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|
|
2
|
+
* The first-party primitive namespaces.
|
|
3
|
+
*
|
|
4
|
+
* Every provider an agent project can select is reached the same way —
|
|
5
|
+
* `<primitive>.<provider>(...)` — so the primitive is obvious at the call site
|
|
6
|
+
* and providers can be added without growing the barrel:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* connectors.slack({ on: ["app_mention"] });
|
|
10
|
+
* connectors.github({
|
|
11
|
+
* repositories: [{ repo: "acme/api", path: "api" }],
|
|
12
|
+
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
13
|
+
* });
|
|
14
|
+
* sandboxes.langsmith({ defaultTimeout: 600 });
|
|
15
|
+
* auth.supabase({ projectRef: "abc" });
|
|
16
|
+
* credentials.github({ read: ["user"] });
|
|
17
|
+
* connect.github();
|
|
18
|
+
* connect.google(); // usually inferred from Fleet integration connectors (gmail, …)
|
|
19
|
+
* connect.microsoft(); // usually inferred (outlook, teams, …)
|
|
20
|
+
* connect.linkedin(); // usually inferred (connectors.linkedin)
|
|
21
|
+
* connect.x(); // usually inferred (connectors.x)
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* These are the only primitives the managed runtime will mount. A project
|
|
25
|
+
* cannot contribute its own — `defineExtension` stays internal.
|
|
26
|
+
*/
|
|
27
|
+
import { LangSmithSandbox } from "deepagents";
|
|
28
|
+
import { githubConnector } from "./connectors/github/index.js";
|
|
29
|
+
import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer } from "./connectors/langsmith/index.js";
|
|
30
|
+
import { type MarketplaceConnectors } from "./connectors/marketplace/index.js";
|
|
31
|
+
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
32
|
+
import { slackConnector } from "./connectors/slack/index.js";
|
|
33
|
+
import { type ToolServerConnectors } from "./connectors/toolserver/index.js";
|
|
34
|
+
import { connect as githubConnect } from "./identity/github/connect-http.js";
|
|
35
|
+
import { credentials as githubCredentials } from "./identity/github/credentials.js";
|
|
36
|
+
import { connect as googleConnect } from "./identity/google/connect-http.js";
|
|
37
|
+
import { type MarketplaceConnect } from "./identity/marketplace/index.js";
|
|
38
|
+
import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js";
|
|
39
|
+
import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
|
|
40
|
+
import { connect as slackConnect } from "./identity/slack/connect-http.js";
|
|
41
|
+
import { connect as xConnect } from "./identity/x/connect-http.js";
|
|
42
|
+
import { type LangSmithSandboxOptions, type SandboxDefinition } from "./sandbox.js";
|
|
43
|
+
export { auth } from "./identity/index.js";
|
|
44
|
+
/** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
|
|
45
|
+
export declare const sandboxes: {
|
|
46
|
+
langsmith(options?: LangSmithSandboxOptions): SandboxDefinition<typeof LangSmithSandbox>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* `connectors.langsmith` — the connector factory plus its capability builders.
|
|
50
|
+
*
|
|
51
|
+
* Call `connectors.langsmith({ capabilities })` to declare the connector; use
|
|
52
|
+
* the attached builders / presets to compose grants without a second import.
|
|
53
|
+
*
|
|
54
|
+
* Builder properties are typed as `typeof` the exported functions so hover
|
|
55
|
+
* docs stay on those symbols (`runs`, `chatFeedback`, …) rather than being
|
|
56
|
+
* restated here.
|
|
57
|
+
*
|
|
58
|
+
* @see {@link langsmithConnector}
|
|
59
|
+
*/
|
|
60
|
+
export type LangSmithConnectorsNamespace = typeof langsmithConnector & {
|
|
61
|
+
readonly runs: typeof runs;
|
|
62
|
+
readonly feedback: typeof feedback;
|
|
63
|
+
readonly examples: typeof examples;
|
|
64
|
+
readonly annotationQueues: typeof annotationQueues;
|
|
65
|
+
readonly prompts: typeof prompts;
|
|
66
|
+
readonly threads: typeof threads;
|
|
67
|
+
readonly chatFeedback: typeof chatFeedback;
|
|
68
|
+
readonly traceViewer: typeof traceViewer;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
72
|
+
* named messaging. Exported from `connectors/*`.
|
|
73
|
+
*
|
|
74
|
+
* Most entries are the LangSmith tool server's built-in integrations —
|
|
75
|
+
* `connectors.gmail`, `connectors.linear`, `connectors.googleSheets`, … — whose
|
|
76
|
+
* tools resolve against the connection the workspace already manages in
|
|
77
|
+
* LangSmith. They are spread from the catalog so adding an integration is one
|
|
78
|
+
* entry there rather than a line here as well. Marketplace bridges
|
|
79
|
+
* (`connectors.notion`, `connectors.cloudflare`, …) are spread the same way
|
|
80
|
+
* from the Fleet marketplace catalog. GitHub and Slack are first-class
|
|
81
|
+
* connectors that may also contribute sandbox / Events / messaging.
|
|
82
|
+
*
|
|
83
|
+
* `langsmith` doubles as the namespace for its capability builders, so a
|
|
84
|
+
* project selects grants without a second import.
|
|
85
|
+
*
|
|
86
|
+
* Docs live on this interface (not the value) so IDE hover on `connectors.<name>`
|
|
87
|
+
* stays useful — TypeScript surfaces property docs from the annotation.
|
|
88
|
+
*/
|
|
89
|
+
export interface Connectors extends ToolServerConnectors, MarketplaceConnectors {
|
|
90
|
+
/**
|
|
91
|
+
* Declare remote MCP servers (HTTP/SSE) whose tools load at agent-graph
|
|
92
|
+
* construction. Stdio servers are not supported.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* export const connector = connectors.mcp({
|
|
97
|
+
* mcpServers: {
|
|
98
|
+
* docs: { transport: "http", url: "https://docs.example.com/mcp" },
|
|
99
|
+
* },
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @see {@link mcpConnector}
|
|
104
|
+
*/
|
|
105
|
+
mcp: typeof mcpConnector;
|
|
106
|
+
/**
|
|
107
|
+
* GitHub tools (via the LangSmith tool server), sandbox repository checkout,
|
|
108
|
+
* optional `gh` CLI provisioning, and optional GitHub App webhook Events.
|
|
109
|
+
*
|
|
110
|
+
* Installing the `gh` CLI (the default) leaves tool-server tools off; name
|
|
111
|
+
* tools via `includeTools` / `excludeTools` or set `installCLI: false` to
|
|
112
|
+
* expose them. Tool names are typed from the catalog's `github` entry.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* export const connector = connectors.github({
|
|
117
|
+
* repositories: [{ repo: "acme/api", path: "api" }],
|
|
118
|
+
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @see {@link githubConnector}
|
|
123
|
+
*/
|
|
124
|
+
github: typeof githubConnector;
|
|
125
|
+
/**
|
|
126
|
+
* Slack Events ingress, named messaging, and optional tool-server Slack tools.
|
|
127
|
+
*
|
|
128
|
+
* Events (`on`) mount ingress + messaging; `includeTools` / `excludeTools`
|
|
129
|
+
* enable Slack tool-server tools (names typed from the catalog's `slack`
|
|
130
|
+
* entry).
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* export const connector = connectors.slack({ on: ["app_mention"] });
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* @see {@link slackConnector}
|
|
138
|
+
*/
|
|
139
|
+
slack: typeof slackConnector;
|
|
140
|
+
/**
|
|
141
|
+
* Capability-delegation connector for external / untrusted callers (browser,
|
|
142
|
+
* channels, schedules). Declares constrained LangSmith grants; MDA performs
|
|
143
|
+
* them server-side so the caller never receives `LANGSMITH_API_KEY`.
|
|
144
|
+
*
|
|
145
|
+
* Also namespaces the grant builders: `connectors.langsmith.runs(...)`,
|
|
146
|
+
* `connectors.langsmith.chatFeedback(...)`, …
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* export const connector = connectors.langsmith({
|
|
151
|
+
* capabilities: [connectors.langsmith.traceViewer()],
|
|
152
|
+
* });
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @see {@link langsmithConnector}
|
|
156
|
+
*/
|
|
157
|
+
langsmith: LangSmithConnectorsNamespace;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
161
|
+
* named messaging. Exported from `connectors/*`.
|
|
162
|
+
*
|
|
163
|
+
* Factories are assigned by reference (same pattern as the Python namespace) so
|
|
164
|
+
* signatures stay in step with the connector modules. Hover docs come from
|
|
165
|
+
* {@link Connectors}.
|
|
166
|
+
*/
|
|
167
|
+
export declare const connectors: Connectors;
|
|
168
|
+
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
169
|
+
export declare const credentials: {
|
|
170
|
+
github: typeof githubCredentials;
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* First-party Connect-with-X providers for `defineIdentity({ connect })`.
|
|
174
|
+
*
|
|
175
|
+
* Docs live on this interface so IDE hover on `connect.<provider>` stays useful.
|
|
176
|
+
*/
|
|
177
|
+
export interface Connect extends MarketplaceConnect {
|
|
178
|
+
/**
|
|
179
|
+
* Connect-with-GitHub — link a caller's GitHub account for actor OAuth tokens
|
|
180
|
+
* used by sandbox git/`gh` and GitHub credentials.
|
|
181
|
+
*
|
|
182
|
+
* Usually unnecessary: declaring `connectors.github` on a user-scoped identity
|
|
183
|
+
* deployment mounts this automatically (same pattern as Google/Microsoft).
|
|
184
|
+
* Also mounts when a credential chain reads per-user GitHub tokens, or when
|
|
185
|
+
* listed on `identity.connect`.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```ts
|
|
189
|
+
* export const identity = defineIdentity({
|
|
190
|
+
* connect: [connect.github()],
|
|
191
|
+
* });
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* @see {@link githubConnect}
|
|
195
|
+
*/
|
|
196
|
+
github: typeof githubConnect;
|
|
197
|
+
/**
|
|
198
|
+
* Connect-with-Google. Usually unnecessary: declaring Google toolserver
|
|
199
|
+
* connectors (`connectors.gmail`, `connectors.googleSheets`, …) on a
|
|
200
|
+
* user-scoped identity deployment mounts this automatically with unioned
|
|
201
|
+
* scopes.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* export const identity = defineIdentity({
|
|
206
|
+
* connect: [connect.google()],
|
|
207
|
+
* });
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* @see {@link googleConnect}
|
|
211
|
+
*/
|
|
212
|
+
google: typeof googleConnect;
|
|
213
|
+
/**
|
|
214
|
+
* Connect-with-Microsoft. Usually unnecessary: declaring Microsoft toolserver
|
|
215
|
+
* connectors (`connectors.outlook`, `connectors.teams`, …) on a user-scoped
|
|
216
|
+
* identity deployment mounts this automatically with unioned scopes.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```ts
|
|
220
|
+
* export const identity = defineIdentity({
|
|
221
|
+
* connect: [connect.microsoft()],
|
|
222
|
+
* });
|
|
223
|
+
* ```
|
|
224
|
+
*
|
|
225
|
+
* @see {@link microsoftConnect}
|
|
226
|
+
*/
|
|
227
|
+
microsoft: typeof microsoftConnect;
|
|
228
|
+
/**
|
|
229
|
+
* Connect-with-LinkedIn. Usually unnecessary: declaring `connectors.linkedin`
|
|
230
|
+
* on a user-scoped identity deployment mounts this automatically with
|
|
231
|
+
* connector-derived scopes.
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```ts
|
|
235
|
+
* export const identity = defineIdentity({
|
|
236
|
+
* connect: [connect.linkedin()],
|
|
237
|
+
* });
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
* @see {@link linkedinConnect}
|
|
241
|
+
*/
|
|
242
|
+
linkedin: typeof linkedinConnect;
|
|
243
|
+
/**
|
|
244
|
+
* Connect-with-X. Usually unnecessary: declaring `connectors.x` on a
|
|
245
|
+
* user-scoped identity deployment mounts this automatically with
|
|
246
|
+
* connector-derived scopes (Fleet `twitter-oauth-provider`).
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```ts
|
|
250
|
+
* export const identity = defineIdentity({
|
|
251
|
+
* connect: [connect.x()],
|
|
252
|
+
* });
|
|
253
|
+
* ```
|
|
254
|
+
*
|
|
255
|
+
* @see {@link xConnect}
|
|
256
|
+
*/
|
|
257
|
+
x: typeof xConnect;
|
|
258
|
+
/**
|
|
259
|
+
* Connect-with-Slack — link a caller's Slack identity via OIDC for per-user
|
|
260
|
+
* channel routing and actor mapping.
|
|
261
|
+
*
|
|
262
|
+
* Mounts under `/identity/slack/*` when listed on `identity.connect`, or when
|
|
263
|
+
* a Slack channel routes into a user-scoped deployment.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```ts
|
|
267
|
+
* export const identity = defineIdentity({
|
|
268
|
+
* connect: [connect.slack()],
|
|
269
|
+
* });
|
|
270
|
+
* ```
|
|
271
|
+
*
|
|
272
|
+
* @see {@link slackConnect}
|
|
273
|
+
*/
|
|
274
|
+
slack: typeof slackConnect;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Connect-with-X — bind an MDA principal to an external account via OAuth.
|
|
278
|
+
*
|
|
279
|
+
* Pass providers into `defineIdentity({ connect: […] })`. Each mounts HTTP
|
|
280
|
+
* routes under `/identity/{id}/{status,connect,callback,link}` so a caller can
|
|
281
|
+
* link (or unlink) their account. Outcomes depend on the provider:
|
|
282
|
+
*
|
|
283
|
+
* - **Identity link** (Slack) — maps an external person to an MDA user so
|
|
284
|
+
* channel ingress can resolve `slack:T:U` → actor.
|
|
285
|
+
* - **Credential vault** (GitHub, Google, Microsoft, LinkedIn, X) — stores
|
|
286
|
+
* per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
|
|
287
|
+
*
|
|
288
|
+
* Authors rarely list providers by hand. Prefer inference: a user-scoped
|
|
289
|
+
* identity plus `connectors.github` / `credentials.github({ read: ["user"] })`,
|
|
290
|
+
* Slack Events, Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
|
|
291
|
+
* bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
|
|
292
|
+
* Connect flow automatically. Use this namespace when you need an explicit
|
|
293
|
+
* opt-in or a custom options bag.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* ```ts
|
|
297
|
+
* // Explicit (usually unnecessary — inference covers the common cases)
|
|
298
|
+
* export const identity = defineIdentity({
|
|
299
|
+
* connect: [connect.github(), connect.slack()],
|
|
300
|
+
* });
|
|
301
|
+
* ```
|
|
302
|
+
*
|
|
303
|
+
* @see {@link Connect}
|
|
304
|
+
*/
|
|
305
|
+
export declare const connect: Connect;
|
|
306
|
+
//# sourceMappingURL=namespaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.d.ts","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,IAAI,EACJ,OAAO,EACP,WAAW,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,E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AAM,EAAE,OAAO,eAAe,CAAC;IAE/B;;;;;;;;;;;;;OAaG;IACH,KAAK,EAAE,OAAO,cAAc,CAAC;IAE7B;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,EAAE,4BAA4B,CAAC;CACzC;AAgBD;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,UAOxB,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,WAAW;IACtB,MAAM;CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,OAAQ,SAAQ,kBAAkB;IACjD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,EAAE,OAAO,aAAa,CAAC;IAE7B;;;;;;;;;;;;;;OAcG;IACH,MAAM,EAAE,OAAO,aAAa,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,SAAS,EAAE,OAAO,gBAAgB,CAAC;IAEnC;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,OAAO,eAAe,CAAC;IAEjC;;;;;;;;;;;;;OAaG;IACH,CAAC,EAAE,OAAO,QAAQ,CAAC;IAEnB;;;;;;;;;;;;;;;OAeG;IACH,KAAK,EAAE,OAAO,YAAY,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,OAAO,EAAE,OAQrB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first-party primitive namespaces.
|
|
3
|
+
*
|
|
4
|
+
* Every provider an agent project can select is reached the same way —
|
|
5
|
+
* `<primitive>.<provider>(...)` — so the primitive is obvious at the call site
|
|
6
|
+
* and providers can be added without growing the barrel:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* connectors.slack({ on: ["app_mention"] });
|
|
10
|
+
* connectors.github({
|
|
11
|
+
* repositories: [{ repo: "acme/api", path: "api" }],
|
|
12
|
+
* events: [{ on: "pull_request.opened", prompt: () => "review" }],
|
|
13
|
+
* });
|
|
14
|
+
* sandboxes.langsmith({ defaultTimeout: 600 });
|
|
15
|
+
* auth.supabase({ projectRef: "abc" });
|
|
16
|
+
* credentials.github({ read: ["user"] });
|
|
17
|
+
* connect.github();
|
|
18
|
+
* connect.google(); // usually inferred from Fleet integration connectors (gmail, …)
|
|
19
|
+
* connect.microsoft(); // usually inferred (outlook, teams, …)
|
|
20
|
+
* connect.linkedin(); // usually inferred (connectors.linkedin)
|
|
21
|
+
* connect.x(); // usually inferred (connectors.x)
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* These are the only primitives the managed runtime will mount. A project
|
|
25
|
+
* cannot contribute its own — `defineExtension` stays internal.
|
|
26
|
+
*/
|
|
27
|
+
import { LangSmithSandbox } from "deepagents";
|
|
28
|
+
import { githubConnector } from "./connectors/github/index.js";
|
|
29
|
+
import { annotationQueues, chatFeedback, examples, feedback, langsmithConnector, prompts, runs, threads, traceViewer, } from "./connectors/langsmith/index.js";
|
|
30
|
+
import { marketplaceConnectors, } from "./connectors/marketplace/index.js";
|
|
31
|
+
import { mcpConnector } from "./connectors/mcp/index.js";
|
|
32
|
+
import { slackConnector } from "./connectors/slack/index.js";
|
|
33
|
+
import { toolServerConnectors, } from "./connectors/toolserver/index.js";
|
|
34
|
+
import { defineExtension } from "./extension.js";
|
|
35
|
+
import { connect as githubConnect } from "./identity/github/connect-http.js";
|
|
36
|
+
import { credentials as githubCredentials } from "./identity/github/credentials.js";
|
|
37
|
+
import { connect as googleConnect } from "./identity/google/connect-http.js";
|
|
38
|
+
import { marketplaceConnect, } from "./identity/marketplace/index.js";
|
|
39
|
+
import { connect as linkedinConnect } from "./identity/linkedin/connect-http.js";
|
|
40
|
+
import { connect as microsoftConnect } from "./identity/microsoft/connect-http.js";
|
|
41
|
+
import { connect as slackConnect } from "./identity/slack/connect-http.js";
|
|
42
|
+
import { connect as xConnect } from "./identity/x/connect-http.js";
|
|
43
|
+
import {} from "./sandbox.js";
|
|
44
|
+
export { auth } from "./identity/index.js";
|
|
45
|
+
const langsmithSandbox = defineExtension("sandbox", {
|
|
46
|
+
label: "sandboxes.langsmith",
|
|
47
|
+
provider: LangSmithSandbox,
|
|
48
|
+
// Not a schema: a sandbox's options are inferred from the provider class's
|
|
49
|
+
// own `create(...)` types, so a hand-written one would restate deepagents'
|
|
50
|
+
// surface and drift from it.
|
|
51
|
+
args: (options) => options ?? {},
|
|
52
|
+
});
|
|
53
|
+
/** Execution environments the agent's shell runs in. Exported from `sandbox/`. */
|
|
54
|
+
export const sandboxes = {
|
|
55
|
+
langsmith(options) {
|
|
56
|
+
return langsmithSandbox(options);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
const langsmithConnectors = Object.assign(langsmithConnector, {
|
|
60
|
+
runs,
|
|
61
|
+
feedback,
|
|
62
|
+
examples,
|
|
63
|
+
annotationQueues,
|
|
64
|
+
prompts,
|
|
65
|
+
threads,
|
|
66
|
+
chatFeedback,
|
|
67
|
+
traceViewer,
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Integrations: tools, HTTP routes, sandbox provisioning, inbound events, and
|
|
71
|
+
* named messaging. Exported from `connectors/*`.
|
|
72
|
+
*
|
|
73
|
+
* Factories are assigned by reference (same pattern as the Python namespace) so
|
|
74
|
+
* signatures stay in step with the connector modules. Hover docs come from
|
|
75
|
+
* {@link Connectors}.
|
|
76
|
+
*/
|
|
77
|
+
export const connectors = {
|
|
78
|
+
...toolServerConnectors,
|
|
79
|
+
...marketplaceConnectors,
|
|
80
|
+
mcp: mcpConnector,
|
|
81
|
+
github: githubConnector,
|
|
82
|
+
slack: slackConnector,
|
|
83
|
+
langsmith: langsmithConnectors,
|
|
84
|
+
};
|
|
85
|
+
/** Third-party token resolvers. Composed into `defineIdentity({ credentials })`. */
|
|
86
|
+
export const credentials = {
|
|
87
|
+
github: githubCredentials,
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Connect-with-X — bind an MDA principal to an external account via OAuth.
|
|
91
|
+
*
|
|
92
|
+
* Pass providers into `defineIdentity({ connect: […] })`. Each mounts HTTP
|
|
93
|
+
* routes under `/identity/{id}/{status,connect,callback,link}` so a caller can
|
|
94
|
+
* link (or unlink) their account. Outcomes depend on the provider:
|
|
95
|
+
*
|
|
96
|
+
* - **Identity link** (Slack) — maps an external person to an MDA user so
|
|
97
|
+
* channel ingress can resolve `slack:T:U` → actor.
|
|
98
|
+
* - **Credential vault** (GitHub, Google, Microsoft, LinkedIn, X) — stores
|
|
99
|
+
* per-actor tokens for tools, sandbox git/`gh`, or Fleet toolserver subjects.
|
|
100
|
+
*
|
|
101
|
+
* Authors rarely list providers by hand. Prefer inference: a user-scoped
|
|
102
|
+
* identity plus `connectors.github` / `credentials.github({ read: ["user"] })`,
|
|
103
|
+
* Slack Events, Google/Microsoft/LinkedIn/X toolserver connectors, or marketplace
|
|
104
|
+
* bridges (`connectors.notion`, `connectors.neon`, …) mounts the matching
|
|
105
|
+
* Connect flow automatically. Use this namespace when you need an explicit
|
|
106
|
+
* opt-in or a custom options bag.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Explicit (usually unnecessary — inference covers the common cases)
|
|
111
|
+
* export const identity = defineIdentity({
|
|
112
|
+
* connect: [connect.github(), connect.slack()],
|
|
113
|
+
* });
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* @see {@link Connect}
|
|
117
|
+
*/
|
|
118
|
+
export const connect = {
|
|
119
|
+
...marketplaceConnect,
|
|
120
|
+
github: githubConnect,
|
|
121
|
+
google: googleConnect,
|
|
122
|
+
microsoft: microsoftConnect,
|
|
123
|
+
linkedin: linkedinConnect,
|
|
124
|
+
x: xConnect,
|
|
125
|
+
slack: slackConnect,
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=namespaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespaces.js","sourceRoot":"","sources":["../src/namespaces.ts"],"names":[],"mappings":"AAAA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AE,gBAAgB;IAC1B,2EAA2E;IAC3E,2EAA2E;IAC3E,6BAA6B;IAC7B,IAAI,EAAE,CAAC,OAAiC,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE;CAC3D,CAAC,CAAC;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,SAAS,CACP,OAAiC;QAEjC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,CAAC;AAuHF,MAAM,mBAAmB,GAAiC,MAAM,CAAC,MAAM,CACrE,kBAAkB,EAClB;IACE,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,YAAY;IACZ,WAAW;CACZ,CACF,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,GAAG,oBAAoB;IACvB,GAAG,qBAAqB;IACxB,GAAG,EAAE,YAAY;IACjB,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAgHF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,MAAM,OAAO,GAAY;IAC9B,GAAG,kBAAkB;IACrB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE,eAAe;IACzB,CAAC,EAAE,QAAQ;IACX,KAAK,EAAE,YAAY;CACpB,CAAC"}
|
package/dist/runtime/auth.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Auth } from "@langchain/langgraph-sdk/auth";
|
|
2
|
-
import type
|
|
2
|
+
import { type IdentityConfig, type IdentityDefinition, type RuntimeIdentity } from "../identity/index.js";
|
|
3
3
|
/**
|
|
4
|
-
* Reserved transport for the trusted-backend ingress mode.
|
|
5
|
-
* as reserved headers (mapped into `config.configurable` by the generated
|
|
4
|
+
* Reserved transport for the trusted-backend ingress mode. User/organization
|
|
5
|
+
* travel as reserved headers (mapped into `config.configurable` by the generated
|
|
6
6
|
* `langgraph.json` allowlist); the ingress secret is validated here and is
|
|
7
7
|
* deliberately **not** allowlisted, so it never reaches `config.configurable`.
|
|
8
8
|
*/
|
|
9
9
|
/** Trusted-backend / channel-loopback identity headers (single source of truth). */
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
10
|
+
export declare const USER_HEADER = "x-mda-user-id";
|
|
11
|
+
export declare const ORGANIZATION_HEADER = "x-mda-organization-id";
|
|
12
|
+
/** Comma- or space-delimited group memberships. */
|
|
13
|
+
export declare const GROUPS_HEADER = "x-mda-groups";
|
|
12
14
|
export declare const INGRESS_SECRET_HEADER = "x-mda-ingress-secret";
|
|
13
15
|
/**
|
|
14
16
|
* Internal channel handoff headers. Accepted only after the ingress secret
|
|
@@ -27,9 +29,11 @@ export declare const INGRESS_SECRET_ENV = "MDA_INGRESS_SECRET";
|
|
|
27
29
|
export interface ManagedUser {
|
|
28
30
|
identity: string;
|
|
29
31
|
permissions: string[];
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
mda_user_id: string;
|
|
33
|
+
mda_organization_id?: string;
|
|
34
|
+
mda_user_email?: string;
|
|
35
|
+
/** Group memberships the ingress asserted; read-only, never an isolation key. */
|
|
36
|
+
mda_groups?: string[];
|
|
33
37
|
mda_claims?: Record<string, unknown>;
|
|
34
38
|
/** Trusted source provider stamped by managed ingress (never client-supplied). */
|
|
35
39
|
mda_source_provider?: string;
|
|
@@ -56,11 +60,11 @@ export declare function buildManagedAuth(identity: IdentityDefinition): Auth;
|
|
|
56
60
|
* connector route runs behind identity by default, and this is what enforces it.
|
|
57
61
|
*/
|
|
58
62
|
export declare function resolveRequestIdentity(cfg: IdentityConfig, request: Request): Promise<RuntimeIdentity>;
|
|
59
|
-
/** LangGraph Store namespace prefix for Slack ↔
|
|
63
|
+
/** LangGraph Store namespace prefix for Slack ↔ user account links. */
|
|
60
64
|
export declare const IDENTITY_LINKS_STORE_PREFIX = "mda_identity_links";
|
|
61
65
|
/**
|
|
62
66
|
* LangGraph Store namespace prefix for Connect-with-GitHub OAuth tokens.
|
|
63
|
-
* Deployment-wide (keyed by
|
|
67
|
+
* Deployment-wide (keyed by user id inside the namespace); only the trusted
|
|
64
68
|
* identity-links service principal may read/write it.
|
|
65
69
|
*/
|
|
66
70
|
export declare const GITHUB_CREDENTIALS_STORE_PREFIX = "mda_github_credentials";
|
|
@@ -68,7 +72,7 @@ export declare const GITHUB_CREDENTIALS_STORE_PREFIX = "mda_github_credentials";
|
|
|
68
72
|
* Trusted service principal for {@link IDENTITY_LINKS_STORE_PREFIX} Store ops.
|
|
69
73
|
* Stamped by the managed link client together with the ingress secret.
|
|
70
74
|
*/
|
|
71
|
-
export declare const
|
|
75
|
+
export declare const IDENTITY_LINKS_SERVICE_USER = "mda:identity-links";
|
|
72
76
|
/**
|
|
73
77
|
* Fail-closed (403) unless the store `namespace` contains the identity segments
|
|
74
78
|
* the memory scope requires as a contiguous ordered prefix (typically after the
|
|
@@ -79,8 +83,8 @@ export declare function assertStoreAccess(cfg: IdentityConfig, user: ManagedUser
|
|
|
79
83
|
export declare function namespaceHasOrderedSegments(namespace: string[], required: string[]): boolean;
|
|
80
84
|
/**
|
|
81
85
|
* Resolve the caller identity for `trusted_backend`: validate the shared ingress
|
|
82
|
-
* secret, then trust the reserved
|
|
83
|
-
* missing/invalid secret, a missing
|
|
86
|
+
* secret, then trust the reserved user/organization headers. Fail-closed (401) on a
|
|
87
|
+
* missing/invalid secret, a missing user, or a missing organization when one is required.
|
|
84
88
|
*
|
|
85
89
|
* Under `mda dev` (`MDA_LOCAL_DEV=1`), requests without a valid ingress secret
|
|
86
90
|
* resolve to a synthetic local service principal so LangGraph Studio can talk
|
|
@@ -108,7 +112,7 @@ export declare function tryLocalDevTrustedUser(cfg: IdentityConfig, request: Req
|
|
|
108
112
|
export declare function threadOwnerKey(cfg: IdentityConfig, user: ManagedUser): string;
|
|
109
113
|
/** True when this deployment exposes guest issuance and the request targets it. */
|
|
110
114
|
export declare function isGuestIssuanceRequest(request: Request, cfg: IdentityConfig): boolean;
|
|
111
|
-
/** True when the request targets a public
|
|
115
|
+
/** True when the request targets a public connector Events ingress route. */
|
|
112
116
|
export declare function isChannelEventsRequest(request: Request): boolean;
|
|
113
117
|
/** True when the request is a public identity-provider OAuth/OIDC callback. */
|
|
114
118
|
export declare function isIdentityProviderCallbackRequest(request: Request): boolean;
|