@zq-silk/yui 2.10.0 → 2.12.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 (90) hide show
  1. package/dist/artifacts/artifactCapability.js +14 -8
  2. package/dist/artifacts/artifactCommitLock.js +7 -5
  3. package/dist/artifacts/jobArtifact.js +93 -0
  4. package/dist/artifacts/jobArtifactTransport.js +13 -0
  5. package/dist/artifacts/taskArtifactRepository.js +58 -10
  6. package/dist/cli/callerDiscovery.js +18 -0
  7. package/dist/cli/commandCatalog.js +45 -14
  8. package/dist/cli/commandDiscovery.js +2 -3
  9. package/dist/commands/durableJobCommands.js +31 -6
  10. package/dist/commands/globalRoleCommands.js +5 -0
  11. package/dist/commands/scheduleCommands.js +14 -3
  12. package/dist/commands/taskCommands.js +5 -2
  13. package/dist/context/taskCatalog.js +6 -1
  14. package/dist/controlPlaneCli.js +12 -12
  15. package/dist/controller/agentJobControl.js +391 -0
  16. package/dist/controller/controller.js +24 -3
  17. package/dist/controller/fileSchedulerStoreAdapter.js +12 -1
  18. package/dist/controller/globalInputDelivery.js +8 -1
  19. package/dist/controller/jobArtifactControl.js +111 -0
  20. package/dist/controller/jobControl.js +4 -0
  21. package/dist/controller/jobDefinitionControl.js +191 -19
  22. package/dist/controller/jobSupervisor.js +83 -3
  23. package/dist/controller/jobTaskDelegationControl.js +193 -0
  24. package/dist/controller/runtime.js +7 -1
  25. package/dist/controller/scheduleControl.js +83 -20
  26. package/dist/integration/gitIntegrationService.js +2 -0
  27. package/dist/job/agentJob.js +131 -0
  28. package/dist/job/agentJobObservation.js +61 -0
  29. package/dist/job/agentRoleScope.js +33 -0
  30. package/dist/job/durableJob.js +63 -28
  31. package/dist/job/jobAssignmentScope.js +1 -0
  32. package/dist/job/jobBusinessResult.js +72 -0
  33. package/dist/job/jobCleanupInspection.js +4 -0
  34. package/dist/job/jobDefinition.js +26 -2
  35. package/dist/job/jobRunner.js +4 -3
  36. package/dist/job/projectRefreshRunner.js +54 -18
  37. package/dist/job/projectSync.js +162 -0
  38. package/dist/job/scheduleService.js +55 -0
  39. package/dist/job/taskDelegation.js +48 -0
  40. package/dist/message/messageContinuation.js +1 -1
  41. package/dist/resources/projectResourceService.js +1 -1
  42. package/dist/resources/resourceGc.js +1 -1
  43. package/dist/role/role.js +22 -12
  44. package/dist/runtime/managedIdentity.js +5 -3
  45. package/dist/runtime/sessionCaller.js +9 -10
  46. package/dist/schedule/schedule.js +65 -15
  47. package/dist/scheduler/wakeReason.js +4 -0
  48. package/dist/storage/agentJobSchema.js +10 -0
  49. package/dist/storage/maintenanceCaller.js +17 -25
  50. package/dist/storage/nativeSessionLookup.js +23 -0
  51. package/dist/storage/recordValidation.js +2 -0
  52. package/dist/storage/sessionHistorySchema.js +17 -0
  53. package/dist/storage/sqliteSchema.js +96 -11
  54. package/dist/storage/sqliteStore.js +71 -4
  55. package/dist/storage/storageVersions.js +1 -1
  56. package/dist/storage/storeRpc.js +4 -0
  57. package/dist/storage/taskCatalog.js +10 -2
  58. package/dist/storage/upgrade/jobBusinessResultMigration.js +20 -0
  59. package/dist/storage/upgrade/scheduleDispatchMigration.js +15 -0
  60. package/dist/task/archivePreflight.js +15 -0
  61. package/dist/task/completionReadiness.js +7 -0
  62. package/dist/task/task.js +17 -1
  63. package/dist/verification/verificationGateService.js +4 -0
  64. package/dist/web/assets/client/app/catalog.js +16 -0
  65. package/dist/web/assets/client/i18n/en.js +29 -2
  66. package/dist/web/assets/client/i18n/zh-CN.js +29 -2
  67. package/dist/web/assets/client/layout/manageShell.js +9 -0
  68. package/dist/web/assets/client/layout/router.js +1 -0
  69. package/dist/web/assets/client/views/jobs.js +166 -37
  70. package/dist/web/assets/client/views/task/files.js +5 -4
  71. package/dist/web/assets/client/views/task/page.js +5 -1
  72. package/dist/web/taskPreviews.js +2 -2
  73. package/dist/web/webJobs.js +36 -11
  74. package/dist/web/webMaterials.js +21 -9
  75. package/dist/web/webServer.js +6 -5
  76. package/dist/web/webTaskSurface.js +1 -0
  77. package/docs/authorization.md +130 -0
  78. package/docs/job-runs.md +392 -17
  79. package/docs/managed-turn-and-session-runtime.md +10 -5
  80. package/docs/managed-turn-and-session-runtime.zh-CN.md +12 -5
  81. package/docs/release-workflow.md +79 -0
  82. package/docs/release-workflow.zh-CN.md +58 -0
  83. package/docs/schedules.md +69 -15
  84. package/docs/storage-baseline.md +45 -1
  85. package/docs/storage-baseline.zh-CN.md +33 -1
  86. package/docs/testing/verification-levels.md +2 -2
  87. package/docs/testing/verification-levels.zh-CN.md +2 -2
  88. package/package.json +1 -1
  89. package/skills/yui-runtime/SKILL.md +12 -5
  90. package/skills/yui-runtime/VERSION +1 -1
