@timurproko/a1 0.2.7-dev.1249 → 0.2.7-dev.1252
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 +11 -36
- package/bin/cli.js +2 -17
- package/bin/ui.js +7 -48
- package/dist/app/session-shell/exit-notice.d.ts +2 -2
- package/dist/app/session-shell/exit-notice.js +10 -10
- package/dist/app/session-shell/prompt-submission.d.ts +2 -4
- package/dist/app/session-shell/prompt-submission.js +3 -23
- package/dist/app/session-shell/response-copy-transport.js +1 -2
- package/dist/app/session-shell/session-lifecycle.d.ts +1 -2
- package/dist/app/session-shell/session-lifecycle.js +2 -4
- package/dist/app/session-shell/session-shell-root.d.ts +0 -31
- package/dist/app/session-shell/session-shell-root.js +3 -4
- package/dist/app/session-shell/session-shell.js +6 -47
- package/dist/app/session-shell/session-viewport-controller.js +3 -6
- package/dist/app/session-shell/shell-host.js +2 -18
- package/dist/app/session-shell/transcript-document.d.ts +1 -2
- package/dist/app/session-shell/transcript-document.js +3 -28
- package/dist/app/session-shell/workflow-output.js +1 -1
- package/dist/app/session-shell/workflow-router.d.ts +1 -3
- package/dist/app/session-shell/workflow-router.js +1 -4
- package/dist/cli/dispatch.d.ts +1 -11
- package/dist/cli/dispatch.js +5 -92
- package/dist/cli/session-context.js +5 -7
- package/dist/cli/uninstall.d.ts +1 -5
- package/dist/cli/uninstall.js +6 -35
- package/dist/cli/version-stats.js +4 -7
- package/dist/composition/owned-settings.d.ts +0 -1
- package/dist/composition/owned-settings.js +0 -1
- package/dist/composition/owned-ui.d.ts +2 -24
- package/dist/composition/owned-ui.js +11 -87
- package/dist/composition/release-update-observation.d.ts +4 -4
- package/dist/composition/release-update-observation.js +17 -47
- package/dist/composition/session-backend.d.ts +0 -1
- package/dist/composition/session-runtime-registry.d.ts +3 -3
- package/dist/composition/settings-route-host.d.ts +0 -7
- package/dist/composition/settings-route-host.js +4 -10
- package/dist/composition/startup-route.d.ts +0 -1
- package/dist/composition/startup-route.js +0 -1
- package/dist/contracts/owned-ui/index.d.ts +1 -1
- package/dist/contracts/owned-ui/model.d.ts +0 -3
- package/dist/contracts/owned-ui/session-workflows.d.ts +1 -4
- package/dist/features/launch/development-launch.js +0 -1
- package/dist/features/launch/index.d.ts +1 -1
- package/dist/features/launch/intent.d.ts +1 -3
- package/dist/features/launch/intent.js +2 -4
- package/dist/features/launch/session-context.d.ts +2 -2
- package/dist/features/owned-ui/reference-screen-app.d.ts +0 -2
- package/dist/features/owned-ui/reference-screen-app.js +2 -9
- package/dist/features/owned-ui/settings-app.d.ts +0 -6
- package/dist/features/owned-ui/settings-app.js +5 -36
- package/dist/foundation/launch-context/index.d.ts +0 -12
- package/dist/foundation/launch-context/index.js +0 -26
- package/dist/foundation/lifecycle/claim-gate.d.ts +8 -0
- package/dist/foundation/lifecycle/claim-gate.js +37 -0
- package/dist/foundation/lifecycle/index.d.ts +5 -9
- package/dist/foundation/lifecycle/index.js +3 -4
- package/dist/foundation/lifecycle/model.d.ts +2 -59
- package/dist/foundation/lifecycle/model.js +0 -35
- package/dist/foundation/lifecycle/paths.d.ts +0 -24
- package/dist/foundation/lifecycle/paths.js +0 -40
- package/dist/foundation/lifecycle/process-liveness.d.ts +8 -0
- package/dist/foundation/lifecycle/process-liveness.js +18 -0
- package/dist/foundation/lifecycle/session-claim-lock.d.ts +1 -1
- package/dist/foundation/lifecycle/session-claim-lock.js +2 -2
- package/dist/foundation/lifecycle/session-repository-context.d.ts +6 -6
- package/dist/foundation/lifecycle/session-repository-context.js +2 -3
- package/dist/foundation/release/automatic-update.d.ts +1 -3
- package/dist/foundation/release/automatic-update.js +9 -30
- package/dist/foundation/release/bootstrap.d.ts +2 -25
- package/dist/foundation/release/bootstrap.js +33 -344
- package/dist/foundation/release/cohort-state.d.ts +21 -46
- package/dist/foundation/release/cohort-state.js +30 -62
- package/dist/foundation/release/dependency-certification.d.ts +1 -1
- package/dist/foundation/release/index.d.ts +10 -17
- package/dist/foundation/release/index.js +7 -11
- package/dist/foundation/release/latest-release.d.ts +1 -2
- package/dist/foundation/release/latest-release.js +1 -2
- package/dist/foundation/release/process-liveness.d.ts +2 -0
- package/dist/foundation/release/process-liveness.js +12 -0
- package/dist/foundation/release/release-gc.d.ts +12 -9
- package/dist/foundation/release/release-gc.js +34 -98
- package/dist/foundation/release/release-store.d.ts +2 -2
- package/dist/foundation/release/release-store.js +2 -2
- package/dist/foundation/release/restart-certification.js +1 -1
- package/dist/foundation/release/update-activation.d.ts +2 -9
- package/dist/foundation/release/update-activation.js +28 -43
- package/dist/foundation/release/update-execution-lease.js +1 -1
- package/dist/foundation/release/update-launch.d.ts +0 -2
- package/dist/foundation/release/update-launch.js +0 -7
- package/dist/foundation/release/update-recovery.js +1 -1
- package/dist/foundation/release/update-transaction.d.ts +1 -1
- package/dist/foundation/release/update-transaction.js +5 -2
- package/dist/foundation/release/update.d.ts +2 -10
- package/dist/foundation/release/update.js +23 -200
- package/dist/foundation/session-writer-lock/index.d.ts +14 -6
- package/dist/foundation/session-writer-lock/index.js +48 -103
- package/dist/foundation/startup/startup-runtime.d.ts +1 -1
- package/dist/foundation/terminal-cleanup/exit-notice.d.ts +6 -0
- package/dist/foundation/terminal-cleanup/exit-notice.js +36 -0
- package/dist/foundation/terminal-cleanup/index.d.ts +2 -1
- package/dist/foundation/terminal-cleanup/index.js +2 -1
- package/dist/foundation/terminal-cleanup/terminal-reset.d.ts +0 -5
- package/dist/foundation/terminal-cleanup/terminal-reset.js +0 -5
- package/dist/integrations/pi/components/index.d.ts +1 -1
- package/dist/integrations/pi/components/index.js +1 -1
- package/dist/integrations/pi/components/shell-editor-autocomplete.js +1 -4
- package/dist/integrations/pi/components/shell-footer-status.d.ts +1 -1
- package/dist/integrations/pi/components/shell-footer-status.js +2 -2
- package/dist/integrations/pi/components/shell-hotkey-sections.js +1 -1
- package/dist/integrations/pi/components/shell-presenters-info.d.ts +2 -5
- package/dist/integrations/pi/components/shell-presenters-info.js +4 -18
- package/dist/integrations/pi/components/shell-presenters-transcript.d.ts +1 -1
- package/dist/integrations/pi/components/shell-presenters-transcript.js +1 -1
- package/dist/integrations/pi/components/shell-shared-facade.d.ts +0 -2
- package/dist/integrations/pi/components/submitted-prompt-adapter.d.ts +2 -5
- package/dist/integrations/pi/components/submitted-prompt-adapter.js +2 -16
- package/dist/integrations/pi/components/upstream/components/session-footer.d.ts +1 -2
- package/dist/integrations/pi/components/upstream/components/session-footer.js +6 -8
- package/dist/integrations/pi/engine/adapter.d.ts +0 -1
- package/dist/integrations/pi/engine/adapter.js +1 -16
- package/dist/integrations/pi/engine/diagnostics-state.d.ts +0 -1
- package/dist/integrations/pi/engine/diagnostics-state.js +0 -14
- package/dist/integrations/pi/engine/prompt-suggestions.d.ts +0 -1
- package/dist/integrations/pi/engine/prompt-suggestions.js +0 -40
- package/dist/integrations/pi/engine/session-runtime.js +0 -2
- package/dist/integrations/pi/engine/workflow-runner.js +1 -1
- package/dist/integrations/pi/tui-runtime/adapter.d.ts +2 -2
- package/dist/integrations/pi/tui-runtime/adapter.js +2 -2
- package/dist/product-identity.d.ts +4 -6
- package/dist/product-identity.js +6 -11
- package/dist/product-identity.json +1 -40
- package/dist/runtime-payload-inventory.json +0 -3
- package/dist/ui/components/index.d.ts +2 -2
- package/dist/ui/components/index.js +1 -1
- package/dist/ui/components/submitted-prompt.d.ts +3 -13
- package/dist/ui/components/submitted-prompt.js +8 -41
- package/dist/ui/components/transcript-viewport.d.ts +1 -3
- package/dist/ui/components/transcript-viewport.js +1 -4
- package/dist/ui/settings/declarations.d.ts +3 -97
- package/dist/ui/settings/declarations.js +3 -78
- package/dist/ui/settings/migrations.js +18 -2
- package/docs/architecture/boundaries.md +22 -39
- package/docs/architecture/code-documentation.md +2 -2
- package/docs/architecture/internal-naming.md +9 -17
- package/docs/architecture/project-structure.md +9 -14
- package/docs/architecture/resource-and-data-policy.md +16 -31
- package/docs/architecture/toolchain.md +14 -19
- package/docs/architecture/ui-reference-provenance.md +2 -2
- package/docs/ci-release-runbook.md +5 -5
- package/docs/features/launch-profiles.md +11 -17
- package/docs/features/prompt-history.md +10 -11
- package/docs/local-worktree-cleanup.md +28 -1
- package/docs/manual-owned-ui-checkpoint.md +0 -1
- package/docs/validation.md +5 -11
- package/docs/worktree-link-recovery.md +6 -6
- package/package.json +7 -19
- package/bin/guardian.js +0 -42
- package/bin/supervisor.js +0 -7
- package/bin/tab-launch-context.d.ts +0 -27
- package/bin/tab-launch-context.js +0 -94
- package/dist/app/session-shell/resident-tab-coordinator.d.ts +0 -38
- package/dist/app/session-shell/resident-tab-coordinator.js +0 -77
- package/dist/cli/tabs-request.d.ts +0 -7
- package/dist/cli/tabs-request.js +0 -1
- package/dist/cli/tabs.d.ts +0 -14
- package/dist/cli/tabs.js +0 -151
- package/dist/composition/resident-tab-bridge.d.ts +0 -41
- package/dist/composition/resident-tab-bridge.js +0 -209
- package/dist/composition/utility-tab.d.ts +0 -28
- package/dist/composition/utility-tab.js +0 -244
- package/dist/features/owned-ui/plus-menu-dialog.d.ts +0 -28
- package/dist/features/owned-ui/plus-menu-dialog.js +0 -89
- package/dist/features/resident-tab/auto-name.d.ts +0 -11
- package/dist/features/resident-tab/auto-name.js +0 -44
- package/dist/features/resident-tab/index.d.ts +0 -5
- package/dist/features/resident-tab/index.js +0 -7
- package/dist/features/resident-tab/shortcut-bindings-file.d.ts +0 -8
- package/dist/features/resident-tab/shortcut-bindings-file.js +0 -40
- package/dist/features/resident-tab/shortcut-declarations.d.ts +0 -13
- package/dist/features/resident-tab/shortcut-declarations.js +0 -26
- package/dist/features/resident-tab/shortcut-projection.d.ts +0 -29
- package/dist/features/resident-tab/shortcut-projection.js +0 -64
- package/dist/features/resident-tab/status-deriver.d.ts +0 -10
- package/dist/features/resident-tab/status-deriver.js +0 -12
- package/dist/foundation/launch-guardian/exit-watcher.d.ts +0 -14
- package/dist/foundation/launch-guardian/exit-watcher.js +0 -103
- package/dist/foundation/launch-guardian/index.d.ts +0 -2
- package/dist/foundation/launch-guardian/index.js +0 -1
- package/dist/foundation/launch-guardian/main.d.ts +0 -39
- package/dist/foundation/launch-guardian/main.js +0 -232
- package/dist/foundation/lifecycle/commands.d.ts +0 -40
- package/dist/foundation/lifecycle/commands.js +0 -1
- package/dist/foundation/lifecycle/launch-instance.d.ts +0 -46
- package/dist/foundation/lifecycle/launch-instance.js +0 -134
- package/dist/foundation/lifecycle/native-claim-gate.d.ts +0 -5
- package/dist/foundation/lifecycle/native-claim-gate.js +0 -41
- package/dist/foundation/lifecycle/supervisor-startup.d.ts +0 -30
- package/dist/foundation/lifecycle/supervisor-startup.js +0 -106
- package/dist/foundation/process-containment/addon-containment.d.ts +0 -20
- package/dist/foundation/process-containment/addon-containment.js +0 -139
- package/dist/foundation/process-containment/addon-process-inspector.d.ts +0 -11
- package/dist/foundation/process-containment/addon-process-inspector.js +0 -36
- package/dist/foundation/process-containment/addon.d.ts +0 -47
- package/dist/foundation/process-containment/addon.js +0 -57
- package/dist/foundation/process-containment/artifact.d.ts +0 -1
- package/dist/foundation/process-containment/artifact.js +0 -35
- package/dist/foundation/process-containment/contracts.d.ts +0 -33
- package/dist/foundation/process-containment/contracts.js +0 -35
- package/dist/foundation/process-containment/index.d.ts +0 -9
- package/dist/foundation/process-containment/index.js +0 -7
- package/dist/foundation/process-containment/linux-process-inspector.d.ts +0 -7
- package/dist/foundation/process-containment/linux-process-inspector.js +0 -27
- package/dist/foundation/process-containment/native-process-inspector.d.ts +0 -4
- package/dist/foundation/process-containment/native-process-inspector.js +0 -21
- package/dist/foundation/protocol/client.d.ts +0 -18
- package/dist/foundation/protocol/client.js +0 -130
- package/dist/foundation/protocol/index.d.ts +0 -3
- package/dist/foundation/protocol/index.js +0 -2
- package/dist/foundation/protocol/messages.d.ts +0 -90
- package/dist/foundation/protocol/messages.js +0 -100
- package/dist/foundation/release/cohort-selection.d.ts +0 -33
- package/dist/foundation/release/cohort-selection.js +0 -67
- package/dist/foundation/release/endpoint-lock.d.ts +0 -2
- package/dist/foundation/release/endpoint-lock.js +0 -37
- package/dist/foundation/release/endpoint-recovery.d.ts +0 -10
- package/dist/foundation/release/endpoint-recovery.js +0 -45
- package/dist/foundation/release/endpoints.d.ts +0 -32
- package/dist/foundation/release/endpoints.js +0 -152
- package/dist/foundation/release/prepared-update-activation.d.ts +0 -3
- package/dist/foundation/release/prepared-update-activation.js +0 -27
- package/dist/foundation/release/process-cleanup.d.ts +0 -14
- package/dist/foundation/release/process-cleanup.js +0 -76
- package/dist/foundation/release/supervisor-identity.d.ts +0 -15
- package/dist/foundation/release/supervisor-identity.js +0 -63
- package/dist/foundation/resident-tabs/boot-identity.d.ts +0 -6
- package/dist/foundation/resident-tabs/boot-identity.js +0 -16
- package/dist/foundation/resident-tabs/bounded-host-command.d.ts +0 -20
- package/dist/foundation/resident-tabs/bounded-host-command.js +0 -62
- package/dist/foundation/resident-tabs/bridge-client.d.ts +0 -73
- package/dist/foundation/resident-tabs/bridge-client.js +0 -327
- package/dist/foundation/resident-tabs/continuity.d.ts +0 -12
- package/dist/foundation/resident-tabs/continuity.js +0 -63
- package/dist/foundation/resident-tabs/doctor.d.ts +0 -28
- package/dist/foundation/resident-tabs/doctor.js +0 -166
- package/dist/foundation/resident-tabs/draft-checkpoint.d.ts +0 -27
- package/dist/foundation/resident-tabs/draft-checkpoint.js +0 -145
- package/dist/foundation/resident-tabs/ensure-terminal-host.d.ts +0 -36
- package/dist/foundation/resident-tabs/ensure-terminal-host.js +0 -151
- package/dist/foundation/resident-tabs/fault-injection.d.ts +0 -8
- package/dist/foundation/resident-tabs/fault-injection.js +0 -26
- package/dist/foundation/resident-tabs/fixture-control.d.ts +0 -7
- package/dist/foundation/resident-tabs/fixture-control.js +0 -35
- package/dist/foundation/resident-tabs/host-entry.d.ts +0 -1
- package/dist/foundation/resident-tabs/host-entry.js +0 -17
- package/dist/foundation/resident-tabs/index.d.ts +0 -15
- package/dist/foundation/resident-tabs/index.js +0 -10
- package/dist/foundation/resident-tabs/maintenance.d.ts +0 -39
- package/dist/foundation/resident-tabs/maintenance.js +0 -75
- package/dist/foundation/resident-tabs/progress-observation-schema.d.ts +0 -34
- package/dist/foundation/resident-tabs/progress-observation-schema.js +0 -1
- package/dist/foundation/resident-tabs/progress-observation.d.ts +0 -4
- package/dist/foundation/resident-tabs/progress-observation.js +0 -150
- package/dist/foundation/resident-tabs/prompt-journal.d.ts +0 -63
- package/dist/foundation/resident-tabs/prompt-journal.js +0 -213
- package/dist/foundation/resident-tabs/protocol.d.ts +0 -12
- package/dist/foundation/resident-tabs/protocol.js +0 -195
- package/dist/foundation/resident-tabs/recovery.d.ts +0 -26
- package/dist/foundation/resident-tabs/recovery.js +0 -205
- package/dist/foundation/resident-tabs/release-holds.d.ts +0 -28
- package/dist/foundation/resident-tabs/release-holds.js +0 -78
- package/dist/foundation/resident-tabs/routes.d.ts +0 -5
- package/dist/foundation/resident-tabs/routes.js +0 -5
- package/dist/foundation/resident-tabs/routing.d.ts +0 -11
- package/dist/foundation/resident-tabs/routing.js +0 -10
- package/dist/foundation/resident-tabs/runtime-control.d.ts +0 -38
- package/dist/foundation/resident-tabs/runtime-control.js +0 -74
- package/dist/foundation/resident-tabs/session-sync.d.ts +0 -14
- package/dist/foundation/resident-tabs/session-sync.js +0 -37
- package/dist/foundation/resident-tabs/settings.d.ts +0 -16
- package/dist/foundation/resident-tabs/settings.js +0 -60
- package/dist/foundation/resident-tabs/terminal-host-artifact.d.ts +0 -14
- package/dist/foundation/resident-tabs/terminal-host-artifact.js +0 -78
- package/dist/foundation/resident-tabs/zip-archive.d.ts +0 -9
- package/dist/foundation/resident-tabs/zip-archive.js +0 -56
- package/dist/foundation/storage/control-store.d.ts +0 -20
- package/dist/foundation/storage/control-store.js +0 -331
- package/dist/foundation/storage/index.d.ts +0 -1
- package/dist/foundation/storage/index.js +0 -1
- package/dist/foundation/supervision/index.d.ts +0 -3
- package/dist/foundation/supervision/index.js +0 -3
- package/dist/foundation/supervision/main.d.ts +0 -1
- package/dist/foundation/supervision/main.js +0 -86
- package/dist/foundation/supervision/paths.d.ts +0 -1
- package/dist/foundation/supervision/paths.js +0 -1
- package/dist/foundation/supervision/server.d.ts +0 -46
- package/dist/foundation/supervision/server.js +0 -611
- package/dist/integrations/pi/engine/offline-settings-port.d.ts +0 -23
- package/dist/integrations/pi/engine/offline-settings-port.js +0 -54
- package/dist/native/darwin-arm64/manifest.json +0 -23
- package/dist/native/darwin-arm64/process-guardian.node +0 -0
- package/dist/native/darwin-arm64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10500
- package/dist/native/darwin-arm64/terminal-host.manifest.json +0 -46
- package/dist/native/darwin-arm64/terminal-host.node +0 -0
- package/dist/native/darwin-x64/manifest.json +0 -23
- package/dist/native/darwin-x64/process-guardian.node +0 -0
- package/dist/native/darwin-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10737
- package/dist/native/darwin-x64/terminal-host.manifest.json +0 -46
- package/dist/native/darwin-x64/terminal-host.node +0 -0
- package/dist/native/linux-x64/manifest.json +0 -23
- package/dist/native/linux-x64/process-guardian.node +0 -0
- package/dist/native/linux-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -11226
- package/dist/native/linux-x64/terminal-host.manifest.json +0 -46
- package/dist/native/linux-x64/terminal-host.node +0 -0
- package/dist/native/win32-x64/manifest.json +0 -23
- package/dist/native/win32-x64/process-guardian.node +0 -0
- package/dist/native/win32-x64/terminal-host-THIRD-PARTY-NOTICES.txt +0 -10757
- package/dist/native/win32-x64/terminal-host.manifest.json +0 -46
- package/dist/native/win32-x64/terminal-host.node +0 -0
- package/docs/architecture/evidence/resident-tabs/linux-x64.md +0 -37
- package/docs/architecture/evidence/resident-tabs/macos-arm64.md +0 -36
- package/docs/architecture/evidence/resident-tabs/macos-x64.md +0 -35
- package/docs/architecture/evidence/resident-tabs/windows-x64.md +0 -36
- package/docs/architecture/evidence/terminal-host-spike/manual-one-pane-terminal-host.md +0 -70
- package/docs/architecture/evidence/terminal-host-spike/manual-two-by-two-basic-terminal-host.md +0 -32
- package/docs/architecture/evidence/terminal-host-spike/milestone-baseline.json +0 -115
- package/docs/architecture/evidence/terminal-host-spike/owned-ui-foundation-prerequisite.json +0 -48
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-provenance.json +0 -125
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-1.json +0 -56
- package/docs/architecture/evidence/terminal-host-spike/terminal-host-task-5-3.json +0 -174
- package/docs/architecture/evidence/terminal-host-spike/terminal-spike-acceptance-record.json +0 -18
- package/docs/architecture/native-fixture-isolation.md +0 -23
- package/docs/architecture/process-guardian-provenance.md +0 -36
- package/docs/architecture/resident-tabs-requirements.md +0 -18
- package/docs/architecture/resident-tabs.md +0 -668
- package/docs/architecture/terminal-host-proof-gate.md +0 -34
- package/docs/architecture/terminal-host-provenance.md +0 -81
- package/docs/architecture/terminal-host-spike-evidence.md +0 -39
- package/docs/launch-recovery.md +0 -23
- package/docs/manual-launch-instance-acceptance.md +0 -43
- package/docs/manual-resident-tabs-acceptance.md +0 -51
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { readFileSync, rmSync } from "node:fs";
|
|
2
|
+
import { restoreProcessTerminal } from "./terminal-reset.js";
|
|
3
|
+
/** Notices are a few plain lines; anything larger is not one this build wrote. */
|
|
4
|
+
const MAX_NOTICE_BYTES = 4096;
|
|
5
|
+
/**
|
|
6
|
+
* The launcher's half of the unclean-exit protocol. The UI arms a notice file while it runs and
|
|
7
|
+
* removes it on a clean exit, so a notice that is still present when the UI ends means the UI was
|
|
8
|
+
* stopped unexpectedly: restore the terminal, print the notice as plain text, and consume it.
|
|
9
|
+
*/
|
|
10
|
+
export function deliverExitNotice(path, write, restore = restoreProcessTerminal) {
|
|
11
|
+
let text;
|
|
12
|
+
try {
|
|
13
|
+
const bytes = readFileSync(path);
|
|
14
|
+
text = bytes.byteLength > MAX_NOTICE_BYTES ? "" : bytes.toString("utf8");
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
rmSync(path, { force: true });
|
|
21
|
+
}
|
|
22
|
+
catch { }
|
|
23
|
+
// Security: the notice is printed after the UI is gone, so it must not carry terminal controls.
|
|
24
|
+
const lines = text.split(/\r?\n/u).map(line => line.replace(/[\x00-\x1f\x7f-\x9f]/gu, "")).filter(line => line.length > 0);
|
|
25
|
+
if (lines.length === 0)
|
|
26
|
+
return false;
|
|
27
|
+
try {
|
|
28
|
+
restore();
|
|
29
|
+
}
|
|
30
|
+
catch { }
|
|
31
|
+
try {
|
|
32
|
+
write(`\n${lines.join("\n")}\n`);
|
|
33
|
+
}
|
|
34
|
+
catch { }
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { CLEAR_EXIT_INTERVAL_MS, EMERGENCY_TERMINAL_RESET,
|
|
1
|
+
export { CLEAR_EXIT_INTERVAL_MS, EMERGENCY_TERMINAL_RESET, boundedCleanup, restoreAfterOwnedExit, restoreProcessTerminal } from "./terminal-reset.js";
|
|
2
|
+
export { deliverExitNotice } from "./exit-notice.js";
|
|
2
3
|
export { installFatalExit, writeFatalDiagnostic } from "./fatal-exit.js";
|
|
3
4
|
export type { FatalExitOptions } from "./fatal-exit.js";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { CLEAR_EXIT_INTERVAL_MS, EMERGENCY_TERMINAL_RESET,
|
|
1
|
+
export { CLEAR_EXIT_INTERVAL_MS, EMERGENCY_TERMINAL_RESET, boundedCleanup, restoreAfterOwnedExit, restoreProcessTerminal } from "./terminal-reset.js";
|
|
2
|
+
export { deliverExitNotice } from "./exit-notice.js";
|
|
2
3
|
export { installFatalExit, writeFatalDiagnostic } from "./fatal-exit.js";
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
export declare const CLEAR_EXIT_INTERVAL_MS = 500;
|
|
2
|
-
/**
|
|
3
|
-
* How long a first `Ctrl+C` keeps the resident attach client's detach chord armed. It matches the
|
|
4
|
-
* owned dialogs' interrupt chord so an unhurried double press leaves resident tabs from any tab.
|
|
5
|
-
*/
|
|
6
|
-
export declare const RESIDENT_DETACH_INTERVAL_MS = 1500;
|
|
7
2
|
export declare const EMERGENCY_TERMINAL_RESET: string;
|
|
8
3
|
export declare function restoreProcessTerminal(): void;
|
|
9
4
|
export declare function restoreAfterOwnedExit(ownsTerminal: boolean, code: number | null, signal: string | null, restore?: () => void): number;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { writeSync } from "node:fs";
|
|
2
2
|
export const CLEAR_EXIT_INTERVAL_MS = 500;
|
|
3
|
-
/**
|
|
4
|
-
* How long a first `Ctrl+C` keeps the resident attach client's detach chord armed. It matches the
|
|
5
|
-
* owned dialogs' interrupt chord so an unhurried double press leaves resident tabs from any tab.
|
|
6
|
-
*/
|
|
7
|
-
export const RESIDENT_DETACH_INTERVAL_MS = 1_500;
|
|
8
3
|
// Protocol: reset modes on both screens; setting keyboard flags to zero is idempotent,
|
|
9
4
|
// unlike repeatedly popping a keyboard-protocol stack owned by a parent application.
|
|
10
5
|
// Resetting parent-screen margins homes the cursor, so preserve its restored position.
|
|
@@ -3,7 +3,7 @@ export { loadHistoryEditor, type HistoryEditorConstructor } from "./history-edit
|
|
|
3
3
|
export { PiComponentConformanceError, runPiComponentConformance } from "./conformance.js";
|
|
4
4
|
export type { PiComponentConformanceReport, PiComponentConformanceResult } from "./conformance.js";
|
|
5
5
|
export { createPiShellOperationLoader, createPiShellShareOperationDialog, type PiShellOperationLoaderPort, } from "./share-operation-dialog.js";
|
|
6
|
-
export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord,
|
|
6
|
+
export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStartupDiagnostic, renderPiShellStatusText, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-components.js";
|
|
7
7
|
export { renderPiShellHotkeySections } from "./shell-hotkey-sections.js";
|
|
8
8
|
export type { PiShellHotkeySection } from "./shell-hotkey-sections.js";
|
|
9
9
|
export type { PiExtensionUiBridge, PiExtensionUiBridgeHost, PiShellAuthProviderOption, PiShellAutocompleteCommand, PiShellClipboardContent, PiShellCommandMessagePresentation, PiShellComponentPort, PiShellEditorBodyGeometry, PiShellEditorOptions, PiShellEditorPointerEvent, PiKeybindingsHost, PiShellEditorPort, PiShellEditorTextRange, PiShellExtensionRendererResolver, PiShellHeaderOptions, PiShellHeaderPort, PiShellHotkeysPresentation, PiShellImageAssetResolver, PiShellLoadedResourcesPort, PiShellLoginDialogPort, PiShellModelSelectorOptions, PiShellModelsDialogOptions, PiShellModelsDialogPort, PiShellPasteReservation, PiShellQueuedInputPort, PiShellResourceEntry, PiShellResourceSection, PiShellScopedModelDescriptor, PiShellScopedModelsSelectorOptions, PiShellScopedModelsSelectorPort, PiShellSelectorOption, PiShellSelectorOptions, PiShellSessionInfoPresentation, PiShellSettingsSelectorOptions, PiShellStartupNotice, PiShellStatusPlacement, PiShellStatusPort, PiShellSubmittedPromptComposer, PiShellTranscriptComponentPort, PiShellViewComponentPort, } from "./shell-components.js";
|
|
@@ -2,7 +2,7 @@ export { adaptPiAssistantMessage, adaptPiToolExecution, adaptPiUserMessage } fro
|
|
|
2
2
|
export { loadHistoryEditor } from "./history-editor-loader.js";
|
|
3
3
|
export { PiComponentConformanceError, runPiComponentConformance } from "./conformance.js";
|
|
4
4
|
export { createPiShellOperationLoader, createPiShellShareOperationDialog, } from "./share-operation-dialog.js";
|
|
5
|
-
export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord,
|
|
5
|
+
export { OWNED_BUILTIN_SLASH_COMMANDS, PINNED_PI_BUILTIN_SLASH_COMMANDS, componentFromPort, componentPort, createPiExtensionUiBridge, createPiQueuedInputStatus, createPiShellArmin, createPiShellAuthProviderSelector, createPiShellChangelog, createPiShellCollapsedChangelog, createPiShellDialog, createPiShellEarendilAnnouncement, createPiShellEditor, createPiShellExtensionSelector, createPiShellFooter, createPiShellHeader, createPiShellHotkeys, createPiShellLoadedResources, createPiShellLoginDialog, createPiShellModelSelector, createPiShellModelsDialog, createPiShellReloadBox, createPiShellScopedModelsSelector, createPiShellSelector, createPiShellSessionInfo, createPiShellSessionSelector, createPiShellSettingsSelector, createPiShellShowImagesSelector, createPiShellSkillsSelector, createPiShellStatus, createPiShellThemeSelector, createPiShellTranscriptComponent, createPiShellTreeSelector, createPiShellTrustSelector, createPiShellUserMessageSelector, createTuiFacade, createPiKeybindingsHost, ensureTheme, formatSessionTokens, isAutocompleteProvider, isPiPromptStyleCompaction, isRecord, piShellHyperlink, piShellTruncateToWidth, piShellVisibleWidth, renderPiShellChangelogLines, renderPiShellCommandMessage, renderPiShellHotkeysLines, renderPiShellPackageUpdateNotice, renderPiShellReleaseUpdateBanner, renderPiShellReleaseUpdateNotice, renderPiShellStartupDiagnostic, renderPiShellStatusText, renderPiShellTranscriptBlock, validatedAssistantMessage, } from "./shell-components.js";
|
|
6
6
|
export { renderPiShellHotkeySections } from "./shell-hotkey-sections.js";
|
|
7
7
|
export { PINNED_PI_LAYOUT, applyConfiguredPiTheme, applyPiTheme, applyPiThemeInstance, currentPiAccentColor, currentPiThemeName, derivePiAccentProjection, derivePiCanvasBackground, detectPiTerminalBackgroundFromEnv, detectPiTerminalBackgroundTheme, detectPiTerminalThemeForAuto, ensurePiTheme, getAvailablePiThemes, getPiSelectListTheme, loadPiTheme, onPiThemeChange, parsePiAutoThemeSetting, piCanvasBackgroundAnsi, piTheme, resolvePiThemeSetting, setPiAccentColor, setPiPackageBorderProjectionEnabled, stopPiThemeWatcher, } from "./theme.js";
|
|
8
8
|
export { OwnedPiThemeController } from "./upstream/theme/theme-controller.js";
|
|
@@ -5,8 +5,6 @@ import { OwnedEditorUxInterception, createPromptSelectionInterceptor, editorVisu
|
|
|
5
5
|
import { PINNED_PI_LAYOUT, getPiSelectListTheme, piTheme, renderPiListSelection, } from "./theme.js";
|
|
6
6
|
import { createPiKeybindingsHost, createTuiFacade, ensureTheme, isAutocompleteProvider, } from "./shell-shared-facade.js";
|
|
7
7
|
import { SKILLS_COMMAND_NAME, collapseSkillCommands, createSkillsTunnelProvider, } from "./skills-command.js";
|
|
8
|
-
/** The built-in commands resident A1 serves from its tab bar instead: utility tabs, and the tab rename for `/name`. */
|
|
9
|
-
const RESIDENT_UTILITY_TAB_COMMANDS = new Set(["settings", "changelog", "name"]);
|
|
10
8
|
/** A selected autocomplete row: its arrow/primary column, then the aligned description. */
|
|
11
9
|
const SELECTED_DESCRIBED_ROW = /^(→ .*?\S)(\s{2,}.*)$/u;
|
|
12
10
|
const INPUT_COUNTER_INSET = 3;
|
|
@@ -336,8 +334,7 @@ export function createPiShellEditor(options) {
|
|
|
336
334
|
};
|
|
337
335
|
}
|
|
338
336
|
function autocompleteCommandSetter(options, editor, state, enabled) {
|
|
339
|
-
const builtInCatalog =
|
|
340
|
-
.filter(command => !options.hideUtilityTabCommands || !RESIDENT_UTILITY_TAB_COMMANDS.has(command.name));
|
|
337
|
+
const builtInCatalog = options.keybindingProfile === "a1" ? OWNED_BUILTIN_SLASH_COMMANDS : PINNED_PI_BUILTIN_SLASH_COMMANDS;
|
|
341
338
|
return installed => {
|
|
342
339
|
if (!enabled) {
|
|
343
340
|
state.provider = emptyAutocompleteProvider();
|
|
@@ -4,5 +4,5 @@ import { type PiShellViewComponentPort, type PiShellStatusPort, type PiShellProg
|
|
|
4
4
|
export declare function createPiShellHeader(options?: PiShellHeaderOptions): PiShellHeaderPort;
|
|
5
5
|
export declare function createPiShellLoadedResources(resources: readonly PiShellResourceEntry[], initialExpanded?: boolean): PiShellLoadedResourcesPort;
|
|
6
6
|
export declare function createPiShellStatus(view: OwnedUiSessionViewModel, progressStatus: PiShellProgressStatusPresentation, runtime?: Pick<PiShellEditorOptions, "getColumns" | "getRows" | "requestRender">): PiShellStatusPort;
|
|
7
|
-
export declare function createPiShellFooter(view: OwnedUiSessionViewModel, cwd: string, profile?: "pi" | "a1", showLevel?: () => boolean
|
|
7
|
+
export declare function createPiShellFooter(view: OwnedUiSessionViewModel, cwd: string, profile?: "pi" | "a1", showLevel?: () => boolean): PiShellViewComponentPort;
|
|
8
8
|
export declare function createPiQueuedInputStatus(submissions: readonly string[], presentation?: "pinned" | "custom-viewport", getKeybindings?: () => KeybindingsConfig): PiShellQueuedInputPort;
|
|
@@ -136,9 +136,9 @@ export function createPiShellStatus(view, progressStatus, runtime) {
|
|
|
136
136
|
},
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
export function createPiShellFooter(view, cwd, profile = "pi", showLevel = () => true
|
|
139
|
+
export function createPiShellFooter(view, cwd, profile = "pi", showLevel = () => true) {
|
|
140
140
|
ensureTheme();
|
|
141
|
-
const footer = new SessionFooter(() => view, cwd, profile, showLevel
|
|
141
|
+
const footer = new SessionFooter(() => view, cwd, profile, showLevel);
|
|
142
142
|
return {
|
|
143
143
|
render: width => footer.render(width),
|
|
144
144
|
invalidate: () => footer.invalidate(),
|
|
@@ -6,7 +6,7 @@ import { hotkeysMarkdown } from "./shell-presenters-info.js";
|
|
|
6
6
|
export function renderPiShellHotkeySections(presentation, width) {
|
|
7
7
|
ensureTheme();
|
|
8
8
|
const shortcuts = presentation.getShortcuts ?? (() => []);
|
|
9
|
-
const markdown = hotkeysMarkdown(presentation.bindings, shortcuts, presentation.profile ?? "pi"
|
|
9
|
+
const markdown = hotkeysMarkdown(presentation.bindings, shortcuts, presentation.profile ?? "pi");
|
|
10
10
|
const sections = [];
|
|
11
11
|
for (const line of markdown.split("\n")) {
|
|
12
12
|
const heading = /^\*\*(.+)\*\*$/.exec(line)?.[1];
|
|
@@ -68,14 +68,11 @@ export interface PiShellHotkeysPresentation {
|
|
|
68
68
|
readonly bindings?: KeybindingsConfig;
|
|
69
69
|
readonly getShortcuts?: NonNullable<PiShellExtensionRendererResolver["getShortcuts"]>;
|
|
70
70
|
readonly profile?: "pi" | "a1";
|
|
71
|
-
readonly residentTabs?: boolean;
|
|
72
71
|
}
|
|
73
|
-
export declare function createPiShellHotkeys(bindings?: KeybindingsConfig, getShortcuts?: NonNullable<PiShellExtensionRendererResolver["getShortcuts"]>, profile?: "pi" | "a1"
|
|
72
|
+
export declare function createPiShellHotkeys(bindings?: KeybindingsConfig, getShortcuts?: NonNullable<PiShellExtensionRendererResolver["getShortcuts"]>, profile?: "pi" | "a1"): PiShellComponentPort;
|
|
74
73
|
/** The keyboard-shortcut document rows the feed presenter shows, without its spacer, borders, and heading. */
|
|
75
74
|
export declare function renderPiShellHotkeysLines(presentation: PiShellHotkeysPresentation, width: number): readonly string[];
|
|
76
|
-
|
|
77
|
-
export declare const TAB_HOTKEYS: readonly (readonly [string, string | null, string])[];
|
|
78
|
-
export declare function hotkeysMarkdown(bindings: KeybindingsConfig | undefined, getShortcuts: NonNullable<PiShellExtensionRendererResolver["getShortcuts"]>, profile: "pi" | "a1", residentTabs?: boolean): string;
|
|
75
|
+
export declare function hotkeysMarkdown(bindings: KeybindingsConfig | undefined, getShortcuts: NonNullable<PiShellExtensionRendererResolver["getShortcuts"]>, profile: "pi" | "a1"): string;
|
|
79
76
|
/**
|
|
80
77
|
* Pinned Pi's `showPackageUpdateNotification` banner: warning-coloured dynamic
|
|
81
78
|
* borders around a bold warning title, the muted update instruction with the
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DynamicBorder } from "../startup-public.js";
|
|
2
2
|
import { Container, getCapabilities, hyperlink, Markdown, Spacer, Text, visibleWidth } from "@earendil-works/pi-tui";
|
|
3
3
|
import { PRODUCT_TEXT } from "../../../product-identity.js";
|
|
4
|
-
import { projectResidentTabShortcuts, RESIDENT_TAB_GLOBAL_SHORTCUTS } from "../../../features/resident-tab/index.js";
|
|
5
4
|
import { KeybindingsManager } from "./upstream/adjacent/core/keybindings.js";
|
|
6
5
|
import { getPiHotkeysMarkdownTheme, getPiMarkdownTheme, paintPiBorder, PINNED_PI_LAYOUT, piTheme } from "./theme.js";
|
|
7
6
|
import { componentPort, ensureTheme, formatSessionTokens } from "./shell-shared-facade.js";
|
|
@@ -148,9 +147,9 @@ function shortcutDisplay(key) {
|
|
|
148
147
|
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
149
148
|
}).join("+")).join("/");
|
|
150
149
|
}
|
|
151
|
-
export function createPiShellHotkeys(bindings, getShortcuts = () => [], profile = "pi"
|
|
150
|
+
export function createPiShellHotkeys(bindings, getShortcuts = () => [], profile = "pi") {
|
|
152
151
|
ensureTheme();
|
|
153
|
-
const markdown = hotkeysMarkdown(bindings, getShortcuts, profile
|
|
152
|
+
const markdown = hotkeysMarkdown(bindings, getShortcuts, profile);
|
|
154
153
|
const container = new Container();
|
|
155
154
|
container.addChild(new Spacer(1));
|
|
156
155
|
container.addChild(new DynamicBorder(paintPiBorder));
|
|
@@ -163,14 +162,12 @@ export function createPiShellHotkeys(bindings, getShortcuts = () => [], profile
|
|
|
163
162
|
/** The keyboard-shortcut document rows the feed presenter shows, without its spacer, borders, and heading. */
|
|
164
163
|
export function renderPiShellHotkeysLines(presentation, width) {
|
|
165
164
|
ensureTheme();
|
|
166
|
-
return hotkeysMarkdownComponent(hotkeysMarkdown(presentation.bindings, presentation.getShortcuts ?? (() => []), presentation.profile ?? "pi"
|
|
165
|
+
return hotkeysMarkdownComponent(hotkeysMarkdown(presentation.bindings, presentation.getShortcuts ?? (() => []), presentation.profile ?? "pi")).render(width);
|
|
167
166
|
}
|
|
168
167
|
function hotkeysMarkdownComponent(markdown) {
|
|
169
168
|
return new Markdown(markdown, 1, 1, getPiHotkeysMarkdownTheme());
|
|
170
169
|
}
|
|
171
|
-
|
|
172
|
-
export const TAB_HOTKEYS = RESIDENT_TAB_GLOBAL_SHORTCUTS.map(shortcut => [shortcut.id, shortcut.defaultKey, shortcut.description]);
|
|
173
|
-
export function hotkeysMarkdown(bindings, getShortcuts, profile, residentTabs = false) {
|
|
170
|
+
export function hotkeysMarkdown(bindings, getShortcuts, profile) {
|
|
174
171
|
const keys = profile === "a1" ? KeybindingsManager.fromOwnedBindings(bindings) : new KeybindingsManager(bindings);
|
|
175
172
|
// Compatibility: the owned viewport consumes these physical chords before editor actions.
|
|
176
173
|
const display = (action) => keys.getKeys(action)
|
|
@@ -183,17 +180,6 @@ export function hotkeysMarkdown(bindings, getShortcuts, profile, residentTabs =
|
|
|
183
180
|
: `\`${label}\``;
|
|
184
181
|
}).join(" / ")} | ${description} |`;
|
|
185
182
|
let markdown = ["**Navigation**", "| Key | Action |", "|-----|--------|", row(["tui.editor.cursorUp", "tui.editor.cursorDown", "tui.editor.cursorLeft", "tui.editor.cursorRight"], "Move cursor / browse history"), row(["tui.editor.cursorWordLeft", "tui.editor.cursorWordRight"], "Move by word"), row(["tui.editor.cursorLineStart"], profile === "a1" ? "Start of prompt line" : "Start of line"), row(["tui.editor.cursorLineEnd"], profile === "a1" ? "End of prompt line" : "End of line"), ...(profile === "a1" ? ["| `Ctrl+Home` | Start of content |", "| `Ctrl+End` | End of content / follow output |"] : []), row(["tui.editor.jumpForward"], "Jump forward to character"), row(["tui.editor.jumpBackward"], "Jump backward to character"), row(["tui.editor.pageUp", "tui.editor.pageDown"], "Scroll by page"), "", "**Editing**", "| Key | Action |", "|-----|--------|", row(["tui.input.submit"], "Send message"), row(["tui.input.newLine"], `New line${process.platform === "win32" ? " (Ctrl+Enter on Windows Terminal)" : ""}`), row(["tui.editor.deleteWordBackward"], "Delete word backwards"), row(["tui.editor.deleteWordForward"], "Delete word forwards"), row(["tui.editor.deleteToLineStart"], "Delete to start of line"), row(["tui.editor.deleteToLineEnd"], "Delete to end of line"), row(["tui.editor.yank"], "Paste the most-recently-deleted text"), row(["tui.editor.yankPop"], "Cycle through the deleted text after pasting"), row(["tui.editor.undo"], "Undo"), "", "**Other**", "| Key | Action |", "|-----|--------|", row(["tui.input.tab"], "Path completion / accept autocomplete"), row(["app.interrupt"], "Cancel autocomplete / abort streaming"), row(["app.clear"], "Clear editor (first) / exit (second)"), row(["app.exit"], "Exit (when editor is empty)"), row(["app.suspend"], "Suspend to background"), row(["app.thinking.cycle"], "Cycle thinking level"), row(["app.model.cycleForward", "app.model.cycleBackward"], "Cycle models"), row(["app.model.select"], profile === "a1" ? "Open the Models dialog" : "Open model selector"), row(["app.tools.expand"], "Toggle tool output expansion"), row(["app.thinking.toggle"], "Toggle thinking block visibility"), row(["app.editor.external"], "Edit message in external editor"), row(["app.message.copy"], "Copy selection or last assistant message"), row(["app.message.followUp"], "Queue follow-up message"), row(["app.message.dequeue"], "Restore queued messages"), row(["app.clipboard.pasteImage"], profile === "a1" ? "Paste image or text from clipboard" : "Paste files on macOS, images, or text from clipboard"), "| `/` | Slash commands |", "| `!` | Run bash command |", "| `!!` | Run bash command (excluded from context) |", ...(profile === "a1" ? ["", "**Models dialog**", "| Key | Action |", "|-----|--------|", "| `Space` | Toggle the selected model in the cycling scope |", "| `Tab` | Switch the all/scoped filter |", row(["app.models.save"], "Save the scope to settings"), row(["app.models.enableAll"], "Scope every listed model"), row(["app.models.clearAll"], "Clear the listed models from the scope"), row(["app.models.toggleProvider"], "Toggle the selected model's provider"), row(["app.models.reorderUp", "app.models.reorderDown"], "Reorder the cycling scope")] : [])].join("\n");
|
|
186
|
-
if (profile === "a1" && residentTabs) {
|
|
187
|
-
// Invariant: the Tabs section shows the same projection the resident shell dispatches: the
|
|
188
|
-
// effective A1 declarations keep their keys and earlier tab declarations keep duplicates.
|
|
189
|
-
const projection = projectResidentTabShortcuts({ configured: bindings, reserved: keys.getEffectiveConfig() });
|
|
190
|
-
markdown += "\n\n**Tabs**\n| Key | Action |\n|-----|--------|\n";
|
|
191
|
-
markdown += RESIDENT_TAB_GLOBAL_SHORTCUTS.map(shortcut => {
|
|
192
|
-
const assigned = projection.assignments[shortcut.id];
|
|
193
|
-
const label = assigned === null ? "Unbound" : `\`${shortcutDisplay(assigned)}\``;
|
|
194
|
-
return `| ${label} | ${shortcut.description} |`;
|
|
195
|
-
}).join("\n");
|
|
196
|
-
}
|
|
197
183
|
const shortcuts = getShortcuts(bindings ?? keys.getEffectiveConfig());
|
|
198
184
|
if (shortcuts.length > 0) {
|
|
199
185
|
markdown += "\n\n**Extensions**\n| Key | Action |\n|-----|--------|\n";
|
|
@@ -2,7 +2,7 @@ import { AssistantMessageComponent } from "../startup-public.js";
|
|
|
2
2
|
import { type MermaidRenderingMode } from "./upstream/components/mermaid.js";
|
|
3
3
|
import type { OwnedUiTranscriptBlock } from "../../../contracts/owned-ui/index.js";
|
|
4
4
|
import { type PiShellSubmittedPromptComposer } from "./submitted-prompt-adapter.js";
|
|
5
|
-
export { isPiPromptStyleCompaction,
|
|
5
|
+
export { isPiPromptStyleCompaction, type PiShellSubmittedPromptComposer } from "./submitted-prompt-adapter.js";
|
|
6
6
|
import { type PiShellExtensionRendererResolver, type PiShellImageAssetResolver, type PiShellTranscriptComponentPort } from "./shell-shared-facade.js";
|
|
7
7
|
export declare function createPiShellTranscriptComponent(initial: OwnedUiTranscriptBlock, cwd: string, extensions?: PiShellExtensionRendererResolver, submittedPrompt?: PiShellSubmittedPromptComposer, initialOutputPad?: 0 | 1, initialHideThinkingBlock?: boolean, initialMermaidRenderingMode?: MermaidRenderingMode, initialShowImages?: boolean, initialImageWidthCells?: number, imageAssets?: PiShellImageAssetResolver, presentation?: {
|
|
8
8
|
readonly getColumns: () => number;
|
|
@@ -6,7 +6,7 @@ import { createTranscriptImageResolver } from "./transcript-image-resolver.js";
|
|
|
6
6
|
import { createMermaidMarkdownTransformer } from "./upstream/components/mermaid.js";
|
|
7
7
|
import { Container, getCapabilities, Image, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
8
8
|
import { createPiSubmittedPromptComponent, isPiPromptStyleCompaction, } from "./submitted-prompt-adapter.js";
|
|
9
|
-
export { isPiPromptStyleCompaction
|
|
9
|
+
export { isPiPromptStyleCompaction } from "./submitted-prompt-adapter.js";
|
|
10
10
|
import { getPiMarkdownTheme, PINNED_PI_LAYOUT, piTheme, } from "./theme.js";
|
|
11
11
|
import { createTuiFacade, ensureTheme, isRecord, } from "./shell-shared-facade.js";
|
|
12
12
|
export function createPiShellTranscriptComponent(initial, cwd, extensions, submittedPrompt, initialOutputPad = PINNED_PI_LAYOUT.outputPad, initialHideThinkingBlock = false, initialMermaidRenderingMode = "off", initialShowImages = true, initialImageWidthCells = 80, imageAssets, presentation) {
|
|
@@ -174,8 +174,6 @@ export interface PiShellEditorOptions {
|
|
|
174
174
|
readonly historyEditor?: HistoryEditorConstructor;
|
|
175
175
|
/** Bare A1 adds ergonomic aliases while comparison profiles retain Pi defaults. */
|
|
176
176
|
readonly keybindingProfile?: "pi" | "a1";
|
|
177
|
-
/** Resident Agents expose Settings and the changelog as utility tabs instead of slash commands. */
|
|
178
|
-
readonly hideUtilityTabCommands?: boolean;
|
|
179
177
|
/** The process's shared keybindings; its profile must match `keybindingProfile`. */
|
|
180
178
|
readonly keybindings?: PiKeybindingsHost;
|
|
181
179
|
readonly getColumns: () => number;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { type Component } from "@earendil-works/pi-tui";
|
|
2
2
|
import type { OwnedUiTranscriptBlock } from "../../../contracts/owned-ui/index.js";
|
|
3
3
|
export interface PiShellSubmittedPromptComposer {
|
|
4
|
-
readonly layout: (width: number
|
|
4
|
+
readonly layout: (width: number) => {
|
|
5
5
|
readonly contentWidth: number;
|
|
6
6
|
};
|
|
7
|
-
readonly compose: (contentRows: readonly string[], width: number,
|
|
7
|
+
readonly compose: (contentRows: readonly string[], width: number, style?: {
|
|
8
8
|
readonly prefix?: (text: string) => string;
|
|
9
|
-
readonly timestamp?: (text: string) => string;
|
|
10
9
|
}) => readonly string[];
|
|
11
10
|
}
|
|
12
11
|
/** Branch summaries share the block kind but do not participate in prompt navigation. */
|
|
13
12
|
export declare function isPiPromptStyleCompaction(block: OwnedUiTranscriptBlock): boolean;
|
|
14
|
-
/** Keep prompt timestamps metadata-grey even inside hover and quiet whole-row wrappers. */
|
|
15
|
-
export declare function paintPiSubmittedPromptTimestamp(text: string): string;
|
|
16
13
|
/** Pi owns Markdown and theme adaptation; the injected composer owns neutral row geometry. */
|
|
17
14
|
export declare function createPiSubmittedPromptComponent(block: OwnedUiTranscriptBlock, composer: PiShellSubmittedPromptComposer, heading?: string): Component;
|
|
@@ -7,15 +7,8 @@ export function isPiPromptStyleCompaction(block) {
|
|
|
7
7
|
&& typeof block.payload === "object" && block.payload !== null
|
|
8
8
|
&& block.payload.role === "compactionSummary";
|
|
9
9
|
}
|
|
10
|
-
/** Keep prompt timestamps metadata-grey even inside hover and quiet whole-row wrappers. */
|
|
11
|
-
export function paintPiSubmittedPromptTimestamp(text) {
|
|
12
|
-
// Protocol: combine the intensity/foreground reset so quietSticky does not immediately
|
|
13
|
-
// reapply faint; the semantic foreground that follows remains theme-controlled.
|
|
14
|
-
return `\u001b[22;39m${piTheme().fg("dim", text)}`;
|
|
15
|
-
}
|
|
16
10
|
/** Pi owns Markdown and theme adaptation; the injected composer owns neutral row geometry. */
|
|
17
11
|
export function createPiSubmittedPromptComponent(block, composer, heading) {
|
|
18
|
-
const timestamp = numericTimestamp(block);
|
|
19
12
|
// Invariant: presentation-only chrome stays outside the summary's Markdown parser and stored text.
|
|
20
13
|
const header = heading === undefined ? undefined : new Text(heading, 0, 0);
|
|
21
14
|
let chipWrapping;
|
|
@@ -30,7 +23,7 @@ export function createPiSubmittedPromptComponent(block, composer, heading) {
|
|
|
30
23
|
});
|
|
31
24
|
const content = {
|
|
32
25
|
render(width) {
|
|
33
|
-
const layout = composer.layout(width
|
|
26
|
+
const layout = composer.layout(width);
|
|
34
27
|
const renderedBodyRows = markdown.render(layout.contentWidth);
|
|
35
28
|
const wrapping = chipWrapping;
|
|
36
29
|
const bodyRows = wrapping === undefined ? renderedBodyRows : renderedBodyRows.map(row => wrapping.restore(row));
|
|
@@ -38,9 +31,8 @@ export function createPiSubmittedPromptComponent(block, composer, heading) {
|
|
|
38
31
|
...header.render(layout.contentWidth).map(row => piTheme().fg("userMessageText", row)),
|
|
39
32
|
...(bodyRows.length === 0 ? [] : ["", ...bodyRows]),
|
|
40
33
|
];
|
|
41
|
-
return [...composer.compose(rows, width,
|
|
34
|
+
return [...composer.compose(rows, width, {
|
|
42
35
|
prefix: text => piTheme().fg("muted", text),
|
|
43
|
-
timestamp: paintPiSubmittedPromptTimestamp,
|
|
44
36
|
})];
|
|
45
37
|
},
|
|
46
38
|
invalidate() {
|
|
@@ -52,9 +44,3 @@ export function createPiSubmittedPromptComponent(block, composer, heading) {
|
|
|
52
44
|
box.addChild(content);
|
|
53
45
|
return box;
|
|
54
46
|
}
|
|
55
|
-
function numericTimestamp(block) {
|
|
56
|
-
if (typeof block.payload !== "object" || block.payload === null)
|
|
57
|
-
return null;
|
|
58
|
-
const value = block.payload.timestamp;
|
|
59
|
-
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
60
|
-
}
|
|
@@ -5,8 +5,7 @@ export declare class SessionFooter implements Component {
|
|
|
5
5
|
private readonly cwd;
|
|
6
6
|
private readonly profile;
|
|
7
7
|
private readonly show;
|
|
8
|
-
|
|
9
|
-
constructor(getView: () => OwnedUiSessionViewModel, cwd: string, profile?: "pi" | "a1", show?: () => boolean, showSessionName?: boolean);
|
|
8
|
+
constructor(getView: () => OwnedUiSessionViewModel, cwd: string, profile?: "pi" | "a1", show?: () => boolean);
|
|
10
9
|
invalidate(): void;
|
|
11
10
|
dispose(): void;
|
|
12
11
|
render(width: number): string[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Provenance: @earendil-works/pi-coding-agent 1.5.0 (MIT), commit f9a26365568127461c47a07a37dcb42c140a3ac5,
|
|
3
3
|
* packages/coding-agent/src/modes/interactive/components/footer.ts.
|
|
4
|
-
* Modifications: Owned UI/routing; A1 level color, linked PRs,
|
|
5
|
-
*
|
|
6
|
-
* Deviations: owned-status-level-color, owned-pull-request-badge, owned-
|
|
7
|
-
* owned-footer-
|
|
4
|
+
* Modifications: Owned UI/routing; A1 level color, linked PRs, dim ellipsis and model priority; Pi
|
|
5
|
+
* unchanged.
|
|
6
|
+
* Deviations: owned-status-level-color, owned-pull-request-badge, owned-footer-ellipsis,
|
|
7
|
+
* owned-footer-model-priority.
|
|
8
8
|
*/
|
|
9
9
|
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
10
10
|
import { hyperlink, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
@@ -14,13 +14,11 @@ export class SessionFooter {
|
|
|
14
14
|
cwd;
|
|
15
15
|
profile;
|
|
16
16
|
show;
|
|
17
|
-
|
|
18
|
-
constructor(getView, cwd, profile = "pi", show = () => true, showSessionName = true) {
|
|
17
|
+
constructor(getView, cwd, profile = "pi", show = () => true) {
|
|
19
18
|
this.getView = getView;
|
|
20
19
|
this.cwd = cwd;
|
|
21
20
|
this.profile = profile;
|
|
22
21
|
this.show = show;
|
|
23
|
-
this.showSessionName = showSessionName;
|
|
24
22
|
}
|
|
25
23
|
invalidate() { }
|
|
26
24
|
dispose() { }
|
|
@@ -43,7 +41,7 @@ export class SessionFooter {
|
|
|
43
41
|
const branch = view.status.footer?.branch;
|
|
44
42
|
if (branch)
|
|
45
43
|
pwd = `${pwd} (${branch})`;
|
|
46
|
-
const sessionName =
|
|
44
|
+
const sessionName = view.status.footer?.sessionName;
|
|
47
45
|
const pullRequest = this.profile === "a1" ? view.status.footer?.pullRequest : null;
|
|
48
46
|
let pathRow;
|
|
49
47
|
if (pullRequest == null) {
|
|
@@ -61,7 +61,6 @@ export declare class PiEngineAdapter implements OwnedUiSessionBackend, OwnedUiPr
|
|
|
61
61
|
setWorkflowInteractionHost(interaction: PiWorkflowInteractionHost): void;
|
|
62
62
|
suggestionReasoningPolicy(): OwnedUiPromptSuggestionReasoning;
|
|
63
63
|
generate(request: OwnedUiPromptSuggestionRequest): Promise<OwnedUiPromptSuggestionResult>;
|
|
64
|
-
generateResidentTabName(instruction: string, maxTokens: number, signal: AbortSignal): Promise<string | null>;
|
|
65
64
|
start(): Promise<OwnedUiSessionViewModel>;
|
|
66
65
|
/** Announce pinned Pi's changelog since the profile's last seen version; the host calls this once per process. */
|
|
67
66
|
announceStartupChangelog(): Promise<void>;
|
|
@@ -211,22 +211,10 @@ export class PiEngineAdapter {
|
|
|
211
211
|
#announceReleaseUpdate(release) {
|
|
212
212
|
if (this.#disposed)
|
|
213
213
|
return;
|
|
214
|
-
if (release.status === "client-connected") {
|
|
215
|
-
if (this.#state.diagnosticsState.acknowledgeClientVersion(release.version))
|
|
216
|
-
this.#emitView();
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
214
|
if (release.status === "installed") {
|
|
220
|
-
this.#state.diagnosticsState.clearCodes(["release-update-installed"
|
|
215
|
+
this.#state.diagnosticsState.clearCodes(["release-update-installed"]);
|
|
221
216
|
this.#addDiagnostic("info", "release-update-installed", `Update ${release.version} installed; restart to update.`, true);
|
|
222
217
|
}
|
|
223
|
-
else if (release.status === "blocked") {
|
|
224
|
-
this.#state.diagnosticsState.clearCodes(["release-update-installed", "release-update-blocked"]);
|
|
225
|
-
this.#addDiagnostic("info", "release-update-blocked", `Update ${release.version} prepared; activation blocked.`, true);
|
|
226
|
-
}
|
|
227
|
-
else if (release.status === "blocked-cleared") {
|
|
228
|
-
this.#state.diagnosticsState.clearCodes(["release-update-blocked"]);
|
|
229
|
-
}
|
|
230
218
|
else if (release.status === undefined || release.status === "available") {
|
|
231
219
|
const changelog = release.changelogUrl === null ? "" : `\nChangelog: ${release.changelogUrl}`;
|
|
232
220
|
this.#addDiagnostic("info", "release-update", `New version ${release.version} is available. Run ${release.command}${changelog}`, true);
|
|
@@ -239,9 +227,6 @@ export class PiEngineAdapter {
|
|
|
239
227
|
generate(request) {
|
|
240
228
|
return this.#suggestions.generate(request);
|
|
241
229
|
}
|
|
242
|
-
generateResidentTabName(instruction, maxTokens, signal) {
|
|
243
|
-
return this.#suggestions.completeInstruction(instruction, maxTokens, signal);
|
|
244
|
-
}
|
|
245
230
|
async start() {
|
|
246
231
|
if (this.#engine.started)
|
|
247
232
|
return this.view();
|
|
@@ -6,5 +6,4 @@ export declare class EngineDiagnostics {
|
|
|
6
6
|
get messages(): readonly string[];
|
|
7
7
|
record(severity: OwnedUiDiagnostics["severity"], code: string, message: string, recoverable: boolean): OwnedUiDiagnostics;
|
|
8
8
|
clearCodes(codes: readonly string[]): boolean;
|
|
9
|
-
acknowledgeClientVersion(version: string): boolean;
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { gte, valid as validSemver } from "semver";
|
|
2
1
|
/** Bounded structured notices; acknowledgements never inspect terminal cells or touch Agent work. */
|
|
3
2
|
export class EngineDiagnostics {
|
|
4
3
|
#values = [];
|
|
@@ -18,19 +17,6 @@ export class EngineDiagnostics {
|
|
|
18
17
|
const selected = new Set(codes);
|
|
19
18
|
return this.#remove(diagnostic => selected.has(diagnostic.code));
|
|
20
19
|
}
|
|
21
|
-
acknowledgeClientVersion(version) {
|
|
22
|
-
if (validSemver(version) === null)
|
|
23
|
-
return false;
|
|
24
|
-
return this.#remove(diagnostic => {
|
|
25
|
-
// Invariant: restart readiness describes this long-lived process, not the outer client that
|
|
26
|
-
// attached to it. A newer client can clear activation blocking, but only process exit clears
|
|
27
|
-
// an installed-update notice.
|
|
28
|
-
const target = diagnostic.code === "release-update-blocked"
|
|
29
|
-
? /^Update (\S+) prepared; activation blocked\.$/u.exec(diagnostic.message)?.[1]
|
|
30
|
-
: undefined;
|
|
31
|
-
return target !== undefined && validSemver(target) !== null && gte(version, target);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
20
|
#remove(predicate) {
|
|
35
21
|
const removed = new Set();
|
|
36
22
|
for (let index = this.#values.length - 1; index >= 0; index--) {
|
|
@@ -26,6 +26,5 @@ export declare class PiPromptSuggestions implements OwnedUiPromptSuggestionGener
|
|
|
26
26
|
#private;
|
|
27
27
|
constructor(ports: PiPromptSuggestionPorts);
|
|
28
28
|
reasoningPolicy(): OwnedUiPromptSuggestionReasoning;
|
|
29
|
-
completeInstruction(instruction: string, maxTokens: number, signal: AbortSignal): Promise<string | null>;
|
|
30
29
|
generate(request: OwnedUiPromptSuggestionRequest): Promise<OwnedUiPromptSuggestionResult>;
|
|
31
30
|
}
|
|
@@ -20,46 +20,6 @@ export class PiPromptSuggestions {
|
|
|
20
20
|
// Performance: the run's own level keeps the provider's thinking parameters, and the cached prefix, identical.
|
|
21
21
|
return readSuggestionReasoning(session.thinkingLevel);
|
|
22
22
|
}
|
|
23
|
-
async completeInstruction(instruction, maxTokens, signal) {
|
|
24
|
-
const session = this.#ports.session();
|
|
25
|
-
const runtime = this.#ports.runtime();
|
|
26
|
-
if (this.#ports.unavailable() || session === undefined || runtime === undefined || signal.aborted
|
|
27
|
-
|| session.model === undefined || typeof runtime.services.modelRuntime.completeSimple !== "function")
|
|
28
|
-
return null;
|
|
29
|
-
const agent = session.agent;
|
|
30
|
-
try {
|
|
31
|
-
const transformed = typeof agent.transformContext === "function"
|
|
32
|
-
? await agent.transformContext(agent.state.messages, signal)
|
|
33
|
-
: agent.state.messages;
|
|
34
|
-
const messages = typeof agent.convertToLlm === "function"
|
|
35
|
-
? await agent.convertToLlm(transformed)
|
|
36
|
-
: transformed.filter(message => message.role === "user" || message.role === "assistant" || message.role === "toolResult");
|
|
37
|
-
const response = await runtime.services.modelRuntime.completeSimple(session.model, {
|
|
38
|
-
systemPrompt: agent.state.systemPrompt,
|
|
39
|
-
messages: [...messages, { role: "user", content: instruction, timestamp: Date.now() }],
|
|
40
|
-
tools: [],
|
|
41
|
-
}, {
|
|
42
|
-
signal,
|
|
43
|
-
maxTokens,
|
|
44
|
-
...(agent.sessionId === undefined ? {} : { sessionId: agent.sessionId }),
|
|
45
|
-
...(agent.transport === undefined ? {} : { transport: agent.transport }),
|
|
46
|
-
...(agent.onPayload === undefined ? {} : { onPayload: agent.onPayload }),
|
|
47
|
-
});
|
|
48
|
-
if (signal.aborted || !isRecord(response) || response.stopReason === "aborted"
|
|
49
|
-
|| response.stopReason === "error" || response.stopReason === "length"
|
|
50
|
-
|| stringValue(response.errorMessage) !== undefined)
|
|
51
|
-
return null;
|
|
52
|
-
const content = Array.isArray(response.content) ? response.content : [];
|
|
53
|
-
if (content.some(block => isRecord(block) && block.type === "toolCall"))
|
|
54
|
-
return null;
|
|
55
|
-
const text = content.filter(block => isRecord(block) && block.type === "text")
|
|
56
|
-
.map(block => stringValue(block.text) ?? "").join("\n").trim();
|
|
57
|
-
return text || null;
|
|
58
|
-
}
|
|
59
|
-
catch {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
23
|
async generate(request) {
|
|
64
24
|
assertOwnedUiPromptSuggestionRequest(request);
|
|
65
25
|
const identity = request.identity;
|
|
@@ -2,7 +2,6 @@ import { execFile } from "node:child_process";
|
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import { PRODUCT_IDENTITY } from "../../../product-identity.js";
|
|
5
|
-
import { residentProgressObserver } from "../../../foundation/resident-tabs/progress-observation.js";
|
|
6
5
|
import { observeCompactionProgress } from "./compaction-progress.js";
|
|
7
6
|
import { createPiRuntimeIntegration } from "./runtime-integration.js";
|
|
8
7
|
import { PiSessionCommandIntegration } from "./session-integration.js";
|
|
@@ -372,7 +371,6 @@ export class PiEngineRuntime {
|
|
|
372
371
|
this.#unsubscribe = session.subscribe(event => {
|
|
373
372
|
if (generation !== this.#sessionGeneration || this.#ports.disposed())
|
|
374
373
|
return;
|
|
375
|
-
residentProgressObserver()?.engineDelivery(event);
|
|
376
374
|
this.#ports.event(event);
|
|
377
375
|
});
|
|
378
376
|
}
|
|
@@ -599,7 +599,7 @@ export class PiWorkflowRunner {
|
|
|
599
599
|
}
|
|
600
600
|
/**
|
|
601
601
|
* The name the session normalized the request to, or the request when it reports none. `/name`
|
|
602
|
-
* publishes a view right after setting it, so
|
|
602
|
+
* publishes a view right after setting it, so the footer shows the new name at once.
|
|
603
603
|
*/
|
|
604
604
|
function sessionNameOr(normalized, requested) {
|
|
605
605
|
return typeof normalized === "string" ? normalized : requested;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ProgramStatus, type WheelScrollLines } from "@earendil-works/pi-tui";
|
|
2
2
|
import type { PiTuiComponentPort, PiTuiInputListener, PiTuiOverlayHandle, PiTuiOverlayOptions, PiTuiPreInputListener, PiTuiRuntimeAdapterOptions, PiTuiRuntimeState, PiTuiScrollState, PiTuiStopOptions, PiTuiViewport } from "./contracts.js";
|
|
3
3
|
/**
|
|
4
|
-
* Re-encodes one key report decoded by pi-tui in the legacy form, so a kitty-keyboard
|
|
5
|
-
*
|
|
4
|
+
* Re-encodes one key report decoded by pi-tui in the legacy form, so a kitty-keyboard terminal
|
|
5
|
+
* and a legacy terminal produce the same owned-screen action. Releases decode
|
|
6
6
|
* to nothing; mouse reports, paste, and unknown sequences pass through unchanged.
|
|
7
7
|
*/
|
|
8
8
|
export declare function legacyKeyInput(data: string): string;
|
|
@@ -12,8 +12,8 @@ const LEGACY_KEY_BYTES = {
|
|
|
12
12
|
space: " ", "ctrl+c": "\u0003", "ctrl+z": "\u001a",
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* Re-encodes one key report decoded by pi-tui in the legacy form, so a kitty-keyboard
|
|
16
|
-
*
|
|
15
|
+
* Re-encodes one key report decoded by pi-tui in the legacy form, so a kitty-keyboard terminal
|
|
16
|
+
* and a legacy terminal produce the same owned-screen action. Releases decode
|
|
17
17
|
* to nothing; mouse reports, paste, and unknown sequences pass through unchanged.
|
|
18
18
|
*/
|
|
19
19
|
export function legacyKeyInput(data) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
declare const ENVIRONMENT_KEYS: readonly ["clipboardDiagnostics", "configDir", "dataDir", "
|
|
1
|
+
declare const ENVIRONMENT_KEYS: readonly ["clipboardDiagnostics", "configDir", "dataDir", "developmentHistoryDataDir", "developmentInstanceId", "developmentRoot", "exitNoticePath", "prFooterPreview", "profileHome", "runtimeDir", "sessionRuntimeId", "skipVersionCheck", "startupTrace", "suggestionDiagnostics"];
|
|
2
2
|
declare const FILESYSTEM_KEYS: readonly ["slug", "windowsDirectory", "unixDirectory", "temporaryPrefix"];
|
|
3
3
|
declare const STATE_KEYS: readonly ["windowsControlDirectory", "unixControlDirectory", "developmentDirectory", "piAgentProfile", "piVanillaProfile", "sessionRepositoryDirectory", "sessionWorktreeClaimDirectory"];
|
|
4
|
-
declare const ENDPOINT_KEYS: readonly ["windowsPipeStem", "unixSocketFilename", "metadataFilename", "supervisorLogFilename", "databaseFilename"];
|
|
5
4
|
declare const MANIFEST_KEYS: readonly ["releaseFilename", "packageFilename"];
|
|
6
|
-
declare const PROTOCOL_KEYS: readonly ["namespace", "
|
|
7
|
-
declare const EVIDENCE_KEYS: readonly ["
|
|
8
|
-
declare const ARTIFACT_KEYS: readonly ["cliEntry", "
|
|
5
|
+
declare const PROTOCOL_KEYS: readonly ["namespace", "promptHistorySchema", "releaseCohortSchema", "updateJournalSchema"];
|
|
6
|
+
declare const EVIDENCE_KEYS: readonly ["stableReleaseSchema", "previewReleaseSchema", "releaseCertificationSchema", "previewPlatformVerdictSchema", "piSourceLedgerSchema", "piComponentParitySchema", "piEventFrameParitySchema", "startupTraceSchema", "dependencyLayerSchema", "dependencyLayerCertificationSchema", "runtimePayloadSchema"];
|
|
7
|
+
declare const ARTIFACT_KEYS: readonly ["cliEntry", "uiEntry", "releaseTarballStem", "diagnosticStem"];
|
|
9
8
|
type StringRecord<Keys extends readonly string[]> = {
|
|
10
9
|
readonly [Key in Keys[number]]: string;
|
|
11
10
|
};
|
|
@@ -17,7 +16,6 @@ export interface ProductIdentity {
|
|
|
17
16
|
readonly filesystem: StringRecord<typeof FILESYSTEM_KEYS>;
|
|
18
17
|
readonly environment: StringRecord<typeof ENVIRONMENT_KEYS>;
|
|
19
18
|
readonly state: StringRecord<typeof STATE_KEYS>;
|
|
20
|
-
readonly endpoint: StringRecord<typeof ENDPOINT_KEYS>;
|
|
21
19
|
readonly manifest: StringRecord<typeof MANIFEST_KEYS>;
|
|
22
20
|
readonly protocol: StringRecord<typeof PROTOCOL_KEYS>;
|
|
23
21
|
readonly evidence: StringRecord<typeof EVIDENCE_KEYS>;
|