@zq-silk/yui 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +42 -23
  2. package/dist/cli/commandCatalog.js +234 -122
  3. package/dist/cli/completion.js +3 -3
  4. package/dist/cli/helpRenderer.js +3 -0
  5. package/dist/cli/interactionPolicy.js +44 -23
  6. package/dist/cli/interactiveSelection.js +1 -1
  7. package/dist/cli/invocationRouter.js +1 -1
  8. package/dist/cli/roleWizard.js +8 -8
  9. package/dist/cli.js +116 -72
  10. package/dist/commands/agentCommands.js +5 -5
  11. package/dist/commands/configCommands.js +351 -104
  12. package/dist/commands/configOverview.js +60 -0
  13. package/dist/commands/deliveryGuardPreflight.js +2 -2
  14. package/dist/commands/globalRoleCommands.js +9 -9
  15. package/dist/commands/profileCommands.js +8 -8
  16. package/dist/commands/resourcesCommands.js +6 -5
  17. package/dist/commands/taskCommands.js +3 -6
  18. package/dist/commands/taskRoleRuntimeStatus.js +3 -1
  19. package/dist/commands/telemetryCommands.js +11 -6
  20. package/dist/config/configCatalog.js +42 -0
  21. package/dist/config/yuiConfig.js +80 -35
  22. package/dist/context/sessionBootstrapManifest.js +1 -1
  23. package/dist/controller/clientRuntime.js +0 -2
  24. package/dist/controller/controller.js +21 -9
  25. package/dist/controller/fileSchedulerStoreAdapter.js +20 -9
  26. package/dist/controller/runtime.js +32 -18
  27. package/dist/coordination/workMailbox.js +25 -22
  28. package/dist/doctor/doctor.js +2 -2
  29. package/dist/resources/autoResourceGc.js +3 -1
  30. package/dist/review/reviewConfig.js +0 -2
  31. package/dist/run/providerRetry.js +29 -16
  32. package/dist/run/providerRetryConfig.js +5 -3
  33. package/dist/runtime/launchDiagnostics.js +1 -1
  34. package/dist/scheduler/roleRunStall.js +12 -9
  35. package/dist/setup/setupCommand.js +153 -492
  36. package/dist/storage/compatibleTaskStore.js +9 -5
  37. package/dist/storage/migration/productionRegistry.js +58 -0
  38. package/dist/storage/sqliteStore.js +9 -2
  39. package/dist/storage/taskStore.js +21 -2
  40. package/dist/telemetry/sqliteTelemetryStore.js +9 -1
  41. package/dist/telemetry/telemetryConfig.js +1 -18
  42. package/dist/telemetry/telemetryStore.js +2 -2
  43. package/dist/telemetry/telemetryWiring.js +6 -5
  44. package/dist/web/webSnapshot.js +5 -3
  45. package/i18n/README.zh-CN.md +37 -32
  46. package/package.json +1 -1
  47. package/skills/yui-leader/SKILL.md +12 -5
  48. package/skills/yui-operator/SKILL.md +44 -6
  49. package/skills/yui-runtime/SKILL.md +1 -1
package/README.md CHANGED
@@ -21,21 +21,37 @@ yui setup
21
21
  yui doctor
