@awak-app/simy-cli 0.7.15 → 0.7.17

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 (121) hide show
  1. package/README.md +225 -98
  2. package/package.json +5 -3
  3. package/src/agent.js +129 -7
  4. package/src/backend-executable.js +7 -6
  5. package/src/bounded-local-task-subtask-pool.js +32 -6
  6. package/src/bounded-local-task-subtasks-contract.js +1 -1
  7. package/src/cli-contract.js +1 -1
  8. package/src/codex-plugins/simy/.codex-plugin/plugin.json +2 -2
  9. package/src/codex-plugins/simy/hooks/README.md +8 -3
  10. package/src/codex-plugins/simy/hooks/delivery-loop.mjs +302 -78
  11. package/src/codex-plugins/simy/hooks/hooks.json +1 -1
  12. package/src/codex-plugins/simy/hooks/loop-kernel/conformance.json +136 -0
  13. package/src/codex-plugins/simy/hooks/loop-kernel/index.mjs +42 -0
  14. package/src/codex-plugins/simy/hooks/loop-kernel/outcome-review.mjs +31 -0
  15. package/src/codex-plugins/simy/hooks/loop-kernel/pin.json +6 -0
  16. package/src/codex-plugins/simy/hooks/loop-kernel/policy.json +141 -0
  17. package/src/codex-plugins/simy/hooks/loop-kernel/task-pool.mjs +34 -0
  18. package/src/codex-plugins/simy/hooks/loop-kernel/work-frontier.mjs +132 -0
  19. package/src/codex-plugins/simy/hooks/loop-kernel.mjs +6 -0
  20. package/src/codex-plugins/simy/hooks/outcome-progress.mjs +16 -5
  21. package/src/codex-plugins/simy/hooks/purpose-completion-contract.mjs +10 -0
  22. package/src/codex-plugins/simy/hooks/purpose-cycle.mjs +12 -11
  23. package/src/codex-plugins/simy/hooks/purpose-evidence.mjs +28 -38
  24. package/src/codex-plugins/simy/hooks/purpose-rule-policy.mjs +1 -2
  25. package/src/codex-plugins/simy/hooks/purpose-rule-review.mjs +5 -63
  26. package/src/codex-plugins/simy/hooks/purpose-search.mjs +21 -4
  27. package/src/codex-plugins/simy/hooks/result-cycle.mjs +166 -0
  28. package/src/codex-plugins/simy/hooks/scene-reasoning.mjs +98 -12
  29. package/src/codex-plugins/simy/hooks/user-experience.mjs +26 -0
  30. package/src/codex-plugins/simy/hooks/work-frontier.mjs +2 -0
  31. package/src/codex-plugins/simy/skills/diagnose/SKILL.md +10 -4
  32. package/src/coding-run-recovery.js +4 -2
  33. package/src/delivery-hooks/claude-workflow.md +10 -7
  34. package/src/delivery-hooks/command.js +76 -10
  35. package/src/delivery-hooks/consistency-monitor.js +20 -4
  36. package/src/delivery-hooks/consult.js +60 -0
  37. package/src/delivery-hooks/diagnosis.js +2 -2
  38. package/src/delivery-hooks/legacy-hook-routing.js +46 -8
  39. package/src/delivery-hooks/local-runtime.js +81 -1
  40. package/src/delivery-hooks/local-supervisor.js +13 -4
  41. package/src/delivery-hooks/repair-continuation.js +80 -0
  42. package/src/delivery-hooks/repair.js +164 -0
  43. package/src/delivery-hooks/supervisor-handover.js +84 -0
  44. package/src/delivery-hooks/supervisor-owner.js +3 -2
  45. package/src/delivery-hooks/supervisor-service.js +38 -6
  46. package/src/delivery-hooks/supervisor-watchdog.js +15 -4
  47. package/src/delivery-hooks/supervisor.js +151 -18
  48. package/src/desktop-access.js +2 -1
  49. package/src/desktop-host.js +35 -2
  50. package/src/durable-local-task-worker.js +372 -58
  51. package/src/execution-capability-contract.js +15 -1
  52. package/src/index.js +3 -3
  53. package/src/local-photos-read.swift +33 -0
  54. package/src/local-photos.js +47 -0
  55. package/src/local-task-attachment-store.js +31 -0
  56. package/src/local-task-destination.js +174 -0
  57. package/src/local-task.js +119 -7
  58. package/src/native-delegation-contract.js +68 -0
  59. package/src/native-provider-identity.js +60 -0
  60. package/src/orchestrator/audit.js +24 -323
  61. package/src/orchestrator/budget.js +22 -11
  62. package/src/orchestrator/charter-validation.js +3 -41
  63. package/src/orchestrator/checklist-continuation.js +2 -14
  64. package/src/orchestrator/completion-contract.js +4 -49
  65. package/src/orchestrator/contract.js +5 -9
  66. package/src/orchestrator/delivery/WORKFLOW.md +30 -710
  67. package/src/orchestrator/delivery/references/acceptance-evidence.md +4 -216
  68. package/src/orchestrator/delivery/references/change-boundary-matrix.md +4 -103
  69. package/src/orchestrator/delivery/references/chrome-user-verification.md +5 -133
  70. package/src/orchestrator/delivery/references/cross-repository-control.md +4 -74
  71. package/src/orchestrator/delivery/references/delivery-levels.md +3 -117
  72. package/src/orchestrator/delivery/references/local-sqm-evidence.md +1 -1
  73. package/src/orchestrator/delivery/references/minimum-completion.md +4 -144
  74. package/src/orchestrator/delivery/references/pr-closure.md +4 -200
  75. package/src/orchestrator/delivery/references/shared-system-specifications.md +4 -161
  76. package/src/orchestrator/delivery/references/state-and-receipts.md +4 -245
  77. package/src/orchestrator/delivery/references/state-model.md +4 -185
  78. package/src/orchestrator/delivery/references/ux-specification.md +4 -95
  79. package/src/orchestrator/delivery-level.js +2 -10
  80. package/src/orchestrator/evidence.js +2 -3
  81. package/src/orchestrator/independent-audit.js +15 -164
  82. package/src/orchestrator/instruction.js +19 -254
  83. package/src/orchestrator/loop.js +35 -95
  84. package/src/orchestrator/outcome-monitor.js +21 -0
  85. package/src/orchestrator/pr-closure.js +2 -16
  86. package/src/orchestrator/recovery.js +32 -2
  87. package/src/orchestrator/ux-specification.js +3 -12
  88. package/src/provider-delegation.js +336 -0
  89. package/src/runner.js +5 -2
  90. package/src/session-supervision/acceptance-reads.js +34 -0
  91. package/src/session-supervision/artifact-observer.js +138 -0
  92. package/src/session-supervision/browser-cdp.js +59 -0
  93. package/src/session-supervision/browser-recovery.js +97 -0
  94. package/src/session-supervision/codex-app-server.js +61 -22
  95. package/src/session-supervision/completion-artifacts.js +44 -0
  96. package/src/session-supervision/consistency-auditor.js +8 -11
  97. package/src/session-supervision/continuation-analysis.js +47 -28
  98. package/src/session-supervision/final-response-recovery.js +5 -0
  99. package/src/session-supervision/index.js +22 -5
  100. package/src/session-supervision/interaction-proxy.js +250 -0
  101. package/src/session-supervision/interaction-task.js +189 -0
  102. package/src/session-supervision/native-interaction.js +102 -0
  103. package/src/session-supervision/provider-failure.js +40 -0
  104. package/src/session-supervision/purpose-instruction.js +14 -14
  105. package/src/session-supervision/purpose-recovery.js +32 -12
  106. package/src/session-supervision/purpose-verification.js +50 -216
  107. package/src/session-supervision/recovery-frontier.js +55 -0
  108. package/src/session-supervision/stop-notifications.js +8 -8
  109. package/src/sqm/agent-skill.js +1 -1
  110. package/src/sqm/checkers.js +12 -6
  111. package/src/sqm/claude-plugin-update.js +22 -8
  112. package/src/sqm/claude-plugin.js +6 -0
  113. package/src/sqm/local-tests.js +2 -1
  114. package/src/sqm/plugin-cache.js +67 -0
  115. package/src/sqm/proof.js +25 -0
  116. package/src/sqm/report.js +1 -0
  117. package/src/sqm/workflow-onboarding.js +3 -39
  118. package/src/sqm/workflow-update.js +17 -6
  119. package/src/startup-preflight.js +2 -20
  120. package/src/team-status-fence-store.js +32 -0
  121. package/src/team-threads.js +457 -0
