Skip to content

DeckOps 3.0.0: cloud-only SDK and CLI - #1

Merged
iguangfei merged 9 commits into
mainfrom
refactor/cloud-only
Oct 19, 2026
Merged

iguangfei merged 9 commits into
mainfrom
refactor/cloud-only

Conversation

@iguangfei

Copy link
Copy Markdown
Member

Summary

DeckOps becomes a thin client for DeckOps Cloud: the server parses, owns the IR and renders Markdown; the client uploads, waits, stores the server's answer and downloads images.

  • Remove the local engine (src/local), --engine, upload authorization, local limits, routing policy and client-side quality assessment.
  • Remove DeckProbe preflight, the browser Worker and WASM asset.
  • ir.json is the server parse response verbatim; deckir.v1 and the client-side Markdown renderer are gone.
  • Artifact manifest v3 (parse.expiresAt, submission.json); 2.x artifacts are refused with input_error.
  • Node and browser share one SDK core (src/client); the Node layer (src/node) adds artifacts and the credential chain.
  • read returns deckops.read.v2; capabilities and config migrate are removed; product config keeps only timeout.
  • Dependencies @deckflow/deckprobe, @deckflow/pdf-lite-parse, parse5, saxes, fflate removed.
  • License changes to Apache-2.0.
  • Review fixes: convert downloads bounded by the time budget and abort signal, 256 MiB source cap, fractional timeouts, 2.x artifact directories refused without --force, assets rebuilt atomically on re-convert, memoized CLI client, apiKey rejected in the shared browser context, boundary script guard.

Net src change against 2.6.1: about −4,800 lines.

Verification

pnpm check: 14 files / 184 tests, build, browser export 34,049 bytes gzip (budget 37,454), boundaries and built-CLI contract all pass. pnpm check:package: tarball 325 KiB, install 4.30 MiB, cold start P95 80 ms, no native binaries.

Not run: live-backend pnpm conformance (needs credentials). Consumer platform-slide-editor must drop preflight: 'off' when upgrading.

🤖 Generated with Claude Code

iguangfei and others added 9 commits October 19, 2026 15:30
…y a thin wrapper

Generalize the browser client into src/client/ (createClientWith(options, runtime, context)):
input normalization, large-file pre-upload, task waiting, resume() and error translation
now live once. The browser entry only binds the browser runtime and rejects apiKey. DeckProbe
preflight, inspection and the probe Worker leave the browser entry; progress events carry the
task's spaceId; the fake cloud serves its fixture image with a real md5.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… client facade

Build src/node/ beside the legacy tree: parse-op, convert-op and read-op call the
isomorphic client directly. ir.json stores the server parse response verbatim; manifest v3
records the source hash, parse task, irKey, irSchemaVersion and a 7-day expiresAt, and
refuses 2.x manifests with a re-parse hint. An unresolved cloud submission is journaled in
submission.json and resumed on the next run; a task that cannot be resumed is forgotten so
the next run submits anew; an expired parse hit is parsed again with a warning. Convert
localizes images into assets/ (media type from the response header or extension) and
escapes local Markdown links. The legacy core keeps running on types-legacy until the CLI
switches over. Integration tests exercise the layer over real HTTP against the fake cloud.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e 3.0 options

read, parse and convert now run src/node/ over the isomorphic client with shared
credentials. --engine, --allow-upload, --fail-on-degraded, --preflight, the local
--max-* limits, --worker-heap-mb and the PDF/DOCX local-only parse flags are gone and fail
as unknown options (usage_error); the capabilities and config migrate commands and the
DECKOPS_ENGINE / DECKOPS_ALLOW_UPLOAD / DECKOPS_FAIL_ON_DEGRADED variables are removed.
Product configuration keeps only timeout. formats prints the cloud matrix. read emits
deckops.read.v2 and writes deckops.run.v2 reports. check-read runs the built CLI against
the fake cloud; conformance targets a real backend with credentials only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ight

Delete the local PDF/DOCX/PPTX/HTML parsers and worker, the engine router and policy,
quality assessment, the client IR normalization and Markdown renderer, the deckir.v1
schema, DeckProbe preflight and the legacy core/artifact operations with their tests.
The Node entry now exports the 3.0 SDK from src/node/sdk.ts: createClient, parse, convert,
read, openArtifact and ParsedDocument over artifact v3, rejecting unknown or removed
options instead of ignoring them. Drop @deckflow/deckprobe, @deckflow/pdf-lite-parse,
parse5, saxes and fflate; the fixture generator only writes the synthetic PDF the fake
cloud and browser smoke page use. Unit tests for error translation and rejected
credentials run through the client facade.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…udget

check-boundaries replaces check-independence: no document-parsing or sibling SDK
dependencies (fflate at most a dev dependency), no local/engine/quality/ir/views trees, no
node: imports in client/cloud/shared/errors, no worker_threads anywhere and no WebAssembly
in dist. The Node-only auth UUID store and runtime move from cloud/ to node/ to satisfy it.
check-package-size now enforces a 1 MiB tarball, a 12 MiB production install and a 300 ms
formats cold start, without the PDF smoke and RSS sampling. check-browser enforces a gzip
budget of the measured 34,016 bytes plus 10 %.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…contract

README now covers install, login, the three verbs, the artifact layout, --json and error
codes, the Node SDK, and the browser SDK with the proxy, authentication and CORS points
from FRONTEND_INTEGRATION.md. CHANGELOG gains the 3.0.0 entry with the measured browser
gzip size. The DeckOps skill and its references describe cloud parsing and add the rule to
ask before uploading a document. src/README.md states the layering rules; the cloud README
no longer describes lazy Node loading. FRONTEND_INTEGRATION.md and MIGRATION_STATUS.md
leave the repository.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replace the AGPL-3.0-only text with the Apache License 2.0 in LICENSE and the packaged
skill, set the package and skill license fields, and rewrite THIRD_PARTY_NOTICES for what
3.0 actually redistributes: axios, eventsource-parser, p-limit and yocto-queue bundled in
the browser build, with the MIT permission notice. Published 2.x releases keep their
license. Pending the owner's confirmation before release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Set the package version to 3.0.0 and sync the skill's tested CLI version and npx
examples. The CHANGELOG 3.0.0 entry lists the breaking changes. Live conformance against
a real backend and the platform-slide-editor upgrade remain release prerequisites outside
this commit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rites before release

- convert renders, downloads images and writes a portable copy inside one time budget, and
  the --timeout / SDK signal reach every image fetch and retry wait (one-shot convert too);
  read keeps one budget for its parse and one for its convert, and the docs say so.
- Sources over 256 MiB are refused with input_error before they are read into memory.
- timeout accepts fractional seconds (rounded up to whole milliseconds) and rejects anything
  that is not a positive finite duration.
- parse no longer writes a v3 artifact over a DeckOps 2.x one: without --force it fails with
  the 2.x input_error and leaves it untouched; with --force it replaces the whole directory.
- A new render replaces assets/ and manifest.assets instead of accumulating stale images; it
  downloads into a staging directory first, so a failed download keeps the previous view.
- The CLI builds one cloud client per command, so read's parse and convert share the resolved
  default space and resolve credentials once.
- The browser apiKey rejection moves into createClientWith; the browser entry is a plain
  binding again.
- check-boundaries says to build first when dist/ is missing. The browser gzip budget follows
  the new measurement (34,049 bytes + 10 %).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@iguangfei
iguangfei merged commit 2364987 into main Oct 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant