From 87267388f534632f722008ff7ab11e986b77f4ca Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Tue, 22 Sep 2026 13:09:17 -0700 Subject: [PATCH] build(deps): depend on published @intx 0.4.0 (CL-8797) --- .github/workflows/test.yml | 54 +++++--------------------------------- AGENTS.md | 1 - ARCHITECTURE.md | 6 ++--- CONTRIBUTING.md | 8 +----- README.md | 6 +---- bun.lock | 38 ++++++++++++++++++++++----- bunfig.toml | 3 --- package.json | 21 +++++++-------- scripts/link-intx.ts | 37 -------------------------- src/shims/intx-agent.d.ts | 44 ------------------------------- tsconfig.build.json | 3 --- tsconfig.json | 1 - tsconfig.typecheck.json | 8 ------ 13 files changed, 52 insertions(+), 178 deletions(-) delete mode 100644 bunfig.toml delete mode 100644 scripts/link-intx.ts delete mode 100644 src/shims/intx-agent.d.ts delete mode 100644 tsconfig.typecheck.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cea5b0e..b1b9cb6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,75 +5,33 @@ on: branches: [main] pull_request: -# This workflow intentionally checks out live Interchange until mediated -# credentials ship in a released package; it is integration CI, not release CI. - jobs: typecheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - path: x-tools - - uses: actions/checkout@v4 - with: - repository: corbitsdev/interchange - path: interchange - uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.14 - - name: Install Interchange (for @intx/* links) - working-directory: interchange - run: bun install --frozen-lockfile - - name: Install x-tools - working-directory: x-tools - run: bun install --frozen-lockfile - - name: Link Interchange packages - working-directory: x-tools - run: bun run link:intx - - working-directory: x-tools - run: bun run typecheck + - run: bun install --frozen-lockfile + - run: bun run typecheck test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - path: x-tools - - uses: actions/checkout@v4 - with: - repository: corbitsdev/interchange - path: interchange - uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.14 - - working-directory: interchange - run: bun install --frozen-lockfile - - working-directory: x-tools - run: bun install --frozen-lockfile - - working-directory: x-tools - run: bun run link:intx - - working-directory: x-tools - run: bun run test + - run: bun install --frozen-lockfile + - run: bun run test build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - path: x-tools - - uses: actions/checkout@v4 - with: - repository: corbitsdev/interchange - path: interchange - uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.14 - - working-directory: interchange - run: bun install --frozen-lockfile - - working-directory: x-tools - run: bun install --frozen-lockfile - - working-directory: x-tools - run: bun run link:intx - - working-directory: x-tools - run: bun run build + - run: bun install --frozen-lockfile + - run: bun run build diff --git a/AGENTS.md b/AGENTS.md index aa9ef08..11017f9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,7 +21,6 @@ tools (credential handle `x-api`). See ARCHITECTURE.md. ```bash bun install -bun run link:intx bun run typecheck bun test bun run build diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 785c7d3..2ee641f 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -52,9 +52,9 @@ src/ index.ts ``` -Depends on a sibling `../interchange` checkout. Run `bun run link:intx` to -symlink its packages so we track live `intx-src` — not the stale npm `0.2.2` -cut. +Depends on the published `@intx/agent` and `@intx/types` packages (peer +dependencies, `>=0.4.0`). + ## Tool delivery plan (v1) 1. Users → 2. Posts → 3. Search → 4. Bookmarks → 5. Media → 6. News / Trends diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3c7a7c9..0f4443e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,15 +2,9 @@ A small, deliberately boring codebase: strict TypeScript, no magic. -Setup and commands are in the [README](./README.md#working-on-it). `bun run +Setup and commands are in the [README](./README.md#development). `bun run typecheck` must be clean — it is its own CI step, and `any` is not a way past it. -## Interchange (local) - -`bun run link:intx` symlinks `@intx/*` from a sibling `../interchange` checkout -(live `intx-src`, not npm `0.2.2`). Peer dependencies still declare -`@intx/agent` and `@intx/types`. - See [ARCHITECTURE.md](./ARCHITECTURE.md) for the delivery plan and non-goals. ## Tests diff --git a/README.md b/README.md index 145f2a3..1e5af13 100644 --- a/README.md +++ b/README.md @@ -40,16 +40,12 @@ request timeout, cancellation, and `XAPIError` for non-2xx responses. See git clone https://github.com/corbitsdev/x-tools.git cd x-tools bun install -bun run link:intx bun run typecheck bun run test bun run build ``` -`bun run link:intx` links a sibling Interchange checkout at `../interchange`; -it's required before `typecheck`, `test`, or `build` since `@intx/agent` and -`@intx/types` aren't published yet. See [CONTRIBUTING.md](./CONTRIBUTING.md) -and [ARCHITECTURE.md](./ARCHITECTURE.md). +See [CONTRIBUTING.md](./CONTRIBUTING.md) and [ARCHITECTURE.md](./ARCHITECTURE.md). ## License diff --git a/bun.lock b/bun.lock index fb0c271..d145ec5 100644 --- a/bun.lock +++ b/bun.lock @@ -5,27 +5,53 @@ "": { "name": "@corbits/x-tools", "devDependencies": { + "@intx/agent": "0.4.0", + "@intx/types": "0.4.0", "@types/bun": "1.3.14", "@types/node": "22.10.5", "typescript": "5.9.3", }, "peerDependencies": { - "@intx/agent": "*", - "@intx/types": "*", + "@intx/agent": ">=0.4.0", + "@intx/types": ">=0.4.0", }, - "optionalPeers": [ - "@intx/agent", - "@intx/types", - ], }, }, "packages": { + "@ark/schema": ["@ark/schema@0.56.2", "", { "dependencies": { "@ark/util": "0.56.2" } }, "sha512-Qx4D2JFbBWpntiHZaTv7bGG4H/M2rigiknezKg/WVyDSaLdE4YCcWAOoFB7pjjDqHbbV2OqRfntm1nnXvwMexg=="], + + "@ark/util": ["@ark/util@0.56.2", "", {}, "sha512-9kU2sUE38FZEGG7l3hamYMBieLYEJh2L1mrYD2eXpT+78EnQSV1bhjxJhnxGBMSTbtwpBSDNSK+K60WvaI/DTQ=="], + + "@intx/agent": ["@intx/agent@0.4.0", "", { "dependencies": { "@intx/inference": "0.4.0", "@intx/log": "0.4.0", "@intx/mime": "0.4.0", "@intx/types": "0.4.0", "arktype": "^2.1.29" } }, "sha512-qBlqDYnsaRMsug/lEKwUvPgQfjiwppTpfw5JaUh6pwKi0dGvckv3ugjJvLdHM052nTFMgLgOwo1LvbRjPZ5Uwg=="], + + "@intx/crypto": ["@intx/crypto@0.4.0", "", { "dependencies": { "@intx/types": "0.4.0" } }, "sha512-4/qWypC90GevbV9u1i/93tn46jsXhj8wE1Pn+awg8/ECpwhHnhPLT5Uy423Arr9eGmRmF6HiMyXcEgH1Z9/Rkw=="], + + "@intx/inference": ["@intx/inference@0.4.0", "", { "dependencies": { "@intx/log": "0.4.0", "@intx/types": "0.4.0", "arktype": "^2.1.29" } }, "sha512-cuaqCqotmjg0OzGUm8QmFJr1xX5wPVS0LeuhrxHsj0X3ImoCzVB4e/ttTc+DaP3K1tTMQ/8Q8HHCAPX36mOecQ=="], + + "@intx/log": ["@intx/log@0.4.0", "", { "dependencies": { "@logtape/hono": "^2.0.2", "@logtape/logtape": "^2.0.2" }, "peerDependencies": { "hono": "^4.0.0" }, "optionalPeers": ["hono"] }, "sha512-f1IPZ/9YpEqlA0I2UZPOlRJOTDoOFEZRwZoUVuw8DpgR1WatOMm4hA0E8o6Mtz+pA0ux7gVdls4y/JZcgypsfQ=="], + + "@intx/mime": ["@intx/mime@0.4.0", "", { "dependencies": { "@intx/crypto": "0.4.0", "@intx/types": "0.4.0", "arktype": "^2.1.29" } }, "sha512-sWrohF2uwVL5AZHbxIEUNiVUBhULff4XB7g6keCmyQWr296GKSvG/HmbihSXxiIvmmDzh9cl+6ZAJz/taxFNog=="], + + "@intx/types": ["@intx/types@0.4.0", "", { "dependencies": { "arktype": "^2.1.29", "semver": "^7.7.2" } }, "sha512-nJ2fcmskMOZNMRfbHs5ueKpCANHNttoL+sZgIoFaVUF/QLpFWfVp0YV72CQAaa9bVv9j5kRSwtSOCCGSlwQ6Dw=="], + + "@logtape/hono": ["@logtape/hono@2.3.7", "", { "peerDependencies": { "@logtape/logtape": "^2.3.7", "hono": "^4.0.0" } }, "sha512-b8LYZmqEoSfz+BW9tpvXR9tJfu1G5PtYvNqyMjvHCgq0A5/KFdpQ0dI9ZeOK8C8OPcI56ujq++5b+53xIDocAw=="], + + "@logtape/logtape": ["@logtape/logtape@2.3.7", "", {}, "sha512-y0X4Liaj9voRRn0aAffCw2HCRpZEibOdmHiOgwsAT0hgHS8MaDKHl9cQGZ8r8uZR+b+yN9qznNYru6z9oOEMVw=="], + "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="], "@types/node": ["@types/node@22.10.5", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ=="], + "arkregex": ["arkregex@0.0.8", "", { "dependencies": { "@ark/util": "0.56.2" } }, "sha512-PJcx6G1kQTgLKPUbeYlYecDRaKq15AMSGVajlKFYWlPeJRQL+j3dKE6tyMs40HZ99djS1l9Vhl3ezAHy9JBIqQ=="], + + "arktype": ["arktype@2.2.3", "", { "dependencies": { "@ark/schema": "0.56.2", "@ark/util": "0.56.2", "arkregex": "0.0.8" } }, "sha512-7W+0RLTUNJiBFIIZXwOQxSR8Z273IAd6IvqBeG9+gHnQKFsIx2C0iOtGTmMrPnlX4qLXyc5+ll7A0BIj9WrbTg=="], + "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], + "hono": ["hono@4.13.8", "", {}, "sha512-/Gng7NfoykZl2pjukW5Z6+8Yxm3BPRf86GTbQnt0SbySkvax4fyL4H3HhY1cCpBGmiW9XDRFzRV+CXK2W8QudQ=="], + + "semver": ["semver@7.8.5", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], diff --git a/bunfig.toml b/bunfig.toml deleted file mode 100644 index a9882ee..0000000 --- a/bunfig.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Resolve Interchange packages to TypeScript source (same as Interchange itself). -[resolve] -conditions = ["intx-src"] diff --git a/package.json b/package.json index 305febd..24bfb87 100644 --- a/package.json +++ b/package.json @@ -55,24 +55,21 @@ ], "sideEffects": false, "scripts": { - "link:intx": "bun scripts/link-intx.ts", - "typecheck": "tsc -p tsconfig.typecheck.json --noEmit", + "typecheck": "tsc --noEmit", "build": "rm -rf dist && tsc -p tsconfig.build.json", "prepack": "bun run build", - "test": "bun test --conditions intx-src src", - "test:client": "bun test --conditions intx-src src/client", - "test:tools": "bun test --conditions intx-src src/tools", - "test:coverage": "bun test --conditions intx-src --coverage src" + "test": "bun test src", + "test:client": "bun test src/client", + "test:tools": "bun test src/tools", + "test:coverage": "bun test --coverage src" }, "peerDependencies": { - "@intx/agent": "*", - "@intx/types": "*" - }, - "peerDependenciesMeta": { - "@intx/agent": { "optional": true }, - "@intx/types": { "optional": true } + "@intx/agent": ">=0.4.0", + "@intx/types": ">=0.4.0" }, "devDependencies": { + "@intx/agent": "0.4.0", + "@intx/types": "0.4.0", "@types/bun": "1.3.14", "@types/node": "22.10.5", "typescript": "5.9.3" diff --git a/scripts/link-intx.ts b/scripts/link-intx.ts deleted file mode 100644 index 65fdc2b..0000000 --- a/scripts/link-intx.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Link sibling Interchange packages into node_modules so we track live - * source (intx-src), not the stale npm 0.2.2 cut. - * - * Expects `../interchange` next to this repo (local Corbits layout). - */ -import { existsSync, mkdirSync, rmSync, symlinkSync } from "node:fs"; -import { dirname, join, resolve } from "node:path"; -import { fileURLToPath } from "node:url"; - -const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); -const interchangeRoot = resolve(root, "../interchange"); -const intxModules = join(interchangeRoot, "node_modules/@intx"); -const destRoot = join(root, "node_modules/@intx"); - -const packages = ["agent", "types", "inference", "log", "mime", "crypto"] as const; - -if (!existsSync(intxModules)) { - console.warn( - `link-intx: ${intxModules} not found — skip (CI without sibling interchange)`, - ); - process.exit(0); -} - -mkdirSync(destRoot, { recursive: true }); - -for (const name of packages) { - const src = join(intxModules, name); - const dest = join(destRoot, name); - if (!existsSync(src)) { - console.warn(`link-intx: missing ${src} — skip`); - continue; - } - rmSync(dest, { recursive: true, force: true }); - symlinkSync(src, dest); - console.log(`link-intx: @intx/${name} -> ${src}`); -} diff --git a/src/shims/intx-agent.d.ts b/src/shims/intx-agent.d.ts deleted file mode 100644 index aeb43ed..0000000 --- a/src/shims/intx-agent.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { - ToolCall, - ToolDefinition, - ToolResult, -} from "@intx/types/runtime"; - -/** Typecheck-only surface for the small `@intx/agent` API this package uses. */ -export interface BaseEnv { - [key: string]: unknown; -} - -export interface ToolDeclaration { - readonly name: string; - readonly approval?: "ask"; -} - -export type ToolHandler = ( - call: ToolCall, - signal: AbortSignal, -) => Promise; - -export interface ToolBundle { - readonly definitions: readonly ToolDefinition[]; - run(call: ToolCall, signal: AbortSignal): Promise; - dispose?(): Promise; -} - -export type ToolFactory = ( - env: EnvReq, -) => ToolBundle; - -export type AnnotatedToolFactory = - ToolFactory & { - readonly id: string; - readonly requires: readonly string[]; - readonly definitions: readonly ToolDeclaration[]; - }; - -export function defineTool(opts: { - id: string; - requires?: readonly string[]; - definitions: readonly ToolDeclaration[]; - factory: ToolFactory; -}): AnnotatedToolFactory; diff --git a/tsconfig.build.json b/tsconfig.build.json index 67308b3..7b4187d 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -2,9 +2,6 @@ "extends": "./tsconfig.json", "compilerOptions": { "types": ["node"], - "paths": { - "@intx/agent": ["./src/shims/intx-agent.d.ts"] - }, "noEmit": false, "declaration": true, "declarationMap": true, diff --git a/tsconfig.json b/tsconfig.json index eb1ac07..2914d81 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,6 @@ "target": "ESNext", "module": "ESNext", "moduleResolution": "bundler", - "customConditions": ["intx-src"], "verbatimModuleSyntax": true, "skipLibCheck": true, "noEmit": true, diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json deleted file mode 100644 index ee6cfc9..0000000 --- a/tsconfig.typecheck.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "paths": { - "@intx/agent": ["./src/shims/intx-agent.d.ts"] - } - } -}