@hotmeshio/long-tail 0.28.0 → 0.28.1

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.
Files changed (88) hide show
  1. package/build/api/files.d.ts +5 -0
  2. package/build/api/files.js +19 -2
  3. package/build/api/knowledge.d.ts +3 -1
  4. package/build/lib/db/schemas/042_knowledge_edition_labels.sql +9 -0
  5. package/build/lib/machines/line.d.ts +3 -0
  6. package/build/lib/machines/line.js +7 -1
  7. package/build/lib/machines/protocol/codec.d.ts +6 -0
  8. package/build/lib/machines/protocol/codec.js +1 -1
  9. package/build/lib/machines/protocol/contract.d.ts +2 -0
  10. package/build/lib/machines/protocol/contract.js +12 -7
  11. package/build/lib/machines/site/mosquitto-conf.d.ts +7 -3
  12. package/build/lib/machines/site/mosquitto-conf.js +3 -8
  13. package/build/lib/machines/site/site-conf.d.ts +4 -1
  14. package/build/lib/machines/site/site-conf.js +5 -1
  15. package/build/lib/machines/transport/nats-bus.d.ts +2 -0
  16. package/build/lib/machines/transport/stream-bus.d.ts +5 -1
  17. package/build/lib/machines/transport/stream-bus.js +12 -4
  18. package/build/lib/machines/transport/streams.d.ts +10 -2
  19. package/build/lib/machines/transport/streams.js +32 -5
  20. package/build/lib/messaging/memory.js +3 -0
  21. package/build/lib/messaging/nats/streams.d.ts +3 -0
  22. package/build/lib/messaging/nats/streams.js +16 -0
  23. package/build/lib/storage/local.d.ts +2 -0
  24. package/build/lib/storage/local.js +3 -0
  25. package/build/lib/storage/s3.d.ts +3 -2
  26. package/build/lib/storage/s3.js +6 -1
  27. package/build/lib/storage/types.d.ts +7 -1
  28. package/build/routes/file-browser.js +3 -1
  29. package/build/routes/knowledge.js +6 -5
  30. package/build/routes/machines.js +33 -0
  31. package/build/services/knowledge/index.d.ts +4 -2
  32. package/build/services/knowledge/index.js +8 -2
  33. package/build/services/knowledge/lookup-cache.d.ts +8 -0
  34. package/build/services/knowledge/lookup-cache.js +30 -3
  35. package/build/services/knowledge/lookup-refs.js +1 -1
  36. package/build/services/knowledge/sql.d.ts +4 -2
  37. package/build/services/knowledge/sql.js +8 -3
  38. package/build/services/machines/config.d.ts +2 -0
  39. package/build/services/machines/config.js +1 -0
  40. package/build/services/machines/contracts.d.ts +18 -0
  41. package/build/services/machines/contracts.js +15 -1
  42. package/build/services/machines/forms.d.ts +26 -1
  43. package/build/services/machines/forms.js +17 -1
  44. package/build/services/machines/gateway/actions.d.ts +13 -1
  45. package/build/services/machines/gateway/admission.d.ts +15 -1
  46. package/build/services/machines/gateway/admission.js +47 -0
  47. package/build/services/machines/gateway/api-escalations.js +4 -0
  48. package/build/services/machines/gateway/dispatcher.d.ts +9 -4
  49. package/build/services/machines/gateway/dispatcher.js +42 -14
  50. package/build/services/machines/gateway/executor.d.ts +2 -0
  51. package/build/services/machines/gateway/executor.js +18 -2
  52. package/build/services/machines/gateway/gateway.d.ts +5 -0
  53. package/build/services/machines/gateway/gateway.js +11 -3
  54. package/build/services/machines/gateway/log.d.ts +2 -0
  55. package/build/services/machines/gateway/log.js +2 -0
  56. package/build/services/machines/gateway/lt-http.js +11 -2
  57. package/build/services/machines/gateway/pacing.js +1 -1
  58. package/build/services/machines/gateway/plan-machine.js +26 -11
  59. package/build/services/machines/gateway/plan-shared.d.ts +5 -3
  60. package/build/services/machines/gateway/plan-shared.js +6 -4
  61. package/build/services/machines/gateway/reply-waiter.d.ts +2 -0
  62. package/build/services/machines/gateway/state.d.ts +24 -1
  63. package/build/services/machines/gateway/state.js +67 -6
  64. package/build/services/machines/gateway/wire-window.d.ts +21 -0
  65. package/build/services/machines/gateway/wire-window.js +61 -0
  66. package/build/services/machines/gateway/wire.js +1 -0
  67. package/build/services/machines/roles.d.ts +5 -4
  68. package/build/services/machines/roles.js +13 -4
  69. package/build/services/machines/select.d.ts +3 -2
  70. package/build/services/machines/select.js +4 -3
  71. package/build/services/machines/surface.d.ts +10 -1
  72. package/build/services/machines/surface.js +20 -4
  73. package/build/system/activities/knowledge.d.ts +4 -0
  74. package/build/system/activities/knowledge.js +15 -0
  75. package/build/system/activities/sql.d.ts +2 -0
  76. package/build/system/activities/sql.js +6 -1
  77. package/build/system/mcp-servers/knowledge.js +4 -2
  78. package/build/tsconfig.tsbuildinfo +1 -1
  79. package/build/types/escalation.d.ts +9 -6
  80. package/build/types/escalation.js +8 -2
  81. package/build/types/machines-view.d.ts +16 -0
  82. package/build/types/machines.d.ts +1 -0
  83. package/build/types/messaging.d.ts +2 -0
  84. package/build/types/startup.d.ts +2 -0
  85. package/docs/dashboard.md +1 -1
  86. package/docs/hitl/lookups.md +6 -4
  87. package/docs/machines.md +25 -16
  88. package/package.json +1 -1
