From bf462b00d968bbfb864b368edee6c8d26925470a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20M=2E=20Wo=C5=BAniak?= Date: Wed, 11 Nov 2026 09:02:32 +0100 Subject: [PATCH] Update T3 contract to 40c3682 --- .claude-plugin/marketplace.json | 2 +- package.json | 2 +- pins.json | 2 +- plugins/pstack/.claude-plugin/plugin.json | 2 +- plugins/pstack/.codex-plugin/plugin.json | 2 +- .../skills/poteto-mode/references/t3-adapter.md | 2 +- .../apps/server/src/provider/Drivers/ClaudeSkills.ts | 11 +++++++++++ .../provider-core/src/server/runtimeInstructions.ts | 2 +- 8 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f1042e2..87529f9 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "pstack", "source": "./plugins/pstack", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", - "version": "0.13.9", + "version": "0.13.10", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" }, diff --git a/package.json b/package.json index 7f53591..3ea9e5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "t3-pstack", - "version": "0.13.9", + "version": "0.13.10", "private": true, "type": "module", "scripts": { diff --git a/pins.json b/pins.json index aa0180b..cd60db3 100644 --- a/pins.json +++ b/pins.json @@ -23,7 +23,7 @@ }, "t3": { "repo": "pingdotgg/t3code", - "commit": "9e12eca12526c842f97cfcbc6f3cd2149259c776", + "commit": "40c3682543fdcb9f8b7d4106ed2ab970c25b7dc5", "paths": [ "apps/server/src/mcp/toolkits/attachment/tools.ts", "apps/server/src/mcp/toolkits/device/tools.ts", diff --git a/plugins/pstack/.claude-plugin/plugin.json b/plugins/pstack/.claude-plugin/plugin.json index 4f6756f..37e2019 100644 --- a/plugins/pstack/.claude-plugin/plugin.json +++ b/plugins/pstack/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "pstack", "displayName": "pstack", - "version": "0.13.9", + "version": "0.13.10", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" diff --git a/plugins/pstack/.codex-plugin/plugin.json b/plugins/pstack/.codex-plugin/plugin.json index d896a4e..8b4ab7e 100644 --- a/plugins/pstack/.codex-plugin/plugin.json +++ b/plugins/pstack/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pstack", - "version": "0.13.9", + "version": "0.13.10", "description": "Cursor pstack for T3 Code: poteto-mode, principles, and the verified agent workflows, adapted to T3 orchestration for Claude and Codex.", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" diff --git a/plugins/pstack/skills/poteto-mode/references/t3-adapter.md b/plugins/pstack/skills/poteto-mode/references/t3-adapter.md index d5b881a..1d7ff73 100644 --- a/plugins/pstack/skills/poteto-mode/references/t3-adapter.md +++ b/plugins/pstack/skills/poteto-mode/references/t3-adapter.md @@ -119,7 +119,7 @@ T3 has no cloud agents. Every lane is a `delegate_task` child on this machine or - **`AskQuestion`.** On Claude, use `AskUserQuestion`. On Codex, use `request_user_input` only when the session exposes it and allows it in the current mode (Codex limits it to plan mode). Otherwise ask one plain-text question with labeled options. - **A delegated child never asks the user.** It returns `BLOCKED` with the question, and the root asks. A child that asks anyway waits, and `t3_thread_read` on its `childThreadId` shows a nonzero `pendingRequestCount`. Find the question with `t3_pending_request` and `action: "list"`, read it with `action: "read"`, and answer it with `action: "respond"`, each with `threadId` set to the child's `childThreadId`. Answer it yourself when the brief or the run settles it. Otherwise ask the user and pass on the answer. - **Visuals** (charts, tables, mockups, Cursor's `/visualize`). Build a self-contained page as an `.html` file in the work dir (Worktrees section), check it with `html_preview`, then publish it with `html_render` from the root. Pass the file's absolute path as `path` to both, so the page is not retyped. Only a full-access thread may pass `path`. Any other thread gets a capability error and passes the page as inline `html` instead. A child's render lands in the child's thread. Show verification screenshots the same way, for example a before and after grid, before the reply that cites them. A reader who clicks an image outside a link or button opens it full size in T3's image viewer, so a grid can show screenshots small. Write each image as one complete absolute path, in `src` or as a JavaScript string. T3 does not inline a path the page builds from parts. T3 inlines local images into the page, so the thread keeps them after the worktree is gone. To embed a screenshot, a video, or an audio clip in the reply itself, as `/ketchup` asks, write it as a Markdown image whose target is the file's absolute path. T3 renders all three. Keep that file in the work dir (Worktrees section), so it outlives the worktree. A Mermaid fence in the reply renders as a diagram. A generated image needs an image tool from your provider. T3 has none, so without one draw a diagram or chart instead. -- **Files in the reply.** Link each file the reply cites, such as show-me-your-work's evidence, the decision log, or a verification log, as a Markdown link whose target is the file's absolute path. T3 opens it in its file viewer. +- **Files in the reply.** Link each file the reply cites, such as show-me-your-work's evidence, the decision log, a verification log, or a `file:line` that why or blast-radius asks for, as a Markdown link whose target is the file's absolute path. Put a line number in the label and the target, so the label `http.ts:42` links to `/abs/path/http.ts:42`. T3 opens it in its file viewer. T3 resolves a relative path against the thread's working directory, so a path relative to a package or to another checkout often opens a missing file. - **Secrets** (a CLI token, an API key, a test account password for a verification run). The root calls `request_secret` and puts the link to the page where the user gets the value, such as the service's token settings, in `url`, not in `reason`. The card shows it as a button. For a shell command, pass `delivery: "file"` and read the returned path inside the command, such as `TOKEN="$(cat )" `. Never print the value, and keep it out of the work dir, briefs, and commits. A child that needs a secret returns `BLOCKED`. The root requests it and puts the file path, never the value, in the next brief. T3 deletes the file after 24 hours, so a schedule or automation that needs the value later reads it from the user's own configuration, such as benny's `BENNY_SLACK_BOT_TOKEN`. ## Cursor products with no counterpart diff --git a/t3/contract/apps/server/src/provider/Drivers/ClaudeSkills.ts b/t3/contract/apps/server/src/provider/Drivers/ClaudeSkills.ts index 0d62109..ada8a39 100644 --- a/t3/contract/apps/server/src/provider/Drivers/ClaudeSkills.ts +++ b/t3/contract/apps/server/src/provider/Drivers/ClaudeSkills.ts @@ -472,6 +472,17 @@ export const readClaudeSettingsEnv = Effect.fn("readClaudeSettingsEnv")(function return settingsEnv; }); +/** The host of an `ANTHROPIC_BASE_URL` that is not Anthropic's own API. */ +export function customClaudeApiEndpointHost(baseUrl: string | undefined): string | undefined { + const endpoint = URL.parse(baseUrl?.trim() ?? ""); + return endpoint !== null && + (endpoint.protocol === "http:" || endpoint.protocol === "https:") && + endpoint.hostname !== "" && + endpoint.hostname !== "api.anthropic.com" + ? endpoint.hostname + : undefined; +} + // Claude's --add-dir is repeatable and variadic; parseCliArgs keeps only one value. export function claudeLaunchArgDirectories(launchArgs?: string): ReadonlyArray { const directories: string[] = []; diff --git a/t3/contract/packages/provider-core/src/server/runtimeInstructions.ts b/t3/contract/packages/provider-core/src/server/runtimeInstructions.ts index 3a65db1..88c4985 100644 --- a/t3/contract/packages/provider-core/src/server/runtimeInstructions.ts +++ b/t3/contract/packages/provider-core/src/server/runtimeInstructions.ts @@ -20,7 +20,7 @@ export function buildRuntimeInstructions(runtime: { modelName && modelName !== model ? `${modelName} (model slug: ${model})` : model; const modelInfo = model && model !== "auto" && model !== "default" ? `, as ${modelLabel}` : ""; const effortInfo = effort ? ` with ${effort} reasoning effort` : ""; - const runtimeInfo = `In case you're asked: you are running in T3 Code through the ${harness} harness${modelInfo}${effortInfo}. No need to mention this otherwise. You can embed images, video, and audio in your response using Markdown image syntax with absolute file paths. Link any other file you produce using its absolute path so the user can open it in T3 Code's files viewer.`; + const runtimeInfo = `In case you're asked: you are running in T3 Code through the ${harness} harness${modelInfo}${effortInfo}. No need to mention this otherwise. You can embed images, video, and audio in your response using Markdown image syntax with absolute file paths. Link every other file you cite or produce by its absolute path, as in [http.ts:42](/abs/path/http.ts:42), so the user can open it in T3 Code's files viewer.`; return runtime.pullRequestLinking === false ? runtimeInfo : `${runtimeInfo}\n\n${PULL_REQUEST_LINKING_INSTRUCTIONS}`;