@pm_zhousl/xinyun-ai-init 1.13.1 → 1.15.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 (49) hide show
  1. package/README.md +2 -0
  2. package/init/xinyun-ai-init/README.md +10 -1
  3. package/init/xinyun-ai-init/rules/init-rules.md +14 -0
  4. package/init/xinyun-ai-init/rules/session-workbench.md +4 -0
  5. package/init/xinyun-ai-init/rules/upgrade-rules.md +4 -0
  6. package/init/xinyun-ai-init/rules/v1.14.0-agent-core.md +35 -0
  7. package/init/xinyun-ai-init/rules/v1.15.0-session-binding.md +44 -0
  8. package/init/xinyun-ai-init/templates/README.template.md +1 -1
  9. package/init/xinyun-ai-init/templates/agent-capabilities.template.json +27 -0
  10. package/init/xinyun-ai-init/templates/agent-profile.template.json +26 -0
  11. package/init/xinyun-ai-init/templates/control-plane-index.template.json +7 -0
  12. package/init/xinyun-ai-init/templates/coordination-change-ledger.template.json +2 -0
  13. package/init/xinyun-ai-init/templates/coordination-project-facts.template.json +9 -0
  14. package/init/xinyun-ai-init/templates/core-rules.template.md +15 -0
  15. package/init/xinyun-ai-init/templates/current-task.template.md +9 -0
  16. package/init/xinyun-ai-init/templates/final-delivery.template.json +22 -0
  17. package/init/xinyun-ai-init/templates/handoff.template.json +32 -0
  18. package/init/xinyun-ai-init/templates/host-capabilities.template.json +2 -0
  19. package/init/xinyun-ai-init/templates/init-result.template.json +33 -1
  20. package/init/xinyun-ai-init/templates/manifest.template.json +42 -2
  21. package/init/xinyun-ai-init/templates/manual-session-binding.template.json +6 -0
  22. package/init/xinyun-ai-init/templates/manual-session-recovery.template.json +4 -0
  23. package/init/xinyun-ai-init/templates/orchestrator.template.json +18 -0
  24. package/init/xinyun-ai-init/templates/project-check.template.md +7 -0
  25. package/init/xinyun-ai-init/templates/project-guide.template.md +4 -0
  26. package/init/xinyun-ai-init/templates/project-index.template.json +34 -0
  27. package/init/xinyun-ai-init/templates/project-status.template.json +8 -0
  28. package/init/xinyun-ai-init/templates/provider-adapter.template.json +8 -2
  29. package/init/xinyun-ai-init/templates/role-execution.template.md +12 -0
  30. package/init/xinyun-ai-init/templates/role-session-binding.template.json +16 -3
  31. package/init/xinyun-ai-init/templates/session-binding.template.json +35 -0
  32. package/init/xinyun-ai-init/templates/takeover-gate.template.json +17 -0
  33. package/init/xinyun-ai-init/templates/task-graph.template.json +21 -0
  34. package/init/xinyun-ai-init/templates/task-index.template.json +15 -0
  35. package/init/xinyun-ai-init/templates/task-main.template.md +15 -0
  36. package/init/xinyun-ai-init/version.json +1 -1
  37. package/package.json +4 -1
  38. package/scripts/collect-v1.14-local-evidence.js +66 -0
  39. package/scripts/collect-v1.15-real-evidence.js +114 -0
  40. package/scripts/publish-with-token.ps1 +37 -1
  41. package/scripts/verify-init-package.js +82 -2
  42. package/scripts/verify-release-gate.js +48 -0
  43. package/scripts/verify-rules-package.js +100 -1
  44. package/test-scenarios/README.md +4 -0
  45. package/test-scenarios/review-template.md +10 -0
  46. package/test-scenarios/v1.14.0-behavior-evidence.json +780 -0
  47. package/test-scenarios/v1.14.0-scenarios.md +63 -0
  48. package/test-scenarios/v1.15.0-behavior-evidence.json +476 -0
  49. package/test-scenarios/v1.15.0-scenarios.md +57 -0
package/README.md CHANGED
@@ -55,6 +55,7 @@ npm run publish:token
55
55
  ```
56
56
 
57
57
  脚本会提示输入 npm token,临时写入 `.npmrc`,发布完成或失败后自动删除 `.npmrc`。
58
+ 发布脚本会先执行 `npm run verify:release`;当前 v1.14 支持明确的 `local-degraded` 证据模式,允许发布规则包但不会把项目标记为 `ready`。
58
59
 
59
60
  如果需要让 AI 代执行,可先在当前终端设置临时环境变量:
60
61
 
@@ -67,5 +68,6 @@ $env:NPM_TOKEN=$null
67
68
  发布前预演:
68
69
 
69
70
  ```powershell
71
+ npm run verify:release
70
72
  npm run publish:token:dry
71
73
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  本目录是“欣芸技术开发 Agent 流”的初始化包,负责把完整 AI 执行要求下发到目标项目。
4
4
 
5
- 当前规则版本:`1.13.1`。
5
+ 当前规则版本:`1.15.0`。
6
6
 
7
7
  ## Codex 一句话入口
8
8
 
