Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.8",
"version": "0.13.9",
"author": {
"name": "Lauren Tan (pstack), pmwoz (T3 Code port)"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "t3-pstack",
"version": "0.13.8",
"version": "0.13.9",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion pins.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"t3": {
"repo": "pingdotgg/t3code",
"commit": "09a54f01bc0ae83865347a965ced50f8c8ec2953",
"commit": "c6ca6056309904f89b90b6055d797973be0a0939",
"paths": [
"apps/server/src/mcp/toolkits/attachment/tools.ts",
"apps/server/src/mcp/toolkits/device/tools.ts",
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pstack",
"displayName": "pstack",
"version": "0.13.8",
"version": "0.13.9",
"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)"
Expand Down
2 changes: 1 addition & 1 deletion plugins/pstack/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pstack",
"version": "0.13.8",
"version": "0.13.9",
"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)"
Expand Down
4 changes: 2 additions & 2 deletions plugins/pstack/skills/poteto-mode/references/t3-adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Upstream reads per-role models from "the `/setup-pstack` rule" (`~/.cursor/rules
- `orchestrator_capabilities` lists a short set of models per provider and leaves out legacy ones, but `delegate_task` accepts any catalog model id. Send a full model id the list lacks as it is. Call `orchestrator_capabilities` again with `search` set to the model only for a short form the list lacks or after `delegate_task` rejects the model.
- A project can turn a provider off. `orchestrator_capabilities` still lists it, but `delegate_task` refuses it as "disabled for project".
- When the search finds nothing or the provider is off, never switch the lane to another model or provider on your own. Name what is missing and ask the user which to use (Questions section). This replaces every fallback a skill gives for a rejected model, such as a family default, the closest valid slug from the error, or the parent model.
- Compare the `providerInstanceId`, `model`, and `options` that `delegate_task` returns with the target. If they differ, say so in the reply.
- Compare the `providerInstanceId`, `model`, and `options` that `delegate_task` returns with the target. If they differ, say so in the reply. The provider can still run another model, such as when the user's organization disallows the requested one. A finished task then reports it in `executedModel`, and T3 starts its summary with a note that names both models. Name the model that ran in the reply too.
3. `inherit-parent` or `auto` means: omit `target`. The lane runs on your own provider and model, and it still counts toward a panel's fan-out.
4. With no sheet line, translate the skill's default slug: `claude-opus-5-5-<effort>` is `claude:opus@<effort>`, `gpt-5.6-sol-<effort>` is `codex:gpt-6.1-sol@<effort>`, and `grok-4.7-<effort>-fast` or `grok-4.7-<effort>` is the `grok` provider when the catalog lists one that can run child tasks, else `codex:gpt-6.1-sol@<effort>`.
5. "A model family" is the provider. A cross-family judge or reviewer runs on a different provider than the work it judges.
Expand Down Expand Up @@ -120,7 +120,7 @@ T3 has no cloud agents. Every lane is a `delegate_task` child on this machine or
- **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.
- **Secrets** (a CLI token, an API key, a test account password for a verification run). The root calls `request_secret`. For a shell command, pass `delivery: "file"` and read the returned path inside the command, such as `TOKEN="$(cat <file>)" <cli>`. 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`.
- **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 <file>)" <cli>`. 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const DeleteScheduledTaskTool = Tool.make("delete_scheduled_task", {

const RequestSecretTool = Tool.make("request_secret", {
description:
'Ask for one secret per single-line card; never combine values. Open it, don\'t offer it. Returns one-use `secretRef`, or `delivery: "file"` a file read only in its command, e.g. `adb pair <ip:port> "$(cat <file>)"`. Asked how: call now. Pasted secret for child/script: `value`. Never from an old thread.',
'Ask for one secret per single-line card; never combine values. Open it, don\'t offer it. Returns one-use `secretRef`, or `delivery: "file"` a file read only in its command, e.g. `adb pair <ip:port> "$(cat <file>)"`. Asked how: call now. Sign-in link: `url`. Pasted secret for child/script: `value`. Never from an old thread.',
parameters: OrchestratorMcpRequestSecretInput,
success: OrchestratorMcpRequestSecretResult,
failure: OrchestratorMcpFailure,
Expand Down
20 changes: 19 additions & 1 deletion t3/contract/packages/contracts/src/orchestratorMcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
ThreadPullRequestKey,
ThreadPullRequestLinkSource,
} from "./threadPullRequest.ts";
import { secretRequestPageUrl } from "./secretRequest.ts";
import { hasOnlyPairedSurrogates } from "./threadMetadataMcp.ts";
import { ThreadTitleRegeneration } from "./threadTitle.ts";
import {
Expand Down Expand Up @@ -201,6 +202,12 @@ export const ORCHESTRATOR_MCP_RUNNING_TASK_NEXT =
"Completion wakes this thread, so end your turn. Do not wait on it or poll it.";
const OrchestratorMcpRunningTaskNext = Schema.Literal(ORCHESTRATOR_MCP_RUNNING_TASK_NEXT);

// Optional: linked environments on older versions omit it.
const OrchestratorMcpExecutedModel = Schema.NullOr(Schema.String).annotate({
description:
"Model the provider reported running, or null when unavailable. Can differ from the requested `model`.",
});

export const OrchestratorMcpDelegateTaskResult = Schema.Struct({
taskId: NodeId,
/** Null for a task that runs in a linked environment; see `remoteChild`. */
Expand All @@ -221,6 +228,7 @@ export const OrchestratorMcpDelegateTaskResult = Schema.Struct({
latestTerminalResultContextTransferId: Schema.NullOr(ContextTransferId),
providerInstanceId: ProviderInstanceId,
model: Schema.NullOr(Schema.String),
executedModel: Schema.optional(OrchestratorMcpExecutedModel),
options: Schema.optional(Schema.Array(ProviderOptionSelection)),
summary: Schema.NullOr(Schema.String),
resultContextTransferId: Schema.NullOr(ContextTransferId),
Expand Down Expand Up @@ -462,6 +470,7 @@ export const OrchestratorMcpThreadRun = Schema.Struct({
status: OrchestrationV2RunStatus,
providerInstanceId: ProviderInstanceId,
model: Schema.String,
executedModel: Schema.optional(OrchestratorMcpExecutedModel),
requestedAt: IsoDateTime,
startedAt: Schema.NullOr(IsoDateTime),
completedAt: Schema.NullOr(IsoDateTime),
Expand Down Expand Up @@ -752,7 +761,16 @@ export const OrchestratorMcpRequestSecretInput = Schema.Struct({
description: "Card title, such as 'GitHub webhook secret'.",
}),
reason: TrimmedNonEmptyString.annotate({
description: "What it is for and where to get it.",
description: "What it is for and where to get it. A link goes in `url`.",
}),
url: Schema.optional(
TrimmedNonEmptyString.check(
Schema.makeFilter((value) => secretRequestPageUrl(value) !== null, {
expected: "an http(s) URL",
}),
),
).annotate({
description: "Sign-in or setup page for the value. Shown as a button.",
}),
placeholder: Schema.optional(TrimmedNonEmptyString),
delivery: Schema.optional(Schema.Literals(["secretRef", "file"])).annotate({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Ordinary coding tasks need no T3 tools.
- Another machine: \`t3_environment_links\` lists linked ones. Pass its \`environmentId\` to a T3 tool to act there. Ids are then that machine's, so pass \`threadId\`.
- A machine the user names that is not linked ("delegate this to my vps"): call \`t3_environment_link\` with a \`hint\` from their words. Never ask for a pairing code in chat.
- In your reply, mention a thread by its \`link\`, verbatim. Never a plain title or bare id.
- A login, token, PIN or pairing code only the user can give: call \`request_secret\`, not a chat ask or a handoff. Not for access you have. When asked only to schedule, \`schedule_task\` without running its prompt.
- A login, token, PIN, pairing code or sudo password only the user can give: call \`request_secret\`, not a chat ask or a handoff. Not for access you have. Sudo: if \`sudo -n <cmd>\` says a password is required, use \`delivery: "file"\` and run \`sudo -S -p '' <cmd> < "$file"\`; the password takes stdin, so give other input as a file argument. When asked only to schedule, \`schedule_task\` without running its prompt.
- T3 tools may load late. Try the name once before you call it absent.`,
`### Visuals and preview

Expand Down
Loading