@herbertgao/pi-extensions 2026.9.20 → 2026.10.0
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 +13 -8
- package/THIRD_PARTY_NOTICES.md +29 -3
- package/node_modules/@herbertgao/pi-bark/README.md +39 -3
- package/node_modules/@herbertgao/pi-bark/package.json +1 -1
- package/node_modules/@herbertgao/pi-bark/src/index.ts +275 -15
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +50 -50
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +7 -7
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +25 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +24 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +7 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/footer.ts +47 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/mcp-chip.ts +136 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +56 -11
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +36 -4
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +11 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +303 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-header.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-highlight.ts +36 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-presentation.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-write-render.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/index.ts +88 -34
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/line-width-safety.ts +6 -5
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/write-execution.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/grouping.ts +31 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/message-display.ts +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +3 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/result.ts +173 -36
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/ansi-text.ts +1 -0
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +6 -4
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/package.json +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/mention-clone.ts +3 -2
- package/node_modules/@herbertgao/sol-pi/CONTRIBUTING.md +22 -0
- package/node_modules/@herbertgao/sol-pi/README.md +36 -17
- package/node_modules/@herbertgao/sol-pi/THIRD_PARTY_NOTICES.md +10 -6
- package/node_modules/@herbertgao/sol-pi/agents-install.md +15 -12
- package/node_modules/@herbertgao/sol-pi/docs/compatibility.md +24 -8
- package/node_modules/@herbertgao/sol-pi/docs/configuration.md +2 -2
- package/node_modules/@herbertgao/sol-pi/docs/star-history.md +18 -0
- package/node_modules/@herbertgao/sol-pi/package.json +4 -2
- package/node_modules/@herbertgao/sol-pi/scripts/check-sol-pi-config.mjs +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/config.ts +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/file-queue.ts +23 -4
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/index.ts +32 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/action-fusion/then-run.ts +3 -2
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/observation-pack/observation.ts +1 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/economics.ts +27 -7
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +137 -41
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/index.ts +1 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/plan.ts +2 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/projection.ts +58 -0
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/state.ts +28 -6
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/tools.ts +2 -1
- package/node_modules/@herbertgao/sol-pi/src/sol-pi/runtime-paths.ts +15 -2
- package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +2 -2
- package/node_modules/@pi-plugins/fast-mode/README.md +7 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +7 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +5 -5
- package/node_modules/pi-antigravity/README.md +3 -0
- package/node_modules/pi-antigravity/package.json +8 -8
- package/node_modules/pi-antigravity/src/auth/oauth.ts +6 -3
- package/node_modules/pi-antigravity/src/index.ts +114 -110
- package/node_modules/pi-antigravity/src/stream/stream.ts +1 -1
- package/node_modules/pi-antigravity/src/utils/util.ts +18 -1
- package/node_modules/pi-multi-account/CHANGELOG.md +20 -0
- package/node_modules/pi-multi-account/README.md +46 -8
- package/node_modules/pi-multi-account/config-file-transaction.ts +42 -0
- package/node_modules/pi-multi-account/index.ts +255 -269
- package/node_modules/pi-multi-account/model-pins.ts +36 -0
- package/node_modules/pi-multi-account/package.json +9 -7
- package/node_modules/pi-multi-account/slot-proxy-auth.ts +12 -2
- package/node_modules/pi-multi-account/slot-proxy.ts +27 -5
- package/node_modules/pi-web-access/CHANGELOG.md +17 -0
- package/node_modules/pi-web-access/README.md +6 -3
- package/node_modules/pi-web-access/brave-rate-limit.ts +170 -0
- package/node_modules/pi-web-access/brave.ts +28 -11
- package/node_modules/pi-web-access/dist/index.js +202 -33
- package/node_modules/pi-web-access/gemini-search.ts +2 -5
- package/node_modules/pi-web-access/index.ts +13 -7
- package/node_modules/pi-web-access/openai-search.ts +24 -10
- package/node_modules/pi-web-access/package.json +1 -1
- package/node_modules/pi-web-access/summary-review.ts +8 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/README.md +16 -12
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/adapter.d.ts +0 -5
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/adapter.js +2 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/reader.d.ts +3 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/reader.js +27 -15
- package/node_modules/{@herbertgao/resume-from/dist/adapters/pi → resume-from/dist/adapters/claude-code}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/writer.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/writer.js +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/contract.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/index.js +1 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/read.d.ts +16 -0
- package/node_modules/resume-from/dist/adapters/codex/read.js +723 -0
- package/node_modules/{@herbertgao/resume-from/dist/adapters/claude-code → resume-from/dist/adapters/codex}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/rollout.d.ts +44 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/rollout.js +88 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/write.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/write.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/contract.d.ts +5 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/adapter.js +10 -6
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from/dist/adapters/codex → resume-from/dist/adapters/pi}/redaction.js +16 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/serialize.d.ts +2 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/serialize.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/render.d.ts +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/render.js +4 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/runner.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/contract.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/command.js +31 -8
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/wiring.d.ts +1 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/wiring.js +1 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/confirmation.d.ts +4 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/confirmation.js +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/contract.d.ts +8 -6
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/contract.d.ts +10 -5
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/finder.d.ts +2 -1
- package/node_modules/resume-from/dist/import/discovery/finder.js +269 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/contract.d.ts +3 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/lander.js +3 -3
- package/node_modules/resume-from/dist/import/pipeline.d.ts +28 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/pipeline.js +31 -11
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/builder.d.ts +2 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/builder.js +9 -5
- package/node_modules/resume-from/dist/import/preview/warnings.d.ts +14 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/warnings.js +26 -20
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/wiring.js +12 -2
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/contract.d.ts +9 -3
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/git.d.ts +4 -4
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/git.js +7 -4
- package/node_modules/resume-from/dist/platform/repo/reader.d.ts +3 -0
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/reader.js +60 -20
- package/node_modules/{@herbertgao/resume-from → resume-from}/dist/session/contract.d.ts +8 -1
- package/node_modules/{@herbertgao/resume-from → resume-from}/package.json +19 -32
- package/node_modules/{@herbertgao/resume-from → resume-from}/shims/pi/extensions/resume-from.js +2 -2
- package/package.json +17 -17
- package/node_modules/@herbertgao/resume-from/dist/adapters/codex/read.js +0 -270
- package/node_modules/@herbertgao/resume-from/dist/import/discovery/finder.js +0 -129
- package/node_modules/@herbertgao/resume-from/dist/import/pipeline.d.ts +0 -17
- package/node_modules/@herbertgao/resume-from/dist/import/preview/warnings.d.ts +0 -11
- package/node_modules/@herbertgao/resume-from/dist/platform/repo/reader.d.ts +0 -8
- /package/node_modules/{@herbertgao/resume-from → resume-from}/LICENSE +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/readback.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/readback.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/validation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/validation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/adapter.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/format.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/format.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/parse.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/parse.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/redaction.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/validate.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/validate.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/bin.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/bin.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/agents.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/agents.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/args.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/args.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/presentation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/presentation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/runner.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/entry.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/entry.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/command.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/presentation.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/presentation.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/ui.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/ui.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/profile.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/profile.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/registry.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/registry.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/ordering.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/ordering.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/handover.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/handover.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/lander.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/marker.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/landing/marker.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/format.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/format.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/preview/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/rules.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/transfer/rules.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/wiring.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/defaults.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/defaults.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/errors.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/errors.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/loader.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/loader.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/paths.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/paths.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/validate.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/config/validate.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/repo/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/file-committer.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/file-committer.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/store/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/contract.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/contract.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/estimator.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/estimator.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/index.d.ts +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/platform/tokens/index.js +0 -0
- /package/node_modules/{@herbertgao/resume-from → resume-from}/dist/session/contract.js +0 -0
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The source role: a Codex home becomes a list of sessions, and one session becomes the
|
|
3
|
-
* canonical vocabulary. Every result body is dropped (FR-24) and every reasoning trace is
|
|
4
|
-
* ignored (FR-28, C-4).
|
|
5
|
-
*/
|
|
6
|
-
import { readFile } from "node:fs/promises";
|
|
7
|
-
import { isAbsolute } from "node:path";
|
|
8
|
-
import { redactSensitiveArgumentsText, redactSensitiveText } from "./redaction.js";
|
|
9
|
-
import { CODEX_ENTRY_COMPACTED, CODEX_ENTRY_EVENT_MSG, CODEX_ENTRY_RESPONSE_ITEM, CODEX_EVENT_AGENT_MESSAGE, CODEX_EVENT_USER_MESSAGE, CODEX_ITEM_CUSTOM_TOOL_CALL, CODEX_ITEM_CUSTOM_TOOL_CALL_OUTPUT, CODEX_ITEM_FUNCTION_CALL, CODEX_ITEM_FUNCTION_CALL_OUTPUT, isNotFoundError, KNOWN_ENTRY_TYPES, listRolloutFiles, parseRolloutText, payloadType, readSessionMeta, sessionsRoot, toIsoUtc, } from "./rollout.js";
|
|
10
|
-
const TITLE_LIMIT = 80;
|
|
11
|
-
const ARGUMENTS_PREVIEW_LIMIT = 60;
|
|
12
|
-
/** Tools whose name alone settles the question (FR-26). Everything else stays "unknown". */
|
|
13
|
-
const READ_ONLY_TOOLS = new Set([
|
|
14
|
-
"read_file",
|
|
15
|
-
"read",
|
|
16
|
-
"view_image",
|
|
17
|
-
"list_dir",
|
|
18
|
-
"grep",
|
|
19
|
-
"find",
|
|
20
|
-
"web_search",
|
|
21
|
-
]);
|
|
22
|
-
const MUTATING_TOOLS = new Set([
|
|
23
|
-
"apply_patch",
|
|
24
|
-
"write_file",
|
|
25
|
-
"edit_file",
|
|
26
|
-
"create_file",
|
|
27
|
-
"delete_file",
|
|
28
|
-
]);
|
|
29
|
-
export class CodexRolloutUnreadableError extends Error {
|
|
30
|
-
constructor(filePath) {
|
|
31
|
-
super(`Codex thread is unreadable: ${filePath} was cut mid-entry`);
|
|
32
|
-
this.name = "CodexRolloutUnreadableError";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/** Lenient: a file cut mid-entry still yields whatever parsed, with `truncated` set. */
|
|
36
|
-
export async function scanRollout(filePath) {
|
|
37
|
-
// Whole-file read: listing a home reads every rollout, and C-5 measured those files
|
|
38
|
-
// in megabytes. Ceiling accepted because title and turn count both need the whole file;
|
|
39
|
-
// revisit if a home with thousands of threads makes the listing feel slow.
|
|
40
|
-
const text = await readFile(filePath, "utf8");
|
|
41
|
-
const { entries, truncated } = parseRolloutText(text);
|
|
42
|
-
let meta = null;
|
|
43
|
-
for (const entry of entries) {
|
|
44
|
-
meta = readSessionMeta(entry);
|
|
45
|
-
if (meta !== null)
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
const { turns, skippedEntries, changedPaths } = toCanonicalTurns(entries);
|
|
49
|
-
const firstUserTurn = turns.find((turn) => turn.role === "user" && turn.kind === "message");
|
|
50
|
-
const lastStamp = [...entries].reverse().find((entry) => toIsoUtc(entry.timestamp) !== null);
|
|
51
|
-
return {
|
|
52
|
-
filePath,
|
|
53
|
-
meta,
|
|
54
|
-
turns,
|
|
55
|
-
skippedEntries,
|
|
56
|
-
startedAt: toIsoUtc(meta?.timestamp ?? entries[0]?.timestamp ?? null),
|
|
57
|
-
updatedAt: toIsoUtc(lastStamp?.timestamp ?? meta?.timestamp ?? null),
|
|
58
|
-
title: titleOf(firstUserTurn?.text ?? ""),
|
|
59
|
-
changedPaths,
|
|
60
|
-
truncated,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/** Strict: FR-51's "unreadable" answer. */
|
|
64
|
-
export async function readRollout(filePath) {
|
|
65
|
-
const rollout = await scanRollout(filePath);
|
|
66
|
-
if (rollout.truncated)
|
|
67
|
-
throw new CodexRolloutUnreadableError(filePath);
|
|
68
|
-
return rollout;
|
|
69
|
-
}
|
|
70
|
-
export async function listCodexSessions(home) {
|
|
71
|
-
const descriptors = [];
|
|
72
|
-
for (const filePath of await listRolloutFiles(sessionsRoot(home))) {
|
|
73
|
-
let rollout;
|
|
74
|
-
try {
|
|
75
|
-
rollout = await scanRollout(filePath);
|
|
76
|
-
}
|
|
77
|
-
catch (error) {
|
|
78
|
-
if (isNotFoundError(error))
|
|
79
|
-
continue; // A rollout may disappear during a concurrent cleanup.
|
|
80
|
-
throw error;
|
|
81
|
-
}
|
|
82
|
-
if (rollout.meta === null)
|
|
83
|
-
continue;
|
|
84
|
-
descriptors.push({
|
|
85
|
-
ref: { agent: "codex", home, id: rollout.meta.id },
|
|
86
|
-
title: rollout.title,
|
|
87
|
-
startedAt: rollout.startedAt ?? "",
|
|
88
|
-
updatedAt: rollout.updatedAt ?? rollout.startedAt ?? "",
|
|
89
|
-
turnCount: rollout.turns.length,
|
|
90
|
-
repoPath: rollout.meta.cwd !== null && isAbsolute(rollout.meta.cwd) ? rollout.meta.cwd : null,
|
|
91
|
-
filePath,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
descriptors.sort((left, right) => right.updatedAt.localeCompare(left.updatedAt));
|
|
95
|
-
return descriptors;
|
|
96
|
-
}
|
|
97
|
-
export async function loadCodexSession(descriptor) {
|
|
98
|
-
const rollout = await readRollout(descriptor.filePath);
|
|
99
|
-
return {
|
|
100
|
-
provenance: {
|
|
101
|
-
ref: descriptor.ref,
|
|
102
|
-
title: descriptor.title,
|
|
103
|
-
startedAt: descriptor.startedAt,
|
|
104
|
-
updatedAt: descriptor.updatedAt,
|
|
105
|
-
repo: {
|
|
106
|
-
commit: rollout.meta?.commit ?? null,
|
|
107
|
-
branch: rollout.meta?.branch ?? null,
|
|
108
|
-
changedPaths: rollout.changedPaths,
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
turns: rollout.turns,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
function titleOf(text) {
|
|
115
|
-
const line = text
|
|
116
|
-
.split("\n")
|
|
117
|
-
.find((candidate) => candidate.trim() !== "")
|
|
118
|
-
?.trim() ?? "";
|
|
119
|
-
return line.length > TITLE_LIMIT ? `${line.slice(0, TITLE_LIMIT - 1)}…` : line;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Messages come from `event_msg` and tool calls from `response_item`: the same text appears in
|
|
123
|
-
* both shapes, and taking each from one place is what keeps every turn out of the session twice.
|
|
124
|
-
* Reasoning, in either shape, produces nothing at all (C-4, FR-28, NG-8).
|
|
125
|
-
*/
|
|
126
|
-
function toCanonicalTurns(entries) {
|
|
127
|
-
const outputs = new Map();
|
|
128
|
-
for (const entry of entries) {
|
|
129
|
-
if (entry.type !== CODEX_ENTRY_RESPONSE_ITEM)
|
|
130
|
-
continue;
|
|
131
|
-
const type = payloadType(entry);
|
|
132
|
-
if (type !== CODEX_ITEM_FUNCTION_CALL_OUTPUT && type !== CODEX_ITEM_CUSTOM_TOOL_CALL_OUTPUT)
|
|
133
|
-
continue;
|
|
134
|
-
const callId = entry.payload.call_id;
|
|
135
|
-
if (typeof callId !== "string")
|
|
136
|
-
continue;
|
|
137
|
-
outputs.set(callId, outputTextOf(entry.payload.output));
|
|
138
|
-
}
|
|
139
|
-
const turns = [];
|
|
140
|
-
const changed = new Set();
|
|
141
|
-
let skippedEntries = 0;
|
|
142
|
-
for (const entry of entries) {
|
|
143
|
-
if (!KNOWN_ENTRY_TYPES.has(entry.type)) {
|
|
144
|
-
skippedEntries += 1;
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
const type = payloadType(entry);
|
|
148
|
-
if (entry.type === CODEX_ENTRY_COMPACTED) {
|
|
149
|
-
const message = entry.payload.message;
|
|
150
|
-
if (typeof message !== "string" || message.trim() === "")
|
|
151
|
-
continue;
|
|
152
|
-
turns.push({
|
|
153
|
-
index: turns.length,
|
|
154
|
-
role: "agent",
|
|
155
|
-
kind: "summary",
|
|
156
|
-
// FR-28, security: credentials in message text must not cross to a different vendor.
|
|
157
|
-
text: redactSensitiveText(message),
|
|
158
|
-
toolCall: null,
|
|
159
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
160
|
-
});
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
if (entry.type === CODEX_ENTRY_EVENT_MSG) {
|
|
164
|
-
if (type !== CODEX_EVENT_USER_MESSAGE && type !== CODEX_EVENT_AGENT_MESSAGE)
|
|
165
|
-
continue;
|
|
166
|
-
const message = entry.payload.message;
|
|
167
|
-
if (typeof message !== "string" || message.trim() === "")
|
|
168
|
-
continue;
|
|
169
|
-
turns.push({
|
|
170
|
-
index: turns.length,
|
|
171
|
-
role: type === CODEX_EVENT_USER_MESSAGE ? "user" : "agent",
|
|
172
|
-
kind: "message",
|
|
173
|
-
// FR-28, security: credentials in message text must not cross to a different vendor.
|
|
174
|
-
text: redactSensitiveText(message),
|
|
175
|
-
toolCall: null,
|
|
176
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
177
|
-
});
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
if (entry.type !== CODEX_ENTRY_RESPONSE_ITEM)
|
|
181
|
-
continue;
|
|
182
|
-
if (type !== CODEX_ITEM_FUNCTION_CALL && type !== CODEX_ITEM_CUSTOM_TOOL_CALL)
|
|
183
|
-
continue;
|
|
184
|
-
const toolName = typeof entry.payload.name === "string" ? entry.payload.name : "";
|
|
185
|
-
if (toolName === "")
|
|
186
|
-
continue;
|
|
187
|
-
const rawArguments = type === CODEX_ITEM_FUNCTION_CALL ? entry.payload.arguments : entry.payload.input;
|
|
188
|
-
const argumentsText = typeof rawArguments === "string" ? rawArguments : "";
|
|
189
|
-
const callId = entry.payload.call_id;
|
|
190
|
-
// FR-54: use has() not get() — outputs.get() can return "" for an empty result.
|
|
191
|
-
const resultRecorded = typeof callId === "string" && outputs.has(callId);
|
|
192
|
-
const output = typeof callId === "string" ? (outputs.get(callId) ?? null) : null;
|
|
193
|
-
const toolCall = toolCallRecord(toolName, argumentsText, output, resultRecorded);
|
|
194
|
-
if (toolCall.effect === "mutating")
|
|
195
|
-
for (const path of pathsOf(argumentsText))
|
|
196
|
-
changed.add(path);
|
|
197
|
-
turns.push({
|
|
198
|
-
index: turns.length,
|
|
199
|
-
role: "agent",
|
|
200
|
-
kind: "tool-call",
|
|
201
|
-
text: "",
|
|
202
|
-
toolCall,
|
|
203
|
-
timestamp: toIsoUtc(entry.timestamp),
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
return { turns, skippedEntries, changedPaths: [...changed] };
|
|
207
|
-
}
|
|
208
|
-
/** Only the shape of the output is measured. Not one fragment of it is carried (FR-24, FR-25). */
|
|
209
|
-
function toolCallRecord(toolName, argumentsText, output, resultRecorded) {
|
|
210
|
-
const safeArguments = redactSensitiveArgumentsText(argumentsText);
|
|
211
|
-
const head = `${toolName}(${singleLine(safeArguments, ARGUMENTS_PREVIEW_LIMIT)})`;
|
|
212
|
-
const outcomeLine = output === null
|
|
213
|
-
? `${head} → no output recorded`
|
|
214
|
-
: `${head} → ${output.split("\n").length} lines, body dropped`;
|
|
215
|
-
return {
|
|
216
|
-
toolName,
|
|
217
|
-
argumentsText: safeArguments,
|
|
218
|
-
outcomeLine: redactSensitiveText(outcomeLine),
|
|
219
|
-
effect: effectOf(toolName),
|
|
220
|
-
bodyDropped: output !== null,
|
|
221
|
-
// FR-54: false when no *_call_output entry existed for this call_id (broken tail signal).
|
|
222
|
-
resultRecorded,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
function effectOf(toolName) {
|
|
226
|
-
if (MUTATING_TOOLS.has(toolName))
|
|
227
|
-
return "mutating";
|
|
228
|
-
if (READ_ONLY_TOOLS.has(toolName))
|
|
229
|
-
return "read-only";
|
|
230
|
-
return "unknown";
|
|
231
|
-
}
|
|
232
|
-
function outputTextOf(output) {
|
|
233
|
-
if (typeof output === "string")
|
|
234
|
-
return output;
|
|
235
|
-
if (Array.isArray(output)) {
|
|
236
|
-
return output
|
|
237
|
-
.map((part) => typeof part === "object" && part !== null
|
|
238
|
-
? String(part.text ?? "")
|
|
239
|
-
: "")
|
|
240
|
-
.join("\n");
|
|
241
|
-
}
|
|
242
|
-
return output === undefined || output === null ? "" : JSON.stringify(output);
|
|
243
|
-
}
|
|
244
|
-
function singleLine(text, limit) {
|
|
245
|
-
const flat = text.replaceAll(/\s+/g, " ").trim();
|
|
246
|
-
return flat.length > limit ? `${flat.slice(0, limit - 1)}…` : flat;
|
|
247
|
-
}
|
|
248
|
-
/** Files a mutating call touched, for RepoSnapshot.changedPaths (FR-36). */
|
|
249
|
-
function pathsOf(argumentsText) {
|
|
250
|
-
let text = argumentsText;
|
|
251
|
-
const direct = [];
|
|
252
|
-
try {
|
|
253
|
-
const parsed = JSON.parse(argumentsText);
|
|
254
|
-
if (typeof parsed === "object" && parsed !== null) {
|
|
255
|
-
const record = parsed;
|
|
256
|
-
const strings = Object.values(record).filter((value) => typeof value === "string");
|
|
257
|
-
text = strings.join("\n");
|
|
258
|
-
for (const key of ["path", "file_path", "filename"]) {
|
|
259
|
-
const value = record[key];
|
|
260
|
-
if (typeof value === "string" && value !== "")
|
|
261
|
-
direct.push(value);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
catch {
|
|
266
|
-
// Arguments that are not JSON are searched as they were recorded.
|
|
267
|
-
}
|
|
268
|
-
const patched = [...text.matchAll(/\*\*\* (?:Add|Update|Delete) File: (.+)/g)].map((match) => (match[1] ?? "").trim());
|
|
269
|
-
return [...direct, ...patched].filter((path) => path !== "");
|
|
270
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// The source side of the tool: find the sessions of this repository, order them, resolve the
|
|
2
|
-
// user's choice, and load it. It never writes and never calls a model (NG-1, AC-4, FR-8).
|
|
3
|
-
import { SessionSelectionError } from "./errors.js";
|
|
4
|
-
import { buildSearchList, canonicalPath, isDirectory, } from "./homes.js";
|
|
5
|
-
import { compareDescriptors } from "./ordering.js";
|
|
6
|
-
const NEXT_STEP = "Run the list again to see the sessions available in this repository.";
|
|
7
|
-
function reasonLine(reason) {
|
|
8
|
-
const text = reason instanceof Error ? reason.message : String(reason);
|
|
9
|
-
return text.split("\n")[0] ?? "unknown error";
|
|
10
|
-
}
|
|
11
|
-
export function createSessionFinder(deps) {
|
|
12
|
-
async function collect(target, repoRoot) {
|
|
13
|
-
// A home the user named must never fail silently: adapters swallow a missing
|
|
14
|
-
// directory (an absent default home is normal), but a typo'd --home is not (FR-2).
|
|
15
|
-
if (target.named === true && !(await isDirectory(target.home))) {
|
|
16
|
-
return {
|
|
17
|
-
rows: [],
|
|
18
|
-
failures: [
|
|
19
|
-
{
|
|
20
|
-
home: target.home,
|
|
21
|
-
agent: target.agent,
|
|
22
|
-
message: "home not searched: no such directory",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
let found;
|
|
28
|
-
try {
|
|
29
|
-
found = await target.adapter.listSessions(target.home);
|
|
30
|
-
}
|
|
31
|
-
catch (reason) {
|
|
32
|
-
// One bad home never empties the listing.
|
|
33
|
-
return {
|
|
34
|
-
rows: [],
|
|
35
|
-
failures: [
|
|
36
|
-
{
|
|
37
|
-
home: target.home,
|
|
38
|
-
agent: target.agent,
|
|
39
|
-
message: `home not searched: ${reasonLine(reason)}`,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const rows = [];
|
|
45
|
-
const failures = [];
|
|
46
|
-
for (const descriptor of found) {
|
|
47
|
-
if (descriptor.repoPath === null) {
|
|
48
|
-
// Out of scope, but never silent: the tool cannot show that it belongs here.
|
|
49
|
-
failures.push({
|
|
50
|
-
home: target.home,
|
|
51
|
-
agent: target.agent,
|
|
52
|
-
message: `session ${descriptor.ref.id} records no repository, so it cannot be listed here`,
|
|
53
|
-
});
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if ((await canonicalPath(descriptor.repoPath)) === repoRoot)
|
|
57
|
-
rows.push(descriptor); // FR-13
|
|
58
|
-
}
|
|
59
|
-
return { rows, failures };
|
|
60
|
-
}
|
|
61
|
-
/** The single listing both `list` and `resolve` use, so the two always agree (FR-10). */
|
|
62
|
-
async function buildListing(scope) {
|
|
63
|
-
const targets = await buildSearchList(deps.adapters, deps.config, scope);
|
|
64
|
-
const repoRoot = await canonicalPath(scope.repoRoot);
|
|
65
|
-
const collected = await Promise.all(targets.map((target) => collect(target, repoRoot)));
|
|
66
|
-
const rows = [];
|
|
67
|
-
const failures = [];
|
|
68
|
-
for (const part of collected) {
|
|
69
|
-
rows.push(...part.rows);
|
|
70
|
-
failures.push(...part.failures);
|
|
71
|
-
}
|
|
72
|
-
rows.sort(compareDescriptors);
|
|
73
|
-
return { rows, failures };
|
|
74
|
-
}
|
|
75
|
-
async function resolveRow(rows, row) {
|
|
76
|
-
const chosen = Number.isInteger(row) && row >= 1 ? rows[row - 1] : undefined;
|
|
77
|
-
if (!chosen) {
|
|
78
|
-
throw new SessionSelectionError(String(row), `Row ${row} is not in this repository's session list, which has ${rows.length} row(s). ${NEXT_STEP}`);
|
|
79
|
-
}
|
|
80
|
-
return chosen;
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
async list(scope) {
|
|
84
|
-
return await buildListing(scope);
|
|
85
|
-
},
|
|
86
|
-
async resolve(scope, input) {
|
|
87
|
-
const { rows } = await buildListing(scope);
|
|
88
|
-
switch (input.by) {
|
|
89
|
-
case "row":
|
|
90
|
-
return await resolveRow(rows, input.row);
|
|
91
|
-
case "session-id": {
|
|
92
|
-
const matches = rows.filter((row) => row.ref.id === input.id);
|
|
93
|
-
const found = matches[0];
|
|
94
|
-
if (!found) {
|
|
95
|
-
throw new SessionSelectionError(input.id, `No session "${input.id}" belongs to this repository. ${NEXT_STEP}`);
|
|
96
|
-
}
|
|
97
|
-
if (matches.length > 1) {
|
|
98
|
-
const locations = matches
|
|
99
|
-
.map((row) => `${row.ref.agent} at "${row.ref.home}" (${row.filePath})`)
|
|
100
|
-
.join("; ");
|
|
101
|
-
throw new SessionSelectionError(input.id, `Session ID "${input.id}" matches ${matches.length} sessions: ${locations}. ` +
|
|
102
|
-
"Select a numbered row or exact file path, or narrow the search with an agent and --home.");
|
|
103
|
-
}
|
|
104
|
-
return found;
|
|
105
|
-
}
|
|
106
|
-
case "file-path": {
|
|
107
|
-
const wanted = await canonicalPath(input.path);
|
|
108
|
-
for (const row of rows) {
|
|
109
|
-
if ((await canonicalPath(row.filePath)) === wanted)
|
|
110
|
-
return row;
|
|
111
|
-
}
|
|
112
|
-
// Selection by path is a convenience, not a way around the repository filter (NG-9).
|
|
113
|
-
throw new SessionSelectionError(input.path, `"${input.path}" is not a session of this repository. ${NEXT_STEP}`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
async load(descriptor) {
|
|
118
|
-
const adapter = deps.adapters.find((candidate) => {
|
|
119
|
-
const capabilities = candidate.capabilities();
|
|
120
|
-
return capabilities.agent === descriptor.ref.agent && capabilities.roles.includes("source");
|
|
121
|
-
});
|
|
122
|
-
if (!adapter) {
|
|
123
|
-
throw new Error(`no source adapter for agent "${descriptor.ref.agent}"`);
|
|
124
|
-
}
|
|
125
|
-
// Returned unchanged: the rules of sections D and E belong to src/import/transfer/.
|
|
126
|
-
return await adapter.loadSession(descriptor);
|
|
127
|
-
},
|
|
128
|
-
};
|
|
129
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { AgentAdapter, FileCommitter, ImportConfig, ImportPipeline, PreviewBuilder, SessionFinder, SessionLander, TokenEstimator, TransferRules } from "./contract.js";
|
|
2
|
-
/** The four stages, and the services they are driven with. `wiring.ts` builds them. */
|
|
3
|
-
export interface PipelineStages {
|
|
4
|
-
finder: SessionFinder;
|
|
5
|
-
rules: TransferRules;
|
|
6
|
-
/** A preview builder that reads the repository the request names. */
|
|
7
|
-
previewFor(repoRoot: string): PreviewBuilder;
|
|
8
|
-
lander: SessionLander;
|
|
9
|
-
/** Every adapter the composition root constructed. This module only looks one up. */
|
|
10
|
-
adapters: readonly AgentAdapter[];
|
|
11
|
-
config: ImportConfig;
|
|
12
|
-
estimator: TokenEstimator;
|
|
13
|
-
committer: FileCommitter;
|
|
14
|
-
/** ISO-8601 UTC. Only the landing reads it, so a preview and a commit agree (FR-47). */
|
|
15
|
-
now(): string;
|
|
16
|
-
}
|
|
17
|
-
export declare function createPipelineFromStages(stages: PipelineStages): ImportPipeline;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { PreviewWarning, RepoReader, TransferPlan } from "./contract.js";
|
|
2
|
-
/** Orders warnings by kind, keeping the order they were added within one kind. */
|
|
3
|
-
export declare function sortWarnings(warnings: PreviewWarning[]): PreviewWarning[];
|
|
4
|
-
/**
|
|
5
|
-
* Compares the source commit with the current HEAD (FR-37, FR-38). A repository that
|
|
6
|
-
* cannot be read, or a commit this tree does not have, is said to be unknown — never
|
|
7
|
-
* guessed and never left out (FR-36). None of these block (FR-39).
|
|
8
|
-
*/
|
|
9
|
-
export declare function repoWarning(plan: TransferPlan, repo: RepoReader, cwd: string): Promise<PreviewWarning | null>;
|
|
10
|
-
/** The warnings that come from the plan alone. */
|
|
11
|
-
export declare function planWarnings(plan: TransferPlan): PreviewWarning[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RepoReader, RepoReaderOptions } from "./contract.js";
|
|
2
|
-
/**
|
|
3
|
-
* A reader bound to one working directory.
|
|
4
|
-
*
|
|
5
|
-
* `identify` takes the directory to look at; `distanceFrom` compares against the HEAD of `cwd`,
|
|
6
|
-
* which is the repository the command is running in.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createRepoReader(cwd?: string, options?: RepoReaderOptions): RepoReader;
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/contract.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/entries.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/index.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/layout.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/claude-code/readback.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/contract.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/index.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/readback.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/redaction.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/codex/validation.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/redaction.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/adapters/pi/validate.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/cli/presentation.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/command.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/contract.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/index.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/picker.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/presentation.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/register.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/host/pi-extension/ui.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/contract.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/errors.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/homes.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.d.ts
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/index.js
RENAMED
|
File without changes
|
/package/node_modules/{@herbertgao/resume-from → resume-from}/dist/import/discovery/ordering.d.ts
RENAMED
|
File without changes
|