22
22
  ```
23
23
 
24
- `setup` is interactive. It detects installed Agent CLIs, asks which Agents to configure, selects the default and Operator Agent, and probes each selected CLI for its current models. It configures the Leader and Operator, then explains that the global Worker configuration is copied into new Task Roles and asks whether Worker should reuse Leader or be configured separately. Model selection is followed by that model's supported reasoning efforts. Setup also confirms the Project workspace outside Yui home and offers shell-completion setup. The picker includes the native CLI default and a custom-value option. Running setup again preserves existing Tasks, Roles, and the installation's Project workspace while allowing safe configuration changes. A successful setup ensures the current Home's detached Controller is running before it returns.
25
-
26
- Model and effort are per-Agent Role settings, so Operator, Leader, and the global Worker can use different values even when they share an Agent CLI. Interactive Role flows validate those settings against the selected Agent runtime. Worker Profile model and effort fields are provider-neutral child-execution hints and therefore remain explicit, scriptable values rather than Agent capability selections.
27
-
28
- Setup gives every managed Agent binding the explicit `bypass` permission
29
- strategy. Later Role updates may select `default`, `bypass`, or `configured`;
30
- the last choice exposes that adapter's native permission enums and tool rules.
31
-
32
- Runtime catalogs are refreshed per command and cached under Yui home. If a live probe times out or fails, Yui shows the last cache for the same Agent launch context and clearly marks it as potentially stale; without a matching cache, it offers CLI defaults and custom values. `yui agent capabilities <id>` exposes the same one-pass catalog, including models, model-specific efforts, and other runtime choices such as permissions, search availability, profiles, settings sources, and service tiers.
24
+ `setup` is intentionally minimal. It verifies tmux, reuses or creates one
25
+ available Agent, creates the default workspace outside Yui home, and configures
26
+ both Operator and Leader so the user can start Yui and execute Tasks. It does
27
+ not create Worker, Reviewer, Profile, or review-policy configuration, and does
28
+ not ask for model/effort, permission, or shell completion. The required
29
+ Operator and Leader bindings use Yui's adapter default permission strategy
30
+ (`bypass`); further changes belong under `config role`. Running setup again
31
+ preserves already usable Operator and Leader Roles. A successful setup starts
32
+ the current Home's detached Controller before it returns.
33
+
34
+ All persistent configuration is under `yui config`. `config show` reports the
35
+ complete effective state, while `config --help` introduces each domain and
36
+ shows examples. The Operator can read the same structured catalog with
37
+ `config describe`, explain current values, effects, choices, and activation
38
+ behavior, then apply only changes the user confirms.
39
+
40
+ Durable settings are grouped by responsibility: `config system` for Home
41
+ defaults and presentation, `config runtime` for Controller health, concurrency,
42
+ launch, delivery, and Provider retry, `config workflow` for Leader/context/review
43
+ policy, `config resources` for quarantine and GC, and `config tools` for tmux
44
+ and diagnostic telemetry. Configured Agents, global Roles, Profiles, and shell
45
+ completion remain the sibling `config agent|role|profile|completion` domains.
46
+ Use `show`, `set`, and `clear` consistently within each durable-settings domain.
47
+
48
+ Runtime catalogs are refreshed per command and cached under Yui home. If a live probe times out or fails, Yui shows the last cache for the same Agent launch context and clearly marks it as potentially stale; without a matching cache, it offers CLI defaults and custom values. `yui config agent capabilities <id>` exposes the same one-pass catalog, including models, model-specific efforts, and other runtime choices such as permissions, search availability, profiles, settings sources, and service tiers.
33
49
 
34
50
  `completion` is also interactive, with or without an explicit shell:
35
51
 
36
52
  ```sh
37
- yui completion
38
- yui completion zsh
53
+ yui config completion
54
+ yui config completion zsh
39
55
  ```
40
56
 
41
57
  Both forms confirm the generated script, installation path, and shell startup-file change. The installed completion is generated from the command catalog, including nested subcommands.
@@ -214,7 +230,8 @@ record-schema change, the integrating branch must supply the complete adjacent
214
230
  path (including an explicit `0->1` introduction for a new family) and re-test to
215
231
  convergence.
216
232
 
217
- Setup also seeds four reusable Worker Profiles:
233
+ Yui provides four reusable Worker Profile definitions through
234
+ `yui config profile reset`; minimum setup leaves them unconfigured:
218
235
 
219
236
  ```text
220
237
  worker explorer implementer reviewer
@@ -270,16 +287,16 @@ timezone with:
270
287
 
