@noodleseed/one 0.35.2 → 0.37.0
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/dist/commands/catalog-data-resources.d.ts.map +1 -1
- package/dist/commands/catalog-data-resources.js +2 -1
- package/dist/commands/catalog-data-resources.js.map +1 -1
- package/dist/commands/mcp-apps.d.ts.map +1 -1
- package/dist/commands/mcp-apps.js +15 -8
- package/dist/commands/mcp-apps.js.map +1 -1
- package/dist/commands/policy-ops.d.ts.map +1 -1
- package/dist/commands/policy-ops.js +57 -15
- package/dist/commands/policy-ops.js.map +1 -1
- package/dist/widget-scaffold-template.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/error-fixes.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/error-fixes.js +6 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/error-fixes.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/hook-notes.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/curated/hook-notes.js +2 -0
- package/node_modules/@noodle-borg/agent-kit/dist/curated/hook-notes.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +9 -9
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js +7 -0
- package/node_modules/@noodle-borg/agent-kit/dist/generated/surface.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +76 -8
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +2 -2
- package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.d.ts.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js +90 -9
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts +4 -0
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.d.ts.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js +2 -0
- package/node_modules/@noodle-borg/auth/dist/jwt-issuer.js.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts +4 -0
- package/node_modules/@noodle-borg/auth/dist/verify.d.ts.map +1 -1
- package/node_modules/@noodle-borg/auth/dist/verify.js +26 -0
- package/node_modules/@noodle-borg/auth/dist/verify.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/context.d.ts +25 -0
- package/node_modules/@noodle-borg/authoring/dist/context.d.ts.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/context.js +34 -0
- package/node_modules/@noodle-borg/authoring/dist/context.js.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts +2 -1
- package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/bridge.d.ts +9 -0
- package/node_modules/@noodle-borg/authoring/dist/react/bridge.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/bridge.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/hooks.d.ts +8 -2
- package/node_modules/@noodle-borg/authoring/dist/react/hooks.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/hooks.js +46 -1
- package/node_modules/@noodle-borg/authoring/dist/react/hooks.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts +2 -2
- package/node_modules/@noodle-borg/authoring/dist/react/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.js +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/index.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/react/model-context-validation.d.ts +4 -0
- package/node_modules/@noodle-borg/authoring/dist/react/model-context-validation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/react/model-context-validation.js +94 -0
- package/node_modules/@noodle-borg/authoring/dist/react/model-context-validation.js.map +1 -0
- package/node_modules/@noodle-borg/authoring/dist/recording.d.ts +19 -2
- package/node_modules/@noodle-borg/authoring/dist/recording.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/recording.js +71 -8
- package/node_modules/@noodle-borg/authoring/dist/recording.js.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts +23 -0
- package/node_modules/@noodle-borg/authoring/dist/server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/authoring/dist/server.js +6 -0
- package/node_modules/@noodle-borg/authoring/dist/server.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/config.d.ts +2 -2
- package/node_modules/@noodle-borg/compiler/dist/artifact/config.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/config.js +4 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/config.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/consent.d.ts +4 -6
- package/node_modules/@noodle-borg/compiler/dist/artifact/consent.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/consent.js +6 -6
- package/node_modules/@noodle-borg/compiler/dist/artifact/consent.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +23 -6
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js +7 -1
- package/node_modules/@noodle-borg/compiler/dist/artifact/types.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/compile.js +26 -6
- package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/confirmation-flow.d.ts +9 -0
- package/node_modules/@noodle-borg/compiler/dist/confirmation-flow.d.ts.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/confirmation-flow.js +36 -0
- package/node_modules/@noodle-borg/compiler/dist/confirmation-flow.js.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/context-compile.d.ts +18 -0
- package/node_modules/@noodle-borg/compiler/dist/context-compile.d.ts.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/context-compile.js +28 -0
- package/node_modules/@noodle-borg/compiler/dist/context-compile.js.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/elicitation-schema.d.ts +5 -0
- package/node_modules/@noodle-borg/compiler/dist/elicitation-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/elicitation-schema.js +108 -0
- package/node_modules/@noodle-borg/compiler/dist/elicitation-schema.js.map +1 -0
- package/node_modules/@noodle-borg/compiler/dist/errors.d.ts +1 -1
- package/node_modules/@noodle-borg/compiler/dist/errors.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-emit.d.ts +3 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-emit.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-emit.js +22 -4
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-emit.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.d.ts +8 -3
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.js +16 -3
- package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/index.d.ts +2 -2
- package/node_modules/@noodle-borg/compiler/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/index.js +1 -1
- package/node_modules/@noodle-borg/compiler/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/expression.d.ts +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/expression.js +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/expression.js.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +37 -0
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +27 -4
- package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
- package/node_modules/@noodle-borg/module/dist/contract.d.ts +2 -0
- package/node_modules/@noodle-borg/module/dist/contract.d.ts.map +1 -1
- package/node_modules/@noodle-borg/module/dist/contract.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/confirmation-elicitation.d.ts +20 -0
- package/node_modules/@noodle-borg/protocol/dist/confirmation-elicitation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/confirmation-elicitation.js +159 -0
- package/node_modules/@noodle-borg/protocol/dist/confirmation-elicitation.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/context-tool.d.ts +9 -0
- package/node_modules/@noodle-borg/protocol/dist/context-tool.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/context-tool.js +76 -0
- package/node_modules/@noodle-borg/protocol/dist/context-tool.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +10 -22
- package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts +9 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js +54 -6
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/stateless.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/stateless.js +8 -1
- package/node_modules/@noodle-borg/protocol/dist/stateless.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +29 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +74 -0
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js +9 -4
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/model-context-bootstrap.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/model-context-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/model-context-bootstrap.js +80 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/model-context-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/openai-bridge.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/openai-bridge.js +16 -4
- package/node_modules/@noodle-borg/protocol/dist/widget/openai-bridge.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/react-bridge-bootstrap.d.ts +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/react-bridge-bootstrap.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/react-bridge-bootstrap.js +2 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/react-bridge-bootstrap.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/ambient-context.d.ts +10 -0
- package/node_modules/@noodle-borg/runtime/dist/ambient-context.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/ambient-context.js +51 -0
- package/node_modules/@noodle-borg/runtime/dist/ambient-context.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/confirmation.d.ts +18 -0
- package/node_modules/@noodle-borg/runtime/dist/confirmation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/confirmation.js +263 -0
- package/node_modules/@noodle-borg/runtime/dist/confirmation.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/connector/types.d.ts +4 -0
- package/node_modules/@noodle-borg/runtime/dist/connector/types.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/connector/types.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/context-bounds.d.ts +15 -0
- package/node_modules/@noodle-borg/runtime/dist/context-bounds.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/context-bounds.js +123 -0
- package/node_modules/@noodle-borg/runtime/dist/context-bounds.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/elicitation-response.d.ts +13 -0
- package/node_modules/@noodle-borg/runtime/dist/elicitation-response.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/elicitation-response.js +26 -0
- package/node_modules/@noodle-borg/runtime/dist/elicitation-response.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/execute.d.ts +69 -7
- package/node_modules/@noodle-borg/runtime/dist/execute.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/execute.js +136 -33
- package/node_modules/@noodle-borg/runtime/dist/execute.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/index.d.ts +6 -2
- package/node_modules/@noodle-borg/runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/index.js +5 -1
- package/node_modules/@noodle-borg/runtime/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/interactive.d.ts +8 -0
- package/node_modules/@noodle-borg/runtime/dist/interactive.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/interactive.js +138 -0
- package/node_modules/@noodle-borg/runtime/dist/interactive.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/invocation-context.d.ts +22 -0
- package/node_modules/@noodle-borg/runtime/dist/invocation-context.d.ts.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/invocation-context.js +2 -0
- package/node_modules/@noodle-borg/runtime/dist/invocation-context.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts +135 -3
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.js +9 -1
- package/node_modules/@noodle-borg/runtime/dist/result.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-context.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/assistant-context.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-context.js +130 -0
- package/node_modules/@noodle-borg/service/dist/assistant-context.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interaction-state.d.ts +181 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interaction-state.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interaction-state.js +293 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interaction-state.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.d.ts +92 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.js +219 -0
- package/node_modules/@noodle-borg/service/dist/assistant-interactive.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.d.ts +24 -0
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.js +151 -0
- package/node_modules/@noodle-borg/service/dist/assistant-presentation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-sensitive-values.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/assistant-sensitive-values.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-sensitive-values.js +6 -0
- package/node_modules/@noodle-borg/service/dist/assistant-sensitive-values.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-store.d.ts +38 -11
- package/node_modules/@noodle-borg/service/dist/assistant-store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-store.js +111 -13
- package/node_modules/@noodle-borg/service/dist/assistant-store.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/assistant-view-availability.d.ts +23 -0
- package/node_modules/@noodle-borg/service/dist/assistant-view-availability.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/assistant-view-availability.js +24 -0
- package/node_modules/@noodle-borg/service/dist/assistant-view-availability.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/commercial-plans.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/commercial-plans.js +5 -6
- package/node_modules/@noodle-borg/service/dist/commercial-plans.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/customer-verifier.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js +6 -0
- package/node_modules/@noodle-borg/service/dist/customer-verifier.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.d.ts +1 -2
- package/node_modules/@noodle-borg/service/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/index.js +1 -2
- package/node_modules/@noodle-borg/service/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/invocation-context.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/invocation-context.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/invocation-context.js +51 -0
- package/node_modules/@noodle-borg/service/dist/invocation-context.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/main.js +0 -9
- package/node_modules/@noodle-borg/service/dist/main.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/mcp-public-routing.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/mcp-public-routing.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/mcp-public-routing.js +16 -0
- package/node_modules/@noodle-borg/service/dist/mcp-public-routing.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.js +14 -0
- package/node_modules/@noodle-borg/service/dist/oauth/consent-claims.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/google.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/oauth/google.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/google.js +11 -1
- package/node_modules/@noodle-borg/service/dist/oauth/google.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/identity-preferences.d.ts +27 -0
- package/node_modules/@noodle-borg/service/dist/oauth/identity-preferences.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/identity-preferences.js +34 -0
- package/node_modules/@noodle-borg/service/dist/oauth/identity-preferences.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/microsoft.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/microsoft.js +6 -0
- package/node_modules/@noodle-borg/service/dist/oauth/microsoft.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js +48 -92
- package/node_modules/@noodle-borg/service/dist/oauth/provider.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js +29 -9
- package/node_modules/@noodle-borg/service/dist/oauth/store-postgres.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/store.js +4 -0
- package/node_modules/@noodle-borg/service/dist/oauth/store.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.d.ts +45 -0
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js +110 -0
- package/node_modules/@noodle-borg/service/dist/oauth/token-issuer.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-agent.d.ts +19 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-agent.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-agent.js +228 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-agent.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js +7 -2
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.js +126 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-request.d.ts +23 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-request.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-request.js +29 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-request.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-resolution.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-resolution.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-resolution.js +47 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-resolution.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js +55 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-stream.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +427 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.d.ts +8 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.js +50 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts +3 -3
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +49 -295
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/plans.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/plans.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/plans.js +92 -4
- package/node_modules/@noodle-borg/service/dist/routes/plans.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts +0 -6
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +0 -6
- package/node_modules/@noodle-borg/service/dist/serve.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/service.js +4 -10
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interaction-writes.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interaction-writes.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interaction-writes.js +36 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interaction-writes.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interactions.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interactions.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interactions.js +330 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant-interactions.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant.d.ts +17 -3
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant.js +30 -37
- package/node_modules/@noodle-borg/service/dist/store/postgres-assistant.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts +8 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/handler.js +20 -2
- package/node_modules/@noodle-borg/transport-http/dist/handler.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.d.ts.map +1 -1
- package/node_modules/@noodle-borg/transport-http/dist/index.js.map +1 -1
- package/node_modules/@noodle-borg/transport-http/package.json +1 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +117 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.js +135 -0
- package/node_modules/@noodle-borg/wire-contracts/dist/assistant.js.map +1 -1
- package/package.json +1 -1
- package/node_modules/@noodle-borg/service/dist/free-tier.d.ts +0 -33
- package/node_modules/@noodle-borg/service/dist/free-tier.d.ts.map +0 -1
- package/node_modules/@noodle-borg/service/dist/free-tier.js +0 -77
- package/node_modules/@noodle-borg/service/dist/free-tier.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-assistant-interactions.d.ts","sourceRoot":"","sources":["../../src/store/postgres-assistant-interactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,IAAI,CAAC;AAC3C,OAAO,EAIL,KAAK,sCAAsC,EAC3C,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,oCAAoC,EACzC,KAAK,+BAA+B,EAEpC,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,6CAA6C,EAClD,KAAK,sCAAsC,EAU5C,MAAM,mCAAmC,CAAC;AAM3C,uGAAuG;AACvG,qBAAa,6BAA6B;;gBAG5B,IAAI,EAAE,IAAI;IAIhB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAsE7B,MAAM,CACV,KAAK,EAAE,OAAO,CAAC,+BAA+B,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,GACjF,OAAO,CAAC,6CAA6C,CAAC;IACnD,MAAM,CACV,KAAK,EAAE,OAAO,CAAC,+BAA+B,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,GAC1E,OAAO,CAAC,sCAAsC,CAAC;IA0B5C,KAAK,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAIjF,QAAQ,CACZ,KAAK,EAAE,yBAAyB,GAAG;QAAE,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAA;KAAE,GACzF,OAAO,CAAC,oCAAoC,CAAC;IAwC1C,UAAU,CACd,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,oCAAoC,CAAC;IA+C1C,GAAG,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;IAUtF,mBAAmB,CACvB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CACR,CAAC,sCAAsC,GAAG;QAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,GAAG,SAAS,CACxF;IAOK,KAAK,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAqGtC"}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { ASSISTANT_INTERACTION_EXECUTING_GRACE_MS, ASSISTANT_INTERACTION_OUTCOME_RETENTION_MS, ASSISTANT_INTERACTION_UNKNOWN_OUTCOME, completedInteraction, createPendingInteraction, executingInteraction, expireStrandedExecutingInteraction, isPrunableInteraction, isTerminalInteraction, normalizePublicOutcome, shouldExpireStrandedExecutingInteraction, transitionedInteractions, } from '../assistant-interaction-state.js';
|
|
3
|
+
import { insertAssistantPendingInteraction, reserveAssistantInteractionPendingSlot, } from './postgres-assistant-interaction-writes.js';
|
|
4
|
+
/** Logged journal: exact private payloads during recovery grace, then bounded replay-safe outcomes. */
|
|
5
|
+
export class PostgresAssistantInteractions {
|
|
6
|
+
#pool;
|
|
7
|
+
constructor(pool) {
|
|
8
|
+
this.#pool = pool;
|
|
9
|
+
}
|
|
10
|
+
async ensureSchema() {
|
|
11
|
+
await this.#pool.query(`
|
|
12
|
+
CREATE TABLE IF NOT EXISTS assistant_pending_tool_calls (
|
|
13
|
+
id text PRIMARY KEY,
|
|
14
|
+
kind text NOT NULL DEFAULT 'confirmation',
|
|
15
|
+
status text NOT NULL DEFAULT 'pending',
|
|
16
|
+
session_id text NOT NULL,
|
|
17
|
+
deployment_id text NOT NULL DEFAULT '',
|
|
18
|
+
tool text NOT NULL,
|
|
19
|
+
arguments jsonb,
|
|
20
|
+
message text,
|
|
21
|
+
requested_schema jsonb,
|
|
22
|
+
continuation jsonb,
|
|
23
|
+
review jsonb,
|
|
24
|
+
invocation_context jsonb,
|
|
25
|
+
created_at timestamptz NOT NULL,
|
|
26
|
+
claimed_at timestamptz,
|
|
27
|
+
completed_at timestamptz,
|
|
28
|
+
public_outcome jsonb,
|
|
29
|
+
payload_scrubbed_at timestamptz,
|
|
30
|
+
expires_at timestamptz NOT NULL
|
|
31
|
+
)
|
|
32
|
+
`);
|
|
33
|
+
// Additive rolling migration from the confirmation-only table. Legacy rows have no deployment
|
|
34
|
+
// binding and therefore fail closed when consumed by the new service.
|
|
35
|
+
await this.#pool.query(`
|
|
36
|
+
ALTER TABLE assistant_pending_tool_calls
|
|
37
|
+
ADD COLUMN IF NOT EXISTS kind text NOT NULL DEFAULT 'confirmation',
|
|
38
|
+
ADD COLUMN IF NOT EXISTS status text NOT NULL DEFAULT 'pending',
|
|
39
|
+
ADD COLUMN IF NOT EXISTS deployment_id text NOT NULL DEFAULT '',
|
|
40
|
+
ADD COLUMN IF NOT EXISTS message text,
|
|
41
|
+
ADD COLUMN IF NOT EXISTS requested_schema jsonb,
|
|
42
|
+
ADD COLUMN IF NOT EXISTS continuation jsonb,
|
|
43
|
+
ADD COLUMN IF NOT EXISTS review jsonb,
|
|
44
|
+
ADD COLUMN IF NOT EXISTS invocation_context jsonb,
|
|
45
|
+
ADD COLUMN IF NOT EXISTS created_at timestamptz,
|
|
46
|
+
ADD COLUMN IF NOT EXISTS claimed_at timestamptz,
|
|
47
|
+
ADD COLUMN IF NOT EXISTS completed_at timestamptz,
|
|
48
|
+
ADD COLUMN IF NOT EXISTS public_outcome jsonb,
|
|
49
|
+
ADD COLUMN IF NOT EXISTS payload_scrubbed_at timestamptz
|
|
50
|
+
`);
|
|
51
|
+
await this.#pool.query(`
|
|
52
|
+
UPDATE assistant_pending_tool_calls
|
|
53
|
+
SET created_at=expires_at - interval '10 minutes'
|
|
54
|
+
WHERE created_at IS NULL
|
|
55
|
+
`);
|
|
56
|
+
await this.#pool.query(`
|
|
57
|
+
ALTER TABLE assistant_pending_tool_calls
|
|
58
|
+
ALTER COLUMN created_at SET NOT NULL,
|
|
59
|
+
ALTER COLUMN arguments DROP NOT NULL
|
|
60
|
+
`);
|
|
61
|
+
// Confirmations used to live in an UNLOGGED scratch table. Outcomes and executing/unknown states
|
|
62
|
+
// must survive database restart and participate in replication, so migrate the relation in place.
|
|
63
|
+
await this.#pool.query(`
|
|
64
|
+
DO $$
|
|
65
|
+
BEGIN
|
|
66
|
+
IF EXISTS (
|
|
67
|
+
SELECT 1 FROM pg_class
|
|
68
|
+
WHERE oid='assistant_pending_tool_calls'::regclass AND relpersistence='u'
|
|
69
|
+
) THEN
|
|
70
|
+
ALTER TABLE assistant_pending_tool_calls SET LOGGED;
|
|
71
|
+
END IF;
|
|
72
|
+
END $$
|
|
73
|
+
`);
|
|
74
|
+
await this.#pool.query(`
|
|
75
|
+
CREATE INDEX IF NOT EXISTS assistant_interactions_session_status_idx
|
|
76
|
+
ON assistant_pending_tool_calls (session_id, status, expires_at)
|
|
77
|
+
`);
|
|
78
|
+
}
|
|
79
|
+
async create(input) {
|
|
80
|
+
const id = `interaction_${randomUUID()}`;
|
|
81
|
+
const interaction = input.kind === 'confirmation'
|
|
82
|
+
? createPendingInteraction(id, input)
|
|
83
|
+
: createPendingInteraction(id, input);
|
|
84
|
+
await this.#transaction(async (client) => {
|
|
85
|
+
// Serialize proposals for one session across service instances so the cap cannot race.
|
|
86
|
+
await client.query(`SELECT pg_advisory_xact_lock(hashtextextended($1, 0))`, [
|
|
87
|
+
interaction.sessionId,
|
|
88
|
+
]);
|
|
89
|
+
await reserveAssistantInteractionPendingSlot(client, interaction.sessionId, interaction.createdAt);
|
|
90
|
+
await insertAssistantPendingInteraction(client, interaction);
|
|
91
|
+
});
|
|
92
|
+
return interaction;
|
|
93
|
+
}
|
|
94
|
+
async claim(input) {
|
|
95
|
+
return this.#claim(input);
|
|
96
|
+
}
|
|
97
|
+
async complete(input) {
|
|
98
|
+
return this.#transaction(async (client) => {
|
|
99
|
+
const current = await this.#lockedInteraction(client, input);
|
|
100
|
+
if (!current)
|
|
101
|
+
return { disposition: 'unavailable' };
|
|
102
|
+
if (isPrunableInteraction(current, input.now)) {
|
|
103
|
+
await client.query(`DELETE FROM assistant_pending_tool_calls WHERE id=$1`, [current.id]);
|
|
104
|
+
return { disposition: 'unavailable' };
|
|
105
|
+
}
|
|
106
|
+
if (isTerminalInteraction(current)) {
|
|
107
|
+
return { disposition: 'replay', interaction: current };
|
|
108
|
+
}
|
|
109
|
+
const mayCompleteExecution = current.status === 'executing' &&
|
|
110
|
+
(input.completion.status === 'succeeded' || input.completion.status === 'failed');
|
|
111
|
+
const mayResolvePending = current.status === 'pending' &&
|
|
112
|
+
(input.completion.status === 'declined' || input.completion.status === 'cancelled');
|
|
113
|
+
if (!mayCompleteExecution && !mayResolvePending) {
|
|
114
|
+
return { disposition: 'conflict', interaction: current };
|
|
115
|
+
}
|
|
116
|
+
const completed = completedInteraction(current, input.completion, input.now);
|
|
117
|
+
const result = await client.query(`UPDATE assistant_pending_tool_calls
|
|
118
|
+
SET status=$2, arguments=NULL, continuation=NULL, review=NULL,
|
|
119
|
+
invocation_context=NULL, completed_at=$3, public_outcome=$4::jsonb,
|
|
120
|
+
payload_scrubbed_at=$3
|
|
121
|
+
WHERE id=$1 RETURNING *`, [
|
|
122
|
+
completed.id,
|
|
123
|
+
completed.status,
|
|
124
|
+
completed.completedAt,
|
|
125
|
+
JSON.stringify(completed.publicOutcome),
|
|
126
|
+
]);
|
|
127
|
+
const row = result.rows[0];
|
|
128
|
+
if (!row)
|
|
129
|
+
throw new Error('assistant interaction disappeared during completion');
|
|
130
|
+
return { disposition: 'completed', interaction: interactionFromRow(row) };
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
async transition(input) {
|
|
134
|
+
return this.#transaction(async (client) => {
|
|
135
|
+
// Use the same session lock as proposal creation so the pending cap remains race-free.
|
|
136
|
+
await client.query(`SELECT pg_advisory_xact_lock(hashtextextended($1, 0))`, [
|
|
137
|
+
input.sessionId,
|
|
138
|
+
]);
|
|
139
|
+
const current = await this.#lockedInteraction(client, input);
|
|
140
|
+
if (!current)
|
|
141
|
+
return { disposition: 'unavailable' };
|
|
142
|
+
if (isPrunableInteraction(current, input.now)) {
|
|
143
|
+
await client.query(`DELETE FROM assistant_pending_tool_calls WHERE id=$1`, [current.id]);
|
|
144
|
+
return { disposition: 'unavailable' };
|
|
145
|
+
}
|
|
146
|
+
if (isTerminalInteraction(current)) {
|
|
147
|
+
return { disposition: 'replay', interaction: current };
|
|
148
|
+
}
|
|
149
|
+
if (current.status !== 'executing') {
|
|
150
|
+
return { disposition: 'conflict', interaction: current };
|
|
151
|
+
}
|
|
152
|
+
const transitioned = transitionedInteractions(current, input, `interaction_${randomUUID()}`);
|
|
153
|
+
await reserveAssistantInteractionPendingSlot(client, current.sessionId, input.now.toISOString());
|
|
154
|
+
await insertAssistantPendingInteraction(client, transitioned.next);
|
|
155
|
+
const result = await client.query(`UPDATE assistant_pending_tool_calls
|
|
156
|
+
SET status='succeeded', arguments=NULL, continuation=NULL, review=NULL,
|
|
157
|
+
invocation_context=NULL, completed_at=$2, public_outcome=$3::jsonb,
|
|
158
|
+
payload_scrubbed_at=$2
|
|
159
|
+
WHERE id=$1 RETURNING *`, [
|
|
160
|
+
transitioned.interaction.id,
|
|
161
|
+
transitioned.interaction.completedAt,
|
|
162
|
+
JSON.stringify(transitioned.interaction.publicOutcome),
|
|
163
|
+
]);
|
|
164
|
+
const row = result.rows[0];
|
|
165
|
+
if (!row)
|
|
166
|
+
throw new Error('assistant interaction disappeared during transition');
|
|
167
|
+
const persisted = interactionFromRow(row);
|
|
168
|
+
if (persisted.status !== 'succeeded') {
|
|
169
|
+
throw new Error('assistant interaction transition did not persist succeeded status');
|
|
170
|
+
}
|
|
171
|
+
return { disposition: 'transitioned', interaction: persisted, next: transitioned.next };
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
async get(input) {
|
|
175
|
+
await this.prune(input.now);
|
|
176
|
+
const result = await this.#pool.query(`SELECT * FROM assistant_pending_tool_calls
|
|
177
|
+
WHERE id=$1 AND session_id=$2 AND deployment_id=$3`, [input.id, input.sessionId, input.deploymentId]);
|
|
178
|
+
return result.rows[0] ? interactionFromRow(result.rows[0]) : undefined;
|
|
179
|
+
}
|
|
180
|
+
async consumeConfirmation(input) {
|
|
181
|
+
const result = await this.#claim(input, 'confirmation');
|
|
182
|
+
return result.disposition === 'claimed' && result.interaction.kind === 'confirmation'
|
|
183
|
+
? result.interaction
|
|
184
|
+
: undefined;
|
|
185
|
+
}
|
|
186
|
+
async prune(now) {
|
|
187
|
+
const completedAt = now.toISOString();
|
|
188
|
+
await this.#pool.query(`UPDATE assistant_pending_tool_calls
|
|
189
|
+
SET status='failed', arguments=NULL, continuation=NULL, review=NULL,
|
|
190
|
+
invocation_context=NULL,
|
|
191
|
+
completed_at=$1, public_outcome=$2::jsonb, payload_scrubbed_at=$1
|
|
192
|
+
WHERE status='executing' AND claimed_at <= $3 AND payload_scrubbed_at IS NULL`, [
|
|
193
|
+
completedAt,
|
|
194
|
+
JSON.stringify(ASSISTANT_INTERACTION_UNKNOWN_OUTCOME),
|
|
195
|
+
new Date(now.getTime() - ASSISTANT_INTERACTION_EXECUTING_GRACE_MS).toISOString(),
|
|
196
|
+
]);
|
|
197
|
+
await this.#pool.query(`DELETE FROM assistant_pending_tool_calls
|
|
198
|
+
WHERE (status='pending' AND expires_at <= $1)
|
|
199
|
+
OR (status IN ('succeeded','failed','declined','cancelled') AND completed_at <= $2)`, [
|
|
200
|
+
now.toISOString(),
|
|
201
|
+
new Date(now.getTime() - ASSISTANT_INTERACTION_OUTCOME_RETENTION_MS).toISOString(),
|
|
202
|
+
]);
|
|
203
|
+
}
|
|
204
|
+
async #claim(input, expectedKind) {
|
|
205
|
+
return this.#transaction(async (client) => {
|
|
206
|
+
const current = await this.#lockedInteraction(client, input, expectedKind);
|
|
207
|
+
if (!current)
|
|
208
|
+
return { disposition: 'unavailable' };
|
|
209
|
+
if (isPrunableInteraction(current, input.now)) {
|
|
210
|
+
await client.query(`DELETE FROM assistant_pending_tool_calls WHERE id=$1`, [current.id]);
|
|
211
|
+
return { disposition: 'unavailable' };
|
|
212
|
+
}
|
|
213
|
+
if (current.status !== 'pending') {
|
|
214
|
+
return { disposition: 'replay', interaction: current };
|
|
215
|
+
}
|
|
216
|
+
const claimed = executingInteraction(current, input.now);
|
|
217
|
+
const result = await client.query(`UPDATE assistant_pending_tool_calls
|
|
218
|
+
SET status='executing', claimed_at=$2
|
|
219
|
+
WHERE id=$1 RETURNING *`, [claimed.id, claimed.claimedAt]);
|
|
220
|
+
const row = result.rows[0];
|
|
221
|
+
if (!row)
|
|
222
|
+
throw new Error('assistant interaction disappeared during claim');
|
|
223
|
+
const persisted = interactionFromRow(row);
|
|
224
|
+
if (persisted.status !== 'executing') {
|
|
225
|
+
throw new Error('assistant interaction claim did not persist executing status');
|
|
226
|
+
}
|
|
227
|
+
return { disposition: 'claimed', interaction: persisted };
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
async #lockedInteraction(client, input, expectedKind) {
|
|
231
|
+
const result = await client.query(`SELECT * FROM assistant_pending_tool_calls
|
|
232
|
+
WHERE id=$1 AND session_id=$2 AND deployment_id=$3
|
|
233
|
+
AND ($4::text IS NULL OR kind=$4)
|
|
234
|
+
FOR UPDATE`, [input.id, input.sessionId, input.deploymentId, expectedKind ?? null]);
|
|
235
|
+
const row = result.rows[0];
|
|
236
|
+
if (!row)
|
|
237
|
+
return undefined;
|
|
238
|
+
const interaction = interactionFromRow(row);
|
|
239
|
+
if (!shouldExpireStrandedExecutingInteraction(interaction, input.now))
|
|
240
|
+
return interaction;
|
|
241
|
+
const expired = expireStrandedExecutingInteraction(interaction, input.now);
|
|
242
|
+
const updated = await client.query(`UPDATE assistant_pending_tool_calls
|
|
243
|
+
SET status='failed', arguments=NULL, continuation=NULL, review=NULL,
|
|
244
|
+
invocation_context=NULL,
|
|
245
|
+
completed_at=$2, public_outcome=$3::jsonb, payload_scrubbed_at=$2
|
|
246
|
+
WHERE id=$1 RETURNING *`, [expired.id, expired.completedAt, JSON.stringify(expired.publicOutcome)]);
|
|
247
|
+
const updatedRow = updated.rows[0];
|
|
248
|
+
if (!updatedRow)
|
|
249
|
+
throw new Error('assistant interaction disappeared during expiry');
|
|
250
|
+
return interactionFromRow(updatedRow);
|
|
251
|
+
}
|
|
252
|
+
async #transaction(operation) {
|
|
253
|
+
const client = await this.#pool.connect();
|
|
254
|
+
try {
|
|
255
|
+
await client.query('BEGIN');
|
|
256
|
+
const result = await operation(client);
|
|
257
|
+
await client.query('COMMIT');
|
|
258
|
+
return result;
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
await client.query('ROLLBACK');
|
|
262
|
+
throw error;
|
|
263
|
+
}
|
|
264
|
+
finally {
|
|
265
|
+
client.release();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function interactionFromRow(row) {
|
|
270
|
+
const common = {
|
|
271
|
+
id: row.id,
|
|
272
|
+
sessionId: row.session_id,
|
|
273
|
+
deploymentId: row.deployment_id,
|
|
274
|
+
...(row.invocation_context ? { context: row.invocation_context } : {}),
|
|
275
|
+
...(row.payload_scrubbed_at
|
|
276
|
+
? { payloadScrubbedAt: row.payload_scrubbed_at.toISOString() }
|
|
277
|
+
: {}),
|
|
278
|
+
createdAt: row.created_at.toISOString(),
|
|
279
|
+
expiresAt: row.expires_at.toISOString(),
|
|
280
|
+
};
|
|
281
|
+
const payload = row.kind === 'confirmation'
|
|
282
|
+
? {
|
|
283
|
+
kind: 'confirmation',
|
|
284
|
+
tool: row.tool,
|
|
285
|
+
arguments: row.arguments,
|
|
286
|
+
...(row.continuation !== null ? { continuation: row.continuation } : {}),
|
|
287
|
+
...(row.review !== null ? { review: row.review } : {}),
|
|
288
|
+
}
|
|
289
|
+
: {
|
|
290
|
+
kind: 'input',
|
|
291
|
+
tool: row.tool,
|
|
292
|
+
message: requiredRowValue(row.message, 'message'),
|
|
293
|
+
requestedSchema: requiredRowValue(row.requested_schema, 'requested_schema'),
|
|
294
|
+
continuation: row.continuation,
|
|
295
|
+
};
|
|
296
|
+
if (row.status === 'pending')
|
|
297
|
+
return { ...common, ...payload, status: 'pending' };
|
|
298
|
+
const claimedAt = row.claimed_at?.toISOString();
|
|
299
|
+
if (row.status === 'executing') {
|
|
300
|
+
return {
|
|
301
|
+
...common,
|
|
302
|
+
...payload,
|
|
303
|
+
status: 'executing',
|
|
304
|
+
claimedAt: requiredRowValue(claimedAt, 'claimed_at'),
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const completedAt = requiredRowValue(row.completed_at?.toISOString(), 'completed_at');
|
|
308
|
+
const publicOutcome = normalizePublicOutcome(requiredRowValue(row.public_outcome, 'public_outcome'));
|
|
309
|
+
if (row.status === 'succeeded' || row.status === 'failed') {
|
|
310
|
+
return {
|
|
311
|
+
...common,
|
|
312
|
+
...payload,
|
|
313
|
+
status: row.status,
|
|
314
|
+
claimedAt: requiredRowValue(claimedAt, 'claimed_at'),
|
|
315
|
+
completedAt,
|
|
316
|
+
publicOutcome,
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
if (row.status === 'declined' || row.status === 'cancelled') {
|
|
320
|
+
return { ...common, ...payload, status: row.status, completedAt, publicOutcome };
|
|
321
|
+
}
|
|
322
|
+
throw new Error('invalid assistant interaction status in persistence');
|
|
323
|
+
}
|
|
324
|
+
function requiredRowValue(value, field) {
|
|
325
|
+
if (value === null || value === undefined) {
|
|
326
|
+
throw new Error(`assistant interaction row is missing ${field}`);
|
|
327
|
+
}
|
|
328
|
+
return value;
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=postgres-assistant-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-assistant-interactions.js","sourceRoot":"","sources":["../../src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Y,CAAC;SACrD,CAAC;IACJ,CAAC;IACD,MAAM,WAAW,GAAG,gBAAgB,CAAC,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,cAAc,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,sBAAsB,CAC1C,gBAAgB,CAAC,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CACvD,CAAC;IACF,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW,IAAI,GAAG,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC1D,OAAO;YACL,GAAG,MAAM;YACT,GAAG,OAAO;YACV,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,SAAS,EAAE,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC;YACpD,WAAW;YACX,aAAa;SACd,CAAC;IACJ,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,KAAK,UAAU,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QAC5D,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;IACnF,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,gBAAgB,CAAI,KAA2B,EAAE,KAAa;IACrE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,wCAAwC,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Pool } from 'pg';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AssistantConfirmationInteractionRecord, AssistantInteractionClaimResult, AssistantInteractionCompletion, AssistantInteractionCompletionResult, AssistantInteractionCreateInput, AssistantInteractionRecord, AssistantInteractionScope, AssistantInteractionTransitionInput, AssistantInteractionTransitionResult, AssistantPendingConfirmationInteractionRecord, AssistantPendingInputInteractionRecord } from '../assistant-interaction-state.js';
|
|
3
|
+
import type { AssistantClientRecord, AssistantHistoryMessage, AssistantSessionRecord, AssistantStore } from '../assistant-store.js';
|
|
3
4
|
import type { TenantRef } from '../store.js';
|
|
4
5
|
/** Durable clients + shared, crash-disposable active sessions for multi-instance assistant gateways. */
|
|
5
6
|
export declare class PostgresAssistantStore implements AssistantStore {
|
|
@@ -29,8 +30,21 @@ export declare class PostgresAssistantStore implements AssistantStore {
|
|
|
29
30
|
}>;
|
|
30
31
|
getSession(token: string, now: Date): Promise<AssistantSessionRecord | undefined>;
|
|
31
32
|
appendHistory(id: string, messages: readonly AssistantHistoryMessage[]): Promise<void>;
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
createInteraction(input: Extract<AssistantInteractionCreateInput, {
|
|
34
|
+
readonly kind: 'confirmation';
|
|
35
|
+
}>): Promise<AssistantPendingConfirmationInteractionRecord>;
|
|
36
|
+
createInteraction(input: Extract<AssistantInteractionCreateInput, {
|
|
37
|
+
readonly kind: 'input';
|
|
38
|
+
}>): Promise<AssistantPendingInputInteractionRecord>;
|
|
39
|
+
claimInteraction(input: AssistantInteractionScope): Promise<AssistantInteractionClaimResult>;
|
|
40
|
+
completeInteraction(input: AssistantInteractionScope & {
|
|
41
|
+
readonly completion: AssistantInteractionCompletion;
|
|
42
|
+
}): Promise<AssistantInteractionCompletionResult>;
|
|
43
|
+
transitionInteraction(input: AssistantInteractionTransitionInput): Promise<AssistantInteractionTransitionResult>;
|
|
44
|
+
getInteraction(input: AssistantInteractionScope): Promise<AssistantInteractionRecord | undefined>;
|
|
45
|
+
consumeInteraction(id: string, sessionId: string, deploymentId: string, now: Date): Promise<(AssistantConfirmationInteractionRecord & {
|
|
46
|
+
readonly status: 'executing';
|
|
47
|
+
}) | undefined>;
|
|
34
48
|
consumeConsoleApprovalNonce(nonce: string, subject: string, expiresAt: Date, now: Date): Promise<boolean>;
|
|
35
49
|
}
|
|
36
50
|
//# sourceMappingURL=postgres-assistant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-assistant.d.ts","sourceRoot":"","sources":["../../src/store/postgres-assistant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"postgres-assistant.d.ts","sourceRoot":"","sources":["../../src/store/postgres-assistant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,KAAK,EACV,sCAAsC,EACtC,+BAA+B,EAC/B,8BAA8B,EAC9B,oCAAoC,EACpC,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,mCAAmC,EACnC,oCAAoC,EACpC,6CAA6C,EAC7C,sCAAsC,EACvC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,wGAAwG;AACxG,qBAAa,sBAAuB,YAAW,cAAc;;gBAI/C,IAAI,EAAE,IAAI;IAKhB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAsD7B,YAAY,CAAC,KAAK,EAAE;QACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;QAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;QAC3C,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;KACpB,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE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GAC1E,OAAO,CAAC,sCAAsC,CAAC;IAW5C,gBAAgB,CACpB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,+BAA+B,CAAC;IAIrC,mBAAmB,CACvB,KAAK,EAAE,yBAAyB,GAAG;QAAE,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAA;KAAE,GACzF,OAAO,CAAC,oCAAoC,CAAC;IAI1C,qBAAqB,CACzB,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,oCAAoC,CAAC;IAI1C,cAAc,CAClB,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC;IAI5C,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,IAAI,GACR,OAAO,CACR,CAAC,sCAAsC,GAAG;QAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC,GAAG,SAAS,CACxF;IAIK,2BAA2B,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,IAAI,EACf,GAAG,EAAE,IAAI,GACR,OAAO,CAAC,OAAO,CAAC;CAoBpB"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ASSISTANT_SESSION_IDLE_MS } from '../assistant-store.js';
|
|
2
|
+
import { PostgresAssistantInteractions } from './postgres-assistant-interactions.js';
|
|
2
3
|
/** Durable clients + shared, crash-disposable active sessions for multi-instance assistant gateways. */
|
|
3
4
|
export class PostgresAssistantStore {
|
|
4
5
|
#pool;
|
|
6
|
+
#interactions;
|
|
5
7
|
constructor(pool) {
|
|
6
8
|
this.#pool = pool;
|
|
9
|
+
this.#interactions = new PostgresAssistantInteractions(pool);
|
|
7
10
|
}
|
|
8
11
|
async ensureSchema() {
|
|
9
12
|
await this.#pool.query(`
|
|
@@ -36,6 +39,7 @@ export class PostgresAssistantStore {
|
|
|
36
39
|
origin text NOT NULL,
|
|
37
40
|
caller jsonb NOT NULL,
|
|
38
41
|
context jsonb,
|
|
42
|
+
preferences jsonb,
|
|
39
43
|
appearance jsonb,
|
|
40
44
|
history jsonb NOT NULL DEFAULT '[]'::jsonb,
|
|
41
45
|
created_at timestamptz NOT NULL,
|
|
@@ -43,14 +47,10 @@ export class PostgresAssistantStore {
|
|
|
43
47
|
absolute_expires_at timestamptz NOT NULL
|
|
44
48
|
)
|
|
45
49
|
`);
|
|
50
|
+
await this.#interactions.ensureSchema();
|
|
46
51
|
await this.#pool.query(`
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
session_id text NOT NULL,
|
|
50
|
-
tool text NOT NULL,
|
|
51
|
-
arguments jsonb NOT NULL,
|
|
52
|
-
expires_at timestamptz NOT NULL
|
|
53
|
-
)
|
|
52
|
+
ALTER TABLE assistant_sessions
|
|
53
|
+
ADD COLUMN IF NOT EXISTS preferences jsonb
|
|
54
54
|
`);
|
|
55
55
|
await this.#pool.query(`
|
|
56
56
|
CREATE TABLE IF NOT EXISTS console_approval_nonces (
|
|
@@ -129,8 +129,8 @@ export class PostgresAssistantStore {
|
|
|
129
129
|
const session = { ...input, id, tokenHash, history: [] };
|
|
130
130
|
await this.#pool.query(`INSERT INTO assistant_sessions
|
|
131
131
|
(id, token_hash, client_id, org_slug, app_slug, environment, deployment_id, origin,
|
|
132
|
-
caller, context, appearance, history, created_at, expires_at, absolute_expires_at)
|
|
133
|
-
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9::jsonb,$10::jsonb,$11::jsonb,'[]'::jsonb,$
|
|
132
|
+
caller, context, preferences, appearance, history, created_at, expires_at, absolute_expires_at)
|
|
133
|
+
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9::jsonb,$10::jsonb,$11::jsonb,$12::jsonb,'[]'::jsonb,$13,$14,$15)`, [
|
|
134
134
|
id,
|
|
135
135
|
tokenHash,
|
|
136
136
|
input.clientId,
|
|
@@ -141,6 +141,7 @@ export class PostgresAssistantStore {
|
|
|
141
141
|
input.origin,
|
|
142
142
|
JSON.stringify(input.caller),
|
|
143
143
|
input.context ? JSON.stringify(input.context) : null,
|
|
144
|
+
input.preferences ? JSON.stringify(input.preferences) : null,
|
|
144
145
|
input.configuration ? JSON.stringify(input.configuration) : null,
|
|
145
146
|
input.createdAt,
|
|
146
147
|
input.expiresAt,
|
|
@@ -169,32 +170,25 @@ export class PostgresAssistantStore {
|
|
|
169
170
|
WITH ORDINALITY AS e(value, n) ORDER BY n DESC LIMIT 12) recent)
|
|
170
171
|
WHERE id=$1`, [id, JSON.stringify(messages)]);
|
|
171
172
|
}
|
|
172
|
-
async
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
VALUES ($1,$2,$3,$4::jsonb,$5)`, [
|
|
177
|
-
pending.id,
|
|
178
|
-
pending.sessionId,
|
|
179
|
-
pending.tool,
|
|
180
|
-
JSON.stringify(pending.arguments),
|
|
181
|
-
pending.expiresAt,
|
|
182
|
-
]);
|
|
183
|
-
return pending;
|
|
173
|
+
async createInteraction(input) {
|
|
174
|
+
return input.kind === 'confirmation'
|
|
175
|
+
? this.#interactions.create(input)
|
|
176
|
+
: this.#interactions.create(input);
|
|
184
177
|
}
|
|
185
|
-
async
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
async claimInteraction(input) {
|
|
179
|
+
return this.#interactions.claim(input);
|
|
180
|
+
}
|
|
181
|
+
async completeInteraction(input) {
|
|
182
|
+
return this.#interactions.complete(input);
|
|
183
|
+
}
|
|
184
|
+
async transitionInteraction(input) {
|
|
185
|
+
return this.#interactions.transition(input);
|
|
186
|
+
}
|
|
187
|
+
async getInteraction(input) {
|
|
188
|
+
return this.#interactions.get(input);
|
|
189
|
+
}
|
|
190
|
+
async consumeInteraction(id, sessionId, deploymentId, now) {
|
|
191
|
+
return this.#interactions.consumeConfirmation({ id, sessionId, deploymentId, now });
|
|
198
192
|
}
|
|
199
193
|
async consumeConsoleApprovalNonce(nonce, subject, expiresAt, now) {
|
|
200
194
|
if (expiresAt.getTime() <= now.getTime())
|
|
@@ -204,9 +198,7 @@ export class PostgresAssistantStore {
|
|
|
204
198
|
return result.rowCount === 1;
|
|
205
199
|
}
|
|
206
200
|
async #prune(now) {
|
|
207
|
-
await this.#
|
|
208
|
-
now.toISOString(),
|
|
209
|
-
]);
|
|
201
|
+
await this.#interactions.prune(now);
|
|
210
202
|
await this.#pool.query(`DELETE FROM console_approval_nonces WHERE expires_at <= $1`, [
|
|
211
203
|
now.toISOString(),
|
|
212
204
|
]);
|
|
@@ -235,6 +227,7 @@ function sessionFromRow(row) {
|
|
|
235
227
|
origin: row.origin,
|
|
236
228
|
caller: row.caller,
|
|
237
229
|
...(row.context ? { context: row.context } : {}),
|
|
230
|
+
...(row.preferences ? { preferences: row.preferences } : {}),
|
|
238
231
|
...(row.appearance ? { configuration: row.appearance } : {}),
|
|
239
232
|
createdAt: row.created_at.toISOString(),
|
|
240
233
|
expiresAt: row.expires_at.toISOString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-assistant.js","sourceRoot":"","sources":["../../src/store/postgres-assistant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"postgres-assistant.js","sourceRoot":"","sources":["../../src/store/postgres-assistant.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AAErF,wGAAwG;AACxG,MAAM,OAAO,sBAAsB;IACxB,KAAK,CAAO;IACZ,aAAa,CAAgC;IAEtD,YAAY,IAAU;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,aAAa,GAAG,IAAI,6BAA6B,CAAC,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CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE;QACvC,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE;QACvC,iBAAiB,EAAE,GAAG,CAAC,mBAAmB,CAAC,WAAW,EAAE;QACxD,OAAO,EAAE,GAAG,CAAC,OAAO;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
2
|
import type { AccessMode, AdmissionGate, DataPlaneIdentityAuthorizer, OrgMembershipSource, OwnerTokenVerifier, RequestEventInput, TenantRouteRef } from '@noodle-borg/module';
|
|
3
|
-
import { type ServedArtifact } from '@noodle-borg/protocol';
|
|
3
|
+
import { type ProtocolRequestContext, type ServedArtifact } from '@noodle-borg/protocol';
|
|
4
4
|
import { type TlsPosture } from './front-door.js';
|
|
5
5
|
import { type Logger } from './logging.js';
|
|
6
6
|
export type { AccessMode, AdmissionCategory, AdmissionContext, AdmissionDecision, AdmissionGate, DataPlaneIdentityAuthorizer, OwnerTokenVerifier, TenantRouteRef, } from '@noodle-borg/module';
|
|
7
7
|
/** Origins allowed to call the endpoint: an explicit list, a predicate, or undefined (allow any). */
|
|
8
8
|
export type OriginPolicy = readonly string[] | ((origin: string) => boolean);
|
|
9
|
+
export interface InvocationContextResolutionInput {
|
|
10
|
+
readonly target: ServedArtifact;
|
|
11
|
+
readonly caller?: NonNullable<ProtocolRequestContext['caller']>;
|
|
12
|
+
}
|
|
13
|
+
export type InvocationContextResolver = (input: InvocationContextResolutionInput) => Promise<NonNullable<ServedArtifact['deps']['context']> | undefined>;
|
|
9
14
|
export interface HttpHandlerOptions {
|
|
10
15
|
/** The single MCP endpoint path. Default `/mcp`. */
|
|
11
16
|
readonly endpoint?: string;
|
|
@@ -48,6 +53,8 @@ export interface HttpHandlerOptions {
|
|
|
48
53
|
* Requests without a tenant org (single/local dev targets) are not captured.
|
|
49
54
|
*/
|
|
50
55
|
readonly captureRequestEvent?: (event: RequestEventInput) => void;
|
|
56
|
+
/** Resolve one immutable context snapshot after auth/admission and before request execution. */
|
|
57
|
+
readonly resolveInvocationContext?: InvocationContextResolver;
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
60
|
* Build a `node:http` request listener that serves one {@link ServedArtifact} over the MCP **Streamable
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EACV,UAAU,EAGV,aAAa,EACb,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EACV,UAAU,EAGV,aAAa,EACb,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,cAAc,CAAC;AASvD,YAAY,EACV,UAAU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