@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
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { delegatedAuthView, deriveRouterAuthState } from './router_state.js';
|
|
2
|
+
import { parseNativeRecords, savedNativeRecord } from './native_records.js';
|
|
3
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
4
|
+
import { createParentGrant, enroll, adopt, revokeParent, tokensEqual, validateRequest } from './enrollment.js';
|
|
5
|
+
import { parseNativeToolPaneRecord } from './native_tool.js';
|
|
6
|
+
import { assignSummaryPaths, unknownSummaryPaths, buildChildSummary } from './summary.js';
|
|
7
|
+
import { project } from './schema_registry.js';
|
|
8
|
+
import { DailyError } from './control_protocol.js';
|
|
9
|
+
import { generateToken } from './enrollment.js';
|
|
10
|
+
export class DailyStore {
|
|
11
|
+
ownerId;
|
|
12
|
+
now;
|
|
13
|
+
observers = new Set();
|
|
14
|
+
onChange(observer) { this.observers.add(observer); return () => { this.observers.delete(observer); }; }
|
|
15
|
+
changed() { for (const observer of this.observers)
|
|
16
|
+
observer(); }
|
|
17
|
+
discoveryIdentities() {
|
|
18
|
+
return Object.fromEntries([...this.grants.values()].filter(grant => !grant.revoked && grant.state === 'active').map(grant => [createHash('sha256').update(grant.token).digest('hex'), this.identityFor(grant.parentPaneId)]));
|
|
19
|
+
}
|
|
20
|
+
router = delegatedAuthView(deriveRouterAuthState(undefined, null, Date.now()));
|
|
21
|
+
get routerAuth() { return structuredClone(this.router); }
|
|
22
|
+
setRouterAuth(auth) { this.router = delegatedAuthView(auth); }
|
|
23
|
+
paneStatus = 'pending';
|
|
24
|
+
get statusPane() { return this.paneStatus; }
|
|
25
|
+
setStatusPane(state) { this.paneStatus = state; }
|
|
26
|
+
entries = new Map();
|
|
27
|
+
grants = new Map();
|
|
28
|
+
constructor(ownerId, now = Date.now) {
|
|
29
|
+
this.ownerId = ownerId;
|
|
30
|
+
this.now = now;
|
|
31
|
+
if (!/^[A-Za-z0-9_-]{1,64}$/.test(ownerId))
|
|
32
|
+
throw new DailyError('invalid');
|
|
33
|
+
}
|
|
34
|
+
entry(paneId) {
|
|
35
|
+
const entry = this.entries.get(paneId);
|
|
36
|
+
if (!entry)
|
|
37
|
+
throw new DailyError('not_found');
|
|
38
|
+
return entry;
|
|
39
|
+
}
|
|
40
|
+
grant(token) {
|
|
41
|
+
return [...this.grants.values()].find(grant => !grant.revoked && grant.state === 'active' && tokensEqual(token, grant.token)) ?? null;
|
|
42
|
+
}
|
|
43
|
+
canSee(token, entry) {
|
|
44
|
+
const item = entry.enrollment;
|
|
45
|
+
if (!item || item.revoked)
|
|
46
|
+
return false;
|
|
47
|
+
const grant = this.grant(token);
|
|
48
|
+
return tokensEqual(token, item.token) || grant !== null && grant.enrollmentIds.includes(item.enrollmentId);
|
|
49
|
+
}
|
|
50
|
+
async makeEntry(record, resources = {}, restoring = false) {
|
|
51
|
+
const checked = parseNativeToolPaneRecord(record);
|
|
52
|
+
const paths = await assignSummaryPaths(checked.launch.worktree.repositoryRoot, checked.launch.policy?.outputSink ?? null).catch(error => { if (!restoring)
|
|
53
|
+
throw error; return unknownSummaryPaths(); });
|
|
54
|
+
return { record: checked, revision: checked.process?.revision ?? 1, enrollment: null, lease: resources.lease ?? null, observedLease: resources.lease ?? null,
|
|
55
|
+
broker: resources.broker ?? null, result: null, task: { paths, state: 'queued', approvalState: 'none', errorClass: 'none',
|
|
56
|
+
rejectReason: null, startedAt: this.now(), lastActivityAt: null, eventCount: 0, tokens: null, provenance: 'desktop' } };
|
|
57
|
+
}
|
|
58
|
+
async registerParent(record, token) {
|
|
59
|
+
if (this.entries.has(record.paneId))
|
|
60
|
+
throw new DailyError('invalid');
|
|
61
|
+
const entry = await this.makeEntry(record);
|
|
62
|
+
if (this.entries.has(record.paneId))
|
|
63
|
+
throw new DailyError('invalid');
|
|
64
|
+
this.entries.set(record.paneId, entry);
|
|
65
|
+
const grant = createParentGrant({ parentPaneId: record.paneId, parentSessionId: record.identity.canonicalId }, record.provenance ? 'provisional' : 'active');
|
|
66
|
+
if (token !== undefined) {
|
|
67
|
+
if (!tokensEqual(token, token))
|
|
68
|
+
throw new DailyError('invalid');
|
|
69
|
+
grant.token = token;
|
|
70
|
+
}
|
|
71
|
+
this.grants.set(grant.grantId, grant);
|
|
72
|
+
this.changed();
|
|
73
|
+
return structuredClone(grant);
|
|
74
|
+
}
|
|
75
|
+
admitParent(paneId) {
|
|
76
|
+
const record = this.entry(paneId).record;
|
|
77
|
+
const proof = record.provenance;
|
|
78
|
+
if (!proof || !record.process || proof.leaderPid !== record.process.leaderPid || proof.leaderStartMs !== record.process.leaderStartMs || !proof.shellPid || !proof.shellStartMs || this.now() > proof.expiresAt)
|
|
79
|
+
throw new DailyError('unauthorized');
|
|
80
|
+
const grant = [...this.grants.values()].find(grant => !grant.revoked && grant.parentPaneId === paneId);
|
|
81
|
+
if (!grant)
|
|
82
|
+
throw new DailyError('unauthorized');
|
|
83
|
+
grant.state = 'active';
|
|
84
|
+
this.changed();
|
|
85
|
+
}
|
|
86
|
+
async addChild(token, record, resources = {}) {
|
|
87
|
+
const grant = this.grant(token);
|
|
88
|
+
if (!grant)
|
|
89
|
+
throw new DailyError('unauthorized');
|
|
90
|
+
return this.addOpenedChild(grant.grantId, record, resources);
|
|
91
|
+
}
|
|
92
|
+
async addOpenedChild(grantId, record, resources = {}, revokedGrant) {
|
|
93
|
+
const grant = this.grants.get(grantId) ?? (revokedGrant?.revoked ? revokedGrant : null);
|
|
94
|
+
if (!grant || grant.state !== 'active')
|
|
95
|
+
throw new DailyError('unauthorized');
|
|
96
|
+
if (this.entries.has(record.paneId))
|
|
97
|
+
throw new DailyError('invalid');
|
|
98
|
+
if (!['codex', 'ztc'].includes(record.launch.tool) || record.launch.mode !== 'delegated')
|
|
99
|
+
throw new DailyError('forbidden_interactive');
|
|
100
|
+
const entry = await this.makeEntry(record, resources);
|
|
101
|
+
if (this.entries.has(record.paneId))
|
|
102
|
+
throw new DailyError('invalid');
|
|
103
|
+
entry.enrollment = grant.revoked ? { enrollmentId: randomUUID(), parentPaneId: grant.parentPaneId, parentSessionId: grant.parentSessionId,
|
|
104
|
+
childPaneId: record.paneId, childIdentity: structuredClone(record.identity), token: generateToken(), revoked: true, createdAt: this.now() }
|
|
105
|
+
: enroll(grant, record, this.now());
|
|
106
|
+
entry.record.enrollmentId = entry.enrollment.enrollmentId;
|
|
107
|
+
this.entries.set(record.paneId, entry);
|
|
108
|
+
this.changed();
|
|
109
|
+
return this.snapshotForOwner(record.paneId);
|
|
110
|
+
}
|
|
111
|
+
hasRecord(paneId) { return this.entries.has(paneId); }
|
|
112
|
+
identityFor(paneId) {
|
|
113
|
+
const entry = this.entry(paneId);
|
|
114
|
+
return { paneId, sessionId: entry.record.identity.canonicalId, ownerId: this.ownerId, revision: entry.revision };
|
|
115
|
+
}
|
|
116
|
+
authorityFor(token, paneId) {
|
|
117
|
+
const grant = this.grant(token);
|
|
118
|
+
const owned = grant === null ? [...this.entries.values()].find(entry => this.canSee(token, entry)) : undefined;
|
|
119
|
+
const target = paneId ?? grant?.parentPaneId ?? owned?.record.paneId;
|
|
120
|
+
if (target === undefined)
|
|
121
|
+
throw new DailyError('unauthorized');
|
|
122
|
+
const entry = this.entries.get(target);
|
|
123
|
+
if (!entry)
|
|
124
|
+
throw new DailyError('unauthorized');
|
|
125
|
+
const parent = grant !== null && grant.parentPaneId === target;
|
|
126
|
+
if (!parent && !this.canSee(token, entry))
|
|
127
|
+
throw new DailyError('unauthorized');
|
|
128
|
+
const parentGrant = grant ?? [...this.grants.values()].find(value => !value.revoked && value.state === 'active' && value.enrollmentIds.includes(entry.enrollment.enrollmentId));
|
|
129
|
+
if (!parentGrant)
|
|
130
|
+
throw new DailyError('unauthorized');
|
|
131
|
+
return { record: structuredClone(entry.record), grant: parentGrant, ...(entry.enrollment ? { enrollment: entry.enrollment } : {}),
|
|
132
|
+
ownerId: this.ownerId, revision: entry.revision, identity: this.identityFor(target) };
|
|
133
|
+
}
|
|
134
|
+
validate(input, token, paneId) {
|
|
135
|
+
return validateRequest(input, this.authorityFor(token, paneId));
|
|
136
|
+
}
|
|
137
|
+
listChildrenFor(token) {
|
|
138
|
+
if (!this.grant(token) && ![...this.entries.values()].some(entry => this.canSee(token, entry)))
|
|
139
|
+
throw new DailyError('unauthorized');
|
|
140
|
+
return [...this.entries.values()].filter(entry => this.canSee(token, entry)).map(entry => this.snapshotForOwner(entry.record.paneId));
|
|
141
|
+
}
|
|
142
|
+
summaryFor(token, paneId) {
|
|
143
|
+
const entry = this.entries.get(paneId);
|
|
144
|
+
if (!entry || !this.canSee(token, entry))
|
|
145
|
+
throw new DailyError('unauthorized');
|
|
146
|
+
return this.snapshotForOwner(paneId);
|
|
147
|
+
}
|
|
148
|
+
snapshotForOwner(paneId) {
|
|
149
|
+
const entry = this.entry(paneId);
|
|
150
|
+
const enrollment = entry.enrollment ?? { enrollmentId: entry.record.enrollmentId ?? randomUUID(), parentPaneId: 0,
|
|
151
|
+
parentSessionId: null, childPaneId: paneId, childIdentity: entry.record.identity, token: '', revoked: true, createdAt: entry.task.startedAt };
|
|
152
|
+
return { routerAuth: this.routerAuth, status_pane: this.paneStatus, summary: buildChildSummary(entry.record, enrollment, entry.observedLease, entry.task, this.now()), identity: this.identityFor(paneId),
|
|
153
|
+
orphaned: entry.enrollment === null || entry.enrollment.revoked, result: entry.task.state === 'result_available' ? structuredClone(entry.result) : null };
|
|
154
|
+
}
|
|
155
|
+
getRecord(paneId) { return structuredClone(this.entry(paneId).record); }
|
|
156
|
+
enrollmentFor(paneId) {
|
|
157
|
+
const enrollment = this.entry(paneId).enrollment;
|
|
158
|
+
if (!enrollment)
|
|
159
|
+
throw new DailyError('not_found');
|
|
160
|
+
return structuredClone(enrollment);
|
|
161
|
+
}
|
|
162
|
+
leaseFor(paneId) { return structuredClone(this.entry(paneId).lease); }
|
|
163
|
+
updateRecord(record, expectedRevision) {
|
|
164
|
+
const entry = this.entry(record.paneId);
|
|
165
|
+
if (expectedRevision !== undefined && expectedRevision !== entry.revision)
|
|
166
|
+
throw new DailyError('stale');
|
|
167
|
+
const checked = parseNativeToolPaneRecord(record);
|
|
168
|
+
checked.enrollmentId = entry.enrollment?.enrollmentId ?? null;
|
|
169
|
+
if (checked.launch.cwd !== entry.record.launch.cwd || checked.launch.worktree.repositoryRoot !== entry.record.launch.worktree.repositoryRoot
|
|
170
|
+
|| checked.launch.policy?.outputSink !== entry.record.launch.policy?.outputSink && checked.launch.policy?.outputSink !== entry.task.paths.resultPath)
|
|
171
|
+
throw new DailyError('invalid');
|
|
172
|
+
const previous = entry.record.process;
|
|
173
|
+
if (checked.identity.canonicalId !== entry.record.identity.canonicalId || checked.outcome.stopState === 'leader_exited' || checked.outcome.stopState === 'identity_lost'
|
|
174
|
+
|| previous !== null && checked.process !== null && (previous.leaderPid !== checked.process.leaderPid || previous.leaderStartMs !== checked.process.leaderStartMs))
|
|
175
|
+
this.revokeParent(record.paneId);
|
|
176
|
+
entry.revision++;
|
|
177
|
+
entry.record = checked;
|
|
178
|
+
if (checked.process) {
|
|
179
|
+
checked.process.revision = entry.revision;
|
|
180
|
+
checked.process.desktopOwnerId = this.ownerId;
|
|
181
|
+
}
|
|
182
|
+
if (entry.enrollment)
|
|
183
|
+
entry.enrollment.childIdentity = structuredClone(checked.identity);
|
|
184
|
+
if (checked.outcome.stopState === 'leader_exited')
|
|
185
|
+
entry.broker?.revokeChild(record.paneId);
|
|
186
|
+
this.changed();
|
|
187
|
+
return this.identityFor(record.paneId);
|
|
188
|
+
}
|
|
189
|
+
setObservation(record, observation) {
|
|
190
|
+
this.updateRecord(record);
|
|
191
|
+
const entry = this.entry(record.paneId);
|
|
192
|
+
const verdict = observation.projection.ok ? project(record.launch.policy?.schemaId, record.launch.policy?.schemaHash ?? '', JSON.stringify(observation.projection.values), record.outcome.exit?.code ?? null, false) : observation.projection;
|
|
193
|
+
entry.task = { ...entry.task, state: observation.state === 'approval_denied' ? 'failed' : observation.state,
|
|
194
|
+
approvalState: observation.approvalState, errorClass: observation.errorClass, eventCount: observation.eventCount,
|
|
195
|
+
tokens: observation.tokens, rejectReason: verdict.ok ? null : verdict.reason, lastActivityAt: this.now(), provenance: 'tool_event' };
|
|
196
|
+
if (entry.task.state === 'result_available' && !verdict.ok)
|
|
197
|
+
entry.task.state = 'result_rejected';
|
|
198
|
+
entry.result = verdict.ok ? verdict.values : null;
|
|
199
|
+
}
|
|
200
|
+
revokeParent(paneId) {
|
|
201
|
+
for (const grant of this.grants.values()) {
|
|
202
|
+
if (!grant.revoked && grant.parentPaneId === paneId) {
|
|
203
|
+
const enrollments = [...this.entries.values()].flatMap(entry => entry.enrollment ? [entry.enrollment] : []);
|
|
204
|
+
revokeParent(grant, enrollments);
|
|
205
|
+
this.grants.delete(grant.grantId);
|
|
206
|
+
for (const entry of this.entries.values())
|
|
207
|
+
if (entry.enrollment && grant.enrollmentIds.includes(entry.enrollment.enrollmentId)) {
|
|
208
|
+
entry.revision++;
|
|
209
|
+
if (entry.record.process)
|
|
210
|
+
entry.record.process.revision = entry.revision;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
this.changed();
|
|
215
|
+
}
|
|
216
|
+
adoptChild(paneId, parentToken) {
|
|
217
|
+
const grant = this.grant(parentToken);
|
|
218
|
+
const entry = this.entry(paneId);
|
|
219
|
+
if (!grant || !entry.enrollment?.revoked)
|
|
220
|
+
throw new DailyError('unauthorized');
|
|
221
|
+
entry.enrollment = adopt(entry.enrollment, grant, entry.record, this.now());
|
|
222
|
+
entry.record.enrollmentId = entry.enrollment.enrollmentId;
|
|
223
|
+
entry.revision++;
|
|
224
|
+
if (entry.record.process)
|
|
225
|
+
entry.record.process.revision = entry.revision;
|
|
226
|
+
this.changed();
|
|
227
|
+
return structuredClone(entry.enrollment);
|
|
228
|
+
}
|
|
229
|
+
removeChild(paneId) {
|
|
230
|
+
const entry = this.entry(paneId);
|
|
231
|
+
entry.broker?.revokeChild(paneId);
|
|
232
|
+
this.revokeParent(paneId);
|
|
233
|
+
if (entry.enrollment)
|
|
234
|
+
entry.enrollment.revoked = true;
|
|
235
|
+
this.entries.delete(paneId);
|
|
236
|
+
this.changed();
|
|
237
|
+
}
|
|
238
|
+
parentPaneIdsForOwner() { return [...this.grants.values()].filter(grant => !grant.revoked && grant.state === 'active').map(grant => grant.parentPaneId); }
|
|
239
|
+
parentTokenForOwner(paneId) {
|
|
240
|
+
const grant = [...this.grants.values()].find(grant => !grant.revoked && grant.parentPaneId === paneId);
|
|
241
|
+
if (!grant)
|
|
242
|
+
throw new DailyError('unauthorized');
|
|
243
|
+
return grant.token;
|
|
244
|
+
}
|
|
245
|
+
childrenForOwner() {
|
|
246
|
+
return [...this.entries.values()].filter(entry => entry.enrollment !== null).map(entry => this.snapshotForOwner(entry.record.paneId));
|
|
247
|
+
}
|
|
248
|
+
setLease(paneId, lease) {
|
|
249
|
+
const entry = this.entry(paneId);
|
|
250
|
+
entry.lease = structuredClone(lease);
|
|
251
|
+
entry.observedLease = structuredClone(lease);
|
|
252
|
+
this.updateRecord(entry.record);
|
|
253
|
+
}
|
|
254
|
+
observeLease(paneId, lease) { const entry = this.entry(paneId); entry.observedLease = structuredClone(lease); this.updateRecord(entry.record); }
|
|
255
|
+
clearChildren() {
|
|
256
|
+
for (const entry of [...this.entries.values()])
|
|
257
|
+
if (entry.record.paneId !== 0)
|
|
258
|
+
this.removeChild(entry.record.paneId);
|
|
259
|
+
}
|
|
260
|
+
exportRecords() {
|
|
261
|
+
return Object.fromEntries([...this.entries.values()].map(entry => {
|
|
262
|
+
const record = savedNativeRecord(entry.record);
|
|
263
|
+
return [String(record.paneId), record];
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
async importRecords(input, keepRoot = false) {
|
|
267
|
+
if ([...this.entries.keys()].some(id => !keepRoot || id !== 0) || typeof input !== 'object' || input === null || Array.isArray(input))
|
|
268
|
+
throw new DailyError('invalid');
|
|
269
|
+
const entries = [];
|
|
270
|
+
for (const [key, record] of Object.entries(parseNativeRecords(input))) {
|
|
271
|
+
if (record.paneId === 0 || String(record.paneId) !== key)
|
|
272
|
+
throw new DailyError('invalid');
|
|
273
|
+
const revision = (record.process?.revision ?? 0) + 1;
|
|
274
|
+
record.process = null;
|
|
275
|
+
record.outcome.stopState = 'unknown';
|
|
276
|
+
record.outcome.exit = null;
|
|
277
|
+
delete record.launch.task;
|
|
278
|
+
delete record.identity.locator;
|
|
279
|
+
const entry = await this.makeEntry(record, {}, true);
|
|
280
|
+
entry.revision = revision;
|
|
281
|
+
entry.task.state = 'exited';
|
|
282
|
+
if (record.enrollmentId !== null)
|
|
283
|
+
entry.enrollment = { enrollmentId: record.enrollmentId, parentPaneId: 0, parentSessionId: null,
|
|
284
|
+
childPaneId: record.paneId, childIdentity: structuredClone(record.identity), token: generateToken(), revoked: true, createdAt: this.now() };
|
|
285
|
+
entries.push(entry);
|
|
286
|
+
}
|
|
287
|
+
for (const entry of entries)
|
|
288
|
+
this.entries.set(entry.record.paneId, entry);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ZTCConfig } from '../../config/types.js';
|
|
2
|
+
import { type EffectivePolicy, type NativeToolPaneRecord } from './native_tool.js';
|
|
3
|
+
export { ensureDelegatedProfile, delegatedAuthState, logoutDelegatedProfile } from './profile_bootstrap.js';
|
|
4
|
+
export declare class DelegatedLaunchError extends Error {
|
|
5
|
+
readonly code: 'policy_refused' | 'sandbox_unavailable' | 'profile_invalid' | 'policy_changed';
|
|
6
|
+
constructor(code: 'policy_refused' | 'sandbox_unavailable' | 'profile_invalid' | 'policy_changed', message: string);
|
|
7
|
+
}
|
|
8
|
+
export interface PolicyOptions {
|
|
9
|
+
profileName?: string;
|
|
10
|
+
closedExtensions?: boolean;
|
|
11
|
+
autoAccept?: boolean;
|
|
12
|
+
approvalUrl?: string;
|
|
13
|
+
outputFile?: string;
|
|
14
|
+
outputSchemaFile?: string;
|
|
15
|
+
toolAllowlist?: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function effectiveHeadlessPolicy(config: ZTCConfig, options: PolicyOptions): Promise<EffectivePolicy>;
|
|
18
|
+
export declare function assertDelegatedPolicy(policy: EffectivePolicy, skillRoots?: readonly string[]): void;
|
|
19
|
+
export declare function resolveDelegatedPolicy(configRoot: string, env?: NodeJS.ProcessEnv, cwd?: string, skillRoots?: readonly string[]): Promise<EffectivePolicy>;
|
|
20
|
+
export interface DelegatedLaunch {
|
|
21
|
+
command: string;
|
|
22
|
+
args: string[];
|
|
23
|
+
env: NodeJS.ProcessEnv;
|
|
24
|
+
cwd: string;
|
|
25
|
+
artifactPath: string;
|
|
26
|
+
schemaPath: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildDelegatedZtcLaunch(record: NativeToolPaneRecord, options: {
|
|
29
|
+
configRoot: string;
|
|
30
|
+
artifactPath: string;
|
|
31
|
+
brokerUrl: string;
|
|
32
|
+
approvalToken: string;
|
|
33
|
+
skillRoots: string[];
|
|
34
|
+
resume?: boolean;
|
|
35
|
+
prompt?: string;
|
|
36
|
+
parentEnv?: NodeJS.ProcessEnv;
|
|
37
|
+
}): Promise<DelegatedLaunch>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { canonicalPolicyPath } from '../../agent/runtime/policy.js';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
import { readFile, realpath, mkdir } from 'node:fs/promises';
|
|
5
|
+
import { dirname, delimiter, resolve } from 'node:path';
|
|
6
|
+
import { projectPermissionPolicy, resolvePermissionProfile } from '../../config/permissions.js';
|
|
7
|
+
import { resolveAuthMode } from '../../config.js';
|
|
8
|
+
import { policyHash } from './native_tool.js';
|
|
9
|
+
import { schemaRegistry, writeSchemaFile } from './schema_registry.js';
|
|
10
|
+
import { checkoutEntry, delegatedApprovals, delegatedEnvironment, delegatedProfile, delegatedReadTools, profileCommand } from './profile_bootstrap.js';
|
|
11
|
+
import { buildLaunchArgv, buildResumeArgv } from './recipes.js';
|
|
12
|
+
import { assignSummaryPaths } from './summary.js';
|
|
13
|
+
export { ensureDelegatedProfile, delegatedAuthState, logoutDelegatedProfile } from './profile_bootstrap.js';
|
|
14
|
+
export class DelegatedLaunchError extends Error {
|
|
15
|
+
code;
|
|
16
|
+
constructor(code, message) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.code = code;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export async function effectiveHeadlessPolicy(config, options) {
|
|
22
|
+
const snapshot = projectPermissionPolicy(config);
|
|
23
|
+
const profile = resolvePermissionProfile(config);
|
|
24
|
+
const schemaHash = options.outputSchemaFile ? createHash('sha256').update(await readFile(resolve(options.outputSchemaFile))).digest('hex') : null;
|
|
25
|
+
const policy = {
|
|
26
|
+
allowedPaths: (profile.allowedPaths ?? []).map(path => canonicalPolicyPath(path, process.cwd())),
|
|
27
|
+
deniedPaths: (profile.deniedPaths ?? []).map(path => canonicalPolicyPath(path, process.cwd())), pathPrecedence: profile.pathPrecedence ?? 'deny_first',
|
|
28
|
+
profileName: options.profileName ?? process.env.ZTC_PROFILE ?? 'default', permissionProfile: snapshot.id,
|
|
29
|
+
capabilities: snapshot.capabilities, approvalRequiredCapabilities: [...new Set([...snapshot.approvalRequiredCapabilities, ...(profile.approvalRequiredCapabilities ?? [])])].sort(),
|
|
30
|
+
sandboxBackend: snapshot.commandSandbox.backend, sandboxEnforcement: snapshot.commandSandbox.enforcement,
|
|
31
|
+
sandboxRequired: snapshot.commandSandbox.required, brokerUrl: options.approvalUrl ?? null,
|
|
32
|
+
outputSink: options.outputFile ? resolve(options.outputFile) : null,
|
|
33
|
+
schemaId: schemaHash === schemaRegistry['fixture-count-v1'].hash ? 'fixture-count-v1' : null,
|
|
34
|
+
schemaHash, adapterVersion: 'dd-adapter-1', policyHash: '',
|
|
35
|
+
extensions: options.closedExtensions ? 'closed' : 'open', autoAccept: options.autoAccept !== false,
|
|
36
|
+
toolAllowlist: options.toolAllowlist ?? (process.env.ZTC_AGENT_TOOL_ALLOWLIST ? JSON.parse(process.env.ZTC_AGENT_TOOL_ALLOWLIST) : []),
|
|
37
|
+
authMode: resolveAuthMode(config),
|
|
38
|
+
};
|
|
39
|
+
policy.policyHash = policyHash(policy);
|
|
40
|
+
return policy;
|
|
41
|
+
}
|
|
42
|
+
export function assertDelegatedPolicy(policy, skillRoots = []) {
|
|
43
|
+
if (policy.sandboxEnforcement !== 'os' || !policy.sandboxRequired)
|
|
44
|
+
throw new DelegatedLaunchError('sandbox_unavailable', 'Required OS command sandbox is unavailable');
|
|
45
|
+
const roots = [...new Set([canonicalPolicyPath('.', process.cwd()), ...skillRoots.map(path => canonicalPolicyPath(path, process.cwd()))])].sort();
|
|
46
|
+
if (policy.pathPrecedence !== 'specific' || JSON.stringify([...(policy.allowedPaths ?? [])].sort()) !== JSON.stringify(roots)
|
|
47
|
+
|| !policy.deniedPaths?.includes(canonicalPolicyPath(homedir(), process.cwd())))
|
|
48
|
+
throw new DelegatedLaunchError('policy_refused', 'Delegated read roots are not qualified');
|
|
49
|
+
if (policy.capabilities.file_write !== false || policy.capabilities.shell_exec !== false
|
|
50
|
+
|| policy.permissionProfile !== 'read_only' || delegatedApprovals.some(capability => !policy.approvalRequiredCapabilities.includes(capability))
|
|
51
|
+
|| policy.extensions !== 'closed' || policy.autoAccept !== false || policy.authMode !== 'zrouter'
|
|
52
|
+
|| JSON.stringify(policy.toolAllowlist) !== JSON.stringify(delegatedReadTools))
|
|
53
|
+
throw new DelegatedLaunchError('policy_refused', 'Delegated execution boundary is not qualified');
|
|
54
|
+
}
|
|
55
|
+
export async function resolveDelegatedPolicy(configRoot, env, cwd, skillRoots) {
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(await profileCommand(configRoot, ['--daily-policy', ...(skillRoots === undefined ? [] : ['--skill-roots', JSON.stringify(skillRoots)])], true, env, cwd));
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
const message = error instanceof Error ? error.message : '';
|
|
61
|
+
throw new DelegatedLaunchError(message.includes('sandbox') ? 'sandbox_unavailable' : 'profile_invalid', 'Delegated profile policy cannot be admitted');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export async function buildDelegatedZtcLaunch(record, options) {
|
|
65
|
+
const configRoot = await realpath(options.configRoot);
|
|
66
|
+
const cwd = await realpath(record.launch.cwd);
|
|
67
|
+
let artifactPath = resolve(options.artifactPath);
|
|
68
|
+
if (artifactPath === cwd || artifactPath.startsWith(`${cwd}/`))
|
|
69
|
+
throw new DelegatedLaunchError('policy_refused', 'Artifact must be outside the source tree');
|
|
70
|
+
await mkdir(dirname(artifactPath), { recursive: true, mode: 0o700 });
|
|
71
|
+
artifactPath = (await assignSummaryPaths(record.launch.worktree.repositoryRoot, artifactPath)).resultPath;
|
|
72
|
+
const schema = await writeSchemaFile('fixture-count-v1', dirname(artifactPath));
|
|
73
|
+
const roots = await Promise.all(options.skillRoots.map(path => realpath(path)));
|
|
74
|
+
const policy = await resolveDelegatedPolicy(configRoot, options.parentEnv, cwd, roots);
|
|
75
|
+
policy.brokerUrl = options.brokerUrl;
|
|
76
|
+
policy.outputSink = artifactPath;
|
|
77
|
+
policy.schemaId = 'fixture-count-v1';
|
|
78
|
+
policy.schemaHash = schema.hash;
|
|
79
|
+
policy.policyHash = policyHash(policy);
|
|
80
|
+
if (options.resume && record.launch.policy?.policyHash !== policy.policyHash)
|
|
81
|
+
throw new DelegatedLaunchError('policy_changed', 'Resume policy changed');
|
|
82
|
+
record.launch.policy = policy;
|
|
83
|
+
record.launch.profile = delegatedProfile;
|
|
84
|
+
record.launch.args = ['--output-schema', schema.path];
|
|
85
|
+
const entry = checkoutEntry();
|
|
86
|
+
const args = options.resume ? buildResumeArgv(record, options.prompt) : buildLaunchArgv(record);
|
|
87
|
+
const env = { ...delegatedEnvironment(configRoot, options.parentEnv), ZTC_PROFILE: delegatedProfile,
|
|
88
|
+
ZTC_SKILL_PATHS: roots.join(delimiter), ZTC_APPROVAL_TOKEN: options.approvalToken };
|
|
89
|
+
return { command: entry.command, args: [...entry.args, ...args], env, cwd, artifactPath, schemaPath: schema.path };
|
|
90
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { PaneCommandTransport } from '../../ui/ratatui/pane_relay.js';
|
|
2
|
+
import { DailyStore } from './daily_store.js';
|
|
3
|
+
import { type OpenChildRequest, type OpenedChild } from './control_server.js';
|
|
4
|
+
import { type ApprovalBroker } from './broker.js';
|
|
5
|
+
import { type LeaseView } from './lease.js';
|
|
6
|
+
import { type NativeToolPaneRecord, type EffectivePolicy } from './native_tool.js';
|
|
7
|
+
import { type RouterAuthSnapshot, type RouterFundingState } from './router_state.js';
|
|
8
|
+
import { type SavedNativeRecord, type NativeRecords } from './native_records.js';
|
|
9
|
+
export declare const nativeChoices: readonly {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
export interface DailyDesktopHost {
|
|
14
|
+
transport: PaneCommandTransport;
|
|
15
|
+
cwd: () => string;
|
|
16
|
+
select(title: string, options: {
|
|
17
|
+
value: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}[]): Promise<string | null>;
|
|
20
|
+
input(title: string, defaultValue?: string): Promise<string | null>;
|
|
21
|
+
track(record: NativeToolPaneRecord): void;
|
|
22
|
+
changed(): void;
|
|
23
|
+
notify(message: string): void;
|
|
24
|
+
env?: NodeJS.ProcessEnv;
|
|
25
|
+
configRoot?: string;
|
|
26
|
+
delegatedSkillRoots?: () => string[];
|
|
27
|
+
isRestoring?: () => boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface DailyDesktopSnapshot {
|
|
30
|
+
status_pane: DailyStore['statusPane'];
|
|
31
|
+
children: ReturnType<DailyStore['childrenForOwner']>[number]['summary'][];
|
|
32
|
+
routerAuth: RouterAuthSnapshot;
|
|
33
|
+
routerFunding: RouterFundingState;
|
|
34
|
+
}
|
|
35
|
+
export declare function canResumeNative(record: SavedNativeRecord, lease?: LeaseView | null): boolean;
|
|
36
|
+
export declare function validateNativeResume(record: NativeToolPaneRecord, lease: LeaseView | null, resolvePolicy?: () => Promise<EffectivePolicy>): Promise<void>;
|
|
37
|
+
export declare function answerDesktopApproval(broker: ApprovalBroker, select: DailyDesktopHost['select']): Promise<void>;
|
|
38
|
+
export declare function safeDailyMessage(error: unknown): string;
|
|
39
|
+
export declare class DesktopDaily {
|
|
40
|
+
readonly ownerId: string;
|
|
41
|
+
private readonly host;
|
|
42
|
+
readonly store: DailyStore;
|
|
43
|
+
private control;
|
|
44
|
+
private broker;
|
|
45
|
+
private readonly actions;
|
|
46
|
+
private readonly pendingIds;
|
|
47
|
+
private readonly cancelledOpenings;
|
|
48
|
+
private seals;
|
|
49
|
+
private ownerStartMs;
|
|
50
|
+
private rootToken;
|
|
51
|
+
private readonly persistQueues;
|
|
52
|
+
private readonly leaseQueues;
|
|
53
|
+
private readonly authAbort;
|
|
54
|
+
private readonly live;
|
|
55
|
+
private readonly directory;
|
|
56
|
+
private readonly configRoot;
|
|
57
|
+
private timer;
|
|
58
|
+
private refreshing;
|
|
59
|
+
private polling;
|
|
60
|
+
private closed;
|
|
61
|
+
private dialog;
|
|
62
|
+
private openings;
|
|
63
|
+
private restoring;
|
|
64
|
+
private childWindow;
|
|
65
|
+
private serial;
|
|
66
|
+
private lastAuth;
|
|
67
|
+
private auth;
|
|
68
|
+
private funding;
|
|
69
|
+
constructor(ownerId: string, host: DailyDesktopHost);
|
|
70
|
+
start(): Promise<void>;
|
|
71
|
+
snapshot(): DailyDesktopSnapshot;
|
|
72
|
+
hasPane(paneId: number): boolean;
|
|
73
|
+
get publicKey(): string;
|
|
74
|
+
exportRecords(): NativeRecords;
|
|
75
|
+
beforeRestore(): void;
|
|
76
|
+
afterRestore(): void;
|
|
77
|
+
prepareRestoreRecords(input: unknown): Promise<{
|
|
78
|
+
restore: () => Promise<void>;
|
|
79
|
+
close: () => Promise<void>;
|
|
80
|
+
}>;
|
|
81
|
+
restoreRecords(input: unknown): Promise<void>;
|
|
82
|
+
private importRestoredRecords;
|
|
83
|
+
refreshRouter(): Promise<void>;
|
|
84
|
+
/** Opens the native pane or worker the New pane chooser was given; an interactive pane splits `target` when named. */
|
|
85
|
+
pick(value: string, cwd?: string, target?: number): Promise<void>;
|
|
86
|
+
private leaseOptions;
|
|
87
|
+
private isolate;
|
|
88
|
+
private request;
|
|
89
|
+
private placeholder;
|
|
90
|
+
private record;
|
|
91
|
+
private version;
|
|
92
|
+
private lease;
|
|
93
|
+
private label;
|
|
94
|
+
private persist;
|
|
95
|
+
private publish;
|
|
96
|
+
private opening;
|
|
97
|
+
private interactive;
|
|
98
|
+
openDelegated(request: OpenChildRequest, human?: boolean): Promise<OpenedChild>;
|
|
99
|
+
private skillRoots;
|
|
100
|
+
private failed;
|
|
101
|
+
private run;
|
|
102
|
+
private queueLease;
|
|
103
|
+
private release;
|
|
104
|
+
private action;
|
|
105
|
+
adopt(paneId: number, parentPaneId: number): Promise<void>;
|
|
106
|
+
stop(paneId: number, human?: boolean): Promise<NativeToolPaneRecord['outcome']>;
|
|
107
|
+
resume(paneId: number, prompt?: string): Promise<void>;
|
|
108
|
+
private poll;
|
|
109
|
+
private closePane;
|
|
110
|
+
paneClosed(paneId: number): void;
|
|
111
|
+
close(): Promise<void>;
|
|
112
|
+
}
|