Skip to content

Commit d0dd75a

Browse files
committed
feat: prepare standalone DeckOps identity and explicit config migration
1 parent 761fa08 commit d0dd75a

62 files changed

Lines changed: 691 additions & 446 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ jobs:
4444
- name: Upload SBOM
4545
uses: actions/upload-artifact@v4
4646
with:
47-
name: deckparse-sbom
47+
name: deckops-sbom
4848
path: sbom.cdx.json

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## @deckflow/deckops 1.0.0 — migration candidate, 2026-09-05
4+
5+
- Rename the product and its sole CLI to DeckOps / `deckops`; export `DeckOpsError` without a legacy alias. Historical entries below describe the former DeckParse package.
6+
- Own the required cloud transport, DTOs and regression tests directly; remove the former SDK dependency and browser patch, with no replacement shared client package.
7+
- Separate product defaults from shared credentials and UUID, and add an explicit, repeatable `config migrate` operation that preserves existing target values and source files.
8+
- Keep DeckIR, manifest v1/v2, schema identity, parser identities and `producer.deckparse` unchanged.
9+
- See `src/cloud/README.md` for source provenance and explicit transport deltas from the previous Node distribution.
10+
311
## 1.0.0 — 2026-09-04
412

513
- Make the Node CLI/SDK local-first and offline by default for PDF, PPTX, DOCX and static HTML source; cloud use now requires `--engine cloud` or `auto --allow-upload`.

‎FRONTEND_INTEGRATION.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DeckParse 前端接入文档
1+
# DeckOps 前端接入文档
22

33
本文面向需要在浏览器中把 PDF、PPTX、DOCX、Keynote 或网页解析为 Markdown 的前端开发者。
44

@@ -15,28 +15,28 @@ SDK 使用云端解析服务,不是离线解析。文件输入默认以 `valid
1515
## 2. 安装
1616

1717
```bash
18-
npm install @deckflow/deckparse@0.2.0
18+
npm install @deckflow/deckops@1.0.0
1919
```
2020

2121
必须从浏览器子路径导入:
2222

2323
```ts
24-
import { createClient } from '@deckflow/deckparse/browser';
24+
import { createClient } from '@deckflow/deckops/browser';
2525
```
2626

27-
不要从 `@deckflow/deckparse` 根路径导入前端 SDK;根路径是 Node.js/CLI API。
27+
不要从 `@deckflow/deckops` 根路径导入前端 SDK;根路径是 Node.js/CLI API。
2828

2929
## 3. 鉴权和 API 地址
3030

3131
### 推荐:通过业务后端代理
3232

3333
```ts
3434
const client = createClient({
35-
apiBase: '/api/deckparse',
35+
apiBase: '/api/deckops',
3636
});
3737
```
3838

39-
业务后端负责登录态、权限检查和上游密钥,浏览器只访问同源接口。代理需要保留 DeckParse 的上游 API 路径和请求方法。
39+
业务后端负责登录态、权限检查和上游密钥,浏览器只访问同源接口。代理需要保留 DeckOps 的上游 API 路径和请求方法。
4040

4141
### 直接访问 DeckFlow API
4242

@@ -69,12 +69,12 @@ TypeScript:
6969
```ts
7070
import {
7171
createClient,
72-
DeckParseError,
72+
DeckOpsError,
7373
type BrowserProgress,
74-
} from '@deckflow/deckparse/browser';
74+
} from '@deckflow/deckops/browser';
7575

7676
const client = createClient({
77-
apiBase: '/api/deckparse',
77+
apiBase: '/api/deckops',
7878
});
7979