@@ -36,6 +36,64 @@ Agent 选择一个预先声明的计划,设施从持久状态驱动该计划
36
36
  不能将不兼容冒称为兼容,也不为回避版本选择新增历史兼容机制。包版本与协议、
37
37
  持久存储契约仍然独立:兼容性检查和必要迁移要求不变,下文存储规则不授予发版权限。
38
38
 
39
+ ### 2.12.0 兼容性及迁移说明
40
+
41
+ 本 minor 完成作用域明确的 Job 平台:显式业务结果及固定产物、Schedule 目标与服务
42
+ 授权、受控 Project 刷新、Task 委派、可选 Agent 执行,以及共用的 Task/全局 Web
43
+ 管理。Task 的 Jobs 页签和 Settings → Jobs & schedules 展示准确的历史 Run、
44
+ 不可变配置、执行证据及获授权的产物预览。
45
+
46
+ 调用方须区分定义归属、执行目标、进程/原生终态证据和显式 `businessResult`;
47
+ 投递或进程退出本身不代表业务成功。按执行器种类处理 Run,不再假设每个 Run 都是
48
+ shell 进程。固定产物引用保留准确来源身份和作用域;可以预览不等于允许执行。
49
+ Task 委派保留不可变来源,不隐式激活 Draft Task。Agent Session 替换保留 Run
50
+ 要求及结果,不重放输入;投递未知或旧写入者尚未证明停止时仍拒绝替换。
51
+ 详见 [Jobs 与 Runs](job-runs.md)。
52
+
53
+ Schedule 继续复用已有准入路径,不引入第二套执行状态。服务授权必须明确授予,
54
+ 不继承旧 Session 权限,也不授权 Agent 执行。受控 `project.refresh` 绑定当前
55
+ 受管 Project 目标,复用工作区干净、准确核验后的 fast-forward 路径;发布不会为
56
+ 任何已注册 Project 启用同步。详见 [Schedules](schedules.md)。
57
+
58
+ 存储通过集中连续迁移链从 **1.14 升至 1.20**:**1.15** 业务结果;
59
+ **1.16** Schedule 目标/服务授权;**1.17** 固定 Run 产物;
60
+ **1.18** 受控 Project 刷新;**1.19** Task 委派/来源;**1.20** Agent Run/Session
61
+ 证据。支持的 **1.0–1.19** Home 使用已声明的同 major 迁移,保留历史证据,
62
+ 不编造结果或授权。另获更新授权后可使用 `yui update --version 2.12.0`;
63
+ updater 负责预检、备份、迁移和 Controller 交接。不要用旧二进制打开升级后的 Home,
64
+ 也不要手改存储。minor 编号不是 SemVer 向后兼容承诺。
65
+
66
+ 发布门禁要求准确提交的 Core CI,以及同一运行包在 Linux x64、macOS x64/arm64
67
+ 和 Node 20/22/24/26 上的全新安装验证。这些是确定性的隔离检查,不是真实模型验证。
68
+ 发布不会更新全局 CLI、迁移生产 Home、替换其 Controller 或运行真实 Project 同步。
69
+
70
+ ### 2.11.0 兼容性及迁移说明
71
+
72
+ 本 minor 允许普通非受管原生 Agent 会话使用与本地终端相同的公共操作,包括一般
73
+ 信息查询和创建 Draft Task。原生线程 ID 本身只是查询线索,不代表受管 Role。
74
+ Draft 创建保留已有 Agent、模型、权限和 Profile 配置继承,不启动讨论或开发。
75
+
76
+ 当前仅有原生 ID 的受管 Desktop 会话继续校验 Role、Task、Assignment 和 Grant。
77
+ 已知历史、停止、冲突或不完整的受管身份保持拒绝,不降级为公共权限。解绑 Session
78
+ 或删除 Role 后保留停止的身份历史。帮助与补全共用调用方发现;离线 Role 模板只是
79
+ 指引,不是授权。精确能力评估与执行继续采用当前资源和 Grant 边界。
80
+ 详见[授权职责和权限矩阵](authorization.md)。
81
+
82
+ 身份查询仅限所选 Home。仅在其他 Home 登记、或已被旧版本删除历史且没有 Yui
83
+ 提示的裸 ID,无法与普通线程区分。受管会话必须保留正确 Home/Manifest;
84
+ 本版本不扫描其他 Home,也不重建已删除历史。
85
+
86
+ 存储通过显式集中迁移从 **1.13 升至 1.14**,允许全局 Session 历史在 Role 删除后
87
+ 保留,同时保留已有 payload。受支持的 **1.0–1.13** Home 使用连续同 major 升级
88
+ 路径。另行获得更新授权后,可使用 `yui update --version 2.11.0`,由 updater 负责
89
+ 预检、备份、迁移与 Controller 交接。不要用旧二进制打开升级后的 Home,也不要
90
+ 手工修改存储。包 minor 编号不构成兼容性承诺。
91
+
92
+ 发布复用精确提交的 Core CI,并在 Linux x64、macOS x64/arm64 和
93
+ Node 20/22/24/26 上验证同一运行包后发布 npm。这些是确定性隔离验证,
94
+ 不是实际模型验证。包发布不更新全局 CLI、不迁移生产 Home、不替换生产 Session,
95
+ 也不启动 Web 监听。
96
+
39
97
  ### 2.10.0 兼容性及迁移说明
