@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,159 @@
1
+ task:
2
+ id: ollama-cloud-desktop-model-exhaustive-audit-20260902
3
+ request: >-
4
+ Deploy Ciel Runtime locally and exhaustively inspect every Ollama Cloud
5
+ model discoverable by Ollama Desktop.
6
+ observed_at: 2026-09-02T20:02:00-05:00
7
+ status: verified_and_locally_deployed
8
+
9
+ scope_and_sources:
10
+ official_desktop_repository:
11
+ url: https://github.com/ollama/ollama
12
+ commit: b79067b0db7417f20108363bc22adb97f35c966a
13
+ model_discovery:
14
+ file: app/ui/app/src/api.ts
15
+ lines: 199-293
16
+ behavior:
17
+ - Read local models with ollama.list.
18
+ - Read cloud models through the Desktop cloud-model endpoint.
19
+ - Remove only BERT-only families from the selectable chat list.
20
+ - Read selected-model capabilities with ollama.show.
21
+ request_projection:
22
+ file: app/ui/ui.go
23
+ lines: 893-911,1847-1939
24
+ behavior:
25
+ - Use the show response's thinking capability as the default.
26
+ - Send true for capability-only thinking models.
27
+ - Send a string only when the Desktop UI explicitly supplies one.
28
+ - Preserve assistant thinking and tool calls in conversation history.
29
+ official_cloud_docs: https://docs.ollama.com/cloud
30
+ official_thinking_docs: https://docs.ollama.com/capabilities/thinking
31
+ official_model_cards:
32
+ - https://ollama.com/library/deepseek-v4-flash
33
+ - https://ollama.com/library/deepseek-v4-pro
34
+ - https://ollama.com/library/glm-5.2
35
+ - https://ollama.com/library/glm-5.3
36
+ - https://ollama.com/library/glm-5.3-flash
37
+ - https://ollama.com/library/gpt-oss
38
+ - https://ollama.com/library/kimi-k3
39
+
40
+ discovery_evidence:
41
+ endpoint: GET https://ollama.com/api/tags
42
+ authenticated: true
43
+ discovered_models: 19
44
+ installed_ciel_models: 19
45
+ set_difference: []
46
+ credentials_recorded: false
47
+ show_probe:
48
+ endpoint: POST https://ollama.com/api/show
49
+ success: 19/19
50
+ parameters_field_null: 19/19
51
+ conclusion: >-
52
+ Ollama Cloud did not publish fixed sampling parameters for any of the 19
53
+ models through /api/show. Ciel therefore must not invent temperature,
54
+ top_p, top_k, or num_predict defaults for the wire request.
55
+
56
+ model_inventory:
57
+ columns: [model, context_tokens, capabilities, modalities, verified_think_contract, tool_probe_seconds]
58
+ rows:
59
+ - [deepseek-v4-flash:0731, 1048576, completion|tools|thinking, text, high|max_default, 1.11]
60
+ - [deepseek-v4-pro:0813, 1048576, completion|tools|thinking, text, high_default|max, 0.96]
61
+ - [gemma4:31b, 262144, completion|thinking|tools|vision, text|image, boolean, 0.53]
62
+ - [glm-5.1, 202752, thinking|completion|tools, text, boolean, 1.40]
63
+ - [glm-5.2, 1048576, thinking|completion|tools, text, high_default|max, 1.52]
64
+ - [glm-5.3, 1048576, completion|thinking|tools, text, low|high|max_default, 1.22]
65
+ - [glm-5.3-flash, 1048576, completion|thinking|tools|vision, text|image, low|high_default|max, 0.76]
66
+ - [gpt-oss:120b, 131072, completion|tools|thinking, text, low|medium_default|high, 0.56]
67
+ - [gpt-oss:20b, 131072, completion|tools|thinking, text, low|medium_default|high, 0.99]
68
+ - [kimi-k2.6, 262144, vision|thinking|completion|tools, text|image, boolean, 2.33]
69
+ - [kimi-k2.7-code, 262144, vision|thinking|completion|tools, text|image, boolean, 2.67]
70
+ - [kimi-k3, 1048576, vision|thinking|completion|tools, text|image, low|high|max_default, 1.27]
71
+ - [minimax-m2.7, 196608, completion|tools|thinking, text, boolean, 1.60]
72
+ - [minimax-m3, 512000, completion|tools|thinking|vision, text|image, boolean, 3.05]
73
+ - [mistral-large-3:675b, 262144, completion|tools|vision, text|image, none, 1.18]
74
+ - [nemotron-3-nano:30b, 262144, completion|tools|thinking, text, boolean, 0.63]
75
+ - [nemotron-3-super, 262144, completion|thinking|tools, text, boolean, 3.38]
76
+ - [nemotron-3-ultra, 262144, completion|thinking|tools, text, boolean, 22.85]
77
+ - [qwen3.5:397b, 262144, completion|thinking|tools|vision, text|image, boolean, 1.65]
78
+
79
+ live_inference_verification:
80
+ endpoint: POST https://ollama.com/api/chat
81
+ request:
82
+ stream: false
83
+ task: Call ping exactly once with value ok and no text answer.
84
+ thinking: >-
85
+ false for ordinary models and low for GPT-OSS, solely to keep the health
86
+ probe small; this probe did not attempt to benchmark reasoning quality.
87
+ results:
88
+ http_200: 19/19
89
+ tool_name_ping: 19/19
90
+ tool_argument_ok: 19/19
91
+ minimum_seconds: 0.53
92
+ maximum_seconds: 22.85
93
+ maximum_model: nemotron-3-ultra
94
+ limits:
95
+ - A successful minimal tool call proves availability and schema execution.
96
+ - It does not prove sustained-agent quality or normal workload latency.
97
+
98
+ confirmed_defects:
99
+ - id: glm-5.3-effort-profile-missing
100
+ evidence: >-
101
+ /api/show reports architecture glm_dsa_moe and the official model card
102
+ documents low, high, and max with max as default. Ciel had no handler for
103
+ glm_dsa_moe, so its Codex reasoning-level list was empty.
104
+ correction: >-
105
+ Add the glm_dsa_moe/glm-5.3 profile; expose low, high, xhigh to Codex and
106
+ map xhigh to Ollama max, with xhigh as the default.
107
+ - id: unverified-generic-string-effort
108
+ evidence: >-
109
+ Ollama's official generic thinking documentation says most models use a
110
+ boolean and identifies GPT-OSS as the generic exception requiring
111
+ low/medium/high strings. Ollama Desktop likewise only exposes the
112
+ low/medium/high selector for GPT-OSS. Several Ciel model names had been
113
+ assigned low/medium/high/max without a published model-specific contract.
114
+ correction: >-
115
+ Remove the name-based generic string levels. Capability-only thinking
116
+ models now send boolean true, matching Desktop. Explicit model contracts
117
+ remain for DeepSeek V4, GLM-5.2, GLM-5.3, GLM-5.3 Flash, GPT-OSS, and Kimi K3.
118
+
119
+ verification:
120
+ focused_ollama_suite:
121
+ command: python -m unittest discover -s tests -p "test_ollama*.py" -v
122
+ tests: 76
123
+ result: passed
124
+ ruff:
125
+ command: python -m ruff check ciel_runtime_support/ollama_thinking.py tests/test_ollama_provider_options.py
126
+ result: passed
127
+ full_suite:
128
+ command: npm test
129
+ unit: {tests: 1363, skipped: 45, result: passed}
130
+ router: {tests: 1077, result: passed}
131
+ channel: {tests: 403, skipped: 80, result: passed}
132
+ runtime: {tests: 261, skipped: 12, result: passed}
133
+ total_tests: 3104
134
+ installed_policy_probe:
135
+ glm-5.3:
136
+ native_levels: [low, high, max]
137
+ codex_levels: [low, high, xhigh]
138
+ default_native: max
139
+ codex_xhigh_wire_value: max
140
+ minimax-m3:
141
+ native_contract: boolean
142
+ codex_xhigh_wire_value: true
143
+ mistral-large-3:675b:
144
+ think: false
145
+ modalities: [text, image]
146
+
147
+ local_deployment:
148
+ command: powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1
149
+ result: passed
150
+ target: C:/Users/djlov/.local/share/ciel-runtime
151
+ changed_file_sha256: 0B970B89AD6AD2CC5DAAAC680669C8E7860672BA0DD7B641CD457E1D5AA09F63
152
+ source_installed_sha256_match: true
153
+ installed_model_command:
154
+ command: ciel-runtimectl models ollama-cloud
155
+ models: 19
156
+ result: passed
157
+ active_process_boundary: >-
158
+ The files are locally deployed. Any Ciel router process that imported the
159
+ previous module before this deployment must be restarted to load this code.
@@ -0,0 +1,148 @@
1
+ task:
2
+ title: Muse Spark 1.3 Contributor cache-hit diagnosis
3
+ date: 2026-09-03
4
+ scope:
5
+ workspace: G:/OneCielDMSUI
6
+ router_port: 9605
7
+ router_pid: 90340
8
+ provider: meta
9
+ model: muse-spark-1.3-contributor
10
+ codex_session: 019fcac4-4538-7a53-91d1-565cd21a8c5e
11
+
12
+ correction:
13
+ discarded_instance:
14
+ port: 9471
15
+ workspace: C:/Users/djlov/cielarvis/mind-core-sand-box
16
+ reason: It is a separate active Claude/Anthropic instance and is not evidence for DMSUI.
17
+ authoritative_instance:
18
+ port: 9605
19
+ workspace: G:/OneCielDMSUI
20
+ runtime: Codex 0.152.1
21
+
22
+ observations:
23
+ rollout_measurement:
24
+ recent_40:
25
+ interval: 2026-09-03T07:30:25-2026-09-03T08:06:34
26
+ weighted_cache_hit_percent: 85.454
27
+ zero_hit_requests: 5
28
+ below_90_percent_requests: 7
29
+ recent_100:
30
+ interval: 2026-09-03T06:53:20-2026-09-03T08:06:34
31
+ weighted_cache_hit_percent: 89.037
32
+ zero_hit_requests: 10
33
+ below_90_percent_requests: 12
34
+ pattern: Most requests hit 99 percent or more, with intermittent complete or partial misses.
35
+ mid_task_evidence:
36
+ task: 52
37
+ complete_misses:
38
+ - {time: 2026-09-03T07:56:48, call: 24, input_tokens: 587410, cached_tokens: 0}
39
+ - {time: 2026-09-03T07:58:42, call: 26, input_tokens: 588396, cached_tokens: 0}
40
+ partial_miss: {time: 2026-09-03T07:59:28, call: 27, input_tokens: 590307, cached_tokens: 217329}
41
+ implication: New user-turn startup alone cannot account for every observed miss.
42
+
43
+ codex_wire_probe:
44
+ method: Codex 0.152.1 was connected to an isolated loopback HTTP capture server.
45
+ requests: 3
46
+ confirmed:
47
+ prompt_cache_key_present: true
48
+ prompt_cache_key_stable_across_requests: true
49
+ prompt_cache_retention_present: false
50
+ instructions_fingerprint_stable: true
51
+ tool_fingerprint:
52
+ request_1: ee2c774b9ead15c5
53
+ request_2: 6f65d7083e8fd376
54
+ request_3: 6f65d7083e8fd376
55
+ tool_change_scope: Initial asynchronous app namespace discovery changed five tool namespace payloads once; requests 2 and 3 were stable.
56
+
57
+ live_meta_probe:
58
+ endpoint: http://127.0.0.1:9605/v1/responses
59
+ upstream: https://api.meta.ai/v1
60
+ request:
61
+ prompt_tokens: 7674
62
+ prompt_cache_key: stable probe key
63
+ prompt_cache_retention: 24h
64
+ results:
65
+ first: {http_status: 200, cached_tokens: 0, elapsed_seconds: 1.78}
66
+ second: {http_status: 200, cached_tokens: 7665, elapsed_seconds: 2.39}
67
+ second_hit_percent: 99.88
68
+ confirmed: Meta accepted the Responses retention field and reused the stable prefix.
69
+
70
+ official_sources:
71
+ meta_prompt_caching:
72
+ url: https://github.com/meta-models/meta-model-cookbook/blob/main/01_api_fundamentals/05_prompt_caching.ipynb
73
+ confirmed_contract:
74
+ - Cache matching requires an identical leading token sequence.
75
+ - A stable prompt_cache_key routes matching prefixes together at scale.
76
+ - prompt_cache_retention 24h keeps bursty traffic warm across idle gaps.
77
+ - Retention is a hint and not a guarantee.
78
+
79
+ implementation:
80
+ meta_adapter:
81
+ file: ciel_runtime_support/providers/meta.py
82
+ behavior:
83
+ - Default prompt_cache_retention is 24h.
84
+ - It is injected only for Responses requests carrying prompt_cache_key.
85
+ - An explicit client value such as in_memory is preserved.
86
+ diagnostics:
87
+ files:
88
+ - ciel_runtime_support/responses_cache_diagnostics.py
89
+ - ciel_runtime_support/provider_responses_passthrough.py
90
+ recorded_fields:
91
+ - cache_hit_percent
92
+ - prompt_cache_key_fingerprint
93
+ - prompt_cache_retention
94
+ - request_instructions_fingerprint
95
+ - request_tools_fingerprint
96
+ - request_input_head_fingerprint
97
+ - request_input_items
98
+ - request_tools
99
+ - request_bytes
100
+ - request_uses_previous_response_id
101
+ privacy: Raw prompt text, tool definitions, and cache keys are not recorded.
102
+
103
+ verification:
104
+ focused:
105
+ command: python -m unittest test_meta_provider test_responses_cache_diagnostics test_responses_usage_observer test_statusline
106
+ result: 55 tests passed
107
+ full_suite:
108
+ command: npm test
109
+ groups:
110
+ unit: {run: 1368, skipped: 45, failures: 0}
111
+ router: {run: 1094, skipped: 0, failures: 0}
112
+ channel: {run: 403, skipped: 80, failures: 0}
113
+ runtime: {run: 276, skipped: 12, failures: 0}
114
+ total: {run: 3141, skipped: 137, failures: 0}
115
+ static:
116
+ ruff: passed
117
+ compileall: passed
118
+ git_diff_check: passed
119
+ merged_workspace_config_probe:
120
+ provider: meta
121
+ model: muse-spark-1.3-contributor
122
+ merged_default_retention: 24h
123
+ normalized_request_retention: 24h
124
+ source_request_mutated: false
125
+ discarded_check: A raw config-file-only probe returned null because it bypassed the runtime default merge; it is not runtime-equivalent evidence.
126
+
127
+ limits:
128
+ confirmed_not_proven:
129
+ - The missing retention hint is a verified client gap and the live fix path is verified.
130
+ - It does not by itself prove the cause of complete misses occurring less than one minute apart.
131
+ - The new fingerprints are required after restart to distinguish request-prefix mutation from provider-side best-effort cache loss for those events.
132
+
133
+ deployment:
134
+ local:
135
+ command: powershell -NoProfile -ExecutionPolicy Bypass -File ./install.ps1
136
+ target: C:/Users/djlov/.local/share/ciel-runtime
137
+ result: installed
138
+ hash_matches:
139
+ - ciel_runtime_support/providers/meta.py
140
+ - ciel_runtime_support/provider_responses_passthrough.py
141
+ - ciel_runtime_support/responses_cache_diagnostics.py
142
+ executable_version: 0.2.37
143
+ active_dmsui_router_restarted: false
144
+ activation: The existing PID 90340 remains on its already-loaded modules; the next DMSUI runtime start loads this deployment.
145
+ nightly:
146
+ branch: nightly
147
+ target: origin/nightly
148
+ mechanism: A push to nightly triggers the npm nightly publication workflow.
@@ -0,0 +1,127 @@
1
+ task:
2
+ id: meta-muse-spark-contributor-required-schema-20260903
3
+ request: >-
4
+ Diagnose the Muse Spark 1.3 Contributor failure in G:/OneCielDMSUI and make
5
+ the real Codex request acceptable to Meta's Responses endpoint.
6
+ workspace: G:/OneCielDMSUI
7
+ runtime_workspace_id: 60524a4bf5eb
8
+ router_instance: 9491-60524a4bf5eb
9
+ codex_session: 019fcac4-4538-7a53-91d1-565cd21a8c5e
10
+ status: verified
11
+
12
+ observed_failure:
13
+ rollout_path: C:/Users/djlov/.codex/sessions/2026/08/03/rollout-2026-08-03T22-14-48-019fcac4-4538-7a53-91d1-565cd21a8c5e.jsonl
14
+ occurrences:
15
+ - line: 7811
16
+ at: 2026-09-03T04:55:29.475Z
17
+ - line: 7817
18
+ at: 2026-09-03T04:57:30.700Z
19
+ response:
20
+ type: invalid_request_error
21
+ message: >-
22
+ 'required' is required to be supplied and to be an array including every
23
+ key in properties. Missing 'limit'.
24
+ router_log:
25
+ path: C:/Users/djlov/AppData/Roaming/ciel-runtime/router-instances/9491-60524a4bf5eb/router.log
26
+ first_status: POST /v1/responses HTTP/1.1 400
27
+
28
+ confirmed_cause:
29
+ - >-
30
+ Ciel's Meta Responses normalization preserved Codex function schemas without
31
+ converting optional properties to Meta's required-all-properties contract.
32
+ - >-
33
+ The upstream error names the omitted property limit and rejects the request
34
+ before model inference.
35
+ - >-
36
+ A TRACE capture of the actual Codex 0.152.1 request identified the named
37
+ limit property at tools[12], type tool_search, parameters.limit. The first
38
+ implementation normalized function tools only and therefore did not cover
39
+ this hosted tool schema.
40
+ - >-
41
+ After the required-all schema fix, the actual Codex request reached Meta's
42
+ next validator and was rejected because tools[7] was Codex's custom
43
+ apply_patch tool; Meta returned `custom` tools are not supported.
44
+ - >-
45
+ After custom-tool projection, an actual Codex run showed Meta serializing
46
+ exec_command.max_output_tokens and yield_time_ms as 1000.0 and 10000.0.
47
+ Codex 0.152.1 rejected those values as floats while deserializing usize.
48
+
49
+ live_contract_probes:
50
+ endpoint: https://api.meta.ai/v1/responses via local router 9491
51
+ model: muse-spark-1.3-contributor
52
+ all_required_nonnullable:
53
+ schema: required [query, limit], additionalProperties false, strict true
54
+ http_status: 200
55
+ output_arguments: {query: status, limit: 1}
56
+ all_required_nullable_optional:
57
+ schema: required [query, limit], limit type [integer, 'null']
58
+ http_status: 200
59
+ output_arguments: {query: status, limit: null}
60
+ conclusion: >-
61
+ Meta accepts a required-all-properties schema and accepts null as the
62
+ representation of an originally optional property.
63
+
64
+ official_documentation:
65
+ url: https://dev.meta.ai/docs/api-reference/responses/create-response
66
+ access_result: login_required
67
+ note: >-
68
+ The public fetch cannot read the authenticated page. No undocumented field
69
+ is inferred: the implementation follows the exact upstream validation error
70
+ and the two successful live API probes above.
71
+
72
+ implementation:
73
+ files:
74
+ - ciel_runtime_support/providers/meta.py
75
+ - ciel_runtime_support/provider_responses_passthrough.py
76
+ - ciel_runtime_support/responses_custom_tool_bridge.py
77
+ - tests/test_meta_provider.py
78
+ behavior:
79
+ - Apply to top-level parameters schemas on Meta's OpenAI Responses tools.
80
+ - Preserve hosted-tool identity and fields while normalizing its parameters schema.
81
+ - Attach strict true only to function tools, not hosted tools.
82
+ - Recursively include every object property in required.
83
+ - Set additionalProperties false and strict true.
84
+ - Make formerly optional properties nullable so their optional meaning is retained.
85
+ - Deep-copy tool declarations so the client request is not mutated.
86
+ - Project Codex custom tools to strict Meta function tools with one raw input string.
87
+ - Restore function calls and streamed argument events to Codex custom-tool events.
88
+ - Project replayed custom tool call/output items to Meta function call/output items.
89
+ - Normalize whole-number JSON floats in Meta tool arguments to integer JSON values.
90
+ - Remove stale Content-Length whenever a response body is projected.
91
+
92
+ verification:
93
+ focused_tests:
94
+ command: python -m unittest discover -s tests -p test_meta_provider.py -q
95
+ tests: 39
96
+ result: passed
97
+ lint:
98
+ command: python -m ruff check on changed Python source and tests
99
+ result: passed
100
+ actual_codex:
101
+ version: 0.152.1
102
+ router_port: 9605
103
+ workspace: G:/OneCielDMSUI
104
+ model: muse-spark-1.3-contributor
105
+ session: 01a065bf-c640-7981-a8b1-f78a02a1f551
106
+ actions:
107
+ - apply_patch created .ciel-runtime-muse-probe.txt
108
+ - exec_command read the created file in 138ms
109
+ - final response reported MUSE_CUSTOM_TOOL_OK followed by a newline
110
+ exit_code: 0
111
+ cleanup: diagnostic file deleted
112
+ full_suite:
113
+ command: npm test
114
+ passed: 3125
115
+ groups:
116
+ - {name: unit, passed: 1366, skipped: 45}
117
+ - {name: router, passed: 1093, skipped: 0}
118
+ - {name: channel, passed: 403, skipped: 80}
119
+ - {name: runtime, passed: 263, skipped: 12}
120
+ result: passed
121
+ local_deployment:
122
+ command: powershell -NoProfile -ExecutionPolicy Bypass -File ./install.ps1
123
+ installed_version: 0.2.37
124
+ destination: C:/Users/djlov/.local/share/ciel-runtime
125
+ changed_source_hashes_match: true
126
+
127
+ credentials_recorded: false
@@ -0,0 +1,160 @@
1
+ task:
2
+ id: ollama-cloud-kimi-k3-resumed-session-stall-20260903
3
+ request: >-
4
+ Diagnose and improve the Cielarvis Codex session that repeatedly stops after
5
+ a Kimi K3 progress announcement even though it includes the earlier recovery.
6
+ workspace: C:/Users/djlov/cielarvis
7
+ runtime_workspace_id: a3a719fc6552
8
+ router_instance: 9479-a3a719fc6552
9
+ codex_session: 01a01dff-f0f0-7ef3-8cde-1d9916510f35
10
+ status: verified_in_isolated_router
11
+
12
+ scope:
13
+ included:
14
+ - ollama-cloud/kimi-k3 routed Codex traffic on port 9479
15
+ - Codex rollout JSONL for the identified Cielarvis session
16
+ - Ciel Kimi continuation recovery and Ollama tool argument projection
17
+ excluded:
18
+ - Claude Opus sessions
19
+ - unrelated Cielarvis application behavior
20
+
21
+ observed_failure:
22
+ local_window: 2026-09-02T23:37:47-05:00 through 2026-09-02T23:38:16-05:00
23
+ rollout_evidence:
24
+ path: C:/Users/djlov/.codex/sessions/2026/08/20/rollout-2026-08-20T02-08-27-01a01dff-f0f0-7ef3-8cde-1d9916510f35.jsonl
25
+ sequence:
26
+ - line: 6588
27
+ action: view_image
28
+ - line: 6590
29
+ result: tool output returned
30
+ - line: 6595
31
+ assistant_text: >-
32
+ 현재 notice 영역을 정확히 보겠습니다 — 채팅 창 하단 상태바 부분을
33
+ 새 캡처로 읽습니다.
34
+ followup_tool_calls: 0
35
+ - line: 6597
36
+ event: task_complete
37
+ usage_evidence:
38
+ last_requests:
39
+ - {input_tokens: 679087, cached_input_tokens: 0}
40
+ - {input_tokens: 682635, cached_input_tokens: 0}
41
+ - {input_tokens: 682885, cached_input_tokens: 0}
42
+ - {input_tokens: 684307, cached_input_tokens: 0}
43
+ - {input_tokens: 684564, cached_input_tokens: 0}
44
+ note: >-
45
+ These values prove request size and reported cache usage. They do not by
46
+ themselves prove that context size or cache behavior caused the stall.
47
+
48
+ router_evidence:
49
+ path: C:/Users/djlov/AppData/Roaming/ciel-runtime/router-instances/9479-a3a719fc6552/router.log
50
+ loaded_recovery_confirmed:
51
+ - "codex_turn_retry provider=ollama-cloud reason=preamble_only"
52
+ - "codex_turn_retry_result provider=ollama-cloud attempt=1/3 retryable=true chars=34"
53
+ - "codex_turn_retry_result provider=ollama-cloud attempt=2/3 retryable=true chars=17"
54
+ - "codex_turn_retry_result provider=ollama-cloud attempt=3/3 retryable=true chars=52"
55
+ conclusion: >-
56
+ The earlier Kimi patch was loaded and active. Its three-attempt bound was
57
+ exhausted by three more progress-only replies, after which Codex received
58
+ the original announcement and recorded task_complete.
59
+ malformed_tool_path:
60
+ - at: 2026-09-02T23:37:13-05:00
61
+ raw_name: exec
62
+ matched_name: exec_command
63
+ missing: cmd
64
+ emitted_key: js
65
+ disposition: dropped
66
+ - at: 2026-09-02T23:37:25-05:00
67
+ raw_name: exec
68
+ matched_name: exec_command
69
+ missing: cmd
70
+ emitted_key: input
71
+ disposition: dropped
72
+ source: C:/Users/djlov/AppData/Roaming/ciel-runtime/router-instances/9479-a3a719fc6552/tool-calls.jsonl
73
+
74
+ confirmed_causes:
75
+ - >-
76
+ The fixed three-attempt Kimi continuation limit is insufficient for the
77
+ captured turn: all three retries were classified retryable and no tool call
78
+ survived projection.
79
+ - >-
80
+ exec name canonicalization occurred before argument validation, but the
81
+ generic input alias was not converted to exec_command.cmd, so a non-empty
82
+ model-supplied command was discarded.
83
+ - >-
84
+ Each failed retry was appended to the next retry body. The router token
85
+ estimates increased from 643708 to 643788 to 643865 during that sequence.
86
+ This proves cumulative request growth; it does not prove model causation.
87
+
88
+ not_claimed:
89
+ - The 1M Kimi context declaration is not itself a guarantee of equal behavior at every context length.
90
+ - The observed 684K-token context is not claimed as the cause of the stop.
91
+ - Cache misses are not claimed as the cause of the stop.
92
+ - JavaScript intended for a Node REPL is not assumed to be a valid shell command.
93
+
94
+ official_reference:
95
+ ollama_model_card:
96
+ url: https://ollama.com/library/kimi-k3
97
+ confirmed: Kimi K3 is marked tools, thinking, cloud, and 1M context.
98
+ ollama_tool_calling:
99
+ url: https://docs.ollama.com/capabilities/tool-calling
100
+ confirmed: >-
101
+ The documented agent loop preserves assistant tool-call messages and tool
102
+ results across subsequent model calls.
103
+ ollama_responses_tool_choice:
104
+ url: https://github.com/ollama/ollama/blob/main/openai/responses.go
105
+ confirmed: >-
106
+ Ollama's Responses conversion states that tool_choice required is not
107
+ generally supported, so the recovery cannot rely on forcing tool_choice.
108
+
109
+ implementation:
110
+ files:
111
+ - ciel_runtime_support/codex_turn_recovery.py
112
+ - ciel_runtime_support/pseudo_tool_parser.py
113
+ - tests/test_codex_turn_recovery.py
114
+ - tests/test_tool_name_canonicalization.py
115
+ behavior:
116
+ - Increase Kimi progress-only recovery from three to six bounded attempts.
117
+ - Use a stricter continuation instruction after the third failed reply.
118
+ - Keep the original request as a stable base and replay only the latest stalled assistant response.
119
+ - Repair non-empty command, script, or input aliases to exec_command.cmd.
120
+ - Do not reinterpret a js argument as a shell command.
121
+
122
+ verification:
123
+ focused_tests:
124
+ command: py -3.14 -m unittest tests.test_codex_turn_recovery tests.test_tool_name_canonicalization -v
125
+ tests: 47
126
+ result: passed
127
+ live_isolated_router:
128
+ port: 9599
129
+ source_fingerprint: 2486fa4d14d56174
130
+ provider: ollama-cloud
131
+ model: kimi-k3
132
+ simple_tool_probe:
133
+ http_status: 200
134
+ responses_status: completed
135
+ output: function_call inspect_workspace {scope: all}
136
+ elapsed_seconds: 2.7
137
+ result: passed
138
+ lint:
139
+ command: python -m ruff check on changed Python source and tests
140
+ result: passed
141
+ full_suite:
142
+ command: npm test
143
+ passed: 3125
144
+ groups:
145
+ - {name: unit, passed: 1366, skipped: 45}
146
+ - {name: router, passed: 1093, skipped: 0}
147
+ - {name: channel, passed: 403, skipped: 80}
148
+ - {name: runtime, passed: 263, skipped: 12}
149
+ result: passed
150
+ limitation: >-
151
+ A live Kimi response did not deterministically reproduce four consecutive
152
+ preamble-only replies, so the exact fourth-retry branch is covered by unit
153
+ tests rather than claimed as a live reproduction.
154
+ local_deployment:
155
+ command: powershell -NoProfile -ExecutionPolicy Bypass -File ./install.ps1
156
+ installed_version: 0.2.37
157
+ destination: C:/Users/djlov/.local/share/ciel-runtime
158
+ changed_source_hashes_match: true
159
+
160
+ credentials_recorded: false
@@ -0,0 +1,94 @@
1
+ task:
2
+ id: ollama-cloud-kimi-k3-substantive-dangling-action-20260903
3
+ request: >-
4
+ Diagnose why the active Cielarvis Kimi K3 Codex session still terminates
5
+ before performing the next announced action.
6
+ workspace: C:/Users/djlov/cielarvis
7
+ runtime_workspace_id: a3a719fc6552
8
+ router_instance: 9599-a3a719fc6552
9
+ codex_session: 01a01dff-f0f0-7ef3-8cde-1d9916510f35
10
+ status: verified
11
+
12
+ observed_runtime:
13
+ health:
14
+ version: 0.2.37
15
+ source_fingerprint: 2486fa4d14d56174
16
+ pid: 105292
17
+ installed_source: C:/Users/djlov/.local/share/ciel-runtime/ciel_runtime.py
18
+ installed_recovery_sha256: 1EF46C9E4D94B94EBE595B2F8C55175A8C54CE06DA4C1042CA17922B5D6D8587
19
+ repository_recovery_sha256: 1EF46C9E4D94B94EBE595B2F8C55175A8C54CE06DA4C1042CA17922B5D6D8587
20
+ conclusion: The previous Kimi recovery patch was loaded in the active router.
21
+
22
+ observed_failure:
23
+ rollout_path: C:/Users/djlov/.codex/sessions/2026/08/20/rollout-2026-08-20T02-08-27-01a01dff-f0f0-7ef3-8cde-1d9916510f35.jsonl
24
+ turn_id: 01a065d3-2083-7021-898d-ead2b90238d3
25
+ sequence:
26
+ - {ordinal: 6615, type: function_call, name: view_image}
27
+ - {ordinal: 6617, type: function_call_output}
28
+ - ordinal: 6622
29
+ type: assistant_message
30
+ normalized_characters: 305
31
+ ending: 먼저 네이티브 쪽에 마이크 모듈이 있는지 확인합니다.
32
+ next_tool_calls: 0
33
+ - {ordinal: 6624, type: task_complete}
34
+ router_log:
35
+ response_started_at: 2026-09-03T00:54:02-05:00
36
+ response_completed_at: 2026-09-03T00:54:17-05:00
37
+ http_status: 200
38
+ recovery_log_present: false
39
+
40
+ confirmed_cause:
41
+ - >-
42
+ The existing Kimi follow-up expression recognizes Korean future endings
43
+ such as 확인하겠습니다 but not a sequenced present-form action such as
44
+ 먼저 ... 확인합니다.
45
+ - >-
46
+ The generic preamble policy rejects this 305-character response because it
47
+ contains a substantive diagnosis after a completed tool result, so the
48
+ Kimi-specific detector must independently preserve an explicit final
49
+ sequenced action.
50
+
51
+ implementation:
52
+ files:
53
+ - ciel_runtime_support/codex_turn_recovery.py
54
+ - tests/test_codex_turn_recovery.py
55
+ behavior:
56
+ - Detect a final Korean sequenced action beginning with 먼저, 이제, 다음으로, 계속, 추가로, or 바로.
57
+ - Limit the rule to Kimi messages that include reasoning and no tool call.
58
+ - Apply the same detector to every bounded continuation result.
59
+
60
+ verification:
61
+ focused_tests:
62
+ command: python -m unittest discover -s tests -p test_codex_turn_recovery.py -q
63
+ passed: 40
64
+ lint:
65
+ command: python -m ruff check ciel_runtime_support/codex_turn_recovery.py tests/test_codex_turn_recovery.py
66
+ result: passed
67
+ live_isolated_cielarvis_router:
68
+ port: 9607
69
+ provider: ollama-cloud
70
+ model: kimi-k3
71
+ initial_visible_characters: 438
72
+ initial_ending: 먼저 현재 작업공간을 확인합니다.
73
+ router_log: codex_turn_retry provider=ollama-cloud reason=promised_followup chars=438
74
+ continuation_output: function_call inspect_workspace {scope: all}
75
+ http_status: 200
76
+ responses_status: completed
77
+ full_suite:
78
+ command: npm test
79
+ passed: 3127
80
+ groups:
81
+ - {name: unit, passed: 1366, skipped: 45}
82
+ - {name: router, passed: 1093, skipped: 0}
83
+ - {name: channel, passed: 403, skipped: 80}
84
+ - {name: runtime, passed: 265, skipped: 12}
85
+ result: passed
86
+ local_deployment:
87
+ command: powershell -NoProfile -ExecutionPolicy Bypass -File ./install.ps1
88
+ destination: C:/Users/djlov/.local/share/ciel-runtime
89
+ installed_version: 0.2.37
90
+ source_sha256: C74699E14121542C214E3CB9CC61D793964826C6B9D103B0E359F23B20D6FF97
91
+ installed_sha256: C74699E14121542C214E3CB9CC61D793964826C6B9D103B0E359F23B20D6FF97
92
+ hashes_match: true
93
+
94
+ credentials_recorded: false