@rallycry/conveyor-mcp 5.0.2 → 5.0.3
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/dist/cli.js +883 -840
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -67,12 +67,84 @@ function registerProjectTools(server2, conn2) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// src/tools/connection.ts
|
|
70
|
-
import { z as
|
|
70
|
+
import { z as z4 } from "zod";
|
|
71
71
|
|
|
72
|
-
// ../shared/dist/chunk-
|
|
72
|
+
// ../shared/dist/chunk-42BS7Y35.js
|
|
73
|
+
import { z as z2 } from "zod";
|
|
74
|
+
var DEFAULT_SONNET_MODEL = "claude-sonnet-5";
|
|
75
|
+
var DEFAULT_OPUS_MODEL = "claude-opus-5";
|
|
76
|
+
var DEFAULT_HAIKU_MODEL = "claude-haiku-4-5-20251001";
|
|
77
|
+
var FABLE_MODEL = "claude-fable-5-1";
|
|
78
|
+
var PREVIOUS_SONNET_MODEL = "claude-sonnet-4-6";
|
|
79
|
+
var PREVIOUS_OPUS_MODEL = "claude-opus-4-8";
|
|
80
|
+
var PTY_STREAM_PORT_BASE = 7420;
|
|
81
|
+
var PTY_STREAM_PORT_ATTEMPTS = 8;
|
|
82
|
+
var PREVIEW_PORT_DENY_LIST = [
|
|
83
|
+
5432,
|
|
84
|
+
6379,
|
|
85
|
+
9200,
|
|
86
|
+
...Array.from({ length: PTY_STREAM_PORT_ATTEMPTS }, (_, i) => PTY_STREAM_PORT_BASE + i)
|
|
87
|
+
];
|
|
88
|
+
function normalizeCheckpointPath(value) {
|
|
89
|
+
let normalized = value.trim().replace(/\/{2,}/g, "/");
|
|
90
|
+
normalized = normalized.split("/").filter((segment) => segment !== ".").join("/");
|
|
91
|
+
while (normalized.endsWith("/")) normalized = normalized.slice(0, -1);
|
|
92
|
+
return normalized;
|
|
93
|
+
}
|
|
94
|
+
var checkpointPathSchema = z2.string().transform(normalizeCheckpointPath).pipe(
|
|
95
|
+
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(
|
|
96
|
+
(value) => !/^[A-Za-z]:[\\/]/.test(value) && !value.includes("\\"),
|
|
97
|
+
"Checkpoint paths must use repository-relative POSIX syntax"
|
|
98
|
+
).refine(
|
|
99
|
+
(value) => !value.split("/").includes(".."),
|
|
100
|
+
"Checkpoint paths must not traverse a parent directory"
|
|
101
|
+
)
|
|
102
|
+
);
|
|
103
|
+
var secretNameSchema = z2.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);
|
|
104
|
+
var checkpointKeySchema = z2.string().regex(/^[0-9a-f]{64}$/);
|
|
105
|
+
var checkpointDigestRefSchema = z2.string().regex(/^[^\s@]+@sha256:[0-9a-f]{64}$/);
|
|
106
|
+
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]+)*)*$/;
|
|
107
|
+
var actionsPrebakeRegistrySchema = z2.string().trim().min(1).regex(
|
|
108
|
+
ACTIONS_PREBAKE_REGISTRY_PATTERN,
|
|
109
|
+
"Actions prebake registry must be a lowercase host[:port] with an optional path prefix"
|
|
110
|
+
).refine((value) => {
|
|
111
|
+
const port = /:([0-9]+)(?:\/|$)/.exec(value)?.[1];
|
|
112
|
+
return !port || Number(port) <= 65535;
|
|
113
|
+
}, "Actions prebake registry port must be between 1 and 65535");
|
|
114
|
+
function uniqueSortedArray(item, minimum = 0) {
|
|
115
|
+
return z2.array(item).min(minimum).superRefine((values, ctx) => {
|
|
116
|
+
if (new Set(values).size !== values.length) {
|
|
117
|
+
ctx.addIssue({ code: z2.ZodIssueCode.custom, message: "Duplicate values are not allowed" });
|
|
118
|
+
}
|
|
119
|
+
}).transform((values) => [...values].sort());
|
|
120
|
+
}
|
|
121
|
+
var projectCheckpointSettingsSchema = z2.object({
|
|
122
|
+
enabled: z2.literal(true),
|
|
123
|
+
cacheCommand: z2.string().trim().min(1),
|
|
124
|
+
cacheInputPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
125
|
+
reusableArtifactPaths: uniqueSortedArray(checkpointPathSchema, 1),
|
|
126
|
+
finalizeCommand: z2.string().trim().min(1),
|
|
127
|
+
credentialEpoch: z2.string().trim().min(1),
|
|
128
|
+
requiredSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
129
|
+
optionalSecretNames: uniqueSortedArray(secretNameSchema).optional(),
|
|
130
|
+
bakeWebAppBuild: z2.boolean().optional()
|
|
131
|
+
}).superRefine((checkpoint, ctx) => {
|
|
132
|
+
const required = new Set(checkpoint.requiredSecretNames ?? []);
|
|
133
|
+
for (const name of checkpoint.optionalSecretNames ?? []) {
|
|
134
|
+
if (required.has(name)) {
|
|
135
|
+
ctx.addIssue({
|
|
136
|
+
code: z2.ZodIssueCode.custom,
|
|
137
|
+
path: ["optionalSecretNames"],
|
|
138
|
+
message: "A secret cannot be both required and optional"
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});
|
|
73
143
|
var CARD_DESCRIPTION_MAX = 255;
|
|
74
144
|
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
145
|
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`;
|
|
146
|
+
var DEFAULT_CI_WAIT_TIMEOUT_MINUTES = 45;
|
|
147
|
+
var MAX_CI_WAIT_TIMEOUT_MINUTES = 180;
|
|
76
148
|
var SEVERITY_ENUM = [
|
|
77
149
|
"DEBUG",
|
|
78
150
|
"INFO",
|
|
@@ -337,7 +409,7 @@ var postToChatContract = defineToolContract({
|
|
|
337
409
|
),
|
|
338
410
|
milestone: f.optional(
|
|
339
411
|
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."
|
|
412
|
+
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
413
|
})
|
|
342
414
|
)
|
|
343
415
|
}
|
|
@@ -457,25 +529,6 @@ var searchTasksContract = defineToolContract({
|
|
|
457
529
|
}
|
|
458
530
|
}
|
|
459
531
|
});
|
|
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
532
|
var getConnectionContextContract = defineToolContract({
|
|
480
533
|
name: "get_connection_context",
|
|
481
534
|
agent: {
|
|
@@ -495,7 +548,6 @@ var tasksContracts = [
|
|
|
495
548
|
readTaskChatContract,
|
|
496
549
|
listTagsContract,
|
|
497
550
|
searchTasksContract,
|
|
498
|
-
approveAndMergePrContract,
|
|
499
551
|
getConnectionContextContract
|
|
500
552
|
];
|
|
501
553
|
var STATUS_ENUM = [
|
|
@@ -886,12 +938,12 @@ var updateSubtaskContract = defineToolContract({
|
|
|
886
938
|
plan: f.optional(f.string()),
|
|
887
939
|
status: f.optional(
|
|
888
940
|
f.enum(["Planning", "Open"], {
|
|
889
|
-
desc: 'Move the child between "Planning" and "Open". "Open" marks it ready to execute \u2014
|
|
941
|
+
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
942
|
})
|
|
891
943
|
),
|
|
892
944
|
agentIdOrName: f.optional(
|
|
893
945
|
f.string({
|
|
894
|
-
desc: "Assign a project agent to the child (agent id or exact name from the Project Agents list).
|
|
946
|
+
desc: "Assign a project agent to the child (agent id or exact name from the Project Agents list)."
|
|
895
947
|
})
|
|
896
948
|
),
|
|
897
949
|
ordinal: f.optional(f.number()),
|
|
@@ -943,7 +995,7 @@ var deleteSubtaskContract = defineToolContract({
|
|
|
943
995
|
var listSubtasksContract = defineToolContract({
|
|
944
996
|
name: "list_subtasks",
|
|
945
997
|
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
|
|
998
|
+
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
999
|
fields: {
|
|
948
1000
|
verbose: f.optional(
|
|
949
1001
|
f.boolean({
|
|
@@ -1720,6 +1772,50 @@ var logsContracts = [
|
|
|
1720
1772
|
queryGcpLogsContract,
|
|
1721
1773
|
queryGrafanaLogsContract
|
|
1722
1774
|
];
|
|
1775
|
+
var SHA = f.optional(
|
|
1776
|
+
f.string({
|
|
1777
|
+
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.",
|
|
1778
|
+
min: 7,
|
|
1779
|
+
max: 40
|
|
1780
|
+
})
|
|
1781
|
+
);
|
|
1782
|
+
var PR_NUMBER = f.optional(
|
|
1783
|
+
f.number({
|
|
1784
|
+
desc: "PR number whose current head to watch. Use this for a child's PR when orchestrating a pack.",
|
|
1785
|
+
int: true,
|
|
1786
|
+
positive: true
|
|
1787
|
+
})
|
|
1788
|
+
);
|
|
1789
|
+
var TIMEOUT_MINUTES = f.optional(
|
|
1790
|
+
f.number({
|
|
1791
|
+
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.`,
|
|
1792
|
+
int: true,
|
|
1793
|
+
min: 1,
|
|
1794
|
+
max: MAX_CI_WAIT_TIMEOUT_MINUTES
|
|
1795
|
+
})
|
|
1796
|
+
);
|
|
1797
|
+
var waitForChecksContract = defineToolContract({
|
|
1798
|
+
name: "wait_for_checks",
|
|
1799
|
+
agent: {
|
|
1800
|
+
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.",
|
|
1801
|
+
fields: {
|
|
1802
|
+
sha: SHA,
|
|
1803
|
+
prNumber: PR_NUMBER,
|
|
1804
|
+
timeoutMinutes: TIMEOUT_MINUTES
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
mcp: {
|
|
1808
|
+
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.",
|
|
1809
|
+
fields: {
|
|
1810
|
+
projectId: mcpProjectId,
|
|
1811
|
+
taskId: f.string({ desc: "The task whose agent session should wait" }),
|
|
1812
|
+
sha: SHA,
|
|
1813
|
+
prNumber: PR_NUMBER,
|
|
1814
|
+
timeoutMinutes: TIMEOUT_MINUTES
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
});
|
|
1818
|
+
var ciWaitContracts = [waitForChecksContract];
|
|
1723
1819
|
var TOOL_CONTRACTS = Object.fromEntries(
|
|
1724
1820
|
[
|
|
1725
1821
|
...tasksContracts,
|
|
@@ -1734,14 +1830,15 @@ var TOOL_CONTRACTS = Object.fromEntries(
|
|
|
1734
1830
|
...integrationsContracts,
|
|
1735
1831
|
...driveContracts,
|
|
1736
1832
|
...meetingsContracts,
|
|
1737
|
-
...logsContracts
|
|
1833
|
+
...logsContracts,
|
|
1834
|
+
...ciWaitContracts
|
|
1738
1835
|
].map((contract) => [contract.name, contract])
|
|
1739
1836
|
);
|
|
1740
1837
|
|
|
1741
1838
|
// src/tools/contract-tool.ts
|
|
1742
|
-
import { z as
|
|
1839
|
+
import { z as z3 } from "zod";
|
|
1743
1840
|
function mcpShape(surface) {
|
|
1744
|
-
return compileShape(
|
|
1841
|
+
return compileShape(z3, surface.fields);
|
|
1745
1842
|
}
|
|
1746
1843
|
function registerContractTool(server2, contract, handler, options) {
|
|
1747
1844
|
if (options?.alwaysLoad) {
|
|
@@ -1784,8 +1881,8 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1784
1881
|
"verify_connection",
|
|
1785
1882
|
"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
1883
|
{
|
|
1787
|
-
projectId:
|
|
1788
|
-
intendedActions:
|
|
1884
|
+
projectId: z4.string().optional().describe("Target Conveyor project ID"),
|
|
1885
|
+
intendedActions: z4.array(z4.enum(CAPABILITY_ENUM)).optional().describe(
|
|
1789
1886
|
"Capabilities to verify the connection can perform (default: read, create, update)."
|
|
1790
1887
|
)
|
|
1791
1888
|
},
|
|
@@ -1798,7 +1895,7 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1798
1895
|
"list_accessible_subprojects",
|
|
1799
1896
|
"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
1897
|
{
|
|
1801
|
-
projectId:
|
|
1898
|
+
projectId: z4.string().optional().describe("Target Conveyor project ID")
|
|
1802
1899
|
},
|
|
1803
1900
|
async (params) => {
|
|
1804
1901
|
const subprojects = await conn2.listAccessibleSubprojects(params.projectId);
|
|
@@ -1808,7 +1905,7 @@ function registerConnectionTools(server2, conn2) {
|
|
|
1808
1905
|
}
|
|
1809
1906
|
|
|
1810
1907
|
// src/tools/project-config.ts
|
|
1811
|
-
import { z as
|
|
1908
|
+
import { z as z5 } from "zod";
|
|
1812
1909
|
var CONTEXT_LINK_LOCATOR_MAX = 300;
|
|
1813
1910
|
function jsonResult(data) {
|
|
1814
1911
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
@@ -1827,7 +1924,7 @@ function registerGetConnectUrls(server2, conn2) {
|
|
|
1827
1924
|
"get_connect_urls",
|
|
1828
1925
|
"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
1926
|
{
|
|
1830
|
-
projectId:
|
|
1927
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID")
|
|
1831
1928
|
},
|
|
1832
1929
|
async (params) => jsonResult(await conn2.getConnectUrls(params.projectId))
|
|
1833
1930
|
);
|
|
@@ -1837,16 +1934,16 @@ function registerUpdateProjectSettings(server2, conn2) {
|
|
|
1837
1934
|
"update_project_settings",
|
|
1838
1935
|
"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
1936
|
{
|
|
1840
|
-
projectId:
|
|
1841
|
-
name:
|
|
1842
|
-
description:
|
|
1843
|
-
settings:
|
|
1937
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID"),
|
|
1938
|
+
name: z5.string().optional().describe("New project name"),
|
|
1939
|
+
description: z5.string().optional().describe("New project description"),
|
|
1940
|
+
settings: z5.record(z5.string(), z5.unknown()).optional().describe(
|
|
1844
1941
|
"Deep-merged patch of the project settings JSON (JSON Merge Patch semantics: null deletes a key; advanced)"
|
|
1845
1942
|
),
|
|
1846
|
-
defaultPmAgentId:
|
|
1847
|
-
defaultTaskAgentId:
|
|
1848
|
-
defaultReviewerAgentId:
|
|
1849
|
-
helperAgentId:
|
|
1943
|
+
defaultPmAgentId: z5.string().nullable().optional().describe("Default PM agent ID"),
|
|
1944
|
+
defaultTaskAgentId: z5.string().nullable().optional().describe("Default task agent ID"),
|
|
1945
|
+
defaultReviewerAgentId: z5.string().nullable().optional().describe("Default reviewer agent ID"),
|
|
1946
|
+
helperAgentId: z5.string().nullable().optional().describe("Helper agent ID")
|
|
1850
1947
|
},
|
|
1851
1948
|
async (params) => {
|
|
1852
1949
|
const { projectId: projectId2, name, description, settings, ...agents } = params;
|
|
@@ -1870,16 +1967,16 @@ function registerUpdateProjectSettings(server2, conn2) {
|
|
|
1870
1967
|
}
|
|
1871
1968
|
);
|
|
1872
1969
|
}
|
|
1873
|
-
var contextPathSchema =
|
|
1874
|
-
type:
|
|
1970
|
+
var contextPathSchema = z5.object({
|
|
1971
|
+
type: z5.enum(["rule", "doc", "file", "folder"]).describe(
|
|
1875
1972
|
"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
1973
|
),
|
|
1877
|
-
path:
|
|
1878
|
-
label:
|
|
1879
|
-
locator:
|
|
1974
|
+
path: z5.string().describe("Repo-relative path, e.g. '.claude/rules/refactor-verification.md'"),
|
|
1975
|
+
label: z5.string().optional().describe("Optional human-readable label for the link"),
|
|
1976
|
+
locator: z5.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional().describe(
|
|
1880
1977
|
'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
1978
|
),
|
|
1882
|
-
locatorType:
|
|
1979
|
+
locatorType: z5.enum(["test", "code"]).optional().describe(
|
|
1883
1980
|
"How the locator must match \u2014 required iff locator is set; not valid on folder links"
|
|
1884
1981
|
)
|
|
1885
1982
|
}).refine((link) => link.locator === void 0 === (link.locatorType === void 0), {
|
|
@@ -1889,24 +1986,24 @@ var contextPathSchema = z4.object({
|
|
|
1889
1986
|
});
|
|
1890
1987
|
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
1988
|
var MANAGE_TAGS_SHAPE = {
|
|
1892
|
-
action:
|
|
1893
|
-
projectId:
|
|
1894
|
-
id:
|
|
1895
|
-
targetTagId:
|
|
1896
|
-
name:
|
|
1897
|
-
color:
|
|
1898
|
-
description:
|
|
1899
|
-
overview:
|
|
1989
|
+
action: z5.enum(["list", "create", "update", "delete", "mergePreview", "merge"]).describe("Operation to perform"),
|
|
1990
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID (list/create)"),
|
|
1991
|
+
id: z5.string().optional().describe("Tag ID (update/delete/mergePreview/merge)"),
|
|
1992
|
+
targetTagId: z5.string().optional().describe("Surviving tag ID for mergePreview/merge \u2014 the tag in id is absorbed into this one"),
|
|
1993
|
+
name: z5.string().optional().describe("Tag name"),
|
|
1994
|
+
color: z5.string().optional().describe("Hex color, e.g. #ff0000"),
|
|
1995
|
+
description: z5.string().optional().describe("Tag description \u2014 the \u2264255-char summary"),
|
|
1996
|
+
overview: z5.string().nullable().optional().describe(
|
|
1900
1997
|
"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
1998
|
),
|
|
1902
|
-
overviewPath:
|
|
1999
|
+
overviewPath: z5.string().min(1).max(500).nullable().optional().describe(
|
|
1903
2000
|
"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
2001
|
),
|
|
1905
|
-
parentTagIds:
|
|
2002
|
+
parentTagIds: z5.array(z5.string()).max(25).optional().describe(
|
|
1906
2003
|
"Parent tag ids (multi-parent hierarchy). Honored on create; replace-set on update: pass the full list, [] clears."
|
|
1907
2004
|
),
|
|
1908
|
-
reason:
|
|
1909
|
-
contextPaths:
|
|
2005
|
+
reason: z5.string().optional().describe("One line on why (update/merge) \u2014 recorded in the tag's revision history"),
|
|
2006
|
+
contextPaths: z5.array(contextPathSchema).max(20).optional().describe(
|
|
1910
2007
|
"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
2008
|
)
|
|
1912
2009
|
};
|
|
@@ -1981,13 +2078,13 @@ function registerManagePriorities(server2, conn2) {
|
|
|
1981
2078
|
"manage_priorities",
|
|
1982
2079
|
"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
2080
|
{
|
|
1984
|
-
action:
|
|
1985
|
-
projectId:
|
|
1986
|
-
id:
|
|
1987
|
-
value:
|
|
1988
|
-
name:
|
|
1989
|
-
color:
|
|
1990
|
-
description:
|
|
2081
|
+
action: z5.enum(["list", "create", "update", "delete"]).describe("Operation to perform"),
|
|
2082
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID (list/create)"),
|
|
2083
|
+
id: z5.string().optional().describe("Priority ID (update/delete)"),
|
|
2084
|
+
value: z5.number().int().min(1).max(100).optional().describe("Priority value (1 = highest urgency scale point)"),
|
|
2085
|
+
name: z5.string().optional().describe("Priority name"),
|
|
2086
|
+
color: z5.string().optional().describe("Hex color, e.g. #ff0000"),
|
|
2087
|
+
description: z5.string().optional().describe("Priority description")
|
|
1991
2088
|
},
|
|
1992
2089
|
async (params) => {
|
|
1993
2090
|
const { action, projectId: projectId2, id, value, name, color, description } = params;
|
|
@@ -2025,10 +2122,10 @@ function registerListTagAttachments(server2, conn2) {
|
|
|
2025
2122
|
"list_tag_attachments",
|
|
2026
2123
|
"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
2124
|
{
|
|
2028
|
-
projectId:
|
|
2029
|
-
tag:
|
|
2030
|
-
limit:
|
|
2031
|
-
offset:
|
|
2125
|
+
projectId: z5.string().optional().describe("Target Conveyor project ID"),
|
|
2126
|
+
tag: z5.string().min(1).max(100).describe("Tag id, or the exact tag name (case-insensitive)"),
|
|
2127
|
+
limit: z5.number().int().min(1).max(60).optional().describe("Tiles per page (default 24)"),
|
|
2128
|
+
offset: z5.number().int().min(0).optional().describe("Tiles to skip (paging). Default 0.")
|
|
2032
2129
|
},
|
|
2033
2130
|
async (params) => jsonResult(await conn2.listTagAttachments(params))
|
|
2034
2131
|
);
|
|
@@ -2043,7 +2140,7 @@ function registerProjectConfigTools(server2, conn2) {
|
|
|
2043
2140
|
}
|
|
2044
2141
|
|
|
2045
2142
|
// src/tools/tasks.ts
|
|
2046
|
-
import { z as
|
|
2143
|
+
import { z as z6 } from "zod";
|
|
2047
2144
|
|
|
2048
2145
|
// src/tools/tasks-format.ts
|
|
2049
2146
|
var CLI_EVENT_FORMATTERS = {
|
|
@@ -2143,10 +2240,10 @@ var STATUS_ENUM2 = [
|
|
|
2143
2240
|
];
|
|
2144
2241
|
var CARD_TYPE_ENUM = ["task", "incident", "suggestion"];
|
|
2145
2242
|
var RISK_ENUM2 = ["critical", "high", "medium", "low"];
|
|
2146
|
-
var BOARD_FILTER =
|
|
2243
|
+
var BOARD_FILTER = z6.string().nullable().optional().describe(
|
|
2147
2244
|
"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
2245
|
);
|
|
2149
|
-
var BOARD_ASSIGN =
|
|
2246
|
+
var BOARD_ASSIGN = z6.string().nullable().optional().describe(
|
|
2150
2247
|
"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
2248
|
);
|
|
2152
2249
|
function registerListTasks(server2, conn2) {
|
|
@@ -2155,15 +2252,15 @@ function registerListTasks(server2, conn2) {
|
|
|
2155
2252
|
"list_tasks",
|
|
2156
2253
|
"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
2254
|
{
|
|
2158
|
-
projectId:
|
|
2159
|
-
status:
|
|
2160
|
-
typeFilters:
|
|
2255
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2256
|
+
status: z6.enum(STATUS_ENUM2).optional().describe("Filter by task status"),
|
|
2257
|
+
typeFilters: z6.array(z6.enum(CARD_TYPE_ENUM)).optional().describe(
|
|
2161
2258
|
'Card types to include, e.g. ["incident"] or ["task", "incident"]. Omit for tasks only.'
|
|
2162
2259
|
),
|
|
2163
|
-
assigneeId:
|
|
2164
|
-
unassigned:
|
|
2260
|
+
assigneeId: z6.string().optional().describe("Filter by assigned user ID"),
|
|
2261
|
+
unassigned: z6.boolean().optional().describe("Only return tasks with no assignee (mutually exclusive with assigneeId)"),
|
|
2165
2262
|
subProjectId: BOARD_FILTER,
|
|
2166
|
-
limit:
|
|
2263
|
+
limit: z6.number().optional().describe("Max tasks to return (default 50)")
|
|
2167
2264
|
},
|
|
2168
2265
|
async (params) => {
|
|
2169
2266
|
const tasks = await conn2.listTasks(params);
|
|
@@ -2203,8 +2300,8 @@ function registerGetCardBySlug(server2, conn2) {
|
|
|
2203
2300
|
"get_card_by_slug",
|
|
2204
2301
|
'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
2302
|
{
|
|
2206
|
-
projectId:
|
|
2207
|
-
slug:
|
|
2303
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2304
|
+
slug: z6.string().describe(
|
|
2208
2305
|
"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
2306
|
)
|
|
2210
2307
|
},
|
|
@@ -2220,13 +2317,13 @@ function registerCreateTask(server2, conn2) {
|
|
|
2220
2317
|
"create_task",
|
|
2221
2318
|
"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
2319
|
{
|
|
2223
|
-
projectId:
|
|
2224
|
-
title:
|
|
2225
|
-
description:
|
|
2226
|
-
plan:
|
|
2227
|
-
status:
|
|
2320
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2321
|
+
title: z6.string().describe("Task title"),
|
|
2322
|
+
description: z6.string().optional().describe(cardDescriptionDesc("Task description")),
|
|
2323
|
+
plan: z6.string().optional().describe("Task implementation plan (markdown)"),
|
|
2324
|
+
status: z6.enum(["Planning", "Open"]).optional().describe("Initial status (default: Planning)"),
|
|
2228
2325
|
subProjectId: BOARD_ASSIGN,
|
|
2229
|
-
tags:
|
|
2326
|
+
tags: z6.array(z6.string()).optional().describe(
|
|
2230
2327
|
'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
2328
|
)
|
|
2232
2329
|
},
|
|
@@ -2264,9 +2361,9 @@ function registerMoveCard(server2, conn2) {
|
|
|
2264
2361
|
"move_card",
|
|
2265
2362
|
"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
2363
|
{
|
|
2267
|
-
projectId:
|
|
2268
|
-
taskId:
|
|
2269
|
-
destinationProjectId:
|
|
2364
|
+
projectId: z6.string().optional().describe("Source Conveyor project ID"),
|
|
2365
|
+
taskId: z6.string().describe("Card ID or slug"),
|
|
2366
|
+
destinationProjectId: z6.string().describe("Destination Conveyor project ID")
|
|
2270
2367
|
},
|
|
2271
2368
|
async (params) => {
|
|
2272
2369
|
const result = await conn2.moveCard(params);
|
|
@@ -2315,12 +2412,12 @@ function registerGetTaskCli(server2, conn2) {
|
|
|
2315
2412
|
"get_task_logs",
|
|
2316
2413
|
"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
2414
|
{
|
|
2318
|
-
projectId:
|
|
2319
|
-
taskId:
|
|
2320
|
-
source:
|
|
2415
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2416
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2417
|
+
source: z6.enum(["agent", "application"]).optional().describe(
|
|
2321
2418
|
"Filter by log source: 'agent' for reasoning/tool calls, 'application' for setup/dev-server output"
|
|
2322
2419
|
),
|
|
2323
|
-
limit:
|
|
2420
|
+
limit: z6.number().optional().describe("Max entries to return (default 50, max 500)")
|
|
2324
2421
|
},
|
|
2325
2422
|
async ({ taskId, source, limit, projectId: projectId2 }) => {
|
|
2326
2423
|
const effectiveLimit = Math.min(limit ?? 50, 500);
|
|
@@ -2339,9 +2436,9 @@ function registerGetTaskSessions(server2, conn2) {
|
|
|
2339
2436
|
"get_task_sessions",
|
|
2340
2437
|
"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
2438
|
{
|
|
2342
|
-
projectId:
|
|
2343
|
-
taskId:
|
|
2344
|
-
limit:
|
|
2439
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2440
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2441
|
+
limit: z6.number().int().min(1).max(200).optional().describe("Max sessions/workspaces listed per task, newest first (default 20)")
|
|
2345
2442
|
},
|
|
2346
2443
|
async ({ taskId, projectId: projectId2, limit }) => {
|
|
2347
2444
|
const tasks = await conn2.getTaskSessions(taskId, projectId2);
|
|
@@ -2378,9 +2475,9 @@ function registerReviewTools(server2, conn2) {
|
|
|
2378
2475
|
"approve_task",
|
|
2379
2476
|
"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
2477
|
{
|
|
2381
|
-
projectId:
|
|
2382
|
-
taskId:
|
|
2383
|
-
risk:
|
|
2478
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2479
|
+
taskId: z6.string().describe("The task ID"),
|
|
2480
|
+
risk: z6.enum(RISK_ENUM2).optional().describe("Optional risk level to record; defaults to a raise-only 'low' on approval.")
|
|
2384
2481
|
},
|
|
2385
2482
|
async (params) => {
|
|
2386
2483
|
const result = await conn2.approveTask(params.taskId, params.projectId, params.risk);
|
|
@@ -2389,19 +2486,27 @@ function registerReviewTools(server2, conn2) {
|
|
|
2389
2486
|
};
|
|
2390
2487
|
}
|
|
2391
2488
|
);
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2489
|
+
server2.tool(
|
|
2490
|
+
"approve_and_merge_pr",
|
|
2491
|
+
"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.",
|
|
2492
|
+
{
|
|
2493
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2494
|
+
childTaskId: z6.string().describe("The child task ID whose PR should be approved and merged")
|
|
2495
|
+
},
|
|
2496
|
+
async (params) => {
|
|
2497
|
+
const result = await conn2.approveAndMergePR(params.childTaskId, params.projectId);
|
|
2498
|
+
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.`;
|
|
2499
|
+
return { content: [{ type: "text", text }] };
|
|
2500
|
+
}
|
|
2501
|
+
);
|
|
2397
2502
|
server2.tool(
|
|
2398
2503
|
"request_changes",
|
|
2399
2504
|
"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
2505
|
{
|
|
2401
|
-
projectId:
|
|
2402
|
-
taskId:
|
|
2403
|
-
feedback:
|
|
2404
|
-
risk:
|
|
2506
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2507
|
+
taskId: z6.string().describe("The task ID"),
|
|
2508
|
+
feedback: z6.string().describe("Feedback message describing requested changes"),
|
|
2509
|
+
risk: z6.enum(RISK_ENUM2).optional().describe("Optional risk level to record; defaults to a raise-only 'medium' on changes.")
|
|
2405
2510
|
},
|
|
2406
2511
|
async (params) => {
|
|
2407
2512
|
await conn2.requestChanges(params.taskId, params.feedback, params.projectId, params.risk);
|
|
@@ -2418,9 +2523,9 @@ function registerReviewerTools(server2, conn2) {
|
|
|
2418
2523
|
"add_reviewer",
|
|
2419
2524
|
"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
2525
|
{
|
|
2421
|
-
projectId:
|
|
2422
|
-
taskId:
|
|
2423
|
-
userId:
|
|
2526
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2527
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2528
|
+
userId: z6.string().describe("User ID of the reviewer (use list_project_members to resolve a name or email)")
|
|
2424
2529
|
},
|
|
2425
2530
|
async (params) => {
|
|
2426
2531
|
const result = await conn2.addReviewer(params);
|
|
@@ -2438,9 +2543,9 @@ function registerReviewerTools(server2, conn2) {
|
|
|
2438
2543
|
"remove_reviewer",
|
|
2439
2544
|
"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
2545
|
{
|
|
2441
|
-
projectId:
|
|
2442
|
-
taskId:
|
|
2443
|
-
userId:
|
|
2546
|
+
projectId: z6.string().optional().describe("Target Conveyor project ID"),
|
|
2547
|
+
taskId: z6.string().describe("The task ID or slug"),
|
|
2548
|
+
userId: z6.string().describe("User ID of the reviewer to remove")
|
|
2444
2549
|
},
|
|
2445
2550
|
async (params) => {
|
|
2446
2551
|
const result = await conn2.removeReviewer(params);
|
|
@@ -2472,7 +2577,7 @@ function registerTaskTools(server2, conn2) {
|
|
|
2472
2577
|
}
|
|
2473
2578
|
|
|
2474
2579
|
// src/tools/builds.ts
|
|
2475
|
-
import { z as
|
|
2580
|
+
import { z as z7 } from "zod";
|
|
2476
2581
|
function textResult2(result) {
|
|
2477
2582
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
2478
2583
|
}
|
|
@@ -2481,8 +2586,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2481
2586
|
"stop_task",
|
|
2482
2587
|
"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
2588
|
{
|
|
2484
|
-
projectId:
|
|
2485
|
-
taskId:
|
|
2589
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2590
|
+
taskId: z7.string().describe("The task ID")
|
|
2486
2591
|
},
|
|
2487
2592
|
async (params) => textResult2(await conn2.sleepTask(params.taskId, params.projectId))
|
|
2488
2593
|
);
|
|
@@ -2490,8 +2595,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2490
2595
|
"sleep_task",
|
|
2491
2596
|
"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
2597
|
{
|
|
2493
|
-
projectId:
|
|
2494
|
-
taskId:
|
|
2598
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2599
|
+
taskId: z7.string().describe("The task ID")
|
|
2495
2600
|
},
|
|
2496
2601
|
async (params) => textResult2(await conn2.sleepTask(params.taskId, params.projectId))
|
|
2497
2602
|
);
|
|
@@ -2499,8 +2604,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2499
2604
|
"resume_task",
|
|
2500
2605
|
"Resume a sleeping task Claudespace. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2501
2606
|
{
|
|
2502
|
-
projectId:
|
|
2503
|
-
taskId:
|
|
2607
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2608
|
+
taskId: z7.string().describe("The task ID")
|
|
2504
2609
|
},
|
|
2505
2610
|
async (params) => textResult2(await conn2.resumeTask(params.taskId, params.projectId))
|
|
2506
2611
|
);
|
|
@@ -2508,8 +2613,8 @@ function registerTaskLifecycleTools(server2, conn2) {
|
|
|
2508
2613
|
"delete_task_environment",
|
|
2509
2614
|
"Delete a task environment, including durable Claudespace state. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2510
2615
|
{
|
|
2511
|
-
projectId:
|
|
2512
|
-
taskId:
|
|
2616
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2617
|
+
taskId: z7.string().describe("The task ID")
|
|
2513
2618
|
},
|
|
2514
2619
|
async (params) => textResult2(await conn2.deleteTaskEnvironment(params.taskId, params.projectId))
|
|
2515
2620
|
);
|
|
@@ -2519,8 +2624,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2519
2624
|
"start_task",
|
|
2520
2625
|
"Start a cloud build (codespace) for a task. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2521
2626
|
{
|
|
2522
|
-
projectId:
|
|
2523
|
-
taskId:
|
|
2627
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2628
|
+
taskId: z7.string().describe("The task ID")
|
|
2524
2629
|
},
|
|
2525
2630
|
async (params) => {
|
|
2526
2631
|
const result = await conn2.startBuild(params.taskId, params.projectId);
|
|
@@ -2532,8 +2637,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2532
2637
|
"create_release",
|
|
2533
2638
|
"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
2639
|
{
|
|
2535
|
-
projectId:
|
|
2536
|
-
taskIds:
|
|
2640
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2641
|
+
taskIds: z7.array(z7.string()).optional().describe(
|
|
2537
2642
|
"Task IDs in Review (Dev) to cherry-pick into the release. Omit to release all of them."
|
|
2538
2643
|
)
|
|
2539
2644
|
},
|
|
@@ -2546,8 +2651,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2546
2651
|
"add_to_release",
|
|
2547
2652
|
"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
2653
|
{
|
|
2549
|
-
projectId:
|
|
2550
|
-
taskIds:
|
|
2654
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2655
|
+
taskIds: z7.array(z7.string()).min(1).describe("Task IDs (not slugs) in Review (Dev) to add to the pending release.")
|
|
2551
2656
|
},
|
|
2552
2657
|
async (params) => {
|
|
2553
2658
|
const result = await conn2.addTasksToRelease(params.taskIds, params.projectId);
|
|
@@ -2558,8 +2663,8 @@ function registerBuildTools(server2, conn2) {
|
|
|
2558
2663
|
"get_build_status",
|
|
2559
2664
|
"Check codespace and agent status for a task. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
2560
2665
|
{
|
|
2561
|
-
projectId:
|
|
2562
|
-
taskId:
|
|
2666
|
+
projectId: z7.string().optional().describe("Target Conveyor project ID"),
|
|
2667
|
+
taskId: z7.string().describe("The task ID")
|
|
2563
2668
|
},
|
|
2564
2669
|
async (params) => {
|
|
2565
2670
|
const status = await conn2.getBuildStatus(params.taskId, params.projectId);
|
|
@@ -2571,7 +2676,7 @@ function registerBuildTools(server2, conn2) {
|
|
|
2571
2676
|
// src/tools/attachments.ts
|
|
2572
2677
|
import { readFile, stat } from "fs/promises";
|
|
2573
2678
|
import { basename, extname } from "path";
|
|
2574
|
-
import { z as
|
|
2679
|
+
import { z as z8 } from "zod";
|
|
2575
2680
|
var MAX_FILE_SIZE_BYTES = 25 * 1024 * 1024;
|
|
2576
2681
|
var MAX_FILE_TAGS = 5;
|
|
2577
2682
|
var MIME_BY_EXT = {
|
|
@@ -2717,10 +2822,10 @@ function registerSetFileTags(server2, conn2) {
|
|
|
2717
2822
|
"set_file_tags",
|
|
2718
2823
|
"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
2824
|
{
|
|
2720
|
-
projectId:
|
|
2721
|
-
taskId:
|
|
2722
|
-
fileId:
|
|
2723
|
-
tags:
|
|
2825
|
+
projectId: z8.string().optional().describe("Target Conveyor project ID"),
|
|
2826
|
+
taskId: z8.string().describe("The task ID or slug the file is attached to"),
|
|
2827
|
+
fileId: z8.string().describe("The file ID to label \u2014 from list_task_files"),
|
|
2828
|
+
tags: z8.array(z8.string().min(1).max(100)).max(MAX_FILE_TAGS).describe(
|
|
2724
2829
|
"Glossary tag names (or ids) the file is an example of. Replaces the file's current tags \u2014 [] clears them. Max 5."
|
|
2725
2830
|
)
|
|
2726
2831
|
},
|
|
@@ -2949,7 +3054,7 @@ function registerChecklistTools(server2, conn2) {
|
|
|
2949
3054
|
}
|
|
2950
3055
|
|
|
2951
3056
|
// src/tools/workspace.ts
|
|
2952
|
-
import { z as
|
|
3057
|
+
import { z as z9 } from "zod";
|
|
2953
3058
|
|
|
2954
3059
|
// src/workspace-ssh-tunnel.ts
|
|
2955
3060
|
import net from "net";
|
|
@@ -3069,8 +3174,8 @@ function registerAttachInfoTool(server2, conn2) {
|
|
|
3069
3174
|
"workspace_attach_info",
|
|
3070
3175
|
"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
3176
|
{
|
|
3072
|
-
taskId:
|
|
3073
|
-
sshPublicKey:
|
|
3177
|
+
taskId: z9.string().describe("The task ID"),
|
|
3178
|
+
sshPublicKey: z9.string().optional().describe("Optional OpenSSH public key to install into the workspace")
|
|
3074
3179
|
},
|
|
3075
3180
|
async ({ taskId, sshPublicKey }) => {
|
|
3076
3181
|
const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
|
|
@@ -3083,7 +3188,7 @@ function registerPreviewUrlsTool(server2, conn2) {
|
|
|
3083
3188
|
"workspace_preview_urls",
|
|
3084
3189
|
"Return the hosted preview URLs and preview ports for a running task Claudespace. This mirrors the web UI preview link metadata.",
|
|
3085
3190
|
{
|
|
3086
|
-
taskId:
|
|
3191
|
+
taskId: z9.string().describe("The task ID")
|
|
3087
3192
|
},
|
|
3088
3193
|
async ({ taskId }) => {
|
|
3089
3194
|
const info = await conn2.getWorkspaceAttachInfo(taskId);
|
|
@@ -3112,10 +3217,10 @@ function registerStartTunnelTool(server2, conn2, startTunnel) {
|
|
|
3112
3217
|
"workspace_start_tunnel",
|
|
3113
3218
|
"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
3219
|
{
|
|
3115
|
-
taskId:
|
|
3116
|
-
port:
|
|
3117
|
-
preferredLocalPort:
|
|
3118
|
-
sshPublicKey:
|
|
3220
|
+
taskId: z9.string().describe("The task ID"),
|
|
3221
|
+
port: z9.number().optional().describe("Remote Claudespace port. Defaults to SSH port 2222."),
|
|
3222
|
+
preferredLocalPort: z9.number().optional().describe("Preferred local loopback port. If omitted, the OS chooses one."),
|
|
3223
|
+
sshPublicKey: z9.string().optional().describe("Optional OpenSSH public key to install before opening the tunnel")
|
|
3119
3224
|
},
|
|
3120
3225
|
async ({ taskId, port, preferredLocalPort, sshPublicKey }) => {
|
|
3121
3226
|
const info = await conn2.getWorkspaceAttachInfo(taskId, sshPublicKey);
|
|
@@ -3175,7 +3280,7 @@ function registerStopTunnelTool(server2) {
|
|
|
3175
3280
|
"workspace_stop_tunnel",
|
|
3176
3281
|
"Stop a local workspace tunnel previously opened by workspace_start_tunnel.",
|
|
3177
3282
|
{
|
|
3178
|
-
tunnelId:
|
|
3283
|
+
tunnelId: z9.string().describe("Tunnel id returned by workspace_start_tunnel")
|
|
3179
3284
|
},
|
|
3180
3285
|
async ({ tunnelId }) => {
|
|
3181
3286
|
const tunnel = activeTunnels.get(tunnelId);
|
|
@@ -3194,7 +3299,7 @@ function registerWorkspaceTools(server2, conn2, deps = {}) {
|
|
|
3194
3299
|
}
|
|
3195
3300
|
|
|
3196
3301
|
// ../shared/dist/index.js
|
|
3197
|
-
import { z as
|
|
3302
|
+
import { z as z10 } from "zod";
|
|
3198
3303
|
import { z as z22 } from "zod";
|
|
3199
3304
|
import { z as z32 } from "zod";
|
|
3200
3305
|
import { z as z42 } from "zod";
|
|
@@ -3203,76 +3308,7 @@ import { z as z62 } from "zod";
|
|
|
3203
3308
|
import { z as z72 } from "zod";
|
|
3204
3309
|
import { z as z82 } from "zod";
|
|
3205
3310
|
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
|
-
});
|
|
3311
|
+
import { z as z102 } from "zod";
|
|
3276
3312
|
var ACHIEVEMENT_RARITIES = [
|
|
3277
3313
|
{
|
|
3278
3314
|
key: "common",
|
|
@@ -3296,7 +3332,7 @@ var ACHIEVEMENT_RARITIES = [
|
|
|
3296
3332
|
{ key: "pack", name: "Pack", color: "#9c27b0", iconPath: "/storypoints/pack.svg" }
|
|
3297
3333
|
];
|
|
3298
3334
|
var RISK_LEVELS = ["critical", "high", "medium", "low"];
|
|
3299
|
-
var riskLevelSchema =
|
|
3335
|
+
var riskLevelSchema = z10.enum(RISK_LEVELS);
|
|
3300
3336
|
var DEFAULT_RISK_LEVELS = [
|
|
3301
3337
|
{
|
|
3302
3338
|
level: "critical",
|
|
@@ -3350,168 +3386,168 @@ var MAX_FILE_TAG_LENGTH = 100;
|
|
|
3350
3386
|
var EMBED_THRESHOLD_IMAGES = 5 * 1024 * 1024;
|
|
3351
3387
|
var EMBED_THRESHOLD_TEXT = 2 * 1024 * 1024;
|
|
3352
3388
|
var IDLE_HEARTBEAT_MS = 90 * 1e3;
|
|
3353
|
-
var TurnEndToolCallSchema =
|
|
3354
|
-
tool:
|
|
3355
|
-
input:
|
|
3356
|
-
output:
|
|
3357
|
-
timestamp:
|
|
3389
|
+
var TurnEndToolCallSchema = z22.object({
|
|
3390
|
+
tool: z22.string(),
|
|
3391
|
+
input: z22.string().optional(),
|
|
3392
|
+
output: z22.string().optional(),
|
|
3393
|
+
timestamp: z22.string().optional()
|
|
3358
3394
|
}).passthrough();
|
|
3359
|
-
var KnownAgentEventSchema =
|
|
3395
|
+
var KnownAgentEventSchema = z22.discriminatedUnion("type", [
|
|
3360
3396
|
// ── Lifecycle / connection ────────────────────────────────────────────
|
|
3361
|
-
|
|
3362
|
-
type:
|
|
3363
|
-
sessionId:
|
|
3364
|
-
projectId:
|
|
3397
|
+
z22.object({
|
|
3398
|
+
type: z22.literal("connected"),
|
|
3399
|
+
sessionId: z22.string(),
|
|
3400
|
+
projectId: z22.string().optional()
|
|
3365
3401
|
}).passthrough(),
|
|
3366
3402
|
// Open-ended context snapshot spread from buildInitializationContext().
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
type:
|
|
3370
|
-
reason:
|
|
3371
|
-
attempt:
|
|
3372
|
-
attempts:
|
|
3403
|
+
z22.object({ type: z22.literal("session_manifest") }).passthrough(),
|
|
3404
|
+
z22.object({
|
|
3405
|
+
type: z22.literal("agent_runner_status"),
|
|
3406
|
+
reason: z22.string(),
|
|
3407
|
+
attempt: z22.number().optional(),
|
|
3408
|
+
attempts: z22.number().optional()
|
|
3373
3409
|
}).passthrough(),
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3410
|
+
z22.object({ type: z22.literal("shutdown"), reason: z22.string().optional() }).passthrough(),
|
|
3411
|
+
z22.object({ type: z22.literal("mode_changed"), agentMode: z22.string() }).passthrough(),
|
|
3412
|
+
z22.object({ type: z22.literal("mode_transition"), from: z22.string(), to: z22.string() }).passthrough(),
|
|
3377
3413
|
// ── Turn stream ───────────────────────────────────────────────────────
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
type:
|
|
3382
|
-
tool:
|
|
3414
|
+
z22.object({ type: z22.literal("message"), content: z22.string() }).passthrough(),
|
|
3415
|
+
z22.object({ type: z22.literal("thinking"), message: z22.string() }).passthrough(),
|
|
3416
|
+
z22.object({
|
|
3417
|
+
type: z22.literal("tool_use"),
|
|
3418
|
+
tool: z22.string(),
|
|
3383
3419
|
// Producers send JSON.stringify(input); consumers defend against
|
|
3384
3420
|
// object inputs from older agents, so the wire stays permissive here.
|
|
3385
|
-
input:
|
|
3421
|
+
input: z22.unknown().optional()
|
|
3386
3422
|
}).passthrough(),
|
|
3387
|
-
|
|
3388
|
-
type:
|
|
3389
|
-
tool:
|
|
3390
|
-
output:
|
|
3391
|
-
isError:
|
|
3392
|
-
redactedCount:
|
|
3423
|
+
z22.object({
|
|
3424
|
+
type: z22.literal("tool_result"),
|
|
3425
|
+
tool: z22.string(),
|
|
3426
|
+
output: z22.unknown().optional(),
|
|
3427
|
+
isError: z22.boolean().optional(),
|
|
3428
|
+
redactedCount: z22.number().optional()
|
|
3393
3429
|
}).passthrough(),
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
type:
|
|
3397
|
-
summary:
|
|
3398
|
-
durationMs:
|
|
3430
|
+
z22.object({ type: z22.literal("turn_end"), toolCalls: z22.array(TurnEndToolCallSchema) }).passthrough(),
|
|
3431
|
+
z22.object({
|
|
3432
|
+
type: z22.literal("completed"),
|
|
3433
|
+
summary: z22.string().optional(),
|
|
3434
|
+
durationMs: z22.number().optional()
|
|
3399
3435
|
}).passthrough(),
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3436
|
+
z22.object({ type: z22.literal("error"), message: z22.string() }).passthrough(),
|
|
3437
|
+
z22.object({ type: z22.literal("agent_typing_start") }).passthrough(),
|
|
3438
|
+
z22.object({ type: z22.literal("agent_typing_stop") }).passthrough(),
|
|
3403
3439
|
// ── Telemetry ─────────────────────────────────────────────────────────
|
|
3404
3440
|
// heartbeat/typing: legacy telemetry the server still classifies as
|
|
3405
3441
|
// 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:
|
|
3442
|
+
z22.object({ type: z22.literal("heartbeat") }).passthrough(),
|
|
3443
|
+
z22.object({ type: z22.literal("typing") }).passthrough(),
|
|
3444
|
+
z22.object({
|
|
3445
|
+
type: z22.literal("context_update"),
|
|
3446
|
+
contextTokens: z22.number(),
|
|
3447
|
+
contextWindow: z22.number(),
|
|
3448
|
+
inputTokens: z22.number().optional(),
|
|
3449
|
+
cacheReadInputTokens: z22.number().optional(),
|
|
3450
|
+
cacheCreationInputTokens: z22.number().optional(),
|
|
3451
|
+
totalTokensUsed: z22.number().optional()
|
|
3416
3452
|
}).passthrough(),
|
|
3417
3453
|
// Four producer shapes share this type: {rateLimitType, utilization, status}
|
|
3418
3454
|
// (SDK rate_limit_event), {resetsAt} (agent-connection resume notice), the
|
|
3419
3455
|
// usage-sampler ({rateLimitType, utilization, status, resetsAt, gauges}
|
|
3420
3456
|
// — resetsAt matches rateLimitType; gauges survives via .passthrough()), and
|
|
3421
3457
|
// {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:
|
|
3458
|
+
z22.object({
|
|
3459
|
+
type: z22.literal("rate_limit_update"),
|
|
3460
|
+
rateLimitType: z22.string().optional(),
|
|
3461
|
+
utilization: z22.number().optional(),
|
|
3462
|
+
status: z22.string().optional(),
|
|
3463
|
+
resetsAt: z22.string().optional(),
|
|
3464
|
+
unmeasurable: z22.boolean().optional(),
|
|
3465
|
+
reason: z22.string().optional()
|
|
3430
3466
|
}).passthrough(),
|
|
3431
|
-
|
|
3432
|
-
type:
|
|
3433
|
-
trigger:
|
|
3434
|
-
preTokens:
|
|
3467
|
+
z22.object({
|
|
3468
|
+
type: z22.literal("context_compacted"),
|
|
3469
|
+
trigger: z22.string().optional(),
|
|
3470
|
+
preTokens: z22.number().optional()
|
|
3435
3471
|
}).passthrough(),
|
|
3436
|
-
|
|
3437
|
-
type:
|
|
3438
|
-
toolName:
|
|
3439
|
-
elapsedSeconds:
|
|
3472
|
+
z22.object({
|
|
3473
|
+
type: z22.literal("tool_progress"),
|
|
3474
|
+
toolName: z22.string().optional(),
|
|
3475
|
+
elapsedSeconds: z22.number().optional()
|
|
3440
3476
|
}).passthrough(),
|
|
3441
|
-
|
|
3442
|
-
type:
|
|
3443
|
-
sdkTaskId:
|
|
3444
|
-
description:
|
|
3477
|
+
z22.object({
|
|
3478
|
+
type: z22.literal("subagent_started"),
|
|
3479
|
+
sdkTaskId: z22.string().optional(),
|
|
3480
|
+
description: z22.string().optional()
|
|
3445
3481
|
}).passthrough(),
|
|
3446
|
-
|
|
3447
|
-
type:
|
|
3448
|
-
sdkTaskId:
|
|
3449
|
-
description:
|
|
3450
|
-
toolUses:
|
|
3451
|
-
durationMs:
|
|
3482
|
+
z22.object({
|
|
3483
|
+
type: z22.literal("subagent_progress"),
|
|
3484
|
+
sdkTaskId: z22.string().optional(),
|
|
3485
|
+
description: z22.string().optional(),
|
|
3486
|
+
toolUses: z22.number().optional(),
|
|
3487
|
+
durationMs: z22.number().optional()
|
|
3452
3488
|
}).passthrough(),
|
|
3453
3489
|
// ── Work products ─────────────────────────────────────────────────────
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
type:
|
|
3457
|
-
result:
|
|
3458
|
-
summary:
|
|
3459
|
-
issues:
|
|
3460
|
-
|
|
3461
|
-
file:
|
|
3462
|
-
line:
|
|
3463
|
-
severity:
|
|
3464
|
-
description:
|
|
3490
|
+
z22.object({ type: z22.literal("pr_created"), url: z22.string(), number: z22.number() }).passthrough(),
|
|
3491
|
+
z22.object({
|
|
3492
|
+
type: z22.literal("code_review_complete"),
|
|
3493
|
+
result: z22.enum(["approved", "changes_requested"]),
|
|
3494
|
+
summary: z22.string().optional(),
|
|
3495
|
+
issues: z22.array(
|
|
3496
|
+
z22.object({
|
|
3497
|
+
file: z22.string(),
|
|
3498
|
+
line: z22.number().optional(),
|
|
3499
|
+
severity: z22.string().optional(),
|
|
3500
|
+
description: z22.string().optional()
|
|
3465
3501
|
}).passthrough()
|
|
3466
3502
|
).optional()
|
|
3467
3503
|
}).passthrough(),
|
|
3468
3504
|
// ── Environment setup / start command ─────────────────────────────────
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
type:
|
|
3472
|
-
startCommandRunning:
|
|
3473
|
-
startCommandConfigured:
|
|
3505
|
+
z22.object({ type: z22.literal("setup_output"), stream: z22.string(), data: z22.string() }).passthrough(),
|
|
3506
|
+
z22.object({
|
|
3507
|
+
type: z22.literal("setup_complete"),
|
|
3508
|
+
startCommandRunning: z22.boolean().optional(),
|
|
3509
|
+
startCommandConfigured: z22.boolean().optional(),
|
|
3474
3510
|
// Sanitized server-side by sanitizeSessionPreviewPorts — stays unknown.
|
|
3475
|
-
previewPorts:
|
|
3511
|
+
previewPorts: z22.unknown().optional()
|
|
3476
3512
|
}).passthrough(),
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
type:
|
|
3482
|
-
code:
|
|
3483
|
-
signal:
|
|
3484
|
-
message:
|
|
3513
|
+
z22.object({ type: z22.literal("setup_error"), message: z22.string() }).passthrough(),
|
|
3514
|
+
z22.object({ type: z22.literal("start_command_started") }).passthrough(),
|
|
3515
|
+
z22.object({ type: z22.literal("start_command_output"), stream: z22.string(), data: z22.string() }).passthrough(),
|
|
3516
|
+
z22.object({
|
|
3517
|
+
type: z22.literal("start_command_exited"),
|
|
3518
|
+
code: z22.number().nullable().optional(),
|
|
3519
|
+
signal: z22.string().nullable().optional(),
|
|
3520
|
+
message: z22.string().optional()
|
|
3485
3521
|
}).passthrough(),
|
|
3486
|
-
|
|
3522
|
+
z22.object({ type: z22.literal("start_command_error"), message: z22.string() }).passthrough()
|
|
3487
3523
|
]);
|
|
3488
|
-
var AgentEventSchema =
|
|
3524
|
+
var AgentEventSchema = z22.union([
|
|
3489
3525
|
KnownAgentEventSchema,
|
|
3490
|
-
|
|
3526
|
+
z22.object({ type: z22.string().min(1) }).catchall(z22.unknown())
|
|
3491
3527
|
]);
|
|
3492
|
-
var cardDescription =
|
|
3493
|
-
var AgentHeartbeatSchema =
|
|
3494
|
-
sessionId:
|
|
3495
|
-
timestamp:
|
|
3496
|
-
status:
|
|
3497
|
-
currentAction:
|
|
3528
|
+
var cardDescription = z32.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
|
|
3529
|
+
var AgentHeartbeatSchema = z32.object({
|
|
3530
|
+
sessionId: z32.string().optional(),
|
|
3531
|
+
timestamp: z32.string(),
|
|
3532
|
+
status: z32.enum(["active", "idle", "building"]),
|
|
3533
|
+
currentAction: z32.string().optional(),
|
|
3498
3534
|
/** 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:
|
|
3535
|
+
loopLagMs: z32.number().nonnegative().optional()
|
|
3536
|
+
});
|
|
3537
|
+
var CreatePRInputSchema = z32.object({
|
|
3538
|
+
title: z32.string().min(1),
|
|
3539
|
+
body: z32.string(),
|
|
3540
|
+
head: z32.string().optional(),
|
|
3541
|
+
base: z32.string().optional()
|
|
3542
|
+
});
|
|
3543
|
+
var PostToChatInputSchema = z32.object({
|
|
3544
|
+
message: z32.string().min(1),
|
|
3545
|
+
type: z32.enum(["message", "question", "update"]).optional().default("message"),
|
|
3546
|
+
milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
3547
|
+
});
|
|
3548
|
+
var GetTaskContextRequestSchema = z32.object({
|
|
3549
|
+
sessionId: z32.string(),
|
|
3550
|
+
includeHistory: z32.boolean().optional().default(false),
|
|
3515
3551
|
/**
|
|
3516
3552
|
* Read the plan-revised marker WITHOUT consuming it. Bookkeeping fetches
|
|
3517
3553
|
* (the session-identity check, the branch refresh) pass true so they cannot
|
|
@@ -3519,277 +3555,277 @@ var GetTaskContextRequestSchema = z42.object({
|
|
|
3519
3555
|
* Defaults to false — consuming — so a pod running an older agent build still
|
|
3520
3556
|
* clears the marker instead of showing the notice on every boot forever.
|
|
3521
3557
|
*/
|
|
3522
|
-
peekPlanRevision:
|
|
3558
|
+
peekPlanRevision: z32.boolean().optional().default(false)
|
|
3523
3559
|
});
|
|
3524
|
-
var GetChatMessagesRequestSchema =
|
|
3525
|
-
sessionId:
|
|
3526
|
-
limit:
|
|
3527
|
-
offset:
|
|
3560
|
+
var GetChatMessagesRequestSchema = z32.object({
|
|
3561
|
+
sessionId: z32.string(),
|
|
3562
|
+
limit: z32.number().int().positive().optional().default(50),
|
|
3563
|
+
offset: z32.number().int().nonnegative().optional().default(0),
|
|
3528
3564
|
/** Task id or slug to read chat from. Omit for the session's own task. Only
|
|
3529
3565
|
* the session's own task or one of its children resolves — anything else is
|
|
3530
3566
|
* an error, never a silent fallback to the caller's own chat. */
|
|
3531
|
-
taskId:
|
|
3567
|
+
taskId: z32.string().optional()
|
|
3532
3568
|
});
|
|
3533
|
-
var GetTaskFilesRequestSchema =
|
|
3534
|
-
sessionId:
|
|
3569
|
+
var GetTaskFilesRequestSchema = z32.object({
|
|
3570
|
+
sessionId: z32.string()
|
|
3535
3571
|
});
|
|
3536
|
-
var GetTaskFileRequestSchema =
|
|
3537
|
-
sessionId:
|
|
3538
|
-
fileId:
|
|
3572
|
+
var GetTaskFileRequestSchema = z32.object({
|
|
3573
|
+
sessionId: z32.string(),
|
|
3574
|
+
fileId: z32.string()
|
|
3539
3575
|
});
|
|
3540
|
-
var GetTaskRequestSchema =
|
|
3541
|
-
sessionId:
|
|
3542
|
-
taskSlugOrId:
|
|
3576
|
+
var GetTaskRequestSchema = z32.object({
|
|
3577
|
+
sessionId: z32.string(),
|
|
3578
|
+
taskSlugOrId: z32.string()
|
|
3543
3579
|
});
|
|
3544
|
-
var GetCliHistoryRequestSchema =
|
|
3545
|
-
sessionId:
|
|
3546
|
-
limit:
|
|
3547
|
-
source:
|
|
3580
|
+
var GetCliHistoryRequestSchema = z32.object({
|
|
3581
|
+
sessionId: z32.string(),
|
|
3582
|
+
limit: z32.number().int().positive().optional().default(100),
|
|
3583
|
+
source: z32.enum(["agent", "application"]).optional(),
|
|
3548
3584
|
/** Task id or slug to read logs from. Omit for the session's own task. Only
|
|
3549
3585
|
* the session's own task or one of its children resolves — anything else is
|
|
3550
3586
|
* an error, never a silent fallback to the caller's own logs. */
|
|
3551
|
-
taskId:
|
|
3587
|
+
taskId: z32.string().optional()
|
|
3552
3588
|
});
|
|
3553
|
-
var ListSubtasksRequestSchema =
|
|
3554
|
-
sessionId:
|
|
3555
|
-
/** "compact" returns the slim orchestration view (ListSubtasksCompactResponse
|
|
3556
|
-
*
|
|
3589
|
+
var ListSubtasksRequestSchema = z32.object({
|
|
3590
|
+
sessionId: z32.string(),
|
|
3591
|
+
/** "compact" returns the slim orchestration view (ListSubtasksCompactResponse:
|
|
3592
|
+
* per-child status, agent, story points, PR state, dependencies); "full" (default — wire-compat with older
|
|
3557
3593
|
* 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:
|
|
3594
|
+
view: z32.enum(["compact", "full"]).optional()
|
|
3595
|
+
});
|
|
3596
|
+
var GetDependenciesRequestSchema = z32.object({
|
|
3597
|
+
sessionId: z32.string()
|
|
3598
|
+
});
|
|
3599
|
+
var GetSuggestionsRequestSchema = z32.object({
|
|
3600
|
+
sessionId: z32.string(),
|
|
3601
|
+
status: z32.string().optional(),
|
|
3602
|
+
limit: z32.number().int().min(1).max(100).optional()
|
|
3603
|
+
});
|
|
3604
|
+
var ListManualTestsRequestSchema = z32.object({
|
|
3605
|
+
sessionId: z32.string()
|
|
3606
|
+
});
|
|
3607
|
+
var QueryManualTestsRequestSchema = z32.object({
|
|
3608
|
+
sessionId: z32.string(),
|
|
3609
|
+
cardStatuses: z32.array(z32.string()).optional(),
|
|
3610
|
+
testStatuses: z32.array(z32.enum(["open", "approved", "rejected"])).optional()
|
|
3611
|
+
});
|
|
3612
|
+
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z32.string() });
|
|
3613
|
+
var RequestFileUploadRequestSchema = z32.object({
|
|
3614
|
+
sessionId: z32.string(),
|
|
3615
|
+
fileName: z32.string().min(1).max(255),
|
|
3616
|
+
mimeType: z32.string().min(1).max(128),
|
|
3617
|
+
fileSize: z32.number().int().positive().max(MAX_FILE_SIZE_BYTES2)
|
|
3618
|
+
});
|
|
3619
|
+
var ConfirmFileUploadRequestSchema = z32.object({
|
|
3620
|
+
sessionId: z32.string(),
|
|
3621
|
+
fileId: z32.string(),
|
|
3622
|
+
title: z32.string().max(500).optional(),
|
|
3587
3623
|
/** 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:
|
|
3624
|
+
tags: z32.array(z32.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS2).optional()
|
|
3625
|
+
});
|
|
3626
|
+
var UpdateTaskStatusRequestSchema = z32.object({
|
|
3627
|
+
sessionId: z32.string(),
|
|
3628
|
+
status: z32.string(),
|
|
3629
|
+
force: z32.boolean().optional().default(false)
|
|
3630
|
+
});
|
|
3631
|
+
var StoreSessionIdRequestSchema = z32.object({
|
|
3632
|
+
sessionId: z32.string(),
|
|
3633
|
+
sdkSessionId: z32.string()
|
|
3634
|
+
});
|
|
3635
|
+
var SetManualTestsRequestSchema = z32.object({
|
|
3636
|
+
sessionId: z32.string(),
|
|
3637
|
+
items: z32.array(z32.object({ title: z32.string().min(1) })).min(1)
|
|
3638
|
+
});
|
|
3639
|
+
var EditManualTestRequestSchema = z32.object({
|
|
3640
|
+
sessionId: z32.string(),
|
|
3641
|
+
title: z32.string().min(1),
|
|
3642
|
+
newTitle: z32.string().min(1)
|
|
3643
|
+
});
|
|
3644
|
+
var RemoveManualTestRequestSchema = z32.object({
|
|
3645
|
+
sessionId: z32.string(),
|
|
3646
|
+
title: z32.string().min(1)
|
|
3647
|
+
});
|
|
3648
|
+
var ApproveManualTestRequestSchema = z32.object({
|
|
3649
|
+
sessionId: z32.string(),
|
|
3650
|
+
title: z32.string().min(1)
|
|
3651
|
+
});
|
|
3652
|
+
var RejectManualTestRequestSchema = z32.object({
|
|
3653
|
+
sessionId: z32.string(),
|
|
3654
|
+
title: z32.string().min(1),
|
|
3655
|
+
reason: z32.string().min(1).max(2e3)
|
|
3656
|
+
});
|
|
3657
|
+
var SessionStartRequestSchema = z32.object({
|
|
3658
|
+
sessionId: z32.string(),
|
|
3659
|
+
agentVersion: z32.string(),
|
|
3660
|
+
capabilities: z32.array(z32.string())
|
|
3661
|
+
});
|
|
3662
|
+
var SessionStopRequestSchema = z32.object({
|
|
3663
|
+
sessionId: z32.string(),
|
|
3664
|
+
reason: z32.string().optional()
|
|
3665
|
+
});
|
|
3666
|
+
var EndReviewSessionRequestSchema = z32.object({
|
|
3667
|
+
sessionId: z32.string(),
|
|
3668
|
+
reason: z32.enum(["approved", "changes_requested", "finished"]).optional()
|
|
3669
|
+
});
|
|
3670
|
+
var ConnectAgentRequestSchema = z32.object({
|
|
3671
|
+
sessionId: z32.string()
|
|
3672
|
+
});
|
|
3673
|
+
var ReportAgentStatusRequestSchema = z32.object({
|
|
3674
|
+
sessionId: z32.string(),
|
|
3675
|
+
status: z32.string(),
|
|
3640
3676
|
/** Why the agent reports this status (e.g. "user_question" while an AskUserQuestion questionnaire is pending in the TUI). */
|
|
3641
|
-
reason:
|
|
3677
|
+
reason: z32.string().optional(),
|
|
3642
3678
|
/**
|
|
3643
3679
|
* The pending question text, sent only alongside `reason: "user_question"`
|
|
3644
3680
|
* so the server can surface it in the user-question notification body (and
|
|
3645
3681
|
* thus the Attention feed) instead of a generic string. Optional: older
|
|
3646
3682
|
* agents omit it and the server falls back to the generic wording.
|
|
3647
3683
|
*/
|
|
3648
|
-
questionText:
|
|
3684
|
+
questionText: z32.string().optional()
|
|
3649
3685
|
});
|
|
3650
|
-
var NotifyAgentVersionRequestSchema =
|
|
3651
|
-
sessionId:
|
|
3652
|
-
agentVersion:
|
|
3686
|
+
var NotifyAgentVersionRequestSchema = z32.object({
|
|
3687
|
+
sessionId: z32.string(),
|
|
3688
|
+
agentVersion: z32.string()
|
|
3653
3689
|
});
|
|
3654
|
-
var DiscoveredPortSchema =
|
|
3655
|
-
port:
|
|
3656
|
-
label:
|
|
3657
|
-
protocol:
|
|
3658
|
-
detectedAt:
|
|
3690
|
+
var DiscoveredPortSchema = z32.object({
|
|
3691
|
+
port: z32.number().int().min(1).max(65535),
|
|
3692
|
+
label: z32.string().min(1).max(64).optional(),
|
|
3693
|
+
protocol: z32.enum(["http", "tcp"]).optional(),
|
|
3694
|
+
detectedAt: z32.string()
|
|
3659
3695
|
});
|
|
3660
|
-
var ReportDiscoveredPortsRequestSchema =
|
|
3661
|
-
sessionId:
|
|
3662
|
-
ports:
|
|
3696
|
+
var ReportDiscoveredPortsRequestSchema = z32.object({
|
|
3697
|
+
sessionId: z32.string(),
|
|
3698
|
+
ports: z32.array(DiscoveredPortSchema).max(64)
|
|
3663
3699
|
});
|
|
3664
|
-
var ReportBootMilestoneRequestSchema =
|
|
3665
|
-
sessionId:
|
|
3666
|
-
key:
|
|
3700
|
+
var ReportBootMilestoneRequestSchema = z32.object({
|
|
3701
|
+
sessionId: z32.string(),
|
|
3702
|
+
key: z32.string().max(64)
|
|
3667
3703
|
});
|
|
3668
|
-
var CreateSubtaskRequestSchema =
|
|
3669
|
-
sessionId:
|
|
3670
|
-
title:
|
|
3704
|
+
var CreateSubtaskRequestSchema = z32.object({
|
|
3705
|
+
sessionId: z32.string(),
|
|
3706
|
+
title: z32.string().min(1),
|
|
3671
3707
|
description: cardDescription,
|
|
3672
|
-
plan:
|
|
3673
|
-
storyPointValue:
|
|
3674
|
-
ordinal:
|
|
3675
|
-
followParentStatus:
|
|
3708
|
+
plan: z32.string().optional(),
|
|
3709
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3710
|
+
ordinal: z32.number().int().nonnegative().optional(),
|
|
3711
|
+
followParentStatus: z32.boolean().optional(),
|
|
3676
3712
|
/** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
|
|
3677
3713
|
* metadata — preferred over encoding order in plan text / ordinal). */
|
|
3678
|
-
dependsOn:
|
|
3714
|
+
dependsOn: z32.array(z32.string().min(1)).max(32).optional(),
|
|
3679
3715
|
/** Glossary tag names to assign to the child. Unmatched names come back in
|
|
3680
3716
|
* the response rather than failing the create. */
|
|
3681
|
-
tags:
|
|
3717
|
+
tags: z32.array(z32.string().min(1)).max(10).optional()
|
|
3682
3718
|
});
|
|
3683
|
-
var UpdateSubtaskRequestSchema =
|
|
3684
|
-
sessionId:
|
|
3685
|
-
subtaskId:
|
|
3686
|
-
title:
|
|
3719
|
+
var UpdateSubtaskRequestSchema = z32.object({
|
|
3720
|
+
sessionId: z32.string(),
|
|
3721
|
+
subtaskId: z32.string(),
|
|
3722
|
+
title: z32.string().min(1).optional(),
|
|
3687
3723
|
description: cardDescription,
|
|
3688
|
-
plan:
|
|
3724
|
+
plan: z32.string().optional(),
|
|
3689
3725
|
/** Orchestration statuses only ("Planning" | "Open") — the pack parent's
|
|
3690
3726
|
* sanctioned promotion path. Execution statuses stay with the build
|
|
3691
3727
|
* pipeline / force_update_task_status. Enforced server-side. */
|
|
3692
|
-
status:
|
|
3728
|
+
status: z32.string().optional(),
|
|
3693
3729
|
/** Assign a project agent to the child — accepts the agent's id or exact
|
|
3694
3730
|
* name; resolved against the parent task's project server-side. */
|
|
3695
|
-
agentIdOrName:
|
|
3696
|
-
storyPointValue:
|
|
3697
|
-
followParentStatus:
|
|
3731
|
+
agentIdOrName: z32.string().min(1).optional(),
|
|
3732
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3733
|
+
followParentStatus: z32.boolean().optional(),
|
|
3698
3734
|
/** Replace this subtask's dependency edges with these sibling ids/slugs.
|
|
3699
3735
|
* Empty array clears all. Omit to leave dependencies unchanged. */
|
|
3700
|
-
dependsOn:
|
|
3736
|
+
dependsOn: z32.array(z32.string().min(1)).max(32).optional()
|
|
3701
3737
|
});
|
|
3702
|
-
var DeleteSubtaskRequestSchema =
|
|
3703
|
-
sessionId:
|
|
3704
|
-
subtaskId:
|
|
3738
|
+
var DeleteSubtaskRequestSchema = z32.object({
|
|
3739
|
+
sessionId: z32.string(),
|
|
3740
|
+
subtaskId: z32.string()
|
|
3705
3741
|
});
|
|
3706
|
-
var SetSubtaskParentRequestSchema =
|
|
3707
|
-
sessionId:
|
|
3708
|
-
taskId:
|
|
3709
|
-
detach:
|
|
3710
|
-
ordinal:
|
|
3711
|
-
followParentStatus:
|
|
3742
|
+
var SetSubtaskParentRequestSchema = z32.object({
|
|
3743
|
+
sessionId: z32.string(),
|
|
3744
|
+
taskId: z32.string().min(1),
|
|
3745
|
+
detach: z32.boolean().optional(),
|
|
3746
|
+
ordinal: z32.number().int().nonnegative().optional(),
|
|
3747
|
+
followParentStatus: z32.boolean().optional()
|
|
3712
3748
|
});
|
|
3713
|
-
var GetTaskPropertiesRequestSchema =
|
|
3714
|
-
sessionId:
|
|
3749
|
+
var GetTaskPropertiesRequestSchema = z32.object({
|
|
3750
|
+
sessionId: z32.string()
|
|
3715
3751
|
});
|
|
3716
|
-
var UpdateTaskFieldsRequestSchema =
|
|
3717
|
-
sessionId:
|
|
3718
|
-
plan:
|
|
3752
|
+
var UpdateTaskFieldsRequestSchema = z32.object({
|
|
3753
|
+
sessionId: z32.string(),
|
|
3754
|
+
plan: z32.string().optional(),
|
|
3719
3755
|
description: cardDescription
|
|
3720
3756
|
});
|
|
3721
|
-
var UpdateTaskPropertiesRequestSchema =
|
|
3722
|
-
sessionId:
|
|
3723
|
-
title:
|
|
3724
|
-
storyPointValue:
|
|
3725
|
-
tagIds:
|
|
3726
|
-
tagNames:
|
|
3727
|
-
githubPRUrl:
|
|
3728
|
-
githubBranch:
|
|
3757
|
+
var UpdateTaskPropertiesRequestSchema = z32.object({
|
|
3758
|
+
sessionId: z32.string(),
|
|
3759
|
+
title: z32.string().optional(),
|
|
3760
|
+
storyPointValue: z32.number().int().positive().optional(),
|
|
3761
|
+
tagIds: z32.array(z32.string()).optional(),
|
|
3762
|
+
tagNames: z32.array(z32.string()).optional(),
|
|
3763
|
+
githubPRUrl: z32.string().url().optional(),
|
|
3764
|
+
githubBranch: z32.string().optional(),
|
|
3729
3765
|
// Canonical risk level, or null to clear — same semantics as the headless
|
|
3730
3766
|
// update_task boundary (resolved to the project's Risk row in the handler).
|
|
3731
3767
|
risk: riskLevelSchema.nullable().optional()
|
|
3732
3768
|
});
|
|
3733
|
-
var ListIconsRequestSchema =
|
|
3734
|
-
sessionId:
|
|
3769
|
+
var ListIconsRequestSchema = z32.object({
|
|
3770
|
+
sessionId: z32.string()
|
|
3735
3771
|
});
|
|
3736
|
-
var GenerateTaskIconRequestSchema =
|
|
3737
|
-
sessionId:
|
|
3738
|
-
prompt:
|
|
3739
|
-
aspectRatio:
|
|
3772
|
+
var GenerateTaskIconRequestSchema = z32.object({
|
|
3773
|
+
sessionId: z32.string(),
|
|
3774
|
+
prompt: z32.string().min(1),
|
|
3775
|
+
aspectRatio: z32.string().optional()
|
|
3740
3776
|
});
|
|
3741
|
-
var SearchFaIconsRequestSchema =
|
|
3742
|
-
sessionId:
|
|
3743
|
-
query:
|
|
3744
|
-
first:
|
|
3777
|
+
var SearchFaIconsRequestSchema = z32.object({
|
|
3778
|
+
sessionId: z32.string(),
|
|
3779
|
+
query: z32.string().min(1),
|
|
3780
|
+
first: z32.number().int().positive().optional()
|
|
3745
3781
|
});
|
|
3746
|
-
var PickFaIconRequestSchema =
|
|
3747
|
-
sessionId:
|
|
3748
|
-
fontAwesomeId:
|
|
3749
|
-
fontAwesomeStyle:
|
|
3782
|
+
var PickFaIconRequestSchema = z32.object({
|
|
3783
|
+
sessionId: z32.string(),
|
|
3784
|
+
fontAwesomeId: z32.string().min(1),
|
|
3785
|
+
fontAwesomeStyle: z32.string().optional()
|
|
3750
3786
|
});
|
|
3751
|
-
var CreateFollowUpTaskRequestSchema =
|
|
3752
|
-
sessionId:
|
|
3753
|
-
title:
|
|
3787
|
+
var CreateFollowUpTaskRequestSchema = z32.object({
|
|
3788
|
+
sessionId: z32.string(),
|
|
3789
|
+
title: z32.string().min(1),
|
|
3754
3790
|
description: cardDescription,
|
|
3755
|
-
plan:
|
|
3756
|
-
storyPointValue:
|
|
3791
|
+
plan: z32.string().optional(),
|
|
3792
|
+
storyPointValue: z32.number().int().positive().optional()
|
|
3757
3793
|
});
|
|
3758
|
-
var AddDependencyRequestSchema =
|
|
3759
|
-
sessionId:
|
|
3760
|
-
dependsOnSlugOrId:
|
|
3794
|
+
var AddDependencyRequestSchema = z32.object({
|
|
3795
|
+
sessionId: z32.string(),
|
|
3796
|
+
dependsOnSlugOrId: z32.string()
|
|
3761
3797
|
});
|
|
3762
|
-
var RemoveDependencyRequestSchema =
|
|
3763
|
-
sessionId:
|
|
3764
|
-
dependsOnSlugOrId:
|
|
3798
|
+
var RemoveDependencyRequestSchema = z32.object({
|
|
3799
|
+
sessionId: z32.string(),
|
|
3800
|
+
dependsOnSlugOrId: z32.string()
|
|
3765
3801
|
});
|
|
3766
|
-
var CreateSuggestionRequestSchema =
|
|
3767
|
-
sessionId:
|
|
3768
|
-
title:
|
|
3802
|
+
var CreateSuggestionRequestSchema = z32.object({
|
|
3803
|
+
sessionId: z32.string(),
|
|
3804
|
+
title: z32.string().min(1),
|
|
3769
3805
|
description: cardDescription,
|
|
3770
|
-
tagNames:
|
|
3806
|
+
tagNames: z32.array(z32.string()).optional()
|
|
3771
3807
|
});
|
|
3772
|
-
var VoteSuggestionRequestSchema =
|
|
3773
|
-
sessionId:
|
|
3774
|
-
suggestionId:
|
|
3775
|
-
value:
|
|
3808
|
+
var VoteSuggestionRequestSchema = z32.object({
|
|
3809
|
+
sessionId: z32.string(),
|
|
3810
|
+
suggestionId: z32.string(),
|
|
3811
|
+
value: z32.union([z32.literal(1), z32.literal(-1)])
|
|
3776
3812
|
});
|
|
3777
|
-
var TriggerIdentificationRequestSchema =
|
|
3778
|
-
sessionId:
|
|
3813
|
+
var TriggerIdentificationRequestSchema = z32.object({
|
|
3814
|
+
sessionId: z32.string()
|
|
3779
3815
|
});
|
|
3780
|
-
var HandoffToImplementerRequestSchema =
|
|
3781
|
-
sessionId:
|
|
3816
|
+
var HandoffToImplementerRequestSchema = z32.object({
|
|
3817
|
+
sessionId: z32.string(),
|
|
3782
3818
|
// Optional difficulty sizing — sets the task's story points before resolving
|
|
3783
3819
|
// the matched implementer agent. Omit to hand off using the task's current
|
|
3784
3820
|
// story points (or the project's default task agent when unsized).
|
|
3785
|
-
storyPoints:
|
|
3821
|
+
storyPoints: z32.number().int().positive().optional(),
|
|
3786
3822
|
// Optional kickoff note posted to the task chat alongside the handoff notice.
|
|
3787
|
-
message:
|
|
3823
|
+
message: z32.string().optional()
|
|
3788
3824
|
});
|
|
3789
|
-
var SubmitCodeReviewResultRequestSchema =
|
|
3790
|
-
sessionId:
|
|
3791
|
-
approved:
|
|
3792
|
-
content:
|
|
3825
|
+
var SubmitCodeReviewResultRequestSchema = z32.object({
|
|
3826
|
+
sessionId: z32.string(),
|
|
3827
|
+
approved: z32.boolean(),
|
|
3828
|
+
content: z32.string(),
|
|
3793
3829
|
// Canonical risk level the reviewer assigned to this change. Required on every
|
|
3794
3830
|
// verdict — the reviewer must judge it. Applied authoritatively server-side
|
|
3795
3831
|
// (may raise OR lower an already-set value; the reviewer has that authority).
|
|
@@ -3797,177 +3833,165 @@ var SubmitCodeReviewResultRequestSchema = z42.object({
|
|
|
3797
3833
|
// The commit SHA the reviewer actually reviewed. When present, the verdict is
|
|
3798
3834
|
// rejected unless the task is still at this SHA (guards against a late
|
|
3799
3835
|
// 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()
|
|
3836
|
+
reviewedSha: z32.string().optional()
|
|
3837
|
+
});
|
|
3838
|
+
var CycleCodingAgentKeyRequestSchema = z32.object({
|
|
3839
|
+
sessionId: z32.string(),
|
|
3840
|
+
rateLimitType: z32.string(),
|
|
3841
|
+
resetsAt: z32.string().optional()
|
|
3842
|
+
});
|
|
3843
|
+
var PostChildChatMessageRequestSchema = z32.object({
|
|
3844
|
+
sessionId: z32.string(),
|
|
3845
|
+
childTaskId: z32.string(),
|
|
3846
|
+
message: z32.string().min(1)
|
|
3847
|
+
});
|
|
3848
|
+
var UpdateChildStatusRequestSchema = z32.object({
|
|
3849
|
+
sessionId: z32.string(),
|
|
3850
|
+
childTaskId: z32.string(),
|
|
3851
|
+
status: z32.string()
|
|
3852
|
+
});
|
|
3853
|
+
var GetAgentStatusRequestSchema = z32.object({
|
|
3854
|
+
taskId: z32.string()
|
|
3855
|
+
});
|
|
3856
|
+
var GetUiCliHistoryRequestSchema = z32.object({
|
|
3857
|
+
taskId: z32.string()
|
|
3858
|
+
});
|
|
3859
|
+
var GetActivePtySessionRequestSchema = z32.object({
|
|
3860
|
+
taskId: z32.string()
|
|
3861
|
+
});
|
|
3862
|
+
var ListActivePtySessionsRequestSchema = z32.object({
|
|
3863
|
+
taskId: z32.string()
|
|
3864
|
+
});
|
|
3865
|
+
var SendSoftStopRequestSchema = z32.object({
|
|
3866
|
+
taskId: z32.string()
|
|
3867
|
+
});
|
|
3868
|
+
var StopTaskSessionRequestSchema = z32.object({
|
|
3869
|
+
taskId: z32.string(),
|
|
3870
|
+
sessionId: z32.string()
|
|
3871
|
+
});
|
|
3872
|
+
var FlushTaskQueueRequestSchema = z32.object({
|
|
3873
|
+
taskId: z32.string(),
|
|
3874
|
+
softStop: z32.boolean().optional()
|
|
3875
|
+
});
|
|
3876
|
+
var CancelTaskQueuedMessageRequestSchema = z32.object({
|
|
3877
|
+
taskId: z32.string(),
|
|
3878
|
+
messageId: z32.string()
|
|
3879
|
+
});
|
|
3880
|
+
var FlushSingleQueuedMessageRequestSchema = z32.object({
|
|
3881
|
+
taskId: z32.string(),
|
|
3882
|
+
messageId: z32.string(),
|
|
3883
|
+
softStop: z32.boolean().optional()
|
|
3884
|
+
});
|
|
3885
|
+
var AnswerAgentQuestionRequestSchema = z32.object({
|
|
3886
|
+
taskId: z32.string(),
|
|
3887
|
+
requestId: z32.string(),
|
|
3888
|
+
answers: z32.record(z32.string(), z32.string())
|
|
3889
|
+
});
|
|
3890
|
+
var ClearAgentTodosRequestSchema = z32.object({
|
|
3891
|
+
taskId: z32.string()
|
|
3892
|
+
});
|
|
3893
|
+
var AgentQuestionOptionSchema = z32.object({
|
|
3894
|
+
label: z32.string(),
|
|
3895
|
+
description: z32.string(),
|
|
3896
|
+
preview: z32.string().optional()
|
|
3897
|
+
});
|
|
3898
|
+
var AgentQuestionSchema = z32.object({
|
|
3899
|
+
question: z32.string(),
|
|
3900
|
+
header: z32.string(),
|
|
3901
|
+
options: z32.array(AgentQuestionOptionSchema),
|
|
3902
|
+
multiSelect: z32.boolean().optional()
|
|
3903
|
+
});
|
|
3904
|
+
var AskUserQuestionRequestSchema = z32.object({
|
|
3905
|
+
sessionId: z32.string(),
|
|
3906
|
+
question: z32.string().min(1),
|
|
3907
|
+
requestId: z32.string().min(1),
|
|
3908
|
+
questions: z32.array(AgentQuestionSchema).min(1)
|
|
3909
|
+
});
|
|
3910
|
+
var PostAgentMessageRequestSchema = z32.object({
|
|
3911
|
+
sessionId: z32.string().min(1),
|
|
3912
|
+
content: z32.string(),
|
|
3913
|
+
milestone: z32.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
3914
|
+
});
|
|
3915
|
+
var EmitAgentEventRequestSchema = z32.object({
|
|
3916
|
+
sessionId: z32.string(),
|
|
3917
|
+
events: z32.array(AgentEventSchema).max(500)
|
|
3918
|
+
});
|
|
3919
|
+
var RefreshGithubTokenRequestSchema = z32.object({
|
|
3920
|
+
sessionId: z32.string(),
|
|
3921
|
+
forceFresh: z32.boolean().optional()
|
|
3922
|
+
});
|
|
3923
|
+
var ReportCredentialFailureRequestSchema = z32.object({
|
|
3924
|
+
sessionId: z32.string(),
|
|
3925
|
+
error: z32.string().max(2e3).optional(),
|
|
3926
|
+
tokenShape: z32.string().max(500).optional(),
|
|
3927
|
+
healed: z32.boolean().optional()
|
|
3928
|
+
});
|
|
3929
|
+
var ReportReviewSpawnFailureRequestSchema = z32.object({
|
|
3930
|
+
sessionId: z32.string(),
|
|
3931
|
+
reviewSessionId: z32.string(),
|
|
3932
|
+
error: z32.string().max(2e3).optional()
|
|
3909
3933
|
});
|
|
3910
3934
|
var ReportBuilderSpawnFailureRequestSchema = ReportReviewSpawnFailureRequestSchema.omit({
|
|
3911
3935
|
reviewSessionId: true
|
|
3912
|
-
}).extend({ buildSessionId:
|
|
3913
|
-
var SpawnTaskSessionRequestSchema =
|
|
3914
|
-
taskId:
|
|
3915
|
-
kind:
|
|
3936
|
+
}).extend({ buildSessionId: z32.string() });
|
|
3937
|
+
var SpawnTaskSessionRequestSchema = z32.object({
|
|
3938
|
+
taskId: z32.string(),
|
|
3939
|
+
kind: z32.enum(["tui", "shell"])
|
|
3916
3940
|
});
|
|
3917
|
-
var StartCodeReviewRequestSchema =
|
|
3918
|
-
taskId:
|
|
3919
|
-
force:
|
|
3941
|
+
var StartCodeReviewRequestSchema = z32.object({
|
|
3942
|
+
taskId: z32.string(),
|
|
3943
|
+
force: z32.boolean().optional()
|
|
3920
3944
|
});
|
|
3921
|
-
var StopCodeReviewRequestSchema =
|
|
3922
|
-
taskId:
|
|
3945
|
+
var StopCodeReviewRequestSchema = z32.object({
|
|
3946
|
+
taskId: z32.string()
|
|
3923
3947
|
});
|
|
3924
|
-
var ReportSessionSpawnFailureRequestSchema =
|
|
3925
|
-
sessionId:
|
|
3926
|
-
spawnedSessionId:
|
|
3927
|
-
error:
|
|
3948
|
+
var ReportSessionSpawnFailureRequestSchema = z32.object({
|
|
3949
|
+
sessionId: z32.string(),
|
|
3950
|
+
spawnedSessionId: z32.string(),
|
|
3951
|
+
error: z32.string().max(2e3).optional()
|
|
3928
3952
|
});
|
|
3929
|
-
var RefreshGithubTokenResponseSchema =
|
|
3930
|
-
token:
|
|
3953
|
+
var RefreshGithubTokenResponseSchema = z32.object({
|
|
3954
|
+
token: z32.string()
|
|
3931
3955
|
});
|
|
3932
3956
|
var PTY_FRAME_MAX_CHARS = 256 * 1024;
|
|
3933
3957
|
var PTY_MAX_DIMENSION = 1e3;
|
|
3934
|
-
var PtyOutputRequestSchema =
|
|
3935
|
-
sessionId:
|
|
3936
|
-
data:
|
|
3937
|
-
cols:
|
|
3938
|
-
rows:
|
|
3958
|
+
var PtyOutputRequestSchema = z32.object({
|
|
3959
|
+
sessionId: z32.string(),
|
|
3960
|
+
data: z32.string().max(PTY_FRAME_MAX_CHARS),
|
|
3961
|
+
cols: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional(),
|
|
3962
|
+
rows: z32.number().int().positive().max(PTY_MAX_DIMENSION).optional()
|
|
3939
3963
|
});
|
|
3940
|
-
var PtyEndedRequestSchema =
|
|
3941
|
-
sessionId:
|
|
3964
|
+
var PtyEndedRequestSchema = z32.object({
|
|
3965
|
+
sessionId: z32.string()
|
|
3942
3966
|
});
|
|
3943
|
-
var PtyInputRequestSchema =
|
|
3944
|
-
sessionId:
|
|
3945
|
-
data:
|
|
3967
|
+
var PtyInputRequestSchema = z32.object({
|
|
3968
|
+
sessionId: z32.string(),
|
|
3969
|
+
data: z32.string().max(PTY_FRAME_MAX_CHARS)
|
|
3946
3970
|
});
|
|
3947
|
-
var PtyResizeRequestSchema =
|
|
3948
|
-
sessionId:
|
|
3949
|
-
cols:
|
|
3950
|
-
rows:
|
|
3971
|
+
var PtyResizeRequestSchema = z32.object({
|
|
3972
|
+
sessionId: z32.string(),
|
|
3973
|
+
cols: z32.number().int().positive().max(PTY_MAX_DIMENSION),
|
|
3974
|
+
rows: z32.number().int().positive().max(PTY_MAX_DIMENSION)
|
|
3951
3975
|
});
|
|
3952
|
-
var PtyAttachRequestSchema =
|
|
3953
|
-
sessionId:
|
|
3976
|
+
var PtyAttachRequestSchema = z32.object({
|
|
3977
|
+
sessionId: z32.string()
|
|
3954
3978
|
});
|
|
3955
|
-
var ReportPtyStreamRequestSchema =
|
|
3956
|
-
sessionId:
|
|
3957
|
-
port:
|
|
3979
|
+
var ReportPtyStreamRequestSchema = z32.object({
|
|
3980
|
+
sessionId: z32.string(),
|
|
3981
|
+
port: z32.number().int().positive().max(65535).nullable()
|
|
3958
3982
|
});
|
|
3959
|
-
var GetPtyStreamEndpointRequestSchema =
|
|
3960
|
-
sessionId:
|
|
3983
|
+
var GetPtyStreamEndpointRequestSchema = z32.object({
|
|
3984
|
+
sessionId: z32.string()
|
|
3961
3985
|
});
|
|
3962
|
-
var PtyChatEventPayloadSchema =
|
|
3963
|
-
|
|
3964
|
-
kind:
|
|
3965
|
-
model:
|
|
3966
|
-
claudeSessionId:
|
|
3986
|
+
var PtyChatEventPayloadSchema = z32.discriminatedUnion("kind", [
|
|
3987
|
+
z32.object({
|
|
3988
|
+
kind: z32.literal("init"),
|
|
3989
|
+
model: z32.string().max(200),
|
|
3990
|
+
claudeSessionId: z32.string().max(100).optional()
|
|
3967
3991
|
}),
|
|
3968
|
-
|
|
3969
|
-
kind:
|
|
3970
|
-
text:
|
|
3992
|
+
z32.object({
|
|
3993
|
+
kind: z32.literal("user_text"),
|
|
3994
|
+
text: z32.string().max(16384),
|
|
3971
3995
|
// Set by the SERVER (never the agent) when this prompt was injected by
|
|
3972
3996
|
// Conveyor rather than typed by a human — the routed message's `source`
|
|
3973
3997
|
// (`ci_success`, `review_trigger`, `automated_feedback`, …). The agent
|
|
@@ -3975,69 +3999,75 @@ var PtyChatEventPayloadSchema = z42.discriminatedUnion("kind", [
|
|
|
3975
3999
|
// CLI records both as plain transcript `user` records; without this the
|
|
3976
4000
|
// builder chat renders "All CI checks passed on your PR." as the human's
|
|
3977
4001
|
// own bubble. Absent ⇒ a genuine human prompt.
|
|
3978
|
-
source:
|
|
4002
|
+
source: z32.string().max(60).optional()
|
|
3979
4003
|
}),
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
kind:
|
|
3983
|
-
name:
|
|
4004
|
+
z32.object({ kind: z32.literal("assistant_text"), text: z32.string().max(16384) }),
|
|
4005
|
+
z32.object({
|
|
4006
|
+
kind: z32.literal("tool_use"),
|
|
4007
|
+
name: z32.string().max(200),
|
|
3984
4008
|
// Compact preview: JSON.stringify(input) truncated agent-side. The cap
|
|
3985
4009
|
// matches the text events because AskUserQuestion payloads ride this field
|
|
3986
4010
|
// and the web lifts them into an interactive card — a tight cap forced
|
|
3987
4011
|
// option descriptions down to 80 chars, making them unreadable. Every
|
|
3988
4012
|
// other tool keeps a far smaller agent-side budget (`TOOL_INPUT_MAX` in
|
|
3989
4013
|
// `chat-record-mapper.ts`), so the ring does not grow for normal calls.
|
|
3990
|
-
input:
|
|
4014
|
+
input: z32.string().max(16384),
|
|
3991
4015
|
// Transcript tool_use block id — lets the client pair the tool_result.
|
|
3992
|
-
id:
|
|
4016
|
+
id: z32.string().max(100).optional()
|
|
3993
4017
|
}),
|
|
3994
|
-
|
|
3995
|
-
kind:
|
|
4018
|
+
z32.object({
|
|
4019
|
+
kind: z32.literal("tool_result"),
|
|
3996
4020
|
// tool_use block id this result answers (absent on malformed records).
|
|
3997
|
-
toolUseId:
|
|
4021
|
+
toolUseId: z32.string().max(100).optional(),
|
|
3998
4022
|
// Compact output preview, truncated agent-side.
|
|
3999
|
-
output:
|
|
4000
|
-
isError:
|
|
4023
|
+
output: z32.string().max(2e3),
|
|
4024
|
+
isError: z32.boolean().optional()
|
|
4001
4025
|
}),
|
|
4002
|
-
|
|
4026
|
+
z32.object({ kind: z32.literal("turn_end") })
|
|
4003
4027
|
]);
|
|
4004
|
-
var PtyChatEventRequestSchema =
|
|
4005
|
-
sessionId:
|
|
4028
|
+
var PtyChatEventRequestSchema = z32.object({
|
|
4029
|
+
sessionId: z32.string(),
|
|
4006
4030
|
event: PtyChatEventPayloadSchema
|
|
4007
4031
|
});
|
|
4008
|
-
var PtyChatAttachRequestSchema =
|
|
4009
|
-
sessionId:
|
|
4032
|
+
var PtyChatAttachRequestSchema = z32.object({
|
|
4033
|
+
sessionId: z32.string()
|
|
4010
4034
|
});
|
|
4011
|
-
var CreatePRResponseSchema =
|
|
4012
|
-
prNumber:
|
|
4013
|
-
prUrl:
|
|
4035
|
+
var CreatePRResponseSchema = z32.object({
|
|
4036
|
+
prNumber: z32.number().int().positive(),
|
|
4037
|
+
prUrl: z32.string().url(),
|
|
4014
4038
|
/** Advisory glossary-upkeep note derived from the PR's changed files matched
|
|
4015
4039
|
* against tag contextPaths — rendered into the tool result, never stored. */
|
|
4016
|
-
glossaryNote:
|
|
4040
|
+
glossaryNote: z32.string().optional()
|
|
4017
4041
|
});
|
|
4018
|
-
var PostToChatResponseSchema =
|
|
4019
|
-
messageId:
|
|
4042
|
+
var PostToChatResponseSchema = z32.object({
|
|
4043
|
+
messageId: z32.string()
|
|
4020
4044
|
});
|
|
4021
|
-
var UpdateTaskStatusResponseSchema =
|
|
4022
|
-
taskId:
|
|
4023
|
-
status:
|
|
4045
|
+
var UpdateTaskStatusResponseSchema = z32.object({
|
|
4046
|
+
taskId: z32.string(),
|
|
4047
|
+
status: z32.string()
|
|
4024
4048
|
});
|
|
4025
|
-
var StoreSessionIdResponseSchema =
|
|
4026
|
-
success:
|
|
4049
|
+
var StoreSessionIdResponseSchema = z32.object({
|
|
4050
|
+
success: z32.boolean()
|
|
4027
4051
|
});
|
|
4028
|
-
var HeartbeatResponseSchema =
|
|
4029
|
-
acknowledged:
|
|
4052
|
+
var HeartbeatResponseSchema = z32.object({
|
|
4053
|
+
acknowledged: z32.boolean()
|
|
4030
4054
|
});
|
|
4031
|
-
var SessionStartResponseSchema =
|
|
4032
|
-
sessionId:
|
|
4033
|
-
startedAt:
|
|
4055
|
+
var SessionStartResponseSchema = z32.object({
|
|
4056
|
+
sessionId: z32.string(),
|
|
4057
|
+
startedAt: z32.string()
|
|
4034
4058
|
});
|
|
4035
|
-
var SessionStopResponseSchema =
|
|
4036
|
-
sessionId:
|
|
4037
|
-
stoppedAt:
|
|
4059
|
+
var SessionStopResponseSchema = z32.object({
|
|
4060
|
+
sessionId: z32.string(),
|
|
4061
|
+
stoppedAt: z32.string()
|
|
4062
|
+
});
|
|
4063
|
+
var DeleteSubtaskResponseSchema = z32.object({
|
|
4064
|
+
deleted: z32.boolean()
|
|
4038
4065
|
});
|
|
4039
|
-
var
|
|
4040
|
-
|
|
4066
|
+
var ParkOnCheckResultRequestSchema = z42.object({
|
|
4067
|
+
sessionId: z42.string(),
|
|
4068
|
+
sha: z42.string().regex(/^[0-9a-f]{7,40}$/i).optional(),
|
|
4069
|
+
prNumber: z42.number().int().positive().optional(),
|
|
4070
|
+
timeoutMinutes: z42.number().int().min(1).max(MAX_CI_WAIT_TIMEOUT_MINUTES).optional()
|
|
4041
4071
|
});
|
|
4042
4072
|
var GIT_BRANCH_NAME_MAX = 255;
|
|
4043
4073
|
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 +4360,7 @@ var ListProjectSessionGroupsRequestSchema = z52.object({
|
|
|
4330
4360
|
projectId: z52.string()
|
|
4331
4361
|
});
|
|
4332
4362
|
var ListMyLiveSessionsAcrossProjectsRequestSchema = z52.object({});
|
|
4363
|
+
var ListSessionGroupsAcrossProjectsRequestSchema = z52.object({});
|
|
4333
4364
|
var GetProjectAvailableTuisRequestSchema = z52.object({
|
|
4334
4365
|
projectId: z52.string()
|
|
4335
4366
|
});
|
|
@@ -4772,129 +4803,129 @@ var MEETING_TITLE_MAX = 200;
|
|
|
4772
4803
|
var MEETING_OCCURRED_AT_MIN_YEAR = 2e3;
|
|
4773
4804
|
var MEETING_OCCURRED_AT_MAX_FUTURE_MS = 48 * 60 * 60 * 1e3;
|
|
4774
4805
|
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 =
|
|
4806
|
+
var MeetingOccurredAtSchema = z102.string().datetime().refine((value) => {
|
|
4776
4807
|
const ms = Date.parse(value);
|
|
4777
4808
|
if (Number.isNaN(ms)) return false;
|
|
4778
4809
|
if (ms > Date.now() + MEETING_OCCURRED_AT_MAX_FUTURE_MS) return false;
|
|
4779
4810
|
return new Date(ms).getUTCFullYear() >= MEETING_OCCURRED_AT_MIN_YEAR;
|
|
4780
4811
|
}, OCCURRED_AT_RANGE_MESSAGE);
|
|
4781
|
-
var CreateMeetingFromTranscriptRequestSchema =
|
|
4782
|
-
projectId:
|
|
4783
|
-
rawText:
|
|
4784
|
-
title:
|
|
4812
|
+
var CreateMeetingFromTranscriptRequestSchema = z102.object({
|
|
4813
|
+
projectId: z102.string().cuid(),
|
|
4814
|
+
rawText: z102.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
4815
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4785
4816
|
/** ISO 8601. Defaults to now when the source carries no date. */
|
|
4786
4817
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4787
4818
|
/** Override auto-detection. Rarely needed; detection handles the three formats. */
|
|
4788
|
-
format:
|
|
4789
|
-
source:
|
|
4819
|
+
format: z102.enum(["text", "vtt", "srt"]).optional(),
|
|
4820
|
+
source: z102.enum(["manual", "slack"]).optional()
|
|
4790
4821
|
});
|
|
4791
|
-
var GetMeetingRequestSchema =
|
|
4792
|
-
projectId:
|
|
4793
|
-
meetingId:
|
|
4822
|
+
var GetMeetingRequestSchema = z102.object({
|
|
4823
|
+
projectId: z102.string().cuid(),
|
|
4824
|
+
meetingId: z102.string().cuid()
|
|
4794
4825
|
});
|
|
4795
|
-
var UpdateMeetingRequestSchema =
|
|
4796
|
-
projectId:
|
|
4797
|
-
meetingId:
|
|
4798
|
-
title:
|
|
4826
|
+
var UpdateMeetingRequestSchema = z102.object({
|
|
4827
|
+
projectId: z102.string().cuid(),
|
|
4828
|
+
meetingId: z102.string().cuid(),
|
|
4829
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4799
4830
|
occurredAt: MeetingOccurredAtSchema.optional()
|
|
4800
4831
|
});
|
|
4801
|
-
var RegenerateMeetingSummaryRequestSchema =
|
|
4802
|
-
projectId:
|
|
4803
|
-
meetingId:
|
|
4832
|
+
var RegenerateMeetingSummaryRequestSchema = z102.object({
|
|
4833
|
+
projectId: z102.string().cuid(),
|
|
4834
|
+
meetingId: z102.string().cuid()
|
|
4804
4835
|
});
|
|
4805
|
-
var DeleteMeetingRequestSchema =
|
|
4806
|
-
projectId:
|
|
4807
|
-
meetingId:
|
|
4836
|
+
var DeleteMeetingRequestSchema = z102.object({
|
|
4837
|
+
projectId: z102.string().cuid(),
|
|
4838
|
+
meetingId: z102.string().cuid()
|
|
4808
4839
|
});
|
|
4809
|
-
var checklistTitle =
|
|
4810
|
-
var ListMeetingChecklistRequestSchema =
|
|
4811
|
-
projectId:
|
|
4812
|
-
meetingId:
|
|
4840
|
+
var checklistTitle = z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
|
|
4841
|
+
var ListMeetingChecklistRequestSchema = z102.object({
|
|
4842
|
+
projectId: z102.string().cuid(),
|
|
4843
|
+
meetingId: z102.string().cuid()
|
|
4813
4844
|
});
|
|
4814
|
-
var AddMeetingChecklistItemsRequestSchema =
|
|
4815
|
-
projectId:
|
|
4816
|
-
meetingId:
|
|
4817
|
-
items:
|
|
4845
|
+
var AddMeetingChecklistItemsRequestSchema = z102.object({
|
|
4846
|
+
projectId: z102.string().cuid(),
|
|
4847
|
+
meetingId: z102.string().cuid(),
|
|
4848
|
+
items: z102.array(z102.object({ title: checklistTitle })).min(1).max(50)
|
|
4818
4849
|
});
|
|
4819
|
-
var UpdateMeetingChecklistItemRequestSchema =
|
|
4820
|
-
projectId:
|
|
4821
|
-
meetingId:
|
|
4822
|
-
itemId:
|
|
4850
|
+
var UpdateMeetingChecklistItemRequestSchema = z102.object({
|
|
4851
|
+
projectId: z102.string().cuid(),
|
|
4852
|
+
meetingId: z102.string().cuid(),
|
|
4853
|
+
itemId: z102.string().cuid(),
|
|
4823
4854
|
title: checklistTitle.optional(),
|
|
4824
|
-
ordinal:
|
|
4855
|
+
ordinal: z102.number().int().min(0).optional(),
|
|
4825
4856
|
/** Explicit null clears the link; undefined leaves it alone. */
|
|
4826
|
-
linkedTaskId:
|
|
4857
|
+
linkedTaskId: z102.string().cuid().nullable().optional()
|
|
4827
4858
|
}).refine(
|
|
4828
4859
|
(v) => v.title !== void 0 || v.ordinal !== void 0 || v.linkedTaskId !== void 0,
|
|
4829
4860
|
"Pass at least one of title, ordinal, or linkedTaskId."
|
|
4830
4861
|
);
|
|
4831
|
-
var DeleteMeetingChecklistItemRequestSchema =
|
|
4832
|
-
projectId:
|
|
4833
|
-
meetingId:
|
|
4834
|
-
itemId:
|
|
4835
|
-
});
|
|
4836
|
-
var SetMeetingChecklistItemCheckedRequestSchema =
|
|
4837
|
-
projectId:
|
|
4838
|
-
meetingId:
|
|
4839
|
-
itemId:
|
|
4840
|
-
checked:
|
|
4862
|
+
var DeleteMeetingChecklistItemRequestSchema = z102.object({
|
|
4863
|
+
projectId: z102.string().cuid(),
|
|
4864
|
+
meetingId: z102.string().cuid(),
|
|
4865
|
+
itemId: z102.string().cuid()
|
|
4866
|
+
});
|
|
4867
|
+
var SetMeetingChecklistItemCheckedRequestSchema = z102.object({
|
|
4868
|
+
projectId: z102.string().cuid(),
|
|
4869
|
+
meetingId: z102.string().cuid(),
|
|
4870
|
+
itemId: z102.string().cuid(),
|
|
4871
|
+
checked: z102.boolean(),
|
|
4841
4872
|
/** Attach the card in the same call that ticks the item. */
|
|
4842
|
-
linkedTaskId:
|
|
4873
|
+
linkedTaskId: z102.string().cuid().nullable().optional()
|
|
4843
4874
|
});
|
|
4844
|
-
var ListMeetingsRequestSchema =
|
|
4845
|
-
projectId:
|
|
4846
|
-
limit:
|
|
4847
|
-
search:
|
|
4875
|
+
var ListMeetingsRequestSchema = z102.object({
|
|
4876
|
+
projectId: z102.string().cuid(),
|
|
4877
|
+
limit: z102.number().int().min(1).max(50).optional(),
|
|
4878
|
+
search: z102.string().max(200).optional()
|
|
4848
4879
|
});
|
|
4849
|
-
var ReadMeetingTranscriptRequestSchema =
|
|
4850
|
-
projectId:
|
|
4851
|
-
meetingId:
|
|
4852
|
-
offset:
|
|
4853
|
-
limit:
|
|
4880
|
+
var ReadMeetingTranscriptRequestSchema = z102.object({
|
|
4881
|
+
projectId: z102.string().cuid(),
|
|
4882
|
+
meetingId: z102.string().cuid(),
|
|
4883
|
+
offset: z102.number().int().min(0).optional(),
|
|
4884
|
+
limit: z102.number().int().min(1).max(500).optional()
|
|
4854
4885
|
});
|
|
4855
4886
|
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:
|
|
4887
|
+
var AddProjectMeetingChecklistItemsRequestSchema = z102.object({
|
|
4888
|
+
projectId: z102.string().cuid(),
|
|
4889
|
+
meetingId: z102.string().cuid(),
|
|
4890
|
+
items: z102.array(z102.object({ title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
|
|
4891
|
+
requestingUserId: z102.string().optional()
|
|
4892
|
+
});
|
|
4893
|
+
var CheckProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4894
|
+
projectId: z102.string().cuid(),
|
|
4895
|
+
meetingId: z102.string().cuid(),
|
|
4896
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4897
|
+
checked: z102.boolean(),
|
|
4867
4898
|
/** 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:
|
|
4899
|
+
linkedTask: z102.string().min(1).optional(),
|
|
4900
|
+
requestingUserId: z102.string().optional()
|
|
4901
|
+
});
|
|
4902
|
+
var EditProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4903
|
+
projectId: z102.string().cuid(),
|
|
4904
|
+
meetingId: z102.string().cuid(),
|
|
4905
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4906
|
+
newTitle: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4907
|
+
requestingUserId: z102.string().optional()
|
|
4908
|
+
});
|
|
4909
|
+
var RemoveProjectMeetingChecklistItemRequestSchema = z102.object({
|
|
4910
|
+
projectId: z102.string().cuid(),
|
|
4911
|
+
meetingId: z102.string().cuid(),
|
|
4912
|
+
title: z102.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
4913
|
+
requestingUserId: z102.string().optional()
|
|
4914
|
+
});
|
|
4915
|
+
var CreateProjectMeetingRequestSchema = z102.object({
|
|
4916
|
+
projectId: z102.string().cuid(),
|
|
4917
|
+
rawText: z102.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
4918
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4888
4919
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4889
|
-
requestingUserId:
|
|
4920
|
+
requestingUserId: z102.string().optional()
|
|
4890
4921
|
});
|
|
4891
|
-
var UpdateProjectMeetingRequestSchema =
|
|
4892
|
-
projectId:
|
|
4893
|
-
meetingId:
|
|
4894
|
-
title:
|
|
4922
|
+
var UpdateProjectMeetingRequestSchema = z102.object({
|
|
4923
|
+
projectId: z102.string().cuid(),
|
|
4924
|
+
meetingId: z102.string().cuid(),
|
|
4925
|
+
title: z102.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
4895
4926
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
4896
|
-
summary:
|
|
4897
|
-
requestingUserId:
|
|
4927
|
+
summary: z102.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
|
|
4928
|
+
requestingUserId: z102.string().optional()
|
|
4898
4929
|
}).refine(
|
|
4899
4930
|
(v) => v.title !== void 0 || v.occurredAt !== void 0 || v.summary !== void 0,
|
|
4900
4931
|
"Pass at least one of title, occurredAt, or summary."
|
|
@@ -4991,11 +5022,13 @@ var CATALOG = {
|
|
|
4991
5022
|
// CPU: the request is the CFS floor; the old 50m starved postgres to 5ms
|
|
4992
5023
|
// of CPU per 100ms period — every query burst hit throttle stalls, which
|
|
4993
5024
|
// 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
|
-
|
|
5025
|
+
// int suite even after the fsync flags above. 250m is paid for out of the
|
|
5026
|
+
// workbench's derived share (resource-tiers.ts); measured across the fleet
|
|
5027
|
+
// postgres peaks at 0.66 cores and idles far below 250m, and the limit
|
|
5028
|
+
// (unchanged at 2) is what serves the peaks: the first-boot pod-data seed
|
|
5029
|
+
// copy and int-suite query storms borrow idle node CPU without moving the
|
|
5030
|
+
// request.
|
|
5031
|
+
requests: { cpuMillicores: 250, memoryMi: 512, ephemeralMi: 3 * 1024 },
|
|
4999
5032
|
limits: { cpuMillicores: 2e3, memoryMi: 512, ephemeralMi: 3 * 1024 }
|
|
5000
5033
|
},
|
|
5001
5034
|
connectionEnv: {
|
|
@@ -5049,6 +5082,10 @@ var CATALOG = {
|
|
|
5049
5082
|
// rejects (media_type_header_exception), breaking search/audit indexing
|
|
5050
5083
|
// in pods. 512m heap matches the project compose sizing.
|
|
5051
5084
|
image: "docker.elastic.co/elasticsearch/elasticsearch:9.4.0",
|
|
5085
|
+
mirror: {
|
|
5086
|
+
src: "docker.elastic.co/elasticsearch/elasticsearch:9.4.0",
|
|
5087
|
+
dest: "mirror-elasticsearch:9.4.0"
|
|
5088
|
+
},
|
|
5052
5089
|
ports: [9200],
|
|
5053
5090
|
// Baked service images are `docker commit`s of a recently-running ES, so
|
|
5054
5091
|
// they carry a stale data-dir node.lock; ES 9 hard-fails on it at boot
|
|
@@ -5072,14 +5109,16 @@ var CATALOG = {
|
|
|
5072
5109
|
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
|
|
5073
5110
|
},
|
|
5074
5111
|
resources: {
|
|
5075
|
-
// CPU limit
|
|
5112
|
+
// CPU limit 8x the request: ES cold-start is a CPU-bound JVM boot
|
|
5076
5113
|
// (class loading + JIT + recovery of the docker-commit'ed data dir),
|
|
5077
|
-
// and
|
|
5114
|
+
// and a 500m hard cap put it at ~135s to yellow, past the sidecar
|
|
5078
5115
|
// wait script's original 90s budget. Bursting to 2 cut it to ~40s on
|
|
5079
5116
|
// the real cluster (A/B on identical nodes, 2 rounds). The burst only
|
|
5080
5117
|
// borrows idle node CPU at boot; under contention CFS still floors ES
|
|
5081
|
-
// at its
|
|
5082
|
-
|
|
5118
|
+
// at its request. That request is 250m: the fleet-wide peak is 1.6
|
|
5119
|
+
// cores (served by the limit) and steady state is far below 250m, so
|
|
5120
|
+
// the old 500m only inflated the billed pod total.
|
|
5121
|
+
requests: { cpuMillicores: 250, memoryMi: 1024, ephemeralMi: 256 },
|
|
5083
5122
|
limits: { cpuMillicores: 2e3, memoryMi: 1024, ephemeralMi: 256 }
|
|
5084
5123
|
},
|
|
5085
5124
|
connectionEnv: {
|
|
@@ -5131,6 +5170,10 @@ var CATALOG = {
|
|
|
5131
5170
|
resources: {
|
|
5132
5171
|
// Autopilot caps the ephemeral-storage limit to the request (see the
|
|
5133
5172
|
// postgresql note), so the 1Gi headroom must be on the request too.
|
|
5173
|
+
// CPU: the collector draws ~0.3 cores at idle fleet-wide, so the request
|
|
5174
|
+
// stays at 250m to cover that draw under node contention (a request
|
|
5175
|
+
// below usage is a container CFS throttles continuously); the 1-core
|
|
5176
|
+
// limit covers ingest bursts.
|
|
5134
5177
|
requests: { cpuMillicores: 250, memoryMi: 1024, ephemeralMi: 1024 },
|
|
5135
5178
|
limits: { cpuMillicores: 1e3, memoryMi: 2048, ephemeralMi: 1024 }
|
|
5136
5179
|
},
|