package/README.md CHANGED
@@ -1,9 +1,39 @@
1
1
  # SIMY CLI
2
2
 
3
+ ### Experimental delegated approval and input bridge
4
+
5
+ `simy delivery interactions proxy --policy-file /absolute/private/policy.json`
6
+
7
+ For a new SIMY-owned task, use `simy delivery interactions run --spec-file /absolute/spec.json`.
8
+ The spec requires a fresh persistent `stateDirectory`; consumed grants are retained.
9
+ Scoped `answerFacts` support rephrased questions through the shared scene-reasoning module.
10
+ Configured browser recovery invokes the shared four-step runtime, checks authorized
11
+ connection alternatives, captures the exact target, and resumes the original thread.
12
+ Unknown connection state remains unconfirmed; see the design for CDP configuration
13
+ and the unverified desktop/browser integration boundaries.
14
+
15
+ The proxy provides an app-server stdio bridge for a host that explicitly delegates matching
16
+ command approvals and questions to SIMY. It replies on the original JSON-RPC
17
+ connection, preserves user responses and cancellation, and distinguishes request
18
+ resolution from operation completion. The policy requires exact thread scope,
19
+ expiry, command/file bindings and use limits, or approved question/answer choices.
20
+ It does not attach to an already-running Codex desktop approval dialog.
21
+ See [the integration design](docs/stop-prevention/delegated-interaction-design.md)
22
+ for configuration, tests and remaining host integration requirements.
23
+
3
24
  ローカルDelivery Loopの0.6.24候補を版固定で実行するには、[ローカル候補版のインストール・実行](docs/local-delivery-runtime.md)を参照してください。
4
25
 
5
26
  Local execution agent for SIMY Local Tasks and Agentic Loop runs.
6
27
 
28
+ To supervise an explicitly requested current goal after a finished Codex run, use
29
+ `simy delivery followup --provider codex --session SESSION_ID --previous-run-id RUN_ID --objective "Current goal and expected result"`.
30
+ It queues read-only reconciliation for the existing persistent supervisor. A new
31
+ goal archives the old run's evidence; the same ordinary `reported_done` goal keeps
32
+ its run identity and budgets while adopting managed outcome verification. Explicit
33
+ stops, opt-out, pending approvals and unknown effects remain in force. This command
34
+ does not install or activate a supervisor, and ordinary prompts never replace a
35
+ finished run automatically. See [runtime operation](docs/local-delivery-runtime.md).
36
+
7
37
  Action candidate search runs once for each authenticated live conversation context,
8
38
  and again when that context changes or **Refresh** is selected. Background binding
