@zq-silk/yui 1.1.2 → 2.0.0

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 (64) hide show
  1. package/ARCHITECTURE.md +2 -1
  2. package/ARCHITECTURE.zh-CN.md +2 -1
  3. package/README.md +2 -0
  4. package/dist/cli/commandCatalog.js +66 -54
  5. package/dist/cli/managedDiagnostics.js +2 -1
  6. package/dist/cli/updatePorts.js +0 -5
  7. package/dist/cli.js +113 -107
  8. package/dist/commands/controllerCommands.js +2 -1
  9. package/dist/commands/globalRoleCommands.js +84 -43
  10. package/dist/commands/grantCommands.js +48 -8
  11. package/dist/commands/taskCommands.js +146 -196
  12. package/dist/commands/taskContextCommand.js +29 -6
  13. package/dist/commands/taskFactCommands.js +10 -69
  14. package/dist/commands/taskInputCommands.js +26 -35
  15. package/dist/commands/taskPublicationCommands.js +2 -35
  16. package/dist/commands/taskPublicationVerifyCommand.js +1 -2
  17. package/dist/commands/taskUpstreamCommands.js +2 -1
  18. package/dist/context/runContextPack.js +8 -29
  19. package/dist/context/sessionBootstrapManifest.js +5 -101
  20. package/dist/context/taskContext.js +98 -39
  21. package/dist/controller/clientRuntime.js +16 -8
  22. package/dist/controller/fileSchedulerStoreAdapter.js +24 -0
  23. package/dist/controller/runtime.js +6 -0
  24. package/dist/core/controllerClient.js +46 -21
  25. package/dist/core/protocol.js +12 -7
  26. package/dist/doctor/doctor.js +4 -3
  27. package/dist/errors/cliError.js +4 -4
  28. package/dist/errors/cliFailure.js +213 -0
  29. package/dist/executor/fileRoleLaunchPlanner.js +1 -4
  30. package/dist/grant/capabilityGrant.js +13 -0
  31. package/dist/grant/taskAuthorization.js +127 -0
  32. package/dist/kernel/builtinCapabilities.js +60 -8
  33. package/dist/kernel/kernelPorts.js +2 -2
  34. package/dist/output/boundedRead.js +118 -0
  35. package/dist/release/releaseWorkflowEngine.js +8 -1
  36. package/dist/runtime/managedCaller.js +2 -2
  37. package/dist/runtime/runtimeCoherence.js +10 -8
  38. package/dist/storage/sqliteSchema.js +10 -0
  39. package/dist/storage/storageVersions.js +1 -1
  40. package/dist/storage/taskStore.js +3 -0
  41. package/dist/task/leaderArchive.js +111 -0
  42. package/dist/task/leaderArchiveAuthority.js +24 -0
  43. package/dist/tmux/commandExecutor.js +7 -5
  44. package/docs/architecture/README.md +1 -0
  45. package/docs/architecture/README.zh-CN.md +1 -0
  46. package/docs/cli-information-contract.md +107 -0
  47. package/docs/cli-information-contract.zh-CN.md +81 -0
  48. package/docs/managed-turn-and-session-runtime.md +9 -0
  49. package/docs/managed-turn-and-session-runtime.zh-CN.md +6 -0
  50. package/docs/plugin-sdk.md +7 -3
  51. package/docs/plugin-sdk.zh-CN.md +5 -2
  52. package/docs/release-workflow.md +19 -9
  53. package/docs/release-workflow.zh-CN.md +14 -7
  54. package/docs/storage-baseline.md +5 -0
  55. package/docs/testing/verification-levels.md +2 -2
  56. package/i18n/README.zh-CN.md +2 -0
  57. package/package.json +1 -1
  58. package/skills/yui-leader/SKILL.md +8 -1
  59. package/skills/yui-leader/references/authorization.md +64 -0
  60. package/skills/yui-leader/references/execution.md +18 -4
  61. package/skills/yui-leader/references/task-plugins.md +4 -2
  62. package/skills/yui-operator/SKILL.md +9 -2
  63. package/skills/yui-runtime/SKILL.md +51 -9
  64. package/skills/yui-runtime/references/publication.md +3 -1
