create-walle 0.10.1 → 0.10.2
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 +4 -0
- package/lib/owner-write-safety.js +135 -0
- package/lib/public-runtime.js +13 -5
- package/lib/release-schema.json +3 -2
- package/lib/runtime-closure-policy.json +6 -4
- package/package.json +1 -1
- package/template/bin/deps-doctor.js +1 -1
- package/template/bin/node-bin.sh +11 -0
- package/template/coding-task-manager/api-prompts.js +10 -22
- package/template/coding-task-manager/bin/claude-hook.js +7 -3
- package/template/coding-task-manager/bin/claude-table-parity.js +307 -0
- package/template/coding-task-manager/bin/conversation-storage-auto-migration-lib.js +16 -1
- package/template/coding-task-manager/bin/conversation-storage-generation-evidence.js +9 -2
- package/template/coding-task-manager/bin/conversation-storage-service-entry-lib.js +16 -1
- package/template/coding-task-manager/bin/conversation-storage-walle-owner.js +247 -0
- package/template/coding-task-manager/bin/ctm-machine-pair.js +160 -0
- package/template/coding-task-manager/bin/lead-wait-census.js +1348 -0
- package/template/coding-task-manager/bin/repair-foreign-clone.js +564 -0
- package/template/coding-task-manager/bin/repair-resume-echo-titles.js +248 -0
- package/template/coding-task-manager/bin/write-lock-bench.js +111 -0
- package/template/coding-task-manager/db.js +705 -286
- package/template/coding-task-manager/git-utils.js +44 -0
- package/template/coding-task-manager/lib/adopted-host-redial.js +4 -0
- package/template/coding-task-manager/lib/agent-presets.js +15 -0
- package/template/coding-task-manager/lib/agent-title-apply.js +88 -0
- package/template/coding-task-manager/lib/agent-title-backfill-read.js +92 -0
- package/template/coding-task-manager/lib/api/host-stats.js +98 -0
- package/template/coding-task-manager/lib/api/ingress.js +35 -12
- package/template/coding-task-manager/lib/api/machine-pairing.js +285 -0
- package/template/coding-task-manager/lib/api/machine-pool.js +307 -0
- package/template/coding-task-manager/lib/api/machines.js +461 -0
- package/template/coding-task-manager/lib/api/misc-ops.js +20 -5
- package/template/coding-task-manager/lib/api/providers.js +53 -6
- package/template/coding-task-manager/lib/api/resume-from-store.js +25 -0
- package/template/coding-task-manager/lib/api/sessions.js +160 -8
- package/template/coding-task-manager/lib/api/transcript-history.js +17 -4
- package/template/coding-task-manager/lib/api/worktrees.js +38 -37
- package/template/coding-task-manager/lib/approval-drift.js +16 -1
- package/template/coding-task-manager/lib/approval-logical-frame.js +5 -1
- package/template/coding-task-manager/lib/approval-scope.js +68 -4
- package/template/coding-task-manager/lib/auth-context.js +32 -2
- package/template/coding-task-manager/lib/auth-rate-limit.js +41 -1
- package/template/coding-task-manager/lib/auth-rules.js +186 -45
- package/template/coding-task-manager/lib/broadcast-serialize.js +2 -1
- package/template/coding-task-manager/lib/browser-session-broker.js +9 -1
- package/template/coding-task-manager/lib/browser-use-adapter.js +33 -2
- package/template/coding-task-manager/lib/claude-markdown-ansi.js +27 -85
- package/template/coding-task-manager/lib/claude-session-title.js +6 -30
- package/template/coding-task-manager/lib/claude-table-layout.js +322 -0
- package/template/coding-task-manager/lib/client-diag-handler.js +5 -0
- package/template/coding-task-manager/lib/codex-config-guard.js +33 -3
- package/template/coding-task-manager/lib/codex-harness-qualification.js +12 -0
- package/template/coding-task-manager/lib/codex-launch-health.js +29 -2
- package/template/coding-task-manager/lib/codex-link-preparation.js +9 -8
- package/template/coding-task-manager/lib/codex-paths.js +2 -1
- package/template/coding-task-manager/lib/coding-agent-models.js +21 -30
- package/template/coding-task-manager/lib/coding-session-model-adapters.js +27 -2
- package/template/coding-task-manager/lib/coding-session-model-projection.js +5 -0
- package/template/coding-task-manager/lib/coding-session-model-runtime.js +1 -2
- package/template/coding-task-manager/lib/coding-session-model-state.js +10 -0
- package/template/coding-task-manager/lib/coding-session-model-sync-state.js +0 -1
- package/template/coding-task-manager/lib/conversation-import/cursor-guard-owner.js +10 -0
- package/template/coding-task-manager/lib/create/resolve-launch-params.js +8 -1
- package/template/coding-task-manager/lib/ctm-boot-lifecycle.js +17 -1
- package/template/coding-task-manager/lib/db-domain-tables.js +7 -0
- package/template/coding-task-manager/lib/db-domains.js +21 -2
- package/template/coding-task-manager/lib/db-owner-op-registry.js +7 -0
- package/template/coding-task-manager/lib/db-schema-source-files.js +1 -0
- package/template/coding-task-manager/lib/feature-manifest.js +1 -1
- package/template/coding-task-manager/lib/fs-watcher.js +3 -2
- package/template/coding-task-manager/lib/harness-history-transition.js +3 -3
- package/template/coding-task-manager/lib/headless-inflight-ops.js +203 -0
- package/template/coding-task-manager/lib/headless-missing-reply.js +42 -0
- package/template/coding-task-manager/lib/headless-term-service.js +55 -17
- package/template/coding-task-manager/lib/host-control-dial.js +167 -0
- package/template/coding-task-manager/lib/host-handoff-orchestrator.js +16 -2
- package/template/coding-task-manager/lib/host-handoff.js +51 -13
- package/template/coding-task-manager/lib/host-health-ledger.js +164 -12
- package/template/coding-task-manager/lib/host-self-truth-watchdog.js +4 -0
- package/template/coding-task-manager/lib/host-stats.js +328 -0
- package/template/coding-task-manager/lib/host-threadpool-evacuation.js +160 -0
- package/template/coding-task-manager/lib/host-threadpool-monitor.js +14 -1
- package/template/coding-task-manager/lib/hosted-input-dispatch.js +203 -0
- package/template/coding-task-manager/lib/hosted-sync-worker.js +113 -5
- package/template/coding-task-manager/lib/instance-id-ownership-manifest.js +4 -0
- package/template/coding-task-manager/lib/instance-manifest-runtime.js +3 -0
- package/template/coding-task-manager/lib/instance-manifest.js +13 -1
- package/template/coding-task-manager/lib/instance-sync-status.js +15 -0
- package/template/coding-task-manager/lib/launch-model-override.js +160 -1
- package/template/coding-task-manager/lib/launch-plan-worker.js +59 -2
- package/template/coding-task-manager/lib/lead-model-switch-runtime.js +57 -4
- package/template/coding-task-manager/lib/lead-model-switch.js +3 -2
- package/template/coding-task-manager/lib/lead-model-transition-store.js +61 -3
- package/template/coding-task-manager/lib/legacy-draft-cancellation-recovery.js +111 -0
- package/template/coding-task-manager/lib/login-tripwire.js +1 -0
- package/template/coding-task-manager/lib/machine-pairing.js +238 -0
- package/template/coding-task-manager/lib/machine-pool.js +409 -0
- package/template/coding-task-manager/lib/machine-registry.js +749 -0
- package/template/coding-task-manager/lib/machine-self.js +66 -0
- package/template/coding-task-manager/lib/main-thread-lint-exemptions.json +52 -4
- package/template/coding-task-manager/lib/media-journal-control-reader.js +473 -0
- package/template/coding-task-manager/lib/media-journal.js +84 -27
- package/template/coding-task-manager/lib/media-store-options.js +43 -15
- package/template/coding-task-manager/lib/migrations/v56-host-samples-and-machine-pool.js +76 -0
- package/template/coding-task-manager/lib/mirror-feed-sanitize.js +12 -3
- package/template/coding-task-manager/lib/model-proxy/anthropic-face.js +4 -0
- package/template/coding-task-manager/lib/model-proxy/chat-response-translators.js +3 -0
- package/template/coding-task-manager/lib/model-proxy/handoff.js +494 -0
- package/template/coding-task-manager/lib/model-proxy/lead-worker-picks.js +25 -0
- package/template/coding-task-manager/lib/model-proxy/native-lead-listener.js +61 -7
- package/template/coding-task-manager/lib/model-proxy/proxy-cli.js +200 -0
- package/template/coding-task-manager/lib/model-proxy/proxy-instance-record.js +257 -0
- package/template/coding-task-manager/lib/model-proxy/stream-accounting.js +205 -0
- package/template/coding-task-manager/lib/model-proxy/tokens.js +78 -0
- package/template/coding-task-manager/lib/model-proxy/upstream-outcome.js +9 -0
- package/template/coding-task-manager/lib/native-history-control.js +2 -2
- package/template/coding-task-manager/lib/native-lead-settings-client.js +2 -1
- package/template/coding-task-manager/lib/native-lead-tls.js +18 -4
- package/template/coding-task-manager/lib/oauth-proxy-supervisor.js +628 -64
- package/template/coding-task-manager/lib/owner-action-manifest-data.json +14 -0
- package/template/coding-task-manager/lib/painted-row-recorder.js +9 -1
- package/template/coding-task-manager/lib/prompt-submission-contract.js +21 -1
- package/template/coding-task-manager/lib/provider-login-broker.js +192 -9
- package/template/coding-task-manager/lib/provider-login-capture.js +153 -0
- package/template/coding-task-manager/lib/queue-draft-status-overlay.js +36 -0
- package/template/coding-task-manager/lib/raw-codex-history-window.js +5 -3
- package/template/coding-task-manager/lib/read-pool-client.js +5 -2
- package/template/coding-task-manager/lib/read-pool-op-registry.js +10 -1
- package/template/coding-task-manager/lib/recent-catalog-query.js +26 -0
- package/template/coding-task-manager/lib/recent-session-catalog-response.js +9 -0
- package/template/coding-task-manager/lib/remote-command-context.js +12 -0
- package/template/coding-task-manager/lib/remote-command-runtime.js +13 -1
- package/template/coding-task-manager/lib/remote-machine-catalog.js +1062 -0
- package/template/coding-task-manager/lib/remote-machine-create.js +693 -0
- package/template/coding-task-manager/lib/remote-machine-link.js +939 -0
- package/template/coding-task-manager/lib/remote-machine-proxy.js +520 -0
- package/template/coding-task-manager/lib/remote-session-forward.js +306 -0
- package/template/coding-task-manager/lib/remote-submission-status.js +6 -0
- package/template/coding-task-manager/lib/restart-outcome-truth.js +20 -3
- package/template/coding-task-manager/lib/restart-preflight.js +9 -2
- package/template/coding-task-manager/lib/restore-backoff-gate.js +10 -2
- package/template/coding-task-manager/lib/restore-prepare-retry.js +12 -5
- package/template/coding-task-manager/lib/restore-resume-batch.js +22 -1
- package/template/coding-task-manager/lib/resume-blocked-wire.js +62 -1
- package/template/coding-task-manager/lib/resume-cwd.js +13 -0
- package/template/coding-task-manager/lib/resume-from-store.js +12 -1
- package/template/coding-task-manager/lib/resume-origin-facts.js +38 -1
- package/template/coding-task-manager/lib/resume-preflight.js +21 -16
- package/template/coding-task-manager/lib/review-repo-admission.js +39 -6
- package/template/coding-task-manager/lib/review-repo-registry.js +17 -0
- package/template/coding-task-manager/lib/root-delivery-runtime.js +72 -15
- package/template/coding-task-manager/lib/root-delivery-selection.js +37 -1
- package/template/coding-task-manager/lib/root-prompt-admission.js +33 -2
- package/template/coding-task-manager/lib/root-prompt-flow.js +167 -33
- package/template/coding-task-manager/lib/scrollback-archive-store.js +7 -4
- package/template/coding-task-manager/lib/session-analysis-memory.js +2 -0
- package/template/coding-task-manager/lib/session-create/codex-native-provider-gate.js +218 -0
- package/template/coding-task-manager/lib/session-create/codex-resume-exit-classify.js +52 -0
- package/template/coding-task-manager/lib/session-create/delegate-worker.js +95 -6
- package/template/coding-task-manager/lib/session-create/identity.js +20 -1
- package/template/coding-task-manager/lib/session-create/prepared.js +69 -1
- package/template/coding-task-manager/lib/session-create/provider-launch-context.js +77 -0
- package/template/coding-task-manager/lib/session-create/provider-process.js +34 -37
- package/template/coding-task-manager/lib/session-create/response.js +30 -12
- package/template/coding-task-manager/lib/session-create/transcript.js +13 -4
- package/template/coding-task-manager/lib/session-create/worker-continuation.js +43 -1
- package/template/coding-task-manager/lib/session-create/worker-notices.js +94 -5
- package/template/coding-task-manager/lib/session-create/worker-observability.js +99 -7
- package/template/coding-task-manager/lib/session-create/worker-stop.js +11 -3
- package/template/coding-task-manager/lib/session-create/worker-wait-watcher.js +315 -0
- package/template/coding-task-manager/lib/session-geometry-authority-handler.js +10 -1
- package/template/coding-task-manager/lib/session-host-manager.js +152 -206
- package/template/coding-task-manager/lib/session-jobs.js +17 -9
- package/template/coding-task-manager/lib/session-lifecycle.js +18 -0
- package/template/coding-task-manager/lib/session-model-action-preconditions.js +9 -0
- package/template/coding-task-manager/lib/session-resource-sampler.js +19 -9
- package/template/coding-task-manager/lib/session-standup.js +67 -4
- package/template/coding-task-manager/lib/session-status-ledger.js +42 -3
- package/template/coding-task-manager/lib/session-status-runtime.js +45 -1
- package/template/coding-task-manager/lib/session-title-mirror.js +25 -57
- package/template/coding-task-manager/lib/session-transcript-trash.js +8 -1
- package/template/coding-task-manager/lib/startup-pointer-write.js +57 -0
- package/template/coding-task-manager/lib/state-sync/painted-frame-field.js +11 -0
- package/template/coding-task-manager/lib/storage/coding-session-model-store.js +21 -22
- package/template/coding-task-manager/lib/surviving-owner-bootstrap.js +7 -2
- package/template/coding-task-manager/lib/surviving-owner-recovery.js +2 -1
- package/template/coding-task-manager/lib/terminal-draft-http-status.js +25 -0
- package/template/coding-task-manager/lib/transcript-archiver.js +229 -229
- package/template/coding-task-manager/lib/transcript-frame-cache.js +12 -2
- package/template/coding-task-manager/lib/transcript-guard-job.js +55 -4
- package/template/coding-task-manager/lib/transcript-link.js +77 -0
- package/template/coding-task-manager/lib/transcript-manifest-store.js +8 -4
- package/template/coding-task-manager/lib/transcript-source.js +8 -3
- package/template/coding-task-manager/lib/transcript-store.js +40 -0
- package/template/coding-task-manager/lib/tunnel-lane-governor.js +6 -3
- package/template/coding-task-manager/lib/typing-interaction-trace.js +92 -0
- package/template/coding-task-manager/lib/typing-worker-stages.js +60 -0
- package/template/coding-task-manager/lib/visible-revision-watchdog.js +8 -12
- package/template/coding-task-manager/lib/wake-skip-reasons.js +46 -0
- package/template/coding-task-manager/lib/walle-supervisor.js +98 -14
- package/template/coding-task-manager/lib/worker-failure-classify.js +13 -1
- package/template/coding-task-manager/lib/ws/state-sync.js +19 -2
- package/template/coding-task-manager/lib/ws/terminal-attach.js +32 -1
- package/template/coding-task-manager/lib/ws-router.js +68 -1
- package/template/coding-task-manager/lib/ws-send-admission.js +22 -4
- package/template/coding-task-manager/oauth-proxy.js +99 -55
- package/template/coding-task-manager/package-lock.json +24 -0
- package/template/coding-task-manager/package.json +3 -0
- package/template/coding-task-manager/providers/codex-mcp-extract.js +121 -19
- package/template/coding-task-manager/providers/codex-mcp.js +14 -5
- package/template/coding-task-manager/public/css/app.css +279 -1
- package/template/coding-task-manager/public/css/reviews.css +4 -0
- package/template/coding-task-manager/public/index.html +294 -223
- package/template/coding-task-manager/public/js/app/machines-page.js +1252 -0
- package/template/coding-task-manager/public/js/app/models-tab.js +546 -36
- package/template/coding-task-manager/public/js/app/worktrees-panel.js +7 -5
- package/template/coding-task-manager/public/js/background-work.js +13 -7
- package/template/coding-task-manager/public/js/coding-session-model-presentation.js +44 -4
- package/template/coding-task-manager/public/js/core/session-commands.js +676 -0
- package/template/coding-task-manager/public/js/core/session-selectors.js +5 -1
- package/template/coding-task-manager/public/js/history-app-seam.js +26 -2
- package/template/coding-task-manager/public/js/history-painted-rows.js +17 -2
- package/template/coding-task-manager/public/js/history-reader-park.js +13 -1
- package/template/coding-task-manager/public/js/history-scroller.js +187 -9
- package/template/coding-task-manager/public/js/history-transcript-pages.js +5 -5
- package/template/coding-task-manager/public/js/machine-pool-shared.js +436 -0
- package/template/coding-task-manager/public/js/private-state-scope.js +31 -3
- package/template/coding-task-manager/public/js/prompt-submission-client.js +173 -8
- package/template/coding-task-manager/public/js/prompt-submission-tray.js +281 -0
- package/template/coding-task-manager/public/js/queue-panel-submission-reconcile.js +174 -1
- package/template/coding-task-manager/public/js/reviews.js +7 -3
- package/template/coding-task-manager/public/js/root-draft-lifetime.js +139 -2
- package/template/coding-task-manager/public/js/root-queue-builder-lifetime.js +16 -0
- package/template/coding-task-manager/public/js/row-join.js +4 -2
- package/template/coding-task-manager/public/js/session-model-picker.js +1 -1
- package/template/coding-task-manager/public/js/session-search-utils.js +46 -19
- package/template/coding-task-manager/public/js/state-sync-client.js +4 -0
- package/template/coding-task-manager/public/js/terminal/runtime-02.js +16 -7
- package/template/coding-task-manager/public/js/terminal/runtime-03.js +41 -0
- package/template/coding-task-manager/public/js/terminal/runtime-04.js +41 -4
- package/template/coding-task-manager/public/js/terminal/runtime-12.js +52 -2
- package/template/coding-task-manager/public/js/terminal/runtime-16.js +12 -12
- package/template/coding-task-manager/public/js/terminal/runtime-18.js +14 -0
- package/template/coding-task-manager/public/js/terminal/runtime-19.js +8 -4
- package/template/coding-task-manager/public/js/terminal/runtime-20.js +210 -73
- package/template/coding-task-manager/public/js/terminal/runtime-21.js +19 -6
- package/template/coding-task-manager/public/js/terminal/runtime-22.js +86 -0
- package/template/coding-task-manager/public/js/terminal-history-viewport.js +1 -1
- package/template/coding-task-manager/public/js/terminal-wheel.js +39 -2
- package/template/coding-task-manager/public/js/walle/chat-conversation.js +11 -3
- package/template/coding-task-manager/public/js/walle-session.js +30 -7
- package/template/coding-task-manager/public/m/app.css +226 -8
- package/template/coding-task-manager/public/m/app.js +502 -9
- package/template/coding-task-manager/public/m/index.html +38 -1
- package/template/coding-task-manager/public/m/machines.js +1313 -0
- package/template/coding-task-manager/public/m/pool-failover.js +391 -0
- package/template/coding-task-manager/public/m/private-queue-actions.js +26 -7
- package/template/coding-task-manager/public/m/sw.js +5 -0
- package/template/coding-task-manager/queue-engine.js +13 -0
- package/template/coding-task-manager/server/approvals.js +5 -6
- package/template/coding-task-manager/server/boot.js +136 -17
- package/template/coding-task-manager/server.js +902 -239
- package/template/coding-task-manager/session-integrity.js +7 -9
- package/template/coding-task-manager/workers/db-owner-worker.js +53 -7
- package/template/coding-task-manager/workers/read-pool-worker.js +17 -6
- package/template/coding-task-manager/workers/session-host-pool-process.js +18 -4
- package/template/coding-task-manager/workers/session-host-process.js +14 -3
- package/template/coding-task-manager/workers/transcript-archive-worker.js +1 -1
- package/template/coding-task-manager/workers/worktree-worker.js +34 -0
- package/template/package-lock.json +2 -2
- package/template/package.json +1 -1
- package/template/scripts/conversation-storage-v2-migration.js +78 -11
- package/template/shared/conversation-storage-v2-contract.js +42 -6
- package/template/shared/fixtures/worker-status-payloads.json +392 -0
- package/template/shared/git-remote-key.js +83 -0
- package/template/shared/host-identity.js +98 -2
- package/template/shared/owner-write-safety.js +135 -0
- package/template/shared/public-runtime.js +13 -5
- package/template/shared/release-schema.json +3 -2
- package/template/shared/report-citations.js +14 -0
- package/template/shared/sqlite-write-lock.js +361 -223
- package/template/shared/storage/contract.js +35 -3
- package/template/wall-e/agent.js +21 -0
- package/template/wall-e/api-walle.js +5 -0
- package/template/wall-e/bin/brain-purge-legacy-ctm.js +3 -2
- package/template/wall-e/bin/walle-mcp-stdio.js +12 -6
- package/template/wall-e/brain/helper-rules-schema.js +129 -0
- package/template/wall-e/brain/migrations.js +51 -22
- package/template/wall-e/brain/model-deployment-facts.js +31 -1
- package/template/wall-e/brain/owner-call-whitelist.js +16 -0
- package/template/wall-e/brain/schema-ensures.js +22 -0
- package/template/wall-e/brain.js +1 -1
- package/template/wall-e/coding/journal-dispatcher.js +51 -0
- package/template/wall-e/coding/session-journal.js +28 -40
- package/template/wall-e/coding-orchestrator.js +23 -26
- package/template/wall-e/http/auth.js +18 -1
- package/template/wall-e/http/blog-views-api.js +318 -0
- package/template/wall-e/http/helper-rules-api.js +321 -0
- package/template/wall-e/http/model-proxy-providers.js +3 -1
- package/template/wall-e/http/telemetry-api.js +12 -0
- package/template/wall-e/lib/blog-view-policy.js +88 -0
- package/template/wall-e/lib/blog-view-store.js +169 -0
- package/template/wall-e/lib/client-config-lock.js +2 -1
- package/template/wall-e/lib/coding-journal-writer-child-client.js +67 -18
- package/template/wall-e/lib/error-kinds.js +10 -1
- package/template/wall-e/lib/feature-manifest.js +1 -1
- package/template/wall-e/lib/helper-rules/cell-state.js +123 -0
- package/template/wall-e/lib/helper-rules/evaluate.js +357 -0
- package/template/wall-e/lib/helper-rules/explore-rubric.md +12 -0
- package/template/wall-e/lib/helper-rules/grade.js +277 -0
- package/template/wall-e/lib/helper-rules/label.js +247 -0
- package/template/wall-e/lib/helper-rules/lead-call-hook.js +522 -0
- package/template/wall-e/lib/helper-rules/store.js +667 -0
- package/template/wall-e/lib/mcp-integration.js +5 -6
- package/template/wall-e/lib/runtime-worker-pool.js +1 -0
- package/template/wall-e/lib/scheduler-worker-jobs.js +6 -0
- package/template/wall-e/lib/telemetry-db-schema.js +37 -0
- package/template/wall-e/lib/telemetry-process-client.js +76 -1
- package/template/wall-e/llm/default-fallback.js +4 -0
- package/template/wall-e/llm/model-catalog.js +13 -4
- package/template/wall-e/llm/model-roles.js +6 -0
- package/template/wall-e/llm/portkey-http.js +150 -0
- package/template/wall-e/llm/portkey-sync.js +15 -145
- package/template/wall-e/llm/worker-mcp-routing.js +61 -0
- package/template/wall-e/llm/worker-route.js +43 -1
- package/template/wall-e/loops/brain-custom-writes.js +45 -0
- package/template/wall-e/mcp-protocol-contract.js +41 -1
- package/template/wall-e/mcp-server.js +13 -2
- package/template/wall-e/mcp-worker-schemas.js +20 -2
- package/template/wall-e/memory/ctm-context-client.js +25 -5
- package/template/wall-e/shared/release-schema.json +3 -2
- package/template/wall-e/shared/sqlite-write-lock.js +361 -223
- package/template/wall-e/shared/storage/contract.js +35 -3
- package/template/wall-e/skills/_templates/delegate-worker/VERSION +1 -1
- package/template/wall-e/skills/_templates/delegate-worker/released-sha256.json +6 -0
- package/template/wall-e/skills/_templates/delegate-worker/templates/claude/SKILL.md +7 -2
- package/template/wall-e/skills/_templates/delegate-worker/templates/codex/SKILL.md +7 -2
- package/template/wall-e/tools/local-tools.js +6 -4
- package/template/wall-e/workers/brain-owner-worker.js +9 -0
- package/template/wall-e/workers/coding-journal-writer-child.js +8 -1
- package/template/wall-e/workers/telemetry-worker.js +8 -0
|
@@ -81,12 +81,15 @@ function _onTerminalGeometryClaimAckV2(msg) {
|
|
|
81
81
|
s._sessionGeometryRuntime?.setQueued(true);
|
|
82
82
|
// A correction fit has already resized the local xterm to the proposed
|
|
83
83
|
// grid, but a queued ACK proves the PTY is still on the incumbent grid.
|
|
84
|
-
// Roll the presentation back immediately
|
|
85
|
-
//
|
|
84
|
+
// Roll the presentation back immediately. WP-1 (docs/codex-terminal-geometry-sticky-cols-
|
|
85
|
+
// 2026-10-24.html; tests/geometry-queued-rollback.test.js): the rollback is presentation only
|
|
86
|
+
// and records no measurement, so the queued claim's proof stays the ledger's current proof and
|
|
87
|
+
// the server's bounded replay can commit it. Recording here replaced that proof (single-slot
|
|
88
|
+
// ledger), and the replay was rejected `measurement-stale` -- the widening never committed.
|
|
86
89
|
const committedCols = Number(msg.committedGrid?.cols || 0);
|
|
87
90
|
const committedRows = Number(msg.committedGrid?.rows || 0);
|
|
88
91
|
if (s._terminalGeometryPendingResizeV2 && committedCols > 0 && committedRows > 0) {
|
|
89
|
-
_applyTerminalActivationGrid(s, { cols: committedCols, rows: committedRows });
|
|
92
|
+
_applyTerminalActivationGrid(s, { cols: committedCols, rows: committedRows }, undefined, { recordMeasurement: false });
|
|
90
93
|
}
|
|
91
94
|
_syncTerminalInputOwnership(s, _resumeStateForSession(s));
|
|
92
95
|
return false;
|
|
@@ -1313,15 +1316,21 @@ function _syncCodexActiveComposerGeometry(s, id, reason, opts) {
|
|
|
1313
1316
|
}
|
|
1314
1317
|
}
|
|
1315
1318
|
|
|
1319
|
+
// G-4 (D-2): report the grid xterm HOLDS after the resize above, never the proposal. The local
|
|
1320
|
+
// agent-TUI cols pin refuses a narrower proposal, so `cols`/`rows` are often not what the client
|
|
1321
|
+
// ended up with -- and `_sendTerminalResizeIfChanged` puts opts.cols on the wire verbatim, which
|
|
1322
|
+
// would tell the server to resize its PTY to a width this client does not hold.
|
|
1323
|
+
const heldCols = Number(s.term.cols) || currentCols;
|
|
1324
|
+
const heldRows = Number(s.term.rows) || currentRows;
|
|
1316
1325
|
const sent = _sendTerminalResizeIfChanged(s, id, reason || 'codex-active-composer-geometry', {
|
|
1317
|
-
cols: allowTermResize ?
|
|
1318
|
-
rows: allowTermResize ?
|
|
1326
|
+
cols: allowTermResize ? heldCols : currentCols,
|
|
1327
|
+
rows: allowTermResize ? heldRows : currentRows,
|
|
1319
1328
|
});
|
|
1320
1329
|
if (resizeNeeded || sent) {
|
|
1321
1330
|
s._codexActiveComposerGeometrySyncedAt = now;
|
|
1322
1331
|
s._codexActiveComposerGeometrySyncReason = reason || 'codex-active-composer-geometry';
|
|
1323
|
-
s._codexActiveComposerGeometrySyncedCols = allowTermResize ?
|
|
1324
|
-
s._codexActiveComposerGeometrySyncedRows = allowTermResize ?
|
|
1332
|
+
s._codexActiveComposerGeometrySyncedCols = allowTermResize ? heldCols : currentCols;
|
|
1333
|
+
s._codexActiveComposerGeometrySyncedRows = allowTermResize ? heldRows : currentRows;
|
|
1325
1334
|
}
|
|
1326
1335
|
return !!(resizeNeeded || sent);
|
|
1327
1336
|
}
|
|
@@ -22,6 +22,46 @@ function _reportReadinessViolationOnce(s, kind, since, gates, extraDetails) {
|
|
|
22
22
|
_reportResumeBeacon('readiness-violation', s._id, since, { kind, gates: gates || [], ...(extraDetails || {}) });
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// WP-4a (§5 OQ-4, §6, S-21): the durable cover-over-content row recorded only gates=[], so a cover
|
|
26
|
+
// that outlived its session by ~11 min could not be attributed. This snapshot names the three
|
|
27
|
+
// candidate holders beside the mounted element: H-A storeLifecycle null/'active' with an overlay
|
|
28
|
+
// still in the DOM (the store forgot the session or already cleared it, so the clear is a silent
|
|
29
|
+
// no-op), H-B storeLifecycle 'resume-blocked' (shared element, every dismissal refuses it),
|
|
30
|
+
// H-C lastDismiss null or older than the cover (no dismissal ran). Instrumentation only: it reads
|
|
31
|
+
// state and never shows, dismisses or re-mounts anything (A-9). A missing/blocked DOM or CSS.escape
|
|
32
|
+
// degrades to 0/'' -- instrumentation must never be able to break the readiness sweep.
|
|
33
|
+
function _coverTruthSnapshot(s) {
|
|
34
|
+
const id = String(s?._id || '');
|
|
35
|
+
let containers = [];
|
|
36
|
+
let overlaysInDom = 0;
|
|
37
|
+
let label = null;
|
|
38
|
+
try {
|
|
39
|
+
if (id && typeof document !== 'undefined' && typeof document.querySelectorAll === 'function') {
|
|
40
|
+
const escaped = typeof CSS !== 'undefined' && typeof CSS.escape === 'function' ? CSS.escape(id) : id;
|
|
41
|
+
containers = Array.from(document.querySelectorAll('.term-container[data-session-id="' + escaped + '"]'));
|
|
42
|
+
}
|
|
43
|
+
overlaysInDom = containers.reduce((n, c) => n + (c?.querySelectorAll?.(':scope > .snapshot-loading-overlay')?.length || 0), 0);
|
|
44
|
+
label = s?.container?.querySelector?.('.snapshot-loading-overlay .snapshot-loading-text') || null;
|
|
45
|
+
} catch (_) { /* expected: a missing/blocked DOM or CSS.escape must degrade the snapshot to zeros, never break the sweep */ }
|
|
46
|
+
const rs = _resumeStateForSession(s);
|
|
47
|
+
return {
|
|
48
|
+
storeLifecycle: _presentationStore.getSessionState(id)?.lifecycle ?? null,
|
|
49
|
+
termContainers: containers.length,
|
|
50
|
+
overlaysInDom,
|
|
51
|
+
labelHead: String(label?.textContent || '').slice(0, 48),
|
|
52
|
+
rsState: String(rs?.state || ''),
|
|
53
|
+
rsDismissBlocked: rs?.dismissBlocked === true,
|
|
54
|
+
restoreFlags: {
|
|
55
|
+
resumeLoading: s?.resumeLoading === true,
|
|
56
|
+
deferred: !!s?._restoreDeferred,
|
|
57
|
+
resuming: !!s?._restoreResuming,
|
|
58
|
+
starting: !!s?._restoreStarting,
|
|
59
|
+
},
|
|
60
|
+
bootstrapPending: s?._terminalBootstrapPending === true,
|
|
61
|
+
lastDismiss: s?._lastOverlayDismiss || null,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
25
65
|
// Invariant: while a view is visible, blocked and not excluded, exactly one backstop is pending,
|
|
26
66
|
// armed with the current epoch tuple (a re-arm on a changed tuple replaces the timer; a fire on a
|
|
27
67
|
// stale tuple re-arms), so a blocked visible terminal can never be left without a rescue.
|
|
@@ -183,6 +223,7 @@ function _sweepVisibleSessionReadinessAndPaint(now) {
|
|
|
183
223
|
if (now - s._readinessCoverContentSince >= 1000) {
|
|
184
224
|
_reportReadinessViolationOnce(s, 'cover-over-content', s._readinessCoverContentSince, blockers, {
|
|
185
225
|
predicate: 'cover-over-content',
|
|
226
|
+
coverTruth: _coverTruthSnapshot(s),
|
|
186
227
|
});
|
|
187
228
|
}
|
|
188
229
|
} else {
|
|
@@ -46,7 +46,13 @@ function _terminalLocalFitProposal(s) {
|
|
|
46
46
|
return cols > 0 && rows > 0 ? { cols, rows } : null;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
// WP-1 (docs/codex-terminal-geometry-sticky-cols-2026-10-24.html): `opts.recordMeasurement: false`
|
|
50
|
+
// is a PRESENTATION-ONLY adoption -- no ledger write, no claim, no bare resize report. Its one
|
|
51
|
+
// caller is the queued claim-ACK rollback: the ledger is single-slot, so recording there replaced
|
|
52
|
+
// the queued claim's proof and its server replay was rejected `measurement-stale`. Every other
|
|
53
|
+
// caller omits `opts` and records exactly as before.
|
|
54
|
+
function _applyTerminalActivationGrid(s, grid, viewportIntent, opts = {}) {
|
|
55
|
+
const recordMeasurement = opts.recordMeasurement !== false;
|
|
50
56
|
const cols = Math.floor(Number(grid?.cols) || 0); const rows = Math.floor(Number(grid?.rows) || 0);
|
|
51
57
|
if (!s?.term || cols < 1 || rows < 1) return false;
|
|
52
58
|
if (s.term.cols === cols && s.term.rows === rows) {
|
|
@@ -55,7 +61,7 @@ function _applyTerminalActivationGrid(s, grid, viewportIntent) {
|
|
|
55
61
|
// is already at the PTY grid (seeded there, or a repeat apply) never reaches it, never
|
|
56
62
|
// gets a measurement ledger, and `_sendTerminalGeometryClaimV2` vetoes every claim on
|
|
57
63
|
// the missing ledger forever (wedge-two-viewer.spec.js test 2 -- zero claim rows for B).
|
|
58
|
-
if (!s._terminalMeasurementLedger && s._id
|
|
64
|
+
if (recordMeasurement && !s._terminalMeasurementLedger && s._id
|
|
59
65
|
&& typeof _recordTerminalFitMeasurement === 'function'
|
|
60
66
|
&& typeof window !== 'undefined' && window.TerminalGeometryClaim) {
|
|
61
67
|
_recordTerminalFitMeasurement(s, s._id, { cols, rows });
|
|
@@ -94,9 +100,9 @@ function _applyTerminalActivationGrid(s, grid, viewportIntent) {
|
|
|
94
100
|
const canRecordMeasurement = !!(s._id
|
|
95
101
|
&& typeof _recordTerminalFitMeasurement === 'function'
|
|
96
102
|
&& typeof window !== 'undefined' && window.TerminalGeometryClaim);
|
|
97
|
-
if (canRecordMeasurement) {
|
|
103
|
+
if (recordMeasurement && canRecordMeasurement) {
|
|
98
104
|
_recordTerminalFitMeasurement(s, s._id || '', { cols, rows });
|
|
99
|
-
} else if (typeof _sendTerminalResizeIfChanged === 'function') {
|
|
105
|
+
} else if (recordMeasurement && typeof _sendTerminalResizeIfChanged === 'function') {
|
|
100
106
|
_sendTerminalResizeIfChanged(s, s._id || '', 'activation-grid-apply');
|
|
101
107
|
}
|
|
102
108
|
}
|
|
@@ -139,6 +145,37 @@ function _undoRefusedTerminalGridAdoption(s, cols, rows) {
|
|
|
139
145
|
return true;
|
|
140
146
|
}
|
|
141
147
|
|
|
148
|
+
// WP-1 (docs/nightly-browser-tier-round2-2026-10-21.html §5 D-1, §9 G-1..G-3): the ONE
|
|
149
|
+
// all-or-nothing grid-adoption primitive. Every resize whose grid the client did NOT fit itself --
|
|
150
|
+
// the authoritative snapshot replay (index.html onSnapshot), the rows-only restore (runtime-19.js),
|
|
151
|
+
// the dims-reassert capitulation (runtime-16.js) -- goes through here, and each caller stops on a
|
|
152
|
+
// `false` (no replay of grid-relative bytes, no `_lastResizeSentCols/Rows` seed, no recorded fit).
|
|
153
|
+
// Applies, reads back the grid xterm actually holds, and on mismatch restores the prior grid
|
|
154
|
+
// through _undoRefusedTerminalGridAdoption. It never sends and never records a fit: reporting the
|
|
155
|
+
// held grid is the caller's job (D-2), which is why callers must not report the requested values.
|
|
156
|
+
function _adoptTerminalGrid(s, cols, rows, reason) {
|
|
157
|
+
if (!s || !s.term) return false;
|
|
158
|
+
const c = Math.floor(Number(cols) || 0);
|
|
159
|
+
const r = Math.floor(Number(rows) || 0);
|
|
160
|
+
if (c < 1 || r < 1) return false;
|
|
161
|
+
const priorCols = Number(s.term.cols || 0);
|
|
162
|
+
const priorRows = Number(s.term.rows || 0);
|
|
163
|
+
if (priorCols === c && priorRows === r) return true;
|
|
164
|
+
const wasSuppressed = !!s._suppressResize;
|
|
165
|
+
s._suppressResize = true;
|
|
166
|
+
try {
|
|
167
|
+
_runTerminalMutation(s, reason || 'terminal-grid-adopt', () => s.term.resize(c, r));
|
|
168
|
+
} catch (_) {
|
|
169
|
+
/* expected: a refused/throwing resize must not escape an adoption that only restores the
|
|
170
|
+
caller's prior grid below; the read-back decides, not the throw */
|
|
171
|
+
} finally {
|
|
172
|
+
s._suppressResize = wasSuppressed;
|
|
173
|
+
}
|
|
174
|
+
if (Number(s.term.cols) === c && Number(s.term.rows) === r) return true;
|
|
175
|
+
_undoRefusedTerminalGridAdoption(s, priorCols, priorRows);
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
|
|
142
179
|
// 2026-10-11 incident: every .term-container measured half of #terminal-area; this names the in-flow element that took the other half (flat keys survive lib/client-diag-handler.js sanitizer).
|
|
143
180
|
function _terminalAreaLayoutCensus(container) {
|
|
144
181
|
try {
|
|
@@ -1030,6 +1030,21 @@ function _terminalDraftUploadOwnership(id) {
|
|
|
1030
1030
|
return { lifetime, context };
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
|
+
// This adapter has no terminal-local captures; the lifetime owns its HTTP work and abort signal.
|
|
1034
|
+
async function _terminalDeleteServerDraft(id, attachment, options = {}, operation = {}) {
|
|
1035
|
+
const lifetime = _terminalRootDraftLifetime;
|
|
1036
|
+
const owned = operation.context ? null : _terminalDraftUploadOwnership(id);
|
|
1037
|
+
const context = operation.context || (owned && !owned.reason ? owned.context : null);
|
|
1038
|
+
if (!lifetime || !context || typeof lifetime.deleteServerDraft !== 'function') return false;
|
|
1039
|
+
const isCurrent = () => lifetime === _terminalRootDraftLifetime && context.id === id
|
|
1040
|
+
&& lifetime.current(context) && (typeof operation.isCurrent !== 'function' || operation.isCurrent() === true);
|
|
1041
|
+
if (!isCurrent()) return false;
|
|
1042
|
+
const retry = (url, request, retryOptions) => lifetime.fetchWithRetry(fetch, url, request, retryOptions);
|
|
1043
|
+
const accepted = await lifetime.deleteServerDraft({ id, attachment, options, context, isCurrent,
|
|
1044
|
+
token: String(state.token || ''), retry });
|
|
1045
|
+
return accepted === true && isCurrent();
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1033
1048
|
// §6.3.1 + review finding 4: the verified private continuity key is the ROOT SCOPE's own
|
|
1034
1049
|
// continuity hash for the live lease -- not a host+session string (which would let the same
|
|
1035
1050
|
// host/session under a different authenticated principal reactivate an old proof). Fail closed.
|
|
@@ -1127,6 +1142,23 @@ function _terminalFailAttachmentUpload(id, attachment, error) {
|
|
|
1127
1142
|
return true;
|
|
1128
1143
|
}
|
|
1129
1144
|
|
|
1145
|
+
// R-4: a verified upload whose server snapshot this tab refused must not hang on "Uploading". The
|
|
1146
|
+
// server already holds (and may deliver) the draft, so this is NOT retryable -- a re-upload would
|
|
1147
|
+
// paste the same image twice; a reload restores the true row from the list. Every silent caller of a
|
|
1148
|
+
// verified-adoption result reports here so a refused publication is visible with a reason.
|
|
1149
|
+
function _terminalRejectedUploadOutcome(id, attachment, outcome, deps) {
|
|
1150
|
+
const reason = String(outcome && outcome.reason || 'rejected');
|
|
1151
|
+
const failed = _terminalFailAttachmentUpload(id, attachment, {
|
|
1152
|
+
code: 'CTM_UPLOAD_PUBLICATION_REJECTED',
|
|
1153
|
+
message: 'Uploaded, but this tab could not confirm it (' + reason + '). Reload to see its real state.',
|
|
1154
|
+
retryable: false,
|
|
1155
|
+
});
|
|
1156
|
+
if (!failed) return false;
|
|
1157
|
+
deps.metric(id, 'upload_publication_rejected', { reason, attachmentOrdinal: attachment.ordinal });
|
|
1158
|
+
void deps.postDiagnostic(id, 'upload_publication_rejected', attachment, { reason });
|
|
1159
|
+
return true;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1130
1162
|
// Review finding 9 (§9 rows: index.html retry / edit conflict / submission resume, runtime-10.js
|
|
1131
1163
|
// freeze): the ONE server-derived-metadata entry for call sites that used to Object.assign() a
|
|
1132
1164
|
// response body straight onto a draft row. A payload carrying a lifecycle version is adopted
|
|
@@ -1181,7 +1213,10 @@ async function _terminalRetryAttachmentUploadOwned(id, attachment, deps) {
|
|
|
1181
1213
|
return false;
|
|
1182
1214
|
}
|
|
1183
1215
|
const outcome = _terminalFinishAttachmentUpload(id, attachment, uploaded); // WP-3 §6: adopt or legacy ready
|
|
1184
|
-
if (outcome.outcome === 'rejected')
|
|
1216
|
+
if (outcome.outcome === 'rejected') {
|
|
1217
|
+
_terminalRejectedUploadOutcome(id, attachment, outcome, { metric: deps.metric, postDiagnostic: deps.postDiagnostic });
|
|
1218
|
+
return false;
|
|
1219
|
+
}
|
|
1185
1220
|
// The server's 'create' op (inside _terminalUploadPastedImage) already nudged the
|
|
1186
1221
|
// reconciler for this newly-created draft row -- do not also race it here.
|
|
1187
1222
|
if (serverDeliveryOn) return true;
|
|
@@ -1281,7 +1316,22 @@ function onTerminalImageDraftState(msg) {
|
|
|
1281
1316
|
reservation = owned.lifetime.imageUploadReservation(owned.context, requestId);
|
|
1282
1317
|
if (reservation) attachment = reservation.attachment;
|
|
1283
1318
|
}
|
|
1284
|
-
if (!attachment)
|
|
1319
|
+
if (!attachment) {
|
|
1320
|
+
// B9: an upload this client never started -- the usual shape right after a reload, or in a
|
|
1321
|
+
// second tab on a session with a durable draft -- has no row yet even though the server may
|
|
1322
|
+
// already have published its terminal outcome: the restore LIST is what creates the row, and
|
|
1323
|
+
// it can still be in flight. Dropping the publication here left the restored chip frozen on
|
|
1324
|
+
// the list's older state (`delivery_pending` -> 'attaching') for the life of the page, while
|
|
1325
|
+
// the chip title already claimed "Attached ✓" from the local client hint. Retain it instead
|
|
1326
|
+
// (identity-fenced, newest-version-wins) and let the restore that creates the row adopt it.
|
|
1327
|
+
// The publication is only ever retained against a LIVE captured context: `owned.reason`
|
|
1328
|
+
// means there is no restore in flight for this session, and the list read that follows is
|
|
1329
|
+
// necessarily fresh.
|
|
1330
|
+
if (owned.context && !owned.reason && typeof owned.lifetime.retainUnmatchedPublication === 'function') {
|
|
1331
|
+
owned.lifetime.retainUnmatchedPublication(owned.context, msg, msg.hint);
|
|
1332
|
+
}
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1285
1335
|
|
|
1286
1336
|
const stateVersion = typeof Draft.stateVersionOf === 'function' ? Draft.stateVersionOf(msg.stateVersion) : null;
|
|
1287
1337
|
if (stateVersion === null) {
|
|
@@ -712,18 +712,18 @@ function _maybeReassertStateSyncDims(s, msg) {
|
|
|
712
712
|
});
|
|
713
713
|
if (bounded.action === 'capitulate') {
|
|
714
714
|
s._stateSyncDimsSkipStreak = 0;
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
715
|
+
// WP-1 (D-1, G-3): the losing viewer adopts the mirror grid through the shared all-or-nothing
|
|
716
|
+
// primitive -- the cols-pin chokepoint refuses a narrower mirror, so a bare resize would land
|
|
717
|
+
// a hybrid AND seed _lastResizeSentCols/Rows with a grid that was never sent. The frame gate
|
|
718
|
+
// still owns this mutation (withOwnedTerminalMutation); _adoptTerminalGrid reads the grid
|
|
719
|
+
// back, so a mutation the gate only QUEUED is not an adoption.
|
|
720
|
+
let adopted = false;
|
|
721
|
+
const gated = _runFrameGateMutation(
|
|
722
|
+
s,
|
|
723
|
+
'dims-reassert-capitulation',
|
|
724
|
+
() => { adopted = _adoptTerminalGrid(s, mCols, mRows, 'dims-reassert-capitulation') === true; },
|
|
725
|
+
);
|
|
726
|
+
const resizeSucceeded = gated === true && adopted;
|
|
727
727
|
if (resizeSucceeded) {
|
|
728
728
|
const cellHeight = Number(s.term?._core?._renderService?.dimensions?.css?.cell?.height) || 0;
|
|
729
729
|
const containerHeight = Number(s.container?.clientHeight) || 0;
|
|
@@ -151,6 +151,11 @@ function _normalizeTerminalColsToFitBaseline(s, id, proposal) {
|
|
|
151
151
|
// count (up OR down) so the rendered/serialized width stays consistent.
|
|
152
152
|
try {
|
|
153
153
|
_runTerminalMutation(s, 'fit-baseline-correction', () => s.term.resize(baseline.cols, s.term.rows));
|
|
154
|
+
// WP-1 (D-3, G-5): only claim a correction that actually happened. The cols-pin chokepoint
|
|
155
|
+
// can refuse this snap (a narrowing onto the remembered col count), and reporting
|
|
156
|
+
// "corrected" plus refreshing the baseline would then describe a grid this client never
|
|
157
|
+
// held -- the next fit would keep snapping toward it.
|
|
158
|
+
if (Number(s.term.cols) !== baseline.cols) return false;
|
|
154
159
|
baseline.width = width;
|
|
155
160
|
baseline.at = Date.now();
|
|
156
161
|
s._fitBaselineCorrectedAt = Date.now();
|
|
@@ -179,6 +184,15 @@ function _normalizeTerminalColsToFitBaseline(s, id, proposal) {
|
|
|
179
184
|
toCols: cols,
|
|
180
185
|
widthPx: Math.round(width),
|
|
181
186
|
reason: 'large-divergence',
|
|
187
|
+
// WP-2 (docs/codex-terminal-geometry-sticky-cols-2026-10-24.html §5): the fit width
|
|
188
|
+
// alone could not explain a "pane measured 721 px" incident -- the browser viewport width
|
|
189
|
+
// and whether split view was on are the layout facts that separate a real pane resize from
|
|
190
|
+
// a transient container reading. `window` is probed (not dereferenced bare) because this
|
|
191
|
+
// function is evaluated by several existing windowless harnesses
|
|
192
|
+
// (tests/terminal-fit-baseline-adopted-beacon.test.js, tests/terminal-grid-pane-fit.test.js);
|
|
193
|
+
// it is always defined in the page, and the guard only keeps the beacon from throwing there.
|
|
194
|
+
viewportWidthPx: Math.round(Number(typeof window === 'undefined' ? 0 : window.innerWidth) || 0),
|
|
195
|
+
split: !!state.splitRoot,
|
|
182
196
|
});
|
|
183
197
|
baseline.cols = cols;
|
|
184
198
|
baseline.width = width;
|
|
@@ -319,11 +319,15 @@ function _restoreSnapshotDataImpl(s, data, onDone, opts) {
|
|
|
319
319
|
&& rowsOnlyCols > 0
|
|
320
320
|
&& rowsOnlyCols === Math.floor(Number(s._snapshotRestoreGridCols) || 0)
|
|
321
321
|
&& opts.snapshotScrollbackFp === s._snapshotScrollbackFp;
|
|
322
|
-
|
|
322
|
+
// WP-1 (D-1, G-2): the rows-only fast path replays a grid-relative viewport slice, so it may
|
|
323
|
+
// only run on a grid this client actually adopted. A narrow refused at the cols-pin chokepoint
|
|
324
|
+
// lands as a hybrid (local cols, snapshot rows), and the slice would then be replayed onto a
|
|
325
|
+
// grid nobody holds -- skip the fast path and fall through to the full restore below.
|
|
326
|
+
const rowsOnlyAdopted = rowsOnlyEligible
|
|
327
|
+
? _adoptTerminalGrid(s, rowsOnlyCols, rowsOnlyRows, 'rows-only-restore-resize')
|
|
328
|
+
: false;
|
|
329
|
+
if (rowsOnlyEligible && rowsOnlyAdopted) {
|
|
323
330
|
try {
|
|
324
|
-
if (s.term.cols !== rowsOnlyCols || s.term.rows !== rowsOnlyRows) {
|
|
325
|
-
_runTerminalMutation(s, 'rows-only-restore-resize', () => s.term.resize(rowsOnlyCols, rowsOnlyRows));
|
|
326
|
-
}
|
|
327
331
|
// Slice raw data at the server-stamped boundary, then use the same transform chain as
|
|
328
332
|
// the full restore. The existing scrollback remains untouched.
|
|
329
333
|
const rowsOnlySource = restoreOpts.source || restoreOpts.kind || 'snapshot';
|