9
39
  renewal uses the lightweight binding endpoint instead of repeating candidate search.
@@ -104,9 +134,21 @@ For interrupted Agentic work, `GET /v1/agentic-loop/:id/recovery` provides a
104
134
  read-only objective and checkout fingerprint. Reconcile an uncertain side effect
105
135
  with `POST` to that endpoint (`action: reconcile`, authoritative
106
136
  `operation_status`, `observation`, `evidence_refs`) before resuming. A paused
107
- run retains the legacy metadata endpoint
108
- `POST /v1/agentic-loop/:id/continuation-ceilings` for compatibility. These fields
109
- no longer impose local limits and changing them never resets usage or resumes work. Both routes require the original authorized
137
+ Agentic run retains `POST /v1/agentic-loop/:id/continuation-ceilings` for an
138
+ explicit safety-ceiling extension under the progress policy. Token and retry
139
+ budgets are notification thresholds: they do not interrupt or stop useful work.
140
+ Agentic Loop checks a separate safety ceiling before each new provider call:
141
+ 15,000,000 weighted Provider tokens and 50 executor attempts by default, using
142
+ existing `provider_token_ceiling` and `attempt_ceiling` settings when present.
143
+ The final attempt may still be reviewed if token allowance remains. Active
144
+ processes finish and their results are retained even if usage crosses the ceiling.
145
+ A safety stop preserves run identity, output, usage and approval gates. Review
146
+ remaining work, explicitly extend the relevant ceiling within the existing
147
+ 15M-token/100-attempt validation bounds, then request continuation of the same
148
+ run. A notification-threshold increase alone cannot clear a safety stop; at the
149
+ maximum ceiling, further automatic calls remain blocked. Extension itself never
150
+ resets usage or resumes work. Local Task and managed Delivery behavior is not
151
+ changed by this Agentic safety gate. Both routes require the original authorized
110
152
  account, organization and device throughout the request.
111
153
 
112
154
  ## Provider reconnection and saved consent
@@ -139,6 +181,10 @@ login status, tasks, and updates separately. A Codex login check does not prove
139
181
  that a task can execute successfully; permissions and service availability are
140
182
  checked when work starts.
141
183
 
184
+ When SIMY cannot verify a provider connection or plugin status, the connection
185
+ panel shows **Checking connection status** and **Check again**. Check again
186
+ refreshes the status without changing the saved connection setting.
187
+
142
188
  The sidebar's **Organization** selector is global across Sessions, Tasks and SQM
143
189
  and shows active memberships of the connected SIMY account. Switching is available
144
190
  while work is running and opens browser authorization for the selected organization.
@@ -227,11 +273,13 @@ npm install -g @awak-app/simy-cli
227
273
  simy --daemon
