@niracler/encore 0.2.0 → 0.4.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.
- package/README.md +64 -103
- package/README.zh-CN.md +65 -97
- package/bin/encore.mjs +60 -120
- package/package.json +5 -3
- package/player/encore-player.css +125 -44
- package/player/encore-player.js +563 -287
- package/schema/session.schema.json +64 -2
- package/skills/encore/SKILL.md +39 -35
- package/src/antigravity.mjs +162 -0
- package/src/attachment-previews.mjs +169 -0
- package/src/attachment-reader.mjs +169 -0
- package/src/claude-ai.mjs +3 -1
- package/src/claude-code.mjs +11 -7
- package/src/codex.mjs +10 -3
- package/src/common.mjs +30 -7
- package/src/detect.mjs +96 -51
- package/src/external-files.mjs +193 -0
- package/src/i18n.mjs +108 -28
- package/src/index.d.ts +22 -3
- package/src/index.mjs +73 -44
- package/src/markdown.mjs +14 -11
- package/src/player-assets.mjs +4 -1
- package/src/player-runtime.mjs +147 -131
- package/src/render.mjs +83 -83
- package/src/server.mjs +2 -0
- package/src/session-picker.mjs +162 -0
- package/src/timeline.mjs +44 -35
- package/src/workbuddy.mjs +6 -5
package/README.md
CHANGED
|
@@ -1,137 +1,98 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="./docs/hero-en.svg" alt="Encore
|
|
2
|
+
<img src="./docs/hero-en.svg" alt="Encore · Replay an AI Agent session to see how it worked and what it delivered." width="100%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://encore.niracler.com"><strong>
|
|
7
|
-
<a href="https://www.npmjs.com/package/@niracler/encore"><strong>npm ↗</strong></a> ·
|
|
8
|
-
<a href="./README.md"><strong>English</strong></a> ·
|
|
6
|
+
<a href="https://encore.niracler.com/?demo=poster-redesign&lang=en"><strong>Watch Codex redesign a course poster</strong></a> ·
|
|
9
7
|
<a href="./README.zh-CN.md">简体中文</a>
|
|
10
8
|
</p>
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
[](https://encore.niracler.com/?demo=poster-redesign&lang=en)
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## Replay your own session
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<th width="33%" align="left">Stage Left · The Performance</th>
|
|
20
|
-
<th width="33%" align="left">Stage Right · Context X-Ray</th>
|
|
21
|
-
<th width="33%" align="left">Bottom · Milestone Timeline</th>
|
|
22
|
-
</tr>
|
|
23
|
-
</thead>
|
|
24
|
-
<tbody>
|
|
25
|
-
<tr>
|
|
26
|
-
<td valign="top">Typewriter prompt input, streaming Markdown replies, <code>12×</code> tool call shimmer, sub-agent dispatches, and inline <code>.webp</code> visual outputs.</td>
|
|
27
|
-
<td valign="top">Live <code>200k</code> / <code>1.0M</code> token gauge, 7-color bucket bar, auto-compaction headroom markers, and click-to-inspect raw payloads at any step.</td>
|
|
28
|
-
<td valign="top">Step-by-step scrubber pinned with visual keyframes (<code>🖼</code>), draft docs (<code>📄</code>), context compactions (<code>🗜</code>), and user turns (<code>💬</code>).</td>
|
|
29
|
-
</tr>
|
|
30
|
-
</tbody>
|
|
31
|
-
</table>
|
|
14
|
+
```bash
|
|
15
|
+
npx @niracler/encore@latest
|
|
16
|
+
```
|
|
32
17
|
|
|
33
|
-
|
|
18
|
+
Requires Node.js 20.10 or later. Choose a local Codex, Claude Code, WorkBuddy or Antigravity session to open its replay in your browser. Press `Tab` to switch agents and `/` to search titles and first user messages in the current tab. Search includes identifiable archived sessions. `Esc` restores your previous position.
|
|
34
19
|
|
|
35
|
-
|
|
20
|
+
Antigravity App and CLI share a tab with the source shown on each row. The picker prefers `transcript_full.jsonl` and falls back to `transcript.jsonl`. Passing a path imports exactly that file. The picker reads the Antigravity index using Node’s built-in SQLite or a local `sqlite3` executable. If the index is unavailable, it uses transcripts and title annotations and cannot identify archives recorded only in the index. For Claude.ai, pass the path to your exported `conversations.json` to the same command.
|
|
36
21
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
Encore writes to a temporary directory by default. To keep the replay, add `-o ./my-replay` to the command.
|
|
23
|
+
|
|
24
|
+
## How it works
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<picture>
|
|
28
|
+
<source media="(prefers-color-scheme: dark)" srcset="./docs/architecture-en-dark.webp">
|
|
29
|
+
<source media="(prefers-color-scheme: light)" srcset="./docs/architecture-en-light.webp">
|
|
30
|
+
<img src="./docs/architecture-en-light.webp" alt="Encore architecture: from raw Agent logs and referenced local files in Asset Roots, through automatic CLI export and optional pre-publish Curation, to a portable Replay and standalone Player" width="100%">
|
|
31
|
+
</picture>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## FAQ
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
<details>
|
|
37
|
+
<summary>Does Encore upload my logs? What should I check before sharing?</summary>
|
|
38
|
+
|
|
39
|
+
Export runs locally. Encore redacts common secrets, email addresses and local paths in `session.json`. Before publishing, review the conversation, screenshots and attachments for details such as internal project names or business figures. PDFs, spreadsheets and other attachments are copied as they are.
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
To pick screenshots, trim the conversation or write an introduction, install the [Encore skill](./skills/encore/SKILL.md) and ask your agent to prepare your latest session for sharing.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx skills add niracler/encore -g
|
|
48
45
|
```
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
</details>
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
<details>
|
|
50
|
+
<summary>How do I reopen a saved replay?</summary>
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
If you saved it with `-o ./my-replay`, run:
|
|
55
53
|
|
|
56
|
-
```
|
|
57
|
-
|
|
54
|
+
```bash
|
|
55
|
+
npx @niracler/encore@latest play ./my-replay
|
|
58
56
|
```
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
- **Title & Playbill Intro**: Writes a sharp `title` and a 1–3 sentence `description` summarizing the problem, pivot, and outcome.
|
|
62
|
-
- **Semantic Privacy Redaction**: Replaces internal codenames, colleague names, or private URLs with `(Internal context redacted)`.
|
|
63
|
-
- **Time-Window Trimming**: Cuts off-topic turns at the start or end of a session.
|
|
58
|
+
This starts a local preview server. Opening `index.html` directly can cause the browser to block access to `session.json`.
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
</details>
|
|
66
61
|
|
|
67
|
-
|
|
62
|
+
<details>
|
|
63
|
+
<summary>Can I delete the original log after exporting?</summary>
|
|
64
|
+
|
|
65
|
+
Yes. Keep the entire replay directory, which includes the collected attachments. External links still depend on their original hosts.
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
<details>
|
|
70
|
+
<summary>How do I embed a replay on my site?</summary>
|
|
71
|
+
|
|
72
|
+
Upload the entire replay directory to a static host to give it its own URL. To embed it in an existing page, point these three lines at your replay directory:
|
|
70
73
|
|
|
71
74
|
```html
|
|
72
|
-
<link rel="stylesheet" href="./encore-player.css">
|
|
73
|
-
<div data-encore-player src="./session.json" data-lang="en"></div>
|
|
74
|
-
<script src="./encore-player.js" defer></script>
|
|
75
|
+
<link rel="stylesheet" href="./my-replay/encore-player.css">
|
|
76
|
+
<div data-encore-player src="./my-replay/session.json" data-lang="en"></div>
|
|
77
|
+
<script src="./my-replay/encore-player.js" defer></script>
|
|
75
78
|
```
|
|
76
79
|
|
|
80
|
+
To customize the replay data, see the [JSON Schema](./schema/session.schema.json) and [TypeScript types](./src/index.d.ts).
|
|
81
|
+
|
|
82
|
+
</details>
|
|
83
|
+
|
|
77
84
|
<details>
|
|
78
|
-
<summary
|
|
79
|
-
|
|
80
|
-
### CLI Options
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
Usage:
|
|
84
|
-
encore Scan recent Codex, Claude Code & WorkBuddy sessions and pick one interactively
|
|
85
|
-
encore <log.jsonl | dir> [options] Build a standalone replay directory from a log or re-render an edited session.json
|
|
86
|
-
encore play <dir> [--port 4180] Start local preview server for an existing replay directory
|
|
87
|
-
|
|
88
|
-
Options:
|
|
89
|
-
-o, --out <dir> Output directory (default: ./replays/<session-slug>)
|
|
90
|
-
-l, --lang <zh|en|auto> Player UI language (default: auto; also toggleable in the topbar)
|
|
91
|
-
--title <text> Override session title
|
|
92
|
-
--desc <text> Set opening description shown before playback starts
|
|
93
|
-
--from <iso-time> Start time window filter (e.g. 2026-11-10T09:00)
|
|
94
|
-
--to <iso-time> End time window filter
|
|
95
|
-
--no-images Skip extracting embedded images to .webp
|
|
96
|
-
--image-width <px> Max width for extracted WebP frames (default: 960)
|
|
97
|
-
--clip <chars> Max chars per tool input/output (default: 1500/2000)
|
|
98
|
-
--conversation <id> Conversation UUID for multi-chat Claude.ai exports
|
|
99
|
-
--include-memory Include full cross-session MEMORY_SUMMARY / User CLAUDE.md text
|
|
100
|
-
--list List recent local sessions without interactive prompt
|
|
101
|
-
--serve Start local HTTP preview server after building
|
|
102
|
-
--no-serve Do not start local HTTP preview server
|
|
103
|
-
--no-open Do not automatically open browser when serving
|
|
104
|
-
-p, --port <number> Preview server port (default: 4180)
|
|
105
|
-
-v, --version Show version number
|
|
106
|
-
-h, --help Show help message
|
|
107
|
-
```
|
|
85
|
+
<summary>What do the attachment labels mean?</summary>
|
|
108
86
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
Formal JSON Schema: [`schema/session.schema.json`](./schema/session.schema.json) (`https://encore.niracler.com/schema/session.schema.json`) · TypeScript Definitions: [`src/index.d.ts`](./src/index.d.ts)
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"$schema": "https://encore.niracler.com/schema/session.schema.json",
|
|
116
|
-
"tool": "codex",
|
|
117
|
-
"model": "gpt-5.4",
|
|
118
|
-
"title": "Redesigning the 7-Stage Architecture Diagram",
|
|
119
|
-
"description": "Started with a cluttered layout, pivoted to a two-column grid after visual review, and exported the final SVG.",
|
|
120
|
-
"lang": "en",
|
|
121
|
-
"contextWindow": 258400,
|
|
122
|
-
"deliverables": [{ "title": "Final Diagram", "href": "./final-diagram.webp", "meta": "SVG / WebP · 1920×1080" }],
|
|
123
|
-
"frames": [{ "time": "2026-11-17T10:04:12.000Z", "img": "a1b2c3d4e5f6.webp", "who": "ai", "label": "Draft 1", "w": 960, "h": 540 }],
|
|
124
|
-
"items": [
|
|
125
|
-
{ "type": "user", "text": "...", "time": "..." },
|
|
126
|
-
{ "type": "tool", "name": "exec_command", "summary": "...", "stats": { "command": 1 }, "time": "..." },
|
|
127
|
-
{ "type": "compact", "seq": 1, "trigger": "auto", "preTokens": 210000, "postTokens": 42000, "time": "..." },
|
|
128
|
-
{ "type": "assistant", "text": "...", "time": "..." }
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
```
|
|
87
|
+
A verified file matches the SHA-256 checksum recorded in the log. An export-time copy was found on disk, but its contents could not be verified against the session. A missing or excluded file could not be found or was outside the allowed directories. Use `--asset-root` to specify a directory to collect files from.
|
|
132
88
|
|
|
133
89
|
</details>
|
|
134
90
|
|
|
135
|
-
|
|
91
|
+
<details>
|
|
92
|
+
<summary>Can I use the context token counts to check my bill?</summary>
|
|
93
|
+
|
|
94
|
+
The counts show how the context changes during a session. Encore uses recorded counts where available and estimates missing step or category counts from content length.
|
|
95
|
+
|
|
96
|
+
</details>
|
|
136
97
|
|
|
137
|
-
[MIT](./LICENSE)
|
|
98
|
+
[Contributing](./AGENTS.md) · [Glossary](./GLOSSARY.md) · [npm](https://www.npmjs.com/package/@niracler/encore) · [MIT](./LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,130 +1,98 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="./docs/hero-zh.svg" alt="Encore
|
|
2
|
+
<img src="./docs/hero-zh.svg" alt="Encore · 回看一次 AI Agent 会话,看它怎么完成任务,交付了什么。" width="100%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://encore.niracler.com"><strong
|
|
7
|
-
<a href="
|
|
8
|
-
<a href="./README.md">English</a> ·
|
|
9
|
-
<a href="./README.zh-CN.md"><strong>简体中文</strong></a>
|
|
6
|
+
<a href="https://encore.niracler.com/?demo=poster-redesign&lang=zh"><strong>看回放:Codex 重新设计课程海报</strong></a> ·
|
|
7
|
+
<a href="./README.md">English</a>
|
|
10
8
|
</p>
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
[](https://encore.niracler.com/?demo=poster-redesign&lang=zh)
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## 回看自己的会话
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<th width="33%" align="left">左屏 · 舞台实况</th>
|
|
20
|
-
<th width="33%" align="left">右屏 · 上下文透视</th>
|
|
21
|
-
<th width="33%" align="left">底部 · 关键帧时间轴</th>
|
|
22
|
-
</tr>
|
|
23
|
-
</thead>
|
|
24
|
-
<tbody>
|
|
25
|
-
<tr>
|
|
26
|
-
<td valign="top">输入框打字上屏、Markdown 呼吸流式回复、<code>12×</code> 工具调用流光快切、子代理派发报告与 <code>.webp</code> 过程效果图演进。</td>
|
|
27
|
-
<td valign="top">实时显示 <code>200k</code> / <code>1.0M</code> 上下文水位、7 色分段进度条与压缩警戒线,点击任意色块或消息即可定格查看当时的原文载荷。</td>
|
|
28
|
-
<td valign="top">按步切分的进度条,自动钉出过程效果图(<code>🖼</code>)、中间文稿(<code>📄</code>)、上下文压缩(<code>🗜</code>)与提问节点(<code>💬</code>)。</td>
|
|
29
|
-
</tr>
|
|
30
|
-
</tbody>
|
|
31
|
-
</table>
|
|
14
|
+
```bash
|
|
15
|
+
npx @niracler/encore@latest
|
|
16
|
+
```
|
|
32
17
|
|
|
33
|
-
|
|
18
|
+
需要 Node.js 20.10 或更高版本。从「全部」或 Agent 标签中选择一段 Codex、Claude Code、WorkBuddy 或 Antigravity 会话,即可在浏览器中回看。按 `Tab` 切换标签,按 `/` 搜索当前标签下的标题和首条用户消息,按 `Esc` 返回原位置。搜索也会列出能识别的归档会话。
|
|
34
19
|
|
|
35
|
-
|
|
20
|
+
Antigravity App 和 CLI 共用一个标签,每行显示来源。选择器优先使用 `transcript_full.jsonl`,缺少时读取 `transcript.jsonl`。手动传入路径时,Encore 读取指定文件。会话选择器通过 Node.js 内置 SQLite 或本机的 `sqlite3` 读取 Antigravity 索引。索引不可用时,使用本地日志和标题文件,此时无法识别索引中的归档状态。要回看 Claude.ai 会话,把导出的 `conversations.json` 路径传给同一条命令即可。
|
|
36
21
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
回放默认写入系统临时目录。想保留下来,可以在命令末尾加上 `-o ./my-replay`。
|
|
23
|
+
|
|
24
|
+
## 工作原理
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<picture>
|
|
28
|
+
<source media="(prefers-color-scheme: dark)" srcset="./docs/architecture-zh-dark.webp">
|
|
29
|
+
<source media="(prefers-color-scheme: light)" srcset="./docs/architecture-zh-light.webp">
|
|
30
|
+
<img src="./docs/architecture-zh-light.webp" alt="Encore 处理架构:从原始 Agent 日志与资产根目录内的本地文件,经 CLI 自动导出与可选的发布前整理,生成可独立托管的回放目录与零依赖播放器" width="100%">
|
|
31
|
+
</picture>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## 常见问题
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
<details>
|
|
37
|
+
<summary>日志会上传吗?分享前要检查什么?</summary>
|
|
38
|
+
|
|
39
|
+
导出在本机完成。Encore 会在 `session.json` 中隐藏常见密钥、邮箱和本机路径。公开前请检查对话、截图和附件,尤其是项目代号和业务数据。PDF、表格等附件会按原样复制。
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
需要挑选截图、裁剪对话或写导读时,可以安装 [Encore 技能](./skills/encore/SKILL.md),然后告诉 Agent:「把我刚才的会话整理成可以分享的回放。」
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx skills add niracler/encore -g
|
|
48
45
|
```
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
</details>
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
<details>
|
|
50
|
+
<summary>怎样重新打开保存的回放?</summary>
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
如果用 `-o ./my-replay` 保存过回放,运行:
|
|
55
53
|
|
|
56
|
-
```
|
|
57
|
-
|
|
54
|
+
```bash
|
|
55
|
+
npx @niracler/encore@latest play ./my-replay
|
|
58
56
|
```
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
- **提炼标题与报幕导读**:在 `session.json` 顶层写出直奔主题的 `title` 与几十字的 `description` 开场脉络。
|
|
62
|
-
- **语义级隐私清理**:识别正则抓不到的内部代号、同事姓名或内网地址,替换为 `(涉及内部业务细节,已略去)`。
|
|
63
|
-
- **时间窗口切片**:掐掉会话首尾顺手聊的无关话题,只留完整讲好一件事的片段。
|
|
58
|
+
这会启动本地预览服务。直接双击 `index.html` 时,浏览器可能会拦截对 `session.json` 的读取。
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
</details>
|
|
66
61
|
|
|
67
|
-
|
|
62
|
+
<details>
|
|
63
|
+
<summary>删掉原始日志后还能回放吗?</summary>
|
|
64
|
+
|
|
65
|
+
可以。保留整个回放目录即可,已收录的附件也在里面。外部链接仍依赖原地址。
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
<details>
|
|
70
|
+
<summary>怎样把回放嵌入自己的网页?</summary>
|
|
71
|
+
|
|
72
|
+
将整个回放目录上传到静态网站即可单独访问。要嵌入已有页面,引入目录中的三个文件(示例假设目录名为 `my-replay`):
|
|
70
73
|
|
|
71
74
|
```html
|
|
72
|
-
<link rel="stylesheet" href="./encore-player.css">
|
|
73
|
-
<div data-encore-player src="./session.json" data-lang="zh"></div>
|
|
74
|
-
<script src="./encore-player.js" defer></script>
|
|
75
|
+
<link rel="stylesheet" href="./my-replay/encore-player.css">
|
|
76
|
+
<div data-encore-player src="./my-replay/session.json" data-lang="zh"></div>
|
|
77
|
+
<script src="./my-replay/encore-player.js" defer></script>
|
|
75
78
|
```
|
|
76
79
|
|
|
80
|
+
自定义回放数据可查阅 [JSON Schema](./schema/session.schema.json) 和 [TypeScript 类型](./src/index.d.ts)。
|
|
81
|
+
|
|
82
|
+
</details>
|
|
83
|
+
|
|
77
84
|
<details>
|
|
78
|
-
<summary
|
|
79
|
-
|
|
80
|
-
### CLI 参数
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
用法:
|
|
84
|
-
encore 扫描本机最近的 Codex、Claude Code 与 WorkBuddy 会话,上下键选择导出
|
|
85
|
-
encore <log.jsonl | dir> [options] 从原始日志一步生成回放目录,或对已修改的目录重新同步
|
|
86
|
-
encore play <dir> [--port 4180] 启动本地预览服务
|
|
87
|
-
|
|
88
|
-
常用参数:
|
|
89
|
-
-o, --out <dir> 输出目录(默认:./replays/<会话短名>)
|
|
90
|
-
-l, --lang <zh|en|auto> 界面语言(默认:auto,网页右上角也可一键切换)
|
|
91
|
-
--title <text> 自定义回放标题
|
|
92
|
-
--desc <text> 自定义开场导读说明
|
|
93
|
-
--from <iso-time> 起始时间切片(如 2026-11-10T09:00)
|
|
94
|
-
--to <iso-time> 结束时间切片
|
|
95
|
-
--no-images 不提取内嵌图片
|
|
96
|
-
--include-memory 保留完整的跨会话 MEMORY_SUMMARY / 用户级 CLAUDE.md 原文(默认自动折叠脱敏)
|
|
97
|
-
--list 仅列出本机最近会话,不进入交互菜单
|
|
98
|
-
--no-serve 生成文件后直接退出,不启动本地预览服务
|
|
99
|
-
-v, --version 显示版本号
|
|
100
|
-
```
|
|
85
|
+
<summary>附件旁边的状态是什么意思?</summary>
|
|
101
86
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
JSON Schema 规范:[`schema/session.schema.json`](./schema/session.schema.json)(`https://encore.niracler.com/schema/session.schema.json`)· TypeScript 类型声明:[`src/index.d.ts`](./src/index.d.ts)
|
|
105
|
-
|
|
106
|
-
```json
|
|
107
|
-
{
|
|
108
|
-
"$schema": "https://encore.niracler.com/schema/session.schema.json",
|
|
109
|
-
"tool": "codex",
|
|
110
|
-
"model": "gpt-5.4",
|
|
111
|
-
"title": "定下像素风和红发主角·课程海报视觉探索",
|
|
112
|
-
"description": "从信息过载的第一版草图出发,确立三阶段路线图,最终定版像素风课程海报。",
|
|
113
|
-
"lang": "zh",
|
|
114
|
-
"contextWindow": 258400,
|
|
115
|
-
"deliverables": [{ "title": "定版课程海报", "href": "./final-poster.webp", "meta": "WebP · 1920×1080" }],
|
|
116
|
-
"frames": [{ "time": "2026-11-17T10:04:12.000Z", "img": "a1b2c3d4e5f6.webp", "who": "ai", "label": "像素风草图", "w": 960, "h": 540 }],
|
|
117
|
-
"items": [
|
|
118
|
-
{ "type": "user", "text": "...", "time": "..." },
|
|
119
|
-
{ "type": "tool", "name": "exec_command", "summary": "...", "stats": { "command": 1 }, "time": "..." },
|
|
120
|
-
{ "type": "compact", "seq": 1, "trigger": "auto", "preTokens": 210000, "postTokens": 42000, "time": "..." },
|
|
121
|
-
{ "type": "assistant", "text": "...", "time": "..." }
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
```
|
|
87
|
+
「已核对版本」表示文件的 SHA-256 与日志记录一致。「导出时的副本」表示找到了文件,但无法确认它与会话当时的版本一致。「原文件缺失」或「未收录」表示文件找不到或在允许收集的目录之外。可以用 `--asset-root` 指定收集目录。
|
|
125
88
|
|
|
126
89
|
</details>
|
|
127
90
|
|
|
128
|
-
|
|
91
|
+
<details>
|
|
92
|
+
<summary>上下文里的 Token 数能用来核对账单吗?</summary>
|
|
93
|
+
|
|
94
|
+
这些数值用于观察会话中的上下文变化。日志提供统计时使用记录值,缺少的步骤或分类明细按内容长度估算。
|
|
95
|
+
|
|
96
|
+
</details>
|
|
129
97
|
|
|
130
|
-
[MIT](./LICENSE)
|
|
98
|
+
[开发与贡献](./AGENTS.md) · [术语表](./GLOSSARY.md) · [npm](https://www.npmjs.com/package/@niracler/encore) · [MIT](./LICENSE)
|