@zergai/ztc 0.19.0-beta.1 → 0.20.0-beta.1
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 +222 -6
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +2 -2
- package/dist/agent/agent.d.ts +17 -0
- package/dist/agent/agent.js +77 -4
- package/dist/agent/backends/index.js +5 -3
- package/dist/agent/backends/zrouter_stream.js +8 -4
- package/dist/agent/commands/goal.d.ts +2 -0
- package/dist/agent/commands/goal.js +7 -2
- package/dist/agent/factory.d.ts +2 -0
- package/dist/agent/factory.js +1 -0
- package/dist/agent/request_encoder.d.ts +2 -1
- package/dist/agent/request_encoder.js +4 -3
- package/dist/agent/runtime/policy.d.ts +1 -0
- package/dist/agent/runtime/policy.js +23 -3
- package/dist/agent/runtime/tool_runtime.js +13 -12
- package/dist/agent/subagent.js +2 -1
- package/dist/agent/tools/ask_user.d.ts +1 -1
- package/dist/agent/tools/ask_user.js +15 -8
- package/dist/agent/tools/pane.d.ts +6 -0
- package/dist/agent/tools/pane.js +18 -4
- package/dist/agent/tools/search.js +1 -1
- package/dist/agent/tools/sim_domain_tools.d.ts +4 -0
- package/dist/agent/tools/sim_domain_tools.js +28 -2
- package/dist/agent/tools/types.d.ts +3 -0
- package/dist/app/correlated_turn.d.ts +14 -0
- package/dist/app/correlated_turn.js +78 -0
- package/dist/app/prompt_turn.d.ts +2 -1
- package/dist/app/prompt_turn.js +15 -2
- package/dist/app/session_manager.d.ts +17 -11
- package/dist/app/session_manager.js +74 -30
- package/dist/app/tool_callbacks.d.ts +1 -1
- package/dist/app/workspace_layout_controller.d.ts +21 -2
- package/dist/app/workspace_layout_controller.js +61 -10
- package/dist/app/workspace_monitor.js +67 -7
- package/dist/app/workspace_presets.d.ts +1 -0
- package/dist/app/workspace_presets.js +2 -2
- package/dist/cli.js +6 -2
- package/dist/cli_args.js +1 -0
- package/dist/cli_main.js +48 -2
- package/dist/cli_ratatui.d.ts +56 -8
- package/dist/cli_ratatui.js +689 -109
- package/dist/config/permissions.js +1 -1
- package/dist/config/router_required.d.ts +11 -0
- package/dist/config/router_required.js +23 -0
- package/dist/config/types.d.ts +5 -0
- package/dist/config.d.ts +3 -1
- package/dist/config.js +66 -49
- package/dist/desktop/daily/broker.d.ts +26 -0
- package/dist/desktop/daily/broker.js +140 -0
- package/dist/desktop/daily/codex_config.d.ts +2 -0
- package/dist/desktop/daily/codex_config.js +119 -0
- package/dist/desktop/daily/codex_exec_adapter.d.ts +42 -0
- package/dist/desktop/daily/codex_exec_adapter.js +251 -0
- package/dist/desktop/daily/control_client.d.ts +4 -0
- package/dist/desktop/daily/control_client.js +214 -0
- package/dist/desktop/daily/control_credentials.d.ts +15 -0
- package/dist/desktop/daily/control_credentials.js +85 -0
- package/dist/desktop/daily/control_hello.d.ts +10 -0
- package/dist/desktop/daily/control_hello.js +6 -0
- package/dist/desktop/daily/control_protocol.d.ts +39 -0
- package/dist/desktop/daily/control_protocol.js +4 -0
- package/dist/desktop/daily/control_schema.d.ts +9 -0
- package/dist/desktop/daily/control_schema.js +25 -0
- package/dist/desktop/daily/control_server.d.ts +44 -0
- package/dist/desktop/daily/control_server.js +286 -0
- package/dist/desktop/daily/daily_store.d.ts +71 -0
- package/dist/desktop/daily/daily_store.js +290 -0
- package/dist/desktop/daily/delegated_ztc_contract.d.ts +37 -0
- package/dist/desktop/daily/delegated_ztc_contract.js +90 -0
- package/dist/desktop/daily/desktop_wiring.d.ts +112 -0
- package/dist/desktop/daily/desktop_wiring.js +1048 -0
- package/dist/desktop/daily/enrollment.d.ts +74 -0
- package/dist/desktop/daily/enrollment.js +77 -0
- package/dist/desktop/daily/file_facts.d.ts +2 -0
- package/dist/desktop/daily/file_facts.js +41 -0
- package/dist/desktop/daily/lease.d.ts +57 -0
- package/dist/desktop/daily/lease.js +332 -0
- package/dist/desktop/daily/legacy_codex_homes.d.ts +1 -0
- package/dist/desktop/daily/legacy_codex_homes.js +26 -0
- package/dist/desktop/daily/native_pane_launcher.d.ts +31 -0
- package/dist/desktop/daily/native_pane_launcher.js +226 -0
- package/dist/desktop/daily/native_records.d.ts +13 -0
- package/dist/desktop/daily/native_records.js +81 -0
- package/dist/desktop/daily/native_status.d.ts +4 -0
- package/dist/desktop/daily/native_status.js +28 -0
- package/dist/desktop/daily/native_tool.d.ts +134 -0
- package/dist/desktop/daily/native_tool.js +91 -0
- package/dist/desktop/daily/owner_files.d.ts +3 -0
- package/dist/desktop/daily/owner_files.js +88 -0
- package/dist/desktop/daily/owner_seals.d.ts +9 -0
- package/dist/desktop/daily/owner_seals.js +56 -0
- package/dist/desktop/daily/process_identity.d.ts +13 -0
- package/dist/desktop/daily/process_identity.js +137 -0
- package/dist/desktop/daily/profile_bootstrap.d.ts +60 -0
- package/dist/desktop/daily/profile_bootstrap.js +194 -0
- package/dist/desktop/daily/raw_receipts.d.ts +1 -0
- package/dist/desktop/daily/raw_receipts.js +18 -0
- package/dist/desktop/daily/recipes.d.ts +36 -0
- package/dist/desktop/daily/recipes.js +177 -0
- package/dist/desktop/daily/router_state.d.ts +33 -0
- package/dist/desktop/daily/router_state.js +39 -0
- package/dist/desktop/daily/schema_registry.d.ts +19 -0
- package/dist/desktop/daily/schema_registry.js +71 -0
- package/dist/desktop/daily/source_baseline.d.ts +13 -0
- package/dist/desktop/daily/source_baseline.js +44 -0
- package/dist/desktop/daily/status_restore.d.ts +9 -0
- package/dist/desktop/daily/status_restore.js +114 -0
- package/dist/desktop/daily/summary.d.ts +59 -0
- package/dist/desktop/daily/summary.js +75 -0
- package/dist/desktop/daily/worker_provenance.d.ts +2 -0
- package/dist/desktop/daily/worker_provenance.js +18 -0
- package/dist/desktop/daily/worker_stop.d.ts +2 -0
- package/dist/desktop/daily/worker_stop.js +26 -0
- package/dist/desktop/daily/ztc_headless_adapter.d.ts +40 -0
- package/dist/desktop/daily/ztc_headless_adapter.js +194 -0
- package/dist/domain.d.ts +1 -1
- package/dist/domain.js +1 -1
- package/dist/events.d.ts +23 -1
- package/dist/headless.d.ts +9 -0
- package/dist/headless.js +161 -26
- package/dist/headless_approval.d.ts +29 -0
- package/dist/headless_approval.js +69 -0
- package/dist/headless_cli.js +2 -0
- package/dist/headless_cli_args.d.ts +4 -0
- package/dist/headless_cli_args.js +5 -0
- package/dist/library.d.ts +20 -0
- package/dist/library.js +66 -12
- package/dist/mcp/client.d.ts +16 -1
- package/dist/mcp/client.js +11 -5
- package/dist/mcp/registry.d.ts +3 -1
- package/dist/mcp/registry.js +10 -1
- package/dist/panes/pane_registry.js +14 -3
- package/dist/panes/types.d.ts +7 -1
- package/dist/panes/ztc_launch.d.ts +5 -0
- package/dist/panes/ztc_launch.js +30 -14
- package/dist/session.d.ts +6 -3
- package/dist/session.js +21 -2
- package/dist/simulation/domain_types.d.ts +2 -0
- package/dist/simulation/domains/loader.d.ts +7 -1
- package/dist/simulation/domains/loader.js +33 -1
- package/dist/simulation/living/context.d.ts +19 -19
- package/dist/simulation/living/definition.d.ts +2 -2
- package/dist/simulation/living/frame.d.ts +1 -1
- package/dist/simulation/living/open-world.d.ts +3 -3
- package/dist/simulation/living/types.d.ts +24 -24
- package/dist/simulation/toolkit/dynamic_state.d.ts +1 -1
- package/dist/skills/bundled/init-context/SKILL.md +16 -0
- package/dist/skills/registry.js +7 -3
- package/dist/tools.d.ts +6 -0
- package/dist/tools.js +14 -0
- package/dist/types.d.ts +30 -0
- package/dist/ui/ratatui/mux_persistence.d.ts +3 -1
- package/dist/ui/ratatui/mux_persistence.js +9 -2
- package/dist/ui/ratatui/pane_credential_broker.d.ts +8 -4
- package/dist/ui/ratatui/pane_credential_broker.js +26 -11
- package/dist/ui/ratatui/pane_relay.d.ts +2 -0
- package/dist/ui/ratatui/process.d.ts +6 -0
- package/dist/ui/ratatui/process.js +104 -6
- package/dist/ui/ratatui/protocol.d.ts +13 -0
- package/dist/ui/ratatui/protocol.js +1 -0
- package/dist/utils/compaction.js +6 -4
- package/dist/utils/subprocess_env.js +2 -0
- package/dist/web/browser_events.d.ts +10 -0
- package/dist/web/browser_events.js +9 -0
- package/dist/web/mirror_stream.d.ts +17 -5
- package/dist/web/mirror_stream.js +105 -13
- package/dist/web/pane_credentials.d.ts +6 -3
- package/dist/web/pane_credentials.js +20 -12
- package/dist/web/pane_registry.js +1 -0
- package/dist/workspace_agent.d.ts +2 -1
- package/dist/workspace_agent.js +7 -1
- package/dist/workspace_collision.d.ts +3 -0
- package/dist/workspace_collision.js +1 -1
- package/dist/workspace_layout.d.ts +3 -2
- package/dist/workspace_layout.js +8 -2
- package/dist/workspace_runtime.d.ts +7 -1
- package/dist/workspace_runtime.js +3 -3
- package/dist/zerg/manifest_builder_tools.js +35 -4
- package/dist/zerg/manifest_validator.js +55 -0
- package/dist/zlm-embed.mjs +261 -116
- package/node_modules/@zerg/model-contracts/README.md +19 -0
- package/node_modules/@zerg/model-contracts/index.js +19 -1
- package/node_modules/@ztc/sim-graph/dist/index.d.ts +1 -0
- package/node_modules/@ztc/sim-graph/dist/index.js +1 -0
- package/node_modules/@ztc/sim-graph/dist/sim_graph.d.ts +351 -0
- package/node_modules/@ztc/sim-graph/dist/sim_graph.js +795 -0
- package/node_modules/@ztc/sim-graph/package.json +37 -0
- package/node_modules/@ztc/sim-graph/src/index.ts +1 -0
- package/node_modules/@ztc/sim-graph/src/sim_graph.ts +1305 -0
- package/package.json +25 -24
- package/packages/model-contracts/README.md +19 -0
- package/packages/model-contracts/index.js +19 -1
package/dist/cli_main.js
CHANGED
|
@@ -34,12 +34,32 @@ import { validateProfileName } from './config/profiles.js';
|
|
|
34
34
|
import { loadDesktopRuntime } from './desktop/runtime.js';
|
|
35
35
|
import { resolveOwnedCliLaunch } from './desktop/cli_launch.js';
|
|
36
36
|
import { consumePaneCredentialHandoff } from './web/pane_credentials.js';
|
|
37
|
+
import { consumeDesktopCredentialHandoff } from './desktop/daily/control_credentials.js';
|
|
37
38
|
// A ZTC pane is handed its mirror credential in a one-time file its command line names: take it, and the flag, before
|
|
38
39
|
// anything reads the arguments, and keep it out of the environment every program this ZTC starts inherits (see
|
|
39
40
|
// pane_credentials.ts).
|
|
40
41
|
consumePaneCredentialHandoff();
|
|
42
|
+
consumeDesktopCredentialHandoff();
|
|
41
43
|
// Information-only flags remain available to diagnose an incompatible bundle.
|
|
42
44
|
const args = process.argv.slice(2);
|
|
45
|
+
const headlessClosedExtensions = args.includes('--closed-extensions');
|
|
46
|
+
const headlessNoAutoAccept = args.includes('--no-auto-accept');
|
|
47
|
+
const policyHashIndex = args.indexOf('--policy-hash');
|
|
48
|
+
const headlessPolicyHash = policyHashIndex < 0 ? undefined : args[policyHashIndex + 1];
|
|
49
|
+
if (policyHashIndex >= 0) {
|
|
50
|
+
if (!headlessPolicyHash || !/^[a-f0-9]{64}$/.test(headlessPolicyHash)) {
|
|
51
|
+
console.error('Error: --policy-hash requires a sha256 digest');
|
|
52
|
+
process.exit(2);
|
|
53
|
+
}
|
|
54
|
+
args.splice(policyHashIndex, 2);
|
|
55
|
+
}
|
|
56
|
+
for (const flag of ['--no-auto-accept', '--closed-extensions']) {
|
|
57
|
+
let index;
|
|
58
|
+
while ((index = args.indexOf(flag)) >= 0)
|
|
59
|
+
args.splice(index, 1);
|
|
60
|
+
}
|
|
61
|
+
if (headlessClosedExtensions)
|
|
62
|
+
process.env.ZTC_CLOSED_EXTENSIONS = '1';
|
|
43
63
|
let desktopRuntime = null;
|
|
44
64
|
try {
|
|
45
65
|
if (!args.some(arg => ['--help', '-h', '--version', '-v'].includes(arg)))
|
|
@@ -76,6 +96,10 @@ catch (error) {
|
|
|
76
96
|
const commandArgs = profileFlags.length === 0
|
|
77
97
|
? args
|
|
78
98
|
: args.filter((_, index) => index !== profileFlags[0] && index !== profileFlags[0] + 1);
|
|
99
|
+
if (commandArgs[0] === 'desktop') {
|
|
100
|
+
const { runDesktopCommand } = await import('./desktop/daily/control_client.js');
|
|
101
|
+
process.exit(await runDesktopCommand(process.argv.slice(process.argv.indexOf('desktop') + 1)));
|
|
102
|
+
}
|
|
79
103
|
// Attachment owns its terminal and transport; do not initialize a local agent.
|
|
80
104
|
if (commandArgs[0] === 'attach') {
|
|
81
105
|
const { runTerminalAttachCli } = await import('./terminal_attach.js');
|
|
@@ -285,6 +309,14 @@ Usage: ztc [options] [prompt]
|
|
|
285
309
|
ztc auth <login|cancel|status|readiness|billing|logout>
|
|
286
310
|
ztc inbox list|show <req-ID>|receive --file <request.json> [--json]
|
|
287
311
|
ztc config reset [--profile <name>]
|
|
312
|
+
|
|
313
|
+
Desktop control:
|
|
314
|
+
ztc desktop open --tool codex|ztc --mode delegated --worktree new|<path> --task-file <file> --schema fixture-count-v1
|
|
315
|
+
ztc desktop list
|
|
316
|
+
ztc desktop summary <paneId>
|
|
317
|
+
ztc desktop stop <paneId>
|
|
318
|
+
ztc desktop resume <paneId> [--task-file <file>]
|
|
319
|
+
ztc desktop close <paneId>
|
|
288
320
|
ztc resume [id]
|
|
289
321
|
ztc --branch <workspace-name> [options]
|
|
290
322
|
|
|
@@ -367,6 +399,10 @@ Options:
|
|
|
367
399
|
|
|
368
400
|
Headless Mode (for automation/CI):
|
|
369
401
|
--headless Run without TUI, read from stdin, output to stdout
|
|
402
|
+
--no-auto-accept Deny approvals and questions without an approval broker
|
|
403
|
+
--closed-extensions Disable MCP, plugins, executable hooks and workflows
|
|
404
|
+
--policy-hash <sha256> Verify the effective policy before inference; require valid config
|
|
405
|
+
--approval-url <url> Send headless approvals and questions to a remote service
|
|
370
406
|
--no-pin-task-header Keep hosted turns as conversation history
|
|
371
407
|
--json Use JSON protocol for input/output (with --headless)
|
|
372
408
|
--prompt <text> Run a single prompt and exit (with --headless)
|
|
@@ -664,6 +700,8 @@ if (headlessMode && resumePickerRequested) {
|
|
|
664
700
|
resumeSessionId = 'most-recent';
|
|
665
701
|
}
|
|
666
702
|
const headlessJson = args.includes('--json');
|
|
703
|
+
const approvalUrlIndex = args.indexOf('--approval-url');
|
|
704
|
+
const headlessApprovalUrl = approvalUrlIndex >= 0 ? args[approvalUrlIndex + 1] : process.env.ZTC_APPROVAL_URL;
|
|
667
705
|
const headlessJsonStream = args.includes('--json-stream');
|
|
668
706
|
const headlessPrompt = invocationPrompt ?? null;
|
|
669
707
|
let explicitSessionId = null;
|
|
@@ -1061,7 +1099,7 @@ async function main() {
|
|
|
1061
1099
|
// Raw (pre-load) config read, same as the historical module-scope read; the
|
|
1062
1100
|
// --max-iterations flag parsed at module scope wins over the config value.
|
|
1063
1101
|
const headlessMaxIterations = headlessMaxIterationsFlag !== undefined ? headlessMaxIterationsFlag : configStore.get().maxIterations;
|
|
1064
|
-
await configStore.load(true);
|
|
1102
|
+
await configStore.load(true, { strictConfig: headlessPolicyHash !== undefined });
|
|
1065
1103
|
debugLog('[main] Config loaded');
|
|
1066
1104
|
// A retired Claude Code route in the launch flags (scripts, launchers and
|
|
1067
1105
|
// child panes from older sessions still pass it) never becomes an override:
|
|
@@ -1328,6 +1366,10 @@ async function main() {
|
|
|
1328
1366
|
prefetchStartupGitSnapshot(process.cwd());
|
|
1329
1367
|
const { runHeadless } = await import('./headless.js');
|
|
1330
1368
|
await runHeadless({
|
|
1369
|
+
approvalUrl: headlessApprovalUrl,
|
|
1370
|
+
autoAccept: headlessNoAutoAccept ? false : undefined,
|
|
1371
|
+
closedExtensions: headlessClosedExtensions,
|
|
1372
|
+
policyHash: headlessPolicyHash,
|
|
1331
1373
|
detachEnvironment: args.includes('--detach-environment'),
|
|
1332
1374
|
mode: zlickyMode ? 'zlicky' : (startInPlanMode ? undefined : (modePathArg || undefined)),
|
|
1333
1375
|
planMode: startInPlanMode,
|
|
@@ -1362,6 +1404,10 @@ async function main() {
|
|
|
1362
1404
|
debugLog(`[main] Running as headless child pane (ZTC_PANE_ID=${process.env.ZTC_PANE_ID})`);
|
|
1363
1405
|
const { runHeadless } = await import('./headless.js');
|
|
1364
1406
|
await runHeadless({
|
|
1407
|
+
approvalUrl: headlessApprovalUrl,
|
|
1408
|
+
autoAccept: headlessNoAutoAccept ? false : undefined,
|
|
1409
|
+
closedExtensions: headlessClosedExtensions,
|
|
1410
|
+
policyHash: headlessPolicyHash,
|
|
1365
1411
|
detachEnvironment: args.includes('--detach-environment'),
|
|
1366
1412
|
mode: zlickyMode ? 'zlicky' : (startInPlanMode ? undefined : (modePathArg || undefined)),
|
|
1367
1413
|
planMode: startInPlanMode,
|
|
@@ -1686,7 +1732,7 @@ async function main() {
|
|
|
1686
1732
|
return;
|
|
1687
1733
|
cleanupRan = true;
|
|
1688
1734
|
try {
|
|
1689
|
-
await app.
|
|
1735
|
+
await app.emergencyExit();
|
|
1690
1736
|
}
|
|
1691
1737
|
catch { /* best effort */ }
|
|
1692
1738
|
process.exit(1);
|
package/dist/cli_ratatui.d.ts
CHANGED
|
@@ -444,6 +444,9 @@ export declare class RatatuiApp {
|
|
|
444
444
|
private colonyPaneIds;
|
|
445
445
|
/** Cache of latest pane list from pane_state events (including colony panes, filtered in switcher) */
|
|
446
446
|
private knownPanes;
|
|
447
|
+
private awaitingRestoredPaneState;
|
|
448
|
+
private nativeRestore;
|
|
449
|
+
private nativeRestorePending;
|
|
447
450
|
/** Currently active zmux window (0 = normal, 1 = colony) */
|
|
448
451
|
private currentMuxWindow;
|
|
449
452
|
/** Pane currently zoomed full-screen, or null if in normal (unzoomed) view */
|
|
@@ -492,9 +495,19 @@ export declare class RatatuiApp {
|
|
|
492
495
|
private paneRelay;
|
|
493
496
|
private paneRelayClient;
|
|
494
497
|
private supervisionManager;
|
|
498
|
+
private dailyDesktop;
|
|
499
|
+
private dailyStatusPane;
|
|
500
|
+
private retainedStartupLayout;
|
|
501
|
+
private retainedStartupTopology;
|
|
502
|
+
private dailyStatusCancel;
|
|
503
|
+
private dailyDialogs;
|
|
495
504
|
private recapController;
|
|
496
505
|
private turnStartTime;
|
|
497
506
|
private activePromptTurn;
|
|
507
|
+
private correlatedAdmission;
|
|
508
|
+
/** Read-only projection of the canonical committed session, never an input ledger. */
|
|
509
|
+
private committedTurnMessages;
|
|
510
|
+
private committedPromptTurns;
|
|
498
511
|
private streamingPromptTurn;
|
|
499
512
|
private promptRunTurns;
|
|
500
513
|
private promptMetadataTimer;
|
|
@@ -743,6 +756,16 @@ export declare class RatatuiApp {
|
|
|
743
756
|
private shouldIgnorePaneClosed;
|
|
744
757
|
private publishPaneSystemMessage;
|
|
745
758
|
private trackPendingPaneLaunch;
|
|
759
|
+
private dailySelect;
|
|
760
|
+
private observeRestoredPaneState;
|
|
761
|
+
private observeDailyStatusClosed;
|
|
762
|
+
private readDailyPanes;
|
|
763
|
+
private dailyStatusLaunch;
|
|
764
|
+
private recoverDailyStatus;
|
|
765
|
+
private dailyLayoutOwner;
|
|
766
|
+
private startDailyDesktop;
|
|
767
|
+
private savedDailyStatus;
|
|
768
|
+
private startDailyStatus;
|
|
746
769
|
private createWorkspaceLayoutOwner;
|
|
747
770
|
private formatTime;
|
|
748
771
|
private waitForTuiEvent;
|
|
@@ -751,7 +774,7 @@ export declare class RatatuiApp {
|
|
|
751
774
|
* before child process 'close' events delete panes from the manager.
|
|
752
775
|
* getMuxSessionState() returns this cached snapshot if available.
|
|
753
776
|
*/
|
|
754
|
-
private
|
|
777
|
+
private _emergencyLayoutSnapshot;
|
|
755
778
|
/**
|
|
756
779
|
* Synchronously capture the mux state before signal handlers cause
|
|
757
780
|
* child processes to die and be cleaned up from HeadlessPaneManager.
|
|
@@ -764,6 +787,7 @@ export declare class RatatuiApp {
|
|
|
764
787
|
*/
|
|
765
788
|
private readAndPublishDocContent;
|
|
766
789
|
private getMuxSessionState;
|
|
790
|
+
private readMuxSessionState;
|
|
767
791
|
private applyHostedConfig;
|
|
768
792
|
private isHostedRuntime;
|
|
769
793
|
private applyHostedSessionSettingsCommand;
|
|
@@ -1021,6 +1045,14 @@ export declare class RatatuiApp {
|
|
|
1021
1045
|
* relayed or not: the colony dashboard's send, which is the person, posts there.
|
|
1022
1046
|
*/
|
|
1023
1047
|
private takesRouterAttempt;
|
|
1048
|
+
/**
|
|
1049
|
+
* Input from the browser mirror, a ZTC process or pane, or /broadcast (`via`), or a correlated turn from /pane-input.
|
|
1050
|
+
* Uncorrelated input runs as submitMirrorInput describes. A correlated turn is posted with the mirror's token by an
|
|
1051
|
+
* automated supervisor (Zerg's clone delivery), never typed by the person, so it runs as relayed input whichever
|
|
1052
|
+
* credential carried it: it never takes the person's attempt past a Zerg Router refusal, and it is refused rather than
|
|
1053
|
+
* queued or made a steering input.
|
|
1054
|
+
*/
|
|
1055
|
+
private handleMirrorInput;
|
|
1024
1056
|
/**
|
|
1025
1057
|
* `person`: the person entered this input themselves (see submitPersonInput). A /loop tick, a goal continuation,
|
|
1026
1058
|
* another pane's or the coordinator's message and a pane's initial task never are, so none of them passes a Zerg
|
|
@@ -1031,7 +1063,9 @@ export declare class RatatuiApp {
|
|
|
1031
1063
|
* a pane, which is never the person's (submitMirrorInput). In a ZTC another ZTC launched into one of its panes, what
|
|
1032
1064
|
* the terminal gives it isn't only the person's, and what /broadcast gives any ZTC never is (see relayedHere). What
|
|
1033
1065
|
* is relayed here makes none of the person's choices and, unless /broadcast delivered it, passes no refusal either
|
|
1034
|
-
* (see takesRouterAttempt).
|
|
1066
|
+
* (see takesRouterAttempt). A correlated turn from /pane-input is not the person's either (see handleMirrorInput).
|
|
1067
|
+
* `admitted`: that turn's acknowledgement, run once its message is admitted and before the model run; such input is
|
|
1068
|
+
* refused instead of being queued or steering a busy turn.
|
|
1035
1069
|
*/
|
|
1036
1070
|
private handleSubmit;
|
|
1037
1071
|
/**
|
|
@@ -1335,6 +1369,10 @@ export declare class RatatuiApp {
|
|
|
1335
1369
|
* Save the current session to disk
|
|
1336
1370
|
*/
|
|
1337
1371
|
private saveCurrentSession;
|
|
1372
|
+
private workspacePaneTopology;
|
|
1373
|
+
private completeSessionLayout;
|
|
1374
|
+
private backgroundSessionLayout;
|
|
1375
|
+
private saveBackgroundSession;
|
|
1338
1376
|
private scheduleMuxPersistenceSave;
|
|
1339
1377
|
/**
|
|
1340
1378
|
* Persist every parent session, including fresh conversations, and colony
|
|
@@ -1480,21 +1518,29 @@ export declare class RatatuiApp {
|
|
|
1480
1518
|
*/
|
|
1481
1519
|
private spawnZtcPane;
|
|
1482
1520
|
/**
|
|
1483
|
-
* The Ctrl+B c
|
|
1484
|
-
* in `/settings
|
|
1521
|
+
* The New pane chooser, zmux's Ctrl+B c and the desktop app's More… in its new-pane menu: bash, a ZTC pane, the
|
|
1522
|
+
* agent CLIs, any custom option the user added in `/settings`, and, while native panes are up, the native and
|
|
1523
|
+
* delegated panes and their Stop, Resume, Adopt and delegated Router login actions.
|
|
1485
1524
|
*
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1525
|
+
* The renderer raises this rather than acting itself because the answers are this process's business — a ZTC pane
|
|
1526
|
+
* needs its entrypoint, session id, and environment, and the custom options live in ZTC's config. The chooser shows
|
|
1527
|
+
* in Main, so in the desktop app Main takes the keyboard for it, whichever pane asked; the pane chosen splits the pane
|
|
1528
|
+
* that asked, and a cancelled chooser gives that pane the keyboard back.
|
|
1489
1529
|
*/
|
|
1490
1530
|
private showNewPanePicker;
|
|
1531
|
+
/**
|
|
1532
|
+
* The pane the renderer has focused, as its session state says: where the person was when they asked for something
|
|
1533
|
+
* Main shows. Null when the renderer doesn't say in time.
|
|
1534
|
+
*/
|
|
1535
|
+
private rendererFocusedPane;
|
|
1491
1536
|
/**
|
|
1492
1537
|
* Create the pane the chooser was given. Returns an error to report, or null
|
|
1493
1538
|
* when the pane is on its way.
|
|
1494
1539
|
*
|
|
1495
1540
|
* The custom list is re-read here rather than captured with the options, so a
|
|
1496
1541
|
* config edit between opening the chooser and answering it cannot create a
|
|
1497
|
-
* pane for an option that no longer exists.
|
|
1542
|
+
* pane for an option that no longer exists. `target` is the pane the new one
|
|
1543
|
+
* splits: the pane the chooser was asked from.
|
|
1498
1544
|
*/
|
|
1499
1545
|
private createPickedPane;
|
|
1500
1546
|
/**
|
|
@@ -1522,6 +1568,8 @@ export declare class RatatuiApp {
|
|
|
1522
1568
|
private stopBackgroundPoll;
|
|
1523
1569
|
private prepareDesktopUpdateRestart;
|
|
1524
1570
|
private applyDesktopUpdateOwnerInput;
|
|
1571
|
+
private emergencyExitPromise;
|
|
1572
|
+
emergencyExit(): Promise<void>;
|
|
1525
1573
|
exit(forceSessionPersistence?: boolean, options?: {
|
|
1526
1574
|
announce?: boolean;
|
|
1527
1575
|
exitCode?: number;
|