228
274
  ```
229
275
 
230
- When an interactive `simy --daemon` starts without managed SIMY workflows,
231
- the CLI asks once before installing the Codex and Claude Code plugin
232
- sources and Codex/Claude opt-in SQM skills. Existing unrelated plugins
233
- and hooks are preserved. Use `--install-workflows` for explicit non-interactive
234
- installation or `--no-workflow-prompt` to start the daemon without asking.
276
+ When `simy --daemon` starts without managed SIMY workflows, the CLI automatically
277
+ prepares the Codex and Claude Code plugin sources, including in non-interactive
278
+ services. Background maintenance also prepares missing sources and refreshes
279
+ existing enabled plugins. Unrelated plugins and hooks are preserved.
280
+ `--install-workflows` remains available for explicit repair;
281
+ `--no-workflow-prompt` skips initial preparation and background installation of
282
+ missing sources. Provider plugin enablement and hook trust remain provider-owned.
235
283
 
236
284
  SQM checks apply when you explicitly select `@simy`, invoke the SQM skill, or ask to use SQM for the current task. Ordinary PR creation and `git push` do not opt in. Upgrading and restarting the daemon migrates the legacy global PR gate and shipped personal skills; unrelated hooks are preserved. Start a new coding session to reload skill instructions.
237
285
 
@@ -348,27 +396,23 @@ stops, failures and repeated attempts without new verified outcomes, with task
348
396
  identity, agent, reasons and outcome timestamps. Missing evidence is shown as
349
397
  unknown; open time is never counted as productive time. See [work activity](docs/work-activity.md).
350
398
 
351
- Codex work proceeds directly in the current conversation by default. The local
352
- `delivery-loop` and `agentic-delivery-loop` Codex skills are retired and are not
353
- redistributed by workflow updates. If the user explicitly requests SIMY Delivery
354
- Loop, use the CLI Agentic Loop rather than the retired local skill. Installation,
355
- hook trust and ordinary PR creation never authorize starting a loop or SQM.
356
- Internal lifecycle and workspace-lease libraries remain available for existing
357
- explicitly opted-in managed tasks; this packaging change does not start, trust,
358
- resume or reset any task. Quality and PR review skills remain available.
359
- Already open Codex sessions may cache the old skill until a new session starts.
360
-
361
- Claude Code retains its opt-in, hook-based Delivery Loop from an independent
362
- workflow source. Install the plugin, review and enable SIMY hooks with `/hooks`,
363
- then request `/simy:delivery-loop` for the task. Installing or updating the plugin
364
- never approves hook trust. See [hook delivery behavior and limits](docs/delivery-hooks.md).
399
+ The CLI prepares and maintains provider plugin sources automatically. Once the
400
+ user enables the SIMY plugin and permits its hooks, a nonempty prompt starts
401
+ checkpoint tracking in an eligible Codex or Claude conversation. The local Codex
402
+ `delivery-loop` and `agentic-delivery-loop` skills remain retired; prompt hook
403
+ context supplies checkpoint instructions without reinstalling those skills.
404
+ Existing tasks, stops, permission waits and provider/session opt-outs are preserved.
405
+ Use `simy delivery auto off --provider codex` (or `claude`) for a project override.
406
+ Completion in this standard flow is provider-reported, not independently verified.
407
+ See [hook delivery behavior and limits](docs/delivery-hooks.md).
365
408
  The Connection tab checks each provider's actual SIMY plugin inventory and
366
409
  shows installed/enabled, installed/disabled, missing, or unavailable separately
367
410
  from app sign-in. Claude enablement is checked from the home folder; project
368
411
  settings can differ, and project-scoped installations are labeled explicitly.
369
412
 
370
413
  `--no-auto-update` or `SIMY_AUTO_UPDATE=0` disables these background updates too;
371
- `--no-workflow-prompt` only suppresses the initial installation prompt.
414
+ `--no-workflow-prompt` skips initial preparation and background installation of
415
+ missing sources; existing sources still receive updates.
372
416
 
373
417
  This is the recommended installation because the CLI can safely install patch
374
418
  and minor releases, and the daemon restarts only when no Agentic Loop task is active. To run
@@ -884,62 +928,27 @@ organization-wide bundle.
884
928
 
885
929
  ### Minimum functional completion
886
930
 
887
- Every CLI coding-loop promotion now requires a current two-layer observation
888
- matrix: the requested operation and result, plus independently checked final
889
- postcondition and integration. See the [minimum completion contract](src/orchestrator/delivery/references/minimum-completion.md)
890
- for the executable format. Missing mappings, mismatching observations, changed
891
- artifacts or stale revisions block promotion even when the executor reports
892
- success. Independent review checks original-request coverage and the test oracle.
893
-
894
- Existing v2 run history is retained; resumed/rechecked runs need the new evidence.
895
- The same checker ships under `src/orchestrator/delivery/scripts/` in the CLI
896
- package, independent of Codex plugin installation. It does not establish deployment
897
- completion or intercept another host application's final response.
898
-
899
- ### PR closure and user-outcome transfer
900
-
901
- The Web/CLI executor and independent auditor receive the same
902
- [PR closure procedure](src/orchestrator/delivery/references/pr-closure.md).
903
- It requires a revision-bound before/after table, reachable normal-user paths
904
- (including no-workflow fallback), independent review, explicit authority,
905
- pre-close freshness checks and post-close remote reconciliation. A file match or
906
- successor link is not proof of UX inheritance; administrative transfer, approved
907
- retirement and complete inheritance have distinct decisions. Unresolved yellow/red comparison rows require
908
- remediation PRs (or exact existing open equivalents), mapped by criterion ID,
909
- owner and acceptance checks. Uncreated plans or unresolved authority/product
910
- decisions block transfer completion; creating a PR does not make a row green.
911
- Closure is not a new delivery completion state. This is runtime instruction and review guidance,
912
- not a GitHub hook that mechanically intercepts every external close command.
931
+ The coding loop checks the requested result and relevant tests, then repairs actual
932
+ failures. It does not require observation matrices, screenshots, preparation forms,
933
+ selection receipts or a second reviewer. Explicitly requested independent review
934
+ remains supported. See [completion](src/orchestrator/delivery/references/minimum-completion.md).
935
+ Legacy file validators remain available for callers that explicitly use their formats;
936
+ they no longer gate ordinary execution or completion.
937
+
938
+ ### PR closure and continuation
939
+
940
+ Use [PR closure guidance](src/orchestrator/delivery/references/pr-closure.md) to
941
+ preserve authority, current remote identity and useful unfinished work. No comparison
942
+ table or separate review is required. Closing a PR does not prove deployment.
943
+
944
+ Continue useful authorized work through actual checks and repair. Missing documents
945
+ or reference catalog changes do not invalidate a working outcome. User stops,
946
+ permissions, budgets and unknown-effect reconciliation remain enforced. See the
947
+ [state model](src/orchestrator/delivery/references/state-model.md).
913
948
 
914
949
  ### Submit repaired local delivery evidence to SQM
915
950
 
916
- The [integrated delivery state model](src/orchestrator/delivery/references/state-model.md)
917
- connects delivery milestones, repair/wait/resume branches and actual controller
918
- states. Both executor and auditor receive its path. It documents existing control
919
- and evidence duties; it adds no scheduler or transition-enforcement mechanism.
920
-
921
- The bundled Delivery Loop maintains an external acceptance checklist with separate
922
- user-journey and technical-invariant results. It refreshes the table after each
923
- evaluated action and marks evidence pending when the code or runtime context
924
- changes. A non-green table is a checkpoint, not completion: the executor must
925
- perform feasible authorized repairs, missing verification and bounded waits,
926
- then re-observe and update the same criteria until the requested endpoint passes.
927
- A genuine safety, authority, dependency or no-progress stop remains explicitly
928
- unfinished with affected IDs and a concrete resumption condition. No background
929
- monitor is implied. Both executor and independent auditor receive
930
- this continuation contract. The [acceptance evidence guide](src/orchestrator/delivery/references/acceptance-evidence.md)
931
- documents the offline validator shipped inside the CLI runtime. Its result establishes
932
- record completeness and artifact integrity, not overall delivery or deployment.
933
- At the start of each new run, the loop recommends and confirms one of five
934
- [delivery levels](src/orchestrator/delivery/references/delivery-levels.md)
935
- in chat. Level 5 is highest assurance; level 1 is lightest. Every selection or
936
- recommendation shows all five levels (5 to 1), their content and verification scope,
937
- task-specific hour estimates, and the recommended level with its rationale.
938
- Estimates distinguish execution from external waits and state assumptions and
939
- uncertainty; there are no fixed durations by level. Risk-based floors preserve
940
- mandatory assurance. Historical selections retain their numbering version and
941
- meaning. These are executor/auditor instructions, not a new deterministic CLI
942
- selection validator; selecting a level grants no additional authority.
951
+ Submission is optional and is not a condition for finishing a task.
943
952
 
944
953
  `simy sqm submit-evidence --file delivery.json --host https://app-dev.simy.one`