8080
const input = document.querySelector<HTMLInputElement>('#document-input')!;
@@ -137,7 +137,7 @@ input.addEventListener('change', async () => {
137137
return;
138138
}
139139

140-
if (error instanceof DeckParseError) {
140+
if (error instanceof DeckOpsError) {
141141
console.error({
142142
code: error.code,
143143
message: error.message,
@@ -163,9 +163,9 @@ import {
163163
createClient,
164164
type BrowserImage,
165165
type BrowserProgress,
166-
} from '@deckflow/deckparse/browser';
166+
} from '@deckflow/deckops/browser';
167167

168-
const client = createClient({ apiBase: '/api/deckparse' });
168+
const client = createClient({ apiBase: '/api/deckops' });
169169

170170
export interface MarkdownDocument {
171171
markdown: string;
@@ -385,7 +385,7 @@ if (task.status === 'completed') {
385385

386386
### 可以在 SSR 中导入吗?
387387

388-
可以导入 `@deckflow/deckparse/browser`,但 `File` 的获取和实际解析调用应在浏览器端执行。
388+
可以导入 `@deckflow/deckops/browser`,但 `File` 的获取和实际解析调用应在浏览器端执行。
389389

390390
### SDK 会在浏览器本地保存文件吗?
391391

‎MIGRATION_STATUS.md‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# DeckOps 迁移实施记录
2+
3+
更新:2026-09-05。**当前是已验证的源码候选,不是已发布/已切换状态。**
4+
5+
## 已完成
6+
7+
- 本仓分支 `codex/standalone-deckops-migration`,基线 `6092eaf12964dbfb08127e1e1a8d0a4e457d65cd`。M1 提交 `761fa08` 在 DeckParse 原名下完成云客户端内聚、类型/测试迁入及旧依赖清理。
8+
- `src/cloud/` 由本产品拥有;无旧 SDK、DeckTools SDK/CLI、共享客户端包、构建时复制或相邻仓库依赖。普通 HTTP 库直接声明。来源、原 patch hash 和明确的 Node 行为差异见 [源码说明](src/cloud/README.md)。原 patch 从工作树删除,可从 Git 基线恢复。
9+
- 本仓源码改为 `@deckflow/deckops@1.0.0`,唯一 binary 为 `deckops`;公开错误类改为 `DeckOpsError`,无旧名 alias。
10+
- 保留 DeckIR/schema、manifest v1/v2、parser identity、`producer.deckparse` 和共享 UUID。
11+
- 新增独立产品默认配置和显式 `config migrate [--dry-run]`;只补缺失有效字段,保留旧文件、目标值和 UUID,正常运行不回退旧产品路径。尚未对用户真实配置执行迁移。
12+
- 旧仓库在 `codex/decktools-migration` 准备 `decktools@1.0.0`、`@decktools/sdk@1.0.0`、Go/Python import/module、installer、发布配置及产品环境变量改名。它的实际基线是 `master` 上的 `4a5f70677d6cb7cd5e95ee6a89a88adf942687b0`;不要合入无关历史的 `origin/main`。
13+
14+
## 验证结果
15+
16+
| 项目 | 结果 |
17+
| --- | --- |
18+
| 本仓 `pnpm check` | 189 个测试通过;Node/DOM-only 类型、构建、Browser SSR/独立消费者检查通过 |
19+
| 独立安装/构建 | M1 的 Git archive 副本 frozen install + check 通过;只额外带入本产品的四个文档测试样本,没有兄弟仓库源码 |
20+
| 新名包体积/安装验证 | `check:package` 通过:tarball 约 0.94 MiB;strict 安装约 43.92 MiB,默认约 72.77 MiB;包内 Worker/WASM 随包交付 |
21+
| Browser 体积 | 35,148 bytes gzip,基线 35,715;实际浏览器交互 smoke 尚未完成(浏览器附加失败),不能据 mock/构建代替验收 |
22+
| 旧 artifact | 用 M1 CLI 生成的 DOCX artifact 在改名 CLI 中命中 `artifact-cache`,本地 convert 复用 parse、`taskId:null` |
23+
| DeckTools TypeScript/Node CLI | 完整 release check 通过:SDK 82、CLI 49 个测试 |
24+
| DeckTools Go/Python | Go SDK 与 CLI 测试通过;Python 26 个测试通过 |
25+
| 消费者预检 | 临时副本中 deckhtml、hyperdeck/deckhtml 编译通过;DeckRender Node/Browser 类型、90 个集成测试、构建和 Browser consumer 检查通过 |
26+
| 真实云端 conformance | 未执行;需要测试凭据和专用测试操作,不以 mock 通过代替 |
27+
28+
消费者预检使用本地候选 SDK tarball 与临时目录,不代表 registry 安装和 lockfile 已验收。三个实际消费者仓库尚未修改。DeckRender 全量单测也未完成:旧 SDK 0.7.3 Browser 源码改写脚本及其单测需在正式切换时删除/替换,Browser 构建应解析正式 `@decktools/sdk/browser` 入口;旧工具配置 fallback 和诊断提示也需清理,避免把新 DeckOps 当作旧 SDK。
29+
30+
## 当前阻塞和未做的外部操作
31+
32+
`npm whoami --registry=https://registry.npmjs.org/` 返回 E401,当前无法验证新包发布权限或发布。尚未发布 npm/Python/Go release、push/合并迁移分支、改 GitHub 仓库名、移动本地目录、改真实消费者及其 lockfile、调整全局 CLI 或用户配置。旧工作环境继续保留。
33+
34+
## 恢复实施顺序
35+
36+
1. 用户完成 npm 登录,并确认对 `@decktools/sdk`、`decktools`、`@deckflow/deckops` 的发布权限;发布前重新核验名称及 1.0.0 是否可用。候选已设置 1.0.0,首次发布不要直接运行会额外 bump 的聚合 `release` 命令。
37+
2. 补实际浏览器 smoke;有云端测试凭据时补 conformance,否则明确保留该验收限制。review 并合并本地源码候选至各仓库正确默认分支。
38+
3. 旧仓库先改为 `deckflow/decktools`,更新 remote;按 SDK → CLI 顺序发布新包,验证空目录真实安装。Go/Python 按对应发布通道验证权限并发行;不要把源码改名等同于已发布。
39+
4. 旧本地目录再移至 `/Volumes/workspace/caixuan/decktools`。在实际内部消费者直接更新依赖/import、处理 DeckRender Browser 适配与相关配置引用,生成新 lockfile,frozen install + 完整检查,再切换安装/部署。Hyperdeck 内的 deckhtml 本地分支落后远端,先重新核对并保留它的工作状态。
40+
5. 检查并让出旧全局 `deckops` 命令,旧工具环境变量改为 `DECKTOOLS_*`。把 `deckflow/deckparse` 改为 `deckflow/deckops`,更新本仓 remote,发布并安装 `@deckflow/deckops`,核对 `command -v deckops` 和版本。
41+
6. 更新本产品消费者 import / `DECKPARSE_*` 环境变量,先 dry-run 再执行一次性配置迁移,确认共享凭据/UUID 未变。最后将当前本地目录移至已释放的 `/Volumes/workspace/caixuan/deckops`,更新工作环境路径。
42+
43+
两个产品可独立 review/发布;不添加转发包、双命令、共享 SDK 或跨产品构建依赖。失败时回退源码提交/部署版本,原配置文件保持不动;已发布版本用修复版前进。

0 commit comments

Comments
 (0)