271
288
  ```sh
272
289
  yui config show
273
- yui config set time-zone Europe/London
290
+ yui config system set time-zone Europe/London
274
291
  ```
275
292
 
276
293
  WorkItem review is one global, optional rule that reuses an existing Global
277
294
  Role's Agent, model, permissions, prompt, and Skills:
278
295
 
279
296
  ```sh
280
- yui config set review --role reviewer --trigger always
297
+ yui config workflow set review --role reviewer --trigger always
281
298
  yui config show
282
- yui config clear review
299
+ yui config workflow clear review
283
300
  ```
284
301
 
285
302
  For Project-backed software delivery, use `--trigger final` to keep WorkItem
@@ -287,7 +304,7 @@ acceptance and Integration independent and run one fresh ReviewRound over the
287
304
  complete frozen integrated Task candidate before completion:
288
305
 
289
306
  ```sh
290
- yui config set review --role reviewer --trigger final
307
+ yui config workflow set review --role reviewer --trigger final
291
308
  ```
292
309
 
293
310
  Every result entering Leader acceptance is one explicit candidate on its
@@ -467,7 +484,7 @@ Create a Task-bound Worker instance from the configured global Worker, apply a
467
484
  Profile, and dispatch a WorkItem:
468
485
 
469
486
  ```sh
470
- yui role show worker
487
+ yui config role show worker
471
488
  yui task role add <task-id> implementer --profile implementer
472
489
  yui task role show <task-id> implementer
473
490
 
@@ -538,7 +555,7 @@ yui task work create <task-id> "Review the implementation" \
538
555
  --objective "Return source-backed findings" \
539
556
  --accept "Every finding identifies an affected path"
540
557
  yui task work update <task-id>/<work-item-id> running
541
- yui profile show reviewer
558
+ yui config profile show reviewer
542
559
  ```
543
560
 
544
561
  Subagent creation and result delivery happen inside the Leader's native Agent
@@ -686,7 +703,7 @@ entry is read-only unless `--read-write` is requested, preventing observation
686
703
  from changing Agent execution.
687
704
 
688
705
  ```sh
689
- yui role enter <global-role>
706
+ yui session enter <global-role>
690
707
  yui task enter <task-id> [role] [--read-only | --read-write]
691
708
  yui task role enter <task-id> <role> [--read-only | --read-write]
692
709
  ```
@@ -710,7 +727,7 @@ the terminal Session's immutable effective snapshot in history. Until that
710
727
  process terminates, exact control-plane wakes continue through its actual
711
728
  snapshot instead of applying desired drift as a hot change.
712
729
 
713
- Use `yui role unbind <global-role> <agent-id>` or `yui task role unbind <task-id> <role> <agent-id>` to retire a dormant binding. The active binding and any non-stopped native session are rejected; a stopped session record is removed atomically with the binding.
730
+ Use `yui config role unbind <global-role> <agent-id>` or `yui task role unbind <task-id> <role> <agent-id>` to retire a dormant binding. The active binding and any non-stopped native session are rejected; a stopped session record is removed atomically with the binding.
714
731
 
715
732
  Claude session IDs are preallocated at launch. Every managed Task Claude Run
716
733
  uses a new finite process; resume starts a new process against the fixed native
@@ -847,9 +864,11 @@ The restored management surface includes:
847
864
  ```sh
848
865
  yui update
849
866
  yui upgrade [--dry-run]
850
- yui agent add|list|show|capabilities|update|remove
851
- yui role add|list|show|update|remove|bind|enter
852
- yui role session record|replace
867
+ yui config agent add|list|show|capabilities|update|remove
868
+ yui config role add|list|show|update|remove|bind|unbind
869
+ yui config profile add|list|show|update|remove|reset
870
+ yui config completion [bash|zsh|fish]
871
+ yui session enter|record|replace|reconcile
853
872
  yui project add|clone|refresh|update|discover|list|show|knowledge
854
873
  ```
855
874