@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
|
@@ -157,7 +157,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
157
157
|
id: string;
|
|
158
158
|
toId: string;
|
|
159
159
|
topic: string;
|
|
160
|
-
status: "
|
|
160
|
+
status: "open" | "done" | "refused" | "answered";
|
|
161
161
|
}[];
|
|
162
162
|
recentHere: {
|
|
163
163
|
at: string;
|
|
@@ -226,7 +226,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
226
226
|
meaning: string;
|
|
227
227
|
properties: {
|
|
228
228
|
id: string;
|
|
229
|
-
type: "number" | "
|
|
229
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
230
230
|
requiredOnCreate?: boolean | undefined;
|
|
231
231
|
}[];
|
|
232
232
|
relations: {
|
|
@@ -394,7 +394,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
394
394
|
id: string;
|
|
395
395
|
toId: string;
|
|
396
396
|
topic: string;
|
|
397
|
-
status: "
|
|
397
|
+
status: "open" | "done" | "refused" | "answered";
|
|
398
398
|
}[];
|
|
399
399
|
recentHere: {
|
|
400
400
|
at: string;
|
|
@@ -463,7 +463,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
463
463
|
meaning: string;
|
|
464
464
|
properties: {
|
|
465
465
|
id: string;
|
|
466
|
-
type: "number" | "
|
|
466
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
467
467
|
requiredOnCreate?: boolean | undefined;
|
|
468
468
|
}[];
|
|
469
469
|
relations: {
|
|
@@ -636,7 +636,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
636
636
|
id: string;
|
|
637
637
|
toId: string;
|
|
638
638
|
topic: string;
|
|
639
|
-
status: "
|
|
639
|
+
status: "open" | "done" | "refused" | "answered";
|
|
640
640
|
}[];
|
|
641
641
|
recentHere: {
|
|
642
642
|
at: string;
|
|
@@ -705,7 +705,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
705
705
|
meaning: string;
|
|
706
706
|
properties: {
|
|
707
707
|
id: string;
|
|
708
|
-
type: "number" | "
|
|
708
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
709
709
|
requiredOnCreate?: boolean | undefined;
|
|
710
710
|
}[];
|
|
711
711
|
relations: {
|
|
@@ -880,7 +880,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
880
880
|
id: string;
|
|
881
881
|
toId: string;
|
|
882
882
|
topic: string;
|
|
883
|
-
status: "
|
|
883
|
+
status: "open" | "done" | "refused" | "answered";
|
|
884
884
|
}[];
|
|
885
885
|
recentHere: {
|
|
886
886
|
at: string;
|
|
@@ -949,7 +949,7 @@ export declare function gameMasterAttemptInput(state: LivingState, actorId: stri
|
|
|
949
949
|
meaning: string;
|
|
950
950
|
properties: {
|
|
951
951
|
id: string;
|
|
952
|
-
type: "number" | "
|
|
952
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
953
953
|
requiredOnCreate?: boolean | undefined;
|
|
954
954
|
}[];
|
|
955
955
|
relations: {
|
|
@@ -1205,7 +1205,7 @@ export declare function gameMasterWorldInput(state: LivingState, happening: {
|
|
|
1205
1205
|
meaning: string;
|
|
1206
1206
|
properties: {
|
|
1207
1207
|
id: string;
|
|
1208
|
-
type: "number" | "
|
|
1208
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
1209
1209
|
requiredOnCreate?: boolean | undefined;
|
|
1210
1210
|
}[];
|
|
1211
1211
|
relations: {
|
|
@@ -1425,7 +1425,7 @@ export declare function gameMasterWorldInput(state: LivingState, happening: {
|
|
|
1425
1425
|
meaning: string;
|
|
1426
1426
|
properties: {
|
|
1427
1427
|
id: string;
|
|
1428
|
-
type: "number" | "
|
|
1428
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
1429
1429
|
requiredOnCreate?: boolean | undefined;
|
|
1430
1430
|
}[];
|
|
1431
1431
|
relations: {
|
|
@@ -1650,7 +1650,7 @@ export declare function gameMasterWorldInput(state: LivingState, happening: {
|
|
|
1650
1650
|
meaning: string;
|
|
1651
1651
|
properties: {
|
|
1652
1652
|
id: string;
|
|
1653
|
-
type: "number" | "
|
|
1653
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
1654
1654
|
requiredOnCreate?: boolean | undefined;
|
|
1655
1655
|
}[];
|
|
1656
1656
|
relations: {
|
|
@@ -1877,7 +1877,7 @@ export declare function gameMasterWorldInput(state: LivingState, happening: {
|
|
|
1877
1877
|
meaning: string;
|
|
1878
1878
|
properties: {
|
|
1879
1879
|
id: string;
|
|
1880
|
-
type: "number" | "
|
|
1880
|
+
type: "number" | "id" | "text" | "flag" | "level" | "time";
|
|
1881
1881
|
requiredOnCreate?: boolean | undefined;
|
|
1882
1882
|
}[];
|
|
1883
1883
|
relations: {
|
|
@@ -2062,7 +2062,7 @@ export declare function characterMind(state: LivingState, person: LivingPerson,
|
|
|
2062
2062
|
fromId: string;
|
|
2063
2063
|
toId: string;
|
|
2064
2064
|
topic: string;
|
|
2065
|
-
status: "
|
|
2065
|
+
status: "open" | "done" | "refused" | "answered";
|
|
2066
2066
|
}[];
|
|
2067
2067
|
stances: {
|
|
2068
2068
|
actorId: string;
|
|
@@ -2319,7 +2319,7 @@ export declare function characterReactionInput(state: LivingState, person: Livin
|
|
|
2319
2319
|
fromId: string;
|
|
2320
2320
|
toId: string;
|
|
2321
2321
|
topic: string;
|
|
2322
|
-
status: "
|
|
2322
|
+
status: "open" | "done" | "refused" | "answered";
|
|
2323
2323
|
}[];
|
|
2324
2324
|
stances: {
|
|
2325
2325
|
actorId: string;
|
|
@@ -2583,7 +2583,7 @@ export declare function characterPlanInput(state: LivingState, person: LivingPer
|
|
|
2583
2583
|
fromId: string;
|
|
2584
2584
|
toId: string;
|
|
2585
2585
|
topic: string;
|
|
2586
|
-
status: "
|
|
2586
|
+
status: "open" | "done" | "refused" | "answered";
|
|
2587
2587
|
}[];
|
|
2588
2588
|
stances: {
|
|
2589
2589
|
actorId: string;
|
|
@@ -2804,7 +2804,7 @@ export declare function characterMessageReplyInput(state: LivingState, person: L
|
|
|
2804
2804
|
fromId: string;
|
|
2805
2805
|
toId: string;
|
|
2806
2806
|
topic: string;
|
|
2807
|
-
status: "
|
|
2807
|
+
status: "open" | "done" | "refused" | "answered";
|
|
2808
2808
|
}[];
|
|
2809
2809
|
stances: {
|
|
2810
2810
|
actorId: string;
|
|
@@ -3051,7 +3051,7 @@ export declare function epilogueInput(state: LivingState): {
|
|
|
3051
3051
|
tensions: {
|
|
3052
3052
|
title: string;
|
|
3053
3053
|
summary: string;
|
|
3054
|
-
status: "
|
|
3054
|
+
status: "open" | "settled";
|
|
3055
3055
|
resolution: string | null;
|
|
3056
3056
|
latest?: string | null | undefined;
|
|
3057
3057
|
}[];
|
|
@@ -3091,7 +3091,7 @@ export declare function epilogueInput(state: LivingState): {
|
|
|
3091
3091
|
votes: {
|
|
3092
3092
|
name: string;
|
|
3093
3093
|
question: string;
|
|
3094
|
-
result: "
|
|
3094
|
+
result: "failed" | "passed" | "lapsed" | null;
|
|
3095
3095
|
count: string | null;
|
|
3096
3096
|
ballots: {
|
|
3097
3097
|
name: string;
|
|
@@ -3116,7 +3116,7 @@ export declare function epilogueInput(state: LivingState): {
|
|
|
3116
3116
|
tensions: {
|
|
3117
3117
|
title: string;
|
|
3118
3118
|
summary: string;
|
|
3119
|
-
status: "
|
|
3119
|
+
status: "open" | "settled";
|
|
3120
3120
|
resolution: string | null;
|
|
3121
3121
|
latest?: string | null | undefined;
|
|
3122
3122
|
}[];
|
|
@@ -103,8 +103,8 @@ export declare const definitionSchema: z.ZodObject<{
|
|
|
103
103
|
id: z.ZodString;
|
|
104
104
|
type: z.ZodEnum<{
|
|
105
105
|
number: "number";
|
|
106
|
-
text: "text";
|
|
107
106
|
id: "id";
|
|
107
|
+
text: "text";
|
|
108
108
|
flag: "flag";
|
|
109
109
|
level: "level";
|
|
110
110
|
time: "time";
|
|
@@ -227,8 +227,8 @@ export declare const definitionSchema: z.ZodObject<{
|
|
|
227
227
|
id: z.ZodString;
|
|
228
228
|
summary: z.ZodOptional<z.ZodString>;
|
|
229
229
|
status: z.ZodOptional<z.ZodEnum<{
|
|
230
|
-
settled: "settled";
|
|
231
230
|
open: "open";
|
|
231
|
+
settled: "settled";
|
|
232
232
|
}>>;
|
|
233
233
|
}, z.core.$strip>>;
|
|
234
234
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -193,7 +193,7 @@ export declare function makeLivingPlayerFrame(state: LivingState): {
|
|
|
193
193
|
title: string;
|
|
194
194
|
summary: string;
|
|
195
195
|
latest: string | null;
|
|
196
|
-
status: "
|
|
196
|
+
status: "open" | "settled";
|
|
197
197
|
resolution: string | null;
|
|
198
198
|
participants: string[];
|
|
199
199
|
sinceLabel: string | null;
|
|
@@ -16,8 +16,8 @@ export declare const propertyDefinitionSchema: z.ZodObject<{
|
|
|
16
16
|
id: z.ZodString;
|
|
17
17
|
type: z.ZodEnum<{
|
|
18
18
|
number: "number";
|
|
19
|
-
text: "text";
|
|
20
19
|
id: "id";
|
|
20
|
+
text: "text";
|
|
21
21
|
flag: "flag";
|
|
22
22
|
level: "level";
|
|
23
23
|
time: "time";
|
|
@@ -92,8 +92,8 @@ export declare const kindDefinitionSchema: z.ZodObject<{
|
|
|
92
92
|
id: z.ZodString;
|
|
93
93
|
type: z.ZodEnum<{
|
|
94
94
|
number: "number";
|
|
95
|
-
text: "text";
|
|
96
95
|
id: "id";
|
|
96
|
+
text: "text";
|
|
97
97
|
flag: "flag";
|
|
98
98
|
level: "level";
|
|
99
99
|
time: "time";
|
|
@@ -206,8 +206,8 @@ export declare const entitySchema: z.ZodObject<{
|
|
|
206
206
|
abstain: "abstain";
|
|
207
207
|
}>>>;
|
|
208
208
|
result: z.ZodOptional<z.ZodEnum<{
|
|
209
|
-
passed: "passed";
|
|
210
209
|
failed: "failed";
|
|
210
|
+
passed: "passed";
|
|
211
211
|
lapsed: "lapsed";
|
|
212
212
|
}>>;
|
|
213
213
|
settles: z.ZodOptional<z.ZodString>;
|
|
@@ -375,8 +375,8 @@ export declare const requestSchema: z.ZodObject<{
|
|
|
375
375
|
receiverId: z.ZodString;
|
|
376
376
|
topic: z.ZodString;
|
|
377
377
|
status: z.ZodEnum<{
|
|
378
|
-
done: "done";
|
|
379
378
|
open: "open";
|
|
379
|
+
done: "done";
|
|
380
380
|
refused: "refused";
|
|
381
381
|
answered: "answered";
|
|
382
382
|
}>;
|
|
@@ -410,8 +410,8 @@ export declare const tensionSchema: z.ZodObject<{
|
|
|
410
410
|
summary: z.ZodString;
|
|
411
411
|
participantIds: z.ZodArray<z.ZodString>;
|
|
412
412
|
status: z.ZodEnum<{
|
|
413
|
-
settled: "settled";
|
|
414
413
|
open: "open";
|
|
414
|
+
settled: "settled";
|
|
415
415
|
}>;
|
|
416
416
|
resolution: z.ZodNullable<z.ZodString>;
|
|
417
417
|
changedAt: z.ZodNumber;
|
|
@@ -420,8 +420,8 @@ export declare const tensionSchema: z.ZodObject<{
|
|
|
420
420
|
title: z.ZodString;
|
|
421
421
|
summary: z.ZodString;
|
|
422
422
|
status: z.ZodEnum<{
|
|
423
|
-
settled: "settled";
|
|
424
423
|
open: "open";
|
|
424
|
+
settled: "settled";
|
|
425
425
|
}>;
|
|
426
426
|
resolution: z.ZodNullable<z.ZodString>;
|
|
427
427
|
latest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -468,8 +468,8 @@ export declare const beatRulesSchema: z.ZodObject<{
|
|
|
468
468
|
id: z.ZodString;
|
|
469
469
|
summary: z.ZodOptional<z.ZodString>;
|
|
470
470
|
status: z.ZodOptional<z.ZodEnum<{
|
|
471
|
-
settled: "settled";
|
|
472
471
|
open: "open";
|
|
472
|
+
settled: "settled";
|
|
473
473
|
}>>;
|
|
474
474
|
}, z.core.$strip>>;
|
|
475
475
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -526,8 +526,8 @@ export declare const scheduledSchema: z.ZodObject<{
|
|
|
526
526
|
id: z.ZodString;
|
|
527
527
|
summary: z.ZodOptional<z.ZodString>;
|
|
528
528
|
status: z.ZodOptional<z.ZodEnum<{
|
|
529
|
-
settled: "settled";
|
|
530
529
|
open: "open";
|
|
530
|
+
settled: "settled";
|
|
531
531
|
}>>;
|
|
532
532
|
}, z.core.$strip>>;
|
|
533
533
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -788,8 +788,8 @@ export declare const effectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
788
788
|
id: z.ZodString;
|
|
789
789
|
summary: z.ZodOptional<z.ZodString>;
|
|
790
790
|
status: z.ZodOptional<z.ZodEnum<{
|
|
791
|
-
settled: "settled";
|
|
792
791
|
open: "open";
|
|
792
|
+
settled: "settled";
|
|
793
793
|
}>>;
|
|
794
794
|
}, z.core.$strip>>;
|
|
795
795
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -845,8 +845,8 @@ export declare const effectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
845
845
|
kind: z.ZodLiteral<"tension.update">;
|
|
846
846
|
tensionId: z.ZodString;
|
|
847
847
|
status: z.ZodEnum<{
|
|
848
|
-
settled: "settled";
|
|
849
848
|
open: "open";
|
|
849
|
+
settled: "settled";
|
|
850
850
|
}>;
|
|
851
851
|
note: z.ZodNullable<z.ZodString>;
|
|
852
852
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -884,8 +884,8 @@ export declare const effectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
884
884
|
id: z.ZodString;
|
|
885
885
|
type: z.ZodEnum<{
|
|
886
886
|
number: "number";
|
|
887
|
-
text: "text";
|
|
888
887
|
id: "id";
|
|
888
|
+
text: "text";
|
|
889
889
|
flag: "flag";
|
|
890
890
|
level: "level";
|
|
891
891
|
time: "time";
|
|
@@ -996,8 +996,8 @@ export declare const effectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
996
996
|
kind: z.ZodLiteral<"decision.close">;
|
|
997
997
|
entityId: z.ZodString;
|
|
998
998
|
result: z.ZodEnum<{
|
|
999
|
-
passed: "passed";
|
|
1000
999
|
failed: "failed";
|
|
1000
|
+
passed: "passed";
|
|
1001
1001
|
lapsed: "lapsed";
|
|
1002
1002
|
}>;
|
|
1003
1003
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1321,8 +1321,8 @@ export declare const eventSchema: z.ZodObject<{
|
|
|
1321
1321
|
id: z.ZodString;
|
|
1322
1322
|
summary: z.ZodOptional<z.ZodString>;
|
|
1323
1323
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1324
|
-
settled: "settled";
|
|
1325
1324
|
open: "open";
|
|
1325
|
+
settled: "settled";
|
|
1326
1326
|
}>>;
|
|
1327
1327
|
}, z.core.$strip>>;
|
|
1328
1328
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1378,8 +1378,8 @@ export declare const eventSchema: z.ZodObject<{
|
|
|
1378
1378
|
kind: z.ZodLiteral<"tension.update">;
|
|
1379
1379
|
tensionId: z.ZodString;
|
|
1380
1380
|
status: z.ZodEnum<{
|
|
1381
|
-
settled: "settled";
|
|
1382
1381
|
open: "open";
|
|
1382
|
+
settled: "settled";
|
|
1383
1383
|
}>;
|
|
1384
1384
|
note: z.ZodNullable<z.ZodString>;
|
|
1385
1385
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1417,8 +1417,8 @@ export declare const eventSchema: z.ZodObject<{
|
|
|
1417
1417
|
id: z.ZodString;
|
|
1418
1418
|
type: z.ZodEnum<{
|
|
1419
1419
|
number: "number";
|
|
1420
|
-
text: "text";
|
|
1421
1420
|
id: "id";
|
|
1421
|
+
text: "text";
|
|
1422
1422
|
flag: "flag";
|
|
1423
1423
|
level: "level";
|
|
1424
1424
|
time: "time";
|
|
@@ -1529,8 +1529,8 @@ export declare const eventSchema: z.ZodObject<{
|
|
|
1529
1529
|
kind: z.ZodLiteral<"decision.close">;
|
|
1530
1530
|
entityId: z.ZodString;
|
|
1531
1531
|
result: z.ZodEnum<{
|
|
1532
|
-
passed: "passed";
|
|
1533
1532
|
failed: "failed";
|
|
1533
|
+
passed: "passed";
|
|
1534
1534
|
lapsed: "lapsed";
|
|
1535
1535
|
}>;
|
|
1536
1536
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1816,8 +1816,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
1816
1816
|
receiverId: z.ZodString;
|
|
1817
1817
|
topic: z.ZodString;
|
|
1818
1818
|
status: z.ZodEnum<{
|
|
1819
|
-
done: "done";
|
|
1820
1819
|
open: "open";
|
|
1820
|
+
done: "done";
|
|
1821
1821
|
refused: "refused";
|
|
1822
1822
|
answered: "answered";
|
|
1823
1823
|
}>;
|
|
@@ -1850,8 +1850,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
1850
1850
|
summary: z.ZodString;
|
|
1851
1851
|
participantIds: z.ZodArray<z.ZodString>;
|
|
1852
1852
|
status: z.ZodEnum<{
|
|
1853
|
-
settled: "settled";
|
|
1854
1853
|
open: "open";
|
|
1854
|
+
settled: "settled";
|
|
1855
1855
|
}>;
|
|
1856
1856
|
resolution: z.ZodNullable<z.ZodString>;
|
|
1857
1857
|
changedAt: z.ZodNumber;
|
|
@@ -1860,8 +1860,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
1860
1860
|
title: z.ZodString;
|
|
1861
1861
|
summary: z.ZodString;
|
|
1862
1862
|
status: z.ZodEnum<{
|
|
1863
|
-
settled: "settled";
|
|
1864
1863
|
open: "open";
|
|
1864
|
+
settled: "settled";
|
|
1865
1865
|
}>;
|
|
1866
1866
|
resolution: z.ZodNullable<z.ZodString>;
|
|
1867
1867
|
latest: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1909,8 +1909,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
1909
1909
|
id: z.ZodString;
|
|
1910
1910
|
summary: z.ZodOptional<z.ZodString>;
|
|
1911
1911
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1912
|
-
settled: "settled";
|
|
1913
1912
|
open: "open";
|
|
1913
|
+
settled: "settled";
|
|
1914
1914
|
}>>;
|
|
1915
1915
|
}, z.core.$strip>>;
|
|
1916
1916
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1988,8 +1988,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
1988
1988
|
id: z.ZodString;
|
|
1989
1989
|
summary: z.ZodOptional<z.ZodString>;
|
|
1990
1990
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1991
|
-
settled: "settled";
|
|
1992
1991
|
open: "open";
|
|
1992
|
+
settled: "settled";
|
|
1993
1993
|
}>>;
|
|
1994
1994
|
}, z.core.$strip>>;
|
|
1995
1995
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2292,8 +2292,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2292
2292
|
id: z.ZodString;
|
|
2293
2293
|
summary: z.ZodOptional<z.ZodString>;
|
|
2294
2294
|
status: z.ZodOptional<z.ZodEnum<{
|
|
2295
|
-
settled: "settled";
|
|
2296
2295
|
open: "open";
|
|
2296
|
+
settled: "settled";
|
|
2297
2297
|
}>>;
|
|
2298
2298
|
}, z.core.$strip>>;
|
|
2299
2299
|
transfers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -2349,8 +2349,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2349
2349
|
kind: z.ZodLiteral<"tension.update">;
|
|
2350
2350
|
tensionId: z.ZodString;
|
|
2351
2351
|
status: z.ZodEnum<{
|
|
2352
|
-
settled: "settled";
|
|
2353
2352
|
open: "open";
|
|
2353
|
+
settled: "settled";
|
|
2354
2354
|
}>;
|
|
2355
2355
|
note: z.ZodNullable<z.ZodString>;
|
|
2356
2356
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2388,8 +2388,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2388
2388
|
id: z.ZodString;
|
|
2389
2389
|
type: z.ZodEnum<{
|
|
2390
2390
|
number: "number";
|
|
2391
|
-
text: "text";
|
|
2392
2391
|
id: "id";
|
|
2392
|
+
text: "text";
|
|
2393
2393
|
flag: "flag";
|
|
2394
2394
|
level: "level";
|
|
2395
2395
|
time: "time";
|
|
@@ -2500,8 +2500,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2500
2500
|
kind: z.ZodLiteral<"decision.close">;
|
|
2501
2501
|
entityId: z.ZodString;
|
|
2502
2502
|
result: z.ZodEnum<{
|
|
2503
|
-
passed: "passed";
|
|
2504
2503
|
failed: "failed";
|
|
2504
|
+
passed: "passed";
|
|
2505
2505
|
lapsed: "lapsed";
|
|
2506
2506
|
}>;
|
|
2507
2507
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2600,8 +2600,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2600
2600
|
id: z.ZodString;
|
|
2601
2601
|
type: z.ZodEnum<{
|
|
2602
2602
|
number: "number";
|
|
2603
|
-
text: "text";
|
|
2604
2603
|
id: "id";
|
|
2604
|
+
text: "text";
|
|
2605
2605
|
flag: "flag";
|
|
2606
2606
|
level: "level";
|
|
2607
2607
|
time: "time";
|
|
@@ -2695,8 +2695,8 @@ export declare const stateSchema: z.ZodObject<{
|
|
|
2695
2695
|
abstain: "abstain";
|
|
2696
2696
|
}>>>;
|
|
2697
2697
|
result: z.ZodOptional<z.ZodEnum<{
|
|
2698
|
-
passed: "passed";
|
|
2699
2698
|
failed: "failed";
|
|
2699
|
+
passed: "passed";
|
|
2700
2700
|
lapsed: "lapsed";
|
|
2701
2701
|
}>>;
|
|
2702
2702
|
settles: z.ZodOptional<z.ZodString>;
|
|
@@ -63,9 +63,9 @@ export declare const agentSchema: z.ZodObject<{
|
|
|
63
63
|
id: z.ZodString;
|
|
64
64
|
eventId: z.ZodString;
|
|
65
65
|
kind: z.ZodEnum<{
|
|
66
|
+
promise: "promise";
|
|
66
67
|
outcome: "outcome";
|
|
67
68
|
observation: "observation";
|
|
68
|
-
promise: "promise";
|
|
69
69
|
conflict: "conflict";
|
|
70
70
|
cooperation: "cooperation";
|
|
71
71
|
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-context
|
|
3
|
+
description: Build a repository overview through the available read tools.
|
|
4
|
+
allowed-tools: [read_file, list_directory, search, file_facts]
|
|
5
|
+
---
|
|
6
|
+
# Repository context
|
|
7
|
+
|
|
8
|
+
Use the available read tools to inspect the current repository within its allowed paths.
|
|
9
|
+
List its top-level files and directories.
|
|
10
|
+
Read its project manifests to identify languages, packages, and test commands.
|
|
11
|
+
Read project guidance such as AGENTS.md or CLAUDE.md when access is allowed.
|
|
12
|
+
Identify the main source, test, and documentation directories.
|
|
13
|
+
|
|
14
|
+
Answer the user's original question from the files you observe.
|
|
15
|
+
State which facts remain unknown.
|
|
16
|
+
Do not write files or execute commands.
|
package/dist/skills/registry.js
CHANGED
|
@@ -31,8 +31,9 @@ export async function loadIsolatedSkills(roots) {
|
|
|
31
31
|
return dedupeById(await loadSkills([...roots]));
|
|
32
32
|
}
|
|
33
33
|
async function loadAll() {
|
|
34
|
+
const explicit = isExplicitExtensionDiscovery();
|
|
34
35
|
const cfg = configStore.get();
|
|
35
|
-
const extraRoots =
|
|
36
|
+
const extraRoots = explicit
|
|
36
37
|
? []
|
|
37
38
|
: cfg.skills?.roots ?? [];
|
|
38
39
|
const bundledRoot = bundledMarkdownRoot();
|
|
@@ -44,14 +45,15 @@ async function loadAll() {
|
|
|
44
45
|
...extraRoots,
|
|
45
46
|
bundledRoot,
|
|
46
47
|
];
|
|
47
|
-
const markdownSkills = await loadSkills(mdRoots)
|
|
48
|
+
const markdownSkills = (await loadSkills(mdRoots)).filter(skill => explicit || skill.sourceRoot !== bundledRoot
|
|
49
|
+
|| !bundledCodeSkills.some(builtin => builtin.id === skill.id));
|
|
48
50
|
// Tag bundled-md skills so /skills list can label them.
|
|
49
51
|
for (const skill of markdownSkills) {
|
|
50
52
|
if (skill.sourceRoot === bundledRoot) {
|
|
51
53
|
skill.sourceRoot = 'bundled:md';
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
return dedupeById([...markdownSkills, ...bundledCodeSkills]);
|
|
56
|
+
return dedupeById([...markdownSkills, ...(explicit ? [] : bundledCodeSkills)]);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Load all skills across every channel. Memoized for CACHE_TTL_MS so a single
|
|
@@ -160,5 +162,7 @@ export function applyDisabledFilter(skills) {
|
|
|
160
162
|
}
|
|
161
163
|
/** Convenience: load skills and drop disabled ones in one call. */
|
|
162
164
|
export async function getVisibleSkills() {
|
|
165
|
+
if (isExplicitExtensionDiscovery())
|
|
166
|
+
return applyDisabledFilter(await loadAll());
|
|
163
167
|
return applyDisabledFilter(await getSkills());
|
|
164
168
|
}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Tool } from './agent/tools/types.js';
|
|
2
|
+
export type { Tool, ToolContext } from './agent/tools/types.js';
|
|
3
|
+
export { ToolCapability } from './agent/runtime/capabilities.js';
|
|
4
|
+
export type { ToolEffectKind } from './agent/runtime/tool_effects.js';
|
|
5
|
+
export declare function defaultTools(): Tool[];
|
|
6
|
+
export declare function selectTools(names: Iterable<string>): Tool[];
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defaultTools as cliTools } from './agent/tools/index.js';
|
|
2
|
+
export { ToolCapability } from './agent/runtime/capabilities.js';
|
|
3
|
+
export function defaultTools() {
|
|
4
|
+
return [...cliTools];
|
|
5
|
+
}
|
|
6
|
+
export function selectTools(names) {
|
|
7
|
+
const registry = new Map(cliTools.map(tool => [tool.definition.name, tool]));
|
|
8
|
+
return Array.from(names, name => {
|
|
9
|
+
const tool = registry.get(name);
|
|
10
|
+
if (!tool)
|
|
11
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
12
|
+
return tool;
|
|
13
|
+
});
|
|
14
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -111,7 +111,32 @@ export interface MessageInput {
|
|
|
111
111
|
text: string;
|
|
112
112
|
attachments: MessageAttachment[];
|
|
113
113
|
pane_id?: number;
|
|
114
|
+
/** Opaque caller key for durable admission; never model-facing context. */
|
|
115
|
+
correlation_id?: string;
|
|
114
116
|
}
|
|
117
|
+
export interface PromptTurnReceipt {
|
|
118
|
+
turn_id: string;
|
|
119
|
+
session_id: string;
|
|
120
|
+
pane_id: 0;
|
|
121
|
+
correlation_id: string;
|
|
122
|
+
revision: number;
|
|
123
|
+
state: 'admitted' | 'running' | 'completed' | 'failed' | 'interrupted';
|
|
124
|
+
failure_code?: 'agent_run_failed';
|
|
125
|
+
}
|
|
126
|
+
export type CorrelatedInputResult = {
|
|
127
|
+
ok: true;
|
|
128
|
+
turn: PromptTurnReceipt;
|
|
129
|
+
} | {
|
|
130
|
+
ok: false;
|
|
131
|
+
reason: 'input_conflict' | 'input_not_admitted' | 'input_unavailable';
|
|
132
|
+
refusal?: {
|
|
133
|
+
schema_version: 1;
|
|
134
|
+
session_id: string;
|
|
135
|
+
pane_id: 0;
|
|
136
|
+
correlation_id: string;
|
|
137
|
+
code: 'persistent_goal_unsupported';
|
|
138
|
+
};
|
|
139
|
+
};
|
|
115
140
|
/** Usage belongs to the prompt which dispatched the request, including its workers. */
|
|
116
141
|
export interface ModelUsage extends TokenUsage {
|
|
117
142
|
/** The call completed without reporting usage; a complete total is unavailable. */
|
|
@@ -129,6 +154,11 @@ export interface PromptTurnMetadata {
|
|
|
129
154
|
tokens: number;
|
|
130
155
|
estimated: boolean;
|
|
131
156
|
usageIncomplete?: boolean;
|
|
157
|
+
correlationId?: string;
|
|
158
|
+
inputSha256?: string;
|
|
159
|
+
state?: PromptTurnReceipt['state'];
|
|
160
|
+
revision?: number;
|
|
161
|
+
failureCode?: 'agent_run_failed';
|
|
132
162
|
}
|
|
133
163
|
/** Bounded, source-linked host warning about a claim; not an execution receipt. */
|
|
134
164
|
export interface HostClaimObservation {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { type NativeWorkspaceState } from '../../desktop/daily/native_records.js';
|
|
1
2
|
import type { MuxPaneState, MuxSessionState } from './protocol.js';
|
|
3
|
+
export declare const MAX_WORKSPACE_PANES = 256;
|
|
2
4
|
export interface MuxPersistenceOptions {
|
|
3
5
|
allowNestedZtc: boolean;
|
|
4
6
|
}
|
|
5
7
|
export declare function resolveMuxPersistenceOptions(env?: NodeJS.ProcessEnv): MuxPersistenceOptions;
|
|
6
8
|
export declare function shouldPersistMuxPaneType(paneType: string, options: MuxPersistenceOptions): boolean;
|
|
7
9
|
export declare function isMuxPaneRestorable(pane: Pick<MuxPaneState, 'id' | 'pane_type' | 'agent_session'>, options: MuxPersistenceOptions): boolean;
|
|
8
|
-
export declare function sanitizeMuxSessionState(state:
|
|
10
|
+
export declare function sanitizeMuxSessionState(state: NativeWorkspaceState, options: MuxPersistenceOptions): NativeWorkspaceState;
|
|
9
11
|
/** Decode/admit a bounded checkpoint before traversing it or changing live panes. */
|
|
10
12
|
export declare function validateWorkspaceState(value: unknown): asserts value is MuxSessionState;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { nativeWorkspaceState, parseNativeRecords } from '../../desktop/daily/native_records.js';
|
|
2
|
+
export const MAX_WORKSPACE_PANES = 256;
|
|
1
3
|
export function resolveMuxPersistenceOptions(env = process.env) {
|
|
2
4
|
return {
|
|
3
5
|
allowNestedZtc: env.ZTC_COLONY_CHILD === '1',
|
|
@@ -34,6 +36,7 @@ function pruneMuxLayoutNode(node, allowedPaneIds) {
|
|
|
34
36
|
}
|
|
35
37
|
export function sanitizeMuxSessionState(state, options) {
|
|
36
38
|
validateWorkspaceState(state);
|
|
39
|
+
state = nativeWorkspaceState(state);
|
|
37
40
|
const panes = state.panes.filter((pane) => isMuxPaneRestorable(pane, options));
|
|
38
41
|
const allowedPaneIds = new Set([0, ...panes.map((pane) => pane.id)]);
|
|
39
42
|
const layout = pruneMuxLayoutNode(state.layout, allowedPaneIds) || { type: 'leaf', pane_id: 0 };
|
|
@@ -79,8 +82,8 @@ export function validateWorkspaceState(value) {
|
|
|
79
82
|
const saved = object(value);
|
|
80
83
|
if (saved.schema_version !== undefined && saved.schema_version !== 1)
|
|
81
84
|
throw new Error(`Unsupported workspace schema version ${String(saved.schema_version)}`);
|
|
82
|
-
if (!Array.isArray(saved.panes) || saved.panes.length >
|
|
83
|
-
throw new Error(
|
|
85
|
+
if (!Array.isArray(saved.panes) || saved.panes.length > MAX_WORKSPACE_PANES)
|
|
86
|
+
throw new Error(`Workspace requires at most ${MAX_WORKSPACE_PANES} panes`);
|
|
84
87
|
const paneIds = new Set();
|
|
85
88
|
for (const entry of saved.panes) {
|
|
86
89
|
const pane = object(entry);
|
|
@@ -90,6 +93,8 @@ export function validateWorkspaceState(value) {
|
|
|
90
93
|
paneIds.add(paneId);
|
|
91
94
|
text(pane.title, 4096);
|
|
92
95
|
text(pane.pane_type, 64);
|
|
96
|
+
if (pane.desktop_status !== undefined && typeof pane.desktop_status !== 'boolean')
|
|
97
|
+
throw new Error('Workspace Status role must be a boolean');
|
|
93
98
|
for (const key of ['command', 'cwd'])
|
|
94
99
|
if (pane[key] !== undefined && pane[key] !== null)
|
|
95
100
|
text(pane[key], 65536);
|
|
@@ -111,6 +116,8 @@ export function validateWorkspaceState(value) {
|
|
|
111
116
|
&& (typeof pane.restoration_status !== 'string' || !['not_started', 'missing_command', 'missing_directory', 'session_missing', 'session_active_elsewhere', 'session_unreadable'].includes(pane.restoration_status)))
|
|
112
117
|
throw new Error('Unknown workspace restoration status');
|
|
113
118
|
}
|
|
119
|
+
if (saved.native_tools !== undefined)
|
|
120
|
+
parseNativeRecords(saved.native_tools, paneIds);
|
|
114
121
|
paneIds.add(0);
|
|
115
122
|
const layout = (v, depth = 0) => {
|
|
116
123
|
if (depth > 64)
|