@@ -22,6 +22,8 @@ v1.7.2 fixed task contract keys: `taskKind=initialization-main`, `taskKind=initi
22
22
  v1.7.3 fixed Codex role session creation compatibility fields: `provider=codex`, `sessionStatus=pending/creating/created/onboarding/ready/blocked/failed/closed`, and legacy creation index `{taskId,roleId,provider,targetVersion}`. v1.10.x takeover gates are authoritative for project readiness.
23
23
  v1.7.3 Codex role session orchestration is host-level only; CLI still only creates `xinyun-ai-init/`.
24
24
 
25
+ v1.14.0 adds the agent profile/capability declaration, aggregate takeover gate, orchestrator task graph, shared-fact handoffs, safe session naming/reuse, and final delivery gate. These controls are additive to v1.13.1; `providerSessionId` remains the only canonical provider identity in provider mode. When the host API is unavailable, `sessionIdentityMode=local-degraded` may use a control-plane `localSessionId` for local correlation only; it never makes the project `ready` or `executionEligible`.
26
+
25
27
  执行上面的命令后,会生成 `xinyun-ai-init/`。随后让 AI 读取 `xinyun-ai-init/README.md` 即可。
26
28
 
27
29
  ## AI 执行入口
@@ -56,6 +58,9 @@ AI 读取本文件后,必须按以下方式执行:
56
58
  26. 完成后用中文输出初始化或升级结果、项目导读、团队责任状态、任务状态、CodeGraph 状态、待确认问题和后续短指令。
57
59
  27. v1.10.2 必须区分宿主线程、宿主会话、项目会话和主调度会话;真实 sessionId 只能来自宿主返回值,无法验证时保持 blocked。
58
60
  28. v1.11.0 使用固定模板物化、阶段状态、项目快照、24 小时缓存和最多 3 个角色并发;缓存命中不能跳过必要会话、授权或最终门禁。
61
+ 29. v1.14.0 必须创建或补齐智能体档案、能力矩阵、接管门禁、主会话总控、任务图、交接记录和最终交付记录;任务状态使用 v1.13 机器状态并同步中文展示状态。
62
+ 30. v1.14.0 任务开始前读取公共快照、任务索引、近期变更、交接、契约和占用;任务结束后写回实际改动、跨任务影响、未完成事项和证据。
63
+ 31. v1.14.0 只有所有接管门禁、真实 provider 会话证据、共享事实一致性、冲突检查、敏感扫描、测试和审查通过后才允许 `ready`;没有宿主 API 时可使用 `local-degraded` 与 `localSessionId` 继续控制面工作,但状态必须保持 `partial`、`blocked` 或 `manual-required`。
59
64
 
60
65
  ## 初始化授权边界
61
66
 
@@ -1152,3 +1157,7 @@ Git none、无测试框架和工具链未检测只登记 `not-available/not-dete
1152
1157
  数据库正式模式为 `databaseAccessMode=local-files-read-only`,`legacyDatabaseAccessMode=sql-only` 仅为兼容标识;`sqlExecutionMode=generate-only`。只有数据库相关任务才读取项目内 `*.sql`、`*.ddl`、`*.schema`、`*.migration` 以及 `database/`、`migrations/`、`schema/`、`models/` 下的文本文件。严禁连接本地或线上数据库、打开 SQLite/数据库服务、查询真实数据、执行 SQL、migration、seed 或修改数据,也不自动安装驱动。连接、只读查询、结构变更和数据修改权限仍独立记录;四类授权状态固定为 `not-requested/requested/authorized/denied/expired/failed/unknown`,脱敏状态固定为 `verified/unverified/failed`。SQL 只作为 review 计划输出,需校验规范化 SQL、参数、方言、targetEnvironment、授权范围和 `statementHash`;授权过期或输入变化时回到 `executionStatus=needs-confirmation`,受影响授权进入 `expired` 并追加 audit。
1153
1158
 
1154
1159
  v1.9 不自动复用其他项目会话、不自动连接或修改数据库、不扩大 HTML 迁移范围,不执行 Git 写操作或 npm publish。
1160
+
1161
+ ## v1.15 会话契约修订
1162
+
1163
+ v1.14.0 已发布。v1.12.1/v1.13.x 中的 `providerSessionId` 仅作为历史 provider-session 兼容记录保留;后续规则以 `rules/v1.15.0-session-binding.md` 为准。新的会话绑定使用 `sessionId`、`sessionRefType`、`sessionRef`、项目/角色/任务身份和交互证据。普通 thread ID 只有在宿主可操作、项目归属匹配且七类证据完整时才可绑定,不能仅凭字段名称、taskId、文件名、标题或历史摘要进入 ready。
@@ -77,6 +77,16 @@ Run the seven-capability host preflight before role sessions. Materialize the ma
77
77
  - `businessCodeChanged.value=no` requires structured evidence; without evidence it must be `unknown`. Missing real behavior evidence cannot produce `ready`.
78
78
  - v1.11 stages are `preflight`, `fixed-materialization`, `control-plane`, `codegraph`, `bootstrap-snapshot`, `role-sessions`, `onboarding`, and `final-gate`. Fixed templates, a bounded project snapshot, a 24-hour cache, and at most three role sessions may reduce repeated work but cannot bypass the final gate.
79
79
 
80
+ ## v1.14.0 agent core
81
+
82
+ - Create `agent-profile.json`, `agent-capabilities.json`, `takeover-gate.json`, `tasks/orchestrator.json`, `tasks/task-graph.json`, `handoffs/` and `final-delivery.json` as control-plane records.
83
+ - Agent capability status is `ready/partial/blocked/manual-required`; missing provider evidence or unresolved required gates cannot be `ready`.
84
+ - The orchestrator owns requirement understanding, task decomposition, assignment, dependencies, result aggregation, conflict routing, test review and final delivery. Task creation is not task completion.
85
+ - Task records retain v1.13 machine statuses and add `statusCode`/`statusLabel`; the display labels are `待分析/待分配/执行中/待审查/待确认/已完成/阻塞/已取消`.
86
+ - Before execution, read the shared snapshot, active task index, recent changes, handoffs, contract snapshots and occupancy. After execution, write actual files, API/field/component/process impacts, unfinished work and evidence.
87
+ - Same-file, API, field, component or business-flow conflicts pause the affected task and require orchestrator/chief-engineer resolution.
88
+ - Final delivery must list completed, unfinished, blocked, changed files, business-code change status, tests, review, risks and next actions. Only all gates and evidence may produce `ready`.
89
+
80
90
  ## v1.7.2 角色后续任务可见性
81
91
 
82
92
  - 初始化主任务使用 `taskKind=initialization-main`;角色登记使用 `taskKind=initialization-record`;后续执行任务使用 `taskKind=role-execution`。
