@noodleseed/one 0.47.0 → 0.49.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/archive-ops.js +1 -1
- package/dist/commands/archive-ops.js.map +1 -1
- package/dist/commands/assistant-ops.d.ts.map +1 -1
- package/dist/commands/assistant-ops.js +65 -1
- package/dist/commands/assistant-ops.js.map +1 -1
- package/dist/commands/billing-admission-output.d.ts +16 -0
- package/dist/commands/billing-admission-output.d.ts.map +1 -0
- package/dist/commands/billing-admission-output.js +40 -0
- package/dist/commands/billing-admission-output.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-args.d.ts +40 -0
- package/dist/commands/billing-enforcement-activation-args.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-args.js +125 -0
- package/dist/commands/billing-enforcement-activation-args.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-files.d.ts +11 -0
- package/dist/commands/billing-enforcement-activation-files.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-files.js +54 -0
- package/dist/commands/billing-enforcement-activation-files.js.map +1 -0
- package/dist/commands/billing-enforcement-activation-ops.d.ts +2 -0
- package/dist/commands/billing-enforcement-activation-ops.d.ts.map +1 -0
- package/dist/commands/billing-enforcement-activation-ops.js +283 -0
- package/dist/commands/billing-enforcement-activation-ops.js.map +1 -0
- package/dist/commands/billing-enforcement-ops.d.ts.map +1 -1
- package/dist/commands/billing-enforcement-ops.js +5 -1
- package/dist/commands/billing-enforcement-ops.js.map +1 -1
- package/dist/commands/billing-read-ops.d.ts.map +1 -1
- package/dist/commands/billing-read-ops.js +15 -3
- package/dist/commands/billing-read-ops.js.map +1 -1
- package/dist/commands/billing-read-view.d.ts +40 -1
- package/dist/commands/billing-read-view.d.ts.map +1 -1
- package/dist/commands/billing-read-view.js +50 -0
- package/dist/commands/billing-read-view.js.map +1 -1
- package/dist/commands/catalog-data-resources.d.ts.map +1 -1
- package/dist/commands/catalog-data-resources.js +15 -4
- package/dist/commands/catalog-data-resources.js.map +1 -1
- package/dist/commands/deploy-ops.d.ts +1 -0
- package/dist/commands/deploy-ops.d.ts.map +1 -1
- package/dist/commands/deploy-ops.js +5 -0
- package/dist/commands/deploy-ops.js.map +1 -1
- package/dist/commands/deploy-status-ops.js +1 -1
- package/dist/commands/deploy-status-ops.js.map +1 -1
- package/dist/commands/mcp-apps-chatgpt.js +4 -4
- package/dist/commands/mcp-apps-chatgpt.js.map +1 -1
- package/dist/commands/shared.d.ts.map +1 -1
- package/dist/commands/shared.js +13 -0
- package/dist/commands/shared.js.map +1 -1
- package/dist/deploy.d.ts +1 -0
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +5 -1
- package/dist/deploy.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.js +1 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-authoring-refs.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 +9 -1
- package/node_modules/@noodle-borg/agent-kit/dist/skill-embedded-assistant-ref.js.map +1 -1
- package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js +42 -1
- package/node_modules/@noodle-borg/protocol/dist/mapping.js.map +1 -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 +94 -4
- package/node_modules/@noodle-borg/protocol/dist/sdk-server.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts +7 -3
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.d.ts.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js +59 -4
- package/node_modules/@noodle-borg/protocol/dist/tool-interaction.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.js +17 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/action-wiring-bootstrap.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 +8 -16
- package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js.map +1 -1
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.d.ts +3 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.d.ts.map +1 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.js +177 -0
- package/node_modules/@noodle-borg/protocol/dist/widget/interaction-bootstrap.js.map +1 -0
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts +3 -1
- package/node_modules/@noodle-borg/runtime/dist/result.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/result.js.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.d.ts +10 -0
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.js +26 -1
- package/node_modules/@noodle-borg/runtime/dist/tool-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.d.ts +46 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.js +111 -0
- package/node_modules/@noodle-borg/service/dist/billing/authoritative-admission.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.d.ts +80 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.js +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-enforcement-projection.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js +51 -0
- package/node_modules/@noodle-borg/service/dist/billing/commercial-entitlements.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.d.ts +34 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.js +125 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.d.ts +265 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.js +340 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/enforcement-profile.d.ts +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts +15 -3
- package/node_modules/@noodle-borg/service/dist/billing/integration.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/integration.js +56 -3
- package/node_modules/@noodle-borg/service/dist/billing/integration.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts +20 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js +121 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-authoritative-authority.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.d.ts +10 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.js +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-apps.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.d.ts +25 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js +248 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-counters.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts +17 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js +278 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-projection.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.d.ts +7 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.js +63 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-commercial-enforcement-transaction.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.d.ts +6 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.js +89 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-locks.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.d.ts +13 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.js +193 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-preflight.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js +119 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-schema.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.d.ts +65 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.js +159 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation-support.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.d.ts +31 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.js +247 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js +40 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js +45 -22
- package/node_modules/@noodle-borg/service/dist/billing/postgres-enforcement-profile.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.js +158 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission-ledger.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts +18 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js +326 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-admission.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js +10 -5
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-epochs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js +3 -3
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-live-validation.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts +3 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js +8 -2
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-readiness.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js +4 -4
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-reconciliation.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts +2 -2
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-runtime.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-scheduler-store.js +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js +27 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-meter-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.d.ts +33 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js +272 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-production-app-admission.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js +2 -0
- package/node_modules/@noodle-borg/service/dist/billing/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.d.ts +174 -28
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.js +51 -6
- package/node_modules/@noodle-borg/service/dist/billing/read-contract.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts +3 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/billing-public.js +3 -0
- package/node_modules/@noodle-borg/service/dist/billing-public.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts +11 -0
- package/node_modules/@noodle-borg/service/dist/http-util.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js +41 -1
- package/node_modules/@noodle-borg/service/dist/http-util.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/options.d.ts +14 -2
- package/node_modules/@noodle-borg/service/dist/options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/persistence-options.js +9 -0
- package/node_modules/@noodle-borg/service/dist/persistence-options.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/registry.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/registry.js +10 -0
- package/node_modules/@noodle-borg/service/dist/registry.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js +18 -1
- package/node_modules/@noodle-borg/service/dist/routes/archive.js.map +1 -1
- 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 +10 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js +85 -0
- package/node_modules/@noodle-borg/service/dist/routes/assistant.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.js +197 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-enforcement-activation.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.d.ts +15 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.d.ts.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.js +33 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-production-app-response.js.map +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts +2 -0
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js +203 -41
- package/node_modules/@noodle-borg/service/dist/routes/billing-read.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts +4 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js +25 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-dispatch.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts +1 -0
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js +9 -1
- package/node_modules/@noodle-borg/service/dist/routes/commercial-service-deps.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +22 -6
- package/node_modules/@noodle-borg/service/dist/routes/control-plane.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js +19 -1
- package/node_modules/@noodle-borg/service/dist/routes/rollback.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/serve.js +41 -1
- 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 +6 -3
- package/node_modules/@noodle-borg/service/dist/service.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js +3 -3
- package/node_modules/@noodle-borg/service/dist/store/cloudsql-pool.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts +5 -7
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js +71 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-apps.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js +7 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-github-runs.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js +5 -0
- package/node_modules/@noodle-borg/service/dist/store/postgres-schema.js.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.d.ts.map +1 -1
- package/node_modules/@noodle-borg/service/dist/store/postgres.js +29 -34
- package/node_modules/@noodle-borg/service/dist/store/postgres.js.map +1 -1
- package/package.json +1 -1
|
@@ -87,7 +87,8 @@ function registerTools(server, artifact, deps, context) {
|
|
|
87
87
|
return mapped;
|
|
88
88
|
}
|
|
89
89
|
const tool = artifact.tools.find((item) => item.name === toolName);
|
|
90
|
-
|
|
90
|
+
const interaction = extractElicitationResponses(request.params.arguments ?? {}, request.params._meta, toolUsesPortableInteractionArgument(tool));
|
|
91
|
+
let toolArguments = interaction.arguments;
|
|
91
92
|
if (tool !== undefined) {
|
|
92
93
|
const coerced = coerceToolArguments(tool.inputSchema, toolArguments);
|
|
93
94
|
if (coerced.issues.length > 0) {
|
|
@@ -126,11 +127,12 @@ function registerTools(server, artifact, deps, context) {
|
|
|
126
127
|
...(context.formElicitationTransport === undefined
|
|
127
128
|
? {}
|
|
128
129
|
: { formElicitationTransport: context.formElicitationTransport }),
|
|
130
|
+
providedElicitationResponses: interaction.responses,
|
|
129
131
|
onProtocolError: (errorKind) => observe('mcp_error', { errorKind }),
|
|
130
132
|
});
|
|
131
133
|
if (result.status === 'interaction_unavailable') {
|
|
132
134
|
observe('tool_error', { errorKind: 'interaction_unavailable' });
|
|
133
|
-
return interactionUnavailableToolResult(result
|
|
135
|
+
return interactionUnavailableToolResult(toolName, result);
|
|
134
136
|
}
|
|
135
137
|
if (result.status === 'stopped') {
|
|
136
138
|
observe('tool_error', { errorKind: `${result.source}_${result.action}` });
|
|
@@ -175,10 +177,11 @@ function stoppedToolResult(action, subject) {
|
|
|
175
177
|
isError: true,
|
|
176
178
|
};
|
|
177
179
|
}
|
|
178
|
-
function interactionUnavailableToolResult(
|
|
180
|
+
function interactionUnavailableToolResult(toolName, result) {
|
|
181
|
+
const { interaction } = result;
|
|
179
182
|
const text = interaction === 'confirmation'
|
|
180
183
|
? 'This action was not run because this chat cannot present the required confirmation. Use a host that supports confirmation, or ask the app developer to enable the explicit host confirmation fallback.'
|
|
181
|
-
: 'This action
|
|
184
|
+
: 'This action is waiting for a few details. Complete the form in this app, or gather the requested fields and retry this tool with the structured continuation provided.';
|
|
182
185
|
return {
|
|
183
186
|
isError: true,
|
|
184
187
|
content: [{ type: 'text', text }],
|
|
@@ -186,8 +189,95 @@ function interactionUnavailableToolResult(interaction) {
|
|
|
186
189
|
code: 'interaction_unavailable',
|
|
187
190
|
interaction,
|
|
188
191
|
executed: false,
|
|
192
|
+
...(result.request === undefined
|
|
193
|
+
? {}
|
|
194
|
+
: {
|
|
195
|
+
recoverable: true,
|
|
196
|
+
request: result.request,
|
|
197
|
+
retry: {
|
|
198
|
+
tool: toolName,
|
|
199
|
+
argument: '__noodleInteraction.responses',
|
|
200
|
+
},
|
|
201
|
+
}),
|
|
189
202
|
},
|
|
203
|
+
...(result.request === undefined
|
|
204
|
+
? {}
|
|
205
|
+
: {
|
|
206
|
+
_meta: {
|
|
207
|
+
noodle: {
|
|
208
|
+
interaction: {
|
|
209
|
+
tool: toolName,
|
|
210
|
+
responses: result.responses ?? {},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
}),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function extractElicitationResponses(value, requestMeta, useArgumentEnvelope) {
|
|
218
|
+
if (!useArgumentEnvelope) {
|
|
219
|
+
return { arguments: value, responses: interactionResponsesFromMeta(requestMeta) };
|
|
220
|
+
}
|
|
221
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
222
|
+
return { arguments: value, responses: interactionResponsesFromMeta(requestMeta) };
|
|
223
|
+
}
|
|
224
|
+
const input = value;
|
|
225
|
+
const { __noodleInteraction, ...toolArguments } = input;
|
|
226
|
+
if (__noodleInteraction === null ||
|
|
227
|
+
typeof __noodleInteraction !== 'object' ||
|
|
228
|
+
Array.isArray(__noodleInteraction)) {
|
|
229
|
+
return { arguments: toolArguments, responses: interactionResponsesFromMeta(requestMeta) };
|
|
230
|
+
}
|
|
231
|
+
const candidate = __noodleInteraction.responses;
|
|
232
|
+
if (candidate === null || typeof candidate !== 'object' || Array.isArray(candidate)) {
|
|
233
|
+
return { arguments: toolArguments, responses: interactionResponsesFromMeta(requestMeta) };
|
|
234
|
+
}
|
|
235
|
+
const responses = {
|
|
236
|
+
...interactionResponsesFromMeta(requestMeta),
|
|
237
|
+
...parseElicitationResponses(candidate),
|
|
190
238
|
};
|
|
239
|
+
return { arguments: toolArguments, responses };
|
|
240
|
+
}
|
|
241
|
+
function toolUsesPortableInteractionArgument(tool) {
|
|
242
|
+
if (tool?.fulfilment.kind !== 'flow' ||
|
|
243
|
+
!tool.fulfilment.steps.some((step) => step.kind === 'elicit')) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
const properties = tool.inputSchema.properties;
|
|
247
|
+
return !(properties !== null &&
|
|
248
|
+
typeof properties === 'object' &&
|
|
249
|
+
Object.hasOwn(properties, '__noodleInteraction'));
|
|
250
|
+
}
|
|
251
|
+
function interactionResponsesFromMeta(value) {
|
|
252
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
253
|
+
return {};
|
|
254
|
+
const noodle = value.noodle;
|
|
255
|
+
if (noodle === null || typeof noodle !== 'object' || Array.isArray(noodle))
|
|
256
|
+
return {};
|
|
257
|
+
const interaction = noodle.interaction;
|
|
258
|
+
if (interaction === null || typeof interaction !== 'object' || Array.isArray(interaction))
|
|
259
|
+
return {};
|
|
260
|
+
return parseElicitationResponses(interaction.responses);
|
|
261
|
+
}
|
|
262
|
+
function parseElicitationResponses(value) {
|
|
263
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
264
|
+
return {};
|
|
265
|
+
const responses = {};
|
|
266
|
+
for (const [id, raw] of Object.entries(value)) {
|
|
267
|
+
if (raw === null || typeof raw !== 'object' || Array.isArray(raw))
|
|
268
|
+
continue;
|
|
269
|
+
const response = raw;
|
|
270
|
+
if (response.action === 'decline' || response.action === 'cancel') {
|
|
271
|
+
responses[id] = { action: response.action };
|
|
272
|
+
}
|
|
273
|
+
else if (response.action === 'accept') {
|
|
274
|
+
responses[id] = {
|
|
275
|
+
action: 'accept',
|
|
276
|
+
...(Object.hasOwn(response, 'content') ? { content: response.content } : {}),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return responses;
|
|
191
281
|
}
|
|
192
282
|
function registerResources(server, artifact, deps, context) {
|
|
193
283
|
server.setRequestHandler(ListResourcesRequestSchema, () => mapResourcesList(artifact));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-server.js","sourceRoot":"","sources":["../src/sdk-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EAErB,SAAS,EACT,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,kCAAkC,EAClC,sBAAsB,EAEtB,QAAQ,EACR,yBAAyB,GAQ1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAIL,aAAa,EACb,eAAe,GAIhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL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,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;QACD,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAuB,CAAC;QAC1F,OAAO,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
2
|
import { type RuntimeArtifact } from '@noodle-borg/compiler';
|
|
3
|
-
import { type ExecuteToolDeps, type ExecutionError } from '@noodle-borg/runtime';
|
|
3
|
+
import { type ElicitationRequest, type ElicitationResponse, type ExecuteToolDeps, type ExecutionError } from '@noodle-borg/runtime';
|
|
4
4
|
type ArtifactTool = RuntimeArtifact['tools'][number];
|
|
5
5
|
export type McpToolInteractionOutcome = {
|
|
6
6
|
readonly status: 'completed';
|
|
@@ -11,6 +11,8 @@ export type McpToolInteractionOutcome = {
|
|
|
11
11
|
} | {
|
|
12
12
|
readonly status: 'interaction_unavailable';
|
|
13
13
|
readonly interaction: 'confirmation' | 'input';
|
|
14
|
+
readonly request?: ElicitationRequest;
|
|
15
|
+
readonly responses?: Readonly<Record<string, ElicitationResponse>>;
|
|
14
16
|
} | {
|
|
15
17
|
readonly status: 'stopped';
|
|
16
18
|
readonly action: 'decline' | 'cancel';
|
|
@@ -24,9 +26,11 @@ export interface McpToolInteractionInput {
|
|
|
24
26
|
readonly toolArguments: unknown;
|
|
25
27
|
readonly deps: ExecuteToolDeps;
|
|
26
28
|
readonly formElicitationTransport?: 'bidirectional' | 'unavailable';
|
|
29
|
+
/** Answers collected by an MCP App or model and replayed through the input-only flow prefix. */
|
|
30
|
+
readonly providedElicitationResponses?: Readonly<Record<string, ElicitationResponse>>;
|
|
27
31
|
readonly onProtocolError: (errorKind: 'elicitation_unavailable' | 'invalid_confirmation_flow') => void;
|
|
28
32
|
}
|
|
29
|
-
/** Execute one MCP tool through
|
|
30
|
-
export declare function runMcpToolInteraction({ server, artifact, tool, toolName, toolArguments, deps, formElicitationTransport, onProtocolError, }: McpToolInteractionInput): Promise<McpToolInteractionOutcome>;
|
|
33
|
+
/** Execute one MCP tool through negotiated forms or schema-validated stateless input replay. */
|
|
34
|
+
export declare function runMcpToolInteraction({ server, artifact, tool, toolName, toolArguments, deps, formElicitationTransport, providedElicitationResponses, onProtocolError, }: McpToolInteractionInput): Promise<McpToolInteractionOutcome>;
|
|
31
35
|
export {};
|
|
32
36
|
//# sourceMappingURL=tool-interaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-interaction.d.ts","sourceRoot":"","sources":["../src/tool-interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAOxE,OAAO,EAAE,KAAK,eAAe,EAA4B,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EAOpB,MAAM,sBAAsB,CAAC;AAM9B,KAAK,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,yBAAyB,GACjC;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAA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AAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,wBAAwB,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;IACpE,gGAAgG;IAChG,QAAQ,CAAC,4BAA4B,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACtF,QAAQ,CAAC,eAAe,EAAE,CACxB,SAAS,EAAE,yBAAyB,GAAG,2BAA2B,KAC/D,IAAI,CAAC;CACX;AAED,gGAAgG;AAChG,wBAAsB,qBAAqB,CAAC,EAC1C,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,4BAAiC,EACjC,eAAe,GAChB,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CA0F9D"}
|
|
@@ -2,14 +2,23 @@ import { ErrorCode, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
|
|
2
2
|
import { requiresToolConfirmation } from '@noodle-borg/compiler';
|
|
3
3
|
import { executePreparedTool, executeToolInteractive, isInputRequired, prepareToolForConfirmation, resumeTool, resumeToolPreparation, } from '@noodle-borg/runtime';
|
|
4
4
|
import { confirmationElicitationRequest, isAffirmativeConfirmation, } from './confirmation-elicitation.js';
|
|
5
|
-
/** Execute one MCP tool through
|
|
6
|
-
export async function runMcpToolInteraction({ server, artifact, tool, toolName, toolArguments, deps, formElicitationTransport, onProtocolError, }) {
|
|
5
|
+
/** Execute one MCP tool through negotiated forms or schema-validated stateless input replay. */
|
|
6
|
+
export async function runMcpToolInteraction({ server, artifact, tool, toolName, toolArguments, deps, formElicitationTransport, providedElicitationResponses = {}, onProtocolError, }) {
|
|
7
7
|
const confirmationRequired = tool !== undefined && requiresToolConfirmation(tool.annotations);
|
|
8
8
|
const inputRequired = toolRequiresFormElicitation(tool);
|
|
9
9
|
if ((confirmationRequired || inputRequired) &&
|
|
10
10
|
!supportsFormElicitation(server, formElicitationTransport)) {
|
|
11
|
-
if (inputRequired)
|
|
12
|
-
return {
|
|
11
|
+
if (inputRequired) {
|
|
12
|
+
return runWithoutFormElicitation({
|
|
13
|
+
artifact,
|
|
14
|
+
tool,
|
|
15
|
+
toolName,
|
|
16
|
+
toolArguments,
|
|
17
|
+
deps,
|
|
18
|
+
confirmationRequired,
|
|
19
|
+
providedElicitationResponses,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
13
22
|
if (artifact.server.interactions?.confirmationFallback === 'host') {
|
|
14
23
|
const result = await executeToolInteractive(artifact, toolName, toolArguments, deps);
|
|
15
24
|
if (isInputRequired(result)) {
|
|
@@ -65,6 +74,52 @@ export async function runMcpToolInteraction({ server, artifact, tool, toolName,
|
|
|
65
74
|
}
|
|
66
75
|
return result.status === 'stopped' ? { ...result, source: 'input' } : result;
|
|
67
76
|
}
|
|
77
|
+
async function runWithoutFormElicitation(input) {
|
|
78
|
+
const responses = {
|
|
79
|
+
...input.providedElicitationResponses,
|
|
80
|
+
};
|
|
81
|
+
if (input.confirmationRequired && input.tool !== undefined) {
|
|
82
|
+
let preparation = await prepareToolForConfirmation(input.artifact, input.toolName, input.toolArguments, input.deps);
|
|
83
|
+
while (preparation.status === 'input_required') {
|
|
84
|
+
const response = responses[preparation.request.id];
|
|
85
|
+
if (response === undefined) {
|
|
86
|
+
return {
|
|
87
|
+
status: 'interaction_unavailable',
|
|
88
|
+
interaction: 'input',
|
|
89
|
+
request: preparation.request,
|
|
90
|
+
responses,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
preparation = await resumeToolPreparation(input.artifact, preparation.continuation, response, input.deps);
|
|
94
|
+
}
|
|
95
|
+
if (preparation.status === 'stopped')
|
|
96
|
+
return { ...preparation, source: 'input' };
|
|
97
|
+
if (preparation.status === 'failed')
|
|
98
|
+
return preparation;
|
|
99
|
+
if (input.artifact.server.interactions?.confirmationFallback !== 'host') {
|
|
100
|
+
return { status: 'interaction_unavailable', interaction: 'confirmation' };
|
|
101
|
+
}
|
|
102
|
+
const result = await executePreparedTool(input.artifact, preparation.continuation, input.deps);
|
|
103
|
+
if (result.status === 'input_required') {
|
|
104
|
+
throw new McpError(ErrorCode.InternalError, 'the prepared action reached an unexpected input boundary');
|
|
105
|
+
}
|
|
106
|
+
return result.status === 'stopped' ? { ...result, source: 'input' } : result;
|
|
107
|
+
}
|
|
108
|
+
let result = await executeToolInteractive(input.artifact, input.toolName, input.toolArguments, input.deps);
|
|
109
|
+
while (isInputRequired(result)) {
|
|
110
|
+
const response = responses[result.request.id];
|
|
111
|
+
if (response === undefined) {
|
|
112
|
+
return {
|
|
113
|
+
status: 'interaction_unavailable',
|
|
114
|
+
interaction: 'input',
|
|
115
|
+
request: result.request,
|
|
116
|
+
responses,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
result = await resumeTool(input.artifact, result.continuation, response, input.deps);
|
|
120
|
+
}
|
|
121
|
+
return result.status === 'stopped' ? { ...result, source: 'input' } : result;
|
|
122
|
+
}
|
|
68
123
|
function toolRequiresFormElicitation(tool) {
|
|
69
124
|
return (tool?.fulfilment.kind === 'flow' && tool.fulfilment.steps.some((step) => step.kind === 'elicit'));
|
|
70
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-interaction.js","sourceRoot":"","sources":["../src/tool-interaction.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EACT,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAwB,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-intera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AM,GAAG,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAC/E,CAAC;AAED,SAAS,2BAA2B,CAAC,IAA8B;IACjE,OAAO,CACL,IAAI,EAAE,UAAU,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CACjG,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB,CAC9B,MAAc,EACd,SAA8D;IAE9D,OAAO,CACL,SAAS,KAAK,aAAa,IAAI,MAAM,CAAC,qBAAqB,EAAE,EAAE,WAAW,EAAE,IAAI,KAAK,SAAS,CAC/F,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,sBAAsB,CACnC,MAAc,EACd,MAA+B,EAC/B,aAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,aAAa,EAAE,CAAC;QAChB,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,aAAa,EACvB,2DAA2D,CAC5D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-wiring-bootstrap.d.ts","sourceRoot":"","sources":["../../src/widget/action-wiring-bootstrap.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,2BAA2B,EAAE,MAczC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** CSP-safe form and action listener wiring spliced into the shared widget bootstrap. */
|
|
2
|
+
export const WIDGET_ACTION_WIRING_SOURCE = `
|
|
3
|
+
function wireActions(root) {
|
|
4
|
+
root = root || document;
|
|
5
|
+
for (const form of root.querySelectorAll('form')) {
|
|
6
|
+
if (form.hasAttribute('data-noodle-wired')) continue;
|
|
7
|
+
form.setAttribute('data-noodle-wired', '');
|
|
8
|
+
form.addEventListener('submit', (event) => event.preventDefault());
|
|
9
|
+
}
|
|
10
|
+
for (const el of root.querySelectorAll('[data-action]')) {
|
|
11
|
+
if (el.hasAttribute('data-noodle-wired')) continue;
|
|
12
|
+
el.setAttribute('data-noodle-wired', '');
|
|
13
|
+
el.addEventListener('click', () => actOnce(el));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
//# sourceMappingURL=action-wiring-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-wiring-bootstrap.js","sourceRoot":"","sources":["../../src/widget/action-wiring-bootstrap.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,CAAC,MAAM,2BAA2B,GAAW;;;;;;;;;;;;;;CAclD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/widget/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/widget/bootstrap.ts"],"names":[],"mappings":"AASA,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,EAAE,MA4wBrC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { WIDGET_ACTION_WIRING_SOURCE } from './action-wiring-bootstrap.js';
|
|
1
2
|
import { WIDGET_FLOW_SOURCE } from './flow-bootstrap.js';
|
|
2
3
|
import { WIDGET_FORMAT_SOURCE } from './format-bootstrap.js';
|
|
3
4
|
import { WIDGET_HANDOFF_SOURCE } from './handoff-bootstrap.js';
|
|
5
|
+
import { WIDGET_INTERACTION_SOURCE } from './interaction-bootstrap.js';
|
|
4
6
|
import { WIDGET_MODEL_CONTEXT_SOURCE } from './model-context-bootstrap.js';
|
|
5
7
|
import { OPENAI_WIDGET_BRIDGE_SOURCE } from './openai-bridge.js';
|
|
6
8
|
import { WIDGET_REACT_BRIDGE_SOURCE } from './react-bridge-bootstrap.js';
|
|
@@ -12,10 +14,10 @@ ${OPENAI_WIDGET_BRIDGE_SOURCE}
|
|
|
12
14
|
const oai = globalThis.openai;
|
|
13
15
|
const MAX_RENDERED_ITEMS = 50;
|
|
14
16
|
let app;
|
|
15
|
-
if (
|
|
16
|
-
app = makeOpenAiApp(oai);
|
|
17
|
-
} else if (E && E.App) {
|
|
17
|
+
if (E && E.App) {
|
|
18
18
|
app = new E.App({ name: 'noodle-widget', version: '1' }, {}, { autoResize: true });
|
|
19
|
+
} else if (oai && typeof oai.callTool === 'function') {
|
|
20
|
+
app = makeOpenAiApp(oai);
|
|
19
21
|
} else {
|
|
20
22
|
return;
|
|
21
23
|
}
|
|
@@ -288,6 +290,7 @@ ${WIDGET_FORMAT_SOURCE}
|
|
|
288
290
|
function bind(data) {
|
|
289
291
|
if (data == null) return;
|
|
290
292
|
globalThis.__noodleData = data;
|
|
293
|
+
renderInteractionCard(data);
|
|
291
294
|
renderCollections(data);
|
|
292
295
|
renderTables(data);
|
|
293
296
|
renderScope(document, data);
|
|
@@ -412,6 +415,7 @@ ${WIDGET_FORMAT_SOURCE}
|
|
|
412
415
|
}
|
|
413
416
|
}
|
|
414
417
|
${WIDGET_FLOW_SOURCE}
|
|
418
|
+
${WIDGET_INTERACTION_SOURCE}
|
|
415
419
|
function actionContext(el) {
|
|
416
420
|
const data = globalThis.__noodleData;
|
|
417
421
|
const itemRoot = el && el.closest ? el.closest('[data-collection-generated]') : null;
|
|
@@ -767,19 +771,7 @@ ${WIDGET_HANDOFF_SOURCE}
|
|
|
767
771
|
}
|
|
768
772
|
}
|
|
769
773
|
}
|
|
770
|
-
|
|
771
|
-
root = root || document;
|
|
772
|
-
for (const form of root.querySelectorAll('form')) {
|
|
773
|
-
if (form.hasAttribute('data-noodle-wired')) continue;
|
|
774
|
-
form.setAttribute('data-noodle-wired', '');
|
|
775
|
-
form.addEventListener('submit', (event) => event.preventDefault());
|
|
776
|
-
}
|
|
777
|
-
for (const el of root.querySelectorAll('[data-action]')) {
|
|
778
|
-
if (el.hasAttribute('data-noodle-wired')) continue;
|
|
779
|
-
el.setAttribute('data-noodle-wired', '');
|
|
780
|
-
el.addEventListener('click', () => actOnce(el));
|
|
781
|
-
}
|
|
782
|
-
}
|
|
774
|
+
${WIDGET_ACTION_WIRING_SOURCE}
|
|
783
775
|
|
|
784
776
|
// Register handlers BEFORE connect() so no one-shot host notification is missed.
|
|
785
777
|
app.ontoolresult = (p) => bind(fromResult(p));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/widget/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAW;;EAE7C,2BAA2B;;;;;;;;;;;;EAY3B,2BAA2B;EAC3B,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgHzB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoPrB,2BAA2B;;;;;;;;;;;;;;;;CAgB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-bootstrap.d.ts","sourceRoot":"","sources":["../../src/widget/interaction-bootstrap.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,eAAO,MAAM,yBAAyB,EAAE,MA8KvC,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/** Portable, business-user input card for recoverable `ctx.elicit` results. */
|
|
2
|
+
export const WIDGET_INTERACTION_SOURCE = `
|
|
3
|
+
function removeInteractionCard() {
|
|
4
|
+
const existing = document.getElementById('noodle-interaction-card');
|
|
5
|
+
if (existing) existing.remove();
|
|
6
|
+
}
|
|
7
|
+
function interactionLabel(name, schema) {
|
|
8
|
+
if (schema && typeof schema.title === 'string') return schema.title;
|
|
9
|
+
return String(name).replace(/[_-]+/g, ' ').replace(/(^|\\s)\\S/g, (c) => c.toUpperCase());
|
|
10
|
+
}
|
|
11
|
+
function addInteractionChoice(select, value, label) {
|
|
12
|
+
const option = document.createElement('option');
|
|
13
|
+
option.value = String(value);
|
|
14
|
+
option.textContent = String(label);
|
|
15
|
+
select.appendChild(option);
|
|
16
|
+
}
|
|
17
|
+
function interactionControl(name, schema, required) {
|
|
18
|
+
let control;
|
|
19
|
+
const choices = Array.isArray(schema.enum)
|
|
20
|
+
? schema.enum.map((value) => ({ value, label: value }))
|
|
21
|
+
: Array.isArray(schema.oneOf)
|
|
22
|
+
? schema.oneOf.map((choice) => ({ value: choice.const, label: choice.title }))
|
|
23
|
+
: null;
|
|
24
|
+
if (schema.type === 'array') {
|
|
25
|
+
control = document.createElement('div');
|
|
26
|
+
control.setAttribute('role', 'group');
|
|
27
|
+
const itemChoices = schema.items && Array.isArray(schema.items.enum)
|
|
28
|
+
? schema.items.enum.map((value) => ({ value, label: value }))
|
|
29
|
+
: schema.items && Array.isArray(schema.items.anyOf)
|
|
30
|
+
? schema.items.anyOf.map((choice) => ({ value: choice.const, label: choice.title }))
|
|
31
|
+
: [];
|
|
32
|
+
for (const choice of itemChoices) {
|
|
33
|
+
const optionLabel = document.createElement('label');
|
|
34
|
+
optionLabel.style.cssText = 'display:flex;align-items:center;gap:8px;font-weight:400';
|
|
35
|
+
const checkbox = document.createElement('input');
|
|
36
|
+
checkbox.type = 'checkbox';
|
|
37
|
+
checkbox.value = String(choice.value);
|
|
38
|
+
checkbox.checked = Array.isArray(schema.default) && schema.default.includes(choice.value);
|
|
39
|
+
optionLabel.append(checkbox, document.createTextNode(String(choice.label)));
|
|
40
|
+
control.appendChild(optionLabel);
|
|
41
|
+
}
|
|
42
|
+
control.dataset.minItems = String(typeof schema.minItems === 'number' ? schema.minItems : required ? 1 : 0);
|
|
43
|
+
if (typeof schema.maxItems === 'number') control.dataset.maxItems = String(schema.maxItems);
|
|
44
|
+
} else if (choices) {
|
|
45
|
+
control = document.createElement('select');
|
|
46
|
+
addInteractionChoice(control, '', 'Choose an option');
|
|
47
|
+
for (const choice of choices) addInteractionChoice(control, choice.value, choice.label);
|
|
48
|
+
} else if (schema.type === 'boolean') {
|
|
49
|
+
control = document.createElement('input');
|
|
50
|
+
control.type = 'checkbox';
|
|
51
|
+
} else if (schema.type === 'number' || schema.type === 'integer') {
|
|
52
|
+
control = document.createElement('input');
|
|
53
|
+
control.type = 'number';
|
|
54
|
+
if (schema.type === 'integer') control.step = '1';
|
|
55
|
+
if (typeof schema.minimum === 'number') control.min = String(schema.minimum);
|
|
56
|
+
if (typeof schema.maximum === 'number') control.max = String(schema.maximum);
|
|
57
|
+
} else {
|
|
58
|
+
control = document.createElement('input');
|
|
59
|
+
control.type = schema.format === 'email' ? 'email' : schema.format === 'date' ? 'date' : schema.format === 'date-time' ? 'datetime-local' : 'text';
|
|
60
|
+
if (typeof schema.minLength === 'number') control.minLength = schema.minLength;
|
|
61
|
+
if (typeof schema.maxLength === 'number') control.maxLength = schema.maxLength;
|
|
62
|
+
}
|
|
63
|
+
control.name = name;
|
|
64
|
+
control.required = required && control.type !== 'checkbox' && schema.type !== 'array';
|
|
65
|
+
if (schema.default !== undefined && schema.type !== 'array') {
|
|
66
|
+
if (control.type === 'checkbox') control.checked = Boolean(schema.default);
|
|
67
|
+
else control.value = String(schema.default);
|
|
68
|
+
}
|
|
69
|
+
return control;
|
|
70
|
+
}
|
|
71
|
+
function interactionValue(control, schema) {
|
|
72
|
+
if (schema.type === 'array') {
|
|
73
|
+
return Array.from(control.querySelectorAll('input[type="checkbox"]:checked')).map((item) => item.value);
|
|
74
|
+
}
|
|
75
|
+
if (schema.type === 'boolean') return Boolean(control.checked);
|
|
76
|
+
if (schema.type === 'number' || schema.type === 'integer') return Number(control.value);
|
|
77
|
+
return control.value;
|
|
78
|
+
}
|
|
79
|
+
function renderInteractionCard(data) {
|
|
80
|
+
const request = data && data.code === 'interaction_unavailable' && data.interaction === 'input'
|
|
81
|
+
? data.request
|
|
82
|
+
: null;
|
|
83
|
+
const interaction = data && data._meta && data._meta.noodle && data._meta.noodle.interaction;
|
|
84
|
+
if (!request || !interaction || typeof interaction.tool !== 'string') {
|
|
85
|
+
removeInteractionCard();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
removeInteractionCard();
|
|
89
|
+
const schema = request.requestedSchema || {};
|
|
90
|
+
const properties = schema.properties || {};
|
|
91
|
+
const required = Array.isArray(schema.required) ? schema.required : [];
|
|
92
|
+
const card = document.createElement('section');
|
|
93
|
+
card.id = 'noodle-interaction-card';
|
|
94
|
+
card.setAttribute('role', 'region');
|
|
95
|
+
card.setAttribute('aria-label', 'Details needed');
|
|
96
|
+
card.style.cssText = 'box-sizing:border-box;margin:12px;padding:20px;border:1px solid var(--color-border-secondary,#d8dee8);border-radius:16px;background:var(--color-background-primary,#fff);color:var(--color-text-primary,#172033);box-shadow:0 10px 30px rgba(23,32,51,.10);font:14px/1.45 system-ui,sans-serif';
|
|
97
|
+
const eyebrow = document.createElement('div');
|
|
98
|
+
eyebrow.textContent = 'DETAILS NEEDED';
|
|
99
|
+
eyebrow.style.cssText = 'margin-bottom:6px;color:var(--color-text-secondary,#667085);font-size:11px;font-weight:700;letter-spacing:.08em';
|
|
100
|
+
const title = document.createElement('h2');
|
|
101
|
+
title.textContent = 'A few details before we continue';
|
|
102
|
+
title.style.cssText = 'margin:0 0 6px;font-size:18px;line-height:1.3';
|
|
103
|
+
const message = document.createElement('p');
|
|
104
|
+
message.textContent = typeof request.message === 'string' ? request.message : 'Please complete the details below.';
|
|
105
|
+
message.style.cssText = 'margin:0 0 16px;color:var(--color-text-secondary,#475467)';
|
|
106
|
+
const form = document.createElement('form');
|
|
107
|
+
form.style.cssText = 'display:grid;gap:14px';
|
|
108
|
+
const controls = {};
|
|
109
|
+
for (const name of Object.keys(properties)) {
|
|
110
|
+
const fieldSchema = properties[name] || {};
|
|
111
|
+
const field = document.createElement('label');
|
|
112
|
+
field.style.cssText = 'display:grid;gap:6px;font-weight:600';
|
|
113
|
+
const label = document.createElement('span');
|
|
114
|
+
label.textContent = interactionLabel(name, fieldSchema) + (required.includes(name) ? ' *' : '');
|
|
115
|
+
const control = interactionControl(name, fieldSchema, required.includes(name));
|
|
116
|
+
control.style.cssText = control.type === 'checkbox'
|
|
117
|
+
? 'width:18px;height:18px'
|
|
118
|
+
: 'box-sizing:border-box;width:100%;min-height:42px;padding:9px 11px;border:1px solid var(--color-border-secondary,#cbd5e1);border-radius:10px;background:var(--color-background-primary,#fff);color:inherit;font:inherit';
|
|
119
|
+
controls[name] = { control, schema: fieldSchema };
|
|
120
|
+
field.append(label, control);
|
|
121
|
+
if (typeof fieldSchema.description === 'string') {
|
|
122
|
+
const hint = document.createElement('small');
|
|
123
|
+
hint.textContent = fieldSchema.description;
|
|
124
|
+
hint.style.cssText = 'color:var(--color-text-secondary,#667085);font-weight:400';
|
|
125
|
+
field.appendChild(hint);
|
|
126
|
+
}
|
|
127
|
+
form.appendChild(field);
|
|
128
|
+
}
|
|
129
|
+
const submit = document.createElement('button');
|
|
130
|
+
submit.id = 'noodle-interaction-submit';
|
|
131
|
+
submit.type = 'submit';
|
|
132
|
+
submit.textContent = 'Continue';
|
|
133
|
+
submit.style.cssText = 'min-height:42px;padding:9px 16px;border:0;border-radius:10px;background:var(--color-background-accent,#2563eb);color:var(--color-text-on-accent,#fff);font:inherit;font-weight:700;cursor:pointer';
|
|
134
|
+
form.appendChild(submit);
|
|
135
|
+
form.addEventListener('submit', (event) => {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
if (typeof form.reportValidity === 'function' && !form.reportValidity()) return;
|
|
138
|
+
const content = {};
|
|
139
|
+
for (const name of Object.keys(controls)) {
|
|
140
|
+
const item = controls[name];
|
|
141
|
+
const value = interactionValue(item.control, item.schema);
|
|
142
|
+
if (item.schema.type === 'array') {
|
|
143
|
+
const minItems = Number(item.control.dataset.minItems || 0);
|
|
144
|
+
const maxItems = item.control.dataset.maxItems ? Number(item.control.dataset.maxItems) : Infinity;
|
|
145
|
+
if (value.length < minItems || value.length > maxItems) {
|
|
146
|
+
status('Choose the requested number of options before continuing.');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
content[name] = value;
|
|
151
|
+
}
|
|
152
|
+
const args = Object.assign({}, globalThis.__noodleInput || {});
|
|
153
|
+
delete args.__noodleInteraction;
|
|
154
|
+
const responses = Object.assign({}, interaction.responses || {}, {
|
|
155
|
+
[request.id]: { action: 'accept', content },
|
|
156
|
+
});
|
|
157
|
+
submit.disabled = true;
|
|
158
|
+
submit.setAttribute('aria-busy', 'true');
|
|
159
|
+
submit.textContent = 'Continuing…';
|
|
160
|
+
Promise.resolve(app.callServerTool({
|
|
161
|
+
name: interaction.tool,
|
|
162
|
+
arguments: args,
|
|
163
|
+
_meta: { noodle: { interaction: { responses } } },
|
|
164
|
+
}))
|
|
165
|
+
.then((result) => bind(fromResult(result)))
|
|
166
|
+
.catch(() => status('We could not continue. Please review the details and try again.'))
|
|
167
|
+
.then(() => {
|
|
168
|
+
submit.disabled = false;
|
|
169
|
+
submit.removeAttribute('aria-busy');
|
|
170
|
+
submit.textContent = 'Continue';
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
card.append(eyebrow, title, message, form);
|
|
174
|
+
document.body.prepend(card);
|
|
175
|
+
}
|
|
176
|
+
`;
|
|
177
|
+
//# sourceMappingURL=interaction-bootstrap.js.map
|