40
98
 
41
99
  本稳定 minor 包含精确 Turn 收件箱处理与继任恢复(Task131 / PR #463、
package/docs/schedules.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Persistent time plans
2
2
 
3
- A Schedule answers **when** to admit a Run of an existing scoped Job. It owns
3
+ For the installed Project maintenance plan and its user overrides, see
4
+ [Built-in Project sync](project-sync.md) ([简体中文](project-sync.zh-CN.md)).
5
+
6
+ A Schedule answers **when** to dispatch a scoped Job. It either admits a Run
7
+ of an existing Job (default), or asks the Job layer to instantiate an exact
8
+ definition revision as a new Job and admit its first Run. It owns
4
9
  the time rule and trigger progress, not the command, execution status or result.
5
10
  Immediate execution remains `job run`; manual Runs do not move a Schedule.
6
11
  All processing uses the existing Controller and the Job supervisor.
@@ -9,6 +14,7 @@ All processing uses the existing Controller and the Job supervisor.
9
14
 
10
15
  ```sh
11
16
  yui schedule create --global --schedule daily-probe --job probe \
17
+ --authorization service \
12
18
  --rule '{"kind":"cron","expression":"30 9 * * 1-5","timezone":"Asia/Shanghai"}'
13
19
  yui schedule list --global
14
20
  yui schedule show --global --schedule daily-probe
@@ -16,17 +22,26 @@ yui schedule disable --global --schedule daily-probe --revision 1
16
22
  yui schedule enable --global --schedule daily-probe --revision 2
17
23
  yui schedule update --global --schedule daily-probe --revision 3 \
18
24
  --rule '{"kind":"interval","anchor":"2026-10-17T00:00:00Z","everyMs":3600000}'
25
+ # New Job per occurrence, pinned to the currently available source revision:
26
+ yui schedule create --global --schedule isolated-probe --job probe \
27
+ --authorization service --target '{"kind":"new-job","definitionRevision":1}' \
28
+ --rule '{"kind":"interval","anchor":"2026-10-17T00:00:00Z","everyMs":3600000}'
29
+ # Unlike disable, revoke also denies not-yet-started service Runs:
30
+ yui schedule revoke --global --schedule isolated-probe --revision 1
19
31
  ```
20
32
 
21
33
  Create the referenced Job first using [the Job CLI](job-runs.md). Replace
22
- `--global` with `--task task-N` for a Task-owned Schedule. Global management
23
- requires a current authenticated Operator Session; Task callers cannot access
34
+ `--global` with `--task task-N` for a Task-owned Schedule. Public local users can
35
+ manage global plans without an Operator Session. Creating or rebinding a public
36
+ plan requires the explicit `--authorization service` choice. Current Operator
37
+ callers can also choose service authorization; omitting it on creation preserves
38
+ the Session-bound behavior. Task callers cannot access
24
39
  global or other Tasks' plans. Assignment limits are checked against the Job
25
40
  on the server. A Project is a Job target, never an ownership scope.
26
41
 
27
42
  The Controller RPC is `schedule.control`. Its input is
28
- `{op,scope,caller,id?,jobId?,rule?,expectedRevision?}`. Supported `op` values
29
- are `create`, `list`, `show`, `update`, `enable`, `disable`. `scope` uses the
43
+ `{op,scope,caller,id?,jobId?,target?,authorization?,rule?,expectedRevision?}`. Supported `op` values
44
+ are `create`, `list`, `show`, `update`, `enable`, `disable`, `revoke`. `scope` uses the
30
45
  Job `JobScope` contract. Trusted ingress must resolve/authenticate `caller`;
31
46
  client-supplied scope/identity is not authorization. `create` requires `id`,
32
47
  `jobId`, `rule`; all edits require the observed `expectedRevision`. `update`
@@ -35,9 +50,17 @@ revalidating both old visibility and new execution authority. Scope is immutable
35
50
  Rule updates retain enabled status only for an already enabled plan; all other
36
51
  states become disabled with the new future rule and require explicit enable.
37
52
 
53
+ `target` defaults to `{"kind":"existing-job"}`. `{"kind":"new-job",
54
+ "definitionRevision":N}` requires the exact currently available source version.
55
+ A source edit never silently changes that pinned selection; explicitly update
56
+ the target and, for service plans, reauthorize. Job owns deterministic instance
57
+ identity and `instantiation` provenance (`sourceId`, `sourceRevision`, occurrence
58
+ `key`). It does not create a Task. Each new instance has its own overlap scope;
59
+ existing-job mode retains one Job's overlap behavior.
60
+
38
61
  Create/edits return the Schedule; list returns visible Schedule records.
39
- Show returns `{schedule,lastSuccess}`. `lastSuccess` is the latest readable
40
- **succeeded JobRun** triggered by this Schedule under its current Job, or null.
62
+ Show returns `{schedule,lastSuccess,runs}`. `lastSuccess` is the latest readable
63
+ **succeeded JobRun** triggered by this Schedule across its historical Jobs, or null.
41
64
  It is derived from Run history, never a separately writable Schedule field.
42
65
  Retargeting does not move or erase the old Job's Run history.
43
66
 
@@ -71,7 +94,7 @@ prevents clock rollback or rule edits from replaying old progress.
71
94
  Rule updates increase `generation`; enable retains it. The internal trigger
72
95
  key is `<schedule-id>:<generation>:<UTC-due>`, scoped to the Job.
73
96
 
74
- Admission and advancement commit in the same Store transaction. Repeated scans
97
+ Instance creation, first Run admission and advancement commit in the same Store transaction. Repeated scans
75
98
  and Controller replacement retain the same Run and occurrence identity.
76
99
  The transaction never spawns. The supervisor starts committed Runs and
77
100
  preserves its existing unknown-effect and exact-process safeguards.
@@ -86,13 +109,15 @@ Task terminal shutdown. Disabling does not cancel an already admitted Run,
86
109
  and cancelling a Run does not disable its Schedule.
87
110
 
88
111
  `lastAttempt` records `at`, `dueAt`, `outcome` (`admitted`, `overlap`, `blocked`),
89
- optional exact `runId`, and reason. An overlap Run is the occupying execution,
112
+ optional exact `jobId`/`runId`, `generation`, and reason. Old receipts retain
113
+ only what was originally known; migration does not invent those references.
114
+ An overlap Run is the occupying execution,
90
115
  not a successful execution of this occurrence. Recurring overlap skips that
91
116
  coalesced tick and advances; once overlap retains its original due instant and
92
117
  retries admission on a later pass without adding a queued Run.
93
118
  Failed Runs stay in Job history; the next recurring tick follows the same plan.
94
119
 
95
- Creation, update and enable capture the authenticated Session binding and Job
120
+ Session-authorized creation, update and enable capture the authenticated Session binding and Job
96
121
  revision. They do not grant execution to a replacement Session or a changed
97
122
  Job definition. Before each admission both are checked again, along with current
98
123
  Job/Task/workspace prerequisites. Revocation or a changed definition stops the
@@ -100,8 +125,31 @@ plan as `needs-attention`; an authorized current manager must inspect and
100
125
  explicitly enable it. Controller restart alone does not revoke the binding.
101
126
  Worker-owned plans also retain the current Assignment boundary.
102
127
 
128
+ Service authority is a separate explicit grant stored on the Schedule. The
129
+ compiled internal `schedule` registration permits only global `system.noop`
130
+ and `project.refresh`; it does not permit Task shell execution, arbitrary code,
131
+ or additional scopes. `origin=builtin`, `caller.scope=service` and client-supplied
132
+ grant fields cannot create a service identity. Management first authenticates
133
+ the ordinary public/managed caller and checks the actual Job target.
134
+ The grant binds Home, Schedule, dispatch mode, exact definition, action, Project
135
+ and input. Admission and runner start recheck current validity; Project refresh
136
+ also rechecks after waiting for its maintenance lock. Replacing Operator Sessions
137
+ does not revoke a service grant. Source/configuration changes block the plan
138
+ with retained reasons; no silent rebind occurs.
139
+ Service Run results remain in Job history and do not enqueue an Operator wake.
140
+ Dispatch errors still use the existing attention notification when a recipient exists.
141
+
142
+ `disable` only stops future dispatch; it does not invalidate the grant of an
143
+ already admitted Run. `revoke` disables the plan and invalidates the grant,
144
+ preventing queued service Runs from starting (not cancelling effects already
145
+ in flight). An explicit `enable --authorization service` grants a fresh identity;
146
+ it never resurrects old revoked Runs. Ordinary enable/rule edits retain an
147
+ unchanged active grant. Reauthorization and source/target changes are deliberate
148
+ management operations, not automatic repairs.
149
+
103
150
  Unclassified admission failures roll back, stop that plan, persist the reason
104
- and notify its Task Leader or global Operator via existing durable inboxes.
151
+ and notify its Task Leader or configured global Operator via existing durable inboxes.
152
+ If no Operator role exists, the plan/reason remains inspectable without creating one.
105
153
  No new recovery queue, lease or automatic retry protocol is introduced.
106
154
 
107
155
  Task stop marks enabled plans as needing attention; restarting execution alone
@@ -114,14 +162,20 @@ settlement guards. A reopened Task does not implicitly resume retired plans.
114
162
 
115
163
  ## Storage and downstream integration
116
164
 
117
- Storage **1.9 → 1.10** appends `schedules`, keyed by `(scope_key,schedule_id)`,
118
- and its due index. Old Job/Run bytes and published baseline checksums remain
119
- unchanged. New Homes initialize 1.10; existing Homes require the centralized
165
+ Storage **1.15 → 1.16** adds explicit target and authorization kinds to existing
166
+ plans, preserving Session bindings, identities, rules, progress and old receipts.
167
+ Original Schedule bytes are archived under migration 16. It never turns historical
168
+ Session authority into a service grant. New optional Job instance provenance and
169
+ Run service-grant references use the existing tables. The published **1.9 → 1.10**
170
+ DDL and all older transitions remain unchanged. New Homes initialize 1.16;
171
+ existing Homes require the centralized
120
172
  explicit upgrade path. No real Home migration or package release is implied.
121
173
 
122
174
  `src/schedule/schedule.ts` exports `Schedule`, `ScheduleRule`, time calculation
123
175
  and validation. `src/controller/scheduleControl.ts` owns management and bounded
124
- reconciliation; `admitJobRun` remains the only execution admission seam.
176
+ reconciliation; Job's `instantiateJobRun` composes instance creation with
177
+ `admitJobRun`, the execution admission seam. No ScheduleRun state or second
178
+ writable execution result is introduced.
125
179
  Consumers should use RPC/service responses rather than write storage directly.
126
180
 
127
181
  Project refresh is a separate controlled Job action supplied by Task128.
@@ -2,7 +2,51 @@
2
2
 
3
3
  # Storage baseline 1.0
4
4
 
5
- Current storage is 1.13. The 1.12 → 1.13 transition permits exact native attempt
5
+ Current storage is 1.20. The 1.19 → 1.20 transition adds Agent Job configurations,
6
+ optional Job ownership on Global Roles, and the `agent_job_runs` table for
7
+ exact original-message/native-attempt evidence and explicit business results.
8
+ Existing Role, Session, process Run and artifact identities are unchanged;
9
+ no Agent or native Session is invented during migration.
10
+
11
+ The 1.18 → 1.19 transition adds optional immutable Task
12
+ creation source, exact Run delegation and Task/WorkItem result-reference kinds.
13
+ Existing valid payload bytes, ordinary source-less Tasks, unknown effects and
14
+ fixed references are unchanged; no historical source or authority is inferred.
15
+ SQL layout is unchanged.
16
+
17
+ The additive 1.17 → 1.18 transition admits builtin
18
+ Project-sync provenance, a compiled service issuer and a separate user-enabled
19
+ preference on new Schedules. SQL layout and every existing payload remain unchanged;
20
+ it neither adopts custom Jobs nor fabricates historical grants or Runs.
21
+ Installation is a Controller operation, separate from storage migration.
22
+
23
+ The 1.16 → 1.17 transition adds optional append-only
24
+ JobRun artifact references and scope/Run-isolated local Git repositories.
25
+ Existing payload bytes and Task Git repositories/frozen references remain
26
+ unchanged; no historical artifact, provenance or authorization is inferred.
27
+ No SQL layout change or automatic cleanup is introduced.
28
+
29
+ The 1.15 → 1.16 transition adds explicit Schedule
30
+ dispatch targets and authorization kinds. Existing plans keep their exact Session
31
+ authority, rules, identity and progress; original bytes are archived under migration
32
+ 16. No service permission is inferred. New service grants and Job instance
33
+ provenance use the same tables; no ScheduleRun lifecycle is introduced.
34
+
35
+ The 1.14 → 1.15 transition adds separate Job business
36
+ results derived from saved process results, archiving original Run payload bytes
37
+ under migration 15. It does not infer structured business data from logs, change
38
+ execution identities, replay effects or rewrite frozen Context/Integration evidence.
39
+ SQL layout is unchanged. Public immediate builtin admissions use an explicit
40
+ Home/Run-bound user authority, not an invented Session or Schedule authorization.
41
+
42
+ The 1.13 → 1.14 transition removes the Role foreign key
43
+ from `global_role_session_sets`, preserving every payload byte and rebuilding
44
+ its retry index. Stopped Session identity/history can then outlive Role removal
45
+ without granting authority. No new authorization table or inferred history is
46
+ introduced. Ordinary reads require current storage; only an explicit supported
47
+ upgrade changes an existing Home. See [authorization](authorization.md).
48
+
49
+ The 1.12 → 1.13 transition permits exact native attempt
6
50
  identity on new inbox claims, exact target identity on new steer controls,
7
51
  explicit Global inbox retirement and terminal handling-check evidence.
8
52
  It does not rewrite historical messages, infer old turn ownership or synthesize
@@ -2,7 +2,39 @@
2
2
 
3
3
  # 存储基线 1.0
4
4
 
5
- 当前存储为 1.13。1.12 → 1.13 允许新 inbox claim 记录精确 native attempt、
5
+ 当前存储为 1.20。1.19 → 1.20 增加 Agent Job 配置、Global Role 的可选 Job
6
+ 归属和 `agent_job_runs` 表,保存原始消息、准确原生尝试与显式业务结果。
7
+ 保留现有 Role、Session、进程 Run 和固定产物身份;迁移不创建 Agent 或原生会话。
8
+
9
+ 1.18 → 1.19 增加 Task 可选且不可改写的创建来源、准确 Run
10
+ 委托及 Task/WorkItem 结果引用,不改变 SQL 布局或旧 payload 字节。
11
+ 普通历史 Task 仍无来源,不补造权限、来源或结果;未知效果与固定产物引用保持。
12
+
13
+ 1.17 → 1.18 允许新记录携带内置 Project 同步来源、
14
+ 编译期注册服务签发者及独立的用户启停偏好;SQL 布局和已有 payload 原字节不变。
15
+ 迁移不接管手建 Job、不补造历史授权或 Run;安装由 Controller 单独核对。
16
+
17
+ 1.16 → 1.17 增加 JobRun 可选的只追加产物引用,
18
+ 以及按 scope 和 Run 隔离的本地 Git 正式产物库。原 payload 字节、
19
+ Task 产物库及冻结引用保持不变,不补造历史产物、来源或授权,
20
+ 不改变 SQL 布局,也不增加自动清理。
21
+
22
+ 1.15 → 1.16 增加明确的 Schedule 派发目标及授权类型;
23
+ 原计划保留准确 Session 授权、规则、身份与进度,原始字节归档于 migration 16。
24
+ 不推导或升级为服务权限。新增服务授权和 Job 实例来源沿用原表,不新增 ScheduleRun 生命周期。
25
+
26
+ 1.14 → 1.15 根据已保存的进程结果增加独立的 Job 业务结果,
27
+ 原始 Run payload 字节归档于 migration 15;不从日志猜测结构化业务数据,
28
+ 不改执行身份,不重放动作,也不改冻结 Context 或 Integration 证据。SQL 布局不变。
29
+ 公共即时 builtin 使用绑定 Home/Run 的 user 授权,不伪造 Session,也不授予 Schedule 持久权限。
30
+
31
+ 1.13 → 1.14 只移除 `global_role_session_sets` 对 Role 的外键,
32
+ 原样保留 payload 并重建 retry 索引,使已停止会话的身份/历史在角色移除后继续保留,
33
+ 但不赋予权限。不新增授权表,不补造已经丢失的历史。普通读取要求当前存储版本,
34
+ 已有 Home 只能通过显式受支持升级迁移,不能在读取时自动迁移。
35
+ 详见 [权限职责与矩阵](authorization.md)。
36
+
37
+ 1.12 → 1.13 允许新 inbox claim 记录精确 native attempt、
6
38
  新 steer control 记录精确目标,以及 Global 输入显式退役和终态缺回执检查证据。
7
39
  不改写历史消息、不推断旧轮次归属、不补造 ACK;SQL 布局不变。
8
40
  当前输入和历史处理缺证据通过有界视图分别发现,不新增第二队列。
@@ -50,12 +50,12 @@ is required.
50
50
  ## Permanent core smoke
51
51
 
52
52
  `npm test` and `npm run test:core` build the checkout and run the maintained suite.
53
- The stable suite owns current storage 1.13 and its declared 1.0 through 1.12 minor
53
+ The stable suite owns current storage 1.20 and its declared 1.0 through 1.19 minor
54
54
  transition. It contains no undeclared historical format compatibility path.
55
55
 
56
56
  Current coverage includes:
57
57
 
58
- 1. Fresh storage 1.13, exact schema/record validation, no initialization over
58
+ 1. Fresh storage 1.20, exact schema/record validation, no initialization over
59
59
  unknown data, and rejection of old integer formats without mutation.
60
60
  2. Exact-version staging, mismatched-target refusal, same-major contiguous
61
61
  minor preflight, explicit maintenance-owner identity across handover, and
@@ -36,12 +36,12 @@ Yui 是一个单用户本地产品。永久验证保护关键的 happy path 和
36
36
  ## 永久 core smoke
37
37
 
38
38
  `npm test` 和 `npm run test:core` 构建当前 checkout 并运行维护中的套件。
39
- 稳定套件维护当前存储 1.13 和明确声明的 1.0 至 1.12 连续小版本迁移,
39
+ 稳定套件维护当前存储 1.20 和明确声明的 1.0 至 1.19 连续小版本迁移,
40
40
  不包含未声明的历史格式兼容路径。
41
41
 
42
42
  当前覆盖包括:
43
43
 
44
- 1. 新建存储 1.13、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
44
+ 1. 新建存储 1.20、精确结构与记录校验、禁止覆盖未知数据库、无修改拒绝旧整数格式。
45
45
  2. 精确版本暂存、目标不匹配拒绝、同主版本连续小版本预检、交接锁显式所有者,
46
46
  以及恢复时核对捕获的协议和存储身份,不接受缺失字段。
47
47
  3. 持久 Task/Message/Decision 上下文、Draft 激活权威、mailbox 认领、
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zq-silk/yui",
3
- "version": "2.10.0",
3
+ "version": "2.12.0",
4
4
  "description": "Local control plane for long-running native agent CLI sessions backed by tmux.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -80,11 +80,18 @@ is wrong or unavailable, report that fact and use the explicitly authorized
80
80
  entry/environment; do not guess another installation or clear Session identity.
81
81
 
82
82
  Desktop commands may carry only `CODEX_THREAD_ID`. The CLI resolves that native
83
- identity in the selected Home's current Session registry before routing Task or
84
- Global operations. Environment and Manifest values are location hints, not
85
- continuing grants. Conflicting, unregistered, replaced or revoked identities
86
- do not become public-user callers; a plain user terminal has no managed/native
87
- identity. `inbox list` reports the resolved current identity. Do not add or clear
83
+ identity against the selected Home's current and historical Session records before
84
+ routing operations. An unknown provider thread with no Yui-specific identity hints
85
+ is an ordinary public caller, like a user terminal; it needs no managed Manifest
86
+ to read public information or create a Draft Task. This does not start discussion
87
+ or development or grant internal managed capabilities. Public command availability
88
+ is not user authorization for a new effect.
89
+ Environment and Manifest values are location hints, not continuing grants.
90
+ Conflicting, partially specified, unregistered Yui identities and known historical
91
+ or revoked Sessions do not become public callers. An ID known only in another
92
+ Home cannot be recognized from the selected Home alone: keep the intended
93
+ Home/Manifest context rather than switching Homes or dropping hints.
94
+ `inbox list` reports the resolved managed identity. Do not add or clear
88
95
  environment fields to repair a mismatch. Without a Manifest environment pointer,
89
96
  `session skills` returns current Skill paths and the Session's captured profile.
90
97
 
@@ -1 +1 @@
1
- 10
1
+ 11