@zergai/ztc 0.26.6-dev.202611240947 → 0.27.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 +629 -167
- package/RUST_THIRD_PARTY_LICENSES.txt +5 -5
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/zmux-linux-x64 +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-tui-linux-x64 +0 -0
- package/bin/zterm-darwin-arm64 +2 -2
- package/dist/App.js +6 -1
- package/dist/agent/agent.d.ts +21 -15
- package/dist/agent/agent.js +389 -163
- package/dist/agent/backends/codex_app_server.d.ts +7 -1
- package/dist/agent/backends/codex_app_server.js +11 -1
- package/dist/agent/backends/gemini.js +22 -8
- package/dist/agent/commands/batch.js +8 -0
- package/dist/agent/commands/config.js +10 -0
- package/dist/agent/commands/environment.js +5 -5
- package/dist/agent/commands/goal.d.ts +1 -0
- package/dist/agent/commands/goal.js +2 -1
- package/dist/agent/commands/index.js +2 -1
- package/dist/agent/commands/manifest.js +4 -0
- package/dist/agent/commands/optimize.js +5 -2
- package/dist/agent/commands/pane_cli.d.ts +29 -0
- package/dist/agent/commands/pane_cli.js +303 -0
- package/dist/agent/commands/settings.js +13 -3
- package/dist/agent/commands/shannon.js +8 -0
- package/dist/agent/commands/update.js +15 -3
- package/dist/agent/commands/zerg.js +31 -1
- package/dist/agent/commands/ztc_pane.js +3 -1
- package/dist/agent/factory.d.ts +4 -0
- package/dist/agent/factory.js +11 -1
- package/dist/agent/loop_policy.d.ts +42 -5
- package/dist/agent/loop_policy.js +206 -3
- package/dist/agent/runtime/command_jobs.d.ts +5 -0
- package/dist/agent/runtime/command_jobs.js +241 -31
- package/dist/agent/runtime/command_wait.d.ts +2 -0
- package/dist/agent/runtime/command_wait.js +1 -0
- package/dist/agent/runtime/done_report.d.ts +18 -0
- package/dist/agent/runtime/done_report.js +130 -0
- package/dist/agent/runtime/execution_context.js +4 -1
- package/dist/agent/runtime/failure_cause.d.ts +2 -0
- package/dist/agent/runtime/failure_cause.js +35 -0
- package/dist/agent/runtime/policy.d.ts +14 -2
- package/dist/agent/runtime/policy.js +104 -12
- package/dist/agent/runtime/quiet_job.d.ts +18 -0
- package/dist/agent/runtime/quiet_job.js +48 -0
- package/dist/agent/runtime/recovery.d.ts +1 -5
- package/dist/agent/runtime/recovery.js +2 -44
- package/dist/agent/runtime/tool_runtime.d.ts +1 -0
- package/dist/agent/runtime/tool_runtime.js +2 -0
- package/dist/agent/subagent.js +6 -1
- package/dist/agent/tools/deferred.js +1 -0
- package/dist/agent/tools/index.d.ts +2 -0
- package/dist/agent/tools/index.js +1 -0
- package/dist/agent/tools/outcome.d.ts +15 -0
- package/dist/agent/tools/outcome.js +107 -0
- package/dist/agent/tools/pane.d.ts +2 -1
- package/dist/agent/tools/pane.js +21 -3
- package/dist/agent/tools/registry.js +2 -0
- package/dist/agent/tools/shell.d.ts +1 -0
- package/dist/agent/tools/shell.js +128 -17
- package/dist/agent/tools/sim_domain_tools.js +4 -2
- package/dist/agent/tools/supervision.js +4 -2
- package/dist/agent/tools/types.d.ts +3 -0
- package/dist/app/command_context.js +5 -9
- package/dist/app/conversation_compaction.d.ts +4 -2
- package/dist/app/conversation_compaction.js +16 -5
- package/dist/app/headless_shell_mode.d.ts +14 -0
- package/dist/app/headless_shell_mode.js +7 -0
- package/dist/app/hosted_resident.d.ts +356 -0
- package/dist/app/hosted_resident.js +677 -0
- package/dist/app/restart.js +11 -2
- package/dist/app/session_manager.d.ts +5 -0
- package/dist/app/session_manager.js +21 -6
- package/dist/app/session_messages.js +6 -6
- package/dist/app/workspace_layout_controller.js +7 -0
- package/dist/batch/worktree.d.ts +10 -0
- package/dist/batch/worktree.js +15 -0
- package/dist/bench/registry.js +4 -2
- package/dist/cli_args.js +1 -1
- package/dist/cli_main.js +80 -10
- package/dist/cli_ratatui.d.ts +75 -0
- package/dist/cli_ratatui.js +485 -84
- package/dist/components/InputArea.js +4 -4
- package/dist/config/execution.d.ts +10 -0
- package/dist/config/execution.js +10 -0
- package/dist/config/hosted_runtime.d.ts +4 -1
- package/dist/config/hosted_runtime.js +4 -1
- package/dist/config/permission_pin.d.ts +34 -2
- package/dist/config/permission_pin.js +52 -2
- package/dist/config/person_command_policy.d.ts +38 -0
- package/dist/config/person_command_policy.js +11 -0
- package/dist/config/profiles.d.ts +21 -0
- package/dist/config/profiles.js +56 -2
- package/dist/config/types.d.ts +4 -1
- package/dist/config.js +34 -19
- package/dist/desktop/daily/codex_exec_adapter.js +7 -2
- package/dist/desktop/daily/desktop_wiring.d.ts +7 -1
- package/dist/desktop/daily/desktop_wiring.js +11 -3
- package/dist/desktop/daily/recipes.js +20 -4
- package/dist/desktop/health.d.ts +24 -0
- package/dist/desktop/health.js +151 -0
- package/dist/desktop/native_dialogs.d.ts +37 -0
- package/dist/desktop/native_dialogs.js +105 -0
- package/dist/diagnostics/session_export.d.ts +1 -0
- package/dist/diagnostics/session_export.js +28 -0
- package/dist/embedded/registry.js +4 -2
- package/dist/emulation/tool_adapters.js +9 -4
- package/dist/emulation/ztc_addendum.js +3 -0
- package/dist/headless.d.ts +11 -4
- package/dist/headless.js +99 -34
- package/dist/headless_approval.d.ts +6 -0
- package/dist/headless_cli.js +1 -1
- package/dist/hooks/runner.js +7 -6
- package/dist/library.d.ts +4 -0
- package/dist/library.js +3 -0
- package/dist/mcp/client.js +3 -3
- package/dist/modes/registry.js +13 -4
- package/dist/onboarding/setup_environment.js +13 -1
- package/dist/optimize/adapters/kernelbench.js +88 -10
- package/dist/optimize/adapters/types.d.ts +5 -0
- package/dist/optimize/executor.js +21 -0
- package/dist/panes/cli_install.d.ts +54 -0
- package/dist/panes/cli_install.js +157 -0
- package/dist/panes/model_catalog.js +3 -0
- package/dist/panes/new_pane_choices.d.ts +6 -2
- package/dist/panes/new_pane_choices.js +24 -12
- package/dist/panes/pane_cli_launch.d.ts +50 -0
- package/dist/panes/pane_cli_launch.js +124 -0
- package/dist/panes/pane_clis.d.ts +171 -0
- package/dist/panes/pane_clis.js +325 -0
- package/dist/panes/person_only_panes.d.ts +45 -0
- package/dist/panes/person_only_panes.js +117 -0
- package/dist/plugin/simulation_living.js +0 -2
- package/dist/plugin/simulation_living_engine.d.ts +1 -0
- package/dist/plugin/simulation_living_engine.js +1 -0
- package/dist/plugin/simulation_living_labels.d.ts +3 -0
- package/dist/plugin/simulation_living_labels.js +2 -0
- package/dist/router_auth.js +12 -1
- package/dist/session.js +26 -1
- package/dist/simulation/art/gemini_image.js +11 -5
- package/dist/simulation/domains/loader.js +25 -3
- package/dist/simulation/living/cold.d.ts +23 -0
- package/dist/simulation/living/cold.js +41 -0
- package/dist/simulation/living/context.d.ts +591 -1283
- package/dist/simulation/living/context.js +378 -244
- package/dist/simulation/living/contradictions.d.ts +14 -0
- package/dist/simulation/living/contradictions.js +282 -0
- package/dist/simulation/living/core/ids.d.ts +53 -0
- package/dist/simulation/living/core/ids.js +39 -0
- package/dist/simulation/living/core/kind.d.ts +20 -0
- package/dist/simulation/living/core/kind.js +15 -0
- package/dist/simulation/living/core/laws.d.ts +179 -0
- package/dist/simulation/living/core/laws.js +184 -0
- package/dist/simulation/living/core/ops.d.ts +257 -0
- package/dist/simulation/living/core/ops.js +34 -0
- package/dist/simulation/living/definer.d.ts +17 -1
- package/dist/simulation/living/definer.js +130 -51
- package/dist/simulation/living/definition.d.ts +174 -65
- package/dist/simulation/living/definition.js +287 -180
- package/dist/simulation/living/director.d.ts +80 -0
- package/dist/simulation/living/director.js +363 -0
- package/dist/simulation/living/frame.d.ts +108 -21
- package/dist/simulation/living/frame.js +111 -66
- package/dist/simulation/living/identifiers.d.ts +0 -1
- package/dist/simulation/living/identifiers.js +0 -3
- package/dist/simulation/living/index.d.ts +18 -9
- package/dist/simulation/living/index.js +18 -9
- package/dist/simulation/living/inference.d.ts +92 -50
- package/dist/simulation/living/inference.js +319 -175
- package/dist/simulation/living/knowledge.d.ts +28 -0
- package/dist/simulation/living/knowledge.js +73 -0
- package/dist/simulation/living/library.json +1177 -0
- package/dist/simulation/living/mechanics.d.ts +31 -34
- package/dist/simulation/living/mechanics.js +222 -138
- package/dist/simulation/living/model-input.d.ts +6 -3
- package/dist/simulation/living/model-input.js +18 -26
- package/dist/simulation/living/open-world.d.ts +74 -94
- package/dist/simulation/living/open-world.js +151 -30
- package/dist/simulation/living/phrases.d.ts +3 -0
- package/dist/simulation/living/phrases.js +37 -0
- package/dist/simulation/living/phrases.json +560 -0
- package/dist/simulation/living/projection.d.ts +316 -2
- package/dist/simulation/living/projection.js +50 -2
- package/dist/simulation/living/prompts/example-spec.json +11 -0
- package/dist/simulation/living/prompts/role-text.json +14 -0
- package/dist/simulation/living/prompts.d.ts +5 -0
- package/dist/simulation/living/prompts.js +275 -0
- package/dist/simulation/living/recall.d.ts +2 -2
- package/dist/simulation/living/reduce.d.ts +51 -14
- package/dist/simulation/living/reduce.js +941 -579
- package/dist/simulation/living/replay.d.ts +5 -4
- package/dist/simulation/living/replay.js +10 -9
- package/dist/simulation/living/runtime.d.ts +135 -25
- package/dist/simulation/living/runtime.js +1641 -583
- package/dist/simulation/living/scale.d.ts +96 -0
- package/dist/simulation/living/scale.js +124 -0
- package/dist/simulation/living/script.d.ts +5 -0
- package/dist/simulation/living/script.js +115 -0
- package/dist/simulation/living/shared-kinds.d.ts +4 -11
- package/dist/simulation/living/shared-kinds.js +11 -81
- package/dist/simulation/living/space.d.ts +14 -0
- package/dist/simulation/living/space.js +132 -0
- package/dist/simulation/living/state.d.ts +100 -0
- package/dist/simulation/living/state.js +393 -0
- package/dist/simulation/living/types.d.ts +829 -512
- package/dist/simulation/living/types.js +162 -187
- package/dist/simulation/living/world-rules.d.ts +100 -0
- package/dist/simulation/living/world-rules.js +267 -0
- package/dist/simulation/plugins/loader.js +11 -0
- package/dist/skills/loader.js +4 -0
- package/dist/tools.d.ts +1 -0
- package/dist/tools.js +1 -0
- package/dist/ui/ratatui/headless_pane_manager.d.ts +4 -1
- package/dist/ui/ratatui/headless_pane_manager.js +13 -9
- package/dist/ui/ratatui/pane_relay.js +29 -0
- package/dist/ui/ratatui/pane_type.d.ts +10 -0
- package/dist/ui/ratatui/pane_type.js +11 -0
- package/dist/ui/ratatui/process.d.ts +30 -0
- package/dist/ui/ratatui/process.js +133 -19
- package/dist/ui/ratatui/protocol.d.ts +124 -2
- package/dist/ui/ratatui/protocol.js +35 -0
- package/dist/ui/ratatui/relay_policy.js +3 -0
- package/dist/ui/ratatui/ztc_launch_trust.d.ts +2 -1
- package/dist/ui/ratatui/ztc_launch_trust.js +8 -1
- package/dist/ui/terminal_image.d.ts +12 -0
- package/dist/ui/terminal_image.js +21 -1
- package/dist/utils/codex_project_trust.d.ts +19 -0
- package/dist/utils/codex_project_trust.js +37 -0
- package/dist/utils/compaction.js +103 -20
- package/dist/utils/git_program_files.d.ts +19 -12
- package/dist/utils/git_program_files.js +411 -83
- package/dist/utils/host_shell.d.ts +10 -1
- package/dist/utils/host_shell.js +14 -1
- package/dist/utils/mid_turn_compaction.d.ts +2 -0
- package/dist/utils/mid_turn_compaction.js +2 -0
- package/dist/utils/models.js +6 -1
- package/dist/utils/sandbox.d.ts +109 -8
- package/dist/utils/sandbox.js +981 -187
- package/dist/utils/shell.d.ts +2 -0
- package/dist/utils/shell.js +10 -4
- package/dist/utils/subprocess_env.d.ts +47 -11
- package/dist/utils/subprocess_env.js +107 -15
- package/dist/utils/system_ps.d.ts +8 -0
- package/dist/utils/system_ps.js +39 -7
- package/dist/utils/unattended_compaction.d.ts +9 -0
- package/dist/utils/unattended_compaction.js +13 -0
- package/dist/utils/ztc_own_state.d.ts +8 -5
- package/dist/utils/ztc_own_state.js +17 -11
- package/dist/web/mirror_client.js +1 -0
- package/dist/web/mirror_stream.d.ts +50 -6
- package/dist/web/mirror_stream.js +160 -15
- package/dist/workflows/registry.js +3 -1
- package/dist/workspace/controller.js +12 -0
- package/dist/workspace_collision.d.ts +3 -0
- package/dist/workspace_collision.js +14 -1
- package/dist/workspace_session_context.js +2 -1
- package/dist/zlm-embed.mjs +3823 -1970
- package/node_modules/@zerg/model-contracts/README.md +16 -4
- package/node_modules/@zerg/model-contracts/index.js +6 -1
- package/npm-shrinkwrap.json +1 -1
- package/package.json +42 -24
- package/packages/model-contracts/README.md +16 -4
- package/packages/model-contracts/index.js +6 -1
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
export { modelContextPeople } from './context.js';
|
|
2
|
-
export {
|
|
1
|
+
export { modelContextPeople, knownPlaces, perceivedPlaces, knowsPlace, reachFor } from './context.js';
|
|
2
|
+
export { PERSON_KNOWLEDGE, personKnowledgeSources, type PersonKnowledgeKind, type PersonKnowledgeSource } from './knowledge.js';
|
|
3
|
+
export { assertLivingModelCall, LIVING_INPUT_BUDGETS, LIVING_RESPONSE_SCHEMA_BUDGET, MODEL_EXCERPT_LIMITS, MODEL_VIEW_NOTE, modelTextExcerpt } from './model-input.js';
|
|
3
4
|
export * from './types.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
export { BOUNDS, boundState, capsBoundaryOf, weigh, digestOf, foldOf, ring, tableRing, sealState, notedShare, type Fold, type Ring, type TableRing } from './state.js';
|
|
6
|
+
export { MemoryColdStore, type ColdRecord, type ColdStore } from './cold.js';
|
|
7
|
+
export { defineLivingKind, reviseLivingKind, kindDefinitionResponseSchema, REVISION_CALLS } from './definer.js';
|
|
8
|
+
export { kindDefinitionSchema, kindRequestSchema, narrowsKindRevision, seriesEntrySchema, idDescription, idSchema, type LivingKindDefinition, type LivingSeriesEntry } from './open-world.js';
|
|
9
|
+
export { definitionSchema, definitionJsonSchema, parseLivingWorldDefinition, parseKindRevision, createLivingState, type LivingWorldDefinition, type LivingWorldDefinitionRaw, type LivingWorldDefinitionInput } from './definition.js';
|
|
10
|
+
export { worldRuleLines, answerReach } from './world-rules.js';
|
|
11
|
+
export { DEFAULT_CALENDAR, calendarSchema, PACING, type LivingCalendar, type PacingKey } from './scale.js';
|
|
12
|
+
export { proseContradictions, unknownNames, type ProseContradiction } from './contradictions.js';
|
|
13
|
+
export { answeredAgain, saidAgain, applyLivingEvent, clockTargetAt, livingClockLead, peopleAt, witnessesFor, nearbyFor, arrivalFor, travelPath, unansweredSince, liveExchange } from './reduce.js';
|
|
8
14
|
export { recallMemories, recallBeliefs, type RecalledMemory } from './recall.js';
|
|
9
|
-
export { LIVING_INFERENCE_LIMITS, GM_EFFECT_KINDS, gmEffectSchema, attemptResponseSchema, scopedAttemptResponseSchema, reactionResponseSchema, scopedReactionResponseSchema, speechImpactResponseSchema, planResponseSchema, scopedPlanResponseSchema, messageReplyResponseSchema, epilogueResponseSchema, type LivingInference, type LivingInferenceCall, type LivingInferenceRole, type GmEffectRecord, } from './inference.js';
|
|
10
|
-
export { clockLabel, describeScene, gameMasterAttemptInput, gameMasterWorldInput, characterReactionInput, characterPlanInput, characterMessageReplyInput, epilogueInput, pressingMatters, joinedPlaceSeq, conversationLines, recentLinesBy,
|
|
11
|
-
export {
|
|
15
|
+
export { LIVING_INFERENCE_LIMITS, LIVING_ANSWER_BUDGET_MS, LIVING_ANSWER_CHARS_PER_TOKEN, LIVING_TRUNCATED_ANSWER_CODE, schemaWorstCaseChars, livingAnswerTokens, livingAnswerWasCutOff, GM_EFFECT_KINDS, gmEffectSchema, attemptResponseSchema, scopedAttemptResponseSchema, reactionResponseSchema, scopedReactionResponseSchema, speechImpactResponseSchema, planResponseSchema, scopedPlanResponseSchema, messageReplyResponseSchema, scopedMessageReplyResponseSchema, epilogueResponseSchema, type LivingInference, type LivingInferenceCall, type LivingInferenceRole, type GmEffectRecord, } from './inference.js';
|
|
16
|
+
export { clockLabel, describeScene, gameMasterAttemptInput, gameMasterWorldInput, characterReactionInput, replyPressureMatches, characterPlanInput, characterMessageReplyInput, epilogueInput, pressingMatters, joinedPlaceSeq, conversationLines, recentLinesBy, memoryBoundToOpenBusiness, memoryIsPressing, ownPapers, openChoices, PRESSING_IMPORTANCE, } from './context.js';
|
|
17
|
+
export { ROLE_IDS, WORLD_PRINCIPLES, roleText, systemFor, type RoleId } from './prompts.js';
|
|
18
|
+
export { startLivingWorld, validateLivingWorldDefinition, runLivingCommand, translateGmEffect, livingClockTarget, setLivingClock, tickLivingWorld, livingDueWork, runLivingWork, advanceLivingWorld, carryOnLivingWork, livingWorkIsRoutine, duePlanCard, parseReaction, reactionProblems, presenceProblems, reactionAnswerProblems, type ReactionProblem, type ReactionProblemFacts, type LivingWorldCell, type LivingWork, MAX_DUE_ITEMS_PER_STEP, MAX_REACTORS, MAX_MODEL_CALLS_PER_COMMAND, SHOCK_IMPORTANCE, PLAYER_MAX_TEXT_BYTES, OBJECTIVE_EFFECT_KINDS, EFFECT_KINDS, EVENT_KINDS, SCHEDULE_KINDS, PLAN_OVERDUE_PACE, planOverdueAfter, changesSomething, type Reaction, type LivingCommand, type LivingStep, type LivingAuditRecord, } from './runtime.js';
|
|
12
19
|
export { replayLivingWorld, verifyLivingWorld } from './replay.js';
|
|
20
|
+
export { DIRECTOR_STALL_COMMANDS, DIRECTOR_REPEATED_ASKS, directorResponseSchema, directorResponseSchemaFor, directorSignals, directorInput, parseDirectorDevelopment, directorScheduledItem, runDirectorJob, type DirectorTrigger, type DirectorSignals, type DirectorDevelopment, type DirectorHost, } from './director.js';
|
|
13
21
|
export { makeLivingPlayerFrame, livingPlayerFeed, type LivingPlayerFrame, type LivingFeedItem } from './frame.js';
|
|
14
22
|
export { blockedActionKinds, blockedByGate, gatesOn } from './mechanics.js';
|
|
15
23
|
export { sharedKindMap } from './shared-kinds.js';
|
|
24
|
+
export { characterView, ownRecentLines, spokenLines, papersInMindFor, duePlanEntry, nearbyObserved, evidenceOf } from './projection.js';
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
export { modelContextPeople } from './context.js';
|
|
2
|
-
export {
|
|
1
|
+
export { modelContextPeople, knownPlaces, perceivedPlaces, knowsPlace, reachFor } from './context.js';
|
|
2
|
+
export { PERSON_KNOWLEDGE, personKnowledgeSources } from './knowledge.js';
|
|
3
|
+
export { assertLivingModelCall, LIVING_INPUT_BUDGETS, LIVING_RESPONSE_SCHEMA_BUDGET, MODEL_EXCERPT_LIMITS, MODEL_VIEW_NOTE, modelTextExcerpt } from './model-input.js';
|
|
3
4
|
export * from './types.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
5
|
+
export { BOUNDS, boundState, capsBoundaryOf, weigh, digestOf, foldOf, ring, tableRing, sealState, notedShare } from './state.js';
|
|
6
|
+
export { MemoryColdStore } from './cold.js';
|
|
7
|
+
export { defineLivingKind, reviseLivingKind, kindDefinitionResponseSchema, REVISION_CALLS } from './definer.js';
|
|
8
|
+
export { kindDefinitionSchema, kindRequestSchema, narrowsKindRevision, seriesEntrySchema, idDescription, idSchema } from './open-world.js';
|
|
9
|
+
export { definitionSchema, definitionJsonSchema, parseLivingWorldDefinition, parseKindRevision, createLivingState } from './definition.js';
|
|
10
|
+
export { worldRuleLines, answerReach } from './world-rules.js';
|
|
11
|
+
export { DEFAULT_CALENDAR, calendarSchema, PACING } from './scale.js';
|
|
12
|
+
export { proseContradictions, unknownNames } from './contradictions.js';
|
|
13
|
+
export { answeredAgain, saidAgain, applyLivingEvent, clockTargetAt, livingClockLead, peopleAt, witnessesFor, nearbyFor, arrivalFor, travelPath, unansweredSince, liveExchange } from './reduce.js';
|
|
8
14
|
export { recallMemories, recallBeliefs } from './recall.js';
|
|
9
|
-
export { LIVING_INFERENCE_LIMITS, GM_EFFECT_KINDS, gmEffectSchema, attemptResponseSchema, scopedAttemptResponseSchema, reactionResponseSchema, scopedReactionResponseSchema, speechImpactResponseSchema, planResponseSchema, scopedPlanResponseSchema, messageReplyResponseSchema, epilogueResponseSchema, } from './inference.js';
|
|
10
|
-
export { clockLabel, describeScene, gameMasterAttemptInput, gameMasterWorldInput, characterReactionInput, characterPlanInput, characterMessageReplyInput, epilogueInput, pressingMatters, joinedPlaceSeq, conversationLines, recentLinesBy,
|
|
11
|
-
export {
|
|
15
|
+
export { LIVING_INFERENCE_LIMITS, LIVING_ANSWER_BUDGET_MS, LIVING_ANSWER_CHARS_PER_TOKEN, LIVING_TRUNCATED_ANSWER_CODE, schemaWorstCaseChars, livingAnswerTokens, livingAnswerWasCutOff, GM_EFFECT_KINDS, gmEffectSchema, attemptResponseSchema, scopedAttemptResponseSchema, reactionResponseSchema, scopedReactionResponseSchema, speechImpactResponseSchema, planResponseSchema, scopedPlanResponseSchema, messageReplyResponseSchema, scopedMessageReplyResponseSchema, epilogueResponseSchema, } from './inference.js';
|
|
16
|
+
export { clockLabel, describeScene, gameMasterAttemptInput, gameMasterWorldInput, characterReactionInput, replyPressureMatches, characterPlanInput, characterMessageReplyInput, epilogueInput, pressingMatters, joinedPlaceSeq, conversationLines, recentLinesBy, memoryBoundToOpenBusiness, memoryIsPressing, ownPapers, openChoices, PRESSING_IMPORTANCE, } from './context.js';
|
|
17
|
+
export { ROLE_IDS, WORLD_PRINCIPLES, roleText, systemFor } from './prompts.js';
|
|
18
|
+
export { startLivingWorld, validateLivingWorldDefinition, runLivingCommand, translateGmEffect, livingClockTarget, setLivingClock, tickLivingWorld, livingDueWork, runLivingWork, advanceLivingWorld, carryOnLivingWork, livingWorkIsRoutine, duePlanCard, parseReaction, reactionProblems, presenceProblems, reactionAnswerProblems, MAX_DUE_ITEMS_PER_STEP, MAX_REACTORS, MAX_MODEL_CALLS_PER_COMMAND, SHOCK_IMPORTANCE, PLAYER_MAX_TEXT_BYTES, OBJECTIVE_EFFECT_KINDS, EFFECT_KINDS, EVENT_KINDS, SCHEDULE_KINDS, PLAN_OVERDUE_PACE, planOverdueAfter, changesSomething, } from './runtime.js';
|
|
12
19
|
export { replayLivingWorld, verifyLivingWorld } from './replay.js';
|
|
20
|
+
export { DIRECTOR_STALL_COMMANDS, DIRECTOR_REPEATED_ASKS, directorResponseSchema, directorResponseSchemaFor, directorSignals, directorInput, parseDirectorDevelopment, directorScheduledItem, runDirectorJob, } from './director.js';
|
|
13
21
|
export { makeLivingPlayerFrame, livingPlayerFeed } from './frame.js';
|
|
14
22
|
export { blockedActionKinds, blockedByGate, gatesOn } from './mechanics.js';
|
|
15
23
|
export { sharedKindMap } from './shared-kinds.js';
|
|
24
|
+
export { characterView, ownRecentLines, spokenLines, papersInMindFor, duePlanEntry, nearbyObserved, evidenceOf } from './projection.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type LivingInferenceRole = 'game-master' | 'character' | 'narrator' | 'definer';
|
|
1
|
+
export type LivingInferenceRole = 'game-master' | 'character' | 'narrator' | 'definer' | 'director';
|
|
2
2
|
export type LivingInferenceCall = {
|
|
3
3
|
role: LivingInferenceRole;
|
|
4
4
|
actorId?: string | null;
|
|
@@ -9,8 +9,9 @@ export type LivingInferenceCall = {
|
|
|
9
9
|
kind: string;
|
|
10
10
|
id: string;
|
|
11
11
|
evidenceEventSeq: number;
|
|
12
|
+
evidenceKind?: string;
|
|
12
13
|
}[];
|
|
13
|
-
phase: 'attempt' | 'world' | 'speech-impact' | 'reaction' | 'reply' | 'plan' | 'epilogue' | 'message-reply' | 'define';
|
|
14
|
+
phase: 'attempt' | 'world' | 'speech-impact' | 'reaction' | 'reply' | 'plan' | 'epilogue' | 'message-reply' | 'define' | 'revise' | 'director';
|
|
14
15
|
system: string;
|
|
15
16
|
input: Readonly<Record<string, unknown>>;
|
|
16
17
|
responseSchema: Readonly<Record<string, unknown>>;
|
|
@@ -18,50 +19,23 @@ export type LivingInferenceCall = {
|
|
|
18
19
|
timeoutMs: number;
|
|
19
20
|
reserveRetry?: () => boolean;
|
|
20
21
|
stillWanted?: () => boolean;
|
|
21
|
-
rebuild?: () => Pick<LivingInferenceCall, 'input' | 'responseSchema' | 'inputRefs' | 'revision'
|
|
22
|
+
rebuild?: () => Pick<LivingInferenceCall, 'input' | 'responseSchema' | 'inputRefs' | 'revision' | 'maxTokens'> & {
|
|
23
|
+
system?: string;
|
|
24
|
+
};
|
|
22
25
|
};
|
|
23
26
|
export interface LivingInference {
|
|
24
27
|
complete(call: LivingInferenceCall): Promise<unknown>;
|
|
25
28
|
}
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
maxTokens: number;
|
|
37
|
-
timeoutMs: number;
|
|
38
|
-
};
|
|
39
|
-
reaction: {
|
|
40
|
-
maxTokens: number;
|
|
41
|
-
timeoutMs: number;
|
|
42
|
-
};
|
|
43
|
-
reply: {
|
|
44
|
-
maxTokens: number;
|
|
45
|
-
timeoutMs: number;
|
|
46
|
-
};
|
|
47
|
-
plan: {
|
|
48
|
-
maxTokens: number;
|
|
49
|
-
timeoutMs: number;
|
|
50
|
-
};
|
|
51
|
-
'message-reply': {
|
|
52
|
-
maxTokens: number;
|
|
53
|
-
timeoutMs: number;
|
|
54
|
-
};
|
|
55
|
-
epilogue: {
|
|
56
|
-
maxTokens: number;
|
|
57
|
-
timeoutMs: number;
|
|
58
|
-
};
|
|
59
|
-
define: {
|
|
60
|
-
maxTokens: number;
|
|
61
|
-
timeoutMs: number;
|
|
62
|
-
};
|
|
63
|
-
}>;
|
|
64
|
-
export declare const GM_EFFECT_KINDS: readonly ["move", "take", "drop", "object.update", "object.create", "place.condition", "place.create", "person.create", "money", "transfer", "relationship", "belief", "commitment", "goal", "mood", "person.condition", "hold", "role", "schedule", "fact", "tension.update", "tension.create", "incapacitate", "message", "entity.create", "property.set", "relation.set", "request.open", "person.leave", "person.away", "ballot"];
|
|
29
|
+
export declare const LIVING_ANSWER_CHARS_PER_TOKEN = 2;
|
|
30
|
+
export declare const LIVING_TRUNCATED_ANSWER_CODE = "output-truncated";
|
|
31
|
+
type SchemaNode = Readonly<Record<string, unknown>>;
|
|
32
|
+
export declare function schemaWorstCaseChars(schema: SchemaNode): number;
|
|
33
|
+
export declare function livingAnswerTokens(schema: SchemaNode): number;
|
|
34
|
+
export declare function livingAnswerWasCutOff(completion: {
|
|
35
|
+
finishReason?: string | null;
|
|
36
|
+
completionTokens?: number | null;
|
|
37
|
+
} | undefined, maxTokens: number): boolean;
|
|
38
|
+
export declare const GM_EFFECT_KINDS: readonly ["move", "take", "drop", "object.update", "object.create", "place.condition", "place.create", "person.create", "shift", "relationship", "belief", "commitment", "goal", "mood", "person.condition", "hold", "role", "schedule", "fact", "tension.update", "tension.create", "incapacitate", "message", "entity.create", "property.set", "cell.add", "relation.set", "request.open", "person.leave", "person.offstage"];
|
|
65
39
|
export declare function kindFirst(container: string): (arm: {
|
|
66
40
|
required: readonly string[];
|
|
67
41
|
properties: Record<string, unknown>;
|
|
@@ -87,6 +61,7 @@ export type GmEffectRecord = {
|
|
|
87
61
|
condition: string | null;
|
|
88
62
|
role?: string | null;
|
|
89
63
|
amount: number | null;
|
|
64
|
+
slot?: string | null;
|
|
90
65
|
trust: number | null;
|
|
91
66
|
warmth: number | null;
|
|
92
67
|
minutes: number | null;
|
|
@@ -102,16 +77,17 @@ export type GmEffectRecord = {
|
|
|
102
77
|
value?: boolean | number | string | null;
|
|
103
78
|
initialProperties?: Record<string, boolean | number | string>;
|
|
104
79
|
choice?: 'yes' | 'no' | 'abstain' | null;
|
|
80
|
+
slotId?: string | null;
|
|
81
|
+
option?: string | null;
|
|
105
82
|
};
|
|
106
|
-
export declare const SIGNAL_SENSES: readonly ["sound", "voices", "shouting", "scream", "crash", "bang", "alarm", "machinery", "footsteps", "music", "loudspeaker", "sight", "light", "smoke", "burning", "smell"];
|
|
107
|
-
export declare const SIGNAL_NOTICES: Readonly<Record<typeof SIGNAL_SENSES[number], string>>;
|
|
108
83
|
export declare const attemptResponseSchema: {
|
|
109
84
|
readonly type: "object";
|
|
110
85
|
readonly additionalProperties: false;
|
|
111
|
-
readonly required: readonly ["narration", "record", "observed", "perceivedBy", "visibleObjectIds", "visibleTensionIds", "outcome", "minutes", "importance", "reach", "signalChannel", "actionKind", "reactorIds", "settledTensionId", "settlement", "newTension", "stateKindFit", "stateNewKind", "stateUpdates", "thingIds"];
|
|
86
|
+
readonly required: readonly ["narration", "record", "reason", "observed", "perceivedBy", "visibleObjectIds", "visibleTensionIds", "outcome", "minutes", "importance", "reach", "signalChannel", "actionKind", "reactorIds", "settledTensionId", "settlement", "newTension", "stateKindFit", "stateNewKind", "stateNoted", "stateUpdates", "thingIds", "contactIds"];
|
|
112
87
|
readonly properties: {
|
|
113
88
|
readonly narration: Record<string, unknown>;
|
|
114
89
|
readonly record: Record<string, unknown>;
|
|
90
|
+
readonly reason: Record<string, unknown>;
|
|
115
91
|
readonly observed: Record<string, unknown>;
|
|
116
92
|
readonly perceivedBy: Record<string, unknown>;
|
|
117
93
|
readonly visibleObjectIds: Record<string, unknown>;
|
|
@@ -128,19 +104,31 @@ export declare const attemptResponseSchema: {
|
|
|
128
104
|
readonly newTension: Record<string, unknown>;
|
|
129
105
|
readonly stateKindFit: Record<string, unknown>;
|
|
130
106
|
readonly stateNewKind: Record<string, unknown>;
|
|
107
|
+
readonly stateNoted: Record<string, unknown>;
|
|
131
108
|
readonly stateUpdates: Record<string, unknown>;
|
|
132
109
|
readonly thingIds: Record<string, unknown>;
|
|
110
|
+
readonly contactIds: Record<string, unknown>;
|
|
133
111
|
};
|
|
134
112
|
};
|
|
135
113
|
export declare function scopedAttemptResponseSchema(input: Readonly<Record<string, unknown>>): Readonly<Record<string, unknown>>;
|
|
114
|
+
export declare function ruleActionKinds(kinds: readonly {
|
|
115
|
+
laws?: readonly {
|
|
116
|
+
kind: string;
|
|
117
|
+
on: unknown;
|
|
118
|
+
do?: readonly {
|
|
119
|
+
op: string;
|
|
120
|
+
}[];
|
|
121
|
+
}[];
|
|
122
|
+
}[]): string[];
|
|
136
123
|
export declare const reactionResponseSchema: {
|
|
137
124
|
readonly type: "object";
|
|
138
125
|
readonly additionalProperties: false;
|
|
139
|
-
readonly required: readonly ["say", "act", "toIds", "mood", "weight", "leaveToPlaceId", "trust", "warmth", "relationshipNote", "belief", "commitment", "newGoal", "goalDone", "plan", "tell", "suggestedReplies", "endConversation", "request", "requestDecision", "answered", "stance"];
|
|
126
|
+
readonly required: readonly ["say", "act", "toIds", "mood", "weight", "leaveToPlaceId", "trust", "warmth", "relationshipNote", "belief", "commitment", "newGoal", "goalDone", "plan", "tell", "suggestedReplies", "endConversation", "request", "requestDecision", "commitmentDecision", "answered", "stance"];
|
|
140
127
|
readonly properties: {
|
|
141
128
|
readonly say: Record<string, unknown>;
|
|
142
129
|
readonly request: Record<string, unknown>;
|
|
143
130
|
readonly requestDecision: Record<string, unknown>;
|
|
131
|
+
readonly commitmentDecision: Record<string, unknown>;
|
|
144
132
|
readonly answered: Record<string, unknown>;
|
|
145
133
|
readonly act: Record<string, unknown>;
|
|
146
134
|
readonly toIds: Record<string, unknown>;
|
|
@@ -162,8 +150,8 @@ export declare const reactionResponseSchema: {
|
|
|
162
150
|
};
|
|
163
151
|
};
|
|
164
152
|
export declare const ENGINE_ACTION_KINDS: ReadonlySet<string>;
|
|
165
|
-
export declare function scopedReactionResponseSchema(input: Readonly<Record<string, unknown
|
|
166
|
-
export declare function scopedPlanResponseSchema(input: Readonly<Record<string, unknown
|
|
153
|
+
export declare function scopedReactionResponseSchema(input: Readonly<Record<string, unknown>>, engine?: number): Readonly<Record<string, unknown>>;
|
|
154
|
+
export declare function scopedPlanResponseSchema(input: Readonly<Record<string, unknown>>, engine?: number, restAction?: string | null): Readonly<Record<string, unknown>>;
|
|
167
155
|
export declare const speechImpactResponseSchema: {
|
|
168
156
|
readonly type: "object";
|
|
169
157
|
readonly additionalProperties: false;
|
|
@@ -173,20 +161,24 @@ export declare const speechImpactResponseSchema: {
|
|
|
173
161
|
readonly pressure: Record<string, unknown>;
|
|
174
162
|
readonly loud: Record<string, unknown>;
|
|
175
163
|
readonly addressedIds: Record<string, unknown>;
|
|
164
|
+
readonly mentionedIds: Record<string, unknown>;
|
|
176
165
|
readonly aboutIds: Record<string, unknown>;
|
|
166
|
+
readonly act: Record<string, unknown>;
|
|
177
167
|
};
|
|
178
168
|
};
|
|
179
169
|
export declare function scopedSpeechImpactResponseSchema(presentIds: readonly string[], thingIds?: readonly string[]): Readonly<Record<string, unknown>>;
|
|
180
170
|
export declare const planResponseSchema: {
|
|
181
171
|
readonly type: "object";
|
|
182
172
|
readonly additionalProperties: false;
|
|
183
|
-
readonly required: readonly ["action", "placeId", "targetId", "text", "mood", "nextPlan", "request", "stance"];
|
|
173
|
+
readonly required: readonly ["action", "placeId", "targetId", "text", "mood", "nextPlan", "request", "requestDecision", "commitmentDecision", "stance"];
|
|
184
174
|
readonly properties: {
|
|
185
175
|
readonly action: Record<string, unknown>;
|
|
186
176
|
readonly placeId: Record<string, unknown>;
|
|
187
177
|
readonly targetId: Record<string, unknown>;
|
|
188
178
|
readonly text: Record<string, unknown>;
|
|
189
179
|
readonly request: Record<string, unknown>;
|
|
180
|
+
readonly requestDecision: Record<string, unknown>;
|
|
181
|
+
readonly commitmentDecision: Record<string, unknown>;
|
|
190
182
|
readonly mood: Record<string, unknown>;
|
|
191
183
|
readonly nextPlan: Record<string, unknown>;
|
|
192
184
|
readonly stance: Record<string, unknown>;
|
|
@@ -195,7 +187,7 @@ export declare const planResponseSchema: {
|
|
|
195
187
|
export declare const messageReplyResponseSchema: {
|
|
196
188
|
readonly type: "object";
|
|
197
189
|
readonly additionalProperties: false;
|
|
198
|
-
readonly required: readonly ["reply", "mood", "trust", "warmth", "belief", "plan"];
|
|
190
|
+
readonly required: readonly ["reply", "mood", "trust", "warmth", "belief", "plan", "requestDecision"];
|
|
199
191
|
readonly properties: {
|
|
200
192
|
readonly reply: Record<string, unknown>;
|
|
201
193
|
readonly mood: Record<string, unknown>;
|
|
@@ -203,8 +195,10 @@ export declare const messageReplyResponseSchema: {
|
|
|
203
195
|
readonly warmth: Record<string, unknown>;
|
|
204
196
|
readonly belief: Record<string, unknown>;
|
|
205
197
|
readonly plan: Record<string, unknown>;
|
|
198
|
+
readonly requestDecision: Record<string, unknown>;
|
|
206
199
|
};
|
|
207
200
|
};
|
|
201
|
+
export declare function scopedMessageReplyResponseSchema(input: Readonly<Record<string, unknown>>, engine?: number): Readonly<Record<string, unknown>>;
|
|
208
202
|
export declare const epilogueResponseSchema: {
|
|
209
203
|
readonly type: "object";
|
|
210
204
|
readonly additionalProperties: false;
|
|
@@ -217,3 +211,51 @@ export declare const epilogueResponseSchema: {
|
|
|
217
211
|
readonly closing: Record<string, unknown>;
|
|
218
212
|
};
|
|
219
213
|
};
|
|
214
|
+
export declare const LIVING_INFERENCE_LIMITS: Readonly<{
|
|
215
|
+
attempt: {
|
|
216
|
+
maxTokens: number;
|
|
217
|
+
timeoutMs: number;
|
|
218
|
+
};
|
|
219
|
+
world: {
|
|
220
|
+
maxTokens: number;
|
|
221
|
+
timeoutMs: number;
|
|
222
|
+
};
|
|
223
|
+
'speech-impact': {
|
|
224
|
+
maxTokens: number;
|
|
225
|
+
timeoutMs: number;
|
|
226
|
+
};
|
|
227
|
+
reaction: {
|
|
228
|
+
maxTokens: number;
|
|
229
|
+
timeoutMs: number;
|
|
230
|
+
};
|
|
231
|
+
reply: {
|
|
232
|
+
maxTokens: number;
|
|
233
|
+
timeoutMs: number;
|
|
234
|
+
};
|
|
235
|
+
plan: {
|
|
236
|
+
maxTokens: number;
|
|
237
|
+
timeoutMs: number;
|
|
238
|
+
};
|
|
239
|
+
'message-reply': {
|
|
240
|
+
maxTokens: number;
|
|
241
|
+
timeoutMs: number;
|
|
242
|
+
};
|
|
243
|
+
epilogue: {
|
|
244
|
+
maxTokens: number;
|
|
245
|
+
timeoutMs: number;
|
|
246
|
+
};
|
|
247
|
+
define: {
|
|
248
|
+
maxTokens: number;
|
|
249
|
+
timeoutMs: number;
|
|
250
|
+
};
|
|
251
|
+
revise: {
|
|
252
|
+
maxTokens: number;
|
|
253
|
+
timeoutMs: number;
|
|
254
|
+
};
|
|
255
|
+
director: {
|
|
256
|
+
maxTokens: number;
|
|
257
|
+
timeoutMs: number;
|
|
258
|
+
};
|
|
259
|
+
}>;
|
|
260
|
+
export declare const LIVING_ANSWER_BUDGET_MS: number;
|
|
261
|
+
export {};
|