@pm_zhousl/xinyun-ai-init 1.11.0 → 1.12.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.
- package/init/xinyun-ai-init/README.md +1 -1
- package/init/xinyun-ai-init/rules/directory-self-completion.md +5 -0
- package/init/xinyun-ai-init/rules/init-rules.md +8 -0
- package/init/xinyun-ai-init/rules/session-workbench.md +10 -0
- package/init/xinyun-ai-init/rules/upgrade-rules.md +8 -0
- package/init/xinyun-ai-init/rules/v1.12.0-recovery.md +34 -0
- package/init/xinyun-ai-init/rules/v1.12.1-provider-session-binding.md +25 -0
- package/init/xinyun-ai-init/templates/AGENTS.template.md +1 -0
- package/init/xinyun-ai-init/templates/README.template.md +4 -0
- package/init/xinyun-ai-init/templates/core-rules.template.md +6 -0
- package/init/xinyun-ai-init/templates/current-task.template.md +2 -0
- package/init/xinyun-ai-init/templates/host-preflight.template.json +31 -0
- package/init/xinyun-ai-init/templates/init-result.template.json +27 -1
- package/init/xinyun-ai-init/templates/initialization-recovery.template.json +29 -0
- package/init/xinyun-ai-init/templates/initialization-timing.template.json +16 -0
- package/init/xinyun-ai-init/templates/manifest.template.json +40 -2
- package/init/xinyun-ai-init/templates/manual-session-binding.template.json +29 -0
- package/init/xinyun-ai-init/templates/project-check.template.md +9 -0
- package/init/xinyun-ai-init/templates/project-guide.template.md +2 -0
- package/init/xinyun-ai-init/templates/project-index.template.json +28 -0
- package/init/xinyun-ai-init/templates/provider-session-binding.template.json +60 -0
- package/init/xinyun-ai-init/templates/role-execution.template.md +1 -0
- package/init/xinyun-ai-init/templates/role-session-binding.template.json +19 -2
- package/init/xinyun-ai-init/templates/shared-project-snapshot.template.json +24 -0
- package/init/xinyun-ai-init/templates/task-index.template.json +2 -0
- package/init/xinyun-ai-init/templates/team/README.md +1 -0
- package/init/xinyun-ai-init/templates/team/assignments.json +2 -1
- package/init/xinyun-ai-init/version.json +1 -1
- package/package.json +1 -1
- package/scripts/verify-init-package.js +124 -1
- package/scripts/verify-rules-package.js +87 -1
- package/test-scenarios/v1.12.0-behavior-evidence.json +29 -0
- package/test-scenarios/v1.12.0-scenarios.md +51 -0
- package/test-scenarios/v1.12.1-behavior-evidence.json +27 -0
- package/test-scenarios/v1.12.1-scenarios.md +42 -0
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
- `framework-profile.json` 和 `migration-record.json` 创建后必须确认 JSON 可解析,并同步 `xinyun-ai/index/project-index.json`。
|
|
35
35
|
- 首次极速初始化不强制创建上述目录;普通咨询也不创建迁移或 profile 记录。
|
|
36
36
|
|
|
37
|
+
## v1.12 接管恢复目录
|
|
38
|
+
|
|
39
|
+
When takeover initialization is authorized, create `host-preflight.json`, `index/initialization-recovery.json`, `sessions/manual-bindings.json`, `index/shared-project-snapshot.json`, and `index/initialization-timing.json` under `xinyun-ai/`. Use atomic writes and preserve blocked state on host or permission failure.
|
|
40
|
+
|
|
37
41
|
## v1.7.1 任务树、归档与 CodeGraph 目录
|
|
38
42
|
|
|
39
43
|
- 初始化或升级流程必须补齐 `xinyun-ai/tasks/task-index.json`、`xinyun-ai/tasks/archive/`、`xinyun-ai/tasks/.archive-transactions/`、`xinyun-ai/tasks/.archive-tmp/`。
|
|
@@ -57,6 +61,7 @@
|
|
|
57
61
|
- `manifest.json`、`project-index.json` 和 `task-index.json` 必须登记 `roleSessions`、`roleSessionBindingIds`、`roleSessionBindings`、`provider=codex` 和 `sessionStatus` 枚举。
|
|
58
62
|
- 绑定目录只保存 Codex 宿主返回的真实 `sessionId` 摘要、onboarding 状态、失败原因和 audit,不保存伪造 sessionId。
|
|
59
63
|
- 宿主不支持创建子会话时,仍可补齐本地目录和降级记录,状态使用 `local-degraded-no-fake-session-id`。
|
|
64
|
+
- v1.12.1 provider 绑定记录固定写入 `xinyun-ai/sessions/provider-session-bindings.json`,模板来源为 `xinyun-ai-init/templates/provider-session-binding.template.json`。只有宿主 canonical `providerSessionId`、身份/交互证据和独占占用均通过时才可绑定;未知或普通线程 ID 保持 blocked/pending。
|
|
60
65
|
|
|
61
66
|
## v1.8 按需目录
|
|
62
67
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# 初始化规则
|
|
2
2
|
|
|
3
|
+
## v1.12.1 provider session binding
|
|
4
|
+
|
|
5
|
+
Use the provider-specific binding contract before role-session work. `providerSessionId` must be a provider canonical session value, not a normal thread ID. Identity and interaction evidence are required for binding; missing evidence remains pending or blocked.
|
|
6
|
+
|
|
3
7
|
- 首次只创建最小 `xinyun-ai/` 骨架和极简 `AGENTS.md`。
|
|
4
8
|
- 首次不创建大量规则、模板、脚本和业务沉淀目录。
|
|
5
9
|
- 首次不执行语言级语法检查、lint、typecheck、测试或构建命令。
|
|
@@ -56,6 +60,10 @@
|
|
|
56
60
|
- CodeGraph 必需任务失败时进入 `blocked`;只有用户明确授权限定范围降级时才允许 `partial`。
|
|
57
61
|
- 不自动安装 CodeGraph,不修改系统环境、业务代码、数据库、API、配置、依赖或 Git。
|
|
58
62
|
|
|
63
|
+
## v1.12 initialization gate recovery
|
|
64
|
+
|
|
65
|
+
Run the seven-capability host preflight before role sessions. Materialize the main task and five role tasks first; on failure preserve `sessionId=null`, `blockedReason`, and `nextAction`. Explicit `确认执行` or `确认继续初始化` reuses task IDs and increments `attempt` without duplicates.
|
|
66
|
+
|
|
59
67
|
## v1.10.2 and v1.11.0 gate
|
|
60
68
|
|
|
61
69
|
- Keep `hostThreadId`, `hostSessionId`, `projectSessionId`, and `orchestratorSessionId` separate. Any value without host evidence remains `null`.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# 会话工作台规则
|
|
2
2
|
|
|
3
|
+
## v1.12.1 provider-specific session binding
|
|
4
|
+
|
|
5
|
+
Read `v1.12.1-provider-session-binding.md` before role-session work. `providerSessionId` must come from the provider's canonical session API; a normal thread ID, task ID, title, history summary, or user statement is not a binding. Verify project identity, roleId, taskId, title, cwd, occupancy, and real send/receive evidence before binding. Missing evidence stays `bindingStatus=pending/blocked` and `executionEligible=false`.
|
|
6
|
+
|
|
7
|
+
Recovery reuses taskId and roleTaskId, increments attempt, and enters `recovery-required` after a writeback failure without creating duplicates. Unsupported hosts use `local-degraded` with `providerSessionId=null`; never fabricate a session ID.
|
|
8
|
+
|
|
3
9
|
首次初始化不创建会话工作台。复杂任务中可按需创建:
|
|
4
10
|
|
|
5
11
|
```md
|
|
@@ -285,6 +291,10 @@ HTML 迁移只允许评估和单页面 / 区块试点计划;实际代码迁移
|
|
|
285
291
|
|
|
286
292
|
任何跨会话冲突、状态源缺失、预算超限、权限失败或敏感信息无法确认时暂停或阻塞,不自动重试、合并、覆盖或释放。
|
|
287
293
|
|
|
294
|
+
## v1.12 host preflight and resumable sessions
|
|
295
|
+
|
|
296
|
+
Record all seven host capabilities before role sessions. `available-with-dependency` is not ready until authorized. Manual binding requires a real host-returned session ID and interaction evidence; host thread IDs cannot substitute for project session IDs.
|
|
297
|
+
|
|
288
298
|
## v1.10 接管 preflight 与交接
|
|
289
299
|
|
|
290
300
|
交接必须记录 host capability、真实 sessionId、executionEligible 和阻塞原因;宿主不支持时保持 sessionId=null,不得伪造 sessionId。
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# 升级规则
|
|
2
2
|
|
|
3
|
+
## v1.12.1 provider session binding
|
|
4
|
+
|
|
5
|
+
Validate provider canonical session identity, project identity, role/task, title/cwd, interaction evidence, and exclusive occupancy before reuse. Unknown or missing evidence is blocked; ordinary thread IDs cannot be reused. Writeback recovery reuses the original task IDs, increments attempt, and cannot create duplicate sessions.
|
|
6
|
+
|
|
3
7
|
如果项目已存在 `xinyun-ai/`,不要重复初始化,应进入升级检查模式。
|
|
4
8
|
|
|
5
9
|
升级流程:
|
|
@@ -116,6 +120,10 @@
|
|
|
116
120
|
|
|
117
121
|
升级先校验共享事实、状态源和 coordination transaction;再校验 Skill registry、`assignmentStatus`/`usageStatus` 映射;然后处理前端 audit-only 或已确认的单页面试点;最后才创建临时程序员会话。已有用户修改的控制文件不得静默覆盖,冲突或哈希不一致进入 `blocked`/`recovery-required`。
|
|
118
122
|
|
|
123
|
+
## v1.12 recovery and host preflight
|
|
124
|
+
|
|
125
|
+
Before upgrade role-session work, read `xinyun-ai/index/initialization-recovery.json` and `xinyun-ai/host-preflight.json`. Only explicit `确认执行` or `确认继续初始化` resumes the original task IDs with an incremented attempt; missing host sessions remain `sessionId=null` and blocked.
|
|
126
|
+
|
|
119
127
|
## v1.10 接管状态升级与恢复
|
|
120
128
|
|
|
121
129
|
升级前读取 `projectStatus` 和全部 preflight 控制文件;冲突进入 blocked/recovery-required,不覆盖用户修改。
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# v1.12.0 initialization gate recovery contract
|
|
2
|
+
|
|
3
|
+
v1.12 keeps the v1.10 takeover gate and v1.11 acceleration boundary. It adds a bounded host preflight, task-first initialization, resumable role-session binding, CodeGraph reuse, one shared project snapshot, and stage timing. The npm CLI still creates only `xinyun-ai-init/`.
|
|
4
|
+
|
|
5
|
+
## Host preflight
|
|
6
|
+
|
|
7
|
+
- Before creating or reusing role sessions, check `createRealSession`, `reuseExistingSession`, `sendTask`, `receiveResult`, `recoverSession`, `closeSession`, and `controlFileReadWrite`.
|
|
8
|
+
- Every capability record uses `capabilityId`, `detectionMethod`, `status`, `evidence`, `dependencyStatus`, `fallbackPlan`, `usedTools`, `unusedTools`, `unverifiedScope`, `failureReason`, and `checkedAt`.
|
|
9
|
+
- `available-with-dependency` requires dependency authorization. `unknown`, `unavailable`, `permission-denied`, `failed`, `not-checked`, `not-verified`, and an unauthorized dependency block `ready`.
|
|
10
|
+
- A host thread ID is not a project session ID. Without a real host-returned session ID, keep `sessionId=null`, record the blocker, and do not fabricate an ID.
|
|
11
|
+
|
|
12
|
+
## Task first and resume
|
|
13
|
+
|
|
14
|
+
- The first initialization write creates one named main task and five role task records before attempting role sessions. The task records remain when host preflight fails.
|
|
15
|
+
- A failed preflight records `sessionId=null`, `blockedReason`, `failureReason`, and `nextAction`; it does not delete tasks or write an idle current task while active tasks exist.
|
|
16
|
+
- Explicit `确认执行` or `确认继续初始化` resumes the same `taskId` and role task IDs from the recorded stage, increments `attempt`, and creates no duplicate tasks.
|
|
17
|
+
- Recovery uses atomic temp-file, fsync, rename, and recovery evidence. Conflicts, user-edited control files, or lock failures pause or block without overwrite or forced unlock.
|
|
18
|
+
|
|
19
|
+
## Manual binding
|
|
20
|
+
|
|
21
|
+
- A user may bind a real role session through `manual-session-bindings.json`. The record must contain role/task IDs, a host-returned `sessionId`, `boundBy`, `boundAt`, interaction and before/after snapshot evidence, and an audit entry.
|
|
22
|
+
- No evidence means `bindingStatus=blocked` or `pending` and `executionEligible=false`. A bound session becomes eligible only after evidence verification, role onboarding, responsibility confirmation, and all existing gates pass.
|
|
23
|
+
|
|
24
|
+
## CodeGraph and shared snapshot
|
|
25
|
+
|
|
26
|
+
- Reuse a healthy or initialized CodeGraph index by matching `codeGraphRecordId`, index hash, and source revision. Otherwise run the existing `codegraph init -i` boundary when authorized and available; do not install CodeGraph or repair business code.
|
|
27
|
+
- Record version, index hash, source revision, parse failures, unindexed scope, and failure reason. A required failure cannot claim complete understanding.
|
|
28
|
+
- Build one `shared-project-snapshot.json` for the five roles. Reuse it while business baseline, control-plane hash, CodeGraph index hash, and source revision are unchanged. Rebuild only when a refresh trigger is recorded.
|
|
29
|
+
|
|
30
|
+
## Timing and safety
|
|
31
|
+
|
|
32
|
+
- Record each stage's attempt, status, start/end, duration, cache hit, failure reason, bottleneck, and recovery action. Stage timing is evidence, not permission to skip a gate.
|
|
33
|
+
- Git none, no test framework, and missing optional toolchains are recorded as limited coverage and do not alone block. Database defaults remain `authorization=not-requested`, `executionStatus=needs-confirmation`, `redactionStatus=verified`; do not connect or execute SQL.
|
|
34
|
+
- Sensitive values never enter tasks, logs, handoffs, JSON, Markdown, stdout, or stderr. No business code, database, API, dependency, system environment, Git write, or npm publish operation is authorized by initialization.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# v1.12.1 provider-specific session binding
|
|
2
|
+
|
|
3
|
+
## Canonical provider identity
|
|
4
|
+
|
|
5
|
+
`providerSessionId` is valid only when it is returned by the declared provider's supported session API as a canonical session identifier. A normal Codex thread ID, task ID, local filename, random value, title, history summary, or user statement is not sufficient evidence and must never be copied into `providerSessionId`.
|
|
6
|
+
|
|
7
|
+
Every binding records `provider`, `providerSessionId`, `roleId`, `taskId`, `projectRootHash`, `workspaceScope`, `repositoryScopeHash`, `workstream`, `title`, `cwd`, `createdAt`, `identityEvidence`, `interactionEvidence`, `bindingMode`, `bindingStatus`, `boundBy`, and `boundAt`.
|
|
8
|
+
|
|
9
|
+
`identityEvidence` must verify the provider session ID, project identity, role, task, title, cwd, evidence source, verification time, and evidence hash. `interactionEvidence` must contain a real send receipt, receive receipt, transcript hash, message count, recorded time, and evidence hash. Sensitive prompt or response content is redacted before persistence.
|
|
10
|
+
|
|
11
|
+
## Binding gate and states
|
|
12
|
+
|
|
13
|
+
`bindingMode` is one of `auto-created`, `auto-reused`, `manual`, `recovery`, or `local-degraded`. `bindingStatus` is one of `pending`, `validating`, `bound`, `blocked`, `rejected`, `released`, `conflict`, or `recovery-required`.
|
|
14
|
+
|
|
15
|
+
Only `bindingStatus=bound` with both evidence groups verified and exclusive occupancy may produce a project `sessionId` or `executionEligible=true`. Manual binding without evidence remains `pending` or `blocked`. Host unsupported, identity mismatch, role/task mismatch, invalid title/cwd, missing interaction evidence, occupied session, or writeback failure must not become ready.
|
|
16
|
+
|
|
17
|
+
## Reuse and recovery
|
|
18
|
+
|
|
19
|
+
Candidate reuse first validates the provider session and all project identity fields. The v1.9 eight-field JCS-SHA-256 key remains the candidate reuse key. v1.7.3 four-field data is compatibility lookup only and never selects or binds a candidate. Recovery reuses the original task and role-task IDs, increments `attempt`, preserves audit, and never creates duplicate tasks or sessions.
|
|
20
|
+
|
|
21
|
+
If the host cannot provide a canonical provider session ID, keep `providerSessionId=null`, record `bindingStatus=blocked`, `blockedReason=host-session-capability-unavailable`, and a concrete `nextAction`. Do not fabricate an ID.
|
|
22
|
+
|
|
23
|
+
## Boundaries
|
|
24
|
+
|
|
25
|
+
Do not install or log in to a provider, change business files, connect to a database, execute SQL, write Git, install dependencies, or publish npm packages as part of binding.
|
|
@@ -195,6 +195,7 @@ CodeGraph 为必需能力时,只有 `initialized` 或 `healthy` 才能将结
|
|
|
195
195
|
- 真实 `sessionId` 必须来自 Codex 宿主返回值;不得伪造 sessionId。宿主不支持时记录 `local-degraded-no-fake-session-id`,保持 `sessionId=null`。
|
|
196
196
|
- 创建后的角色会话先进入只读 `onboarding`;只有职责理解、职责确认、成员 / 会话绑定、确认门禁和执行资格都满足后才允许 `sessionStatus=ready`。
|
|
197
197
|
- 创建成功不等于业务代码修改授权;普通咨询不创建角色会话,不写绑定文件,不创建外部账号或第三个会话。
|
|
198
|
+
- v1.12.1 起,角色会话必须另外记录 provider canonical `providerSessionId`;普通线程 ID、taskId、标题或历史摘要不得直接绑定。绑定前必须验证项目身份、roleId、taskId、title、cwd、独占占用、`identityEvidence` 和 `interactionEvidence`;证据不全时保持 pending/blocked。
|
|
198
199
|
|
|
199
200
|
AI 接手本项目时,请先读取:
|
|
200
201
|
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
本目录是当前项目的 AI 协作工作区,采用“欣芸技术开发 Agent 流”。
|
|
4
4
|
|
|
5
|
+
## v1.12.1 provider session binding
|
|
6
|
+
|
|
7
|
+
The canonical external identity of a role session is the provider-returned `providerSessionId`. A normal thread ID, taskId, title, or history summary cannot bind a role. Binding requires project identity, roleId, taskId, title, cwd, exclusive occupancy, and real send/receive evidence; incomplete evidence cannot become ready or executionEligible.
|
|
8
|
+
|
|
5
9
|
## v1.10 接管门禁
|
|
6
10
|
|
|
7
11
|
当前项目必须先完成 `preflight-report.json` 和 `onboarding-report.json`,再进入业务代码开发。`project-status.json` 只有在项目身份、CodeGraph、基线、团队职责、五个真实角色会话、本地控制面、旧沉淀、宿主能力和敏感扫描全部通过时才可为 `ready`;缺失真实角色会话必须为 `blocked + required-role-session-not-created`。CLI 只创建 `xinyun-ai-init/`,AI 获得授权后才创建项目控制面。
|
|
@@ -431,6 +431,8 @@ A single-role write failure records `status=blocked` and `blockedReason=write-fa
|
|
|
431
431
|
v1.7.3 Codex role session orchestration is host-level only; CLI still only creates `xinyun-ai-init/`.
|
|
432
432
|
v1.7.3 fixed Codex role session compatibility fields: `provider=codex`, `sessionStatus=pending/creating/created/onboarding/ready/blocked/failed/closed`, and legacy creation index `{taskId,roleId,provider,targetVersion}`. The v1.9 project-isolated role session reuse contract is authoritative.
|
|
433
433
|
|
|
434
|
+
v1.12 host preflight and recovery are authoritative for initialization gating: materialize the main task and five role tasks first, preserve `sessionId=null` when the host is unavailable, resume only after `确认执行` or `确认继续初始化`, reuse task IDs while incrementing attempt, and require real evidence for manual session binding. Reuse healthy CodeGraph and one shared project snapshot only when their hashes and source revision remain stable. Record stage duration, cache hit, bottleneck, failure reason, and recovery action.
|
|
435
|
+
|
|
434
436
|
## v1.7.3 Codex 角色会话自动创建与绑定
|
|
435
437
|
|
|
436
438
|
- v1.7.3 只在 5 个 `role-execution` 本地任务已经创建或恢复后,才由 Codex 主会话尝试创建 5 个真实角色子会话:`project-owner`、`project-product`、`chief-engineer`、`programmer`、`test-reviewer`。
|
|
@@ -604,6 +606,10 @@ Skill 分配使用 `assignmentStatus`,使用记录使用 `usageStatus`。固
|
|
|
604
606
|
|
|
605
607
|
总工维护 `xinyun-ai/technical-landscape.json`。只有 coverageStatus=full、unverifiedScope=[]、核心对象均有有效证据且无未登记冲突时才可 ready;partial/unknown 只能保持 partial/blocked。主会话维护 requirementPacket,总工输出 technicalImpactPacket;两个 packet 最小字段固定为 schemaVersion、packetId、requirementId、taskId、projectRootHash、version、status、content、evidence、sourceRevision、contentHash、createdAt、updatedAt,使用 RFC8785 JCS-SHA-256。需求、影响范围、身份、版本或 sourceRevision 变化时写 blockedReason=packet-stale。
|
|
606
608
|
|
|
609
|
+
## v1.12.1 provider-specific session binding
|
|
610
|
+
|
|
611
|
+
角色会话的外部身份只能是 provider 返回的 canonical `providerSessionId`。普通线程 ID、taskId、标题、历史摘要或用户口述不能直接绑定。绑定前必须验证项目身份、roleId、taskId、title、cwd、独占占用和真实发送/接收交互证据;证据不全保持 `bindingStatus=pending/blocked`,不得 ready 或 executionEligible。创建回写失败复用原 taskId/roleTaskId、递增 attempt,不创建重复会话;宿主不可用时 `providerSessionId=null`,不得伪造。
|
|
612
|
+
|
|
607
613
|
数据库默认 databaseAccessMode=sql-only。连接、只读查询、结构变更、数据修改分别授权,四类授权状态固定为 not-requested/requested/authorized/denied/expired/failed/unknown,redactionStatus 固定为 verified/unverified/failed;SQL 执行前校验规范化 SQL、参数、方言、targetEnvironment、授权范围生成的 statementHash。授权或输入变化时回到 needs-confirmation,并追加包含 auditId、action、actorType、actorId、authorizationType、statementHash、targetEnvironment、resultStatus、redactionStatus、evidence、at 的 audit。
|
|
608
614
|
|
|
609
615
|
## 自我学习
|
|
@@ -148,6 +148,8 @@
|
|
|
148
148
|
- blockedCount:
|
|
149
149
|
- localDegradedCount:
|
|
150
150
|
- bindingsPath:xinyun-ai/sessions/role-session-bindings.json
|
|
151
|
+
- providerBindingsPath:xinyun-ai/sessions/provider-session-bindings.json
|
|
152
|
+
- providerSessionId:null;无宿主 canonical ID 时不得伪造
|
|
151
153
|
- sessionStatusEnum:pending / creating / created / onboarding / ready / blocked / failed / closed
|
|
152
154
|
- 角色会话入口:
|
|
153
155
|
- roleId:
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"preflightId": "host-preflight-template",
|
|
4
|
+
"status": "not-checked",
|
|
5
|
+
"statusEnum": ["not-checked", "running", "passed", "partial", "blocked", "failed", "unknown"],
|
|
6
|
+
"requiredCapabilities": [
|
|
7
|
+
"createRealSession",
|
|
8
|
+
"reuseExistingSession",
|
|
9
|
+
"sendTask",
|
|
10
|
+
"receiveResult",
|
|
11
|
+
"recoverSession",
|
|
12
|
+
"closeSession",
|
|
13
|
+
"controlFileReadWrite"
|
|
14
|
+
],
|
|
15
|
+
"capabilityStatusEnum": ["available", "available-with-dependency", "unavailable", "permission-denied", "unknown", "not-checked", "not-verified", "failed"],
|
|
16
|
+
"dependencyStatusEnum": ["not-required", "required", "authorized", "not-authorized", "unknown"],
|
|
17
|
+
"capabilities": {
|
|
18
|
+
"createRealSession": {"capabilityId": "createRealSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; keep sessionId=null", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
19
|
+
"reuseExistingSession": {"capabilityId": "reuseExistingSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; query existing binding only", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
20
|
+
"sendTask": {"capabilityId": "sendTask", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; preserve task for resume", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
21
|
+
"receiveResult": {"capabilityId": "receiveResult", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "blocked; preserve task for resume", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
22
|
+
"recoverSession": {"capabilityId": "recoverSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "manual binding with evidence", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
23
|
+
"closeSession": {"capabilityId": "closeSession", "detectionMethod": "host-api", "status": "not-checked", "evidence": [], "dependencyStatus": "unknown", "fallbackPlan": "manual host close", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null},
|
|
24
|
+
"controlFileReadWrite": {"capabilityId": "controlFileReadWrite", "detectionMethod": "filesystem", "status": "not-checked", "evidence": [], "dependencyStatus": "not-required", "fallbackPlan": "blocked on control-file write failure", "usedTools": [], "unusedTools": [], "unverifiedScope": [], "failureReason": null, "checkedAt": null}
|
|
25
|
+
},
|
|
26
|
+
"realSessionIdEvidence": {"required": true, "sessionIds": [], "source": null, "verified": false},
|
|
27
|
+
"readyGate": {"allRequiredCapabilitiesPassed": false, "dependencyAuthorizationRequired": true, "unknownBlocksReady": true, "fakeSessionIdProhibited": true},
|
|
28
|
+
"nextAction": "Run host capability preflight before starting role sessions.",
|
|
29
|
+
"checkedAt": null,
|
|
30
|
+
"updatedAt": null
|
|
31
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"statusEnum": ["pending", "initializing", "completed", "partial", "blocked", "unknown", "failed", "cancelled"],
|
|
10
10
|
"statusSource": "xinyun-ai/current-task.md",
|
|
11
11
|
"currentVersion": null,
|
|
12
|
-
"targetVersion": "1.
|
|
12
|
+
"targetVersion": "1.12.1",
|
|
13
13
|
"idempotencyKey": null,
|
|
14
14
|
"createdFiles": [],
|
|
15
15
|
"updatedFiles": [],
|
|
@@ -59,6 +59,32 @@
|
|
|
59
59
|
"hostCapability": "unknown",
|
|
60
60
|
"degradationReason": null
|
|
61
61
|
},
|
|
62
|
+
"v112": {
|
|
63
|
+
"hostPreflightPath": "xinyun-ai/host-preflight.json",
|
|
64
|
+
"initializationRecoveryPath": "xinyun-ai/index/initialization-recovery.json",
|
|
65
|
+
"manualSessionBindingsPath": "xinyun-ai/sessions/manual-bindings.json",
|
|
66
|
+
"sharedProjectSnapshotPath": "xinyun-ai/index/shared-project-snapshot.json",
|
|
67
|
+
"initializationTimingPath": "xinyun-ai/index/initialization-timing.json",
|
|
68
|
+
"resumeStatus": "not-started",
|
|
69
|
+
"resumeStatusEnum": ["not-started", "ready-to-resume", "resuming", "completed", "blocked", "failed"],
|
|
70
|
+
"attempt": 1,
|
|
71
|
+
"reusedTaskIds": [],
|
|
72
|
+
"reusedRoleTaskIds": [],
|
|
73
|
+
"duplicateTasksCreated": 0,
|
|
74
|
+
"realSessionIdRequired": true,
|
|
75
|
+
"manualBindingEvidenceRequired": true,
|
|
76
|
+
"projectSnapshotReuse": "not-checked",
|
|
77
|
+
"stageTimingRecorded": false
|
|
78
|
+
},
|
|
79
|
+
"v1121": {
|
|
80
|
+
"providerSessionBindingsPath": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
81
|
+
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
82
|
+
"bindingGateStatus": "blocked",
|
|
83
|
+
"bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
|
|
84
|
+
"realProviderSessionRequired": true,
|
|
85
|
+
"fakeProviderSessionIdProhibited": true,
|
|
86
|
+
"unverifiedScope": ["provider-specific host session evidence"]
|
|
87
|
+
},
|
|
62
88
|
"v19": {
|
|
63
89
|
"projectIdentityPath": "xinyun-ai/project-identity.json",
|
|
64
90
|
"technicalLandscapePath": "xinyun-ai/technical-landscape.json",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"recoveryId": "initialization-recovery-template",
|
|
4
|
+
"taskId": null,
|
|
5
|
+
"mainTaskId": null,
|
|
6
|
+
"roleTaskIds": [],
|
|
7
|
+
"attempt": 1,
|
|
8
|
+
"status": "not-started",
|
|
9
|
+
"statusEnum": ["not-started", "ready-to-resume", "resuming", "completed", "blocked", "failed"],
|
|
10
|
+
"resumeTriggers": ["确认执行", "确认继续初始化"],
|
|
11
|
+
"resumeFromStage": null,
|
|
12
|
+
"stageIdEnum": ["preflight", "task-materialization", "role-sessions", "codegraph", "snapshot", "onboarding", "final-gate"],
|
|
13
|
+
"reuseContract": {
|
|
14
|
+
"reuseTaskId": true,
|
|
15
|
+
"reuseRoleTaskIds": true,
|
|
16
|
+
"incrementAttempt": true,
|
|
17
|
+
"createDuplicateTasks": false,
|
|
18
|
+
"idempotencyKey": null,
|
|
19
|
+
"keyAlgorithm": "RFC8785-JCS-SHA-256"
|
|
20
|
+
},
|
|
21
|
+
"blockedRoles": [],
|
|
22
|
+
"blockedReason": null,
|
|
23
|
+
"nextAction": "Wait for explicit confirmation or repair the recorded blocker.",
|
|
24
|
+
"lastRecoveryAction": null,
|
|
25
|
+
"recoveryEvidence": [],
|
|
26
|
+
"atomicWrite": {"tempFileRequired": true, "fsyncBeforeRename": true, "rename": true, "recoveryOnFailure": true},
|
|
27
|
+
"createdAt": null,
|
|
28
|
+
"updatedAt": null
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"timingId": "initialization-timing-template",
|
|
4
|
+
"taskId": null,
|
|
5
|
+
"attempt": 1,
|
|
6
|
+
"status": "not-started",
|
|
7
|
+
"stageStatusEnum": ["pending", "running", "completed", "skipped", "partial", "blocked", "failed", "recovery-required"],
|
|
8
|
+
"stages": [],
|
|
9
|
+
"stageRequiredFields": ["stageId", "attempt", "status", "startedAt", "finishedAt", "durationMs", "cacheHit", "failureReason", "bottleneck", "recoveryAction"],
|
|
10
|
+
"cacheSummary": {"hitCount": 0, "missCount": 0, "reusedSnapshot": false, "reusedCodeGraph": false, "reusedSessions": 0},
|
|
11
|
+
"bottlenecks": [],
|
|
12
|
+
"recoveryActions": [],
|
|
13
|
+
"totalDurationMs": null,
|
|
14
|
+
"createdAt": null,
|
|
15
|
+
"updatedAt": null
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"projectName": "",
|
|
3
|
-
"xinyunAiVersion": "1.
|
|
3
|
+
"xinyunAiVersion": "1.12.1",
|
|
4
4
|
"scriptVersion": "2026.07.23",
|
|
5
5
|
"schemaVersion": "1",
|
|
6
6
|
"initializationMode": "fast",
|
|
@@ -56,9 +56,15 @@
|
|
|
56
56
|
,"technicalLandscapeCoordination": true
|
|
57
57
|
,"databaseSqlOnlyAuthorization": true
|
|
58
58
|
,"projectAiTakeoverGate": true
|
|
59
|
+
,"hostPreflightRecovery": true
|
|
60
|
+
,"manualRoleSessionBinding": true
|
|
61
|
+
,"codeGraphIncrementalReuse": true
|
|
62
|
+
,"sharedProjectSnapshot": true
|
|
63
|
+
,"initializationTiming": true
|
|
59
64
|
,"hostCapabilityPreflight": true
|
|
60
65
|
,"projectStatusGate": true
|
|
61
66
|
,"takeoverBaseline": true
|
|
67
|
+
,"providerSpecificSessionBinding": true
|
|
62
68
|
},
|
|
63
69
|
"tasking": {
|
|
64
70
|
"currentTask": "xinyun-ai/current-task.md",
|
|
@@ -80,6 +86,8 @@
|
|
|
80
86
|
"roleExecutionTemplate": "xinyun-ai-init/templates/role-execution.template.md",
|
|
81
87
|
"roleSessionBindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
82
88
|
"roleSessionBindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json",
|
|
89
|
+
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
90
|
+
"providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
83
91
|
"projectStatus": "xinyun-ai/project-status.json",
|
|
84
92
|
"preflightReport": "xinyun-ai/preflight-report.json",
|
|
85
93
|
"onboardingReport": "xinyun-ai/onboarding-report.json",
|
|
@@ -93,8 +101,10 @@
|
|
|
93
101
|
"directory": "xinyun-ai/sessions/roles/",
|
|
94
102
|
"bindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
95
103
|
"bindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json",
|
|
104
|
+
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
105
|
+
"providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
96
106
|
"parentSessionId": null,
|
|
97
|
-
"targetVersion": "1.
|
|
107
|
+
"targetVersion": "1.12.1",
|
|
98
108
|
"requiredRoleCount": 5,
|
|
99
109
|
"statusEnum": [
|
|
100
110
|
"pending",
|
|
@@ -250,6 +260,34 @@
|
|
|
250
260
|
"databaseDefault": { "authorization": "not-requested", "executionStatus": "needs-confirmation", "redactionStatus": "verified" },
|
|
251
261
|
"readyRequires": ["projectIdentity", "codeGraph", "baseline", "teamResponsibility", "roleSessions", "taskTree", "localControlPlane", "legacyHandoff", "hostCapabilities", "sensitiveScan", "noHighRiskBlocker"]
|
|
252
262
|
},
|
|
263
|
+
"v112": {
|
|
264
|
+
"status": "implemented-in-package",
|
|
265
|
+
"capability": "initializationGateRecovery",
|
|
266
|
+
"hostPreflight": "xinyun-ai/host-preflight.json",
|
|
267
|
+
"initializationRecovery": "xinyun-ai/index/initialization-recovery.json",
|
|
268
|
+
"manualSessionBindings": "xinyun-ai/sessions/manual-bindings.json",
|
|
269
|
+
"sharedProjectSnapshot": "xinyun-ai/index/shared-project-snapshot.json",
|
|
270
|
+
"initializationTiming": "xinyun-ai/index/initialization-timing.json",
|
|
271
|
+
"hostCapabilityStatusEnum": ["available", "available-with-dependency", "unavailable", "permission-denied", "unknown", "not-checked", "not-verified", "failed"],
|
|
272
|
+
"preflightRequiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "recoverSession", "closeSession", "controlFileReadWrite"],
|
|
273
|
+
"resumeConfirmationPhrases": ["确认执行", "确认继续初始化"],
|
|
274
|
+
"codeGraphReuseStatuses": ["healthy", "initialized"],
|
|
275
|
+
"projectSnapshotReusePolicy": "reuse-until-business-or-codegraph-hash-changes",
|
|
276
|
+
"stageTimingRequiredFields": ["stageId", "attempt", "status", "startedAt", "finishedAt", "durationMs", "cacheHit", "failureReason", "bottleneck", "recoveryAction"]
|
|
277
|
+
},
|
|
278
|
+
"v1121": {
|
|
279
|
+
"status": "implemented-in-package",
|
|
280
|
+
"capability": "providerSpecificSessionBinding",
|
|
281
|
+
"providerBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
282
|
+
"providerBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
283
|
+
"providerEnum": ["codex"],
|
|
284
|
+
"bindingModeEnum": ["auto-created", "auto-reused", "manual", "recovery", "local-degraded"],
|
|
285
|
+
"bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
|
|
286
|
+
"identityEvidenceRequired": ["providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "source", "verifiedAt", "evidenceHash"],
|
|
287
|
+
"interactionEvidenceRequired": ["sendReceipt", "receiveReceipt", "transcriptHash", "messageCount", "recordedAt", "evidenceHash"],
|
|
288
|
+
"bindingGate": "provider canonical ID + identity evidence + interaction evidence + exclusive occupancy",
|
|
289
|
+
"unsupportedHostPolicy": "blocked-without-fake-provider-session-id"
|
|
290
|
+
},
|
|
253
291
|
"v111": {
|
|
254
292
|
"status": "implemented-in-package",
|
|
255
293
|
"capability": "initializationAcceleration",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"bindingId": "manual-session-binding-template",
|
|
4
|
+
"taskId": null,
|
|
5
|
+
"roleTaskId": null,
|
|
6
|
+
"roleId": null,
|
|
7
|
+
"sessionId": null,
|
|
8
|
+
"providerSessionId": null,
|
|
9
|
+
"projectRootHash": null,
|
|
10
|
+
"workspaceScope": null,
|
|
11
|
+
"title": null,
|
|
12
|
+
"cwd": null,
|
|
13
|
+
"sessionIdType": "host-returned-real-session",
|
|
14
|
+
"provider": "codex",
|
|
15
|
+
"bindingMode": "manual",
|
|
16
|
+
"boundBy": null,
|
|
17
|
+
"boundAt": null,
|
|
18
|
+
"evidence": [],
|
|
19
|
+
"evidenceRequiredFields": ["evidenceType", "source", "sessionId", "providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "interactionHash", "beforeSnapshotHash", "afterSnapshotHash", "recordedAt"],
|
|
20
|
+
"bindingStatus": "pending",
|
|
21
|
+
"bindingStatusEnum": ["pending", "bound", "rejected", "blocked", "released"],
|
|
22
|
+
"executionEligible": false,
|
|
23
|
+
"eligibilityRule": "bound + real sessionId + evidence verified + role onboarding ready",
|
|
24
|
+
"fakeSessionIdProhibited": true,
|
|
25
|
+
"rejectionReason": null,
|
|
26
|
+
"audit": [],
|
|
27
|
+
"createdAt": null,
|
|
28
|
+
"updatedAt": null
|
|
29
|
+
}
|
|
@@ -168,6 +168,15 @@
|
|
|
168
168
|
- 敏感扫描、业务文件 changedFiles 和禁止操作证明是否通过:待填写
|
|
169
169
|
- `projectStatus=ready` 和 `executionEligible=true` 是否仅在全部门禁通过后出现:待填写
|
|
170
170
|
|
|
171
|
+
## v1.12.1 provider session checks
|
|
172
|
+
|
|
173
|
+
- provider binding uses a host canonical `providerSessionId`: pending
|
|
174
|
+
- ordinary thread IDs, task IDs, titles, and summaries are rejected as provider identity: pending
|
|
175
|
+
- project, role, task, title, cwd, and exclusive occupancy evidence: pending
|
|
176
|
+
- redacted send/receive interaction evidence and transcript hash: pending
|
|
177
|
+
- manual binding without evidence remains pending/blocked: pending
|
|
178
|
+
- writeback recovery reuses task IDs, increments attempt, and creates no duplicate session: pending
|
|
179
|
+
|
|
171
180
|
## v1.9 检查
|
|
172
181
|
|
|
173
182
|
- 项目身份是否使用 realpath / lexical-fallback、Unicode NFC、projectRootHash 和 repositoryScopeHash:待填写
|
|
@@ -218,6 +218,8 @@
|
|
|
218
218
|
- roleSessionIdempotency:RFC8785-JCS-SHA-256(projectRootHash, workspaceScope, repositoryScopeHash, workstream, taskId, roleId, provider, targetVersion);v1.7.3 四字段仅作创建兼容索引,不参与候选选择、复用或跨项目身份判定
|
|
219
219
|
- parentSessionId:待填写
|
|
220
220
|
- real sessionId:待填写;不得伪造 sessionId
|
|
221
|
+
- providerSessionId:待填写;只能来自宿主 canonical session API,普通线程 ID 不得直接绑定
|
|
222
|
+
- provider binding:xinyun-ai/sessions/provider-session-bindings.json;必须有 identityEvidence、interactionEvidence 和 exclusive occupancy
|
|
221
223
|
- onboarding:created 后先只读 onboarding,不能直接 ready
|
|
222
224
|
- host unsupported:local-degraded-no-fake-session-id
|
|
223
225
|
- created-but-writeback-failed:待填写恢复线索
|
|
@@ -147,6 +147,10 @@
|
|
|
147
147
|
"directory": "xinyun-ai/sessions/roles/",
|
|
148
148
|
"bindings": "xinyun-ai/sessions/role-session-bindings.json",
|
|
149
149
|
"bindingTemplate": "xinyun-ai-init/templates/role-session-binding.template.json",
|
|
150
|
+
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
151
|
+
"providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
152
|
+
"providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
153
|
+
"providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
150
154
|
"requiredRoleCount": 5,
|
|
151
155
|
"statusEnum": [
|
|
152
156
|
"pending",
|
|
@@ -273,6 +277,30 @@
|
|
|
273
277
|
"databaseDefault": { "authorization": "not-requested", "executionStatus": "needs-confirmation", "redactionStatus": "verified" },
|
|
274
278
|
"readyRequires": ["projectIdentity", "codeGraph", "baseline", "teamResponsibility", "roleSessions", "taskTree", "localControlPlane", "legacyHandoff", "hostCapabilities", "sensitiveScan", "noHighRiskBlocker"]
|
|
275
279
|
},
|
|
280
|
+
"v112": {
|
|
281
|
+
"status": "implemented-in-package",
|
|
282
|
+
"capability": "initializationGateRecovery",
|
|
283
|
+
"hostPreflight": "xinyun-ai/host-preflight.json",
|
|
284
|
+
"initializationRecovery": "xinyun-ai/index/initialization-recovery.json",
|
|
285
|
+
"manualSessionBindings": "xinyun-ai/sessions/manual-bindings.json",
|
|
286
|
+
"sharedProjectSnapshot": "xinyun-ai/index/shared-project-snapshot.json",
|
|
287
|
+
"initializationTiming": "xinyun-ai/index/initialization-timing.json",
|
|
288
|
+
"hostCapabilityStatusEnum": ["available", "available-with-dependency", "unavailable", "permission-denied", "unknown", "not-checked", "not-verified", "failed"],
|
|
289
|
+
"preflightRequiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "recoverSession", "closeSession", "controlFileReadWrite"],
|
|
290
|
+
"resumeConfirmationPhrases": ["确认执行", "确认继续初始化"],
|
|
291
|
+
"codeGraphReuseStatuses": ["healthy", "initialized"],
|
|
292
|
+
"projectSnapshotReusePolicy": "reuse-until-business-or-codegraph-hash-changes",
|
|
293
|
+
"stageTimingRequiredFields": ["stageId", "attempt", "status", "startedAt", "finishedAt", "durationMs", "cacheHit", "failureReason", "bottleneck", "recoveryAction"]
|
|
294
|
+
},
|
|
295
|
+
"v1121": {
|
|
296
|
+
"status": "implemented-in-package",
|
|
297
|
+
"providerBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
|
|
298
|
+
"providerBindings": "xinyun-ai/sessions/provider-session-bindings.json",
|
|
299
|
+
"providerEnum": ["codex"],
|
|
300
|
+
"bindingModeEnum": ["auto-created", "auto-reused", "manual", "recovery", "local-degraded"],
|
|
301
|
+
"bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
|
|
302
|
+
"bindingGate": "provider canonical ID + identity evidence + interaction evidence + exclusive occupancy"
|
|
303
|
+
},
|
|
276
304
|
"v111": {
|
|
277
305
|
"status": "implemented-in-package",
|
|
278
306
|
"capability": "initializationAcceleration",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"bindingId": "provider-session-binding-template",
|
|
4
|
+
"provider": "codex",
|
|
5
|
+
"providerSessionId": null,
|
|
6
|
+
"providerSessionIdType": "provider-canonical-session",
|
|
7
|
+
"roleId": null,
|
|
8
|
+
"taskId": null,
|
|
9
|
+
"projectRootHash": null,
|
|
10
|
+
"workspaceScope": null,
|
|
11
|
+
"repositoryScopeHash": null,
|
|
12
|
+
"workstream": null,
|
|
13
|
+
"title": null,
|
|
14
|
+
"cwd": null,
|
|
15
|
+
"createdAt": null,
|
|
16
|
+
"identityEvidence": {
|
|
17
|
+
"providerSessionId": null,
|
|
18
|
+
"projectRootHash": null,
|
|
19
|
+
"workspaceScope": null,
|
|
20
|
+
"roleId": null,
|
|
21
|
+
"taskId": null,
|
|
22
|
+
"title": null,
|
|
23
|
+
"cwd": null,
|
|
24
|
+
"source": null,
|
|
25
|
+
"verifiedAt": null,
|
|
26
|
+
"evidenceHash": null
|
|
27
|
+
},
|
|
28
|
+
"interactionEvidence": {
|
|
29
|
+
"sendReceipt": null,
|
|
30
|
+
"receiveReceipt": null,
|
|
31
|
+
"transcriptHash": null,
|
|
32
|
+
"messageCount": 0,
|
|
33
|
+
"recordedAt": null,
|
|
34
|
+
"evidenceHash": null
|
|
35
|
+
},
|
|
36
|
+
"bindingMode": "auto-created",
|
|
37
|
+
"bindingStatus": "pending",
|
|
38
|
+
"executionEligible": false,
|
|
39
|
+
"bindingStatusEnum": ["pending", "validating", "bound", "blocked", "rejected", "released", "conflict", "recovery-required"],
|
|
40
|
+
"boundBy": null,
|
|
41
|
+
"boundAt": null,
|
|
42
|
+
"attempt": 1,
|
|
43
|
+
"recovery": {
|
|
44
|
+
"reuseTaskId": true,
|
|
45
|
+
"reuseRoleTaskId": true,
|
|
46
|
+
"incrementAttempt": true,
|
|
47
|
+
"createdDuplicateSession": false,
|
|
48
|
+
"recoveryReason": null,
|
|
49
|
+
"nextAction": null
|
|
50
|
+
},
|
|
51
|
+
"occupancy": {
|
|
52
|
+
"occupancyStatus": "unknown",
|
|
53
|
+
"occupiedByProjectRootHash": null,
|
|
54
|
+
"occupiedByRoleId": null,
|
|
55
|
+
"checkedAt": null
|
|
56
|
+
},
|
|
57
|
+
"blockedReason": null,
|
|
58
|
+
"audit": [],
|
|
59
|
+
"fakeProviderSessionIdProhibited": true
|
|
60
|
+
}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
- 会话创建成功后先进入 `sessionStatus=onboarding`,只读职责范围内资料并生成角色理解记录;不得因会话创建成功直接把任务标为 `ready` 或获得业务代码修改授权。
|
|
45
45
|
- 只有角色理解完成、职责确认完成、成员/会话绑定满足、确认人关系无冲突且执行门禁满足时,才允许 `sessionStatus=ready` 与 `executionEligible=true`。
|
|
46
46
|
- Codex 宿主不支持创建子会话、权限不足或创建失败时,必须保留 `sessionId=null`,记录 `sessionStatus=blocked/failed`、失败原因和本地降级说明,不得伪造会话。
|
|
47
|
+
- v1.12.1 起,`providerSessionId` 必须是 Codex 宿主 canonical session API 返回值;普通线程 ID、taskId、标题或历史摘要不得直接绑定。绑定前需验证项目身份、roleId、taskId、title、cwd、独占占用、`identityEvidence` 和 `interactionEvidence`。
|
|
47
48
|
|
|
48
49
|
## 幂等
|
|
49
50
|
|