@@ -123,3 +133,7 @@ Run the seven-capability host preflight before role sessions. Materialize the ma
123
133
  - v1.9 fields: `sessionMatchStatus`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`coverageStatus=full`、`databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`targetEnvironment`。
124
134
 
125
135
  共享事实和 Skill 文件使用临时文件、完整校验和原子重命名。前端审计默认只读;临时会话只有用户确认的代码任务才可创建。不得修改业务代码、数据库、API、依赖、Git 或发布配置。
136
+
137
+ ## v1.15 adapter-neutral session binding
138
+
139
+ 历史 v1.12.1/v1.13.x 的 providerSessionId 记录只用于兼容读取。当前新任务必须使用 `sessionId`、`sessionRefType`、`sessionRef`、`hostId/provider`、项目/角色/任务身份和 identity/interaction evidence。`host-thread`、`provider-session`、`manual-reference`、`local-session` 均需按 adapter-neutral 规则验证;providerSessionId 不再是唯一身份键或 ready 硬门禁。
@@ -321,3 +321,7 @@ Record all seven host capabilities before role sessions. `available-with-depende
321
321
 
322
322
  数据库交接必须记录 `databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`sqlExecutionMode=generate-only`、四类授权、授权状态 `not-requested/requested/authorized/denied/expired/failed/unknown`、`statementHash`、targetEnvironment、`executionStatus`、`redactionStatus=verified/unverified/failed` 和完整 audit。仅允许按需读取本地 SQL/schema/migration/model 文本文件,严禁连接数据库或执行 SQL;授权变化后不得继续执行旧 SQL,执行状态回到 `needs-confirmation`。
323
323
  - v1.9 fields: `lexical-fallback`、`duplicate-not-primary`、`项目简称|角色中文名|职责名称`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`。
