Commit Graph
2957 Commits
Author SHA1 Message Date
Tianyi Cui a6b8ce456a test(fs): compare Windows DACL access policy
ReplaceFileW preserves ACLs by merging security information, which may reserialize auto-inheritance state and duplicate equivalent ACEs. Compare the final ordered, de-duplicated ACE policy instead of requiring byte-identical self-relative descriptor buffers.

Update the host-independent binding assertion to expect the namespaced absolute paths that the Win32 boundary actually receives, and align the package and bilingual RFC contracts with the semantic DACL guarantee.
2026-07-19 13:25:15 +08:00
Tianyi Cui 0f8d0082e4 fix(tui): stabilize Windows terminal snapshots
Treat an absolute path.relative() result as a cross-volume path instead of incorrectly abbreviating it beneath the user's home directory.

Allow embeddings to project a logical footer cwd without changing the operational session cwd. The recorded-session harness now uses a POSIX-shaped display alias for both the footer and filesystem result paths, preserving the existing pre-normalization layout width on every host.

Keep runtime-provided labels behind terminal-control escaping, cover that boundary, and document the embedding contract.
2026-07-19 13:20:59 +08:00
Tianyi Cui bdba206640 Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 12:57:38 +08:00
Tianyi Cui 418b2b092b Merge pull request #363 from deepseek-harness/feat/tui-package
feat(ui): add dedicated TUI package
2026-07-19 12:54:20 +08:00
Tianyi Cui e9aac53fde test(acp-snapshot): cover pre-fallback Windows exit state
Model the requested signal setting a child termination marker before the launcher begins fallback handling. The regression proves close drains inherited stdio and propagates the original process error without sending a redundant SIGKILL.

This complements the post-check fallback-refusal race and restores the launcher's required 100% per-file statement and branch coverage.
2026-07-19 12:53:41 +08:00
Tianyi Cui c660048759 test(subagent): cover late forced-wait exit markers
Exercise both exitCode and signalCode arriving after the SIGTERM grace begins but before the bounded SIGKILL confirmation helper starts. This pins the fast path that avoids signaling an already-terminated child and restores the package's per-file 100% branch and statement coverage.

Keep the marker transition deterministic by withholding the synthetic exit event, matching the OS state race the defensive pre-check exists to absorb.
2026-07-19 12:52:42 +08:00
Tianyi Cui bf28e4ae1a Merge latest origin/master into feat/tui-package
Bring the TUI branch onto master after PR #378 landed so PR #363 is evaluated against the current type-equivalence documentation contract.

Resolve the bilingual development-record overlap by regenerating the English/Chinese consistency record from the merged documents. This preserves the branch's built-subprocess guidance alongside master's expanded JSDoc type-equivalence rules.
2026-07-19 12:47:05 +08:00
Tianyi Cui 6cc9c8e1fb Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 12:45:35 +08:00
Tianyi Cui 4bf2ef89c4 fix(jsonl): bind MoveFileExW with the Win32 BOOL ABI
Declare MoveFileExW's return value as Koffi int and model it as a numeric 32-bit Win32 BOOL. The previous Koffi bool declaration represented a one-byte C boolean and could read the native return register with the wrong ABI.

Test zero and nonzero results explicitly and assert the binding result type while preserving the existing write-through flags, error translation, and durable directory race behavior.
2026-07-19 12:44:47 +08:00
Tianyi Cui 3dc82b1e87 test(snapshot): refresh Windows workspace permission prose
Update the workspace-edit Windows sidecar to the current permission preset description emitted by the ACP session configuration. The shared golden already carried this contract; only the native-Windows transcript retained the superseded wording.

Leave the platform-specific backslash path rendering unchanged so the sidecar continues to pin the one intentional Windows transcript difference.
2026-07-19 12:43:58 +08:00
Tianyi Cui 0f4bc645da test(acp-snapshot): inherit descendant stdio portably
Pass the fake descendant the parent process's stdout and stderr stream handles instead of Unix-style numeric file descriptors. This lets Windows duplicate the live ACP and diagnostic pipes so launcher shutdown can prove that inherited handles, buffered frames, and stderr all drain after the parent exits.