945
954
  submits an explicit bounded summary through your existing organization-bound device
@@ -950,29 +959,16 @@ that an incident or blocking rule has been published.
950
959
 
951
960
  ## Delivery Loop shared specification
952
961
 
953
- UX descriptions throughout the Web/CLI lifecycle follow the
954
- [behavioral-completeness standard](src/orchestrator/delivery/references/ux-specification.md).
955
- Observable interaction units explicitly cover intent/context, entry, perception,
956
- control, response, usable outcome, continuation, alternatives/recovery and evidence.
957
- Independent reconstruction, source coverage, causal continuity, branch closure,
958
- observability and traceability determine sufficient detail, not word counts or
959
- product-specific scenarios. Unknowns remain explicit; compact summaries link to
960
- the complete canonical specification. The same standard is supplied to the actual
961
- executor and independent auditor; it is not an additional automatic schema gate.
962
-
963
- The [Delivery Loop system specification](docs/systems/delivery-loop/README.md)
964
- explains its purpose, As-Is and proposed To-Be through twelve linked views. Keep
965
- these as shared team documents; each change updates affected views and checks
966
- cross-view consistency. The workflow requires independent design, implementation-to-
967
- To-Be and PR reviews, plus explicitly opted-in SQM before and after PR creation.
968
- The [workflow reference](src/orchestrator/delivery/references/shared-system-specifications.md)
969
- explains baseline updates, historical regression coverage and evidence limits.
962
+ Use existing specifications when useful and update materially affected descriptions.
963
+ No twelve-view specification, reconstruction review, traceability matrix or new
964
+ review package is required. Check actual ease, clarity and accuracy using the
965
+ [UX guidance](src/orchestrator/delivery/references/ux-specification.md).
970
966
 
971
967
  ## Purpose-driven automatic continuation
972
968
 
973
969
  The desktop **Continue automatically / 自動で続ける** switch enables purpose-driven
974
- search: hypotheses, research, experiments, minimal implementation and independent
975
- outcome review. Failed methods trigger replanning; review findings return to repair.
970
+ search: research, experiments, minimal implementation and direct outcome checks.
971
+ A separate review is used for semantic inspection or when explicitly requested. Failed methods trigger replanning; review findings return to repair.
976
972
  Independent authorized work can continue while a controller-tracked operation waits.
977
973
  The existing Codex auto-continue switch enables read-only diagnosis for uncertain or
978
974
  information-waiting conversations, then assessed work. No default time/turn cap is
@@ -1088,8 +1084,9 @@ that explicitly activated candidate when no live desktop owns the state director
1088
1084
  A live unknown/mismatched owner is preserved and reported. `runtime doctor` reports
1089
1085
  expected versus observed host identity, the all-state consistency monitor, and
1090
1086
  remaining task findings. `runtime legacy-hooks` routes only the exact shipped
1091
- 0.6.23/0.6.24 Codex hook entrypoints to the verified pin, retaining originals;
1092
- customized hooks and trust settings remain unchanged. `runtime workflows` refreshes
1087
+ 0.6.23/0.6.24 and commit 2052e787 Codex hook entrypoints to the verified pin.
1088
+ All exported helpers use that pin too; saved originals are never imported as
1089
+ a fallback. Customized hooks are reported as `customized_retained`. `runtime workflows` refreshes
1093
1090
  existing provider workflows without enabling them.
1094
1091
 
1095
1092
  `runtime doctor` also returns `taskReadiness` for every existing task: its original
@@ -1168,7 +1165,11 @@ unverified original model nor a different provider is substituted automatically.
1168
1165
 
1169
1166
  ### Manually consult SIMY about a stopped task
1170
1167
 
1171
- Ask “SIMY CLIに相談して” in Codex to use the `simy:diagnose` skill. Supply the original session/task ID when asking from another chat. A terminal can use the same entry even when the original conversation is unresponsive:
1168
+ Ask “SIMY CLIに相談して” or “原因を調べて” in Codex to use the `simy:diagnose` skill for diagnosis only. “直して続きを進めて” explicitly requests repair and continuation within existing permissions. The skill resolves the current conversation or an existing selected/original job reference; from another chat, select the original job or refer to its conversation. Only an ambiguous target requires clarification, and users normally do not need to type internal IDs.
1169
+
1170
+ The skill calls `delivery consult --scope diagnose` or `delivery consult --scope repair_continue --request-id USER_TURN_ID`. It preserves the chosen `--host`. Explicit references override existing selection, which overrides the observed current conversation; a missing or mismatched reference never redirects to another job. Repair delegates to the installed repair adapter, preserving stop, permission, budget and duplicate-work protections. If that adapter is absent, `recovery_unavailable` means no recovery was executed. Repair success is not original-task completion. See [the shared contract](docs/conversation-recovery-contract.md).
1171
+
1172
+ For terminal use and older CLIs, the read-only diagnosis command remains available even when the original conversation is unresponsive:
1172
1173
 
1173
1174
  ```sh
1174
1175
  ~/.simy/bin/simy delivery diagnose --provider codex --session ORIGINAL_SESSION --task-id ORIGINAL_TASK
@@ -1186,6 +1187,103 @@ Default issue selection is the first eight original acceptance criteria (or `obj
1186
1187
 
