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 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
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