Observe the pending update promise before initiating shutdown as well, preventing a missing late frame from becoming a transient unhandled rejection before the assertion reports the fixture failure.
2026-07-19 12:42:59 +08:00
Tianyi Cui f110c5e083 fix(acp-snapshot): accept Windows termination exit races
Treat a fallback kill refusal as successful termination when the child already carries an OS exit marker. Windows maps Node's supported signal names to forced termination, so the requested signal can end the process between the launcher error race and its fallback SIGKILL.

Drain inherited stdio, the ACP parser, and in-flight callbacks before propagating the original child error in either exit-race path. Preserve AggregateError reporting only for a refused fallback while the process is still live, and add a deterministic cross-platform regression for that ordering.
2026-07-19 12:41:46 +08:00
Tianyi Cui aa21c0b83f docs(tui): remove demo image assets
Remove the animated, dark, and light terminal captures and their bilingual RFC section. The implemented RFC retains the durable front-door decision and verification contract without carrying binary demo artifacts that need visual maintenance.

Tighten the package README ownership wording and refresh the bilingual consistency record so no repository link or prose claim refers to the removed files.
2026-07-19 12:41:38 +08:00
Tianyi Cui 2b673bd68d fix(fs): preserve Windows DACLs across atomic replacement
Copy an existing target's DACL onto the empty staging file before any content is written, then publish with ReplaceFileW so Windows replacement keeps the target security descriptor instead of inheriting the broader parent policy.

Keep new-file inheritance and POSIX mode behavior unchanged, retain the already-protected temp when a concurrently removed target requires rename fallback, and translate native errors into Node-style codes for the filesystem error boundary.

Add host-independent Win32 binding coverage, native Windows descriptor assertions, package documentation, and a bilingual implemented RFC that supersedes the earlier inheritance-only replacement claim.
2026-07-19 12:38:18 +08:00
Tianyi Cui 114ceee293 Merge pull request #378 from deepseek-harness/codex/type-equiv-jsdoc-docs
docs: include JSDoc in type-equiv blocks
2026-07-19 12:38:00 +08:00
Tianyi Cui 1bdee08c21 Merge branch 'master' into feat/tui-package 2026-07-19 12:31:53 +08:00
Tianyi Cui d6de23d674 Merge remote-tracking branch 'origin/master' into codex/type-equiv-jsdoc-docs 2026-07-19 12:25:54 +08:00
Tianyi Cui 5dcf6095cb docs: include JSDoc in type-equiv blocks 2026-07-19 12:25:40 +08:00
Tianyi Cui 46580e4083 test(subagent): pin POSIX disposal scenarios
Pass an explicit Linux platform to the two remaining SIGTERM-specific ladder tests instead of inheriting the host platform.

This keeps their synchronous-exit assertions focused on the POSIX middle and final rungs while the dedicated Windows case continues to verify the direct SIGKILL path.

Without the pin, native Windows coverage deterministically expected SIGTERM but observed the intended SIGKILL-only behavior.
2026-07-19 12:20:11 +08:00
Tianyi Cui 4625195968 fix(subagent): bound forced child termination
Observe signal errors and bound the final forced-exit edge with disposeGraceMs so a refused or ineffective SIGKILL cannot leave disposal pending forever.

Apply the confirmation bound on POSIX and Windows, remove listeners and timers on every outcome, and update the ACP consumer contract plus the generated config catalog.