package/ARCHITECTURE.md CHANGED
@@ -179,7 +179,8 @@ directly. There is no requirement to route every operation through a plugin.
179
179
  Validated Task-local plugins preserve explicit enabled intent in the Store and
180
180
  live instances in InstanceHost. Reading or restarting does not run author code.
181
181
  Leader management is limited to its Task; executable code still requires exact
182
- Operator-issued grants. Plugin validation is not a security certification.
182
+ grants issued by Operator or by the current delivery Leader with original user
183
+ authorization and bounded Task/resource scope. Plugin validation is not a security certification.
183
184
 
184
185
  CLI contributions and controlled Web panels are projections of the Registry.
185
186
  Web is loopback-only and Controller-owned. Its authenticated local-user controls
@@ -138,7 +138,8 @@ Registry 暴露 context、消息、artifact、环境、插件以及部分 Task/J
138
138
 
139
139
  经验证的 Task-local 插件在 Store 中保留显式的 enabled 意图,在 InstanceHost 中保留活
140
140
  实例。读取或重启不运行作者代码。Leader 的管理仅限于其 Task;可执行代码仍需要确切的、
141
- 由 Operator 签发的 grant。插件验证不是安全认证。
141
+ 由 Operator 签发,或由当前 delivery Leader 依据原始用户授权在本 Task 和资源范围内
142
+ 签发的有界 grant。插件验证不是安全认证。
142
143
 
143
144
  CLI 贡献和受控的 Web 面板是 Registry 的投影。Web 仅本地回环、由 Controller 拥有;浏览器
144
145
  凭据认证本地用户控制,这些控制复用 CLI 领域操作;查询面板仍只读,不能借用该用户权限
package/README.md CHANGED
@@ -383,6 +383,8 @@ The [architecture overview](ARCHITECTURE.md) explains the end-to-end design.
383
383
  The [documentation map](docs/architecture/README.md) links the current contracts
384
384
  for configuration, execution, delivery, storage and plugins. Use `yui --help`
385
385
  when you want to operate the CLI directly.
386
+ The [CLI information contract](docs/cli-information-contract.md) describes
387
+ current context, paginated discovery, full-original reads and mutation receipts.
386
388
 
387
389
  Yui stores its control-plane data under `~/.yui` by default; `YUI_HOME` selects
388
390
  another instance. See [storage and upgrades](docs/sqlite-control-plane-design.md)
