@oneciel-ai/ciel-runtime 0.2.37 → 0.2.38

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +5 -2
  3. package/ciel_runtime.py +94 -96
  4. package/ciel_runtime_support/anthropic_model_policy.py +20 -3
  5. package/ciel_runtime_support/architecture.py +5 -0
  6. package/ciel_runtime_support/channel_inflight.py +4 -4
  7. package/ciel_runtime_support/channel_injection.py +56 -1
  8. package/ciel_runtime_support/channel_mcp_tools.py +34 -0
  9. package/ciel_runtime_support/channel_message_policy.py +9 -1
  10. package/ciel_runtime_support/channel_message_prompt.py +23 -0
  11. package/ciel_runtime_support/channel_pending_injection.py +86 -32
  12. package/ciel_runtime_support/channel_pending_poll.py +6 -2
  13. package/ciel_runtime_support/channel_runtime_environment.py +0 -11
  14. package/ciel_runtime_support/channel_terminal_context.py +0 -6
  15. package/ciel_runtime_support/channel_terminal_proxy.py +3 -42
  16. package/ciel_runtime_support/channel_transcript_repository.py +16 -1
  17. package/ciel_runtime_support/channel_wake_claim_repository.py +0 -19
  18. package/ciel_runtime_support/channel_wake_context.py +6 -13
  19. package/ciel_runtime_support/channel_wake_delivery_repository.py +50 -0
  20. package/ciel_runtime_support/chat_http_controller.py +88 -5
  21. package/ciel_runtime_support/claude_environment.py +100 -3
  22. package/ciel_runtime_support/claude_launch_assembly.py +4 -0
  23. package/ciel_runtime_support/claude_session_socket.py +181 -0
  24. package/ciel_runtime_support/cli_application_context.py +18 -10
  25. package/ciel_runtime_support/cli_dispatch.py +19 -3
  26. package/ciel_runtime_support/cli_parser.py +2 -0
  27. package/ciel_runtime_support/cli_usage.py +3 -2
  28. package/ciel_runtime_support/codex_backend_context.py +8 -3
  29. package/ciel_runtime_support/codex_completion_gate.py +198 -0
  30. package/ciel_runtime_support/codex_turn_recovery.py +240 -83
  31. package/ciel_runtime_support/compatibility_protocol.py +5 -2
  32. package/ciel_runtime_support/config_migrations.py +79 -0
  33. package/ciel_runtime_support/config_repository.py +7 -0
  34. package/ciel_runtime_support/context_summary_policy.py +24 -4
  35. package/ciel_runtime_support/external_event_menu.py +107 -0
  36. package/ciel_runtime_support/external_event_receiver.py +19 -1
  37. package/ciel_runtime_support/launch_state.py +2 -0
  38. package/ciel_runtime_support/managed_tool_injection.py +33 -0
  39. package/ciel_runtime_support/muse_runtime_context.py +291 -0
  40. package/ciel_runtime_support/ollama_thinking.py +12 -26
  41. package/ciel_runtime_support/prelaunch.py +13 -0
  42. package/ciel_runtime_support/prelaunch_launch_panel.py +2 -1
  43. package/ciel_runtime_support/prompt_compaction.py +39 -0
  44. package/ciel_runtime_support/provider_files_proxy.py +248 -0
  45. package/ciel_runtime_support/provider_model_identity.py +10 -2
  46. package/ciel_runtime_support/provider_option_cli.py +1 -1
  47. package/ciel_runtime_support/provider_request_access.py +54 -1
  48. package/ciel_runtime_support/provider_responses_passthrough.py +152 -15
  49. package/ciel_runtime_support/providers/alibaba.py +34 -1
  50. package/ciel_runtime_support/providers/anthropic.py +18 -1
  51. package/ciel_runtime_support/providers/meta.py +252 -21
  52. package/ciel_runtime_support/pseudo_tool_parser.py +17 -1
  53. package/ciel_runtime_support/remote_bridge.py +4 -0
  54. package/ciel_runtime_support/remote_instructions.py +5 -0
  55. package/ciel_runtime_support/remote_memory.py +1 -1
  56. package/ciel_runtime_support/responses_cache_diagnostics.py +82 -0
  57. package/ciel_runtime_support/responses_custom_tool_bridge.py +282 -0
  58. package/ciel_runtime_support/responses_input_compatibility.py +19 -3
  59. package/ciel_runtime_support/router_http.py +301 -4
  60. package/ciel_runtime_support/router_observability_context.py +26 -0
  61. package/ciel_runtime_support/router_server_context.py +1 -0
  62. package/ciel_runtime_support/runtime_adapters.py +31 -0
  63. package/ciel_runtime_support/runtime_constants.py +23 -1
  64. package/ciel_runtime_support/runtime_input_gateway.py +85 -5
  65. package/ciel_runtime_support/runtime_input_status.py +150 -0
  66. package/ciel_runtime_support/runtime_launch.py +27 -4
  67. package/ciel_runtime_support/runtime_paths.py +1 -0
  68. package/ciel_runtime_support/speech_http_controller.py +3 -2
  69. package/ciel_runtime_support/streaming_anthropic.py +3 -0
  70. package/ciel_runtime_support/tool_call_events.py +98 -0
  71. package/ciel_runtime_support/transcript_delta_delivery.py +140 -1
  72. package/ciel_runtime_support/ui_text.py +1 -0
  73. package/ciel_runtime_support/web_search_result_events.py +130 -0
  74. package/ciel_runtime_support/web_ui.py +1 -0
  75. package/ciel_runtime_support/windows_conpty.py +92 -8
  76. package/ciel_runtime_support/workspace_mcp.py +4 -1
  77. package/ciel_runtime_support/workspace_state.py +1 -0
  78. package/docs/Configuration.md +20 -4
  79. package/docs/MCP-Channels.md +79 -6
  80. package/docs/Managed-Tool-Injection.md +25 -0
  81. package/docs/Module-Map.md +4 -0
  82. package/docs/Muse-Code.md +73 -0
  83. package/docs/Observability.md +39 -0
  84. package/docs/Providers.md +29 -2
  85. package/docs/Remote-Bridge.md +12 -0
  86. package/docs/Router.md +1 -0
  87. package/docs/journal/2026/09/01/diagnostics/anthropic/router/fable51-usage-credits.okf +70 -0
  88. package/docs/journal/2026/09/01/implementation/claude/session-socket/all-input-paths/default-delivery.okf +133 -0
  89. package/docs/journal/2026/09/01/implementation/claude/session-socket/windows-direct-input.okf +112 -0
  90. package/docs/journal/2026/09/02/diagnostics/cache/alibaba/qwen38-post-restart-hit-rate.okf +107 -0
  91. package/docs/journal/2026/09/02/diagnostics/cache/ollama-cloud/kimi-k3-codex-hit-rate.okf +91 -0
  92. package/docs/journal/2026/09/02/diagnostics/codex/tui/statusline-cache-metrics.okf +44 -0
  93. package/docs/journal/2026/09/02/diagnostics/input/transport/fallback-behavior.okf +31 -0
  94. package/docs/journal/2026/09/02/diagnostics/providers/ollama-cloud/kimi-k3-agent-turn-recovery.okf +125 -0
  95. package/docs/journal/2026/09/02/diagnostics/providers/ollama-cloud/kimi-k3-parameters.okf +128 -0
  96. package/docs/journal/2026/09/02/diagnostics/remote/mia/socket-tui-visibility.okf +47 -0
  97. package/docs/journal/2026/09/02/diagnostics/runtime/alibaba/token-plan/qwen38-latency.okf +108 -0
  98. package/docs/journal/2026/09/02/diagnostics/runtime/alibaba/token-plan/qwen38-vs-gpt56-latency.okf +92 -0
  99. package/docs/journal/2026/09/02/implementation/anthropic/context/one-million-defaults.okf +85 -0
  100. package/docs/journal/2026/09/02/implementation/cache/alibaba/qwen38-cache-hit-improvement.okf +104 -0
  101. package/docs/journal/2026/09/02/implementation/cache/alibaba/qwen38-cache-hit-improvement.png +0 -0
  102. package/docs/journal/2026/09/02/implementation/cache/alibaba/responses-session-cache.okf +97 -0
  103. package/docs/journal/2026/09/02/implementation/providers/alibaba/qwen38/0902-parameter-alignment.okf +97 -0
  104. package/docs/journal/2026/09/02/implementation/providers/meta/multimodal-tools/contributor-protocol-adoption.okf +140 -0
  105. package/docs/journal/2026/09/02/implementation/providers/meta/muse-spark-1.3-support.okf +53 -0
  106. package/docs/journal/2026/09/02/monitoring/cache/alibaba/cielarvis-qwen38-live-hit-rate.okf +858 -0
  107. package/docs/journal/2026/09/02/operations/release/main-merge-local-deploy.okf +36 -0
  108. package/docs/journal/2026/09/02/operations/release/nightly/local-cache-deployment.okf +54 -0
  109. package/docs/journal/2026/09/02/operations/release/nightly/ollama-kimi-recovery-model-audit-deployment.okf +58 -0
  110. package/docs/journal/2026/09/02/operations/release/nightly/qwen38-cache-improvement-deployment.okf +72 -0
  111. package/docs/journal/2026/09/02/research/cache/alibaba/qwen38-hit-rate-improvement.okf +233 -0
  112. package/docs/journal/2026/09/02/research/cache/codex/provider-scope.okf +77 -0
  113. package/docs/journal/2026/09/02/research/providers/ollama-cloud/desktop-model-exhaustive-audit.okf +159 -0
  114. package/docs/journal/2026/09/03/diagnostics/providers/meta/muse-spark-contributor-cache-hit.okf +148 -0
  115. package/docs/journal/2026/09/03/diagnostics/providers/meta/muse-spark-contributor-required-schema.okf +127 -0
  116. package/docs/journal/2026/09/03/diagnostics/providers/ollama-cloud/kimi-k3-resumed-session-stall.okf +160 -0
  117. package/docs/journal/2026/09/03/diagnostics/providers/ollama-cloud/kimi-k3-substantive-dangling-action.okf +94 -0
  118. package/docs/journal/2026/09/03/diagnostics/remote/kevin/codex-gpt-early-turn-completion.okf +162 -0
  119. package/docs/journal/2026/09/03/implementation/runtimes/meta/muse-code/default-yolo.okf +40 -0
  120. package/docs/journal/2026/09/03/implementation/runtimes/meta/muse-code/native-subscription-router.okf +86 -0
  121. package/docs/journal/2026/09/03/operations/deployment/local/session-socket-default-fallback.okf +41 -0
  122. package/docs/journal/2026/09/03/research/deployment/colab/tailscale/credential-storage.okf +41 -0
  123. package/docs/journal/2026/09/03/research/providers/meta/muse-code/subscription-billing-boundary.okf +64 -0
  124. package/docs/journal/2026/09/03/research/web-chat/voice/instruction-format.okf +135 -0
  125. package/docs/journal/2026/09/04/diagnostics/claude/context/early-auto-compaction.okf +75 -0
  126. package/docs/journal/2026/09/04/diagnostics/claude/context/fable-51-status-200k.okf +54 -0
  127. package/docs/journal/2026/09/04/diagnostics/runtime/codex/responses/replayed-item-id-validation.okf +74 -0
  128. package/docs/journal/2026/09/04/diagnostics/workspaces/onecieldmsui/codex/replay-stall.okf +100 -0
  129. package/docs/journal/2026/09/04/implementation/observability/tool-calls/websocket-stream.okf +49 -0
  130. package/docs/journal/2026/09/04/implementation/web-chat/input/raw-injection.okf +42 -0
  131. package/docs/journal/2026/09/05/diagnostics/tty/claude-raw-idle-render.okf +25 -0
  132. package/docs/journal/2026/09/05/implementation/events/search-response-urls.okf +23 -0
  133. package/docs/journal/2026/09/05/implementation/tools/native-injection.okf +19 -0
  134. package/docs/journal/2026/09/05/implementation/windows/conpty/prompt-delivery-lifecycle.okf +43 -0
  135. package/docs/journal/2026/09/05/release/nightly/conpty-native-tools.okf +13 -0
  136. package/docs/journal/2026/09/05/release/nightly/search-result-urls.okf +14 -0
  137. package/docs/journal/2026/09/06/implementation/codex/inherited-web-mcp.okf +22 -0
  138. package/docs/journal/2026/09/07/integration/main/nightly-merge.okf +13 -0
  139. package/docs/journal/2026/09/07/release/stable/0.2.38.okf +10 -0
  140. package/package.json +1 -1
