@rallycry/conveyor-mcp 5.0.2 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/chunk-5KU3QS6A.js +45 -0
- package/dist/{chunk-XLDG5QEX.js → chunk-EUCQ26F7.js} +32 -3
- package/dist/cli.js +889 -849
- package/dist/{connection-B7CwszOV.d.ts → connection-jZ8nSRwk.d.ts} +20 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/tunnel-cli.js +5 -3
- package/dist/tunnel.d.ts +2 -1
- package/dist/wait-cli.js +5 -3
- package/dist/wait-runner.d.ts +2 -1
- package/dist/wait.d.ts +2 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
installLifecycle
|
|
4
|
+
} from "./chunk-5KU3QS6A.js";
|
|
2
5
|
import {
|
|
3
6
|
ConveyorConnection
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EUCQ26F7.js";
|
|
5
8
|
|
|
6
9
|
// src/cli.ts
|
|
7
10
|
import { createRequire } from "module";
|
|
@@ -67,12 +70,84 @@ function registerProjectTools(server2, conn2) {
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
// src/tools/connection.ts
|
|
70
|
-
import { z as
|
|
73
|
+
import { z as z4 } from "zod";
|
|
71
74
|
|
|
72
|
-
// ../shared/dist/chunk-
|
|
75
|
+
// ../shared/dist/chunk-VQSAISHG.js
|
|
76
|
+
import { z as z2 } from "zod";
|
|
77
|
+
var DEFAULT_SONNET_MODEL = "claude-sonnet-5";
|
|
78
|
+
var DEFAULT_OPUS_MODEL = "claude-opus-5";
|
|
79
|
+
var DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001";
|
|
80
|
+
var FABLE_MODEL = "claude-fable-5-1";
|
|
81
|
+
var PREVIOUS_SONNET_MODEL = "claude-sonnet-4-6";
|
|
82
|
+
var PREVIOUS_OPUS_MODEL = "claude-opus-4-8";
|
|
83
|
+
var PTY_STREAM_PORT_BASE = 7420;
|
|
84
|
+
var PTY_STREAM_PORT_ATTEMPTS = 8;
|
|
85
|
+
var PREVIEW_PORT_DENY_LIST = [
|
|
86
|
+
5432,
|
|
87
|
+
6379,
|
|
88
|
+
9200,
|
|
89
|
+
...Array.from({ length: PTY_STREAM_PORT_ATTEMPTS }, (_, i) => PTY_STREAM_PORT_BASE + i)
|
|
90
|
+
];
|
|
91
|
+
function normalizeCheckpointPath(value) {
|
|
92
|
+
let normalized = value.trim().replace(/\/{2,}/g, "/");
|
|
93
|
+
normalized = normalized.split("/").filter((segment) => segment !== ".").join("/");
|
|
94
|
+
while (normalized.endsWith("/")) normalized = normalized.slice(0, -1);
|
|
95
|
+
return normalized;
|
|
96
|
+
}
|
|
97
|
+
var checkpointPathSchema = z2.string().transform(normalizeCheckpointPath).pipe(
|
|
98
|
+
z2.string().min(1).refine((value) => value !== ".", "Checkpoint paths must name a repository entry").refine((value) => !value.startsWith("/"), "Checkpoint paths must be repository-relative").refine(
|
|
99
|
+
(value) => !/^[A-Za-z]:[\\/]/.test(value) && !value.includes("\\"),
|
|
100
|
+
"Checkpoint paths must use repository-relative POSIX syntax"
|
|
101
|
+
).refine(
|
|
102
|
+
(value) => !value.split("/").includes(".."),
|
|
103
|
+
"Checkpoint paths must not traverse a parent directory"
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
var secretNameSchema = z2.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);
|
|
107
|
+
var checkpointKeySchema = z2.string().regex(/^[0-9a-f]{64}$/);
|
|
108
|
+
var checkpointDigestRefSchema = z2.string().regex(/^[^\s@]+@sha256:[0-9a-f]{64}$/);
|
|
109
|
+
var ACTIONS_PREBAKE_REGISTRY_PATTERN = /^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?::(?:[1-9][0-9]{0,4}))?(?:\/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$/;
|
|
110
|
+
var actionsPrebakeRegistrySchema = z2.string().trim().min(1).regex(
|
|
111
|
+
ACTIONS_PREBAKE_REGISTRY_PATTERN,
|
|
112
|
+
"Actions prebake registry must be a lowercase host[:port] with an optional path prefix"
|
|
113
|
+
).refine((value) => {
|
|
114
|
+
const port = /:([0-9]+)(?:\/|$)/.exec(value)?.[1];
|
|
115
|
+
return !port || Number(port) <= 65535;
|
|
116
|
+
}, "Actions prebake registry port must be between 1 and 65535");
|
|
117
|
+
function uniqueSortedArray(item, minimum = 0) {
|
|
118
|
+
return z2.array(item).min(minimum).superRefine((values, ctx) => {
|
|
119
|
+
if (new Set(values).size !== values.length) {
|
|
120
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, message: "Duplicate values are not allowed" });
|
|
121
|
+
}
|
|
122
|
+
}).transform((values) => [...values].sort());
|
|
123
|
+
}
|
|
124
|
+
var projectCheckpointSettingsSchema = z2.object({
|
|
125
|
+
enabled: z2.literal(true),
|
|
126
|
+
cacheCommand: z2.string().trim().min(1),
|
|
127
|
+
cacheInputPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
128
|
+
reusableArtifactPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
129
|
+
finalizeCommand: z2.string().trim().min(1),
|
|
130
|
+
credentialEpoch: z2.string().trim().min(1),
|
|
131
|
+
requiredSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
132
|
+
optionalSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
133
|
+
bakeWebAppBuild: z2.boolean().optional()
|
|
134
|
+
}).superRefine((checkpoint, ctx) => {
|
|
135
|
+
const required = new Set(checkpoint.requiredSecretNames ?? []);
|
|
136
|
+
for (const name of checkpoint.optionalSecretNames ?? []) {
|
|
137
|
+
if (required.has(name)) {
|
|
138
|
+
ctx.addIssue({
|
|
139
|
+
code: z2.ZodIssueCode.custom,
|
|
140
|
+
path: ["optionalSecretNames"],
|
|
141
|
+
message: "A secret cannot be both required and optional"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
});
|
|
73
146
|
var CARD_DESCRIPTION_MAX = 255;
|
|
74
147
|
var CARD_DESCRIPTION_LIMIT_MESSAGE = `Card descriptions are capped at ${CARD_DESCRIPTION_MAX} characters \u2014 write 1-2 plain sentences a non-engineer can read; put technical detail in the plan or card chat.`;
|
|
75
148
|
var CARD_DESCRIPTION_FIELD_HINT = `max ${CARD_DESCRIPTION_MAX} chars, 1-2 plain sentences a non-engineer can read \u2014 put technical detail in the plan`;
|
|
149
|
+
var DEFAULT_CI_WAIT_TIMEOUT_MINUTES = 45;
|
|
150
|
+
var MAX_CI_WAIT_TIMEOUT_MINUTES = 180;
|
|
76
151
|
var SEVERITY_ENUM = [
|
|
77
152
|
"DEBUG",
|
|
78
153
|
"INFO",
|
|
@@ -337,7 +412,7 @@ var postToChatContract = defineToolContract({
|
|
|
337
412
|
),
|
|
338
413
|
milestone: f.optional(
|
|
339
414
|
f.enum(["plan_ready", "implementation_complete", "blocked"], {
|
|
340
|
-
desc: "Declare a narrative milestone instead of a routine update. Use SPARINGLY \u2014 only when the plan is ready, implementation is complete, or you are blocked. Milestones appear on the card's activity timeline and in Slack."
|
|
415
|
+
desc: "Declare a narrative milestone instead of a routine update. Use SPARINGLY \u2014 only when the plan is ready (plan_ready), implementation is complete (implementation_complete), or you are parked and cannot continue until a human acts (blocked). `blocked` posts a note and enables reply delivery but pages nobody; to page a person, ask them with AskUserQuestion. Never use `blocked` for a finished plan, finished work, or a tool error you can retry. Milestones appear on the card's activity timeline and in Slack."
|
|
341
416
|
})
|
|
342
417
|
)
|
|
343
418
|
}
|
|
@@ -457,25 +532,6 @@ var searchTasksContract = defineToolContract({
|
|
|
457
532
|
}
|
|
458
533
|
}
|
|
459
534
|
});
|
|
460
|
-
var childTaskIdForMerge = f.string({
|
|
461
|
-
desc: "The child task ID whose PR should be approved and merged"
|
|
462
|
-
});
|
|
463
|
-
var approveAndMergePrContract = defineToolContract({
|
|
464
|
-
name: "approve_and_merge_pr",
|
|
465
|
-
agent: {
|
|
466
|
-
description: "Approve and merge a child task's PR. Preconditions: child in ReviewPR. Returns { merged }: true = merged (status\u2192ReviewDev); false = automerge queued, wait for ReviewDev. Requires project Admin, or a sub-project merge grant covering every changed file; release PRs require Admin.",
|
|
467
|
-
fields: {
|
|
468
|
-
childTaskId: childTaskIdForMerge
|
|
469
|
-
}
|
|
470
|
-
},
|
|
471
|
-
mcp: {
|
|
472
|
-
description: "Approve a child task's pull request and QUEUE it for merge \u2014 the merge lands asynchronously (~30s sweep) once the CI and code-review gates pass; the response says whether it merged or was queued, so verify PR state before depending on it. Pass projectId to target a specific project; otherwise the configured default project is used. The child task must be in ReviewPR status with a PR. Requires project Admin, or a sub-project merge grant covering every changed file; release PRs require Admin.",
|
|
473
|
-
fields: {
|
|
474
|
-
projectId: mcpProjectId,
|
|
475
|
-
childTaskId: childTaskIdForMerge
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
535
|
var getConnectionContextContract = defineToolContract({
|
|
480
536
|
name: "get_connection_context",
|
|
481
537
|
agent: {
|
|
@@ -495,7 +551,6 @@ var tasksContracts = [
|
|
|
495
551
|
readTaskChatContract,
|
|
496
552
|
listTagsContract,
|
|
497
553
|
searchTasksContract,
|
|
498
|
-
approveAndMergePrContract,
|
|
499
554
|
getConnectionContextContract
|
|
500
555
|
];
|
|
501
556
|
var STATUS_ENUM = [
|
|
@@ -886,12 +941,12 @@ var updateSubtaskContract = defineToolContract({
|
|
|
886
941
|
plan: f.optional(f.string()),
|
|
887
942
|
status: f.optional(
|
|
888
943
|
f.enum(["Planning", "Open"], {
|
|
889
|
-
desc: 'Move the child between "Planning" and "Open". "Open" marks it ready to execute \u2014
|
|
944
|
+
desc: 'Move the child between "Planning" and "Open". "Open" marks it ready to execute \u2014 the pack runner takes Open children in dependency order. Execution statuses transition automatically.'
|
|
890
945
|
})
|
|
891
946
|
),
|
|
892
947
|
agentIdOrName: f.optional(
|
|
893
948
|
f.string({
|
|
894
|
-
desc: "Assign a project agent to the child (agent id or exact name from the Project Agents list).
|
|
949
|
+
desc: "Assign a project agent to the child (agent id or exact name from the Project Agents list)."
|
|
895
950
|
})
|
|
896
951
|
),
|
|
897
952
|
ordinal: f.optional(f.number()),
|
|
@@ -943,7 +998,7 @@ var deleteSubtaskContract = defineToolContract({
|
|
|
943
998
|
var listSubtasksContract = defineToolContract({
|
|
944
999
|
name: "list_subtasks",
|
|
945
1000
|
agent: {
|
|
946
|
-
description: "List all subtasks under the current parent task. Default compact view returns per child: status, agent, story points, PR number/state, and dependencies
|
|
1001
|
+
description: "List all subtasks under the current parent task. Default compact view returns per child: status, agent, story points, PR number/state, and dependencies (dependsOn + allDependenciesMet). Use to pick the next ready child and record progress; pass verbose:true only when you need full description/plan text (large). For non-child tasks use get_task.",
|
|
947
1002
|
fields: {
|
|
948
1003
|
verbose: f.optional(
|
|
949
1004
|
f.boolean({
|
|
@@ -1720,6 +1775,50 @@ var logsContracts = [
|
|
|
1720
1775
|
queryGcpLogsContract,
|
|
1721
1776
|
queryGrafanaLogsContract
|
|
1722
1777
|
];
|
|
1778
|
+
var SHA = f.optional(
|
|
1779
|
+
f.string({
|
|
1780
|
+
desc: "Commit sha to watch, full or abbreviated. Defaults to the head of prNumber, else this card's PR, else the tip of this card's branch.",
|
|
1781
|
+
min: 7,
|
|
1782
|
+
max: 40
|
|
1783
|
+
})
|
|
1784
|
+
);
|
|
1785
|
+
var PR_NUMBER = f.optional(
|
|
1786
|
+
f.number({
|
|
1787
|
+
desc: "PR number whose current head to watch. Use this for a child's PR when orchestrating a pack.",
|
|
1788
|
+
int: true,
|
|
1789
|
+
positive: true
|
|
1790
|
+
})
|
|
1791
|
+
);
|
|
1792
|
+
var TIMEOUT_MINUTES = f.optional(
|
|
1793
|
+
f.number({
|
|
1794
|
+
desc: `Give up after this many minutes (default ${DEFAULT_CI_WAIT_TIMEOUT_MINUTES}, max ${MAX_CI_WAIT_TIMEOUT_MINUTES}); you are woken with timed_out.`,
|
|
1795
|
+
int: true,
|
|
1796
|
+
min: 1,
|
|
1797
|
+
max: MAX_CI_WAIT_TIMEOUT_MINUTES
|
|
1798
|
+
})
|
|
1799
|
+
);
|
|
1800
|
+
var waitForChecksContract = defineToolContract({
|
|
1801
|
+
name: "wait_for_checks",
|
|
1802
|
+
agent: {
|
|
1803
|
+
description: "Wait for CI without holding the pod. Records the commit to watch on this session and returns immediately: if CI already finished you get the result now; otherwise the reply says `parked` and you must END YOUR TURN with no further tool calls. The pod idles out during the wait and Conveyor wakes this session with the result (success or failure with the failing job names and run URL, head_moved when the PR gets a new commit, timed_out at the deadline). Never poll `gh pr checks`, pr-wait scripts, or a sleep loop for CI. If something else wakes you before the result arrives, handle it and call this again.",
|
|
1804
|
+
fields: {
|
|
1805
|
+
sha: SHA,
|
|
1806
|
+
prNumber: PR_NUMBER,
|
|
1807
|
+
timeoutMinutes: TIMEOUT_MINUTES
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
mcp: {
|
|
1811
|
+
description: "Park a task's agent session until GitHub reports the CI result for a commit. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
1812
|
+
fields: {
|
|
1813
|
+
projectId: mcpProjectId,
|
|
1814
|
+
taskId: f.string({ desc: "The task whose agent session should wait" }),
|
|
1815
|
+
sha: SHA,
|
|
1816
|
+
prNumber: PR_NUMBER,
|
|
1817
|
+
timeoutMinutes: TIMEOUT_MINUTES
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
});
|
|
1821
|
+
var ciWaitContracts = [waitForChecksContract];
|
|
1723
1822
|
var TOOL_CONTRACTS = Object.fromEntries(
|
|
1724
1823
|
[
|
|
1725
1824
|
...tasksContracts,
|
|
@@ -1734,14 +1833,15 @@ var TOOL_CONTRACTS = Object.fromEntries(
|
|
|
1734
1833
|
...integrationsContracts,
|
|
1735
1834
|
...driveContracts,
|
|
1736
1835
|
...meetingsContracts,
|
|
1737
|
-
...logsContracts
|
|
1836
|
+
...logsContracts,
|
|
1837
|
+
...ciWaitContracts
|
|
1738
1838
|
].map((contract) => [contract.name, contract])
|
|
1739
1839
|
);
|
|
1740
1840
|
|
|
1741
1841
|
// src/tools/contract-tool.ts
|
|
1742
|
-
import { z as
|
|
1842
|
+
import { z as z3 } from "zod";
|
|
1743
1843
|
function mcpShape(surface) {
|
|
1744
|
-
return compileShape(
|
|
1844
|
+
return compileShape(z3, surface.fields);
|
|
1745
1845
|
}
|
|
1746
1846
|
function registerContractTool(server2, contract, handler, options) {
|
|
1747
1847
|
if (options?.alwaysLoad) {
|
|
@@ -1784,8 +1884,8 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1784
1884
|
"verify_connection",
|
|
1785
1885
|
"Prove the connection is correct AND that you can actually write to the intended board \u2014 not just that auth works. Runs layered checks (auth \u2192 account \u2192 project \u2192 target board \u2192 capabilities \u2192 read) and returns a plain pass/fail with, on failure, the exact failing layer and ONE next action. Use this instead of get_project_summary to confirm setup: a summary that returns data proves auth, not scope. Pass intendedActions to verify specific capabilities (defaults to read+create+update). Pass projectId to target a specific project; otherwise the configured default project is used. The board scope comes from CONVEYOR_SUBPROJECT_ID.",
|
|
1786
1886
|
{
|
|
1787
|
-
projectId:
|
|
1788
|
-
intendedActions:
|
|
1887
|
+
projectId: z4.string().optional().describe("Target Conveyor project ID"),
|
|
1888
|
+
intendedActions: z4.array(z4.enum(CAPABILITY_ENUM)).optional().describe(
|
|
1789
1889
|
"Capabilities to verify the connection can perform (default: read, create, update)."
|
|
1790
1890
|
)
|
|
1791
1891
|
},
|
|
@@ -1798,7 +1898,7 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1798
1898
|
"list_accessible_subprojects",
|
|
1799
1899
|
"List the boards (sub-projects) under the connected project \u2014 each with its ID, name, slug, board URL, owned root path, and the role/capabilities this token has on it. Use this to discover which board to create or list cards on (pass a returned id as subProjectId, or set CONVEYOR_SUBPROJECT_ID) instead of asking the human for one. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
1800
1900
|
{
|
|
1801
|
-
projectId:
|
|
1901
|
+
projectId: z4.string().optional().describe("Target Conveyor project ID")
|
|
1802
1902
|
},
|
|
1803
1903
|
async (params) => {
|
|
1804
1904
|
const subprojects = await conn2.listAccessibleSubprojects(params.projectId);
|
|
@@ -1808,7 +1908,7 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1808
1908
|
}
|
|
1809
1909
|
|
|
1810
1910
|
// src/tools/project-config.ts
|
|
1811
|
-
import { z as
|
|
1911
|
+
import { z as z5 } from "zod";
|
|
1812
1912
|
var CONTEXT_LINK_LOCATOR_MAX = 300;
|
|
1813
1913
|
function jsonResult(data) {
|
|
1814
1914
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
@@ -1827,7 +1927,7 @@ function registerGetConnectUrls(server2, conn2) {
|
|
|
1827
1927
|
"get_connect_urls",
|
|
1828
1928
|
"Get browser-only setup URLs to hand to the user: the Google Cloud OAuth connect link (gcpConnect) plus Settings deep links (gcpSettings, memberSettings, projectSettings, setupWizard). Use these for setup steps an agent cannot perform (OAuth grants, secret entry). Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
1829
1929
|
{
|
|
1830
|
-
projectId:
|
|
1930
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID")
|
|
1831
1931
|
},
|
|
1832
1932
|
async (params) => jsonResult(await conn2.getConnectUrls(params.projectId))
|
|
1833
1933
|
);
|
|
@@ -1837,16 +1937,16 @@ function registerUpdateProjectSettings(server2, conn2) {
|
|
|
1837
1937
|
"update_project_settings",
|
|
1838
1938
|
"Update project configuration: name, description, default agent assignments, or a deep-merged patch of the project settings JSON (JSON Merge Patch: nested objects merge recursively, null deletes a key, arrays replace \u2014 a partial patch never wipes sibling keys). Requires a Moderate project role. Does NOT touch repositories or branches \u2014 those are configured in the Conveyor UI.",
|
|
1839
1939
|
{
|
|
1840
|
-
projectId:
|
|
1841
|
-
name:
|
|
1842
|
-
description:
|
|
1843
|
-
settings:
|
|
1940
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID"),
|
|
1941
|
+
name: z5.string().optional().describe("New project name"),
|
|
1942
|
+
description: z5.string().optional().describe("New project description"),
|
|
1943
|
+
settings: z5.record(z5.string(), z5.unknown()).optional().describe(
|
|
1844
1944
|
"Deep-merged patch of the project settings JSON (JSON Merge Patch semantics: null deletes a key; advanced)"
|
|
1845
1945
|
),
|
|
1846
|
-
defaultPmAgentId:
|
|
1847
|
-
defaultTaskAgentId:
|
|
1848
|
-
defaultReviewerAgentId:
|
|
1849
|
-
helperAgentId:
|
|
1946
|
+
defaultPmAgentId: z5.string().nullable().optional().describe("Default PM agent ID"),
|
|
1947
|
+
defaultTaskAgentId: z5.string().nullable().optional().describe("Default task agent ID"),
|
|
1948
|
+
defaultReviewerAgentId: z5.string().nullable().optional().describe("Default reviewer agent ID"),
|
|
1949
|
+
helperAgentId: z5.string().nullable().optional().describe("Helper agent ID")
|
|
1850
1950
|
},
|
|
1851
1951
|
async (params) => {
|
|
1852
1952
|
const { projectId: projectId2, name, description, settings, ...agents } = params;
|
|
@@ -1870,16 +1970,16 @@ function registerUpdateProjectSettings(server2, conn2) {
|
|
|
1870
1970
|
}
|
|
1871
1971
|
);
|
|
1872
1972
|
}
|
|
1873
|
-
var contextPathSchema =
|
|
1874
|
-
type:
|
|
1973
|
+
var contextPathSchema = z5.object({
|
|
1974
|
+
type: z5.enum(["rule", "doc", "file", "folder"]).describe(
|
|
1875
1975
|
"Kind of context link \u2014 a rule/doc file, a source file, or a folder. All paths are repo-relative; doc marks a synced project doc, which resolves from the workspace like rule/file"
|
|
1876
1976
|
),
|
|
1877
|
-
path:
|
|
1878
|
-
label:
|
|
1879
|
-
locator:
|
|
1977
|
+
path: z5.string().describe("Repo-relative path, e.g. '.claude/rules/refactor-verification.md'"),
|
|
1978
|
+
label: z5.string().optional().describe("Optional human-readable label for the link"),
|
|
1979
|
+
locator: z5.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional().describe(
|
|
1880
1980
|
'Verified-link tether: text that must keep existing in the file for the link to stay live. With locatorType "test" it must appear inside a real it/test/describe TITLE (a renamed test flags the link stale even if its words survive in a comment); with "code" anywhere in the file. Conveyor re-validates links periodically and exposes per-link status in get_tag / manage_tags list. Locators containing <> are documentation placeholders and stay unchecked.'
|
|
1881
1981
|
),
|
|
1882
|
-
locatorType:
|
|
1982
|
+
locatorType: z5.enum(["test", "code"]).optional().describe(
|
|
1883
1983
|
"How the locator must match \u2014 required iff locator is set; not valid on folder links"
|
|
1884
1984
|
)
|
|
1885
1985
|
}).refine((link) => link.locator === void 0 === (link.locatorType === void 0), {
|
|
@@ -1889,24 +1989,24 @@ var contextPathSchema = z4.object({
|
|
|
1889
1989
|
});
|
|
1890
1990
|
var MANAGE_TAGS_DESCRIPTION = "List, create, update, delete, or merge project tags \u2014 the project glossary. create requires name (optional color/description/overview/overviewPath/parentTagIds/contextPaths); update/delete/merge require the tag id. A tag with overviewPath serves its overview from that repo file at the base branch (overview edits are rejected \u2014 edit the file via PR instead; setting/clearing the path is the tag mutation). description (\u2264255) is the summary; overview is the full markdown spec (read with get_tag); parentTagIds is the multi-parent hierarchy \u2014 set it on create, or replace the full set on update; contextPaths wire files/rules/docs into the agent context of any card carrying the tag (replace-set \u2014 pass the full list, [] clears), and a contextPath with a locator becomes a VERIFIED repo link whose status (ok/stale/unchecked) Conveyor tracks against the repo. merge absorbs the tag in id into targetTagId: cards and hierarchy edges move to the target, the target keeps its own description/overview/links, and the absorbed tag is deleted. Use mergePreview first to see the counts. Pass reason on updates and merges \u2014 it lands in the tag's revision history. Mutations require a Moderate project role.";
|
|
1891
1991
|
var MANAGE_TAGS_SHAPE = {
|
|
1892
|
-
action:
|
|
1893
|
-
projectId:
|
|
1894
|
-
id:
|
|
1895
|
-
targetTagId:
|
|
1896
|
-
name:
|
|
1897
|
-
color:
|
|
1898
|
-
description:
|
|
1899
|
-
overview:
|
|
1992
|
+
action: z5.enum(["list", "create", "update", "delete", "mergePreview", "merge"]).describe("Operation to perform"),
|
|
1993
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID (list/create)"),
|
|
1994
|
+
id: z5.string().optional().describe("Tag ID (update/delete/mergePreview/merge)"),
|
|
1995
|
+
targetTagId: z5.string().optional().describe("Surviving tag ID for mergePreview/merge \u2014 the tag in id is absorbed into this one"),
|
|
1996
|
+
name: z5.string().optional().describe("Tag name"),
|
|
1997
|
+
color: z5.string().optional().describe("Hex color, e.g. #ff0000"),
|
|
1998
|
+
description: z5.string().optional().describe("Tag description \u2014 the \u2264255-char summary"),
|
|
1999
|
+
overview: z5.string().nullable().optional().describe(
|
|
1900
2000
|
"Full markdown glossary body (update: null clears). Only used on create/update. REJECTED while the tag has an overviewPath \u2014 edit the sourced repo file instead."
|
|
1901
2001
|
),
|
|
1902
|
-
overviewPath:
|
|
2002
|
+
overviewPath: z5.string().min(1).max(500).nullable().optional().describe(
|
|
1903
2003
|
"Repo file to source the overview from \u2014 the base-branch content is served everywhere and the stored overview is hidden (update: null clears back to it). A not-yet-merged path is fine: the stored overview serves as fallback (state 'pending') until the file lands. Only used on create/update."
|
|
1904
2004
|
),
|
|
1905
|
-
parentTagIds:
|
|
2005
|
+
parentTagIds: z5.array(z5.string()).max(25).optional().describe(
|
|
1906
2006
|
"Parent tag ids (multi-parent hierarchy). Honored on create; replace-set on update: pass the full list, [] clears."
|
|
1907
2007
|
),
|
|
1908
|
-
reason:
|
|
1909
|
-
contextPaths:
|
|
2008
|
+
reason: z5.string().optional().describe("One line on why (update/merge) \u2014 recorded in the tag's revision history"),
|
|
2009
|
+
contextPaths: z5.array(contextPathSchema).max(20).optional().describe(
|
|
1910
2010
|
"Context links (rules/docs/files/folders) auto-loaded into the agent context of cards with this tag. Replace-set: the full list replaces the tag's existing links; pass [] to clear. Only used on create/update."
|
|
1911
2011
|
)
|
|
1912
2012
|
};
|
|
@@ -1981,13 +2081,13 @@ function registerManagePriorities(server2, conn2) {
|
|
|
1981
2081
|
"manage_priorities",
|
|
1982
2082
|
"List, create, update, or delete project priorities. create requires value (1-100), name, and color; update/delete require the priority id. create/update require a Moderate role; delete requires Admin.",
|
|
1983
2083
|
{
|
|
1984
|
-
action:
|
|
1985
|
-
projectId:
|
|
1986
|
-
id:
|
|
1987
|
-
value:
|
|
1988
|
-
name:
|
|
1989
|
-
color:
|
|
1990
|
-
description:
|
|
2084
|
+
action: z5.enum(["list", "create", "update", "delete"]).describe("Operation to perform"),
|
|
2085
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID (list/create)"),
|
|
2086
|
+
id: z5.string().optional().describe("Priority ID (update/delete)"),
|
|
2087
|
+
value: z5.number().int().min(1).max(100).optional().describe("Priority value (1 = highest urgency scale point)"),
|
|
2088
|
+
name: z5.string().optional().describe("Priority name"),
|
|
2089
|
+
color: z5.string().optional().describe("Hex color, e.g. #ff0000"),
|
|
2090
|
+
description: z5.string().optional().describe("Priority description")
|
|
1991
2091
|
},
|
|
1992
2092
|
async (params) => {
|
|
1993
2093
|
const { action, projectId: projectId2, id, value, name, color, description } = params;
|
|
@@ -2025,10 +2125,10 @@ function registerListTagAttachments(server2, conn2) {
|
|
|
2025
2125
|
"list_tag_attachments",
|
|
2026
2126
|
"List the files labelled as examples of one tag \u2014 the tag page's Attachments gallery, newest label first. Each tile carries the file's name, mime type, size, a downloadUrl, the card it came from, and the tag's other labels on that file. Only uploaded files appear. The page returns `hasMore` instead of a total: pass offset to read the next page. Tag names come from list_tags, which reports each tag's attachmentCount. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2027
2127
|
{
|
|
2028
|
-
projectId:
|
|
2029
|
-
tag:
|
|
2030
|
-
limit:
|
|
2031
|
-
offset:
|
|
2128
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID"),
|
|
2129
|
+
tag: z5.string().min(1).max(100).describe("Tag id, or the exact tag name (case-insensitive)"),
|
|
2130
|
+
limit: z5.number().int().min(1).max(60).optional().describe("Tiles per page (default 24)"),
|
|
2131
|
+
offset: z5.number().int().min(0).optional().describe("Tiles to skip (paging). Default 0.")
|
|
2032
2132
|
},
|
|
2033
2133
|
async (params) => jsonResult(await conn2.listTagAttachments(params))
|
|
2034
2134
|
);
|
|
@@ -2043,7 +2143,7 @@ function registerProjectConfigTools(server2, conn2) {
|
|
|
2043
2143
|
}
|
|
2044
2144
|
|
|
2045
2145
|
// src/tools/tasks.ts
|
|
2046
|
-
import { z as
|
|
2146
|
+
import { z as z6 } from "zod";
|
|
2047
2147
|
|
|
2048
2148
|
// src/tools/tasks-format.ts
|
|
2049
2149
|
var CLI_EVENT_FORMATTERS = {
|
|
@@ -2143,10 +2243,10 @@ var STATUS_ENUM2 = [
|
|
|
2143
2243
|
];
|
|
2144
2244
|
var CARD_TYPE_ENUM = ["task", "incident", "suggestion"];
|
|
2145
2245
|
var RISK_ENUM2 = ["critical", "high", "medium", "low"];
|
|
2146
|
-
var BOARD_FILTER =
|
|
2246
|
+
var BOARD_FILTER = z6.string().nullable().optional().describe(
|
|
2147
2247
|
"Filter to a sub-project board. Omit to use the connection's default board (CONVEYOR_SUBPROJECT_ID) when set, else the whole project; pass null to force the whole project. Use list_accessible_subprojects to find board IDs."
|
|
2148
2248
|
);
|
|
2149
|
-
var BOARD_ASSIGN =
|
|
2249
|
+
var BOARD_ASSIGN = z6.string().nullable().optional().describe(
|
|
2150
2250
|
"Assign the card to a sub-project board. Omit to use the connection's default board (CONVEYOR_SUBPROJECT_ID) when set, else the parent project; pass null to force the parent project. Use list_accessible_subprojects to find board IDs."
|
|
2151
2251
|
);
|
|
2152
2252
|
function registerListTasks(server2, conn2) {
|
|
@@ -2155,15 +2255,15 @@ function registerListTasks(server2, conn2) {
|
|
|
2155
2255
|
"list_tasks",
|
|
2156
2256
|
"List project cards, optionally filtered by card type, status, or assignment (a specific assignee, or unassigned tasks). Defaults to type=task \u2014 pass typeFilters to list incidents/suggestions. Results are relevance-ordered: highest priority first then newest; suggestions-only queries rank by upvote score. Pass projectId to target a specific project; otherwise the configured default project is used. Returns summaries \u2014 plan omitted, description truncated; use get_task for full details.",
|
|
2157
2257
|
{
|
|
2158
|
-
projectId:
|
|
2159
|
-
status:
|
|
2160
|
-
typeFilters:
|
|
2258
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2259
|
+
status: z6.enum(STATUS_ENUM2).optional().describe("Filter by task status"),
|
|
2260
|
+
typeFilters: z6.array(z6.enum(CARD_TYPE_ENUM)).optional().describe(
|
|
2161
2261
|
'Card types to include, e.g. ["incident"] or ["task", "incident"]. Omit for tasks only.'
|
|
2162
2262
|
),
|
|
2163
|
-
assigneeId:
|
|
2164
|
-
unassigned:
|
|
2263
|
+
assigneeId: z6.string().optional().describe("Filter by assigned user ID"),
|
|
2264
|
+
unassigned: z6.boolean().optional().describe("Only return tasks with no assignee (mutually exclusive with assigneeId)"),
|
|
2165
2265
|
subProjectId: BOARD_FILTER,
|
|
2166
|
-
limit:
|
|
2266
|
+
limit: z6.number().optional().describe("Max tasks to return (default 50)")
|
|
2167
2267
|
},
|
|
2168
2268
|
async (params) => {
|
|
2169
2269
|
const tasks = await conn2.listTasks(params);
|
|
@@ -2203,8 +2303,8 @@ function registerGetCardBySlug(server2, conn2) {
|
|
|
2203
2303
|
"get_card_by_slug",
|
|
2204
2304
|
'Get full card details by the slug from a card URL (/cards/<slug>) instead of a task ID. Also accepts the board\'s "Copy path" form, `<project-slug>/<card-slug>` \u2014 an embedded project slug wins over projectId and over the configured default. Pass projectId to target a specific project; otherwise the configured default project is used.',
|
|
2205
2305
|
{
|
|
2206
|
-
projectId:
|
|
2207
|
-
slug:
|
|
2306
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2307
|
+
slug: z6.string().describe(
|
|
2208
2308
|
"The card slug from a Conveyor card URL, e.g. 'ship-it', or a path-form reference 'my-project/ship-it' (the board's Copy path action)"
|
|
2209
2309
|
)
|
|
2210
2310
|
},
|
|
@@ -2220,13 +2320,13 @@ function registerCreateTask(server2, conn2) {
|
|
|
2220
2320
|
"create_task",
|
|
2221
2321
|
"Create a new task with title, description, and optional plan. Pass projectId to target a specific project; otherwise the configured default project is used. Icon, story points, and agent assignment are auto-filled when a task is created in (or later moved to) a status beyond Planning \u2014 don't spend turns on them.",
|
|
2222
2322
|
{
|
|
2223
|
-
projectId:
|
|
2224
|
-
title:
|
|
2225
|
-
description:
|
|
2226
|
-
plan:
|
|
2227
|
-
status:
|
|
2323
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2324
|
+
title: z6.string().describe("Task title"),
|
|
2325
|
+
description: z6.string().optional().describe(cardDescriptionDesc("Task description")),
|
|
2326
|
+
plan: z6.string().optional().describe("Task implementation plan (markdown)"),
|
|
2327
|
+
status: z6.enum(["Planning", "Open"]).optional().describe("Initial status (default: Planning)"),
|
|
2228
2328
|
subProjectId: BOARD_ASSIGN,
|
|
2229
|
-
tags:
|
|
2329
|
+
tags: z6.array(z6.string()).optional().describe(
|
|
2230
2330
|
'Tag names to assign to the new card (e.g. ["refactor"]). Unknown names are rejected before the card is created, so nothing is written and a corrected retry creates exactly one card. Create the tag first with manage_tags. Use list_tags to see available tags.'
|
|
2231
2331
|
)
|
|
2232
2332
|
},
|
|
@@ -2264,9 +2364,9 @@ function registerMoveCard(server2, conn2) {
|
|
|
2264
2364
|
"move_card",
|
|
2265
2365
|
"Move an eligible Planning or Open task, incident, or suggestion card to another project. Cards with identification or automation in progress, active compute, pull requests, deployments, releases, reviews, or delivered reporter email cannot move. Project-specific metadata is cleared instead of mapped by name. Pass projectId for the source project; otherwise the configured default project is used.",
|
|
2266
2366
|
{
|
|
2267
|
-
projectId:
|
|
2268
|
-
taskId:
|
|
2269
|
-
destinationProjectId:
|
|
2367
|
+
projectId: z6.string().optional().describe("Source Conveyor project ID"),
|
|
2368
|
+
taskId: z6.string().describe("Card ID or slug"),
|
|
2369
|
+
destinationProjectId: z6.string().describe("Destination Conveyor project ID")
|
|
2270
2370
|
},
|
|
2271
2371
|
async (params) => {
|
|
2272
2372
|
const result = await conn2.moveCard(params);
|
|
@@ -2315,12 +2415,12 @@ function registerGetTaskCli(server2, conn2) {
|
|
|
2315
2415
|
"get_task_logs",
|
|
2316
2416
|
"Read CLI execution logs from a task. Pass projectId to target a specific project; otherwise the configured default project is used. Returns agent reasoning, tool calls, setup output, and other execution events. For human chat use read_task_chat.",
|
|
2317
2417
|
{
|
|
2318
|
-
projectId:
|
|
2319
|
-
taskId:
|
|
2320
|
-
source:
|
|
2418
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2419
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2420
|
+
source: z6.enum(["agent", "application"]).optional().describe(
|
|
2321
2421
|
"Filter by log source: 'agent' for reasoning/tool calls, 'application' for setup/dev-server output"
|
|
2322
2422
|
),
|
|
2323
|
-
limit:
|
|
2423
|
+
limit: z6.number().optional().describe("Max entries to return (default 50, max 500)")
|
|
2324
2424
|
},
|
|
2325
2425
|
async ({ taskId, source, limit, projectId: projectId2 }) => {
|
|
2326
2426
|
const effectiveLimit = Math.min(limit ?? 50, 500);
|
|
@@ -2339,9 +2439,9 @@ function registerGetTaskSessions(server2, conn2) {
|
|
|
2339
2439
|
"get_task_sessions",
|
|
2340
2440
|
"Read compute-session state for a task: legacy CodespaceSession rows plus v3 workspaces, including purpose=review review workspaces. Shows pod identity, liveness, lifecycle, and code-review claim state. Use to diagnose stalled/dead agents or code-review runs. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2341
2441
|
{
|
|
2342
|
-
projectId:
|
|
2343
|
-
taskId:
|
|
2344
|
-
limit:
|
|
2442
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2443
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2444
|
+
limit: z6.number().int().min(1).max(200).optional().describe("Max sessions/workspaces listed per task, newest first (default 20)")
|
|
2345
2445
|
},
|
|
2346
2446
|
async ({ taskId, projectId: projectId2, limit }) => {
|
|
2347
2447
|
const tasks = await conn2.getTaskSessions(taskId, projectId2);
|
|
@@ -2378,9 +2478,9 @@ function registerReviewTools(server2, conn2) {
|
|
|
2378
2478
|
"approve_task",
|
|
2379
2479
|
"Move a task forward in the review flow (ReviewPR -> ReviewDev, or -> Complete). Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2380
2480
|
{
|
|
2381
|
-
projectId:
|
|
2382
|
-
taskId:
|
|
2383
|
-
risk:
|
|
2481
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2482
|
+
taskId: z6.string().describe("The task ID"),
|
|
2483
|
+
risk: z6.enum(RISK_ENUM2).optional().describe("Optional risk level to record; defaults to a raise-only 'low' on approval.")
|
|
2384
2484
|
},
|
|
2385
2485
|
async (params) => {
|
|
2386
2486
|
const result = await conn2.approveTask(params.taskId, params.projectId, params.risk);
|
|
@@ -2389,19 +2489,27 @@ function registerReviewTools(server2, conn2) {
|
|
|
2389
2489
|
};
|
|
2390
2490
|
}
|
|
2391
2491
|
);
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2492
|
+
server2.tool(
|
|
2493
|
+
"approve_and_merge_pr",
|
|
2494
|
+
"Approve a child task's pull request and QUEUE it for merge \u2014 the merge lands asynchronously (~30s sweep) once the CI and code-review gates pass; the response says whether it merged or was queued, so verify PR state before depending on it. Pass projectId to target a specific project; otherwise the configured default project is used. The child task must be in ReviewPR status with a PR. Requires project Admin, or a sub-project merge grant covering every changed file; release PRs require Admin.",
|
|
2495
|
+
{
|
|
2496
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2497
|
+
childTaskId: z6.string().describe("The child task ID whose PR should be approved and merged")
|
|
2498
|
+
},
|
|
2499
|
+
async (params) => {
|
|
2500
|
+
const result = await conn2.approveAndMergePR(params.childTaskId, params.projectId);
|
|
2501
|
+
const text = result.merged ? `PR #${result.prNumber} approved and merged for task ${result.childTaskId}` : `PR #${result.prNumber} approved and QUEUED for merge for task ${result.childTaskId} \u2014 it merges when the CI and code-review gates pass (checked every ~30s). This call did NOT merge it; verify completion via the PR state before depending on it.`;
|
|
2502
|
+
return { content: [{ type: "text", text }] };
|
|
2503
|
+
}
|
|
2504
|
+
);
|
|
2397
2505
|
server2.tool(
|
|
2398
2506
|
"request_changes",
|
|
2399
2507
|
"Post feedback and send task back to InProgress for more work. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2400
2508
|
{
|
|
2401
|
-
projectId:
|
|
2402
|
-
taskId:
|
|
2403
|
-
feedback:
|
|
2404
|
-
risk:
|
|
2509
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2510
|
+
taskId: z6.string().describe("The task ID"),
|
|
2511
|
+
feedback: z6.string().describe("Feedback message describing requested changes"),
|
|
2512
|
+
risk: z6.enum(RISK_ENUM2).optional().describe("Optional risk level to record; defaults to a raise-only 'medium' on changes.")
|
|
2405
2513
|
},
|
|
2406
2514
|
async (params) => {
|
|
2407
2515
|
await conn2.requestChanges(params.taskId, params.feedback, params.projectId, params.risk);
|
|
@@ -2418,9 +2526,9 @@ function registerReviewerTools(server2, conn2) {
|
|
|
2418
2526
|
"add_reviewer",
|
|
2419
2527
|
"Add a project member as a reviewer on a task. Pass projectId to target a specific project; otherwise the configured default project is used. Idempotent \u2014 adding an existing reviewer is a no-op.",
|
|
2420
2528
|
{
|
|
2421
|
-
projectId:
|
|
2422
|
-
taskId:
|
|
2423
|
-
userId:
|
|
2529
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2530
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2531
|
+
userId: z6.string().describe("User ID of the reviewer (use list_project_members to resolve a name or email)")
|
|
2424
2532
|
},
|
|
2425
2533
|
async (params) => {
|
|
2426
2534
|
const result = await conn2.addReviewer(params);
|
|
@@ -2438,9 +2546,9 @@ function registerReviewerTools(server2, conn2) {
|
|
|
2438
2546
|
"remove_reviewer",
|
|
2439
2547
|
"Remove a reviewer from a task. Pass projectId to target a specific project; otherwise the configured default project is used. Idempotent \u2014 removing a non-reviewer is a no-op.",
|
|
2440
2548
|
{
|
|
2441
|
-
projectId:
|
|
2442
|
-
taskId:
|
|
2443
|
-
userId:
|
|
2549
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2550
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2551
|
+
userId: z6.string().describe("User ID of the reviewer to remove")
|
|
2444
2552
|
},
|
|
2445
2553
|
async (params) => {
|
|
2446
2554
|
const result = await conn2.removeReviewer(params);
|
|
@@ -2472,7 +2580,7 @@ function registerTaskTools(server2, conn2) {
|
|
|
2472
2580
|
}
|
|
2473
2581
|
|
|
2474
2582
|
// src/tools/builds.ts
|
|
2475
|
-
import { z as
|
|
2583
|
+
import { z as z7 } from "zod";
|
|
2476
2584
|
function textResult2(result) {
|
|
2477
2585
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
2478
2586
|
}
|
|
@@ -2481,8 +2589,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2481
2589
|
"stop_task",
|
|
2482
2590
|
"Compatibility alias for the legacy stop path. stop_task now performs the same durable sleep behavior as sleep_task, preserving task Claudespace state while stopping compute. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2483
2591
|
{
|
|
2484
|
-
projectId:
|
|
2485
|
-
taskId:
|
|
2592
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2593
|
+
taskId: z7.string().describe("The task ID")
|
|
2486
2594
|
},
|
|
2487
2595
|
async (params) => textResult2(await conn2.sleepTask(params.taskId, params.projectId))
|
|
2488
2596
|
);
|
|
@@ -2490,8 +2598,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2490
2598
|
"sleep_task",
|
|
2491
2599
|
"Sleep a task Claudespace, stopping compute while preserving durable state. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2492
2600
|
{
|
|
2493
|
-
projectId:
|
|
2494
|
-
taskId:
|
|
2601
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2602
|
+
taskId: z7.string().describe("The task ID")
|
|
2495
2603
|
},
|
|
2496
2604
|
async (params) => textResult2(await conn2.sleepTask(params.taskId, params.projectId))
|
|
2497
2605
|
);
|
|
@@ -2499,8 +2607,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2499
2607
|
"resume_task",
|
|
2500
2608
|
"Resume a sleeping task Claudespace. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2501
2609
|
{
|
|
2502
|
-
projectId:
|
|
2503
|
-
taskId:
|
|
2610
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2611
|
+
taskId: z7.string().describe("The task ID")
|
|
2504
2612
|
},
|
|
2505
2613
|
async (params) => textResult2(await conn2.resumeTask(params.taskId, params.projectId))
|
|
2506
2614
|
);
|
|
@@ -2508,8 +2616,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2508
2616
|
"delete_task_environment",
|
|
2509
2617
|
"Delete a task environment, including durable Claudespace state. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2510
2618
|
{
|
|
2511
|
-
projectId:
|
|
2512
|
-
taskId:
|
|
2619
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2620
|
+
taskId: z7.string().describe("The task ID")
|
|
2513
2621
|
},
|
|
2514
2622
|
async (params) => textResult2(await conn2.deleteTaskEnvironment(params.taskId, params.projectId))
|
|
2515
2623
|
);
|
|
@@ -2519,8 +2627,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2519
2627
|
"start_task",
|
|
2520
2628
|
"Start a cloud build (codespace) for a task. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2521
2629
|
{
|
|
2522
|
-
projectId:
|
|
2523
|
-
taskId:
|
|
2630
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2631
|
+
taskId: z7.string().describe("The task ID")
|
|
2524
2632
|
},
|
|
2525
2633
|
async (params) => {
|
|
2526
2634
|
const result = await conn2.startBuild(params.taskId, params.projectId);
|
|
@@ -2532,8 +2640,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2532
2640
|
"create_release",
|
|
2533
2641
|
"Create a release for the project \u2014 the same flow as the Release button in the web UI. Pass projectId to target a specific project; otherwise the configured default project is used. Creates a release task with a release/YYYY.MM.N branch and a PR from the dev branch to the default branch. Omit taskIds to release ALL cards currently in Review (Dev); pass a subset to cherry-pick \u2014 a cloud build agent then cherry-picks those changes and resolves conflicts. Fails if a release is already in progress or no cards are in Review (Dev).",
|
|
2534
2642
|
{
|
|
2535
|
-
projectId:
|
|
2536
|
-
taskIds:
|
|
2643
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2644
|
+
taskIds: z7.array(z7.string()).optional().describe(
|
|
2537
2645
|
"Task IDs in Review (Dev) to cherry-pick into the release. Omit to release all of them."
|
|
2538
2646
|
)
|
|
2539
2647
|
},
|
|
@@ -2546,8 +2654,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2546
2654
|
"add_to_release",
|
|
2547
2655
|
"Add Review (Dev) cards to the project's pending release \u2014 the same flow as the 'Add to Release' button in the web UI. Pass projectId to target a specific project; otherwise the configured default project is used. Cards must be in Review (Dev) and not already part of another release; the release branch is updated with the latest dev changes. Fails if no release is pending (use create_release instead).",
|
|
2548
2656
|
{
|
|
2549
|
-
projectId:
|
|
2550
|
-
taskIds:
|
|
2657
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2658
|
+
taskIds: z7.array(z7.string()).min(1).describe("Task IDs (not slugs) in Review (Dev) to add to the pending release.")
|
|
2551
2659
|
},
|
|
2552
2660
|
async (params) => {
|
|
2553
2661
|
const result = await conn2.addTasksToRelease(params.taskIds, params.projectId);
|
|
@@ -2558,8 +2666,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2558
2666
|
"get_build_status",
|
|
2559
2667
|
"Check codespace and agent status for a task. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2560
2668
|
{
|
|
2561
|
-
projectId:
|
|
2562
|
-
taskId:
|
|
2669
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2670
|
+
taskId: z7.string().describe("The task ID")
|
|
2563
2671
|
},
|
|
2564
2672
|
async (params) => {
|
|
2565
2673
|
const status = await conn2.getBuildStatus(params.taskId, params.projectId);
|
|
@@ -2571,7 +2679,7 @@ function registerBuildTools(server2, conn2) {
|
|
|
2571
2679
|
// src/tools/attachments.ts
|
|
2572
2680
|
import { readFile, stat } from "fs/promises";
|
|
2573
2681
|
import { basename, extname } from "path";
|
|
2574
|
-
import { z as
|
|
2682
|
+
import { z as z8 } from "zod";
|
|
2575
2683
|
var MAX_FILE_SIZE_BYTES = 25 * 1024 * 1024;
|
|
2576
2684
|
var MAX_FILE_TAGS = 5;
|
|
2577
2685
|
var MIME_BY_EXT = {
|
|
@@ -2717,10 +2825,10 @@ function registerSetFileTags(server2, conn2) {
|
|
|
2717
2825
|
"set_file_tags",
|
|
2718
2826
|
"Replace the glossary tags on a file that is already uploaded \u2014 the labelling upload_attachment does at upload time, applied to an existing file. Use it to add older attachments to a tag's Attachments gallery, which is what makes a file a visible example of that tagged entity. `tags` is the FULL replacement set: the names you pass become the file's tags and any others are removed, so pass [] to clear every tag. Names are matched case-insensitively within the project; a name that matches no tag is reported back and never fails the tags that did match. Max 5. Call list_task_files for file IDs and list_tags for tag names. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2719
2827
|
{
|
|
2720
|
-
projectId:
|
|
2721
|
-
taskId:
|
|
2722
|
-
fileId:
|
|
2723
|
-
tags:
|
|
2828
|
+
projectId: z8.string().optional().describe("Target Conveyor project ID"),
|
|
2829
|
+
taskId: z8.string().describe("The task ID or slug the file is attached to"),
|
|
2830
|
+
fileId: z8.string().describe("The file ID to label \u2014 from list_task_files"),
|
|
2831
|
+
tags: z8.array(z8.string().min(1).max(100)).max(MAX_FILE_TAGS).describe(
|
|
2724
2832
|
"Glossary tag names (or ids) the file is an example of. Replaces the file's current tags \u2014 [] clears them. Max 5."
|
|
2725
2833
|
)
|
|
2726
2834
|
},
|
|
@@ -2949,7 +3057,7 @@ function registerChecklistTools(server2, conn2) {
|
|
|
2949
3057
|
}
|
|
2950
3058
|
|
|
2951
3059
|
// src/tools/workspace.ts
|
|
2952
|
-
import { z as
|
|
3060
|
+
import { z as z9 } from "zod";
|
|
2953
3061
|
|
|
2954
3062
|
// src/workspace-ssh-tunnel.ts
|
|
2955
3063
|
import net from "net";
|
|
@@ -3069,8 +3177,8 @@ function registerAttachInfoTool(server2, conn2) {
|
|
|
3069
3177
|
"workspace_attach_info",
|
|
3070
3178
|
"Return SSH/SFTP attach metadata for a running task Claudespace, plus hosted preview URLs and configured preview ports. Optionally installs an OpenSSH public key for this attach session.",
|
|
3071
3179
|
{
|
|
3072
|
-
taskId:
|
|
3073
|
-
sshPublicKey:
|
|
3180
|
+
taskId: z9.string().describe("The task ID"),
|
|
3181
|
+
sshPublicKey: z9.string().optional().describe("Optional OpenSSH public key to install into the workspace")
|
|
3074
3182
|
},
|
|
3075
3183
|
async ({ taskId, sshPublicKey }) => {
|
|
3076
3184
|
const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
|
|
@@ -3083,7 +3191,7 @@ function registerPreviewUrlsTool(server2, conn2) {
|
|
|
3083
3191
|
"workspace_preview_urls",
|
|
3084
3192
|
"Return the hosted preview URLs and preview ports for a running task Claudespace. This mirrors the web UI preview link metadata.",
|
|
3085
3193
|
{
|
|
3086
|
-
taskId:
|
|
3194
|
+
taskId: z9.string().describe("The task ID")
|
|
3087
3195
|
},
|
|
3088
3196
|
async ({ taskId }) => {
|
|
3089
3197
|
const info = await conn2.getWorkspaceAttachInfo(taskId);
|
|
@@ -3112,10 +3220,10 @@ function registerStartTunnelTool(server2, conn2, startTunnel) {
|
|
|
3112
3220
|
"workspace_start_tunnel",
|
|
3113
3221
|
"Start a local loopback tunnel through the MCP server to a running task Claudespace port. Use port 2222 for SSH/SFTP, or one of previewPorts for app access.",
|
|
3114
3222
|
{
|
|
3115
|
-
taskId:
|
|
3116
|
-
port:
|
|
3117
|
-
preferredLocalPort:
|
|
3118
|
-
sshPublicKey:
|
|
3223
|
+
taskId: z9.string().describe("The task ID"),
|
|
3224
|
+
port: z9.number().optional().describe("Remote Claudespace port. Defaults to SSH port 2222."),
|
|
3225
|
+
preferredLocalPort: z9.number().optional().describe("Preferred local loopback port. If omitted, the OS chooses one."),
|
|
3226
|
+
sshPublicKey: z9.string().optional().describe("Optional OpenSSH public key to install before opening the tunnel")
|
|
3119
3227
|
},
|
|
3120
3228
|
async ({ taskId, port, preferredLocalPort, sshPublicKey }) => {
|
|
3121
3229
|
const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
|
|
@@ -3175,7 +3283,7 @@ function registerStopTunnelTool(server2) {
|
|
|
3175
3283
|
"workspace_stop_tunnel",
|
|
3176
3284
|
"Stop a local workspace tunnel previously opened by workspace_start_tunnel.",
|
|
3177
3285
|
{
|
|
3178
|
-
tunnelId:
|
|
3286
|
+
tunnelId: z9.string().describe("Tunnel id returned by workspace_start_tunnel")
|
|
3179
3287
|
},
|
|
3180
3288
|
async ({ tunnelId }) => {
|
|
3181
3289
|
const tunnel = activeTunnels.get(tunnelId);
|
|
@@ -3194,7 +3302,7 @@ function registerWorkspaceTools(server2, conn2, deps = {}) {
|
|
|
3194
3302
|
}
|
|
3195
3303
|
|
|
3196
3304
|
// ../shared/dist/index.js
|
|
3197
|
-
import { z as
|
|
3305
|
+
import { z as z10 } from "zod";
|
|
3198
3306
|
import { z as z22 } from "zod";
|
|
3199
3307
|
import { z as z32 } from "zod";
|
|
3200
3308
|
import { z as z42 } from "zod";
|
|
@@ -3203,76 +3311,7 @@ import { z as z62 } from "zod";
|
|
|
3203
3311
|
import { z as z72 } from "zod";
|
|
3204
3312
|
import { z as z82 } from "zod";
|
|
3205
3313
|
import { z as z92 } from "zod";
|
|
3206
|
-
import { z as
|
|
3207
|
-
var DEFAULT_SONNET_MODEL = "claude-sonnet-5";
|
|
3208
|
-
var DEFAULT_OPUS_MODEL = "claude-opus-5";
|
|
3209
|
-
var DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001";
|
|
3210
|
-
var FABLE_MODEL = "claude-fable-5-1";
|
|
3211
|
-
var PREVIOUS_SONNET_MODEL = "claude-sonnet-4-6";
|
|
3212
|
-
var PREVIOUS_OPUS_MODEL = "claude-opus-4-8";
|
|
3213
|
-
var PTY_STREAM_PORT_BASE = 7420;
|
|
3214
|
-
var PTY_STREAM_PORT_ATTEMPTS = 8;
|
|
3215
|
-
var PREVIEW_PORT_DENY_LIST = [
|
|
3216
|
-
5432,
|
|
3217
|
-
6379,
|
|
3218
|
-
9200,
|
|
3219
|
-
...Array.from({ length: PTY_STREAM_PORT_ATTEMPTS }, (_, i) => PTY_STREAM_PORT_BASE + i)
|
|
3220
|
-
];
|
|
3221
|
-
function normalizeCheckpointPath(value) {
|
|
3222
|
-
let normalized = value.trim().replace(/\/{2,}/g, "/");
|
|
3223
|
-
normalized = normalized.split("/").filter((segment) => segment !== ".").join("/");
|
|
3224
|
-
while (normalized.endsWith("/")) normalized = normalized.slice(0, -1);
|
|
3225
|
-
return normalized;
|
|
3226
|
-
}
|
|
3227
|
-
var checkpointPathSchema = z9.string().transform(normalizeCheckpointPath).pipe(
|
|
3228
|
-
z9.string().min(1).refine((value) => value !== ".", "Checkpoint paths must name a repository entry").refine((value) => !value.startsWith("/"), "Checkpoint paths must be repository-relative").refine(
|
|
3229
|
-
(value) => !/^[A-Za-z]:[\\/]/.test(value) && !value.includes("\\"),
|
|
3230
|
-
"Checkpoint paths must use repository-relative POSIX syntax"
|
|
3231
|
-
).refine(
|
|
3232
|
-
(value) => !value.split("/").includes(".."),
|
|
3233
|
-
"Checkpoint paths must not traverse a parent directory"
|
|
3234
|
-
)
|
|
3235
|
-
);
|
|
3236
|
-
var secretNameSchema = z9.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);
|
|
3237
|
-
var checkpointKeySchema = z9.string().regex(/^[0-9a-f]{64}$/);
|
|
3238
|
-
var checkpointDigestRefSchema = z9.string().regex(/^[^\s@]+@sha256:[0-9a-f]{64}$/);
|
|
3239
|
-
var ACTIONS_PREBAKE_REGISTRY_PATTERN = /^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?(?::(?:[1-9][0-9]{0,4}))?(?:\/[a-z0-9]+(?:[._-][a-z0-9]+)*)*$/;
|
|
3240
|
-
var actionsPrebakeRegistrySchema = z9.string().trim().min(1).regex(
|
|
3241
|
-
ACTIONS_PREBAKE_REGISTRY_PATTERN,
|
|
3242
|
-
"Actions prebake registry must be a lowercase host[:port] with an optional path prefix"
|
|
3243
|
-
).refine((value) => {
|
|
3244
|
-
const port = /:([0-9]+)(?:\/|$)/.exec(value)?.[1];
|
|
3245
|
-
return !port || Number(port) <= 65535;
|
|
3246
|
-
}, "Actions prebake registry port must be between 1 and 65535");
|
|
3247
|
-
function uniqueSortedArray(item, minimum = 0) {
|
|
3248
|
-
return z9.array(item).min(minimum).superRefine((values, ctx) => {
|
|
3249
|
-
if (new Set(values).size !== values.length) {
|
|
3250
|
-
ctx.addIssue({ code: z9.ZodIssueCode.custom, message: "Duplicate values are not allowed" });
|
|
3251
|
-
}
|
|
3252
|
-
}).transform((values) => [...values].sort());
|
|
3253
|
-
}
|
|
3254
|
-
var projectCheckpointSettingsSchema = z9.object({
|
|
3255
|
-
enabled: z9.literal(true),
|
|
3256
|
-
cacheCommand: z9.string().trim().min(1),
|
|
3257
|
-
cacheInputPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
3258
|
-
reusableArtifactPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
3259
|
-
finalizeCommand: z9.string().trim().min(1),
|
|
3260
|
-
credentialEpoch: z9.string().trim().min(1),
|
|
3261
|
-
requiredSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
3262
|
-
optionalSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
3263
|
-
bakeWebAppBuild: z9.boolean().optional()
|
|
3264
|
-
}).superRefine((checkpoint, ctx) => {
|
|
3265
|
-
const required = new Set(checkpoint.requiredSecretNames ?? []);
|
|
3266
|
-
for (const name of checkpoint.optionalSecretNames ?? []) {
|
|
3267
|
-
if (required.has(name)) {
|
|
3268
|
-
ctx.addIssue({
|
|
3269
|
-
code: z9.ZodIssueCode.custom,
|
|
3270
|
-
path: ["optionalSecretNames"],
|
|
3271
|
-
message: "A secret cannot be both required and optional"
|
|
3272
|
-
});
|
|
3273
|
-
}
|
|
3274
|
-
}
|
|
3275
|
-
});
|
|
3314
|
+
import { z as z102 } from "zod";
|
|
3276
3315
|
var ACHIEVEMENT_RARITIES = [
|
|
3277
3316
|
{
|
|
3278
3317
|
key: "common",
|
|
@@ -3296,7 +3335,7 @@ var ACHIEVEMENT_RARITIES = [
|
|
|
3296
3335
|
{ key: "pack", name: "Pack", color: "#9c27b0", iconPath: "/storypoints/pack.svg" }
|
|
3297
3336
|
];
|
|
3298
3337
|
var RISK_LEVELS = ["critical", "high", "medium", "low"];
|
|
3299
|
-
var riskLevelSchema =
|
|
3338
|
+
var riskLevelSchema = z10.enum(RISK_LEVELS);
|
|
3300
3339
|
var DEFAULT_RISK_LEVELS = [
|
|
3301
3340
|
{
|
|
3302
3341
|
level: "critical",
|
|
@@ -3350,168 +3389,168 @@ var MAX_FILE_TAG_LENGTH = 100;
|
|
|
3350
3389
|
var EMBED_THRESHOLD_IMAGES = 5 * 1024 * 1024;
|
|
3351
3390
|
var EMBED_THRESHOLD_TEXT = 2 * 1024 * 1024;
|
|
3352
3391
|
var IDLE_HEARTBEAT_MS = 90 * 1e3;
|
|
3353
|
-
var TurnEndToolCallSchema =
|
|
3354
|
-
tool:
|
|
3355
|
-
input:
|
|
3356
|
-
output:
|
|
3357
|
-
timestamp:
|
|
3392
|
+
var TurnEndToolCallSchema = z22.object({
|
|
3393
|
+
tool: z22.string(),
|
|
3394
|
+
input: z22.string().optional(),
|
|
3395
|
+
output: z22.string().optional(),
|
|
3396
|
+
timestamp: z22.string().optional()
|
|
3358
3397
|
}).passthrough();
|
|
3359
|
-
var KnownAgentEventSchema =
|
|
3398
|
+
var KnownAgentEventSchema = z22.discriminatedUnion("type", [
|
|
3360
3399
|
// ── Lifecycle / connection ────────────────────────────────────────────
|
|
3361
|
-
|
|
3362
|
-
type:
|
|
3363
|
-
sessionId:
|
|
3364
|
-
projectId:
|
|
3400
|
+
z22.object({
|
|
3401
|
+
type: z22.literal("connected"),
|
|
3402
|
+
sessionId: z22.string(),
|
|
3403
|
+
projectId: z22.string().optional()
|
|
3365
3404
|
}).passthrough(),
|
|
3366
3405
|
// Open-ended context snapshot spread from buildInitializationContext().
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
type:
|
|
3370
|
-
reason:
|
|
3371
|
-
attempt:
|
|
3372
|
-
attempts:
|
|
3406
|
+
z22.object({ type: z22.literal("session_manifest") }).passthrough(),
|
|
3407
|
+
z22.object({
|
|
3408
|
+
type: z22.literal("agent_runner_status"),
|
|
3409
|
+
reason: z22.string(),
|
|
3410
|
+
attempt: z22.number().optional(),
|
|
3411
|
+
attempts: z22.number().optional()
|
|
3373
3412
|
}).passthrough(),
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3413
|
+
z22.object({ type: z22.literal("shutdown"), reason: z22.string().optional() }).passthrough(),
|
|
3414
|
+
z22.object({ type: z22.literal("mode_changed"), agentMode: z22.string() }).passthrough(),
|
|
3415
|
+
z22.object({ type: z22.literal("mode_transition"), from: z22.string(), to: z22.string() }).passthrough(),
|
|
3377
3416
|
// ── Turn stream ───────────────────────────────────────────────────────
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
type:
|
|
3382
|
-
tool:
|
|
3417
|
+
z22.object({ type: z22.literal("message"), content: z22.string() }).passthrough(),
|
|
3418
|
+
z22.object({ type: z22.literal("thinking"), message: z22.string() }).passthrough(),
|
|
3419
|
+
z22.object({
|
|
3420
|
+
type: z22.literal("tool_use"),
|
|
3421
|
+
tool: z22.string(),
|
|
3383
3422
|
// Producers send JSON.stringify(input); consumers defend against
|
|
3384
3423
|
// object inputs from older agents, so the wire stays permissive here.
|
|
3385
|
-
input:
|
|
3424
|
+
input: z22.unknown().optional()
|
|
3386
3425
|
}).passthrough(),
|
|
3387
|
-
|
|
3388
|
-
type:
|
|
3389
|
-
tool:
|
|
3390
|
-
output:
|
|
3391
|
-
isError:
|
|
3392
|
-
redactedCount:
|
|
3426
|
+
z22.object({
|
|
3427
|
+
type: z22.literal("tool_result"),
|
|
3428
|
+
tool: z22.string(),
|
|
3429
|
+
output: z22.unknown().optional(),
|
|
3430
|
+
isError: z22.boolean().optional(),
|
|
3431
|
+
redactedCount: z22.number().optional()
|
|
3393
3432
|
}).passthrough(),
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
type:
|
|
3397
|
-
summary:
|
|
3398
|
-
durationMs:
|
|
3433
|
+
z22.object({ type: z22.literal("turn_end"), toolCalls: z22.array(TurnEndToolCallSchema) }).passthrough(),
|
|
3434
|
+
z22.object({
|
|
3435
|
+
type: z22.literal("completed"),
|
|
3436
|
+
summary: z22.string().optional(),
|
|
3437
|
+
durationMs: z22.number().optional()
|
|
3399
3438
|
}).passthrough(),
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3439
|
+
z22.object({ type: z22.literal("error"), message: z22.string() }).passthrough(),
|
|
3440
|
+
z22.object({ type: z22.literal("agent_typing_start") }).passthrough(),
|
|
3441
|
+
z22.object({ type: z22.literal("agent_typing_stop") }).passthrough(),
|
|
3403
3442
|
// ── Telemetry ─────────────────────────────────────────────────────────
|
|
3404
3443
|
// heartbeat/typing: legacy telemetry the server still classifies as
|
|
3405
3444
|
// transient (TRANSIENT_EVENT_TYPES) — kept in the vocabulary.
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
type:
|
|
3410
|
-
contextTokens:
|
|
3411
|
-
contextWindow:
|
|
3412
|
-
inputTokens:
|
|
3413
|
-
cacheReadInputTokens:
|
|
3414
|
-
cacheCreationInputTokens:
|
|
3415
|
-
totalTokensUsed:
|
|
3445
|
+
z22.object({ type: z22.literal("heartbeat") }).passthrough(),
|
|
3446
|
+
z22.object({ type: z22.literal("typing") }).passthrough(),
|
|
3447
|
+
z22.object({
|
|
3448
|
+
type: z22.literal("context_update"),
|
|
3449
|
+
contextTokens: z22.number(),
|
|
3450
|
+
contextWindow: z22.number(),
|
|
3451
|
+
inputTokens: z22.number().optional(),
|
|
3452
|
+
cacheReadInputTokens: z22.number().optional(),
|
|
3453
|
+
cacheCreationInputTokens: z22.number().optional(),
|
|
3454
|
+
totalTokensUsed: z22.number().optional()
|
|
3416
3455
|
}).passthrough(),
|
|
3417
3456
|
// Four producer shapes share this type: {rateLimitType, utilization, status}
|
|
3418
3457
|
// (SDK rate_limit_event), {resetsAt} (agent-connection resume notice), the
|
|
3419
3458
|
// usage-sampler ({rateLimitType, utilization, status, resetsAt, gauges}
|
|
3420
3459
|
// — resetsAt matches rateLimitType; gauges survives via .passthrough()), and
|
|
3421
3460
|
// {unmeasurable, reason} (the sampler reporting it cannot read this key).
|
|
3422
|
-
|
|
3423
|
-
type:
|
|
3424
|
-
rateLimitType:
|
|
3425
|
-
utilization:
|
|
3426
|
-
status:
|
|
3427
|
-
resetsAt:
|
|
3428
|
-
unmeasurable:
|
|
3429
|
-
reason:
|
|
3461
|
+
z22.object({
|
|
3462
|
+
type: z22.literal("rate_limit_update"),
|
|
3463
|
+
rateLimitType: z22.string().optional(),
|
|
3464
|
+
utilization: z22.number().optional(),
|
|
3465
|
+
status: z22.string().optional(),
|
|
3466
|
+
resetsAt: z22.string().optional(),
|
|
3467
|
+
unmeasurable: z22.boolean().optional(),
|
|
3468
|
+
reason: z22.string().optional()
|
|
3430
3469
|
}).passthrough(),
|
|
3431
|
-
|
|
3432
|
-
type:
|
|
3433
|
-
trigger:
|
|
3434
|
-
preTokens:
|
|
3470
|
+
z22.object({
|
|
3471
|
+
type: z22.literal("context_compacted"),
|
|
3472
|
+
trigger: z22.string().optional(),
|
|
3473
|
+
preTokens: z22.number().optional()
|
|
3435
3474
|
}).passthrough(),
|
|
3436
|
-
|
|
3437
|
-
type:
|
|
3438
|
-
toolName:
|
|
3439
|
-
elapsedSeconds:
|
|
3475
|
+
z22.object({
|
|
3476
|
+
type: z22.literal("tool_progress"),
|
|
3477
|
+
toolName: z22.string().optional(),
|
|
3478
|
+
elapsedSeconds: z22.number().optional()
|
|
3440
3479
|
}).passthrough(),
|
|
3441
|
-
|
|
3442
|
-
type:
|
|
3443
|
-
sdkTaskId:
|
|
3444
|
-
description:
|
|
3480
|
+
z22.object({
|
|
3481
|
+
type: z22.literal("subagent_started"),
|
|
3482
|
+
sdkTaskId: z22.string().optional(),
|
|
3483
|
+
description: z22.string().optional()
|
|
3445
3484
|
}).passthrough(),
|
|
3446
|
-
|
|
3447
|
-
type:
|
|
3448
|
-
sdkTaskId:
|
|
3449
|
-
description:
|
|
3450
|
-
toolUses:
|
|
3451
|
-
durationMs:
|
|
3485
|
+
z22.object({
|
|
3486
|
+
type: z22.literal("subagent_progress"),
|
|
3487
|
+
sdkTaskId: z22.string().optional(),
|
|
3488
|
+
description: z22.string().optional(),
|
|
3489
|
+
toolUses: z22.number().optional(),
|
|
3490
|
+
durationMs: z22.number().optional()
|
|
3452
3491
|
}).passthrough(),
|
|
3453
3492
|
// ── Work products ─────────────────────────────────────────────────────
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
type:
|
|
3457
|
-
result:
|
|
3458
|
-
summary:
|
|
3459
|
-
issues:
|
|
3460
|
-
|
|
3461
|
-
file:
|
|
3462
|
-
line:
|
|
3463
|
-
severity:
|
|
3464
|
-
description:
|
|
3493
|
+
z22.object({ type: z22.literal("pr_created"), url: z22.string(), number: z22.number() }).passthrough(),
|
|
3494
|
+
z22.object({
|
|
3495
|
+
type: z22.literal("code_review_complete"),
|
|
3496
|
+
result: z22.enum(["approved", "changes_requested"]),
|
|
3497
|
+
summary: z22.string().optional(),
|
|
3498
|
+
issues: z22.array(
|
|
3499
|
+
z22.object({
|
|
3500
|
+
file: z22.string(),
|
|
3501
|
+
line: z22.number().optional(),
|
|
3502
|
+
severity: z22.string().optional(),
|
|
3503
|
+
description: z22.string().optional()
|
|
3465
3504
|
}).passthrough()
|
|
3466
3505
|
).optional()
|
|
3467
3506
|
}).passthrough(),
|
|
3468
3507
|
// ── Environment setup / start command ─────────────────────────────────
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
type:
|
|
3472
|
-
startCommandRunning:
|
|
3473
|
-
startCommandConfigured:
|
|
3508
|
+
z22.object({ type: z22.literal("setup_output"), stream: z22.string(), data: z22.string() }).passthrough(),
|
|
3509
|
+
z22.object({
|
|
3510
|
+
type: z22.literal("setup_complete"),
|
|
3511
|
+
startCommandRunning: z22.boolean().optional(),
|
|
3512
|
+
startCommandConfigured: z22.boolean().optional(),
|
|
3474
3513
|
// Sanitized server-side by sanitizeSessionPreviewPorts — stays unknown.
|
|
3475
|
-
previewPorts:
|
|
3514
|
+
previewPorts: z22.unknown().optional()
|
|
3476
3515
|
}).passthrough(),
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
type:
|
|
3482
|
-
code:
|
|
3483
|
-
signal:
|
|
3484
|
-
message:
|
|
3516
|
+
z22.object({ type: z22.literal("setup_error"), message: z22.string() }).passthrough(),
|
|
3517
|
+
z22.object({ type: z22.literal("start_command_started") }).passthrough(),
|
|
3518
|
+
z22.object({ type: z22.literal("start_command_output"), stream: z22.string(), data: z22.string() }).passthrough(),
|
|
3519
|
+
z22.object({
|
|
3520
|
+
type: z22.literal("start_command_exited"),
|
|
3521
|
+
code: z22.number().nullable().optional(),
|
|
3522
|
+
signal: z22.string().nullable().optional(),
|
|
3523
|
+
message: z22.string().optional()
|
|
3485
3524
|
}).passthrough(),
|
|
3486
|
-
|
|
3525
|
+
z22.object({ type: z22.literal("start_command_error"), message: z22.string() }).passthrough()
|
|
3487
3526
|
]);
|
|
3488
|
-
var AgentEventSchema =
|
|
3527
|
+
var AgentEventSchema = z22.union([
|
|
3489
3528
|
KnownAgentEventSchema,
|
|
3490
|
-
|
|
3529
|
+
z22.object({ type: z22.string().min(1) }).catchall(z22.unknown())
|
|
3491
3530
|
]);
|
|
3492
|
-
var cardDescription =
|
|
3493
|
-
var AgentHeartbeatSchema =
|
|
3494
|
-
sessionId:
|
|
3495
|
-
timestamp:
|
|
3496
|
-
status:
|
|
3497
|
-
currentAction:
|
|
3531
|
+
var cardDescription = z32.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
|
|
3532
|
+
var AgentHeartbeatSchema = z32.object({
|
|
3533
|
+
sessionId: z32.string().optional(),
|
|
3534
|
+
timestamp: z32.string(),
|
|
3535
|
+
status: z32.enum(["active", "idle", "building"]),
|
|
3536
|
+
currentAction: z32.string().optional(),
|
|
3498
3537
|
/** Sender-observed main event-loop lag (ms) — see AgentHeartbeat.loopLagMs. */
|
|
3499
|
-
loopLagMs:
|
|
3500
|
-
});
|
|
3501
|
-
var CreatePRInputSchema =
|
|
3502
|
-
title:
|
|
3503
|
-
body:
|
|
3504
|
-
head:
|
|
3505
|
-
base:
|
|
3506
|
-
});
|
|
3507
|
-
var PostToChatInputSchema =
|
|
3508
|
-
message:
|
|
3509
|
-
type:
|
|
3510
|
-
milestone:
|
|
3511
|
-
});
|
|
3512
|
-
var GetTaskContextRequestSchema =
|
|
3513
|
-
sessionId:
|
|
3514
|
-
includeHistory:
|
|
3538
|
+
loopLagMs: z32.number().nonnegative().optional()
|
|
3539
|
+
});
|
|
3540
|
+
var CreatePRInputSchema = z32.object({
|
|
3541
|
+
title: z32.string().min(1),
|
|
3542
|
+
body: z32.string(),
|
|
3543
|
+
head: z32.string().optional(),
|
|
3544
|
+
base: z32.string().optional()
|
|
3545
|
+
});
|
|
3546
|
+
var PostToChatInputSchema = z32.object({
|
|
3547
|
+
message: z32.string().min(1),
|
|
3548
|
+
type: z32.enum(["message", "question", "update"]).optional().default("message"),
|
|
3549
|
+
milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
3550
|
+
});
|
|
3551
|
+
var GetTaskContextRequestSchema = z32.object({
|
|
3552
|
+
sessionId: z32.string(),
|
|
3553
|
+
includeHistory: z32.boolean().optional().default(false),
|
|
3515
3554
|
/**
|
|
3516
3555
|
* Read the plan-revised marker WITHOUT consuming it. Bookkeeping fetches
|
|
3517
3556
|
* (the session-identity check, the branch refresh) pass true so they cannot
|
|
@@ -3519,277 +3558,277 @@ var GetTaskContextRequestSchema = z42.object({
|
|
|
3519
3558
|
* Defaults to false — consuming — so a pod running an older agent build still
|
|
3520
3559
|
* clears the marker instead of showing the notice on every boot forever.
|
|
3521
3560
|
*/
|
|
3522
|
-
peekPlanRevision:
|
|
3561
|
+
peekPlanRevision: z32.boolean().optional().default(false)
|
|
3523
3562
|
});
|
|
3524
|
-
var GetChatMessagesRequestSchema =
|
|
3525
|
-
sessionId:
|
|
3526
|
-
limit:
|
|
3527
|
-
offset:
|
|
3563
|
+
var GetChatMessagesRequestSchema = z32.object({
|
|
3564
|
+
sessionId: z32.string(),
|
|
3565
|
+
limit: z32.number().int().positive().optional().default(50),
|
|
3566
|
+
offset: z32.number().int().nonnegative().optional().default(0),
|
|
3528
3567
|
/** Task id or slug to read chat from. Omit for the session's own task. Only
|
|
3529
3568
|
* the session's own task or one of its children resolves — anything else is
|
|
3530
3569
|
* an error, never a silent fallback to the caller's own chat. */
|
|
3531
|
-
taskId:
|
|
3570
|
+
taskId: z32.string().optional()
|
|
3532
3571
|
});
|
|
3533
|
-
var GetTaskFilesRequestSchema =
|
|
3534
|
-
sessionId:
|
|
3572
|
+
var GetTaskFilesRequestSchema = z32.object({
|
|
3573
|
+
sessionId: z32.string()
|
|
3535
3574
|
});
|
|
3536
|
-
var GetTaskFileRequestSchema =
|
|
3537
|
-
sessionId:
|
|
3538
|
-
fileId:
|
|
3575
|
+
var GetTaskFileRequestSchema = z32.object({
|
|
3576
|
+
sessionId: z32.string(),
|
|
3577
|
+
fileId: z32.string()
|
|
3539
3578
|
});
|
|
3540
|
-
var GetTaskRequestSchema =
|
|
3541
|
-
sessionId:
|
|
3542
|
-
taskSlugOrId:
|
|
3579
|
+
var GetTaskRequestSchema = z32.object({
|
|
3580
|
+
sessionId: z32.string(),
|
|
3581
|
+
taskSlugOrId: z32.string()
|
|
3543
3582
|
});
|
|
3544
|
-
var GetCliHistoryRequestSchema =
|
|
3545
|
-
sessionId:
|
|
3546
|
-
limit:
|
|
3547
|
-
source:
|
|
3583
|
+
var GetCliHistoryRequestSchema = z32.object({
|
|
3584
|
+
sessionId: z32.string(),
|
|
3585
|
+
limit: z32.number().int().positive().optional().default(100),
|
|
3586
|
+
source: z32.enum(["agent", "application"]).optional(),
|
|
3548
3587
|
/** Task id or slug to read logs from. Omit for the session's own task. Only
|
|
3549
3588
|
* the session's own task or one of its children resolves — anything else is
|
|
3550
3589
|
* an error, never a silent fallback to the caller's own logs. */
|
|
3551
|
-
taskId:
|
|
3590
|
+
taskId: z32.string().optional()
|
|
3552
3591
|
});
|
|
3553
|
-
var ListSubtasksRequestSchema =
|
|
3554
|
-
sessionId:
|
|
3555
|
-
/** "compact" returns the slim orchestration view (ListSubtasksCompactResponse
|
|
3556
|
-
*
|
|
3592
|
+
var ListSubtasksRequestSchema = z32.object({
|
|
3593
|
+
sessionId: z32.string(),
|
|
3594
|
+
/** "compact" returns the slim orchestration view (ListSubtasksCompactResponse:
|
|
3595
|
+
* per-child status, agent, story points, PR state, dependencies); "full" (default — wire-compat with older
|
|
3557
3596
|
* agents) returns the verbose SubtaskSummaryDTO[] including description/plan. */
|
|
3558
|
-
view:
|
|
3559
|
-
});
|
|
3560
|
-
var GetDependenciesRequestSchema =
|
|
3561
|
-
sessionId:
|
|
3562
|
-
});
|
|
3563
|
-
var GetSuggestionsRequestSchema =
|
|
3564
|
-
sessionId:
|
|
3565
|
-
status:
|
|
3566
|
-
limit:
|
|
3567
|
-
});
|
|
3568
|
-
var ListManualTestsRequestSchema =
|
|
3569
|
-
sessionId:
|
|
3570
|
-
});
|
|
3571
|
-
var QueryManualTestsRequestSchema =
|
|
3572
|
-
sessionId:
|
|
3573
|
-
cardStatuses:
|
|
3574
|
-
testStatuses:
|
|
3575
|
-
});
|
|
3576
|
-
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId:
|
|
3577
|
-
var RequestFileUploadRequestSchema =
|
|
3578
|
-
sessionId:
|
|
3579
|
-
fileName:
|
|
3580
|
-
mimeType:
|
|
3581
|
-
fileSize:
|
|
3582
|
-
});
|
|
3583
|
-
var ConfirmFileUploadRequestSchema =
|
|
3584
|
-
sessionId:
|
|
3585
|
-
fileId:
|
|
3586
|
-
title:
|
|
3597
|
+
view: z32.enum(["compact", "full"]).optional()
|
|
3598
|
+
});
|
|
3599
|
+
var GetDependenciesRequestSchema = z32.object({
|
|
3600
|
+
sessionId: z32.string()
|
|
3601
|
+
});
|
|
3602
|
+
var GetSuggestionsRequestSchema = z32.object({
|
|
3603
|
+
sessionId: z32.string(),
|
|
3604
|
+
status: z32.string().optional(),
|
|
3605
|
+
limit: z32.number().int().min(1).max(100).optional()
|
|
3606
|
+
});
|
|
3607
|
+
var ListManualTestsRequestSchema = z32.object({
|
|
3608
|
+
sessionId: z32.string()
|
|
3609
|
+
});
|
|
3610
|
+
var QueryManualTestsRequestSchema = z32.object({
|
|
3611
|
+
sessionId: z32.string(),
|
|
3612
|
+
cardStatuses: z32.array(z32.string()).optional(),
|
|
3613
|
+
testStatuses: z32.array(z32.enum(["open", "approved", "rejected"])).optional()
|
|
3614
|
+
});
|
|
3615
|
+
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z32.string() });
|
|
3616
|
+
var RequestFileUploadRequestSchema = z32.object({
|
|
3617
|
+
sessionId: z32.string(),
|
|
3618
|
+
fileName: z32.string().min(1).max(255),
|
|
3619
|
+
mimeType: z32.string().min(1).max(128),
|
|
3620
|
+
fileSize: z32.number().int().positive().max(MAX_FILE_SIZE_BYTES2)
|
|
3621
|
+
});
|
|
3622
|
+
var ConfirmFileUploadRequestSchema = z32.object({
|
|
3623
|
+
sessionId: z32.string(),
|
|
3624
|
+
fileId: z32.string(),
|
|
3625
|
+
title: z32.string().max(500).optional(),
|
|
3587
3626
|
/** Glossary tag names (or ids) this file is an example of. */
|
|
3588
|
-
tags:
|
|
3589
|
-
});
|
|
3590
|
-
var UpdateTaskStatusRequestSchema =
|
|
3591
|
-
sessionId:
|
|
3592
|
-
status:
|
|
3593
|
-
force:
|
|
3594
|
-
});
|
|
3595
|
-
var StoreSessionIdRequestSchema =
|
|
3596
|
-
sessionId:
|
|
3597
|
-
sdkSessionId:
|
|
3598
|
-
});
|
|
3599
|
-
var SetManualTestsRequestSchema =
|
|
3600
|
-
sessionId:
|
|
3601
|
-
items:
|
|
3602
|
-
});
|
|
3603
|
-
var EditManualTestRequestSchema =
|
|
3604
|
-
sessionId:
|
|
3605
|
-
title:
|
|
3606
|
-
newTitle:
|
|
3607
|
-
});
|
|
3608
|
-
var RemoveManualTestRequestSchema =
|
|
3609
|
-
sessionId:
|
|
3610
|
-
title:
|
|
3611
|
-
});
|
|
3612
|
-
var ApproveManualTestRequestSchema =
|
|
3613
|
-
sessionId:
|
|
3614
|
-
title:
|
|
3615
|
-
});
|
|
3616
|
-
var RejectManualTestRequestSchema =
|
|
3617
|
-
sessionId:
|
|
3618
|
-
title:
|
|
3619
|
-
reason:
|
|
3620
|
-
});
|
|
3621
|
-
var SessionStartRequestSchema =
|
|
3622
|
-
sessionId:
|
|
3623
|
-
agentVersion:
|
|
3624
|
-
capabilities:
|
|
3625
|
-
});
|
|
3626
|
-
var SessionStopRequestSchema =
|
|
3627
|
-
sessionId:
|
|
3628
|
-
reason:
|
|
3629
|
-
});
|
|
3630
|
-
var EndReviewSessionRequestSchema =
|
|
3631
|
-
sessionId:
|
|
3632
|
-
reason:
|
|
3633
|
-
});
|
|
3634
|
-
var ConnectAgentRequestSchema =
|
|
3635
|
-
sessionId:
|
|
3636
|
-
});
|
|
3637
|
-
var ReportAgentStatusRequestSchema =
|
|
3638
|
-
sessionId:
|
|
3639
|
-
status:
|
|
3627
|
+
tags: z32.array(z32.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional()
|
|
3628
|
+
});
|
|
3629
|
+
var UpdateTaskStatusRequestSchema = z32.object({
|
|
3630
|
+
sessionId: z32.string(),
|
|
3631
|
+
status: z32.string(),
|
|
3632
|
+
force: z32.boolean().optional().default(false)
|
|
3633
|
+
});
|
|
3634
|
+
var StoreSessionIdRequestSchema = z32.object({
|
|
3635
|
+
sessionId: z32.string(),
|
|
3636
|
+
sdkSessionId: z32.string()
|
|
3637
|
+
});
|
|
3638
|
+
var SetManualTestsRequestSchema = z32.object({
|
|
3639
|
+
sessionId: z32.string(),
|
|
3640
|
+
items: z32.array(z32.object({ title: z32.string().min(1) })).min(1)
|
|
3641
|
+
});
|
|
3642
|
+
var EditManualTestRequestSchema = z32.object({
|
|
3643
|
+
sessionId: z32.string(),
|
|
3644
|
+
title: z32.string().min(1),
|
|
3645
|
+
newTitle: z32.string().min(1)
|
|
3646
|
+
});
|
|
3647
|
+
var RemoveManualTestRequestSchema = z32.object({
|
|
3648
|
+
sessionId: z32.string(),
|
|
3649
|
+
title: z32.string().min(1)
|
|
3650
|
+
});
|
|
3651
|
+
var ApproveManualTestRequestSchema = z32.object({
|
|
3652
|
+
sessionId: z32.string(),
|
|
3653
|
+
title: z32.string().min(1)
|
|
3654
|
+
});
|
|
3655
|
+
var RejectManualTestRequestSchema = z32.object({
|
|
3656
|
+
sessionId: z32.string(),
|
|
3657
|
+
title: z32.string().min(1),
|
|
3658
|
+
reason: z32.string().min(1).max(2e3)
|
|
3659
|
+
});
|
|
3660
|
+
var SessionStartRequestSchema = z32.object({
|
|
3661
|
+
sessionId: z32.string(),
|
|
3662
|
+
agentVersion: z32.string(),
|
|
3663
|
+
capabilities: z32.array(z32.string())
|
|
3664
|
+
});
|
|
3665
|
+
var SessionStopRequestSchema = z32.object({
|
|
3666
|
+
sessionId: z32.string(),
|
|
3667
|
+
reason: z32.string().optional()
|
|
3668
|
+
});
|
|
3669
|
+
var EndReviewSessionRequestSchema = z32.object({
|
|
3670
|
+
sessionId: z32.string(),
|
|
3671
|
+
reason: z32.enum(["approved", "changes_requested", "finished"]).optional()
|
|
3672
|
+
});
|
|
3673
|
+
var ConnectAgentRequestSchema = z32.object({
|
|
3674
|
+
sessionId: z32.string()
|
|
3675
|
+
});
|
|
3676
|
+
var ReportAgentStatusRequestSchema = z32.object({
|
|
3677
|
+
sessionId: z32.string(),
|
|
3678
|
+
status: z32.string(),
|
|
3640
3679
|
/** Why the agent reports this status (e.g. "user_question" while an AskUserQuestion questionnaire is pending in the TUI). */
|
|
3641
|
-
reason:
|
|
3680
|
+
reason: z32.string().optional(),
|
|
3642
3681
|
/**
|
|
3643
3682
|
* The pending question text, sent only alongside `reason: "user_question"`
|
|
3644
3683
|
* so the server can surface it in the user-question notification body (and
|
|
3645
3684
|
* thus the Attention feed) instead of a generic string. Optional: older
|
|
3646
3685
|
* agents omit it and the server falls back to the generic wording.
|
|
3647
3686
|
*/
|
|
3648
|
-
questionText:
|
|
3687
|
+
questionText: z32.string().optional()
|
|
3649
3688
|
});
|
|
3650
|
-
var NotifyAgentVersionRequestSchema =
|
|
3651
|
-
sessionId:
|
|
3652
|
-
agentVersion:
|
|
3689
|
+
var NotifyAgentVersionRequestSchema = z32.object({
|
|
3690
|
+
sessionId: z32.string(),
|
|
3691
|
+
agentVersion: z32.string()
|
|
3653
3692
|
});
|
|
3654
|
-
var DiscoveredPortSchema =
|
|
3655
|
-
port:
|
|
3656
|
-
label:
|
|
3657
|
-
protocol:
|
|
3658
|
-
detectedAt:
|
|
3693
|
+
var DiscoveredPortSchema = z32.object({
|
|
3694
|
+
port: z32.number().int().min(1).max(65535),
|
|
3695
|
+
label: z32.string().min(1).max(64).optional(),
|
|
3696
|
+
protocol: z32.enum(["http", "tcp"]).optional(),
|
|
3697
|
+
detectedAt: z32.string()
|
|
3659
3698
|
});
|
|
3660
|
-
var ReportDiscoveredPortsRequestSchema =
|
|
3661
|
-
sessionId:
|
|
3662
|
-
ports:
|
|
3699
|
+
var ReportDiscoveredPortsRequestSchema = z32.object({
|
|
3700
|
+
sessionId: z32.string(),
|
|
3701
|
+
ports: z32.array(DiscoveredPortSchema).max(64)
|
|
3663
3702
|
});
|
|
3664
|
-
var ReportBootMilestoneRequestSchema =
|
|
3665
|
-
sessionId:
|
|
3666
|
-
key:
|
|
3703
|
+
var ReportBootMilestoneRequestSchema = z32.object({
|
|
3704
|
+
sessionId: z32.string(),
|
|
3705
|
+
key: z32.string().max(64)
|
|
3667
3706
|
});
|
|
3668
|
-
var CreateSubtaskRequestSchema =
|
|
3669
|
-
sessionId:
|
|
3670
|
-
title:
|
|
3707
|
+
var CreateSubtaskRequestSchema = z32.object({
|
|
3708
|
+
sessionId: z32.string(),
|
|
3709
|
+
title: z32.string().min(1),
|
|
3671
3710
|
description: cardDescription,
|
|
3672
|
-
plan:
|
|
3673
|
-
storyPointValue:
|
|
3674
|
-
ordinal:
|
|
3675
|
-
followParentStatus:
|
|
3711
|
+
plan: z32.string().optional(),
|
|
3712
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3713
|
+
ordinal: z32.number().int().nonnegative().optional(),
|
|
3714
|
+
followParentStatus: z32.boolean().optional(),
|
|
3676
3715
|
/** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
|
|
3677
3716
|
* metadata — preferred over encoding order in plan text / ordinal). */
|
|
3678
|
-
dependsOn:
|
|
3717
|
+
dependsOn: z32.array(z32.string().min(1)).max(32).optional(),
|
|
3679
3718
|
/** Glossary tag names to assign to the child. Unmatched names come back in
|
|
3680
3719
|
* the response rather than failing the create. */
|
|
3681
|
-
tags:
|
|
3720
|
+
tags: z32.array(z32.string().min(1)).max(10).optional()
|
|
3682
3721
|
});
|
|
3683
|
-
var UpdateSubtaskRequestSchema =
|
|
3684
|
-
sessionId:
|
|
3685
|
-
subtaskId:
|
|
3686
|
-
title:
|
|
3722
|
+
var UpdateSubtaskRequestSchema = z32.object({
|
|
3723
|
+
sessionId: z32.string(),
|
|
3724
|
+
subtaskId: z32.string(),
|
|
3725
|
+
title: z32.string().min(1).optional(),
|
|
3687
3726
|
description: cardDescription,
|
|
3688
|
-
plan:
|
|
3727
|
+
plan: z32.string().optional(),
|
|
3689
3728
|
/** Orchestration statuses only ("Planning" | "Open") — the pack parent's
|
|
3690
3729
|
* sanctioned promotion path. Execution statuses stay with the build
|
|
3691
3730
|
* pipeline / force_update_task_status. Enforced server-side. */
|
|
3692
|
-
status:
|
|
3731
|
+
status: z32.string().optional(),
|
|
3693
3732
|
/** Assign a project agent to the child — accepts the agent's id or exact
|
|
3694
3733
|
* name; resolved against the parent task's project server-side. */
|
|
3695
|
-
agentIdOrName:
|
|
3696
|
-
storyPointValue:
|
|
3697
|
-
followParentStatus:
|
|
3734
|
+
agentIdOrName: z32.string().min(1).optional(),
|
|
3735
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3736
|
+
followParentStatus: z32.boolean().optional(),
|
|
3698
3737
|
/** Replace this subtask's dependency edges with these sibling ids/slugs.
|
|
3699
3738
|
* Empty array clears all. Omit to leave dependencies unchanged. */
|
|
3700
|
-
dependsOn:
|
|
3739
|
+
dependsOn: z32.array(z32.string().min(1)).max(32).optional()
|
|
3701
3740
|
});
|
|
3702
|
-
var DeleteSubtaskRequestSchema =
|
|
3703
|
-
sessionId:
|
|
3704
|
-
subtaskId:
|
|
3741
|
+
var DeleteSubtaskRequestSchema = z32.object({
|
|
3742
|
+
sessionId: z32.string(),
|
|
3743
|
+
subtaskId: z32.string()
|
|
3705
3744
|
});
|
|
3706
|
-
var SetSubtaskParentRequestSchema =
|
|
3707
|
-
sessionId:
|
|
3708
|
-
taskId:
|
|
3709
|
-
detach:
|
|
3710
|
-
ordinal:
|
|
3711
|
-
followParentStatus:
|
|
3745
|
+
var SetSubtaskParentRequestSchema = z32.object({
|
|
3746
|
+
sessionId: z32.string(),
|
|
3747
|
+
taskId: z32.string().min(1),
|
|
3748
|
+
detach: z32.boolean().optional(),
|
|
3749
|
+
ordinal: z32.number().int().nonnegative().optional(),
|
|
3750
|
+
followParentStatus: z32.boolean().optional()
|
|
3712
3751
|
});
|
|
3713
|
-
var GetTaskPropertiesRequestSchema =
|
|
3714
|
-
sessionId:
|
|
3752
|
+
var GetTaskPropertiesRequestSchema = z32.object({
|
|
3753
|
+
sessionId: z32.string()
|
|
3715
3754
|
});
|
|
3716
|
-
var UpdateTaskFieldsRequestSchema =
|
|
3717
|
-
sessionId:
|
|
3718
|
-
plan:
|
|
3755
|
+
var UpdateTaskFieldsRequestSchema = z32.object({
|
|
3756
|
+
sessionId: z32.string(),
|
|
3757
|
+
plan: z32.string().optional(),
|
|
3719
3758
|
description: cardDescription
|
|
3720
3759
|
});
|
|
3721
|
-
var UpdateTaskPropertiesRequestSchema =
|
|
3722
|
-
sessionId:
|
|
3723
|
-
title:
|
|
3724
|
-
storyPointValue:
|
|
3725
|
-
tagIds:
|
|
3726
|
-
tagNames:
|
|
3727
|
-
githubPRUrl:
|
|
3728
|
-
githubBranch:
|
|
3760
|
+
var UpdateTaskPropertiesRequestSchema = z32.object({
|
|
3761
|
+
sessionId: z32.string(),
|
|
3762
|
+
title: z32.string().optional(),
|
|
3763
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3764
|
+
tagIds: z32.array(z32.string()).optional(),
|
|
3765
|
+
tagNames: z32.array(z32.string()).optional(),
|
|
3766
|
+
githubPRUrl: z32.string().url().optional(),
|
|
3767
|
+
githubBranch: z32.string().optional(),
|
|
3729
3768
|
// Canonical risk level, or null to clear — same semantics as the headless
|
|
3730
3769
|
// update_task boundary (resolved to the project's Risk row in the handler).
|
|
3731
3770
|
risk: riskLevelSchema.nullable().optional()
|
|
3732
3771
|
});
|
|
3733
|
-
var ListIconsRequestSchema =
|
|
3734
|
-
sessionId:
|
|
3772
|
+
var ListIconsRequestSchema = z32.object({
|
|
3773
|
+
sessionId: z32.string()
|
|
3735
3774
|
});
|
|
3736
|
-
var GenerateTaskIconRequestSchema =
|
|
3737
|
-
sessionId:
|
|
3738
|
-
prompt:
|
|
3739
|
-
aspectRatio:
|
|
3775
|
+
var GenerateTaskIconRequestSchema = z32.object({
|
|
3776
|
+
sessionId: z32.string(),
|
|
3777
|
+
prompt: z32.string().min(1),
|
|
3778
|
+
aspectRatio: z32.string().optional()
|
|
3740
3779
|
});
|
|
3741
|
-
var SearchFaIconsRequestSchema =
|
|
3742
|
-
sessionId:
|
|
3743
|
-
query:
|
|
3744
|
-
first:
|
|
3780
|
+
var SearchFaIconsRequestSchema = z32.object({
|
|
3781
|
+
sessionId: z32.string(),
|
|
3782
|
+
query: z32.string().min(1),
|
|
3783
|
+
first: z32.number().int().positive().optional()
|
|
3745
3784
|
});
|
|
3746
|
-
var PickFaIconRequestSchema =
|
|
3747
|
-
sessionId:
|
|
3748
|
-
fontAwesomeId:
|
|
3749
|
-
fontAwesomeStyle:
|
|
3785
|
+
var PickFaIconRequestSchema = z32.object({
|
|
3786
|
+
sessionId: z32.string(),
|
|
3787
|
+
fontAwesomeId: z32.string().min(1),
|
|
3788
|
+
fontAwesomeStyle: z32.string().optional()
|
|
3750
3789
|
});
|
|
3751
|
-
var CreateFollowUpTaskRequestSchema =
|
|
3752
|
-
sessionId:
|
|
3753
|
-
title:
|
|
3790
|
+
var CreateFollowUpTaskRequestSchema = z32.object({
|
|
3791
|
+
sessionId: z32.string(),
|
|
3792
|
+
title: z32.string().min(1),
|
|
3754
3793
|
description: cardDescription,
|
|
3755
|
-
plan:
|
|
3756
|
-
storyPointValue:
|
|
3794
|
+
plan: z32.string().optional(),
|
|
3795
|
+
storyPointValue: z32.number().int().positive().optional()
|
|
3757
3796
|
});
|
|
3758
|
-
var AddDependencyRequestSchema =
|
|
3759
|
-
sessionId:
|
|
3760
|
-
dependsOnSlugOrId:
|
|
3797
|
+
var AddDependencyRequestSchema = z32.object({
|
|
3798
|
+
sessionId: z32.string(),
|
|
3799
|
+
dependsOnSlugOrId: z32.string()
|
|
3761
3800
|
});
|
|
3762
|
-
var RemoveDependencyRequestSchema =
|
|
3763
|
-
sessionId:
|
|
3764
|
-
dependsOnSlugOrId:
|
|
3801
|
+
var RemoveDependencyRequestSchema = z32.object({
|
|
3802
|
+
sessionId: z32.string(),
|
|
3803
|
+
dependsOnSlugOrId: z32.string()
|
|
3765
3804
|
});
|
|
3766
|
-
var CreateSuggestionRequestSchema =
|
|
3767
|
-
sessionId:
|
|
3768
|
-
title:
|
|
3805
|
+
var CreateSuggestionRequestSchema = z32.object({
|
|
3806
|
+
sessionId: z32.string(),
|
|
3807
|
+
title: z32.string().min(1),
|
|
3769
3808
|
description: cardDescription,
|
|
3770
|
-
tagNames:
|
|
3809
|
+
tagNames: z32.array(z32.string()).optional()
|
|
3771
3810
|
});
|
|
3772
|
-
var VoteSuggestionRequestSchema =
|
|
3773
|
-
sessionId:
|
|
3774
|
-
suggestionId:
|
|
3775
|
-
value:
|
|
3811
|
+
var VoteSuggestionRequestSchema = z32.object({
|
|
3812
|
+
sessionId: z32.string(),
|
|
3813
|
+
suggestionId: z32.string(),
|
|
3814
|
+
value: z32.union([z32.literal(1), z32.literal(-1)])
|
|
3776
3815
|
});
|
|
3777
|
-
var TriggerIdentificationRequestSchema =
|
|
3778
|
-
sessionId:
|
|
3816
|
+
var TriggerIdentificationRequestSchema = z32.object({
|
|
3817
|
+
sessionId: z32.string()
|
|
3779
3818
|
});
|
|
3780
|
-
var HandoffToImplementerRequestSchema =
|
|
3781
|
-
sessionId:
|
|
3819
|
+
var HandoffToImplementerRequestSchema = z32.object({
|
|
3820
|
+
sessionId: z32.string(),
|
|
3782
3821
|
// Optional difficulty sizing — sets the task's story points before resolving
|
|
3783
3822
|
// the matched implementer agent. Omit to hand off using the task's current
|
|
3784
3823
|
// story points (or the project's default task agent when unsized).
|
|
3785
|
-
storyPoints:
|
|
3824
|
+
storyPoints: z32.number().int().positive().optional(),
|
|
3786
3825
|
// Optional kickoff note posted to the task chat alongside the handoff notice.
|
|
3787
|
-
message:
|
|
3826
|
+
message: z32.string().optional()
|
|
3788
3827
|
});
|
|
3789
|
-
var SubmitCodeReviewResultRequestSchema =
|
|
3790
|
-
sessionId:
|
|
3791
|
-
approved:
|
|
3792
|
-
content:
|
|
3828
|
+
var SubmitCodeReviewResultRequestSchema = z32.object({
|
|
3829
|
+
sessionId: z32.string(),
|
|
3830
|
+
approved: z32.boolean(),
|
|
3831
|
+
content: z32.string(),
|
|
3793
3832
|
// Canonical risk level the reviewer assigned to this change. Required on every
|
|
3794
3833
|
// verdict — the reviewer must judge it. Applied authoritatively server-side
|
|
3795
3834
|
// (may raise OR lower an already-set value; the reviewer has that authority).
|
|
@@ -3797,177 +3836,165 @@ var SubmitCodeReviewResultRequestSchema = z42.object({
|
|
|
3797
3836
|
// The commit SHA the reviewer actually reviewed. When present, the verdict is
|
|
3798
3837
|
// rejected unless the task is still at this SHA (guards against a late
|
|
3799
3838
|
// old-SHA verdict overwriting a newer review cycle).
|
|
3800
|
-
reviewedSha:
|
|
3801
|
-
});
|
|
3802
|
-
var CycleCodingAgentKeyRequestSchema =
|
|
3803
|
-
sessionId:
|
|
3804
|
-
rateLimitType:
|
|
3805
|
-
resetsAt:
|
|
3806
|
-
});
|
|
3807
|
-
var
|
|
3808
|
-
sessionId:
|
|
3809
|
-
childTaskId:
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
});
|
|
3829
|
-
var
|
|
3830
|
-
taskId:
|
|
3831
|
-
});
|
|
3832
|
-
var
|
|
3833
|
-
taskId:
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
});
|
|
3844
|
-
var
|
|
3845
|
-
taskId:
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
});
|
|
3874
|
-
var
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
forceFresh: z42.boolean().optional()
|
|
3898
|
-
});
|
|
3899
|
-
var ReportCredentialFailureRequestSchema = z42.object({
|
|
3900
|
-
sessionId: z42.string(),
|
|
3901
|
-
error: z42.string().max(2e3).optional(),
|
|
3902
|
-
tokenShape: z42.string().max(500).optional(),
|
|
3903
|
-
healed: z42.boolean().optional()
|
|
3904
|
-
});
|
|
3905
|
-
var ReportReviewSpawnFailureRequestSchema = z42.object({
|
|
3906
|
-
sessionId: z42.string(),
|
|
3907
|
-
reviewSessionId: z42.string(),
|
|
3908
|
-
error: z42.string().max(2e3).optional()
|
|
3839
|
+
reviewedSha: z32.string().optional()
|
|
3840
|
+
});
|
|
3841
|
+
var CycleCodingAgentKeyRequestSchema = z32.object({
|
|
3842
|
+
sessionId: z32.string(),
|
|
3843
|
+
rateLimitType: z32.string(),
|
|
3844
|
+
resetsAt: z32.string().optional()
|
|
3845
|
+
});
|
|
3846
|
+
var PostChildChatMessageRequestSchema = z32.object({
|
|
3847
|
+
sessionId: z32.string(),
|
|
3848
|
+
childTaskId: z32.string(),
|
|
3849
|
+
message: z32.string().min(1)
|
|
3850
|
+
});
|
|
3851
|
+
var UpdateChildStatusRequestSchema = z32.object({
|
|
3852
|
+
sessionId: z32.string(),
|
|
3853
|
+
childTaskId: z32.string(),
|
|
3854
|
+
status: z32.string()
|
|
3855
|
+
});
|
|
3856
|
+
var GetAgentStatusRequestSchema = z32.object({
|
|
3857
|
+
taskId: z32.string()
|
|
3858
|
+
});
|
|
3859
|
+
var GetUiCliHistoryRequestSchema = z32.object({
|
|
3860
|
+
taskId: z32.string()
|
|
3861
|
+
});
|
|
3862
|
+
var GetActivePtySessionRequestSchema = z32.object({
|
|
3863
|
+
taskId: z32.string()
|
|
3864
|
+
});
|
|
3865
|
+
var ListActivePtySessionsRequestSchema = z32.object({
|
|
3866
|
+
taskId: z32.string()
|
|
3867
|
+
});
|
|
3868
|
+
var SendSoftStopRequestSchema = z32.object({
|
|
3869
|
+
taskId: z32.string()
|
|
3870
|
+
});
|
|
3871
|
+
var StopTaskSessionRequestSchema = z32.object({
|
|
3872
|
+
taskId: z32.string(),
|
|
3873
|
+
sessionId: z32.string()
|
|
3874
|
+
});
|
|
3875
|
+
var FlushTaskQueueRequestSchema = z32.object({
|
|
3876
|
+
taskId: z32.string(),
|
|
3877
|
+
softStop: z32.boolean().optional()
|
|
3878
|
+
});
|
|
3879
|
+
var CancelTaskQueuedMessageRequestSchema = z32.object({
|
|
3880
|
+
taskId: z32.string(),
|
|
3881
|
+
messageId: z32.string()
|
|
3882
|
+
});
|
|
3883
|
+
var FlushSingleQueuedMessageRequestSchema = z32.object({
|
|
3884
|
+
taskId: z32.string(),
|
|
3885
|
+
messageId: z32.string(),
|
|
3886
|
+
softStop: z32.boolean().optional()
|
|
3887
|
+
});
|
|
3888
|
+
var AnswerAgentQuestionRequestSchema = z32.object({
|
|
3889
|
+
taskId: z32.string(),
|
|
3890
|
+
requestId: z32.string(),
|
|
3891
|
+
answers: z32.record(z32.string(), z32.string())
|
|
3892
|
+
});
|
|
3893
|
+
var ClearAgentTodosRequestSchema = z32.object({
|
|
3894
|
+
taskId: z32.string()
|
|
3895
|
+
});
|
|
3896
|
+
var AgentQuestionOptionSchema = z32.object({
|
|
3897
|
+
label: z32.string(),
|
|
3898
|
+
description: z32.string(),
|
|
3899
|
+
preview: z32.string().optional()
|
|
3900
|
+
});
|
|
3901
|
+
var AgentQuestionSchema = z32.object({
|
|
3902
|
+
question: z32.string(),
|
|
3903
|
+
header: z32.string(),
|
|
3904
|
+
options: z32.array(AgentQuestionOptionSchema),
|
|
3905
|
+
multiSelect: z32.boolean().optional()
|
|
3906
|
+
});
|
|
3907
|
+
var AskUserQuestionRequestSchema = z32.object({
|
|
3908
|
+
sessionId: z32.string(),
|
|
3909
|
+
question: z32.string().min(1),
|
|
3910
|
+
requestId: z32.string().min(1),
|
|
3911
|
+
questions: z32.array(AgentQuestionSchema).min(1)
|
|
3912
|
+
});
|
|
3913
|
+
var PostAgentMessageRequestSchema = z32.object({
|
|
3914
|
+
sessionId: z32.string().min(1),
|
|
3915
|
+
content: z32.string(),
|
|
3916
|
+
milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
3917
|
+
});
|
|
3918
|
+
var EmitAgentEventRequestSchema = z32.object({
|
|
3919
|
+
sessionId: z32.string(),
|
|
3920
|
+
events: z32.array(AgentEventSchema).max(500)
|
|
3921
|
+
});
|
|
3922
|
+
var RefreshGithubTokenRequestSchema = z32.object({
|
|
3923
|
+
sessionId: z32.string(),
|
|
3924
|
+
forceFresh: z32.boolean().optional()
|
|
3925
|
+
});
|
|
3926
|
+
var ReportCredentialFailureRequestSchema = z32.object({
|
|
3927
|
+
sessionId: z32.string(),
|
|
3928
|
+
error: z32.string().max(2e3).optional(),
|
|
3929
|
+
tokenShape: z32.string().max(500).optional(),
|
|
3930
|
+
healed: z32.boolean().optional()
|
|
3931
|
+
});
|
|
3932
|
+
var ReportReviewSpawnFailureRequestSchema = z32.object({
|
|
3933
|
+
sessionId: z32.string(),
|
|
3934
|
+
reviewSessionId: z32.string(),
|
|
3935
|
+
error: z32.string().max(2e3).optional()
|
|
3909
3936
|
});
|
|
3910
3937
|
var ReportBuilderSpawnFailureRequestSchema = ReportReviewSpawnFailureRequestSchema.omit({
|
|
3911
3938
|
reviewSessionId: true
|
|
3912
|
-
}).extend({ buildSessionId:
|
|
3913
|
-
var SpawnTaskSessionRequestSchema =
|
|
3914
|
-
taskId:
|
|
3915
|
-
kind:
|
|
3939
|
+
}).extend({ buildSessionId: z32.string() });
|
|
3940
|
+
var SpawnTaskSessionRequestSchema = z32.object({
|
|
3941
|
+
taskId: z32.string(),
|
|
3942
|
+
kind: z32.enum(["tui", "shell"])
|
|
3916
3943
|
});
|
|
3917
|
-
var StartCodeReviewRequestSchema =
|
|
3918
|
-
taskId:
|
|
3919
|
-
force:
|
|
3944
|
+
var StartCodeReviewRequestSchema = z32.object({
|
|
3945
|
+
taskId: z32.string(),
|
|
3946
|
+
force: z32.boolean().optional()
|
|
3920
3947
|
});
|
|
3921
|
-
var StopCodeReviewRequestSchema =
|
|
3922
|
-
taskId:
|
|
3948
|
+
var StopCodeReviewRequestSchema = z32.object({
|
|
3949
|
+
taskId: z32.string()
|
|
3923
3950
|
});
|
|
3924
|
-
var ReportSessionSpawnFailureRequestSchema =
|
|
3925
|
-
sessionId:
|
|
3926
|
-
spawnedSessionId:
|
|
3927
|
-
error:
|
|
3951
|
+
var ReportSessionSpawnFailureRequestSchema = z32.object({
|
|
3952
|
+
sessionId: z32.string(),
|
|
3953
|
+
spawnedSessionId: z32.string(),
|
|
3954
|
+
error: z32.string().max(2e3).optional()
|
|
3928
3955
|
});
|
|
3929
|
-
var RefreshGithubTokenResponseSchema =
|
|
3930
|
-
token:
|
|
3956
|
+
var RefreshGithubTokenResponseSchema = z32.object({
|
|
3957
|
+
token: z32.string()
|
|
3931
3958
|
});
|
|
3932
3959
|
var PTY_FRAME_MAX_CHARS = 256 * 1024;
|
|
3933
3960
|
var PTY_MAX_DIMENSION = 1e3;
|
|
3934
|
-
var PtyOutputRequestSchema =
|
|
3935
|
-
sessionId:
|
|
3936
|
-
data:
|
|
3937
|
-
cols:
|
|
3938
|
-
rows:
|
|
3961
|
+
var PtyOutputRequestSchema = z32.object({
|
|
3962
|
+
sessionId: z32.string(),
|
|
3963
|
+
data: z32.string().max(PTY_FRAME_MAX_CHARS),
|
|
3964
|
+
cols: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional(),
|
|
3965
|
+
rows: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional()
|
|
3939
3966
|
});
|
|
3940
|
-
var PtyEndedRequestSchema =
|
|
3941
|
-
sessionId:
|
|
3967
|
+
var PtyEndedRequestSchema = z32.object({
|
|
3968
|
+
sessionId: z32.string()
|
|
3942
3969
|
});
|
|
3943
|
-
var PtyInputRequestSchema =
|
|
3944
|
-
sessionId:
|
|
3945
|
-
data:
|
|
3970
|
+
var PtyInputRequestSchema = z32.object({
|
|
3971
|
+
sessionId: z32.string(),
|
|
3972
|
+
data: z32.string().max(PTY_FRAME_MAX_CHARS)
|
|
3946
3973
|
});
|
|
3947
|
-
var PtyResizeRequestSchema =
|
|
3948
|
-
sessionId:
|
|
3949
|
-
cols:
|
|
3950
|
-
rows:
|
|
3974
|
+
var PtyResizeRequestSchema = z32.object({
|
|
3975
|
+
sessionId: z32.string(),
|
|
3976
|
+
cols: z32.number().int().positive().max(PTY_MAX_DIMENSION),
|
|
3977
|
+
rows: z32.number().int().positive().max(PTY_MAX_DIMENSION)
|
|
3951
3978
|
});
|
|
3952
|
-
var PtyAttachRequestSchema =
|
|
3953
|
-
sessionId:
|
|
3979
|
+
var PtyAttachRequestSchema = z32.object({
|
|
3980
|
+
sessionId: z32.string()
|
|
3954
3981
|
});
|
|
3955
|
-
var ReportPtyStreamRequestSchema =
|
|
3956
|
-
sessionId:
|
|
3957
|
-
port:
|
|
3982
|
+
var ReportPtyStreamRequestSchema = z32.object({
|
|
3983
|
+
sessionId: z32.string(),
|
|
3984
|
+
port: z32.number().int().positive().max(65535).nullable()
|
|
3958
3985
|
});
|
|
3959
|
-
var GetPtyStreamEndpointRequestSchema =
|
|
3960
|
-
sessionId:
|
|
3986
|
+
var GetPtyStreamEndpointRequestSchema = z32.object({
|
|
3987
|
+
sessionId: z32.string()
|
|
3961
3988
|
});
|
|
3962
|
-
var PtyChatEventPayloadSchema =
|
|
3963
|
-
|
|
3964
|
-
kind:
|
|
3965
|
-
model:
|
|
3966
|
-
claudeSessionId:
|
|
3989
|
+
var PtyChatEventPayloadSchema = z32.discriminatedUnion("kind", [
|
|
3990
|
+
z32.object({
|
|
3991
|
+
kind: z32.literal("init"),
|
|
3992
|
+
model: z32.string().max(200),
|
|
3993
|
+
claudeSessionId: z32.string().max(100).optional()
|
|
3967
3994
|
}),
|
|
3968
|
-
|
|
3969
|
-
kind:
|
|
3970
|
-
text:
|
|
3995
|
+
z32.object({
|
|
3996
|
+
kind: z32.literal("user_text"),
|
|
3997
|
+
text: z32.string().max(16384),
|
|
3971
3998
|
// Set by the SERVER (never the agent) when this prompt was injected by
|
|
3972
3999
|
// Conveyor rather than typed by a human — the routed message's `source`
|
|
3973
4000
|
// (`ci_success`, `review_trigger`, `automated_feedback`, …). The agent
|
|
@@ -3975,69 +4002,75 @@ var PtyChatEventPayloadSchema = z42.discriminatedUnion("kind", [
|
|
|
3975
4002
|
// CLI records both as plain transcript `user` records; without this the
|
|
3976
4003
|
// builder chat renders "All CI checks passed on your PR." as the human's
|
|
3977
4004
|
// own bubble. Absent ⇒ a genuine human prompt.
|
|
3978
|
-
source:
|
|
4005
|
+
source: z32.string().max(60).optional()
|
|
3979
4006
|
}),
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
kind:
|
|
3983
|
-
name:
|
|
4007
|
+
z32.object({ kind: z32.literal("assistant_text"), text: z32.string().max(16384) }),
|
|
4008
|
+
z32.object({
|
|
4009
|
+
kind: z32.literal("tool_use"),
|
|
4010
|
+
name: z32.string().max(200),
|
|
3984
4011
|
// Compact preview: JSON.stringify(input) truncated agent-side. The cap
|
|
3985
4012
|
// matches the text events because AskUserQuestion payloads ride this field
|
|
3986
4013
|
// and the web lifts them into an interactive card — a tight cap forced
|
|
3987
4014
|
// option descriptions down to 80 chars, making them unreadable. Every
|
|
3988
4015
|
// other tool keeps a far smaller agent-side budget (`TOOL_INPUT_MAX` in
|
|
3989
4016
|
// `chat-record-mapper.ts`), so the ring does not grow for normal calls.
|
|
3990
|
-
input:
|
|
4017
|
+
input: z32.string().max(16384),
|
|
3991
4018
|
// Transcript tool_use block id — lets the client pair the tool_result.
|
|
3992
|
-
id:
|
|
4019
|
+
id: z32.string().max(100).optional()
|
|
3993
4020
|
}),
|
|
3994
|
-
|
|
3995
|
-
kind:
|
|
4021
|
+
z32.object({
|
|
4022
|
+
kind: z32.literal("tool_result"),
|
|
3996
4023
|
// tool_use block id this result answers (absent on malformed records).
|
|
3997
|
-
toolUseId:
|
|
4024
|
+
toolUseId: z32.string().max(100).optional(),
|
|
3998
4025
|
// Compact output preview, truncated agent-side.
|
|
3999
|
-
output:
|
|
4000
|
-
isError:
|
|
4026
|
+
output: z32.string().max(2e3),
|
|
4027
|
+
isError: z32.boolean().optional()
|
|
4001
4028
|
}),
|
|
4002
|
-
|
|
4029
|
+
z32.object({ kind: z32.literal("turn_end") })
|
|
4003
4030
|
]);
|
|
4004
|
-
var PtyChatEventRequestSchema =
|
|
4005
|
-
sessionId:
|
|
4031
|
+
var PtyChatEventRequestSchema = z32.object({
|
|
4032
|
+
sessionId: z32.string(),
|
|
4006
4033
|
event: PtyChatEventPayloadSchema
|
|
4007
4034
|
});
|
|
4008
|
-
var PtyChatAttachRequestSchema =
|
|
4009
|
-
sessionId:
|
|
4035
|
+
var PtyChatAttachRequestSchema = z32.object({
|
|
4036
|
+
sessionId: z32.string()
|
|
4010
4037
|
});
|
|
4011
|
-
var CreatePRResponseSchema =
|
|
4012
|
-
prNumber:
|
|
4013
|
-
prUrl:
|
|
4038
|
+
var CreatePRResponseSchema = z32.object({
|
|
4039
|
+
prNumber: z32.number().int().positive(),
|
|
4040
|
+
prUrl: z32.string().url(),
|
|
4014
4041
|
/** Advisory glossary-upkeep note derived from the PR's changed files matched
|
|
4015
4042
|
* against tag contextPaths — rendered into the tool result, never stored. */
|
|
4016
|
-
glossaryNote:
|
|
4043
|
+
glossaryNote: z32.string().optional()
|
|
4017
4044
|
});
|
|
4018
|
-
var PostToChatResponseSchema =
|
|
4019
|
-
messageId:
|
|
4045
|
+
var PostToChatResponseSchema = z32.object({
|
|
4046
|
+
messageId: z32.string()
|
|
4020
4047
|
});
|
|
4021
|
-
var UpdateTaskStatusResponseSchema =
|
|
4022
|
-
taskId:
|
|
4023
|
-
status:
|
|
4048
|
+
var UpdateTaskStatusResponseSchema = z32.object({
|
|
4049
|
+
taskId: z32.string(),
|
|
4050
|
+
status: z32.string()
|
|
4024
4051
|
});
|
|
4025
|
-
var StoreSessionIdResponseSchema =
|
|
4026
|
-
success:
|
|
4052
|
+
var StoreSessionIdResponseSchema = z32.object({
|
|
4053
|
+
success: z32.boolean()
|
|
4027
4054
|
});
|
|
4028
|
-
var HeartbeatResponseSchema =
|
|
4029
|
-
acknowledged:
|
|
4055
|
+
var HeartbeatResponseSchema = z32.object({
|
|
4056
|
+
acknowledged: z32.boolean()
|
|
4030
4057
|
});
|
|
4031
|
-
var SessionStartResponseSchema =
|
|
4032
|
-
sessionId:
|
|
4033
|
-
startedAt:
|
|
4058
|
+
var SessionStartResponseSchema = z32.object({
|
|
4059
|
+
sessionId: z32.string(),
|
|
4060
|
+
startedAt: z32.string()
|
|
4034
4061
|
});
|
|
4035
|
-
var SessionStopResponseSchema =
|
|
4036
|
-
sessionId:
|
|
4037
|
-
stoppedAt:
|
|
4062
|
+
var SessionStopResponseSchema = z32.object({
|
|
4063
|
+
sessionId: z32.string(),
|
|
4064
|
+
stoppedAt: z32.string()
|
|
4065
|
+
});
|
|
4066
|
+
var DeleteSubtaskResponseSchema = z32.object({
|
|
4067
|
+
deleted: z32.boolean()
|
|
4038
4068
|
});
|
|
4039
|
-
var
|
|
4040
|
-
|
|
4069
|
+
var ParkOnCheckResultRequestSchema = z42.object({
|
|
4070
|
+
sessionId: z42.string(),
|
|
4071
|
+
sha: z42.string().regex(/^[0-9a-f]{7,40}$/i).optional(),
|
|
4072
|
+
prNumber: z42.number().int().positive().optional(),
|
|
4073
|
+
timeoutMinutes: z42.number().int().min(1).max(MAX_CI_WAIT_TIMEOUT_MINUTES).optional()
|
|
4041
4074
|
});
|
|
4042
4075
|
var GIT_BRANCH_NAME_MAX = 255;
|
|
4043
4076
|
var GIT_BRANCH_NAME_MESSAGE = "Invalid git branch name \u2014 use only letters, numbers, '.', '_', '/' and '-', starting with a letter or number, with no '..', '@{' or '//', and no trailing '/', '-', '.' or '.lock'";
|
|
@@ -4330,6 +4363,7 @@ var ListProjectSessionGroupsRequestSchema = z52.object({
|
|
|
4330
4363
|
projectId: z52.string()
|
|
4331
4364
|
});
|
|
4332
4365
|
var ListMyLiveSessionsAcrossProjectsRequestSchema = z52.object({});
|
|
4366
|
+
var ListSessionGroupsAcrossProjectsRequestSchema = z52.object({});
|
|
4333
4367
|
var GetProjectAvailableTuisRequestSchema = z52.object({
|
|
4334
4368
|
projectId: z52.string()
|
|
4335
4369
|
});
|
|
@@ -4772,129 +4806,129 @@ var MEETING_TITLE_MAX = 200;
|
|
|
4772
4806
|
var MEETING_OCCURRED_AT_MIN_YEAR = 2e3;
|
|
4773
4807
|
var MEETING_OCCURRED_AT_MAX_FUTURE_MS = 48 * 60 * 60 * 1e3;
|
|
4774
4808
|
var OCCURRED_AT_RANGE_MESSAGE = `occurredAt must be a real date: no earlier than ${MEETING_OCCURRED_AT_MIN_YEAR}, and no more than 48 hours in the future.`;
|
|
4775
|
-
var MeetingOccurredAtSchema =
|
|
4809
|
+
var MeetingOccurredAtSchema = z102.string().datetime().refine((value) => {
|
|
4776
4810
|
const ms = Date.parse(value);
|
|
4777
4811
|
if (Number.isNaN(ms)) return false;
|
|
4778
4812
|
if (ms > Date.now() + MEETING_OCCURRED_AT_MAX_FUTURE_MS) return false;
|
|
4779
4813
|
return new Date(ms).getUTCFullYear() >= MEETING_OCCURRED_AT_MIN_YEAR;
|
|
4780
4814
|
}, OCCURRED_AT_RANGE_MESSAGE);
|
|
4781
|
-
var CreateMeetingFromTranscriptRequestSchema =
|
|
4782
|
-
projectId:
|
|
4783
|
-
rawText:
|
|
4784
|
-
title:
|
|
4815
|
+
var CreateMeetingFromTranscriptRequestSchema = z102.object({
|
|
4816
|
+
projectId: z102.string().cuid(),
|
|
4817
|
+
rawText: z102.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
4818
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4785
4819
|
/** ISO 8601. Defaults to now when the source carries no date. */
|
|
4786
4820
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4787
4821
|
/** Override auto-detection. Rarely needed; detection handles the three formats. */
|
|
4788
|
-
format:
|
|
4789
|
-
source:
|
|
4822
|
+
format: z102.enum(["text", "vtt", "srt"]).optional(),
|
|
4823
|
+
source: z102.enum(["manual", "slack"]).optional()
|
|
4790
4824
|
});
|
|
4791
|
-
var GetMeetingRequestSchema =
|
|
4792
|
-
projectId:
|
|
4793
|
-
meetingId:
|
|
4825
|
+
var GetMeetingRequestSchema = z102.object({
|
|
4826
|
+
projectId: z102.string().cuid(),
|
|
4827
|
+
meetingId: z102.string().cuid()
|
|
4794
4828
|
});
|
|
4795
|
-
var UpdateMeetingRequestSchema =
|
|
4796
|
-
projectId:
|
|
4797
|
-
meetingId:
|
|
4798
|
-
title:
|
|
4829
|
+
var UpdateMeetingRequestSchema = z102.object({
|
|
4830
|
+
projectId: z102.string().cuid(),
|
|
4831
|
+
meetingId: z102.string().cuid(),
|
|
4832
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4799
4833
|
occurredAt: MeetingOccurredAtSchema.optional()
|
|
4800
4834
|
});
|
|
4801
|
-
var RegenerateMeetingSummaryRequestSchema =
|
|
4802
|
-
projectId:
|
|
4803
|
-
meetingId:
|
|
4835
|
+
var RegenerateMeetingSummaryRequestSchema = z102.object({
|
|
4836
|
+
projectId: z102.string().cuid(),
|
|
4837
|
+
meetingId: z102.string().cuid()
|
|
4804
4838
|
});
|
|
4805
|
-
var DeleteMeetingRequestSchema =
|
|
4806
|
-
projectId:
|
|
4807
|
-
meetingId:
|
|
4839
|
+
var DeleteMeetingRequestSchema = z102.object({
|
|
4840
|
+
projectId: z102.string().cuid(),
|
|
4841
|
+
meetingId: z102.string().cuid()
|
|
4808
4842
|
});
|
|
4809
|
-
var checklistTitle =
|
|
4810
|
-
var ListMeetingChecklistRequestSchema =
|
|
4811
|
-
projectId:
|
|
4812
|
-
meetingId:
|
|
4843
|
+
var checklistTitle = z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
|
|
4844
|
+
var ListMeetingChecklistRequestSchema = z102.object({
|
|
4845
|
+
projectId: z102.string().cuid(),
|
|
4846
|
+
meetingId: z102.string().cuid()
|
|
4813
4847
|
});
|
|
4814
|
-
var AddMeetingChecklistItemsRequestSchema =
|
|
4815
|
-
projectId:
|
|
4816
|
-
meetingId:
|
|
4817
|
-
items:
|
|
4848
|
+
var AddMeetingChecklistItemsRequestSchema = z102.object({
|
|
4849
|
+
projectId: z102.string().cuid(),
|
|
4850
|
+
meetingId: z102.string().cuid(),
|
|
4851
|
+
items: z102.array(z102.object({ title: checklistTitle })).min(1).max(50)
|
|
4818
4852
|
});
|
|
4819
|
-
var UpdateMeetingChecklistItemRequestSchema =
|
|
4820
|
-
projectId:
|
|
4821
|
-
meetingId:
|
|
4822
|
-
itemId:
|
|
4853
|
+
var UpdateMeetingChecklistItemRequestSchema = z102.object({
|
|
4854
|
+
projectId: z102.string().cuid(),
|
|
4855
|
+
meetingId: z102.string().cuid(),
|
|
4856
|
+
itemId: z102.string().cuid(),
|
|
4823
4857
|
title: checklistTitle.optional(),
|
|
4824
|
-
ordinal:
|
|
4858
|
+
ordinal: z102.number().int().min(0).optional(),
|
|
4825
4859
|
/** Explicit null clears the link; undefined leaves it alone. */
|
|
4826
|
-
linkedTaskId:
|
|
4860
|
+
linkedTaskId: z102.string().cuid().nullable().optional()
|
|
4827
4861
|
}).refine(
|
|
4828
4862
|
(v) => v.title !== void 0 || v.ordinal !== void 0 || v.linkedTaskId !== void 0,
|
|
4829
4863
|
"Pass at least one of title, ordinal, or linkedTaskId."
|
|
4830
4864
|
);
|
|
4831
|
-
var DeleteMeetingChecklistItemRequestSchema =
|
|
4832
|
-
projectId:
|
|
4833
|
-
meetingId:
|
|
4834
|
-
itemId:
|
|
4835
|
-
});
|
|
4836
|
-
var SetMeetingChecklistItemCheckedRequestSchema =
|
|
4837
|
-
projectId:
|
|
4838
|
-
meetingId:
|
|
4839
|
-
itemId:
|
|
4840
|
-
checked:
|
|
4865
|
+
var DeleteMeetingChecklistItemRequestSchema = z102.object({
|
|
4866
|
+
projectId: z102.string().cuid(),
|
|
4867
|
+
meetingId: z102.string().cuid(),
|
|
4868
|
+
itemId: z102.string().cuid()
|
|
4869
|
+
});
|
|
4870
|
+
var SetMeetingChecklistItemCheckedRequestSchema = z102.object({
|
|
4871
|
+
projectId: z102.string().cuid(),
|
|
4872
|
+
meetingId: z102.string().cuid(),
|
|
4873
|
+
itemId: z102.string().cuid(),
|
|
4874
|
+
checked: z102.boolean(),
|
|
4841
4875
|
/** Attach the card in the same call that ticks the item. */
|
|
4842
|
-
linkedTaskId:
|
|
4876
|
+
linkedTaskId: z102.string().cuid().nullable().optional()
|
|
4843
4877
|
});
|
|
4844
|
-
var ListMeetingsRequestSchema =
|
|
4845
|
-
projectId:
|
|
4846
|
-
limit:
|
|
4847
|
-
search:
|
|
4878
|
+
var ListMeetingsRequestSchema = z102.object({
|
|
4879
|
+
projectId: z102.string().cuid(),
|
|
4880
|
+
limit: z102.number().int().min(1).max(50).optional(),
|
|
4881
|
+
search: z102.string().max(200).optional()
|
|
4848
4882
|
});
|
|
4849
|
-
var ReadMeetingTranscriptRequestSchema =
|
|
4850
|
-
projectId:
|
|
4851
|
-
meetingId:
|
|
4852
|
-
offset:
|
|
4853
|
-
limit:
|
|
4883
|
+
var ReadMeetingTranscriptRequestSchema = z102.object({
|
|
4884
|
+
projectId: z102.string().cuid(),
|
|
4885
|
+
meetingId: z102.string().cuid(),
|
|
4886
|
+
offset: z102.number().int().min(0).optional(),
|
|
4887
|
+
limit: z102.number().int().min(1).max(500).optional()
|
|
4854
4888
|
});
|
|
4855
4889
|
var MEETING_SUMMARY_MAX_CHARS = 5e4;
|
|
4856
|
-
var AddProjectMeetingChecklistItemsRequestSchema =
|
|
4857
|
-
projectId:
|
|
4858
|
-
meetingId:
|
|
4859
|
-
items:
|
|
4860
|
-
requestingUserId:
|
|
4861
|
-
});
|
|
4862
|
-
var CheckProjectMeetingChecklistItemRequestSchema =
|
|
4863
|
-
projectId:
|
|
4864
|
-
meetingId:
|
|
4865
|
-
title:
|
|
4866
|
-
checked:
|
|
4890
|
+
var AddProjectMeetingChecklistItemsRequestSchema = z102.object({
|
|
4891
|
+
projectId: z102.string().cuid(),
|
|
4892
|
+
meetingId: z102.string().cuid(),
|
|
4893
|
+
items: z102.array(z102.object({ title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
|
|
4894
|
+
requestingUserId: z102.string().optional()
|
|
4895
|
+
});
|
|
4896
|
+
var CheckProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4897
|
+
projectId: z102.string().cuid(),
|
|
4898
|
+
meetingId: z102.string().cuid(),
|
|
4899
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4900
|
+
checked: z102.boolean(),
|
|
4867
4901
|
/** Card id or slug. Resolved server-side and required to be in the project. */
|
|
4868
|
-
linkedTask:
|
|
4869
|
-
requestingUserId:
|
|
4870
|
-
});
|
|
4871
|
-
var EditProjectMeetingChecklistItemRequestSchema =
|
|
4872
|
-
projectId:
|
|
4873
|
-
meetingId:
|
|
4874
|
-
title:
|
|
4875
|
-
newTitle:
|
|
4876
|
-
requestingUserId:
|
|
4877
|
-
});
|
|
4878
|
-
var RemoveProjectMeetingChecklistItemRequestSchema =
|
|
4879
|
-
projectId:
|
|
4880
|
-
meetingId:
|
|
4881
|
-
title:
|
|
4882
|
-
requestingUserId:
|
|
4883
|
-
});
|
|
4884
|
-
var CreateProjectMeetingRequestSchema =
|
|
4885
|
-
projectId:
|
|
4886
|
-
rawText:
|
|
4887
|
-
title:
|
|
4902
|
+
linkedTask: z102.string().min(1).optional(),
|
|
4903
|
+
requestingUserId: z102.string().optional()
|
|
4904
|
+
});
|
|
4905
|
+
var EditProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4906
|
+
projectId: z102.string().cuid(),
|
|
4907
|
+
meetingId: z102.string().cuid(),
|
|
4908
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4909
|
+
newTitle: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4910
|
+
requestingUserId: z102.string().optional()
|
|
4911
|
+
});
|
|
4912
|
+
var RemoveProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4913
|
+
projectId: z102.string().cuid(),
|
|
4914
|
+
meetingId: z102.string().cuid(),
|
|
4915
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4916
|
+
requestingUserId: z102.string().optional()
|
|
4917
|
+
});
|
|
4918
|
+
var CreateProjectMeetingRequestSchema = z102.object({
|
|
4919
|
+
projectId: z102.string().cuid(),
|
|
4920
|
+
rawText: z102.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
4921
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4888
4922
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4889
|
-
requestingUserId:
|
|
4923
|
+
requestingUserId: z102.string().optional()
|
|
4890
4924
|
});
|
|
4891
|
-
var UpdateProjectMeetingRequestSchema =
|
|
4892
|
-
projectId:
|
|
4893
|
-
meetingId:
|
|
4894
|
-
title:
|
|
4925
|
+
var UpdateProjectMeetingRequestSchema = z102.object({
|
|
4926
|
+
projectId: z102.string().cuid(),
|
|
4927
|
+
meetingId: z102.string().cuid(),
|
|
4928
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4895
4929
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4896
|
-
summary:
|
|
4897
|
-
requestingUserId:
|
|
4930
|
+
summary: z102.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
|
|
4931
|
+
requestingUserId: z102.string().optional()
|
|
4898
4932
|
}).refine(
|
|
4899
4933
|
(v) => v.title !== void 0 || v.occurredAt !== void 0 || v.summary !== void 0,
|
|
4900
4934
|
"Pass at least one of title, occurredAt, or summary."
|
|
@@ -4991,11 +5025,13 @@ var CATALOG = {
|
|
|
4991
5025
|
// CPU: the request is the CFS floor; the old 50m starved postgres to 5ms
|
|
4992
5026
|
// of CPU per 100ms period — every query burst hit throttle stalls, which
|
|
4993
5027
|
// showed up as ~100ms floors on trivial statements and dominated the API
|
|
4994
|
-
// int suite even after the fsync flags above.
|
|
4995
|
-
//
|
|
4996
|
-
//
|
|
4997
|
-
//
|
|
4998
|
-
|
|
5028
|
+
// int suite even after the fsync flags above. 250m is paid for out of the
|
|
5029
|
+
// workbench's derived share (resource-tiers.ts); measured across the fleet
|
|
5030
|
+
// postgres peaks at 0.66 cores and idles far below 250m, and the limit
|
|
5031
|
+
// (unchanged at 2) is what serves the peaks: the first-boot pod-data seed
|
|
5032
|
+
// copy and int-suite query storms borrow idle node CPU without moving the
|
|
5033
|
+
// request.
|
|
5034
|
+
requests: { cpuMillicores: 250, memoryMi: 512, ephemeralMi: 3 * 1024 },
|
|
4999
5035
|
limits: { cpuMillicores: 2e3, memoryMi: 512, ephemeralMi: 3 * 1024 }
|
|
5000
5036
|
},
|
|
5001
5037
|
connectionEnv: {
|
|
@@ -5049,6 +5085,10 @@ var CATALOG = {
|
|
|
5049
5085
|
// rejects (media_type_header_exception), breaking search/audit indexing
|
|
5050
5086
|
// in pods. 512m heap matches the project compose sizing.
|
|
5051
5087
|
image: "docker.elastic.co/elasticsearch/elasticsearch:9.4.0",
|
|
5088
|
+
mirror: {
|
|
5089
|
+
src: "docker.elastic.co/elasticsearch/elasticsearch:9.4.0",
|
|
5090
|
+
dest: "mirror-elasticsearch:9.4.0"
|
|
5091
|
+
},
|
|
5052
5092
|
ports: [9200],
|
|
5053
5093
|
// Baked service images are `docker commit`s of a recently-running ES, so
|
|
5054
5094
|
// they carry a stale data-dir node.lock; ES 9 hard-fails on it at boot
|
|
@@ -5072,14 +5112,16 @@ var CATALOG = {
|
|
|
5072
5112
|
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
|
|
5073
5113
|
},
|
|
5074
5114
|
resources: {
|
|
5075
|
-
// CPU limit
|
|
5115
|
+
// CPU limit 8x the request: ES cold-start is a CPU-bound JVM boot
|
|
5076
5116
|
// (class loading + JIT + recovery of the docker-commit'ed data dir),
|
|
5077
|
-
// and
|
|
5117
|
+
// and a 500m hard cap put it at ~135s to yellow, past the sidecar
|
|
5078
5118
|
// wait script's original 90s budget. Bursting to 2 cut it to ~40s on
|
|
5079
5119
|
// the real cluster (A/B on identical nodes, 2 rounds). The burst only
|
|
5080
5120
|
// borrows idle node CPU at boot; under contention CFS still floors ES
|
|
5081
|
-
// at its
|
|
5082
|
-
|
|
5121
|
+
// at its request. That request is 250m: the fleet-wide peak is 1.6
|
|
5122
|
+
// cores (served by the limit) and steady state is far below 250m, so
|
|
5123
|
+
// the old 500m only inflated the billed pod total.
|
|
5124
|
+
requests: { cpuMillicores: 250, memoryMi: 1024, ephemeralMi: 256 },
|
|
5083
5125
|
limits: { cpuMillicores: 2e3, memoryMi: 1024, ephemeralMi: 256 }
|
|
5084
5126
|
},
|
|
5085
5127
|
connectionEnv: {
|
|
@@ -5131,6 +5173,10 @@ var CATALOG = {
|
|
|
5131
5173
|
resources: {
|
|
5132
5174
|
// Autopilot caps the ephemeral-storage limit to the request (see the
|
|
5133
5175
|
// postgresql note), so the 1Gi headroom must be on the request too.
|
|
5176
|
+
// CPU: the collector draws ~0.3 cores at idle fleet-wide, so the request
|
|
5177
|
+
// stays at 250m to cover that draw under node contention (a request
|
|
5178
|
+
// below usage is a container CFS throttles continuously); the 1-core
|
|
5179
|
+
// limit covers ingest bursts.
|
|
5134
5180
|
requests: { cpuMillicores: 250, memoryMi: 1024, ephemeralMi: 1024 },
|
|
5135
5181
|
limits: { cpuMillicores: 1e3, memoryMi: 2048, ephemeralMi: 1024 }
|
|
5136
5182
|
},
|
|
@@ -5454,11 +5500,5 @@ var server = new McpServer({
|
|
|
5454
5500
|
registerAllTools(server, conn);
|
|
5455
5501
|
var transport = new StdioServerTransport();
|
|
5456
5502
|
await server.connect(transport);
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
process.exit(0);
|
|
5460
|
-
});
|
|
5461
|
-
process.on("SIGTERM", () => {
|
|
5462
|
-
conn.disconnect();
|
|
5463
|
-
process.exit(0);
|
|
5464
|
-
});
|
|
5503
|
+
var stop = installLifecycle(conn);
|
|
5504
|
+
server.server.onclose = () => stop();
|