@@ -191,7 +191,8 @@ const globalSessionChildren = [
191
191
  {
192
192
  name: "context",
193
193
  summary: "Load the exact authorized global Role context.",
194
- usage: "yui session context <role>"
194
+ usage: "yui session context <role> [--cursor <cursor>]",
195
+ options: ["--cursor"]
195
196
  },
196
197
  {
197
198
  name: "record",
@@ -383,7 +384,7 @@ const taskChildren = [
383
384
  usage: "yui task list [--all] [--status <status>] [--project <id>] [--search <text>] [--attention <category>] [--limit <1..100>] [--cursor <cursor>]",
384
385
  options: ["--all", "--status", "--project", "--search", "--attention", "--limit", "--cursor"]
385
386
  },
386
- { name: "show", summary: "Show a Task.", usage: "yui task show <id>" },
387
+ { name: "show", summary: "Show Task metadata and counts; long details use contentPage.", usage: "yui task show <id> [--cursor <cursor>]", options: ["--cursor"] },
387
388
  {
388
389
  name: "artifact",
389
390
  summary: "Save Task files in local Git and read current or commit-pinned content.",
@@ -397,20 +398,20 @@ const taskChildren = [
397
398
  {
398
399
  name: "context",
399
400
  summary: "Read compact authorized facts, fixed-bound delta, or inspect a Context reference.",
400
- usage: "yui task context [read|delta|inspect] <task> [--after <cursor>] [--continuation <cursor>] [--limit <n>] [--store <store> --ref <id>] [--digest <digest>]",
401
- options: ["--after", "--continuation", "--limit", "--store", "--ref", "--digest"]
401
+ usage: "yui task context [read|list|delta|inspect] <task> [--after <cursor>] [--continuation <cursor>] [--cursor <cursor>] [--limit <n>] [--store <store> --ref <id>] [--digest <digest>]",
402
+ options: ["--after", "--continuation", "--cursor", "--limit", "--store", "--ref", "--digest", "--status", "--work-item"]
402
403
  },
403
404
  {
404
405
  name: "next-action",
405
406
  summary: "Read Task facts, mechanical prerequisites and legal alternatives; semantic choices remain with the Leader.",
406
- usage: "yui task next-action <task> [--json]",
407
- options: ["--json"]
407
+ usage: "yui task next-action <task> [--cursor <cursor>] [--json]",
408
+ options: ["--cursor", "--json"]
408
409
  },
409
410
  {
410
411
  name: "remote-delivery",
411
412
  summary: "Project exact Task heads and current PR/MR evidence into merge coverage.",
412
- usage: "yui task remote-delivery <task> [--json]",
413
- options: ["--json"]
413
+ usage: "yui task remote-delivery <task> [--cursor <cursor>] [--json]",
414
+ options: ["--cursor", "--json"]
414
415
  },
415
416
  {
416
417
  name: "archive-preflight",
@@ -421,8 +422,8 @@ const taskChildren = [
421
422
  {
422
423
  name: "archive",
423
424
  summary: "Archive a terminal Task; explicit --force commits despite delivery/cleanup warnings, retaining unsafe resources.",
424
- usage: "yui task archive <id> (--integrated|--abandon) [--force]",
425
- options: ["--integrated", "--abandon", "--force"]
425
+ usage: "yui task archive <id> (--integrated|--abandon) [--force] [--source-message <id> --purpose <verbatim-authorization> --request-id <id>]",
426
+ options: ["--integrated", "--abandon", "--force", "--source-message", "--purpose", "--request-id"]
426
427
  },
427
428
  { name: "reconcile", summary: "Run one immediate Controller reconciliation.", usage: "yui task reconcile <id>" },
428
429
  {
@@ -482,13 +483,14 @@ const taskChildren = [
482
483
  {
483
484
  name: "list",
484
485
  summary: "List Task messages.",
485
- usage: "yui task message list <id> [--after <timestamp>] [--limit <n>]",
486
- options: ["--after", "--limit"]
486
+ usage: "yui task message list <id> [--after <timestamp>] [--limit <1..100>] [--cursor <cursor>]",
487
+ options: ["--after", "--limit", "--cursor"]
487
488
  },
488
489
  {
489
490
  name: "show",
490
491
  summary: "Read a scoped Message and expand its single execution result.",
491
- usage: "yui task message show <task>/<message>"
492
+ usage: "yui task message show <task>/<message> [--cursor <cursor>]",
493
+ options: ["--cursor"]
492
494
  },
493
495
  {
494
496
  name: "update",
@@ -519,14 +521,14 @@ const taskChildren = [
519
521
  {
520
522
  name: "list",
521
523
  summary: "List the global Inbox or one Task's input requests.",
522
- usage: "yui task input list [task] [--all]",
523
- options: ["--all"]
524
+ usage: "yui task input list [task] [--all] [--limit <1..100>] [--cursor <cursor>]",
525
+ options: ["--all", "--limit", "--cursor"]
524
526
  },
525
527
  {
526
528
  name: "show",
527
529
  summary: "Show one input request.",
528
- usage: "yui task input show (<task>/<input> | <input> --task <task>)",
529
- options: ["--task"]
530
+ usage: "yui task input show (<task>/<input> | <input> --task <task>) [--cursor <cursor>]",
531
+ options: ["--task", "--cursor"]
530
532
  },
531
533
  {
532
534
  name: "answer",
@@ -544,14 +546,14 @@ const taskChildren = [
544
546
  },
545
547
  {
546
548
  name: "grant",
547
- summary: "Manage capability grants for a Task. Issue and revoke require the authenticated global Operator session.",
549
+ summary: "Manage Task grants as Operator, or bounded source-authorized grants as the current delivery Leader.",
548
550
  sections: [{ id: "manage", title: "Commands", entries: ["issue", "show", "list", "revoke"] }],
549
551
  children: [
550
552
  {
551
553
  name: "issue",
552
- summary: "Issue a capability grant to a Task. Requires the authenticated global Operator session; the granter is bound to it.",
554
+ summary: "Issue as Operator, or as current delivery Leader with --source-message, --purpose, --request-id, exact scope, expiry and finite uses.",
553
555
  usage: "yui task grant issue <task> --action <name> (repeatable) [--scope-project <id>...] [--scope-repo <owner/name>...] [--scope-package <name>...] [--scope-home <path>] [--param <name=v1,v2>...] [--expires-at <iso-8601>] [--max-uses <int>] [--irreversibility-ceiling <none|reversible|irreversible>]",
554
- options: ["--action", "--scope-project", "--scope-repo", "--scope-package", "--scope-home", "--param", "--expires-at", "--max-uses", "--irreversibility-ceiling"]
556
+ options: ["--action", "--scope-project", "--scope-repo", "--scope-package", "--scope-home", "--param", "--expires-at", "--max-uses", "--irreversibility-ceiling", "--source-message", "--purpose", "--request-id"]
555
557
  },
556
558
  {
557
559
  name: "show",
@@ -565,7 +567,7 @@ const taskChildren = [
565
567
  },
566
568
  {
567
569
  name: "revoke",
568
- summary: "Revoke a capability grant. Requires the authenticated global Operator session; the revoker is bound to it.",
570
+ summary: "Revoke as Operator, or this Task's current delivery Leader for a Leader-issued grant.",
569
571
  usage: "yui task grant revoke <task> <grant-id>",
570
572
  options: []
571
573
  }
@@ -642,7 +644,8 @@ const taskChildren = [
642
644
  {
643
645
  name: "list",
644
646
  summary: "List external publication evidence for a Task.",
645
- usage: "yui task publication list <task>"
647
+ usage: "yui task publication list <task> [--limit <1..100>] [--cursor <cursor>]",
648
+ options: ["--limit", "--cursor"]
646
649
  },
647
650
  {
648
651
  name: "show",
@@ -666,13 +669,14 @@ const taskChildren = [
666
669
  options: ["--profile", "--agent", ...roleProfileOptions, ...roleAgentOptions],
667
670
  optionValues: roleAgentOptionValues
668
671
  },
669
- { name: "list", summary: "List Task Roles.", usage: "yui task role list <task>" },
672
+ { name: "list", summary: "Discover recorded Role health; Host is unchecked until role status.", usage: "yui task role list <task> [--limit <1..100>] [--cursor <cursor>]", options: ["--limit", "--cursor"] },
670
673
  {
671
674
  name: "status",
672
675
  summary: "Show persisted and live runtime state for one Task Role.",
673
- usage: "yui task role status <task> <role>"
676
+ usage: "yui task role status <task> <role> [--cursor <cursor>]",
677
+ options: ["--cursor"]
674
678
  },
675
- { name: "show", summary: "Show one Task Role.", usage: "yui task role show <task> <role>" },
679
+ { name: "show", summary: "Show one Task Role.", usage: "yui task role show <task> <role> [--cursor <cursor>]", options: ["--cursor"] },
676
680
  { name: "capabilities", summary: "Read native options using this Role's desired or exact failed launch configuration.",
677
681
  usage: "yui task role capabilities <task> <role> [--error <event-id>] [--refresh]",
678
682
  options: ["--error", "--refresh"] },
@@ -701,7 +705,8 @@ const taskChildren = [
701
705
  {
702
706
  name: "inspect",
703
707
  summary: "Read the current Session, Host process, and AgentRun facts.",
704
- usage: "yui task role session inspect <task> <role>"
708
+ usage: "yui task role session inspect <task> <role> [--cursor <cursor>]",
709
+ options: ["--cursor"]
705
710
  },
706
711
  {
707
712
  name: "stop",
@@ -758,8 +763,8 @@ const taskChildren = [
758
763
  usage: "yui task work create <task> <title> [--project <project> ...] [--base-ref <project>=<ref> ...] [--objective <text>] [--accept <criterion> ...] [--after <work> ...] [--role <name>]",
759
764
  options: ["--project", "--base-ref", "--objective", "--accept", "--after", "--role"]
760
765
  },
761
- { name: "list", summary: "List work items for a Task.", usage: "yui task work list <task>" },
762
- { name: "show", summary: "Show one Work Item.", usage: "yui task work show <work>" },
766
+ { name: "list", summary: "Discover work items by summary and exact reference.", usage: "yui task work list <task> [--limit <1..100>] [--cursor <cursor>]", options: ["--limit", "--cursor"] },
767
+ { name: "show", summary: "Show one Work Item.", usage: "yui task work show <work> [--cursor <cursor>]", options: ["--cursor"] },
763
768
  {
764
769
  name: "edit",
765
770
  summary: "Edit current requirements without changing frozen Assignments or acceptance.",
@@ -866,11 +871,12 @@ const taskChildren = [
866
871
  summary: "Inspect and control Task Role AgentRuns.",
867
872
  sections: [{ id: "manage", title: "Commands", entries: ["list", "show", "retry", "settle", "context", "checkpoint", "retire"] }],
868
873
  children: [
869
- { name: "list", summary: "List all AgentRuns for a Task or one WorkItem.", usage: "yui task run list <task|task/work>" },
874
+ { name: "list", summary: "Discover AgentRuns for a Task or one WorkItem.", usage: "yui task run list <task|task/work> [--limit <1..100>] [--cursor <cursor>]", options: ["--limit", "--cursor"] },
870
875
  {
871
876
  name: "show",
872
877
  summary: "Show one AgentRun and its retained audit evidence.",
873
- usage: "yui task run show <task>/<run> [--json]"
878
+ usage: "yui task run show <task>/<run> [--cursor <cursor>] [--json]",
879
+ options: ["--cursor", "--json"]
874
880
  },
875
881
  {
876
882
  name: "retry",
@@ -885,7 +891,8 @@ const taskChildren = [
885
891
  {
886
892
  name: "context",
887
893
  summary: "Load the exact authorized AgentRun context.",
888
- usage: "yui task run context <task>/<run> [--json]",
894
+ usage: "yui task run context <task>/<run> [--cursor <cursor>] [--json]",
895
+ options: ["--cursor", "--json"],
889
896
  executable: true,
890
897
  hidden: true,
891
898
  sections: [{ id: "load", title: "Commands", entries: ["expand", "delta"] }],
@@ -893,14 +900,14 @@ const taskChildren = [
893
900
  {
894
901
  name: "expand",
895
902
  summary: "Expand one authorized AgentRun context reference.",
896
- usage: "yui task run context expand <task>/<run> <ref-id> --store <store> [--mode full]",
897
- options: ["--store", "--mode"]
903
+ usage: "yui task run context expand <task>/<run> <ref-id> --store <store> [--mode full] [--cursor <cursor>]",
904
+ options: ["--store", "--mode", "--cursor"]
898
905
  },
899
906
  {
900
907
  name: "delta",
901
908
  summary: "Load authorized AgentRun context changes after a cursor.",
902
- usage: "yui task run context delta <task>/<run> --after <cursor>",
903
- options: ["--after"]
909
+ usage: "yui task run context delta <task>/<run> --after <digest> [--cursor <cursor>]",
910
+ options: ["--after", "--cursor"]
904
911
  }
905
912
  ]
906
913
  },
@@ -990,7 +997,7 @@ const taskChildren = [
990
997
  summary: "Manage the Task Brief, the authoritative summary of current task state.",
991
998
  sections: [{ id: "manage", title: "Commands", entries: ["show", "update"] }],
992
999
  children: [
993
- { name: "show", summary: "Show the Task Brief.", usage: "yui task brief show <task>" },
1000
+ { name: "show", summary: "Show the Task Brief.", usage: "yui task brief show <task> [--cursor <cursor>]", options: ["--cursor"] },
994
1001
  {
995
1002
  name: "update",
996
1003
  summary: "Create or update the Task Brief.",
@@ -1013,11 +1020,11 @@ const taskChildren = [
1013
1020
  {
1014
1021
  name: "list",
1015
1022
  summary: "List Decisions for a Task.",
1016
- usage: "yui task decision list <task> [--status active|superseded]",
1017
- options: ["--status"],
1023
+ usage: "yui task decision list <task> [--status active|superseded] [--limit <1..100>] [--cursor <cursor>]",
1024
+ options: ["--status", "--limit", "--cursor"],
1018
1025
  optionValues: { "--status": ["active", "superseded"] }
1019
1026
  },
1020
- { name: "show", summary: "Show one Decision.", usage: "yui task decision show <task> <decision>" },
1027
+ { name: "show", summary: "Show one Decision.", usage: "yui task decision show <task> <decision> [--cursor <cursor>]", options: ["--cursor"] },
1021
1028
  {
1022
1029
  name: "supersede",
1023
1030
  summary: "Mark a Decision as superseded.",
@@ -1037,8 +1044,8 @@ const taskChildren = [
1037
1044
  usage: "yui task milestone add <task> --title <text> --summary <text>",
1038
1045
  options: ["--title", "--summary"]
1039
1046
  },
1040
- { name: "list", summary: "List Milestones for a Task.", usage: "yui task milestone list <task>" },
1041
- { name: "show", summary: "Show one Milestone.", usage: "yui task milestone show <task> <milestone>" }
1047
+ { name: "list", summary: "List Milestones for a Task.", usage: "yui task milestone list <task> [--limit <1..100>] [--cursor <cursor>]", options: ["--limit", "--cursor"] },
1048
+ { name: "show", summary: "Show one Milestone.", usage: "yui task milestone show <task> <milestone> [--cursor <cursor>]", options: ["--cursor"] }
1042
1049
  ]
1043
1050
  },
1044
1051
  {
@@ -1049,10 +1056,10 @@ const taskChildren = [
1049
1056
  {
1050
1057
  name: "list",
1051
1058
  summary: "List Task events.",
1052
- usage: "yui task event list <task> [--after <timestamp>] [--limit <n>]",
1053
- options: ["--after", "--limit"]
1059
+ usage: "yui task event list <task> [--after <timestamp>] [--limit <1..100>] [--cursor <cursor>]",
1060
+ options: ["--after", "--limit", "--cursor"]
1054
1061
  },
1055
- { name: "show", summary: "Show one Task event.", usage: "yui task event show <task> <event>" }
1062
+ { name: "show", summary: "Show one Task event.", usage: "yui task event show <task> <event> [--cursor <cursor>]", options: ["--cursor"] }
1056
1063
  ]
1057
1064
  },
1058
1065
  {
@@ -1073,8 +1080,8 @@ const taskChildren = [
1073
1080
  summary: "Inspect the durable Leader wake ledger and its delta content.",
1074
1081
  sections: [{ id: "manage", title: "Commands", entries: ["list", "show", "retry", "resolve"] }],
1075
1082
  children: [
1076
- { name: "list", summary: "List recorded Leader wakes.", usage: "yui task wake list <task>" },
1077
- { name: "show", summary: "Show one wake and its delta content.", usage: "yui task wake show <task> <wake>" },
1083
+ { name: "list", summary: "List recorded Leader wakes.", usage: "yui task wake list <task> [--limit <1..100>] [--cursor <cursor>]", options: ["--limit", "--cursor"] },
1084
+ { name: "show", summary: "Show a fixed wake window and exact detail reads.", usage: "yui task wake show <task> <wake> [--cursor <cursor>]", options: ["--cursor"] },
1078
1085
  { name: "retry", summary: "Retry a rejected notification after correcting its cause; preserve original input.",
1079
1086
  usage: "yui task wake retry <task> <wake> --reason <correction>", options: ["--reason"] },
1080
1087
  { name: "resolve", summary: "Release an unknown notification claim after explicit quiescence evidence, without replay.",
@@ -1092,7 +1099,7 @@ const taskChildren = [
1092
1099
  summary: "Inspect ChangeSets captured from WorkItem Candidates.",
1093
1100
  sections: [{ id: "inspect", title: "Commands", entries: ["show"] }],
1094
1101
  children: [
1095
- { name: "show", summary: "Show one ChangeSet.", usage: "yui task change-set show <task>/<change-set>" }
1102
+ { name: "show", summary: "Show one ChangeSet.", usage: "yui task change-set show <task>/<change-set> [--cursor <cursor>]", options: ["--cursor"] }
1096
1103
  ]
1097
1104
  },
1098
1105
  ];
@@ -1119,8 +1126,18 @@ export const ROOT_COMMAND = buildNode({
1119
1126
  children: [
1120
1127
  {
1121
1128
  name: "message", summary: "Send durable input to a Global Role.",
1122
- sections: [{ id: "input", title: "Input control", entries: ["queue", "steer"] }],
1129
+ sections: [{ id: "input", title: "Input control", entries: ["queue", "steer", "list", "show"] }],
1123
1130
  children: [
1131
+ {
1132
+ name: "list", summary: "Discover Global Messages without consuming input.",
1133
+ usage: "yui role message list <role> [--pending] [--limit <1..100>] [--cursor <cursor>]",
1134
+ options: ["--pending", "--limit", "--cursor"]
1135
+ },
1136
+ {
1137
+ name: "show", summary: "Read one exact Global Message; follow contentPage.nextCursor for long content.",
1138
+ usage: "yui role message show <role> <message-id> [--cursor <cursor>]",
1139
+ options: ["--cursor"]
1140
+ },
1124
1141
  {
1125
1142
  name: "queue", summary: "Queue input for the next legal delivery opportunity.",
1126
1143
  usage: "yui role message queue <role> (<text>|--body-file <path|->) --request-id <id>",
@@ -1595,7 +1612,7 @@ export const ROOT_COMMAND = buildNode({
1595
1612
  sections: [{
1596
1613
  id: "callbacks",
1597
1614
  title: "Callbacks",
1598
- entries: ["session-notify", "runtime-hook", "agent-host", "session-cli-refresh"]
1615
+ entries: ["session-notify", "runtime-hook", "agent-host"]
1599
1616
  }],
1600
1617
  children: [
1601
1618
  {
@@ -1612,11 +1629,6 @@ export const ROOT_COMMAND = buildNode({
1612
1629
  name: "runtime-hook",
1613
1630
  summary: "Record a managed Agent Driver observation from stdin.",
1614
1631
  usage: "yui internal runtime-hook"
1615
- },
1616
- {
1617
- name: "session-cli-refresh",
1618
- summary: "Refresh existing managed Session CLI wrappers after an update.",
1619
- usage: "yui internal session-cli-refresh"
1620
1632
  }
1621
1633
  ]
1622
1634
  }
@@ -4,7 +4,7 @@ export function taskDiagnosticTarget(args) {
4
4
  if (args[0] !== "task")
5
5
  return undefined;
6
6
  if (["show", "context", "next-action", "archive-preflight"].includes(args[1] ?? "")) {
7
- return args[1] === "context" && ["read", "inspect", "delta"].includes(args[2] ?? "")
7
+ return args[1] === "context" && ["read", "list", "inspect", "delta"].includes(args[2] ?? "")
8
8
  ? args[3] : args[2];
9
9
  }
10
10
  if (args[1] === "role" && ["list", "status", "show"].includes(args[2] ?? ""))
@@ -23,6 +23,7 @@ export function operatorOfflineCommand(args) {
23
23
  || (args[0] === "execution" && args[1] === "audit")
24
24
  || (args[0] === "operator" && ["status", "list"].includes(args[1] ?? ""))
25
25
  || (args[0] === "session" && ["context", "reconcile"].includes(args[1] ?? ""))
26
+ || (args[0] === "role" && args[1] === "message" && ["list", "show"].includes(args[2] ?? ""))
26
27
  || (args[0] === "task" && args[1] === "list")
27
28
  || taskDiagnosticTarget(args) !== undefined;
28
29
  }
@@ -203,11 +203,6 @@ export function createUpdatePorts(environment, spawn = spawnSync, stagingRoot =
203
203
  + `but the staged/verified artifact was ${staged.version}. Refusing to trust a `
204
204
  + "different build than the one that passed preflight.");
205
205
  }
206
- // Retarget current Manifest-referenced wrappers to the activated
207
- // installation before the replacement Controller starts. This relocates
208
- // the current shell form; it does not convert historical Session wrappers.
209
- const sessionCliRefresh = run(activeBinary, ["--json", "internal", "session-cli-refresh"], { cwd: process.cwd(), env: { ...environment, YUI_HOME: home }, shell: false });
210
- assertSpawnOk(sessionCliRefresh, "refresh managed Session CLI wrappers");
211
206
  // Retain the exact path used by both doctor and version verification. The
212
207
  // replacement start must not resolve UPDATE_CLI_PATH or npm again.
213
208
  verifiedActivatedBinary = activeBinary;