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": "67eebaca23f8f7bc46e8817434087fc9c5acf8e3",
"commit": "2756da402b5d795baa05762cba1706a2c0e2fac8",
"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 a secret in a private card and wait; open it, don\'t offer it. Returns a one-use `secretRef`, or with `delivery: "file"` a file to read only in its command, e.g. `adb pair <ip:port> "$(cat <file>)"`. Asked how to give one: call now. Pasted secret for child or script: `value`. Not one 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. Pasted secret for child/script: `value`. Never from an old thread.',
parameters: OrchestratorMcpRequestSecretInput,
success: OrchestratorMcpRequestSecretResult,
failure: OrchestratorMcpFailure,
Expand Down
2 changes: 1 addition & 1 deletion t3/contract/apps/server/src/mcp/toolkits/project/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const ThreadLaunchTool = Tool.make("t3_thread_launch", {
workspaceStrategy: Schema.optional(
OrchestrationV2ThreadLaunchWorkspaceStrategy.annotate({
description:
"'worktree': new checkout from `baseRef`. 'existing_worktree': bind `worktreePath`, a project worktree. 'root': project checkout, the default, not your worktree. Stack: parent branch as `baseRef`, `startFromOrigin: false`. Uncommitted edits are not copied.",
"'worktree': new checkout from `baseRef`. Honor a requested base. Otherwise, independent work uses the default branch as `remote/branch` (e.g. `origin/main`) with `startFromOrigin: true`; with no remote, use the local default branch. Required unpublished commits and dependent or stacked work use their local base with `startFromOrigin: false`. 'existing_worktree': bind `worktreePath`, a project worktree. 'root': project checkout, the default, not your worktree. Uncommitted edits are not copied.",
}),
),
message: Schema.optional(
Expand Down
10 changes: 0 additions & 10 deletions t3/contract/apps/server/src/mcp/toolkits/pullRequests/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ export class PullRequestThreadRequiredError extends Schema.TaggedError<PullReque
}
}

export class PullRequestThreadNotFoundError extends Schema.TaggedError<PullRequestThreadNotFoundError>()(
"PullRequestThreadNotFoundError",
{ threadId: Schema.String },
) {
override get message(): string {
return `Thread ${this.threadId} was not found.`;
}
}

export class PullRequestLinkFailedError extends Schema.TaggedError<PullRequestLinkFailedError>()(
"PullRequestLinkFailedError",
{ cause: Schema.Defect() },
Expand Down Expand Up @@ -193,7 +184,6 @@ export const PullRequestToolError = Schema.Union([
PullRequestHostRequiredError,
PullRequestUrlUnavailableError,
PullRequestThreadRequiredError,
PullRequestThreadNotFoundError,
PullRequestLinkFailedError,
PullRequestUnlinkFailedError,
PullRequestListFailedError,
Expand Down
9 changes: 6 additions & 3 deletions t3/contract/packages/contracts/src/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ export const SimlockDeviceHostConfig = Schema.Struct({
label: TrimmedNonEmptyString,
/** The gateway's origin, such as https://gateway.example.ts.net:4700. */
gatewayUrl: TrimmedNonEmptyString.check(Schema.isPattern(/^https?:\/\/[^\s/]+\/?$/)),
/** Leases, drives, watches, and takes input on its own leases. Kept in the secret store. */
agentToken: TrimmedString.pipe(
/**
* Leases, drives, watches, and takes input on its own leases. Kept in the secret store, or the
* secret provider to read it from.
*/
agentToken: SettingsSecretValue.pipe(
Schema.withDecodingDefaultKey(Effect.succeed("")),
Schema.annotateKey({ settingsSecret: true }),
),
Expand Down Expand Up @@ -133,7 +136,7 @@ export const DeviceSimlockIdentityInput = Schema.Struct({
gatewayUrl: Schema.optional(TrimmedString),
/** A saved Simlock host whose stored token is checked when no new token is given. */
hostId: Schema.optional(DeviceHostId),
agentToken: Schema.optional(TrimmedString),
agentToken: Schema.optional(SettingsSecretValue),
});
export type DeviceSimlockIdentityInput = typeof DeviceSimlockIdentityInput.Type;

Expand Down
14 changes: 14 additions & 0 deletions t3/contract/packages/contracts/src/orchestratorMcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,12 @@ export const OrchestratorMcpThreadSendInput = Schema.Struct({
threadId: ThreadId,
message: OrchestratorMcpPrompt,
mode: Schema.optional(Schema.Literals(["auto", "queue", "steer", "restart"])),
freshContext: Schema.optional(
Schema.Boolean.annotate({
description:
"Start a new provider session without the thread's earlier context, like /clear. Never steers.",
}),
),
clientRequestId: Schema.optional(OrchestratorMcpClientRequestId),
});
export type OrchestratorMcpThreadSendInput = typeof OrchestratorMcpThreadSendInput.Type;
Expand Down Expand Up @@ -661,6 +667,12 @@ export const OrchestratorMcpScheduleTaskInput = Schema.Struct({
description: "Default true: runs post in this thread. False: new thread per run.",
}),
),
freshSession: Schema.optional(
Schema.Boolean.annotate({
description:
"Runs share one thread but each starts a fresh session without earlier runs' context. Unbound: the first run makes the thread.",
}),
),
clientRequestId: Schema.optional(OrchestratorMcpClientRequestId),
});
export type OrchestratorMcpScheduleTaskInput = typeof OrchestratorMcpScheduleTaskInput.Type;
Expand All @@ -682,6 +694,7 @@ export const OrchestratorMcpScheduledTask = Schema.Struct({
enabled: Schema.Boolean,
projectId: ProjectId,
boundThreadId: Schema.NullOr(ThreadId),
freshSession: Schema.Boolean,
schedule: ScheduledTaskSchedule,
nextRunAt: Schema.NullOr(IsoDateTime),
lastRunStatus: ScheduledTaskRunStatus,
Expand Down Expand Up @@ -724,6 +737,7 @@ export const OrchestratorMcpUpdateScheduledTaskInput = Schema.Struct({
schedule: Schema.optional(OrchestratorMcpSchedule),
enabled: Schema.optional(Schema.Boolean),
bindToCurrentThread: Schema.optional(Schema.Boolean),
freshSession: Schema.optional(Schema.Boolean),
});
export type OrchestratorMcpUpdateScheduledTaskInput =
typeof OrchestratorMcpUpdateScheduledTaskInput.Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ordinary coding tasks need no T3 tools.
- Every new delegate review or re-check is a new \`delegate_task\` (brief, findings, objections), never a \`t3_thread_send\`. Fix small review findings yourself; start no delegate for them. When told to proceed without a delegate, or to run fewer, \`task_cancel\` the extras. Start no replacement.
- Follow a running delegate's \`next\`. Do not poll it (\`task_status\`, \`sleep\`, watchers, Monitor, ScheduleWakeup). Stop a delegate run you replace or no longer need with \`task_cancel\`, never \`t3_thread_interrupt\` on a \`childThreadId\`.
- If you are a subagent or child, do the work yourself. Start no subagents unless your task says to.`,
`- \`t3_thread_launch\` and \`create_threads\` make new top-level threads, only when the user asks for a new thread. "Subagent", "delegate", and "parallel" never mean one. Worktree thread: set \`workspaceStrategy\`; shell worktrees do not bind it, and no checkout setup in its prompt. No \`workspaceStrategy\`: project root, not your worktree.
`- \`t3_thread_launch\` and \`create_threads\` make new top-level threads, only when the user asks for a new thread. "Subagent", "delegate", and "parallel" never mean one. Worktree thread: set \`workspaceStrategy\`. Honor a requested base. Otherwise, independent work uses the default branch as \`remote/branch\` with \`startFromOrigin:true\`; with no remote, use the local default. Required unpublished commits and dependent work use their local base. Shell worktrees do not bind it, and no checkout setup in its prompt. No \`workspaceStrategy\`: project root, not your worktree.
- Given a thread id, \`t3_thread_read\` it before you answer about it.
- 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.
Expand Down
Loading