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
|
@@ -41,7 +41,7 @@ import { z } from '../zod.js';
|
|
|
41
41
|
import { parseCommand, resolveOption } from '../workflow-catalog/build-v2.js';
|
|
42
42
|
import { CATALOG_V2_CARDS } from '../workflow-catalog/catalog-data-v2.js';
|
|
43
43
|
import { REVIEW_CHANGE_WORKFLOW } from './review-change.js';
|
|
44
|
-
import { checksLabel, ownWords, factsOf, JobRefusal, mergeRevision, nounOf, optionFor, personAskedSkip, personPid, proposalKindOf, qeSkipBound, requestDigest, repoOf, resolveJob, SEAT_WORDS, seatProtections, seatRemovalNote, briefOf, inputLines, SELF_SEATED, } from './chat-jobs.js';
|
|
44
|
+
import { checksLabel, ownWords, factsOf, JobRefusal, mergeRevision, nounOf, optionFor, personAskedSkip, personPid, proposalKindOf, qeSkipBound, requestDigest, repoOf, resolveJob, SEAT_WORDS, seatProtections, seatRemovalNote, seatsNeeded, seatsShortLine, briefOf, inputLines, SELF_SEATED, } from './chat-jobs.js';
|
|
45
45
|
import { artifactExists, artifactHead, chatMount, parseArtifactRef, UNFILED_MOUNT } from './chat-context.js';
|
|
46
46
|
import { ATTACHMENT_MAX_FILE_BYTES } from './chat-attachments.js';
|
|
47
47
|
import { documentPathPlan } from '../interactive/source-packet.js';
|
|
@@ -314,6 +314,16 @@ class KeyedLock {
|
|
|
314
314
|
return next;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
+
/** A launch refused before starting anything; the caller can correct the open card and try again. */
|
|
318
|
+
export class LaunchRefusal extends Error {
|
|
319
|
+
status;
|
|
320
|
+
body;
|
|
321
|
+
constructor(status, body) {
|
|
322
|
+
super(typeof body['error'] === 'string' ? body['error'] : 'The launch was refused.');
|
|
323
|
+
this.status = status;
|
|
324
|
+
this.body = body;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
317
327
|
/**
|
|
318
328
|
* DES §4.3 step 3: ONE launcher per run id. `launchOnce` takes the run id's lock, asks the operation's launcher whether
|
|
319
329
|
* that run exists (adopt), and starts it only if not — so a retry, a second tab and a late bus trigger (A3 calls this
|
|
@@ -605,6 +615,12 @@ export function isJobCardEntry(block) {
|
|
|
605
615
|
const card = CATALOG_V2_CARDS.find((c) => c.id === block.entry);
|
|
606
616
|
return (card !== undefined && detectable(card)) || block.option !== undefined || block.confidence !== undefined;
|
|
607
617
|
}
|
|
618
|
+
/** A document title must occur in the person's own turn. */
|
|
619
|
+
function ownTitle(title, words) {
|
|
620
|
+
const plain = (s) => s.replace(/['"‘’“”]/gu, '').replace(/\s+/gu, ' ').trim().toLowerCase();
|
|
621
|
+
const named = plain(title);
|
|
622
|
+
return named !== '' && plain(words).includes(named);
|
|
623
|
+
}
|
|
608
624
|
/** The person's own words of ONE turn (the message the seat's block answers). */
|
|
609
625
|
function turnWords(records, turnId) {
|
|
610
626
|
const r = records.find((x) => x.kind === 'user' && x.turnId === turnId && x.owner === true);
|
|
@@ -656,8 +672,8 @@ function keepReshape(next, from) {
|
|
|
656
672
|
export class ChatProposals {
|
|
657
673
|
deps;
|
|
658
674
|
lock = new KeyedLock();
|
|
659
|
-
/**
|
|
660
|
-
|
|
675
|
+
/** Frames publish in append order after reading the live seat setting. */
|
|
676
|
+
publishing = Promise.resolve();
|
|
661
677
|
/** Per chat: resolutions publish in the order their replies were folded (a slow one never lands after a newer one). */
|
|
662
678
|
order = new KeyedLock();
|
|
663
679
|
pending = new Set();
|
|
@@ -709,6 +725,7 @@ export class ChatProposals {
|
|
|
709
725
|
async settled() {
|
|
710
726
|
while (this.pending.size > 0)
|
|
711
727
|
await Promise.all([...this.pending]);
|
|
728
|
+
await this.publishing;
|
|
712
729
|
}
|
|
713
730
|
/**
|
|
714
731
|
* A seat's reply was folded with the `wicked-make` bodies cut from it. Resolution reads crew's records (it awaits),
|
|
@@ -811,11 +828,14 @@ export class ChatProposals {
|
|
|
811
828
|
return false;
|
|
812
829
|
}
|
|
813
830
|
const projectId = this.deps.projectOf(chatId);
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
831
|
+
this.publishing = this.publishing.then(async () => {
|
|
832
|
+
const { refusal } = await this.seatPool();
|
|
833
|
+
if (this.deps.instanceOf(chatId) !== instance)
|
|
834
|
+
return;
|
|
835
|
+
const served = this.seatsBlocked(record, refusal ?? null, () => true);
|
|
836
|
+
const frame = { type: 'chatProposal', chat: chatId, turn_id: record.turnId, record: served, ...(projectId !== null ? { project_id: projectId } : {}) };
|
|
837
|
+
this.deps.broadcast(frame);
|
|
838
|
+
}).catch((err) => this.log(`[proposals] chat ${chatId}: ${record.kind} broadcast failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
819
839
|
return true;
|
|
820
840
|
}
|
|
821
841
|
/**
|
|
@@ -903,10 +923,8 @@ export class ChatProposals {
|
|
|
903
923
|
}
|
|
904
924
|
}
|
|
905
925
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
const sources = (await this.resolveSources(block.sources, { chatId, turnId, records, binding, turnHas, chat, words, personNamed: false })).map((src) => src.status === 'ok' ? { ...src, status: 'struck', reason: 'a change works from the document and your words; make a new document to use this source' } : src);
|
|
909
|
-
const { helpers, block: helperBlock } = await this.docHelpers(chat);
|
|
926
|
+
const sources = await this.resolveSources(block.sources, { chatId, turnId, records, binding, turnHas, chat, words, personNamed: false });
|
|
927
|
+
const { helpers, block: helperBlock, seatsUnread } = await this.docHelpers(chat);
|
|
910
928
|
if (helperBlock !== null)
|
|
911
929
|
blocked.push(helperBlock);
|
|
912
930
|
const title = target?.title ?? (ref !== null ? humanDoc(ref.doc) : block.refine);
|
|
@@ -918,11 +936,13 @@ export class ChatProposals {
|
|
|
918
936
|
sources,
|
|
919
937
|
repos: [],
|
|
920
938
|
helpers,
|
|
939
|
+
...(seatsUnread ? { seatsUnread: true } : {}),
|
|
921
940
|
time: await this.timeOf('refine', null, projectId),
|
|
922
941
|
stops: STOPS.refine,
|
|
923
942
|
filedIn: await filedIn(projectId),
|
|
924
943
|
...(target !== undefined ? { target } : {}),
|
|
925
944
|
...(block.touches.length > 0 ? { touches: block.touches } : {}),
|
|
945
|
+
...(binding?.artifact !== undefined && binding.artifact.ref === ref?.ref ? { anchors: [...binding.artifact.anchors] } : {}),
|
|
926
946
|
...(protectedList !== undefined ? { protected: protectedList } : {}),
|
|
927
947
|
blocked: blocked[0] ?? null,
|
|
928
948
|
};
|
|
@@ -978,7 +998,7 @@ export class ChatProposals {
|
|
|
978
998
|
demo = { url, audience: block.audience ?? null, show: block.show ?? null };
|
|
979
999
|
}
|
|
980
1000
|
const sources = kind === 'create' ? await this.resolveSources(block.sources, { chatId, turnId, records, binding, turnHas, chat, words, personNamed: false }) : [];
|
|
981
|
-
const { helpers, block: helperBlock } = await this.docHelpers(chat);
|
|
1001
|
+
const { helpers, block: helperBlock, seatsUnread } = await this.docHelpers(chat, input.helperSeats);
|
|
982
1002
|
if (helperBlock !== null)
|
|
983
1003
|
blocked.push(helperBlock);
|
|
984
1004
|
return {
|
|
@@ -995,6 +1015,7 @@ export class ChatProposals {
|
|
|
995
1015
|
repos,
|
|
996
1016
|
...(repoRefs.length > 0 ? { repoRefs } : {}),
|
|
997
1017
|
helpers,
|
|
1018
|
+
...(seatsUnread ? { seatsUnread: true } : {}),
|
|
998
1019
|
time: await this.timeOf(kind, seed ?? null, chat.projectId),
|
|
999
1020
|
stops: STOPS[kind],
|
|
1000
1021
|
filedIn: await filedIn(chat.projectId),
|
|
@@ -1283,6 +1304,9 @@ export class ChatProposals {
|
|
|
1283
1304
|
if (body.power !== undefined && (kind !== 'job' || body.decision !== 'go')) {
|
|
1284
1305
|
return { code: 400, body: { code: 'power_not_applicable', error: kind !== 'job' ? 'only a job runs as a power run' : 'how a job runs is chosen with Start, not Not now' } };
|
|
1285
1306
|
}
|
|
1307
|
+
if (body.reducedAssurance !== undefined && (kind !== 'job' || body.decision !== 'go')) {
|
|
1308
|
+
return { code: 400, body: { code: 'reduced_assurance_not_applicable', error: kind !== 'job' ? 'only a job can start with fewer checks' : 'choose fewer checks with Start' } };
|
|
1309
|
+
}
|
|
1286
1310
|
const reread = () => foldProposals(this.deps.records(chatId)).get(pid) ?? folded;
|
|
1287
1311
|
const ok = (f) => ({ code: 200, body: { view: viewOf(f) } });
|
|
1288
1312
|
// 1. What already happened, before any state check.
|
|
@@ -1316,6 +1340,16 @@ export class ChatProposals {
|
|
|
1316
1340
|
if (stale !== null)
|
|
1317
1341
|
return stale;
|
|
1318
1342
|
}
|
|
1343
|
+
if (kind === 'job') {
|
|
1344
|
+
const can = new Set(this.deps.rosterEligible().map((s) => s.key));
|
|
1345
|
+
const lost = (acc.resolution.seats?.keys ?? []).filter((k) => !can.has(k));
|
|
1346
|
+
if (lost.length > 0) {
|
|
1347
|
+
const reopened = this.reopenLaunch(chatId, folded, acc.resolution, instance);
|
|
1348
|
+
if (reopened === null)
|
|
1349
|
+
return this.gone(chatId);
|
|
1350
|
+
return { code: 409, body: { code: 'helper_unavailable', error: `${lost.join(' and ')} can't work now; change who works on it`, view: viewOf(reopened) } };
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1319
1353
|
// Go again: the frozen choices and identity, re-checked. Only the helpers may change (one may have signed out
|
|
1320
1354
|
// since); everything else stays as accepted.
|
|
1321
1355
|
let again = acc.resolution;
|
|
@@ -1332,6 +1366,8 @@ export class ChatProposals {
|
|
|
1332
1366
|
throw err;
|
|
1333
1367
|
}
|
|
1334
1368
|
}
|
|
1369
|
+
if (body.reducedAssurance === true)
|
|
1370
|
+
again = { ...again, reducedAssurance: true };
|
|
1335
1371
|
return this.go(chatId, folded, again, again === acc.resolution ? acc.edits : { ...(acc.edits ?? {}), ...body.edits }, acc.identity, actor, instance, body.power);
|
|
1336
1372
|
}
|
|
1337
1373
|
if (folded.state === 'superseded') {
|
|
@@ -1368,6 +1404,10 @@ export class ChatProposals {
|
|
|
1368
1404
|
if (stale !== null)
|
|
1369
1405
|
return stale;
|
|
1370
1406
|
}
|
|
1407
|
+
// Check the setting and redraw a card drawn during a refusal before edits or old-seat checks.
|
|
1408
|
+
const seatsRefused = await this.lock.run(`chat\u0000${instance ?? chatId}`, () => this.seatsSettingRefusal(chatId, folded.proposal, folded, instance));
|
|
1409
|
+
if (seatsRefused !== null)
|
|
1410
|
+
return seatsRefused;
|
|
1371
1411
|
if (kind === 'job') {
|
|
1372
1412
|
// A reshape starts only through its own transition (the held plan answered Reject first; codex r3).
|
|
1373
1413
|
// The seats the proposal names can still work, before any edit re-resolves them (codex r3).
|
|
@@ -1387,14 +1427,11 @@ export class ChatProposals {
|
|
|
1387
1427
|
return this.refusalOf(err);
|
|
1388
1428
|
throw err;
|
|
1389
1429
|
}
|
|
1390
|
-
// (F1/F2) A job's seats and a document's helpers come from `newWorkSeats`: checked here before the card's own block (the
|
|
1391
|
-
// setting is the cause to fix first), and again in `goLocked` for every launch path.
|
|
1392
|
-
const seatsRefused = await this.seatsSettingRefusal(effective, folded);
|
|
1393
|
-
if (seatsRefused !== null)
|
|
1394
|
-
return seatsRefused;
|
|
1395
1430
|
if (effective.blocked !== null) {
|
|
1396
1431
|
return { code: 409, body: { code: 'proposal_blocked', error: effective.blocked, view: viewOf(folded) } };
|
|
1397
1432
|
}
|
|
1433
|
+
if (body.reducedAssurance === true)
|
|
1434
|
+
effective = { ...effective, reducedAssurance: true };
|
|
1398
1435
|
return this.go(chatId, folded, effective, body.edits ?? null, this.identityOf(effective), actor, instance, body.power);
|
|
1399
1436
|
}
|
|
1400
1437
|
/**
|
|
@@ -1402,11 +1439,19 @@ export class ChatProposals {
|
|
|
1402
1439
|
* proposals of one chat (or two chats changing one document) can never both pass the busy check.
|
|
1403
1440
|
*/
|
|
1404
1441
|
go(chatId, folded, resolution, edits, identity, actor, instance, power) {
|
|
1405
|
-
const docKey =
|
|
1442
|
+
const docKey = identity.artifactRef;
|
|
1406
1443
|
// Keyed by the chat's instance (shared by its original id and an ended chat's archived alias), else its id.
|
|
1407
1444
|
return this.lock.run(`chat\u0000${instance ?? chatId}`, () => docKey === null
|
|
1408
1445
|
? this.goLocked(chatId, folded, resolution, edits, identity, actor, instance, power)
|
|
1409
|
-
: this.
|
|
1446
|
+
: this.admitDocument(docKey, () => this.goLocked(chatId, folded, resolution, edits, identity, actor, instance, power)));
|
|
1447
|
+
}
|
|
1448
|
+
/** Share Go's admission with other actions on this chat instance. */
|
|
1449
|
+
admitChat(chatId, fn) {
|
|
1450
|
+
return this.lock.run(`chat\u0000${this.deps.instanceOf(chatId) ?? chatId}`, fn);
|
|
1451
|
+
}
|
|
1452
|
+
/** A create, refine or retirement of the same document waits for the previous admission. */
|
|
1453
|
+
admitDocument(ref, fn) {
|
|
1454
|
+
return this.lock.run(`doc\u0000${ref}`, fn);
|
|
1410
1455
|
}
|
|
1411
1456
|
async goLocked(chatId, folded, resolution, edits, identity, actor, instance, power) {
|
|
1412
1457
|
const kind = resolution.kind;
|
|
@@ -1427,7 +1472,7 @@ export class ChatProposals {
|
|
|
1427
1472
|
}
|
|
1428
1473
|
// (F1/F2) Every launch path (a fresh Go, Go again, a reshape) re-reads `newWorkSeats` before anything is answered or
|
|
1429
1474
|
// recorded: set but unreadable or invalid refuses with its code, never starting the seats drawn without the pick.
|
|
1430
|
-
const seatsRefused = await this.seatsSettingRefusal(resolution, folded);
|
|
1475
|
+
const seatsRefused = await this.seatsSettingRefusal(chatId, resolution, folded, instance);
|
|
1431
1476
|
if (seatsRefused !== null)
|
|
1432
1477
|
return seatsRefused;
|
|
1433
1478
|
// The helpers can still work (one may have signed out since the card was drawn).
|
|
@@ -1533,6 +1578,18 @@ export class ChatProposals {
|
|
|
1533
1578
|
result = await this.deps.registry.launchOnce({ kind, pid, chatId, actor, identity, resolution, ...(power !== undefined ? { power } : {}) });
|
|
1534
1579
|
}
|
|
1535
1580
|
catch (err) {
|
|
1581
|
+
if (err instanceof LaunchRefusal) {
|
|
1582
|
+
const reopened = this.reopenLaunch(chatId, folded, resolution, instance);
|
|
1583
|
+
if (reopened === null)
|
|
1584
|
+
return this.gone(chatId);
|
|
1585
|
+
this.deps.audit('chat.proposal.launch_refused', actor, { chatId, pid, code: err.body['code'], error: err.message });
|
|
1586
|
+
return { code: err.status, body: {
|
|
1587
|
+
code: err.body['code'], error: err.message,
|
|
1588
|
+
...(err.body['excluded'] !== undefined ? { excluded: err.body['excluded'] } : {}),
|
|
1589
|
+
...(err.body['retryWith'] !== undefined ? { retryWith: err.body['retryWith'] } : {}),
|
|
1590
|
+
view: viewOf(reopened),
|
|
1591
|
+
} };
|
|
1592
|
+
}
|
|
1536
1593
|
// Accepting stays recorded: the card shows "Interrupted · Go again", which resumes the same identity.
|
|
1537
1594
|
const msg = err instanceof Error ? err.message : String(err);
|
|
1538
1595
|
this.deps.audit('chat.proposal.launch_failed', actor, { chatId, pid, error: msg, ...(power !== undefined ? { power } : {}) });
|
|
@@ -1544,6 +1601,17 @@ export class ChatProposals {
|
|
|
1544
1601
|
const after = foldProposals(this.deps.records(chatId)).get(pid) ?? folded;
|
|
1545
1602
|
return { code: 200, body: { view: viewOf(after) } };
|
|
1546
1603
|
}
|
|
1604
|
+
reopenLaunch(chatId, folded, resolution, instance) {
|
|
1605
|
+
const proposal = { ...resolution };
|
|
1606
|
+
// A Go-only opt-in belongs to that attempt; a reshape card keeps its own prior choice.
|
|
1607
|
+
if (folded.proposal.reducedAssurance === true)
|
|
1608
|
+
proposal.reducedAssurance = true;
|
|
1609
|
+
else
|
|
1610
|
+
delete proposal.reducedAssurance;
|
|
1611
|
+
if (!this.write(chatId, { at: this.now(), turnId: folded.turnId, kind: 'proposal', proposal }, instance))
|
|
1612
|
+
return null;
|
|
1613
|
+
return foldProposals(this.deps.records(chatId)).get(resolution.pid) ?? null;
|
|
1614
|
+
}
|
|
1547
1615
|
/** Record the answer (and audit exactly what was answered); `false` when the chat is no longer this instance. */
|
|
1548
1616
|
decided(chatId, turnId, pid, actor, decision, result, resolution, edits, instance, power) {
|
|
1549
1617
|
if (!this.write(chatId, { at: this.now(), turnId, kind: 'proposal_decided', pid, actor: actor.id, decision, result }, instance))
|
|
@@ -1571,7 +1639,7 @@ export class ChatProposals {
|
|
|
1571
1639
|
async onNewHead(p) {
|
|
1572
1640
|
if (p.kind !== 'refine' || p.target === undefined)
|
|
1573
1641
|
return p;
|
|
1574
|
-
const kept = await this.protectedOf(p.target.ref, p.target.base, p.touches ?? []);
|
|
1642
|
+
const kept = await this.protectedOf(p.target.ref, p.target.base, [...(p.touches ?? []), ...(p.anchors ?? [])]);
|
|
1575
1643
|
return 'error' in kept ? { ...p, protected: [], blocked: kept.error } : { ...p, protected: kept.entries, blocked: p.blocked };
|
|
1576
1644
|
}
|
|
1577
1645
|
/** The identity a Go is named by (DES §4.3 step 2). */
|
|
@@ -1949,6 +2017,7 @@ export class ChatProposals {
|
|
|
1949
2017
|
inputs['url'] = { kind: 'url', value: block.url };
|
|
1950
2018
|
const facts = {
|
|
1951
2019
|
card: g.card,
|
|
2020
|
+
title: block.title !== undefined && ownTitle(block.title, words) ? block.title : null,
|
|
1952
2021
|
option: g.option,
|
|
1953
2022
|
depth: g.depth,
|
|
1954
2023
|
words,
|
|
@@ -2188,7 +2257,7 @@ export class ChatProposals {
|
|
|
2188
2257
|
const open = [...foldProposals(this.deps.records(chatId)).values()].find((f) => (f.state === 'open' || f.state === 'revising') && f.proposal.shape !== undefined);
|
|
2189
2258
|
if (open !== undefined) {
|
|
2190
2259
|
const p = open.proposal;
|
|
2191
|
-
context.open = { pid: p.pid, label: p.what.label, card: p.shape.card, option: p.shape.option, repo: p.repos[0] ?? null, seats: [...(p.seats?.keys ?? [])], checks: checksLabel(p.gate ?? []) };
|
|
2260
|
+
context.open = { pid: p.pid, label: p.what.label, card: p.shape.card, option: p.shape.option, repo: p.repos[0] ?? null, seats: [...(p.seats?.keys ?? p.helpers?.seats ?? [])], checks: checksLabel(p.gate ?? []) };
|
|
2192
2261
|
}
|
|
2193
2262
|
const job = this.launchedJob(chatId);
|
|
2194
2263
|
if (job !== null && this.deps.heldPlan !== undefined) {
|
|
@@ -2214,32 +2283,62 @@ export class ChatProposals {
|
|
|
2214
2283
|
* (OpenCode), which are kept only when no other seat can work (crew#1590). A setting that is set but can't be read,
|
|
2215
2284
|
* or is invalid, is a LIVE state, never a stored one: `refusal`, and the card is drawn as if nothing were picked,
|
|
2216
2285
|
* but it reads blocked with the reason wherever it is served (`withSeatsSetting`) and Start refuses it
|
|
2217
|
-
* (`seatsSettingRefusal`) until the setting reads again.
|
|
2218
|
-
*
|
|
2286
|
+
* (`seatsSettingRefusal`) until the setting reads again. Cards drawn during the refusal are marked so Start
|
|
2287
|
+
* redraws their seats after repair, before the person can launch them.
|
|
2219
2288
|
*/
|
|
2220
2289
|
async seatPool() {
|
|
2221
2290
|
if (this.deps.newWorkSeats === undefined)
|
|
2222
2291
|
return jobSeatPool(this.deps.rosterEligible(), null);
|
|
2223
2292
|
try {
|
|
2224
|
-
|
|
2225
|
-
this.seatsRefusal = null;
|
|
2226
|
-
return pool;
|
|
2293
|
+
return jobSeatPool(this.deps.rosterEligible(), await this.deps.newWorkSeats());
|
|
2227
2294
|
}
|
|
2228
2295
|
catch (err) {
|
|
2229
2296
|
const refusal = err instanceof NewWorkSeatsRefusal
|
|
2230
2297
|
? { code: err.code, message: err.message }
|
|
2231
2298
|
: { code: 'settings_unavailable', message: `crew can't read which seats new work may use (newWorkSeats): ${err instanceof Error ? err.message : String(err)}; it won't start new work on every seat instead. ${NEW_WORK_SEATS_FIX[0].toUpperCase()}${NEW_WORK_SEATS_FIX.slice(1)}` };
|
|
2232
|
-
this.seatsRefusal = refusal;
|
|
2233
2299
|
return { ...jobSeatPool(this.deps.rosterEligible(), null), refusal };
|
|
2234
2300
|
}
|
|
2235
2301
|
}
|
|
2236
|
-
/**
|
|
2237
|
-
|
|
2238
|
-
async seatsSettingRefusal(p, folded) {
|
|
2302
|
+
/** Refuse an unreadable setting, or redraw a card that was drawn without it. Called under the chat lock. */
|
|
2303
|
+
async seatsSettingRefusal(chatId, p, folded, instance) {
|
|
2239
2304
|
if (!SEATED_KINDS.has(p.kind))
|
|
2240
2305
|
return null;
|
|
2241
|
-
const { refusal } = await this.seatPool();
|
|
2242
|
-
|
|
2306
|
+
const { pool, refusal } = await this.seatPool();
|
|
2307
|
+
if (refusal !== undefined)
|
|
2308
|
+
return { code: 409, body: { code: refusal.code, error: refusal.message, view: viewOf(folded) } };
|
|
2309
|
+
if (!p.seatsUnread && !folded.proposal.seatsUnread)
|
|
2310
|
+
return null;
|
|
2311
|
+
const current = foldProposals(this.deps.records(chatId)).get(p.pid);
|
|
2312
|
+
if (current === undefined || current.state !== folded.state) {
|
|
2313
|
+
return { code: 409, body: { code: 'proposal_stale', error: 'this proposal changed; check the card again', ...(current !== undefined ? { view: viewOf(current) } : {}) } };
|
|
2314
|
+
}
|
|
2315
|
+
const recorded = current.accepting?.resolution ?? current.proposal;
|
|
2316
|
+
if (recorded.seatsUnread) {
|
|
2317
|
+
const base = { ...recorded };
|
|
2318
|
+
delete base.seatsUnread;
|
|
2319
|
+
let fresh;
|
|
2320
|
+
if (recorded.shape !== undefined) {
|
|
2321
|
+
const chat = this.jobChat(chatId) ?? {
|
|
2322
|
+
projectId: recorded.filedIn.projectId,
|
|
2323
|
+
repos: (recorded.repoRefs ?? []).map((id, i) => ({ id, name: recorded.repos[i] ?? id })),
|
|
2324
|
+
lead: null, seats: [],
|
|
2325
|
+
};
|
|
2326
|
+
const ctx = await this.jobContext(chatId, recorded.pid, recorded.turnId, recorded.seat, chat, {
|
|
2327
|
+
revises: recorded.revises ?? null, lineage: recorded.lineage ?? recorded.pid, notes: [],
|
|
2328
|
+
...(recorded.request !== undefined ? { request: recorded.request } : {}),
|
|
2329
|
+
...(recorded.answers !== undefined ? { answers: recorded.answers } : {}),
|
|
2330
|
+
});
|
|
2331
|
+
fresh = { ...base, ...keepReshape(await this.proposalOf(chatId, recorded.pid, { ...factsOf(recorded), lead: null, seats: null }, ctx, this.deps.records(chatId), true, recorded), recorded) };
|
|
2332
|
+
}
|
|
2333
|
+
else {
|
|
2334
|
+
const helpers = this.helpers({ lead: null, seats: [] }, undefined, pool);
|
|
2335
|
+
fresh = { ...base, helpers, blocked: helpers === null ? NEEDS_HELPER : recorded.blocked === NEEDS_HELPER ? null : recorded.blocked };
|
|
2336
|
+
}
|
|
2337
|
+
if (!this.write(chatId, { at: this.now(), turnId: current.turnId, kind: 'proposal', proposal: fresh }, instance))
|
|
2338
|
+
return this.gone(chatId);
|
|
2339
|
+
}
|
|
2340
|
+
const after = foldProposals(this.deps.records(chatId)).get(p.pid);
|
|
2341
|
+
return { code: 409, body: { code: 'seats_redrawn', error: 'the seats setting reads again; check the redrawn card and press Start', view: viewOf(after) } };
|
|
2243
2342
|
}
|
|
2244
2343
|
/** (F1/F2) A proposal view as it is served: an open job or document reads blocked while `newWorkSeats` can't be
|
|
2245
2344
|
* honored (read now), exactly as `withSeatsSetting` serves its record. */
|
|
@@ -2275,10 +2374,12 @@ export class ChatProposals {
|
|
|
2275
2374
|
return records.map((r) => this.seatsBlocked(r, refusal, open));
|
|
2276
2375
|
}
|
|
2277
2376
|
/** A document's two default helpers from the pool, and the line that blocks it when there are none. */
|
|
2278
|
-
async docHelpers(chat) {
|
|
2279
|
-
const { pool } = await this.seatPool();
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2377
|
+
async docHelpers(chat, chosen) {
|
|
2378
|
+
const { pool, refusal } = await this.seatPool();
|
|
2379
|
+
const eligible = new Set(this.deps.rosterEligible().map((s) => s.key));
|
|
2380
|
+
const seats = chosen === undefined ? undefined : [...new Set(chosen)].filter((k) => eligible.has(k)).slice(0, 2);
|
|
2381
|
+
const helpers = this.helpers(chat, seats, pool);
|
|
2382
|
+
return { helpers, block: helpers === null ? NEEDS_HELPER : null, ...(refusal !== undefined ? { seatsUnread: true } : {}) };
|
|
2282
2383
|
}
|
|
2283
2384
|
async jobContext(chatId, pid, turnId, seat, chat, extra) {
|
|
2284
2385
|
if (this.deps.served === undefined)
|
|
@@ -2293,8 +2394,8 @@ export class ChatProposals {
|
|
|
2293
2394
|
const projectLabel = chat.projectId === null ? 'Not in a project · this chat' : ((await this.deps.projectName(chat.projectId)) ?? chat.projectId);
|
|
2294
2395
|
const qeOff = (await this.deps.qeOff?.().catch(() => false)) === true;
|
|
2295
2396
|
const powerPresets = (await this.deps.powerPresets?.(chat.projectId).catch(() => null)) ?? null;
|
|
2296
|
-
const { eligible: roster, pool } = await this.seatPool();
|
|
2297
|
-
return { chatId, pid, turnId, seat, chat, served, roster, pool, projectLabel, qeOff, powerPresets, ...extra };
|
|
2397
|
+
const { eligible: roster, pool, refusal } = await this.seatPool();
|
|
2398
|
+
return { chatId, pid, turnId, seat, chat, served, roster, pool, projectLabel, qeOff, powerPresets, ...(this.deps.coverage !== undefined ? { coverage: (keys, bound) => this.deps.coverage(keys, bound) } : {}), ...extra, ...(refusal !== undefined ? { seatsUnread: true } : {}) };
|
|
2298
2399
|
}
|
|
2299
2400
|
/** Source availability matters only to a card that shows this input. Keep a failed read a named refusal. */
|
|
2300
2401
|
async loadJobSources(facts, ctx) {
|
|
@@ -2396,10 +2497,21 @@ export class ChatProposals {
|
|
|
2396
2497
|
const turnId = ctx.turnId ?? `person:${pid.slice(pid.lastIndexOf(':') + 1)}`;
|
|
2397
2498
|
// Crew's kind line goes first, as `withBriefLines` puts it on a run: a long request is cut at its end, never the line.
|
|
2398
2499
|
const words = [r.resolved.brief ?? '', briefOf(facts)].filter((x) => x !== '').join('\n\n');
|
|
2399
|
-
const
|
|
2500
|
+
const chosen = facts.lead === null && facts.seats === null ? undefined
|
|
2501
|
+
: [...new Set([facts.lead, ...(facts.seats ?? [])].filter((k) => k !== null))];
|
|
2502
|
+
const made = await this.resolve({ chatId, turnId, seat: ctx.seat, ...(chosen !== undefined ? { helperSeats: chosen } : {}), block: { op: 'entry', entry: seed.id, ...(facts.title !== null ? { title: facts.title } : {}), brief: words, sources: ['chat'], repos: facts.repoRef !== null ? [facts.repoRef] : [] }, records });
|
|
2400
2503
|
if (made === null)
|
|
2401
2504
|
throw new JobRefusal('operation_unavailable', 'studio cannot start a document from a chat on this daemon yet', 409);
|
|
2402
2505
|
const shape = { card: card.id, option: r.option?.id ?? null, depth: null, by: facts.by, source: facts.source, ...(facts.guess !== undefined ? { guess: facts.guess } : {}) };
|
|
2506
|
+
const nameOf = (key) => ctx.roster.find((s) => s.key === key)?.name ?? key;
|
|
2507
|
+
const extra = (chosen ?? []).filter((k) => ctx.roster.some((s) => s.key === k)).slice(2);
|
|
2508
|
+
const helperNotes = extra.length > 0 ? [`${extra.map(nameOf).join(', ')} left out: a document uses two helpers`] : [];
|
|
2509
|
+
const choices = (ctx.pool ?? ctx.roster).filter((s) => s.key !== made.helpers?.seats[0]).slice(0, 4).map((s) => ({ label: `${s.name} writes`, edit: { lead: s.key } }));
|
|
2510
|
+
const seatsTok = {
|
|
2511
|
+
id: 'seats', kind: 'seats',
|
|
2512
|
+
label: made.helpers === null ? 'two helpers needed' : `${nameOf(made.helpers.seats[0])} writes, ${nameOf(made.helpers.seats[1])} checks`,
|
|
2513
|
+
swap: choices.length > 0 ? { choices } : null,
|
|
2514
|
+
};
|
|
2403
2515
|
const kindTok = { id: 'kind', kind: (card.variant !== undefined ? 'option' : 'card'), label: nounOf(card, shape.option), swap: null };
|
|
2404
2516
|
const checksTok = { id: 'checks', kind: 'checks', label: checksLabel(r.resolved.gate), swap: null };
|
|
2405
2517
|
const documentsInput = r.resolved.inputs.find((i) => i.id === 'documents');
|
|
@@ -2431,8 +2543,9 @@ export class ChatProposals {
|
|
|
2431
2543
|
command: r.option?.command ?? card.command,
|
|
2432
2544
|
gate: [...r.resolved.gate],
|
|
2433
2545
|
words: facts.words,
|
|
2546
|
+
...(facts.title !== null ? { namedTitle: facts.title } : {}),
|
|
2434
2547
|
details: [...facts.details],
|
|
2435
|
-
sentence: { text: `I'll make {kind} from this conversation${documentsInput !== undefined ? ', reading {documents}' : ''}, filed in ${made.filedIn.label}, checked by {checks}.`, tokens: [kindTok, ...documentsTok, checksTok], notes: [...ctx.notes], ask: offline !== null ? null : question?.text ?? (made.blocked === null ? 'Start?' : null) },
|
|
2548
|
+
sentence: { text: `I'll make {kind} from this conversation${documentsInput !== undefined ? ', reading {documents}' : ''}, filed in ${made.filedIn.label}, written by {seats}, checked by {checks}.`, tokens: [kindTok, ...documentsTok, seatsTok, checksTok], notes: [...ctx.notes, ...helperNotes], ask: offline !== null ? null : question?.text ?? (made.blocked === null ? 'Start?' : null) },
|
|
2436
2549
|
suggestions: [],
|
|
2437
2550
|
question,
|
|
2438
2551
|
revises: ctx.revises,
|
|
@@ -2442,10 +2555,13 @@ export class ChatProposals {
|
|
|
2442
2555
|
};
|
|
2443
2556
|
}
|
|
2444
2557
|
/** Resolve facts to their proposal. `previous` marks a rebuild; null is a held job without a stored parent. */
|
|
2445
|
-
async proposalOf(chatId, pid, facts, ctx, records, allowHidden = false, previous) {
|
|
2558
|
+
async proposalOf(chatId, pid, facts, ctx, records, allowHidden = false, previous, relaunch = previous?.relaunch) {
|
|
2446
2559
|
const card = CATALOG_V2_CARDS.find((c) => c.id === facts.card);
|
|
2447
2560
|
const r = card === undefined ? null : resolveOption(card.id, optionFor(card, facts.option), ctx.served);
|
|
2448
2561
|
await this.loadJobSources(facts, ctx);
|
|
2562
|
+
if (relaunch !== undefined && this.deps.coverage !== undefined) {
|
|
2563
|
+
ctx = { ...ctx, coverage: (keys, bound) => this.deps.coverage(keys, bound, relaunch) };
|
|
2564
|
+
}
|
|
2449
2565
|
ctx = await this.reviewRoster(facts, ctx);
|
|
2450
2566
|
if (r?.resolved.inputs.some((i) => i.id === 'documents')) {
|
|
2451
2567
|
if (facts.inputs['documents'] === undefined) {
|
|
@@ -2466,9 +2582,10 @@ export class ChatProposals {
|
|
|
2466
2582
|
ctx = { ...ctx, documents: await this.authorizeDocumentsAt(chatId, input?.kind === 'documents' ? input.tokens : [], records, ctx.turnId ?? '\u0000', r !== null && proposalKindOf(r) === 'create', true) };
|
|
2467
2583
|
}
|
|
2468
2584
|
// An unsure reading holds no Start wherever the proposal is rebuilt (a Go's edits, a refresh; codex r4).
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2585
|
+
const proposal = r !== null && proposalKindOf(r) === 'create'
|
|
2586
|
+
? await this.documentProposal(chatId, pid, facts, ctx, records)
|
|
2587
|
+
: resolveJob(facts, ctx, { allowHidden });
|
|
2588
|
+
return withAskOverlay({ ...proposal, ...(ctx.seatsUnread ? { seatsUnread: true } : {}) });
|
|
2472
2589
|
}
|
|
2473
2590
|
refusalOf(err) {
|
|
2474
2591
|
if (err instanceof JobRefusal)
|
|
@@ -2533,6 +2650,7 @@ export class ChatProposals {
|
|
|
2533
2650
|
}
|
|
2534
2651
|
const facts = {
|
|
2535
2652
|
card,
|
|
2653
|
+
title: null,
|
|
2536
2654
|
option,
|
|
2537
2655
|
depth: body.depth ?? null,
|
|
2538
2656
|
words: (body.words ?? '').slice(0, 8000),
|
|
@@ -2602,7 +2720,7 @@ export class ChatProposals {
|
|
|
2602
2720
|
: new Set();
|
|
2603
2721
|
const confirmed = confirmIds !== null;
|
|
2604
2722
|
delete edits.confirmLoss;
|
|
2605
|
-
|
|
2723
|
+
let ctx0 = await this.jobContext(chatId, src.pid, src.turnId, fromPerson ? 'person' : (parent.proposal.seat ?? 'seat'), chat, {
|
|
2606
2724
|
revises: parent.proposal.pid,
|
|
2607
2725
|
lineage: parent.proposal.lineage ?? parent.proposal.pid,
|
|
2608
2726
|
notes: [],
|
|
@@ -2614,6 +2732,17 @@ export class ChatProposals {
|
|
|
2614
2732
|
// the person never asked for in their own words changes nothing. On the person's route, only the press applies it.
|
|
2615
2733
|
let qe = null;
|
|
2616
2734
|
const extraNotes = [];
|
|
2735
|
+
// studio#1094: only the person's repository answer can set the chat's first scope.
|
|
2736
|
+
if (src.person !== null && edits.repoRef !== undefined && parent.proposal.needs?.some((n) => n.id === 'repo') === true && chat.repos.length === 0 && this.deps.pickFirstRepo !== undefined) {
|
|
2737
|
+
const picked = await this.deps.pickFirstRepo(chatId, edits.repoRef, src.person, src.pid);
|
|
2738
|
+
if (!picked.ok)
|
|
2739
|
+
return { code: picked.status, body: { code: 'chat_scope_refused', error: picked.error } };
|
|
2740
|
+
const scoped = this.jobChat(chatId);
|
|
2741
|
+
if (scoped === null)
|
|
2742
|
+
return { code: 409, body: { code: 'chat_gone', error: `chat ${chatId} has ended; start a new one` } };
|
|
2743
|
+
ctx0 = { ...ctx0, chat: scoped };
|
|
2744
|
+
extraNotes.push(`This chat now reads ${picked.name}: you picked it for this job.`);
|
|
2745
|
+
}
|
|
2617
2746
|
if (edits.skipQe !== undefined && !confirmed) {
|
|
2618
2747
|
const reason = edits.skipQe.reason;
|
|
2619
2748
|
delete edits.skipQe;
|
|
@@ -2779,7 +2908,7 @@ export class ChatProposals {
|
|
|
2779
2908
|
// (F1/F2) What a removal did, from the card as published (never from the merge, which a loss question can hold).
|
|
2780
2909
|
// A document's workers are its helpers (a revision can make a job a document; codex r2).
|
|
2781
2910
|
const workers = candidate.seats !== undefined ? candidate.seats.keys : (candidate.helpers?.seats ?? []);
|
|
2782
|
-
const removal = seatRemovalNote(edits.removeSeats, parent.proposal.seats?.keys ?? [], workers, (k) => ctx.roster.find((s) => s.key === k)?.name ?? k
|
|
2911
|
+
const removal = seatRemovalNote(edits.removeSeats, parent.proposal.seats?.keys ?? parent.proposal.helpers?.seats ?? [], workers, (k) => ctx.roster.find((s) => s.key === k)?.name ?? k);
|
|
2783
2912
|
const proposal = removal.length === 0 || candidate.sentence === undefined ? candidate : { ...candidate, sentence: { ...candidate.sentence, notes: [...candidate.sentence.notes, ...removal] } };
|
|
2784
2913
|
if (!this.write(chatId, { at: this.now(), turnId: src.turnId ?? `person:${src.pid.slice(src.pid.lastIndexOf(':') + 1)}`, kind: 'proposal', proposal }, instance))
|
|
2785
2914
|
return this.gone(chatId);
|
|
@@ -2909,6 +3038,49 @@ export class ChatProposals {
|
|
|
2909
3038
|
return released;
|
|
2910
3039
|
});
|
|
2911
3040
|
}
|
|
3041
|
+
/** A read redraws a seat-held job from the current pool, without an answer turn (crew#1484). */
|
|
3042
|
+
async recheckHeldSeats(chatId, instance = this.deps.instanceOf(chatId)) {
|
|
3043
|
+
const held = (f) => f.state === 'open' && f.proposal.kind === 'job'
|
|
3044
|
+
&& f.proposal.shape !== undefined && !f.proposal.seatsUnread && f.proposal.blocked?.startsWith('Needs ') === true;
|
|
3045
|
+
if (![...foldProposals(this.deps.records(chatId)).values()].some(held))
|
|
3046
|
+
return false;
|
|
3047
|
+
return this.lock.run(`chat\u0000${instance ?? chatId}`, async () => {
|
|
3048
|
+
let changed = false;
|
|
3049
|
+
for (const f of foldProposals(this.deps.records(chatId)).values()) {
|
|
3050
|
+
if (!held(f))
|
|
3051
|
+
continue;
|
|
3052
|
+
const p = f.proposal;
|
|
3053
|
+
// An ended chat's open card is redrawn using its recorded scope and seat order.
|
|
3054
|
+
const chat = this.jobChat(chatId) ?? {
|
|
3055
|
+
projectId: p.filedIn.projectId,
|
|
3056
|
+
repos: (p.repoRefs ?? []).map((id, i) => ({ id, name: p.repos[i] ?? id })),
|
|
3057
|
+
lead: p.seats?.lead ?? null,
|
|
3058
|
+
seats: p.seats?.keys ?? [],
|
|
3059
|
+
};
|
|
3060
|
+
const ctx = await this.jobContext(chatId, p.pid, p.turnId, p.seat, chat, {
|
|
3061
|
+
revises: p.revises ?? null, lineage: p.lineage ?? p.pid, notes: [],
|
|
3062
|
+
...(p.request !== undefined ? { request: p.request } : {}),
|
|
3063
|
+
...(p.answers !== undefined ? { answers: p.answers } : {}),
|
|
3064
|
+
});
|
|
3065
|
+
if (ctx.seatsUnread)
|
|
3066
|
+
continue;
|
|
3067
|
+
const r = resolveOption(p.shape.card, p.shape.option, ctx.served);
|
|
3068
|
+
if (r === null || ctx.served.rev !== p.catalogRev || r.resolved.resolution !== p.resolution || p.blocked !== seatsShortLine(r, p.seats?.keys.length ?? 0))
|
|
3069
|
+
continue;
|
|
3070
|
+
if ((ctx.pool ?? ctx.roster).length < seatsNeeded(r))
|
|
3071
|
+
continue;
|
|
3072
|
+
const facts = { ...factsOf(p), lead: null, seats: null };
|
|
3073
|
+
const fresh = keepReshape(await this.proposalOf(chatId, p.pid, facts, ctx, this.deps.records(chatId), true, p), p);
|
|
3074
|
+
if (fresh.seats === undefined || fresh.seats.keys.length < seatsNeeded(r))
|
|
3075
|
+
continue;
|
|
3076
|
+
const current = foldProposals(this.deps.records(chatId)).get(p.pid);
|
|
3077
|
+
if (current === undefined || !held(current) || current.proposal.blocked !== p.blocked)
|
|
3078
|
+
continue;
|
|
3079
|
+
changed = this.write(chatId, { at: this.now(), turnId: current.turnId, kind: 'proposal', proposal: fresh }, instance) || changed;
|
|
3080
|
+
}
|
|
3081
|
+
return changed;
|
|
3082
|
+
});
|
|
3083
|
+
}
|
|
2912
3084
|
/** A job's Go edits (option, depth, repository, seats, inputs) merged by the revision rules: one that loses a check
|
|
2913
3085
|
* is refused (that is the person's press on the lost-check question, not an edit at Go). */
|
|
2914
3086
|
async applyJobEdits(chatId, f, edits) {
|
|
@@ -2956,7 +3128,7 @@ export class ChatProposals {
|
|
|
2956
3128
|
throw new EditRefusal(`that would drop ${checksLabel(dropped)}; check the job again`);
|
|
2957
3129
|
if (out.seats !== undefined && out.shape !== undefined) {
|
|
2958
3130
|
const r = resolveOption(out.shape.card, out.shape.option, ctx.served);
|
|
2959
|
-
if (r !== null && !(r.workflow !== null && SELF_SEATED.has(r.workflow)) && out.seats.keys.length <
|
|
3131
|
+
if (r !== null && !(r.workflow !== null && SELF_SEATED.has(r.workflow)) && out.seats.keys.length < seatsNeeded(r)) {
|
|
2960
3132
|
throw new EditRefusal('this job needs another seat to check the one that builds');
|
|
2961
3133
|
}
|
|
2962
3134
|
}
|
|
@@ -3086,7 +3258,7 @@ export class ChatProposals {
|
|
|
3086
3258
|
if (gone !== null)
|
|
3087
3259
|
throw new JobRefusal('source_gone', gone, 409);
|
|
3088
3260
|
}
|
|
3089
|
-
proposal = await this.proposalOf(chatId, x.pid, facts, ctx, this.deps.records(chatId), false, heldP ?? null);
|
|
3261
|
+
proposal = await this.proposalOf(chatId, x.pid, facts, ctx, this.deps.records(chatId), false, heldP ?? null, x.relaunch);
|
|
3090
3262
|
if (x.edits.inputs?.['documents'] !== undefined)
|
|
3091
3263
|
this.refuseStruckDocuments(proposal);
|
|
3092
3264
|
else if (heldP !== undefined)
|
|
@@ -3212,11 +3384,11 @@ export class ChatProposals {
|
|
|
3212
3384
|
const pid = `${base.chatId}:retry:${runId}`;
|
|
3213
3385
|
if (folded.has(pid))
|
|
3214
3386
|
return pid;
|
|
3215
|
-
//
|
|
3216
|
-
// protected edits of that head, Keep preselected for every one.
|
|
3387
|
+
// A retry keeps the accepted choices only for edit ids still present on the new head.
|
|
3217
3388
|
const fresh = base.kind === 'refine' && base.target !== undefined ? await this.refreshTarget(base) : base;
|
|
3218
3389
|
const retry = {
|
|
3219
3390
|
...fresh,
|
|
3391
|
+
...(base.kind === 'refine' ? { allow: (failed.accepting?.edits?.allow ?? []).filter((id) => fresh.protected?.some((e) => e.id === id)) } : {}),
|
|
3220
3392
|
pid,
|
|
3221
3393
|
turnId: null,
|
|
3222
3394
|
sourceRunId: runId,
|