@orion-agents/orion-code 0.3.0 → 0.3.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/CHANGELOG.md +42 -0
- package/README.md +24 -8
- package/README.zh-CN.md +23 -9
- package/dist/core/tool-artifacts.d.ts +2 -0
- package/dist/core/tool-artifacts.d.ts.map +1 -1
- package/dist/core/tool-artifacts.js +27 -1
- package/dist/core/tool-artifacts.js.map +1 -1
- package/dist/runtime/agent-runtime-controller.js +1 -2
- package/dist/runtime/agent-runtime-controller.js.map +1 -1
- package/dist/runtime/agent-runtime-protocol.d.ts +4 -0
- package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-protocol.js.map +1 -1
- package/dist/runtime/durable-tool-receipt-reader.d.ts +32 -0
- package/dist/runtime/durable-tool-receipt-reader.d.ts.map +1 -0
- package/dist/runtime/durable-tool-receipt-reader.js +130 -0
- package/dist/runtime/durable-tool-receipt-reader.js.map +1 -0
- package/dist/runtime/legacy-thread-materializer.d.ts +14 -1
- package/dist/runtime/legacy-thread-materializer.d.ts.map +1 -1
- package/dist/runtime/legacy-thread-materializer.js +44 -5
- package/dist/runtime/legacy-thread-materializer.js.map +1 -1
- package/dist/runtime/release-receipts.d.ts +6 -3
- package/dist/runtime/release-receipts.d.ts.map +1 -1
- package/dist/runtime/release-receipts.js +47 -4
- package/dist/runtime/release-receipts.js.map +1 -1
- package/dist/runtime/thread-event-store.d.ts +62 -9
- package/dist/runtime/thread-event-store.d.ts.map +1 -1
- package/dist/runtime/thread-event-store.js +363 -31
- package/dist/runtime/thread-event-store.js.map +1 -1
- package/dist/runtime/thread-session-index.d.ts +84 -0
- package/dist/runtime/thread-session-index.d.ts.map +1 -0
- package/dist/runtime/thread-session-index.js +503 -0
- package/dist/runtime/thread-session-index.js.map +1 -0
- package/dist/runtime/thread-session-view.d.ts +31 -13
- package/dist/runtime/thread-session-view.d.ts.map +1 -1
- package/dist/runtime/thread-session-view.js +116 -61
- package/dist/runtime/thread-session-view.js.map +1 -1
- package/dist/runtime/thread-ui-adapter.d.ts.map +1 -1
- package/dist/runtime/thread-ui-adapter.js +18 -58
- package/dist/runtime/thread-ui-adapter.js.map +1 -1
- package/dist/runtime/tool-detail-repository.d.ts.map +1 -1
- package/dist/runtime/tool-detail-repository.js +23 -19
- package/dist/runtime/tool-detail-repository.js.map +1 -1
- package/dist/runtime/tool-receipt-validator.d.ts +21 -0
- package/dist/runtime/tool-receipt-validator.d.ts.map +1 -0
- package/dist/runtime/tool-receipt-validator.js +157 -0
- package/dist/runtime/tool-receipt-validator.js.map +1 -0
- package/dist/services/redaction.d.ts +4 -0
- package/dist/services/redaction.d.ts.map +1 -1
- package/dist/services/redaction.js +63 -0
- package/dist/services/redaction.js.map +1 -1
- package/dist/services/session-index.d.ts +16 -0
- package/dist/services/session-index.d.ts.map +1 -1
- package/dist/services/session-index.js +45 -36
- package/dist/services/session-index.js.map +1 -1
- package/dist/services/session-storage.d.ts.map +1 -1
- package/dist/services/session-storage.js +3 -6
- package/dist/services/session-storage.js.map +1 -1
- package/dist/services/workspace-registry.d.ts +42 -0
- package/dist/services/workspace-registry.d.ts.map +1 -0
- package/dist/services/workspace-registry.js +222 -0
- package/dist/services/workspace-registry.js.map +1 -0
- package/dist/web/errors.d.ts +6 -0
- package/dist/web/errors.d.ts.map +1 -0
- package/dist/web/errors.js +13 -0
- package/dist/web/errors.js.map +1 -0
- package/dist/web/event-hub.d.ts +4 -0
- package/dist/web/event-hub.d.ts.map +1 -1
- package/dist/web/event-hub.js +71 -11
- package/dist/web/event-hub.js.map +1 -1
- package/dist/web/file-read-service.d.ts +55 -0
- package/dist/web/file-read-service.d.ts.map +1 -0
- package/dist/web/file-read-service.js +399 -0
- package/dist/web/file-read-service.js.map +1 -0
- package/dist/web/git-read-model-service.d.ts +77 -0
- package/dist/web/git-read-model-service.d.ts.map +1 -0
- package/dist/web/git-read-model-service.js +631 -0
- package/dist/web/git-read-model-service.js.map +1 -0
- package/dist/web/protocol.d.ts +63 -1
- package/dist/web/protocol.d.ts.map +1 -1
- package/dist/web/protocol.js +22 -1
- package/dist/web/protocol.js.map +1 -1
- package/dist/web/review-service.d.ts +38 -0
- package/dist/web/review-service.d.ts.map +1 -0
- package/dist/web/review-service.js +74 -0
- package/dist/web/review-service.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +273 -27
- package/dist/web/server.js.map +1 -1
- package/dist/web/terminal-manager.d.ts +155 -0
- package/dist/web/terminal-manager.d.ts.map +1 -0
- package/dist/web/terminal-manager.js +728 -0
- package/dist/web/terminal-manager.js.map +1 -0
- package/dist/web/terminal-server.d.ts +8 -0
- package/dist/web/terminal-server.d.ts.map +1 -0
- package/dist/web/terminal-server.js +275 -0
- package/dist/web/terminal-server.js.map +1 -0
- package/dist/web/workbench-controller.d.ts +48 -12
- package/dist/web/workbench-controller.d.ts.map +1 -1
- package/dist/web/workbench-controller.js +651 -158
- package/dist/web/workbench-controller.js.map +1 -1
- package/dist/web-client/assets/DiffViewer-DpKoD07C.js +5 -0
- package/dist/web-client/assets/FilesPanel-BkoLmgjR.js +2 -0
- package/dist/web-client/assets/GitPanel-D20StcdG.js +1 -0
- package/dist/web-client/assets/ReviewPanel-3MVWbMQV.js +1 -0
- package/dist/web-client/assets/TerminalPanel-BLQ592Fb.js +21 -0
- package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +1 -0
- package/dist/web-client/assets/index-BkIDl_xk.js +16 -0
- package/dist/web-client/assets/index-DXMpnWE8.css +1 -0
- package/dist/web-client/index.html +2 -2
- package/docs/architecture/v0.3.0-web-api.yaml +44 -13
- package/docs/architecture/v0.3.1-web-api.yaml +2290 -0
- package/docs/migration/v0.3.0-to-v0.3.1.md +88 -0
- package/docs/plan/v0.3.0-web-workbench-plan.md +58 -7
- package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +848 -0
- package/docs/readme.md +10 -0
- package/docs/test/v0.3.1-web-workbench-e2e-plan.md +140 -0
- package/npm-shrinkwrap.json +185 -354
- package/package.json +16 -4
- package/dist/web-client/assets/index-BAEO71Gp.css +0 -1
- package/dist/web-client/assets/index-DSkFy7gM.js +0 -13
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Orion Code v0.3.0 → v0.3.1 Web Workbench 迁移说明
|
|
2
|
+
|
|
3
|
+
v0.3.1 将 Web Workbench 从固定三栏升级为多项目导航和专业工程面板,同时保持单一 active
|
|
4
|
+
Workspace/Runtime。迁移不会复制 Session、重写 Thread history,也不会把 terminal 变成 durable Session。
|
|
5
|
+
|
|
6
|
+
## 升级前准备
|
|
7
|
+
|
|
8
|
+
1. 停止正在运行的 `orion web` Host,并确认重要终端任务已经结束;浏览器终端不会跨 Host 重启恢复。
|
|
9
|
+
2. 备份 `$ORION_CODE_CONFIG_DIR/orion.json` 与现有 Session/Thread 数据目录。
|
|
10
|
+
3. 记录当前活动 Workspace 和 Session;不要在问题报告中粘贴绝对路径、凭据或 terminal 输出。
|
|
11
|
+
4. 使用受支持的 Node 22.12+、24 或 26。Node 20 不属于 v0.3.1 发布合同。
|
|
12
|
+
|
|
13
|
+
## 多项目注册表
|
|
14
|
+
|
|
15
|
+
首次运行时,Host 会从当前工作区和已有 Session project metadata 幂等导入 WorkspaceRegistryV1。
|
|
16
|
+
|
|
17
|
+
- 注册表只保存规范化项目身份、显示标签、最近使用时间和 pin 顺序;
|
|
18
|
+
- 它不会复制项目文件、删除 Session 或同时启动多个 Agent Runtime;
|
|
19
|
+
- 不存在或不可访问的项目显示 unavailable,可从注册表移除;移除不删除磁盘目录或历史;
|
|
20
|
+
- 展开 inactive project 只读取轻量 Session page/Git summary,不激活 Runtime;
|
|
21
|
+
- 点击另一个项目的 Session 通过一次 `workspaceId + sessionId + expectedContextRevision` 原子切换。
|
|
22
|
+
|
|
23
|
+
陈旧 Context guard 返回 `409 context_revision_conflict`,Host 保持原 context,且不得投递命令、
|
|
24
|
+
创建 PTY、读错 workspace 或产生其他副作用。客户端应重新读取 bootstrap 后显式重试。
|
|
25
|
+
|
|
26
|
+
## 布局偏好
|
|
27
|
+
|
|
28
|
+
右侧 Work panel 的桌面宽度默认 420px,可用 IDE 式鼠标指针在 320–720px 间拖动调整,双击
|
|
29
|
+
分隔条复位。
|
|
30
|
+
|
|
31
|
+
- 精细调宽没有键盘入口;键盘用户可以展开/折叠面板,并在 drawer 中访问全部功能;
|
|
32
|
+
- 窄屏自动切换 drawer,不覆盖桌面宽度偏好;返回桌面时恢复;
|
|
33
|
+
- 无效或越界旧值会被 clamp/忽略,不阻止 Workbench 启动;
|
|
34
|
+
- 当前面板、折叠态和桌面宽度是 UI preference,不是 Runtime 或 Session 权威状态。
|
|
35
|
+
|
|
36
|
+
## 文件、Git 与审阅
|
|
37
|
+
|
|
38
|
+
这些面板都是 Host 管理的只读投影:
|
|
39
|
+
|
|
40
|
+
- 文件操作使用 opaque id;Host 每次读取都重新检查 canonical workspace containment;
|
|
41
|
+
- sensitive file、workspace 外 symlink、non-regular path 和 stale revision 均 fail-closed;
|
|
42
|
+
- Git 只使用 argv 执行 bounded status/log/diff,不提供 checkout、reset、stage、commit 或 push;
|
|
43
|
+
- binary 文件只返回 metadata,文本和 Diff 采用 revision-bound 分页并在 Host 端脱敏;
|
|
44
|
+
- “发送到 Composer”只把用户选择的安全文本加入草稿,不直接修改文件。
|
|
45
|
+
|
|
46
|
+
## 真实终端
|
|
47
|
+
|
|
48
|
+
v0.3.1 terminal 是显式用户启动的真实本地 PTY,是高权限、非 durable 表面:
|
|
49
|
+
|
|
50
|
+
- 仅在 active workspace 启动,环境变量经过 allowlist/scrub;
|
|
51
|
+
- attach ticket 单次使用且短时有效,只能放在 WebSocket 首个 JSON 消息中;
|
|
52
|
+
- 刷新页面时,只要原 Host 仍存活可申请新 ticket 并按 sequence reconnect;
|
|
53
|
+
- 输出缓冲已经截断时返回明确 gap;不补造丢失字节;
|
|
54
|
+
- Host 重启后旧 terminal 显示 lost,不从 Session、日志或 snapshot 恢复;
|
|
55
|
+
- close、workspace switch 和 Host shutdown 会终止拥有的进程树。
|
|
56
|
+
|
|
57
|
+
terminal 字节不会进入 Workbench SSE、Thread transcript、diagnostics、release stdout/stderr 或持久设置。
|
|
58
|
+
|
|
59
|
+
## API 客户端变化
|
|
60
|
+
|
|
61
|
+
自定义 v0.3.0 Web 客户端升级时应改用
|
|
62
|
+
[`v0.3.1 OpenAPI`](../architecture/v0.3.1-web-api.yaml):
|
|
63
|
+
|
|
64
|
+
- active workspace/session/resource 请求携带 `workspaceId` 和 `expectedContextRevision`;
|
|
65
|
+
- mutation 的 `requestId` 是 UUID;session command 仍携带 `expectedSessionId`;
|
|
66
|
+
- 新增 Workspace registry/session summary、files、Git、review、terminal REST 资源;
|
|
67
|
+
- terminal 使用独立 `orion-terminal-v1` WebSocket,不能从 SSE 读取 terminal output;
|
|
68
|
+
- `workspace_resource_invalidated` 只提示按 revision 重取,不携带文件、Diff 或 terminal 内容。
|
|
69
|
+
|
|
70
|
+
不要在 409 后盲目重放旧 body;先获取新 bootstrap,确认用户仍希望对同一目标执行,再生成新的
|
|
71
|
+
context-bound mutation。只有 byte-equivalent body 才能复用原 requestId。
|
|
72
|
+
|
|
73
|
+
## 回滚到 v0.3.0
|
|
74
|
+
|
|
75
|
+
1. 关闭浏览器并停止 v0.3.1 Host,等待所有 terminal 进程退出;如有异常,先核对进程所有权再处理。
|
|
76
|
+
2. 保留一份 v0.3.1 WorkspaceRegistry/layout preference 备份以便排查;v0.3.0 不依赖这些数据。
|
|
77
|
+
3. 使用升级前备份恢复 `orion.json`(如果升级期间修改过 Settings)。
|
|
78
|
+
4. 安装并启动确切的 v0.3.0 artifact,再显式选择原 Workspace/Session。
|
|
79
|
+
5. 验证 Thread history、当前模型、Goal/Plan 和 pending approval;不要从 terminal 输出重建历史。
|
|
80
|
+
|
|
81
|
+
回滚不会自动恢复已关闭或 lost 的 terminal,也不应删除 v0.3.1 创建的项目文件。WorkspaceRegistry
|
|
82
|
+
和布局偏好不是 Session 权威源;旧版本忽略它们不代表数据被删除。
|
|
83
|
+
|
|
84
|
+
## 升级验证
|
|
85
|
+
|
|
86
|
+
按 [`v0.3.1 Web E2E 资格计划`](../test/v0.3.1-web-workbench-e2e-plan.md)执行
|
|
87
|
+
WEB31-P0-01..12。只有 source-clean exact-tarball、真实 Chrome、Node 22.12/24/26 和最终 receipt
|
|
88
|
+
均为 GO,才能把当前候选标记为发布完成。
|
|
@@ -82,7 +82,13 @@ Loopback Web Host (node:http)
|
|
|
82
82
|
- Every mutation, including workspace/session transitions, settings changes and runtime commands,
|
|
83
83
|
has a client-generated `requestId`. A bounded result cache keyed by both `requestId` and request
|
|
84
84
|
digest makes exact retries idempotent for the lifetime of the server process; reuse with a
|
|
85
|
-
different body returns `409 Conflict`.
|
|
85
|
+
different body returns `409 Conflict`. Accepted IDs are never evicted: after 4,096 distinct
|
|
86
|
+
mutations the Host fails new IDs closed with `503 mutation_capacity_exhausted` until restart,
|
|
87
|
+
instead of risking duplicate side effects.
|
|
88
|
+
- Every runtime command also carries `expectedSessionId`. The Host compares it with the active
|
|
89
|
+
Session in the same synchronous admission step as dispatch; a concurrent Session transition or
|
|
90
|
+
mismatch returns `409 active_session_changed`/`runtime_busy` without executing or replaying the
|
|
91
|
+
command.
|
|
86
92
|
- Settings are a compare-and-swap resource. Reads return `revision`; writes carry both `requestId`
|
|
87
93
|
and `expectedRevision`, and a stale revision returns `409 Conflict` without applying any field.
|
|
88
94
|
- Durable events have increasing cursors and are replayed after reconnect. Ephemeral deltas may be
|
|
@@ -90,8 +96,11 @@ Loopback Web Host (node:http)
|
|
|
90
96
|
- Every event envelope includes `sessionId` and `threadId`. Runtime events require both keys but
|
|
91
97
|
allow either value to be `null` before a session/Thread exists; committed Thread events require
|
|
92
98
|
both identities to be non-null.
|
|
93
|
-
- Collection reads use bounded
|
|
94
|
-
|
|
99
|
+
- Collection reads use bounded, revision-bound keyset pagination. The opaque cursor binds route
|
|
100
|
+
scope, the complete ordered collection digest and the last stable item key. If the collection
|
|
101
|
+
changes, the Host returns `409 collection_cursor_stale`; the browser reloads page one instead of
|
|
102
|
+
risking duplicate or skipped items. These cursors are distinct from the monotonically increasing
|
|
103
|
+
numeric SSE cursor.
|
|
95
104
|
|
|
96
105
|
### HTTP read and mutation surface
|
|
97
106
|
|
|
@@ -110,13 +119,30 @@ The session snapshot follows `WebSessionSnapshotV1` exactly: nullable `threadId`
|
|
|
110
119
|
`threadCursor` and `eventCursor`, optional `projectionDigest`/`activeTurnId`, `threadStatus`, a
|
|
111
120
|
cursor-paged `TranscriptPage`, the runtime view, pending approvals, nullable TurnCommit Goal and
|
|
112
121
|
three-field Plan projections, and `recoveryDiagnostics`. A legacy snapshot has `threadId: null` and
|
|
113
|
-
`threadStatus: legacy`; the Web client must not synthesize a Thread identity.
|
|
122
|
+
`threadStatus: legacy`; the Web client must not synthesize a Thread identity. A v2 transcript cursor
|
|
123
|
+
binds the Thread identity and immutable transcript-manifest revision. A newer Thread makes an older
|
|
124
|
+
cursor fail with `409 transcript_cursor_stale`, requiring a fresh tail snapshot.
|
|
114
125
|
|
|
115
126
|
Tool details are workspace/project-scoped because the current artifact metadata records artifact
|
|
116
127
|
identity, tool name and byte size but no `sessionId`. The API resolves only against the active
|
|
117
|
-
workspace and never exposes the artifact path
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
workspace and never exposes the artifact path. Byte ranges address a pre-sanitized derivative,
|
|
129
|
+
never the raw artifact, so an arbitrary offset cannot skip a sensitive-field label. The API still
|
|
130
|
+
cannot claim or prove that an artifact belongs to a particular session. Session-scoped routes
|
|
131
|
+
require a future provenance-bearing artifact format and are not part of the v0.3.0 contract.
|
|
132
|
+
|
|
133
|
+
### 2026-08-29 — long-session paging closure
|
|
134
|
+
|
|
135
|
+
- Added a persisted, digest-bound Thread head and immutable transcript page manifest. A healthy
|
|
136
|
+
fresh-process v2 snapshot reads the requested page directly and does not reopen the full
|
|
137
|
+
projection or replay the JSONL log; missing, stale or corrupt derived state falls back to one
|
|
138
|
+
authoritative rebuild.
|
|
139
|
+
- The browser now loads one bounded page for Workspaces, Sessions, Skills, MCP and tool-detail
|
|
140
|
+
summaries. Additional pages require an explicit user action; it no longer drains every page into
|
|
141
|
+
memory during bootstrap.
|
|
142
|
+
- Collection continuations and transcript continuations now have separate stale-cursor contracts,
|
|
143
|
+
both fail closed with 409, and both have Host/client/reducer regression coverage.
|
|
144
|
+
- The verification figures below predate this storage evolution. A fresh exact-tarball browser and
|
|
145
|
+
Node 22/24/26 release matrix must be generated before this newer candidate can be called complete.
|
|
120
146
|
|
|
121
147
|
### Runtime ownership
|
|
122
148
|
|
|
@@ -323,3 +349,28 @@ Node 22/24/26 matrix. Historical 20/22/24 receipts do not satisfy the current co
|
|
|
323
349
|
artifact still records a dirty source tree, so a source-clean commit must generate a new tarball and
|
|
324
350
|
obtain digest-bound remote receipts before publication. This plan does not itself claim a commit,
|
|
325
351
|
push, tag, GitHub Release or npm publication.
|
|
352
|
+
|
|
353
|
+
### 2026-08-29 — composer dock, recovery and paging quality closure
|
|
354
|
+
|
|
355
|
+
- The center column is now an explicit header/transcript/composer grid. Transcript history scrolls
|
|
356
|
+
independently while pending approvals, the follow-up queue and the composer remain in a bounded
|
|
357
|
+
bottom dock; the mobile Steer action remains reachable. Drafts are keyed by Session, and streaming
|
|
358
|
+
growth is observed without forcing users who scrolled upward back to the tail.
|
|
359
|
+
- Snapshot recovery now rejects inactive or mismatched Session state, treats `replay_reset` as a
|
|
360
|
+
terminal barrier, and binds every Session command to the expected active Session. Collection
|
|
361
|
+
continuations and transcript continuations use separate revision-bound cursors; the browser loads
|
|
362
|
+
only the first page until the user explicitly asks for more.
|
|
363
|
+
- Large tool output is served only from a pre-sanitized browser derivative. The derivative byte
|
|
364
|
+
offset is the paging authority, so arbitrary offsets cannot bypass label-based redaction in the
|
|
365
|
+
raw artifact.
|
|
366
|
+
- The exact local candidate tgz, bound to the receipt stored outside the package payload, passed the
|
|
367
|
+
complete system Chrome 152 journey, 22/22 scenarios, on Node 22.22.3. The run records
|
|
368
|
+
`layout.composer_docked=true`, zero console errors/warnings, zero page errors, zero HTTP 5xx, zero
|
|
369
|
+
secret findings and zero dropped events.
|
|
370
|
+
- The same source passed 289/289 Jest suites and 3,620 tests, with 5 existing platform-conditioned
|
|
371
|
+
skips. The generated client contains 44 modules (277.19 kB JavaScript and 54.45 kB CSS before
|
|
372
|
+
gzip).
|
|
373
|
+
|
|
374
|
+
This remains a dirty local development candidate. A source-clean commit must produce a new SHA and
|
|
375
|
+
obtain the required Node 22/24/26 receipts before push, release tagging or npm publication can be
|
|
376
|
+
described as complete.
|