Cover emitted signal errors, synchronous kill exceptions, refused termination, and accepted termination that never reports exit.
2026-07-19 12:19:33 +08:00
Tianyi Cui 7bf0250604 Merge pull request #377 from deepseek-harness/codex/retire-subagent-mock
refactor(subagent): retire the standalone mock package
2026-07-19 12:18:38 +08:00
Tianyi Cui 1b496854c2 Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 12:14:10 +08:00
Tianyi Cui 14542b2503 Merge latest origin/master into feat/tui-package
Bring in the one-session surface manager landed through #376 after master advanced beyond the prior merge base.

Resolve the generated event-matrix overlap by regenerating from the merged TypeScript tree, preserving master's updated session declaration locations together with the TUI listener edges. Regenerate and verify the RFC index so both lifecycle updates remain represented.
2026-07-19 12:14:07 +08:00
Tianyi Cui 0488ec3d3d Merge remote-tracking branch 'origin/master' into codex/retire-subagent-mock
# Conflicts:
#	docs/rfc/INDEX.md
2026-07-19 12:13:13 +08:00
Tianyi Cui dde62f454e Merge pull request #376 from deepseek-harness/codex/one-session-surface-manager
refactor(session): use one surface manager per session
2026-07-19 12:09:42 +08:00
Tianyi Cui 548bbe7ae8 docs(tui): record dedicated terminal front-door decision
Record the July 17 package split as an implemented bilingual feature RFC. The decision explains why TUI and stdio have separate terminal contracts, why concrete front-door selection belongs to composition, and how the TUI preserves existing session, tool-presentation, and lifecycle ownership.

Link the deterministic dark, light, and animated demos from the RFC so the assets have an in-repository owner. Cross-link the feature and testing decisions from the package README, then regenerate the RFC index and bilingual consistency record.
2026-07-19 12:05:59 +08:00
Tianyi Cui 4dda5b953b refactor(subagent): retire standalone mock package 2026-07-19 11:54:37 +08:00
Tianyi Cui 0290a3e1c0 Merge latest origin/master into feat/tui-package
Master advanced with PR #375's documentation-only simplification RFCs while the TUI merge was validating. Incorporate that exact head as a merge commit so PR #363 retains current-base ancestry without rewriting its reviewed history; no TUI behavior or generated terminal artifact changes are involved.
2026-07-19 11:41:55 +08:00
Tianyi Cui 39c1c3df4f Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719
# Conflicts:
#	packages/support/acp-snapshot/README.md
#	packages/support/acp-snapshot/src/harness.ts
#	packages/support/acp-snapshot/src/suite.ts
#	packages/support/acp-snapshot/tests/harness.spec.ts
#	packages/support/acp-snapshot/tests/suite.spec.ts
2026-07-19 11:41:10 +08:00
Tianyi Cui c06e6bea0b Merge origin/master into feat/tui-package
Master unifies every live agent with its exact SessionId and moves declarative startup failures to agent-loop/config-start-failed. Keeping the branch’s AgentId label binding would let the TUI target the wrong lifecycle after reload and would miss asynchronous resume failures.

Resolve that contract migration by giving the selected terminal front door the same generated or resumed SessionId as agent-core, mounting the front door first, and entering fullscreen only after the matching root appears. Refresh the source-derived catalogs and keyless terminal goldens so Code Mode, workflow, Cordis-tool, and transient UI scenarios all exercise the merged identity model.
2026-07-19 11:37:14 +08:00
Tianyi Cui 765dfb2174 refactor(session): use one surface manager 2026-07-19 11:36:07 +08:00
Tianyi Cui 383a305bd4 Merge pull request #375 from deepseek-harness/codex/simplification-rfc-followups
docs: propose follow-up simplification RFCs
2026-07-19 11:22:22 +08:00
Tianyi Cui bca7401513 docs: retain rejected compaction RFC 2026-07-19 11:12:26 +08:00
Tianyi Cui 8941600273 docs: expand simplification RFC implementation plans 2026-07-19 10:59:23 +08:00
Tianyi Cui 76db4efe49 Merge remote-tracking branch 'origin/master' into codex/simplification-rfc-followups 2026-07-19 10:53:23 +08:00
Tianyi Cui 9c6eb2b6b2 Merge pull request #301 from deepseek-harness/codex/simp-name-front-door-defaults
refactor: name front-door defaults
2026-07-19 10:51:54 +08:00
Tianyi Cui e8ea0c3b7e test(tui): make cwd coverage location-independent
formatCwd has distinct branches for the home directory itself, a descendant of home, an unset cwd, and a path outside home. The descendant branch was exercised only indirectly because the test harness defaulted to process.cwd(), so the per-file coverage gate changed with the checkout location and failed in detached worktrees under /private/tmp even though every behavior assertion passed.

