kenaz 0.3.22 → 0.3.23

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 (465) hide show
  1. package/core/.claude/hooks/_user-scope.js +1 -1
  2. package/core/.claude/hooks/core-resolve.js +1 -1
  3. package/core/.claude/hooks/worktree-create.js +6 -6
  4. package/core/.claude/hooks/worktree-remove.js +4 -4
  5. package/core/.collaboration/core/reconcile.js +16 -1
  6. package/core/.collaboration/core/task-2467-lifecycle.test.js +63 -0
  7. package/core/.collaboration/core/task-api.js +37 -7
  8. package/core/.formation/bifrost/launch.js +1 -1
  9. package/core/.formation/tools/kenaz-stats.js +1 -1
  10. package/core/.formation/tools/post-complete/git-merge.js +1 -1
  11. package/core/.formation/tools/prompt.js +1 -1
  12. package/core/.kenaz/specialist/ansuz_rules.yaml +7 -51
  13. package/core/.kenaz/specialist/ansuz_session_handoff.schema.json +2 -6
  14. package/core/.rule/general/project-self-containment.yaml +2 -2
  15. package/core/.specialist/Amelia/README.md +1 -1
  16. package/core/.specialist/Amelia/rule.yaml +1 -1
  17. package/core/.specialist/Ansuz/RULES.md +1 -1
  18. package/core/.specialist/Ansuz/concepts/commitment_layer.yaml +1 -1
  19. package/core/.specialist/Ansuz/concepts/evolvable_guardrails.yaml +1 -1
  20. package/core/.specialist/Ansuz/knowledge.yaml +1 -3
  21. package/core/.specialist/tools/__tests__/task-2409-lessons.test.js +10 -0
  22. package/core/.specialist/tools/__tests__/task-2427-harvest.test.js +25 -0
  23. package/core/.specialist/tools/ansuz-boot-fast.js +1 -1
  24. package/core/.specialist/tools/failure-detector.js +4 -4
  25. package/core/.specialist/tools/handoff-doc.js +1 -1
  26. package/core/.specialist/tools/lessons.js +2 -2
  27. package/core/CLAUDE.md +5 -5
  28. package/core/KENAZ_CORE_VERSION +1 -1
  29. package/core/dashboard/scripts/install-kenaz-cli.js +21 -6
  30. package/core/dev/scripts/check-file-size.js +1 -1
  31. package/core/dev/scripts/ci-feedback.js +1 -1
  32. package/core/dev/scripts/gc-agent-worktrees.js +11 -11
  33. package/core/dev/scripts/kenaz-session.js +3 -3
  34. package/core/dev/scripts/peer-identity-e2e.js +3 -3
  35. package/core/dev/scripts/run-rust-tests.js +2 -2
  36. package/core/dev/scripts/skill-routing-replay.js +3 -3
  37. package/core/dev/scripts/task1961/selftest.js +2 -2
  38. package/core/dev/scripts/windows-hide-guard.test.js +97 -0
  39. package/core/plugins/kenaz/guidance.md +1 -0
  40. package/core/plugins/kenaz/hooks/core-resolve.js +1 -1
  41. package/core/plugins/kenaz/hooks/kenaz-hook.js +52 -4
  42. package/core/plugins/kenaz/scripts/kenaz.test.js +72 -5
  43. package/lib/cli.js +9 -5
  44. package/package.json +6 -6
  45. package/vendor/install-kenaz-cli.js +21 -6
  46. package/core/.kenaz/designs/METAPLASTICITY_CONFIDENCE_DESIGN.md +0 -537
  47. package/core/.kenaz/designs/REFLEX_INITIATOR_DESIGN.md +0 -501
  48. package/core/.kenaz/designs/TASK_1385_handoff_mcp_design.md +0 -426
  49. package/core/.kenaz/designs/TASK_932_hippocampus_consolidation.md +0 -103
  50. package/core/.kenaz/designs/TASK_934_efe_signal_engine.md +0 -97
  51. package/core/.kenaz/designs/TASK_935_self_evolution_framework.md +0 -154
  52. package/core/.kenaz/designs/VISION_cognitive_architecture_roadmap.md +0 -159
  53. package/core/.kenaz/designs/metaplasticity_simulation_results.json +0 -696
  54. package/core/.kenaz/main-memory/README.md +0 -230
  55. package/core/.kenaz/main-memory/kenaz/cortex/001_cortex_overview.md +0 -168
  56. package/core/.kenaz/main-memory/kenaz/cortex/001_rag_engine_overview.md +0 -30
  57. package/core/.kenaz/main-memory/kenaz/memory-system/001_three_tier_architecture.md +0 -361
  58. package/core/.kenaz/main-memory/kenaz/pipeline/001_task_execution_flow.md +0 -117
  59. package/core/.kenaz/main-memory/kenaz/pipeline/001_task_granularity.md +0 -154
  60. package/core/.kenaz/main-memory/kenaz/pipeline/002_team_priority.md +0 -51
  61. package/core/.kenaz/main-memory/kenaz/pipeline/003_feature_id_system.md +0 -46
  62. package/core/.kenaz/main-memory/kenaz/rules/001_gen_007_self_containment.md +0 -108
  63. package/core/.kenaz/main-memory/kenaz/rules/001_rule_priority_system.md +0 -121
  64. package/core/.kenaz/main-memory/kenaz/rules/002_agt_006_pre_check.md +0 -0
  65. package/core/.kenaz/main-memory/kenaz/rules/003_ppl_002_task_archival.md +0 -48
  66. package/core/.kenaz/main-memory/kenaz/system/001_dual_track_task_system.md +0 -197
  67. package/core/.kenaz/main-memory/knowledge/patterns/001_json_bom_issue.md +0 -78
  68. package/core/.kenaz/main-memory/knowledge/patterns/001_leader_worker_pattern.md +0 -0
  69. package/core/.kenaz/main-memory/knowledge/patterns/002_scope_path_conflict.md +0 -115
  70. package/core/.kenaz/main-memory/knowledge/patterns/002_task_dependency_resolution.md +0 -223
  71. package/core/.kenaz/main-memory/knowledge/patterns/003_question_protocol.md +0 -242
  72. package/core/.kenaz/main-memory/knowledge/patterns/004_user_insight_value.md +0 -111
  73. package/core/.kenaz/main-memory/knowledge/patterns/005_file_lock_pattern.md +0 -274
  74. package/core/.kenaz/main-memory/knowledge/references/001_ppl_rules.md +0 -28
  75. package/core/.kenaz/main-memory/knowledge/solutions/001_json_bom_issue.md +0 -137
  76. package/core/.kenaz/main-memory/knowledge/solutions/001_team_invocation.md +0 -0
  77. package/core/.kenaz/main-memory/knowledge/solutions/002_passive_monitoring.md +0 -0
  78. package/core/.kenaz/main-memory/knowledge/solutions/003_windows_file_race_condition.md +0 -239
  79. package/core/.kenaz/main-memory/registry.json +0 -326
  80. package/core/.kenaz/main-memory/version.yaml +0 -58
  81. package/core/.kenaz/specialist/memory_guard_fired.json +0 -1
  82. package/core/.kenaz/specialist/memory_guard_trigger_cache.json +0 -1
  83. package/core/.kenaz/specialist/memory_source_priority.yaml +0 -260
  84. package/core/.kenaz/specialist/prompt_1775.txt +0 -317
  85. package/core/.kenaz/specialist/prompt_1776.txt +0 -326
  86. package/core/.kenaz/specialist/prompt_1791.txt +0 -320
  87. package/core/.kenaz/specialist/prompt_1792.txt +0 -320
  88. package/core/.kenaz/specialist/prompt_1795.txt +0 -281
  89. package/core/.kenaz/specialist/prompt_1813.txt +0 -332
  90. package/core/.kenaz/specialist/prompt_1814.txt +0 -401
  91. package/core/.kenaz/specialist/prompt_1815.txt +0 -394
  92. package/core/.kenaz/specialist/prompt_1816.txt +0 -437
  93. package/core/.kenaz/specialist/prompt_1818.txt +0 -361
  94. package/core/.kenaz/specialist/prompt_1819.txt +0 -421
  95. package/core/.kenaz/specialist/prompt_1821.txt +0 -345
  96. package/core/.kenaz/specialist/prompt_1822.txt +0 -313
  97. package/core/.kenaz/specialist/prompt_1824.txt +0 -348
  98. package/core/.kenaz/specialist/prompt_1826.txt +0 -388
  99. package/core/.kenaz/specialist/rune_efe_salience_gap.md +0 -21
  100. package/core/.kenaz/specialist/task1825_update.json +0 -43
  101. package/core/.kenaz/specialist/taskgen/consolidation_i.json +0 -38
  102. package/core/.kenaz/specialist/taskgen/csharp_a.json +0 -44
  103. package/core/.kenaz/specialist/taskgen/csharp_b.json +0 -40
  104. package/core/.kenaz/specialist/taskgen/embedding_e.json +0 -34
  105. package/core/.kenaz/specialist/taskgen/hygiene_fg.json +0 -39
  106. package/core/.kenaz/specialist/taskgen/pathology_h.json +0 -36
  107. package/core/.kenaz/specialist/taskgen/unity_noise_d.json +0 -38
  108. package/core/.kenaz/specialist/taskgen/visibility_c.json +0 -38
  109. package/core/.specialist/Ansuz/decisions/ADR-requirement-graph-layer.md +0 -390
  110. package/core/.specialist/Ansuz/self_model_seed.backup.json +0 -100
  111. package/core/.specialist/ansuz_session_handoff.json +0 -96
  112. package/core/dev/ALAYA_FIELD_FEEDBACK_DESIGN.md +0 -126
  113. package/core/dev/ANSUZ_SCAFFOLD_DIET_2026-09-20.md +0 -231
  114. package/core/dev/ANSUZ_STARTUP_INJECTION_REVIEW.md +0 -355
  115. package/core/dev/ANSUZ_WORKFLOW_MODERNIZATION.md +0 -143
  116. package/core/dev/CORTEX_META_GRAPH_ASSESSMENT.md +0 -99
  117. package/core/dev/FREYA_DOWNSTREAM_BUGS_2026-09-19.md +0 -44
  118. package/core/dev/GLOBAL_MEMORY_IDENTITY_CONSOLIDATION.md +0 -263
  119. package/core/dev/GUARD_EFFECTIVENESS_DESIGN.md +0 -180
  120. package/core/dev/HEALTH_GATE_VARIANCE_ASSESSMENT.md +0 -271
  121. package/core/dev/HOOK_DIET_2026-09-21.md +0 -126
  122. package/core/dev/JEV_INTEGRATION_PLAN.md +0 -189
  123. package/core/dev/KENAZ_AGENT_CONNECT_v1_SPEC.md +0 -139
  124. package/core/dev/MOBILE_DESIGN_SPEC.md +0 -569
  125. package/core/dev/MULTI_ANSUZ_SPEC.md +0 -136
  126. package/core/dev/MUNINN_RETIREMENT.md +0 -115
  127. package/core/dev/PHASE3_ATTRIBUTION_POPULATION_DIAGNOSIS.md +0 -211
  128. package/core/dev/PHASE3_P3-2B_TASKLEVEL_PROBE.md +0 -83
  129. package/core/dev/PHASE3_P3-2_POPULATION_DISJOINTNESS.md +0 -83
  130. package/core/dev/PHASE3_P3-2_REMEASURE_REPORT.md +0 -231
  131. package/core/dev/PREDICTION_GROUNDING_DESIGN.md +0 -376
  132. package/core/dev/PRODUCT_SPEC.md +0 -317
  133. package/core/dev/PROJECT_REGISTRY_DUPLICATE_ASSESSMENT.md +0 -86
  134. package/core/dev/STARTUP_TIMELINE_TASK_1995.md +0 -181
  135. package/core/dev/SYNAPSE_WORKER_PER_PROJECT.md +0 -881
  136. package/core/dev/TASK_1680_P3-3_DISPATCH_SPEC.md +0 -96
  137. package/core/dev/TASK_1684_CALIBRATION_IMPACT_ANALYSIS.md +0 -170
  138. package/core/dev/TASK_1684_FORK_A_GOODHART_DESIGN.md +0 -171
  139. package/core/dev/TASK_1684_P3_2_REMEASURE_VALIDATION.md +0 -262
  140. package/core/dev/TASK_1903_SIGNAL_AUC_MEASUREMENT.md +0 -207
  141. package/core/dev/TASK_1904_BRANCH_INTEGRITY_AUDIT.md +0 -146
  142. package/core/dev/ansuz-eval/README.md +0 -38
  143. package/core/dev/ansuz-eval/build-fixtures.js +0 -87
  144. package/core/dev/ansuz-eval/grade.js +0 -96
  145. package/core/dev/ansuz-eval/grader.test.js +0 -117
  146. package/core/dev/ansuz-eval/tasks.md +0 -32
  147. package/core/dev/archive/ansuz/BOOT_FULL.md +0 -141
  148. package/core/dev/archive/ansuz/agents/ansuz-boot.md +0 -176
  149. package/core/dev/archive/ansuz/designs/alaya-passive-surfacing.md +0 -84
  150. package/core/dev/archive/ansuz/designs/cc_memory_indexing.md +0 -307
  151. package/core/dev/archive/ansuz/designs/check_guard.md +0 -322
  152. package/core/dev/archive/ansuz/designs/consequence_loop.md +0 -227
  153. package/core/dev/archive/ansuz/designs/mcp_kuzudb_lock_architecture.md +0 -312
  154. package/core/dev/archive/ansuz/designs/phase0_git_enrichment.md +0 -278
  155. package/core/dev/archive/ansuz/designs/refactor_mcp_tools_synapse.md +0 -490
  156. package/core/dev/archive/ansuz/designs/semantic_markdown_extraction.md +0 -167
  157. package/core/dev/archive/ansuz/designs/task_1372_prompt_injects_into.md +0 -193
  158. package/core/dev/archive/ansuz/designs/thought_stack.md +0 -286
  159. package/core/dev/archive/ansuz/investigations/reachability_unified_api_2026-04-11.md +0 -330
  160. package/core/dev/archive/ansuz/investigations/synapse_orphans_indexing_bug_2026-04-11.md +0 -352
  161. package/core/dev/archive/ansuz/investigations/synapse_orphans_reindex_verification_2026-04-11.md +0 -48
  162. package/core/dev/archive/ansuz/investigations/synapse_orphans_verification_2026-04-11.md +0 -170
  163. package/core/dev/archive/ansuz/legacy/kernel.yaml +0 -399
  164. package/core/dev/archive/ansuz/legacy/phases/phase_0.yaml +0 -418
  165. package/core/dev/archive/ansuz/legacy/phases/phase_1.yaml +0 -376
  166. package/core/dev/archive/ansuz/legacy/phases/phase_10.yaml +0 -35
  167. package/core/dev/archive/ansuz/legacy/phases/phase_11.yaml +0 -582
  168. package/core/dev/archive/ansuz/legacy/phases/phase_2.yaml +0 -94
  169. package/core/dev/archive/ansuz/legacy/phases/phase_3.yaml +0 -274
  170. package/core/dev/archive/ansuz/legacy/phases/phase_4.yaml +0 -67
  171. package/core/dev/archive/ansuz/legacy/phases/phase_5.yaml +0 -32
  172. package/core/dev/archive/ansuz/legacy/phases/phase_6.yaml +0 -91
  173. package/core/dev/archive/ansuz/legacy/phases/phase_7.yaml +0 -58
  174. package/core/dev/archive/ansuz/legacy/phases/phase_8.yaml +0 -146
  175. package/core/dev/archive/ansuz/legacy/phases/phase_9.yaml +0 -424
  176. package/core/dev/archive/ansuz/specs/INDEX_bifrost_hook_parity.yaml +0 -92
  177. package/core/dev/archive/ansuz/specs/active-inference-formation.yaml +0 -453
  178. package/core/dev/archive/ansuz/specs/brief_TASK_1228_userpromptsubmit.yaml +0 -191
  179. package/core/dev/archive/ansuz/specs/brief_TASK_1229_pretooluse_posttooluse.yaml +0 -250
  180. package/core/dev/archive/ansuz/specs/brief_TASK_1230_sessionstart_stop.yaml +0 -301
  181. package/core/dev/archive/ansuz/specs/brief_TASK_1231_verification.yaml +0 -272
  182. package/core/dev/archive/skills/feature_agent/SKILL.md +0 -289
  183. package/core/dev/design/PHASE4_DESIGN.md +0 -559
  184. package/core/dev/design/dashboard_docs_integration_PLAN.md +0 -388
  185. package/core/dev/design/matrix_format_ABBREVIATIONS.md +0 -655
  186. package/core/dev/design/matrix_format_DESIGN_SPEC.md +0 -601
  187. package/core/dev/design/matrix_format_DISCUSSION_SUMMARY.md +0 -484
  188. package/core/dev/design/matrix_format_EXAMPLE_memory.matrix +0 -13
  189. package/core/dev/design/matrix_format_EXAMPLE_project_status.matrix +0 -9
  190. package/core/dev/design/matrix_format_EXAMPLE_tasks.matrix +0 -14
  191. package/core/dev/design/matrix_format_SYNTAX_BNF.md +0 -754
  192. package/core/dev/design/matrix_format_TOKEN_COMPARISON.md +0 -484
  193. package/core/dev/design/matrix_v2_COGNITIVE_DESIGN.md +0 -503
  194. package/core/dev/design/matrix_v2_DISCUSSION_SUMMARY.md +0 -414
  195. package/core/dev/design/matrix_v2_EXAMPLE.matrix +0 -67
  196. package/core/dev/designs/EXPANDABLE_CARD_DESIGN_SPEC.md +0 -509
  197. package/core/dev/jev-eval/ACTIVE_CORRECTION.md +0 -52
  198. package/core/dev/jev-eval/ANNOTATION_GUIDE.md +0 -68
  199. package/core/dev/jev-eval/BASELINE_COMPARISON.md +0 -45
  200. package/core/dev/jev-eval/CONTEXT_REVIEW.md +0 -31
  201. package/core/dev/jev-eval/EVALUATION_STATUS.md +0 -39
  202. package/core/dev/jev-eval/HISTORICAL_CORPUS.md +0 -33
  203. package/core/dev/jev-eval/PACKAGING_VERIFICATION.md +0 -42
  204. package/core/dev/jev-eval/README.md +0 -101
  205. package/core/dev/jev-eval/THALAMUS_RANKING.md +0 -58
  206. package/core/dev/jev-eval/VALIDATION_PROGRESS.md +0 -54
  207. package/core/dev/jev-eval/cli.mjs +0 -50
  208. package/core/dev/jev-eval/context.mjs +0 -183
  209. package/core/dev/jev-eval/corpus.mjs +0 -186
  210. package/core/dev/jev-eval/fixtures/conversation-review.seed.jsonl +0 -6
  211. package/core/dev/jev-eval/fixtures/synthetic.jsonl +0 -11
  212. package/core/dev/jev-eval/metrics.mjs +0 -67
  213. package/core/dev/jev-eval/muninn-baseline.mjs +0 -119
  214. package/core/dev/jev-eval/providers.mjs +0 -95
  215. package/core/dev/jev-eval/reports/annotation-pilot-2026-09-20.json +0 -32
  216. package/core/dev/jev-eval/reports/context-review-2026-09-20.json +0 -48
  217. package/core/dev/jev-eval/reports/conversation-review.pending.json +0 -151
  218. package/core/dev/jev-eval/reports/history-corpus-2026-09-20.json +0 -52
  219. package/core/dev/jev-eval/reports/length-probe-2026-09-20.json +0 -133
  220. package/core/dev/jev-eval/reports/live-smoke-2026-09-20.json +0 -616
  221. package/core/dev/jev-eval/reports/muninn-baseline-2026-09-20.json +0 -52
  222. package/core/dev/jev-eval/reports/resilience-2026-09-20.json +0 -520
  223. package/core/dev/jev-eval/reports/rules-baseline.json +0 -197
  224. package/core/dev/jev-eval/reports/synthetic-review.pending.json +0 -357
  225. package/core/dev/jev-eval/resilience.mjs +0 -71
  226. package/core/dev/jev-eval/review.mjs +0 -78
  227. package/core/dev/jev-eval/schema.mjs +0 -87
  228. package/core/dev/jev-eval/test/context.test.mjs +0 -95
  229. package/core/dev/jev-eval/test/corpus.test.mjs +0 -102
  230. package/core/dev/jev-eval/test/eval.test.mjs +0 -146
  231. package/core/dev/jev-eval/test/muninn-baseline.test.mjs +0 -71
  232. package/core/dev/jev-eval/test/resilience.test.mjs +0 -72
  233. package/core/dev/jev-eval/test/review.test.mjs +0 -61
  234. package/core/dev/pipeline/PHASE3_PLANNING_SUMMARY.md +0 -338
  235. package/core/dev/pipeline/PROGRESS.md +0 -113
  236. package/core/dev/pipeline/PROGRESS_template.md +0 -860
  237. package/core/dev/pipeline/QA_REPORT_F008.md +0 -431
  238. package/core/dev/pipeline/QA_REPORT_LOCAL_CLAUDE_DIAGNOSIS.md +0 -583
  239. package/core/dev/pipeline/README.md +0 -210
  240. package/core/dev/pipeline/WORKFLOW_GUIDE.md +0 -824
  241. package/core/dev/pipeline/archived/TASK_015_tauri_init.yaml +0 -53
  242. package/core/dev/pipeline/archived/TASK_016_tauri_commands.yaml +0 -54
  243. package/core/dev/pipeline/archived/TASK_017_rust_pty.yaml +0 -54
  244. package/core/dev/pipeline/archived/TASK_018_tauri_bundle.yaml +0 -53
  245. package/core/dev/pipeline/archived/TASK_019_release_workflow.yaml +0 -56
  246. package/core/dev/pipeline/archived/TASK_020_update_ui.yaml +0 -54
  247. package/core/dev/pipeline/archived/TASK_021_update_notification_ui.yaml +0 -55
  248. package/core/dev/pipeline/archived/TASK_022_remove_node_pty.yaml +0 -65
  249. package/core/dev/pipeline/archived/TASK_023_api_routes_migration.yaml +0 -86
  250. package/core/dev/pipeline/archived/TASK_024_feature_id_system.yaml +0 -51
  251. package/core/dev/pipeline/archived/TASK_025_executable_acceptance.yaml +0 -66
  252. package/core/dev/pipeline/archived/TASK_026_spec_versioning.yaml +0 -56
  253. package/core/dev/pipeline/archived/TASK_027_drift_detection.yaml +0 -60
  254. package/core/dev/pipeline/archived/TASK_028_tauri_pty_manager.yaml +0 -60
  255. package/core/dev/pipeline/archived/TASK_029_tauri_pty_commands.yaml +0 -62
  256. package/core/dev/pipeline/archived/TASK_030_frontend_session_adapter.yaml +0 -54
  257. package/core/dev/pipeline/archived/TASK_031_terminal_tauri_events.yaml +0 -56
  258. package/core/dev/pipeline/archived/TASK_041_scheduler_data_models.yaml +0 -54
  259. package/core/dev/pipeline/archived/TASK_042_path_lock_manager.yaml +0 -53
  260. package/core/dev/pipeline/archived/TASK_043_process_manager.yaml +0 -57
  261. package/core/dev/pipeline/archived/TASK_044_git_integration.yaml +0 -85
  262. package/core/dev/pipeline/archived/TASK_045_task_queue_manager.yaml +0 -54
  263. package/core/dev/pipeline/archived/TASK_046_scheduler_dispatcher.yaml +0 -60
  264. package/core/dev/pipeline/archived/TASK_047_tauri_scheduler_commands.yaml +0 -55
  265. package/core/dev/pipeline/archived/TASK_048_realtime_status_push.yaml +0 -92
  266. package/core/dev/pipeline/archived/TASK_049_frontend_scheduler_integration.yaml +0 -58
  267. package/core/dev/pipeline/archived/TASK_050_error_recovery.yaml +0 -56
  268. package/core/dev/pipeline/archived/TASK_051_optimization_proposals_backend.yaml +0 -53
  269. package/core/dev/pipeline/archived/TASK_052_optimization_proposals_ui.yaml +0 -58
  270. package/core/dev/pipeline/archived/TASK_053_optimization_proposals_diff_view.yaml +0 -54
  271. package/core/dev/pipeline/archived/TASK_054_multi_project_scheduler_state.yaml +0 -76
  272. package/core/dev/pipeline/archived/TASK_055_scheduler_api_project_scope.yaml +0 -64
  273. package/core/dev/pipeline/archived/TASK_056_frontend_scheduler_project_scope.yaml +0 -62
  274. package/core/dev/pipeline/archived/TASK_057_scheduler_module_structure.yaml +0 -54
  275. package/core/dev/pipeline/archived/TASK_058_scheduler_models_extract.yaml +0 -51
  276. package/core/dev/pipeline/archived/TASK_059_scheduler_core_extract.yaml +0 -51
  277. package/core/dev/pipeline/archived/TASK_060_scheduler_commands_extract.yaml +0 -51
  278. package/core/dev/pipeline/archived/TASK_061_scheduler_specialized_commands.yaml +0 -53
  279. package/core/dev/pipeline/archived/TASK_062_process_manager_module_structure.yaml +0 -56
  280. package/core/dev/pipeline/archived/TASK_063_process_manager_core_extract.yaml +0 -56
  281. package/core/dev/pipeline/archived/TASK_064_recovery_module_structure.yaml +0 -57
  282. package/core/dev/pipeline/archived/TASK_065_recovery_core_extract.yaml +0 -56
  283. package/core/dev/pipeline/archived/TASK_066_self_enhancement_scheduler_models.yaml +0 -60
  284. package/core/dev/pipeline/archived/TASK_067_agents_section_quick_actions.yaml +0 -53
  285. package/core/dev/pipeline/archived/TASK_067_self_enhancement_scheduler_core.yaml +0 -65
  286. package/core/dev/pipeline/archived/TASK_068_agent_workflow_rule_enhancement.yaml +0 -46
  287. package/core/dev/pipeline/archived/TASK_068_self_enhancement_tauri_commands.yaml +0 -61
  288. package/core/dev/pipeline/archived/TASK_069_agent_wizard_responsive.yaml +0 -46
  289. package/core/dev/pipeline/archived/TASK_069_self_enhancement_ui.yaml +0 -62
  290. package/core/dev/pipeline/archived/TASK_070_preview_panel_redesign.yaml +0 -62
  291. package/core/dev/pipeline/archived/TASK_070_self_enhancement_integration.yaml +0 -57
  292. package/core/dev/pipeline/archived/TASK_071_preview_panel_qa.yaml +0 -98
  293. package/core/dev/pipeline/archived/TASK_071_single_agent_config.yaml +0 -57
  294. package/core/dev/pipeline/archived/TASK_072_preview_modal_esc_fix.yaml +0 -71
  295. package/core/dev/pipeline/archived/TASK_072_product_review_module.yaml +0 -57
  296. package/core/dev/pipeline/archived/TASK_073_agents_page_component_refactor.yaml +0 -68
  297. package/core/dev/pipeline/archived/TASK_073_rename_single_agent.yaml +0 -64
  298. package/core/dev/pipeline/archived/TASK_074_preview_mode_ui_diagnosis.yaml +0 -71
  299. package/core/dev/pipeline/archived/TASK_074_single_agent_ui_toggle.yaml +0 -56
  300. package/core/dev/pipeline/archived/TASK_075_agents_page_component_refactor.yaml +0 -69
  301. package/core/dev/pipeline/archived/TASK_075_single_agent_integration_test.yaml +0 -75
  302. package/core/dev/pipeline/archived/TASK_076_preview_mode_ui_diagnosis.yaml +0 -70
  303. package/core/dev/pipeline/archived/TASK_076_single_agent_continuous_mode.yaml +0 -65
  304. package/core/dev/pipeline/archived/TASK_077_failure_directory_structure.yaml +0 -51
  305. package/core/dev/pipeline/archived/TASK_077_single_agent_typescript_types.yaml +0 -59
  306. package/core/dev/pipeline/archived/TASK_078_fail_001_agent_no_output.yaml +0 -53
  307. package/core/dev/pipeline/archived/TASK_078_single_agent_ui_simplify.yaml +0 -74
  308. package/core/dev/pipeline/archived/TASK_079_dashboard_rwd_responsive.yaml +0 -63
  309. package/core/dev/pipeline/archived/TASK_079_fail_002_json_bom.yaml +0 -56
  310. package/core/dev/pipeline/archived/TASK_080_fail_003_queue_pollution.yaml +0 -56
  311. package/core/dev/pipeline/archived/TASK_080_http_server_module.yaml +0 -55
  312. package/core/dev/pipeline/archived/TASK_081_failure_logging_tools.yaml +0 -57
  313. package/core/dev/pipeline/archived/TASK_081_http_api_routes.yaml +0 -62
  314. package/core/dev/pipeline/archived/TASK_082_frontend_api_adapter.yaml +0 -51
  315. package/core/dev/pipeline/archived/TASK_082_integrate_failure_to_workflow.yaml +0 -60
  316. package/core/dev/pipeline/archived/TASK_083_cleanup_nextjs_api.yaml +0 -48
  317. package/core/dev/pipeline/archived/TASK_083_task_queue_cleanup.yaml +0 -67
  318. package/core/dev/pipeline/archived/TASK_084_rust_dead_code_cleanup.yaml +0 -66
  319. package/core/dev/pipeline/archived/TASK_084_scheduler_sync_logic_fix.yaml +0 -68
  320. package/core/dev/pipeline/archived/TASK_085_http_api_web_mode_fixes.yaml +0 -46
  321. package/core/dev/pipeline/archived/TASK_085_memory_consolidation_0204_0205.yaml +0 -98
  322. package/core/dev/pipeline/archived/TASK_086_collapsible_preview_panel.yaml +0 -161
  323. package/core/dev/pipeline/archived/TASK_086_web_mode_feature_parity.yaml +0 -62
  324. package/core/dev/pipeline/archived/TASK_087_manual_memory_archival.yaml +0 -163
  325. package/core/dev/pipeline/archived/TASK_087_mobile_http_control.yaml +0 -68
  326. package/core/dev/pipeline/archived/TASK_088_fail_003_to_ppl_002_rule.yaml +0 -63
  327. package/core/dev/pipeline/archived/TASK_088_mobile_http_qa.yaml +0 -121
  328. package/core/dev/pipeline/archived/TASK_089_agent_collaboration_topic.yaml +0 -60
  329. package/core/dev/pipeline/archived/TASK_089_web_mode_monitor_fix.yaml +0 -58
  330. package/core/dev/pipeline/archived/TASK_090_cli_detection_fix.yaml +0 -61
  331. package/core/dev/pipeline/archived/TASK_090_ui_ux_lessons_topic.yaml +0 -63
  332. package/core/dev/pipeline/archived/TASK_091_expandable_card_design.yaml +0 -56
  333. package/core/dev/pipeline/archived/TASK_091_move_agent_section_components.yaml +0 -65
  334. package/core/dev/pipeline/archived/TASK_092_expandable_card_component.yaml +0 -60
  335. package/core/dev/pipeline/archived/TASK_092_refactor_agent_create_wizard.yaml +0 -84
  336. package/core/dev/pipeline/archived/TASK_093_taskcard_detail_integration.yaml +0 -57
  337. package/core/dev/pipeline/archived/TASK_093_update_barrel_exports_test.yaml +0 -84
  338. package/core/dev/pipeline/archived/TASK_094_ai_agent_generation_enhancement.yaml +0 -115
  339. package/core/dev/pipeline/archived/TASK_094_proposalcard_detail_integration.yaml +0 -55
  340. package/core/dev/pipeline/archived/TASK_095_preview_fixes.yaml +0 -129
  341. package/core/dev/pipeline/archived/TASK_095_single_agent_task_selector.yaml +0 -60
  342. package/core/dev/pipeline/archived/TASK_096_agents_page_ux_improvements.yaml +0 -163
  343. package/core/dev/pipeline/archived/TASK_096_single_agent_status_sync.yaml +0 -60
  344. package/core/dev/pipeline/archived/TASK_097_local_claude_error_logging.yaml +0 -59
  345. package/core/dev/pipeline/archived/TASK_097_single_agent_monitor_events.yaml +0 -59
  346. package/core/dev/pipeline/archived/TASK_098_product_manager_team_phase2.yaml +0 -60
  347. package/core/dev/pipeline/archived/TASK_098_single_agent_refactor_test.yaml +0 -58
  348. package/core/dev/pipeline/archived/TASK_099_backend_team_creation.yaml +0 -258
  349. package/core/dev/pipeline/archived/TASK_100_frontend_team_creation.yaml +0 -61
  350. package/core/dev/pipeline/archived/TASK_101_orchestrator_system.yaml +0 -403
  351. package/core/dev/pipeline/archived/TASK_102_designer_sre_teams.yaml +0 -90
  352. package/core/dev/pipeline/archived/TASK_103_integration_testing.yaml +0 -86
  353. package/core/dev/pipeline/archived/TASK_128_integration_testing.yaml +0 -83
  354. package/core/dev/pipeline/archived/TASK_134_cortex_v2_phase3_file_watcher.yaml +0 -65
  355. package/core/dev/pipeline/archived/TASK_134_team_http_api.yaml +0 -96
  356. package/core/dev/pipeline/archived/TASK_135_cortex_v2_phase3_git_monitor.yaml +0 -63
  357. package/core/dev/pipeline/archived/TASK_136_cortex_v2_phase3_change_analyzer.yaml +0 -69
  358. package/core/dev/pipeline/archived/TASK_137_cortex_v2_phase3_cache_invalidator.yaml +0 -67
  359. package/core/dev/pipeline/archived/TASK_137_team_orchestrator_integration.yaml +0 -93
  360. package/core/dev/pipeline/archived/TASK_138_cortex_v2_phase3_distributed_cache.yaml +0 -68
  361. package/core/dev/pipeline/archived/TASK_138_matrix_folder_structure.yaml +0 -61
  362. package/core/dev/pipeline/archived/TASK_139_cortex_v2_phase3_cache_prewarming.yaml +0 -65
  363. package/core/dev/pipeline/archived/TASK_146_unified_documentation.yaml +0 -141
  364. package/core/dev/pipeline/archived/TASK_147_pipeline_execution_rules.yaml +0 -76
  365. package/core/dev/pipeline/archived/TASK_148_update_claude_md.yaml +0 -77
  366. package/core/dev/pipeline/archived/TASK_149_fix_nextjs_mdx_serialization.yaml +0 -63
  367. package/core/dev/pipeline/archived/TASK_149_update_team_docs.yaml +0 -77
  368. package/core/dev/pipeline/archived/TASK_150_pipeline_workflow_guide.yaml +0 -82
  369. package/core/dev/pipeline/archived/TASK_164_fix_smart_context_switch.yaml +0 -49
  370. package/core/dev/pipeline/archived/TASK_165_ctags_symbol_index.yaml +0 -53
  371. package/core/dev/pipeline/archived/TASK_166_symbol_search_mcp_tool.yaml +0 -48
  372. package/core/dev/pipeline/archived/TASK_167_llm_module_summary.yaml +0 -55
  373. package/core/dev/pipeline/archived/TASK_168_map_reduce_context.yaml +0 -51
  374. package/core/dev/pipeline/archived/TASK_169_v2_integration_testing.yaml +0 -52
  375. package/core/dev/pipeline/backups/archive_2026-02-04T22-07-22/TASK_QUEUE_backup.json +0 -95
  376. package/core/dev/pipeline/docs/multi-agent-coordination.md +0 -446
  377. package/core/dev/pipeline/docs/overview.md +0 -406
  378. package/core/dev/pipeline/docs/task-management.md +0 -412
  379. package/core/dev/pipeline/docs/workflows.md +0 -32
  380. package/core/dev/pipeline/orchestrator/schemas/task_queue_schema.json +0 -58
  381. package/core/dev/pipeline/orchestrator/schemas/task_schema.json +0 -139
  382. package/core/dev/pipeline/plans/PLAN_task_cli_refactor.md +0 -281
  383. package/core/dev/pipeline/test_results/TASK_TEST_PARALLEL_002_result.txt +0 -27
  384. package/core/dev/plans/ANSUZ_SLIM_PLAN.md +0 -68
  385. package/core/dev/plans/CLI_FIRST_INSTALL_FLOW.md +0 -120
  386. package/core/dev/plans/FORMATION_RETIREMENT_PLAN.md +0 -313
  387. package/core/dev/plans/KUZU_REPLACEMENT_PLAN.md +0 -126
  388. package/core/dev/scripts/CRASH_DIAGNOSIS.md +0 -47
  389. package/core/dev/scripts/README.md +0 -142
  390. package/core/dev/scripts/RUN_ONCE.bat +0 -40
  391. package/core/dev/scripts/START_DEV_AGENT.bat +0 -63
  392. package/core/dev/scripts/START_MULTI_AGENT.bat +0 -80
  393. package/core/dev/scripts/dev_agent_scheduler.ps1 +0 -536
  394. package/core/dev/scripts/init_git.ps1 +0 -396
  395. package/core/dev/scripts/init_git.sh +0 -337
  396. package/core/dev/scripts/init_project.ps1 +0 -851
  397. package/core/dev/scripts/init_project.sh +0 -477
  398. package/core/dev/scripts/multi_agent_scheduler.ps1 +0 -2021
  399. package/core/dev/scripts/multi_agent_scheduler.sh +0 -1344
  400. package/core/dev/scripts/run_once.sh +0 -47
  401. package/core/dev/scripts/setup_rag.ps1 +0 -304
  402. package/core/dev/scripts/setup_rag.sh +0 -230
  403. package/core/dev/scripts/start_dev_agent.sh +0 -137
  404. package/core/dev/scripts/start_multi_agent.sh +0 -41
  405. package/core/dev/scripts/sync_task_queue.ps1 +0 -505
  406. package/core/dev/scripts/sync_task_queue.sh +0 -392
  407. package/core/dev/specs/agent-connect/PROTOCOL.md +0 -177
  408. package/core/dev/specs/agent-connect/SDK_GUIDE.md +0 -915
  409. package/core/dev/specs/agent-connect/examples/minimal-site/README.md +0 -137
  410. package/core/dev/specs/agent-connect/examples/minimal-site/package.json +0 -12
  411. package/core/dev/specs/agent-connect/examples/minimal-site/public/index.html +0 -116
  412. package/core/dev/specs/agent-connect/examples/minimal-site/public/install-redirect.js +0 -73
  413. package/core/dev/specs/agent-connect/examples/minimal-site/server.js +0 -516
  414. package/core/dev/specs/agent-connect/examples/minimal-site/test/smoke.test.mjs +0 -263
  415. package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-empty-prompt-no-first-turn.md +0 -77
  416. package/core/dev/specs/agent-connect/history/DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-prompt-mojibake.md +0 -90
  417. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-07.md +0 -61
  418. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-08_relay-v1-conformance.md +0 -76
  419. package/core/dev/specs/agent-connect/history/FEATURE_REQUEST_kenaz-agent-hub_2026-09-09_v0.4-session-channel.md +0 -87
  420. package/core/dev/specs/agent-connect/history/FLOWPIX_REPLY_agent-hub_2026-09-08_relay-v1-answers.md +0 -68
  421. package/core/dev/specs/agent-connect/history/FLOWPIX_bridge_CONTRACT.md +0 -642
  422. package/core/dev/specs/agent-connect/history/FLOWPIX_spikes_relay_spike_relay.mjs +0 -244
  423. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-07.md +0 -77
  424. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_direction-change-v0.3.md +0 -44
  425. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-answers-ack.md +0 -37
  426. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-conformance.md +0 -56
  427. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_annotations-install-coldstart.md +0 -44
  428. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_empty-prompt-first-turn.md +0 -56
  429. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_prompt-mojibake-fixed.md +0 -48
  430. package/core/dev/specs/agent-connect/history/KENAZ_RESPONSE_agent-hub_2026-09-09_session-channel.md +0 -57
  431. package/core/dev/specs/agent-connect/history/PROTOCOL_v0.3_snapshot.md +0 -379
  432. package/core/dev/specs/agent-connect/history/README.md +0 -47
  433. package/core/dev/specs/peer/CODEX_INTERACTIVE_PUSH.md +0 -65
  434. package/core/dev/specs/peer/CODEX_MANAGED_DAEMON.md +0 -54
  435. package/core/dev/specs/peer/CODEX_PEER_PULL_SPIKE.md +0 -54
  436. package/core/dev/specs/peer/MODS_SPIKE.md +0 -133
  437. package/core/dev/specs/peer/PER_PROJECT_ADDRESSING.md +0 -143
  438. package/core/dev/specs/peer/SWARM_PROTOCOLS.md +0 -256
  439. package/core/dev/specs/peer/codex-hook-shim-peer.test.js +0 -113
  440. package/core/dev/specs/peer/codex-push-launcher.test.js +0 -142
  441. package/core/dev/specs/peer/setup-codex-hooks.test.js +0 -60
  442. package/core/dev/specs/peer-ansuz/DELIVERY_SPIKE.md +0 -397
  443. package/core/dev/specs/peer-ansuz/DESIGN.md +0 -109
  444. package/core/dev/specs/peer-ansuz/spike/claude_poke.js +0 -129
  445. package/core/dev/specs/peer-ansuz/spike/claude_session_start_hook.js +0 -37
  446. package/core/dev/specs/peer-ansuz/spike/claude_settings_hook.json +0 -14
  447. package/core/dev/specs/peer-ansuz/spike/codex_appserver_client.js +0 -105
  448. package/core/dev/specs/peer-ansuz/spike/codex_appserver_query.js +0 -29
  449. package/core/dev/specs/peer-ansuz/spike/extract_timeline.js +0 -26
  450. package/core/dev/specs/synapse/SYMBOL_IDENTITY.md +0 -305
  451. package/core/dev/spikes/A4-cypher-varlen.md +0 -176
  452. package/core/dev/spikes/bloat-rounds.sh +0 -25
  453. package/core/dev/spikes/mods/clean-claude.js +0 -9
  454. package/core/dev/spikes/mods/drive-probe.js +0 -29
  455. package/core/dev/spikes/mods/e2e-peer.js +0 -71
  456. package/core/dev/spikes/mods/evidence/e2e-peer-control.json +0 -17
  457. package/core/dev/spikes/mods/evidence/e2e-peer-mod.json +0 -17
  458. package/core/dev/spikes/mods/evidence/probe-006a6e65-d807-4bc1-b648-fd7d1edfe0b4.jsonl +0 -4
  459. package/core/dev/spikes/mods/evidence/probe-cebdf1f7-f9c4-47a8-83cd-7c0786177404.jsonl +0 -12
  460. package/core/dev/spikes/mods/evidence/probe-eb21147d-10ce-4c32-93ed-37ca37d88d5a.jsonl +0 -11
  461. package/core/dev/spikes/mods/evidence/stream-cebdf1f7.jsonl +0 -18
  462. package/core/dev/spikes/mods/kenaz-mod-probe/.claude-plugin/plugin.json +0 -1
  463. package/core/dev/spikes/mods/kenaz-mod-probe/hooks/hooks.json +0 -1
  464. package/core/dev/spikes/mods/kenaz-mod-probe/hooks/register.ts +0 -65
  465. package/core/dev/spikes/mods/kenaz-mod-probe/tsconfig.json +0 -3
