@pikku/core 0.12.143 → 0.12.145
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/analytics/analytics.d.ts +14 -0
- package/dist/analytics/analytics.js +14 -0
- package/dist/analytics/analytics.types.d.ts +1 -0
- package/dist/analytics/anonymous-analytics-identity.d.ts +1 -0
- package/dist/analytics/cookie-analytics-identity.d.ts +1 -0
- package/dist/analytics/mint-cookie.d.ts +1 -0
- package/dist/{wirings/channel/channel-middleware-runner.d.ts → channel-middleware-runner.d.ts} +17 -3
- package/dist/{wirings/channel/channel-middleware-runner.js → channel-middleware-runner.js} +24 -8
- package/dist/classification/data-classification.d.ts +13 -0
- package/dist/classification/secret-value.d.ts +7 -0
- package/dist/classification/secret-value.js +7 -0
- package/dist/crypto-utils.d.ts +93 -0
- package/dist/crypto-utils.js +92 -0
- package/dist/dev/hot-reload.d.ts +16 -0
- package/dist/dev/hot-reload.js +16 -1
- package/dist/dev/module-runner.js +7 -3
- package/dist/dev/reload-meta.js +1 -1
- package/dist/errors/error-handler.d.ts +9 -0
- package/dist/errors/error-handler.js +8 -0
- package/dist/errors/errors.d.ts +219 -0
- package/dist/errors/errors.js +227 -0
- package/dist/errors/serialized-error.d.ts +4 -0
- package/dist/function/abort-scope.d.ts +5 -0
- package/dist/function/function-meta.types.d.ts +20 -0
- package/dist/function/function-runner.d.ts +41 -0
- package/dist/function/function-runner.js +57 -11
- package/dist/function/functions.types.d.ts +59 -0
- package/dist/function/functions.types.js +23 -0
- package/dist/function/list.types.d.ts +4 -0
- package/dist/lifecycle.d.ts +12 -1
- package/dist/lifecycle.js +12 -1
- package/dist/middleware/addon-scope-cap.d.ts +4 -0
- package/dist/middleware/addon-scope-cap.js +7 -3
- package/dist/middleware/auth-apikey.js +3 -3
- package/dist/middleware/auth-bearer.js +5 -13
- package/dist/middleware/auth-cookie.js +3 -3
- package/dist/middleware/middleware-factories.d.ts +17 -0
- package/dist/middleware/middleware-factories.js +17 -0
- package/dist/middleware/middleware.types.d.ts +23 -0
- package/dist/middleware/remote-auth.d.ts +15 -0
- package/dist/middleware/remote-auth.js +18 -3
- package/dist/middleware/remote-jobs-secret.js +2 -10
- package/dist/middleware-runner.d.ts +7 -0
- package/dist/middleware-runner.js +23 -7
- package/dist/permissions.d.ts +13 -0
- package/dist/permissions.js +13 -0
- package/dist/pikku-state.d.ts +49 -0
- package/dist/pikku-state.js +49 -0
- package/dist/remote.js +20 -5
- package/dist/schema.d.ts +36 -0
- package/dist/schema.js +36 -0
- package/dist/services/agent-run-state-service.d.ts +8 -0
- package/dist/services/agent-runner-service.d.ts +24 -0
- package/dist/services/agent-storage-service.d.ts +8 -0
- package/dist/services/ai-embedding-service.d.ts +4 -0
- package/dist/services/audit-service.d.ts +48 -0
- package/dist/services/audit-service.js +22 -0
- package/dist/services/content-service.d.ts +34 -0
- package/dist/services/credential-wire-service.d.ts +9 -0
- package/dist/services/credential-wire-service.js +9 -0
- package/dist/services/deployment-service.d.ts +14 -0
- package/dist/services/email-service.d.ts +20 -0
- package/dist/services/email-template.d.ts +24 -0
- package/dist/services/email-template.js +12 -0
- package/dist/services/file-scenario-run-store.d.ts +5 -0
- package/dist/services/file-scenario-run-store.js +4 -0
- package/dist/services/gateway-service.d.ts +5 -0
- package/dist/services/in-memory-agent-run-state-service.d.ts +5 -0
- package/dist/services/in-memory-agent-run-state-service.js +5 -0
- package/dist/services/in-memory-lease-service.d.ts +5 -0
- package/dist/services/in-memory-lease-service.js +5 -0
- package/dist/services/in-memory-session-store.d.ts +4 -0
- package/dist/services/in-memory-session-store.js +4 -0
- package/dist/services/incoming-webhook-queue.d.ts +2 -0
- package/dist/services/incoming-webhook-queue.js +2 -0
- package/dist/services/incoming-webhook-service.d.ts +9 -1
- package/dist/services/incoming-webhook-service.js +1 -1
- package/dist/services/index.d.ts +1 -5
- package/dist/services/index.js +1 -5
- package/dist/services/jwt-service.d.ts +8 -0
- package/dist/services/lease-service.d.ts +5 -0
- package/dist/services/lease-service.js +1 -0
- package/dist/services/local-content-request-handler.d.ts +20 -0
- package/dist/services/local-content-request-handler.js +11 -0
- package/dist/services/local-content.d.ts +45 -0
- package/dist/services/local-content.js +35 -0
- package/dist/services/local-credential-service.d.ts +5 -0
- package/dist/services/local-credential-service.js +5 -0
- package/dist/services/local-email-service.d.ts +7 -0
- package/dist/services/local-email-service.js +7 -0
- package/dist/services/local-secrets.d.ts +8 -0
- package/dist/services/local-secrets.js +8 -0
- package/dist/services/local-variables.d.ts +6 -0
- package/dist/services/local-variables.js +6 -0
- package/dist/services/logger.d.ts +4 -0
- package/dist/services/logger.js +4 -0
- package/dist/services/meta-service.d.ts +38 -0
- package/dist/services/meta-service.js +6 -0
- package/dist/services/queue-webhook-service.d.ts +19 -0
- package/dist/services/queue-webhook-service.js +19 -0
- package/dist/services/remote-jobs.d.ts +8 -13
- package/dist/services/remote-jobs.js +3 -54
- package/dist/services/scenario-cookie-jar.d.ts +4 -0
- package/dist/services/scheduler-service.d.ts +13 -0
- package/dist/services/scheduler-service.js +8 -0
- package/dist/services/schema-service.d.ts +9 -0
- package/dist/services/scope-service.d.ts +10 -0
- package/dist/services/scoped-secret-service.d.ts +5 -0
- package/dist/services/scoped-secret-service.js +5 -0
- package/dist/services/secret-host-binding.d.ts +5 -0
- package/dist/services/secret-host-binding.js +5 -0
- package/dist/services/secret-service.d.ts +19 -1
- package/dist/services/secretless.d.ts +6 -0
- package/dist/services/secretless.js +6 -0
- package/dist/services/session-store.d.ts +5 -0
- package/dist/services/stub-tracker.d.ts +1 -0
- package/dist/services/temporary-file-service.d.ts +9 -0
- package/dist/services/temporary-file-service.js +9 -0
- package/dist/services/trigger-service.d.ts +4 -0
- package/dist/services/trigger-source-store.d.ts +13 -0
- package/dist/services/trigger-source-store.js +7 -0
- package/dist/services/typed-credential-service.d.ts +6 -0
- package/dist/services/typed-credential-service.js +5 -0
- package/dist/services/typed-secret-service.d.ts +12 -0
- package/dist/services/typed-secret-service.js +11 -0
- package/dist/services/typed-variables-service.d.ts +1 -0
- package/dist/services/user-session-service.d.ts +31 -1
- package/dist/services/user-session-service.js +29 -3
- package/dist/services/v8-coverage-service.d.ts +27 -0
- package/dist/services/v8-coverage-service.js +5 -0
- package/dist/services/variables-service.d.ts +8 -0
- package/dist/services/virtual-user-sign-in.d.ts +1 -0
- package/dist/services/virtual-user-statement.d.ts +8 -0
- package/dist/services/virtual-user-statement.js +4 -0
- package/dist/services/webhook-service.d.ts +25 -0
- package/dist/services/webhook-service.js +15 -0
- package/dist/services/workflow-service.d.ts +6 -0
- package/dist/test-utils.js +1 -1
- package/dist/testing/service-tests.d.ts +4 -0
- package/dist/time-utils.d.ts +15 -0
- package/dist/time-utils.js +14 -0
- package/dist/types/core.types.d.ts +80 -0
- package/dist/types/state.types.d.ts +4 -0
- package/dist/utils/hmac.d.ts +3 -0
- package/dist/utils/safe-fetch.d.ts +14 -0
- package/dist/utils/safe-fetch.js +13 -0
- package/dist/utils/stable-stringify.d.ts +11 -0
- package/dist/utils/stable-stringify.js +33 -0
- package/dist/utils.d.ts +28 -0
- package/dist/utils.js +22 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.js +7 -0
- package/dist/wirings/addon/define-screens.d.ts +2 -0
- package/dist/wirings/addon/remote-addon-auth.d.ts +9 -0
- package/dist/wirings/addon/remote-addon-auth.js +5 -0
- package/dist/wirings/addon/wire-addon.d.ts +4 -0
- package/dist/wirings/addon/wire-remote-addon.d.ts +1 -0
- package/dist/wirings/agent/agent-agui.d.ts +14 -5
- package/dist/wirings/agent/agent-agui.js +17 -6
- package/dist/wirings/agent/agent-helpers.d.ts +61 -1
- package/dist/wirings/agent/agent-helpers.js +62 -2
- package/dist/wirings/agent/agent-interrupt.d.ts +5 -0
- package/dist/wirings/agent/agent-output.d.ts +20 -0
- package/dist/wirings/agent/agent-output.js +69 -0
- package/dist/wirings/agent/agent-prepare.d.ts +41 -0
- package/dist/wirings/agent/agent-prepare.js +38 -2
- package/dist/wirings/agent/agent-registry.d.ts +8 -0
- package/dist/wirings/agent/agent-registry.js +10 -4
- package/dist/wirings/agent/agent-runner.d.ts +33 -0
- package/dist/wirings/agent/agent-runner.js +40 -7
- package/dist/wirings/agent/agent-stream.d.ts +30 -0
- package/dist/wirings/agent/agent-stream.js +33 -11
- package/dist/wirings/agent/agent.types.d.ts +43 -0
- package/dist/wirings/agent/voice-input.d.ts +12 -0
- package/dist/wirings/agent/voice-input.js +12 -0
- package/dist/wirings/agent/voice-output.d.ts +14 -0
- package/dist/wirings/agent/voice-output.js +10 -0
- package/dist/wirings/agent-scorer/agent-scorer-judge.js +1 -2
- package/dist/wirings/agent-scorer/agent-scorer-registry.d.ts +10 -0
- package/dist/wirings/agent-scorer/agent-scorer-registry.js +10 -0
- package/dist/wirings/agent-scorer/agent-scorer-snapshots.d.ts +1 -0
- package/dist/wirings/agent-scorer/agent-scorer-snapshots.js +1 -0
- package/dist/wirings/agent-scorer/agent-scorer.types.d.ts +7 -0
- package/dist/wirings/channel/channel-common.js +1 -1
- package/dist/wirings/channel/channel-rpc.types.d.ts +5 -0
- package/dist/wirings/channel/channel-runner.d.ts +22 -0
- package/dist/wirings/channel/channel-runner.js +22 -0
- package/dist/wirings/channel/channel-store.d.ts +8 -0
- package/dist/wirings/channel/channel-store.js +7 -0
- package/dist/wirings/channel/channel.types.d.ts +18 -0
- package/dist/wirings/channel/define-channel-routes.d.ts +5 -0
- package/dist/wirings/channel/define-channel-routes.js +5 -0
- package/dist/wirings/channel/eventhub-service.d.ts +9 -0
- package/dist/wirings/channel/eventhub-store.d.ts +1 -0
- package/dist/wirings/channel/eventhub-store.js +1 -0
- package/dist/wirings/channel/index.d.ts +1 -1
- package/dist/wirings/channel/index.js +1 -1
- package/dist/wirings/channel/local/local-channel-handler.d.ts +1 -0
- package/dist/wirings/channel/local/local-channel-handler.js +1 -0
- package/dist/wirings/channel/local/local-channel-runner.d.ts +13 -0
- package/dist/wirings/channel/local/local-channel-runner.js +13 -0
- package/dist/wirings/channel/local/local-eventhub-service.d.ts +1 -0
- package/dist/wirings/channel/local/local-eventhub-service.js +1 -0
- package/dist/wirings/channel/log-channels.d.ts +1 -0
- package/dist/wirings/channel/log-channels.js +1 -0
- package/dist/wirings/channel/pikku-abstract-channel-handler.d.ts +5 -0
- package/dist/wirings/channel/pikku-abstract-channel-handler.js +5 -0
- package/dist/wirings/channel/serverless/serverless-channel-runner.d.ts +32 -0
- package/dist/wirings/channel/serverless/serverless-channel-runner.js +31 -0
- package/dist/wirings/cli/channel/cli-channel-runner.d.ts +8 -0
- package/dist/wirings/cli/channel/cli-channel-runner.js +8 -0
- package/dist/wirings/cli/channel/cli-raw-channel-runner.d.ts +1 -0
- package/dist/wirings/cli/cli-runner.d.ts +43 -0
- package/dist/wirings/cli/cli-runner.js +43 -0
- package/dist/wirings/cli/cli.types.d.ts +4 -0
- package/dist/wirings/cli/command-parser.d.ts +13 -0
- package/dist/wirings/cli/command-parser.js +16 -0
- package/dist/wirings/credential/credential-overrides.d.ts +1 -0
- package/dist/wirings/credential/credential.types.d.ts +7 -0
- package/dist/wirings/credential/validate-credential-definitions.d.ts +7 -0
- package/dist/wirings/credential/validate-credential-definitions.js +7 -0
- package/dist/wirings/flag/cached-flag-source.d.ts +1 -0
- package/dist/wirings/flag/flag.types.d.ts +3 -0
- package/dist/wirings/gateway/gateway-runner.d.ts +23 -0
- package/dist/wirings/gateway/gateway-runner.js +23 -0
- package/dist/wirings/gateway/gateway.types.d.ts +3 -0
- package/dist/wirings/gateway/local-gateway-service.d.ts +10 -0
- package/dist/{services → wirings/gateway}/local-gateway-service.js +6 -2
- package/dist/wirings/http/http-routes.d.ts +21 -0
- package/dist/wirings/http/http-routes.js +11 -0
- package/dist/wirings/http/http-runner.d.ts +71 -0
- package/dist/wirings/http/http-runner.js +73 -5
- package/dist/wirings/http/http.types.d.ts +27 -0
- package/dist/wirings/http/index.d.ts +1 -0
- package/dist/wirings/http/index.js +1 -0
- package/dist/wirings/http/log-http-routes.d.ts +1 -0
- package/dist/wirings/http/log-http-routes.js +1 -0
- package/dist/wirings/http/merge-request-data.d.ts +12 -0
- package/dist/wirings/http/merge-request-data.js +42 -0
- package/dist/wirings/http/pikku-fetch-http-request.d.ts +1 -0
- package/dist/wirings/http/pikku-fetch-http-request.js +3 -32
- package/dist/wirings/http/pikku-fetch-http-response.d.ts +1 -0
- package/dist/wirings/http/pikku-fetch-http-response.js +1 -0
- package/dist/wirings/http/routers/http-router.d.ts +6 -0
- package/dist/wirings/http/routers/http-router.js +6 -0
- package/dist/wirings/http/web-request.d.ts +17 -0
- package/dist/wirings/http/web-request.js +17 -0
- package/dist/wirings/mcp/mcp-endpoint-registry.d.ts +7 -0
- package/dist/wirings/mcp/mcp-endpoint-registry.js +7 -0
- package/dist/wirings/mcp/mcp-runner.d.ts +63 -0
- package/dist/wirings/mcp/mcp-runner.js +62 -0
- package/dist/wirings/mcp/mcp.types.d.ts +12 -0
- package/dist/wirings/node/node.types.d.ts +4 -0
- package/dist/wirings/oauth2/oauth2.types.d.ts +2 -0
- package/dist/{services → wirings/queue}/in-memory-queue-service.d.ts +9 -1
- package/dist/{services → wirings/queue}/in-memory-queue-service.js +9 -1
- package/dist/wirings/queue/index.d.ts +1 -0
- package/dist/wirings/queue/index.js +1 -0
- package/dist/wirings/queue/queue-identity.js +2 -14
- package/dist/wirings/queue/queue-runner.d.ts +37 -0
- package/dist/wirings/queue/queue-runner.js +37 -0
- package/dist/wirings/queue/queue.types.d.ts +35 -0
- package/dist/wirings/queue/register-queue-helper.d.ts +12 -0
- package/dist/wirings/queue/register-queue-helper.js +11 -0
- package/dist/wirings/queue/remote-queue-job.d.ts +11 -0
- package/dist/wirings/queue/remote-queue-job.js +41 -0
- package/dist/wirings/queue/validate-worker-config.d.ts +1 -0
- package/dist/wirings/role/role.types.d.ts +3 -0
- package/dist/wirings/rpc/rpc-runner.d.ts +24 -0
- package/dist/wirings/rpc/rpc-runner.js +37 -2
- package/dist/wirings/rpc/rpc-types.d.ts +2 -0
- package/dist/wirings/scheduler/index.d.ts +1 -0
- package/dist/wirings/scheduler/index.js +1 -0
- package/dist/wirings/scheduler/log-schedulers.d.ts +1 -0
- package/dist/wirings/scheduler/log-schedulers.js +1 -0
- package/dist/wirings/scheduler/remote-scheduled-job.d.ts +11 -0
- package/dist/wirings/scheduler/remote-scheduled-job.js +20 -0
- package/dist/wirings/scheduler/scheduler-runner.d.ts +29 -0
- package/dist/wirings/scheduler/scheduler-runner.js +28 -0
- package/dist/wirings/scheduler/scheduler.types.d.ts +3 -0
- package/dist/wirings/scope/scope.types.d.ts +5 -0
- package/dist/wirings/secret/index.d.ts +2 -2
- package/dist/wirings/secret/index.js +1 -1
- package/dist/wirings/secret/secret.types.d.ts +26 -1
- package/dist/wirings/secret/secret.types.js +1 -0
- package/dist/wirings/secret/validate-secret-definitions.d.ts +8 -0
- package/dist/wirings/secret/validate-secret-definitions.js +15 -0
- package/dist/wirings/trigger/in-memory-trigger-service.d.ts +11 -0
- package/dist/{services → wirings/trigger}/in-memory-trigger-service.js +10 -3
- package/dist/wirings/trigger/index.d.ts +1 -1
- package/dist/wirings/trigger/pikku-trigger-service.d.ts +8 -3
- package/dist/wirings/trigger/pikku-trigger-service.js +14 -3
- package/dist/wirings/trigger/trigger-runner.d.ts +27 -2
- package/dist/wirings/trigger/trigger-runner.js +35 -2
- package/dist/wirings/trigger/trigger.types.d.ts +26 -4
- package/dist/wirings/trigger/webhook-source-runner.d.ts +24 -0
- package/dist/wirings/trigger/webhook-source-runner.js +19 -0
- package/dist/wirings/trigger/webhook-source.types.d.ts +12 -2
- package/dist/wirings/trigger/webhook-source.types.js +1 -1
- package/dist/wirings/variable/validate-variable-definitions.d.ts +7 -0
- package/dist/wirings/variable/validate-variable-definitions.js +7 -0
- package/dist/wirings/variable/variable.types.d.ts +7 -0
- package/dist/wirings/virtual-user/conversation/conversation.types.d.ts +5 -0
- package/dist/wirings/virtual-user/conversation/run-conversation.d.ts +6 -0
- package/dist/wirings/virtual-user/conversation/run-conversation.js +1 -1
- package/dist/{services → wirings/virtual-user}/http-virtual-users.d.ts +4 -3
- package/dist/{services → wirings/virtual-user}/http-virtual-users.js +6 -6
- package/dist/wirings/virtual-user/index.d.ts +1 -1
- package/dist/wirings/virtual-user/index.js +1 -1
- package/dist/wirings/virtual-user/run-virtual-user.d.ts +2 -1
- package/dist/wirings/virtual-user/run-virtual-user.js +1 -14
- package/dist/wirings/virtual-user/virtual-user-declaration.types.d.ts +4 -0
- package/dist/wirings/virtual-user/virtual-user-scaffold.d.ts +10 -1
- package/dist/wirings/virtual-user/virtual-user-scaffold.js +5 -0
- package/dist/wirings/virtual-user/virtual-user-schedule.d.ts +5 -0
- package/dist/wirings/virtual-user/virtual-user-schedule.js +1 -0
- package/dist/wirings/virtual-user/virtual-user-target.d.ts +1 -0
- package/dist/wirings/webhook/define-outgoing-webhook.d.ts +20 -0
- package/dist/wirings/webhook/define-outgoing-webhook.js +9 -0
- package/dist/wirings/workflow/dsl/workflow-dsl.types.d.ts +8 -4
- package/dist/wirings/workflow/dsl/workflow-runner.d.ts +7 -0
- package/dist/wirings/workflow/dsl/workflow-runner.js +7 -0
- package/dist/wirings/workflow/feature.d.ts +12 -0
- package/dist/wirings/workflow/feature.js +12 -0
- package/dist/wirings/workflow/graph/graph-node.d.ts +5 -0
- package/dist/wirings/workflow/graph/graph-node.js +5 -0
- package/dist/wirings/workflow/graph/template.d.ts +6 -0
- package/dist/wirings/workflow/graph/template.js +5 -0
- package/dist/wirings/workflow/graph/wire-workflow-graph.d.ts +12 -0
- package/dist/wirings/workflow/graph/wire-workflow-graph.js +10 -0
- package/dist/wirings/workflow/graph/workflow-graph.types.d.ts +11 -0
- package/dist/wirings/workflow/graph/workflow-graph.types.js +1 -0
- package/dist/{services → wirings/workflow}/in-memory-workflow-service.d.ts +8 -3
- package/dist/{services → wirings/workflow}/in-memory-workflow-service.js +9 -4
- package/dist/wirings/workflow/pikku-scenario-service.d.ts +1 -1
- package/dist/wirings/workflow/pikku-scenario-service.js +2 -2
- package/dist/wirings/workflow/pikku-workflow-service.d.ts +1 -0
- package/dist/wirings/workflow/pikku-workflow-service.js +1 -0
- package/dist/wirings/workflow/run-timeline.d.ts +21 -0
- package/dist/wirings/workflow/run-timeline.js +15 -7
- package/dist/wirings/workflow/scenario-coverage.d.ts +1 -0
- package/dist/wirings/workflow/scenario-poll.d.ts +1 -0
- package/dist/wirings/workflow/scenario-prose.d.ts +6 -0
- package/dist/wirings/workflow/scenario-prose.js +6 -0
- package/dist/wirings/workflow/scenario-run.types.d.ts +3 -0
- package/dist/wirings/workflow/scenario-step.types.d.ts +1 -0
- package/dist/wirings/workflow/scenario-step.types.js +1 -0
- package/dist/wirings/workflow/scenario-surface.js +1 -13
- package/dist/wirings/workflow/scenario.types.d.ts +6 -0
- package/dist/wirings/workflow/workflow-approval-policy.d.ts +6 -0
- package/dist/wirings/workflow/workflow-approval-policy.js +6 -0
- package/dist/wirings/workflow/workflow-constants.d.ts +7 -1
- package/dist/wirings/workflow/workflow-constants.js +10 -1
- package/dist/wirings/workflow/workflow-errors.d.ts +13 -0
- package/dist/wirings/workflow/workflow-errors.js +13 -0
- package/dist/wirings/workflow/workflow-invocation-id.d.ts +4 -0
- package/dist/wirings/workflow/workflow-invocation-id.js +4 -0
- package/dist/wirings/workflow/workflow-queue-workers.d.ts +3 -0
- package/dist/wirings/workflow/workflow-run-ownership.d.ts +1 -0
- package/dist/wirings/workflow/workflow-run-ownership.js +1 -0
- package/dist/wirings/workflow/workflow-status-stream.d.ts +1 -0
- package/dist/wirings/workflow/workflow-unwind-plan.js +2 -7
- package/dist/wirings/workflow/workflow.types.d.ts +40 -0
- package/package.json +26 -9
- package/CHANGELOG.md +0 -6978
- package/dist/services/in-memory-trigger-service.d.ts +0 -4
- package/dist/services/local-gateway-service.d.ts +0 -6
- package/dist/utils/hash.d.ts +0 -2
- package/dist/utils/hash.js +0 -23
- package/knowledge/decisions/index.md +0 -19
- package/knowledge/decisions/internals/a-credential-name-declared-twice-must-agree-on-schema-and-type.md +0 -29
- package/knowledge/decisions/internals/a-grant-can-name-a-scope-declared-without-its-addon.md +0 -29
- package/knowledge/decisions/internals/a-held-run-is-woken-later-not-retried.md +0 -28
- package/knowledge/decisions/internals/a-latency-budget-is-asserted-by-its-cause.md +0 -32
- package/knowledge/decisions/internals/a-non-streaming-agent-run-registers-with-agentrunstate-too.md +0 -22
- package/knowledge/decisions/internals/a-reset-suite-makes-the-dev-seed-the-fixture.md +0 -50
- package/knowledge/decisions/internals/a-resumed-agent-turn-is-as-interruptible-as-the-first.md +0 -20
- package/knowledge/decisions/internals/a-scenario-step-template-is-offered-unfilled.md +0 -21
- package/knowledge/decisions/internals/a-scheduled-task-writes-its-caller-session-before-it-runs.md +0 -22
- package/knowledge/decisions/internals/a-secret-set-in-memory-shadows-the-variable-of-the-same-name.md +0 -28
- package/knowledge/decisions/internals/a-secret-that-fails-to-decrypt-fails-the-whole-read.md +0 -49
- package/knowledge/decisions/internals/a-virtual-user-acts-through-invokeraw-so-a-refusal-is-data.md +0 -32
- package/knowledge/decisions/internals/a-virtual-user-cadence-is-a-row-not-a-timer.md +0 -66
- package/knowledge/decisions/internals/a-virtual-user-converse-signs-in-before-its-first-turn.md +0 -24
- package/knowledge/decisions/internals/a-virtual-user-decides-whether-to-trust-memory-once-per-turn.md +0 -21
- package/knowledge/decisions/internals/a-virtual-user-email-is-computed-with-the-run-id-as-a-sub-address.md +0 -34
- package/knowledge/decisions/internals/a-virtual-user-run-is-not-a-workflow-but-it-needs-a-trigger.md +0 -65
- package/knowledge/decisions/internals/a-wall-clock-threshold-is-a-load-test-in-disguise.md +0 -49
- package/knowledge/decisions/internals/a-workflow-wire-is-built-from-the-run-not-from-the-rpc-service.md +0 -45
- package/knowledge/decisions/internals/addon-package-roots-resolve-by-walking-node-module-search-paths.md +0 -26
- package/knowledge/decisions/internals/addon-pikku-meta-ships-at-the-package-root-or-under-dist.md +0 -32
- package/knowledge/decisions/internals/addon-singleton-services-are-cached-per-namespace-not-per-package.md +0 -33
- package/knowledge/decisions/internals/addon-workflow-names-are-prefixed-with-the-consumer-namespace.md +0 -28
- package/knowledge/decisions/internals/agent-agui-bridge-obeys-the-client-ordering-contract.md +0 -29
- package/knowledge/decisions/internals/agent-audio-chunks-carry-the-format-the-provider-returned.md +0 -20
- package/knowledge/decisions/internals/agent-context-waits-for-a-tool-result-still-being-written.md +0 -21
- package/knowledge/decisions/internals/agent-credential-suspensions-hide-the-tool-result.md +0 -26
- package/knowledge/decisions/internals/agent-delegate-and-supervise-hide-different-text.md +0 -26
- package/knowledge/decisions/internals/agent-llm-tool-arguments-have-nulls-stripped.md +0 -23
- package/knowledge/decisions/internals/agent-model-config-stays-a-single-resolution-seam.md +0 -25
- package/knowledge/decisions/internals/agent-onerror-hooks-cannot-change-the-failure.md +0 -22
- package/knowledge/decisions/internals/agent-runner-methods-must-keep-their-receiver.md +0 -22
- package/knowledge/decisions/internals/agent-speech-travels-as-a-custom-agui-event.md +0 -22
- package/knowledge/decisions/internals/agent-stream-persistence-is-best-effort.md +0 -27
- package/knowledge/decisions/internals/agent-sub-agents-inherit-the-parent-context-block.md +0 -26
- package/knowledge/decisions/internals/agent-tool-execute-failures-are-logged-unconditionally.md +0 -25
- package/knowledge/decisions/internals/agent-voice-input-transcribes-audio-parts-in-place.md +0 -22
- package/knowledge/decisions/internals/agent-working-memory-is-persisted-only-when-valid.md +0 -25
- package/knowledge/decisions/internals/an-addon-scope-root-loses-to-a-root-the-host-already-declares.md +0 -39
- package/knowledge/decisions/internals/an-agent-interrupt-is-not-a-failure.md +0 -23
- package/knowledge/decisions/internals/an-agent-is-offered-under-its-registry-key-and-only-within-the-virtual-users-scopes.md +0 -27
- package/knowledge/decisions/internals/an-agent-run-owned-by-another-instance-says-so.md +0 -25
- package/knowledge/decisions/internals/an-agent-stream-send-must-return-the-inner-sends-promise.md +0 -22
- package/knowledge/decisions/internals/an-empty-text-part-is-omitted-from-an-agent-message.md +0 -20
- package/knowledge/decisions/internals/an-empty-transcript-is-not-recorded.md +0 -22
- package/knowledge/decisions/internals/an-oauth2-credential-implies-an-optional-app-secret.md +0 -26
- package/knowledge/decisions/internals/an-unref-d-timer-cannot-be-awaited-under-node-test.md +0 -66
- package/knowledge/decisions/internals/analytics-identity-resolvers-run-in-declared-order.md +0 -22
- package/knowledge/decisions/internals/channel-message-handlers-accept-three-config-shapes.md +0 -30
- package/knowledge/decisions/internals/channel-middleware-caches-only-statically-resolved-middleware.md +0 -31
- package/knowledge/decisions/internals/channel-state-accessors-are-unsound-generics-that-every-implementation-asserts.md +0 -33
- package/knowledge/decisions/internals/channel-state-is-per-socket-session-state-is-per-user.md +0 -29
- package/knowledge/decisions/internals/channel-user-id-is-persisted-after-onconnect-middleware-runs.md +0 -28
- package/knowledge/decisions/internals/cli-option-names-are-camelcase-in-state-and-kebab-on-the-command-line.md +0 -27
- package/knowledge/decisions/internals/cli-parse-errors-are-routed-by-message-prefix.md +0 -28
- package/knowledge/decisions/internals/cli-stdout-is-reserved-for-machine-readable-output.md +0 -34
- package/knowledge/decisions/internals/cli-unknown-long-options-warn-instead-of-failing.md +0 -29
- package/knowledge/decisions/internals/core-column-form-is-an-axis-of-its-own.md +0 -84
- package/knowledge/decisions/internals/core-data-classification-brand-is-an-optional-property.md +0 -41
- package/knowledge/decisions/internals/core-function-runner-restores-the-wire-fields-it-overwrites.md +0 -44
- package/knowledge/decisions/internals/core-hot-reload-merges-generated-meta-never-replaces-it.md +0 -39
- package/knowledge/decisions/internals/core-hot-reload-owns-its-module-registry.md +0 -42
- package/knowledge/decisions/internals/core-middleware-order-is-scope-then-priority.md +0 -39
- package/knowledge/decisions/internals/core-schema-defaults-apply-on-every-transport.md +0 -43
- package/knowledge/decisions/internals/core-scopes-are-an-and-gate-separate-from-permissions.md +0 -38
- package/knowledge/decisions/internals/core-state-is-a-global-map-written-only-at-registration-time.md +0 -44
- package/knowledge/decisions/internals/email-meta-is-read-uncached-because-codegen-rewrites-it-mid-session.md +0 -27
- package/knowledge/decisions/internals/feature-flag-declarations-refuse-an-empty-anyof-and-conflicting-scopes.md +0 -22
- package/knowledge/decisions/internals/feature-flags-fail-open-and-never-enforce-access.md +0 -28
- package/knowledge/decisions/internals/flag-sync-rewrites-only-the-declared-text.md +0 -24
- package/knowledge/decisions/internals/gateway-adapters-resolve-lazily-and-are-promise-cached.md +0 -32
- package/knowledge/decisions/internals/gateway-listener-middleware-runs-without-an-rpc-on-the-wire.md +0 -43
- package/knowledge/decisions/internals/gateway-webhook-challenges-echo-bytes-not-json.md +0 -28
- package/knowledge/decisions/internals/gateway-wiring-is-a-meta-wiring-over-http-and-channels.md +0 -31
- package/knowledge/decisions/internals/generated-src-paths-in-pikku-meta-are-absolute.md +0 -26
- package/knowledge/decisions/internals/global-middleware-resolves-from-the-root-namespace-too.md +0 -32
- package/knowledge/decisions/internals/hot-reload-reads-the-changed-source-never-a-compiled-copy.md +0 -38
- package/knowledge/decisions/internals/hot-reload-writes-into-the-function-map-captured-at-startup.md +0 -26
- package/knowledge/decisions/internals/http-request-bodies-are-read-once-and-shared.md +0 -32
- package/knowledge/decisions/internals/http-route-groups-cascade-config-in-a-fixed-order.md +0 -28
- package/knowledge/decisions/internals/http-router-matches-normalized-paths-but-returns-registered-ones.md +0 -30
- package/knowledge/decisions/internals/http-runner-logs-through-a-trace-scoped-logger-functions-do-not.md +0 -26
- package/knowledge/decisions/internals/http-set-cookie-headers-are-appended-never-joined.md +0 -28
- package/knowledge/decisions/internals/http-sse-streams-flush-headers-only-after-middleware.md +0 -32
- package/knowledge/decisions/internals/http-wiring-without-metadata-is-skipped-not-fatal.md +0 -26
- package/knowledge/decisions/internals/in-a-scenario-a-4xx-is-data-not-an-exception.md +0 -25
- package/knowledge/decisions/internals/in-memory-workflow-history-aliases-the-live-step-object.md +0 -26
- package/knowledge/decisions/internals/index.md +0 -182
- package/knowledge/decisions/internals/istanbul-statement-counts-attach-to-the-start-line-only.md +0 -25
- package/knowledge/decisions/internals/local-trigger-and-gateway-services-assume-a-single-process.md +0 -26
- package/knowledge/decisions/internals/mcp-wire-names-are-assigned-over-the-whole-registry.md +0 -39
- package/knowledge/decisions/internals/node-only-builtins-are-imported-dynamically.md +0 -24
- package/knowledge/decisions/internals/one-project-shape-check-two-validators.md +0 -53
- package/knowledge/decisions/internals/only-exposed-functions-enter-a-virtual-user-catalogue.md +0 -21
- package/knowledge/decisions/internals/queue-group-concurrency-keeps-one-shared-queue-fair.md +0 -28
- package/knowledge/decisions/internals/queue-jobs-always-carry-an-explicit-attempts-count.md +0 -27
- package/knowledge/decisions/internals/remote-addons-dispatch-over-http-instead-of-local-meta.md +0 -31
- package/knowledge/decisions/internals/role-names-cannot-contain-the-scope-separator.md +0 -30
- package/knowledge/decisions/internals/rpc-names-resolve-through-package-scope-before-root.md +0 -32
- package/knowledge/decisions/internals/scenario-agent-calls-sign-in-on-401-only.md +0 -31
- package/knowledge/decisions/internals/scenario-given-and-when-are-sugar-but-then-is-not.md +0 -24
- package/knowledge/decisions/internals/scenario-meta-lives-apart-from-app-meta-but-merges-when-read-off-disk.md +0 -26
- package/knowledge/decisions/internals/scenario-steps-return-drained-response-records.md +0 -27
- package/knowledge/decisions/internals/scenarios-live-in-files-named-for-them.md +0 -48
- package/knowledge/decisions/internals/scope-roots-may-be-co-declared-by-an-addon-and-its-host-app.md +0 -30
- package/knowledge/decisions/internals/serverless-channel-disconnect-must-tolerate-a-missing-channel.md +0 -28
- package/knowledge/decisions/internals/side-effects-are-an-allowlist-not-a-boolean.md +0 -34
- package/knowledge/decisions/internals/speech-synthesis-picks-a-voice-per-sentence-and-warns-once.md +0 -24
- package/knowledge/decisions/internals/the-agent-done-event-goes-through-the-middleware-and-is-awaited.md +0 -26
- package/knowledge/decisions/internals/the-api-report-pins-members-not-just-names.md +0 -43
- package/knowledge/decisions/internals/the-core-scope-validator-refuses-separator-wildcard-and-empty-segments.md +0 -22
- package/knowledge/decisions/internals/the-dev-queue-copies-prod-timing-and-serialization-semantics.md +0 -30
- package/knowledge/decisions/internals/the-ecosystem-entry-point-carries-the-adapter-surface.md +0 -83
- package/knowledge/decisions/internals/the-embedding-model-is-pinned-per-service-and-doc-query-embedding-is-split.md +0 -29
- package/knowledge/decisions/internals/the-in-memory-workflow-service-is-inline-only-and-single-process.md +0 -27
- package/knowledge/decisions/internals/the-kek-salt-is-scoped-to-the-key-version.md +0 -40
- package/knowledge/decisions/internals/the-mcp-handshake-is-challenged-only-when-every-target-is-gated.md +0 -29
- package/knowledge/decisions/internals/the-middleware-resolution-cache-is-deliberately-unbounded.md +0 -40
- package/knowledge/decisions/internals/the-per-invocation-rpc-view-is-a-class.md +0 -40
- package/knowledge/decisions/internals/the-pikku-user-id-resolves-in-a-fixed-order.md +0 -24
- package/knowledge/decisions/internals/the-runner-resolves-wire-services-itself.md +0 -31
- package/knowledge/decisions/internals/the-schema-service-is-never-stubbed.md +0 -26
- package/knowledge/decisions/internals/the-transcript-event-is-sent-ahead-of-the-run.md +0 -25
- package/knowledge/decisions/internals/the-virtual-user-catalogue-is-the-only-gate-on-what-may-be-called.md +0 -21
- package/knowledge/decisions/internals/the-virtual-user-prompt-says-json-because-of-json-object-mode.md +0 -22
- package/knowledge/decisions/internals/the-virtual-user-runtime-is-exported-from-the-virtual-user-entry-point.md +0 -28
- package/knowledge/decisions/internals/the-worker-disposition-is-the-one-that-is-not-testing.md +0 -22
- package/knowledge/decisions/internals/thread-history-records-the-transcript-not-the-audio.md +0 -25
- package/knowledge/decisions/internals/trigger-declaration-is-split-from-trigger-source.md +0 -33
- package/knowledge/decisions/internals/typed-secret-service-caches-for-the-process-lifetime.md +0 -26
- package/knowledge/decisions/internals/validate-checks-virtual-users-through-a-shared-module.md +0 -43
- package/knowledge/decisions/internals/validate-runs-checks-by-precondition.md +0 -115
- package/knowledge/decisions/internals/virtual-user-conversation-drives-the-target-through-a-transport-seam.md +0 -24
- package/knowledge/decisions/internals/virtual-user-conversation-verdicts-are-llm-self-evaluations.md +0 -25
- package/knowledge/decisions/internals/virtual-user-conversations-seed-a-hidden-kickoff-message.md +0 -23
- package/knowledge/decisions/internals/virtual-user-step-order-comes-from-insertion-order.md +0 -21
- package/knowledge/decisions/internals/virtual-users-are-declared-in-one-definevirtualusers-call-per-codebase.md +0 -30
- package/knowledge/decisions/internals/voice-output-speaks-unless-voice-input-explicitly-says-otherwise.md +0 -24
- package/knowledge/decisions/internals/webhook-delivery-history-records-every-attempt-best-effort.md +0 -26
- package/knowledge/decisions/internals/webhook-service-collaborators-are-constructor-args-not-locator-lookups.md +0 -25
- package/knowledge/decisions/internals/whether-a-run-is-inline-is-read-from-the-run-record.md +0 -58
- package/knowledge/decisions/internals/wiring-registries-erase-the-generics-their-wire-functions-capture.md +0 -35
- package/knowledge/decisions/internals/workflow-approval-expiry-is-decided-from-a-recorded-deadline.md +0 -34
- package/knowledge/decisions/internals/workflow-core-never-imports-a-browser-driver.md +0 -42
- package/knowledge/decisions/internals/workflow-dsl-meta-separates-runtime-expressions-from-literals.md +0 -38
- package/knowledge/decisions/internals/workflow-features-resolve-scenarios-by-object-identity.md +0 -29
- package/knowledge/decisions/internals/workflow-graph-inline-and-queued-runs-share-one-planner.md +0 -42
- package/knowledge/decisions/internals/workflow-graph-node-notes-are-excluded-from-the-graph-hash.md +0 -25
- package/knowledge/decisions/internals/workflow-inline-runs-report-their-run-id-before-they-can-fail.md +0 -29
- package/knowledge/decisions/internals/workflow-invocation-id-is-the-dedupe-key-not-step-id.md +0 -43
- package/knowledge/decisions/internals/workflow-queued-step-dispatch-requires-an-explicit-opt-in.md +0 -29
- package/knowledge/decisions/internals/workflow-queues-are-per-workflow-by-default.md +0 -42
- package/knowledge/decisions/internals/workflow-repeated-step-names-get-an-ordinal-suffix.md +0 -33
- package/knowledge/decisions/internals/workflow-replay-reads-its-steps-once-and-caches-only-the-immutable-half.md +0 -32
- package/knowledge/decisions/internals/workflow-retries-are-owned-by-the-workflow-not-the-queue.md +0 -31
- package/knowledge/decisions/internals/workflow-run-capabilities-are-extensions-not-subclasses.md +0 -39
- package/knowledge/decisions/internals/workflow-run-mirror-is-never-a-source-of-truth.md +0 -29
- package/knowledge/decisions/internals/workflow-run-polling-backs-off-to-the-callers-ceiling.md +0 -33
- package/knowledge/decisions/internals/workflow-run-timeline-is-a-pure-fold-over-durable-history.md +0 -37
- package/knowledge/decisions/internals/workflow-scenario-assertions-never-retry-and-record-one-step.md +0 -54
- package/knowledge/decisions/internals/workflow-scenario-hooks-are-a-scenario-only-affordance.md +0 -43
- package/knowledge/decisions/internals/workflow-scenario-prose-is-rendered-from-typed-calls-not-parsed-from-english.md +0 -32
- package/knowledge/decisions/internals/workflow-scenario-quarantine-reason-lives-in-code.md +0 -18
- package/knowledge/decisions/internals/workflow-scenario-step-targets-are-string-literals-for-the-inspector.md +0 -34
- package/knowledge/decisions/internals/workflow-step-compensation-runs-as-its-own-durable-step.md +0 -29
- package/knowledge/decisions/internals/workflow-step-dispatch-failure-is-transient-not-a-run-failure.md +0 -33
- package/knowledge/decisions/internals/workflow-step-lock-is-held-only-to-claim-the-step.md +0 -34
- package/knowledge/decisions/internals/workflow-step-rpc-name-is-provenance-only.md +0 -34
- package/knowledge/decisions/internals/workflow-suspend-and-approval-reasons-are-durable-step-identities.md +0 -38
- package/knowledge/decisions/internals/workflow-suspended-runs-keep-their-in-process-context.md +0 -30
- package/knowledge/decisions/security/a-bearer-token-checked-against-a-secret-reads-it-per-request.md +0 -26
- package/knowledge/decisions/security/a-call-without-a-session-raises-missing-session-not-forbidden.md +0 -20
- package/knowledge/decisions/security/a-caller-cookie-wins-over-the-jar-for-the-same-name.md +0 -23
- package/knowledge/decisions/security/a-channel-lifecycle-acts-as-the-socket-upgrade-session.md +0 -16
- package/knowledge/decisions/security/a-channel-requires-a-session-unless-it-says-auth-false.md +0 -26
- package/knowledge/decisions/security/a-credential-read-path-follows-its-declared-type-not-absence.md +0 -32
- package/knowledge/decisions/security/a-credential-type-is-a-literal-the-inspector-checks-at-declaration.md +0 -27
- package/knowledge/decisions/security/a-dropped-audit-write-is-always-logged.md +0 -28
- package/knowledge/decisions/security/a-first-party-cookie-is-written-only-after-its-purposes-consent.md +0 -33
- package/knowledge/decisions/security/a-function-never-receives-the-secret-service.md +0 -37
- package/knowledge/decisions/security/a-graph-run-starts-at-an-entry-node-the-graph-declared.md +0 -33
- package/knowledge/decisions/security/a-permission-gets-a-wire-it-cannot-reply-on.md +0 -33
- package/knowledge/decisions/security/a-public-function-says-so-with-auth-false.md +0 -34
- package/knowledge/decisions/security/a-readonly-session-reaches-only-readonly-functions.md +0 -25
- package/knowledge/decisions/security/a-scaffold-flag-says-a-surface-exists-not-who-may-call-it.md +0 -52
- package/knowledge/decisions/security/a-scheduled-virtual-user-run-needs-no-admin-at-run-time.md +0 -27
- package/knowledge/decisions/security/a-scoped-credential-view-is-limited-to-declared-names.md +0 -26
- package/knowledge/decisions/security/a-scoped-secret-view-reads-only-declared-keys-and-never-writes.md +0 -25
- package/knowledge/decisions/security/a-secret-is-sent-only-to-the-hosts-it-declares.md +0 -29
- package/knowledge/decisions/security/a-step-can-name-an-identity-no-virtual-user-holds-through-per-call-headers.md +0 -25
- package/knowledge/decisions/security/a-step-runs-the-function-the-workflow-dispatched-it-with.md +0 -37
- package/knowledge/decisions/security/a-stopped-run-by-id-skips-the-ownership-check.md +0 -24
- package/knowledge/decisions/security/a-vault-secret-redacts-on-serialization-and-throws-on-coercion.md +0 -29
- package/knowledge/decisions/security/a-virtual-user-catalogue-entry-is-filtered-by-scope-and-approval-is-denied-by-default.md +0 -30
- package/knowledge/decisions/security/a-virtual-user-environment-fails-closed.md +0 -38
- package/knowledge/decisions/security/a-virtual-user-is-never-offered-a-step-that-would-forge-its-own-oracle.md +0 -27
- package/knowledge/decisions/security/a-virtual-user-never-runs-against-production.md +0 -23
- package/knowledge/decisions/security/a-virtual-user-reads-its-roles-from-the-apps-own-rpc-before-better-auth.md +0 -27
- package/knowledge/decisions/security/a-virtual-user-run-treats-an-unresolved-environment-as-production.md +0 -41
- package/knowledge/decisions/security/a-virtual-user-scopes-are-expanded-from-its-roles-once-at-run-preparation.md +0 -25
- package/knowledge/decisions/security/a-virtual-user-whose-roles-drift-from-the-declaration-refuses-to-run.md +0 -32
- package/knowledge/decisions/security/a-workflow-run-is-read-and-approved-by-its-owner.md +0 -50
- package/knowledge/decisions/security/addon-auth-and-tags-only-tighten.md +0 -43
- package/knowledge/decisions/security/addon-config-gates-apply-only-at-the-namespaced-rpc-boundary.md +0 -52
- package/knowledge/decisions/security/addon-scopes-are-resolved-where-the-function-runs.md +0 -46
- package/knowledge/decisions/security/addon-screen-scopes-hide-and-do-not-enforce.md +0 -20
- package/knowledge/decisions/security/agent-approval-forwarding-requires-a-symbol-brand.md +0 -27
- package/knowledge/decisions/security/agent-credential-requests-are-symbol-branded.md +0 -37
- package/knowledge/decisions/security/agent-gate-requires-a-session-only-when-auth-is-true.md +0 -31
- package/knowledge/decisions/security/agent-ownership-failures-never-echo-the-resource.md +0 -23
- package/knowledge/decisions/security/agent-resume-re-runs-the-authorization-gate.md +0 -22
- package/knowledge/decisions/security/agent-sessionless-deployments-have-no-thread-ownership.md +0 -39
- package/knowledge/decisions/security/agent-thread-ownership-composes-the-session-principal.md +0 -30
- package/knowledge/decisions/security/agent-tool-filtering-reads-the-live-function-config.md +0 -24
- package/knowledge/decisions/security/an-addon-header-can-only-narrow-the-session.md +0 -26
- package/knowledge/decisions/security/an-addon-instance-reads-only-the-secrets-and-credentials-it-is-named.md +0 -33
- package/knowledge/decisions/security/an-addon-may-reach-only-itself-and-the-addons-it-uses.md +0 -16
- package/knowledge/decisions/security/an-agent-approval-is-claimed-before-the-tool-runs.md +0 -33
- package/knowledge/decisions/security/an-api-key-is-jwt-decoded-into-the-session.md +0 -26
- package/knowledge/decisions/security/an-approval-answer-outlives-the-run-it-answered.md +0 -59
- package/knowledge/decisions/security/an-empty-owners-constraint-matches-nothing.md +0 -30
- package/knowledge/decisions/security/an-exposed-ungated-function-is-a-codegen-warning.md +0 -52
- package/knowledge/decisions/security/an-external-virtual-user-caller-presents-one-signed-statement.md +0 -38
- package/knowledge/decisions/security/an-inbound-webhook-source-dispatches-only-verified-requests.md +0 -31
- package/knowledge/decisions/security/an-mcp-call-with-no-http-request-stays-anonymous.md +0 -18
- package/knowledge/decisions/security/an-mcp-refusal-is-decided-before-dispatch.md +0 -48
- package/knowledge/decisions/security/an-oauth2-credential-is-read-by-its-account-row.md +0 -40
- package/knowledge/decisions/security/an-omitted-user-id-addresses-the-platform-credential.md +0 -32
- package/knowledge/decisions/security/an-upload-is-counted-as-it-arrives-not-buffered-then-measured.md +0 -24
- package/knowledge/decisions/security/analytics-identity-is-stamped-from-the-session-not-the-event.md +0 -24
- package/knowledge/decisions/security/app-access-is-a-scope-tree-synthesised-from-virtual-users.md +0 -26
- package/knowledge/decisions/security/approval-policy-decides-who-answers-a-tool-call.md +0 -27
- package/knowledge/decisions/security/auth-false-on-a-session-function-warns-and-still-requires-one.md +0 -25
- package/knowledge/decisions/security/bearer-token-hashes-are-unpeppered-sha256.md +0 -18
- package/knowledge/decisions/security/consent-is-read-from-a-cookie-and-a-recognised-denial-counts-as-refusal.md +0 -29
- package/knowledge/decisions/security/console-addon-privileged-functions-gate-themselves.md +0 -84
- package/knowledge/decisions/security/core-safe-fetch-blocks-ssrf-by-host-literal-not-dns.md +0 -39
- package/knowledge/decisions/security/core-secrets-use-a-per-secret-dek-wrapped-by-a-kek.md +0 -37
- package/knowledge/decisions/security/cors-defaults-to-any-origin-and-refuses-the-wildcard-with-credentials.md +0 -22
- package/knowledge/decisions/security/credential-backends-share-one-conformance-suite-for-per-user-isolation.md +0 -29
- package/knowledge/decisions/security/each-stage-has-one-virtual-user-key-pair.md +0 -27
- package/knowledge/decisions/security/gateway-handlers-run-through-the-function-runner-gate.md +0 -41
- package/knowledge/decisions/security/gateway-middleware-sessions-must-be-bridged-onto-the-wire.md +0 -30
- package/knowledge/decisions/security/global-permissions-and-function-permissions-are-independent-gates.md +0 -40
- package/knowledge/decisions/security/hmac-verification-fails-closed-on-empty-inputs.md +0 -25
- package/knowledge/decisions/security/http-error-detail-is-withheld-from-clients-in-production.md +0 -33
- package/knowledge/decisions/security/http-request-bodies-are-bounded-before-they-are-buffered.md +0 -46
- package/knowledge/decisions/security/index.md +0 -135
- package/knowledge/decisions/security/local-content-refuses-private-buckets-under-the-public-segment.md +0 -21
- package/knowledge/decisions/security/mail-is-allowlisted-before-a-virtual-user-run-sees-it.md +0 -38
- package/knowledge/decisions/security/mcp-internal-error-details-are-double-gated-on-production.md +0 -27
- package/knowledge/decisions/security/mcp-resources-tools-and-prompts-take-sessionless-functions.md +0 -18
- package/knowledge/decisions/security/origin-locked-routes-match-the-origin-exactly.md +0 -22
- package/knowledge/decisions/security/oss-auth-works-without-pikku-studio-cloud.md +0 -26
- package/knowledge/decisions/security/outbound-webhooks-use-an-allowlist-when-configured.md +0 -24
- package/knowledge/decisions/security/passphrases-are-stretched-key-material-is-expanded.md +0 -40
- package/knowledge/decisions/security/permission-auth-filtering-requires-live-permission-functions.md +0 -31
- package/knowledge/decisions/security/pikku-carries-virtual-user-scopes-as-data-and-the-app-grants-them.md +0 -35
- package/knowledge/decisions/security/queue-job-identities-are-signed-at-enqueue.md +0 -69
- package/knowledge/decisions/security/queue-jobs-carry-the-producers-pikku-user-id.md +0 -39
- package/knowledge/decisions/security/remote-addon-tokens-are-client-credentials-not-mesh-trust.md +0 -34
- package/knowledge/decisions/security/scaffold-features-are-authenticated-unless-opted-out.md +0 -55
- package/knowledge/decisions/security/scenario-step-functions-are-never-externally-invocable.md +0 -30
- package/knowledge/decisions/security/scope-resolution-happens-at-the-session-boundary-and-sync-never-deletes.md +0 -28
- package/knowledge/decisions/security/scoped-content-access-is-a-root-folder-with-longest-prefix-grants.md +0 -31
- package/knowledge/decisions/security/self-authentication-is-declared-not-detected.md +0 -34
- package/knowledge/decisions/security/services-without-secrets-get-a-throwing-secrets-accessor.md +0 -22
- package/knowledge/decisions/security/shared-guards-refuse-to-mutate-or-shadow-a-system-role.md +0 -34
- package/knowledge/decisions/security/signed-content-urls-bind-the-request-path.md +0 -37
- package/knowledge/decisions/security/signed-uploads-are-verified-by-the-same-check-as-signed-reads.md +0 -26
- package/knowledge/decisions/security/system-role-scopes-must-be-declared-with-define-scope.md +0 -24
- package/knowledge/decisions/security/system-roles-are-additive-and-immutable.md +0 -16
- package/knowledge/decisions/security/the-channel-rpc-does-not-send-the-callers-session.md +0 -21
- package/knowledge/decisions/security/the-remote-jobs-inbox-fails-closed-without-a-secret.md +0 -24
- package/knowledge/decisions/security/the-remote-rpc-gate-fails-closed-and-binds-the-token-to-its-function.md +0 -34
- package/knowledge/decisions/security/the-workflow-status-stream-rechecks-ownership-on-every-poll.md +0 -16
- package/knowledge/decisions/security/two-credentials-on-one-key-must-share-a-read-mode.md +0 -29
- package/knowledge/decisions/security/verified-bearer-claims-are-pass-through-data-that-core-never-fills.md +0 -23
- package/knowledge/decisions/security/virtual-user-catalogue-excludes-the-machinery-that-runs-virtual-users.md +0 -25
- package/knowledge/decisions/security/virtual-user-conversation-missing-approval-decisions-default-to-denied.md +0 -22
- package/knowledge/decisions/security/virtual-user-run-records-are-gated-behind-a-read-scope.md +0 -18
- package/knowledge/decisions/security/virtual-user-sign-in-does-not-exist-in-production.md +0 -25
- package/knowledge/decisions/security/virtual-user-sign-in-has-one-door.md +0 -42
- package/knowledge/decisions/security/virtual-user-sign-in-is-proven-by-set-cookie-not-a-non-empty-jar.md +0 -29
- package/knowledge/decisions/security/virtual-user-sign-in-only-works-for-virtual-user-flagged-users.md +0 -29
- package/knowledge/decisions/security/webhook-bodies-are-signed-before-they-are-enqueued.md +0 -25
- package/knowledge/decisions/security/wire-addon-expose-selects-the-rpc-surface.md +0 -51
- package/knowledge/decisions/security/workflow-approval-payloads-are-validated-on-replay-inside-the-workflow.md +0 -40
- package/knowledge/decisions/security/workflow-helper-functions-are-sessionless-by-declaration.md +0 -18
- package/knowledge/decisions/security/workflow-queued-steps-rehydrate-their-session-from-the-run-wire.md +0 -32
- package/knowledge/decisions/security/workflow-scenario-sessions-are-isolated-per-virtual-user-and-per-scenario.md +0 -32
- package/knowledge/decisions/security/workflow-scenario-steps-are-never-network-invocable.md +0 -31
- package/knowledge/decisions/security/workflow-virtual-user-steps-always-use-the-real-transport.md +0 -34
- package/knowledge/decisions/security/writing-a-virtual-user-schedule-is-gated-by-its-own-scope.md +0 -18
- package/knowledge/index.md +0 -24
- package/knowledge/questions/a-bearer-jwt-with-no-identity-becomes-a-session.md +0 -24
- package/knowledge/questions/channel-middleware-accepts-bare-factories-that-nothing-resolves.md +0 -35
- package/knowledge/questions/dev-quick-login-as-impersonation.md +0 -25
- package/knowledge/questions/does-a-delayed-rpc-run-as-the-session-it-was-scheduled-with.md +0 -26
- package/knowledge/questions/does-a-user-id-with-a-colon-read-another-users-credentials.md +0 -27
- package/knowledge/questions/does-a-wirecli-command-need-a-session-by-default.md +0 -26
- package/knowledge/questions/does-an-adversarial-in-scope-success-count-as-a-finding.md +0 -26
- package/knowledge/questions/does-approve-step-need-the-run-owners-session-or-the-gates-approvers.md +0 -34
- package/knowledge/questions/does-cors-origin-true-reflect-any-origin-with-credentials.md +0 -20
- package/knowledge/questions/does-skip-user-session-do-anything-on-a-channel.md +0 -24
- package/knowledge/questions/does-the-store-session-match-the-other-two.md +0 -19
- package/knowledge/questions/index.md +0 -41
- package/knowledge/questions/is-the-agent-score-worker-reachable-without-a-session.md +0 -21
- package/knowledge/questions/live-scheduled-tests-may-write.md +0 -19
- package/knowledge/questions/provision-virtual-users-has-no-caller-in-this-repo.md +0 -23
- package/knowledge/questions/remote-secret-refuses-requests-without-a-remote-token-on-every-path.md +0 -32
- package/knowledge/questions/should-a-middleware-set-session-persist-to-the-store.md +0 -25
- package/knowledge/questions/should-a-scoped-secret-view-throw-from-has-secret-for-a-disallowed-key.md +0 -23
- package/knowledge/questions/should-a-wrong-bearer-token-be-anonymous-or-refused.md +0 -35
- package/knowledge/questions/should-an-empty-webhook-signing-secret-send-unsigned.md +0 -23
- package/knowledge/questions/should-http-virtual-user-sessions-reset-between-scenarios-in-one-run.md +0 -27
- package/knowledge/questions/should-the-cookie-jar-scope-cookies-to-the-api-origin.md +0 -26
- package/knowledge/questions/should-voice-input-fetch-audio-urls-without-a-host-allowlist.md +0 -20
- package/knowledge/questions/staging-impersonation-rules.md +0 -27
- package/knowledge/questions/unauthorized-channel-replies-escape-the-declared-out-type.md +0 -44
- package/knowledge/questions/virtual-user-keys-on-cloud-stages-are-pikku-studios-to-build.md +0 -33
- package/knowledge/questions/virtual-user-statement-replay-is-per-process.md +0 -20
- package/knowledge/questions/what-an-impersonated-session-carries.md +0 -22
- package/run-tests.sh +0 -68
- package/scripts/generate-api-report.d.mts +0 -1
- package/scripts/generate-api-report.mjs +0 -96
- package/scripts/generate-api-report.mts +0 -333
- package/src/public-surface.json +0 -637
- package/src/public-surface.json.README +0 -43
- /package/dist/{function/compensation-name.d.ts → compensation-name.d.ts} +0 -0
- /package/dist/{function/compensation-name.js → compensation-name.js} +0 -0
package/knowledge/decisions/internals/the-middleware-resolution-cache-is-deliberately-unbounded.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The middleware resolution cache is deliberately unbounded
|
|
4
|
-
description: Its keyspace is the set of registered wires, not request traffic, and middleware is dynamic — so eviction would buy nothing and cost the dedupe guarantee
|
|
5
|
-
tags: core, middleware
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The middleware resolution cache is deliberately unbounded
|
|
9
|
-
|
|
10
|
-
`middlewareCache` in `packages/core/src/middleware-runner.ts` is a plain
|
|
11
|
-
`Record<PikkuWiringTypes, Record<string, readonly CorePikkuMiddleware[]>>` with
|
|
12
|
-
no size limit and no eviction. That reads like an unbounded-growth bug and is
|
|
13
|
-
not one.
|
|
14
|
-
|
|
15
|
-
**The keyspace is finite by construction.** The cache is keyed by wire type and
|
|
16
|
-
wire id, and wire ids come from registration, not from traffic — an HTTP route
|
|
17
|
-
pattern, a channel name, a queue name. A million requests to the same route
|
|
18
|
-
produce one entry. Nothing a caller sends creates a key: a channel message key
|
|
19
|
-
is `${channel}:${routingProperty}:${routerValue}`, and `routerValue` is only
|
|
20
|
-
reached after matching `routes[routerValue]`, so an unregistered value never
|
|
21
|
-
gets that far.
|
|
22
|
-
|
|
23
|
-
**Middleware is dynamic, and the cache is invalidated rather than aged out.**
|
|
24
|
-
`addGlobalMiddleware` and `addTagMiddleware` can run after startup, and dev
|
|
25
|
-
hot-reload rewires wholesale — so correctness comes from `clearMiddlewareCache()`
|
|
26
|
-
at the points where the middleware set actually changes, not from entries
|
|
27
|
-
expiring. An LRU would evict entries that are still current while doing nothing
|
|
28
|
-
about entries that are stale.
|
|
29
|
-
|
|
30
|
-
**Eviction would also weaken the chain itself.** `combineMiddleware` returns a
|
|
31
|
-
`freezeDedupe`d array, and dedupe is by function identity — a middleware
|
|
32
|
-
reachable through both a tag group and a direct wire registration runs exactly
|
|
33
|
-
once. Callers hold that array. Recomputing it under memory pressure hands out a
|
|
34
|
-
second array for the same wire, which is churn at best and, for anything
|
|
35
|
-
comparing chains by identity, a silent behaviour change.
|
|
36
|
-
|
|
37
|
-
**What this rules out:** adding a `MIDDLEWARE_CACHE_MAX` with LRU eviction as a
|
|
38
|
-
denial-of-service mitigation. There is no traffic-driven growth to mitigate. If
|
|
39
|
-
a future change ever keys this cache by something a caller controls, that is the
|
|
40
|
-
bug — bound the key, not the cache.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The per-invocation rpc view is a class, because an object literal with a getter is slow to build
|
|
4
|
-
description: An accessor declared on an object literal is defined per instance, which drops the literal off V8's fast construction path — measured at 1.15µs against 0.47µs, on every request
|
|
5
|
-
tags: core, rpc, performance
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The per-invocation rpc view is a class
|
|
9
|
-
|
|
10
|
-
`getContextRPCService` builds `wire.rpc` once per invocation. It used to return
|
|
11
|
-
an object literal, and that literal declared `get agent()` so the agent facade
|
|
12
|
-
stayed lazy — most requests never touch it, and reading it builds five closures.
|
|
13
|
-
|
|
14
|
-
The laziness is right. Declaring the accessor _on the literal_ was not: a
|
|
15
|
-
literal containing an accessor needs a real property descriptor per instance,
|
|
16
|
-
which takes it off V8's fast object-literal construction path and slows the
|
|
17
|
-
whole object, not just the accessor.
|
|
18
|
-
|
|
19
|
-
Measured with `benchmarks/bench-profile-granular.ts`, three runs each:
|
|
20
|
-
|
|
21
|
-
| shape | per call |
|
|
22
|
-
| ----------------------------------- | ------------------------ |
|
|
23
|
-
| object literal with `get agent()` | 1.106 / 1.433 / 1.147 µs |
|
|
24
|
-
| class with `agent` on the prototype | 0.523 / 0.461 / 0.525 µs |
|
|
25
|
-
|
|
26
|
-
Roughly 2.4×, well outside the run-to-run variance, on a path every request
|
|
27
|
-
takes. On the same machine a full `fetchData` measures 12–19µs, so this was on
|
|
28
|
-
the order of a tenth of a request spent constructing one object.
|
|
29
|
-
|
|
30
|
-
The obvious alternative is worse. Making `agent` an eager property removes the
|
|
31
|
-
accessor but builds those five closures unconditionally, and measured _slower_
|
|
32
|
-
than the original at 1.967µs. A prototype accessor is the only shape that keeps
|
|
33
|
-
the laziness and the fast construction path.
|
|
34
|
-
|
|
35
|
-
**What this rules out:** "simplifying" `ContextRPCView` back to an object
|
|
36
|
-
literal. It reads as the plainer option and costs double. It also rules out
|
|
37
|
-
trusting a synthetic microbenchmark here — a standalone benchmark of these
|
|
38
|
-
shapes pointed at the eager version, because its stand-in for the agent getter
|
|
39
|
-
was too cheap to represent the real one. The numbers above come from the
|
|
40
|
-
profiler running the real code.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The pikku user id resolves in a fixed order
|
|
4
|
-
description: defaultPikkuUserIdResolver takes an explicit pikkuUserId first, then the session userId, then the queue job's id, then the workflow's id
|
|
5
|
-
tags: core, identity
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The pikku user id resolves in a fixed order
|
|
9
|
-
|
|
10
|
-
`defaultPikkuUserIdResolver` in `packages/core/src/services/pikku-user-id.ts:5-12`
|
|
11
|
-
returns the first of these that is set:
|
|
12
|
-
|
|
13
|
-
1. `wire.pikkuUserId` (`:6`);
|
|
14
|
-
2. `wire.session.userId`, when it is a string (`:7-9`);
|
|
15
|
-
3. `wire.queue.pikkuUserId` (`:10`);
|
|
16
|
-
4. `wire.workflow.pikkuUserId` (`:11`).
|
|
17
|
-
|
|
18
|
-
Otherwise it returns `undefined` (`:12`).
|
|
19
|
-
|
|
20
|
-
The queue case is about the producer's identity carried on a job, and is covered in
|
|
21
|
-
`queue-job-identities-are-signed-at-enqueue.md`. This note records only the order.
|
|
22
|
-
|
|
23
|
-
**What this rules out:** a session user id overriding an explicit `pikkuUserId` set
|
|
24
|
-
on the wire, and a queue or workflow id outranking a live session.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The function runner resolves wire services itself
|
|
4
|
-
description: A function's wire services come from its own package's factory or the app's registered one, never borrowed from whoever called it
|
|
5
|
-
tags: core
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The function runner resolves wire services itself
|
|
9
|
-
|
|
10
|
-
`runPikkuFunc` picks the wire-services factory for the function it is about to
|
|
11
|
-
run: the function's addon package factory if it has one, else a factory the
|
|
12
|
-
transport passed explicitly, else the app's registered one
|
|
13
|
-
(`getCreateWireServices()`). A caller that passes nothing still gets the
|
|
14
|
-
function its wire services.
|
|
15
|
-
|
|
16
|
-
Before this, only the transports passed a factory. `rpc.invoke`, `rpc.exposed`,
|
|
17
|
-
gateway handlers and webhook sources passed none, so an app function reached
|
|
18
|
-
through them ran on whatever services its caller had already merged. That held
|
|
19
|
-
until `singletonServicesOnly` let a caller skip building wire services: the
|
|
20
|
-
generated `rpcCaller` behind `/rpc/:rpcName` reads no service, was marked, and
|
|
21
|
-
every app function behind it lost `events` and every other wire service. Nested
|
|
22
|
-
RPC therefore gets `resolvedSingletonServices`, not the caller's merged set.
|
|
23
|
-
|
|
24
|
-
Channels are the one caller that legitimately shares wire services: they build
|
|
25
|
-
one set per connection. They hand it over as `wireServices`, which the runner
|
|
26
|
-
uses as-is and does not close, because the connection owns its lifetime.
|
|
27
|
-
|
|
28
|
-
**What this rules out:** passing a caller's merged services down as
|
|
29
|
-
`singletonServices` to carry wire services into a nested call, and deciding in
|
|
30
|
-
one function's meta whether a different function gets wire services.
|
|
31
|
-
`singletonServicesOnly` only ever describes the function it is set on.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The schema service is never stubbed, or tests validate nothing
|
|
4
|
-
description: createStubProxy returns undefined for the schema property so the real schema service is built — a stubbed one turns validation into a silent no-op
|
|
5
|
-
tags: services
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The schema service is never stubbed, or tests validate nothing
|
|
9
|
-
|
|
10
|
-
`createStubProxy` (`packages/core/src/services/stub-tracker.ts`) is passed as
|
|
11
|
-
`existingServices` to `createSingletonServices`, and its proxy answers every
|
|
12
|
-
property with `tracker.stub(prop)` — every property except `schema`, which
|
|
13
|
-
returns `undefined` so the service factory goes on to construct a real schema
|
|
14
|
-
service.
|
|
15
|
-
|
|
16
|
-
A stub's methods resolve `undefined` and record the call. Applied to
|
|
17
|
-
`validateSchema`, that means validation always "passes": a request missing a
|
|
18
|
-
required field, or carrying a wrong type, sails through. Every scenario that
|
|
19
|
-
believed it was exercising input validation would be asserting on nothing, and
|
|
20
|
-
would keep passing after validation broke. The one-line exception in the proxy is
|
|
21
|
-
what keeps the test suite honest.
|
|
22
|
-
|
|
23
|
-
**What this rules out:** simplifying the `get` trap to `return tracker.stub(prop)`
|
|
24
|
-
for all properties, and adding `schema` to any list of services a scenario is
|
|
25
|
-
allowed to fake. If a scenario needs schema behaviour changed, change the schema,
|
|
26
|
-
not the service.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: A voice turn's transcript is sent before the run starts, on the raw channel
|
|
4
|
-
description: The client does not know what it said, and an answer starts streaming within a few hundred milliseconds — a question arriving after its answer reads as the wrong question
|
|
5
|
-
tags: core, agent
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# A voice turn's transcript is sent ahead of the run
|
|
9
|
-
|
|
10
|
-
A voice client sends audio, so it does not know what it said. Until the
|
|
11
|
-
transcript reaches it, its own message renders as a blank bubble.
|
|
12
|
-
|
|
13
|
-
The event is sent _before_ the run rather than alongside it because the answer
|
|
14
|
-
begins streaming within a few hundred milliseconds. Sent concurrently, the
|
|
15
|
-
transcript routinely lands after the first tokens of its own answer — and a
|
|
16
|
-
question that appears beneath its answer reads as a question about something
|
|
17
|
-
else entirely.
|
|
18
|
-
|
|
19
|
-
It goes on the raw channel rather than through the stream middleware because it
|
|
20
|
-
is not part of the reply: it is what the user said, and the stream hooks are
|
|
21
|
-
built to transform what the agent says.
|
|
22
|
-
|
|
23
|
-
**What this rules out:** folding the transcript into the run's event stream for
|
|
24
|
-
uniformity. Ordering is the whole point, and the stream is where ordering is
|
|
25
|
-
least under this code's control.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The catalogue is the only gate on what a virtual user may call
|
|
4
|
-
description: Narrowing happens once at derivation, so there is no second check in the run loop that could drift out of step with it
|
|
5
|
-
tags: core, virtual-user
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The catalogue is the only gate on what a virtual user may call
|
|
9
|
-
|
|
10
|
-
What a virtual user may invoke is decided once, when the catalogue is narrowed
|
|
11
|
-
for its disposition: a read-only disposition is never offered a mutation, and an
|
|
12
|
-
approval-gated endpoint is never offered at all.
|
|
13
|
-
|
|
14
|
-
The run loop then indexes into that catalogue and calls what it finds. There is
|
|
15
|
-
deliberately no second permission check at call time, because a second check is
|
|
16
|
-
a second thing to keep correct — and the failure mode of the two disagreeing is
|
|
17
|
-
that one of them silently stops mattering.
|
|
18
|
-
|
|
19
|
-
**What this rules out:** adding a "defence in depth" guard in the run loop. It
|
|
20
|
-
would not be defence in depth; it would be a duplicate of the derivation rules,
|
|
21
|
-
maintained separately, and the one that runs first wins.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The virtual user's instructions say the word "json" because a degraded gateway demands it
|
|
4
|
-
description: A gateway that cannot take a JSON schema falls back to OpenAI's json_object mode, which refuses any request whose prompt does not contain the word
|
|
5
|
-
tags: core, virtual-user-conversation
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The virtual user's instructions say the word "json"
|
|
9
|
-
|
|
10
|
-
Every call the virtual user makes wants a schema'd object back. A gateway that cannot
|
|
11
|
-
accept a JSON _schema_ degrades to OpenAI's `json_object` response mode, and
|
|
12
|
-
that mode refuses the request outright — a hard API error, not a bad answer —
|
|
13
|
-
unless the literal word "json" appears somewhere in the prompt.
|
|
14
|
-
|
|
15
|
-
The word is therefore in the shared instruction block, once. All three call
|
|
16
|
-
sites (turn, approvals, verdict) build on that block, so one mention covers
|
|
17
|
-
them, and it costs nothing on providers that never needed telling.
|
|
18
|
-
|
|
19
|
-
**What this rules out:** tidying the instructions by removing a word that reads
|
|
20
|
-
as redundant. It is load-bearing for exactly one provider configuration, and its
|
|
21
|
-
absence fails the request rather than degrading the output — so the failure will
|
|
22
|
-
not look like a prompt problem.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The virtual user runtime is exported from @pikku/core/virtual-user, never from services
|
|
4
|
-
description: Those values reach the conversation and agent runners, which no production server runs — and an unbundled deploy loads whatever the import graph names
|
|
5
|
-
tags: core, services
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The virtual user runtime lives on `@pikku/core/virtual-user`
|
|
9
|
-
|
|
10
|
-
`HttpVirtualUser`, `createHttpVirtualUsers`, `readScenarioHttpResponse` and
|
|
11
|
-
`postScenarioJson` are exported from `@pikku/core/virtual-user`, not from
|
|
12
|
-
`@pikku/core/services`. Their _types_ are re-exported freely — TypeScript erases
|
|
13
|
-
those and they cost a bundle nothing.
|
|
14
|
-
|
|
15
|
-
The values are different. They reach `http-virtual-users`, which reaches the
|
|
16
|
-
conversation runner, which reaches the agent runner: an entire
|
|
17
|
-
scenario and virtual-user runtime that no production server executes. An
|
|
18
|
-
unbundled Node or Lambda deploy does no tree-shaking — it loads whatever the
|
|
19
|
-
import graph names — so exporting one value from the services barrel pulls all
|
|
20
|
-
of it into every application that imports a service.
|
|
21
|
-
|
|
22
|
-
This is enforced, not merely intended: `production-barrels-stay-lean.test.ts`
|
|
23
|
-
walks the value-import graph from `services/index.ts` and
|
|
24
|
-
`wirings/workflow/index.ts` and fails if any of those modules is reachable.
|
|
25
|
-
|
|
26
|
-
**What this rules out:** re-exporting a virtual user value from the services barrel
|
|
27
|
-
for convenience, and "just one small helper" — the graph is transitive, and one
|
|
28
|
-
value is enough to pull the whole runtime.
|
package/knowledge/decisions/internals/the-worker-disposition-is-the-one-that-is-not-testing.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The worker disposition is the only one not testing anything
|
|
4
|
-
description: It is doing the job, so it abandons rarely, runs cool, and is told to stop and say so rather than guess
|
|
5
|
-
tags: core, virtual-user
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The worker disposition is the only one not testing anything
|
|
9
|
-
|
|
10
|
-
Every other disposition exists to probe the product. The worker exists to _use_
|
|
11
|
-
it, which changes every parameter: it abandons rarely, runs at a low temperature,
|
|
12
|
-
and is instructed to stop and report rather than guess its way past an obstacle.
|
|
13
|
-
|
|
14
|
-
The failure mode being guarded against is different too. For the probing
|
|
15
|
-
dispositions the risk is a missed bug. For this one it is a wrong action nobody
|
|
16
|
-
asked for — a real mutation performed because the model improvised when it
|
|
17
|
-
should have stopped.
|
|
18
|
-
|
|
19
|
-
**What this rules out:** tuning this disposition toward the others for
|
|
20
|
-
consistency, in particular raising its temperature or its tolerance for
|
|
21
|
-
guessing. Those settings are what make the others useful and what would make this
|
|
22
|
-
one dangerous.
|
package/knowledge/decisions/internals/thread-history-records-the-transcript-not-the-audio.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: Thread history records what the model was asked, which for a spoken turn is the transcript
|
|
4
|
-
description: The wire carried a base64 audio blob; persisting it writes megabytes of unreadable data and loses the only readable record of the turn
|
|
5
|
-
tags: core, agent
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Thread history records the transcript, not the audio that arrived
|
|
9
|
-
|
|
10
|
-
What goes into thread history is what the model was actually asked. For a typed
|
|
11
|
-
turn that is what arrived over the wire. For a spoken turn it is not: the wire
|
|
12
|
-
carried a base64 audio blob, and `voiceInput` replaced it with a transcript
|
|
13
|
-
before the model ever saw it.
|
|
14
|
-
|
|
15
|
-
Persisting the blob would write megabytes of unreadable data into the history
|
|
16
|
-
_and_ discard the only readable record of what was said — the worst of both.
|
|
17
|
-
|
|
18
|
-
Both the streaming and non-streaming paths do this, and both check identity
|
|
19
|
-
rather than assuming: a middleware is free to rewrite the message list into
|
|
20
|
-
something with no relation to this turn, and in that case there is no transcript
|
|
21
|
-
to substitute and the list is persisted as-is.
|
|
22
|
-
|
|
23
|
-
**What this rules out:** persisting the inbound message verbatim on the grounds
|
|
24
|
-
that it is the ground truth. For voice it is the least useful representation
|
|
25
|
-
available, and the substitution is exactly what makes the history readable.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: Trigger declaration is split from trigger source
|
|
4
|
-
description: Triggers are declared everywhere but subscribed only in the trigger worker, so app processes never open the underlying subscription
|
|
5
|
-
tags: trigger
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Trigger declaration is split from trigger source
|
|
9
|
-
|
|
10
|
-
`wireTrigger` and `wireTriggerSource` in
|
|
11
|
-
`packages/core/src/wirings/trigger/trigger-runner.ts` are deliberately two
|
|
12
|
-
separate registrations for the same trigger name. `wireTrigger` declares the
|
|
13
|
-
trigger name and the target pikku function; it is meant to be loaded by every
|
|
14
|
-
process, because the inspector extracts it at build time and every runtime needs
|
|
15
|
-
the name-to-function mapping in `pikkuState(null, 'trigger', 'meta')`.
|
|
16
|
-
`wireTriggerSource` carries the actual subscription implementation
|
|
17
|
-
(`CorePikkuTriggerFunction`, which opens the connection and returns a teardown)
|
|
18
|
-
and is only imported by the trigger worker process.
|
|
19
|
-
|
|
20
|
-
The split exists because the subscription has side effects at import-and-setup
|
|
21
|
-
time — a Redis `subscribe`, a socket, a poller. If every API instance loaded the
|
|
22
|
-
source, every instance would open its own subscription and the trigger would fire
|
|
23
|
-
once per instance instead of once per event. Keeping the source out of the
|
|
24
|
-
general bundle also keeps the trigger's transport dependency out of runtimes that
|
|
25
|
-
never need it. `CoreTriggerSource.name` must therefore match a `wireTrigger`
|
|
26
|
-
name exactly; nothing in the type system enforces that, and a mismatch shows up
|
|
27
|
-
only at `setupTrigger` time as `Trigger source not found`.
|
|
28
|
-
|
|
29
|
-
**What this rules out:** merging `wireTrigger` and `wireTriggerSource` into one
|
|
30
|
-
registration call, re-exporting trigger sources from a package barrel that
|
|
31
|
-
application code imports, or "simplifying" by having `wireTrigger` accept the
|
|
32
|
-
subscription function directly. Any of these pulls the subscription into every
|
|
33
|
-
process and silently multiplies trigger firings by the instance count.
|
package/knowledge/decisions/internals/typed-secret-service-caches-for-the-process-lifetime.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: TypedSecretService caches for the process lifetime
|
|
4
|
-
description: Resolved secrets are cached with no TTL, so a secret rotated out of band is not picked up until restart — tracked as pikkujs/pikku#964
|
|
5
|
-
tags: services
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# TypedSecretService caches for the process lifetime
|
|
9
|
-
|
|
10
|
-
`TypedSecretService` (`packages/core/src/services/typed-secret-service.ts`) keeps
|
|
11
|
-
an in-process `Map` of resolved secrets so callers can read naively without
|
|
12
|
-
hitting the underlying secret service on every call. Only successful reads are
|
|
13
|
-
cached — a miss throws and is not stored, so the cache never memoises a negative
|
|
14
|
-
— and `setSecret` / `deleteSecret` invalidate the key they touch.
|
|
15
|
-
|
|
16
|
-
There is no TTL and no background refresh. One instance is created per
|
|
17
|
-
`createSingletonServices`, which in practice means once per process, so a secret
|
|
18
|
-
rotated out of band is not observed until the process restarts. That is a known
|
|
19
|
-
gap, tracked as pikkujs/pikku#964, not an oversight to rediscover.
|
|
20
|
-
|
|
21
|
-
**What this rules out:** assuming a rotation flow that writes to the secret
|
|
22
|
-
backend takes effect in a running instance — it does not; the deployment has to
|
|
23
|
-
cycle. It also means this cache is not a read-through cache in the usual sense,
|
|
24
|
-
so do not "fix" it by caching misses. Related: the cached values are plaintext
|
|
25
|
-
secrets held on the long-lived singleton services object, which is why a batch
|
|
26
|
-
`getSecrets([...everything])` should be avoided.
|
package/knowledge/decisions/internals/validate-checks-virtual-users-through-a-shared-module.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: Both validators check virtual users through one shared module, and a virtual user counts from either the meta or the source
|
|
4
|
-
description: workspace validate and cloud validate are separate implementations, so the virtual user/virtual-user/knowledge checks live in virtual-user-checks.ts and are called by both — and a virtual user is counted from the generated meta or a defineVirtualUsers() source scan, whichever answers first
|
|
5
|
-
tags: cli, validate, scenarios, virtual users
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Both validators check virtual users through one shared module, and a virtual user counts from either the meta or the source
|
|
9
|
-
|
|
10
|
-
`pikku workspace validate` and `pikku validate` read like one command
|
|
11
|
-
with a flag. They are not. They are two implementations that walk the same
|
|
12
|
-
project and duplicate about eighteen findings between them verbatim —
|
|
13
|
-
`functions-dir-missing` exists twice, character for character, in two files.
|
|
14
|
-
Pikku Studio Cloud adds the deploy-shaped checks (themes, frontends, the Cloudflare
|
|
15
|
-
adapter, the `.gitignore` contract); workspace adds the local-development ones
|
|
16
|
-
(`dev.db`, the auth migrations).
|
|
17
|
-
|
|
18
|
-
So a check written into either one is a check half the projects never run. An
|
|
19
|
-
app that never deploys through cloud only ever sees workspace validate; an app
|
|
20
|
-
that does sees cloud validate in CI. The virtual user checks are the kind that only
|
|
21
|
-
pay off when nobody remembers to ask for them, which means they had to be in
|
|
22
|
-
both. Rather than duplicate them a nineteenth time, they live in
|
|
23
|
-
`virtual-user-checks.ts` and both validators call `runVirtualUserChecks`. Merging the
|
|
24
|
-
two validators outright is the better fix and a much larger one; this does not
|
|
25
|
-
block it.
|
|
26
|
-
|
|
27
|
-
**A virtual user counts from either source, and either alone is wrong at a
|
|
28
|
-
predictable moment.** The generated `pikku-virtual-users-meta.gen.json` is empty on
|
|
29
|
-
a fresh clone where codegen has not run, so trusting only it means a warning
|
|
30
|
-
that fires on every new checkout — and a validator that cries wolf gets muted,
|
|
31
|
-
after which it never says anything worth hearing. A source scan for
|
|
32
|
-
`defineVirtualUsers(` cannot see virtual users an addon contributed. Declared by either
|
|
33
|
-
counts as declared.
|
|
34
|
-
|
|
35
|
-
**Everything here is `warn`, never `error`.** A project with no virtual users is
|
|
36
|
-
under-tested, not broken, and `validate` gating a deploy on it would make the
|
|
37
|
-
first thing anyone does with the check be to remove it. `knowledge-empty` stays
|
|
38
|
-
at the `info` the shared `@pikku/knowledge` package already assigned it rather
|
|
39
|
-
than being raised to match — the severity belongs to that package.
|
|
40
|
-
|
|
41
|
-
**What this rules out:** duplicating the checks into both validators;
|
|
42
|
-
adding them to only one; deriving the virtual user count from the generated meta
|
|
43
|
-
alone; failing a build over a missing virtual user.
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: pikku validate runs every applicable check, it does not detect a project kind
|
|
4
|
-
description: one `pikku validate` replaces `pikku workspace validate`; checks declare a precondition and run wherever it holds, because the repos that matter are an app and a pile of addons at the same time
|
|
5
|
-
tags: cli, validate, addons
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# pikku validate runs every applicable check, it does not detect a project kind
|
|
9
|
-
|
|
10
|
-
`pikku workspace validate` was named after one of the things a repo can be.
|
|
11
|
-
Adding a second — "is this addon publishable" — invited a second command,
|
|
12
|
-
`pikku addon validate`, and that is where the naming falls apart: the addons
|
|
13
|
-
repo is a workspace _containing_ 217 publishable addons. Standing at its root,
|
|
14
|
-
`pikku addon validate` would have to refuse or sweep every package, at which
|
|
15
|
-
point it is doing the workspace thing anyway. The two nouns were never
|
|
16
|
-
alternatives.
|
|
17
|
-
|
|
18
|
-
So there is one command, and it does not detect a kind and dispatch. Each check
|
|
19
|
-
declares the condition under which it means anything, and runs wherever that
|
|
20
|
-
condition holds:
|
|
21
|
-
|
|
22
|
-
- `app-project` — a `pikku.config.json` with no `types/application-types.d.ts`
|
|
23
|
-
beside it. The marker matters: an addon carries a `pikku.config.json` too, and
|
|
24
|
-
the app-shaped checks would report every app convention it has no reason to
|
|
25
|
-
follow, starting with a `packages/functions/` it will never have.
|
|
26
|
-
- `addon-package` — a non-private package that ships generated pikku output.
|
|
27
|
-
Having a `.pikku` directory is not enough on its own: an app's
|
|
28
|
-
`packages/functions` has one, and it is codegen for that app rather than
|
|
29
|
-
something anyone installs. The signal is a `files`/`exports` that carries it
|
|
30
|
-
into the tarball.
|
|
31
|
-
|
|
32
|
-
Detection-as-dispatch fails on the first repo that is two things at once.
|
|
33
|
-
Detection-as-precondition composes: the addons repo plans 217 addon checks and
|
|
34
|
-
no app check; the online-shop template plans one app check and no addon check;
|
|
35
|
-
a repo that is both plans both.
|
|
36
|
-
|
|
37
|
-
## Targets come from walking, not from `workspaces`
|
|
38
|
-
|
|
39
|
-
The field is an array in one repo and `{ packages: [...] }` in the next, spells
|
|
40
|
-
the same layout as `packages/**` or as six explicit globs, and a package that is
|
|
41
|
-
real but unlisted is exactly the kind of thing worth validating. So discovery
|
|
42
|
-
walks the tree for `package.json` files and lets the preconditions decide.
|
|
43
|
-
Over-collecting targets is free; guessing the glob dialect is not.
|
|
44
|
-
|
|
45
|
-
## A run that checked nothing must not print a tick
|
|
46
|
-
|
|
47
|
-
The failure mode of auto-detection is that finding nothing looks exactly like
|
|
48
|
-
finding everything and liking it. When no check applies, the renderer says so
|
|
49
|
-
and names what it looked for, rather than reporting success.
|
|
50
|
-
|
|
51
|
-
## The check the addon case exists for
|
|
52
|
-
|
|
53
|
-
Every relative import in a shipped generated file must resolve to a file that is
|
|
54
|
-
itself shipped — stated as a property, not as "the build script must copy
|
|
55
|
-
`types/`". The build script is not the only way to get this wrong and will not
|
|
56
|
-
always be a `cp`; the generated files already declare what they need.
|
|
57
|
-
|
|
58
|
-
That property was false in all 217 published addons. `cp -r .pikku dist/`
|
|
59
|
-
shipped the generated output but not the `types/application-types.d.ts` it
|
|
60
|
-
imports, and `tsc` never emits a hand-written `.d.ts` to `outDir`, so nothing
|
|
61
|
-
put it in `dist`. Consumers got 8 unresolved-module errors plus 6
|
|
62
|
-
`RequiredServices does not satisfy CoreSecretlessSingletonServices` follow-ons
|
|
63
|
-
inside `node_modules`, for merely depending on an addon. The scaffold template
|
|
64
|
-
had been right the whole time — `templates/function-addon` copies `types/` —
|
|
65
|
-
and the published packages had drifted from it with nothing watching.
|
|
66
|
-
|
|
67
|
-
## The check walks whichever generated directory a package ships
|
|
68
|
-
|
|
69
|
-
`dist/.pikku` is the target shape (below), but the check cannot assume it: the
|
|
70
|
-
shape is what this work moved addons _to_, and a package that has not moved —
|
|
71
|
-
or was published before it did — still carries `.pikku` at the root, listed in
|
|
72
|
-
`files` and mapped by `exports` as `./.pikku/*`. There it is a public entry
|
|
73
|
-
point rather than build input, and its imports climb one level fewer — to
|
|
74
|
-
`<pkg>/src` and `<pkg>/types` — where the copy under `dist` reaches
|
|
75
|
-
`<pkg>/dist/src` and `<pkg>/dist/types`. Two roots, two ways to fall outside
|
|
76
|
-
the tarball, so the check walks whichever ones are actually shipped rather than
|
|
77
|
-
the one it would prefer to find.
|
|
78
|
-
|
|
79
|
-
`exports` and `imports` get the same treatment one level up: a target outside
|
|
80
|
-
the published file set is the same defect, and the one the import walk cannot
|
|
81
|
-
see, because nothing inside `dist/.pikku` mentions it. That is how a `#pikku`
|
|
82
|
-
still pointing at `./.pikku/pikku-types.gen.ts` hides.
|
|
83
|
-
|
|
84
|
-
## An addon's entry points all resolve under dist
|
|
85
|
-
|
|
86
|
-
Everything an installed package reaches for lives under `dist`; the addon's own
|
|
87
|
-
build resolves `#pikku` through tsconfig `paths`, so nothing in `exports` or
|
|
88
|
-
`imports` has to point into the source tree, and `files` is just `["dist"]`.
|
|
89
|
-
The alternative — shipping `src/` and `types/` at the root so the existing paths
|
|
90
|
-
resolve as written — publishes TypeScript source and a second copy of
|
|
91
|
-
everything `dist` already has.
|
|
92
|
-
|
|
93
|
-
Checking only `dist` is what let the root `.pikku` stay broken through the first
|
|
94
|
-
round of fixes: in the published `@pikku/addon-assemblyai@0.1.4` tarball, `.pikku`
|
|
95
|
-
ships `.gen.ts` files importing a `../../src/` and `../types/` that the tarball
|
|
96
|
-
does not contain, and the `pikku-bootstrap.gen.js` that consumers import through
|
|
97
|
-
that subpath exists only under `dist`. Everything resolved locally through the
|
|
98
|
-
workspace link and none of it resolved on install.
|
|
99
|
-
|
|
100
|
-
## Only a package that publishes gets the dist shape
|
|
101
|
-
|
|
102
|
-
The shape describes a tarball, so it means nothing for a `private` package —
|
|
103
|
-
and applying it there actively breaks: `exports` _is_ enforced across a
|
|
104
|
-
workspace link, so repointing a private fixture at `dist` makes every consumer
|
|
105
|
-
demand a directory that only a build produces. The three `verifiers/db-schema`
|
|
106
|
-
and `verifiers/addon-registry` fixtures have no build script at all, so `dist`
|
|
107
|
-
never exists for them; the five `e2e/packages` addons build, but their metadata
|
|
108
|
-
is read straight from the source tree before any build has run. Repointing all
|
|
109
|
-
eight left the db-schema verifier unable to resolve
|
|
110
|
-
`dist/.pikku/db/pikku-db-meta.gen.json` and every e2e addon reporting "no
|
|
111
|
-
function metadata".
|
|
112
|
-
|
|
113
|
-
`isAddonPackage` already draws this line — it returns false for `private` — so
|
|
114
|
-
the checks and the shape agree: a package the registry never sees is consumed
|
|
115
|
-
from source.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: The conversation engine only sees a transport-agnostic target driver
|
|
4
|
-
description: The engine never imports the agent runner; the target is injected as run/approve, so scenarios exercise the real wire path
|
|
5
|
-
tags: virtual-user-conversation
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# The conversation engine only sees a transport-agnostic target driver
|
|
9
|
-
|
|
10
|
-
`runConversation` reaches the target agent exclusively through the injected
|
|
11
|
-
`TargetAgentDriver` — `run(message)` and `approve(runId, decisions)` — declared
|
|
12
|
-
in `packages/core/src/wirings/virtual-user/conversation/conversation.types.ts`. In production that
|
|
13
|
-
driver is HTTP-backed, issuing the virtual user's `agentRun` and `agentApprove` calls as
|
|
14
|
-
the signed-in virtual user.
|
|
15
|
-
|
|
16
|
-
Keeping the seam transport-agnostic is what makes the conversation a real test:
|
|
17
|
-
the agent is exercised through the same authenticated wire path a user takes,
|
|
18
|
-
including middleware, permissions and session handling, rather than through an
|
|
19
|
-
in-process call that skips all of it. It also lets the engine be unit-tested
|
|
20
|
-
against scripted targets with no server at all.
|
|
21
|
-
|
|
22
|
-
**What this rules out:** calling `runAgent` / `streamAgent` directly from the
|
|
23
|
-
conversation engine, and widening `TargetAgentDriver` with transport details
|
|
24
|
-
(headers, cookies, channels) that would tie the engine to HTTP.
|
package/knowledge/decisions/internals/virtual-user-conversation-verdicts-are-llm-self-evaluations.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: A conversation verdict is the virtual user's self-evaluation, not an assertion
|
|
4
|
-
description: The engine returns what the virtual user judged plus the transcript; deterministic checks stay with the caller
|
|
5
|
-
tags: virtual-user-conversation
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# A conversation verdict is the virtual user's self-evaluation, not an assertion
|
|
9
|
-
|
|
10
|
-
`runConversation` ends by asking the virtual user LLM whether the `evaluate`
|
|
11
|
-
criterion was met and returns that as `ConversationVerdict` — `passed`, `reasoning`
|
|
12
|
-
and the full `transcript`
|
|
13
|
-
(`packages/core/src/wirings/virtual-user/conversation/`). Nothing in the engine inspects the
|
|
14
|
-
system the agent acted on.
|
|
15
|
-
|
|
16
|
-
The verdict is deliberately soft because the thing it judges is soft: whether a
|
|
17
|
-
conversation accomplished a natural-language task. Deterministic checks — that a
|
|
18
|
-
row was written, that an email went out — belong to the caller, which already
|
|
19
|
-
holds the virtual user and can `virtualUser.invoke(...)` after the conversation returns. The
|
|
20
|
-
`reasoning` and `transcript` fields exist so a soft failure is debuggable rather
|
|
21
|
-
than merely red.
|
|
22
|
-
|
|
23
|
-
**What this rules out:** having `runConversation` assert or throw on a failed
|
|
24
|
-
verdict, and adding deterministic post-conditions to `ConverseOptions` instead of
|
|
25
|
-
running them at the call site.
|
package/knowledge/decisions/internals/virtual-user-conversations-seed-a-hidden-kickoff-message.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: A virtual user conversation starts from a seeded kickoff message
|
|
4
|
-
description: The virtual user's first turn needs a non-empty message list because providers reject an empty prompt; the seed is an instruction and stays out of the transcript
|
|
5
|
-
tags: virtual-user-conversation
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# A virtual user conversation starts from a seeded kickoff message
|
|
9
|
-
|
|
10
|
-
`runConversation` in
|
|
11
|
-
`packages/core/src/wirings/virtual-user/conversation/run-conversation.ts` primes
|
|
12
|
-
`virtualUserMessages` with a single user message telling the virtual user to begin, before
|
|
13
|
-
the first turn is generated.
|
|
14
|
-
|
|
15
|
-
The virtual user speaks first, so at that point there is nothing for it to reply to —
|
|
16
|
-
and LLM providers reject a completion request with no messages. The seed is
|
|
17
|
-
addressed to the virtual user rather than to the target agent, which is why it is never
|
|
18
|
-
pushed onto `transcript`: it is scaffolding, not something the simulated user
|
|
19
|
-
said, and including it would corrupt the transcript the final evaluation reads.
|
|
20
|
-
|
|
21
|
-
**What this rules out:** starting from an empty `virtualUserMessages` array, folding
|
|
22
|
-
the kickoff into the virtual user instructions where a provider may weight it
|
|
23
|
-
differently, and pushing the seed into the transcript for symmetry.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: decision
|
|
3
|
-
title: A scenario's step order for a virtual user is insertion order, not a graph traversal
|
|
4
|
-
description: The CLI writes nodes in declaration order, so following `next` would buy an ordering that is already true and cost a traversal that has to interpret branches
|
|
5
|
-
tags: core, virtual-user
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Step order comes from insertion order, not a graph traversal
|
|
9
|
-
|
|
10
|
-
When a scenario becomes catalogue entries, its steps are read in the order the
|
|
11
|
-
nodes appear — which is the order the CLI wrote them, which is the order the
|
|
12
|
-
scenario declares them.
|
|
13
|
-
|
|
14
|
-
Following `next` edges instead would produce the same ordering in the ordinary
|
|
15
|
-
case, and in the branching case it would force a decision nobody needs: which
|
|
16
|
-
arm of a branch to present to a reader who will never take one. The traversal
|
|
17
|
-
costs work to reproduce a fact that already holds.
|
|
18
|
-
|
|
19
|
-
**What this rules out:** "correcting" this to a topological walk because a graph
|
|
20
|
-
is present. The graph describes execution; the catalogue describes what the
|
|
21
|
-
scenario _says_, and those are read in declaration order.
|