@@ -0,0 +1,162 @@
1
+ okf_version: "1.0"
2
+ knowledge:
3
+ task:
4
+ id: "kevin-codex-gpt-early-turn-completion-20260903"
5
+ date: "2026-09-03"
6
+ status: "implemented_and_live_kimi_verified"
7
+ objective: >-
8
+ Diagnose repeated Codex turn completion while requested work remains and
9
+ replace language-specific recovery with a protocol-level completion gate.
10
+
11
+ live_evidence:
12
+ kevin:
13
+ host: "kevin-codex@100.95.132.58"
14
+ hostname: "aap-pool-hera"
15
+ codex_thread: "01a03716-9bb1-77e2-8771-4329c3b0338f"
16
+ router_port: 8804
17
+ active_model_display: "gpt-5.6-terra medium fast"
18
+ transport: "/backend-api/codex"
19
+ observed_turn:
20
+ turn_id: "01a065ec-2ea7-7db0-8d56-e0329a0cfb0c"
21
+ final_at_utc: "2026-09-03T06:19:58.496Z"
22
+ completed_at_utc: "2026-09-03T06:19:58.608Z"
23
+ result: >-
24
+ The assistant output named another audit action, then the native
25
+ Responses stream emitted task_complete. Ciel and Codex processes
26
+ remained alive, so the horizontal line was a completed model turn,
27
+ not a crash.
28
+ goal_evidence:
29
+ at_utc: "2026-09-02T18:53:20.946Z"
30
+ call: 'tools.update_goal({status:"blocked"})'
31
+ later_state: "Goal stalled (/goal resume)"
32
+ cielarvis:
33
+ workspace: "C:\\Users\\djlov\\cielarvis"
34
+ provider: "ollama-cloud"
35
+ model: "kimi-k3"
36
+ codex_thread: "01a01dff-f0f0-7ef3-8cde-1d9916510f35"
37
+ missed_completed_turns_utc:
38
+ - "2026-09-03T06:13:24Z"
39
+ - "2026-09-03T06:14:23Z"
40
+ - "2026-09-03T06:18:12Z"
41
+ - "2026-09-03T06:32:36Z"
42
+ result: >-
43
+ Each response contained reasoning and visible status text but no tool
44
+ item, after which Codex recorded task_complete.
45
+
46
+ patch_history_findings:
47
+ confirmed:
48
+ - >-
49
+ Native GPT requests never entered recover_preamble_only_turn; the
50
+ backend adapter relayed their SSE after reading only a small error
51
+ preamble. Therefore Kimi recovery commits cannot be the direct cause of
52
+ Kevin's native GPT completed turn.
53
+ - >-
54
+ Commit 57fb375 added a provider-specific bounded Kimi continuation loop,
55
+ 517d07a raised it to six attempts, and f9062db expanded Korean/English
56
+ regular-expression matching. Those recent changes were language
57
+ dependent and still missed observed wording.
58
+ - >-
59
+ The exact frequency increase cannot be attributed to a specific commit
60
+ from the collected evidence. The native gap predates the recent Kimi
61
+ commits, while the Kimi implementation itself did change recently.
62
+
63
+ rejected_implementation:
64
+ description: >-
65
+ An initial local change expanded Korean action words and applied the
66
+ expression to additional providers.
67
+ disposition: >-
68
+ Deleted before commit at the user's direction. No natural-language word,
69
+ phrase, language, task domain, or action-name matcher remains in the new
70
+ completion decision.
71
+ token_handshake: >-
72
+ The first protocol revision used a fixed text confirmation token. An
73
+ installed-runtime probe showed that a validator could repeat that token
74
+ inside its reasoning summary. The text token was therefore removed and
75
+ replaced by a typed runtime-only tool call before final deployment.
76
+
77
+ implementation:
78
+ translated_provider_gate:
79
+ trigger: >-
80
+ The request supplies tools, and the returned message structurally
81
+ contains reasoning plus visible text but no tool_use item.
82
+ handshake: >-
83
+ A private follow-up requires either the runtime-owned
84
+ ciel_runtime_confirm_completion tool when all requested actions are
85
+ complete, or the next real work tool call when work remains.
86
+ delivery: >-
87
+ Confirmation retains the original answer and hides the control tool;
88
+ a real tool call replaces/continues the candidate completed response.
89
+ native_codex_gate:
90
+ trigger: >-
91
+ A completed OpenAI Responses SSE has tools in the request, a reasoning
92
+ output item, visible assistant text, and no protocol action item.
93
+ buffering: >-
94
+ The response is spooled to disk after 1 MiB rather than retained in an
95
+ unbounded byte array. SSE events larger than 8 MiB disable validation
96
+ and preserve the original response.
97
+ state_replay: >-
98
+ Stored responses use previous_response_id; stateless responses replay
99
+ the returned output items, including encrypted reasoning. This follows
100
+ the official Responses state fields.
101
+ fallback: >-
102
+ Any parse, context, capacity, transport, or validator-protocol failure
103
+ relays the untouched original response.
104
+ native_prompt:
105
+ result: >-
106
+ The stable Codex compatibility instruction is now also present on the
107
+ native route and includes persistent-monitoring goal behavior.
108
+
109
+ verification:
110
+ focused_tests:
111
+ commands:
112
+ - "python tests/test_codex_completion_gate.py"
113
+ - "python tests/test_codex_backend_item_repair.py"
114
+ - "python tests/test_codex_turn_recovery.py"
115
+ result: "5 + 21 + 43 tests passed"
116
+ full_suite:
117
+ command: "npm test"
118
+ result:
119
+ unit: "1366 passed, 45 skipped"
120
+ router: "1093 passed"
121
+ channel: "403 passed, 80 skipped"
122
+ runtime: "276 passed, 12 skipped"
123
+ exit_code: 0
124
+ lint:
125
+ result: "passed"
126
+ packaging:
127
+ command: "npm pack --dry-run --json"
128
+ result: >-
129
+ Passed; 542 entries and ciel_runtime_support/codex_completion_gate.py
130
+ included.
131
+ live_ollama_cloud_kimi:
132
+ isolated_router_port: 9610
133
+ initial_response: >-
134
+ Protocol test acknowledged; standing by for the runtime completion check.
135
+ router_log: >-
136
+ codex_turn_retry provider=ollama-cloud reason=completion_check
137
+ model=ciel-runtime-ollama-cloud-kimi-k3 chars=73
138
+ delivered_action: 'function_call inspect_workspace {"scope":"all"}'
139
+ http_status: 200
140
+ cleanup: "The isolated router was stopped after verification."
141
+ completion_tool_revision:
142
+ unfinished_case: >-
143
+ A 399-character arbitrary response with reasoning and no tool was
144
+ classified as completion_check and delivered inspect_workspace with
145
+ scope all.
146
+ finished_case: >-
147
+ A 2+2 request logged codex_completion_confirmed attempt=1/6 and
148
+ returned visible text 4 with zero function calls and no completion
149
+ tool identifier in the delivered response.
150
+ native_openai:
151
+ result: >-
152
+ Native SSE buffering, private confirmation, action replacement, and
153
+ unknown future action types are covered by the router integration tests.
154
+ A live native OpenAI call has not yet been made with this uninstalled
155
+ source revision.
156
+
157
+ official_reference:
158
+ url: "https://developers.openai.com/api/reference/cli/resources/responses/methods/create"
159
+ confirmed_contract: >-
160
+ The Responses API defines previous_response_id for multi-turn state,
161
+ accepts prior response output items as input, and exposes encrypted
162
+ reasoning for stateless replay.
@@ -0,0 +1,40 @@
1
+ task:
2
+ title: Default Muse Code launches to the native yolo permission mode
3
+ date: 2026-09-03
4
+ branch: nightly
5
+
6
+ evidence:
7
+ installed_cli: Muse Code 1.0.2 (1.0.2-R2040.1)
8
+ command: python ciel_runtime.py muse --help
9
+ observed_option: --yolo
10
+ observed_definition: Disable approval and sandboxing and trust this workspace for this run.
11
+ exec_help: muse exec also exposes --yolo under its Safety options.
12
+ resume_help: Root options may appear on either side of resume.
13
+
14
+ implementation:
15
+ default_scope:
16
+ - interactive Muse sessions
17
+ - muse exec
18
+ - muse resume
19
+ excluded_scope:
20
+ - help and version
21
+ - config, schema, serve, session-message, and other utility commands
22
+ duplicate_policy: Preserve an explicit --yolo exactly once.
23
+ adapter_position: After exec or resume subcommand when present; otherwise in root options.
24
+
25
+ verification:
26
+ focused_tests: 9 passed
27
+ ruff: passed
28
+ documentation_metadata: passed, 26 Markdown files
29
+ actual_exec:
30
+ command: python ciel_runtime.py muse exec --provider echo --json --no-session-log --max-model-steps 2 "Reply exactly MUSE_YOLO_DEFAULT_OK"
31
+ exit_code: 0
32
+ trust_evidence: 'muse: workspace trust: trusted source=run-flag'
33
+ terminal_evidence: 'echo: Reply exactly MUSE_YOLO_DEFAULT_OK'
34
+ billing: No paid model call; Muse deterministic echo provider used.
35
+ full_suite:
36
+ unit: 1377 passed, 45 skipped
37
+ router: 1094 passed
38
+ channel: 406 passed, 80 skipped
39
+ runtime: 276 passed, 12 skipped
40
+ total: 3153 passed, 137 skipped
@@ -0,0 +1,86 @@
1
+ task:
2
+ title: Native Muse Code subscription runtime in Ciel Router control plane
3
+ date: 2026-09-03
4
+ branch: nightly
5
+
6
+ official_evidence:
7
+ overview: https://dev.meta.ai/docs/muse-code
8
+ subscriptions: https://dev.meta.ai/docs/muse-code/subscriptions
9
+ configuration: https://dev.meta.ai/docs/muse-code/configuration
10
+ session_messaging: https://dev.meta.ai/docs/muse-code/session-messaging
11
+ confirmed:
12
+ - Muse Code is a native terminal and CI agent.
13
+ - Browser sign-in and its onboarding credential are the subscription path.
14
+ - Additional API keys are pay-as-you-go and take precedence over browser sign-in.
15
+ - Native installation is documented for macOS and Linux.
16
+ - The CLI accepts model and reasoning-effort options and loads AGENTS.md.
17
+
18
+ installed_binary_evidence:
19
+ platform: Windows 11 with WSL2 Ubuntu 26.04
20
+ install_source: https://dev.meta.ai/install.sh
21
+ installed_path: /home/djlov/.local/bin/muse
22
+ version_output: Muse Code 1.0.2 (1.0.2-R2040.1)
23
+ interfaces:
24
+ - muse exec with JSONL output
25
+ - muse session-message list and send
26
+ - muse serve MSP host over stdio
27
+ - exact MSP schema export from the installed binary
28
+
29
+ implementation:
30
+ runtime_command: ciel-runtime muse
31
+ aliases: [muse-code, launch-muse]
32
+ model_default: muse-spark-1.3
33
+ effort_mapping: {max: ultra}
34
+ authentication_guard:
35
+ removed_child_environment: [META_API_KEY, MODEL_API_KEY]
36
+ purpose: Preserve Muse browser sign-in subscription eligibility.
37
+ windows:
38
+ transport: wsl.exe
39
+ discovery: command -v muse in the default WSL2 distribution
40
+ installer_shell: bash
41
+ router_control_plane:
42
+ interactive_input: Ciel channel-aware terminal proxy
43
+ unsupported_claude_socket_fallback: tty
44
+ transcript_scope: muse
45
+ tty_delivery:
46
+ writes_per_message: 1
47
+ cursor_commit: immediate and durable
48
+ rationale: Muse has no Claude/Codex-compatible transcript confirmation signal.
49
+ model_request_path: Direct Muse Code native connection, not Ciel Model API proxy
50
+ project_context:
51
+ instruction_file: AGENTS.md
52
+ remote_instruction_key: muse_url
53
+
54
+ verification:
55
+ focused_tests:
56
+ muse_runtime: 8 passed
57
+ architecture_contracts: 219 passed, 42 skipped
58
+ ruff: passed
59
+ diff_check: passed
60
+ full_suite:
61
+ unit: 1376 passed, 45 skipped
62
+ router: 1094 passed
63
+ channel: 406 passed, 80 skipped
64
+ runtime: 276 passed, 12 skipped
65
+ total: 3152 passed, 137 skipped
66
+ cli_version:
67
+ command: python ciel_runtime.py muse --version
68
+ result: Muse Code 1.0.2 (1.0.2-R2040.1)
69
+ utility_passthrough:
70
+ command: python ciel_runtime.py muse session-message --help
71
+ result: exit 0; list and send commands displayed
72
+ real_headless_turn:
73
+ command: python ciel_runtime.py muse exec --provider echo --json --no-session-log --max-model-steps 2 "Reply exactly MUSE_ROUTER_READY"
74
+ result: exit 0; run.output.delta and run.terminal.completed contained echo MUSE_ROUTER_READY
75
+ billing: No paid model call; official deterministic echo provider used.
76
+ router_tty_end_to_end:
77
+ runtime: Interactive Muse Code 1.0.2 through WSL2 with provider echo
78
+ endpoint: POST http://127.0.0.1:9611/ca/channel/messages
79
+ accepted_message_ids: [4, 5]
80
+ injection_log:
81
+ - channel_stdin_proxy_injected count=1 message_ids=4 transport=tty commit_cursor=True
82
+ - channel_stdin_proxy_injected count=1 message_ids=5 transport=tty commit_cursor=True
83
+ persisted_cursor: '{"last_id":5}'
84
+ duplicates_after_fix: 0
85
+ transient_schema_artifacts:
86
+ removed: true
@@ -0,0 +1,41 @@
1
+ task:
2
+ title: Local deployment of session-socket-first Web Chat transport
3
+ date: 2026-09-03
4
+ workspace: C:/Users/djlov/ciel-runtime
5
+
6
+ source_verification:
7
+ full_suite:
8
+ unit: {passed: 1368, skipped: 45}
9
+ router: {passed: 1094, skipped: 0}
10
+ channel: {passed: 405, skipped: 80}
11
+ runtime: {passed: 276, skipped: 12}
12
+ total_passed: 3143
13
+ total_skipped: 137
14
+ ruff: passed
15
+ compileall: passed
16
+ git_diff_check: passed
17
+
18
+ deployment:
19
+ command: .\\install.ps1
20
+ result: passed
21
+ target: C:/Users/djlov/.local/share/ciel-runtime
22
+ launcher: C:/Users/djlov/.local/bin/ciel-runtime.ps1
23
+ reported_version: 0.2.37
24
+ path_priority: Local launcher is resolved before the AppData npm launcher.
25
+
26
+ installed_evidence:
27
+ source_sha256_matches:
28
+ ciel_runtime.py: true
29
+ ciel_runtime_support/web_ui.py: true
30
+ ciel_runtime_support/channel_pending_injection.py: true
31
+ ciel_runtime_support/runtime_input_gateway.py: true
32
+ ciel_runtime_support/chat_http_controller.py: true
33
+ confirmed_markers:
34
+ - Built-in Web Chat sends top-level input_transport session_socket.
35
+ - Runtime Input Gateway default is session_socket.
36
+ - HTTP controller default is session_socket.
37
+ - Installed pending injection contains session_socket-to-TTY fallback paths.
38
+
39
+ runtime_boundary:
40
+ active_processes_restarted: false
41
+ reason: Local deployment replaces the installation for future launches; restarting multiple active user sessions was not authorized.
@@ -0,0 +1,41 @@
1
+ task:
2
+ title: Colab Web Chat Tailscale credential storage and installation audit
3
+ date: 2026-09-03
4
+ scope: current nightly source and local Windows configuration
5
+
6
+ confirmed:
7
+ source_hardcoding:
8
+ tracked_real_keys: 0
9
+ test_fixture_matches: 5
10
+ installation:
11
+ package_install_embeds_key: false
12
+ automatic_key_transfer_to_new_machine: false
13
+ web_chat_flow:
14
+ entry: Web Chat > Speech Settings > Saved Tailscale recovery key
15
+ profile_scope: one encrypted credential slot per Colab account profile
16
+ vault: '%APPDATA%\ciel-runtime\colab-worker-credentials.vault.json'
17
+ vault_key: '%APPDATA%\ciel-runtime\colab-worker-credentials.vault.key'
18
+ observed_profile: default
19
+ observed_fields:
20
+ - tailscale_auth_key
21
+ - tailscale_asr_state
22
+ - tailscale_tts_state
23
+ secret_values_read_or_recorded: false
24
+ deployment_flow:
25
+ parent_to_script: process environment TAILSCALE_AUTHKEY
26
+ script_behavior: captures the process value and removes it from its own environment
27
+ colab_transfer: generates a temporary bootstrap containing a Base64-encoded assignment
28
+ local_cleanup: temporary bootstrap is deleted in a finally block
29
+ worker_use: bootstrap restores TAILSCALE_AUTHKEY into the Colab process environment
30
+ direct_script_flow:
31
+ input: current PowerShell process environment TAILSCALE_AUTHKEY
32
+ persistence_by_script: false
33
+ fallback: authorized Colab Secret named TAILSCALE_AUTHKEY
34
+
35
+ evidence:
36
+ vault_implementation: ciel_runtime_support/colab_speech_jobs.py:30-148
37
+ web_action_handoff: ciel_runtime_support/colab_speech_jobs.py:262-305
38
+ web_form: ciel_runtime_support/web_ui.py:293-300
39
+ temporary_bootstrap: scripts/deploy_colab_speech.ps1:93-128
40
+ bootstrap_secret_lookup: scripts/colab/bootstrap_qwen_asr.py:40-51
41
+ config_root: ciel_runtime_support/runtime_paths.py:48-51,103
@@ -0,0 +1,64 @@
1
+ task:
2
+ title: Muse Spark 1.3 subscription versus API billing boundary
3
+ date: 2026-09-03
4
+ scope:
5
+ provider: Meta Model API
6
+ model: muse-spark-1.3
7
+ runtime_workspace_checked: G:/OneCielDMSUI
8
+
9
+ official_evidence:
10
+ browser_capture:
11
+ captured: true
12
+ decisive_frame: Choose pay-as-you-go or a subscription
13
+ visible_statement: Subscription only works through Muse Code CLI while signed in; additional API keys are pay-as-you-go.
14
+ model_api_overview:
15
+ url: https://dev.meta.ai/docs/overview
16
+ confirmed:
17
+ - Direct Meta Model API requests use Bearer MODEL_API_KEY authentication.
18
+ - Direct Muse Spark API pricing is pay-as-you-go.
19
+ - OpenAI, Anthropic, and Responses protocol surfaces use the same Model API auth and token cost.
20
+ muse_code_auth:
21
+ url: https://dev.meta.ai/docs/muse-code/auth
22
+ confirmed:
23
+ - Muse Code supports browser sign-in or an API key.
24
+ - META_API_KEY and stored API keys take priority over a stored browser session.
25
+ - Model API key usage is token-based billing.
26
+ muse_code_subscription:
27
+ url: https://dev.meta.ai/docs/muse-code/subscriptions
28
+ confirmed:
29
+ - A subscription applies only to the Muse Code API key automatically connected during Muse Code CLI onboarding.
30
+ - The subscription credential is for Muse Code only.
31
+ - Additional Model API keys are billed pay-as-you-go.
32
+ - Subscription usage works only through Muse Code CLI while signed in with the Meta Model API account.
33
+ public_model_card:
34
+ url: https://developer.meta.com/ai/models/muse-spark/
35
+ pricing:
36
+ muse-spark-1.3: {input_per_mtok_usd: 1.25, cached_input_per_mtok_usd: 0.15, output_per_mtok_usd: 4.25}
37
+ muse-spark-1.3-contributor: {input_per_mtok_usd: 0.10, cached_input_per_mtok_usd: 0.002, output_per_mtok_usd: 0.20}
38
+
39
+ local_evidence:
40
+ ciel_meta_adapter:
41
+ base_url: https://api.meta.ai/v1
42
+ authentication: Bearer API key
43
+ required_environment_name: MODEL_API_KEY
44
+ supported_runtime_path: Ciel Router provider for Claude and Codex compatible clients
45
+ muse_code_native_runtime:
46
+ installed_on_path: false
47
+ supported_by_ciel_launcher: false
48
+ checked_instance:
49
+ workspace: G:/OneCielDMSUI
50
+ provider: meta
51
+ router: http://127.0.0.1:9605
52
+ configured_model_at_measurement: muse-spark-1.3-contributor
53
+
54
+ conclusion:
55
+ confirmed_cause: Ciel's Meta provider sends a separately created Model API key directly to api.meta.ai, so Meta classifies it as pay-as-you-go. Selecting muse-spark-1.3 versus contributor changes the API price tier but does not attach a Muse Code subscription.
56
+ unsupported_shortcut: No documented request header, model suffix, or API-key setting converts a direct Model API request into subscription usage.
57
+ ciel_support_boundary:
58
+ possible: Add Muse Code as a native CLI runtime and allow Muse Code to own browser sign-in and its subscription credential.
59
+ prohibited_by_official_contract: Reuse or export the Muse Code-only subscription credential through Ciel Router, Claude, Codex, or direct Model API calls.
60
+ critical_environment_rule: A Muse Code subscription launch must not inject MODEL_API_KEY or META_API_KEY because an API key overrides browser sign-in and returns usage to pay-as-you-go billing.
61
+
62
+ repository_change:
63
+ product_code: none
64
+ reason: Meta's official subscription contract does not expose a supported router/API mechanism. Implementing an undocumented billing bypass would be incorrect.
@@ -0,0 +1,135 @@
1
+ task:
2
+ title: Web Chat voice-message instruction format audit
3
+ date: 2026-09-03
4
+ scope:
5
+ workspace: C:/Users/djlov/ciel-runtime
6
+ feature: Web Chat live voice input and runtime prompt injection
7
+
8
+ confirmed_flow:
9
+ capture:
10
+ source: ciel_runtime_support/web_ui.py
11
+ behavior:
12
+ - Browser microphone PCM is encoded as WAV.
13
+ - JSON is posted to /v1/audio/transcriptions with audio_base64, filename, content_type, model, and language.
14
+ - The ASR text is normalized and passed to sendMessage with inputMode voice.
15
+ channel_request:
16
+ endpoint: POST /ca/channel/messages
17
+ body_fields:
18
+ - channel
19
+ - sender_id
20
+ - recipients
21
+ - delivery
22
+ - thread_id
23
+ - kind
24
+ - message
25
+ - meta.source
26
+ - meta.web_chat_session
27
+ - meta.input_mode
28
+ - meta.reply_channel
29
+ - meta.reply_recipient
30
+ - meta.response_contract
31
+ - meta.reply_instruction
32
+ - meta.attachments
33
+ voice_marker: meta.input_mode = voice
34
+ message_content: ASR transcript text
35
+ runtime_prompt:
36
+ source: ciel_runtime_support/channel_message_prompt.py
37
+ transcript_label: asr_transcript
38
+ framing: one physical line
39
+ trusted_instruction:
40
+ - Route replies through ciel-runtime-router.send_message.
41
+ - Send kind ack immediately and exactly one kind reply after work.
42
+ - response fields are spoken, overview, and optional details.
43
+ - The browser speaks only response.spoken.
44
+ - Do not claim completion in the acknowledgement.
45
+
46
+ channel_semantics:
47
+ definition: A logical message namespace and reply-routing address; it is not the network transport.
48
+ web_chat_value: web-chat-<sessionId>
49
+ session_id_source:
50
+ priority:
51
+ - URL query parameter session or s
52
+ - browser localStorage
53
+ - newly generated UUID or timestamp-random fallback
54
+ uses:
55
+ - Filters Web Chat history reads to the current logical conversation.
56
+ - Filters the SSE message stream to the current logical conversation.
57
+ - Tells the agent which channel to target when returning ack and reply messages.
58
+ related_fields:
59
+ thread_id: Groups the conversation thread; Web Chat currently uses sessionId.
60
+ parent_id: Associates an ack or reply with the specific inbound message.
61
+ recipients: Controls which consumer can see the message; browser reads as recipient web.
62
+ input_transport: Selects session_socket, router, or tty independently from channel.
63
+
64
+ delivery_semantics:
65
+ confirmed:
66
+ delivery_llm: Causes a structured inbound message to be mirrored into the private model-input queue.
67
+ delivery_native: Makes the message eligible for native channel notification projection; it does not select the Claude messaging socket.
68
+ delivery_web: Outbound browser-only ack or reply; it is not mirrored back into model input unless an LLM route is also present.
69
+ claude_session_socket_selection:
70
+ controlling_field: input_transport
71
+ default: session_socket for every admitted input.
72
+ fallback: If socket delivery is unavailable or fails, use TTY while idle; retain the durable queued input during an active turn and retry until fallback is safe.
73
+ explicit_override: POST input_transport can select session_socket, tty, or router.
74
+ conclusion: delivery native alone does not select the socket; input_transport does.
75
+ verification:
76
+ chat_input_mode_tests: 13 passed
77
+ claude_session_socket_focused_tests: 4 passed
78
+
79
+ correction_2026_09_03:
80
+ prior_behavior:
81
+ source_commit: 60846f9
82
+ admission_default: Active Claude socket selected session_socket; every other runtime selected tty before admission.
83
+ socket_failure: Durable queue rollback and retry without transport fallback.
84
+ mismatch: This did not implement the requested session-socket-first default with unsupported-runtime fallback.
85
+ implementation:
86
+ - Built-in Web Chat now explicitly sends top-level input_transport session_socket.
87
+ - HTTP and Runtime Input Gateway defaults now select session_socket.
88
+ - Missing socket transport and idle socket-send failure fall back to TTY.
89
+ - Socket-send failure during an active turn does not type into the terminal; the input remains queued.
90
+ - Explicit router and tty overrides remain supported.
91
+ verification:
92
+ focused:
93
+ web_chat_and_gateway: 25 passed
94
+ claude_socket_paths: 4 passed
95
+ speech_http: 23 passed
96
+ channel_bridge: {passed: 217, skipped: 80}
97
+ ruff: passed
98
+ compileall: passed
99
+ full_suite:
100
+ unit: {passed: 1368, skipped: 45}
101
+ router: {passed: 1094, skipped: 0}
102
+ channel: {passed: 405, skipped: 80}
103
+ runtime: {passed: 276, skipped: 12}
104
+ total_passed: 3143
105
+ total_skipped: 137
106
+
107
+ security_boundary:
108
+ observation: The browser-supplied meta.reply_instruction value is not copied into the generated runtime prompt.
109
+ verification: A generated prompt containing a sentinel CLIENT_SIDE_TEXT in meta.reply_instruction did not contain the sentinel.
110
+ result: Actual reply instructions are generated server-side from admitted message routing data.
111
+
112
+ verification:
113
+ generated_prompt_probe:
114
+ result:
115
+ newline_count: 0
116
+ client_reply_instruction_present: false
117
+ voice_label_present: true
118
+ asr_transcript_present: true
119
+ tests:
120
+ commands:
121
+ - PYTHONPATH=<workspace> python tests/test_channel_message_prompt.py
122
+ - PYTHONPATH=<workspace> python tests/test_web_chat_ui.py
123
+ result: 21 tests passed
124
+ note: An initial direct unittest module invocation failed because tests is not a Python package; direct file execution with workspace PYTHONPATH succeeded.
125
+
126
+ references:
127
+ - ciel_runtime_support/web_ui.py:1287
128
+ - ciel_runtime_support/web_ui.py:1455
129
+ - ciel_runtime_support/web_ui.py:1742
130
+ - ciel_runtime_support/channel_message_prompt.py:137
131
+ - ciel_runtime_support/channel_message_prompt.py:203
132
+ - ciel_runtime_support/channel_message_prompt.py:323
133
+ - tests/test_channel_message_prompt.py:85
134
+ - tests/test_channel_message_prompt.py:118
135
+ - tests/test_web_chat_ui.py:80
@@ -0,0 +1,75 @@
1
+ schema: okf/1
2
+ kind: task-journal
3
+ title: Claude routed session early auto-compaction at an apparent 16.6 percent
4
+ date: 2026-09-04
5
+ workspace: G:\ciel-bridge-service
6
+
7
+ observation:
8
+ screenshot:
9
+ claude_native_notice: Compacting conversation
10
+ claude_native_remaining: 1 percent until auto-compact
11
+ ciel_status_context: 165666/1000000 tokens (16.6 percent)
12
+ process:
13
+ claude_code_version: 2.1.260
14
+ configured_provider: anthropic
15
+ configured_model: claude-opus-5
16
+ routed: true
17
+ launch_log:
18
+ model_alias: ciel-runtime-anthropic-claude-opus-5
19
+ projected_context: 200000
20
+ projected_auto_compact_window: 200000
21
+
22
+ root_cause:
23
+ confirmed:
24
+ - Ciel's suffix-only compatibility rule classified every routed Anthropic
25
+ model without `[1m]` as 200K.
26
+ - The rule overrode the model metadata capacity of 1048576 and projected
27
+ CLAUDE_CODE_MAX_CONTEXT_TOKENS=200000 plus
28
+ CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000.
29
+ - Claude Code's status input still described Opus 5 as a 1M model, so the
30
+ Ciel status line divided usage by 1000000 while Claude compacted against
31
+ the Ciel-imposed 200000 window.
32
+ official_reference:
33
+ - https://platform.claude.com/docs/en/build-with-claude/context-windows
34
+ - The current Anthropic table states that current Fable/Mythos, Opus 4.6+
35
+ and Opus 5, and Sonnet 4.6+ and Sonnet 5 use 1M by default without a beta
36
+ header.
37
+
38
+ change:
39
+ policy:
40
+ - Apply the 200K routed fallback only when the selected model is not in the
41
+ documented 1M-default model set.
42
+ - Expand that set to include Mythos 5/preview, Opus 4.6, and Sonnet 4.6.
43
+ - Preserve `[1m]` as a backwards-compatible local marker, not a requirement
44
+ for current 1M-default Anthropic models.
45
+ regression_tests:
46
+ - All documented current 1M-default IDs project a 1000000 auto-compact
47
+ window and 1048576 maximum context without the marker.
48
+ - Sonnet 4.5 and Haiku 4.5 remain on the 200000 path.
49
+
50
+ verification:
51
+ focused:
52
+ command: python tests/test_anthropic_native_output_tokens.py && python tests/test_claude_native_provider.py
53
+ result: 115 passed
54
+ full_suite:
55
+ command: npm test
56
+ result:
57
+ passed: 3156
58
+ skipped: 137
59
+ failed: 0
60
+ local_install:
61
+ path: C:\Users\djlov\.local\share\ciel-runtime
62
+ source_install_hash_match:
63
+ claude_environment.py: true
64
+ anthropic_model_policy.py: true
65
+ target_config_projection:
66
+ configured_model: claude-opus-5
67
+ anthropic_model: ciel-runtime-anthropic-claude-opus-5
68
+ max_context_tokens: 1048576
69
+ auto_compact_window: 1000000
70
+ isolated_live_launch:
71
+ claude_code_version: 2.1.260
72
+ exit_code: 0
73
+ launch_snapshot: provider=anthropic model=claude-opus-5 context=1048576 window=1000000
74
+ router_lifetime: stopped cleanly after Claude --version
75
+ status: verified