@@ -1,57 +0,0 @@
1
- # Kenaz 側回覆:Agent Connect C 期(S1–S5)裁定與已落地的部分
2
-
3
- 日期:2026-09-09
4
- 來源:KenazAI / TASK_1947(S1 + S5)、TASK_1948(S2)
5
- 對應報告:`FEATURE_REQUEST_kenaz-agent-hub_2026-09-09_v0.4-session-channel.md`(FlowPix,2026-09-09)
6
- 接續:`KENAZ_RESPONSE_agent-hub_2026-09-09_prompt-mojibake-fixed.md`
7
-
8
- ## 裁定總表
9
-
10
- | 需求 | 裁定 | 落地 |
11
- |---|---|---|
12
- | S1 `X-Kenaz-Session` header + status 列 sessions | **做** | TASK_1947,main |
13
- | S5 預設允許網站 MCP 工具 | **做(claude)/查證後文件化(codex)** | TASK_1947,main |
14
- | S2 `kenaz_wait_for_message` 人格慣例 | **做** | TASK_1948,main |
15
- | S4 `kenaz_session_ended` | **下一輪** | 未開卡;這是 Kenaz 主動打回網站的第一個例外,會單獨設計(沿用 S1 的 launch_id、一次性、有逾時) |
16
- | S3 session 輸出串流 | **獨立評估** | 未開卡;牽涉事件模型與權限,且與 v0.4「Kenaz → Web 無回程」立場相抵,等 S1/S2/S5 在 FlowPix 跑穩後再談 |
17
-
18
- 你們提議的順序(S1 + S2 + S5 先、S4 其次、S3 獨立)我們完全採納。
19
-
20
- ## S1:session 身分
21
-
22
- - 預配網站 MCP 的 `headers` 現在是 `{"Authorization": "Bearer <token>", "X-Kenaz-Session": "<launch_id>"}`。
23
- - **`launch_id` 不是 pty session id**。順序上 Kenaz 先寫 MCP 設定、再組啟動腳本、最後才向 pty-server 要到終端分頁的 session id,所以 header 裡的是 Kenaz 在 launch 一開始就鑄好的 uuid v4;`GET /api/agent-hub/status` 會把兩者都列出來給你對照。
24
- - `GET http://127.0.0.1:18080/api/agent-hub/status` 每個 origin 新增:
25
- ```json
26
- "sessions": [{"session_id": "<launch_id>", "pty_session_id": "<pty uuid>", "agent": "claude", "model": "...", "cwd": "...", "started_at": "<ISO-8601>", "alive": true}]
27
- ```
28
- `alive` 是查 pty-server 的即時結果,等於你 S4 想要的「session 死了沒」的輪詢版;S4 做完才會有推送。
29
- - codex 分支:codex-cli 0.153.4 支援 `mcp_servers.<name>.env_http_headers`(header 名 → 環境變數名),值走環境變數、不進命令列,與 bearer 同一套。我們在真實啟動路徑(BOM `.ps1` 經 `powershell -File`)上實測過引號寫法,只有一種能存活,已寫進程式碼與測試。
30
- - PROTOCOL §2 新增第 1b 點與 `mcp.config_with_session_header` fixture;SDK_GUIDE §3.1b。網站可選讀取,Kenaz 一律送。
31
-
32
- ## S5:預設允許網站 MCP 工具
33
-
34
- - claude:啟動時加 `--allowedTools 'mcp__<name>__*'`(`<name>` 即你看到的 `127` 那個 server 名)。沒有加任何 `--dangerously-*`。
35
- - codex:`env_http_headers` 已驗;「MCP 工具呼叫是否觸發審批提示」在 worktree 裡沒有安全的互動式 session 可以驗,先當開放問題記錄,**不會**用 `-a never` 之類會連 shell 指令審批一起關掉的旗標。請你們在 codex 路徑實測一次回報。
36
- - 下一步(我們自己開卡):改成依 MCP 工具 `annotations.readOnlyHint / destructiveHint` 分級,非破壞性預設允許、破壞性照舊提問。這比 `*` 全允安全,也不需要新協定;網站只要在 `tools/list` 標 annotations 就能受益。
37
-
38
- ## S2:`kenaz_wait_for_message`
39
-
40
- - PROTOCOL §2 新增第 5 點(可選)。回傳 `{"message": string|null, "message_id": string|null, "end": boolean}`,`end` 可省略視為 `false`。三個 fixture:`mcp.kenaz_wait_for_message_call` / `_result_message` / `_result_null`。
41
- - Ansuz 人格(Kenaz 啟動時注入)現在會:呼叫 `kenaz_hello` → 處理完 `prompt`(沒有 prompt 就直接)→ 反覆呼叫 `kenaz_wait_for_message`;有 `message` 就當使用者指令執行完再呼叫;`null` 就再呼叫;`end: true`、連續失敗 3 次、或使用者要求停止時停下並告知。工具不在 `tools/list` 裡時完全不提。呼叫前不會向使用者提問,也不會自己 sleep,等待由工具本身的阻塞完成。
42
- - **成本條款(強制)**:每一次呼叫都是 Kenaz 使用者訂閱額度裡的一個 agent turn。網站**必須**長輪詢(建議阻塞 20–25 秒才回 `null`),不得短輪詢。
43
- - minimal-site(`dev/specs/agent-connect/examples/minimal-site`)已實作記憶體信箱:`POST /message` 投遞、`kenaz_wait_for_message` 最長阻塞 20 秒;smoke test 與 conformance 都有覆蓋。你們的 bridge 可以直接對照。
44
- - 審批卡文案「此網站會持續傳送指令」這次沒做:Kenaz 在審批當下還沒連過網站 MCP,不知道 `tools/list` 有什麼;要做得先多一次審批前的探測,留到 S4 一起看。
45
-
46
- ## 對 §5 SDK 套件的對應
47
-
48
- `@kenaz/connect-mcp` 的三個慣例工具骨架裡,`kenaz_wait_for_message` 現在有正式約定可以照抄(minimal-site 就是參考實作);`kenaz_session_ended` / `kenaz_session_event` 等 S4 / S3 定案後再進。
49
-
50
- ## 版本
51
-
52
- 以上都在 main,並已隨 **0.2.231(2026-09-09 21:57Z 發布)** 出貨:S1 header、S5 allowedTools、S2 `kenaz_wait_for_message` 人格慣例都在這一版。
53
-
54
- ## 附:這輪順帶修的
55
-
56
- - `prompt=` 中文亂碼(另一份回覆)。
57
- - Synapse wedge 復原路徑(`synapse_index` 新增 `mode` / `rebuild_graph`),跟 Agent Connect 無關,但你們的 Ansuz 在 vidora 上會用到。
@@ -1,379 +0,0 @@
1
- # Kenaz Agent Connect — Protocol v1 (PROTOCOL.md) — v0.3 SNAPSHOT (ARCHIVED)
2
-
3
- > **ARCHIVED 2026-09-08 by TASK_1939.** This is a frozen snapshot of
4
- > `dev/specs/agent-connect/PROTOCOL.md` as it stood at v0.3 (the WebSocket
5
- > relay + pairing-handshake protocol), taken immediately before TASK_1939
6
- > rewrote that file to v0.4 (relay removed — deep link + website MCP only,
7
- > spec `dev/KENAZ_AGENT_CONNECT_v1_SPEC.md` v0.4 §2.3, decision Q10). Kept
8
- > here for the same archaeology/traceability reason `history/README.md`
9
- > keeps the Relay v1 (FlowPix) documents: v0.4's deep-link `mcp=` param and
10
- > the `kenaz_hello` MCP convention both replace functionality this v0.3
11
- > protocol (and the Relay v1 handshake it absorbed — `site.hello` through
12
- > `pair.denied`) used to provide over the wire. **Do not edit this file —
13
- > it is a historical record, not a living spec.** The current spec is
14
- > `../PROTOCOL.md`.
15
-
16
- ---
17
-
18
- # Kenaz Agent Connect — Protocol v1 (PROTOCOL.md)
19
-
20
- - Status: **finalized draft**, B 期(TASK_1935/TASK_1938)。取代 `dev/KENAZ_AGENT_CONNECT_v1_SPEC.md` 第 2.3 節的內嵌訊息表;規格文件改為引用本檔。
21
- - 標準所有權:本檔是唯一權威來源。FlowPix 的 `bridge/CONTRACT.md`「Relay v1」章節是**歷史來源**(見 `history/README.md`),已被本檔取代,不再更新。
22
- - `protocol_version`:目前為 `"1"`。任何新增/移除訊息型別都必須先改本檔,再改 `dashboard/src-tauri/src/features/agent_hub/protocol.rs`。
23
- - 這份文件的每個 ```json 範例都必須是**可直接 `JSON.parse` 的合法 JSON**——不可有 `|`、不可有註解、不可有多形態塞進同一個區塊。多形態(例如同一 type 的不同錯誤碼)各自獨立一個 `#### Fixture:` 區塊。`dashboard/scripts/agent-connect-conformance/fixtures.mjs` 直接抽取這些區塊當作 conformance suite 的唯一 fixture 來源;本檔任何一個區塊解析失敗,測試就會 fail。
24
-
25
- ## 1. Transport
26
-
27
- - 一個 relay process 對應一個 WS/WSS endpoint(開發:`ws://127.0.0.1:<port>/ws`;正式:`wss://...`,TLS 終止在 relay)。
28
- - 每一幀(frame)是一則 UTF-8 JSON,一個 JSON object,至少要有 `"type"`(string,必填)。
29
- - 大多數訊息帶 `"request_id"`(string),用來把請求與其回應配對;少數 unsolicited push(`agent.connected`、`agent.disconnected`)的 `request_id` 為 `null`。
30
- - `request_id` 由**發起請求的一方**產生(uuid 或等效隨機字串),回應方原樣帶回;relay 轉發時不得改寫。
31
- - 未知 `type`:relay/Kenaz 對無法辨識的訊息型別一律回 `error {request_id, error:{code:"protocol_unsupported", ...}}` 給發送方,**不斷線**(見第 6 節)。這是 B 期硬切策略——沒有舊型別 adapter。
32
-
33
- ## 2. Roles
34
-
35
- | Role | 說明 | 這次的實作 |
36
- |---|---|---|
37
- | **site** | 網站雲端 backend,代表一個瀏覽器 session 連上 relay。連線的第一則訊息若是 `site.hello`,這條連線就固定為 site 角色。 | conformance suite 的 `fake-site.mjs` |
38
- | **agent** | Kenaz 本機桌面應用。連線的第一則訊息若是 `pair.begin`,這條連線就固定為 agent 角色(agent 沒有獨立的 hello 步驟,`pair.begin` 身兼兩者)。 | 真實 Kenaz(`relay_client.rs`);conformance suite 內用一段內嵌的 fake-agent 邏輯(`run.mjs`)頂替,因為本卡不碰 Rust |
39
- | **relay** | Kenaz 託管的中介服務。職責限於:site 握手、token 簽發、agent 配對、依 origin 轉發 launch/approval/status/exited 訊息。relay 永遠看不到 AI 憑證與 MCP bearer。 | `dashboard/scripts/agent-connect-conformance/stub-relay.mjs`(本卡自帶,僅供本卡自測;`dashboard/scripts/agent-hub-fake-relay.mjs` 是 TASK_1936 的假 relay,功能更完整,本卡不碰) |
40
-
41
- `agent ↔ site` 之間,除了下面列的訊息,沒有其他資料經過 relay——生圖、寫回、結果回傳全部走網站自己的 MCP 工具,relay/Kenaz 都看不到那段流量。
42
-
43
- ## 3. 深連結格式
44
-
45
- ```
46
- kenaz://connect?site=<url-encoded origin>&token=<token>&relay=<url-encoded relay ws url>
47
- ```
48
-
49
- | 參數 | 必填 | 說明 |
50
- |---|---|---|
51
- | `site` | 是 | 網站 origin(`https://...`;開發模式下允許 `http://localhost` / `http://127.0.0.1` / `http://[::1]`,見 `KENAZ_AGENT_HUB_DEV=1`)。Kenaz 用 `Url::origin().ascii_serialization()` 正規化,去掉 path/query/fragment,作為 `sites.json` 的 key。 |
52
- | `token` | 是 | `token.mint` 發回的一次性 pairing token,60 秒 TTL,用過即失效(見第 4.3 節)。 |
53
- | `relay` | 是 | relay 的 WS/WSS 端點(`wss://...`;開發模式允許 `ws://127.0.0.1` / `ws://localhost` / `ws://[::1]`)。 |
54
-
55
- v0.3 收斂後,深連結**只負責喚醒與配對**——不再帶 `agent=`/`mode=`/`prompt=`/`mcp=`。這四個參數是 Relay v1(A 期)遺留的「深連結順帶啟動」語意(`agent.launch` 曾經是 relay 廣播、不是 site 請求),已被 Q7/Q9 的決定取代:`agent.launch` 一律是配對成功後 site 透過 relay 送出的**請求**(見第 4.6 節),prompt 與 MCP 端點都在那則訊息裡,不進深連結。目前 `dashboard/src-tauri/src/features/agent_hub/deep_link.rs`(TASK_1929/1932)仍解析這四個舊參數,作為 A 期 Relay v1 基線的相容層;TASK_1936 收斂 Rust 實作時會依本節簡化。
56
-
57
- ## 4. 訊息(依配對→啟動→結束的時間順序)
58
-
59
- ### 4.1 Site 握手:`site.hello` / `site.ready`
60
-
61
- 方向:`site -> relay`(請求),`relay -> site`(回應)。
62
- 何時發:site 連上 relay 後的第一則訊息,固定此連線的角色為 site。
63
-
64
- | 欄位 | 訊息 | 型別 | 說明 |
65
- |---|---|---|---|
66
- | `type` | 兩者 | `"site.hello"` \| `"site.ready"` | |
67
- | `request_id` | 兩者 | string | site 產生,relay 原樣帶回 |
68
- | `origin` | `site.hello` | string | 這個 site session 代表的網站 origin |
69
- | `site_session_id` | `site.ready` | string | relay 配發,之後 `token.mint` 沿用同一條連線,不需要再帶 |
70
-
71
- #### Fixture: site.hello
72
- ```json
73
- {"type":"site.hello","request_id":"req-site-hello-1","origin":"https://flowpix.app"}
74
- ```
75
-
76
- #### Fixture: site.ready
77
- ```json
78
- {"type":"site.ready","request_id":"req-site-hello-1","site_session_id":"sess-abc123"}
79
- ```
80
-
81
- ### 4.2 Pairing token:`token.mint` / `token.minted`
82
-
83
- 方向:`site -> relay`(請求),`relay -> site`(回應)。
84
- 何時發:site 已完成 `site.hello`,使用者按下「連接 Kenaz」按鈕時。一次性、60 秒 TTL、綁定 `(site_session_id, origin, agent)`;`pair.begin` 一旦處理過這個 token(不論成功失敗)就立刻失效,不能重試。
85
-
86
- | 欄位 | 訊息 | 型別 | 說明 |
87
- |---|---|---|---|
88
- | `type` | 兩者 | `"token.mint"` \| `"token.minted"` | |
89
- | `request_id` | 兩者 | string | |
90
- | `agent` | `token.mint` | `"claude"` \| `"codex"` \| `null` | 選填,網站可預先指定希望用哪個 CLI;`null`/省略表示由 Kenaz 依使用者的 dispatch 設定決定 |
91
- | `token` | `token.minted` | string | 32 hex chars |
92
- | `ttl_s` | `token.minted` | number | 目前固定 60 |
93
-
94
- #### Fixture: token.mint
95
- ```json
96
- {"type":"token.mint","request_id":"req-token-mint-1","agent":null}
97
- ```
98
-
99
- #### Fixture: token.minted
100
- ```json
101
- {"type":"token.minted","request_id":"req-token-mint-1","token":"a1b2c3d4e5f60718293a4b5c6d7e8f90","ttl_s":60}
102
- ```
103
-
104
- site 收到 `token.minted` 後,用第 3 節的格式組出深連結並交給使用者的瀏覽器開啟。
105
-
106
- ### 4.3 Agent 配對:`pair.begin` / `pair.ok` / `pair.denied`
107
-
108
- 方向:`agent -> relay`(請求),`relay -> agent`(回應)。
109
- 何時發:使用者開啟深連結,Kenaz 對外撥線到 `relay=` 指定的 relay,送出 `pair.begin`。`pair.begin` 身兼「這條連線是 agent 角色」的宣告,agent 沒有獨立的 hello 步驟。
110
-
111
- | 欄位 | 訊息 | 型別 | 說明 |
112
- |---|---|---|---|
113
- | `type` | 三者 | `"pair.begin"` \| `"pair.ok"` \| `"pair.denied"` | |
114
- | `request_id` | 三者 | string | |
115
- | `protocol_version` | `pair.begin` | string | 目前 `"1"`。relay/Kenaz 只認識自己支援的版本,不支援就 `pair.denied {code:"protocol_unsupported"}` |
116
- | `token` | `pair.begin` | string | 來自深連結 `token=` |
117
- | `site_origin` | `pair.begin` | string | 來自深連結 `site=`;必須與 token 綁定的 origin 相符 |
118
- | `session_credential` | `pair.ok` | string | 配對成功後的憑證,之後作為網站 MCP 的 Bearer token(見第 7 節) |
119
- | `site_origin` | `pair.ok` | string | 回顯 |
120
- | `error.code` | `pair.denied` | enum | `token_invalid` \| `token_expired` \| `token_already_used` \| `origin_mismatch` \| `relay_unavailable` \| `protocol_unsupported`(見第 6 節) |
121
- | `error.message` | `pair.denied` | string | 人類可讀說明 |
122
-
123
- #### Fixture: pair.begin
124
- ```json
125
- {"type":"pair.begin","request_id":"req-pair-1","protocol_version":"1","token":"a1b2c3d4e5f60718293a4b5c6d7e8f90","site_origin":"https://flowpix.app"}
126
- ```
127
-
128
- #### Fixture: pair.ok
129
- ```json
130
- {"type":"pair.ok","request_id":"req-pair-1","session_credential":"cred-9f8e7d6c5b4a","site_origin":"https://flowpix.app"}
131
- ```
132
-
133
- #### Fixture: pair.denied.token_invalid
134
- ```json
135
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"token_invalid","message":"unknown token"}}
136
- ```
137
-
138
- #### Fixture: pair.denied.token_expired
139
- ```json
140
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"token_expired","message":"token expired 62000ms ago (ttl 60000ms)"}}
141
- ```
142
-
143
- #### Fixture: pair.denied.token_already_used
144
- ```json
145
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"token_already_used","message":"token already used"}}
146
- ```
147
-
148
- #### Fixture: pair.denied.origin_mismatch
149
- ```json
150
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"origin_mismatch","message":"token was issued for https://flowpix.app, request claimed https://evil.example"}}
151
- ```
152
-
153
- #### Fixture: pair.denied.relay_unavailable
154
- ```json
155
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"relay_unavailable","message":"token's site session already disconnected"}}
156
- ```
157
-
158
- #### Fixture: pair.denied.protocol_unsupported
159
- ```json
160
- {"type":"pair.denied","request_id":"req-pair-1","error":{"code":"protocol_unsupported","message":"relay only supports protocol_version 1"}}
161
- ```
162
-
163
- `pair.ok` 成功後,relay 額外對已配對的 site 連線推一則 `agent.connected`(見 4.4)。
164
-
165
- ### 4.4 配對成功通知:`agent.connected`(relay 內部生成,unsolicited)
166
-
167
- 方向:`relay -> site`,unsolicited(`request_id` 為 `null`)。
168
- 何時發:某個 `pair.begin` 剛拿到 `pair.ok`,relay 把這個消息轉告該 token 綁定的 site 連線。
169
-
170
- | 欄位 | 型別 | 說明 |
171
- |---|---|---|
172
- | `type` | `"agent.connected"` | |
173
- | `request_id` | `null` | |
174
- | `agent_session_id` | string | relay 內部的配對識別碼,之後路由 `agent.launch`/`approval.*`/`agent.launched` 等訊息用這個或 origin |
175
-
176
- #### Fixture: agent.connected
177
- ```json
178
- {"type":"agent.connected","request_id":null,"agent_session_id":"agent-sess-1"}
179
- ```
180
-
181
- ### 4.5 狀態推送:`agent.status`(Kenaz -> site,unsolicited)
182
-
183
- 方向:`agent -> relay -> site`,unsolicited。
184
- 何時發:配對成功後立即推一次;之後 Kenaz 的登入狀態或審批模式改變時再推。
185
-
186
- | 欄位 | 型別 | 說明 |
187
- |---|---|---|
188
- | `type` | `"agent.status"` | |
189
- | `request_id` | string(Kenaz 送 uuid,site 忽略即可) | |
190
- | `agents` | object | Kenaz 內部欄位(各 CLI 的安裝/版本資訊),site 可忽略未知子欄位 |
191
- | `dispatch` | object | Kenaz 內部欄位(目前的 dispatch 設定),site 可忽略 |
192
- | `codex_logged_in` | boolean | Codex CLI 是否已登入 |
193
- | `rate_limits` | `null` \| object | 目前一律 `null`(Kenaz 尚無可靠用量來源) |
194
- | `approval_mode` | enum | `"allow_all"` \| `"ask_once"` \| `"deny"`——依該 origin 目前的權限狀態映射:`always → allow_all`、`once → ask_once`、`blocked/unauthorized → deny` |
195
-
196
- #### Fixture: agent.status
197
- ```json
198
- {"type":"agent.status","request_id":"req-status-1","agents":{"claude":{"installed":true,"version":"1.2.3"},"codex":{"installed":true,"version":"0.153.4","logged_in":true}},"dispatch":{"model":"opus","adapter":"claude"},"codex_logged_in":true,"rate_limits":null,"approval_mode":"ask_once"}
199
- ```
200
-
201
- ### 4.6 啟動請求:`agent.launch`(site -> Kenaz,請求)
202
-
203
- 方向:`site -> relay -> agent`。
204
- 何時發:site 想要開啟一個掛著自己 MCP 的 Ansuz 會話時,任何時間點(不限於剛配對完)。
205
-
206
- | 欄位 | 型別 | 說明 |
207
- |---|---|---|
208
- | `type` | `"agent.launch"` | |
209
- | `request_id` | string | site 產生 |
210
- | `prompt` | string | 交給 Ansuz 的起始 prompt |
211
- | `mcp` | string \| `{"name":string,"url":string}` | 選填。網站自己的 MCP 端點;字串形式時 `name` 由 Kenaz 依 origin 自動產生。省略時不預配任何網站 MCP |
212
- | `agent` | `"claude"` \| `"codex"` | 選填。省略時依使用者 dispatch 設定決定 |
213
-
214
- **只有 interactive**:`agent.launch` 一律在 Dashboard 開一個互動終端分頁,注入 Ansuz 人格,沒有 headless、沒有 `mode`、沒有 `cwd`(cwd 固定是 Dashboard 當前專案,網站不可指定,見第 7 節)。這與 Relay v1(A 期)的 `mode:"headless"|"interactive"` 語意不同,是 v0.3 的收斂決定(Q7)。
215
-
216
- #### Fixture: agent.launch
217
- ```json
218
- {"type":"agent.launch","request_id":"req-launch-1","prompt":"在畫布 hero-banner 上新增一個 1024x1024 的角色立繪","mcp":"https://flowpix.app/mcp","agent":"claude"}
219
- ```
220
-
221
- #### Fixture: agent.launch.mcp_object
222
- ```json
223
- {"type":"agent.launch","request_id":"req-launch-2","prompt":"描述目前畫布上的所有節點","mcp":{"name":"flowpix","url":"https://flowpix.app/mcp"}}
224
- ```
225
-
226
- ### 4.7 審批:`approval.pending` / `approval.resolved`
227
-
228
- 方向:`agent -> relay -> site`。
229
- 何時發:Kenaz 收到 `agent.launch` 後,在**做任何事之前**先推 `approval.pending`;使用者在 Kenaz 本機決定後推 `approval.resolved`,兩則共用同一個 `request_id`(與觸發它們的 `agent.launch` 相同)。
230
-
231
- | 欄位 | 訊息 | 型別 | 說明 |
232
- |---|---|---|---|
233
- | `type` | 兩者 | `"approval.pending"` \| `"approval.resolved"` | |
234
- | `request_id` | 兩者 | string | 與 `agent.launch` 相同 |
235
- | `summary` | `approval.pending` | string | 給使用者看的審批卡摘要:origin + prompt 前 120 字 + agent/model + **cwd 絕對路徑**(第 7 節,不可省略) |
236
- | `decision` | `approval.resolved` | `"allow"` \| `"deny"` | 只有這兩個值會上線;「永遠允許」只改 Kenaz 本機的 origin 權限狀態,仍以 `allow` 送出,「封鎖」與「逾時」都送 `deny`(差異由後續的 `agent.unavailable.reason` 承載,不是額外的 decision 值) |
237
-
238
- #### Fixture: approval.pending
239
- ```json
240
- {"type":"approval.pending","request_id":"req-launch-1","summary":"https://flowpix.app — 在畫布 hero-banner 上新增一個 1024x1024 的角色立繪 — claude / opus — cwd: C:\\Users\\user\\Documents\\GitHub\\FlowPixProject"}
241
- ```
242
-
243
- #### Fixture: approval.resolved.allow
244
- ```json
245
- {"type":"approval.resolved","request_id":"req-launch-1","decision":"allow"}
246
- ```
247
-
248
- #### Fixture: approval.resolved.deny
249
- ```json
250
- {"type":"approval.resolved","request_id":"req-launch-1","decision":"deny"}
251
- ```
252
-
253
- ### 4.8 啟動結果:`agent.launched` / `agent.unavailable`
254
-
255
- 方向:`agent -> relay -> site`。
256
- 何時發:`approval.resolved{decision:"allow"}` 之後,Kenaz 實際嘗試開啟終端分頁;成功推 `agent.launched`,CLI 不可用(未安裝、未登入等)推 `agent.unavailable`。`decision:"deny"` 的情況不會有後續訊息——site 從 `approval.resolved{deny}` 本身就知道流程結束。
257
-
258
- | 欄位 | 訊息 | 型別 | 說明 |
259
- |---|---|---|---|
260
- | `type` | 兩者 | `"agent.launched"` \| `"agent.unavailable"` | |
261
- | `request_id` | 兩者 | string | 與 `agent.launch` 相同 |
262
- | `agent` | 兩者 | `"claude"` \| `"codex"` | 實際使用的 CLI |
263
- | `session_id` | `agent.launched` | string | Kenaz 的 pty-server session 識別碼(不是裸 pid——interactive 分頁是 pty session,語意上等於 Relay v1 舊合約 §8 的 `pid`,欄位改名) |
264
- | `reason` | `agent.unavailable` | string | 人類可讀的不可用原因 |
265
-
266
- #### Fixture: agent.launched
267
- ```json
268
- {"type":"agent.launched","request_id":"req-launch-1","agent":"claude","session_id":"pty-sess-42"}
269
- ```
270
-
271
- #### Fixture: agent.unavailable
272
- ```json
273
- {"type":"agent.unavailable","request_id":"req-launch-1","agent":"claude","reason":"claude CLI not logged in"}
274
- ```
275
-
276
- ### 4.9 結束通知:`agent.exited`
277
-
278
- 方向:`agent -> relay -> site`。
279
- 何時發:`agent.launched` 對應的終端分頁 session 結束(使用者關閉分頁、CLI 進程退出等)。
280
-
281
- | 欄位 | 型別 | 說明 |
282
- |---|---|---|
283
- | `type` | `"agent.exited"` | |
284
- | `request_id` | string | 與 `agent.launch`/`agent.launched` 相同 |
285
- | `session_id` | string | 與 `agent.launched.session_id` 相同 |
286
- | `exit_code` | number \| `null` | CLI 進程的退出碼;使用者手動關閉分頁等無明確退出碼的情況為 `null` |
287
-
288
- #### Fixture: agent.exited
289
- ```json
290
- {"type":"agent.exited","request_id":"req-launch-1","session_id":"pty-sess-42","exit_code":0}
291
- ```
292
-
293
- #### Fixture: agent.exited.null_exit_code
294
- ```json
295
- {"type":"agent.exited","request_id":"req-launch-1","session_id":"pty-sess-42","exit_code":null}
296
- ```
297
-
298
- ### 4.10 配對中斷:`agent.disconnected`
299
-
300
- 方向:`relay -> site`,unsolicited(`request_id` 為 `null`)。
301
- 何時發:已配對的 agent 連線關閉(Kenaz 結束、網路中斷等)。site 收到後,狀態讀取(等同 Relay v1 的 `get_kenaz_status()`)應回報 `connected: false`。
302
-
303
- | 欄位 | 型別 | 說明 |
304
- |---|---|---|
305
- | `type` | `"agent.disconnected"` | |
306
- | `request_id` | `null` | |
307
-
308
- #### Fixture: agent.disconnected
309
- ```json
310
- {"type":"agent.disconnected","request_id":null}
311
- ```
312
-
313
- ## 5. 深連結、site_key 與託管 relay(C 期,本檔預留)
314
-
315
- C 期(`dev/KENAZ_AGENT_CONNECT_v1_SPEC.md` 第 5 節)導入託管 relay 與人工發放的 `site_key`:`token.mint` 屆時會新增 `site_key` 欄位,relay 驗 origin 與 key 綁定。B 期(本卡)尚未強制這個欄位——`token.mint` 的 fixture 維持 CONTRACT.md §1–§2 的原始欄位集,`site_key` 留待 C 期落地時補上,不在本卡的 conformance suite 範圍內。
316
-
317
- ## 6. 錯誤碼全集合
318
-
319
- | `error.code` | 出現在 | 意義 |
320
- |---|---|---|
321
- | `token_invalid` | `pair.denied` | 未知或從未發過的 token |
322
- | `token_expired` | `pair.denied` | token 超過 60 秒 TTL |
323
- | `token_already_used` | `pair.denied` | token 已經被消耗過(不論當時成功失敗) |
324
- | `origin_mismatch` | `pair.denied` | `pair.begin.site_origin` 與 token 綁定的 origin 不符 |
325
- | `relay_unavailable` | `pair.denied` | token 綁定的 site session 已斷線 |
326
- | `protocol_unsupported` | `pair.denied` \| 通用 `error` | `protocol_version` 缺失或不支援;或收到已廢止/未知的 `type`(B 期硬切,見下) |
327
- | `payload_too_large` | 通用 `error` | legacy:Relay v1(A 期)的 256 KiB 單幀上限,隨結果不再經 relay 而失去存在理由;relay 若仍對超大幀(例如異常長的 `prompt`)設上限,沿用此碼,非強制 |
328
-
329
- ### `error`(通用,relay -> 發送方)
330
-
331
- 方向:`relay -> sender`(不論 site 或 agent,誰送出有問題的幀就回誰)。
332
- 何時發:收到未知 `type`、或收到已廢止的 Relay v1 型別(`generate_image`/`generate_text`/`result`/`blob.presign`/`blob.presigned`——見下方廢止清單)。**不斷線**,只回這一則錯誤。
333
-
334
- | 欄位 | 型別 | 說明 |
335
- |---|---|---|
336
- | `type` | `"error"` | |
337
- | `request_id` | string \| `null` | 有帶就回顯,沒帶(如未知型別本身缺欄位)就 `null` |
338
- | `error.code` | enum | 見上表 |
339
- | `error.message` | string | |
340
-
341
- #### Fixture: error.protocol_unsupported
342
- ```json
343
- {"type":"error","request_id":"req-legacy-1","error":{"code":"protocol_unsupported","message":"generate_image was removed in protocol v1 — use agent.launch and the site's own MCP tools"}}
344
- ```
345
-
346
- #### Fixture: error.payload_too_large
347
- ```json
348
- {"type":"error","request_id":"req-oversized-1","error":{"code":"payload_too_large","message":"131400 bytes exceeds the relay frame limit"}}
349
- ```
350
-
351
- ## 7. 安全注意事項
352
-
353
- - **配對同意 ≠ 執行同意**:一個 origin 被使用者允許配對(`once` 或 `always`),不代表每一次 `agent.launch` 都自動執行——`approval_mode` 不是 `allow_all` 時,每次 `agent.launch` 都要走一次 `approval.pending`/`approval.resolved`。即使 `allow_all`,Kenaz 仍會在本機記錄一次審批事件供事後稽核;只是不彈窗打斷使用者。
354
- - **cwd 顯示**:`agent.launch` 驅動的 agent 在使用者 Dashboard 當前專案裡有寫入能力——網站的 prompt 內容完全由網站決定,Kenaz 不審核。因此 `approval.pending.summary` **必須**顯示 cwd 絕對路徑,讓使用者在按下允許前知道這次操作會在哪個資料夾裡發生。cwd 本身不可由網站透過 `agent.launch` 或深連結指定,永遠是 Dashboard 目前開啟的專案。
355
- - **Bearer 走 env**:`pair.ok.session_credential` 是之後 MCP 呼叫的 Bearer token。Kenaz 產生的 MCP config 把它放進環境變數(Codex:`bearer_token_env_var`;Claude Code:`--header "Authorization: Bearer <token>"` 由 Kenaz 組出,token 來源仍是環境變數,不落 `config.toml`、不進命令列明文、不寫入任何 log)。網站與 relay 都不會看到這個 token 以外的任何 AI 憑證——Codex/ChatGPT 登入狀態永遠留在使用者本機。
356
- - Relay 只做**配對、轉發、逐幀日誌**;它看不到、也不需要看到 prompt 以外的網站業務資料(生圖結果、寫回內容都走網站自己的 MCP,relay 不轉發)。
357
-
358
- ## 8. 廢止清單(Relay v1 → v1,B 期硬切,無 adapter)
359
-
360
- 以下型別/欄位在 Relay v1(A 期,`history/` 的 FlowPix CONTRACT.md 所定義)曾經存在,v0.3 硬切後**不再支援**。收到這些型別一律回 `error {code:"protocol_unsupported"}`(第 6 節),不做欄位轉換、不斷線:
361
-
362
- | 廢止項目 | 原用途 | 為什麼廢止 |
363
- |---|---|---|
364
- | `generate_image` / `generate_text` | site 請求 Kenaz 生圖/生文 | 網站自己的 MCP 工具處理,不進協定(Q7) |
365
- | `result`(含 `payload`/`error` 形狀) | agent 回傳生成結果 | 沒有 `generate_*` 就沒有對應的 `result`;`agent.launch` 的成敗改用 `agent.launched`/`agent.unavailable`/`agent.exited` 表達 |
366
- | `blob.presign` / `blob.presigned` / `presign_failed` | 大型結果的物件儲存簽章 URL | 結果不再經 relay,presign 失去存在理由 |
367
- | `reference_images` | `generate_*` 的參考圖網址陣列 | 隨 `generate_*` 一併廢止 |
368
- | 256 KiB 單幀上限的「原因」 | 避免大型 base64/result payload 塞爆 relay | payload 已不經 relay;上限本身可能仍存在(見 `payload_too_large`),但存在理由變了 |
369
- | `agent.launch.mode` | 區分 `headless` / `interactive` | 只剩 interactive,欄位移除(Q7) |
370
- | `agent.launch.cwd` | 網站指定工作目錄 | cwd 固定為 Dashboard 當前專案,網站不可指定(Q8) |
371
- | `pair.error`(flat `{request_id,code,message}`) | 配對失敗 | 改為巢狀 `pair.denied {request_id, error:{code,message}}`(D3),本檔第 4.3 節為準 |
372
- | `agent_unavailable`(底線) | CLI 不可用通知 | 正式收編為 `agent.unavailable`(點號,與其他 `agent.*` 型別命名一致) |
373
- | capability envelope(Q3 的 `<site>.<name>` 命名空間提案) | 讓網站自訂能力宣告 | Q7 移除 capability 概念——網站能做什麼完全由它自己的 MCP 決定,Kenaz 不列舉、不審核 |
374
-
375
- ## 9. 參考來源
376
-
377
- - `dev/KENAZ_AGENT_CONNECT_v1_SPEC.md`(v0.3,第 2.3 節與第 6 節「已決定事項」是本檔的直接依據)
378
- - `history/`(FlowPix Relay v1 歷史文件,已被本檔取代,見 `history/README.md`)
379
- - 目前的 Rust 追隨者實作(尚未對齊本檔,TASK_1936 負責):`dashboard/src-tauri/src/features/agent_hub/protocol.rs`、`deep_link.rs`、`relay_client.rs`、`launch.rs`
@@ -1,47 +0,0 @@
1
- # history/ — Relay v1(A 期)歷史來源
2
-
3
- 這個資料夾是 **Kenaz Agent Connect 的前身「Relay v1」** 的原始文件存檔。Relay v1 是 FlowPix(`GameAsset_auto`)與 Kenaz 在 2026-09-07~09-08 之間,透過需求文件與回覆文件來回對帳出來的協定——它的核心是 `generate_image` / `generate_text` / `result` / `blob.presign` 這組「網站請求 Kenaz 生成內容、結果經 relay 回傳」的模型。
4
-
5
- **這一版協定已經被 [`../PROTOCOL.md`](../PROTOCOL.md)(v0.3)取代**。2026-09-08 當天,Kenaz 側用戶收斂了方向:Agent Connect 只標準化 **Web/Agent/Kenaz 三方接口**(網站發起、Kenaz 審批、開啟一個掛著網站 MCP 的 Ansuz 會話),生圖/寫回/結果回傳全部改成網站自己的 MCP 工具,不再進協定、不再經 relay。`generate_image`、`generate_text`、`result`、`blob.presign` 全部廢止(細節見 `PROTOCOL.md` 第 8 節「廢止清單」)。
6
-
7
- 這些文件保留在這裡是為了:
8
- 1. **考古**——理解為什麼 `PROTOCOL.md` 長成現在這樣(哪些欄位是從 Relay v1 直接收編的:`site.hello`/`site.ready`/`token.mint`/`token.minted`/`pair.begin`/`pair.ok`/`pair.denied`/`agent.connected`/`agent.disconnected`;哪些是被砍掉的)。
9
- 2. **溯源**——`site.hello`→`token.mint`→深連結→`pair.begin` 這段配對流程的欄位名稱、TTL、one-time-use 語意,都是直接從這裡的 `FLOWPIX_bridge_CONTRACT.md` §1–§3 抄過去的,不是重新設計。
10
- 3. **不做重複維護**——`FLOWPIX_bridge_CONTRACT.md` 的「Relay v1」章節不再更新;FlowPix 那邊已被通知(見 `KENAZ_RESPONSE_agent-hub_2026-09-08_direction-change-v0.3.md`)把 CONTRACT.md 的 Relay v1 章節改為引用本 repo 的 `PROTOCOL.md`。
11
-
12
- ## 檔案清單(依時間順序)
13
-
14
- | 檔案 | 來源 | 內容 |
15
- |---|---|---|
16
- | `FEATURE_REQUEST_kenaz-agent-hub_2026-09-07.md` | FlowPix | K1–K8 初版需求:深連結、配對、審批 UI、Codex app-server、relay 轉發生成請求等 |
17
- | `KENAZ_RESPONSE_agent-hub_2026-09-07.md` | Kenaz | 對 K1–K8 的初次逐項回覆 |
18
- | `FLOWPIX_REPLY_agent-hub_2026-09-08_relay-v1-answers.md` | FlowPix | 對 Kenaz 09-07 回覆的追問與確認(D 系列問題的第一輪) |
19
- | `FLOWPIX_bridge_CONTRACT.md` | FlowPix | **合約本體**——`bridge/CONTRACT.md`,含 bridge HTTP contract、Agent hub v1(MCP 工具集)、以及本檔最相關的「Relay v1」章節(§Transport、Roles、1. Site handshake ~ 9. Disconnect、Security notes) |
20
- | `FLOWPIX_bridge_agent_relay_client.py` | FlowPix | 假 Kenaz 參考實作(`bridge/agent_relay_client.py`),逐訊息對照合約 |
21
- | `FLOWPIX_spikes_relay_spike_relay.mjs` | FlowPix | relay 原型(`spikes/relay_spike/relay.mjs`),token 一次性/60 秒/綁 origin 的參考行為 |
22
- | `FEATURE_REQUEST_kenaz-agent-hub_2026-09-08_relay-v1-conformance.md` | FlowPix | 回報三道 scheme 閘門擋掉本機開發環境、以及合約欄位漂移(D1–D10) |
23
- | `KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-conformance.md` | Kenaz | 對 D1–D10 的逐項裁定;loopback 開發模式(`KENAZ_AGENT_HUB_DEV=1`)說明 |
24
- | `KENAZ_RESPONSE_agent-hub_2026-09-08_relay-v1-answers-ack.md` | Kenaz | 收到合約本體+假 relay/假 Kenaz 後的三方最終對齊;bearer=session_credential、`agent.launch.mcp` 欄位形狀等細節確認 |
25
- | `KENAZ_RESPONSE_agent-hub_2026-09-08_direction-change-v0.3.md` | Kenaz | **方向收斂通知**——Relay v1 硬切為 v0.3,`generate_*`/`result`/`blob.presign` 全部廢止,改為 `agent.launch` + 網站自己的 MCP |
26
-
27
- 最後四份(`KENAZ_RESPONSE_*` x4)是 Kenaz 這邊發出的回覆,隨 FlowPix 側的三份需求文件與合約本體一起歸檔,方便日後對照「誰在什麼時間點確認了什麼」。
28
-
29
- ## 現況對照
30
-
31
- Relay v1 與 v0.3(`PROTOCOL.md`)的差異全表見 `PROTOCOL.md` 第 8 節「廢止清單」;配對流程(`site.hello` ~ `pair.denied`)在兩版之間沒有變化,`PROTOCOL.md` 第 4.1–4.4 節是直接收編,不是重新設計。
32
-
33
- ## v0.3 → v0.4(TASK_1939,2026-09-08)
34
-
35
- `PROTOCOL_v0.3_snapshot.md`(本資料夾)是 `../PROTOCOL.md` 在 v0.3(WebSocket relay + 配對握手協定)最後一刻的凍結快照。TASK_1939 當天用戶再收斂一次方向(`dev/KENAZ_AGENT_CONNECT_v1_SPEC.md` v0.4 §6 Q10):**relay 整個拿掉**。v0.3 剩下的「喚醒/憑證/狀態回報」三個功能分別由深連結(`kenaz://connect?site=&mcp=&token=`)、網站自己簽發的一次性 token、agent 呼叫網站 MCP 的 `kenaz_hello` 慣例工具取代——不再有 relay、WebSocket、`pair.*`/`agent.status`/`agent.launch`/`approval.*`(線上)/`agent.launched`/`agent.exited`/`error` 這些訊息型別,也不再有 `site.hello`/`token.mint` 這段從 Relay v1 收編來的握手。`../PROTOCOL.md` 現在只描述深連結格式與網站 MCP 的最小約定。
36
-
37
- ## v0.4 上線後的第一輪回報(2026-09-09)
38
-
39
- FlowPix 用真實 Kenaz 0.2.230 把 v0.4 深連結 → 審批卡 → 終端分頁 → `kenaz_hello` 端到端驗通後送來的兩份文件,以及 Kenaz 側的回覆。這輪起 FlowPix 的文件經 Google Drive 傳遞,歸檔時保留原文。
40
-
41
- | 檔案 | 來源 | 內容 |
42
- |---|---|---|
43
- | `DEFECT_REPORT_kenaz-agent-hub_2026-09-09_v0.4-prompt-mojibake.md` | FlowPix | 深連結 `prompt=` 的中文到終端分頁變 Big5 亂碼(ACP 950 環境);FlowPix 端已排除 URL 編碼問題 |
44
- | `KENAZ_RESPONSE_agent-hub_2026-09-09_prompt-mojibake-fixed.md` | Kenaz | 根因:`build_interactive_script` 寫出的 `.ps1` 沒有 UTF-8 BOM,PowerShell 5.1 以 ANSI 解碼內嵌字面值;TASK_1946 加 BOM + CJK 回歸測試(main `177b7f9ce`) |
45
- | `FEATURE_REQUEST_kenaz-agent-hub_2026-09-09_v0.4-session-channel.md` | FlowPix | C 期需求 S1–S5:session header、持續對話慣例 `kenaz_wait_for_message`、輸出串流、結束通知、預設允許網站 MCP 工具 |
46
- | `KENAZ_RESPONSE_agent-hub_2026-09-09_session-channel.md` | Kenaz | 裁定:S1+S5(TASK_1947)與 S2(TASK_1948)先做,S4 其次,S3 獨立評估(見該檔) |
47
- | `KENAZ_RESPONSE_agent-hub_2026-09-09_annotations-install-coldstart.md` | Kenaz | C-1b:`--allowedTools` 改依 tool annotations 分級(TASK_1949,FlowPix 要標 annotations);未安裝落地流程 SDK_GUIDE §10(TASK_1950);冷啟動深連結丟失根因與修復(TASK_1953);三項在 main、尚未出貨 |
@@ -1,65 +0,0 @@
1
- # Bifrost interactive Codex as a peer push target (TASK_2167)
2
-
3
- ## What the launcher does now
4
-
5
- `node .formation/bifrost/launch.js` (interactive path only):
6
-
7
- 1. Picks a free port, starts `codex app-server --listen ws://127.0.0.1:<port>` (loopback only, same env as the TUI:
8
- `KENAZ_PEER_PULL=1`, `KENAZ_CONSOLIDATE_ROOT`, `BIFROST_ADAPTER`), waits (max 15 s) until the ws endpoint accepts.
9
- 2. Starts the normal TUI with the usual flags plus `--remote ws://127.0.0.1:<port>`.
10
- 3. A watcher polls the app-server (`thread/loaded/list`, ranked by `thread/list` `updatedAt` only when several are
11
- loaded) and calls `registerInteractive(projectRoot, wsUrl, threadId, pid)` -> `.kenaz/codex/sessions.json`.
12
- A thread that newly appears (e.g. `/new`) replaces the registered one.
13
- 4. On TUI exit, Ctrl-C, SIGTERM or app-server exit the entry is removed (only this launcher's own entry: matched on
14
- `ws_url` + `pid`) and the app-server child is killed (`taskkill /T` on Windows, own PID only).
15
-
16
- Fallback: if the app-server cannot start or never accepts connections, one line
17
- `peer push unavailable for this session (...)` is printed, the TUI starts exactly as before (no `--remote`) and nothing is registered.
18
-
19
- Code: `.formation/bifrost/shared/codex-appserver.js` (helpers), `launch.js` (`startPushServer`, `launchCodex`).
20
- Test: `node --test dev/specs/peer/codex-push-launcher.test.js` (fake ws app-server; includes the negative control).
21
-
22
- ## Pull vs push (no double delivery)
23
-
24
- `peer_poller.rs` pre-acks rows before a Claude push and, after `wake_codex_session` returns Delivered, sets
25
- `delivered_to_session = 1` on the same rows. The KENAZ_PEER_PULL hook only returns rows with `delivered_to_session = 0`,
26
- so a pushed message is not re-delivered by the pull. If the push fails (no entry, ws down, gate off) nothing is marked and the
27
- pull path delivers as before. The pull path itself is unchanged. Residual race: if the user submits a prompt (pull hook runs)
28
- in the instant between the poller storing a row and the push completing, both could show it; the message body is identical and idempotent to read.
29
-
30
- ## Enabling push for a room (off by default)
31
-
32
- In the project that the Codex session works in, create or edit `.kenaz/peer.yaml`:
33
-
34
- ```yaml
35
- codex_push: true
36
- ```
37
-
38
- The default is and stays `false`; without this line the registry entry is ignored by the Dashboard and behaviour is unchanged
39
- (pull only). What it means: the Dashboard can then call `turn/start` / `turn/steer` on the live Codex session, so an
40
- external peer message can START a turn in a Codex running with `-s danger-full-access -a never` without the user typing anything.
41
- The text is wrapped by `frame_for_codex` and `neutralize_markup` but it is still untrusted input driving a full-access agent.
42
- Enable only for rooms whose peers you trust. Remove the line (or set `false`) to turn it off; no restart of the Codex session needed.
43
-
44
- ## Verification status
45
-
46
- Automated: 7 node tests pass (fake app-server). Live (non-interactive shell): a real `codex app-server` on 127.0.0.1,
47
- `thread/start` + `turn/start` with a codeword -> agent message repeated it; the watcher discovered the thread and removed the entry on stop.
48
-
49
- NOT verified here (needs a human at a terminal, TASK_2141 risk 6): the real TUI attaching with `--remote`, and `/new` re-registration. Steps:
50
-
51
- 1. In the target project set `.kenaz/peer.yaml` `codex_push: true`; Dashboard running.
52
- 2. Run `node .formation/bifrost/launch.js --specialist Ansuz [--project <path>]`; expect the line `push target: app-server ws://127.0.0.1:<port>`.
53
- 3. After the TUI is up, `cat <project>/.kenaz/codex/sessions.json` shows an `interactive` entry with a `thread_id`; send a prompt in the TUI so a turn exists.
54
- 4. From another room send a peer message to this project; while the TUI is idle the Codex should start a turn on its own; while it is mid-turn the text should be steered in. Check it is not repeated by the next hook pull.
55
- 5. Type `/new`, wait ~2 s: `thread_id` in sessions.json changes.
56
- 6. Quit the TUI (or Ctrl-C): the `interactive` entry disappears and no `codex app-server` process for that port remains.
57
-
58
- ## Launcher gate (2026-10-05)
59
-
60
- launch.js enters push-target mode (local app-server + TUI `--remote`) ONLY when the
61
- project's `.kenaz/peer.yaml` has `codex_push: true` (same parser as codex_wake.rs,
62
- `codexPushEnabled` in shared/codex-appserver.js). Rooms that did not opt in keep the
63
- plain TUI, so the experimental `--remote` path is never forced on them. On Node < 22
64
- (no global WebSocket) the launcher prints one line and uses the plain TUI immediately
65
- instead of waiting the 15 s readiness timeout.
@@ -1,54 +0,0 @@
1
- # Codex desktop managed daemon as a peer push target (TASK_2419, field report d200d31d)
2
-
3
- ## Problem
4
-
5
- The Codex desktop "Work" app (codex 0.162.x) talks to a managed `codex app-server` daemon. Kenaz's Bifrost launcher
6
- (`.formation/bifrost/launch.js`, TASK_2167) only registers the ws_url of an app-server it starts itself
7
- (`.kenaz/codex/sessions.json`). With the desktop app nothing is registered, so `/api/peer/status` showed
8
- `delivery_mode=none, sessions=[]` and the poller logged NO_TARGET, although mail was stored and the
9
- UserPromptSubmit `--pull` hook (`codex-hook-shim.js`) does deliver it on the next prompt.
10
-
11
- ## Findings (evidence, codex-cli 0.162.0 on this machine, read-only)
12
-
13
- 1. `codex app-server --help`: `--listen <URL>` accepts `stdio://` (default), `unix://`, `unix://PATH`, `ws://IP:PORT`, `off`.
14
- Subcommands: `daemon` (bootstrap/start/restart/stop/version/enable-remote-control), `proxy` ("Proxy stdio bytes to the
15
- running app-server control socket", `--sock <SOCKET_PATH>`). WS auth flags: `--ws-auth capability-token|signed-bearer-token`,
16
- `--ws-token-file`, `--ws-shared-secret-file` (apply to ws listeners).
17
- 2. The managed daemon is discoverable on disk, no env var needed: `$CODEX_HOME/app-server-control/app-server-control.sock`
18
- (default `~/.codex/app-server-control/`), plus `$CODEX_HOME/app-server-daemon/daemon.pid`, `settings.json`
19
- (`remoteControlEnabled:false`). Both existed here. It is a unix-domain socket (default path), not a ws://host:port.
20
- 3. Protocol (`codex app-server generate-json-schema --out <tmp>`, ClientRequest.json) has the methods needed:
21
- `initialize`, `thread/list`, `thread/loaded/list`, `thread/read`, `thread/resume`, `turn/start`, `turn/steer`,
22
- `turn/interrupt`, `thread/inject_items`. So injection into a thread is possible in principle (the same methods
23
- `codex_wake.rs::deliver_interactive` already uses over ws for launcher-started servers).
24
- 4. Auth on the unix control socket: none visible; access control is filesystem permission of the socket owner.
25
-
26
- ## Why Kenaz does not push into it (decision)
27
-
28
- - Unverified transport: whether the `unix://` listener speaks the same WebSocket framing as `ws://` is not confirmed here
29
- (no daemon was started or connected; real user state must not be touched). `codex_wake.rs` uses `tokio_tungstenite::connect_async`
30
- (TCP ws only); a unix-socket client would be new, and tokio `UnixStream` does not exist on Windows (AF_UNIX there needs another crate).
31
- - Target ambiguity: the desktop app owns many threads; `thread/loaded/list` does not say which one the user is looking at. Guessing
32
- wrongly injects a turn into the wrong conversation.
33
- - Safety: push is deliberately opt-in (`codex_push: true`, user decision 2026-10-02) because an injected turn drives a full-access
34
- agent from untrusted peer text. A socket that any same-user process can drive, with a guessed thread, widens that.
35
-
36
- Conclusion: not supported safely today. Degraded mode is made explicit instead.
37
-
38
- ## What changed
39
-
40
- - `GET /api/peer/status`: when no push/pull session exists but a managed daemon is detected
41
- (`codex_managed_daemon_in`, `peer_delivery_mode.rs`) a session `{agent:"codex", session_id:"codex-managed-daemon",
42
- delivery_mode:"pull-on-prompt"}` is added; `delivery_mode` becomes `pull-on-prompt` with a Codex-specific note
43
- (no push channel; mail arrives on the next prompt via `--pull`; run `node .formation/bifrost/codex-doctor.js`).
44
- `kenaz ygg status` (plugins/kenaz/scripts/ygg.js) relays that mode/note unchanged.
45
- - NO_TARGET log detail (`peer_delivery_state::no_claude_reason`): TASK_2410 had already replaced the misleading
46
- "claude not found on PATH" for Codex nodes; it now says "Codex managed daemon detected: no push channel ... via the --pull hook"
47
- when the daemon is present, instead of "Codex not started via the Kenaz launcher".
48
- - `codex-doctor.js`: `diagnose()` returns `managed_daemon` and adds an informational note (does not fail `ok`).
49
-
50
- ## Possible future push (not done)
51
-
52
- Confirm ws-over-unix framing against a temp `CODEX_HOME` daemon, add a unix transport to `AppServerClient`, require
53
- `codex_push: true`, and pick the thread via an explicit user choice (or the thread whose last hook-shim pull was most recent)
54
- rather than guessing. Until then use the pull path, or start Codex via `launch.js` with `codex_push: true`.