graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
docs(#614): use the published SDK package name
Rach Pradhan45f5a61b50c1
diff --git a/README.md b/README.mdindex da618d0c..d63a5735 100644--- a/README.md+++ b/README.md@@ -870,7 +870,7 @@ structured `{"type":"answer","text":"...","cancelled":false}` line) and `graff -machine-readable interface, and the **TypeScript and Python SDKs in[`sdk/`](sdk/) are auto-generated from that schema**, so they never drift fromthe binary. On every release tag a GitHub Action rebuilds, regenerates, fails if-the committed SDKs are stale, and publishes to npm (`@graff-new/sdk`) and PyPI+the committed SDKs are stale, and publishes to npm (`@codegraff/sdk`) and PyPI(`simple-harness-sdk`).```python@@ -885,7 +885,7 @@ with Harness(yolo=True, model="gpt-5.5") as h:```ts// TypeScript-import { Harness, runAgent } from "@graff-new/sdk";+import { Harness, runAgent } from "@codegraff/sdk";// one-shot, streamedfor await (const ev of runAgent({ prompt: "summarize README.md", model: "gpt-5.5", yolo: true })) {@@ -901,8 +901,11 @@ session.close();Can't spawn a local process (edge runtimes, browsers, other machines)? Run`graff serve` and both SDKs ship matching **remote clients** that drive it over-HTTP: `@graff-new/sdk/remote` (fetch-only: Workers/Deno/Bun/browsers) and+HTTP: `@codegraff/sdk/remote` (fetch-only: Workers/Deno/Bun/browsers) andPython's `RemoteHarness` (stdlib only). Same method surface, same event stream.+Both remote clients accept URL/base64 `images` on a turn and preserve them as+native provider vision parts through `graff serve`; no encoded pixels are+flattened into prompt text.See [`sdk/README.md`](sdk/README.md). A host that wants ACP (thought / tool /text `session/update`s) instead of `--json` events should spawn `graff acp` —recipe and `@codegraff/sdk/acp` helper in [Embedding graff](docs/embedding.md).@@ -1447,7 +1450,7 @@ POSTs can be sent while the original stream is waiting on `ask_user`; they ackimmediately and the original stream continues to the `tool_result`/`turn`.Bearer auth via `--token`/`HARNESS_SERVE_TOKEN` (required to bind beyondloopback); CORS opens only when a token gates access. The SDKs ship matching-remote clients: `@graff-new/sdk/remote` (fetch-only: Workers/Deno/Bun/browsers)+remote clients: `@codegraff/sdk/remote` (fetch-only: Workers/Deno/Bun/browsers)and Python's `RemoteHarness` (stdlib urllib). Endpoints are documented under the`serve` key of `graff --schema`.diff --git a/examples/edge-worker/README.md b/examples/edge-worker/README.mdindex 2461c9e5..f17be892 100644--- a/examples/edge-worker/README.md+++ b/examples/edge-worker/README.md@@ -1,6 +1,6 @@# edge-worker — the remote SDK inside Cloudflare Workers-Proof that `@graff-new/sdk/remote` runs in the real Workers runtime+Proof that `@codegraff/sdk/remote` runs in the real Workers runtime(workerd): the harness *binary* cannot run there (native executable,spawns subprocesses), but the fetch-only remote client driving a`harness serve` bridge can.@@ -14,8 +14,8 @@ curl -N 'http://127.0.0.1:8970/?q=run:%20echo%20hi' # events streamed through`src/remote.ts` is a vendored copy of `sdk/ts/remote.ts` so the example isself-contained — refresh it with `cp ../../sdk/ts/remote.ts src/` after an-SDK regen. In a real project, `npm install @graff-new/sdk` and import from-`@graff-new/sdk/remote` instead.+SDK regen. In a real project, `npm install @codegraff/sdk` and import from+`@codegraff/sdk/remote` instead.Deploying for real: front the bridge with TLS (it speaks plain HTTP),point `BRIDGE_URL` at it, and store the token as a secretdiff --git a/examples/edge-worker/src/index.ts b/examples/edge-worker/src/index.tsindex f9aebc32..fb190073 100644--- a/examples/edge-worker/src/index.ts+++ b/examples/edge-worker/src/index.ts@@ -1,7 +1,7 @@// Proof the remote SDK runs inside the Workers runtime (workerd): no node:// imports, fetch + Web Streams only. src/remote.ts is a copy of-// sdk/ts/remote.ts — in a real project, `npm install @graff-new/sdk` and-// `import { ... } from "@graff-new/sdk/remote"` instead.+// sdk/ts/remote.ts — in a real project, `npm install @codegraff/sdk` and+// `import { ... } from "@codegraff/sdk/remote"` instead.import { RemoteHarness, runAgentRemote, HARNESS_VERSION } from "./remote";interface Env {diff --git a/examples/edge-worker/wrangler.toml b/examples/edge-worker/wrangler.tomlindex e2db9d6c..1b023a75 100644--- a/examples/edge-worker/wrangler.toml+++ b/examples/edge-worker/wrangler.toml@@ -1,5 +1,5 @@# Minimal Cloudflare Worker driving a `harness serve` bridge through-# @graff-new/sdk/remote. Local check (no deploy, real workerd runtime):+# @codegraff/sdk/remote. Local check (no deploy, real workerd runtime):# harness serve --port 8926 --token edge-test # terminal 1# npx wrangler dev --port 8970 # terminal 2# curl http://127.0.0.1:8970