diff --git a/.github/workflows/publish-codex-flows.yml b/.github/workflows/publish-codex-flows.yml index 5cd989a..cdb05ba 100644 --- a/.github/workflows/publish-codex-flows.yml +++ b/.github/workflows/publish-codex-flows.yml @@ -1,10 +1,10 @@ -name: Publish @peezy-tech/codex-flows +name: Publish @peezy.tech/codex-flows on: workflow_dispatch: inputs: confirm_package: - description: "Type @peezy-tech/codex-flows to publish" + description: "Type @peezy.tech/codex-flows to publish" required: true type: string @@ -14,7 +14,7 @@ permissions: jobs: publish: - if: inputs.confirm_package == '@peezy-tech/codex-flows' + if: inputs.confirm_package == '@peezy.tech/codex-flows' runs-on: ubuntu-latest environment: npm-publish steps: @@ -39,7 +39,7 @@ jobs: run: bun install --frozen-lockfile - name: Release check - run: bun run --filter @peezy-tech/codex-flows release:check + run: bun run --filter @peezy.tech/codex-flows release:check - name: Publish working-directory: packages/codex-client diff --git a/README.md b/README.md index 341ec79..3697bea 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ bun run build bun run test ``` -`bun run test` currently runs the `@peezy-tech/codex-flows` transport tests. +`bun run test` currently runs the `@peezy.tech/codex-flows` transport tests. ## Publishing @@ -67,17 +67,17 @@ The public home for this monorepo is `peezy-tech/codex-flows`. When seeding that repo, copy this working tree without `.git`, initialize a fresh git history, and push it to the new public GitHub repo. -`@peezy-tech/codex-flows` is published from `packages/codex-client`. +`@peezy.tech/codex-flows` is published from `packages/codex-client`. Before the first publish: ```bash -bun run --filter @peezy-tech/codex-flows release:check +bun run --filter @peezy.tech/codex-flows release:check ``` Because the npm package does not exist yet, bootstrap the first version with a human npm session or short-lived npm token from the public repo checkout. The -`peezy-tech` npm organization/scope must exist first, and the publishing account +`peezy.tech` npm organization/scope must exist first, and the publishing account or token must have write access to that scope: ```bash @@ -87,7 +87,7 @@ npm publish --access public After the package exists, configure npm trusted publishing for: -- Package: `@peezy-tech/codex-flows` +- Package: `@peezy.tech/codex-flows` - Repository: `peezy-tech/codex-flows` - Workflow: `.github/workflows/publish-codex-flows.yml` - Environment: `npm-publish` @@ -97,19 +97,19 @@ an npm token. ## Packages -### `@peezy-tech/codex-flows` +### `@peezy.tech/codex-flows` The low-level app-server client package. It exports: -- `@peezy-tech/codex-flows`: Node/Bun entry with stdio and WebSocket transports. -- `@peezy-tech/codex-flows/browser`: browser entry with WebSocket transport only. -- `@peezy-tech/codex-flows/flows`: framework-agnostic helpers for app servers that want to start Codex-backed workflows. -- `@peezy-tech/codex-flows/rpc`: JSON-RPC helpers and types. -- `@peezy-tech/codex-flows/generated`: generated Codex app-server protocol types. +- `@peezy.tech/codex-flows`: Node/Bun entry with stdio and WebSocket transports. +- `@peezy.tech/codex-flows/browser`: browser entry with WebSocket transport only. +- `@peezy.tech/codex-flows/flows`: framework-agnostic helpers for app servers that want to start Codex-backed workflows. +- `@peezy.tech/codex-flows/rpc`: JSON-RPC helpers and types. +- `@peezy.tech/codex-flows/generated`: generated Codex app-server protocol types. ### `web` -The browser app imports `@peezy-tech/codex-flows/browser`, opens a direct WebSocket +The browser app imports `@peezy.tech/codex-flows/browser`, opens a direct WebSocket connection, lists threads, starts turns, interrupts running turns, and renders thread items and live app-server events. diff --git a/apps/cli/package.json b/apps/cli/package.json index 5ee0990..20dd567 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -14,7 +14,7 @@ "test": "bun test test/*.test.ts" }, "dependencies": { - "@peezy-tech/codex-flows": "workspace:*" + "@peezy.tech/codex-flows": "workspace:*" }, "devDependencies": { "@types/bun": "catalog:", diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts index a3ec45a..64eb4ac 100644 --- a/apps/cli/src/index.ts +++ b/apps/cli/src/index.ts @@ -1,5 +1,5 @@ #!/usr/bin/env bun -import { CodexAppServerClient } from "@peezy-tech/codex-flows"; +import { CodexAppServerClient } from "@peezy.tech/codex-flows"; import { APP_SERVER_ACTIONS } from "./actions.ts"; import { DEFAULT_WS_URL, parseArgs } from "./args.ts"; diff --git a/apps/cli/tsconfig.json b/apps/cli/tsconfig.json index ffaead6..8d08821 100644 --- a/apps/cli/tsconfig.json +++ b/apps/cli/tsconfig.json @@ -16,8 +16,8 @@ "skipLibCheck": true, "baseUrl": ".", "paths": { - "@peezy-tech/codex-flows": ["../../packages/codex-client/src/index.ts"], - "@peezy-tech/codex-flows/*": ["../../packages/codex-client/src/*"] + "@peezy.tech/codex-flows": ["../../packages/codex-client/src/index.ts"], + "@peezy.tech/codex-flows/*": ["../../packages/codex-client/src/*"] } }, "include": ["src", "test"] diff --git a/apps/discord-bridge/package.json b/apps/discord-bridge/package.json index fe7d676..2da6db7 100644 --- a/apps/discord-bridge/package.json +++ b/apps/discord-bridge/package.json @@ -16,7 +16,7 @@ "test": "bun test test/*.test.ts" }, "dependencies": { - "@peezy-tech/codex-flows": "workspace:*", + "@peezy.tech/codex-flows": "workspace:*", "discord.js": "catalog:" }, "devDependencies": { diff --git a/apps/discord-bridge/src/bridge.ts b/apps/discord-bridge/src/bridge.ts index aee1fe4..0a8759e 100644 --- a/apps/discord-bridge/src/bridge.ts +++ b/apps/discord-bridge/src/bridge.ts @@ -1,8 +1,8 @@ import os from "node:os"; import path from "node:path"; -import type { JsonRpcNotification, JsonRpcRequest } from "@peezy-tech/codex-flows/rpc"; -import type { v2 } from "@peezy-tech/codex-flows/generated"; +import type { JsonRpcNotification, JsonRpcRequest } from "@peezy.tech/codex-flows/rpc"; +import type { v2 } from "@peezy.tech/codex-flows/generated"; import type { DiscordConsoleOutput } from "./console-output.ts"; import { DiscordThreadRunner, MessageDeduplicator } from "./runner.ts"; diff --git a/apps/discord-bridge/src/config.ts b/apps/discord-bridge/src/config.ts index 4a025ab..48e1903 100644 --- a/apps/discord-bridge/src/config.ts +++ b/apps/discord-bridge/src/config.ts @@ -5,7 +5,7 @@ import type { ReasoningEffort, ReasoningSummary, v2, -} from "@peezy-tech/codex-flows/generated"; +} from "@peezy.tech/codex-flows/generated"; import type { DiscordBridgeConfig, diff --git a/apps/discord-bridge/src/index.ts b/apps/discord-bridge/src/index.ts index 357a222..41174d4 100644 --- a/apps/discord-bridge/src/index.ts +++ b/apps/discord-bridge/src/index.ts @@ -2,7 +2,7 @@ import { CodexAppServerClient, CodexStdioTransport, -} from "@peezy-tech/codex-flows"; +} from "@peezy.tech/codex-flows"; import { DiscordCodexBridge } from "./bridge.ts"; import { createDiscordConsoleOutput } from "./console-output.ts"; diff --git a/apps/discord-bridge/src/runner.ts b/apps/discord-bridge/src/runner.ts index 17102c0..56af36e 100644 --- a/apps/discord-bridge/src/runner.ts +++ b/apps/discord-bridge/src/runner.ts @@ -1,5 +1,5 @@ -import type { JsonRpcNotification } from "@peezy-tech/codex-flows/rpc"; -import type { v2 } from "@peezy-tech/codex-flows/generated"; +import type { JsonRpcNotification } from "@peezy.tech/codex-flows/rpc"; +import type { v2 } from "@peezy.tech/codex-flows/generated"; import type { DiscordConsoleMessageKind, diff --git a/apps/discord-bridge/src/types.ts b/apps/discord-bridge/src/types.ts index 81c0119..466c9ed 100644 --- a/apps/discord-bridge/src/types.ts +++ b/apps/discord-bridge/src/types.ts @@ -2,8 +2,8 @@ import type { ReasoningEffort, ReasoningSummary, v2, -} from "@peezy-tech/codex-flows/generated"; -import type { JsonRpcNotification, JsonRpcRequest } from "@peezy-tech/codex-flows/rpc"; +} from "@peezy.tech/codex-flows/generated"; +import type { JsonRpcNotification, JsonRpcRequest } from "@peezy.tech/codex-flows/rpc"; import type { DiscordBridgeLogLevelSetting } from "./logger.ts"; export type DiscordBridgeConfig = { diff --git a/apps/discord-bridge/test/bridge.test.ts b/apps/discord-bridge/test/bridge.test.ts index bad0d7e..be23a77 100644 --- a/apps/discord-bridge/test/bridge.test.ts +++ b/apps/discord-bridge/test/bridge.test.ts @@ -1,8 +1,8 @@ import os from "node:os"; import path from "node:path"; import { describe, expect, test } from "bun:test"; -import type { JsonRpcNotification, JsonRpcRequest } from "@peezy-tech/codex-flows/rpc"; -import type { v2 } from "@peezy-tech/codex-flows/generated"; +import type { JsonRpcNotification, JsonRpcRequest } from "@peezy.tech/codex-flows/rpc"; +import type { v2 } from "@peezy.tech/codex-flows/generated"; import { DiscordCodexBridge, parseThreadStartIntent } from "../src/bridge.ts"; import type { diff --git a/apps/discord-bridge/tsconfig.json b/apps/discord-bridge/tsconfig.json index 3279881..d5f45a4 100644 --- a/apps/discord-bridge/tsconfig.json +++ b/apps/discord-bridge/tsconfig.json @@ -17,8 +17,8 @@ "types": ["node", "bun"], "baseUrl": ".", "paths": { - "@peezy-tech/codex-flows": ["../../packages/codex-client/src/index.ts"], - "@peezy-tech/codex-flows/*": ["../../packages/codex-client/src/*"] + "@peezy.tech/codex-flows": ["../../packages/codex-client/src/index.ts"], + "@peezy.tech/codex-flows/*": ["../../packages/codex-client/src/*"] } }, "include": ["src", "test"] diff --git a/apps/web/package.json b/apps/web/package.json index ba8d8ab..6c967e4 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@workspace/ui": "workspace:*", - "@peezy-tech/codex-flows": "workspace:*", + "@peezy.tech/codex-flows": "workspace:*", "lucide-react": "catalog:", "react": "catalog:", "react-dom": "catalog:" diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 7b568a5..abc5c53 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -26,7 +26,7 @@ import { type JsonRpcNotification, type JsonRpcRequest, type v2, -} from "@peezy-tech/codex-flows/browser"; +} from "@peezy.tech/codex-flows/browser"; import { ThemeProvider } from "./components/theme-provider.tsx"; diff --git a/apps/web/tsconfig.app.json b/apps/web/tsconfig.app.json index bc093ad..a709578 100644 --- a/apps/web/tsconfig.app.json +++ b/apps/web/tsconfig.app.json @@ -22,8 +22,8 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"], - "@peezy-tech/codex-flows": ["../../packages/codex-client/src/index.ts"], - "@peezy-tech/codex-flows/*": ["../../packages/codex-client/src/*"], + "@peezy.tech/codex-flows": ["../../packages/codex-client/src/index.ts"], + "@peezy.tech/codex-flows/*": ["../../packages/codex-client/src/*"], "@workspace/ui/*": ["../../packages/ui/src/*"] } }, diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 85fa278..ecfc4c7 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -8,8 +8,8 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"], - "@peezy-tech/codex-flows": ["../../packages/codex-client/src/index.ts"], - "@peezy-tech/codex-flows/*": ["../../packages/codex-client/src/*"], + "@peezy.tech/codex-flows": ["../../packages/codex-client/src/index.ts"], + "@peezy.tech/codex-flows/*": ["../../packages/codex-client/src/*"], "@workspace/ui/*": ["../../packages/ui/src/*"] } } diff --git a/bun.lock b/bun.lock index fe2f090..36d618a 100644 --- a/bun.lock +++ b/bun.lock @@ -12,7 +12,7 @@ "codex-app": "./src/index.ts", }, "dependencies": { - "@peezy-tech/codex-flows": "workspace:*", + "@peezy.tech/codex-flows": "workspace:*", }, "devDependencies": { "@types/bun": "catalog:", @@ -27,7 +27,7 @@ "codex-discord-bridge": "./src/index.ts", }, "dependencies": { - "@peezy-tech/codex-flows": "workspace:*", + "@peezy.tech/codex-flows": "workspace:*", "discord.js": "catalog:", }, "devDependencies": { @@ -40,7 +40,7 @@ "name": "web", "version": "0.0.1", "dependencies": { - "@peezy-tech/codex-flows": "workspace:*", + "@peezy.tech/codex-flows": "workspace:*", "@workspace/ui": "workspace:*", "lucide-react": "catalog:", "react": "catalog:", @@ -57,7 +57,7 @@ }, }, "packages/codex-client": { - "name": "@peezy-tech/codex-flows", + "name": "@peezy.tech/codex-flows", "version": "0.1.0", "devDependencies": { "@types/bun": "^1.3.13", @@ -295,7 +295,7 @@ "@open-draft/until": ["@open-draft/until@2.1.0", "", {}, "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg=="], - "@peezy-tech/codex-flows": ["@peezy-tech/codex-flows@workspace:packages/codex-client"], + "@peezy.tech/codex-flows": ["@peezy.tech/codex-flows@workspace:packages/codex-client"], "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-rc.3", "", {}, "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q=="], diff --git a/package.json b/package.json index 84080fd..dfad556 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,6 @@ "dev:web": "bun run --filter web dev", "start": "bun run --filter web preview", "start:discord:debug:commentary": "bun run --filter codex-discord-bridge start:debug:commentary", - "test": "bun run --filter @peezy-tech/codex-flows test && bun run --filter codex-app-cli test && bun run --filter codex-discord-bridge test" + "test": "bun run --filter @peezy.tech/codex-flows test && bun run --filter codex-app-cli test && bun run --filter codex-discord-bridge test" } } diff --git a/packages/codex-client/README.md b/packages/codex-client/README.md index 5d2fca0..c8eebfd 100644 --- a/packages/codex-client/README.md +++ b/packages/codex-client/README.md @@ -1,4 +1,4 @@ -# @peezy-tech/codex-flows +# @peezy.tech/codex-flows Workspace package for talking to `codex app-server`. @@ -6,24 +6,24 @@ This package owns the low-level JSON-RPC client, transports, framework-agnostic ## Exports -- `@peezy-tech/codex-flows` +- `@peezy.tech/codex-flows` - `CodexAppServerClient` - `CodexStdioTransport` - `CodexWebSocketTransport` - JSON-RPC helpers and types -- `@peezy-tech/codex-flows/browser` +- `@peezy.tech/codex-flows/browser` - browser-safe `CodexAppServerClient` - `CodexWebSocketTransport` - JSON-RPC helpers and types -- `@peezy-tech/codex-flows/flows` +- `@peezy.tech/codex-flows/flows` - `CodexFlowClient` - `createCodexFlowClient` - prompt/input normalization and optional turn completion waiting -- `@peezy-tech/codex-flows/rpc` +- `@peezy.tech/codex-flows/rpc` - JSON-RPC message types and parsing helpers -- `@peezy-tech/codex-flows/generated` +- `@peezy.tech/codex-flows/generated` - generated Codex app-server protocol types -- `@peezy-tech/codex-flows/generated/*` +- `@peezy.tech/codex-flows/generated/*` - generated per-type modules ## Transports @@ -33,7 +33,7 @@ This package owns the low-level JSON-RPC client, transports, framework-agnostic It can also connect to an existing WebSocket app-server when `CODEX_WORKSPACE_APP_SERVER_WS_URL` is set, or when `webSocketTransportOptions.url` is passed. ```ts -import { CodexAppServerClient } from "@peezy-tech/codex-flows"; +import { CodexAppServerClient } from "@peezy.tech/codex-flows"; const client = new CodexAppServerClient(); await client.connect(); @@ -46,7 +46,7 @@ client.close(); Browser entry: ```ts -import { CodexAppServerClient } from "@peezy-tech/codex-flows/browser"; +import { CodexAppServerClient } from "@peezy.tech/codex-flows/browser"; const client = new CodexAppServerClient({ webSocketTransportOptions: { url: "ws://127.0.0.1:3585" }, @@ -57,7 +57,7 @@ await client.connect(); Flow helpers: ```ts -import { createCodexFlowClient } from "@peezy-tech/codex-flows/flows"; +import { createCodexFlowClient } from "@peezy.tech/codex-flows/flows"; const codex = createCodexFlowClient({ appServerUrl: "ws://127.0.0.1:3585", @@ -77,11 +77,11 @@ console.log(result.threadId, result.turnId); ## Scripts ```bash -bun run --filter @peezy-tech/codex-flows build -bun run --filter @peezy-tech/codex-flows check:types -bun run --filter @peezy-tech/codex-flows test -bun run --filter @peezy-tech/codex-flows pack:dry-run -bun run --filter @peezy-tech/codex-flows release:check +bun run --filter @peezy.tech/codex-flows build +bun run --filter @peezy.tech/codex-flows check:types +bun run --filter @peezy.tech/codex-flows test +bun run --filter @peezy.tech/codex-flows pack:dry-run +bun run --filter @peezy.tech/codex-flows release:check ``` `build` emits ESM JavaScript, source maps, and declaration files into `dist`. @@ -91,13 +91,13 @@ bun run --filter @peezy-tech/codex-flows release:check After publishing, install the package from npm: ```bash -bun add @peezy-tech/codex-flows +bun add @peezy.tech/codex-flows ``` or: ```bash -npm install @peezy-tech/codex-flows +npm install @peezy.tech/codex-flows ``` ## Publishing @@ -105,19 +105,19 @@ npm install @peezy-tech/codex-flows Run the release check before publishing: ```bash -bun run --filter @peezy-tech/codex-flows release:check +bun run --filter @peezy.tech/codex-flows release:check ``` The release check runs package tests, type checking, a clean `dist` build, and `npm pack --dry-run`. Review the pack output before publishing so only `dist`, `README.md`, and package metadata are included. -For the first publish, use a human npm session or short-lived npm token from the public `peezy-tech/codex-flows` repo checkout. The `peezy-tech` npm organization/scope must exist first, and the publishing account or token must have write access to that scope: +For the first publish, use a human npm session or short-lived npm token from the public `peezy-tech/codex-flows` repo checkout. The `peezy.tech` npm organization/scope must exist first, and the publishing account or token must have write access to that scope: ```bash cd packages/codex-client npm publish --access public ``` -After `@peezy-tech/codex-flows` exists on npm, configure trusted publishing for `.github/workflows/publish-codex-flows.yml` in the public `peezy-tech/codex-flows` repo. Future publishes should run through GitHub Actions without an npm token. +After `@peezy.tech/codex-flows` exists on npm, configure trusted publishing for `.github/workflows/publish-codex-flows.yml` in the public `peezy-tech/codex-flows` repo. Future publishes should run through GitHub Actions without an npm token. ## Notes diff --git a/packages/codex-client/package.json b/packages/codex-client/package.json index c848562..680cf56 100644 --- a/packages/codex-client/package.json +++ b/packages/codex-client/package.json @@ -1,5 +1,5 @@ { - "name": "@peezy-tech/codex-flows", + "name": "@peezy.tech/codex-flows", "version": "0.1.0", "description": "Codex app-server JSON-RPC client, flow helpers, and generated protocol types.", "type": "module", diff --git a/packages/codex-client/scripts/smoke-exports.ts b/packages/codex-client/scripts/smoke-exports.ts index 07afbdc..ad128b6 100644 --- a/packages/codex-client/scripts/smoke-exports.ts +++ b/packages/codex-client/scripts/smoke-exports.ts @@ -1,9 +1,9 @@ const checks = [ - ["@peezy-tech/codex-flows", ["CodexAppServerClient"]], - ["@peezy-tech/codex-flows/browser", ["CodexAppServerClient"]], - ["@peezy-tech/codex-flows/flows", ["CodexFlowClient", "createCodexFlowClient"]], - ["@peezy-tech/codex-flows/rpc", ["JsonRpcError"]], - ["@peezy-tech/codex-flows/generated", ["v2"]], + ["@peezy.tech/codex-flows", ["CodexAppServerClient"]], + ["@peezy.tech/codex-flows/browser", ["CodexAppServerClient"]], + ["@peezy.tech/codex-flows/flows", ["CodexFlowClient", "createCodexFlowClient"]], + ["@peezy.tech/codex-flows/rpc", ["JsonRpcError"]], + ["@peezy.tech/codex-flows/generated", ["v2"]], ] as const; for (const [specifier, expectedExports] of checks) { diff --git a/packages/codex-client/src/app-server/client.ts b/packages/codex-client/src/app-server/client.ts index 6dc17c1..b4baedd 100644 --- a/packages/codex-client/src/app-server/client.ts +++ b/packages/codex-client/src/app-server/client.ts @@ -40,7 +40,7 @@ export class CodexAppServerClient extends CodexEventEmitter { super(); this.transport = options.transport ?? defaultTransport(options); - this.#clientName = options.clientName ?? "@peezy-tech/codex-flows"; + this.#clientName = options.clientName ?? "@peezy.tech/codex-flows"; this.#clientTitle = options.clientTitle ?? "Codex Client"; this.#clientVersion = options.clientVersion ?? "0.1.0"; diff --git a/packages/codex-client/src/app-server/flows.ts b/packages/codex-client/src/app-server/flows.ts index f736013..14e05a9 100644 --- a/packages/codex-client/src/app-server/flows.ts +++ b/packages/codex-client/src/app-server/flows.ts @@ -391,7 +391,7 @@ function clientIdentityOptions( "clientName" | "clientTitle" | "clientVersion" > { return compactUndefined({ - clientName: options.clientName ?? "peezy-tech-codex-flows", + clientName: options.clientName ?? "peezy.tech-codex-flows", clientTitle: options.clientTitle ?? "Codex Flows SDK", clientVersion: options.clientVersion ?? "0.1.0", });