@@ -1 +1 @@
1
- {"root":["../index.ts","../vitest.config.ts","../vitest.fast.config.ts","../vitest.integration.config.ts","../vitest.llm.config.ts","../adapters/express.ts","../api/agent-subscriptions.ts","../api/agents.ts","../api/announcements.ts","../api/auth-sso.ts","../api/auth.ts","../api/bot-accounts.ts","../api/capabilities.ts","../api/controlplane.ts","../api/dba.ts","../api/diagnostics.ts","../api/domain.ts","../api/exports.ts","../api/files.ts","../api/index.ts","../api/insight.ts","../api/knowledge.ts","../api/maintenance.ts","../api/me.ts","../api/namespaces.ts","../api/overview.ts","../api/personas.ts","../api/pipelines.ts","../api/roles.ts","../api/settings.ts","../api/tasks.ts","../api/topics.ts","../api/users.ts","../api/workflow-sets.ts","../api/escalations/accumulate.ts","../api/escalations/analytics.ts","../api/escalations/batch-flag.ts","../api/escalations/bulk.ts","../api/escalations/cancel.ts","../api/escalations/claim.ts","../api/escalations/create.ts","../api/escalations/facets.ts","../api/escalations/helpers.ts","../api/escalations/index.ts","../api/escalations/list.ts","../api/escalations/lookups.ts","../api/escalations/metadata.ts","../api/escalations/related.ts","../api/escalations/resolve-batch.ts","../api/escalations/resolve.ts","../api/escalations/roster-action.ts","../api/escalations/single.ts","../api/mcp/index.ts","../api/mcp/servers.ts","../api/mcp/tools.ts","../api/scan-codes/badge-policy.ts","../api/scan-codes/choice-roles.ts","../api/scan-codes/choice.ts","../api/scan-codes/config.ts","../api/scan-codes/context.ts","../api/scan-codes/execute.ts","../api/scan-codes/fill-labels.ts","../api/scan-codes/grant.ts","../api/scan-codes/hold.ts","../api/scan-codes/identity.ts","../api/scan-codes/index.ts","../api/scan-codes/locate.ts","../api/scan-codes/present.ts","../api/scan-codes/subject.ts","../api/scan-codes/verb-accumulate.ts","../api/scan-codes/verb-fill.ts","../api/scan-codes/verb-into-subject.ts","../api/scan-codes/verbs-subject.ts","../api/scan-codes/verbs.ts","../api/workflows/config.ts","../api/workflows/discovery.ts","../api/workflows/index.ts","../api/workflows/input-lookups.ts","../api/workflows/input-validation.ts","../api/workflows/invocable.ts","../api/workflows/invocation.ts","../api/yaml-workflows/cron.ts","../api/yaml-workflows/crud.ts","../api/yaml-workflows/deploy.ts","../api/yaml-workflows/helpers.ts","../api/yaml-workflows/index.ts","../api/yaml-workflows/versions.ts","../bin/ltc.ts","../lib/typed-resolution.ts","../lib/uuid.ts","../lib/cli/auth.ts","../lib/cli/client.ts","../lib/cli/compile.ts","../lib/cli/format.ts","../lib/cli/init.ts","../lib/cli/output.ts","../lib/cli/scanner.ts","../lib/cli/types.ts","../lib/cli/commands/escalations.ts","../lib/cli/commands/knowledge.ts","../lib/cli/commands/mcp.ts","../lib/cli/commands/personas.ts","../lib/cli/commands/pipelines.ts","../lib/cli/commands/roles.ts","../lib/cli/commands/status.ts","../lib/cli/commands/streams.ts","../lib/cli/commands/users.ts","../lib/cli/commands/workflows.ts","../lib/db/config-lock.ts","../lib/db/index.ts","../lib/db/migrate.ts","../lib/events/browser-view.ts","../lib/events/callback.ts","../lib/events/escalation-wire.ts","../lib/events/index.ts","../lib/events/matching.ts","../lib/events/memory.ts","../lib/events/nats-ws-filter.ts","../lib/events/nats-ws-proxy.ts","../lib/events/nats-ws-server-filter.ts","../lib/events/nats-ws-ticket.ts","../lib/events/nats.ts","../lib/events/publish.ts","../lib/events/socketio.ts","../lib/events/system-events.ts","../lib/http/index.ts","../lib/json-path/pick.ts","../lib/logger/index.ts","../lib/logger/pino.ts","../lib/machines/index.ts","../lib/machines/line.ts","../lib/machines/protocol/codec.ts","../lib/machines/protocol/constants.ts","../lib/machines/protocol/contract.ts","../lib/machines/protocol/envelope.ts","../lib/machines/protocol/index.ts","../lib/machines/protocol/topics.ts","../lib/machines/site/edge-account.ts","../lib/machines/site/mosquitto-conf.ts","../lib/machines/site/site-conf.ts","../lib/machines/transport/callback-feed.ts","../lib/machines/transport/delivery.ts","../lib/machines/transport/index.ts","../lib/machines/transport/memory-broker.ts","../lib/machines/transport/memory.ts","../lib/machines/transport/mqtt-bus.ts","../lib/machines/transport/mqtt-link.ts","../lib/machines/transport/mqtt-session.ts","../lib/machines/transport/nats-bus.ts","../lib/machines/transport/nats-feed.ts","../lib/machines/transport/pubsub-feed.ts","../lib/machines/transport/serial.ts","../lib/machines/transport/stream-bus.ts","../lib/machines/transport/streams.ts","../lib/messaging/config.ts","../lib/messaging/constants.ts","../lib/messaging/index.ts","../lib/messaging/memory.ts","../lib/messaging/subjects.ts","../lib/messaging/nats/permissions.ts","../lib/messaging/nats/provider.ts","../lib/messaging/nats/render-conf.ts","../lib/messaging/nats/streams.ts","../lib/storage/index.ts","../lib/storage/local.ts","../lib/storage/mime.ts","../lib/storage/s3.ts","../lib/storage/types.ts","../lib/telemetry/honeycomb.ts","../lib/telemetry/index.ts","../modules/auth.ts","../modules/branding.ts","../modules/capabilities.ts","../modules/config.ts","../modules/defaults.ts","../modules/display.ts","../modules/features.ts","../modules/ltconfig.ts","../modules/machines.ts","../modules/maintenance.ts","../modules/mcp-auth.ts","../modules/oauth-server.ts","../modules/search.ts","../modules/sso.ts","../modules/utils.ts","../modules/version.ts","../routes/agents.ts","../routes/announcements.ts","../routes/auth-sso.ts","../routes/auth.ts","../routes/bot-accounts.ts","../routes/capabilities.ts","../routes/controlplane.ts","../routes/dba.ts","../routes/delegation.ts","../routes/diagnostics.ts","../routes/docs.ts","../routes/domain.ts","../routes/exports.ts","../routes/file-browser.ts","../routes/files.ts","../routes/index.ts","../routes/insight.ts","../routes/knowledge.ts","../routes/machines.ts","../routes/maintenance.ts","../routes/mcp-endpoint.ts","../routes/mcp.ts","../routes/me.ts","../routes/namespaces.ts","../routes/nats-credentials.ts","../routes/oauth-well-known.ts","../routes/oauth.ts","../routes/overview.ts","../routes/personas.ts","../routes/pipelines.ts","../routes/roles.ts","../routes/scan-codes.ts","../routes/settings.ts","../routes/tasks.ts","../routes/topics.ts","../routes/users.ts","../routes/workflow-sets.ts","../routes/escalations/accumulate.ts","../routes/escalations/acting.ts","../routes/escalations/analytics.ts","../routes/escalations/bulk.ts","../routes/escalations/facets.ts","../routes/escalations/index.ts","../routes/escalations/list.ts","../routes/escalations/metadata.ts","../routes/escalations/related.ts","../routes/escalations/resolve.ts","../routes/escalations/single.ts","../routes/oauth-server/authorize.ts","../routes/oauth-server/grants.ts","../routes/oauth-server/index.ts","../routes/oauth-server/registration.ts","../routes/oauth-server/token.ts","../routes/workflows/config.ts","../routes/workflows/discovery.ts","../routes/workflows/index.ts","../routes/workflows/invocation.ts","../routes/yaml-workflows/cron.ts","../routes/yaml-workflows/crud.ts","../routes/yaml-workflows/deployment.ts","../routes/yaml-workflows/index.ts","../routes/yaml-workflows/versions.ts","../scripts/bambu-boat.ts","../scripts/bambu-print.ts","../scripts/consolidation-sim.ts","../scripts/machine-line.ts","../scripts/ortho-populate.ts","../scripts/printer-cycle.ts","../scripts/process-helpers.ts","../scripts/process.ts","../scripts/token.ts","../scripts/twin-farm.ts","../sdk/index.ts","../services/dba.ts","../services/hotmesh-utils.ts","../services/invocation-access.ts","../services/workflow-invocation.ts","../services/workflow-state.ts","../services/agent/authority.ts","../services/agent/index.ts","../services/agent/input-mapper.ts","../services/agent/sql.ts","../services/agent/subscription-sql.ts","../services/agent/subscriptions.ts","../services/agent/trigger-registry.ts","../services/announcement/index.ts","../services/announcement/sql.ts","../services/auth/bot-api-key.ts","../services/auth/delegation.ts","../services/auth/index.ts","../services/auth/service-token.ts","../services/auth/sql.ts","../services/auth/oauth-server/access-token.ts","../services/auth/oauth-server/authorization.ts","../services/auth/oauth-server/constants.ts","../services/auth/oauth-server/index.ts","../services/auth/oauth-server/metadata.ts","../services/auth/oauth-server/registration.ts","../services/auth/oauth-server/sql.ts","../services/auth/oauth-server/store.ts","../services/config/cache.ts","../services/config/index.ts","../services/config/provider.ts","../services/config/read.ts","../services/config/sql.ts","../services/config/write.ts","../services/controlplane/index.ts","../services/controlplane/quorum-bridge.ts","../services/controlplane/sql.ts","../services/controlplane/stream-messages-sql.ts","../services/controlplane/types.ts","../services/cron/index.ts","../services/diagnostics/index.ts","../services/diagnostics/patterns.ts","../services/domain/index.ts","../services/domain/read.ts","../services/domain/seed.ts","../services/domain/sql.ts","../services/domain/validate.ts","../services/domain/write.ts","../services/escalation/accumulate.ts","../services/escalation/aggregate-sql.ts","../services/escalation/aggregate-validate.ts","../services/escalation/aggregates.ts","../services/escalation/batch-flag.ts","../services/escalation/batch.ts","../services/escalation/bulk.ts","../services/escalation/claim-asserted.ts","../services/escalation/client.ts","../services/escalation/crud.ts","../services/escalation/facet-sql.ts","../services/escalation/facets.ts","../services/escalation/grouped-list.ts","../services/escalation/index.ts","../services/escalation/map.ts","../services/escalation/metrics-cache.ts","../services/escalation/queries.ts","../services/escalation/read-scope-sql.ts","../services/escalation/related-extremes.ts","../services/escalation/related.ts","../services/escalation/resolver-validation.ts","../services/escalation/roster.ts","../services/escalation/sql.ts","../services/escalation/submit-guard.ts","../services/escalation/types.ts","../services/escalation-strategy/default.ts","../services/escalation-strategy/index.ts","../services/escalation-strategy/mcp.ts","../services/export/client.ts","../services/export/index.ts","../services/export/post-process.ts","../services/export/types.ts","../services/iam/acting-identity.ts","../services/iam/activity.ts","../services/iam/bots.ts","../services/iam/context.ts","../services/iam/credentials.ts","../services/iam/envelope.ts","../services/iam/ephemeral.ts","../services/iam/index.ts","../services/iam/principal.ts","../services/iam/resolve.ts","../services/iam/sql.ts","../services/insight/index.ts","../services/insight/prompts.ts","../services/interceptor/activity-interceptor.ts","../services/interceptor/completion.ts","../services/interceptor/context.ts","../services/interceptor/escalation.ts","../services/interceptor/index.ts","../services/interceptor/lifecycle.ts","../services/interceptor/state.ts","../services/interceptor/types.ts","../services/interceptor/activities/config.ts","../services/interceptor/activities/escalation.ts","../services/interceptor/activities/index.ts","../services/interceptor/activities/task.ts","../services/interceptor/activities/workflow.ts","../services/knowledge/index.ts","../services/knowledge/lookup-cache.ts","../services/knowledge/lookup-refs.ts","../services/knowledge/sql.ts","../services/llm/detect.ts","../services/llm/index.ts","../services/llm/translate.ts","../services/llm/types.ts","../services/llm/providers/anthropic.ts","../services/llm/providers/openai.ts","../services/machines/commands.ts","../services/machines/config.ts","../services/machines/contracts.ts","../services/machines/forms.ts","../services/machines/identities.ts","../services/machines/index.ts","../services/machines/leadership.ts","../services/machines/line-index.ts","../services/machines/registry-sql.ts","../services/machines/registry-sync.ts","../services/machines/registry.ts","../services/machines/roles.ts","../services/machines/rows.ts","../services/machines/select.ts","../services/machines/surface.ts","../services/machines/gateway/actions.ts","../services/machines/gateway/address-book.ts","../services/machines/gateway/admission.ts","../services/machines/gateway/api-escalations.ts","../services/machines/gateway/dispatcher.ts","../services/machines/gateway/escalations.ts","../services/machines/gateway/executor.ts","../services/machines/gateway/gateway.ts","../services/machines/gateway/index.ts","../services/machines/gateway/inspect.ts","../services/machines/gateway/jobs.ts","../services/machines/gateway/lifecycle.ts","../services/machines/gateway/log.ts","../services/machines/gateway/lt-http.ts","../services/machines/gateway/pacing.ts","../services/machines/gateway/plan-escalation.ts","../services/machines/gateway/plan-machine.ts","../services/machines/gateway/plan-shared.ts","../services/machines/gateway/project.ts","../services/machines/gateway/provision.ts","../services/machines/gateway/receipts.ts","../services/machines/gateway/reconcile.ts","../services/machines/gateway/registration.ts","../services/machines/gateway/reply-waiter.ts","../services/machines/gateway/state.ts","../services/machines/gateway/trace.ts","../services/machines/gateway/wire.ts","../services/machines/testing/fake-long-tail.ts","../services/machines/testing/index.ts","../services/machines/testing/recording-log.ts","../services/machines/testing/wait.ts","../services/maintenance/index.ts","../services/mcp/adapter.ts","../services/mcp/db.ts","../services/mcp/exposure.ts","../services/mcp/external-server.ts","../services/mcp/index.ts","../services/mcp/register-tool.ts","../services/mcp/registered-tools.ts","../services/mcp/seed-service-account.ts","../services/mcp/server-lifecycle.ts","../services/mcp/server-tools.ts","../services/mcp/server.ts","../services/mcp/sql.ts","../services/mcp/types.ts","../services/mcp/workflow-compiler-server.ts","../services/mcp/workflow-server.ts","../services/mcp/client/connection-dispatch.ts","../services/mcp/client/connection-lifecycle.ts","../services/mcp/client/connection-test.ts","../services/mcp/client/connection.ts","../services/mcp/client/index.ts","../services/mcp/client/network-transport.ts","../services/mcp/client/tools.ts","../services/mcp/db-server/index.ts","../services/mcp/db-server/schemas.ts","../services/mcp/db-server/tools.ts","../services/mcp/playwright-server/index.ts","../services/mcp/playwright-server/lifecycle.ts","../services/mcp/playwright-server/schemas.ts","../services/mcp/playwright-server/tools.ts","../services/namespace/index.ts","../services/namespace/sql.ts","../services/namespace/types.ts","../services/oauth/crypto.ts","../services/oauth/db.ts","../services/oauth/index.ts","../services/oauth/sql.ts","../services/oauth/state.ts","../services/oauth/providers/anthropic.ts","../services/oauth/providers/github.ts","../services/oauth/providers/google.ts","../services/oauth/providers/index.ts","../services/oauth/providers/microsoft.ts","../services/oauth/providers/mock.ts","../services/oauth/providers/registry.ts","../services/oauth/providers/types.ts","../services/orchestrator/condition.ts","../services/orchestrator/index.ts","../services/orchestrator/types.ts","../services/overview/index.ts","../services/overview/sql.ts","../services/persona/index.ts","../services/persona/sql.ts","../services/persona/types.ts","../services/pipelines/enrichment.ts","../services/pipelines/events.ts","../services/pipelines/execution-builder.ts","../services/pipelines/index.ts","../services/pipelines/queries.ts","../services/pipelines/sql.ts","../services/pipelines/types.ts","../services/role/badge-grant.ts","../services/role/enforcement-cache.ts","../services/role/index.ts","../services/role/schema-validator.ts","../services/role/seed.ts","../services/role/sql.ts","../services/role/types.ts","../services/scan-code/index.ts","../services/scan-code/parse.ts","../services/scan-code/read.ts","../services/scan-code/sql.ts","../services/scan-code/validate-facts.ts","../services/scan-code/validate-query.ts","../services/scan-code/validate-subject.ts","../services/scan-code/validate.ts","../services/scan-code/write.ts","../services/task/crud.ts","../services/task/index.ts","../services/task/process.ts","../services/task/resolve.ts","../services/task/sql.ts","../services/task/types.ts","../services/topics/index.ts","../services/topics/sql.ts","../services/topics/system-topics.ts","../services/user/auth.ts","../services/user/crud.ts","../services/user/index.ts","../services/user/preferences.ts","../services/user/rbac.ts","../services/user/roles.ts","../services/user/scope.ts","../services/user/seed-admin.ts","../services/user/sql.ts","../services/user/sso-provision.ts","../services/user/types.ts","../services/workers/registry.ts","../services/workflow-sets/db.ts","../services/workflow-sets/index.ts","../services/workflow-sets/sql.ts","../services/yaml-workflow/builder-regenerate.ts","../services/yaml-workflow/db-utils.ts","../services/yaml-workflow/db-versions.ts","../services/yaml-workflow/db.ts","../services/yaml-workflow/deployer-helpers.ts","../services/yaml-workflow/deployer.ts","../services/yaml-workflow/generator.ts","../services/yaml-workflow/index.ts","../services/yaml-workflow/input-analyzer-helpers.ts","../services/yaml-workflow/input-analyzer.ts","../services/yaml-workflow/invoke.ts","../services/yaml-workflow/pipe-validator.ts","../services/yaml-workflow/sql.ts","../services/yaml-workflow/types.ts","../services/yaml-workflow/durable-compiler/index.ts","../services/yaml-workflow/durable-compiler/parser.ts","../services/yaml-workflow/durable-compiler/prompts.ts","../services/yaml-workflow/durable-compiler/types.ts","../services/yaml-workflow/pattern-detector/array-source.ts","../services/yaml-workflow/pattern-detector/collapse.ts","../services/yaml-workflow/pattern-detector/index.ts","../services/yaml-workflow/pattern-detector/run-detection.ts","../services/yaml-workflow/pattern-detector/types.ts","../services/yaml-workflow/pipeline/analyze.ts","../services/yaml-workflow/pipeline/extract-helpers.ts","../services/yaml-workflow/pipeline/extract.ts","../services/yaml-workflow/pipeline/index.ts","../services/yaml-workflow/pipeline/prompt-templates.ts","../services/yaml-workflow/pipeline/prompts.ts","../services/yaml-workflow/pipeline/validate.ts","../services/yaml-workflow/pipeline/build/dag-assembly.ts","../services/yaml-workflow/pipeline/build/dag.ts","../services/yaml-workflow/pipeline/build/index.ts","../services/yaml-workflow/pipeline/build/iteration.ts","../services/yaml-workflow/pipeline/build/metadata.ts","../services/yaml-workflow/pipeline/build/transform.ts","../services/yaml-workflow/pipeline/build/utils.ts","../services/yaml-workflow/pipeline/build/wiring.ts","../services/yaml-workflow/pipeline/compile/index.ts","../services/yaml-workflow/pipeline/compile/llm-call.ts","../services/yaml-workflow/pipeline/compile/parse-plan.ts","../services/yaml-workflow/pipeline/compile/summarize.ts","../services/yaml-workflow/workers/callbacks.ts","../services/yaml-workflow/workers/events.ts","../services/yaml-workflow/workers/index.ts","../services/yaml-workflow/workers/register.ts","../services/yaml-workflow/workers/scope.ts","../services/yaml-workflow/workers/step-tool.ts","../shared/workflow-state.ts","../shared/form-validation/ctx-path.ts","../shared/form-validation/derive-field-label.ts","../shared/form-validation/display-only-widgets.ts","../shared/form-validation/field-validator.ts","../shared/form-validation/index.ts","../shared/form-validation/invoke-context.ts","../shared/form-validation/validate-resolver-payload.ts","../shared/form-validation/x-lt-actions.ts","../shared/form-validation/x-lt-bind.ts","../shared/form-validation/x-lt-help.ts","../shared/form-validation/x-lt-invoke.ts","../shared/form-validation/x-lt-labels.ts","../shared/form-validation/x-lt-options.ts","../shared/form-validation/x-lt-query.ts","../shared/form-validation/x-lt-require-any.ts","../shared/form-validation/x-lt-require-sum.ts","../shared/form-validation/x-lt-roster.ts","../shared/form-validation/x-lt-scan.ts","../shared/form-validation/x-lt-show-if.ts","../shared/form-validation/x-lt-submit-guard.ts","../shared/form-validation/x-lt-submit-on-claim.ts","../shared/form-validation/x-lt-transition.ts","../shared/list-schema/aggregate.ts","../shared/list-schema/index.ts","../shared/list-schema/template.ts","../shared/list-schema/types.ts","../shared/list-schema/validate.ts","../shared/roles/segment.ts","../shared/scan-code/gtin.ts","../shared/scan-code/index.ts","../shared/scan-code/parse.ts","../start/adapters.ts","../start/apply-report.ts","../start/config.ts","../start/graph-workflows.ts","../start/index.ts","../start/server.ts","../start/socket-auth.ts","../start/workers.ts","../system/index.ts","../system/activities/claude-code.ts","../system/activities/file-storage.ts","../system/activities/http.ts","../system/activities/knowledge.ts","../system/activities/oauth.ts","../system/activities/schema-exchange.ts","../system/activities/sql.ts","../system/activities/triage/cache.ts","../system/activities/triage/context.ts","../system/activities/triage/discovery.ts","../system/activities/triage/index.ts","../system/activities/triage/llm.ts","../system/activities/triage/tools.ts","../system/mcp-servers/caller-auth.ts","../system/mcp-servers/claude-code.ts","../system/mcp-servers/docs.ts","../system/mcp-servers/events.ts","../system/mcp-servers/file-storage.ts","../system/mcp-servers/http-fetch.ts","../system/mcp-servers/human-queue-schemas.ts","../system/mcp-servers/human-queue.ts","../system/mcp-servers/knowledge.ts","../system/mcp-servers/machines-schemas.ts","../system/mcp-servers/machines.ts","../system/mcp-servers/oauth.ts","../system/mcp-servers/schema-exchange.ts","../system/mcp-servers/translation.ts","../system/mcp-servers/vision-prompts.ts","../system/mcp-servers/vision.ts","../system/mcp-servers/workflow-compiler.ts","../system/mcp-servers/workflow.ts","../system/mcp-servers/admin/agent-subscriptions.ts","../system/mcp-servers/admin/agents.ts","../system/mcp-servers/admin/announcements.ts","../system/mcp-servers/admin/bot-accounts.ts","../system/mcp-servers/admin/controlplane.ts","../system/mcp-servers/admin/diagnostics.ts","../system/mcp-servers/admin/domain-context.ts","../system/mcp-servers/admin/escalations.ts","../system/mcp-servers/admin/exports.ts","../system/mcp-servers/admin/index.ts","../system/mcp-servers/admin/maintenance.ts","../system/mcp-servers/admin/mcp-servers.ts","../system/mcp-servers/admin/overview.ts","../system/mcp-servers/admin/personas.ts","../system/mcp-servers/admin/pipelines.ts","../system/mcp-servers/admin/run-read.ts","../system/mcp-servers/admin/scan-codes.ts","../system/mcp-servers/admin/schemas.ts","../system/mcp-servers/admin/settings.ts","../system/mcp-servers/admin/tasks.ts","../system/mcp-servers/admin/topics.ts","../system/mcp-servers/admin/users.ts","../system/mcp-servers/admin/workflow-config.ts","../system/mcp-servers/admin/workflows.ts","../system/mcp-servers/admin/yaml-workflows.ts","../system/mcp-servers/db-query/index.ts","../system/mcp-servers/db-query/schemas.ts","../system/mcp-servers/db-query/tools.ts","../system/seed/index.ts","../system/seed/tool-manifests-admin.ts","../system/seed/tool-manifests-data.ts","../system/seed/tool-manifests-escalation.ts","../system/seed/tool-manifests-events.ts","../system/seed/tool-manifests-knowledge.ts","../system/seed/tool-manifests-machines.ts","../system/seed/tool-manifests-workflows.ts","../system/workflows/tool-result-guard.ts","../system/workflows/capability-invoke/activities.ts","../system/workflows/capability-invoke/index.ts","../system/workflows/mcp-deterministic/activities.ts","../system/workflows/mcp-deterministic/index.ts","../system/workflows/mcp-query/index.ts","../system/workflows/mcp-query/prompts.ts","../system/workflows/mcp-query/strategy-advisors.ts","../system/workflows/mcp-query/types.ts","../system/workflows/mcp-query/activities/caches.ts","../system/workflows/mcp-query/activities/discovery.ts","../system/workflows/mcp-query/activities/index.ts","../system/workflows/mcp-query/activities/llm.ts","../system/workflows/mcp-query/activities/tool-executor.ts","../system/workflows/mcp-query/activities/tool-loader.ts","../system/workflows/mcp-query-router/activities.ts","../system/workflows/mcp-query-router/index.ts","../system/workflows/mcp-query-router/prompts.ts","../system/workflows/mcp-triage/activities-proxy.ts","../system/workflows/mcp-triage/index.ts","../system/workflows/mcp-triage/prompts.ts","../system/workflows/mcp-triage/response-builders.ts","../system/workflows/mcp-triage/response.ts","../system/workflows/mcp-triage/types.ts","../system/workflows/mcp-triage-deterministic/activities.ts","../system/workflows/mcp-triage-deterministic/index.ts","../system/workflows/mcp-triage-router/activities.ts","../system/workflows/mcp-triage-router/index.ts","../system/workflows/mcp-workflow-builder/index.ts","../system/workflows/mcp-workflow-builder/prompts.ts","../system/workflows/mcp-workflow-builder/activities/caches.ts","../system/workflows/mcp-workflow-builder/activities/index.ts","../system/workflows/mcp-workflow-builder/activities/llm.ts","../system/workflows/mcp-workflow-builder/activities/tool-loader.ts","../system/workflows/mcp-workflow-planner/index.ts","../system/workflows/mcp-workflow-planner/prompts.ts","../system/workflows/mcp-workflow-planner/activities/analyze.ts","../system/workflows/mcp-workflow-planner/activities/index.ts","../system/workflows/mcp-workflow-planner/activities/persist.ts","../system/workflows/mcp-workflow-planner/activities/plan.ts","../system/workflows/shared/discovery.ts","../system/workflows/shared/index.ts","../system/workflows/shared/llm-caller.ts","../system/workflows/shared/principal-tools.ts","../system/workflows/shared/prompts.ts","../system/workflows/shared/strategy-advisors.ts","../system/workflows/shared/tool-executor.ts","../system/workflows/shared/tool-loader.ts","../system/workflows/shared/types.ts","../themes/midnight.ts","../types/agent.ts","../types/analytics.ts","../types/auth.ts","../types/capability.ts","../types/config.ts","../types/delegation.ts","../types/discovery.ts","../types/domain-manifest.ts","../types/envelope.ts","../types/escalation-strategy.ts","../types/escalation.ts","../types/events.ts","../types/export.ts","../types/express.d.ts","../types/facets.ts","../types/index.ts","../types/logger.ts","../types/machines-view.ts","../types/machines.ts","../types/maintenance.ts","../types/mcp.ts","../types/messaging.ts","../types/oauth-server.ts","../types/oauth.ts","../types/persona.ts","../types/scan-choice.ts","../types/sdk.ts","../types/startup.ts","../types/task.ts","../types/telemetry.ts","../types/tool-context.ts","../types/user.ts","../types/validation.ts","../types/workflow-icons.ts","../types/workflow-set.ts","../types/workflow.ts","../types/yaml-workflow.ts","../types/scan-code/constants.ts","../types/scan-code/index.ts","../types/scan-code/response.ts","../types/scan-code/rule.ts","../workers/index.ts"],"version":"5.9.3"}
1
+ {"root":["../index.ts","../vitest.config.ts","../vitest.fast.config.ts","../vitest.integration.config.ts","../vitest.llm.config.ts","../adapters/express.ts","../api/agent-subscriptions.ts","../api/agents.ts","../api/announcements.ts","../api/auth-sso.ts","../api/auth.ts","../api/bot-accounts.ts","../api/capabilities.ts","../api/controlplane.ts","../api/dba.ts","../api/diagnostics.ts","../api/domain.ts","../api/exports.ts","../api/files.ts","../api/index.ts","../api/insight.ts","../api/knowledge.ts","../api/maintenance.ts","../api/me.ts","../api/namespaces.ts","../api/overview.ts","../api/personas.ts","../api/pipelines.ts","../api/roles.ts","../api/settings.ts","../api/tasks.ts","../api/topics.ts","../api/users.ts","../api/workflow-sets.ts","../api/escalations/accumulate.ts","../api/escalations/analytics.ts","../api/escalations/batch-flag.ts","../api/escalations/bulk.ts","../api/escalations/cancel.ts","../api/escalations/claim.ts","../api/escalations/create.ts","../api/escalations/facets.ts","../api/escalations/helpers.ts","../api/escalations/index.ts","../api/escalations/list.ts","../api/escalations/lookups.ts","../api/escalations/metadata.ts","../api/escalations/related.ts","../api/escalations/resolve-batch.ts","../api/escalations/resolve.ts","../api/escalations/roster-action.ts","../api/escalations/single.ts","../api/mcp/index.ts","../api/mcp/servers.ts","../api/mcp/tools.ts","../api/scan-codes/badge-policy.ts","../api/scan-codes/choice-roles.ts","../api/scan-codes/choice.ts","../api/scan-codes/config.ts","../api/scan-codes/context.ts","../api/scan-codes/execute.ts","../api/scan-codes/fill-labels.ts","../api/scan-codes/grant.ts","../api/scan-codes/hold.ts","../api/scan-codes/identity.ts","../api/scan-codes/index.ts","../api/scan-codes/locate.ts","../api/scan-codes/present.ts","../api/scan-codes/subject.ts","../api/scan-codes/verb-accumulate.ts","../api/scan-codes/verb-fill.ts","../api/scan-codes/verb-into-subject.ts","../api/scan-codes/verbs-subject.ts","../api/scan-codes/verbs.ts","../api/workflows/config.ts","../api/workflows/discovery.ts","../api/workflows/index.ts","../api/workflows/input-lookups.ts","../api/workflows/input-validation.ts","../api/workflows/invocable.ts","../api/workflows/invocation.ts","../api/yaml-workflows/cron.ts","../api/yaml-workflows/crud.ts","../api/yaml-workflows/deploy.ts","../api/yaml-workflows/helpers.ts","../api/yaml-workflows/index.ts","../api/yaml-workflows/versions.ts","../bin/ltc.ts","../lib/typed-resolution.ts","../lib/uuid.ts","../lib/cli/auth.ts","../lib/cli/client.ts","../lib/cli/compile.ts","../lib/cli/format.ts","../lib/cli/init.ts","../lib/cli/output.ts","../lib/cli/scanner.ts","../lib/cli/types.ts","../lib/cli/commands/escalations.ts","../lib/cli/commands/knowledge.ts","../lib/cli/commands/mcp.ts","../lib/cli/commands/personas.ts","../lib/cli/commands/pipelines.ts","../lib/cli/commands/roles.ts","../lib/cli/commands/status.ts","../lib/cli/commands/streams.ts","../lib/cli/commands/users.ts","../lib/cli/commands/workflows.ts","../lib/db/config-lock.ts","../lib/db/index.ts","../lib/db/migrate.ts","../lib/events/browser-view.ts","../lib/events/callback.ts","../lib/events/escalation-wire.ts","../lib/events/index.ts","../lib/events/matching.ts","../lib/events/memory.ts","../lib/events/nats-ws-filter.ts","../lib/events/nats-ws-proxy.ts","../lib/events/nats-ws-server-filter.ts","../lib/events/nats-ws-ticket.ts","../lib/events/nats.ts","../lib/events/publish.ts","../lib/events/socketio.ts","../lib/events/system-events.ts","../lib/http/index.ts","../lib/json-path/pick.ts","../lib/logger/index.ts","../lib/logger/pino.ts","../lib/machines/index.ts","../lib/machines/line.ts","../lib/machines/protocol/codec.ts","../lib/machines/protocol/constants.ts","../lib/machines/protocol/contract.ts","../lib/machines/protocol/envelope.ts","../lib/machines/protocol/index.ts","../lib/machines/protocol/topics.ts","../lib/machines/site/edge-account.ts","../lib/machines/site/mosquitto-conf.ts","../lib/machines/site/site-conf.ts","../lib/machines/transport/callback-feed.ts","../lib/machines/transport/delivery.ts","../lib/machines/transport/index.ts","../lib/machines/transport/memory-broker.ts","../lib/machines/transport/memory.ts","../lib/machines/transport/mqtt-bus.ts","../lib/machines/transport/mqtt-link.ts","../lib/machines/transport/mqtt-session.ts","../lib/machines/transport/nats-bus.ts","../lib/machines/transport/nats-feed.ts","../lib/machines/transport/pubsub-feed.ts","../lib/machines/transport/serial.ts","../lib/machines/transport/stream-bus.ts","../lib/machines/transport/streams.ts","../lib/messaging/config.ts","../lib/messaging/constants.ts","../lib/messaging/index.ts","../lib/messaging/memory.ts","../lib/messaging/subjects.ts","../lib/messaging/nats/permissions.ts","../lib/messaging/nats/provider.ts","../lib/messaging/nats/render-conf.ts","../lib/messaging/nats/streams.ts","../lib/storage/index.ts","../lib/storage/local.ts","../lib/storage/mime.ts","../lib/storage/s3.ts","../lib/storage/types.ts","../lib/telemetry/honeycomb.ts","../lib/telemetry/index.ts","../modules/auth.ts","../modules/branding.ts","../modules/capabilities.ts","../modules/config.ts","../modules/defaults.ts","../modules/display.ts","../modules/features.ts","../modules/ltconfig.ts","../modules/machines.ts","../modules/maintenance.ts","../modules/mcp-auth.ts","../modules/oauth-server.ts","../modules/search.ts","../modules/sso.ts","../modules/utils.ts","../modules/version.ts","../routes/agents.ts","../routes/announcements.ts","../routes/auth-sso.ts","../routes/auth.ts","../routes/bot-accounts.ts","../routes/capabilities.ts","../routes/controlplane.ts","../routes/dba.ts","../routes/delegation.ts","../routes/diagnostics.ts","../routes/docs.ts","../routes/domain.ts","../routes/exports.ts","../routes/file-browser.ts","../routes/files.ts","../routes/index.ts","../routes/insight.ts","../routes/knowledge.ts","../routes/machines.ts","../routes/maintenance.ts","../routes/mcp-endpoint.ts","../routes/mcp.ts","../routes/me.ts","../routes/namespaces.ts","../routes/nats-credentials.ts","../routes/oauth-well-known.ts","../routes/oauth.ts","../routes/overview.ts","../routes/personas.ts","../routes/pipelines.ts","../routes/roles.ts","../routes/scan-codes.ts","../routes/settings.ts","../routes/tasks.ts","../routes/topics.ts","../routes/users.ts","../routes/workflow-sets.ts","../routes/escalations/accumulate.ts","../routes/escalations/acting.ts","../routes/escalations/analytics.ts","../routes/escalations/bulk.ts","../routes/escalations/facets.ts","../routes/escalations/index.ts","../routes/escalations/list.ts","../routes/escalations/metadata.ts","../routes/escalations/related.ts","../routes/escalations/resolve.ts","../routes/escalations/single.ts","../routes/oauth-server/authorize.ts","../routes/oauth-server/grants.ts","../routes/oauth-server/index.ts","../routes/oauth-server/registration.ts","../routes/oauth-server/token.ts","../routes/workflows/config.ts","../routes/workflows/discovery.ts","../routes/workflows/index.ts","../routes/workflows/invocation.ts","../routes/yaml-workflows/cron.ts","../routes/yaml-workflows/crud.ts","../routes/yaml-workflows/deployment.ts","../routes/yaml-workflows/index.ts","../routes/yaml-workflows/versions.ts","../scripts/bambu-boat.ts","../scripts/bambu-print.ts","../scripts/consolidation-sim.ts","../scripts/machine-line.ts","../scripts/ortho-populate.ts","../scripts/printer-cycle.ts","../scripts/process-helpers.ts","../scripts/process.ts","../scripts/token.ts","../scripts/twin-farm.ts","../sdk/index.ts","../services/dba.ts","../services/hotmesh-utils.ts","../services/invocation-access.ts","../services/workflow-invocation.ts","../services/workflow-state.ts","../services/agent/authority.ts","../services/agent/index.ts","../services/agent/input-mapper.ts","../services/agent/sql.ts","../services/agent/subscription-sql.ts","../services/agent/subscriptions.ts","../services/agent/trigger-registry.ts","../services/announcement/index.ts","../services/announcement/sql.ts","../services/auth/bot-api-key.ts","../services/auth/delegation.ts","../services/auth/index.ts","../services/auth/service-token.ts","../services/auth/sql.ts","../services/auth/oauth-server/access-token.ts","../services/auth/oauth-server/authorization.ts","../services/auth/oauth-server/constants.ts","../services/auth/oauth-server/index.ts","../services/auth/oauth-server/metadata.ts","../services/auth/oauth-server/registration.ts","../services/auth/oauth-server/sql.ts","../services/auth/oauth-server/store.ts","../services/config/cache.ts","../services/config/index.ts","../services/config/provider.ts","../services/config/read.ts","../services/config/sql.ts","../services/config/write.ts","../services/controlplane/index.ts","../services/controlplane/quorum-bridge.ts","../services/controlplane/sql.ts","../services/controlplane/stream-messages-sql.ts","../services/controlplane/types.ts","../services/cron/index.ts","../services/diagnostics/index.ts","../services/diagnostics/patterns.ts","../services/domain/index.ts","../services/domain/read.ts","../services/domain/seed.ts","../services/domain/sql.ts","../services/domain/validate.ts","../services/domain/write.ts","../services/escalation/accumulate.ts","../services/escalation/aggregate-sql.ts","../services/escalation/aggregate-validate.ts","../services/escalation/aggregates.ts","../services/escalation/batch-flag.ts","../services/escalation/batch.ts","../services/escalation/bulk.ts","../services/escalation/claim-asserted.ts","../services/escalation/client.ts","../services/escalation/crud.ts","../services/escalation/facet-sql.ts","../services/escalation/facets.ts","../services/escalation/grouped-list.ts","../services/escalation/index.ts","../services/escalation/map.ts","../services/escalation/metrics-cache.ts","../services/escalation/queries.ts","../services/escalation/read-scope-sql.ts","../services/escalation/related-extremes.ts","../services/escalation/related.ts","../services/escalation/resolver-validation.ts","../services/escalation/roster.ts","../services/escalation/sql.ts","../services/escalation/submit-guard.ts","../services/escalation/types.ts","../services/escalation-strategy/default.ts","../services/escalation-strategy/index.ts","../services/escalation-strategy/mcp.ts","../services/export/client.ts","../services/export/index.ts","../services/export/post-process.ts","../services/export/types.ts","../services/iam/acting-identity.ts","../services/iam/activity.ts","../services/iam/bots.ts","../services/iam/context.ts","../services/iam/credentials.ts","../services/iam/envelope.ts","../services/iam/ephemeral.ts","../services/iam/index.ts","../services/iam/principal.ts","../services/iam/resolve.ts","../services/iam/sql.ts","../services/insight/index.ts","../services/insight/prompts.ts","../services/interceptor/activity-interceptor.ts","../services/interceptor/completion.ts","../services/interceptor/context.ts","../services/interceptor/escalation.ts","../services/interceptor/index.ts","../services/interceptor/lifecycle.ts","../services/interceptor/state.ts","../services/interceptor/types.ts","../services/interceptor/activities/config.ts","../services/interceptor/activities/escalation.ts","../services/interceptor/activities/index.ts","../services/interceptor/activities/task.ts","../services/interceptor/activities/workflow.ts","../services/knowledge/index.ts","../services/knowledge/lookup-cache.ts","../services/knowledge/lookup-refs.ts","../services/knowledge/sql.ts","../services/llm/detect.ts","../services/llm/index.ts","../services/llm/translate.ts","../services/llm/types.ts","../services/llm/providers/anthropic.ts","../services/llm/providers/openai.ts","../services/machines/commands.ts","../services/machines/config.ts","../services/machines/contracts.ts","../services/machines/forms.ts","../services/machines/identities.ts","../services/machines/index.ts","../services/machines/leadership.ts","../services/machines/line-index.ts","../services/machines/registry-sql.ts","../services/machines/registry-sync.ts","../services/machines/registry.ts","../services/machines/roles.ts","../services/machines/rows.ts","../services/machines/select.ts","../services/machines/surface.ts","../services/machines/gateway/actions.ts","../services/machines/gateway/address-book.ts","../services/machines/gateway/admission.ts","../services/machines/gateway/api-escalations.ts","../services/machines/gateway/dispatcher.ts","../services/machines/gateway/escalations.ts","../services/machines/gateway/executor.ts","../services/machines/gateway/gateway.ts","../services/machines/gateway/index.ts","../services/machines/gateway/inspect.ts","../services/machines/gateway/jobs.ts","../services/machines/gateway/lifecycle.ts","../services/machines/gateway/log.ts","../services/machines/gateway/lt-http.ts","../services/machines/gateway/pacing.ts","../services/machines/gateway/plan-escalation.ts","../services/machines/gateway/plan-machine.ts","../services/machines/gateway/plan-shared.ts","../services/machines/gateway/project.ts","../services/machines/gateway/provision.ts","../services/machines/gateway/receipts.ts","../services/machines/gateway/reconcile.ts","../services/machines/gateway/registration.ts","../services/machines/gateway/reply-waiter.ts","../services/machines/gateway/state.ts","../services/machines/gateway/trace.ts","../services/machines/gateway/wire-window.ts","../services/machines/gateway/wire.ts","../services/machines/testing/fake-long-tail.ts","../services/machines/testing/index.ts","../services/machines/testing/recording-log.ts","../services/machines/testing/wait.ts","../services/maintenance/index.ts","../services/mcp/adapter.ts","../services/mcp/db.ts","../services/mcp/exposure.ts","../services/mcp/external-server.ts","../services/mcp/index.ts","../services/mcp/register-tool.ts","../services/mcp/registered-tools.ts","../services/mcp/seed-service-account.ts","../services/mcp/server-lifecycle.ts","../services/mcp/server-tools.ts","../services/mcp/server.ts","../services/mcp/sql.ts","../services/mcp/types.ts","../services/mcp/workflow-compiler-server.ts","../services/mcp/workflow-server.ts","../services/mcp/client/connection-dispatch.ts","../services/mcp/client/connection-lifecycle.ts","../services/mcp/client/connection-test.ts","../services/mcp/client/connection.ts","../services/mcp/client/index.ts","../services/mcp/client/network-transport.ts","../services/mcp/client/tools.ts","../services/mcp/db-server/index.ts","../services/mcp/db-server/schemas.ts","../services/mcp/db-server/tools.ts","../services/mcp/playwright-server/index.ts","../services/mcp/playwright-server/lifecycle.ts","../services/mcp/playwright-server/schemas.ts","../services/mcp/playwright-server/tools.ts","../services/namespace/index.ts","../services/namespace/sql.ts","../services/namespace/types.ts","../services/oauth/crypto.ts","../services/oauth/db.ts","../services/oauth/index.ts","../services/oauth/sql.ts","../services/oauth/state.ts","../services/oauth/providers/anthropic.ts","../services/oauth/providers/github.ts","../services/oauth/providers/google.ts","../services/oauth/providers/index.ts","../services/oauth/providers/microsoft.ts","../services/oauth/providers/mock.ts","../services/oauth/providers/registry.ts","../services/oauth/providers/types.ts","../services/orchestrator/condition.ts","../services/orchestrator/index.ts","../services/orchestrator/types.ts","../services/overview/index.ts","../services/overview/sql.ts","../services/persona/index.ts","../services/persona/sql.ts","../services/persona/types.ts","../services/pipelines/enrichment.ts","../services/pipelines/events.ts","../services/pipelines/execution-builder.ts","../services/pipelines/index.ts","../services/pipelines/queries.ts","../services/pipelines/sql.ts","../services/pipelines/types.ts","../services/role/badge-grant.ts","../services/role/enforcement-cache.ts","../services/role/index.ts","../services/role/schema-validator.ts","../services/role/seed.ts","../services/role/sql.ts","../services/role/types.ts","../services/scan-code/index.ts","../services/scan-code/parse.ts","../services/scan-code/read.ts","../services/scan-code/sql.ts","../services/scan-code/validate-facts.ts","../services/scan-code/validate-query.ts","../services/scan-code/validate-subject.ts","../services/scan-code/validate.ts","../services/scan-code/write.ts","../services/task/crud.ts","../services/task/index.ts","../services/task/process.ts","../services/task/resolve.ts","../services/task/sql.ts","../services/task/types.ts","../services/topics/index.ts","../services/topics/sql.ts","../services/topics/system-topics.ts","../services/user/auth.ts","../services/user/crud.ts","../services/user/index.ts","../services/user/preferences.ts","../services/user/rbac.ts","../services/user/roles.ts","../services/user/scope.ts","../services/user/seed-admin.ts","../services/user/sql.ts","../services/user/sso-provision.ts","../services/user/types.ts","../services/workers/registry.ts","../services/workflow-sets/db.ts","../services/workflow-sets/index.ts","../services/workflow-sets/sql.ts","../services/yaml-workflow/builder-regenerate.ts","../services/yaml-workflow/db-utils.ts","../services/yaml-workflow/db-versions.ts","../services/yaml-workflow/db.ts","../services/yaml-workflow/deployer-helpers.ts","../services/yaml-workflow/deployer.ts","../services/yaml-workflow/generator.ts","../services/yaml-workflow/index.ts","../services/yaml-workflow/input-analyzer-helpers.ts","../services/yaml-workflow/input-analyzer.ts","../services/yaml-workflow/invoke.ts","../services/yaml-workflow/pipe-validator.ts","../services/yaml-workflow/sql.ts","../services/yaml-workflow/types.ts","../services/yaml-workflow/durable-compiler/index.ts","../services/yaml-workflow/durable-compiler/parser.ts","../services/yaml-workflow/durable-compiler/prompts.ts","../services/yaml-workflow/durable-compiler/types.ts","../services/yaml-workflow/pattern-detector/array-source.ts","../services/yaml-workflow/pattern-detector/collapse.ts","../services/yaml-workflow/pattern-detector/index.ts","../services/yaml-workflow/pattern-detector/run-detection.ts","../services/yaml-workflow/pattern-detector/types.ts","../services/yaml-workflow/pipeline/analyze.ts","../services/yaml-workflow/pipeline/extract-helpers.ts","../services/yaml-workflow/pipeline/extract.ts","../services/yaml-workflow/pipeline/index.ts","../services/yaml-workflow/pipeline/prompt-templates.ts","../services/yaml-workflow/pipeline/prompts.ts","../services/yaml-workflow/pipeline/validate.ts","../services/yaml-workflow/pipeline/build/dag-assembly.ts","../services/yaml-workflow/pipeline/build/dag.ts","../services/yaml-workflow/pipeline/build/index.ts","../services/yaml-workflow/pipeline/build/iteration.ts","../services/yaml-workflow/pipeline/build/metadata.ts","../services/yaml-workflow/pipeline/build/transform.ts","../services/yaml-workflow/pipeline/build/utils.ts","../services/yaml-workflow/pipeline/build/wiring.ts","../services/yaml-workflow/pipeline/compile/index.ts","../services/yaml-workflow/pipeline/compile/llm-call.ts","../services/yaml-workflow/pipeline/compile/parse-plan.ts","../services/yaml-workflow/pipeline/compile/summarize.ts","../services/yaml-workflow/workers/callbacks.ts","../services/yaml-workflow/workers/events.ts","../services/yaml-workflow/workers/index.ts","../services/yaml-workflow/workers/register.ts","../services/yaml-workflow/workers/scope.ts","../services/yaml-workflow/workers/step-tool.ts","../shared/workflow-state.ts","../shared/form-validation/ctx-path.ts","../shared/form-validation/derive-field-label.ts","../shared/form-validation/display-only-widgets.ts","../shared/form-validation/field-validator.ts","../shared/form-validation/index.ts","../shared/form-validation/invoke-context.ts","../shared/form-validation/validate-resolver-payload.ts","../shared/form-validation/x-lt-actions.ts","../shared/form-validation/x-lt-bind.ts","../shared/form-validation/x-lt-help.ts","../shared/form-validation/x-lt-invoke.ts","../shared/form-validation/x-lt-labels.ts","../shared/form-validation/x-lt-options.ts","../shared/form-validation/x-lt-query.ts","../shared/form-validation/x-lt-require-any.ts","../shared/form-validation/x-lt-require-sum.ts","../shared/form-validation/x-lt-roster.ts","../shared/form-validation/x-lt-scan.ts","../shared/form-validation/x-lt-show-if.ts","../shared/form-validation/x-lt-submit-guard.ts","../shared/form-validation/x-lt-submit-on-claim.ts","../shared/form-validation/x-lt-transition.ts","../shared/list-schema/aggregate.ts","../shared/list-schema/index.ts","../shared/list-schema/template.ts","../shared/list-schema/types.ts","../shared/list-schema/validate.ts","../shared/roles/segment.ts","../shared/scan-code/gtin.ts","../shared/scan-code/index.ts","../shared/scan-code/parse.ts","../start/adapters.ts","../start/apply-report.ts","../start/config.ts","../start/graph-workflows.ts","../start/index.ts","../start/server.ts","../start/socket-auth.ts","../start/workers.ts","../system/index.ts","../system/activities/claude-code.ts","../system/activities/file-storage.ts","../system/activities/http.ts","../system/activities/knowledge.ts","../system/activities/oauth.ts","../system/activities/schema-exchange.ts","../system/activities/sql.ts","../system/activities/triage/cache.ts","../system/activities/triage/context.ts","../system/activities/triage/discovery.ts","../system/activities/triage/index.ts","../system/activities/triage/llm.ts","../system/activities/triage/tools.ts","../system/mcp-servers/caller-auth.ts","../system/mcp-servers/claude-code.ts","../system/mcp-servers/docs.ts","../system/mcp-servers/events.ts","../system/mcp-servers/file-storage.ts","../system/mcp-servers/http-fetch.ts","../system/mcp-servers/human-queue-schemas.ts","../system/mcp-servers/human-queue.ts","../system/mcp-servers/knowledge.ts","../system/mcp-servers/machines-schemas.ts","../system/mcp-servers/machines.ts","../system/mcp-servers/oauth.ts","../system/mcp-servers/schema-exchange.ts","../system/mcp-servers/translation.ts","../system/mcp-servers/vision-prompts.ts","../system/mcp-servers/vision.ts","../system/mcp-servers/workflow-compiler.ts","../system/mcp-servers/workflow.ts","../system/mcp-servers/admin/agent-subscriptions.ts","../system/mcp-servers/admin/agents.ts","../system/mcp-servers/admin/announcements.ts","../system/mcp-servers/admin/bot-accounts.ts","../system/mcp-servers/admin/controlplane.ts","../system/mcp-servers/admin/diagnostics.ts","../system/mcp-servers/admin/domain-context.ts","../system/mcp-servers/admin/escalations.ts","../system/mcp-servers/admin/exports.ts","../system/mcp-servers/admin/index.ts","../system/mcp-servers/admin/maintenance.ts","../system/mcp-servers/admin/mcp-servers.ts","../system/mcp-servers/admin/overview.ts","../system/mcp-servers/admin/personas.ts","../system/mcp-servers/admin/pipelines.ts","../system/mcp-servers/admin/run-read.ts","../system/mcp-servers/admin/scan-codes.ts","../system/mcp-servers/admin/schemas.ts","../system/mcp-servers/admin/settings.ts","../system/mcp-servers/admin/tasks.ts","../system/mcp-servers/admin/topics.ts","../system/mcp-servers/admin/users.ts","../system/mcp-servers/admin/workflow-config.ts","../system/mcp-servers/admin/workflows.ts","../system/mcp-servers/admin/yaml-workflows.ts","../system/mcp-servers/db-query/index.ts","../system/mcp-servers/db-query/schemas.ts","../system/mcp-servers/db-query/tools.ts","../system/seed/index.ts","../system/seed/tool-manifests-admin.ts","../system/seed/tool-manifests-data.ts","../system/seed/tool-manifests-escalation.ts","../system/seed/tool-manifests-events.ts","../system/seed/tool-manifests-knowledge.ts","../system/seed/tool-manifests-machines.ts","../system/seed/tool-manifests-workflows.ts","../system/workflows/tool-result-guard.ts","../system/workflows/capability-invoke/activities.ts","../system/workflows/capability-invoke/index.ts","../system/workflows/mcp-deterministic/activities.ts","../system/workflows/mcp-deterministic/index.ts","../system/workflows/mcp-query/index.ts","../system/workflows/mcp-query/prompts.ts","../system/workflows/mcp-query/strategy-advisors.ts","../system/workflows/mcp-query/types.ts","../system/workflows/mcp-query/activities/caches.ts","../system/workflows/mcp-query/activities/discovery.ts","../system/workflows/mcp-query/activities/index.ts","../system/workflows/mcp-query/activities/llm.ts","../system/workflows/mcp-query/activities/tool-executor.ts","../system/workflows/mcp-query/activities/tool-loader.ts","../system/workflows/mcp-query-router/activities.ts","../system/workflows/mcp-query-router/index.ts","../system/workflows/mcp-query-router/prompts.ts","../system/workflows/mcp-triage/activities-proxy.ts","../system/workflows/mcp-triage/index.ts","../system/workflows/mcp-triage/prompts.ts","../system/workflows/mcp-triage/response-builders.ts","../system/workflows/mcp-triage/response.ts","../system/workflows/mcp-triage/types.ts","../system/workflows/mcp-triage-deterministic/activities.ts","../system/workflows/mcp-triage-deterministic/index.ts","../system/workflows/mcp-triage-router/activities.ts","../system/workflows/mcp-triage-router/index.ts","../system/workflows/mcp-workflow-builder/index.ts","../system/workflows/mcp-workflow-builder/prompts.ts","../system/workflows/mcp-workflow-builder/activities/caches.ts","../system/workflows/mcp-workflow-builder/activities/index.ts","../system/workflows/mcp-workflow-builder/activities/llm.ts","../system/workflows/mcp-workflow-builder/activities/tool-loader.ts","../system/workflows/mcp-workflow-planner/index.ts","../system/workflows/mcp-workflow-planner/prompts.ts","../system/workflows/mcp-workflow-planner/activities/analyze.ts","../system/workflows/mcp-workflow-planner/activities/index.ts","../system/workflows/mcp-workflow-planner/activities/persist.ts","../system/workflows/mcp-workflow-planner/activities/plan.ts","../system/workflows/shared/discovery.ts","../system/workflows/shared/index.ts","../system/workflows/shared/llm-caller.ts","../system/workflows/shared/principal-tools.ts","../system/workflows/shared/prompts.ts","../system/workflows/shared/strategy-advisors.ts","../system/workflows/shared/tool-executor.ts","../system/workflows/shared/tool-loader.ts","../system/workflows/shared/types.ts","../themes/midnight.ts","../types/agent.ts","../types/analytics.ts","../types/auth.ts","../types/capability.ts","../types/config.ts","../types/delegation.ts","../types/discovery.ts","../types/domain-manifest.ts","../types/envelope.ts","../types/escalation-strategy.ts","../types/escalation.ts","../types/events.ts","../types/export.ts","../types/express.d.ts","../types/facets.ts","../types/index.ts","../types/logger.ts","../types/machines-view.ts","../types/machines.ts","../types/maintenance.ts","../types/mcp.ts","../types/messaging.ts","../types/oauth-server.ts","../types/oauth.ts","../types/persona.ts","../types/scan-choice.ts","../types/sdk.ts","../types/startup.ts","../types/task.ts","../types/telemetry.ts","../types/tool-context.ts","../types/user.ts","../types/validation.ts","../types/workflow-icons.ts","../types/workflow-set.ts","../types/workflow.ts","../types/yaml-workflow.ts","../types/scan-code/constants.ts","../types/scan-code/index.ts","../types/scan-code/response.ts","../types/scan-code/rule.ts","../workers/index.ts"],"version":"5.9.3"}
@@ -148,20 +148,23 @@ export declare const ESCALATION_ENVELOPE_KEYS: {
148
148
  /** A lookup ref `version` that follows the entry's newest edition. */
149
149
  export declare const LOOKUP_VERSION_CURRENT: "current";
150
150
  /**
151
- * One knowledge lookup reference. `version` pins an immutable edition; absent
152
- * or `'current'`, the ref follows the entry's newest edition: a pending row
153
- * reads the edition in force when it renders, and a closed row reads the
154
- * edition that was current when it closed. `as` renames the ref's
155
- * form-context address when the key alone is ambiguous.
151
+ * One knowledge lookup reference. `version` pins an immutable edition by its
152
+ * number or by the label an edition carries; absent or `'current'`, the ref
153
+ * follows the entry's newest edition: a pending row reads the edition in
154
+ * force when it renders, and a closed row reads the edition that was current
155
+ * when it closed. `as` renames the ref's form-context address when the key
156
+ * alone is ambiguous.
156
157
  */
157
158
  export interface EscalationLookupRef {
158
159
  domain: string;
159
160
  key: string;
160
- version?: number | typeof LOOKUP_VERSION_CURRENT;
161
+ version?: number | string;
161
162
  as?: string;
162
163
  }
163
164
  /** True when the ref follows the newest edition rather than pinning one. */
164
165
  export declare function isCurrentLookupRef(ref: Pick<EscalationLookupRef, 'version'>): boolean;
166
+ /** True when the ref pins an edition by the label it carries. */
167
+ export declare function isLabelLookupRef(ref: Pick<EscalationLookupRef, 'version'>): boolean;
165
168
  /**
166
169
  * Fail-loud structural validation for lookup refs, run before the escalation
167
170
  * row is written on every creation path. Dependency-free: the `conditional`
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LOOKUP_VERSION_CURRENT = exports.ESCALATION_ENVELOPE_KEYS = exports.ESCALATION_METADATA_KEYS = exports.ACCUMULATOR_RESULT_KEYS = exports.ESCALATION_ACCUMULATE_KEYS = exports.ESCALATION_BATCH_KEYS = exports.ESCALATION_ITEM_KEY_MAX_LENGTH = void 0;
4
4
  exports.isCurrentLookupRef = isCurrentLookupRef;
5
+ exports.isLabelLookupRef = isLabelLookupRef;
5
6
  exports.assertLookupRefs = assertLookupRefs;
6
7
  exports.isEffectivelyClaimed = isEffectivelyClaimed;
7
8
  exports.isAvailable = isAvailable;
@@ -97,6 +98,10 @@ exports.LOOKUP_VERSION_CURRENT = 'current';
97
98
  function isCurrentLookupRef(ref) {
98
99
  return ref.version === undefined || ref.version === exports.LOOKUP_VERSION_CURRENT;
99
100
  }
101
+ /** True when the ref pins an edition by the label it carries. */
102
+ function isLabelLookupRef(ref) {
103
+ return typeof ref.version === 'string' && ref.version.length > 0 && ref.version !== exports.LOOKUP_VERSION_CURRENT;
104
+ }
100
105
  /**
101
106
  * Fail-loud structural validation for lookup refs, run before the escalation
102
107
  * row is written on every creation path. Dependency-free: the `conditional`
@@ -113,8 +118,9 @@ function assertLookupRefs(refs) {
113
118
  throw new Error('Each lookup ref requires a non-empty domain and key');
114
119
  }
115
120
  const pinned = typeof r.version === 'number' && Number.isInteger(r.version) && r.version >= 1;
116
- if (r.version !== undefined && r.version !== exports.LOOKUP_VERSION_CURRENT && !pinned) {
117
- throw new Error(`Lookup ref ${r.domain}/${r.key}: version must be a positive integer, 'current', or absent`);
121
+ const labelled = typeof r.version === 'string' && r.version.length > 0;
122
+ if (r.version !== undefined && !pinned && !labelled) {
123
+ throw new Error(`Lookup ref ${r.domain}/${r.key}: version must be a positive integer, an edition label, 'current', or absent`);
118
124
  }
119
125
  if (r.as !== undefined && (typeof r.as !== 'string' || r.as.length === 0)) {
120
126
  throw new Error(`Lookup ref ${r.domain}/${r.key}: "as" must be a non-empty string when present`);
@@ -110,6 +110,22 @@ export interface WireEvent {
110
110
  payload?: unknown;
111
111
  }
112
112
  /** A dry run of one message: what the codec read and what the gateway would do. */
113
+ /** A read of the leader's wire window: newest first. */
114
+ export interface WireWindowQuery {
115
+ limit?: number;
116
+ machine?: string;
117
+ direction?: WireDirection;
118
+ kind?: WireKind;
119
+ /** Only events after this time (ISO 8601). */
120
+ since?: string;
121
+ }
122
+ export interface LineWireResponse {
123
+ siteId: string;
124
+ lineId: string;
125
+ /** False from a replica that is not leading the line; its window is then empty. */
126
+ leading: boolean;
127
+ events: WireEvent[];
128
+ }
113
129
  export interface InspectResult {
114
130
  kind: WireKind | null;
115
131
  event: string | null;
@@ -87,6 +87,7 @@ export interface LineDef {
87
87
  roles?: {
88
88
  exit?: string;
89
89
  operator?: string;
90
+ quality?: string;
90
91
  receivers?: string[];
91
92
  };
92
93
  siteId: string;
@@ -54,6 +54,8 @@ export interface LTStreams {
54
54
  ensureStream(spec: StreamSpec): Promise<void>;
55
55
  /** Create the consumer, or bring an existing one's filter up to the spec; its position is kept. */
56
56
  ensureConsumer(stream: string, spec: ConsumerSpec): Promise<void>;
57
+ /** The stream as it is now, or null when there is none. */
58
+ describeStream(name: string): Promise<StreamSpec | null>;
57
59
  /** Append a message; resolves once the stream holds it. */
58
60
  append(subject: Subject, payload: string): Promise<void>;
59
61
  /** Deliver the consumer's messages to `handler` one at a time; a thrown handler counts as a nak. */
@@ -212,6 +212,8 @@ export interface LTMachinesConfig {
212
212
  declareRoles?: boolean;
213
213
  /** The machines' wire protocol; the generic line protocol under MACHINE_TOPIC_ROOT by default. */
214
214
  codec?: LineCodec;
215
+ /** A codec for one line, keyed `<siteId>/<lineId>`; every other line, code or API declared, uses `codec`. */
216
+ codecs?: Record<string, LineCodec>;
215
217
  /** Reads the host's rows into machine handoffs; the standard handoff facets by default. */
216
218
  rows?: HandoffRowAdapter;
217
219
  }
package/docs/dashboard.md CHANGED
@@ -495,7 +495,7 @@ Accessible at `/files` (builder-only: superadmin or the `engineer` role). Browse
495
495
 
496
496
  The backend is selected by the `LT_STORAGE_BACKEND` env var — `local` (filesystem) or `s3` (S3-compatible, including MinIO). The same interface serves every backend; only env changes.
497
497
 
498
- **API:** `GET /api/file-browser/browse?prefix=<path>` lists. `POST /api/file-browser/upload?path=<path>` uploads raw bytes. `GET /api/file-browser/download/<path>` downloads; `DELETE /api/file-browser/delete/<path>` removes; `POST /api/file-browser/signed-url` mints a link. Token-scoped serving is at `GET /api/files/<path>?token=<jwt>`.
498
+ **API:** `GET /api/file-browser/browse?prefix=<path>` lists. `POST /api/file-browser/upload?path=<path>[&sha256=<hex>]` uploads raw bytes; the stored object keeps the bytes' SHA-256, the response carries it, and a `sha256` the caller names is checked first, 422 when the bytes differ and nothing stored. `GET /api/file-browser/metadata/<path>` reports the digest beside size and type. `GET /api/file-browser/download/<path>` downloads; `DELETE /api/file-browser/delete/<path>` removes; `POST /api/file-browser/signed-url` mints a link. Token-scoped serving is at `GET /api/files/<path>?token=<jwt>`.
499
499
 
500
500
  ### Knowledge
501
501
 
@@ -15,13 +15,15 @@ An escalation can reference **versioned knowledge lookups** — enumerated lists
15
15
  |-------|----------|---------|
16
16
  | `domain` | yes | Knowledge domain |
17
17
  | `key` | yes | Entry key within the domain |
18
- | `version` | no | An edition to pin. Absent or `"current"`, the ref follows the newest edition |
18
+ | `version` | no | An edition to pin, by its number or by the label it carries. Absent or `"current"`, the ref follows the newest edition |
19
19
  | `as` | no | The ref's form-context address, when the key alone is ambiguous |
20
20
 
21
21
  **Current refs** (no `version`, or `"current"`) read the entry's newest edition. A pending row reads the edition in force when its form renders, so a row that stays open for days shows today's list. A resolved or cancelled row reads the edition that was current when it closed, so its history shows the list its work was done against. Form schemas stay pinned (`schemaVersion`); the lists they read follow the knowledge entry.
22
22
 
23
23
  **Pinned refs** (`version: N`) name an immutable edition: every escalation created against edition 2 renders edition 2 forever, however the entry evolves afterward. Pin when the form must read one exact edition.
24
24
 
25
+ **Labelled refs** (`version: "rev-b"`) name an edition by the label the write that minted it gave (`label` on `storeEntry`, `store_knowledge` and `append_knowledge`). A label names one edition of an entry for good, so a ref that carries the label a machine or a document quotes, such as a catalog revision, reads the right edition without knowing its number. A whole-number label no edition carries, `"2"`, reads edition 2. A label nothing carries resolves to nothing: the row is created all the same and its lookup answers `missing: true` until an edition with that label exists.
26
+
25
27
  A value picked from a current list is validated against the edition in force at submit, so an option removed while the form was open is refused with the canonical 422 and the person picks again.
26
28
 
27
29
  Refs live under the reserved `envelope.lookups` key — the unindexed, render-only bag beside `formDefaults`. They ride the engine's atomic write but never touch the GIN-indexed metadata surface: refs are form plumbing, not facets.
@@ -42,7 +44,7 @@ const decision = await conditional<CascadeResolverV1>(signalId, {
42
44
  });
43
45
  ```
44
46
 
45
- The refs fold into `envelope.lookups` as a pure transform — a wait with refs costs exactly what one without does. A malformed ref (missing field, a version that is not a positive integer or `"current"`) throws before the row is written; over the HTTP create surface the same validation answers with a 400.
47
+ The refs fold into `envelope.lookups` as a pure transform — a wait with refs costs exactly what one without does. A malformed ref (missing field, a version that is neither a positive integer, a non-empty label nor `"current"`) throws before the row is written; over the HTTP create surface the same validation answers with a 400.
46
48
 
47
49
  ## Pinning on a Workflow Config
48
50
 
@@ -63,7 +65,7 @@ const fleetToolsConfig: LTWorkerConfig = {
63
65
 
64
66
  The Invoke Tool page fetches `GET /api/workflows/:type/input-lookups` each time the form opens; the grant is the invoke predicate, so whoever may start the workflow reads exactly the entries the config names. The invoke API resolves the same refs into the gate, so a value outside the edition is refused with the canonical 422. The registry detail page edits the refs under **Lookups** in its Invocation column; the preview renders against the resolved editions.
65
67
 
66
- The refs are checked twice on save. Shape first: a missing `domain` or `key`, a `version` that is not a positive integer or `"current"`, or an empty `as` answers `400` with the field named. Existence second: a ref with no edition behind it answers `400` naming the editions that do (`Lookup ref fleet/serial-numbers v3 names no edition (editions: v1, v2)`; a current ref to an entry with no editions says `current`), from `PUT /api/workflows/:type/config` and from the MCP `upsert_workflow_config` tool alike. On the worker boot path a malformed ref fails the boot; a ref whose edition is not yet written logs a warning, since seeds commonly run after registration. At run time the resolver holds each edition in memory once read (editions are immutable; a current ref first looks up which edition is newest), a missing edition answers `missing: true` for that ref without failing the batch, the Invoke Tool page shows which editions are unavailable, and the fields that read them follow the `x-lt-options` rules: a plain path falls back to the typed input, an interpolated path stays a disabled select and fails closed.
68
+ The refs are checked twice on save. Shape first: a missing `domain` or `key`, a `version` that is neither a positive integer, a label nor `"current"`, or an empty `as` answers `400` with the field named. Existence second: a ref with no edition behind it answers `400` naming the editions that do (`Lookup ref fleet/serial-numbers v3 names no edition (editions: v1, v2)`; a current ref to an entry with no editions says `current`), from `PUT /api/workflows/:type/config` and from the MCP `upsert_workflow_config` tool alike. On the worker boot path a malformed ref fails the boot; a ref whose edition is not yet written logs a warning, since seeds commonly run after registration. At run time the resolver holds each edition in memory once read (editions are immutable; a current ref first looks up which edition is newest), a missing edition answers `missing: true` for that ref without failing the batch, the Invoke Tool page shows which editions are unavailable, and the fields that read them follow the `x-lt-options` rules: a plain path falls back to the typed input, an interpolated path stays a disabled select and fails closed.
67
69
 
68
70
  ## Versioning
69
71
 
@@ -73,7 +75,7 @@ Every knowledge entry carries a `current_version`, and every write that changes
73
75
  2. **Current refs follow** — every pending row with a current ref shows the new edition on its next render. Nothing to repin.
74
76
  3. **Pinned rows keep their edition** — an escalation pinned to v1 renders v1's list even after v5 exists. Repin the literal (and evolve the resolver payload type) when a pinned form should move.
75
77
 
76
- Inspect the lineage with `GET /api/knowledge/entry/versions?domain=catalog&key=materials`, `ltc kb versions catalog materials`, or the `list_knowledge_versions` MCP tool. Fetch a specific edition with `?version=N` on the entry endpoint.
78
+ A write may name the edition it leaves current with `label` (`storeEntry`, `store_knowledge`, `append_knowledge`); the label stays with that edition, and a second edition of the entry cannot take it. Inspect the lineage with `GET /api/knowledge/entry/versions?domain=catalog&key=materials`, `ltc kb versions catalog materials`, or the `list_knowledge_versions` MCP tool; each edition lists its label. Fetch a specific edition with `?version=N` or `?version=<label>` on the entry endpoint, or `version` on `get_knowledge`.
77
79
 
78
80
  ## The Grant
79
81
 
package/docs/machines.md CHANGED
@@ -16,12 +16,13 @@ await start({
16
16
  machines: {
17
17
  lines: [Machines.loadLine('/etc/line.json')], // code lines; [] when every line comes through the API
18
18
  codec: myCodec, // optional: the machines' wire protocol (default: the generic line protocol)
19
+ codecs: { 'site-1/line-2': otherCodec }, // optional: a codec of its own for one line
19
20
  rows: myRows, // optional: how your rows read as handoffs (default: the standard handoff facets)
20
21
  },
21
22
  });
22
23
  ```
23
24
 
24
- Transports come from the environment (see [Configuration](#configuration)). `mqtt` is an optional peer dependency; install it in the host when a line runs. Declaring `machines` opens the dashboard's [Lines view](#lines-view), with or without code lines.
25
+ `codec` is the protocol every line speaks; `codecs` gives one line a protocol of its own, keyed `<siteId>/<lineId>`, so a print farm and a finishing line on different protocols run on one surface. A line declared through the API runs on `codec` unless `codecs` names it. Transports come from the environment (see [Configuration](#configuration)). `mqtt` is an optional peer dependency; install it in the host when a line runs. Declaring `machines` opens the dashboard's [Lines view](#lines-view), with or without code lines.
25
26
 
26
27
  The registry keeps each line's definition, who declared it (`source`: `code` or `api`), and a `version` that advances once per change. Ownership follows `configSource`, as roles do:
27
28
 
@@ -55,6 +56,7 @@ For each line, one replica leads (a Postgres advisory lock held on its own conne
55
56
  | `addressing` | `declared` (default): each address is `machines[].address`, or the station's id. `learned`: a station with no `address` learns it from the machine that claims it. See [Learned addresses](#learned-addresses) |
56
57
  | `roles.exit` | The role of the person who receives units at the end of a route. Default `line-exit` |
57
58
  | `roles.operator` | The role that gets failed handoffs, stopping alarms, and offline or quiet machines. Default `line-operator` |
59
+ | `roles.quality` | The role that decides units a machine finished on hold: release, rework or scrap. Default `line-quality` |
58
60
  | `roles.receivers` | Other roles of people who take units straight from a machine. Machine bots join these roles and the exit role, so they can record their releases on those rows |
59
61
  | `machines[].allowedSoftware` | Versions the line accepts. A machine reporting another version is refused before any dispatch |
60
62
  | `machines[].queueDepth` | Most jobs the machine is sent or holds at once. Unset: no limit. See [Pacing](#pacing) |
@@ -84,11 +86,11 @@ The gateway dispatches to `toMachine` when the row is created, or, under a codec
84
86
  { received: true, receiver: 'cut-01', units: ['U1', 'U2'] }
85
87
  ```
86
88
 
87
- When a handoff ends without every unit (a failure, a timeout, a cancel), the gateway withdraws only the jobs none of whose units reached the receiver, so nothing queued for an absent unit runs later. A job some of whose units already arrived is under way: it stays, and what happens to it is the workflow's next decision. A workflow that wants it stopped parks a `cancel` command row (see Commands).
89
+ When a handoff ends without every unit (a failure, a timeout, a cancel), the gateway withdraws only the jobs it sent whose units never reached the receiver, so nothing queued for an absent unit runs later; a job that never went out, because the row was waiting for room or for its units to arrive, leaves the receiver nothing to withdraw. A job some of whose units already arrived is under way: it stays, and what happens to it is the workflow's next decision. A workflow that wants it stopped parks a `cancel` command row (see Commands).
88
90
 
89
91
  `Machines.handoffProgress(units, items)` reads where a handoff's units stand from its items (a row's items, or `$accumulated` on a finished wait): `{ released, arrived, missing }`. A workflow reads it to decide what a split means for its own process.
90
92
 
91
- On arrival dispatch, the units are already at the receiver, so its acceptance resolves the row the same way.
93
+ On arrival dispatch, the units are already at the receiver, so the row resolves `received` once the machine has the job: at its acceptance, or, when the acceptance says `preparing: true`, at the `completed` reply that follows; a `failed` reply meanwhile ends the row `dispatch-failed`. A gateway taking the line over resolves such a row at once if the machine's snapshot holds the job, since the reply it waited for may have passed. The job then runs with its row ended; the gateway that sent it remembers the row for as long as the machine holds the job's units, so a machine that restarts with the job unfinished is sent it again from that row (the same command id and issue time while the validity round lasts, flagged as a retry), with no verb on the row. A gateway that took the line after the row ended remembers nothing of the job: a restart then logs `machine_gateway.dispatch.unrecoverable` with the jobs the machine lost, and the next hop's row times out as its route decides.
92
94
 
93
95
  When the handoff ends without a receipt, the row resolves `{ received: false, errorCode, unitId?, result?, reason?, detail, code? }`. `detail` is text for a person; `code` is the machine's structured code when its reply carried one, so a workflow can branch on it:
94
96
 
@@ -133,7 +135,7 @@ Every other progress message stays in the stream, so an hour-long job leaves a h
133
135
 
134
136
  ### Decisions on a failed handoff
135
137
 
136
- `Machines.handoffDecisions(errorCode)` gives a default set of decisions for a failed handoff. A failure in the move leaves the units on the line, so `retry`, `manual` and `scrap` all fit. Units the sender finished as not ok (`sender-rejected`) leave the line and never re-enter it, so only `manual` and `scrap` fit. After a `partial-arrival` (a timeout once only some units arrived) the units are split between two stations, and a retry of the same hop would ask the sender for units it no longer holds, so the default offers `manual` and `scrap`. A workflow is free to offer its own decisions instead, such as moving only the missing units on; the platform reports the facts and does not choose.
138
+ `Machines.handoffDecisions(errorCode)` gives a default set of decisions for a failed handoff. A failure in the move leaves the units on the line, so `retry`, `manual` and `scrap` all fit. Units the sender finished as not ok (`sender-rejected`) leave the line and never re-enter it, so only `manual` and `scrap` fit; units finished on hold (`result: hold`) are the exception, and the example route asks the quality role instead (`Machines.HOLD_DECISIONS`: `release`, `rework`, `scrap`), sending the decision to the holding machine as the command the codec declares for it (`dispositionOp`) when it declares one. After a `partial-arrival` (a timeout once only some units arrived) the units are split between two stations, and a retry of the same hop would ask the sender for units it no longer holds, so the default offers `manual` and `scrap`. A workflow is free to offer its own decisions instead, such as moving only the missing units on; the platform reports the facts and does not choose.
137
139
 
138
140
  The example route's policy for a split: it stops the receiver's job with a `cancel` command row, then a person collects each group of units where it stopped.
139
141
 
@@ -155,7 +157,7 @@ A machine's load is every job it has been sent or still holds:
155
157
  - rows whose units still wait on it to move on;
156
158
  - units that arrived and have not left.
157
159
 
158
- A unit leaves when the machine releases it, when it arrives at the next machine, or when the machine's snapshot no longer lists its job. A replica taking the line reads every open row back before it sends anything, so pacing survives a restart.
160
+ A unit leaves when the machine releases it, when it arrives at the next machine, or when the machine's snapshot no longer lists its job. A replica taking the line reads every open row back before it sends anything, so pacing survives a restart; a handoff row that was never given items, one parked by hand on a machine's role, reads as holding none.
159
161
 
160
162
  ## Commands
161
163
 
@@ -214,15 +216,17 @@ interface LineCodec {
214
216
  - With `unitsPerDispatch: 1` the gateway sends one job per unit, claims the row once every job is accepted, and cancels the accepted jobs if any is refused.
215
217
  - `topicFor` lays out the topics, for a protocol with its own levels (a direction before the machine, say). The layout begins with `{root}/{site}/{line}/`. The broker ACL and the stream subjects follow it. Without it the layout is `{root}/{site}/{line}/{address}/{channel}`.
216
218
  - `dispatchOn: 'arrival'` is for machines that take work only for units they have scanned in. The job goes out once every unit of the row has arrived, and each unit carries the arrival event its receiver reported (`units[].arrival`), so `encode` can echo the receiver's own visit id.
217
- - A reply is `accepted` (recorded), and a machine that prepares its jobs may later reply `completed` (ready) or `failed` under the same `cmdId`. A failure after acceptance ends the handoff as `dispatch-failed`. When no reply comes, the gateway asks the machine for its snapshot before deciding.
219
+ - A reply is `accepted` (recorded), and a machine that prepares its jobs says so with `preparing: true` and later replies `completed` (ready) or `failed` under the same `cmdId`. A failure after acceptance ends the handoff as `dispatch-failed`. When no reply comes, the gateway asks the machine for its snapshot before deciding.
218
220
  - `receipt` confirms the messages the gateway is done with, for machines that resend an event until it is confirmed. `decode` marks each such message with a `receiptId`. The ids go out per machine in batches of up to 100 after `MACHINE_RECEIPT_DELAY_MS`, including messages already applied. A message still waiting for its row is confirmed once it lands.
219
- - `strict: true` holds a message with contract violations: it is confirmed, never acted on, and one `contract-violation` row shows it to the operator role. Without it, known fields are acted on and the violations are logged.
220
- - An alarm body may name the catalog edition its code comes from, `catalog: { domain, key, version }`. The alarm row then carries it as a lookup ref, so the row reads the code's meaning as of that edition.
221
+ - `strict: true` holds a message with contract violations: it is confirmed, never acted on, and one `contract-violation` row shows it to the operator role. Without it, known fields are acted on and the violations are logged. A receiver's report that it read no id (`transfer-failed`, `failure: unreadable-id`, neither `unitId` nor `carrierId`) keeps the contract, so under a strict codec it reaches the operator as a `handoff-error` row rather than a violation.
222
+ - An alarm body may say `needsPerson: true`: the row is raised whatever the level, and the row's level stays the machine's. Stopping levels raise a row on their own.
223
+ - A snapshot needs only `mode`, `enabled`, `jobs` and `alarms`; `bootId`, `software`, `recipe` and `cycles` are read when present. A job event needs no `orderRef`; the row already knows its order. A codec for machines that spread these over several messages fills in what it has.
224
+ - An alarm body may name the catalog edition its code comes from, `catalog: { domain, key, version }`, with `version` an edition number or the label an edition carries (a catalog revision, say). The alarm row then carries it as a lookup ref, so the row reads the code's meaning as of that edition; a label no edition carries yet leaves the row's lookup unresolved, never the row uncreated.
221
225
  - Event channels go to the durable stream and telemetry channels are read live. A machine reads its commands on the command channels. The broker ACL is rendered from these channels, so a codec with its own topics gets its own ACL. Unknown body fields are allowed and known ones are checked. Payloads may be up to 256 KB.
222
226
  - `snapshotOnStart: true` is for machines that keep no retained state and report only what changes. The gateway asks each machine for a snapshot once it takes the line, so it learns every machine's current job before it acts on a change.
223
227
  - `retainedAlarms: true` says active alarms stay retained on the broker until they clear, as in the line protocol. A gateway taking the line then reads every active alarm back, and an alarm row whose alarm is missing has cleared. Without it, a machine's snapshot lists its active alarms (`alarms`), and an alarm row whose alarm a snapshot the machine sends no longer lists resolves `cleared`; a snapshot read back from the broker is never used for this, since it may be older than the alarms.
224
228
  - A receiver that reads only the carrier may report `arrived`, or `transfer-failed` with `unreadable-id`, with `carrierId` and no `unitId` or `jobId`. The gateway finds the unit an open handoff into that machine carries on that carrier.
225
- - Each command reaches `encode` with `attempt`, how many times this gateway has sent that `cmdId`, and `retry`, true when the machine may already have it: sent earlier, or its row existed before this gateway took the line. A protocol with a retransmission flag sets it from `retry`.
229
+ - Each command reaches `encode` with `attempt`, how many times this gateway has sent that `cmdId`, `retry`, true when the machine may already have it (sent earlier, or its row existed before this gateway took the line), and `issuedAt`, when it was issued. `issuedAt` is the same on every send of a `cmdId`, by this gateway or the next: a dispatch or a command row takes the start of its validity round, any other command the time of its first send. A protocol with a retransmission flag sets it from `retry` and stamps its time from `issuedAt`, so a resend repeats the first attempt with only the flag changed; the generic envelope's `at` is `issuedAt`.
226
230
  - When `encode` returns no messages, the machines have no such command. The gateway sends nothing and waits for nothing: a machine-command row resolves `unsupported`, and a cancel or snapshot the machines lack is logged as unsupported.
227
231
  - `rowOps` names the machines' own commands, beyond the line protocol's control ops and `snapshot`, that a machine-command row may ask for. Each goes through `encode` with the row's `args` and the row resolves with the reply. Every entry is a non-empty string; the gateway refuses to start on a codec whose entries are not.
228
232
  - A reply may carry `code`, a string the machine chooses, beside its `reason` text. The gateway puts it on the row as `code`, on a command row's resolution and on a `dispatch-refused` or `dispatch-failed` handoff, so a workflow branches on the code and a person reads the reason.
@@ -233,9 +237,9 @@ The generic protocol's topics are `{root}/{site}/{line}/{machine}/{channel}`. Ev
233
237
  | Channel | Purpose |
234
238
  |---|---|
235
239
  | `presence` (retained) | Birth and will, with the software version, a `sessionId` per connection, and on a goodbye the `reason` |
236
- | `snapshot` (retained) | Mode, recipe, jobs, alarms, counters, boot id |
240
+ | `snapshot` (retained) | Mode, enabled, jobs and alarms; recipe, counters, software and boot id when the machine keeps them |
237
241
  | `job` | Per unit: `queued`, `ready`, `arrived`, `bound`, `started`, `progress`, `finished`, `released`, `transfer-failed`, `withdrawn` |
238
- | `alarm/<id>` (retained while active) | Raise, acknowledgement, clear (with who cleared it) |
242
+ | `alarm/<id>` (retained while active) | Raise, acknowledgement, clear (with who cleared it); `needsPerson: true` on an alarm of any level asks for a person |
239
243
  | `telemetry` | Readings |
240
244
  | `report/<name>` | Production, availability, inventory and other reporting, kept in the stream |
241
245
  | `cmd` / `cmd/reply` | `dispatch`, `cancel`, `start`, `stop` (with `jobId`: that job, at a safe point), `pause`, `resume`, `changeover`, `ack-alarm`, `snapshot`; replies `accepted`, `completed`, `refused`, `failed`, with a `reason` and an optional `code`. Every command carries a `cmdId` (a repeat is answered, never run twice) and an expiry |
@@ -244,13 +248,15 @@ The generic protocol's topics are `{root}/{site}/{line}/{machine}/{channel}`. Ev
244
248
 
245
249
  | Row | Raised when | Resolved when |
246
250
  |---|---|---|
247
- | `line-alarm` | A stopping alarm (critical or emergency) is raised | The machine clears it (with who cleared it). If a person resolves it first, the gateway sends `ack-alarm` |
251
+ | `line-alarm` | A stopping alarm (critical or emergency) is raised, or one the machine flags `needsPerson`, at the level the machine said | The machine clears it (with who cleared it). If a person resolves it first, the gateway sends `ack-alarm` |
248
252
  | `machine-offline` | Presence goes offline past a debounce; the row's `reason` is the machine's, when its goodbye gave one | The machine is heard again |
249
253
  | `machine-quiet` | A connected machine sends nothing for `MACHINE_QUIET_MS` | It is heard again |
250
254
  | `contract-violation` | A strict codec decodes a message that breaks the contract. The row holds the raw message and the violations | A person resolves it |
255
+ | `handoff-error` (`unmatched-arrival`) | A machine reports an arrival no open handoff into it expects: a carrier no row carries, once every delivery has passed, or a read that found no id at all (`transfer-failed` with `failure: unreadable-id`, no unit, no carrier), at once. One row per machine and carrier, holding the raw arrival, so the unit is re-scanned or routed | A person resolves it; the next such arrival raises a row again |
256
+ | `quality-hold` | The example route's row for units a machine finished on hold (`sender-rejected` with `result: hold`), on the quality role | A person answers `release` (the hop runs again from the holding machine), `rework` with an optional `station` (the route runs again from that station), or `scrap` |
251
257
  | `machine-registration` | On a line that learns addresses, an address claims a station bound to another address, or an address bound to one station claims another | A person resolves it with `{ decision: 'approve' }`, which binds the station to the claimant, or `reject` |
252
258
 
253
- A replica taking a line reads back its learned addresses, its open handoff, command, alarm, offline, quiet and registration rows, and each open handoff's arrivals, so the receiver holds those units again. It then reads the machines' retained state, so a clear or a return that happened while no gateway was listening still resolves its row. A machine that restarts with a new boot id gets its accepted jobs dispatched again under the same command ids. An alarm id reused with a new raise time counts as a new alarm.
259
+ A replica taking a line reads back its learned addresses, its open handoff, command, alarm, offline, quiet and registration rows, and each open handoff's arrivals, so the receiver holds those units again. It then reads the machines' retained state, so a clear or a return that happened while no gateway was listening still resolves its row. A machine that restarts with a new boot id gets its accepted jobs dispatched again under the same command ids, and, from the gateway that sent them, the ready jobs of rows that already ended whose units it still holds; jobs it lost that no row and no memory covers are logged as unrecoverable. An alarm id reused with a new raise time counts as a new alarm.
254
260
 
255
261
  ## Lines view
256
262
 
@@ -277,9 +283,9 @@ interface WireEvent {
277
283
  }
278
284
  ```
279
285
 
280
- `actions` is what the gateway did with the message: the verbs it performed on rows, with the row ids (`claim`, `accumulate` with its `itemKey`, `resolve`, `create-row`), a verb Long Tail refused (`refuse`), a message held for a person under a strict codec (`hold`), one no row claimed after every delivery (`unmatched`), one the codec or the planner could not read (`unreadable`), one admitted with nothing to do (`ack`), and `none` with a `detail` for everything else: a message waiting for its row, a dispatch or command that went out because of it (the send is its own `out` record), an address no station claims. A record of a message read back from the broker on taking the line says `retained: true`.
286
+ `actions` is what the gateway did with the message: the verbs it performed on rows, with the row ids (`claim`, `accumulate` with its `itemKey`, `resolve`, `create-row`), a verb Long Tail refused (`refuse`), a message held for a person under a strict codec (`hold`), one no row claimed after every delivery (`unmatched`; an arrival then goes to a person as a `handoff-error` row), one the codec or the planner could not read (`unreadable`), one admitted with nothing to do (`ack`), and `none` with a `detail` for everything else: a message waiting for its row, a dispatch or command that went out because of it (the send is its own `out` record), an address no station claims. A record of a message read back from the broker on taking the line says `retained: true`.
281
287
 
282
- Telemetry messages are read live and are many: they join the wire record only with `MACHINE_WIRE_TELEMETRY=on`.
288
+ Telemetry messages are read live and are many: they join the wire record only with `MACHINE_WIRE_TELEMETRY=on`. The leader also keeps the line's last wire events in memory, readable over HTTP (`GET .../wire`, below), so a client outside the browser follows the tape without the event stream.
283
289
 
284
290
  The gateway log is published the same way, `machine.log.<site>.<line>.<event>` with the entry's level and context, where `<event>` is the log event without its `machine_gateway.` prefix as one token (`dispatch-accepted`, `verb-row_not_visible`). The console log keeps every entry as before.
285
291
 
@@ -291,6 +297,7 @@ The gateway log is published the same way, `machine.log.<site>.<line>.<event>` w
291
297
  | `PUT /api/machines/lines/:siteId/:lineId` `{ definition: LineDef, version? }` | Declares the line through the API (administrators): the definition is validated as `loadLine` validates a file and must name the site and line in the path, stored with `source: api`, its roles applied, and the line run on every replica. A `version` names the version the caller last read; a different one is 409. Answers `{ line: LineIndexRow }`; 400 names what the definition lacks, a version that is not a whole number, or a site or line that is not a topic level |
292
298
  | `DELETE /api/machines/lines/:siteId/:lineId` | Retires the line (administrators): the registry row goes, every replica stops it, its roles and bot accounts stay. 204, or 404 when there is no such line or the path is not a site and line |
293
299
  | `GET /api/machines/lines/:siteId/:lineId` | `LineViewResponse`: the `LineView` from the replica leading the line (`takenAt`, each machine's link with online, since, last seen, software, boot and session ids, held units with the rows they came in on, open row counts by kind with the offline and quiet row ids, alarms with their rows, the last snapshot's jobs, and the contested claims waiting for a person), or `{ siteId, lineId, leading: false }` from a replica standing by. Both carry `summary`, the `LineSummary` (machines, roles, addresses and the codec's ops), so the Lines view reads the line from any replica |
300
+ | `GET /api/machines/lines/:siteId/:lineId/wire?limit=&machine=&direction=&kind=&since=` | `LineWireResponse`: the line's last wire events from the replica leading it, newest first (`MACHINE_WIRE_WINDOW` of them kept, 500 by default and at most 500 per read), narrowed by machine, direction (`in`, `out`), kind and `since` (ISO 8601); builders read each event's `payload`, everyone else the record without it, as on the event stream. A replica standing by answers `leading: false` and no events. A test harness or a vendor's driver reads the tape here with a token and nothing else |
294
301
  | `POST /api/machines/lines/:siteId/:lineId/inspect` `{ topic, payload, retained? }` | A dry run on the leader: what the codec reads (`kind`, `event`, `summary`, `inspections`, `violations`) and the actions the gateway would take, planned on a copy of its state. Nothing is applied and no row is created; 409 on a replica that is not leading |
295
302
  | `POST /api/machines/lines/:siteId/:lineId/machines/:machineId/commands` `{ op, args }` | Parks a `machine-command` row on the machine's role as the caller, so that role's write access decides, and answers `{ rowId }`. `op` is a control op, `snapshot`, or one the codec declares (400 otherwise); an unknown machine is 404 |
296
303
 
@@ -321,13 +328,14 @@ The built-in `long-tail-machines` server offers the same surface to agents, gate
321
328
 
322
329
  - **Machines:** each machine logs in over MQTT 3.1.1 or 5 with its own certificate; the CN (`{site}-{line}-{address}`) is its username. The broker ACL lets it write only its own channels and read only its own commands. The line controller may command every machine on the line.
323
330
  - **Durable streams:** the bridge carries the line's topics one way into NATS, where only the bridge may publish them. JetStream keeps `LINE_EVENTS` (30 days) and `LINE_TELEMETRY` (3 days). The gateway reads through a durable consumer, `<controller>-events`, and may publish only JetStream requests and acks for its own streams and consumer; it cannot delete or purge them.
331
+ - **One site, several codecs:** the streams are ensured with the subjects of every codec the surface runs on the site, so lines on different roots share `LINE_EVENTS` and `LINE_TELEMETRY` whichever line starts last; a gateway whose consumer the stream would feed nothing refuses to start and says which subjects are missing.
324
332
  - **Where the streams live:** by default in Long Tail's messaging ([events](events.md#messaging)), whose NATS server must run JetStream. The bridge then logs in to that server's edge account for the line (`Machines.edgeAccountFor`), which may publish only the line's subjects, so the edge reaches nothing of Long Tail's. With `MACHINE_SITE_NATS_URL`, the streams live instead in a NATS server of the site's own (`Machines.renderSiteConf`), and Long Tail's NATS stays inside Long Tail. Either way the gateway reads the same streams under the same consumer name.
325
333
  - **Escalation events:** the gateway inside Long Tail reads them in process. A standalone gateway subscribes to them over Long Tail's messaging.
326
334
  - **Commands:** the gateway publishes commands to the machine broker at QoS 1, so they queue for a machine that is away.
327
335
  - **Bot accounts:** in Long Tail each machine is a bot account on its station and receiver roles, so `claimed_by` and `resolved_by` name the machine. The controller bot holds those roles and the operator role, and raises the operator rows. The bots are member accounts with no password, under names the line derives; the line will not start while a person's account holds one of those names.
328
336
  - **Rows are the authority:** an escalation event only tells the gateway which row to look at. It reads the row back as the controller and acts on the stored role, status and metadata. A row on a role the controller does not hold, or an event its stored row contradicts, does nothing.
329
337
  - **Roles carry the access:** dispatching to a machine or commanding one means parking a row on that machine's role, so Long Tail's role access decides who can. The gateway acts on a handoff into a machine only on that machine's role, and on a handoff to a person only on a receiver role. A row commands only the machine whose role it is on: cancelling a handoff withdraws the receiver's dispatch, and the sender's job is stopped only by a `cancel` command row on the sender's role.
330
- - **Rendering:** `Machines.renderSiteConf`, `renderMosquittoConf` and `renderMosquittoAcl(lines, codec)` render the configuration from one line or several on the same broker and site NATS: one bridge identity per line, one gateway user allowed every line's streams, and each line's stations and controller in the ACL. The ACL takes its topics from the codec's channels.
338
+ - **Rendering:** `Machines.renderSiteConf`, `renderMosquittoConf` and `renderMosquittoAcl(lines, codec)` render the configuration from one line or several on the same broker and site NATS: one bridge identity per line, one gateway user allowed every line's streams, and each line's stations and controller in the ACL. The ACL takes its topics from the codec's channels. Lines on different protocols pass a resolver instead of one codec, `renderMosquittoAcl(lines, (line) => codecOf(line))`, and a `root` resolver to `renderSiteConf` and `renderMosquittoConf`, so each line's bridge, subjects and ACL follow its own codec.
331
339
  - **Machines that host their own broker:** the machine broker connects out to each machine's broker with a Mosquitto bridge, carrying the machine's messages in and its commands out under the machine's level of the line's topics, and its codec reads them there. The bridge's notification topic, kept on the machine broker, is the machine's presence. `examples/workflows/bambu-printer` does this for 3D printers.
332
340
 
333
341
  ### Learned addresses
@@ -361,6 +369,7 @@ A line with `addressing: 'learned'` names its stations and lets each machine tel
361
369
  | `MACHINE_LIFECYCLE` | `off` | `on` notes each job's start, progress steps and pauses on the row that holds it |
362
370
  | `MACHINE_PROGRESS_STEP` | `25` | With lifecycle notes on, progress is noted each time it crosses this many percent; `0` notes none |
363
371
  | `MACHINE_WIRE_TELEMETRY` | `off` | `on` publishes telemetry messages on the wire record too ([Lines view](#lines-view)) |
372
+ | `MACHINE_WIRE_WINDOW` | `500` | How many of a line's last wire events its leader keeps for `GET .../wire` |
364
373
  | `MACHINE_CODEC_MODULE` | | Development server only: a module whose `createCodec(line)` speaks the machines' protocol, for a single line |
365
374
 
366
375
  ## Testing a codec or adapter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/long-tail",
3
- "version": "0.28.0",
3
+ "version": "0.28.1",
4
4
  "description": "Long Tail Workflows — Durable AI workflows with human-in-the-loop escalation. Powered by PostgreSQL.",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",