From a806b184d133401e4a2a22e3e6ca6d1ad5d2ed91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20M=2E=20Wo=C5=BAniak?= Date: Thu, 29 Oct 2026 09:28:28 +0100 Subject: [PATCH] Map native mobile to T3 device tools and list threads across projects --- .claude-plugin/marketplace.json | 2 +- package.json | 2 +- plugins/pstack/.claude-plugin/plugin.json | 2 +- plugins/pstack/.codex-plugin/plugin.json | 2 +- plugins/pstack/skills/poteto-mode/references/t3-adapter.md | 6 ++++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 92d126f..3915f6f 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.2", + "version": "0.13.3", "author": { "name": "Lauren Tan (pstack), pmwoz (T3 Code port)" }, diff --git a/package.json b/package.json index c01b830..8c44bce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "t3-pstack", - "version": "0.13.2", + "version": "0.13.3", "private": true, "type": "module", "scripts": { diff --git a/plugins/pstack/.claude-plugin/plugin.json b/plugins/pstack/.claude-plugin/plugin.json index 6557b58..159c561 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.2", + "version": "0.13.3", "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 195784a..b559125 100644 --- a/plugins/pstack/.codex-plugin/plugin.json +++ b/plugins/pstack/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pstack", - "version": "0.13.2", + "version": "0.13.3", "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 b32eab5..df1bc67 100644 --- a/plugins/pstack/skills/poteto-mode/references/t3-adapter.md +++ b/plugins/pstack/skills/poteto-mode/references/t3-adapter.md @@ -18,6 +18,7 @@ A skill that names another one ("the **how** skill", "run `/deslop`", "the **pro - Principle skills live at `skills/principle-/SKILL.md`. - `deslop`, `control-ui`, and `control-cli` come from Cursor's team kit and ship in `skills/`. +- The control skill for native mobile ("whatever simulator-driving skill the repo has") is T3's device tools when the session has them, driven as T3's device instructions say. A repo skill for the simulator still gives the build, install, and launch-prep steps. Save evidence screenshots and recordings into the work dir (Worktrees section) with the `agent-device` command that `device_open` returns. - A user who types `/pstack:` (Claude) or `$pstack:` (Codex) starts the skill directly. That path is unchanged. - A `create-skill` step uses the `skill-creator` skill when the session has it. Otherwise follow `playbooks/authoring-a-skill.md`. @@ -74,9 +75,10 @@ T3 has no cloud agents. Every lane is a `delegate_task` child on this machine or - **Cleanup removes only what the root made.** When the user asks to clean up, remove the worktrees the root added with `git worktree add` and its scratch files outside the work dir. Keep each child's worktree, which belongs to the child's thread, and keep the work dir, which holds the evidence the trail and the PR cite. - **The user picks the root's workspace.** The user starts a thread in a worktree from the T3 UI. The root works in the checkout its thread is in and never moves it. If the root sits on `main` and the task writes, it creates a branch there with `git switch -c `. Never call `t3_worktree_handoff`. It detaches the provider session, and the queued continuation can wait for minutes or never start. - **A linked environment stands in for a cloud VM.** `t3_environment_links` lists the user's other machines, when T3's Labs beta for them is on. Run a lane that upstream sends to the cloud on a link whose `status` is `reachable` and whose `access` is `auto` or `full-access`, because a narrower link makes the user approve the child's tool calls by hand. Never call `t3_environment_link` unless the user names a machine to link, because it asks the user to approve the link. Delegate with `target.environmentId`, and resolve the role's model with `orchestrator_capabilities` given that `environmentId`. The task runs in that machine's checkout of the repository and takes no `isolation` or attachments, so only pushed commits reach it. When `delegate_task` finds no project for the repository there, run the lane here. Push the base first. The brief tells the child to fetch it, run `git worktree add ${TMPDIR:-/tmp}/pstack/// ` there, and work only in that worktree. The child pushes its branch, returns its evidence in its report, and then removes the worktree. A lane that needs this machine, such as a control skill run, a simulator, local transcripts, auth that exists only here, or the work dir, stays local. Name each remote lane's machine in the reply. +- **A lane that drives a simulator or emulator gets its own device.** Pick one per lane from your `device_list`, and put its `hostId` and `id` in the brief, as T3's device instructions say, plus its `booted` value. Two lanes never share a device, so device lanes beyond the free devices run in sequence. Before it returns, the lane calls `device_close` on its device, with `shutdown: true` when it was not booted, so the next lane can open it and no idle simulator holds CPU. - **Upstream's capacity numbers assume cloud VMs.** Cap in-flight writing lanes at what this machine and each linked machine you use can run. Give each live lane its own ports and data directories per the project's verification skill. If the app cannot run side by side, run those lanes in sequence. A push that runs a pre-push gate waits while a lane drives the shared VM, simulator, or app. - **Separate top-level threads** come only from an explicit user request for them. Then use `t3_thread_launch` with a `workspaceStrategy`. A launched thread is not a task: follow it with `t3_thread_read` or `t3_thread_wait`, never `task_status`, and it does not wake you when it ends. `t3_thread_wait` with `untilDelegatedWorkSettled: true` also waits for the tasks that thread delegated, and its `resultRun` names the run that holds the final answer. -- **Listing worktrees.** `t3_worktree_status` reports only your own thread. To audit every worktree, use `t3_worktree_list`, `t3_thread_list`, and `t3_thread_read` per thread for its `worktreePath`. `t3_thread_list` also returns each thread's linked PRs and their state in `pullRequests`, so the audit needs no `list_thread_pull_requests` call per thread. Add `git worktree list` for detached worktrees, which `t3_worktree_list` omits. +- **Listing worktrees.** `t3_worktree_status` reports only your own thread. To audit every worktree, use `t3_worktree_list`, `t3_thread_list`, and `t3_thread_read` per thread for its `worktreePath`. `t3_thread_list` with `allProjects: true` lists every project's threads in one call, and each item names its `projectId`. It also returns each thread's linked PRs and their state in `pullRequests`, so the audit needs no `list_thread_pull_requests` call per thread. Add `git worktree list` for detached worktrees, which `t3_worktree_list` omits. ## Pull requests, watching, and loops @@ -101,7 +103,7 @@ T3 has no cloud agents. Every lane is a `delegate_task` child on this machine or - **Earlier chats** (recall, reflect, session pickup, show-me-your-work audits). Use `t3_thread_search` and `t3_thread_list` in this project only. `t3_thread_search` returns title, branch, and PR matches first. A message match needs every query word of three or more characters and carries `source` (`user` or `assistant`), a `snippet`, and `messageCreatedAt`, so pick threads from the snippets before you read them. Message matches fill at most a fifth of `limit`, so pass `limit: 50`, the maximum, when you look for message content. Search skips subagent threads. Pass thread ids to children, not file paths. Read a long thread in pages of `limit: 20` with `maxCharsPerItem: 2000`, and recover a long item with `itemId` and `textOffset`. Larger pages overflow the tool output. On Codex, such a page still prints about 60,000 characters and the exec output keeps about 40,000, so never print a raw `t3_thread_read` result. Keep it in a variable and print what you need, such as each item's `position`, `type`, and first 300 characters. Cite a thread by the `link` a thread tool returned, verbatim, never by a title or a bare id. With only an id, `t3_thread_read` returns its `link`. - **Messages from other threads.** A `t3_thread_read` item with `senderThreadId` is a message that thread sent with `t3_thread_send`, such as a parent's follow-up. The user did not type it, so do not read it as the user's words. - **Shell fallback.** `~/.claude/projects//*.jsonl` (Claude) and `~/.codex/sessions/**/*.jsonl` (Codex). -- **Pinned and active chats** ("from the user or the sidebar") are threads with `t3_thread_list` status not settled. +- **Pinned and active chats** ("from the user or the sidebar") are the threads `t3_thread_list` returns with `settled: false`. Add `allProjects: true` when the work spans repositories, such as a disk cleanup. ## Locations