wicked-crew 0.18.18 → 0.18.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/dist/api/ask-paths.d.ts +2 -0
- package/dist/api/ask-paths.d.ts.map +1 -1
- package/dist/api/ask-paths.js +6 -0
- package/dist/api/ask-paths.js.map +1 -1
- package/dist/api/auth.d.ts +7 -5
- package/dist/api/auth.d.ts.map +1 -1
- package/dist/api/auth.js +23 -9
- package/dist/api/auth.js.map +1 -1
- package/dist/api/chat-attachments.d.ts.map +1 -1
- package/dist/api/chat-attachments.js +69 -19
- package/dist/api/chat-attachments.js.map +1 -1
- package/dist/api/chat-citations.d.ts.map +1 -1
- package/dist/api/chat-citations.js +22 -0
- package/dist/api/chat-citations.js.map +1 -1
- package/dist/api/chat-context.d.ts +4 -1
- package/dist/api/chat-context.d.ts.map +1 -1
- package/dist/api/chat-context.js +15 -9
- package/dist/api/chat-context.js.map +1 -1
- package/dist/api/chat-history.d.ts +13 -0
- package/dist/api/chat-history.d.ts.map +1 -1
- package/dist/api/chat-history.js +25 -0
- package/dist/api/chat-history.js.map +1 -1
- package/dist/api/chat-jobs.d.ts +15 -6
- package/dist/api/chat-jobs.d.ts.map +1 -1
- package/dist/api/chat-jobs.js +48 -19
- package/dist/api/chat-jobs.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +36 -7
- package/dist/api/chat-proposals.d.ts.map +1 -1
- package/dist/api/chat-proposals.js +224 -52
- package/dist/api/chat-proposals.js.map +1 -1
- package/dist/api/chat-scope.d.ts +18 -9
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +62 -23
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/cluster-status.js +1 -1
- package/dist/api/cluster-status.js.map +1 -1
- package/dist/api/codebase-archive.d.ts +4 -3
- package/dist/api/codebase-archive.d.ts.map +1 -1
- package/dist/api/codebase-archive.js +4 -3
- package/dist/api/codebase-archive.js.map +1 -1
- package/dist/api/delivery-index.d.ts.map +1 -1
- package/dist/api/delivery-index.js +13 -0
- package/dist/api/delivery-index.js.map +1 -1
- package/dist/api/gate-cache.d.ts +1 -0
- package/dist/api/gate-cache.d.ts.map +1 -1
- package/dist/api/gate-cache.js +19 -6
- package/dist/api/gate-cache.js.map +1 -1
- package/dist/api/governance-steering.d.ts +4 -4
- package/dist/api/mcp.d.ts +10 -2
- package/dist/api/mcp.d.ts.map +1 -1
- package/dist/api/mcp.js +54 -13
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/needs.js +1 -1
- package/dist/api/needs.js.map +1 -1
- package/dist/api/product.d.ts +1 -1
- package/dist/api/proposal-onboard.d.ts +9 -1
- package/dist/api/proposal-onboard.d.ts.map +1 -1
- package/dist/api/proposal-onboard.js +41 -3
- package/dist/api/proposal-onboard.js.map +1 -1
- package/dist/api/recording.d.ts +1 -1
- package/dist/api/redeliver.d.ts +48 -0
- package/dist/api/redeliver.d.ts.map +1 -0
- package/dist/api/redeliver.js +178 -0
- package/dist/api/redeliver.js.map +1 -0
- package/dist/api/requirements.d.ts +2 -16
- package/dist/api/requirements.d.ts.map +1 -1
- package/dist/api/requirements.js.map +1 -1
- package/dist/api/retry-index.d.ts +2 -0
- package/dist/api/retry-index.d.ts.map +1 -1
- package/dist/api/retry-index.js +16 -8
- package/dist/api/retry-index.js.map +1 -1
- package/dist/api/roster-standing.d.ts +5 -1
- package/dist/api/roster-standing.d.ts.map +1 -1
- package/dist/api/roster-standing.js +10 -3
- package/dist/api/roster-standing.js.map +1 -1
- package/dist/api/routes.d.ts +31 -9
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +572 -181
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-base-notice.d.ts +5 -0
- package/dist/api/run-base-notice.d.ts.map +1 -0
- package/dist/api/run-base-notice.js +15 -0
- package/dist/api/run-base-notice.js.map +1 -0
- package/dist/api/run-documents.d.ts +9 -1
- package/dist/api/run-documents.d.ts.map +1 -1
- package/dist/api/run-documents.js +63 -5
- package/dist/api/run-documents.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +2 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +62 -86
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/seat-container-login.js +2 -2
- package/dist/api/seat-container-login.js.map +1 -1
- package/dist/api/seat-probe.d.ts +6 -5
- package/dist/api/seat-probe.d.ts.map +1 -1
- package/dist/api/seat-probe.js +11 -7
- package/dist/api/seat-probe.js.map +1 -1
- package/dist/api/seat-standing.js +4 -4
- package/dist/api/seat-standing.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +92 -25
- package/dist/api/server.js.map +1 -1
- package/dist/api/stall-watchdog.d.ts +6 -0
- package/dist/api/stall-watchdog.d.ts.map +1 -1
- package/dist/api/stall-watchdog.js +28 -0
- package/dist/api/stall-watchdog.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +5 -0
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +20 -9
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/testing.d.ts +2 -2
- package/dist/api/ui-text.js +2 -2
- package/dist/api/ui-text.js.map +1 -1
- package/dist/apps/actions/api-action.js +5 -2
- package/dist/apps/actions/api-action.js.map +1 -1
- package/dist/apps/actions/write-path.d.ts +9 -0
- package/dist/apps/actions/write-path.d.ts.map +1 -1
- package/dist/apps/actions/write-path.js +17 -9
- package/dist/apps/actions/write-path.js.map +1 -1
- package/dist/apps/exec/executor.d.ts +8 -15
- package/dist/apps/exec/executor.d.ts.map +1 -1
- package/dist/apps/exec/executor.js +10 -3
- package/dist/apps/exec/executor.js.map +1 -1
- package/dist/apps/exec/redescribe.d.ts +37 -0
- package/dist/apps/exec/redescribe.d.ts.map +1 -0
- package/dist/apps/exec/redescribe.js +86 -0
- package/dist/apps/exec/redescribe.js.map +1 -0
- package/dist/apps/exec/source-stage.d.ts +3 -1
- package/dist/apps/exec/source-stage.d.ts.map +1 -1
- package/dist/apps/exec/source-stage.js +13 -3
- package/dist/apps/exec/source-stage.js.map +1 -1
- package/dist/apps/exec/sources.d.ts +6 -0
- package/dist/apps/exec/sources.d.ts.map +1 -1
- package/dist/apps/exec/sources.js +8 -0
- package/dist/apps/exec/sources.js.map +1 -1
- package/dist/apps/publish/manifest.d.ts +6 -1
- package/dist/apps/publish/manifest.d.ts.map +1 -1
- package/dist/apps/publish/manifest.js +6 -0
- package/dist/apps/publish/manifest.js.map +1 -1
- package/dist/apps/publish/run.d.ts +4 -1
- package/dist/apps/publish/run.d.ts.map +1 -1
- package/dist/apps/publish/run.js +4 -1
- package/dist/apps/publish/run.js.map +1 -1
- package/dist/apps/routes.d.ts +1 -0
- package/dist/apps/routes.d.ts.map +1 -1
- package/dist/apps/routes.js +13 -0
- package/dist/apps/routes.js.map +1 -1
- package/dist/apps-server/Dockerfile +2 -2
- package/dist/apps-server/runners/sqlite-runner.mjs +28 -11
- package/dist/apps-server/server/lib/bundle/server.mjs +348 -150
- package/dist/cli/governance.d.ts +5 -2
- package/dist/cli/governance.d.ts.map +1 -1
- package/dist/cli/governance.js +8 -5
- package/dist/cli/governance.js.map +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +8 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/service.d.ts +12 -6
- package/dist/cli/service.d.ts.map +1 -1
- package/dist/cli/service.js +53 -23
- package/dist/cli/service.js.map +1 -1
- package/dist/core/adapter.d.ts +44 -23
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +158 -60
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/assurance.d.ts +37 -44
- package/dist/core/assurance.d.ts.map +1 -1
- package/dist/core/assurance.js +53 -69
- package/dist/core/assurance.js.map +1 -1
- package/dist/core/bridge-reaper.d.ts +4 -3
- package/dist/core/bridge-reaper.d.ts.map +1 -1
- package/dist/core/bridge-reaper.js +24 -8
- package/dist/core/bridge-reaper.js.map +1 -1
- package/dist/core/deliver-exclusions.d.ts +5 -2
- package/dist/core/deliver-exclusions.d.ts.map +1 -1
- package/dist/core/deliver-exclusions.js +5 -2
- package/dist/core/deliver-exclusions.js.map +1 -1
- package/dist/core/deliver-text.d.ts +12 -0
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +40 -2
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/deliver.d.ts +27 -0
- package/dist/core/deliver.d.ts.map +1 -1
- package/dist/core/deliver.js +162 -39
- package/dist/core/deliver.js.map +1 -1
- package/dist/core/engine-roster.d.ts +2 -0
- package/dist/core/engine-roster.d.ts.map +1 -1
- package/dist/core/engine-roster.js +13 -0
- package/dist/core/engine-roster.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts +13 -14
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +47 -62
- package/dist/core/estate-mcp-client.js.map +1 -1
- package/dist/core/pr-checks-helper.d.ts +8 -4
- package/dist/core/pr-checks-helper.d.ts.map +1 -1
- package/dist/core/pr-checks-helper.js +39 -17
- package/dist/core/pr-checks-helper.js.map +1 -1
- package/dist/core/redeliver.d.ts +16 -0
- package/dist/core/redeliver.d.ts.map +1 -0
- package/dist/core/redeliver.js +64 -0
- package/dist/core/redeliver.js.map +1 -0
- package/dist/core/repoPaths.d.ts +2 -4
- package/dist/core/repoPaths.d.ts.map +1 -1
- package/dist/core/repoPaths.js +4 -6
- package/dist/core/repoPaths.js.map +1 -1
- package/dist/core/threadpool.d.ts +3 -0
- package/dist/core/threadpool.d.ts.map +1 -0
- package/dist/core/threadpool.js +14 -0
- package/dist/core/threadpool.js.map +1 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -1
- package/dist/decisions/rules-brief.d.ts +2 -0
- package/dist/decisions/rules-brief.d.ts.map +1 -1
- package/dist/decisions/rules-brief.js.map +1 -1
- package/dist/editors/csp.d.ts +6 -0
- package/dist/editors/csp.d.ts.map +1 -1
- package/dist/editors/csp.js +10 -0
- package/dist/editors/csp.js.map +1 -1
- package/dist/editors/pack-install.d.ts.map +1 -1
- package/dist/editors/pack-install.js +1 -0
- package/dist/editors/pack-install.js.map +1 -1
- package/dist/editors/registry.d.ts +5 -1
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +16 -3
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.d.ts +4 -2
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +23 -6
- package/dist/editors/routes.js.map +1 -1
- package/dist/evals/shape-corrections.js +1 -1
- package/dist/evals/shape-corrections.js.map +1 -1
- package/dist/evals/workflow.d.ts.map +1 -1
- package/dist/evals/workflow.js +1 -0
- package/dist/evals/workflow.js.map +1 -1
- package/dist/governance/rule-revision.d.ts +7 -0
- package/dist/governance/rule-revision.d.ts.map +1 -0
- package/dist/governance/rule-revision.js +23 -0
- package/dist/governance/rule-revision.js.map +1 -0
- package/dist/insights/review-service.d.ts +2 -0
- package/dist/insights/review-service.d.ts.map +1 -1
- package/dist/insights/review-service.js +27 -0
- package/dist/insights/review-service.js.map +1 -1
- package/dist/interactive/bridge-pool.d.ts +2 -0
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +12 -4
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/chat-events.d.ts +3 -0
- package/dist/interactive/chat-events.d.ts.map +1 -1
- package/dist/interactive/chat-events.js +13 -4
- package/dist/interactive/chat-events.js.map +1 -1
- package/dist/interactive/council-outcome.js +1 -1
- package/dist/interactive/council-outcome.js.map +1 -1
- package/dist/interactive/doc-delete-routes.d.ts +1 -0
- package/dist/interactive/doc-delete-routes.d.ts.map +1 -1
- package/dist/interactive/doc-delete-routes.js +126 -123
- package/dist/interactive/doc-delete-routes.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +8 -7
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +24 -14
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/proposal-create.d.ts +9 -11
- package/dist/interactive/proposal-create.d.ts.map +1 -1
- package/dist/interactive/proposal-create.js +27 -21
- package/dist/interactive/proposal-create.js.map +1 -1
- package/dist/interactive/proposal-refine.d.ts +4 -4
- package/dist/interactive/proposal-refine.d.ts.map +1 -1
- package/dist/interactive/proposal-refine.js +25 -7
- package/dist/interactive/proposal-refine.js.map +1 -1
- package/dist/interactive/proxy-routes.d.ts +10 -5
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +108 -11
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +5 -1
- package/dist/interactive/source-packet.d.ts.map +1 -1
- package/dist/interactive/source-packet.js +62 -29
- package/dist/interactive/source-packet.js.map +1 -1
- package/dist/knowledge/adapters/toolbox/memory.d.ts +2 -0
- package/dist/knowledge/adapters/toolbox/memory.d.ts.map +1 -0
- package/dist/knowledge/adapters/toolbox/memory.js +43 -0
- package/dist/knowledge/adapters/toolbox/memory.js.map +1 -0
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts +9 -3
- package/dist/knowledge/adapters/toolbox/supervisor.d.ts.map +1 -1
- package/dist/knowledge/adapters/toolbox/supervisor.js +40 -6
- package/dist/knowledge/adapters/toolbox/supervisor.js.map +1 -1
- package/dist/knowledge/gate/gate.d.ts.map +1 -1
- package/dist/knowledge/gate/gate.js +4 -1
- package/dist/knowledge/gate/gate.js.map +1 -1
- package/dist/knowledge/gate/record.d.ts +15 -2
- package/dist/knowledge/gate/record.d.ts.map +1 -1
- package/dist/knowledge/gate/record.js +108 -29
- package/dist/knowledge/gate/record.js.map +1 -1
- package/dist/knowledge/registry/entry.d.ts +7 -0
- package/dist/knowledge/registry/entry.d.ts.map +1 -1
- package/dist/knowledge/registry/entry.js +4 -0
- package/dist/knowledge/registry/entry.js.map +1 -1
- package/dist/learn/scheduler.d.ts.map +1 -1
- package/dist/learn/scheduler.js +2 -1
- package/dist/learn/scheduler.js.map +1 -1
- package/dist/learnings/estate.d.ts.map +1 -1
- package/dist/learnings/estate.js +3 -14
- package/dist/learnings/estate.js.map +1 -1
- package/dist/learnings/extract.d.ts +7 -12
- package/dist/learnings/extract.d.ts.map +1 -1
- package/dist/learnings/extract.js +9 -40
- package/dist/learnings/extract.js.map +1 -1
- package/dist/learnings/service.d.ts +12 -15
- package/dist/learnings/service.d.ts.map +1 -1
- package/dist/learnings/service.js +23 -43
- package/dist/learnings/service.js.map +1 -1
- package/dist/mcp/broker.js +1 -1
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/env.d.ts +12 -4
- package/dist/mcp/env.d.ts.map +1 -1
- package/dist/mcp/env.js +27 -7
- package/dist/mcp/env.js.map +1 -1
- package/dist/mcp/estate-relay.d.ts.map +1 -1
- package/dist/mcp/estate-relay.js +2 -4
- package/dist/mcp/estate-relay.js.map +1 -1
- package/dist/mcp/invoke.d.ts.map +1 -1
- package/dist/mcp/invoke.js +4 -3
- package/dist/mcp/invoke.js.map +1 -1
- package/dist/mcp/probe.d.ts +14 -1
- package/dist/mcp/probe.d.ts.map +1 -1
- package/dist/mcp/probe.js +55 -10
- package/dist/mcp/probe.js.map +1 -1
- package/dist/mcp/registry-store.d.ts +12 -0
- package/dist/mcp/registry-store.d.ts.map +1 -1
- package/dist/mcp/registry-store.js +10 -0
- package/dist/mcp/registry-store.js.map +1 -1
- package/dist/mcp/registry.d.ts +13 -5
- package/dist/mcp/registry.d.ts.map +1 -1
- package/dist/mcp/registry.js +64 -12
- package/dist/mcp/registry.js.map +1 -1
- package/dist/mcp/rest.js +1 -1
- package/dist/mcp/rest.js.map +1 -1
- package/dist/mcp/secrets.d.ts +1 -1
- package/dist/mcp/secrets.d.ts.map +1 -1
- package/dist/mcp/secrets.js +10 -11
- package/dist/mcp/secrets.js.map +1 -1
- package/dist/mcp/upstream-error.d.ts +1 -1
- package/dist/mcp/upstream-error.d.ts.map +1 -1
- package/dist/projects/auto-refresh.d.ts +21 -0
- package/dist/projects/auto-refresh.d.ts.map +1 -1
- package/dist/projects/auto-refresh.js +55 -1
- package/dist/projects/auto-refresh.js.map +1 -1
- package/dist/projects/graph.d.ts +49 -2
- package/dist/projects/graph.d.ts.map +1 -1
- package/dist/projects/graph.js +334 -23
- package/dist/projects/graph.js.map +1 -1
- package/dist/projects/repo-watch.d.ts +2 -2
- package/dist/projects/repo-watch.d.ts.map +1 -1
- package/dist/projects/repo-watch.js +26 -9
- package/dist/projects/repo-watch.js.map +1 -1
- package/dist/projects/routes.d.ts +2 -0
- package/dist/projects/routes.d.ts.map +1 -1
- package/dist/projects/routes.js +50 -1
- package/dist/projects/routes.js.map +1 -1
- package/dist/projects/state-home-registry.d.ts.map +1 -1
- package/dist/projects/state-home-registry.js +3 -0
- package/dist/projects/state-home-registry.js.map +1 -1
- package/dist/projects/state-home.d.ts +7 -0
- package/dist/projects/state-home.d.ts.map +1 -1
- package/dist/projects/state-home.js +11 -0
- package/dist/projects/state-home.js.map +1 -1
- package/dist/qe/author-workflow.d.ts +4 -0
- package/dist/qe/author-workflow.d.ts.map +1 -1
- package/dist/qe/author-workflow.js +4 -0
- package/dist/qe/author-workflow.js.map +1 -1
- package/dist/qe/test-sets.d.ts +4 -5
- package/dist/qe/test-sets.d.ts.map +1 -1
- package/dist/qe/test-sets.js +2 -1
- package/dist/qe/test-sets.js.map +1 -1
- package/dist/schedules/scheduler.d.ts +40 -1
- package/dist/schedules/scheduler.d.ts.map +1 -1
- package/dist/schedules/scheduler.js +175 -13
- package/dist/schedules/scheduler.js.map +1 -1
- package/dist/schedules/store.d.ts +20 -0
- package/dist/schedules/store.d.ts.map +1 -1
- package/dist/schedules/store.js +17 -0
- package/dist/schedules/store.js.map +1 -1
- package/dist/sources/ask.d.ts.map +1 -1
- package/dist/sources/ask.js +12 -12
- package/dist/sources/ask.js.map +1 -1
- package/dist/sources/dialer.d.ts +6 -1
- package/dist/sources/dialer.d.ts.map +1 -1
- package/dist/sources/dialer.js +53 -31
- package/dist/sources/dialer.js.map +1 -1
- package/dist/sources/drivers/mysql.d.ts +2 -0
- package/dist/sources/drivers/mysql.d.ts.map +1 -1
- package/dist/sources/drivers/mysql.js +18 -2
- package/dist/sources/drivers/mysql.js.map +1 -1
- package/dist/sources/drivers/postgres.d.ts +2 -0
- package/dist/sources/drivers/postgres.d.ts.map +1 -1
- package/dist/sources/drivers/postgres.js +10 -3
- package/dist/sources/drivers/postgres.js.map +1 -1
- package/dist/sources/drivers/sqlite.d.ts +22 -5
- package/dist/sources/drivers/sqlite.d.ts.map +1 -1
- package/dist/sources/drivers/sqlite.js +10 -9
- package/dist/sources/drivers/sqlite.js.map +1 -1
- package/dist/sources/drivers/types.d.ts +3 -1
- package/dist/sources/drivers/types.d.ts.map +1 -1
- package/dist/sources/drivers/types.js +3 -1
- package/dist/sources/drivers/types.js.map +1 -1
- package/dist/sources/routes.js +1 -1
- package/dist/sources/routes.js.map +1 -1
- package/dist/sources/uploads.d.ts +2 -15
- package/dist/sources/uploads.d.ts.map +1 -1
- package/dist/sources/uploads.js +30 -440
- package/dist/sources/uploads.js.map +1 -1
- package/dist/standing-orders/history.d.ts +5 -3
- package/dist/standing-orders/history.d.ts.map +1 -1
- package/dist/standing-orders/history.js +6 -2
- package/dist/standing-orders/history.js.map +1 -1
- package/dist/standing-orders/parse.js +1 -1
- package/dist/standing-orders/parse.js.map +1 -1
- package/dist/studio/apps-standalone/fixture.js +3 -3
- package/dist/studio/apps-standalone/runtime.js +1 -1
- package/dist/studio/assets/{KnowledgeGraph-JfsMExo3.js → KnowledgeGraph-dfq7Flyj.js} +1 -1
- package/dist/studio/assets/index-Bame65hj.js +1108 -0
- package/dist/studio/assets/index-CtB1BJRI.css +32 -0
- package/dist/studio/editors/wicked-apps/editor.json +1 -1
- package/dist/studio/editors/wicked-apps/index.html +2 -2
- package/dist/studio/editors/wicked-deck/editor.json +1 -1
- package/dist/studio/editors/wicked-deck/index.html +14 -14
- package/dist/studio/editors/wicked-doc/editor.json +1 -1
- package/dist/studio/editors/wicked-doc/index.html +12 -12
- package/dist/studio/editors/wicked-insights/editor.json +1 -1
- package/dist/studio/editors/wicked-insights/index.html +2 -2
- package/dist/studio/editors/wicked-page/editor.json +1 -1
- package/dist/studio/editors/wicked-page/index.html +12 -12
- package/dist/studio/editors/wicked-video/editor.json +1 -1
- package/dist/studio/editors/wicked-video/index.html +10 -10
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +432 -11
- package/dist/team/routes.d.ts +11 -1
- package/dist/team/routes.d.ts.map +1 -1
- package/dist/team/routes.js +6 -3
- package/dist/team/routes.js.map +1 -1
- package/dist/workflow-catalog/catalog-data-v2.d.ts +6 -2
- package/dist/workflow-catalog/catalog-data-v2.d.ts.map +1 -1
- package/dist/workflow-catalog/catalog-data-v2.js.map +1 -1
- package/dist/workflow-catalog/shape.d.ts +1 -1
- package/dist/working-doc/event-lines.d.ts +11 -0
- package/dist/working-doc/event-lines.d.ts.map +1 -1
- package/dist/working-doc/event-lines.js +32 -5
- package/dist/working-doc/event-lines.js.map +1 -1
- package/dist/working-doc/notes-index.d.ts.map +1 -1
- package/dist/working-doc/notes-index.js +2 -2
- package/dist/working-doc/notes-index.js.map +1 -1
- package/endpoint-manifest.json +114 -6
- package/evals/corpora/shape-v1.json +1 -1
- package/package.json +4 -4
- package/runners/sqlite-runner.mjs +28 -11
- package/runners/upload-parse.d.mts +13 -0
- package/runners/upload-parse.mjs +364 -0
- package/workflows/distill-learnings.json +2 -2
- package/dist/studio/assets/index-CkosDNYp.css +0 -32
- package/dist/studio/assets/index-pq0QeOmo.js +0 -1109
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
// Upload parsers live only in the killable runner child (crew#1289). Limits come from uploads.ts.
|
|
2
|
+
import { inflateRawSync } from 'node:zlib';
|
|
3
|
+
|
|
4
|
+
const refusal = (code, message) => ({ code, message });
|
|
5
|
+
|
|
6
|
+
// ── CSV ──────────────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
function detectDelimiter(text) {
|
|
9
|
+
// The first record, with quoted fields taken out (a quoted field may hold any delimiter).
|
|
10
|
+
let first = '';
|
|
11
|
+
let quoted = false;
|
|
12
|
+
for (let i = 0; i < text.length && i < 1_000_000; i++) {
|
|
13
|
+
const c = text[i];
|
|
14
|
+
if (c === '"') quoted = !quoted;
|
|
15
|
+
else if (!quoted && (c === '\n' || c === '\r')) break;
|
|
16
|
+
else if (!quoted) first += c;
|
|
17
|
+
}
|
|
18
|
+
const counts = [',', ';', '\t'].map((d) => [d, first.split(d).length]);
|
|
19
|
+
return counts.sort((a, b) => b[1] - a[1])[0]?.[0] ?? ',';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** RFC 4180 rows (quoted fields, doubled quotes, CRLF or LF), bounded by the limits. */
|
|
23
|
+
export function parseCsv(text, limits) {
|
|
24
|
+
const d = detectDelimiter(text);
|
|
25
|
+
const rows = [];
|
|
26
|
+
let row = [];
|
|
27
|
+
let field = '';
|
|
28
|
+
let i = 0;
|
|
29
|
+
let quoted = false;
|
|
30
|
+
const n = text.length;
|
|
31
|
+
const endRow = () => {
|
|
32
|
+
row.push(field);
|
|
33
|
+
field = '';
|
|
34
|
+
if (!(row.length === 1 && row[0] === '')) {
|
|
35
|
+
if (row.length > limits.columns) throw refusal('too_many_columns', `the file has more than ${limits.columns} columns`);
|
|
36
|
+
rows.push(row);
|
|
37
|
+
if (rows.length > limits.rows + 1) throw refusal('too_many_rows', `the file has more than ${limits.rows} rows`);
|
|
38
|
+
}
|
|
39
|
+
row = [];
|
|
40
|
+
};
|
|
41
|
+
while (i < n) {
|
|
42
|
+
const c = text[i];
|
|
43
|
+
if (quoted) {
|
|
44
|
+
if (c === '"') {
|
|
45
|
+
if (text[i + 1] === '"') {
|
|
46
|
+
field += '"';
|
|
47
|
+
i += 2;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
quoted = false;
|
|
51
|
+
i++;
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
field += c;
|
|
55
|
+
i++;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (c === '"' && field === '') {
|
|
59
|
+
quoted = true;
|
|
60
|
+
i++;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (c === d) {
|
|
64
|
+
row.push(field);
|
|
65
|
+
field = '';
|
|
66
|
+
if (row.length > limits.columns) throw refusal('too_many_columns', `the file has more than ${limits.columns} columns`);
|
|
67
|
+
i++;
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (c === '\r' && text[i + 1] === '\n') {
|
|
71
|
+
endRow();
|
|
72
|
+
i += 2;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (c === '\n' || c === '\r') {
|
|
76
|
+
endRow();
|
|
77
|
+
i++;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
field += c;
|
|
81
|
+
i++;
|
|
82
|
+
}
|
|
83
|
+
if (quoted) throw refusal('bad_csv', 'the file ends inside a quoted field');
|
|
84
|
+
if (field !== '' || row.length > 0) endRow();
|
|
85
|
+
return rows;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ── XLSX (a zip of XML) ──────────────────────────────────────────────────────────────────────
|
|
89
|
+
|
|
90
|
+
function zipEntries(buf) {
|
|
91
|
+
const min = Math.max(0, buf.length - 65_557);
|
|
92
|
+
let eocd = -1;
|
|
93
|
+
for (let i = buf.length - 22; i >= min; i--) {
|
|
94
|
+
if (buf.readUInt32LE(i) === 0x06054b50) {
|
|
95
|
+
eocd = i;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (eocd < 0) throw refusal('bad_xlsx', 'the file is not an XLSX workbook (no zip directory)');
|
|
100
|
+
const count = buf.readUInt16LE(eocd + 10);
|
|
101
|
+
const cdSize = buf.readUInt32LE(eocd + 12);
|
|
102
|
+
const cdOffset = buf.readUInt32LE(eocd + 16);
|
|
103
|
+
if (count === 0xffff || cdOffset === 0xffffffff || cdSize === 0xffffffff) throw refusal('bad_xlsx', 'zip64 workbooks are not supported');
|
|
104
|
+
if (cdOffset + cdSize > buf.length) throw refusal('bad_xlsx', 'the zip directory points past the end of the file');
|
|
105
|
+
const out = [];
|
|
106
|
+
let p = cdOffset;
|
|
107
|
+
for (let k = 0; k < count; k++) {
|
|
108
|
+
if (p + 46 > buf.length || buf.readUInt32LE(p) !== 0x02014b50) throw refusal('bad_xlsx', 'a damaged zip directory');
|
|
109
|
+
const flags = buf.readUInt16LE(p + 8);
|
|
110
|
+
const method = buf.readUInt16LE(p + 10);
|
|
111
|
+
const compressedSize = buf.readUInt32LE(p + 20);
|
|
112
|
+
const size = buf.readUInt32LE(p + 24);
|
|
113
|
+
const nameLen = buf.readUInt16LE(p + 28);
|
|
114
|
+
const extraLen = buf.readUInt16LE(p + 30);
|
|
115
|
+
const commentLen = buf.readUInt16LE(p + 32);
|
|
116
|
+
const localOffset = buf.readUInt32LE(p + 42);
|
|
117
|
+
const name = buf.subarray(p + 46, p + 46 + nameLen).toString('utf8');
|
|
118
|
+
out.push({ name, method, flags, compressedSize, size, localOffset });
|
|
119
|
+
p += 46 + nameLen + extraLen + commentLen;
|
|
120
|
+
}
|
|
121
|
+
return out;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
class ZipReader {
|
|
125
|
+
expanded = 0;
|
|
126
|
+
constructor(buf, entries, limits) {
|
|
127
|
+
this.buf = buf;
|
|
128
|
+
this.entries = entries;
|
|
129
|
+
this.limits = limits;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
has(name) {
|
|
133
|
+
return this.entries.some((e) => e.name === name);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** One entry's bytes, inflated with the remaining expansion budget as a HARD cap. */
|
|
137
|
+
read(name) {
|
|
138
|
+
const e = this.entries.find((x) => x.name === name);
|
|
139
|
+
if (e === undefined) throw refusal('bad_xlsx', `the workbook has no ${name}`);
|
|
140
|
+
if ((e.flags & 0x1) !== 0) throw refusal('bad_xlsx', 'encrypted workbooks are not supported');
|
|
141
|
+
const p = e.localOffset;
|
|
142
|
+
if (p + 30 > this.buf.length || this.buf.readUInt32LE(p) !== 0x04034b50) throw refusal('bad_xlsx', 'a damaged zip entry');
|
|
143
|
+
const start = p + 30 + this.buf.readUInt16LE(p + 26) + this.buf.readUInt16LE(p + 28);
|
|
144
|
+
const data = this.buf.subarray(start, start + e.compressedSize);
|
|
145
|
+
const budget = this.limits.expandedBytes - this.expanded;
|
|
146
|
+
if (e.size > budget) throw refusal('too_large', `the workbook expands past ${this.limits.expandedBytes / (1024 * 1024)} MB`);
|
|
147
|
+
let bytes;
|
|
148
|
+
if (e.method === 0) bytes = Buffer.from(data);
|
|
149
|
+
else if (e.method === 8) {
|
|
150
|
+
try {
|
|
151
|
+
bytes = inflateRawSync(data, { maxOutputLength: Math.max(1, budget) });
|
|
152
|
+
} catch (err) {
|
|
153
|
+
const code = err.code;
|
|
154
|
+
if (code === 'ERR_BUFFER_TOO_LARGE' || /buffer|too large|maxOutputLength/i.test(String(err.message))) {
|
|
155
|
+
throw refusal('too_large', `the workbook expands past ${this.limits.expandedBytes / (1024 * 1024)} MB`);
|
|
156
|
+
}
|
|
157
|
+
throw refusal('bad_xlsx', `a zip entry could not be inflated: ${err.message}`);
|
|
158
|
+
}
|
|
159
|
+
} else throw refusal('bad_xlsx', `zip method ${e.method} is not supported`);
|
|
160
|
+
this.expanded += bytes.length;
|
|
161
|
+
if (this.expanded > this.limits.expandedBytes) throw refusal('too_large', `the workbook expands past ${this.limits.expandedBytes / (1024 * 1024)} MB`);
|
|
162
|
+
return bytes.toString('utf8');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function xmlText(s) {
|
|
167
|
+
return s
|
|
168
|
+
.replace(/&#x([0-9a-fA-F]+);/g, (_m, h) => String.fromCodePoint(parseInt(h, 16)))
|
|
169
|
+
.replace(/&#(\d+);/g, (_m, d) => String.fromCodePoint(Number(d)))
|
|
170
|
+
.replace(/</g, '<')
|
|
171
|
+
.replace(/>/g, '>')
|
|
172
|
+
.replace(/"/g, '"')
|
|
173
|
+
.replace(/'/g, "'")
|
|
174
|
+
.replace(/&/g, '&');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function attr(tag, name) {
|
|
178
|
+
const m = new RegExp(`\\s${name}="([^"]*)"`).exec(tag);
|
|
179
|
+
return m === null ? null : xmlText(m[1]);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function colIndex(ref) {
|
|
183
|
+
const letters = /^([A-Z]+)/.exec(ref)?.[1] ?? 'A';
|
|
184
|
+
let n = 0;
|
|
185
|
+
for (const ch of letters) n = n * 26 + (ch.charCodeAt(0) - 64);
|
|
186
|
+
return n - 1;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The bodies of `<tag …>…</tag>` (and `<tag …/>`) in order, scanned linearly. An element whose end
|
|
191
|
+
* never comes ends the scan. `withHead` also answers the opening tag (for attributes).
|
|
192
|
+
*/
|
|
193
|
+
function* elements(xml, tag, withHead = false) {
|
|
194
|
+
const open = `<${tag}`;
|
|
195
|
+
const close = `</${tag}>`;
|
|
196
|
+
let at = 0;
|
|
197
|
+
for (;;) {
|
|
198
|
+
let i = xml.indexOf(open, at);
|
|
199
|
+
while (i >= 0 && !/[\s>/]/.test(xml[i + open.length] ?? '')) i = xml.indexOf(open, i + 1);
|
|
200
|
+
if (i < 0) return;
|
|
201
|
+
const headEnd = xml.indexOf('>', i);
|
|
202
|
+
if (headEnd < 0) return;
|
|
203
|
+
const head = xml.slice(i, headEnd + 1);
|
|
204
|
+
if (head.endsWith('/>')) {
|
|
205
|
+
yield withHead ? { head, body: '' } : '';
|
|
206
|
+
at = headEnd + 1;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const end = xml.indexOf(close, headEnd + 1);
|
|
210
|
+
if (end < 0) return;
|
|
211
|
+
const body = xml.slice(headEnd + 1, end);
|
|
212
|
+
yield withHead ? { head, body } : body;
|
|
213
|
+
at = end + close.length;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** The concatenated text of every `<t>` in a fragment (a shared string's runs, an inline string). */
|
|
218
|
+
function texts(fragment) {
|
|
219
|
+
let out = '';
|
|
220
|
+
for (const t of elements(fragment, 't')) out += xmlText(t);
|
|
221
|
+
return out;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** The first sheet of an XLSX workbook as rows of strings. */
|
|
225
|
+
export function parseXlsx(buf, limits) {
|
|
226
|
+
const zip = new ZipReader(buf, zipEntries(buf), limits);
|
|
227
|
+
const workbook = zip.read('xl/workbook.xml');
|
|
228
|
+
const sheetTag = /<sheet\b[^>]*>/.exec(workbook)?.[0];
|
|
229
|
+
if (sheetTag === undefined) throw refusal('bad_xlsx', 'the workbook has no sheet');
|
|
230
|
+
const rid = attr(sheetTag, 'r:id');
|
|
231
|
+
const rels = zip.read('xl/_rels/workbook.xml.rels');
|
|
232
|
+
let target = 'worksheets/sheet1.xml';
|
|
233
|
+
for (const m of rels.matchAll(/<Relationship\b[^>]*>/g)) if (attr(m[0], 'Id') === rid) target = attr(m[0], 'Target') ?? target;
|
|
234
|
+
const sheetPath = target.startsWith('/') ? target.slice(1) : `xl/${target.replace(/^\.\//, '')}`;
|
|
235
|
+
// Every scan below is linear (indexOf from a moving cursor, never a lazy regex over the rest of the
|
|
236
|
+
// text), so a hostile sheet of unclosed tags costs one pass, not one pass per tag.
|
|
237
|
+
const shared = [];
|
|
238
|
+
if (zip.has('xl/sharedStrings.xml')) {
|
|
239
|
+
const sst = zip.read('xl/sharedStrings.xml');
|
|
240
|
+
let sharedBytes = 0;
|
|
241
|
+
for (const si of elements(sst, 'si')) {
|
|
242
|
+
const t = texts(si);
|
|
243
|
+
sharedBytes += t.length;
|
|
244
|
+
if (sharedBytes > limits.expandedBytes) throw refusal('too_large', `the workbook's strings expand past ${limits.expandedBytes / (1024 * 1024)} MB`);
|
|
245
|
+
shared.push(t);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const sheet = zip.read(sheetPath);
|
|
249
|
+
const rows = [];
|
|
250
|
+
// Shared strings are referenced, not copied: count what the cells hold once resolved, so a small
|
|
251
|
+
// sheet repeating one large string cannot become a snapshot far past the expansion limit.
|
|
252
|
+
let cellBytes = 0;
|
|
253
|
+
for (const rowXml of elements(sheet, 'row')) {
|
|
254
|
+
const row = [];
|
|
255
|
+
for (const cell of elements(rowXml, 'c', true)) {
|
|
256
|
+
const ref = attr(cell.head, 'r');
|
|
257
|
+
const t = attr(cell.head, 't');
|
|
258
|
+
const inner = cell.body;
|
|
259
|
+
const vStart = inner.indexOf('<v>');
|
|
260
|
+
const vEnd = vStart < 0 ? -1 : inner.indexOf('</v>', vStart + 3);
|
|
261
|
+
const v = vStart < 0 || vEnd < 0 ? undefined : inner.slice(vStart + 3, vEnd);
|
|
262
|
+
let value = '';
|
|
263
|
+
if (t === 's') value = shared[Number(v)] ?? '';
|
|
264
|
+
else if (t === 'inlineStr') value = texts(inner);
|
|
265
|
+
else if (t === 'b') value = v === '1' ? 'true' : 'false';
|
|
266
|
+
else if (v !== undefined) value = xmlText(v);
|
|
267
|
+
const idx = ref === null ? row.length : colIndex(ref);
|
|
268
|
+
if (idx >= limits.columns) throw refusal('too_many_columns', `the sheet has more than ${limits.columns} columns`);
|
|
269
|
+
while (row.length < idx) row.push('');
|
|
270
|
+
row[idx] = value;
|
|
271
|
+
cellBytes += value.length;
|
|
272
|
+
if (cellBytes > limits.expandedBytes) throw refusal('too_large', `the sheet's values expand past ${limits.expandedBytes / (1024 * 1024)} MB`);
|
|
273
|
+
}
|
|
274
|
+
if (row.length > 0 && row.some((c) => c !== '')) rows.push(row);
|
|
275
|
+
if (rows.length > limits.rows + 1) throw refusal('too_many_rows', `the sheet has more than ${limits.rows} rows`);
|
|
276
|
+
}
|
|
277
|
+
return rows;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// ── Rows → a SQLite snapshot ─────────────────────────────────────────────────────────────────
|
|
281
|
+
|
|
282
|
+
const NUMBER = /^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;
|
|
283
|
+
const DATEISH = /^\d{4}-\d{2}-\d{2}([ T]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Whether to take the first row as the header. Without the person's choice it must look like one AND
|
|
287
|
+
* differ in shape from the data under it (some column whose first cell is a word while its values
|
|
288
|
+
* are numbers or dates): an all-text first row could be a record — a name, an email — and column
|
|
289
|
+
* names are structure an agent sees. A human's explicit choice (`header=yes|no`) wins.
|
|
290
|
+
*/
|
|
291
|
+
export function detectHeader(rows, choice) {
|
|
292
|
+
if (choice !== null) return choice === 'yes';
|
|
293
|
+
const first = rows[0] ?? [];
|
|
294
|
+
if (!looksLikeHeader(first) || rows.length < 2) return false;
|
|
295
|
+
const body = rows.slice(1, 201);
|
|
296
|
+
return first.some((_c, i) => {
|
|
297
|
+
const values = body.map((r) => (r[i] ?? '').trim()).filter((v) => v !== '');
|
|
298
|
+
return values.length > 0 && values.every((v) => NUMBER.test(v) || DATEISH.test(v) || /^(true|false)$/i.test(v));
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* A column name as people write one: a letter or `_` first, then letters, digits, spaces and a little
|
|
304
|
+
* punctuation (`Amount (USD)`, `Q3 %`, `order-id`), at most 64 characters. No `@`, `.`, `:` or `/`:
|
|
305
|
+
* an email address, a domain, a URL or a time is a value, never a name.
|
|
306
|
+
*/
|
|
307
|
+
const NAME_LIKE = /^[\p{L}_][\p{L}\p{N}\p{Zs}_\-()%#&]{0,63}$/u;
|
|
308
|
+
|
|
309
|
+
/** A first row looks like a header when every cell is a distinct column name, none of them data-like. */
|
|
310
|
+
export function looksLikeHeader(first) {
|
|
311
|
+
if (first.length === 0) return false;
|
|
312
|
+
const seen = new Set();
|
|
313
|
+
for (const raw of first) {
|
|
314
|
+
const cell = raw.trim();
|
|
315
|
+
if (cell === '' || NUMBER.test(cell) || DATEISH.test(cell) || /^(true|false)$/i.test(cell) || !NAME_LIKE.test(cell)) return false;
|
|
316
|
+
const k = cell.toLowerCase();
|
|
317
|
+
if (seen.has(k)) return false;
|
|
318
|
+
seen.add(k);
|
|
319
|
+
}
|
|
320
|
+
return true;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function columnNames(first, width, header) {
|
|
324
|
+
const names = [];
|
|
325
|
+
const taken = new Set(); // SQLite compares names case-insensitively
|
|
326
|
+
for (let i = 0; i < width; i++) {
|
|
327
|
+
let n = header ? (first[i] ?? '').trim().replace(/\s+/g, ' ').slice(0, 56) : '';
|
|
328
|
+
if (n === '') n = `col_${i + 1}`;
|
|
329
|
+
let unique = n;
|
|
330
|
+
for (let k = 2; taken.has(unique.toLowerCase()); k++) unique = `${n}_${k}`;
|
|
331
|
+
taken.add(unique.toLowerCase());
|
|
332
|
+
names.push(unique);
|
|
333
|
+
}
|
|
334
|
+
return names;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const INT64_MIN = -(2n ** 63n);
|
|
338
|
+
const INT64_MAX = 2n ** 63n - 1n;
|
|
339
|
+
|
|
340
|
+
function isInt64(v) {
|
|
341
|
+
if (!/^[+-]?\d{1,20}$/.test(v)) return false;
|
|
342
|
+
const b = BigInt(v);
|
|
343
|
+
return b >= INT64_MIN && b <= INT64_MAX;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** INTEGER (stored exactly, as a 64-bit integer), REAL, or TEXT; an integer past int64 makes the column TEXT. */
|
|
347
|
+
export function inferType(values) {
|
|
348
|
+
let t = null;
|
|
349
|
+
for (const raw of values) {
|
|
350
|
+
const v = raw.trim();
|
|
351
|
+
if (v === '') continue;
|
|
352
|
+
if (/^[+-]?\d+$/.test(v)) {
|
|
353
|
+
if (!isInt64(v)) return 'TEXT';
|
|
354
|
+
t = t ?? 'INTEGER';
|
|
355
|
+
} else if (NUMBER.test(v) && Number.isFinite(Number(v))) t = t === 'TEXT' ? 'TEXT' : 'REAL';
|
|
356
|
+
else return 'TEXT';
|
|
357
|
+
}
|
|
358
|
+
return t ?? 'TEXT';
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export function tableNameFor(filename) {
|
|
362
|
+
const base = filename.replace(/^.*[\\/]/, '').replace(/\.[^.]+$/, '').toLowerCase().replace(/[^a-z0-9_]+/g, '_').replace(/^_+|_+$/g, '');
|
|
363
|
+
return /^[a-z_]/.test(base) && base.length > 0 ? base.slice(0, 63) : `data${base === '' ? '' : `_${base}`}`.slice(0, 63);
|
|
364
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Run learnings (crew src/learnings): when a run ends with evidence worth learning from (the operator's rulings, standing steers, the orchestrator's decisions, a reviewer's findings, a check that was red on the base or ran out of time), crew launches this one-seat, one-turn run on a seat that did NOT build the run (the builder never grades itself). It reads the handoff crew wrote (the evidence, what is already proposed) and writes report.json (its learnings and, per evidence item, kept or dropped and why); crew files each learning in the approve queue as a memory proposal attributed to the SOURCE run. Nothing is used until a person approves it. Cheap by design: no repository, nothing built, no floor, no judge (required_instruments is [] on purpose: a person judges each proposal). The run is never a person's to answer: if it stops at a gate (a short reply under the substance floor, a seat that crashed), crew stops it and files from report.json, or files
|
|
2
|
+
"$comment": "Run learnings (crew src/learnings): when a run ends with evidence worth learning from (the operator's rulings, standing steers, the orchestrator's decisions, a reviewer's findings, a check that was red on the base or ran out of time), crew launches this one-seat, one-turn run on a seat that did NOT build the run (the builder never grades itself). It reads the handoff crew wrote (the evidence, what is already proposed) and writes report.json (its learnings and, per evidence item, kept or dropped and why); crew files each learning in the approve queue as a memory proposal attributed to the SOURCE run. Nothing is used until a person approves it. Cheap by design: no repository, nothing built, no floor, no judge (required_instruments is [] on purpose: a person judges each proposal). The run is never a person's to answer: if it stops at a gate (a short reply under the substance floor, a seat that crashed), crew stops it and files from report.json, or files nothing when there is none.",
|
|
3
3
|
"id": "distill-learnings",
|
|
4
4
|
"title": "Distill learnings",
|
|
5
5
|
"summary": "Turns what a finished run went through into a few durable learnings, proposed for your review.",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"id": "distill",
|
|
13
13
|
"kind": "review",
|
|
14
|
-
"instructions": "You distil learnings; you never file them. Read the handoff file named in the task. It names the source run, its repository, `evidence` (each item: id, kind, text) and `already_proposed` (learnings already in the review queue), and report_path (the ONE file you may write). Keep only what passes the durability test: would this help a fresh session, on a different task, three months from now? Each kept learning states the rule, why it holds, and when it applies, in 1 to 3 plain sentences, and names its repository when it is about one. Good learnings: a test or check that fails under host load and why; a
|
|
14
|
+
"instructions": "You distil learnings; you never file them. Read the handoff file named in the task. It names the source run, its repository, `evidence` (each item: id, kind, text) and `already_proposed` (learnings already in the review queue), and report_path (the ONE file you may write). Keep only what passes the durability test: would this help a fresh session, on a different task, three months from now? Each kept learning states the rule, why it holds, and when it applies, in 1 to 3 plain sentences, and names its repository when it is about one. Good learnings: a test or check that fails under host load and why; a repository rule or convention that bit; a pattern a reviewer flagged that would recur; a decision with its reason when it constrains future work; a standing preference the operator stated. Drop: progress or status (what was done, merged, shipped), a limit of the seat's own sandbox (a missing tool, a denied listen or write, no network), which belongs to the seat image, anything only true of this one change, run ids, PR or issue numbers, commit SHAs, dates, and anything already in already_proposed. Never invent: every learning must be supported by an evidence item, and you name those ids. Write report_path as one JSON object: {\"learnings\": [{\"kind\": \"gotcha|decision|pattern|steering\", \"content\": \"<1 to 3 sentences>\", \"evidence\": [\"<evidence ids>\"]}], \"checked\": [{\"evidence\": \"<id>\", \"kept\": true|false, \"why\": \"<one sentence>\"}]}: at most 5 learnings, best first, and one checked entry for EVERY evidence item. An empty learnings list is a valid and common answer; the checked list is what makes it reviewable. Do not open, edit or run anything else: no repository, no tool that writes, no proposals (crew files those). Write report_path before you finish. Your reply is the review record, so write it out in full: first a line naming the source run by its title and saying how many learnings you kept from how many evidence items (\"Checked 1 evidence item from <title>: kept 0, none found.\" when none), then one line per evidence item, \"<id> (<what it says, in a few words>): kept|dropped: <why, in one sentence>\", then report_path's absolute path on the last line.",
|
|
15
15
|
"gate_type": "execution",
|
|
16
16
|
"gate": "auto",
|
|
17
17
|
"executes_code": false,
|