@zergai/ztc 0.4.0-beta.1 → 0.5.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 +398 -45
- package/RUST_THIRD_PARTY_LICENSES.txt +1080 -822
- package/THIRD_PARTY_NOTICES.md +273 -12
- 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-computer-darwin-arm64 +0 -0
- package/bin/ztc-llm-darwin-arm64 +0 -0
- package/bin/ztc-tts-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/ztc-zlicky-overlay-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +0 -0
- package/dist/App.js +1206 -209
- package/dist/agent/agent.d.ts +74 -8
- package/dist/agent/agent.js +1073 -184
- package/dist/agent/backends/account_rotation.d.ts +4 -0
- package/dist/agent/backends/account_rotation.js +8 -2
- package/dist/agent/backends/anthropic.d.ts +13 -0
- package/dist/agent/backends/anthropic.js +169 -28
- package/dist/agent/backends/claude_cli.js +18 -8
- package/dist/agent/backends/codex_app_server.d.ts +1 -0
- package/dist/agent/backends/codex_app_server.js +55 -3
- package/dist/agent/backends/codex_auth.d.ts +1 -0
- package/dist/agent/backends/codex_auth.js +67 -13
- package/dist/agent/backends/codex_buffered_recovery.d.ts +27 -0
- package/dist/agent/backends/codex_buffered_recovery.js +293 -0
- package/dist/agent/backends/gemini.js +3 -1
- package/dist/agent/backends/http_error.d.ts +26 -0
- package/dist/agent/backends/http_error.js +221 -0
- package/dist/agent/backends/index.d.ts +9 -2
- package/dist/agent/backends/index.js +22 -2
- package/dist/agent/backends/openai.d.ts +0 -6
- package/dist/agent/backends/openai.js +5 -2
- package/dist/agent/backends/openai_compatible.d.ts +5 -4
- package/dist/agent/backends/openai_compatible.js +26 -19
- package/dist/agent/backends/openai_responses.d.ts +8 -3
- package/dist/agent/backends/openai_responses.js +77 -33
- package/dist/agent/backends/provider_ids.d.ts +1 -0
- package/dist/agent/backends/provider_ids.js +4 -0
- package/dist/agent/backends/request_metrics.js +12 -2
- package/dist/agent/backends/types.d.ts +109 -6
- package/dist/agent/backends/types.js +5 -1
- package/dist/agent/backends/zrouter_stream.d.ts +6 -1
- package/dist/agent/backends/zrouter_stream.js +160 -42
- package/dist/agent/background_registry.d.ts +2 -0
- package/dist/agent/background_registry.js +1 -0
- package/dist/agent/claim_observation.d.ts +6 -0
- package/dist/agent/claim_observation.js +54 -0
- package/dist/agent/commands/accounts.js +46 -177
- package/dist/agent/commands/attention.d.ts +2 -0
- package/dist/agent/commands/attention.js +67 -0
- package/dist/agent/commands/auth.js +18 -2
- package/dist/agent/commands/board.d.ts +2 -0
- package/dist/agent/commands/board.js +169 -0
- package/dist/agent/commands/clipboard.js +50 -1
- package/dist/agent/commands/compact.js +21 -13
- package/dist/agent/commands/config.js +4 -1
- package/dist/agent/commands/context.js +6 -1
- package/dist/agent/commands/desktop.d.ts +2 -0
- package/dist/agent/commands/desktop.js +29 -0
- package/dist/agent/commands/effort.js +14 -6
- package/dist/agent/commands/environment.d.ts +3 -0
- package/dist/agent/commands/environment.js +109 -0
- package/dist/agent/commands/evidence.d.ts +2 -0
- package/dist/agent/commands/evidence.js +9 -0
- package/dist/agent/commands/fork.js +4 -3
- package/dist/agent/commands/goal.d.ts +33 -1
- package/dist/agent/commands/goal.js +174 -14
- package/dist/agent/commands/goal_exit.d.ts +36 -0
- package/dist/agent/commands/goal_exit.js +120 -0
- package/dist/agent/commands/help.js +3 -1
- package/dist/agent/commands/history.js +3 -1
- package/dist/agent/commands/inbox.d.ts +2 -0
- package/dist/agent/commands/inbox.js +148 -0
- package/dist/agent/commands/index.js +16 -1
- package/dist/agent/commands/input_mode.js +8 -6
- package/dist/agent/commands/job.d.ts +2 -0
- package/dist/agent/commands/job.js +93 -0
- package/dist/agent/commands/keybindings.js +4 -1
- package/dist/agent/commands/label.d.ts +2 -0
- package/dist/agent/commands/label.js +77 -0
- package/dist/agent/commands/layout.d.ts +2 -0
- package/dist/agent/commands/layout.js +20 -0
- package/dist/agent/commands/mirror.js +16 -1
- package/dist/agent/commands/model.js +12 -2
- package/dist/agent/commands/permissions.d.ts +3 -1
- package/dist/agent/commands/permissions.js +79 -89
- package/dist/agent/commands/plan.js +5 -15
- package/dist/agent/commands/profile.js +21 -2
- package/dist/agent/commands/provider_selection.js +20 -1
- package/dist/agent/commands/rename.js +1 -1
- package/dist/agent/commands/resources.d.ts +2 -0
- package/dist/agent/commands/resources.js +67 -0
- package/dist/agent/commands/rewind.d.ts +3 -0
- package/dist/agent/commands/rewind.js +16 -0
- package/dist/agent/commands/runbooks.d.ts +2 -0
- package/dist/agent/commands/runbooks.js +73 -0
- package/dist/agent/commands/runbooks_lazy.d.ts +2 -0
- package/dist/agent/commands/runbooks_lazy.js +8 -0
- package/dist/agent/commands/sessions.d.ts +1 -1
- package/dist/agent/commands/sessions.js +33 -5
- package/dist/agent/commands/settings.js +185 -39
- package/dist/agent/commands/setup.d.ts +2 -0
- package/dist/agent/commands/setup.js +78 -0
- package/dist/agent/commands/share.d.ts +2 -0
- package/dist/agent/commands/share.js +64 -0
- package/dist/agent/commands/status.js +14 -2
- package/dist/agent/commands/types.d.ts +99 -6
- package/dist/agent/commands/update.js +8 -0
- package/dist/agent/commands/usage.d.ts +2 -0
- package/dist/agent/commands/usage.js +8 -0
- package/dist/agent/factory.d.ts +11 -0
- package/dist/agent/factory.js +113 -88
- package/dist/agent/loop_policy.d.ts +6 -3
- package/dist/agent/loop_policy.js +12 -3
- package/dist/agent/measurement_guidance.d.ts +2 -0
- package/dist/agent/measurement_guidance.js +5 -0
- package/dist/agent/request_encoder.d.ts +8 -1
- package/dist/agent/request_encoder.js +95 -23
- package/dist/agent/runtime/benchmark_comparison.d.ts +30 -0
- package/dist/agent/runtime/benchmark_comparison.js +94 -0
- package/dist/agent/runtime/benchmark_contract.d.ts +48 -0
- package/dist/agent/runtime/benchmark_contract.js +90 -0
- package/dist/agent/runtime/checked_commands.d.ts +32 -0
- package/dist/agent/runtime/checked_commands.js +119 -0
- package/dist/agent/runtime/command_execution_policy.d.ts +26 -0
- package/dist/agent/runtime/command_execution_policy.js +91 -0
- package/dist/agent/runtime/command_jobs.d.ts +36 -18
- package/dist/agent/runtime/command_jobs.js +151 -13
- package/dist/agent/runtime/command_panes.d.ts +59 -0
- package/dist/agent/runtime/command_panes.js +398 -0
- package/dist/agent/runtime/command_wait.d.ts +19 -0
- package/dist/agent/runtime/command_wait.js +167 -0
- package/dist/agent/runtime/cpu_benchmark.d.ts +30 -0
- package/dist/agent/runtime/cpu_benchmark.js +126 -0
- package/dist/agent/runtime/delegated_evidence.d.ts +26 -0
- package/dist/agent/runtime/delegated_evidence.js +80 -0
- package/dist/agent/runtime/evidence.d.ts +127 -0
- package/dist/agent/runtime/evidence.js +468 -0
- package/dist/agent/runtime/execution_context.d.ts +7 -0
- package/dist/agent/runtime/execution_context.js +39 -3
- package/dist/agent/runtime/json_verifier_recipe.d.ts +8 -0
- package/dist/agent/runtime/json_verifier_recipe.js +66 -0
- package/dist/agent/runtime/measurements.d.ts +110 -0
- package/dist/agent/runtime/measurements.js +317 -0
- package/dist/agent/runtime/policy.d.ts +4 -0
- package/dist/agent/runtime/policy.js +31 -20
- package/dist/agent/runtime/provider_native_evidence.d.ts +20 -0
- package/dist/agent/runtime/provider_native_evidence.js +86 -0
- package/dist/agent/runtime/recovery.d.ts +2 -0
- package/dist/agent/runtime/recovery.js +45 -2
- package/dist/agent/runtime/remote_broker_transport.d.ts +10 -0
- package/dist/agent/runtime/remote_broker_transport.js +84 -0
- package/dist/agent/runtime/remote_deletion_receipts.d.ts +3 -0
- package/dist/agent/runtime/remote_deletion_receipts.js +43 -0
- package/dist/agent/runtime/remote_journal_replay.d.ts +13 -0
- package/dist/agent/runtime/remote_journal_replay.js +233 -0
- package/dist/agent/runtime/remote_mutation_journal.d.ts +25 -0
- package/dist/agent/runtime/remote_mutation_journal.js +208 -0
- package/dist/agent/runtime/remote_resource_endpoint.d.ts +7 -0
- package/dist/agent/runtime/remote_resource_endpoint.js +6 -0
- package/dist/agent/runtime/remote_resource_errors.d.ts +5 -0
- package/dist/agent/runtime/remote_resource_errors.js +9 -0
- package/dist/agent/runtime/remote_resource_script.d.ts +2 -0
- package/dist/agent/runtime/remote_resource_script.js +1009 -0
- package/dist/agent/runtime/remote_resources.d.ts +29 -0
- package/dist/agent/runtime/remote_resources.js +160 -0
- package/dist/agent/runtime/source_verification.d.ts +12 -0
- package/dist/agent/runtime/source_verification.js +210 -0
- package/dist/agent/runtime/source_verification_contract.d.ts +75 -0
- package/dist/agent/runtime/source_verification_contract.js +203 -0
- package/dist/agent/runtime/tool_checkpoints.d.ts +11 -0
- package/dist/agent/runtime/tool_checkpoints.js +26 -0
- package/dist/agent/runtime/tool_effects.d.ts +5 -0
- package/dist/agent/runtime/tool_progress.d.ts +12 -0
- package/dist/agent/runtime/tool_progress.js +76 -0
- package/dist/agent/runtime/tool_runtime.d.ts +16 -1
- package/dist/agent/runtime/tool_runtime.js +204 -10
- package/dist/agent/runtime/tracing.d.ts +1 -1
- package/dist/agent/runtime/verifier_capture.d.ts +9 -0
- package/dist/agent/runtime/verifier_capture.js +100 -0
- package/dist/agent/runtime/verifier_contract.d.ts +24 -0
- package/dist/agent/runtime/verifier_contract.js +41 -0
- package/dist/agent/subagent.d.ts +20 -10
- package/dist/agent/subagent.js +266 -29
- package/dist/agent/tool_response_directory.d.ts +24 -0
- package/dist/agent/tool_response_directory.js +61 -0
- package/dist/agent/tool_response_source.d.ts +8 -0
- package/dist/agent/tool_response_source.js +49 -0
- package/dist/agent/tool_response_store.d.ts +75 -4
- package/dist/agent/tool_response_store.js +583 -64
- package/dist/agent/tools/ask_user.d.ts +3 -1
- package/dist/agent/tools/ask_user.js +30 -11
- package/dist/agent/tools/background.js +1 -0
- package/dist/agent/tools/benchmark_cpu.d.ts +2 -0
- package/dist/agent/tools/benchmark_cpu.js +102 -0
- package/dist/agent/tools/compare_benchmarks.d.ts +2 -0
- package/dist/agent/tools/compare_benchmarks.js +53 -0
- package/dist/agent/tools/deferred.js +1 -0
- package/dist/agent/tools/delegate.js +18 -2
- package/dist/agent/tools/helper_requirements.d.ts +7 -0
- package/dist/agent/tools/helper_requirements.js +19 -0
- package/dist/agent/tools/index.d.ts +1 -0
- package/dist/agent/tools/index.js +3 -0
- package/dist/agent/tools/measurement_report.d.ts +22 -0
- package/dist/agent/tools/measurement_report.js +190 -0
- package/dist/agent/tools/pane.d.ts +0 -7
- package/dist/agent/tools/pane.js +5 -4
- package/dist/agent/tools/project_context.d.ts +3 -0
- package/dist/agent/tools/project_context.js +45 -0
- package/dist/agent/tools/recall_tool_response.d.ts +3 -5
- package/dist/agent/tools/recall_tool_response.js +19 -29
- package/dist/agent/tools/registry.d.ts +1 -0
- package/dist/agent/tools/registry.js +23 -0
- package/dist/agent/tools/related_sessions.d.ts +2 -0
- package/dist/agent/tools/related_sessions.js +156 -0
- package/dist/agent/tools/routine.js +13 -3
- package/dist/agent/tools/session_evidence.d.ts +3 -0
- package/dist/agent/tools/session_evidence.js +72 -0
- package/dist/agent/tools/shell.d.ts +4 -3
- package/dist/agent/tools/shell.js +174 -47
- package/dist/agent/tools/tool_search.js +3 -2
- package/dist/agent/tools/types.d.ts +28 -0
- package/dist/agent/tools/verify_artifact.d.ts +2 -0
- package/dist/agent/tools/verify_artifact.js +60 -0
- package/dist/agent/tools/workflow.js +1 -0
- package/dist/app/activity.d.ts +6 -1
- package/dist/app/activity.js +81 -12
- package/dist/app/agent_runner.d.ts +6 -1
- package/dist/app/agent_runner.js +34 -19
- package/dist/app/command_context.js +106 -10
- package/dist/app/controller.d.ts +15 -4
- package/dist/app/controller.js +29 -3
- package/dist/app/escape_stop.d.ts +11 -0
- package/dist/app/escape_stop.js +15 -0
- package/dist/app/liveness.d.ts +6 -4
- package/dist/app/liveness.js +13 -3
- package/dist/app/model_catalog_cache.d.ts +5 -0
- package/dist/app/model_catalog_cache.js +138 -0
- package/dist/app/ordered_transcript.js +43 -4
- package/dist/app/prompt_turn.d.ts +14 -0
- package/dist/app/prompt_turn.js +53 -0
- package/dist/app/recap.d.ts +3 -0
- package/dist/app/recap.js +9 -3
- package/dist/app/restart.d.ts +3 -2
- package/dist/app/restart.js +22 -7
- package/dist/app/rewind.d.ts +3 -3
- package/dist/app/rewind.js +3 -3
- package/dist/app/selection_completion.d.ts +17 -2
- package/dist/app/selection_completion.js +84 -9
- package/dist/app/session_manager.d.ts +38 -6
- package/dist/app/session_manager.js +263 -60
- package/dist/app/session_messages.d.ts +3 -0
- package/dist/app/session_messages.js +60 -0
- package/dist/app/task_scope_router.d.ts +20 -0
- package/dist/app/task_scope_router.js +173 -0
- package/dist/app/transcript_window.d.ts +2 -0
- package/dist/app/transcript_window.js +4 -0
- package/dist/app/workspace_admission_details.d.ts +3 -0
- package/dist/app/workspace_admission_details.js +26 -0
- package/dist/app/workspace_layout_controller.d.ts +11 -0
- package/dist/app/workspace_layout_controller.js +88 -0
- package/dist/app/workspace_monitor.d.ts +1 -0
- package/dist/app/workspace_monitor.js +216 -0
- package/dist/app/workspace_presets.d.ts +29 -0
- package/dist/app/workspace_presets.js +192 -0
- package/dist/attention/queue.d.ts +37 -0
- package/dist/attention/queue.js +183 -0
- package/dist/bench/rf_shared.d.ts +2 -0
- package/dist/board/binding.d.ts +42 -0
- package/dist/board/binding.js +38 -0
- package/dist/board/client.d.ts +42 -0
- package/dist/board/client.js +60 -0
- package/dist/cli.js +1 -1
- package/dist/cli_args.js +19 -17
- package/dist/cli_main.js +110 -13
- package/dist/cli_ratatui.d.ts +183 -16
- package/dist/cli_ratatui.js +3989 -1255
- package/dist/components/ActivityLine.d.ts +3 -2
- package/dist/components/ActivityLine.js +2 -2
- package/dist/components/InputArea.d.ts +19 -1
- package/dist/components/InputArea.js +264 -190
- package/dist/components/MessageList.d.ts +2 -0
- package/dist/components/MessageList.js +3 -1
- package/dist/components/SingleMessage.d.ts +2 -0
- package/dist/components/SingleMessage.js +4 -2
- package/dist/components/StatusBar.d.ts +4 -2
- package/dist/components/StatusBar.js +3 -1
- package/dist/conductor_branch.js +3 -0
- package/dist/config/api_retry.d.ts +6 -1
- package/dist/config/api_retry.js +19 -1
- package/dist/config/defaults.d.ts +2 -1
- package/dist/config/defaults.js +9 -2
- package/dist/config/message_display.d.ts +1 -0
- package/dist/config/message_display.js +17 -2
- package/dist/config/permissions.d.ts +21 -0
- package/dist/config/permissions.js +89 -0
- package/dist/config/resolved.d.ts +2 -2
- package/dist/config/types.d.ts +32 -5
- package/dist/config.d.ts +38 -4
- package/dist/config.js +290 -42
- package/dist/context/project_intelligence.d.ts +44 -0
- package/dist/context/project_intelligence.js +246 -0
- package/dist/desktop/cli_launch.d.ts +8 -0
- package/dist/desktop/cli_launch.js +6 -0
- package/dist/desktop/cli_shim.d.ts +8 -0
- package/dist/desktop/cli_shim.js +120 -0
- package/dist/desktop/runtime.d.ts +16 -0
- package/dist/desktop/runtime.js +161 -0
- package/dist/desktop/worker_launch.d.ts +7 -0
- package/dist/desktop/worker_launch.js +7 -0
- package/dist/diagnostics/cargo_mutants_selection.d.ts +27 -0
- package/dist/diagnostics/cargo_mutants_selection.js +48 -0
- package/dist/diagnostics/native_terminal_benchmark.d.ts +58 -0
- package/dist/diagnostics/native_terminal_benchmark.js +1247 -0
- package/dist/diagnostics/session_evidence_package.d.ts +40 -0
- package/dist/diagnostics/session_evidence_package.js +234 -0
- package/dist/diagnostics/session_export.d.ts +93 -0
- package/dist/diagnostics/session_export.js +634 -0
- package/dist/emulation/tool_adapters.js +48 -18
- package/dist/emulation/ztc_addendum.d.ts +1 -0
- package/dist/emulation/ztc_addendum.js +13 -12
- package/dist/environment/service_runner.d.ts +1 -0
- package/dist/environment/service_runner.js +68 -0
- package/dist/environment/store.d.ts +120 -0
- package/dist/environment/store.js +387 -0
- package/dist/events.d.ts +40 -1
- package/dist/events.js +10 -17
- package/dist/goal_contract.d.ts +25 -0
- package/dist/goal_contract.js +44 -0
- package/dist/headless.d.ts +31 -0
- package/dist/headless.js +578 -70
- package/dist/headless_cli.js +8 -0
- package/dist/headless_cli_args.d.ts +1 -0
- package/dist/headless_cli_args.js +1 -0
- package/dist/intake/cli.d.ts +1 -0
- package/dist/intake/cli.js +33 -0
- package/dist/intake/format.d.ts +2 -0
- package/dist/intake/format.js +14 -0
- package/dist/intake/notifications.d.ts +16 -0
- package/dist/intake/notifications.js +132 -0
- package/dist/intake/store.d.ts +56 -0
- package/dist/intake/store.js +238 -0
- package/dist/library.d.ts +8 -0
- package/dist/library.js +19 -10
- package/dist/mcp/client.d.ts +1 -0
- package/dist/mcp/client.js +20 -0
- package/dist/modes/builtin/plan.yaml +2 -2
- package/dist/modes/handlers.js +1 -1
- package/dist/onboarding/first_run.d.ts +3 -0
- package/dist/onboarding/first_run.js +33 -25
- package/dist/onboarding/setup.d.ts +32 -0
- package/dist/onboarding/setup.js +133 -0
- package/dist/onboarding/setup_agent_health.d.ts +17 -0
- package/dist/onboarding/setup_agent_health.js +79 -0
- package/dist/onboarding/setup_environment.d.ts +66 -0
- package/dist/onboarding/setup_environment.js +219 -0
- package/dist/onboarding/setup_workspace.d.ts +17 -0
- package/dist/onboarding/setup_workspace.js +129 -0
- package/dist/optimize/adapters/index.d.ts +4 -1
- package/dist/optimize/adapters/index.js +7 -0
- package/dist/optimize/adapters/kernelbench.js +14 -5
- package/dist/optimize/adapters/popcorn.js +3 -2
- package/dist/optimize/adapters/profile_benchmark.js +13 -7
- package/dist/optimize/adapters/rfbench.js +25 -14
- package/dist/optimize/adapters/types.d.ts +3 -0
- package/dist/optimize/adapters/zergpod.js +5 -2
- package/dist/optimize/baseline.js +10 -21
- package/dist/optimize/branch.js +9 -12
- package/dist/optimize/combine.js +2 -3
- package/dist/optimize/executor.js +34 -48
- package/dist/optimize/measurements.d.ts +55 -0
- package/dist/optimize/measurements.js +173 -0
- package/dist/optimize/results.d.ts +1 -0
- package/dist/optimize/results.js +11 -33
- package/dist/optimize/tge.js +2 -1
- package/dist/panes/initial_input.d.ts +19 -0
- package/dist/panes/initial_input.js +206 -0
- package/dist/panes/labels.d.ts +16 -0
- package/dist/panes/labels.js +42 -0
- package/dist/panes/model_catalog.d.ts +3 -3
- package/dist/panes/model_catalog.js +28 -4
- package/dist/panes/pane_registry.js +6 -2
- package/dist/panes/types.d.ts +3 -0
- package/dist/panes/ztc_launch.js +19 -0
- package/dist/plugin/optimization.d.ts +2 -0
- package/dist/plugin/optimization.js +1 -0
- package/dist/plugin/runtime.d.ts +2 -0
- package/dist/plugin/simulation.d.ts +6 -1
- package/dist/plugin/simulation_contract.d.ts +836 -1
- package/dist/plugin/simulation_documents.d.ts +22 -0
- package/dist/plugin/simulation_documents.js +1 -0
- package/dist/plugin/simulation_interventions.d.ts +103 -0
- package/dist/plugin/simulation_interventions.js +1 -0
- package/dist/plugin/simulation_living.d.ts +1 -0
- package/dist/plugin/simulation_living.js +3 -0
- package/dist/plugin/simulation_meetings.d.ts +121 -0
- package/dist/plugin/simulation_meetings.js +1 -0
- package/dist/plugin/simulation_story_review.d.ts +111 -0
- package/dist/plugin/simulation_story_review.js +1 -0
- package/dist/plugin/simulation_storyteller.d.ts +91 -0
- package/dist/plugin/simulation_storyteller.js +1 -0
- package/dist/plugin/simulation_structured.d.ts +2 -0
- package/dist/plugin/simulation_structured.js +2 -0
- package/dist/plugin/simulation_toolkit.d.ts +21 -0
- package/dist/plugin/simulation_toolkit.js +24 -0
- package/dist/prompts/tool_delegate_task.j2 +1 -1
- package/dist/remote-broker/Dockerfile +10 -0
- package/dist/remote-broker/archive.py +1227 -0
- package/dist/remote-broker/cutover.py +761 -0
- package/dist/remote-broker/requirements.txt +5 -0
- package/dist/remote-broker/resources.json +6 -0
- package/dist/remote-broker/resources.write-staging.example.json +18 -0
- package/dist/remote-broker/retained.py +686 -0
- package/dist/remote-broker/retained_cleanup.py +550 -0
- package/dist/remote-broker/server.py +648 -0
- package/dist/remote-broker/worker.py +1007 -0
- package/dist/router_auth.d.ts +31 -0
- package/dist/router_auth.js +155 -9
- package/dist/runbooks/catalog.d.ts +3 -0
- package/dist/runbooks/catalog.js +26 -0
- package/dist/runbooks/library.d.ts +11 -0
- package/dist/runbooks/library.js +95 -0
- package/dist/runbooks/package.d.ts +43 -0
- package/dist/runbooks/package.js +102 -0
- package/dist/session.d.ts +65 -13
- package/dist/session.js +548 -43
- package/dist/session_handoff.d.ts +25 -0
- package/dist/session_handoff.js +322 -0
- package/dist/session_handoff_contract.d.ts +89 -0
- package/dist/session_handoff_contract.js +179 -0
- package/dist/session_media.d.ts +41 -0
- package/dist/session_media.js +357 -0
- package/dist/session_ownership.d.ts +16 -0
- package/dist/session_ownership.js +221 -0
- package/dist/session_public.d.ts +10 -2
- package/dist/session_public.js +6 -1
- package/dist/simulation/dynamic_history.d.ts +42 -0
- package/dist/simulation/dynamic_history.js +173 -0
- package/dist/simulation/engines/swarm/pane_manager.js +7 -6
- package/dist/simulation/inference.d.ts +3 -1
- package/dist/simulation/inference.js +19 -1
- package/dist/simulation/intervention_generation.d.ts +27 -0
- package/dist/simulation/intervention_generation.js +246 -0
- package/dist/simulation/intervention_material.d.ts +4 -0
- package/dist/simulation/intervention_material.js +81 -0
- package/dist/simulation/living/context.d.ts +3130 -0
- package/dist/simulation/living/context.js +944 -0
- package/dist/simulation/living/definer.d.ts +12 -0
- package/dist/simulation/living/definer.js +223 -0
- package/dist/simulation/living/definition.d.ts +257 -0
- package/dist/simulation/living/definition.js +341 -0
- package/dist/simulation/living/frame.d.ts +259 -0
- package/dist/simulation/living/frame.js +223 -0
- package/dist/simulation/living/identifiers.d.ts +2 -0
- package/dist/simulation/living/identifiers.js +12 -0
- package/dist/simulation/living/index.d.ts +15 -0
- package/dist/simulation/living/index.js +15 -0
- package/dist/simulation/living/inference.d.ts +219 -0
- package/dist/simulation/living/inference.js +576 -0
- package/dist/simulation/living/mechanics.d.ts +54 -0
- package/dist/simulation/living/mechanics.js +588 -0
- package/dist/simulation/living/model-input.d.ts +25 -0
- package/dist/simulation/living/model-input.js +215 -0
- package/dist/simulation/living/open-world.d.ts +257 -0
- package/dist/simulation/living/open-world.js +102 -0
- package/dist/simulation/living/projection.d.ts +7 -0
- package/dist/simulation/living/projection.js +31 -0
- package/dist/simulation/living/recall.d.ts +17 -0
- package/dist/simulation/living/recall.js +25 -0
- package/dist/simulation/living/reduce.d.ts +15 -0
- package/dist/simulation/living/reduce.js +1853 -0
- package/dist/simulation/living/replay.d.ts +6 -0
- package/dist/simulation/living/replay.js +22 -0
- package/dist/simulation/living/runtime.d.ts +140 -0
- package/dist/simulation/living/runtime.js +3020 -0
- package/dist/simulation/living/shared-kinds.d.ts +24 -0
- package/dist/simulation/living/shared-kinds.js +96 -0
- package/dist/simulation/living/types.d.ts +2785 -0
- package/dist/simulation/living/types.js +669 -0
- package/dist/simulation/llm.d.ts +3 -1
- package/dist/simulation/llm.js +90 -30
- package/dist/simulation/memory/embedding.d.ts +1 -1
- package/dist/simulation/memory/embedding.js +9 -3
- package/dist/simulation/memory/filesystem.d.ts +2 -0
- package/dist/simulation/memory/filesystem.js +5 -1
- package/dist/simulation/memory/filesystem_file_tree.d.ts +4 -1
- package/dist/simulation/memory/filesystem_file_tree.js +41 -10
- package/dist/simulation/memory/filesystem_invariants.js +1 -2
- package/dist/simulation/memory/filesystem_types.d.ts +1 -0
- package/dist/simulation/memory/memory.d.ts +2 -0
- package/dist/simulation/memory/memory.js +5 -1
- package/dist/simulation/orchestration/intent.js +0 -2
- package/dist/simulation/orchestration/lifecycle.js +0 -2
- package/dist/simulation/plugin_host.d.ts +25 -1
- package/dist/simulation/plugin_host.js +334 -17
- package/dist/simulation/session_documents.d.ts +20 -0
- package/dist/simulation/session_documents.js +62 -0
- package/dist/simulation/session_input_validation.d.ts +43 -0
- package/dist/simulation/session_input_validation.js +364 -0
- package/dist/simulation/session_inputs.d.ts +32 -0
- package/dist/simulation/session_inputs.js +154 -0
- package/dist/simulation/telemetry.d.ts +11 -14
- package/dist/simulation/telemetry.js +177 -54
- package/dist/simulation/toolkit/bounded_turns.d.ts +13 -0
- package/dist/simulation/toolkit/bounded_turns.js +80 -0
- package/dist/simulation/toolkit/dynamic_agents.d.ts +25 -0
- package/dist/simulation/toolkit/dynamic_agents.js +218 -0
- package/dist/simulation/toolkit/dynamic_digest.d.ts +1 -0
- package/dist/simulation/toolkit/dynamic_digest.js +8 -0
- package/dist/simulation/toolkit/dynamic_documents.d.ts +7 -0
- package/dist/simulation/toolkit/dynamic_documents.js +71 -0
- package/dist/simulation/toolkit/dynamic_driver.d.ts +8 -0
- package/dist/simulation/toolkit/dynamic_driver.js +269 -0
- package/dist/simulation/toolkit/dynamic_game.d.ts +53 -0
- package/dist/simulation/toolkit/dynamic_game.js +805 -0
- package/dist/simulation/toolkit/dynamic_knowledge.d.ts +15 -0
- package/dist/simulation/toolkit/dynamic_knowledge.js +91 -0
- package/dist/simulation/toolkit/dynamic_mechanics.d.ts +22 -0
- package/dist/simulation/toolkit/dynamic_mechanics.js +910 -0
- package/dist/simulation/toolkit/dynamic_meetings.d.ts +239 -0
- package/dist/simulation/toolkit/dynamic_meetings.js +350 -0
- package/dist/simulation/toolkit/dynamic_progress.d.ts +131 -0
- package/dist/simulation/toolkit/dynamic_progress.js +214 -0
- package/dist/simulation/toolkit/dynamic_projection.d.ts +9 -0
- package/dist/simulation/toolkit/dynamic_projection.js +219 -0
- package/dist/simulation/toolkit/dynamic_runtime.d.ts +412 -0
- package/dist/simulation/toolkit/dynamic_runtime.js +6536 -0
- package/dist/simulation/toolkit/dynamic_state.d.ts +111 -0
- package/dist/simulation/toolkit/dynamic_state.js +1967 -0
- package/dist/simulation/toolkit/dynamic_story_review.d.ts +508 -0
- package/dist/simulation/toolkit/dynamic_story_review.js +333 -0
- package/dist/simulation/toolkit/dynamic_storyteller.d.ts +77 -0
- package/dist/simulation/toolkit/dynamic_storyteller.js +114 -0
- package/dist/simulation/toolkit/dynamic_storyteller_runtime.d.ts +26 -0
- package/dist/simulation/toolkit/dynamic_storyteller_runtime.js +126 -0
- package/dist/simulation/toolkit/dynamic_world.d.ts +22 -0
- package/dist/simulation/toolkit/dynamic_world.js +377 -0
- package/dist/simulation/toolkit/structured_output.d.ts +5 -0
- package/dist/simulation/toolkit/structured_output.js +321 -0
- package/dist/simulation/types/world.d.ts +2 -0
- package/dist/simulation/world/artifact_store.js +1 -1
- package/dist/simulation/world/memory_manager.d.ts +5 -0
- package/dist/simulation/world/memory_manager.js +17 -2
- package/dist/simulation/world/state.d.ts +3 -2
- package/dist/simulation/world/state.js +15 -5
- package/dist/skills/bundled/measurement-validation/SKILL.md +144 -0
- package/dist/terminal_attach.d.ts +1 -0
- package/dist/terminal_attach.js +113 -0
- package/dist/tool_progress.d.ts +3 -0
- package/dist/tool_progress.js +27 -0
- package/dist/types.d.ts +145 -10
- package/dist/types.js +3 -0
- package/dist/ui/core/input.d.ts +3 -0
- package/dist/ui/core/input_segments.d.ts +18 -1
- package/dist/ui/core/input_segments.js +131 -47
- package/dist/ui/core/input_state.d.ts +12 -0
- package/dist/ui/core/layout_yoga.d.ts +1 -1
- package/dist/ui/core/turn_metadata.d.ts +5 -0
- package/dist/ui/core/turn_metadata.js +22 -0
- package/dist/ui/ink/render.d.ts +2 -1
- package/dist/ui/ink/render.js +6 -5
- package/dist/ui/ratatui/headless_pane_manager.d.ts +14 -1
- package/dist/ui/ratatui/headless_pane_manager.js +293 -104
- package/dist/ui/ratatui/index.d.ts +1 -0
- package/dist/ui/ratatui/input.d.ts +4 -0
- package/dist/ui/ratatui/input.js +15 -0
- package/dist/ui/ratatui/ipc_path.d.ts +2 -0
- package/dist/ui/ratatui/ipc_path.js +29 -1
- package/dist/ui/ratatui/mux_persistence.d.ts +3 -1
- package/dist/ui/ratatui/mux_persistence.js +139 -1
- package/dist/ui/ratatui/pane_relay.d.ts +1 -1
- package/dist/ui/ratatui/pane_relay.js +55 -27
- package/dist/ui/ratatui/process.d.ts +17 -1
- package/dist/ui/ratatui/process.js +80 -7
- package/dist/ui/ratatui/protocol.d.ts +236 -1
- package/dist/ui/ratatui/protocol.js +90 -0
- package/dist/ui/scrollback.d.ts +2 -1
- package/dist/ui/scrollback.js +9 -4
- package/dist/ui/stream_typewriter.d.ts +8 -3
- package/dist/ui/stream_typewriter.js +30 -1
- package/dist/ui/streaming_scrollback.d.ts +1 -0
- package/dist/ui/streaming_scrollback.js +1 -1
- package/dist/ui/transcript_render_cache.js +10 -0
- package/dist/ui/views/activity_line.d.ts +5 -3
- package/dist/ui/views/activity_line.js +65 -7
- package/dist/ui/views/app.d.ts +6 -3
- package/dist/ui/views/app.js +17 -6
- package/dist/ui/views/completion_menu.js +10 -5
- package/dist/ui/views/input_area.d.ts +7 -3
- package/dist/ui/views/input_area.js +15 -9
- package/dist/ui/views/message_list.d.ts +4 -1
- package/dist/ui/views/message_list.js +89 -19
- package/dist/ui/views/queue_panel.d.ts +3 -1
- package/dist/ui/views/queue_panel.js +9 -2
- package/dist/ui/views/status_bar.d.ts +4 -2
- package/dist/ui/views/status_bar.js +28 -13
- package/dist/ui/views/theme.d.ts +2 -0
- package/dist/ui/views/theme.js +2 -0
- package/dist/ui/widgets/color_panel.js +18 -0
- package/dist/ui/widgets/form.js +8 -0
- package/dist/ui/widgets/log_view.js +7 -0
- package/dist/ui/widgets/navigator_panel.js +8 -0
- package/dist/ui/widgets/prompt_viewer.js +2 -0
- package/dist/ui/widgets/questionnaire.d.ts +2 -0
- package/dist/ui/widgets/questionnaire.js +79 -16
- package/dist/ui/widgets/resume_panel.d.ts +2 -0
- package/dist/ui/widgets/resume_panel.js +26 -15
- package/dist/ui/widgets/rewind_panel.d.ts +2 -2
- package/dist/ui/widgets/rewind_panel.js +4 -2
- package/dist/ui/widgets/select.js +16 -27
- package/dist/ui/widgets/settings_panel.js +16 -0
- package/dist/ui/widgets/status_line_panel.d.ts +1 -0
- package/dist/ui/widgets/status_line_panel.js +30 -4
- package/dist/ui/widgets/text_input.d.ts +2 -0
- package/dist/ui/widgets/text_input.js +15 -1
- package/dist/ui/widgets/types.d.ts +2 -0
- package/dist/usage_projection.d.ts +24 -0
- package/dist/usage_projection.js +130 -0
- package/dist/usage_snapshot.d.ts +36 -0
- package/dist/usage_snapshot.js +131 -0
- package/dist/utils/assistant_message.d.ts +2 -0
- package/dist/utils/assistant_message.js +5 -0
- package/dist/utils/atomic_write.d.ts +6 -2
- package/dist/utils/atomic_write.js +29 -4
- package/dist/utils/checked_shell.d.ts +25 -0
- package/dist/utils/checked_shell.js +107 -0
- package/dist/utils/compaction.d.ts +4 -1
- package/dist/utils/compaction.js +31 -7
- package/dist/utils/context.d.ts +4 -4
- package/dist/utils/context.js +14 -12
- package/dist/utils/deepseek.d.ts +2 -2
- package/dist/utils/deepseek.js +13 -5
- package/dist/utils/ephemeral.js +4 -0
- package/dist/utils/ephemeral_tools.d.ts +18 -0
- package/dist/utils/ephemeral_tools.js +97 -0
- package/dist/utils/jev_client.d.ts +4 -0
- package/dist/utils/jev_client.js +15 -0
- package/dist/utils/model_cache.d.ts +15 -0
- package/dist/utils/model_cache.js +143 -0
- package/dist/utils/models.d.ts +4 -2
- package/dist/utils/models.js +12 -16
- package/dist/utils/reasoning.d.ts +8 -1
- package/dist/utils/reasoning.js +31 -11
- package/dist/utils/router_catalog.d.ts +49 -0
- package/dist/utils/router_catalog.js +271 -0
- package/dist/utils/sandbox.d.ts +9 -0
- package/dist/utils/sandbox.js +118 -15
- package/dist/utils/shell.d.ts +7 -0
- package/dist/utils/shell.js +98 -34
- package/dist/utils/subprocess_env.d.ts +3 -0
- package/dist/utils/subprocess_env.js +27 -1
- package/dist/web/accounts_mirror.d.ts +3 -1
- package/dist/web/accounts_mirror.js +13 -9
- package/dist/web/child_publication.d.ts +17 -0
- package/dist/web/child_publication.js +45 -0
- package/dist/web/mirror_authenticator.d.ts +31 -11
- package/dist/web/mirror_authenticator.js +67 -17
- package/dist/web/mirror_client.d.ts +31 -4
- package/dist/web/mirror_client.js +189 -23
- package/dist/web/mirror_stream.d.ts +84 -22
- package/dist/web/mirror_stream.js +676 -95
- package/dist/web/observer_query_redaction.d.ts +6 -0
- package/dist/web/observer_query_redaction.js +58 -0
- package/dist/web/pane_registry.d.ts +2 -0
- package/dist/web/pane_registry.js +86 -22
- package/dist/web/tool_image.d.ts +6 -0
- package/dist/web/tool_image.js +17 -0
- package/dist/web/view_plugin.d.ts +14 -0
- package/dist/web/view_plugin.js +23 -1
- package/dist/worker/executor.js +31 -12
- package/dist/worker/index.d.ts +1 -0
- package/dist/worker/toolsets.js +3 -1
- package/dist/worker/types.d.ts +12 -1
- package/dist/workflows/registry.js +1 -0
- package/dist/workflows/registry_handle.d.ts +2 -0
- package/dist/workflows/runtime.d.ts +2 -0
- package/dist/workflows/runtime.js +1 -0
- package/dist/workspace_agent.d.ts +7 -0
- package/dist/workspace_agent.js +36 -0
- package/dist/workspace_collision.d.ts +76 -0
- package/dist/workspace_collision.js +688 -0
- package/dist/workspace_layout.d.ts +18 -0
- package/dist/workspace_layout.js +121 -0
- package/dist/workspace_runtime.d.ts +44 -0
- package/dist/workspace_runtime.js +82 -0
- package/dist/workspace_session_context.d.ts +62 -0
- package/dist/workspace_session_context.js +160 -0
- package/dist/zlm-embed.mjs +32518 -9615
- package/dist/zlm.js +1 -0
- package/node_modules/@zerg/model-contracts/LICENSE.md +375 -0
- package/node_modules/@zerg/model-contracts/README.md +90 -0
- package/node_modules/@zerg/model-contracts/index.d.ts +20 -0
- package/node_modules/@zerg/model-contracts/index.js +223 -0
- package/node_modules/@zerg/model-contracts/package.json +8 -0
- package/node_modules/glob/node_modules/brace-expansion/index.js +78 -22
- package/node_modules/glob/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/readdir-glob/node_modules/brace-expansion/index.js +78 -22
- package/node_modules/readdir-glob/node_modules/brace-expansion/package.json +1 -1
- package/package.json +45 -24
- package/packages/model-contracts/LICENSE.md +375 -0
- package/packages/model-contracts/README.md +90 -0
- package/packages/model-contracts/index.d.ts +20 -0
- package/packages/model-contracts/index.js +223 -0
- package/packages/model-contracts/package.json +8 -0
- package/remote-broker/Dockerfile +10 -0
- package/remote-broker/README.md +308 -0
- package/remote-broker/archive.py +1227 -0
- package/remote-broker/cutover.py +761 -0
- package/remote-broker/requirements.txt +5 -0
- package/remote-broker/resources.example.json +6 -0
- package/remote-broker/resources.write-staging.example.json +18 -0
- package/remote-broker/retained.py +686 -0
- package/remote-broker/retained_cleanup.py +550 -0
- package/remote-broker/server.py +648 -0
- package/scripts/build-remote-broker.mjs +13 -0
- package/scripts/ensure-local-packages.mjs +6 -0
- package/scripts/node-pty-helpers.mjs +103 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { CodexReasoningEffort } from '../config/types.js';
|
|
2
|
+
import type { StoryEpisodeV1, StoryReviewReceiptV1, StoryReviewViewV1 } from './simulation_story_review.js';
|
|
3
|
+
import type { BufferedRecoveryPolicy, BufferedTransportAttempt } from '../agent/backends/types.js';
|
|
4
|
+
import type { SimulationDocumentProvenanceV1 } from './simulation_documents.js';
|
|
5
|
+
import type { SimulationInteractionStateV1, SimulationMeetingV1, SimulationMeetingActivityV1 } from './simulation_meetings.js';
|
|
6
|
+
import type { DynamicInitialization, DynamicInitializationV1, StorytellerReceiptV1 } from './simulation_storyteller.js';
|
|
1
7
|
/**
|
|
2
8
|
* Versioned contract between ZTC and simulation product plugins.
|
|
3
9
|
*
|
|
@@ -48,11 +54,13 @@ export interface SimulationCreateSessionRequestV1 {
|
|
|
48
54
|
};
|
|
49
55
|
readonly runtime: SimulationRuntimeOptionsV1;
|
|
50
56
|
readonly actors?: readonly SimulationActorSeedV1[];
|
|
57
|
+
readonly dynamicState?: SimulationDynamicStateV1;
|
|
51
58
|
readonly pluginData?: SimulationJsonObjectV1;
|
|
52
59
|
}
|
|
53
60
|
export interface SimulationLoadSessionRequestV1 {
|
|
54
61
|
readonly checkpointPath: string;
|
|
55
62
|
readonly driverKind?: string;
|
|
63
|
+
readonly outputDirectory?: string;
|
|
56
64
|
}
|
|
57
65
|
export interface SimulationSessionRefV1 {
|
|
58
66
|
readonly sessionId: string;
|
|
@@ -78,6 +86,8 @@ export interface SimulationDocumentCommentSnapshotV1 {
|
|
|
78
86
|
readonly sectionRef?: string;
|
|
79
87
|
}
|
|
80
88
|
export interface SimulationDocumentSnapshotV1 {
|
|
89
|
+
readonly provenance?: SimulationDocumentProvenanceV1;
|
|
90
|
+
readonly ownerActorId?: string;
|
|
81
91
|
readonly documentId: string;
|
|
82
92
|
readonly label: string;
|
|
83
93
|
readonly type: string;
|
|
@@ -91,6 +101,7 @@ export interface SimulationDocumentSnapshotV1 {
|
|
|
91
101
|
readonly metadata?: SimulationJsonObjectV1;
|
|
92
102
|
}
|
|
93
103
|
export interface SimulationSessionSnapshotV1 {
|
|
104
|
+
readonly inputJournal?: import('./simulation_interventions.js').SimulationInputJournalV1;
|
|
94
105
|
readonly ref: SimulationSessionRefV1;
|
|
95
106
|
readonly status: SimulationSessionStatusV1;
|
|
96
107
|
readonly revision: number;
|
|
@@ -99,6 +110,7 @@ export interface SimulationSessionSnapshotV1 {
|
|
|
99
110
|
readonly actors: readonly SimulationActorSnapshotV1[];
|
|
100
111
|
readonly documents: readonly SimulationDocumentSnapshotV1[];
|
|
101
112
|
readonly world: SimulationJsonObjectV1 | null;
|
|
113
|
+
readonly dynamicState?: SimulationDynamicStateV1 | null;
|
|
102
114
|
readonly pluginData: SimulationJsonObjectV1;
|
|
103
115
|
}
|
|
104
116
|
export interface SimulationCheckpointExtensionV1 {
|
|
@@ -131,16 +143,801 @@ export interface SimulationInferenceContextV1 {
|
|
|
131
143
|
readonly component?: string;
|
|
132
144
|
readonly attempt?: number;
|
|
133
145
|
}
|
|
146
|
+
export interface SimulationInferenceRoutingV1 {
|
|
147
|
+
readonly provider: string;
|
|
148
|
+
readonly role: 'character' | 'game-master';
|
|
149
|
+
readonly model: string;
|
|
150
|
+
readonly reasoningEffort: CodexReasoningEffort;
|
|
151
|
+
readonly serviceTier?: 'priority';
|
|
152
|
+
}
|
|
134
153
|
export interface SimulationInferenceRequestV1 {
|
|
154
|
+
readonly bufferedRecovery?: BufferedRecoveryPolicy;
|
|
155
|
+
/** Lifecycle observer; excluded from the original serialized request. */
|
|
156
|
+
readonly onTransportAttempt?: (event: BufferedTransportAttempt) => void;
|
|
135
157
|
readonly system: string;
|
|
136
158
|
readonly user: string;
|
|
137
159
|
readonly maxTokens?: number;
|
|
138
160
|
readonly timeoutMs?: number;
|
|
161
|
+
readonly outputSchema?: Record<string, unknown>;
|
|
162
|
+
readonly outputSchemaStrict?: boolean;
|
|
163
|
+
readonly routing?: SimulationInferenceRoutingV1;
|
|
139
164
|
readonly context: SimulationInferenceContextV1;
|
|
140
165
|
}
|
|
141
166
|
export interface SimulationInferenceResultV1 {
|
|
142
167
|
readonly text: string;
|
|
143
168
|
}
|
|
169
|
+
export type SimulationKnowledgeVisibilityV1 = 'public' | 'player-known' | 'private';
|
|
170
|
+
export interface SimulationAgentGoalV1 {
|
|
171
|
+
readonly id: string;
|
|
172
|
+
readonly description: string;
|
|
173
|
+
readonly priority: number;
|
|
174
|
+
readonly status: 'active' | 'satisfied' | 'blocked' | 'abandoned';
|
|
175
|
+
readonly visibility: SimulationKnowledgeVisibilityV1;
|
|
176
|
+
}
|
|
177
|
+
export interface SimulationAgentBeliefV1 {
|
|
178
|
+
readonly id: string;
|
|
179
|
+
readonly subject: string;
|
|
180
|
+
readonly claim: string;
|
|
181
|
+
readonly confidence: number;
|
|
182
|
+
readonly evidenceEventIds: readonly string[];
|
|
183
|
+
readonly visibility: SimulationKnowledgeVisibilityV1;
|
|
184
|
+
}
|
|
185
|
+
export interface SimulationAgentRelationshipV1 {
|
|
186
|
+
readonly targetActorId: string;
|
|
187
|
+
readonly trust: number;
|
|
188
|
+
readonly affinity: number;
|
|
189
|
+
readonly obligation: number;
|
|
190
|
+
readonly conflictNotes: readonly string[];
|
|
191
|
+
readonly changedByEventId?: string;
|
|
192
|
+
readonly visibility: SimulationKnowledgeVisibilityV1;
|
|
193
|
+
}
|
|
194
|
+
export interface SimulationAgentMemoryV1 {
|
|
195
|
+
readonly id: string;
|
|
196
|
+
readonly eventId: string;
|
|
197
|
+
readonly kind: 'observation' | 'promise' | 'conflict' | 'cooperation' | 'outcome';
|
|
198
|
+
readonly summary: string;
|
|
199
|
+
readonly salience: number;
|
|
200
|
+
readonly visibility: SimulationKnowledgeVisibilityV1;
|
|
201
|
+
}
|
|
202
|
+
export interface SimulationAgentIntentV1 {
|
|
203
|
+
readonly mechanic: string;
|
|
204
|
+
readonly goalId: string;
|
|
205
|
+
readonly summary: string;
|
|
206
|
+
readonly targetActorId?: string;
|
|
207
|
+
}
|
|
208
|
+
export interface SimulationPersistentAgentStateV1 {
|
|
209
|
+
readonly actorId: string;
|
|
210
|
+
readonly name: string;
|
|
211
|
+
readonly role: string;
|
|
212
|
+
readonly humanControlled: boolean;
|
|
213
|
+
readonly capabilities: readonly string[];
|
|
214
|
+
readonly goals: readonly SimulationAgentGoalV1[];
|
|
215
|
+
readonly beliefs: readonly SimulationAgentBeliefV1[];
|
|
216
|
+
readonly relationships: readonly SimulationAgentRelationshipV1[];
|
|
217
|
+
readonly memories: readonly SimulationAgentMemoryV1[];
|
|
218
|
+
readonly resources: Readonly<Record<string, number>>;
|
|
219
|
+
readonly resourceVisibility: Readonly<Record<string, SimulationKnowledgeVisibilityV1>>;
|
|
220
|
+
readonly currentIntent: SimulationAgentIntentV1 | null;
|
|
221
|
+
}
|
|
222
|
+
export interface SimulationDomainActionProposalV1 {
|
|
223
|
+
readonly id: string;
|
|
224
|
+
readonly mechanic: string;
|
|
225
|
+
readonly actorId?: string;
|
|
226
|
+
readonly targetActorId?: string;
|
|
227
|
+
readonly sourceCharacterProposalId?: string;
|
|
228
|
+
readonly sourceAttemptedActionId?: string;
|
|
229
|
+
readonly sourcePlayerActionId?: string;
|
|
230
|
+
readonly parameters: SimulationJsonObjectV1;
|
|
231
|
+
readonly reason: string;
|
|
232
|
+
}
|
|
233
|
+
export interface SimulationCharacterActionMotivationV1 {
|
|
234
|
+
readonly goalId: string;
|
|
235
|
+
readonly beliefId: string;
|
|
236
|
+
readonly memoryId: string;
|
|
237
|
+
readonly relationshipTargetActorId: string;
|
|
238
|
+
readonly resourceId: string;
|
|
239
|
+
}
|
|
240
|
+
export type SimulationCharacterActionProposalV1 = Omit<SimulationDomainActionProposalV1, 'actorId' | 'sourceCharacterProposalId' | 'sourceAttemptedActionId' | 'sourcePlayerActionId'> & {
|
|
241
|
+
readonly actorId: string;
|
|
242
|
+
readonly motivation: SimulationCharacterActionMotivationV1 | null;
|
|
243
|
+
};
|
|
244
|
+
/** A validated intention. It does not assert that an action occurred. */
|
|
245
|
+
export interface SimulationDynamicIntentActivityV1 {
|
|
246
|
+
readonly kind: 'actor-intent';
|
|
247
|
+
readonly status: 'pending';
|
|
248
|
+
readonly validation: 'ztc-character-proposal';
|
|
249
|
+
readonly basedOnRevision: number;
|
|
250
|
+
readonly sourceProposalId: string;
|
|
251
|
+
readonly actorId: string;
|
|
252
|
+
readonly actorName: string;
|
|
253
|
+
readonly mechanic: string;
|
|
254
|
+
readonly text: string;
|
|
255
|
+
}
|
|
256
|
+
export type SimulationDynamicActivityV1 = SimulationDynamicIntentActivityV1 | SimulationMeetingActivityV1;
|
|
257
|
+
export interface SimulationDiscussionInvitationV1 {
|
|
258
|
+
readonly recipientActorId: string;
|
|
259
|
+
readonly topic: string;
|
|
260
|
+
}
|
|
261
|
+
export interface SimulationCharacterProposalV1 {
|
|
262
|
+
readonly schemaVersion: 1;
|
|
263
|
+
readonly proposalId: string;
|
|
264
|
+
readonly basedOnRevision: number;
|
|
265
|
+
readonly actorId: string;
|
|
266
|
+
readonly intent: SimulationAgentIntentV1 | null;
|
|
267
|
+
readonly discussionInvitation?: SimulationDiscussionInvitationV1 | null;
|
|
268
|
+
readonly attemptedActions: readonly SimulationCharacterActionProposalV1[];
|
|
269
|
+
readonly internalReason: string;
|
|
270
|
+
}
|
|
271
|
+
export interface SimulationDynamicPlayerActionV1 {
|
|
272
|
+
readonly id: string;
|
|
273
|
+
readonly label: string;
|
|
274
|
+
readonly intent: string;
|
|
275
|
+
readonly description: string;
|
|
276
|
+
readonly mechanic: string;
|
|
277
|
+
readonly targetActorId?: string;
|
|
278
|
+
readonly parameters: SimulationJsonObjectV1;
|
|
279
|
+
readonly risks: readonly string[];
|
|
280
|
+
readonly requirements: readonly string[];
|
|
281
|
+
readonly authoredBy: 'game-master' | 'fallback' | 'player';
|
|
282
|
+
}
|
|
283
|
+
export interface SimulationAgentUpdateProposalV1 {
|
|
284
|
+
readonly actorId: string;
|
|
285
|
+
readonly sourceEventId: string;
|
|
286
|
+
readonly sourceActionIds: readonly string[];
|
|
287
|
+
readonly sourceAdjudicationProposalIds?: readonly string[];
|
|
288
|
+
readonly goalUpdates: readonly {
|
|
289
|
+
readonly goalId: string;
|
|
290
|
+
readonly priority?: number;
|
|
291
|
+
readonly status?: SimulationAgentGoalV1['status'];
|
|
292
|
+
}[];
|
|
293
|
+
readonly goalsToAppend: readonly SimulationAgentGoalV1[];
|
|
294
|
+
readonly beliefUpdates: readonly {
|
|
295
|
+
readonly beliefId: string;
|
|
296
|
+
readonly confidence: number;
|
|
297
|
+
readonly evidenceEventIds: readonly string[];
|
|
298
|
+
}[];
|
|
299
|
+
readonly beliefsToAppend: readonly SimulationAgentBeliefV1[];
|
|
300
|
+
readonly relationshipDeltas: readonly {
|
|
301
|
+
readonly targetActorId: string;
|
|
302
|
+
readonly trust: number;
|
|
303
|
+
readonly affinity: number;
|
|
304
|
+
readonly obligation: number;
|
|
305
|
+
readonly reason: string;
|
|
306
|
+
}[];
|
|
307
|
+
readonly memoriesToAppend: readonly SimulationAgentMemoryV1[];
|
|
308
|
+
readonly resourceDeltas: Readonly<Record<string, number>>;
|
|
309
|
+
readonly nextIntent: SimulationAgentIntentV1 | null;
|
|
310
|
+
}
|
|
311
|
+
/** Private validated consequences before the Game Master authors next choices. */
|
|
312
|
+
export type SimulationGmConsequencesV1 = Omit<SimulationGmProposalV1, 'availableActions'>;
|
|
313
|
+
/** Private world adjudication before affected actors receive authored consequences. */
|
|
314
|
+
export type SimulationGmWorldConsequencesV1 = Omit<SimulationGmConsequencesV1, 'agentUpdates'>;
|
|
315
|
+
export interface SimulationGmProposalV1 {
|
|
316
|
+
readonly schemaVersion: 1;
|
|
317
|
+
readonly proposalId: string;
|
|
318
|
+
readonly basedOnRevision: number;
|
|
319
|
+
readonly event: {
|
|
320
|
+
readonly id: string;
|
|
321
|
+
readonly title: string;
|
|
322
|
+
readonly narrative: string;
|
|
323
|
+
readonly urgency: 'low' | 'medium' | 'high' | 'critical';
|
|
324
|
+
readonly openQuestions: readonly string[];
|
|
325
|
+
};
|
|
326
|
+
readonly availableActions: readonly SimulationDynamicPlayerActionV1[];
|
|
327
|
+
readonly characterResponses: readonly {
|
|
328
|
+
readonly actorId: string;
|
|
329
|
+
readonly text: string;
|
|
330
|
+
readonly mood: string;
|
|
331
|
+
}[];
|
|
332
|
+
readonly adjudications: readonly {
|
|
333
|
+
readonly characterProposalId: string;
|
|
334
|
+
readonly outcome: 'succeeded' | 'partial' | 'failed' | 'deferred';
|
|
335
|
+
readonly meetingId?: string;
|
|
336
|
+
readonly reason: string;
|
|
337
|
+
readonly actionIds: readonly string[];
|
|
338
|
+
}[];
|
|
339
|
+
readonly playerAdjudication: null | {
|
|
340
|
+
readonly playerActionId: string;
|
|
341
|
+
readonly outcome: 'succeeded' | 'partial' | 'failed';
|
|
342
|
+
readonly reason: string;
|
|
343
|
+
readonly actionIds: readonly string[];
|
|
344
|
+
};
|
|
345
|
+
readonly domainActions: readonly SimulationDomainActionProposalV1[];
|
|
346
|
+
readonly agentUpdates: readonly SimulationAgentUpdateProposalV1[];
|
|
347
|
+
readonly pacing: {
|
|
348
|
+
readonly mode: 'continue' | 'resolve';
|
|
349
|
+
readonly tension: number;
|
|
350
|
+
readonly timeAdvance: string;
|
|
351
|
+
readonly advanceSteps: number;
|
|
352
|
+
};
|
|
353
|
+
readonly ending: null | {
|
|
354
|
+
readonly title: string;
|
|
355
|
+
readonly narrative: string;
|
|
356
|
+
readonly outcome: 'triumph' | 'mixed' | 'collapse';
|
|
357
|
+
readonly causalEventIds: readonly string[];
|
|
358
|
+
readonly endingBasis?: {
|
|
359
|
+
readonly predicateId: string;
|
|
360
|
+
readonly witnesses: readonly {
|
|
361
|
+
readonly objectId: string;
|
|
362
|
+
readonly version: number;
|
|
363
|
+
readonly actionId: string;
|
|
364
|
+
readonly eventId: string;
|
|
365
|
+
}[];
|
|
366
|
+
readonly actorIds: readonly string[];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
export type SimulationDynamicRunStatusV1 = 'active' | 'ended' | 'safety-stopped';
|
|
371
|
+
export interface SimulationDynamicResourceDefinitionV1 {
|
|
372
|
+
readonly id: string;
|
|
373
|
+
readonly label: string;
|
|
374
|
+
readonly minimum: number;
|
|
375
|
+
readonly maximum: number;
|
|
376
|
+
readonly initial: number;
|
|
377
|
+
readonly maximumStep: number;
|
|
378
|
+
readonly dangerDirection: 'low' | 'high' | 'none';
|
|
379
|
+
readonly visibility?: SimulationKnowledgeVisibilityV1;
|
|
380
|
+
}
|
|
381
|
+
interface SimulationDynamicParameterDefinitionBaseV1 {
|
|
382
|
+
readonly id: string;
|
|
383
|
+
readonly label: string;
|
|
384
|
+
readonly required?: boolean;
|
|
385
|
+
/** Bind a scalar to one selected visible object's current field. */
|
|
386
|
+
readonly valueFrom?: {
|
|
387
|
+
readonly objectParameter: string;
|
|
388
|
+
readonly path: readonly string[];
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
export type SimulationDynamicParameterDefinitionV1 = (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
392
|
+
readonly kind: 'text';
|
|
393
|
+
readonly minimumLength?: number;
|
|
394
|
+
readonly maximumLength: number;
|
|
395
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
396
|
+
readonly kind: 'number' | 'integer';
|
|
397
|
+
readonly minimum: number;
|
|
398
|
+
readonly maximum: number;
|
|
399
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
400
|
+
readonly kind: 'boolean';
|
|
401
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
402
|
+
readonly kind: 'enum';
|
|
403
|
+
readonly values: readonly string[];
|
|
404
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
405
|
+
readonly kind: 'actor-reference';
|
|
406
|
+
readonly allowSelf?: boolean;
|
|
407
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
408
|
+
readonly kind: 'object-reference';
|
|
409
|
+
readonly objectKinds: readonly string[];
|
|
410
|
+
readonly statuses?: readonly string[];
|
|
411
|
+
readonly ownedByActor?: boolean;
|
|
412
|
+
readonly requiredData?: Readonly<Record<string, string | number | boolean>>;
|
|
413
|
+
readonly requiredNumericData?: Readonly<Record<string, {
|
|
414
|
+
readonly minimum?: number;
|
|
415
|
+
readonly maximumExclusive?: number;
|
|
416
|
+
}>>;
|
|
417
|
+
/** Intent references must link to these exact action participants. */
|
|
418
|
+
readonly actorLinks?: {
|
|
419
|
+
readonly actor?: string;
|
|
420
|
+
readonly target?: string;
|
|
421
|
+
};
|
|
422
|
+
/** Named actors may bypass actor-link equality, but never link cardinality or other filters. */
|
|
423
|
+
readonly actorLinkExceptions?: readonly string[];
|
|
424
|
+
/** Require the peer to have one exact object link to this reference. */
|
|
425
|
+
readonly linkMatch?: {
|
|
426
|
+
readonly parameterId: string;
|
|
427
|
+
readonly relation: string;
|
|
428
|
+
};
|
|
429
|
+
/** Require the peer amount to fit this object's unused capacity. */
|
|
430
|
+
readonly capacityMatch?: {
|
|
431
|
+
readonly parameterId: string;
|
|
432
|
+
readonly amountKey: string;
|
|
433
|
+
readonly capacityKey: string;
|
|
434
|
+
readonly usedKey: string;
|
|
435
|
+
readonly excludePeerReferenceKey?: string;
|
|
436
|
+
};
|
|
437
|
+
/** Match this object's data key to one other required reference in the same record. */
|
|
438
|
+
readonly dataMatch?: {
|
|
439
|
+
readonly parameterId: string;
|
|
440
|
+
readonly key: string;
|
|
441
|
+
readonly otherKey: string;
|
|
442
|
+
};
|
|
443
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
444
|
+
readonly kind: 'object-reference-list';
|
|
445
|
+
readonly objectKinds: readonly string[];
|
|
446
|
+
readonly statuses?: readonly string[];
|
|
447
|
+
readonly ownedByActor?: boolean;
|
|
448
|
+
readonly requiredData?: Readonly<Record<string, string | number | boolean>>;
|
|
449
|
+
readonly requiredNumericData?: Readonly<Record<string, {
|
|
450
|
+
readonly minimum?: number;
|
|
451
|
+
readonly maximumExclusive?: number;
|
|
452
|
+
}>>;
|
|
453
|
+
/** Intent references must link to these exact action participants. */
|
|
454
|
+
readonly actorLinks?: {
|
|
455
|
+
readonly actor?: string;
|
|
456
|
+
readonly target?: string;
|
|
457
|
+
};
|
|
458
|
+
/** Named actors may bypass actor-link equality, but never link cardinality or other filters. */
|
|
459
|
+
readonly actorLinkExceptions?: readonly string[];
|
|
460
|
+
readonly minimumItems: number;
|
|
461
|
+
readonly maximumItems: number;
|
|
462
|
+
}) | (SimulationDynamicParameterDefinitionBaseV1 & {
|
|
463
|
+
readonly kind: 'resource-reference';
|
|
464
|
+
readonly resourceIds: readonly string[];
|
|
465
|
+
});
|
|
466
|
+
export interface SimulationDynamicMechanicDefinitionV1 {
|
|
467
|
+
readonly id: string;
|
|
468
|
+
readonly description: string;
|
|
469
|
+
readonly actor: 'required' | 'optional' | 'game-master';
|
|
470
|
+
readonly target: 'none' | 'optional' | 'required';
|
|
471
|
+
readonly intentParameters: readonly SimulationDynamicParameterDefinitionV1[];
|
|
472
|
+
readonly resolutionParameters: readonly SimulationDynamicParameterDefinitionV1[];
|
|
473
|
+
}
|
|
474
|
+
export type SimulationDynamicObjectVisibilityV1 = {
|
|
475
|
+
readonly scope: 'world';
|
|
476
|
+
} | {
|
|
477
|
+
readonly scope: 'shared';
|
|
478
|
+
readonly actorIds: readonly string[];
|
|
479
|
+
} | {
|
|
480
|
+
readonly scope: 'private';
|
|
481
|
+
};
|
|
482
|
+
export interface SimulationDynamicDomainObjectLinkV1 {
|
|
483
|
+
readonly relation: string;
|
|
484
|
+
readonly targetType: 'actor' | 'object' | 'event' | 'document';
|
|
485
|
+
readonly targetId: string;
|
|
486
|
+
}
|
|
487
|
+
export interface SimulationDynamicDomainObjectV1 {
|
|
488
|
+
readonly id: string;
|
|
489
|
+
readonly kind: string;
|
|
490
|
+
readonly label: string;
|
|
491
|
+
readonly status: string;
|
|
492
|
+
readonly version: number;
|
|
493
|
+
readonly ownerActorId: string | null;
|
|
494
|
+
readonly visibility: SimulationDynamicObjectVisibilityV1;
|
|
495
|
+
readonly data: SimulationJsonObjectV1;
|
|
496
|
+
readonly links: readonly SimulationDynamicDomainObjectLinkV1[];
|
|
497
|
+
readonly provenance: {
|
|
498
|
+
readonly createdRevision: number;
|
|
499
|
+
readonly updatedRevision: number;
|
|
500
|
+
readonly eventId: string;
|
|
501
|
+
readonly actionId: string;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
export type SimulationDynamicWorldEffectV1 = {
|
|
505
|
+
readonly operation: 'resource.change';
|
|
506
|
+
readonly actionId: string;
|
|
507
|
+
readonly resourceId: string;
|
|
508
|
+
readonly delta: number;
|
|
509
|
+
} | {
|
|
510
|
+
readonly operation: 'fact.add' | 'fact.remove';
|
|
511
|
+
readonly actionId: string;
|
|
512
|
+
readonly fact: string;
|
|
513
|
+
} | {
|
|
514
|
+
readonly operation: 'object.put';
|
|
515
|
+
readonly actionId: string;
|
|
516
|
+
readonly expectedVersion: number | null;
|
|
517
|
+
/** Compiler-owned transient scene retention; never retires native world records. */
|
|
518
|
+
readonly sceneRetention?: {
|
|
519
|
+
readonly version: 1;
|
|
520
|
+
readonly retiredIds: readonly string[];
|
|
521
|
+
};
|
|
522
|
+
readonly object: SimulationDynamicDomainObjectV1;
|
|
523
|
+
};
|
|
524
|
+
export interface SimulationDynamicWorldStateV1 {
|
|
525
|
+
resources: Record<string, number>;
|
|
526
|
+
facts: readonly string[];
|
|
527
|
+
domainObjects: readonly SimulationDynamicDomainObjectV1[];
|
|
528
|
+
}
|
|
529
|
+
export type SimulationDynamicTimelineKindV1 = 'player-action' | 'agent-action' | 'agent-interaction' | 'gm-event' | 'adjudication' | 'world-change' | 'ending' | 'story-review';
|
|
530
|
+
export interface SimulationDynamicHistoryEntryV1 {
|
|
531
|
+
readonly storyReview?: StoryReviewReceiptV1;
|
|
532
|
+
readonly storyteller?: StorytellerReceiptV1;
|
|
533
|
+
readonly revision: number;
|
|
534
|
+
readonly eventId: string;
|
|
535
|
+
readonly kind: SimulationDynamicTimelineKindV1;
|
|
536
|
+
readonly title: string;
|
|
537
|
+
readonly summary: string;
|
|
538
|
+
readonly playerActionId: string | null;
|
|
539
|
+
readonly playerIntent?: string;
|
|
540
|
+
readonly characterProposals: readonly SimulationCharacterProposalV1[];
|
|
541
|
+
readonly gmProposal: SimulationGmProposalV1;
|
|
542
|
+
readonly acceptedActionIds: readonly string[];
|
|
543
|
+
readonly effects: readonly SimulationDynamicWorldEffectV1[];
|
|
544
|
+
readonly objectGraphBefore?: readonly SimulationDynamicObjectGraphNodeV1[];
|
|
545
|
+
readonly usedFallback: boolean;
|
|
546
|
+
readonly meetings?: readonly SimulationMeetingV1[];
|
|
547
|
+
}
|
|
548
|
+
export type SimulationDynamicObjectGraphNodeV1 = Pick<SimulationDynamicDomainObjectV1, 'id' | 'ownerActorId' | 'links'>;
|
|
549
|
+
export interface SimulationCharacterCallV1 {
|
|
550
|
+
readonly deadlineVersion?: 2;
|
|
551
|
+
readonly requestVersion?: 2 | 3 | 4 | 5;
|
|
552
|
+
readonly privacyVersion?: 3;
|
|
553
|
+
readonly actorId: string;
|
|
554
|
+
readonly status: 'accepted' | 'rejected';
|
|
555
|
+
readonly failureCode?: string;
|
|
556
|
+
readonly inputDigest: string;
|
|
557
|
+
readonly systemDigest: string;
|
|
558
|
+
readonly outputDigest: string;
|
|
559
|
+
readonly outputBytes: number;
|
|
560
|
+
readonly fullProposalDigest?: string;
|
|
561
|
+
readonly proposalDigest?: string;
|
|
562
|
+
readonly timing: {
|
|
563
|
+
readonly startedAtMs: number;
|
|
564
|
+
readonly settledAtMs: number;
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
export interface SimulationCharacterRepairV1 {
|
|
568
|
+
/** Absent receipts retain the original correction instructions. */
|
|
569
|
+
readonly instructionVersion?: 2;
|
|
570
|
+
readonly actorId: string;
|
|
571
|
+
readonly proposalId: string;
|
|
572
|
+
readonly cause: 'input_privacy_violation';
|
|
573
|
+
readonly status: 'accepted' | 'rejected';
|
|
574
|
+
readonly requested: boolean;
|
|
575
|
+
readonly failureCode?: string;
|
|
576
|
+
readonly inputDigest: string;
|
|
577
|
+
readonly initialSystemDigest: string;
|
|
578
|
+
readonly repairSystemDigest: string;
|
|
579
|
+
readonly repairInputDigest?: string;
|
|
580
|
+
readonly repairMode?: 'bounded-rewrite' | 'legacy';
|
|
581
|
+
readonly initialPromptBytes: number;
|
|
582
|
+
readonly repairPromptBytes: number;
|
|
583
|
+
readonly firstOutputDigest: string;
|
|
584
|
+
readonly firstOutputBytes: number;
|
|
585
|
+
readonly firstElapsedMs: number;
|
|
586
|
+
readonly timing?: {
|
|
587
|
+
readonly startedAtMs: number;
|
|
588
|
+
readonly settledAtMs: number;
|
|
589
|
+
};
|
|
590
|
+
readonly timeoutMs: number;
|
|
591
|
+
readonly maxTokens: 768;
|
|
592
|
+
readonly outputDigest: string;
|
|
593
|
+
readonly outputBytes: number;
|
|
594
|
+
/** Stored canonical history identity, after bounded compaction. */
|
|
595
|
+
readonly proposalDigest?: string;
|
|
596
|
+
/** Full validated correction identity; absent in legacy receipts. */
|
|
597
|
+
readonly fullProposalDigest?: string;
|
|
598
|
+
}
|
|
599
|
+
export type SimulationCharacterRepairV2 = Omit<SimulationCharacterRepairV1, 'instructionVersion' | 'cause'> & {
|
|
600
|
+
readonly instructionVersion: 3 | 4;
|
|
601
|
+
readonly cause: 'input_privacy_violation' | 'private-knowledge-leak';
|
|
602
|
+
};
|
|
603
|
+
export interface SimulationInferenceSettlementV1 {
|
|
604
|
+
readonly startedAtMs: number;
|
|
605
|
+
readonly settledAtMs: number;
|
|
606
|
+
readonly outcome: 'completed' | 'failed' | 'timeout';
|
|
607
|
+
readonly failureCode?: string;
|
|
608
|
+
}
|
|
609
|
+
/** Native observations are committed with the beat, never reconstructed from capture files. */
|
|
610
|
+
export interface SimulationNativeCallV1 {
|
|
611
|
+
readonly callId: number;
|
|
612
|
+
readonly phase: 'main' | 'actor-update' | 'choice-authoring' | 'choice-repair' | 'story-review' | 'character' | 'meeting-turn';
|
|
613
|
+
readonly requestSha256: string;
|
|
614
|
+
readonly requestedAtMs: number;
|
|
615
|
+
readonly timeoutMs: number;
|
|
616
|
+
readonly providerStartedAtMs: number;
|
|
617
|
+
readonly terminal?: {
|
|
618
|
+
readonly type: 'inference-response' | 'inference-failed';
|
|
619
|
+
readonly sha256: string;
|
|
620
|
+
readonly atMs: number;
|
|
621
|
+
};
|
|
622
|
+
readonly decode?: {
|
|
623
|
+
readonly type: 'inference-decoded' | 'inference-decode-failed';
|
|
624
|
+
readonly sha256: string;
|
|
625
|
+
readonly atMs: number;
|
|
626
|
+
};
|
|
627
|
+
readonly settlement?: SimulationInferenceSettlementV1 & {
|
|
628
|
+
readonly sha256: string;
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
export interface SimulationNativeGmCallV1 extends SimulationNativeCallV1 {
|
|
632
|
+
readonly phase: 'main' | 'actor-update' | 'choice-authoring' | 'choice-repair' | 'story-review';
|
|
633
|
+
}
|
|
634
|
+
export interface SimulationNativeParticipantCallV1 extends SimulationNativeCallV1 {
|
|
635
|
+
readonly phase: 'character' | 'meeting-turn';
|
|
636
|
+
}
|
|
637
|
+
export interface SimulationActorRepairV1 {
|
|
638
|
+
readonly version: 1;
|
|
639
|
+
readonly cause: 'input_privacy_violation';
|
|
640
|
+
readonly requested: boolean;
|
|
641
|
+
readonly status: 'accepted' | 'rejected';
|
|
642
|
+
readonly failureCode?: string;
|
|
643
|
+
readonly inputDigest: string;
|
|
644
|
+
readonly systemDigest: string;
|
|
645
|
+
readonly outputDigest: string;
|
|
646
|
+
readonly outputBytes: number;
|
|
647
|
+
readonly maxTokens: number;
|
|
648
|
+
readonly timeoutMs: number;
|
|
649
|
+
readonly deadlineAtMs: number;
|
|
650
|
+
readonly timing: {
|
|
651
|
+
readonly startedAtMs: number;
|
|
652
|
+
readonly settledAtMs: number;
|
|
653
|
+
};
|
|
654
|
+
readonly initialSystemDigest: string;
|
|
655
|
+
readonly initialPromptBytes: number;
|
|
656
|
+
readonly repairPromptBytes: number;
|
|
657
|
+
}
|
|
658
|
+
export type SimulationActorRepairV2 = Omit<SimulationActorRepairV1, 'version' | 'cause'> & {
|
|
659
|
+
readonly version: 2;
|
|
660
|
+
readonly cause: 'input_privacy_violation' | 'private-knowledge-leak';
|
|
661
|
+
};
|
|
662
|
+
export type SimulationActorRepairV3 = Omit<SimulationActorRepairV2, 'version'> & {
|
|
663
|
+
readonly version: 3;
|
|
664
|
+
};
|
|
665
|
+
export type SimulationActorRepairV4 = Omit<SimulationActorRepairV2, 'version'> & {
|
|
666
|
+
readonly version: 4;
|
|
667
|
+
};
|
|
668
|
+
export type SimulationPublicRepairV1 = Omit<SimulationActorRepairV2, 'version'> & {
|
|
669
|
+
readonly version: 1;
|
|
670
|
+
readonly phase: 'main' | 'choice-authoring';
|
|
671
|
+
readonly format: 'public-text-patch-1';
|
|
672
|
+
readonly initialInputDigest: string;
|
|
673
|
+
readonly initialOutputDigest: string;
|
|
674
|
+
readonly initialOutputBytes: number;
|
|
675
|
+
};
|
|
676
|
+
export type SimulationPublicRepairV6 = Omit<SimulationPublicRepairV1, 'version' | 'phase'> & {
|
|
677
|
+
readonly version: 6;
|
|
678
|
+
readonly phase: 'choice-authoring';
|
|
679
|
+
};
|
|
680
|
+
export type SimulationPublicRepairV5 = Omit<SimulationPublicRepairV1, 'version'> & {
|
|
681
|
+
readonly version: 5;
|
|
682
|
+
};
|
|
683
|
+
export type SimulationPublicRepairV4 = Omit<SimulationPublicRepairV1, 'version'> & {
|
|
684
|
+
readonly version: 4;
|
|
685
|
+
};
|
|
686
|
+
export type SimulationPublicRepairV3 = Omit<SimulationPublicRepairV1, 'version'> & {
|
|
687
|
+
readonly version: 3;
|
|
688
|
+
};
|
|
689
|
+
export type SimulationPublicRepairV2 = Omit<SimulationPublicRepairV1, 'version'> & {
|
|
690
|
+
readonly version: 2;
|
|
691
|
+
};
|
|
692
|
+
export interface SimulationMainIdentityV1 {
|
|
693
|
+
readonly version: 1;
|
|
694
|
+
readonly proposalId: string;
|
|
695
|
+
readonly eventId: string;
|
|
696
|
+
}
|
|
697
|
+
export type SimulationMainIdentityV2 = Omit<SimulationMainIdentityV1, 'version'> & {
|
|
698
|
+
readonly version: 2;
|
|
699
|
+
};
|
|
700
|
+
export interface SimulationDynamicAuditEntryV1 {
|
|
701
|
+
readonly mainIdentity?: SimulationMainIdentityV1 | SimulationMainIdentityV2;
|
|
702
|
+
readonly revision: number;
|
|
703
|
+
readonly proposalId: string;
|
|
704
|
+
readonly status: 'accepted' | 'rejected' | 'fallback';
|
|
705
|
+
readonly codes: readonly string[];
|
|
706
|
+
readonly characterRoute: 'gpt-5.6-luna:low' | SimulationRouterAuditRouteV1;
|
|
707
|
+
readonly gameMasterRoute: 'gpt-5.6-luna:low' | 'gpt-5.6-sol:low' | 'gpt-5.6-sol:none' | SimulationRouterAuditRouteV1;
|
|
708
|
+
readonly inputDigest: string;
|
|
709
|
+
readonly outputDigest: string;
|
|
710
|
+
readonly outputBytes: number;
|
|
711
|
+
readonly outputScope: 'full' | 'legacy-prefix';
|
|
712
|
+
readonly fallbackReason: string | null;
|
|
713
|
+
readonly nativeGmCalls?: readonly SimulationNativeGmCallV1[];
|
|
714
|
+
readonly nativeParticipantCalls?: readonly SimulationNativeParticipantCallV1[];
|
|
715
|
+
readonly characterCalls?: readonly SimulationCharacterCallV1[];
|
|
716
|
+
readonly characterRepairs?: readonly (SimulationCharacterRepairV1 | SimulationCharacterRepairV2)[];
|
|
717
|
+
readonly publicRepairs?: readonly (SimulationPublicRepairV1 | SimulationPublicRepairV2 | SimulationPublicRepairV3 | SimulationPublicRepairV4 | SimulationPublicRepairV5 | SimulationPublicRepairV6)[];
|
|
718
|
+
readonly actorUpdates?: {
|
|
719
|
+
readonly byteAllocation?: 'receipt-pool-v1';
|
|
720
|
+
readonly status: 'accepted' | 'fallback';
|
|
721
|
+
readonly entries: readonly {
|
|
722
|
+
readonly instructionVersion?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
723
|
+
readonly causeBindingVersion?: 3;
|
|
724
|
+
readonly actorId: string;
|
|
725
|
+
readonly sourceEventId: string;
|
|
726
|
+
readonly sourceActionIds: readonly string[];
|
|
727
|
+
readonly sourceAdjudicationProposalIds?: readonly string[];
|
|
728
|
+
readonly model: 'gpt-5.6-luna' | 'gpt-5.6-sol' | SimulationRouterModelV1;
|
|
729
|
+
readonly reasoningEffort: 'low' | 'none';
|
|
730
|
+
readonly requested: boolean;
|
|
731
|
+
readonly status: 'accepted' | 'rejected';
|
|
732
|
+
readonly failureCode?: string;
|
|
733
|
+
readonly inputDigest: string;
|
|
734
|
+
readonly outputDigest: string;
|
|
735
|
+
readonly outputBytes: number;
|
|
736
|
+
readonly maxTokens: number;
|
|
737
|
+
readonly repair?: SimulationActorRepairV1 | SimulationActorRepairV2 | SimulationActorRepairV3 | SimulationActorRepairV4;
|
|
738
|
+
}[];
|
|
739
|
+
};
|
|
740
|
+
readonly choiceAuthoring?: {
|
|
741
|
+
readonly status: 'accepted' | 'fallback';
|
|
742
|
+
readonly failureCode?: string;
|
|
743
|
+
readonly inputDigest: string;
|
|
744
|
+
readonly outputDigest: string;
|
|
745
|
+
readonly outputBytes: number;
|
|
746
|
+
};
|
|
747
|
+
readonly choiceRepair?: {
|
|
748
|
+
readonly cause: string;
|
|
749
|
+
readonly status: 'accepted' | 'rejected' | 'topped-up';
|
|
750
|
+
readonly failureCode?: string;
|
|
751
|
+
readonly inputDigest: string;
|
|
752
|
+
readonly outputDigest: string;
|
|
753
|
+
readonly outputBytes: number;
|
|
754
|
+
};
|
|
755
|
+
/** Private phrases the runtime withheld from public prose before the beat committed. */
|
|
756
|
+
readonly redacted?: number;
|
|
757
|
+
/** Autonomous or world actions the runtime dropped from the beat, with the rule each broke. */
|
|
758
|
+
readonly shed?: readonly {
|
|
759
|
+
readonly actionId: string;
|
|
760
|
+
readonly actorId?: string;
|
|
761
|
+
readonly mechanic: string;
|
|
762
|
+
readonly code: string;
|
|
763
|
+
}[];
|
|
764
|
+
}
|
|
765
|
+
export interface SimulationDynamicKnowledgeViewV1 {
|
|
766
|
+
readonly id: string;
|
|
767
|
+
readonly text: string;
|
|
768
|
+
readonly value?: number;
|
|
769
|
+
readonly visibility: Exclude<SimulationKnowledgeVisibilityV1, 'private'> | 'redacted';
|
|
770
|
+
readonly sourceEventId?: string;
|
|
771
|
+
}
|
|
772
|
+
export interface SimulationDynamicAgentViewV1 {
|
|
773
|
+
readonly id: string;
|
|
774
|
+
readonly name: string;
|
|
775
|
+
readonly role: string;
|
|
776
|
+
readonly humanControlled: boolean;
|
|
777
|
+
readonly mood: string;
|
|
778
|
+
readonly currentIntent: string | null;
|
|
779
|
+
readonly goals: readonly SimulationDynamicKnowledgeViewV1[];
|
|
780
|
+
readonly beliefs: readonly SimulationDynamicKnowledgeViewV1[];
|
|
781
|
+
readonly relationships: readonly SimulationDynamicKnowledgeViewV1[];
|
|
782
|
+
readonly memories: readonly SimulationDynamicKnowledgeViewV1[];
|
|
783
|
+
readonly resources: readonly SimulationDynamicKnowledgeViewV1[];
|
|
784
|
+
readonly recentAutonomousActions: readonly SimulationDynamicKnowledgeViewV1[];
|
|
785
|
+
}
|
|
786
|
+
export interface SimulationDynamicDomainObjectViewV1 {
|
|
787
|
+
readonly id: string;
|
|
788
|
+
readonly kind: string;
|
|
789
|
+
readonly label: string;
|
|
790
|
+
readonly status: string;
|
|
791
|
+
readonly version: number;
|
|
792
|
+
readonly ownerActorId: string | null;
|
|
793
|
+
readonly data: SimulationJsonObjectV1;
|
|
794
|
+
readonly links: readonly SimulationDynamicDomainObjectLinkV1[];
|
|
795
|
+
readonly updatedRevision: number;
|
|
796
|
+
}
|
|
797
|
+
export type SimulationDynamicWorldEffectViewV1 = {
|
|
798
|
+
readonly operation: 'resource.change';
|
|
799
|
+
readonly resourceId: string;
|
|
800
|
+
readonly resourceLabel: string;
|
|
801
|
+
readonly delta: number;
|
|
802
|
+
/** Absent in checkpoints written before effect causes were projected. */
|
|
803
|
+
readonly cause?: {
|
|
804
|
+
readonly actor: string;
|
|
805
|
+
readonly action: string;
|
|
806
|
+
readonly reason: string;
|
|
807
|
+
};
|
|
808
|
+
} | {
|
|
809
|
+
readonly operation: 'fact.add' | 'fact.remove';
|
|
810
|
+
readonly fact: string;
|
|
811
|
+
} | {
|
|
812
|
+
readonly operation: 'object.put';
|
|
813
|
+
readonly objectId: string;
|
|
814
|
+
readonly objectKind: string;
|
|
815
|
+
readonly objectLabel: string;
|
|
816
|
+
readonly status: string;
|
|
817
|
+
readonly version: number;
|
|
818
|
+
readonly expectedVersion: number | null;
|
|
819
|
+
readonly ownerActorId: string | null;
|
|
820
|
+
};
|
|
821
|
+
export interface SimulationDynamicPlayFrameV1 {
|
|
822
|
+
readonly storyReview?: StoryReviewViewV1;
|
|
823
|
+
readonly schemaVersion: 5;
|
|
824
|
+
readonly locations: SimulationInteractionStateV1['locations'];
|
|
825
|
+
readonly positions: SimulationInteractionStateV1['positions'];
|
|
826
|
+
readonly meetings: readonly SimulationMeetingV1[];
|
|
827
|
+
readonly storyteller: DynamicInitializationV1['storyteller'] | null;
|
|
828
|
+
/** Optional only for checkpoints written before player ruling projection. */
|
|
829
|
+
readonly playerDecision?: null | {
|
|
830
|
+
readonly label: string;
|
|
831
|
+
readonly playerActionId: string;
|
|
832
|
+
readonly outcome: 'succeeded' | 'partial' | 'failed';
|
|
833
|
+
readonly reason: string;
|
|
834
|
+
};
|
|
835
|
+
readonly gameKind: string;
|
|
836
|
+
readonly revision: number;
|
|
837
|
+
readonly status: SimulationDynamicRunStatusV1;
|
|
838
|
+
readonly safetyCeiling: {
|
|
839
|
+
readonly current: number;
|
|
840
|
+
readonly maximum: number;
|
|
841
|
+
};
|
|
842
|
+
readonly situation: {
|
|
843
|
+
readonly id?: string;
|
|
844
|
+
readonly title: string;
|
|
845
|
+
readonly narrative: string;
|
|
846
|
+
readonly urgency: 'low' | 'medium' | 'high' | 'critical';
|
|
847
|
+
readonly openQuestions: readonly string[];
|
|
848
|
+
};
|
|
849
|
+
readonly safeMode: {
|
|
850
|
+
readonly active: boolean;
|
|
851
|
+
readonly reason: string | null;
|
|
852
|
+
};
|
|
853
|
+
readonly pacing: SimulationGmProposalV1['pacing'];
|
|
854
|
+
readonly availableActions: readonly SimulationDynamicPlayerActionV1[];
|
|
855
|
+
readonly characterResponses: SimulationGmProposalV1['characterResponses'];
|
|
856
|
+
readonly agents: readonly SimulationDynamicAgentViewV1[];
|
|
857
|
+
readonly worldFacts: readonly string[];
|
|
858
|
+
readonly world: readonly {
|
|
859
|
+
readonly id: string;
|
|
860
|
+
readonly label: string;
|
|
861
|
+
readonly value: number;
|
|
862
|
+
readonly minimum: number;
|
|
863
|
+
readonly maximum: number;
|
|
864
|
+
/** The meter's starting value, so a reader can tell which way it has moved. */
|
|
865
|
+
readonly initial?: number;
|
|
866
|
+
readonly dangerDirection: SimulationDynamicResourceDefinitionV1['dangerDirection'];
|
|
867
|
+
}[];
|
|
868
|
+
readonly domainObjects: readonly SimulationDynamicDomainObjectViewV1[];
|
|
869
|
+
readonly latestEffects: readonly SimulationDynamicWorldEffectViewV1[];
|
|
870
|
+
readonly timeline: readonly {
|
|
871
|
+
readonly revision: number;
|
|
872
|
+
readonly eventId: string;
|
|
873
|
+
readonly kind: SimulationDynamicTimelineKindV1;
|
|
874
|
+
readonly title: string;
|
|
875
|
+
readonly summary: string;
|
|
876
|
+
}[];
|
|
877
|
+
readonly adjudications: readonly {
|
|
878
|
+
readonly proposalId: string;
|
|
879
|
+
readonly outcome: SimulationGmProposalV1['adjudications'][number]['outcome'];
|
|
880
|
+
readonly reason: string;
|
|
881
|
+
readonly actionIds: readonly string[];
|
|
882
|
+
}[];
|
|
883
|
+
readonly ending: SimulationGmProposalV1['ending'];
|
|
884
|
+
}
|
|
885
|
+
export interface DynamicHistoryReference {
|
|
886
|
+
readonly version: 1;
|
|
887
|
+
readonly identity: string;
|
|
888
|
+
readonly revision: number;
|
|
889
|
+
readonly digest: string;
|
|
890
|
+
}
|
|
891
|
+
export interface DynamicHistoryArchive {
|
|
892
|
+
readonly version: 1;
|
|
893
|
+
readonly genesis: DynamicHistoryReference;
|
|
894
|
+
readonly head: DynamicHistoryReference;
|
|
895
|
+
}
|
|
896
|
+
export interface SimulationDynamicStateV1 {
|
|
897
|
+
readonly episode?: StoryEpisodeV1;
|
|
898
|
+
readonly agencyVersion?: 'emergent-v1';
|
|
899
|
+
readonly historyArchive?: DynamicHistoryArchive;
|
|
900
|
+
readonly schemaVersion: 11;
|
|
901
|
+
readonly interaction: SimulationInteractionStateV1;
|
|
902
|
+
readonly initialization: DynamicInitialization | null;
|
|
903
|
+
readonly gameKind: string;
|
|
904
|
+
readonly rulesVersion: string;
|
|
905
|
+
readonly seed: string;
|
|
906
|
+
readonly revision: number;
|
|
907
|
+
readonly status: SimulationDynamicRunStatusV1;
|
|
908
|
+
readonly safetyCeiling: number;
|
|
909
|
+
readonly world: SimulationDynamicWorldStateV1;
|
|
910
|
+
readonly agents: readonly SimulationPersistentAgentStateV1[];
|
|
911
|
+
readonly history: readonly SimulationDynamicHistoryEntryV1[];
|
|
912
|
+
readonly audit: readonly SimulationDynamicAuditEntryV1[];
|
|
913
|
+
readonly frame: SimulationDynamicPlayFrameV1;
|
|
914
|
+
}
|
|
915
|
+
export interface SimulationDynamicInferenceCallV1 {
|
|
916
|
+
readonly role: 'character' | 'game-master';
|
|
917
|
+
readonly model: 'gpt-5.6-luna' | 'gpt-5.6-sol';
|
|
918
|
+
readonly reasoningEffort: 'low' | 'none';
|
|
919
|
+
readonly maxTokens: number;
|
|
920
|
+
readonly timeoutMs: number;
|
|
921
|
+
readonly system: string;
|
|
922
|
+
readonly input: string;
|
|
923
|
+
}
|
|
924
|
+
/** The one Router model a simulation may run on. */
|
|
925
|
+
export type SimulationRouterModelV1 = 'modal/deepseek-v4.1-flash';
|
|
926
|
+
/** Audit route recorded for every role when the Router model serves a beat. */
|
|
927
|
+
export type SimulationRouterAuditRouteV1 = 'zergrouter:modal/deepseek-v4.1-flash';
|
|
928
|
+
/** The provider and model that actually serve an inference boundary. */
|
|
929
|
+
export interface SimulationServingRouteV1 {
|
|
930
|
+
readonly provider: 'zergrouter';
|
|
931
|
+
readonly model: SimulationRouterModelV1;
|
|
932
|
+
}
|
|
933
|
+
export interface SimulationDynamicInferenceV1 {
|
|
934
|
+
/** Set when the calls are served by a Router model. Receipts then record it instead of the logical Codex tier. */
|
|
935
|
+
readonly servingRoute?: SimulationServingRouteV1;
|
|
936
|
+
complete(call: SimulationDynamicInferenceCallV1): Promise<string>;
|
|
937
|
+
onSettled?(call: SimulationDynamicInferenceCallV1, settlement: SimulationInferenceSettlementV1): void;
|
|
938
|
+
nativeGmCalls?(): readonly SimulationNativeGmCallV1[];
|
|
939
|
+
nativeParticipantCalls?(): readonly SimulationNativeParticipantCallV1[];
|
|
940
|
+
}
|
|
144
941
|
export interface SimulationProgressNotificationV1 {
|
|
145
942
|
readonly type: 'progress';
|
|
146
943
|
readonly session: SimulationSessionRefV1;
|
|
@@ -188,6 +985,8 @@ export interface SimulationWorldPatchV1 {
|
|
|
188
985
|
readonly world?: SimulationJsonObjectV1;
|
|
189
986
|
}
|
|
190
987
|
export interface SimulationDocumentWriteV1 {
|
|
988
|
+
readonly provenance?: SimulationDocumentProvenanceV1;
|
|
989
|
+
readonly ownerActorId?: string;
|
|
191
990
|
readonly operation: 'document.write';
|
|
192
991
|
readonly label: string;
|
|
193
992
|
readonly documentType: string;
|
|
@@ -221,12 +1020,21 @@ export interface SimulationPluginDataWriteV1 {
|
|
|
221
1020
|
readonly namespace: string;
|
|
222
1021
|
readonly value: SimulationJsonObjectV1;
|
|
223
1022
|
}
|
|
224
|
-
export
|
|
1023
|
+
export interface SimulationDynamicStateCommitV1 {
|
|
1024
|
+
readonly operation: 'dynamic-state.commit';
|
|
1025
|
+
readonly state: SimulationDynamicStateV1;
|
|
1026
|
+
}
|
|
1027
|
+
export type SimulationTransitionOperationV1 = {
|
|
1028
|
+
readonly operation: 'session-inputs.resolve';
|
|
1029
|
+
readonly sealedDigest: string;
|
|
1030
|
+
readonly resolutions: readonly import('./simulation_interventions.js').SimulationInterventionResolutionV1[];
|
|
1031
|
+
} | SimulationDocumentWriteV1 | SimulationDocumentCommentV1 | SimulationWorldWriteV1 | SimulationPluginDataWriteV1 | SimulationDynamicStateCommitV1;
|
|
225
1032
|
export interface SimulationTransitionBatchV1 {
|
|
226
1033
|
readonly kind: string;
|
|
227
1034
|
readonly expectedRevision: number;
|
|
228
1035
|
readonly idempotencyKey: string;
|
|
229
1036
|
readonly periodNumber?: number;
|
|
1037
|
+
readonly advanceTimeSteps?: number;
|
|
230
1038
|
readonly operations: readonly SimulationTransitionOperationV1[];
|
|
231
1039
|
}
|
|
232
1040
|
export interface SimulationTransitionResultV1 {
|
|
@@ -237,9 +1045,29 @@ export interface SimulationTransitionResultV1 {
|
|
|
237
1045
|
export interface SimulationDriverAuthorityV1 {
|
|
238
1046
|
applyTransition(batch: SimulationTransitionBatchV1): Promise<SimulationTransitionResultV1>;
|
|
239
1047
|
}
|
|
1048
|
+
export interface SimulationDefinitionV1 {
|
|
1049
|
+
readonly kind: string;
|
|
1050
|
+
readonly title: string;
|
|
1051
|
+
readonly summary: string;
|
|
1052
|
+
readonly objective: string;
|
|
1053
|
+
readonly maxTurns: number;
|
|
1054
|
+
readonly estimatedMinutes: number;
|
|
1055
|
+
readonly playerRoles: readonly string[];
|
|
1056
|
+
readonly mechanics: readonly string[];
|
|
1057
|
+
}
|
|
1058
|
+
export interface SimulationPlayerCommandV1 {
|
|
1059
|
+
readonly commandId: string;
|
|
1060
|
+
readonly kind: string;
|
|
1061
|
+
readonly actorId?: string;
|
|
1062
|
+
readonly payload: SimulationJsonObjectV1;
|
|
1063
|
+
}
|
|
1064
|
+
export interface SimulationPlayerCommandResultV1 {
|
|
1065
|
+
readonly accepted: boolean;
|
|
1066
|
+
}
|
|
240
1067
|
export interface SimulationDriverContextV1 {
|
|
241
1068
|
readonly session: SimulationSessionV1;
|
|
242
1069
|
readonly authority: SimulationDriverAuthorityV1;
|
|
1070
|
+
readonly playerCommand: SimulationPlayerCommandV1 | null;
|
|
243
1071
|
readonly signal: AbortSignal;
|
|
244
1072
|
notify(notification: SimulationNotificationV1): void;
|
|
245
1073
|
completeInference(request: SimulationInferenceRequestV1): Promise<SimulationInferenceResultV1>;
|
|
@@ -252,15 +1080,21 @@ export interface SimulationDriverV1 {
|
|
|
252
1080
|
rehydrate?(context: SimulationDriverContextV1, checkpointPath: string): void | Promise<void>;
|
|
253
1081
|
}
|
|
254
1082
|
export interface SimulationDriverRegistrationV1 {
|
|
1083
|
+
readonly initializeDocuments?: (state: SimulationDynamicStateV1) => readonly SimulationDocumentWriteV1[];
|
|
1084
|
+
readonly validateDocuments?: (snapshot: SimulationSessionSnapshotV1) => void;
|
|
1085
|
+
readonly validateDynamicState?: (state: SimulationDynamicStateV1) => void;
|
|
255
1086
|
readonly kind: string;
|
|
256
1087
|
readonly compatibility: SimulationCompatibilityV1;
|
|
1088
|
+
readonly definition?: SimulationDefinitionV1;
|
|
257
1089
|
loadDriver(): Promise<SimulationDriverV1>;
|
|
258
1090
|
}
|
|
259
1091
|
export interface SimulationHostV1 {
|
|
260
1092
|
readonly capabilities: SimulationHostCapabilitiesV1;
|
|
1093
|
+
listSimulationDefinitions(): readonly SimulationDefinitionV1[];
|
|
261
1094
|
createSession(request: SimulationCreateSessionRequestV1): Promise<SimulationSessionV1>;
|
|
262
1095
|
loadSession(request: SimulationLoadSessionRequestV1): Promise<SimulationSessionV1>;
|
|
263
1096
|
getSession(ref: SimulationSessionRefV1): SimulationSessionV1 | null;
|
|
1097
|
+
submitPlayerCommand(ref: SimulationSessionRefV1, command: SimulationPlayerCommandV1): Promise<SimulationPlayerCommandResultV1>;
|
|
264
1098
|
startSession(request: SimulationStartSessionRequestV1): Promise<void>;
|
|
265
1099
|
stopSession(ref: SimulationSessionRefV1): Promise<void>;
|
|
266
1100
|
checkpoint(request: SimulationCheckpointRequestV1): Promise<SimulationCheckpointRefV1>;
|
|
@@ -271,3 +1105,4 @@ export interface SimulationPluginActivationContextV1 {
|
|
|
271
1105
|
requireHost(compatibility: SimulationCompatibilityV1): SimulationHostV1;
|
|
272
1106
|
register(registration: SimulationDriverRegistrationV1): void;
|
|
273
1107
|
}
|
|
1108
|
+
export {};
|