1187
1188
  Manual diagnosis and delivery reasoning share the scoped SQM knowledge loader. Partial environment overrides cannot mix a token, account, organization or endpoint with saved credentials; unavailable knowledge is reported without blocking the diagnosis. The brief response retains `knowledge.status`, `reason`, `suppliedCount`, and `bundleDigest`, separately from `knowledgeReferenceCount` and test execution (always zero for diagnosis). Truncated evidence is disclosed to both the analyst and the caller.
1188
1189
 
1190
+ ### Local Task delivery to an authorized device folder
1191
+
1192
+ A single-invocation, repository-write durable Local Task can include
1193
+ `execution_spec.local_destination`:
1194
+
1195
+ ```json
1196
+ {
1197
+ "device_id": "paired-device-id",
1198
+ "repository": "Organization/repository",
1199
+ "relative_directory": "deliverables"
1200
+ }
1201
+ ```
1202
+
1203
+ The repository must match the execution workspace and resolve through the CLI's
1204
+ existing authorized repository inventory. Alternatively, an explicitly delegated
1205
+ native Codex task may specify `authorized_root` instead of `repository`. That
1206
+ absolute directory must be within the existing native session's verified cwd or
1207
+ `sandbox.writableRoots`; the native adapter reports these roots after verifying
1208
+ current account, model, workspace and existing permissions. No new grant is made.
1209
+ The directory must already exist. Read-only tasks and stepped execution do not
1210
+ support delivery. A folder outside existing native roots must be selected through
1211
+ the original provider's workspace permission flow; a repository scan alone does
1212
+ not authorize arbitrary folder writes.
1213
+
1214
+ The worker verifies current output bytes, publishes each file without replacing
1215
+ existing files, and checks size, SHA-256 and path identity through local readback.
1216
+ An identical existing file is a safe replay; a different revision is preserved and
1217
+ delivery fails. Only verified local receipts are persisted in the private task
1218
+ snapshot; the original turn's result summary includes confirmed paths. A folder
1219
+ save is not a claim that an office application rendered or opened the file.
1220
+
1221
+ Offline claims are left to the existing durable lease/reconnect path; no local
1222
+ success or alternate device fallback is synthesized. Stop/lease checks also apply
1223
+ before file publication. Multiple file delivery may be partial if a later file
1224
+ fails; the turn does not report success in that case. Existing local outputs are
1225
+ kept for reconciliation without rerunning an uncertain provider operation.
1226
+
1227
+ Cloud inputs continue through the existing verified attachment store and outputs
1228
+ through the existing artifact contract. This contract does not advertise native
1229
+ browser/Photos automation: `browser_capability` remains unknown until an actual
1230
+ adapter is observed. It does not substitute a server browser for the owner's
1231
+ logged-in browser or grant authority to submit payment/card forms.
1232
+
1233
+ The same destination is accepted on the existing native
1234
+ `POST /v1/local-tasks/start` body as `local_destination`. It is included in the
1235
+ request fingerprint, checked before the native turn, and saved before terminal
1236
+ success. Reconcile returns the same Local Task, original conversation identity
1237
+ and verified destination receipts. A changed destination under the same request
1238
+ key conflicts instead of running another native turn. Direct repository tasks
1239
+ use the same private, ignored output folder layout as durable repository tasks,
1240
+ so outputs stay inside existing native workspace permissions.
1241
+
1242
+ Optional `local_photo_source: {device_id, asset_ids}` is a bounded PhotoKit
1243
+ metadata source for 1–20 explicitly selected asset identifiers. The local adapter
1244
+ requires existing Swift developer tooling (and never launches its installer),
1245
+ checks current Photos authorization, never requests permission or enumerates
1246
+ the library, and returns only selected IDs, dimensions, date and location. It
1247
+ does not export images or claim visual photo recognition. Missing authorization
1248
+ or unavailable selected IDs holds the work before provider invocation; users can
1249
+ supply the photo through the existing attachment flow. No native Photos or
1250
+ browser capability is inferred for a generic model. PhotoKit source reference:
1251
+ [PHPhotoLibrary](https://developer.apple.com/documentation/photos/phphotolibrary).
1252
+
1253
+ Owner-browser execution uses Crew's existing `browser_action` capability and
1254
+ paired Chrome extension queue, independently of CLI/native model execution.
1255
+ P10's companion browser change adds explicit `device_id` and an optional
1256
+ `interaction_scope: "observe_only"` that permits only observation primitives in
1257
+ an existing tab. It cannot type into card fields, click or submit. Its original
1258
+ queue task/device/deadline and result are retained across offline re-entry.
1259
+
1260
+ When the result gateway is offline after file delivery, the existing private task
1261
+ snapshot retains the exact terminal receipt. The same paired device retries only
1262
+ that receipt on reconnect/restart, preserving the original turn and files. It
1263
+ does not claim a new task or re-invoke the provider. A fenced lease remains
1264
+ unconfirmed and never becomes permission to replay the work.
1265
+
1266
+
1267
+ For a paired native Codex write, `workspace_mode: task_sandbox` remains artifact
1268
+ management metadata. It does not move the selected native conversation. After
1269
+ current account/model/cwd/sandbox and lease checks, the CLI places the execution's
1270
+ private output directory under that verified native cwd at
1271
+ `.simy/local-tasks/<execution-id>/outputs` and rebuilds the provider instruction.
1272
+ Both generation and final destination therefore stay inside existing native
1273
+ write permissions. No new sandbox root or cwd override is sent to the provider.
1274
+ Readonly native tasks and Claude's ordinary permission flow do not acquire this
1275
+ Codex-specific writable-root capability.
1276
+
1277
+ Web/Backend admission must preserve the optional destination and selected Photos
1278
+ request in the existing canonical native execution spec and request hash, pinned
1279
+ to the same selected paired device. These fields express intent; no `verified`
1280
+ flag, path in model context, previous receipt or old native root is a grant.
1281
+ Every new execution rechecks current device/account/link/session/lease and actual
1282
+ native roots or PhotoKit authorization. Follow-up preserves the chosen profile;
1283
+ a changed destination requires a fresh explicit admission, never a rewrite of an
1284
+ already-used request key. Revisions use the explicitly requested new artifact
1285
+ name; another revision already present at the same path is preserved and held.
1286
+
1189
1287
  Provider diagnostics distinguish `authentication`, `connection`, and `connection_ready`.
1190
1288
  If both login and SIMY connection are missing, `actions` lists both remedies in one
1191
1289
  report. Connection readiness does not certify model access or task completion.
@@ -1219,3 +1317,32 @@ Search covers the current recent window (up to 200 active conversations and,
1219
1317
  with `--include-archived`, up to 200 archived conversations); older entries outside
1220
1318
  that window are not searched. This view respects the saved
1221
1319
  Codex provider connection setting and never enables automatic continuation.
1320
+
1321
+ The existing per-provider heartbeat now includes `device_io` with
1322
+ `schema_version: local_device_io.v1`. It distinguishes Codex verified native-cwd
1323
+ staging/root delivery, Claude's provider permission flow, and selected Photos
1324
+ metadata requiring existing macOS authorization. It contains no paths or grants;
1325
+ normal provider/device readiness and runtime reauthorization still apply.
1326
+ The ordinary worker also sends `X-SIMY-Device-IO: local_device_io.v1` with its
1327
+ existing native protocol header. Web/gateway should preserve this marker and
1328
+ Backend should require it at claim/invocation when a destination/Photos profile
1329
+ is requested, so an old worker cannot silently ignore those required outputs.
1330
+
1331
+ ### Delivery entry routes
1332
+
1333
+ Crew owns `sessionLoopOptions` in the distributed loop kernel. Codex enrollment,
1334
+ Continue, follow-up, desktop controls and automatic continuation use purpose v2
1335
+ by default; old false/v1 enrollment flags cannot select the retired mode.
1336
+ Explicit strict/balanced policies and human acceptance criteria remain binding.
1337
+ Compatible saved tasks migrate without replacing identity, history or budget.
1338
+
1339
+ `~/.simy/bin/simy` is the installed CLI entry. Point any earlier shell alias or
1340
+ PATH symlink to it. `runtime legacy-hooks` switches known installed plugin caches
1341
+ to the same pin; check its output for customized hooks that still need review.
1342
+ `runtime supervisor-watchdog-install` registers the stable Node entry
1343
+ `~/.simy/bin/simy-runtime.mjs`, which resolves the verified runtime pin on each
1344
+ process start, instead of retaining a release-specific service path.
1345
+ When supervision is already live, install the candidate, request
1346
+ `runtime supervisor-handover --release ABSOLUTE_RELEASE`, and wait for activation.
1347
+ The watcher preserves the live supervisor while service registration is updated.
1348
+ No command here enrolls an unrelated conversation or renews an existing budget.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awak-app/simy-cli",
3
- "version": "0.7.15",
3
+ "version": "0.7.17",
4
4
  "description": "Local SIMY executor for non-coding Local Tasks and Agentic Loop runs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,7 +43,7 @@
43
43
  "check:auto-update": "node --check ./src/auto-update.js && node --check ./scripts/auto-update-e2e.js && npm run check:sqm",
44
44
  "check:workflow-observation-sender": "node --check ./src/workflow-observation-sender.js",
45
45
  "check:sqm": "node --check ./src/sqm/advisory-guidance.js && node --check ./src/sqm/canonical.js && node --check ./src/sqm/validation.js && node --check ./src/sqm/reliability.js && node --check ./src/sqm/repository.js && node --check ./src/sqm/checkers.js && node --check ./src/sqm/bundle-store.js && node --check ./src/sqm/proof.js && node --check ./src/sqm/evidence-client.js && node --check ./src/sqm/session.js && node --check ./src/sqm/index.js && node --check ./src/sqm/command.js && node --check ./src/sqm/agent-skill.js && node --check ./src/sqm/workflow-onboarding.js && node --check ./src/sqm/workflow-update.js && node --check ./src/sqm/history-store.js && node --check ./src/sqm/review-worker.js && node --check ./scripts/sqm-complete-loop-e2e.js && node --check ./scripts/sqm-local-review-e2e.js",
46
- "check:real-provider-syntax": "node --check ./scripts/real-codex-probe.js && node --check ./scripts/real-claude-probe.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/claude-parity-runtime-e2e.js && node --check ./scripts/claude-plugin-runtime-e2e.js",
46
+ "check:real-provider-syntax": "node --check ./scripts/real-codex-probe.js && node --check ./scripts/real-claude-probe.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/claude-parity-runtime-e2e.js && node --check ./scripts/claude-plugin-runtime-e2e.js && node --check ./scripts/codex-plugin-runtime-e2e.js",
47
47
  "check:syntax": "node --check ./src/purpose-local-proof.js && node --check ./src/device-signing-identity.js && node --check ./src/index.js && node --check ./src/install-update.js && node --check ./src/agent.js && node --check ./src/connection-discovery.js && node --check ./src/connection-diagnostics.js && node --check ./src/launch-authorization.js && node --check ./src/codex-plugins/simy/hooks/connection-reminder.mjs && node --check ./src/codex-plugins/simy/hooks/dev-work.mjs && node --check ./src/dev-work-events.js && node --check ./src/browser.js && node --check ./src/web-api.js && node --check ./src/durable-local-task-worker.js && node --check ./src/durable-local-task-steps-contract.js && node --check ./src/bounded-local-task-subtasks-contract.js && node --check ./src/bounded-local-task-subtask-pool.js && node --check ./src/local-task-artifact-contract.js && node --check ./src/execution-capability-contract.js && node --check ./src/shutdown.js && node --check ./src/run-registry.js && node --check ./src/direct-executor.js && node --check ./src/execution-guardrail.js && node --check ./src/backend-executable.js && node --check ./src/login-shell-path.js && node --check ./src/hook-runtime.js && node --check ./src/provider-stream.js && node --check ./src/console/index.js && node --check ./src/console/app.js && node --check ./src/console/commands.js && node --check ./src/local-attachments.js && node --check ./src/repository-inventory.js && node --check ./src/session-store.js && node --check ./src/web-origin.js && node --check ./src/workspace-context.js && node --check ./src/orchestrator/index.js && node --check ./src/orchestrator/shared.js && node --check ./src/orchestrator/recovery.js && node --check ./src/orchestrator/risk.js && node --check ./src/orchestrator/contract.js && node --check ./src/orchestrator/completion-contract.js && node --check ./src/orchestrator/pr-preparation.js && node --check ./src/orchestrator/minimum-completion.js && node --check ./src/orchestrator/delivery/scripts/check-minimum-completion.mjs && node --check ./src/orchestrator/instruction.js && node --check ./src/orchestrator/problem-solving.js && node --check ./src/orchestrator/budget.js && node --check ./src/orchestrator/execution-io.js && node --check ./src/orchestrator/presentation.js && node --check ./src/orchestrator/result.js && node --check ./src/orchestrator/retry.js && node --check ./src/orchestrator/evidence.js && node --check ./src/orchestrator/independent-audit.js && node --check ./src/orchestrator/audit.js && node --check ./src/orchestrator/loop.js && node --check ./src/runner.js && node --check ./src/coding-run-store.js && node --check ./scripts/fixtures/completion-contract-fixture.js && node --check ./scripts/fixtures/fake-coding-backend.js && node --check ./scripts/e2e-terminal-evidence.js && node --check ./scripts/audit-gate-e2e.js && node --check ./scripts/completion-contract-e2e.js && node --check ./scripts/retry-circuit-e2e.js && node --check ./scripts/follow-up-charter-e2e.js && node --check ./scripts/task-routing-e2e.js && node --check ./scripts/executor-version-preflight-e2e.js && node --check ./scripts/blocked-recovery-e2e.js && node --check ./scripts/process-localization-e2e.js && node --check ./scripts/hypothesis-retries-e2e.js && node --check ./scripts/budget-enforcement-e2e.js && node --check ./scripts/local-task-default-workspace-e2e.js && node --check ./scripts/local-task-idempotency-e2e.js && node --check ./scripts/console-e2e-fixture.js && node --check ./scripts/console-e2e.js && node --check ./scripts/console-recovery-e2e-fixture.js && node --check ./scripts/console-recovery-e2e.js && node --check ./scripts/real-provider-console-fixture.js && node --check ./scripts/real-provider-console-e2e.js && node --check ./scripts/fullstack-cli-smoke.js && node --check ./scripts/check-package-contents.js && node --check ./src/codex-plugins/simy/hooks/delivery-loop.mjs && node --check ./src/delivery-hooks/command.js && node --check ./src/delivery-hooks/desktop.js && node --check ./src/delivery-hooks/supervisor.js && node --check ./src/delivery-hooks/recovery.js && node --check ./src/delivery-hooks/supervisor-owner.js && node --check ./src/delivery-hooks/supervisor-watchdog.js && node --check ./src/delivery-hooks/supervisor-service.js && node --check ./scripts/supervisor-watchdog-live-e2e.js && node --check ./src/codex-plugins/simy/hooks/recovery-incident.mjs && node --check ./src/session-supervision/automatic-continuation.js && node --check ./src/session-supervision/stop-notifications.js",
48
48
  "check:package": "node ./scripts/check-package-contents.js",
49
49
  "build:macos-installer:dev": "bash packaging/build-macos-arm64.sh --unsigned-dev",
@@ -52,6 +52,7 @@
52
52
  "build:macos-installer:production": "bash packaging/build-macos-arm64.sh --production",
53
53
  "test:e2e:claude-parity": "node ./scripts/claude-parity-runtime-e2e.js",
54
54
  "test:e2e:claude-plugin": "node ./scripts/claude-plugin-runtime-e2e.js",
55
+ "test:e2e:codex-plugin": "node ./scripts/codex-plugin-runtime-e2e.js",
55
56
  "test:e2e:flexible-delivery": "node --test --test-name-pattern=\"flexible prototype\" test/purpose-search.test.js",
56
57
  "test:e2e:sqm-faults": "node ./scripts/sqm-complete-loop-e2e.js"
57
58
  },
@@ -75,7 +76,8 @@
75
76
  "ink": "^6.8.0",
76
77
  "pdf-lib": "^1.17.1",
77
78
  "pngjs": "^7.0.0",
78
- "react": "^19.2.0"
79
+ "react": "^19.2.0",
80
+ "ws": "^8.22.0"
79
81
  },
80
82
  "devDependencies": {
81
83
  "@xterm/headless": "^6.0.0",