Derive the home-root case from homedir() and add an explicit synthetic child with platform-aware path joins. Keep the unset and outside-home cases unchanged. The suite now drives every formatting branch regardless of where the repository is checked out, and the expected child form follows the host path separator on macOS, Linux, and Windows.
2026-07-19 10:51:20 +08:00
Tianyi Cui b5e8e4e9c1 fix(tui): neutralize terminal controls at display boundary
Model responses, replayed session data, tool presenter output, question metadata, configuration, and diagnostics all cross into ANSI-aware pi-tui renderers. Passing their C0 or C1 controls through unchanged lets an otherwise ordinary transcript emit OSC, CSI, cursor, or title operations in the user terminal.

Introduce one displayText boundary that preserves line-feed layout but renders every other C0/C1 control as visible \\xNN text before application styling is applied. Route transcript blocks, streaming output, tool cards, diffs, plans, dialogs, headers, cwd/title data, notices, errors, and pre-mount startup failures through that boundary while leaving pi-tui and the theme responsible for legitimate terminal control sequences.

Pin the contract at three levels: a settled headless-terminal golden spans the main untrusted display sources, unit coverage checks the pre-fullscreen failure path, and the real Loader/PTY conversation streams hostile OSC, cursor, and C1 probes and proves only their inert textual forms reach the terminal stream.
2026-07-19 10:50:19 +08:00
Tianyi Cui 0c911172e9 docs: drop rejected compaction RFC 2026-07-19 10:45:04 +08:00
Tianyi Cui 706dbe5a11 Merge remote-tracking branch 'origin/codex/simp-name-front-door-defaults' into codex/simplification-rfc-followups 2026-07-19 10:43:34 +08:00
Tianyi Cui 202da55bf2 Merge remote-tracking branch 'origin/master' into codex/simp-name-front-door-defaults 2026-07-19 10:41:41 +08:00
Tianyi Cui 7720ab27a7 Merge pull request #288 from deepseek-harness/codex/simp-hide-subagent-internals
refactor: hide subagent implementation helpers
2026-07-19 10:41:07 +08:00
Tianyi Cui 29f7668e18 Merge remote-tracking branch 'origin/master' into codex/simp-hide-subagent-internals 2026-07-19 10:36:48 +08:00
Tianyi Cui 2a0a82580c Merge pull request #287 from deepseek-harness/codex/simp-hide-concrete-agent-loop
refactor: hide the concrete agent loop
2026-07-19 10:36:23 +08:00
Tianyi Cui 6c5b276b95 Merge remote-tracking branch 'origin/master' into codex/simp-hide-concrete-agent-loop 2026-07-19 10:30:49 +08:00
Tianyi Cui 826da2d0aa Merge pull request #286 from deepseek-harness/codex/simp-ui-identity-residue
refactor: simplify UI identity routing with explicit subagent provenance
2026-07-19 10:29:35 +08:00
Tianyi Cui 4851d95704 docs: propose follow-up simplification RFCs 2026-07-19 03:49:18 +08:00
Tianyi Cui 83d041568d Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-19 03:18:04 +08:00
Tianyi Cui 8afe11e1ff Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-19 03:18:04 +08:00
Tianyi Cui c306f4e25d Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-19 03:18:04 +08:00