324
+
325
+ ## v1.15 会话绑定字段
326
+
327
+ 任务单和交接单新增 `sessionRefType`、`sessionRef`、`hostId`、`provider`、`identityEvidence`、`interactionEvidence`、`bindingStatus` 和 `bindingMode`。`sessionId` 仍是控制面关联键;旧 providerSessionId 只作为兼容字段。七类宿主证据不完整、跨项目或跨文件身份不一致时必须暂停或阻塞。
@@ -149,3 +149,7 @@ Before upgrade role-session work, read `xinyun-ai/index/initialization-recovery.
149
149
  - v1.9 fields: `sessionMatchStatus`、`duplicate-not-primary`、`selectionEvidence`、`项目简称|角色中文名|职责名称`、`technical-landscape`、`coverageStatus=full`、`RFC 8785 JCS-SHA-256`、`databaseAccessMode=local-files-read-only`、`legacyDatabaseAccessMode=sql-only`、`targetEnvironment`。
150
150
 
151
151
  同一 taskId + changeDomain 不得重复创建临时会话;容量不足进入 `queued`,unknown occupancy 保持占用,失败不得自动重试。升级不自动安装 Skill 依赖,不执行业务代码、数据库、API 或 Git 写操作。
152
+
153
+ ## v1.15 会话升级兼容
154
+
155
+ 升级读取旧 `providerSessionId` 时映射为 `sessionRefType=provider-session` 和 `sessionRef=providerSessionId`,不得伪造新证据。新会话发现和复用必须验证 `sessionRef` 可操作、项目/角色/任务/cwd/占用一致及七类证据;无法验证进入 pending/blocked/manual-required。普通 host-thread 不因名称自动无效,但也不能仅凭 thread ID 直接 ready。
@@ -0,0 +1,35 @@
1
+ # v1.14.0 agent core
2
+
3
+ ## Agent identity and capability declaration
4
+
5
+ Every initialized control plane records one `agent-profile.json` and one `agent-capabilities.json`. The profile identifies the agent, package version, project identity, service goal, configured roles, supported stacks/tools, allowed operations, forbidden operations, and ready prerequisites. Capability records must include detection method, status, dependency status, evidence, fallback plan, and unverified scope.
6
+
7
+ When the host does not expose a canonical provider API, the control plane may use `sessionIdentityMode=local-degraded` and a control-plane-generated `localSessionId` for local correlation. `localSessionId` is never a provider identity, never makes `sessionId` non-null, and never grants `ready` or `executionEligible`. Real provider mode continues to require `providerSessionId` and the v1.13 host evidence contract.
8
+
9
+ Agent capability status is `ready`, `partial`, `blocked`, or `manual-required`. Missing canonical provider evidence, unknown required host capability, or an unresolved high-risk conflict cannot be `ready`.
10
+
11
+ ## Takeover gate
12
+
13
+ `takeover-gate.json` is the aggregate decision for project control-plane readiness. It must verify the control plane, named main task, five role tasks, team responsibility records, CodeGraph status, provider session bindings, orchestrator registration, recovery records, indexes, shared facts, conflict checks, and sensitive scanning. Missing evidence produces `partial`, `blocked`, or `manual-required`; it never produces `ready`. Local-degraded operation may publish the package and continue read-only control-plane work, but the project remains non-ready until real provider evidence is bound.
14
+
15
+ ## Orchestrator and task graph
16
+
17
+ The main session owns requirement understanding, task decomposition, role assignment, dependency management, result aggregation, conflict routing, test review, and final delivery. `orchestrator.json` stores its identity and evidence. `task-graph.json` stores nodes and dependency edges.
18
+
19
+ Task records keep the v1.13 machine status and add `statusCode`/`statusLabel` for the unified workflow: `待分析`, `待分配`, `执行中`, `待审查`, `待确认`, `已完成`, `阻塞`, `已取消`. A task is complete only after its result, evidence, reviewer, and required write-backs pass validation.
20
+
21
+ ## Shared facts and handoff
22
+
23
+ Before execution, read the public project snapshot, active task index, recent change ledger, other handoffs, API/database/component records, and file/workflow occupancy. After execution, write back actual files and impacts, unfinished work, confirmations, evidence, and the next action. Same-file, API, field, component, or business-flow conflicts pause the task and require orchestrator/chief-engineer resolution.
24
+
25
+ ## Session naming and reuse
26
+
27
+ Display names follow `项目名|角色|职责或工作流`. Discovery and reuse require matching project identity, role, task scope, title, cwd, occupancy, idempotency key, and canonical `providerSessionId` evidence. Cross-project candidates are rejected and historical records are preserved. Host thread IDs, task IDs, filenames, titles, and history summaries remain evidence only and can never become a session ID.
28
+
29
+ ## Final delivery gate
30
+
31
+ The final delivery record must list completed and unfinished work, blocked tasks, actual changed files, business-code change status, tests, review results, risks, next actions, and all gate/evidence references. `ready` requires every required gate, provider evidence, shared-fact consistency, conflict check, sensitive scan, and reviewer result to pass.
32
+
33
+ ## Post-v1.14 compatibility direction
34
+
35
+ The package is published as v1.14.0. Its provider-specific session evidence remains historical compatibility material only. Starting with v1.15.0, use the adapter-neutral contract in `rules/v1.15.0-session-binding.md`: `sessionId` is the control-plane ID and `sessionRefType/sessionRef` identify the host reference. A `host-thread` value is acceptable only with operability, ownership and all seven interaction evidence categories. `providerSessionId` is retained only for `sessionRefType=provider-session` compatibility and is never the sole ready gate.
@@ -0,0 +1,44 @@
1
+ # v1.15.0 adapter-neutral session binding
2
+
3
+ ## Contract
4
+
5
+ v1.15.0 uses a host-independent session binding contract. `sessionId` is the control-plane role-session identifier. The host-operable reference is stored separately in `sessionRefType` and `sessionRef`.
6
+
7
+ Required binding fields are `sessionId`, `sessionRefType`, `sessionRef`, `hostId`, `provider`, `projectRootHash`, `workspaceScope`, `repositoryScope`, `workstream`, `roleId`, `taskId`, `title`, `cwd`, `identityEvidence`, `interactionEvidence`, `bindingStatus`, `bindingMode`, `createdAt`, and `updatedAt`.
8
+
9
+ `sessionRefType` is one of `host-thread`, `provider-session`, `manual-reference`, or `local-session`. The adapter decides the reference format. A `providerSessionId` may be retained as a historical provider-session record, but it is not the v1.15 canonical field and its field name cannot decide readiness.
10
+
11
+ ## Binding gate
12
+
13
+ Bind only when the reference is currently operable, belongs to the current project and workstream, matches `roleId`, `taskId`, `title`, `cwd`, workspace/repository scope and occupancy, and has complete identity and interaction evidence. `sessionId`, assignment/session binding, task index and init-result must agree.
14
+
15
+ The seven evidence categories are:
16
+
17
+ 1. create or reuse
18
+ 2. send
19
+ 3. receive
20
+ 4. query status
21
+ 5. recover
22
+ 6. close
23
+ 7. control-file read/write
24
+
25
+ Missing, stale, contradictory or unverifiable evidence keeps `bindingStatus=pending|blocked|manual-required`. It cannot produce `ready` or `executionEligible=true`.
26
+
27
+ ## Positive and negative rules
28
+
29
+ - A `host-thread` reference is valid only when the current host can send, receive and query that thread and identity evidence proves project/role/task ownership.
30
+ - A `provider-session` reference is accepted through the adapter compatibility path when the provider evidence is complete.
31
+ - A `manual-reference` may be bound only with an actor, timestamp, project/role/task identity evidence and all seven interaction records.
32
+ - A `local-session` is a control-plane correlation record only; it never authorizes real host reuse or ready.
33
+ - A bare thread ID, task ID, filename, title, history summary or user statement is not evidence of operability or ownership.
34
+ - A candidate from another project, workstream, repository scope or occupied role is rejected; history is preserved and never overwritten.
35
+ - Cross-project reuse is always rejected, even when the role name and title are identical.
36
+ - If fields disagree across task, assignment, binding, task-index or init-result, pause and route to the main session.
37
+
38
+ ## Compatibility
39
+
40
+ v1.12.1 and v1.13.x records remain readable. Map `providerSessionId` to `sessionRefType=provider-session` and `sessionRef=providerSessionId` without deleting the historical field. Do not rewrite historical evidence as if it had used the v1.15 contract.
41
+
42
+ ## Recovery and idempotency
43
+
44
+ Reuse the original task and role-task IDs, increment `attempt`, preserve audit records, and use the same idempotency key for retries. A failed create, send, receive, status query, recovery, close or control-file write never creates a duplicate binding. Conflicts stop writes until the main session resolves them.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## v1.12.1 provider session binding
6
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.
7
+ For v1.12.1/v1.13.x compatibility, historical provider bindings may contain provider-returned `providerSessionId`. The v1.15 contract is adapter-neutral: `sessionId` is the control-plane identifier and `sessionRefType/sessionRef` identify a host-thread, provider-session, manual-reference, or local-session reference. A normal thread ID is accepted only when it is currently operable and project/role/task ownership plus all seven evidence categories are verified. A bare taskId, title, filename, or history summary cannot bind a role; incomplete evidence cannot become ready or executionEligible.
8
8
 
9
9
  ## v1.13.0 host adapter and manual recovery
10
10
 
@@ -0,0 +1,27 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "agentId": "xinyun-ai-agent",
4
+ "capabilities": [
5
+ {
6
+ "capabilityId": "capability-template",
7
+ "name": "能力模板",
8
+ "category": "control-plane",
9
+ "required": true,
10
+ "detectionMethod": "not-checked",
11
+ "status": "unknown",
12
+ "statusEnum": ["ready", "partial", "blocked", "manual-required", "unknown"],
13
+ "dependencyStatus": "unknown",
14
+ "evidence": [],
15
+ "fallbackPlan": "blocked; preserve task IDs and emit next action",
16
+ "usedTools": [],
17
+ "unusedTools": [],
18
+ "unverifiedScope": [],
19
+ "failureReason": null,
20
+ "checkedAt": null
21
+ }
22
+ ],
23
+ "aggregateStatus": "manual-required",
24
+ "aggregateStatusEnum": ["ready", "partial", "blocked", "manual-required"],
25
+ "aggregateRule": "required capabilities and evidence must pass before ready; local-degraded may run with localSessionId but remains manual-required",
26
+ "updatedAt": null
27
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "agentId": "xinyun-ai-agent",
4
+ "name": "欣芸技术开发 Agent",
5
+ "version": "1.15.0",
6
+ "packageVersion": "1.15.0",
7
+ "projectIdentity": {
8
+ "projectRootHash": null,
9
+ "workspaceScope": "xinyun-ai-control",
10
+ "repositoryScopeHash": null,
11
+ "workstream": "project-control-plane"
12
+ },
13
+ "serviceGoal": "按用户确认的范围协作完成软件开发任务并提供可审计交付结论",
14
+ "configuredRoles": ["project-owner", "project-product", "chief-engineer", "programmer", "test-reviewer"],
15
+ "supportedStacks": [],
16
+ "supportedTools": [],
17
+ "allowedOperations": ["read-project-files", "write-control-plane", "run-approved-verification"],
18
+ "forbiddenOperations": ["fake-session-id", "database-connection", "sql-execution", "business-code-without-confirmation", "git-write", "dependency-install", "host-login", "npm-publish"],
19
+ "readyPrerequisites": ["control-plane", "task-tree", "team-responsibility", "codegraph", "provider-session-evidence", "orchestrator", "recovery-and-index-consistency", "sensitive-scan", "conflict-free"],
20
+ "capabilityStatus": "manual-required",
21
+ "capabilityStatusEnum": ["ready", "partial", "blocked", "manual-required"],
22
+ "evidence": [],
23
+ "unverifiedScope": ["real provider canonical session behavior"],
24
+ "createdAt": null,
25
+ "updatedAt": null
26
+ }
@@ -6,6 +6,13 @@
6
6
  "sessionIndex": "xinyun-ai/sessions/role-session-bindings.json",
7
7
  "roleIndex": "xinyun-ai/team/assignments.json",
8
8
  "factIndex": "xinyun-ai/coordination/project-facts.json",
9
+ "agentProfile": "xinyun-ai/agent-profile.json",
10
+ "agentCapabilities": "xinyun-ai/agent-capabilities.json",
11
+ "takeoverGate": "xinyun-ai/takeover-gate.json",
12
+ "orchestrator": "xinyun-ai/tasks/orchestrator.json",
13
+ "taskGraph": "xinyun-ai/tasks/task-graph.json",
14
+ "handoffsDirectory": "xinyun-ai/handoffs/",
15
+ "finalDelivery": "xinyun-ai/final-delivery.json",
9
16
  "evidenceIndex": "xinyun-ai/index/evidence-index.json",
10
17
  "eventLog": "xinyun-ai/events/events.jsonl",
11
18
  "lockFile": "xinyun-ai/task-lock.json",
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "changes": [],
4
+ "occupancy": [],
5
+ "conflictKeys": ["path", "api", "database-field", "component", "business-flow"],
4
6
  "recordContract": {
5
7
  "requiredFields": ["schemaVersion", "changeId", "taskId", "sessionId", "actor", "role", "changeDomain", "targetPaths", "baselineHash", "changeStatus", "evidence", "createdAt", "updatedAt"],
6
8
  "changeStatusEnum": ["proposed", "reserved", "in-progress", "completed", "conflict-pending", "blocked", "cancelled"],
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "facts": [],
4
+ "publicSnapshot": {
5
+ "snapshotId": null,
6
+ "snapshotHash": null,
7
+ "sourceRevision": null,
8
+ "refreshedAt": null,
9
+ "refreshTriggers": ["business-change", "control-plane-change", "codegraph-change", "source-revision-change"]
10
+ },
11
+ "executionReadContract": ["publicSnapshot", "taskIndex", "recentChanges", "handoffs", "contractSnapshots", "occupancy"],
12
+ "executionWriteContract": ["changedFiles", "apiChanges", "databaseFieldChanges", "componentChanges", "businessFlowChanges", "unfinishedWork", "pendingConfirmations", "evidence"],
4
13
  "recordContract": {
5
14
  "requiredFields": ["schemaVersion", "factId", "factType", "scope", "valueHash", "source", "taskId", "sessionId", "evidence", "confidence", "factStatus", "revision", "observedAt", "updatedAt"],
6
15
  "factStatusEnum": ["proposed", "confirmed", "superseded", "unknown", "blocked"]
@@ -618,6 +618,21 @@ Skill 分配使用 `assignmentStatus`,使用记录使用 `usageStatus`。固
618
618
 
619
619
  数据库正式 databaseAccessMode=local-files-read-only,legacyDatabaseAccessMode=sql-only 仅为兼容标识,sqlExecutionMode=generate-only。普通初始化不读取数据库文件;数据库相关任务仅可读取项目内受限的 SQL/schema/migration/model 文本文件。严禁连接本地或线上数据库、查询真实数据、执行 SQL、migration、seed 或数据修改。连接、只读查询、结构变更、数据修改分别授权,四类授权状态固定为 not-requested/requested/authorized/denied/expired/failed/unknown,redactionStatus 固定为 verified/unverified/failed;SQL 仅用于 review 计划,需校验规范化 SQL、参数、方言、targetEnvironment、授权范围生成的 statementHash。授权或输入变化时回到 needs-confirmation,并追加包含 auditId、action、actorType、actorId、authorizationType、statementHash、targetEnvironment、resultStatus、redactionStatus、evidence、at 的 audit。
620
620
 
621
+ ## v1.14.0 智能体核心能力
622
+
623
+ - 必须登记 `agent-profile.json` 和 `agent-capabilities.json`。智能体状态固定为 `ready/partial/blocked/manual-required`;宿主 canonical provider 证据缺失时不得 ready。宿主 API 不可用时允许显式 `sessionIdentityMode=local-degraded`,使用控制面生成的 `localSessionId` 做本地关联,但不得把它写入 `providerSessionId` 或把项目标记为 ready。
624
+ - 必须登记 `takeover-gate.json`、`tasks/orchestrator.json`、`tasks/task-graph.json`、`handoffs/` 和 `final-delivery.json`,并在 manifest、project-index、init-result 和 control-plane-index 中引用。
625
+ - 主会话负责需求理解、任务拆分、角色分配、依赖管理、结果汇总、冲突处理、测试审查和最终交付;任务创建不等于任务完成。
626
+ - 任务保留既有机器状态,并同步 `statusCode/statusLabel`:`待分析/待分配/执行中/待审查/待确认/已完成/阻塞/已取消`。
627
+ - 任务开始前必须读取公共快照、活动任务索引、近期变更、其他交接、契约快照和文件/工作流占用;完成后必须写回实际文件、API/字段/组件/流程影响、未完成事项、待确认项和证据。
628
+ - 同文件、接口、字段、组件或业务流程冲突时,相关任务进入 `conflict-pending` 或 `blocked`,由主会话/总工处理,不得静默覆盖。
629
+ - 会话展示名使用 `项目名|角色|职责或工作流`;provider 模式的发现和复用必须验证项目身份、职责、任务范围、cwd、占用、幂等键和 canonical `providerSessionId`。local-degraded 模式只能使用 `localSessionId` 做控制面关联,不能进行真实宿主复用,历史不得覆盖或删除。
630
+ - 最终交付必须列出已完成、未完成、阻塞任务、实际修改文件、业务代码变更、测试、审查、风险和下一步;所有接管门禁、会话证据、共享事实、冲突检查和敏感扫描通过后才可 ready。
631
+
632
+ ## v1.15 adapter-neutral session binding
633
+
634
+ v1.14.0 的 `providerSessionId` 规则保留为历史兼容契约。v1.15.0 使用 `sessionId`、`sessionRefType`、`sessionRef`、`hostId/provider`、项目身份、角色/任务范围、`identityEvidence` 和 `interactionEvidence`。`sessionRefType` 可为 `host-thread`、`provider-session`、`manual-reference` 或 `local-session`;字段名称本身不能决定会话是否有效。ready 必须验证引用可操作、项目/角色/任务匹配、占用无冲突,并具备 create/reuse、send、receive、query-status、recover、close、control-file read/write 七类证据。旧 `providerSessionId` 只能作为兼容映射,不得单独触发 ready。
635
+
621
636
  ## 自我学习
622
637
 
623
638
  发现可复用经验时,先记录为候选经验。候选经验必须标注来源、适用范围、可信度、状态和最后验证时间。用户确认后,才能合并进正式规则。
@@ -313,3 +313,12 @@
313
313
  - packet 失效原因:packet-stale / 待填写
314
314
  - databaseAccessMode:local-files-read-only(legacyDatabaseAccessMode=sql-only;sqlExecutionMode=generate-only)
315
315
  - 数据库连接、查询、结构变更、数据修改授权状态:待填写
316
+
317
+ ## v1.15 session binding
318
+
319
+ - sessionId:控制面角色会话标识
320
+ - sessionRefType:host-thread / provider-session / manual-reference / local-session
321
+ - sessionRef:宿主实际可操作引用;不能仅由 taskId、文件名、标题或历史摘要推断
322
+ - providerSessionId:历史兼容字段,可为空;不再作为唯一 ready 门禁
323
+ - identityEvidence / interactionEvidence:必须覆盖项目、角色、任务、cwd 和七类宿主操作
324
+ - bindingStatus:pending / blocked / manual-required / bound / conflict
@@ -0,0 +1,22 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "deliveryId": "delivery-template",
4
+ "taskId": null,
5
+ "orchestratorSessionId": null,
6
+ "status": "blocked",
7
+ "statusEnum": ["pending", "partial", "blocked", "ready"],
8
+ "completedItems": [],
9
+ "unfinishedItems": [],
10
+ "blockedTasks": [],
11
+ "changedFiles": [],
12
+ "businessCodeChanged": "unknown",
13
+ "tests": [],
14
+ "reviewResults": [],
15
+ "risks": [],
16
+ "nextActions": [],
17
+ "gateReferences": [],
18
+ "evidence": [],
19
+ "readyRule": "all required takeover gates, session evidence, shared facts, conflict checks, sensitive scan, tests and reviewer results must pass",
20
+ "createdAt": null,
21
+ "updatedAt": null
22
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "handoffId": "handoff-template",
4
+ "taskId": null,
5
+ "roleId": null,
6
+ "sessionId": null,
7
+ "fromActor": null,
8
+ "toActor": null,
9
+ "status": "pending",
10
+ "statusEnum": ["pending", "accepted", "blocked", "closed"],
11
+ "readBeforeExecution": {
12
+ "projectSnapshotHash": null,
13
+ "taskIndexRevision": null,
14
+ "recentChangeIds": [],
15
+ "otherHandoffIds": [],
16
+ "contractSnapshotIds": [],
17
+ "occupancyEvidence": []
18
+ },
19
+ "completedWork": [],
20
+ "changedFiles": [],
21
+ "apiChanges": [],
22
+ "databaseFieldChanges": [],
23
+ "componentChanges": [],
24
+ "businessFlowChanges": [],
25
+ "impactOnOtherTasks": [],
26
+ "unfinishedWork": [],
27
+ "pendingConfirmations": [],
28
+ "evidence": [],
29
+ "nextAction": null,
30
+ "createdAt": null,
31
+ "updatedAt": null
32
+ }
@@ -7,6 +7,8 @@
7
7
  "statusEnum": ["available", "available-with-dependency", "unavailable", "permission-denied", "unknown", "not-checked", "not-verified", "failed"],
8
8
  "dependencyStatusEnum": ["not-required", "required", "authorized", "not-authorized", "unknown"],
9
9
  "capabilityRequiredFields": ["capabilityId", "detectionMethod", "status", "evidence", "dependencyStatus", "fallbackPlan", "usedTools", "unusedTools", "unverifiedScope", "failureReason", "checkedAt"],
10
+ "historicalCapabilityContract": { "version": "1.10", "requiredCount": 6, "status": "legacy-compatible" },
11
+ "currentProviderCapabilityContract": { "version": "1.13.1", "requiredCount": 8, "source": "host-preflight.template.json", "requiredCapabilities": ["createRealSession", "reuseExistingSession", "sendTask", "receiveResult", "querySessionStatus", "recoverSession", "closeSession", "controlFileReadWrite"] },
10
12
  "evidenceRequiredFields": ["evidenceType", "source", "summaryOrHash", "checkedAt"],
11
13
  "unknownPolicy": "unknown-means-no-verifiable-evidence; never report verified or unavailable without evidence",
12
14
  "checkedAt": null,
@@ -9,7 +9,19 @@
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.13.1",
12
+ "targetVersion": "1.15.0",
13
+ "agentCore": {
14
+ "version": "1.15.0",
15
+ "profilePath": "xinyun-ai/agent-profile.json",
16
+ "capabilitiesPath": "xinyun-ai/agent-capabilities.json",
17
+ "takeoverGatePath": "xinyun-ai/takeover-gate.json",
18
+ "orchestratorPath": "xinyun-ai/tasks/orchestrator.json",
19
+ "taskGraphPath": "xinyun-ai/tasks/task-graph.json",
20
+ "finalDeliveryPath": "xinyun-ai/final-delivery.json",
21
+ "agentStatus": "manual-required",
22
+ "takeoverStatus": "blocked",
23
+ "taskStatusLabelMapVersion": "1.15.0"
24
+ },
13
25
  "idempotencyKey": null,
14
26
  "createdFiles": [],
15
27
  "updatedFiles": [],
@@ -124,6 +136,26 @@
124
136
  "sessionIdsRemainNullUntilDecision": true
125
137
  }
126
138
  },
139
+ "v114": {
140
+ "handoffsDirectory": "xinyun-ai/handoffs/",
141
+ "finalDeliveryPath": "xinyun-ai/final-delivery.json",
142
+ "requiredRoleCount": 5,
143
+ "orchestratorSessionId": null,
144
+ "taskGraphStatus": "blocked",
145
+ "takeoverGateStatus": "blocked",
146
+ "readyRequiresAllGates": true,
147
+ "realProviderEvidenceRequired": true
148
+ },
149
+ "v115": {
150
+ "status": "candidate",
151
+ "sessionBindingPath": "xinyun-ai/sessions/session-bindings.json",
152
+ "sessionBindingTemplate": "xinyun-ai-init/templates/session-binding.template.json",
153
+ "sessionIdentityMode": "adapter-neutral",
154
+ "canonicalControlPlaneId": "sessionId",
155
+ "requiredEvidenceCategories": ["create-or-reuse", "send", "receive", "query-status", "recover", "close", "control-file-read-write"],
156
+ "providerSessionIdPolicy": "compatibility-only; not the sole identity or ready gate",
157
+ "batchStatus": {"v1.15-A": "candidate", "v1.15-B": "candidate", "v1.15-C": "candidate"}
158
+ },
127
159
  "v19": {
128
160
  "projectIdentityPath": "xinyun-ai/project-identity.json",
129
161
  "technicalLandscapePath": "xinyun-ai/technical-landscape.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "projectName": "",
3
- "xinyunAiVersion": "1.13.1",
3
+ "xinyunAiVersion": "1.15.0",
4
4
  "scriptVersion": "2026.07.23",
5
5
  "schemaVersion": "1",
6
6
  "initializationMode": "fast",
@@ -14,6 +14,18 @@
14
14
  "git": "unknown"
15
15
  },
16
16
  "codegraph": { "enabled": false, "status": "unknown" },
17
+ "agentCore": {
18
+ "version": "1.15.0",
19
+ "profile": "xinyun-ai/agent-profile.json",
20
+ "capabilities": "xinyun-ai/agent-capabilities.json",
21
+ "takeoverGate": "xinyun-ai/takeover-gate.json",
22
+ "orchestrator": "xinyun-ai/tasks/orchestrator.json",
23
+ "taskGraph": "xinyun-ai/tasks/task-graph.json",
24
+ "handoffsDirectory": "xinyun-ai/handoffs/",
25
+ "finalDelivery": "xinyun-ai/final-delivery.json",
26
+ "statusEnum": ["ready", "partial", "blocked", "manual-required"],
27
+ "status": "manual-required"
28
+ },
17
29
  "index": { "primary": "json_markdown", "sqlite": "optional" },
18
30
  "capabilities": {
19
31
  "confirmationGate": true,
@@ -107,7 +119,7 @@
107
119
  "providerSessionBindingTemplate": "xinyun-ai-init/templates/provider-session-binding.template.json",
108
120
  "providerSessionBindings": "xinyun-ai/sessions/provider-session-bindings.json",
109
121
  "parentSessionId": null,
110
- "targetVersion": "1.13.1",
122
+ "targetVersion": "1.15.0",
111
123
  "requiredRoleCount": 5,
112
124
  "statusEnum": [
113
125
  "pending",
@@ -333,6 +345,34 @@
333
345
  "manualBindingConfirmationPhrase": "已创建,继续绑定",
334
346
  "noChoicePolicy": "remain-blocked-without-repeat-prompt"
335
347
  },
348
+ "v114": {
349
+ "status": "implemented-in-package",
350
+ "capability": "agentCoreAndTakeoverControl",
351
+ "agentProfile": "xinyun-ai/agent-profile.json",
352
+ "agentCapabilities": "xinyun-ai/agent-capabilities.json",
353
+ "takeoverGate": "xinyun-ai/takeover-gate.json",
354
+ "orchestrator": "xinyun-ai/tasks/orchestrator.json",
355
+ "taskGraph": "xinyun-ai/tasks/task-graph.json",
356
+ "handoffsDirectory": "xinyun-ai/handoffs/",
357
+ "finalDelivery": "xinyun-ai/final-delivery.json",
358
+ "agentStatusEnum": ["ready", "partial", "blocked", "manual-required"],
359
+ "takeoverStatusEnum": ["not-started", "assessing", "partial", "blocked", "manual-required", "ready"],
360
+ "taskStatusCodeEnum": ["captured", "pending", "executing", "waiting-review", "awaiting-confirmation", "completed", "blocked", "cancelled"],
361
+ "taskStatusLabelMap": {"captured": "待分析", "pending": "待分配", "executing": "执行中", "waiting-review": "待审查", "awaiting-confirmation": "待确认", "completed": "已完成", "blocked": "阻塞", "cancelled": "已取消"},
362
+ "readyRequires": ["controlPlane", "mainTask", "roleTasks", "teamResponsibility", "codeGraph", "roleSessions", "orchestrator", "recovery", "indexes", "sharedFacts", "conflicts", "sensitiveScan"]
363
+ },
364
+ "v115": {
365
+ "status": "candidate",
366
+ "sessionBindingTemplate": "xinyun-ai-init/templates/session-binding.template.json",
367
+ "sessionBindingPath": "xinyun-ai/sessions/session-bindings.json",
368
+ "sessionIdentityMode": "adapter-neutral",
369
+ "sessionIdentityFields": ["sessionId", "sessionRefType", "sessionRef", "hostId", "provider", "projectRootHash", "workspaceScope", "repositoryScope", "workstream", "roleId", "taskId", "title", "cwd", "identityEvidence", "interactionEvidence", "bindingStatus", "bindingMode", "createdAt", "updatedAt"],
370
+ "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
371
+ "requiredEvidenceCategories": ["create-or-reuse", "send", "receive", "query-status", "recover", "close", "control-file-read-write"],
372
+ "canonicalControlPlaneId": "sessionId",
373
+ "providerSessionIdPolicy": "compatibility-only; not the sole identity or ready gate",
374
+ "batchStatus": {"v1.15-A": "candidate", "v1.15-B": "candidate", "v1.15-C": "candidate"}
375
+ },
336
376
  "v111": {
337
377
  "status": "implemented-in-package",
338
378
  "capability": "initializationAcceleration",
@@ -6,6 +6,11 @@
6
6
  "roleId": null,
7
7
  "sessionId": null,
8
8
  "providerSessionId": null,
9
+ "sessionBindingContract": "adapter-neutral-v1.15",
10
+ "sessionRefType": "manual-reference",
11
+ "sessionRef": null,
12
+ "hostId": null,
13
+ "adapterNeutralRequiredEvidence": ["create-or-reuse", "send", "receive", "query-status", "recover", "close", "control-file-read-write"],
9
14
  "projectRootHash": null,
10
15
  "workspaceScope": null,
11
16
  "title": null,
@@ -31,6 +36,7 @@
31
36
  "bindingStatusEnum": ["pending", "bound", "rejected", "blocked", "released"],
32
37
  "executionEligible": false,
33
38
  "eligibilityRule": "bound + verified providerSessionId + all requiredHostEvidence + identity evidence + interaction evidence + role onboarding ready",
39
+ "v115EligibilityRule": "bound + operable sessionRef + project/role/task identity + seven evidence categories + role onboarding ready; providerSessionId is compatibility-only",
34
40
  "fakeSessionIdProhibited": true,
35
41
  "rejectionReason": null,
36
42
  "audit": [],
@@ -2,6 +2,9 @@
2
2
  "schemaVersion": 1,
3
3
  "recoveryId": "manual-session-recovery-template",
4
4
  "provider": "codex",
5
+ "sessionBindingContract": "adapter-neutral-v1.15",
6
+ "sessionRefTypeEnum": ["host-thread", "provider-session", "manual-reference", "local-session"],
7
+ "requiredEvidenceCategories": ["create-or-reuse", "send", "receive", "query-status", "recover", "close", "control-file-read-write"],
5
8
  "status": "not-started",
6
9
  "statusEnum": ["not-started", "guided", "awaiting-user", "validating", "recovered", "blocked", "failed"],
7
10
  "userDecisionEnum": ["manual-create", "defer", "redetect"],
@@ -42,6 +45,7 @@
42
45
  "decisionEvidence": [],
43
46
  "noChoicePolicy": "remain-blocked-without-repeat-prompt",
44
47
  "bindingRequiredFields": ["provider", "providerSessionId", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "boundBy", "boundAt", "identityEvidence", "interactionEvidence"],
48
+ "v115BindingRequiredFields": ["sessionId", "sessionRefType", "sessionRef", "hostId", "provider", "projectRootHash", "workspaceScope", "roleId", "taskId", "title", "cwd", "identityEvidence", "interactionEvidence", "bindingStatus", "bindingMode"],
45
49
  "decisionEvidenceSchema": ["decisionId", "userDecision", "actor", "source", "decidedAt", "inputHash", "evidenceHash"],
46
50
  "fakeProviderSessionIdProhibited": true,
47
51
  "createdAt": null,
@@ -0,0 +1,18 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "orchestratorId": "orchestrator-template",
4
+ "orchestratorSessionId": null,
5
+ "provider": "codex",
6
+ "parentTaskId": null,
7
+ "projectRootHash": null,
8
+ "workspaceScope": "xinyun-ai-control",
9
+ "responsibilities": ["requirement-understanding", "task-decomposition", "role-assignment", "dependency-management", "result-aggregation", "conflict-routing", "test-review", "final-delivery"],
10
+ "status": "blocked",
11
+ "statusEnum": ["pending", "active", "blocked", "closed"],
12
+ "identityEvidence": [],
13
+ "dispatchEvidence": [],
14
+ "taskGraphPath": "xinyun-ai/tasks/task-graph.json",
15
+ "nextAction": "obtain canonical orchestrator session evidence",
16
+ "createdAt": null,
17
+ "updatedAt": null
18
+ }
@@ -189,3 +189,10 @@
189
189
  - 数据库是否为 `local-files-read-only`(`sql-only` 仅兼容标识,SQL 仅生成):待填写
190
190
  - connectionStatus、queryAuthorization、schemaChangeAuthorization、dataMutationAuthorization 是否独立:待填写
191
191
  - statementHash、targetEnvironment、executionStatus 和 audit 是否完整:待填写
192
+
193
+ ## v1.15 会话门禁检查
194
+
195
+ - sessionRefType/sessionRef 是否来自可识别且可操作的宿主引用:待填写
196
+ - 项目身份、角色、任务、cwd、占用和跨文件 sessionId 是否一致:待填写
197
+ - create/reuse、send、receive、query-status、recover、close、control-file read/write 七类证据是否完整:待填写
198
+ - providerSessionId 是否仅作为兼容字段而非唯一 ready 条件:待填写
@@ -258,3 +258,7 @@
258
258
  - 技术全景:`xinyun-ai/technical-landscape.json`;只有 full coverage、空 unverifiedScope 和核心证据完整才可 ready。
259
259
  - packet:`requirement-packet.json` + `technical-impact-packet.json`;使用 RFC8785 JCS-SHA-256,失效时为 `packet-stale`。
260
260
  - 数据库默认 `local-files-read-only`,`sql-only` 仅为兼容标识;数据库相关任务只读本地 SQL/schema/migration/model 文本,连接、查询、结构变更和数据修改均禁止,SQL 仅生成供审阅,执行前校验 statementHash、目标环境和 audit。
261
+
262
+ ## v1.15 adapter-neutral session binding
263
+
264
+ 新任务按 `sessionId + sessionRefType + sessionRef` 记录会话。providerSessionId 仅保留历史兼容;host-thread 必须有可操作性、项目归属、角色/任务匹配和七类交互证据,缺失时保持 pending/blocked/manual-required。