@rallycry/conveyor-agent 11.0.44 → 11.0.46
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/{boot-T5HQVF3W.js → boot-5AZLXH5M.js} +2 -2
- package/dist/{chunk-42YPRICN.js → chunk-2SIMOUOD.js} +315 -47
- package/dist/{chunk-37J5MMQT.js → chunk-6CKFZ4JG.js} +1 -1
- package/dist/{chunk-4H75HQVM.js → chunk-A43UZ5RC.js} +2 -2
- package/dist/{chunk-KMBMW3J3.js → chunk-SKAFB6DG.js} +1280 -1502
- package/dist/{chunk-Q4FQOJ7D.js → chunk-VIUZS7V4.js} +1 -12
- package/dist/cli.js +11 -58
- package/dist/index.d.ts +1 -7
- package/dist/index.js +4 -4
- package/dist/{serve-boot-TZZ45CJR.js → serve-boot-HRMFAX7H.js} +4 -7
- package/package.json +2 -3
- package/skills/conveyor-prune/SKILL.md +1 -1
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DEFAULT_RETRY_DELAY_MS,
|
|
4
4
|
FETCH_TIMEOUT_MS,
|
|
5
5
|
GIT_PREP_MAX_RETRIES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VIUZS7V4.js";
|
|
7
7
|
import {
|
|
8
8
|
gitCredentialHelper,
|
|
9
9
|
sleep,
|
|
@@ -25,117 +25,6 @@ import {
|
|
|
25
25
|
workbenchEnabled
|
|
26
26
|
} from "./chunk-KMB3BU4S.js";
|
|
27
27
|
|
|
28
|
-
// src/setup/bootstrap.ts
|
|
29
|
-
var BOOTSTRAP_TIMEOUT_MS = 3e4;
|
|
30
|
-
var RETRY_DELAYS_MS = [5e3, 1e4, 2e4];
|
|
31
|
-
function emitFailureEvent(payload) {
|
|
32
|
-
process.stderr.write(JSON.stringify(payload) + "\n");
|
|
33
|
-
}
|
|
34
|
-
async function singleBootstrapAttempt(apiUrl, instanceName, bootstrapToken, timeoutMs) {
|
|
35
|
-
const controller = new AbortController();
|
|
36
|
-
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
37
|
-
try {
|
|
38
|
-
const headers = {};
|
|
39
|
-
if (bootstrapToken) headers["x-codespace-token"] = bootstrapToken;
|
|
40
|
-
const response = await fetch(`${apiUrl}/api/codespace/bootstrap/${instanceName}`, {
|
|
41
|
-
headers,
|
|
42
|
-
signal: controller.signal
|
|
43
|
-
});
|
|
44
|
-
if (!response.ok) {
|
|
45
|
-
const errorText = await response.text().catch(() => "");
|
|
46
|
-
return {
|
|
47
|
-
ok: false,
|
|
48
|
-
status: response.status,
|
|
49
|
-
errorText: errorText.slice(0, 500),
|
|
50
|
-
reason: response.status === 401 || response.status === 403 ? "auth_rejected" : "http_error"
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const body = await response.json();
|
|
54
|
-
return { ok: true, body };
|
|
55
|
-
} catch (err) {
|
|
56
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
57
|
-
const reason = controller.signal.aborted ? "timeout" : "network_error";
|
|
58
|
-
return { ok: false, errorText: message.slice(0, 500), reason };
|
|
59
|
-
} finally {
|
|
60
|
-
clearTimeout(timer);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function buildFailure(reason, attempts, status, detail) {
|
|
64
|
-
const out = { ok: false, reason, attempts };
|
|
65
|
-
if (status === void 0) {
|
|
66
|
-
} else {
|
|
67
|
-
out.status = status;
|
|
68
|
-
}
|
|
69
|
-
if (detail) out.detail = detail;
|
|
70
|
-
return out;
|
|
71
|
-
}
|
|
72
|
-
function isRetryable(reason, retryOnHttpError) {
|
|
73
|
-
if (reason === "timeout" || reason === "network_error") return true;
|
|
74
|
-
return retryOnHttpError === true && reason === "http_error";
|
|
75
|
-
}
|
|
76
|
-
async function fetchBootstrap(opts) {
|
|
77
|
-
const timeoutMs = opts.timeoutMs ?? BOOTSTRAP_TIMEOUT_MS;
|
|
78
|
-
const delays = opts.retryDelaysMs ?? RETRY_DELAYS_MS;
|
|
79
|
-
const maxAttempts = delays.length + 1;
|
|
80
|
-
const hasBootstrapToken = Boolean(opts.bootstrapToken);
|
|
81
|
-
const hasTaskToken = Boolean(process.env.CONVEYOR_TASK_TOKEN);
|
|
82
|
-
let lastReason = "unknown";
|
|
83
|
-
let lastStatus;
|
|
84
|
-
let lastDetail;
|
|
85
|
-
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
86
|
-
const result = await singleBootstrapAttempt(
|
|
87
|
-
opts.apiUrl,
|
|
88
|
-
opts.instanceName,
|
|
89
|
-
opts.bootstrapToken,
|
|
90
|
-
timeoutMs
|
|
91
|
-
);
|
|
92
|
-
if (result.ok && result.body) {
|
|
93
|
-
return { ok: true, config: result.body, attempts: attempt };
|
|
94
|
-
}
|
|
95
|
-
lastReason = result.reason ?? "unknown";
|
|
96
|
-
lastStatus = result.status;
|
|
97
|
-
lastDetail = result.errorText;
|
|
98
|
-
const failurePayload = {
|
|
99
|
-
event: "bootstrap_failed",
|
|
100
|
-
reason: lastReason,
|
|
101
|
-
apiUrl: opts.apiUrl,
|
|
102
|
-
instanceName: opts.instanceName,
|
|
103
|
-
hasBootstrapToken,
|
|
104
|
-
hasTaskToken,
|
|
105
|
-
attempt
|
|
106
|
-
};
|
|
107
|
-
if (lastStatus === void 0) {
|
|
108
|
-
} else {
|
|
109
|
-
failurePayload.status = lastStatus;
|
|
110
|
-
}
|
|
111
|
-
if (lastDetail) failurePayload.detail = lastDetail;
|
|
112
|
-
emitFailureEvent(failurePayload);
|
|
113
|
-
if (!isRetryable(lastReason, opts.retryOnHttpError) || attempt >= maxAttempts) {
|
|
114
|
-
return buildFailure(lastReason, attempt, lastStatus, lastDetail);
|
|
115
|
-
}
|
|
116
|
-
await sleep(delays[attempt - 1]);
|
|
117
|
-
}
|
|
118
|
-
return buildFailure(lastReason, maxAttempts, lastStatus, lastDetail);
|
|
119
|
-
}
|
|
120
|
-
function applyBootstrapToEnv(config) {
|
|
121
|
-
for (const [key, value] of Object.entries(config.envVars ?? {})) {
|
|
122
|
-
process.env[key] = value;
|
|
123
|
-
}
|
|
124
|
-
if (config.mode === "project") {
|
|
125
|
-
if (config.projectToken) process.env.CONVEYOR_PROJECT_TOKEN = config.projectToken;
|
|
126
|
-
if (config.projectId) process.env.CONVEYOR_PROJECT_ID = config.projectId;
|
|
127
|
-
if (config.workspaceBranch) process.env.CONVEYOR_WORKSPACE_BRANCH = config.workspaceBranch;
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (config.taskId) process.env.CONVEYOR_TASK_ID = config.taskId;
|
|
131
|
-
if (config.sessionId) process.env.CONVEYOR_SESSION_ID = config.sessionId;
|
|
132
|
-
if (config.taskToken) process.env.CONVEYOR_TASK_TOKEN = config.taskToken;
|
|
133
|
-
if (config.agentMode !== void 0) process.env.CONVEYOR_AGENT_MODE = config.agentMode;
|
|
134
|
-
if (config.isAuto !== void 0) process.env.CONVEYOR_IS_AUTO = config.isAuto;
|
|
135
|
-
if (config.runnerMode) process.env.CONVEYOR_MODE = config.runnerMode;
|
|
136
|
-
if (config.taskBranch) process.env.CONVEYOR_TASK_BRANCH = config.taskBranch;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
28
|
// src/utils/logger.ts
|
|
140
29
|
function createServiceLogger(service) {
|
|
141
30
|
const prefix = `[conveyor-agent:${service}]`;
|
|
@@ -236,9 +125,6 @@ function applyBundleGithubToken(bundle, self) {
|
|
|
236
125
|
syncGithubTokenFiles(bundle.githubToken);
|
|
237
126
|
return { written: true };
|
|
238
127
|
}
|
|
239
|
-
function syncBundleGithubToken(token) {
|
|
240
|
-
syncGithubTokenFiles(token);
|
|
241
|
-
}
|
|
242
128
|
|
|
243
129
|
// src/connection/event-batch.ts
|
|
244
130
|
var MAX_EVENT_BATCH_BYTES = 256 * 1024;
|
|
@@ -1239,15 +1125,6 @@ var AgentConnection = class _AgentConnection {
|
|
|
1239
1125
|
async reportDiscoveredPorts(ports) {
|
|
1240
1126
|
await this.call("reportDiscoveredPorts", { sessionId: this.config.sessionId, ports });
|
|
1241
1127
|
}
|
|
1242
|
-
/** Boot-milestone report over the socket — the codespace-parity fallback
|
|
1243
|
-
* for the GKE pod bootstrap-token route. Fire-and-forget: a failed report
|
|
1244
|
-
* must never delay or fail the boot path. */
|
|
1245
|
-
reportBootMilestone(key) {
|
|
1246
|
-
void this.call("reportBootMilestone", { sessionId: this.config.sessionId, key }).catch(
|
|
1247
|
-
() => {
|
|
1248
|
-
}
|
|
1249
|
-
);
|
|
1250
|
-
}
|
|
1251
1128
|
// ── Typing indicators ───────────────────────────────────────────────
|
|
1252
1129
|
sendTypingStart() {
|
|
1253
1130
|
this.sendEvent({ type: "agent_typing_start" });
|
|
@@ -1336,9 +1213,8 @@ ${q.question}${q.options.length ? "\n" + q.options.map((o) => `- ${o.label}: ${o
|
|
|
1336
1213
|
refreshFromBootstrap() {
|
|
1337
1214
|
const none = Promise.resolve({ refreshedClaude: false, refreshedTaskToken: false });
|
|
1338
1215
|
const podBootstrapToken = process.env.POD_BOOTSTRAP_TOKEN;
|
|
1339
|
-
const codespaceName = process.env.CODESPACE_NAME;
|
|
1340
1216
|
const apiUrl = this.config.apiUrl;
|
|
1341
|
-
if (!apiUrl || !podBootstrapToken
|
|
1217
|
+
if (!apiUrl || !podBootstrapToken) {
|
|
1342
1218
|
return none;
|
|
1343
1219
|
}
|
|
1344
1220
|
const now = Date.now();
|
|
@@ -1346,50 +1222,7 @@ ${q.question}${q.options.length ? "\n" + q.options.map((o) => `- ${o.label}: ${o
|
|
|
1346
1222
|
return none;
|
|
1347
1223
|
}
|
|
1348
1224
|
this.lastTaskTokenRefreshAt = now;
|
|
1349
|
-
|
|
1350
|
-
return this.refreshFromV3Bootstrap(apiUrl, podBootstrapToken);
|
|
1351
|
-
}
|
|
1352
|
-
if (!codespaceName) return none;
|
|
1353
|
-
return this.refreshFromCodespaceBootstrap(apiUrl, codespaceName);
|
|
1354
|
-
}
|
|
1355
|
-
/** Legacy GitHub Codespaces refresh path — keys on instance name. */
|
|
1356
|
-
async refreshFromCodespaceBootstrap(apiUrl, codespaceName) {
|
|
1357
|
-
const bootstrapToken = process.env.CONVEYOR_BOOTSTRAP_TOKEN;
|
|
1358
|
-
const result = await fetchBootstrap({
|
|
1359
|
-
apiUrl,
|
|
1360
|
-
instanceName: codespaceName,
|
|
1361
|
-
bootstrapToken
|
|
1362
|
-
// Do not retry on http errors during a runtime refresh — a 401/403
|
|
1363
|
-
// means the token is consumed / session terminal and retrying won't
|
|
1364
|
-
// help. Network/timeout still retry inside fetchBootstrap.
|
|
1365
|
-
});
|
|
1366
|
-
if (!result.ok) {
|
|
1367
|
-
logger.warn("bootstrap refresh abandoned \u2014 pod credentials will go stale", {
|
|
1368
|
-
path: "codespace",
|
|
1369
|
-
reason: result.reason,
|
|
1370
|
-
status: result.status,
|
|
1371
|
-
attempts: result.attempts,
|
|
1372
|
-
detail: result.detail
|
|
1373
|
-
});
|
|
1374
|
-
return { refreshedClaude: false, refreshedTaskToken: false };
|
|
1375
|
-
}
|
|
1376
|
-
const previousTaskToken = process.env.CONVEYOR_TASK_TOKEN;
|
|
1377
|
-
applyBootstrapToEnv(result.config);
|
|
1378
|
-
const env = result.config.envVars ?? {};
|
|
1379
|
-
syncBundleGithubToken(env.CONVEYOR_GITHUB_TOKEN ?? env.GH_TOKEN ?? env.GITHUB_TOKEN);
|
|
1380
|
-
const refreshedTaskToken = result.config.mode !== "project" && Boolean(result.config.taskToken) && result.config.taskToken !== previousTaskToken;
|
|
1381
|
-
if (refreshedTaskToken && result.config.taskToken) {
|
|
1382
|
-
this.config.taskToken = result.config.taskToken;
|
|
1383
|
-
if (this.socket) {
|
|
1384
|
-
const auth = this.socket.auth;
|
|
1385
|
-
if (auth && typeof auth === "object") {
|
|
1386
|
-
auth.taskToken = result.config.taskToken;
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
this.heartbeatWorker?.postMessage({ taskToken: result.config.taskToken });
|
|
1390
|
-
}
|
|
1391
|
-
const refreshedClaude = Boolean(result.config.envVars?.CLAUDE_CODE_OAUTH_TOKEN);
|
|
1392
|
-
return { refreshedClaude, refreshedTaskToken };
|
|
1225
|
+
return this.refreshFromV3Bootstrap(apiUrl, podBootstrapToken);
|
|
1393
1226
|
}
|
|
1394
1227
|
/**
|
|
1395
1228
|
* v3 refresh: re-fetch the full bootstrap bundle from the pod's bound v3
|
|
@@ -1538,7 +1371,7 @@ ${q.question}${q.options.length ? "\n" + q.options.map((o) => `- ${o.label}: ${o
|
|
|
1538
1371
|
}
|
|
1539
1372
|
};
|
|
1540
1373
|
|
|
1541
|
-
// ../shared/dist/chunk-
|
|
1374
|
+
// ../shared/dist/chunk-SFSQ7NKP.js
|
|
1542
1375
|
import { z } from "zod";
|
|
1543
1376
|
import { z as z2 } from "zod";
|
|
1544
1377
|
var DEFAULT_SONNET_MODEL = "claude-sonnet-5-5";
|
|
@@ -1854,9 +1687,9 @@ async function runQueryGrafanaLogs(port, params, now = Date.now) {
|
|
|
1854
1687
|
// ../shared/dist/index.js
|
|
1855
1688
|
import { z as z3 } from "zod";
|
|
1856
1689
|
import { z as z22 } from "zod";
|
|
1857
|
-
import { z as z4 } from "zod";
|
|
1858
1690
|
import { z as z32 } from "zod";
|
|
1859
1691
|
import { z as z5 } from "zod";
|
|
1692
|
+
import { z as z4 } from "zod";
|
|
1860
1693
|
import { z as z6 } from "zod";
|
|
1861
1694
|
import { z as z7 } from "zod";
|
|
1862
1695
|
import { z as z8 } from "zod";
|
|
@@ -1866,6 +1699,7 @@ import { z as z11 } from "zod";
|
|
|
1866
1699
|
import { z as z12 } from "zod";
|
|
1867
1700
|
import { z as z13 } from "zod";
|
|
1868
1701
|
import { z as z14 } from "zod";
|
|
1702
|
+
import { z as z15 } from "zod";
|
|
1869
1703
|
var EXTERNAL_AGENT_MESSAGE_SOURCE = "external_agent";
|
|
1870
1704
|
var TUI_KINDS = ["claude-code", "opencode", "codex"];
|
|
1871
1705
|
var ACHIEVEMENT_RARITIES = [
|
|
@@ -1988,182 +1822,191 @@ var RUNNER_MODES = [
|
|
|
1988
1822
|
"shell",
|
|
1989
1823
|
"serving"
|
|
1990
1824
|
];
|
|
1991
|
-
var
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1825
|
+
var siteAssetExtension = z22.string().regex(/^[a-z0-9]{1,10}$/);
|
|
1826
|
+
var RequestSiteAssetUploadRequestSchema = z22.object({
|
|
1827
|
+
projectId: z22.string(),
|
|
1828
|
+
siteId: z22.string().min(1).max(100),
|
|
1829
|
+
sha256: z22.string().regex(/^[a-f0-9]{64}$/),
|
|
1830
|
+
ext: siteAssetExtension,
|
|
1831
|
+
sizeBytes: z22.number().int().positive()
|
|
1832
|
+
});
|
|
1833
|
+
var ListSiteAssetTargetsRequestSchema = z22.object({ projectId: z22.string() });
|
|
1834
|
+
var TurnEndToolCallSchema = z32.object({
|
|
1835
|
+
tool: z32.string(),
|
|
1836
|
+
input: z32.string().optional(),
|
|
1837
|
+
output: z32.string().optional(),
|
|
1838
|
+
timestamp: z32.string().optional()
|
|
1996
1839
|
}).passthrough();
|
|
1997
|
-
var AgentTurnUsageSchema =
|
|
1998
|
-
inputTokens:
|
|
1999
|
-
outputTokens:
|
|
2000
|
-
cacheReadInputTokens:
|
|
2001
|
-
cacheCreationInputTokens:
|
|
2002
|
-
totalTokens:
|
|
2003
|
-
});
|
|
2004
|
-
var KnownAgentEventSchema =
|
|
1840
|
+
var AgentTurnUsageSchema = z32.object({
|
|
1841
|
+
inputTokens: z32.number(),
|
|
1842
|
+
outputTokens: z32.number(),
|
|
1843
|
+
cacheReadInputTokens: z32.number(),
|
|
1844
|
+
cacheCreationInputTokens: z32.number(),
|
|
1845
|
+
totalTokens: z32.number()
|
|
1846
|
+
});
|
|
1847
|
+
var KnownAgentEventSchema = z32.discriminatedUnion("type", [
|
|
2005
1848
|
// ── Lifecycle / connection ────────────────────────────────────────────
|
|
2006
|
-
|
|
2007
|
-
type:
|
|
2008
|
-
sessionId:
|
|
2009
|
-
projectId:
|
|
1849
|
+
z32.object({
|
|
1850
|
+
type: z32.literal("connected"),
|
|
1851
|
+
sessionId: z32.string(),
|
|
1852
|
+
projectId: z32.string().optional()
|
|
2010
1853
|
}).passthrough(),
|
|
2011
1854
|
// Open-ended context snapshot spread from buildInitializationContext().
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
type:
|
|
2015
|
-
reason:
|
|
2016
|
-
attempt:
|
|
2017
|
-
attempts:
|
|
1855
|
+
z32.object({ type: z32.literal("session_manifest") }).passthrough(),
|
|
1856
|
+
z32.object({
|
|
1857
|
+
type: z32.literal("agent_runner_status"),
|
|
1858
|
+
reason: z32.string(),
|
|
1859
|
+
attempt: z32.number().optional(),
|
|
1860
|
+
attempts: z32.number().optional()
|
|
2018
1861
|
}).passthrough(),
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
1862
|
+
z32.object({ type: z32.literal("shutdown"), reason: z32.string().optional() }).passthrough(),
|
|
1863
|
+
z32.object({ type: z32.literal("mode_changed"), agentMode: z32.string() }).passthrough(),
|
|
1864
|
+
z32.object({ type: z32.literal("mode_transition"), from: z32.string(), to: z32.string() }).passthrough(),
|
|
2022
1865
|
// ── Turn stream ───────────────────────────────────────────────────────
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
type:
|
|
2027
|
-
tool:
|
|
1866
|
+
z32.object({ type: z32.literal("message"), content: z32.string() }).passthrough(),
|
|
1867
|
+
z32.object({ type: z32.literal("thinking"), message: z32.string() }).passthrough(),
|
|
1868
|
+
z32.object({
|
|
1869
|
+
type: z32.literal("tool_use"),
|
|
1870
|
+
tool: z32.string(),
|
|
2028
1871
|
// Producers send JSON.stringify(input); consumers defend against
|
|
2029
1872
|
// object inputs from older agents, so the wire stays permissive here.
|
|
2030
|
-
input:
|
|
1873
|
+
input: z32.unknown().optional()
|
|
2031
1874
|
}).passthrough(),
|
|
2032
|
-
|
|
2033
|
-
type:
|
|
2034
|
-
tool:
|
|
2035
|
-
output:
|
|
2036
|
-
isError:
|
|
2037
|
-
redactedCount:
|
|
1875
|
+
z32.object({
|
|
1876
|
+
type: z32.literal("tool_result"),
|
|
1877
|
+
tool: z32.string(),
|
|
1878
|
+
output: z32.unknown().optional(),
|
|
1879
|
+
isError: z32.boolean().optional(),
|
|
1880
|
+
redactedCount: z32.number().optional()
|
|
2038
1881
|
}).passthrough(),
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
type:
|
|
2042
|
-
summary:
|
|
2043
|
-
durationMs:
|
|
1882
|
+
z32.object({ type: z32.literal("turn_end"), toolCalls: z32.array(TurnEndToolCallSchema) }).passthrough(),
|
|
1883
|
+
z32.object({
|
|
1884
|
+
type: z32.literal("completed"),
|
|
1885
|
+
summary: z32.string().optional(),
|
|
1886
|
+
durationMs: z32.number().optional(),
|
|
2044
1887
|
/** Tokens this turn consumed, summed from the transcript's assistant
|
|
2045
1888
|
* records. Optional: an older agent build sends none, and the server
|
|
2046
1889
|
* then records nothing rather than zeroing the session's totals. */
|
|
2047
1890
|
usage: AgentTurnUsageSchema.optional()
|
|
2048
1891
|
}).passthrough(),
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
1892
|
+
z32.object({ type: z32.literal("error"), message: z32.string() }).passthrough(),
|
|
1893
|
+
z32.object({ type: z32.literal("agent_typing_start") }).passthrough(),
|
|
1894
|
+
z32.object({ type: z32.literal("agent_typing_stop") }).passthrough(),
|
|
2052
1895
|
// ── Telemetry ─────────────────────────────────────────────────────────
|
|
2053
1896
|
// heartbeat/typing: legacy telemetry the server still classifies as
|
|
2054
1897
|
// transient (TRANSIENT_EVENT_TYPES) — kept in the vocabulary.
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
type:
|
|
2059
|
-
contextTokens:
|
|
2060
|
-
contextWindow:
|
|
2061
|
-
inputTokens:
|
|
2062
|
-
cacheReadInputTokens:
|
|
2063
|
-
cacheCreationInputTokens:
|
|
2064
|
-
totalTokensUsed:
|
|
1898
|
+
z32.object({ type: z32.literal("heartbeat") }).passthrough(),
|
|
1899
|
+
z32.object({ type: z32.literal("typing") }).passthrough(),
|
|
1900
|
+
z32.object({
|
|
1901
|
+
type: z32.literal("context_update"),
|
|
1902
|
+
contextTokens: z32.number(),
|
|
1903
|
+
contextWindow: z32.number(),
|
|
1904
|
+
inputTokens: z32.number().optional(),
|
|
1905
|
+
cacheReadInputTokens: z32.number().optional(),
|
|
1906
|
+
cacheCreationInputTokens: z32.number().optional(),
|
|
1907
|
+
totalTokensUsed: z32.number().optional()
|
|
2065
1908
|
}).passthrough(),
|
|
2066
1909
|
// Four producer shapes share this type: {rateLimitType, utilization, status}
|
|
2067
1910
|
// (SDK rate_limit_event), {resetsAt} (agent-connection resume notice), the
|
|
2068
1911
|
// usage-sampler ({rateLimitType, utilization, status, resetsAt, gauges}
|
|
2069
1912
|
// — resetsAt matches rateLimitType; gauges survives via .passthrough()), and
|
|
2070
1913
|
// {unmeasurable, reason} (the sampler reporting it cannot read this key).
|
|
2071
|
-
|
|
2072
|
-
type:
|
|
2073
|
-
rateLimitType:
|
|
2074
|
-
utilization:
|
|
2075
|
-
status:
|
|
2076
|
-
resetsAt:
|
|
2077
|
-
unmeasurable:
|
|
2078
|
-
reason:
|
|
1914
|
+
z32.object({
|
|
1915
|
+
type: z32.literal("rate_limit_update"),
|
|
1916
|
+
rateLimitType: z32.string().optional(),
|
|
1917
|
+
utilization: z32.number().optional(),
|
|
1918
|
+
status: z32.string().optional(),
|
|
1919
|
+
resetsAt: z32.string().optional(),
|
|
1920
|
+
unmeasurable: z32.boolean().optional(),
|
|
1921
|
+
reason: z32.string().optional()
|
|
2079
1922
|
}).passthrough(),
|
|
2080
|
-
|
|
2081
|
-
type:
|
|
2082
|
-
trigger:
|
|
2083
|
-
preTokens:
|
|
1923
|
+
z32.object({
|
|
1924
|
+
type: z32.literal("context_compacted"),
|
|
1925
|
+
trigger: z32.string().optional(),
|
|
1926
|
+
preTokens: z32.number().optional()
|
|
2084
1927
|
}).passthrough(),
|
|
2085
|
-
|
|
2086
|
-
type:
|
|
2087
|
-
toolName:
|
|
2088
|
-
elapsedSeconds:
|
|
1928
|
+
z32.object({
|
|
1929
|
+
type: z32.literal("tool_progress"),
|
|
1930
|
+
toolName: z32.string().optional(),
|
|
1931
|
+
elapsedSeconds: z32.number().optional()
|
|
2089
1932
|
}).passthrough(),
|
|
2090
|
-
|
|
2091
|
-
type:
|
|
2092
|
-
sdkTaskId:
|
|
2093
|
-
description:
|
|
1933
|
+
z32.object({
|
|
1934
|
+
type: z32.literal("subagent_started"),
|
|
1935
|
+
sdkTaskId: z32.string().optional(),
|
|
1936
|
+
description: z32.string().optional()
|
|
2094
1937
|
}).passthrough(),
|
|
2095
|
-
|
|
2096
|
-
type:
|
|
2097
|
-
sdkTaskId:
|
|
2098
|
-
description:
|
|
2099
|
-
toolUses:
|
|
2100
|
-
durationMs:
|
|
1938
|
+
z32.object({
|
|
1939
|
+
type: z32.literal("subagent_progress"),
|
|
1940
|
+
sdkTaskId: z32.string().optional(),
|
|
1941
|
+
description: z32.string().optional(),
|
|
1942
|
+
toolUses: z32.number().optional(),
|
|
1943
|
+
durationMs: z32.number().optional()
|
|
2101
1944
|
}).passthrough(),
|
|
2102
1945
|
// ── Work products ─────────────────────────────────────────────────────
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
type:
|
|
2106
|
-
result:
|
|
2107
|
-
summary:
|
|
2108
|
-
issues:
|
|
2109
|
-
|
|
2110
|
-
file:
|
|
2111
|
-
line:
|
|
2112
|
-
severity:
|
|
2113
|
-
description:
|
|
1946
|
+
z32.object({ type: z32.literal("pr_created"), url: z32.string(), number: z32.number() }).passthrough(),
|
|
1947
|
+
z32.object({
|
|
1948
|
+
type: z32.literal("code_review_complete"),
|
|
1949
|
+
result: z32.enum(["approved", "changes_requested"]),
|
|
1950
|
+
summary: z32.string().optional(),
|
|
1951
|
+
issues: z32.array(
|
|
1952
|
+
z32.object({
|
|
1953
|
+
file: z32.string(),
|
|
1954
|
+
line: z32.number().optional(),
|
|
1955
|
+
severity: z32.string().optional(),
|
|
1956
|
+
description: z32.string().optional()
|
|
2114
1957
|
}).passthrough()
|
|
2115
1958
|
).optional()
|
|
2116
1959
|
}).passthrough(),
|
|
2117
1960
|
// ── Environment setup / start command ─────────────────────────────────
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
type:
|
|
2121
|
-
startCommandRunning:
|
|
2122
|
-
startCommandConfigured:
|
|
1961
|
+
z32.object({ type: z32.literal("setup_output"), stream: z32.string(), data: z32.string() }).passthrough(),
|
|
1962
|
+
z32.object({
|
|
1963
|
+
type: z32.literal("setup_complete"),
|
|
1964
|
+
startCommandRunning: z32.boolean().optional(),
|
|
1965
|
+
startCommandConfigured: z32.boolean().optional(),
|
|
2123
1966
|
// Sanitized server-side by sanitizeSessionPreviewPorts — stays unknown.
|
|
2124
|
-
previewPorts:
|
|
1967
|
+
previewPorts: z32.unknown().optional(),
|
|
2125
1968
|
// Sanitized server-side by sanitizeSessionPreviewLinks — stays unknown.
|
|
2126
|
-
previewLinks:
|
|
1969
|
+
previewLinks: z32.unknown().optional()
|
|
2127
1970
|
}).passthrough(),
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
type:
|
|
2133
|
-
code:
|
|
2134
|
-
signal:
|
|
2135
|
-
message:
|
|
1971
|
+
z32.object({ type: z32.literal("setup_error"), message: z32.string() }).passthrough(),
|
|
1972
|
+
z32.object({ type: z32.literal("start_command_started") }).passthrough(),
|
|
1973
|
+
z32.object({ type: z32.literal("start_command_output"), stream: z32.string(), data: z32.string() }).passthrough(),
|
|
1974
|
+
z32.object({
|
|
1975
|
+
type: z32.literal("start_command_exited"),
|
|
1976
|
+
code: z32.number().nullable().optional(),
|
|
1977
|
+
signal: z32.string().nullable().optional(),
|
|
1978
|
+
message: z32.string().optional()
|
|
2136
1979
|
}).passthrough(),
|
|
2137
|
-
|
|
1980
|
+
z32.object({ type: z32.literal("start_command_error"), message: z32.string() }).passthrough()
|
|
2138
1981
|
]);
|
|
2139
|
-
var AgentEventSchema =
|
|
1982
|
+
var AgentEventSchema = z32.union([
|
|
2140
1983
|
KnownAgentEventSchema,
|
|
2141
|
-
|
|
1984
|
+
z32.object({ type: z32.string().min(1) }).catchall(z32.unknown())
|
|
2142
1985
|
]);
|
|
2143
|
-
var PtyChatAtSchema =
|
|
2144
|
-
var PtyChatTurnUsageSchema =
|
|
2145
|
-
input:
|
|
2146
|
-
output:
|
|
2147
|
-
cacheRead:
|
|
2148
|
-
cacheWrite:
|
|
2149
|
-
});
|
|
2150
|
-
var PtyChatTurnFileSchema =
|
|
2151
|
-
path:
|
|
2152
|
-
added:
|
|
2153
|
-
removed:
|
|
1986
|
+
var PtyChatAtSchema = z4.string().max(40).optional();
|
|
1987
|
+
var PtyChatTurnUsageSchema = z4.object({
|
|
1988
|
+
input: z4.number().int().nonnegative(),
|
|
1989
|
+
output: z4.number().int().nonnegative(),
|
|
1990
|
+
cacheRead: z4.number().int().nonnegative(),
|
|
1991
|
+
cacheWrite: z4.number().int().nonnegative()
|
|
1992
|
+
});
|
|
1993
|
+
var PtyChatTurnFileSchema = z4.object({
|
|
1994
|
+
path: z4.string().max(500),
|
|
1995
|
+
added: z4.number().int(),
|
|
1996
|
+
removed: z4.number().int()
|
|
2154
1997
|
});
|
|
2155
1998
|
var PTY_CHAT_TURN_FILES_MAX = 50;
|
|
2156
|
-
var PtyChatEventPayloadSchema =
|
|
2157
|
-
|
|
2158
|
-
kind:
|
|
1999
|
+
var PtyChatEventPayloadSchema = z4.discriminatedUnion("kind", [
|
|
2000
|
+
z4.object({
|
|
2001
|
+
kind: z4.literal("init"),
|
|
2159
2002
|
at: PtyChatAtSchema,
|
|
2160
|
-
model:
|
|
2161
|
-
claudeSessionId:
|
|
2003
|
+
model: z4.string().max(200),
|
|
2004
|
+
claudeSessionId: z4.string().max(100).optional()
|
|
2162
2005
|
}),
|
|
2163
|
-
|
|
2164
|
-
kind:
|
|
2006
|
+
z4.object({
|
|
2007
|
+
kind: z4.literal("user_text"),
|
|
2165
2008
|
at: PtyChatAtSchema,
|
|
2166
|
-
text:
|
|
2009
|
+
text: z4.string().max(16384),
|
|
2167
2010
|
// Set by the SERVER (never the agent) when this prompt was injected by
|
|
2168
2011
|
// Conveyor rather than typed by a human — the routed message's `source`
|
|
2169
2012
|
// (`ci_success`, `review_trigger`, `automated_feedback`, …). The agent
|
|
@@ -2172,88 +2015,88 @@ var PtyChatEventPayloadSchema = z32.discriminatedUnion("kind", [
|
|
|
2172
2015
|
// builder chat renders "All CI checks passed on your PR." as the human's
|
|
2173
2016
|
// own bubble. Absent ⇒ a genuine human prompt. Exception: the AGENT sets
|
|
2174
2017
|
// `model_switch` on the notice it emits after a live model/effort switch.
|
|
2175
|
-
source:
|
|
2018
|
+
source: z4.string().max(60).optional()
|
|
2176
2019
|
}),
|
|
2177
|
-
|
|
2178
|
-
kind:
|
|
2020
|
+
z4.object({
|
|
2021
|
+
kind: z4.literal("assistant_text"),
|
|
2179
2022
|
at: PtyChatAtSchema,
|
|
2180
|
-
text:
|
|
2181
|
-
model:
|
|
2023
|
+
text: z4.string().max(16384),
|
|
2024
|
+
model: z4.string().max(200).optional()
|
|
2182
2025
|
}),
|
|
2183
|
-
|
|
2184
|
-
kind:
|
|
2026
|
+
z4.object({
|
|
2027
|
+
kind: z4.literal("tool_use"),
|
|
2185
2028
|
at: PtyChatAtSchema,
|
|
2186
|
-
name:
|
|
2029
|
+
name: z4.string().max(200),
|
|
2187
2030
|
// Compact preview: JSON.stringify(input) truncated agent-side. The cap
|
|
2188
2031
|
// matches the text events because AskUserQuestion payloads ride this field
|
|
2189
2032
|
// and the web lifts them into an interactive card — a tight cap forced
|
|
2190
2033
|
// option descriptions down to 80 chars, making them unreadable. Every
|
|
2191
2034
|
// other tool keeps a far smaller agent-side budget (`TOOL_INPUT_MAX` in
|
|
2192
2035
|
// `chat-record-mapper.ts`), so the ring does not grow for normal calls.
|
|
2193
|
-
input:
|
|
2036
|
+
input: z4.string().max(16384),
|
|
2194
2037
|
// Transcript tool_use block id — lets the client pair the tool_result.
|
|
2195
|
-
id:
|
|
2038
|
+
id: z4.string().max(100).optional()
|
|
2196
2039
|
}),
|
|
2197
|
-
|
|
2198
|
-
kind:
|
|
2040
|
+
z4.object({
|
|
2041
|
+
kind: z4.literal("tool_result"),
|
|
2199
2042
|
at: PtyChatAtSchema,
|
|
2200
2043
|
// tool_use block id this result answers (absent on malformed records).
|
|
2201
|
-
toolUseId:
|
|
2044
|
+
toolUseId: z4.string().max(100).optional(),
|
|
2202
2045
|
// Compact output preview, truncated agent-side.
|
|
2203
|
-
output:
|
|
2204
|
-
isError:
|
|
2046
|
+
output: z4.string().max(2e3),
|
|
2047
|
+
isError: z4.boolean().optional()
|
|
2205
2048
|
}),
|
|
2206
|
-
|
|
2207
|
-
kind:
|
|
2049
|
+
z4.object({
|
|
2050
|
+
kind: z4.literal("turn_end"),
|
|
2208
2051
|
at: PtyChatAtSchema,
|
|
2209
2052
|
// Wall-clock turn length as the CLI measured it ("Worked for 23s").
|
|
2210
|
-
durationMs:
|
|
2053
|
+
durationMs: z4.number().int().nonnegative().optional(),
|
|
2211
2054
|
// Last model that answered in this turn.
|
|
2212
|
-
model:
|
|
2055
|
+
model: z4.string().max(200).optional(),
|
|
2213
2056
|
// Token usage summed over the turn's API responses.
|
|
2214
2057
|
usage: PtyChatTurnUsageSchema.optional(),
|
|
2215
2058
|
// Files the turn edited, with line counts. Absent when nothing was edited.
|
|
2216
|
-
files:
|
|
2059
|
+
files: z4.array(PtyChatTurnFileSchema).max(PTY_CHAT_TURN_FILES_MAX).optional()
|
|
2217
2060
|
})
|
|
2218
2061
|
]);
|
|
2219
|
-
var PtyChatEventRequestSchema =
|
|
2220
|
-
sessionId:
|
|
2062
|
+
var PtyChatEventRequestSchema = z4.object({
|
|
2063
|
+
sessionId: z4.string(),
|
|
2221
2064
|
event: PtyChatEventPayloadSchema
|
|
2222
2065
|
});
|
|
2223
|
-
var PtyChatAttachRequestSchema =
|
|
2224
|
-
sessionId:
|
|
2066
|
+
var PtyChatAttachRequestSchema = z4.object({
|
|
2067
|
+
sessionId: z4.string()
|
|
2225
2068
|
});
|
|
2226
2069
|
var PTY_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"];
|
|
2227
|
-
var SetPtyModelEffortRequestSchema =
|
|
2228
|
-
sessionId:
|
|
2229
|
-
model:
|
|
2230
|
-
effort:
|
|
2070
|
+
var SetPtyModelEffortRequestSchema = z4.object({
|
|
2071
|
+
sessionId: z4.string(),
|
|
2072
|
+
model: z4.string().min(1).max(200).optional(),
|
|
2073
|
+
effort: z4.enum(PTY_EFFORT_LEVELS).optional()
|
|
2231
2074
|
}).refine((p) => p.model !== void 0 || p.effort !== void 0, {
|
|
2232
2075
|
message: "model or effort is required"
|
|
2233
2076
|
});
|
|
2234
|
-
var cardDescription =
|
|
2235
|
-
var AgentHeartbeatSchema =
|
|
2236
|
-
sessionId:
|
|
2237
|
-
timestamp:
|
|
2238
|
-
status:
|
|
2239
|
-
currentAction:
|
|
2077
|
+
var cardDescription = z5.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
|
|
2078
|
+
var AgentHeartbeatSchema = z5.object({
|
|
2079
|
+
sessionId: z5.string().optional(),
|
|
2080
|
+
timestamp: z5.string(),
|
|
2081
|
+
status: z5.enum(["active", "idle", "building"]),
|
|
2082
|
+
currentAction: z5.string().optional(),
|
|
2240
2083
|
/** Sender-observed main event-loop lag (ms) — see AgentHeartbeat.loopLagMs. */
|
|
2241
|
-
loopLagMs:
|
|
2084
|
+
loopLagMs: z5.number().nonnegative().optional()
|
|
2242
2085
|
});
|
|
2243
|
-
var CreatePRInputSchema =
|
|
2244
|
-
title:
|
|
2245
|
-
body:
|
|
2246
|
-
head:
|
|
2247
|
-
base:
|
|
2086
|
+
var CreatePRInputSchema = z5.object({
|
|
2087
|
+
title: z5.string().min(1),
|
|
2088
|
+
body: z5.string(),
|
|
2089
|
+
head: z5.string().optional(),
|
|
2090
|
+
base: z5.string().optional()
|
|
2248
2091
|
});
|
|
2249
|
-
var PostToChatInputSchema =
|
|
2250
|
-
message:
|
|
2251
|
-
type:
|
|
2252
|
-
milestone:
|
|
2092
|
+
var PostToChatInputSchema = z5.object({
|
|
2093
|
+
message: z5.string().min(1),
|
|
2094
|
+
type: z5.enum(["message", "question", "update"]).optional().default("message"),
|
|
2095
|
+
milestone: z5.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
2253
2096
|
});
|
|
2254
|
-
var GetTaskContextRequestSchema =
|
|
2255
|
-
sessionId:
|
|
2256
|
-
includeHistory:
|
|
2097
|
+
var GetTaskContextRequestSchema = z5.object({
|
|
2098
|
+
sessionId: z5.string(),
|
|
2099
|
+
includeHistory: z5.boolean().optional().default(false),
|
|
2257
2100
|
/**
|
|
2258
2101
|
* Read the plan-revised marker WITHOUT consuming it. Bookkeeping fetches
|
|
2259
2102
|
* (the session-identity check, the branch refresh) pass true so they cannot
|
|
@@ -2261,293 +2104,291 @@ var GetTaskContextRequestSchema = z4.object({
|
|
|
2261
2104
|
* Defaults to false — consuming — so a pod running an older agent build still
|
|
2262
2105
|
* clears the marker instead of showing the notice on every boot forever.
|
|
2263
2106
|
*/
|
|
2264
|
-
peekPlanRevision:
|
|
2107
|
+
peekPlanRevision: z5.boolean().optional().default(false)
|
|
2265
2108
|
});
|
|
2266
|
-
var GetChatMessagesRequestSchema =
|
|
2267
|
-
sessionId:
|
|
2268
|
-
limit:
|
|
2269
|
-
offset:
|
|
2109
|
+
var GetChatMessagesRequestSchema = z5.object({
|
|
2110
|
+
sessionId: z5.string(),
|
|
2111
|
+
limit: z5.number().int().positive().optional().default(50),
|
|
2112
|
+
offset: z5.number().int().nonnegative().optional().default(0),
|
|
2270
2113
|
/** Task id or slug to read chat from. Omit for the session's own task. Only
|
|
2271
2114
|
* the session's own task or one of its children resolves — anything else is
|
|
2272
2115
|
* an error, never a silent fallback to the caller's own chat. */
|
|
2273
|
-
taskId:
|
|
2116
|
+
taskId: z5.string().optional()
|
|
2274
2117
|
});
|
|
2275
|
-
var GetTaskFilesRequestSchema =
|
|
2276
|
-
sessionId:
|
|
2277
|
-
taskId:
|
|
2118
|
+
var GetTaskFilesRequestSchema = z5.object({
|
|
2119
|
+
sessionId: z5.string(),
|
|
2120
|
+
taskId: z5.string().optional()
|
|
2278
2121
|
});
|
|
2279
|
-
var GetTaskFileRequestSchema =
|
|
2280
|
-
sessionId:
|
|
2281
|
-
fileId:
|
|
2282
|
-
taskId:
|
|
2122
|
+
var GetTaskFileRequestSchema = z5.object({
|
|
2123
|
+
sessionId: z5.string(),
|
|
2124
|
+
fileId: z5.string(),
|
|
2125
|
+
taskId: z5.string().optional(),
|
|
2126
|
+
/** Ask for a short-lived `agentDownloadUrl` when the bytes are not inlined. */
|
|
2127
|
+
agentDownload: z5.boolean().optional()
|
|
2283
2128
|
});
|
|
2284
|
-
var DeleteTaskFileRequestSchema =
|
|
2285
|
-
sessionId:
|
|
2286
|
-
fileId:
|
|
2129
|
+
var DeleteTaskFileRequestSchema = z5.object({
|
|
2130
|
+
sessionId: z5.string(),
|
|
2131
|
+
fileId: z5.string()
|
|
2287
2132
|
});
|
|
2288
|
-
var SetTaskFileShowcaseRequestSchema =
|
|
2289
|
-
sessionId:
|
|
2290
|
-
fileId:
|
|
2291
|
-
showcase:
|
|
2133
|
+
var SetTaskFileShowcaseRequestSchema = z5.object({
|
|
2134
|
+
sessionId: z5.string(),
|
|
2135
|
+
fileId: z5.string(),
|
|
2136
|
+
showcase: z5.boolean()
|
|
2292
2137
|
});
|
|
2293
|
-
var GetTaskRequestSchema =
|
|
2294
|
-
sessionId:
|
|
2295
|
-
taskSlugOrId:
|
|
2138
|
+
var GetTaskRequestSchema = z5.object({
|
|
2139
|
+
sessionId: z5.string(),
|
|
2140
|
+
taskSlugOrId: z5.string()
|
|
2296
2141
|
});
|
|
2297
|
-
var GetCliHistoryRequestSchema =
|
|
2298
|
-
sessionId:
|
|
2299
|
-
limit:
|
|
2300
|
-
source:
|
|
2142
|
+
var GetCliHistoryRequestSchema = z5.object({
|
|
2143
|
+
sessionId: z5.string(),
|
|
2144
|
+
limit: z5.number().int().positive().optional().default(100),
|
|
2145
|
+
source: z5.enum(["agent", "application"]).optional(),
|
|
2301
2146
|
/** Task id or slug to read logs from. Omit for the session's own task. Only
|
|
2302
2147
|
* the session's own task or one of its children resolves — anything else is
|
|
2303
2148
|
* an error, never a silent fallback to the caller's own logs. */
|
|
2304
|
-
taskId:
|
|
2149
|
+
taskId: z5.string().optional()
|
|
2305
2150
|
});
|
|
2306
|
-
var ListSubtasksRequestSchema =
|
|
2307
|
-
sessionId:
|
|
2151
|
+
var ListSubtasksRequestSchema = z5.object({
|
|
2152
|
+
sessionId: z5.string(),
|
|
2308
2153
|
/** "compact" returns the slim orchestration view (ListSubtasksCompactResponse:
|
|
2309
2154
|
* per-child status, agent, story points, PR state, dependencies); "full" (default — wire-compat with older
|
|
2310
2155
|
* agents) returns the verbose SubtaskSummaryDTO[] including description/plan. */
|
|
2311
|
-
view:
|
|
2156
|
+
view: z5.enum(["compact", "full"]).optional()
|
|
2312
2157
|
});
|
|
2313
|
-
var GetDependenciesRequestSchema =
|
|
2314
|
-
sessionId:
|
|
2158
|
+
var GetDependenciesRequestSchema = z5.object({
|
|
2159
|
+
sessionId: z5.string()
|
|
2315
2160
|
});
|
|
2316
|
-
var GetSuggestionsRequestSchema =
|
|
2317
|
-
sessionId:
|
|
2318
|
-
status:
|
|
2319
|
-
limit:
|
|
2161
|
+
var GetSuggestionsRequestSchema = z5.object({
|
|
2162
|
+
sessionId: z5.string(),
|
|
2163
|
+
status: z5.string().optional(),
|
|
2164
|
+
limit: z5.number().int().min(1).max(100).optional()
|
|
2320
2165
|
});
|
|
2321
|
-
var ListManualTestsRequestSchema =
|
|
2322
|
-
sessionId:
|
|
2166
|
+
var ListManualTestsRequestSchema = z5.object({
|
|
2167
|
+
sessionId: z5.string()
|
|
2323
2168
|
});
|
|
2324
|
-
var QueryManualTestsRequestSchema =
|
|
2325
|
-
sessionId:
|
|
2326
|
-
cardStatuses:
|
|
2327
|
-
testStatuses:
|
|
2169
|
+
var QueryManualTestsRequestSchema = z5.object({
|
|
2170
|
+
sessionId: z5.string(),
|
|
2171
|
+
cardStatuses: z5.array(z5.string()).optional(),
|
|
2172
|
+
testStatuses: z5.array(z5.enum(["open", "approved", "rejected"])).optional()
|
|
2328
2173
|
});
|
|
2329
|
-
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId:
|
|
2330
|
-
var RequestFileUploadRequestSchema =
|
|
2331
|
-
sessionId:
|
|
2332
|
-
fileName:
|
|
2333
|
-
mimeType:
|
|
2334
|
-
fileSize:
|
|
2174
|
+
var CreatePullRequestRequestSchema = CreatePRInputSchema.extend({ sessionId: z5.string() });
|
|
2175
|
+
var RequestFileUploadRequestSchema = z5.object({
|
|
2176
|
+
sessionId: z5.string(),
|
|
2177
|
+
fileName: z5.string().min(1).max(255),
|
|
2178
|
+
mimeType: z5.string().min(1).max(128),
|
|
2179
|
+
fileSize: z5.number().int().positive().max(MAX_FILE_SIZE_BYTES)
|
|
2335
2180
|
});
|
|
2336
|
-
var ConfirmFileUploadRequestSchema =
|
|
2337
|
-
sessionId:
|
|
2338
|
-
fileId:
|
|
2339
|
-
title:
|
|
2181
|
+
var ConfirmFileUploadRequestSchema = z5.object({
|
|
2182
|
+
sessionId: z5.string(),
|
|
2183
|
+
fileId: z5.string(),
|
|
2184
|
+
title: z5.string().max(500).optional(),
|
|
2340
2185
|
/** Glossary tag names (or ids) this file is an example of. */
|
|
2341
|
-
tags:
|
|
2186
|
+
tags: z5.array(z5.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS).optional(),
|
|
2342
2187
|
/** Mark the file as the card's showcase (the deliverable). */
|
|
2343
|
-
showcase:
|
|
2188
|
+
showcase: z5.boolean().optional(),
|
|
2344
2189
|
/** Id of an older file on the same card this upload replaces. */
|
|
2345
|
-
supersedes:
|
|
2190
|
+
supersedes: z5.string().min(1).max(64).optional()
|
|
2346
2191
|
});
|
|
2347
|
-
var UpdateTaskStatusRequestSchema =
|
|
2348
|
-
sessionId:
|
|
2349
|
-
status:
|
|
2350
|
-
force:
|
|
2192
|
+
var UpdateTaskStatusRequestSchema = z5.object({
|
|
2193
|
+
sessionId: z5.string(),
|
|
2194
|
+
status: z5.string(),
|
|
2195
|
+
force: z5.boolean().optional().default(false)
|
|
2351
2196
|
});
|
|
2352
|
-
var StoreSessionIdRequestSchema =
|
|
2353
|
-
sessionId:
|
|
2354
|
-
sdkSessionId:
|
|
2197
|
+
var StoreSessionIdRequestSchema = z5.object({
|
|
2198
|
+
sessionId: z5.string(),
|
|
2199
|
+
sdkSessionId: z5.string()
|
|
2355
2200
|
});
|
|
2356
|
-
var SetManualTestsRequestSchema =
|
|
2357
|
-
sessionId:
|
|
2201
|
+
var SetManualTestsRequestSchema = z5.object({
|
|
2202
|
+
sessionId: z5.string(),
|
|
2358
2203
|
items: ManualTestItemsSchema
|
|
2359
2204
|
});
|
|
2360
|
-
var EditManualTestRequestSchema =
|
|
2361
|
-
sessionId:
|
|
2362
|
-
title:
|
|
2363
|
-
newTitle:
|
|
2205
|
+
var EditManualTestRequestSchema = z5.object({
|
|
2206
|
+
sessionId: z5.string(),
|
|
2207
|
+
title: z5.string().min(1),
|
|
2208
|
+
newTitle: z5.string().min(1)
|
|
2364
2209
|
});
|
|
2365
|
-
var RemoveManualTestRequestSchema =
|
|
2366
|
-
sessionId:
|
|
2367
|
-
title:
|
|
2210
|
+
var RemoveManualTestRequestSchema = z5.object({
|
|
2211
|
+
sessionId: z5.string(),
|
|
2212
|
+
title: z5.string().min(1)
|
|
2368
2213
|
});
|
|
2369
|
-
var ApproveManualTestRequestSchema =
|
|
2370
|
-
sessionId:
|
|
2371
|
-
title:
|
|
2214
|
+
var ApproveManualTestRequestSchema = z5.object({
|
|
2215
|
+
sessionId: z5.string(),
|
|
2216
|
+
title: z5.string().min(1)
|
|
2372
2217
|
});
|
|
2373
|
-
var RejectManualTestRequestSchema =
|
|
2374
|
-
sessionId:
|
|
2375
|
-
title:
|
|
2376
|
-
reason:
|
|
2218
|
+
var RejectManualTestRequestSchema = z5.object({
|
|
2219
|
+
sessionId: z5.string(),
|
|
2220
|
+
title: z5.string().min(1),
|
|
2221
|
+
reason: z5.string().min(1).max(2e3)
|
|
2377
2222
|
});
|
|
2378
|
-
var SessionStartRequestSchema =
|
|
2379
|
-
sessionId:
|
|
2380
|
-
agentVersion:
|
|
2381
|
-
capabilities:
|
|
2223
|
+
var SessionStartRequestSchema = z5.object({
|
|
2224
|
+
sessionId: z5.string(),
|
|
2225
|
+
agentVersion: z5.string(),
|
|
2226
|
+
capabilities: z5.array(z5.string())
|
|
2382
2227
|
});
|
|
2383
|
-
var SessionStopRequestSchema =
|
|
2384
|
-
sessionId:
|
|
2385
|
-
reason:
|
|
2228
|
+
var SessionStopRequestSchema = z5.object({
|
|
2229
|
+
sessionId: z5.string(),
|
|
2230
|
+
reason: z5.string().optional()
|
|
2386
2231
|
});
|
|
2387
|
-
var EndReviewSessionRequestSchema =
|
|
2388
|
-
sessionId:
|
|
2389
|
-
reason:
|
|
2232
|
+
var EndReviewSessionRequestSchema = z5.object({
|
|
2233
|
+
sessionId: z5.string(),
|
|
2234
|
+
reason: z5.enum(["approved", "changes_requested", "finished"]).optional()
|
|
2390
2235
|
});
|
|
2391
|
-
var ConnectAgentRequestSchema =
|
|
2392
|
-
sessionId:
|
|
2236
|
+
var ConnectAgentRequestSchema = z5.object({
|
|
2237
|
+
sessionId: z5.string()
|
|
2393
2238
|
});
|
|
2394
|
-
var ReportAgentStatusRequestSchema =
|
|
2395
|
-
sessionId:
|
|
2396
|
-
status:
|
|
2239
|
+
var ReportAgentStatusRequestSchema = z5.object({
|
|
2240
|
+
sessionId: z5.string(),
|
|
2241
|
+
status: z5.string(),
|
|
2397
2242
|
/** Why the agent reports this status (e.g. "user_question" while an AskUserQuestion questionnaire is pending in the TUI). */
|
|
2398
|
-
reason:
|
|
2243
|
+
reason: z5.string().optional(),
|
|
2399
2244
|
/**
|
|
2400
2245
|
* The pending question text, sent only alongside `reason: "user_question"`
|
|
2401
2246
|
* so the server can surface it in the user-question notification body (and
|
|
2402
2247
|
* thus the Attention feed) instead of a generic string. Optional: older
|
|
2403
2248
|
* agents omit it and the server falls back to the generic wording.
|
|
2404
2249
|
*/
|
|
2405
|
-
questionText:
|
|
2406
|
-
});
|
|
2407
|
-
var NotifyAgentVersionRequestSchema = z4.object({
|
|
2408
|
-
sessionId: z4.string(),
|
|
2409
|
-
agentVersion: z4.string()
|
|
2250
|
+
questionText: z5.string().optional()
|
|
2410
2251
|
});
|
|
2411
|
-
var
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
protocol: z4.enum(["http", "tcp"]).optional(),
|
|
2415
|
-
detectedAt: z4.string(),
|
|
2416
|
-
hidden: z4.boolean().optional()
|
|
2252
|
+
var NotifyAgentVersionRequestSchema = z5.object({
|
|
2253
|
+
sessionId: z5.string(),
|
|
2254
|
+
agentVersion: z5.string()
|
|
2417
2255
|
});
|
|
2418
|
-
var
|
|
2419
|
-
|
|
2420
|
-
|
|
2256
|
+
var DiscoveredPortSchema = z5.object({
|
|
2257
|
+
port: z5.number().int().min(1).max(65535),
|
|
2258
|
+
label: z5.string().min(1).max(64).optional(),
|
|
2259
|
+
protocol: z5.enum(["http", "tcp"]).optional(),
|
|
2260
|
+
detectedAt: z5.string(),
|
|
2261
|
+
hidden: z5.boolean().optional()
|
|
2421
2262
|
});
|
|
2422
|
-
var
|
|
2423
|
-
sessionId:
|
|
2424
|
-
|
|
2263
|
+
var ReportDiscoveredPortsRequestSchema = z5.object({
|
|
2264
|
+
sessionId: z5.string(),
|
|
2265
|
+
ports: z5.array(DiscoveredPortSchema).max(64)
|
|
2425
2266
|
});
|
|
2426
|
-
var CreateSubtaskRequestSchema =
|
|
2427
|
-
sessionId:
|
|
2428
|
-
title:
|
|
2267
|
+
var CreateSubtaskRequestSchema = z5.object({
|
|
2268
|
+
sessionId: z5.string(),
|
|
2269
|
+
title: z5.string().min(1),
|
|
2429
2270
|
description: cardDescription,
|
|
2430
|
-
plan:
|
|
2431
|
-
storyPointValue:
|
|
2432
|
-
ordinal:
|
|
2433
|
-
followParentStatus:
|
|
2271
|
+
plan: z5.string().optional(),
|
|
2272
|
+
storyPointValue: z5.number().int().positive().optional(),
|
|
2273
|
+
ordinal: z5.number().int().nonnegative().optional(),
|
|
2274
|
+
followParentStatus: z5.boolean().optional(),
|
|
2434
2275
|
/** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
|
|
2435
2276
|
* metadata — preferred over encoding order in plan text / ordinal). */
|
|
2436
|
-
dependsOn:
|
|
2277
|
+
dependsOn: z5.array(z5.string().min(1)).max(32).optional(),
|
|
2437
2278
|
/** Glossary tag names to assign to the child. Unmatched names come back in
|
|
2438
2279
|
* the response rather than failing the create. */
|
|
2439
|
-
tags:
|
|
2280
|
+
tags: z5.array(z5.string().min(1)).max(10).optional()
|
|
2440
2281
|
});
|
|
2441
|
-
var UpdateSubtaskRequestSchema =
|
|
2442
|
-
sessionId:
|
|
2443
|
-
subtaskId:
|
|
2444
|
-
title:
|
|
2282
|
+
var UpdateSubtaskRequestSchema = z5.object({
|
|
2283
|
+
sessionId: z5.string(),
|
|
2284
|
+
subtaskId: z5.string(),
|
|
2285
|
+
title: z5.string().min(1).optional(),
|
|
2445
2286
|
description: cardDescription,
|
|
2446
|
-
plan:
|
|
2287
|
+
plan: z5.string().optional(),
|
|
2447
2288
|
/** Orchestration statuses only ("Planning" | "Open") — the pack parent's
|
|
2448
2289
|
* sanctioned promotion path. Execution statuses stay with the build
|
|
2449
2290
|
* pipeline / force_update_task_status. Enforced server-side. */
|
|
2450
|
-
status:
|
|
2291
|
+
status: z5.string().optional(),
|
|
2451
2292
|
/** Assign a project agent to the child — accepts the agent's id or exact
|
|
2452
2293
|
* name; resolved against the parent task's project server-side. */
|
|
2453
|
-
agentIdOrName:
|
|
2454
|
-
storyPointValue:
|
|
2455
|
-
followParentStatus:
|
|
2294
|
+
agentIdOrName: z5.string().min(1).optional(),
|
|
2295
|
+
storyPointValue: z5.number().int().positive().optional(),
|
|
2296
|
+
followParentStatus: z5.boolean().optional(),
|
|
2456
2297
|
/** Replace this subtask's dependency edges with these sibling ids/slugs.
|
|
2457
2298
|
* Empty array clears all. Omit to leave dependencies unchanged. */
|
|
2458
|
-
dependsOn:
|
|
2299
|
+
dependsOn: z5.array(z5.string().min(1)).max(32).optional()
|
|
2459
2300
|
});
|
|
2460
|
-
var DeleteSubtaskRequestSchema =
|
|
2461
|
-
sessionId:
|
|
2462
|
-
subtaskId:
|
|
2301
|
+
var DeleteSubtaskRequestSchema = z5.object({
|
|
2302
|
+
sessionId: z5.string(),
|
|
2303
|
+
subtaskId: z5.string()
|
|
2463
2304
|
});
|
|
2464
|
-
var SetSubtaskParentRequestSchema =
|
|
2465
|
-
sessionId:
|
|
2466
|
-
taskId:
|
|
2467
|
-
detach:
|
|
2468
|
-
ordinal:
|
|
2469
|
-
followParentStatus:
|
|
2305
|
+
var SetSubtaskParentRequestSchema = z5.object({
|
|
2306
|
+
sessionId: z5.string(),
|
|
2307
|
+
taskId: z5.string().min(1),
|
|
2308
|
+
detach: z5.boolean().optional(),
|
|
2309
|
+
ordinal: z5.number().int().nonnegative().optional(),
|
|
2310
|
+
followParentStatus: z5.boolean().optional()
|
|
2470
2311
|
});
|
|
2471
|
-
var GetTaskPropertiesRequestSchema =
|
|
2472
|
-
sessionId:
|
|
2312
|
+
var GetTaskPropertiesRequestSchema = z5.object({
|
|
2313
|
+
sessionId: z5.string()
|
|
2473
2314
|
});
|
|
2474
|
-
var UpdateTaskFieldsRequestSchema =
|
|
2475
|
-
sessionId:
|
|
2476
|
-
plan:
|
|
2315
|
+
var UpdateTaskFieldsRequestSchema = z5.object({
|
|
2316
|
+
sessionId: z5.string(),
|
|
2317
|
+
plan: z5.string().optional(),
|
|
2477
2318
|
description: cardDescription
|
|
2478
2319
|
});
|
|
2479
|
-
var UpdateTaskPropertiesRequestSchema =
|
|
2480
|
-
sessionId:
|
|
2481
|
-
title:
|
|
2482
|
-
storyPointValue:
|
|
2483
|
-
tagIds:
|
|
2484
|
-
tagNames:
|
|
2485
|
-
githubPRUrl:
|
|
2486
|
-
githubBranch:
|
|
2320
|
+
var UpdateTaskPropertiesRequestSchema = z5.object({
|
|
2321
|
+
sessionId: z5.string(),
|
|
2322
|
+
title: z5.string().optional(),
|
|
2323
|
+
storyPointValue: z5.number().int().positive().optional(),
|
|
2324
|
+
tagIds: z5.array(z5.string()).optional(),
|
|
2325
|
+
tagNames: z5.array(z5.string()).optional(),
|
|
2326
|
+
githubPRUrl: z5.string().url().optional(),
|
|
2327
|
+
githubBranch: z5.string().optional(),
|
|
2487
2328
|
// Canonical risk level, or null to clear — same semantics as the headless
|
|
2488
2329
|
// update_task boundary (resolved to the project's Risk row in the handler).
|
|
2489
2330
|
risk: riskLevelSchema.nullable().optional()
|
|
2490
2331
|
});
|
|
2491
|
-
var ListIconsRequestSchema =
|
|
2492
|
-
sessionId:
|
|
2332
|
+
var ListIconsRequestSchema = z5.object({
|
|
2333
|
+
sessionId: z5.string()
|
|
2493
2334
|
});
|
|
2494
|
-
var GenerateTaskIconRequestSchema =
|
|
2495
|
-
sessionId:
|
|
2496
|
-
prompt:
|
|
2497
|
-
aspectRatio:
|
|
2335
|
+
var GenerateTaskIconRequestSchema = z5.object({
|
|
2336
|
+
sessionId: z5.string(),
|
|
2337
|
+
prompt: z5.string().min(1),
|
|
2338
|
+
aspectRatio: z5.string().optional()
|
|
2498
2339
|
});
|
|
2499
|
-
var SearchFaIconsRequestSchema =
|
|
2500
|
-
sessionId:
|
|
2501
|
-
query:
|
|
2502
|
-
first:
|
|
2340
|
+
var SearchFaIconsRequestSchema = z5.object({
|
|
2341
|
+
sessionId: z5.string(),
|
|
2342
|
+
query: z5.string().min(1),
|
|
2343
|
+
first: z5.number().int().positive().optional()
|
|
2503
2344
|
});
|
|
2504
|
-
var PickFaIconRequestSchema =
|
|
2505
|
-
sessionId:
|
|
2506
|
-
fontAwesomeId:
|
|
2507
|
-
fontAwesomeStyle:
|
|
2345
|
+
var PickFaIconRequestSchema = z5.object({
|
|
2346
|
+
sessionId: z5.string(),
|
|
2347
|
+
fontAwesomeId: z5.string().min(1),
|
|
2348
|
+
fontAwesomeStyle: z5.string().optional()
|
|
2508
2349
|
});
|
|
2509
|
-
var CreateFollowUpTaskRequestSchema =
|
|
2510
|
-
sessionId:
|
|
2511
|
-
title:
|
|
2350
|
+
var CreateFollowUpTaskRequestSchema = z5.object({
|
|
2351
|
+
sessionId: z5.string(),
|
|
2352
|
+
title: z5.string().min(1),
|
|
2512
2353
|
description: cardDescription,
|
|
2513
|
-
plan:
|
|
2514
|
-
storyPointValue:
|
|
2354
|
+
plan: z5.string().optional(),
|
|
2355
|
+
storyPointValue: z5.number().int().positive().optional()
|
|
2515
2356
|
});
|
|
2516
|
-
var AddDependencyRequestSchema =
|
|
2517
|
-
sessionId:
|
|
2518
|
-
dependsOnSlugOrId:
|
|
2357
|
+
var AddDependencyRequestSchema = z5.object({
|
|
2358
|
+
sessionId: z5.string(),
|
|
2359
|
+
dependsOnSlugOrId: z5.string()
|
|
2519
2360
|
});
|
|
2520
|
-
var RemoveDependencyRequestSchema =
|
|
2521
|
-
sessionId:
|
|
2522
|
-
dependsOnSlugOrId:
|
|
2361
|
+
var RemoveDependencyRequestSchema = z5.object({
|
|
2362
|
+
sessionId: z5.string(),
|
|
2363
|
+
dependsOnSlugOrId: z5.string()
|
|
2523
2364
|
});
|
|
2524
|
-
var CreateSuggestionRequestSchema =
|
|
2525
|
-
sessionId:
|
|
2526
|
-
title:
|
|
2365
|
+
var CreateSuggestionRequestSchema = z5.object({
|
|
2366
|
+
sessionId: z5.string(),
|
|
2367
|
+
title: z5.string().min(1),
|
|
2527
2368
|
description: cardDescription,
|
|
2528
|
-
tagNames:
|
|
2369
|
+
tagNames: z5.array(z5.string()).optional()
|
|
2529
2370
|
});
|
|
2530
|
-
var VoteSuggestionRequestSchema =
|
|
2531
|
-
sessionId:
|
|
2532
|
-
suggestionId:
|
|
2533
|
-
value:
|
|
2371
|
+
var VoteSuggestionRequestSchema = z5.object({
|
|
2372
|
+
sessionId: z5.string(),
|
|
2373
|
+
suggestionId: z5.string(),
|
|
2374
|
+
value: z5.union([z5.literal(1), z5.literal(-1)])
|
|
2534
2375
|
});
|
|
2535
|
-
var TriggerIdentificationRequestSchema =
|
|
2536
|
-
sessionId:
|
|
2376
|
+
var TriggerIdentificationRequestSchema = z5.object({
|
|
2377
|
+
sessionId: z5.string()
|
|
2537
2378
|
});
|
|
2538
|
-
var HandoffToImplementerRequestSchema =
|
|
2539
|
-
sessionId:
|
|
2379
|
+
var HandoffToImplementerRequestSchema = z5.object({
|
|
2380
|
+
sessionId: z5.string(),
|
|
2540
2381
|
// Optional difficulty sizing — sets the task's story points before resolving
|
|
2541
2382
|
// the matched implementer agent. Omit to hand off using the task's current
|
|
2542
2383
|
// story points (or the project's default task agent when unsized).
|
|
2543
|
-
storyPoints:
|
|
2384
|
+
storyPoints: z5.number().int().positive().optional(),
|
|
2544
2385
|
// Optional kickoff note posted to the task chat alongside the handoff notice.
|
|
2545
|
-
message:
|
|
2386
|
+
message: z5.string().optional()
|
|
2546
2387
|
});
|
|
2547
|
-
var SubmitCodeReviewResultRequestSchema =
|
|
2548
|
-
sessionId:
|
|
2549
|
-
approved:
|
|
2550
|
-
content:
|
|
2388
|
+
var SubmitCodeReviewResultRequestSchema = z5.object({
|
|
2389
|
+
sessionId: z5.string(),
|
|
2390
|
+
approved: z5.boolean(),
|
|
2391
|
+
content: z5.string(),
|
|
2551
2392
|
// Canonical risk level the reviewer assigned to this change. Required on every
|
|
2552
2393
|
// verdict — the reviewer must judge it. Applied authoritatively server-side
|
|
2553
2394
|
// (may raise OR lower an already-set value; the reviewer has that authority).
|
|
@@ -2555,199 +2396,199 @@ var SubmitCodeReviewResultRequestSchema = z4.object({
|
|
|
2555
2396
|
// The commit SHA the reviewer actually reviewed. When present, the verdict is
|
|
2556
2397
|
// rejected unless the task is still at this SHA (guards against a late
|
|
2557
2398
|
// old-SHA verdict overwriting a newer review cycle).
|
|
2558
|
-
reviewedSha:
|
|
2399
|
+
reviewedSha: z5.string().optional()
|
|
2559
2400
|
});
|
|
2560
|
-
var CycleCodingAgentKeyRequestSchema =
|
|
2561
|
-
sessionId:
|
|
2562
|
-
rateLimitType:
|
|
2563
|
-
resetsAt:
|
|
2401
|
+
var CycleCodingAgentKeyRequestSchema = z5.object({
|
|
2402
|
+
sessionId: z5.string(),
|
|
2403
|
+
rateLimitType: z5.string(),
|
|
2404
|
+
resetsAt: z5.string().optional(),
|
|
2564
2405
|
// The key the pod is actually running (CONVEYOR_CODING_AGENT_KEY_ID). Wins
|
|
2565
2406
|
// over the session's attribution stamp after owner validation; optional so
|
|
2566
2407
|
// older agents keep the session fallback.
|
|
2567
|
-
codingAgentKeyId:
|
|
2408
|
+
codingAgentKeyId: z5.string().optional()
|
|
2568
2409
|
});
|
|
2569
|
-
var PostChildChatMessageRequestSchema =
|
|
2570
|
-
sessionId:
|
|
2571
|
-
childTaskId:
|
|
2572
|
-
message:
|
|
2410
|
+
var PostChildChatMessageRequestSchema = z5.object({
|
|
2411
|
+
sessionId: z5.string(),
|
|
2412
|
+
childTaskId: z5.string(),
|
|
2413
|
+
message: z5.string().min(1)
|
|
2573
2414
|
});
|
|
2574
|
-
var UpdateChildStatusRequestSchema =
|
|
2575
|
-
sessionId:
|
|
2576
|
-
childTaskId:
|
|
2577
|
-
status:
|
|
2415
|
+
var UpdateChildStatusRequestSchema = z5.object({
|
|
2416
|
+
sessionId: z5.string(),
|
|
2417
|
+
childTaskId: z5.string(),
|
|
2418
|
+
status: z5.string()
|
|
2578
2419
|
});
|
|
2579
|
-
var GetAgentStatusRequestSchema =
|
|
2580
|
-
taskId:
|
|
2420
|
+
var GetAgentStatusRequestSchema = z5.object({
|
|
2421
|
+
taskId: z5.string()
|
|
2581
2422
|
});
|
|
2582
|
-
var GetUiCliHistoryRequestSchema =
|
|
2583
|
-
taskId:
|
|
2423
|
+
var GetUiCliHistoryRequestSchema = z5.object({
|
|
2424
|
+
taskId: z5.string()
|
|
2584
2425
|
});
|
|
2585
|
-
var GetActivePtySessionRequestSchema =
|
|
2586
|
-
taskId:
|
|
2426
|
+
var GetActivePtySessionRequestSchema = z5.object({
|
|
2427
|
+
taskId: z5.string()
|
|
2587
2428
|
});
|
|
2588
|
-
var ListActivePtySessionsRequestSchema =
|
|
2589
|
-
taskId:
|
|
2429
|
+
var ListActivePtySessionsRequestSchema = z5.object({
|
|
2430
|
+
taskId: z5.string()
|
|
2590
2431
|
});
|
|
2591
|
-
var SendSoftStopRequestSchema =
|
|
2592
|
-
taskId:
|
|
2432
|
+
var SendSoftStopRequestSchema = z5.object({
|
|
2433
|
+
taskId: z5.string()
|
|
2593
2434
|
});
|
|
2594
|
-
var StopTaskSessionRequestSchema =
|
|
2595
|
-
taskId:
|
|
2596
|
-
sessionId:
|
|
2435
|
+
var StopTaskSessionRequestSchema = z5.object({
|
|
2436
|
+
taskId: z5.string(),
|
|
2437
|
+
sessionId: z5.string()
|
|
2597
2438
|
});
|
|
2598
|
-
var FlushTaskQueueRequestSchema =
|
|
2599
|
-
taskId:
|
|
2600
|
-
softStop:
|
|
2439
|
+
var FlushTaskQueueRequestSchema = z5.object({
|
|
2440
|
+
taskId: z5.string(),
|
|
2441
|
+
softStop: z5.boolean().optional()
|
|
2601
2442
|
});
|
|
2602
|
-
var CancelTaskQueuedMessageRequestSchema =
|
|
2603
|
-
taskId:
|
|
2604
|
-
messageId:
|
|
2443
|
+
var CancelTaskQueuedMessageRequestSchema = z5.object({
|
|
2444
|
+
taskId: z5.string(),
|
|
2445
|
+
messageId: z5.string()
|
|
2605
2446
|
});
|
|
2606
|
-
var FlushSingleQueuedMessageRequestSchema =
|
|
2607
|
-
taskId:
|
|
2608
|
-
messageId:
|
|
2609
|
-
softStop:
|
|
2447
|
+
var FlushSingleQueuedMessageRequestSchema = z5.object({
|
|
2448
|
+
taskId: z5.string(),
|
|
2449
|
+
messageId: z5.string(),
|
|
2450
|
+
softStop: z5.boolean().optional()
|
|
2610
2451
|
});
|
|
2611
|
-
var AnswerAgentQuestionRequestSchema =
|
|
2612
|
-
taskId:
|
|
2613
|
-
requestId:
|
|
2614
|
-
answers:
|
|
2452
|
+
var AnswerAgentQuestionRequestSchema = z5.object({
|
|
2453
|
+
taskId: z5.string(),
|
|
2454
|
+
requestId: z5.string(),
|
|
2455
|
+
answers: z5.record(z5.string(), z5.string())
|
|
2615
2456
|
});
|
|
2616
|
-
var ClearAgentTodosRequestSchema =
|
|
2617
|
-
taskId:
|
|
2457
|
+
var ClearAgentTodosRequestSchema = z5.object({
|
|
2458
|
+
taskId: z5.string()
|
|
2618
2459
|
});
|
|
2619
|
-
var AgentQuestionOptionSchema =
|
|
2620
|
-
label:
|
|
2621
|
-
description:
|
|
2622
|
-
preview:
|
|
2460
|
+
var AgentQuestionOptionSchema = z5.object({
|
|
2461
|
+
label: z5.string(),
|
|
2462
|
+
description: z5.string(),
|
|
2463
|
+
preview: z5.string().optional()
|
|
2623
2464
|
});
|
|
2624
|
-
var AgentQuestionSchema =
|
|
2625
|
-
question:
|
|
2626
|
-
header:
|
|
2627
|
-
options:
|
|
2628
|
-
multiSelect:
|
|
2465
|
+
var AgentQuestionSchema = z5.object({
|
|
2466
|
+
question: z5.string(),
|
|
2467
|
+
header: z5.string(),
|
|
2468
|
+
options: z5.array(AgentQuestionOptionSchema),
|
|
2469
|
+
multiSelect: z5.boolean().optional()
|
|
2629
2470
|
});
|
|
2630
|
-
var AskUserQuestionRequestSchema =
|
|
2631
|
-
sessionId:
|
|
2632
|
-
question:
|
|
2633
|
-
requestId:
|
|
2634
|
-
questions:
|
|
2471
|
+
var AskUserQuestionRequestSchema = z5.object({
|
|
2472
|
+
sessionId: z5.string(),
|
|
2473
|
+
question: z5.string().min(1),
|
|
2474
|
+
requestId: z5.string().min(1),
|
|
2475
|
+
questions: z5.array(AgentQuestionSchema).min(1)
|
|
2635
2476
|
});
|
|
2636
|
-
var PostAgentMessageRequestSchema =
|
|
2637
|
-
sessionId:
|
|
2638
|
-
content:
|
|
2639
|
-
milestone:
|
|
2477
|
+
var PostAgentMessageRequestSchema = z5.object({
|
|
2478
|
+
sessionId: z5.string().min(1),
|
|
2479
|
+
content: z5.string(),
|
|
2480
|
+
milestone: z5.enum(["plan_ready", "implementation_complete", "blocked"]).optional()
|
|
2640
2481
|
});
|
|
2641
|
-
var EmitAgentEventRequestSchema =
|
|
2642
|
-
sessionId:
|
|
2643
|
-
events:
|
|
2482
|
+
var EmitAgentEventRequestSchema = z5.object({
|
|
2483
|
+
sessionId: z5.string(),
|
|
2484
|
+
events: z5.array(AgentEventSchema).max(500)
|
|
2644
2485
|
});
|
|
2645
|
-
var RefreshGithubTokenRequestSchema =
|
|
2646
|
-
sessionId:
|
|
2647
|
-
forceFresh:
|
|
2486
|
+
var RefreshGithubTokenRequestSchema = z5.object({
|
|
2487
|
+
sessionId: z5.string(),
|
|
2488
|
+
forceFresh: z5.boolean().optional()
|
|
2648
2489
|
});
|
|
2649
|
-
var ReportCredentialFailureRequestSchema =
|
|
2650
|
-
sessionId:
|
|
2651
|
-
error:
|
|
2652
|
-
tokenShape:
|
|
2653
|
-
healed:
|
|
2490
|
+
var ReportCredentialFailureRequestSchema = z5.object({
|
|
2491
|
+
sessionId: z5.string(),
|
|
2492
|
+
error: z5.string().max(2e3).optional(),
|
|
2493
|
+
tokenShape: z5.string().max(500).optional(),
|
|
2494
|
+
healed: z5.boolean().optional()
|
|
2654
2495
|
});
|
|
2655
|
-
var ReportReviewSpawnFailureRequestSchema =
|
|
2656
|
-
sessionId:
|
|
2657
|
-
reviewSessionId:
|
|
2658
|
-
error:
|
|
2496
|
+
var ReportReviewSpawnFailureRequestSchema = z5.object({
|
|
2497
|
+
sessionId: z5.string(),
|
|
2498
|
+
reviewSessionId: z5.string(),
|
|
2499
|
+
error: z5.string().max(2e3).optional()
|
|
2659
2500
|
});
|
|
2660
2501
|
var ReportBuilderSpawnFailureRequestSchema = ReportReviewSpawnFailureRequestSchema.omit({
|
|
2661
2502
|
reviewSessionId: true
|
|
2662
|
-
}).extend({ buildSessionId:
|
|
2663
|
-
var SpawnTaskSessionRequestSchema =
|
|
2664
|
-
taskId:
|
|
2665
|
-
kind:
|
|
2503
|
+
}).extend({ buildSessionId: z5.string() });
|
|
2504
|
+
var SpawnTaskSessionRequestSchema = z5.object({
|
|
2505
|
+
taskId: z5.string(),
|
|
2506
|
+
kind: z5.enum(["tui", "shell"])
|
|
2666
2507
|
});
|
|
2667
|
-
var StartCodeReviewRequestSchema =
|
|
2668
|
-
taskId:
|
|
2669
|
-
force:
|
|
2508
|
+
var StartCodeReviewRequestSchema = z5.object({
|
|
2509
|
+
taskId: z5.string(),
|
|
2510
|
+
force: z5.boolean().optional()
|
|
2670
2511
|
});
|
|
2671
|
-
var StopCodeReviewRequestSchema =
|
|
2672
|
-
taskId:
|
|
2512
|
+
var StopCodeReviewRequestSchema = z5.object({
|
|
2513
|
+
taskId: z5.string()
|
|
2673
2514
|
});
|
|
2674
|
-
var ReportSessionSpawnFailureRequestSchema =
|
|
2675
|
-
sessionId:
|
|
2676
|
-
spawnedSessionId:
|
|
2677
|
-
error:
|
|
2515
|
+
var ReportSessionSpawnFailureRequestSchema = z5.object({
|
|
2516
|
+
sessionId: z5.string(),
|
|
2517
|
+
spawnedSessionId: z5.string(),
|
|
2518
|
+
error: z5.string().max(2e3).optional()
|
|
2678
2519
|
});
|
|
2679
|
-
var RefreshGithubTokenResponseSchema =
|
|
2680
|
-
token:
|
|
2520
|
+
var RefreshGithubTokenResponseSchema = z5.object({
|
|
2521
|
+
token: z5.string()
|
|
2681
2522
|
});
|
|
2682
2523
|
var PTY_FRAME_MAX_CHARS = 256 * 1024;
|
|
2683
2524
|
var PTY_MAX_DIMENSION = 1e3;
|
|
2684
|
-
var PtyOutputRequestSchema =
|
|
2685
|
-
sessionId:
|
|
2686
|
-
data:
|
|
2687
|
-
cols:
|
|
2688
|
-
rows:
|
|
2525
|
+
var PtyOutputRequestSchema = z5.object({
|
|
2526
|
+
sessionId: z5.string(),
|
|
2527
|
+
data: z5.string().max(PTY_FRAME_MAX_CHARS),
|
|
2528
|
+
cols: z5.number().int().positive().max(PTY_MAX_DIMENSION).optional(),
|
|
2529
|
+
rows: z5.number().int().positive().max(PTY_MAX_DIMENSION).optional()
|
|
2689
2530
|
});
|
|
2690
|
-
var PtyEndedRequestSchema =
|
|
2691
|
-
sessionId:
|
|
2531
|
+
var PtyEndedRequestSchema = z5.object({
|
|
2532
|
+
sessionId: z5.string()
|
|
2692
2533
|
});
|
|
2693
|
-
var PtyInputRequestSchema =
|
|
2694
|
-
sessionId:
|
|
2695
|
-
data:
|
|
2534
|
+
var PtyInputRequestSchema = z5.object({
|
|
2535
|
+
sessionId: z5.string(),
|
|
2536
|
+
data: z5.string().max(PTY_FRAME_MAX_CHARS)
|
|
2696
2537
|
});
|
|
2697
|
-
var PtyResizeRequestSchema =
|
|
2698
|
-
sessionId:
|
|
2699
|
-
cols:
|
|
2700
|
-
rows:
|
|
2538
|
+
var PtyResizeRequestSchema = z5.object({
|
|
2539
|
+
sessionId: z5.string(),
|
|
2540
|
+
cols: z5.number().int().positive().max(PTY_MAX_DIMENSION),
|
|
2541
|
+
rows: z5.number().int().positive().max(PTY_MAX_DIMENSION)
|
|
2701
2542
|
});
|
|
2702
|
-
var PtyAttachRequestSchema =
|
|
2703
|
-
sessionId:
|
|
2543
|
+
var PtyAttachRequestSchema = z5.object({
|
|
2544
|
+
sessionId: z5.string()
|
|
2704
2545
|
});
|
|
2705
|
-
var ReportPtyStreamRequestSchema =
|
|
2706
|
-
sessionId:
|
|
2707
|
-
port:
|
|
2546
|
+
var ReportPtyStreamRequestSchema = z5.object({
|
|
2547
|
+
sessionId: z5.string(),
|
|
2548
|
+
port: z5.number().int().positive().max(65535).nullable()
|
|
2708
2549
|
});
|
|
2709
|
-
var ReportPtyInputRequestSchema =
|
|
2710
|
-
sessionId:
|
|
2550
|
+
var ReportPtyInputRequestSchema = z5.object({
|
|
2551
|
+
sessionId: z5.string()
|
|
2711
2552
|
});
|
|
2712
|
-
var GetPtyStreamEndpointRequestSchema =
|
|
2713
|
-
sessionId:
|
|
2553
|
+
var GetPtyStreamEndpointRequestSchema = z5.object({
|
|
2554
|
+
sessionId: z5.string()
|
|
2714
2555
|
});
|
|
2715
|
-
var CreatePRResponseSchema =
|
|
2716
|
-
prNumber:
|
|
2717
|
-
prUrl:
|
|
2556
|
+
var CreatePRResponseSchema = z5.object({
|
|
2557
|
+
prNumber: z5.number().int().positive(),
|
|
2558
|
+
prUrl: z5.string().url(),
|
|
2718
2559
|
/** Advisory glossary-upkeep note derived from the PR's changed files matched
|
|
2719
2560
|
* against tag contextPaths — rendered into the tool result, never stored. */
|
|
2720
|
-
glossaryNote:
|
|
2561
|
+
glossaryNote: z5.string().optional()
|
|
2721
2562
|
});
|
|
2722
|
-
var PostToChatResponseSchema =
|
|
2723
|
-
messageId:
|
|
2563
|
+
var PostToChatResponseSchema = z5.object({
|
|
2564
|
+
messageId: z5.string()
|
|
2724
2565
|
});
|
|
2725
|
-
var UpdateTaskStatusResponseSchema =
|
|
2726
|
-
taskId:
|
|
2727
|
-
status:
|
|
2566
|
+
var UpdateTaskStatusResponseSchema = z5.object({
|
|
2567
|
+
taskId: z5.string(),
|
|
2568
|
+
status: z5.string()
|
|
2728
2569
|
});
|
|
2729
|
-
var StoreSessionIdResponseSchema =
|
|
2730
|
-
success:
|
|
2570
|
+
var StoreSessionIdResponseSchema = z5.object({
|
|
2571
|
+
success: z5.boolean()
|
|
2731
2572
|
});
|
|
2732
|
-
var HeartbeatResponseSchema =
|
|
2733
|
-
acknowledged:
|
|
2573
|
+
var HeartbeatResponseSchema = z5.object({
|
|
2574
|
+
acknowledged: z5.boolean()
|
|
2734
2575
|
});
|
|
2735
|
-
var SessionStartResponseSchema =
|
|
2736
|
-
sessionId:
|
|
2737
|
-
startedAt:
|
|
2576
|
+
var SessionStartResponseSchema = z5.object({
|
|
2577
|
+
sessionId: z5.string(),
|
|
2578
|
+
startedAt: z5.string()
|
|
2738
2579
|
});
|
|
2739
|
-
var SessionStopResponseSchema =
|
|
2740
|
-
sessionId:
|
|
2741
|
-
stoppedAt:
|
|
2580
|
+
var SessionStopResponseSchema = z5.object({
|
|
2581
|
+
sessionId: z5.string(),
|
|
2582
|
+
stoppedAt: z5.string()
|
|
2742
2583
|
});
|
|
2743
|
-
var DeleteSubtaskResponseSchema =
|
|
2744
|
-
deleted:
|
|
2584
|
+
var DeleteSubtaskResponseSchema = z5.object({
|
|
2585
|
+
deleted: z5.boolean()
|
|
2745
2586
|
});
|
|
2746
|
-
var ParkOnCheckResultRequestSchema =
|
|
2747
|
-
sessionId:
|
|
2748
|
-
sha:
|
|
2749
|
-
prNumber:
|
|
2750
|
-
timeoutMinutes:
|
|
2587
|
+
var ParkOnCheckResultRequestSchema = z6.object({
|
|
2588
|
+
sessionId: z6.string(),
|
|
2589
|
+
sha: z6.string().regex(/^[0-9a-f]{7,40}$/i).optional(),
|
|
2590
|
+
prNumber: z6.number().int().positive().optional(),
|
|
2591
|
+
timeoutMinutes: z6.number().int().min(1).max(MAX_CI_WAIT_TIMEOUT_MINUTES).optional()
|
|
2751
2592
|
});
|
|
2752
2593
|
var GIT_BRANCH_NAME_MAX = 255;
|
|
2753
2594
|
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'";
|
|
@@ -2761,97 +2602,97 @@ function isValidGitBranchName(name) {
|
|
|
2761
2602
|
if (name.endsWith(".") || name.endsWith(".lock")) return false;
|
|
2762
2603
|
return true;
|
|
2763
2604
|
}
|
|
2764
|
-
var cardDescription2 =
|
|
2765
|
-
var ListAccessibleProjectsRequestSchema =
|
|
2766
|
-
pageSize:
|
|
2605
|
+
var cardDescription2 = z7.string().max(CARD_DESCRIPTION_MAX, CARD_DESCRIPTION_LIMIT_MESSAGE).optional();
|
|
2606
|
+
var ListAccessibleProjectsRequestSchema = z7.object({
|
|
2607
|
+
pageSize: z7.number().int().positive().max(100).optional().default(100)
|
|
2767
2608
|
});
|
|
2768
|
-
var ListProjectTasksRequestSchema =
|
|
2769
|
-
projectId:
|
|
2770
|
-
status:
|
|
2609
|
+
var ListProjectTasksRequestSchema = z7.object({
|
|
2610
|
+
projectId: z7.string(),
|
|
2611
|
+
status: z7.string().optional(),
|
|
2771
2612
|
// Card types to include. Omitted/empty → defaults to ["task"] in the handler
|
|
2772
2613
|
// (mirrors searchProjectTasks) so listing doesn't surface incidents/suggestions
|
|
2773
2614
|
// unless asked. Enum validation lives at the MCP tool layer.
|
|
2774
|
-
typeFilters:
|
|
2775
|
-
assigneeId:
|
|
2776
|
-
unassigned:
|
|
2615
|
+
typeFilters: z7.array(z7.string()).optional(),
|
|
2616
|
+
assigneeId: z7.string().optional(),
|
|
2617
|
+
unassigned: z7.boolean().optional(),
|
|
2777
2618
|
// Scope to a sub-project board when provided. Unlike the board layer's `?? null`
|
|
2778
2619
|
// semantics, agents default to seeing the whole project when omitted.
|
|
2779
|
-
subProjectId:
|
|
2620
|
+
subProjectId: z7.string().nullable().optional(),
|
|
2780
2621
|
// Plain equality on the on-hold flag: true = only parked cards, false =
|
|
2781
2622
|
// exclude them, omitted = both. Deliberately NOT the board's
|
|
2782
2623
|
// includeOnHold/surfaceActiveWork bucketing — an agent sweeping a backlog
|
|
2783
2624
|
// needs the raw column, not a column projection.
|
|
2784
|
-
onHold:
|
|
2785
|
-
limit:
|
|
2625
|
+
onHold: z7.boolean().optional(),
|
|
2626
|
+
limit: z7.number().int().positive().optional().default(50)
|
|
2786
2627
|
}).refine((p) => !(p.unassigned && p.assigneeId), {
|
|
2787
2628
|
message: "Pass either assigneeId or unassigned, not both"
|
|
2788
2629
|
});
|
|
2789
|
-
var GetProjectTaskRequestSchema =
|
|
2790
|
-
projectId:
|
|
2791
|
-
taskId:
|
|
2630
|
+
var GetProjectTaskRequestSchema = z7.object({
|
|
2631
|
+
projectId: z7.string(),
|
|
2632
|
+
taskId: z7.string()
|
|
2792
2633
|
});
|
|
2793
|
-
var SearchProjectTasksRequestSchema =
|
|
2794
|
-
projectId:
|
|
2634
|
+
var SearchProjectTasksRequestSchema = z7.object({
|
|
2635
|
+
projectId: z7.string(),
|
|
2795
2636
|
// Tag names, matched case-insensitively against the project glossary.
|
|
2796
|
-
tagNames:
|
|
2637
|
+
tagNames: z7.array(z7.string()).optional(),
|
|
2797
2638
|
// How to combine tagNames: "any" (default) = carries at least one,
|
|
2798
2639
|
// "all" = carries every one.
|
|
2799
|
-
tagMatch:
|
|
2640
|
+
tagMatch: z7.enum(["any", "all"]).optional(),
|
|
2800
2641
|
// Expand each named tag to its descendants in the tag DAG before matching,
|
|
2801
2642
|
// so a parent tag sweeps its whole area. Default false.
|
|
2802
|
-
includeChildTags:
|
|
2803
|
-
searchQuery:
|
|
2804
|
-
statusFilters:
|
|
2643
|
+
includeChildTags: z7.boolean().optional(),
|
|
2644
|
+
searchQuery: z7.string().optional(),
|
|
2645
|
+
statusFilters: z7.array(z7.string()).optional(),
|
|
2805
2646
|
// Card types to include. Omitted/empty → defaults to ["task"] in the handler so
|
|
2806
2647
|
// search doesn't surface incidents/suggestions unless asked. Enum validation lives
|
|
2807
2648
|
// at the MCP tool layer (mirrors statusFilters).
|
|
2808
|
-
typeFilters:
|
|
2809
|
-
assigneeId:
|
|
2810
|
-
unassigned:
|
|
2649
|
+
typeFilters: z7.array(z7.string()).optional(),
|
|
2650
|
+
assigneeId: z7.string().optional(),
|
|
2651
|
+
unassigned: z7.boolean().optional(),
|
|
2811
2652
|
// Scope to a sub-project board when provided. Unlike the board layer's `?? null`
|
|
2812
2653
|
// semantics, agents default to seeing the whole project when omitted.
|
|
2813
|
-
subProjectId:
|
|
2814
|
-
limit:
|
|
2654
|
+
subProjectId: z7.string().nullable().optional(),
|
|
2655
|
+
limit: z7.number().int().positive().optional().default(20)
|
|
2815
2656
|
}).refine((p) => !(p.unassigned && p.assigneeId), {
|
|
2816
2657
|
message: "Pass either assigneeId or unassigned, not both"
|
|
2817
2658
|
});
|
|
2818
|
-
var ListProjectTagsRequestSchema =
|
|
2819
|
-
projectId:
|
|
2659
|
+
var ListProjectTagsRequestSchema = z7.object({
|
|
2660
|
+
projectId: z7.string(),
|
|
2820
2661
|
/** "summary" (default) omits inline context links; "full" includes them. */
|
|
2821
|
-
detail:
|
|
2662
|
+
detail: z7.enum(["summary", "full"]).optional()
|
|
2822
2663
|
});
|
|
2823
|
-
var GetProjectTagRequestSchema =
|
|
2824
|
-
projectId:
|
|
2664
|
+
var GetProjectTagRequestSchema = z7.object({
|
|
2665
|
+
projectId: z7.string(),
|
|
2825
2666
|
/** Tag id or exact (case-insensitive) tag name. */
|
|
2826
|
-
tag:
|
|
2667
|
+
tag: z7.string().min(1).max(100)
|
|
2827
2668
|
});
|
|
2828
|
-
var ListProjectTagAttachmentsRequestSchema =
|
|
2829
|
-
projectId:
|
|
2669
|
+
var ListProjectTagAttachmentsRequestSchema = z7.object({
|
|
2670
|
+
projectId: z7.string(),
|
|
2830
2671
|
/** Tag id or exact (case-insensitive) tag name. */
|
|
2831
|
-
tag:
|
|
2832
|
-
limit:
|
|
2833
|
-
offset:
|
|
2672
|
+
tag: z7.string().min(1).max(100),
|
|
2673
|
+
limit: z7.number().int().min(1).max(60).optional(),
|
|
2674
|
+
offset: z7.number().int().min(0).optional()
|
|
2834
2675
|
});
|
|
2835
|
-
var SetProjectFileTagsRequestSchema =
|
|
2836
|
-
projectId:
|
|
2837
|
-
taskId:
|
|
2838
|
-
fileId:
|
|
2839
|
-
tags:
|
|
2840
|
-
requestingUserId:
|
|
2676
|
+
var SetProjectFileTagsRequestSchema = z7.object({
|
|
2677
|
+
projectId: z7.string(),
|
|
2678
|
+
taskId: z7.string(),
|
|
2679
|
+
fileId: z7.string(),
|
|
2680
|
+
tags: z7.array(z7.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS),
|
|
2681
|
+
requestingUserId: z7.string().optional()
|
|
2841
2682
|
});
|
|
2842
|
-
var GetProjectSummaryRequestSchema =
|
|
2843
|
-
projectId:
|
|
2683
|
+
var GetProjectSummaryRequestSchema = z7.object({
|
|
2684
|
+
projectId: z7.string()
|
|
2844
2685
|
});
|
|
2845
|
-
var GetProjectOnboardingStatusRequestSchema =
|
|
2846
|
-
projectId:
|
|
2686
|
+
var GetProjectOnboardingStatusRequestSchema = z7.object({
|
|
2687
|
+
projectId: z7.string()
|
|
2847
2688
|
});
|
|
2848
|
-
var GetProjectOnboardingStepRequestSchema =
|
|
2849
|
-
projectId:
|
|
2689
|
+
var GetProjectOnboardingStepRequestSchema = z7.object({
|
|
2690
|
+
projectId: z7.string()
|
|
2850
2691
|
});
|
|
2851
|
-
var GetProjectConnectUrlsRequestSchema =
|
|
2852
|
-
projectId:
|
|
2692
|
+
var GetProjectConnectUrlsRequestSchema = z7.object({
|
|
2693
|
+
projectId: z7.string()
|
|
2853
2694
|
});
|
|
2854
|
-
var conveyorCapabilitySchema =
|
|
2695
|
+
var conveyorCapabilitySchema = z7.enum([
|
|
2855
2696
|
"read",
|
|
2856
2697
|
"create",
|
|
2857
2698
|
"update",
|
|
@@ -2859,493 +2700,493 @@ var conveyorCapabilitySchema = z6.enum([
|
|
|
2859
2700
|
"files",
|
|
2860
2701
|
"build"
|
|
2861
2702
|
]);
|
|
2862
|
-
var GetConnectionContextRequestSchema =
|
|
2863
|
-
projectId:
|
|
2703
|
+
var GetConnectionContextRequestSchema = z7.object({
|
|
2704
|
+
projectId: z7.string(),
|
|
2864
2705
|
// Optional board scope (CONVEYOR_SUBPROJECT_ID). Validated to belong to the
|
|
2865
2706
|
// project in the handler; an invalid/foreign id is reported, not silently
|
|
2866
2707
|
// dropped, so a mis-scoped connection is never presented as board-specific.
|
|
2867
|
-
subProjectId:
|
|
2708
|
+
subProjectId: z7.string().nullable().optional()
|
|
2868
2709
|
});
|
|
2869
|
-
var VerifyConnectionRequestSchema =
|
|
2870
|
-
projectId:
|
|
2871
|
-
subProjectId:
|
|
2872
|
-
intendedActions:
|
|
2710
|
+
var VerifyConnectionRequestSchema = z7.object({
|
|
2711
|
+
projectId: z7.string(),
|
|
2712
|
+
subProjectId: z7.string().nullable().optional(),
|
|
2713
|
+
intendedActions: z7.array(conveyorCapabilitySchema).optional()
|
|
2873
2714
|
});
|
|
2874
|
-
var ListAccessibleSubprojectsRequestSchema =
|
|
2875
|
-
projectId:
|
|
2715
|
+
var ListAccessibleSubprojectsRequestSchema = z7.object({
|
|
2716
|
+
projectId: z7.string()
|
|
2876
2717
|
});
|
|
2877
|
-
var CreateProjectTaskRequestSchema =
|
|
2878
|
-
projectId:
|
|
2879
|
-
title:
|
|
2718
|
+
var CreateProjectTaskRequestSchema = z7.object({
|
|
2719
|
+
projectId: z7.string(),
|
|
2720
|
+
title: z7.string().min(1),
|
|
2880
2721
|
description: cardDescription2,
|
|
2881
|
-
plan:
|
|
2882
|
-
status:
|
|
2722
|
+
plan: z7.string().optional(),
|
|
2723
|
+
status: z7.string().optional(),
|
|
2883
2724
|
// Assign to a sub-project board. Validated to belong to `projectId` in the handler.
|
|
2884
|
-
subProjectId:
|
|
2725
|
+
subProjectId: z7.string().nullable().optional(),
|
|
2885
2726
|
// Priority value. Resolved to the project's configured Priority row in the
|
|
2886
2727
|
// handler, which rejects an unconfigured value before the card is written.
|
|
2887
|
-
priorityValue:
|
|
2888
|
-
requestingUserId:
|
|
2728
|
+
priorityValue: z7.number().int().positive().optional(),
|
|
2729
|
+
requestingUserId: z7.string().optional()
|
|
2889
2730
|
});
|
|
2890
|
-
var SetProjectTaskParentRequestSchema =
|
|
2891
|
-
projectId:
|
|
2731
|
+
var SetProjectTaskParentRequestSchema = z7.object({
|
|
2732
|
+
projectId: z7.string(),
|
|
2892
2733
|
/** Card to move — id or slug. */
|
|
2893
|
-
taskId:
|
|
2734
|
+
taskId: z7.string().min(1),
|
|
2894
2735
|
/** New parent (id or slug), or null to detach. */
|
|
2895
|
-
parentTaskId:
|
|
2896
|
-
ordinal:
|
|
2897
|
-
followParentStatus:
|
|
2898
|
-
requestingUserId:
|
|
2736
|
+
parentTaskId: z7.string().min(1).nullable(),
|
|
2737
|
+
ordinal: z7.number().int().nonnegative().optional(),
|
|
2738
|
+
followParentStatus: z7.boolean().optional(),
|
|
2739
|
+
requestingUserId: z7.string().optional()
|
|
2899
2740
|
}).strict();
|
|
2900
|
-
var UpdateProjectTaskRequestSchema =
|
|
2901
|
-
projectId:
|
|
2902
|
-
taskId:
|
|
2903
|
-
title:
|
|
2741
|
+
var UpdateProjectTaskRequestSchema = z7.object({
|
|
2742
|
+
projectId: z7.string(),
|
|
2743
|
+
taskId: z7.string(),
|
|
2744
|
+
title: z7.string().optional(),
|
|
2904
2745
|
description: cardDescription2,
|
|
2905
|
-
plan:
|
|
2746
|
+
plan: z7.string().optional(),
|
|
2906
2747
|
// Enum validation lives at the MCP tool layer (mirrors createProjectTask);
|
|
2907
2748
|
// the handler routes through the shared updateStatus core (InProgress
|
|
2908
2749
|
// dependency check + cleanup/board/Slack side effects), not the stricter
|
|
2909
2750
|
// card-type-validating path the Socket.IO updateTaskStatus mutation uses.
|
|
2910
|
-
status:
|
|
2751
|
+
status: z7.string().optional(),
|
|
2911
2752
|
// Canonical risk level, or null to clear. Resolved to the project's
|
|
2912
2753
|
// configured Risk row (by rank) in the handler.
|
|
2913
2754
|
risk: riskLevelSchema.nullable().optional(),
|
|
2914
2755
|
// Story-point value, or null to clear. Resolved to the project's configured
|
|
2915
2756
|
// StoryPoint row in the handler, which rejects an unconfigured value.
|
|
2916
|
-
storyPointValue:
|
|
2757
|
+
storyPointValue: z7.number().int().positive().nullable().optional(),
|
|
2917
2758
|
// Priority value, or null to clear. Resolved to the project's configured
|
|
2918
2759
|
// Priority row in the handler, which rejects an unconfigured value.
|
|
2919
|
-
priorityValue:
|
|
2920
|
-
assignedUserId:
|
|
2760
|
+
priorityValue: z7.number().int().positive().nullable().optional(),
|
|
2761
|
+
assignedUserId: z7.string().nullish(),
|
|
2921
2762
|
// Move to a different sub-project board, or null to move to the parent board.
|
|
2922
2763
|
// Validated to belong to `projectId` in the handler.
|
|
2923
|
-
subProjectId:
|
|
2764
|
+
subProjectId: z7.string().nullable().optional(),
|
|
2924
2765
|
// Record the task's ACTUAL working branch (e.g. a locally-driven pack's
|
|
2925
2766
|
// branch, so identification never mints a competing name and pack-child
|
|
2926
2767
|
// merge handling matches reality), or null to detach. Guarded in the
|
|
2927
2768
|
// handler: the ref must exist on origin and no live workspace may be bound
|
|
2928
2769
|
// to a different branch.
|
|
2929
|
-
githubBranch:
|
|
2770
|
+
githubBranch: z7.string().min(1).max(GIT_BRANCH_NAME_MAX).refine(isValidGitBranchName, { message: GIT_BRANCH_NAME_MESSAGE }).nullable().optional(),
|
|
2930
2771
|
// Park the card on hold (true) or return it to the active board (false).
|
|
2931
2772
|
// The handler mirrors the web path's two side effects: a board re-bucket
|
|
2932
2773
|
// event, and demotion to Open when an active-work card is parked.
|
|
2933
|
-
onHold:
|
|
2934
|
-
requestingUserId:
|
|
2774
|
+
onHold: z7.boolean().optional(),
|
|
2775
|
+
requestingUserId: z7.string().optional()
|
|
2935
2776
|
}).strict().refine(
|
|
2936
2777
|
(v) => v.title !== void 0 || v.description !== void 0 || v.plan !== void 0 || v.status !== void 0 || v.risk !== void 0 || v.storyPointValue !== void 0 || v.priorityValue !== void 0 || v.assignedUserId !== void 0 || v.subProjectId !== void 0 || v.githubBranch !== void 0 || v.onHold !== void 0,
|
|
2937
2778
|
{
|
|
2938
2779
|
message: "update_task requires at least one field to change (title, description, plan, status, risk, storyPointValue, priorityValue, assignedUserId, subProjectId, githubBranch, or onHold)"
|
|
2939
2780
|
}
|
|
2940
2781
|
);
|
|
2941
|
-
var TransitionProjectTaskStatusRequestSchema =
|
|
2942
|
-
projectId:
|
|
2943
|
-
taskId:
|
|
2944
|
-
toStatus:
|
|
2945
|
-
expectedFromStatus:
|
|
2782
|
+
var TransitionProjectTaskStatusRequestSchema = z7.object({
|
|
2783
|
+
projectId: z7.string(),
|
|
2784
|
+
taskId: z7.string(),
|
|
2785
|
+
toStatus: z7.string(),
|
|
2786
|
+
expectedFromStatus: z7.string().optional(),
|
|
2946
2787
|
// Optional raise-only risk to attempt alongside the transition
|
|
2947
2788
|
// (approve → low, request_changes → medium by default).
|
|
2948
2789
|
risk: riskLevelSchema.optional(),
|
|
2949
|
-
requestingUserId:
|
|
2950
|
-
});
|
|
2951
|
-
var MoveProjectCardRequestSchema =
|
|
2952
|
-
projectId:
|
|
2953
|
-
taskId:
|
|
2954
|
-
destinationProjectId:
|
|
2955
|
-
requestingUserId:
|
|
2956
|
-
});
|
|
2957
|
-
var PostToProjectTaskChatRequestSchema =
|
|
2958
|
-
projectId:
|
|
2959
|
-
taskId:
|
|
2960
|
-
content:
|
|
2961
|
-
requestingUserId:
|
|
2962
|
-
});
|
|
2963
|
-
var GetProjectTaskCliRequestSchema =
|
|
2964
|
-
projectId:
|
|
2965
|
-
taskId:
|
|
2966
|
-
limit:
|
|
2967
|
-
source:
|
|
2968
|
-
});
|
|
2969
|
-
var GetProjectTaskSessionsRequestSchema =
|
|
2970
|
-
projectId:
|
|
2971
|
-
taskId:
|
|
2972
|
-
});
|
|
2973
|
-
var QueryProjectGcpLogsRequestSchema =
|
|
2974
|
-
projectId:
|
|
2975
|
-
env:
|
|
2976
|
-
severity:
|
|
2977
|
-
services:
|
|
2978
|
-
sqlInstances:
|
|
2979
|
-
allServices:
|
|
2980
|
-
search:
|
|
2981
|
-
filter:
|
|
2982
|
-
startTime:
|
|
2983
|
-
endTime:
|
|
2984
|
-
limit:
|
|
2985
|
-
pageToken:
|
|
2986
|
-
full:
|
|
2987
|
-
});
|
|
2988
|
-
var QueryProjectGrafanaLogsRequestSchema =
|
|
2989
|
-
projectId:
|
|
2990
|
-
env:
|
|
2991
|
-
services:
|
|
2992
|
-
level:
|
|
2993
|
-
search:
|
|
2994
|
-
logql:
|
|
2995
|
-
startTime:
|
|
2996
|
-
endTime:
|
|
2997
|
-
limit:
|
|
2998
|
-
});
|
|
2999
|
-
var driveFileNameSchema =
|
|
2790
|
+
requestingUserId: z7.string().optional()
|
|
2791
|
+
});
|
|
2792
|
+
var MoveProjectCardRequestSchema = z7.object({
|
|
2793
|
+
projectId: z7.string(),
|
|
2794
|
+
taskId: z7.string(),
|
|
2795
|
+
destinationProjectId: z7.string(),
|
|
2796
|
+
requestingUserId: z7.string().optional()
|
|
2797
|
+
});
|
|
2798
|
+
var PostToProjectTaskChatRequestSchema = z7.object({
|
|
2799
|
+
projectId: z7.string(),
|
|
2800
|
+
taskId: z7.string(),
|
|
2801
|
+
content: z7.string(),
|
|
2802
|
+
requestingUserId: z7.string().optional()
|
|
2803
|
+
});
|
|
2804
|
+
var GetProjectTaskCliRequestSchema = z7.object({
|
|
2805
|
+
projectId: z7.string(),
|
|
2806
|
+
taskId: z7.string(),
|
|
2807
|
+
limit: z7.number().int().positive().optional().default(50),
|
|
2808
|
+
source: z7.string().optional()
|
|
2809
|
+
});
|
|
2810
|
+
var GetProjectTaskSessionsRequestSchema = z7.object({
|
|
2811
|
+
projectId: z7.string(),
|
|
2812
|
+
taskId: z7.string()
|
|
2813
|
+
});
|
|
2814
|
+
var QueryProjectGcpLogsRequestSchema = z7.object({
|
|
2815
|
+
projectId: z7.string(),
|
|
2816
|
+
env: z7.enum(["prod", "dev", "claudespace"]).optional(),
|
|
2817
|
+
severity: z7.enum(["DEBUG", "INFO", "NOTICE", "WARNING", "ERROR", "CRITICAL", "ALERT", "EMERGENCY"]).optional(),
|
|
2818
|
+
services: z7.array(z7.string().min(1).max(200)).max(25).optional(),
|
|
2819
|
+
sqlInstances: z7.array(z7.string().min(1).max(200)).max(25).optional(),
|
|
2820
|
+
allServices: z7.boolean().optional(),
|
|
2821
|
+
search: z7.string().max(256).optional(),
|
|
2822
|
+
filter: z7.string().max(2e3).optional(),
|
|
2823
|
+
startTime: z7.string().optional(),
|
|
2824
|
+
endTime: z7.string().optional(),
|
|
2825
|
+
limit: z7.number().int().min(1).max(200).optional().default(50),
|
|
2826
|
+
pageToken: z7.string().max(4096).optional(),
|
|
2827
|
+
full: z7.boolean().optional()
|
|
2828
|
+
});
|
|
2829
|
+
var QueryProjectGrafanaLogsRequestSchema = z7.object({
|
|
2830
|
+
projectId: z7.string(),
|
|
2831
|
+
env: z7.enum(["prod", "dev"]).optional(),
|
|
2832
|
+
services: z7.array(z7.string().min(1).max(200)).max(25).optional(),
|
|
2833
|
+
level: z7.enum(["debug", "info", "warn", "error", "fatal"]).optional(),
|
|
2834
|
+
search: z7.string().max(256).optional(),
|
|
2835
|
+
logql: z7.string().max(2e3).optional(),
|
|
2836
|
+
startTime: z7.string().optional(),
|
|
2837
|
+
endTime: z7.string().optional(),
|
|
2838
|
+
limit: z7.number().int().min(1).max(200).optional().default(50)
|
|
2839
|
+
});
|
|
2840
|
+
var driveFileNameSchema = z7.string().min(1).max(255).regex(/^[^/\\\r\n]+$/, "File names cannot contain slashes or line breaks");
|
|
3000
2841
|
var DRIVE_MAX_CONTENT_CHARS = 1e6;
|
|
3001
|
-
var ListProjectDriveFilesRequestSchema =
|
|
3002
|
-
projectId:
|
|
3003
|
-
folderId:
|
|
3004
|
-
search:
|
|
3005
|
-
limit:
|
|
3006
|
-
});
|
|
3007
|
-
var ReadProjectDriveFileRequestSchema =
|
|
3008
|
-
projectId:
|
|
3009
|
-
fileId:
|
|
3010
|
-
});
|
|
3011
|
-
var CreateProjectDriveFileRequestSchema =
|
|
3012
|
-
projectId:
|
|
2842
|
+
var ListProjectDriveFilesRequestSchema = z7.object({
|
|
2843
|
+
projectId: z7.string(),
|
|
2844
|
+
folderId: z7.string().max(200).optional(),
|
|
2845
|
+
search: z7.string().max(200).optional(),
|
|
2846
|
+
limit: z7.number().int().min(1).max(200).optional()
|
|
2847
|
+
});
|
|
2848
|
+
var ReadProjectDriveFileRequestSchema = z7.object({
|
|
2849
|
+
projectId: z7.string(),
|
|
2850
|
+
fileId: z7.string().min(1).max(200)
|
|
2851
|
+
});
|
|
2852
|
+
var CreateProjectDriveFileRequestSchema = z7.object({
|
|
2853
|
+
projectId: z7.string(),
|
|
3013
2854
|
name: driveFileNameSchema,
|
|
3014
|
-
content:
|
|
3015
|
-
mimeType:
|
|
3016
|
-
folderId:
|
|
3017
|
-
});
|
|
3018
|
-
var UpdateProjectDriveFileRequestSchema =
|
|
3019
|
-
projectId:
|
|
3020
|
-
fileId:
|
|
3021
|
-
content:
|
|
3022
|
-
mimeType:
|
|
3023
|
-
});
|
|
3024
|
-
var DeleteProjectDriveFileRequestSchema =
|
|
3025
|
-
projectId:
|
|
3026
|
-
fileId:
|
|
3027
|
-
});
|
|
3028
|
-
var CreateProjectDriveFolderRequestSchema =
|
|
3029
|
-
projectId:
|
|
2855
|
+
content: z7.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2856
|
+
mimeType: z7.string().max(200).optional(),
|
|
2857
|
+
folderId: z7.string().max(200).optional()
|
|
2858
|
+
});
|
|
2859
|
+
var UpdateProjectDriveFileRequestSchema = z7.object({
|
|
2860
|
+
projectId: z7.string(),
|
|
2861
|
+
fileId: z7.string().min(1).max(200),
|
|
2862
|
+
content: z7.string().max(DRIVE_MAX_CONTENT_CHARS),
|
|
2863
|
+
mimeType: z7.string().max(200).optional()
|
|
2864
|
+
});
|
|
2865
|
+
var DeleteProjectDriveFileRequestSchema = z7.object({
|
|
2866
|
+
projectId: z7.string(),
|
|
2867
|
+
fileId: z7.string().min(1).max(200)
|
|
2868
|
+
});
|
|
2869
|
+
var CreateProjectDriveFolderRequestSchema = z7.object({
|
|
2870
|
+
projectId: z7.string(),
|
|
3030
2871
|
name: driveFileNameSchema,
|
|
3031
|
-
folderId:
|
|
2872
|
+
folderId: z7.string().max(200).optional()
|
|
3032
2873
|
});
|
|
3033
|
-
var StartProjectBuildRequestSchema =
|
|
3034
|
-
projectId:
|
|
3035
|
-
taskId:
|
|
3036
|
-
requestingUserId:
|
|
2874
|
+
var StartProjectBuildRequestSchema = z7.object({
|
|
2875
|
+
projectId: z7.string(),
|
|
2876
|
+
taskId: z7.string(),
|
|
2877
|
+
requestingUserId: z7.string().optional()
|
|
3037
2878
|
});
|
|
3038
|
-
var StopProjectBuildRequestSchema =
|
|
3039
|
-
projectId:
|
|
3040
|
-
taskId:
|
|
3041
|
-
requestingUserId:
|
|
2879
|
+
var StopProjectBuildRequestSchema = z7.object({
|
|
2880
|
+
projectId: z7.string(),
|
|
2881
|
+
taskId: z7.string(),
|
|
2882
|
+
requestingUserId: z7.string().optional()
|
|
3042
2883
|
});
|
|
3043
|
-
var StartProjectWorkspaceRequestSchema =
|
|
3044
|
-
projectId:
|
|
3045
|
-
requestingUserId:
|
|
2884
|
+
var StartProjectWorkspaceRequestSchema = z7.object({
|
|
2885
|
+
projectId: z7.string(),
|
|
2886
|
+
requestingUserId: z7.string().optional()
|
|
3046
2887
|
});
|
|
3047
|
-
var StopProjectWorkspaceRequestSchema =
|
|
3048
|
-
projectId:
|
|
3049
|
-
destroy:
|
|
3050
|
-
requestingUserId:
|
|
2888
|
+
var StopProjectWorkspaceRequestSchema = z7.object({
|
|
2889
|
+
projectId: z7.string(),
|
|
2890
|
+
destroy: z7.boolean().optional(),
|
|
2891
|
+
requestingUserId: z7.string().optional()
|
|
3051
2892
|
});
|
|
3052
|
-
var ListMyLiveSessionsRequestSchema =
|
|
3053
|
-
projectId:
|
|
2893
|
+
var ListMyLiveSessionsRequestSchema = z7.object({
|
|
2894
|
+
projectId: z7.string(),
|
|
3054
2895
|
/** Admin-only: list another member's sessions instead of the caller's. */
|
|
3055
|
-
targetUserId:
|
|
2896
|
+
targetUserId: z7.string().optional()
|
|
3056
2897
|
});
|
|
3057
|
-
var ListProjectSessionGroupsRequestSchema =
|
|
3058
|
-
projectId:
|
|
2898
|
+
var ListProjectSessionGroupsRequestSchema = z7.object({
|
|
2899
|
+
projectId: z7.string()
|
|
3059
2900
|
});
|
|
3060
|
-
var ListMyLiveSessionsAcrossProjectsRequestSchema =
|
|
3061
|
-
var ListSessionGroupsAcrossProjectsRequestSchema =
|
|
3062
|
-
var GetProjectAvailableTuisRequestSchema =
|
|
3063
|
-
projectId:
|
|
2901
|
+
var ListMyLiveSessionsAcrossProjectsRequestSchema = z7.object({});
|
|
2902
|
+
var ListSessionGroupsAcrossProjectsRequestSchema = z7.object({});
|
|
2903
|
+
var GetProjectAvailableTuisRequestSchema = z7.object({
|
|
2904
|
+
projectId: z7.string()
|
|
3064
2905
|
});
|
|
3065
|
-
var StartAdhocSessionRequestSchema =
|
|
3066
|
-
projectId:
|
|
3067
|
-
label:
|
|
2906
|
+
var StartAdhocSessionRequestSchema = z7.object({
|
|
2907
|
+
projectId: z7.string(),
|
|
2908
|
+
label: z7.string().max(200).optional(),
|
|
3068
2909
|
/** Coding-agent key to launch under — validated pick-time (ownership + TUI availability) in the handler. */
|
|
3069
|
-
codingAgentKeyId:
|
|
2910
|
+
codingAgentKeyId: z7.string().optional(),
|
|
3070
2911
|
/** Model override (Claude model id) — overrides the launch key's own model. */
|
|
3071
|
-
model:
|
|
2912
|
+
model: z7.string().max(200).optional(),
|
|
3072
2913
|
/**
|
|
3073
2914
|
* Session role. Constrained: other task-less modes fall through to the pm
|
|
3074
2915
|
* runner in the pod entrypoint, and "review" would crash without a task.
|
|
3075
2916
|
*/
|
|
3076
|
-
mode:
|
|
2917
|
+
mode: z7.enum(["adhoc", "pm"]).optional(),
|
|
3077
2918
|
/** Base branch to check out (defaults to the project's dev branch). */
|
|
3078
|
-
branch:
|
|
2919
|
+
branch: z7.string().max(300).optional(),
|
|
3079
2920
|
/**
|
|
3080
2921
|
* Server-assembled instructions the pod's TUI auto-submits once on first boot
|
|
3081
2922
|
* (headless kickoff). Used by the onboarding "Set it up for me" flow to seed a
|
|
3082
2923
|
* setup-driver prompt; the session stays watchable/interactive in the Sessions
|
|
3083
2924
|
* view. `ensureAdhocWorkspace` persists it and clears it after first submit.
|
|
3084
2925
|
*/
|
|
3085
|
-
initialPrompt:
|
|
3086
|
-
requestingUserId:
|
|
3087
|
-
});
|
|
3088
|
-
var StopAdhocSessionRequestSchema =
|
|
3089
|
-
projectId:
|
|
3090
|
-
workspaceId:
|
|
3091
|
-
destroy:
|
|
3092
|
-
requestingUserId:
|
|
3093
|
-
});
|
|
3094
|
-
var ResumeAdhocSessionRequestSchema =
|
|
3095
|
-
projectId:
|
|
3096
|
-
workspaceId:
|
|
3097
|
-
requestingUserId:
|
|
3098
|
-
});
|
|
3099
|
-
var RefreshCodingAgentKeyUsageRequestSchema =
|
|
3100
|
-
projectId:
|
|
3101
|
-
keyId:
|
|
3102
|
-
requestingUserId:
|
|
3103
|
-
});
|
|
3104
|
-
var ListKeysToProbeRequestSchema =
|
|
3105
|
-
sessionId:
|
|
3106
|
-
});
|
|
3107
|
-
var CreateProjectReleaseRequestSchema =
|
|
3108
|
-
projectId:
|
|
3109
|
-
taskIds:
|
|
3110
|
-
requestingUserId:
|
|
3111
|
-
});
|
|
3112
|
-
var AddTasksToProjectReleaseRequestSchema =
|
|
3113
|
-
projectId:
|
|
3114
|
-
taskIds:
|
|
3115
|
-
requestingUserId:
|
|
3116
|
-
});
|
|
3117
|
-
var ApproveProjectMergePRRequestSchema =
|
|
3118
|
-
projectId:
|
|
3119
|
-
childTaskId:
|
|
3120
|
-
requestingUserId:
|
|
3121
|
-
});
|
|
3122
|
-
var ListProjectSubtasksRequestSchema =
|
|
3123
|
-
projectId:
|
|
3124
|
-
taskId:
|
|
3125
|
-
});
|
|
3126
|
-
var CreateProjectSubtaskRequestSchema =
|
|
3127
|
-
projectId:
|
|
3128
|
-
parentTaskId:
|
|
3129
|
-
title:
|
|
2926
|
+
initialPrompt: z7.string().max(2e4).optional(),
|
|
2927
|
+
requestingUserId: z7.string().optional()
|
|
2928
|
+
});
|
|
2929
|
+
var StopAdhocSessionRequestSchema = z7.object({
|
|
2930
|
+
projectId: z7.string(),
|
|
2931
|
+
workspaceId: z7.string(),
|
|
2932
|
+
destroy: z7.boolean().optional(),
|
|
2933
|
+
requestingUserId: z7.string().optional()
|
|
2934
|
+
});
|
|
2935
|
+
var ResumeAdhocSessionRequestSchema = z7.object({
|
|
2936
|
+
projectId: z7.string(),
|
|
2937
|
+
workspaceId: z7.string(),
|
|
2938
|
+
requestingUserId: z7.string().optional()
|
|
2939
|
+
});
|
|
2940
|
+
var RefreshCodingAgentKeyUsageRequestSchema = z7.object({
|
|
2941
|
+
projectId: z7.string(),
|
|
2942
|
+
keyId: z7.string().optional(),
|
|
2943
|
+
requestingUserId: z7.string().optional()
|
|
2944
|
+
});
|
|
2945
|
+
var ListKeysToProbeRequestSchema = z7.object({
|
|
2946
|
+
sessionId: z7.string()
|
|
2947
|
+
});
|
|
2948
|
+
var CreateProjectReleaseRequestSchema = z7.object({
|
|
2949
|
+
projectId: z7.string(),
|
|
2950
|
+
taskIds: z7.array(z7.string()).optional(),
|
|
2951
|
+
requestingUserId: z7.string().optional()
|
|
2952
|
+
});
|
|
2953
|
+
var AddTasksToProjectReleaseRequestSchema = z7.object({
|
|
2954
|
+
projectId: z7.string(),
|
|
2955
|
+
taskIds: z7.array(z7.string()).min(1),
|
|
2956
|
+
requestingUserId: z7.string().optional()
|
|
2957
|
+
});
|
|
2958
|
+
var ApproveProjectMergePRRequestSchema = z7.object({
|
|
2959
|
+
projectId: z7.string(),
|
|
2960
|
+
childTaskId: z7.string(),
|
|
2961
|
+
requestingUserId: z7.string().optional()
|
|
2962
|
+
});
|
|
2963
|
+
var ListProjectSubtasksRequestSchema = z7.object({
|
|
2964
|
+
projectId: z7.string(),
|
|
2965
|
+
taskId: z7.string()
|
|
2966
|
+
});
|
|
2967
|
+
var CreateProjectSubtaskRequestSchema = z7.object({
|
|
2968
|
+
projectId: z7.string(),
|
|
2969
|
+
parentTaskId: z7.string(),
|
|
2970
|
+
title: z7.string().min(1),
|
|
3130
2971
|
description: cardDescription2,
|
|
3131
|
-
plan:
|
|
3132
|
-
ordinal:
|
|
3133
|
-
storyPointValue:
|
|
3134
|
-
followParentStatus:
|
|
2972
|
+
plan: z7.string().optional(),
|
|
2973
|
+
ordinal: z7.number().int().nonnegative().optional(),
|
|
2974
|
+
storyPointValue: z7.number().int().positive().optional(),
|
|
2975
|
+
followParentStatus: z7.boolean().optional(),
|
|
3135
2976
|
/** Sibling subtask ids or slugs this subtask blocks on (explicit dependency
|
|
3136
2977
|
* metadata — preferred over encoding order in plan text / ordinal). */
|
|
3137
|
-
dependsOn:
|
|
3138
|
-
requestingUserId:
|
|
2978
|
+
dependsOn: z7.array(z7.string().min(1)).max(32).optional(),
|
|
2979
|
+
requestingUserId: z7.string().optional()
|
|
3139
2980
|
});
|
|
3140
|
-
var UpdateProjectSubtaskRequestSchema =
|
|
3141
|
-
projectId:
|
|
3142
|
-
subtaskId:
|
|
3143
|
-
title:
|
|
2981
|
+
var UpdateProjectSubtaskRequestSchema = z7.object({
|
|
2982
|
+
projectId: z7.string(),
|
|
2983
|
+
subtaskId: z7.string(),
|
|
2984
|
+
title: z7.string().optional(),
|
|
3144
2985
|
description: cardDescription2,
|
|
3145
|
-
plan:
|
|
3146
|
-
status:
|
|
3147
|
-
ordinal:
|
|
3148
|
-
storyPointValue:
|
|
3149
|
-
followParentStatus:
|
|
2986
|
+
plan: z7.string().optional(),
|
|
2987
|
+
status: z7.string().optional(),
|
|
2988
|
+
ordinal: z7.number().int().nonnegative().optional(),
|
|
2989
|
+
storyPointValue: z7.number().int().positive().optional(),
|
|
2990
|
+
followParentStatus: z7.boolean().optional(),
|
|
3150
2991
|
/** Replace-set of sibling subtask ids/slugs this subtask blocks on ([] clears).
|
|
3151
2992
|
* Mirrors the in-pod updateSubtask semantics. */
|
|
3152
|
-
dependsOn:
|
|
3153
|
-
requestingUserId:
|
|
3154
|
-
});
|
|
3155
|
-
var DeleteProjectSubtaskRequestSchema =
|
|
3156
|
-
projectId:
|
|
3157
|
-
subtaskId:
|
|
3158
|
-
requestingUserId:
|
|
3159
|
-
});
|
|
3160
|
-
var GetProjectTaskChatRequestSchema =
|
|
3161
|
-
projectId:
|
|
3162
|
-
taskId:
|
|
3163
|
-
limit:
|
|
3164
|
-
});
|
|
3165
|
-
var AddProjectTaskDependencyRequestSchema =
|
|
3166
|
-
projectId:
|
|
3167
|
-
taskId:
|
|
3168
|
-
dependsOnSlugOrId:
|
|
3169
|
-
requestingUserId:
|
|
3170
|
-
});
|
|
3171
|
-
var RemoveProjectTaskDependencyRequestSchema =
|
|
3172
|
-
projectId:
|
|
3173
|
-
taskId:
|
|
3174
|
-
dependsOnSlugOrId:
|
|
3175
|
-
requestingUserId:
|
|
3176
|
-
});
|
|
3177
|
-
var VoteProjectSuggestionRequestSchema =
|
|
3178
|
-
projectId:
|
|
3179
|
-
suggestionId:
|
|
3180
|
-
value:
|
|
3181
|
-
requestingUserId:
|
|
3182
|
-
});
|
|
3183
|
-
var GetProjectTaskDependenciesRequestSchema =
|
|
3184
|
-
projectId:
|
|
3185
|
-
taskId:
|
|
3186
|
-
});
|
|
3187
|
-
var CreateProjectPullRequestRequestSchema =
|
|
3188
|
-
projectId:
|
|
3189
|
-
taskId:
|
|
3190
|
-
title:
|
|
3191
|
-
body:
|
|
3192
|
-
head:
|
|
3193
|
-
base:
|
|
3194
|
-
requestingUserId:
|
|
3195
|
-
});
|
|
3196
|
-
var ListProjectMembersRequestSchema =
|
|
3197
|
-
projectId:
|
|
3198
|
-
});
|
|
3199
|
-
var AddProjectTaskReviewerRequestSchema =
|
|
3200
|
-
projectId:
|
|
3201
|
-
taskId:
|
|
3202
|
-
userId:
|
|
3203
|
-
requestingUserId:
|
|
3204
|
-
});
|
|
3205
|
-
var RemoveProjectTaskReviewerRequestSchema =
|
|
3206
|
-
projectId:
|
|
3207
|
-
taskId:
|
|
3208
|
-
userId:
|
|
3209
|
-
requestingUserId:
|
|
3210
|
-
});
|
|
3211
|
-
var ListProjectManualTestsRequestSchema =
|
|
3212
|
-
projectId:
|
|
3213
|
-
taskId:
|
|
3214
|
-
});
|
|
3215
|
-
var QueryProjectManualTestsRequestSchema =
|
|
3216
|
-
projectId:
|
|
3217
|
-
cardStatuses:
|
|
3218
|
-
testStatuses:
|
|
3219
|
-
});
|
|
3220
|
-
var SetProjectManualTestsRequestSchema =
|
|
3221
|
-
projectId:
|
|
3222
|
-
taskId:
|
|
2993
|
+
dependsOn: z7.array(z7.string().min(1)).max(32).optional(),
|
|
2994
|
+
requestingUserId: z7.string().optional()
|
|
2995
|
+
});
|
|
2996
|
+
var DeleteProjectSubtaskRequestSchema = z7.object({
|
|
2997
|
+
projectId: z7.string(),
|
|
2998
|
+
subtaskId: z7.string(),
|
|
2999
|
+
requestingUserId: z7.string().optional()
|
|
3000
|
+
});
|
|
3001
|
+
var GetProjectTaskChatRequestSchema = z7.object({
|
|
3002
|
+
projectId: z7.string(),
|
|
3003
|
+
taskId: z7.string(),
|
|
3004
|
+
limit: z7.number().int().positive().optional().default(20)
|
|
3005
|
+
});
|
|
3006
|
+
var AddProjectTaskDependencyRequestSchema = z7.object({
|
|
3007
|
+
projectId: z7.string(),
|
|
3008
|
+
taskId: z7.string(),
|
|
3009
|
+
dependsOnSlugOrId: z7.string(),
|
|
3010
|
+
requestingUserId: z7.string().optional()
|
|
3011
|
+
});
|
|
3012
|
+
var RemoveProjectTaskDependencyRequestSchema = z7.object({
|
|
3013
|
+
projectId: z7.string(),
|
|
3014
|
+
taskId: z7.string(),
|
|
3015
|
+
dependsOnSlugOrId: z7.string(),
|
|
3016
|
+
requestingUserId: z7.string().optional()
|
|
3017
|
+
});
|
|
3018
|
+
var VoteProjectSuggestionRequestSchema = z7.object({
|
|
3019
|
+
projectId: z7.string(),
|
|
3020
|
+
suggestionId: z7.string(),
|
|
3021
|
+
value: z7.union([z7.literal(1), z7.literal(-1)]),
|
|
3022
|
+
requestingUserId: z7.string().optional()
|
|
3023
|
+
});
|
|
3024
|
+
var GetProjectTaskDependenciesRequestSchema = z7.object({
|
|
3025
|
+
projectId: z7.string(),
|
|
3026
|
+
taskId: z7.string()
|
|
3027
|
+
});
|
|
3028
|
+
var CreateProjectPullRequestRequestSchema = z7.object({
|
|
3029
|
+
projectId: z7.string(),
|
|
3030
|
+
taskId: z7.string(),
|
|
3031
|
+
title: z7.string().min(1),
|
|
3032
|
+
body: z7.string(),
|
|
3033
|
+
head: z7.string().optional(),
|
|
3034
|
+
base: z7.string().optional(),
|
|
3035
|
+
requestingUserId: z7.string().optional()
|
|
3036
|
+
});
|
|
3037
|
+
var ListProjectMembersRequestSchema = z7.object({
|
|
3038
|
+
projectId: z7.string()
|
|
3039
|
+
});
|
|
3040
|
+
var AddProjectTaskReviewerRequestSchema = z7.object({
|
|
3041
|
+
projectId: z7.string(),
|
|
3042
|
+
taskId: z7.string(),
|
|
3043
|
+
userId: z7.string(),
|
|
3044
|
+
requestingUserId: z7.string().optional()
|
|
3045
|
+
});
|
|
3046
|
+
var RemoveProjectTaskReviewerRequestSchema = z7.object({
|
|
3047
|
+
projectId: z7.string(),
|
|
3048
|
+
taskId: z7.string(),
|
|
3049
|
+
userId: z7.string(),
|
|
3050
|
+
requestingUserId: z7.string().optional()
|
|
3051
|
+
});
|
|
3052
|
+
var ListProjectManualTestsRequestSchema = z7.object({
|
|
3053
|
+
projectId: z7.string(),
|
|
3054
|
+
taskId: z7.string()
|
|
3055
|
+
});
|
|
3056
|
+
var QueryProjectManualTestsRequestSchema = z7.object({
|
|
3057
|
+
projectId: z7.string(),
|
|
3058
|
+
cardStatuses: z7.array(z7.string()).optional(),
|
|
3059
|
+
testStatuses: z7.array(z7.enum(["open", "approved", "rejected"])).optional()
|
|
3060
|
+
});
|
|
3061
|
+
var SetProjectManualTestsRequestSchema = z7.object({
|
|
3062
|
+
projectId: z7.string(),
|
|
3063
|
+
taskId: z7.string(),
|
|
3223
3064
|
items: ManualTestItemsSchema,
|
|
3224
|
-
requestingUserId:
|
|
3225
|
-
});
|
|
3226
|
-
var EditProjectManualTestRequestSchema =
|
|
3227
|
-
projectId:
|
|
3228
|
-
taskId:
|
|
3229
|
-
title:
|
|
3230
|
-
newTitle:
|
|
3231
|
-
requestingUserId:
|
|
3232
|
-
});
|
|
3233
|
-
var RemoveProjectManualTestRequestSchema =
|
|
3234
|
-
projectId:
|
|
3235
|
-
taskId:
|
|
3236
|
-
title:
|
|
3237
|
-
requestingUserId:
|
|
3238
|
-
});
|
|
3239
|
-
var ApproveProjectManualTestRequestSchema =
|
|
3240
|
-
projectId:
|
|
3241
|
-
taskId:
|
|
3242
|
-
title:
|
|
3243
|
-
requestingUserId:
|
|
3244
|
-
});
|
|
3245
|
-
var RejectProjectManualTestRequestSchema =
|
|
3246
|
-
projectId:
|
|
3247
|
-
taskId:
|
|
3248
|
-
title:
|
|
3249
|
-
reason:
|
|
3250
|
-
requestingUserId:
|
|
3251
|
-
});
|
|
3252
|
-
var CreateProjectSuggestionRequestSchema =
|
|
3253
|
-
projectId:
|
|
3254
|
-
title:
|
|
3065
|
+
requestingUserId: z7.string().optional()
|
|
3066
|
+
});
|
|
3067
|
+
var EditProjectManualTestRequestSchema = z7.object({
|
|
3068
|
+
projectId: z7.string(),
|
|
3069
|
+
taskId: z7.string(),
|
|
3070
|
+
title: z7.string().min(1),
|
|
3071
|
+
newTitle: z7.string().min(1),
|
|
3072
|
+
requestingUserId: z7.string().optional()
|
|
3073
|
+
});
|
|
3074
|
+
var RemoveProjectManualTestRequestSchema = z7.object({
|
|
3075
|
+
projectId: z7.string(),
|
|
3076
|
+
taskId: z7.string(),
|
|
3077
|
+
title: z7.string().min(1),
|
|
3078
|
+
requestingUserId: z7.string().optional()
|
|
3079
|
+
});
|
|
3080
|
+
var ApproveProjectManualTestRequestSchema = z7.object({
|
|
3081
|
+
projectId: z7.string(),
|
|
3082
|
+
taskId: z7.string(),
|
|
3083
|
+
title: z7.string().min(1),
|
|
3084
|
+
requestingUserId: z7.string().optional()
|
|
3085
|
+
});
|
|
3086
|
+
var RejectProjectManualTestRequestSchema = z7.object({
|
|
3087
|
+
projectId: z7.string(),
|
|
3088
|
+
taskId: z7.string(),
|
|
3089
|
+
title: z7.string().min(1),
|
|
3090
|
+
reason: z7.string().min(1).max(2e3),
|
|
3091
|
+
requestingUserId: z7.string().optional()
|
|
3092
|
+
});
|
|
3093
|
+
var CreateProjectSuggestionRequestSchema = z7.object({
|
|
3094
|
+
projectId: z7.string(),
|
|
3095
|
+
title: z7.string().min(1),
|
|
3255
3096
|
description: cardDescription2,
|
|
3256
|
-
tagNames:
|
|
3257
|
-
requestingUserId:
|
|
3097
|
+
tagNames: z7.array(z7.string()).optional(),
|
|
3098
|
+
requestingUserId: z7.string().optional()
|
|
3258
3099
|
});
|
|
3259
|
-
var ListProjectChannelsRequestSchema =
|
|
3260
|
-
projectId:
|
|
3100
|
+
var ListProjectChannelsRequestSchema = z8.object({
|
|
3101
|
+
projectId: z8.string()
|
|
3261
3102
|
});
|
|
3262
3103
|
var READ_CHANNEL_MESSAGES_MAX_LIMIT = 50;
|
|
3263
|
-
var ReadChannelMessagesRequestSchema =
|
|
3264
|
-
projectId:
|
|
3265
|
-
channelId:
|
|
3266
|
-
limit:
|
|
3104
|
+
var ReadChannelMessagesRequestSchema = z8.object({
|
|
3105
|
+
projectId: z8.string(),
|
|
3106
|
+
channelId: z8.string().min(1).max(200),
|
|
3107
|
+
limit: z8.number().int().min(1).max(READ_CHANNEL_MESSAGES_MAX_LIMIT).optional(),
|
|
3267
3108
|
/** Provider-native cursor: return messages OLDER than this one. */
|
|
3268
|
-
before:
|
|
3109
|
+
before: z8.string().max(100).optional(),
|
|
3269
3110
|
/** Provider-native cursor: return messages NEWER than this one. */
|
|
3270
|
-
after:
|
|
3111
|
+
after: z8.string().max(100).optional(),
|
|
3271
3112
|
/**
|
|
3272
3113
|
* Read one thread instead of the channel surface. Slack calls this a
|
|
3273
3114
|
* `thread_ts`; on Discord it is the thread channel's id. One field for both,
|
|
3274
3115
|
* because a caller holding a `threadTs` from a previous read should not have
|
|
3275
3116
|
* to know which provider produced it.
|
|
3276
3117
|
*/
|
|
3277
|
-
threadTs:
|
|
3118
|
+
threadTs: z8.string().max(100).optional()
|
|
3278
3119
|
});
|
|
3279
3120
|
var POST_CHANNEL_MESSAGE_MAX_CHARS = 1800;
|
|
3280
|
-
var PostChannelMessageRequestSchema =
|
|
3281
|
-
projectId:
|
|
3282
|
-
channelId:
|
|
3283
|
-
text:
|
|
3121
|
+
var PostChannelMessageRequestSchema = z8.object({
|
|
3122
|
+
projectId: z8.string(),
|
|
3123
|
+
channelId: z8.string().min(1).max(200),
|
|
3124
|
+
text: z8.string().min(1).max(POST_CHANNEL_MESSAGE_MAX_CHARS),
|
|
3284
3125
|
/** Reply inside a thread rather than to the channel. */
|
|
3285
|
-
threadTs:
|
|
3126
|
+
threadTs: z8.string().max(100).optional()
|
|
3286
3127
|
});
|
|
3287
3128
|
var GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS = 90;
|
|
3288
|
-
var GetProjectAnalyticsSummaryRequestSchema =
|
|
3289
|
-
projectId: z7.string(),
|
|
3290
|
-
rangeDays: z7.number().int().min(1).max(GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS).optional(),
|
|
3291
|
-
campaign: z7.string().max(200).optional()
|
|
3292
|
-
});
|
|
3293
|
-
var ListProjectTaskFilesRequestSchema = z8.object({
|
|
3129
|
+
var GetProjectAnalyticsSummaryRequestSchema = z8.object({
|
|
3294
3130
|
projectId: z8.string(),
|
|
3295
|
-
|
|
3131
|
+
rangeDays: z8.number().int().min(1).max(GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS).optional(),
|
|
3132
|
+
campaign: z8.string().max(200).optional()
|
|
3296
3133
|
});
|
|
3297
|
-
var
|
|
3298
|
-
projectId:
|
|
3299
|
-
taskId:
|
|
3300
|
-
|
|
3134
|
+
var ListProjectTaskFilesRequestSchema = z9.object({
|
|
3135
|
+
projectId: z9.string(),
|
|
3136
|
+
taskId: z9.string()
|
|
3137
|
+
});
|
|
3138
|
+
var GetProjectAttachmentRequestSchema = z9.object({
|
|
3139
|
+
projectId: z9.string(),
|
|
3140
|
+
taskId: z9.string(),
|
|
3141
|
+
fileId: z9.string(),
|
|
3301
3142
|
/** Byte offset into text content (paging large logs/JSON). Default 0. */
|
|
3302
|
-
offset:
|
|
3143
|
+
offset: z9.number().int().nonnegative().optional(),
|
|
3303
3144
|
/** Max bytes of text content to return from `offset`. Server default applies. */
|
|
3304
|
-
maxBytes:
|
|
3305
|
-
});
|
|
3306
|
-
var DeleteProjectTaskFileRequestSchema =
|
|
3307
|
-
projectId:
|
|
3308
|
-
taskId:
|
|
3309
|
-
fileId:
|
|
3310
|
-
requestingUserId:
|
|
3311
|
-
});
|
|
3312
|
-
var SetProjectTaskFileShowcaseRequestSchema =
|
|
3313
|
-
projectId:
|
|
3314
|
-
taskId:
|
|
3315
|
-
fileId:
|
|
3316
|
-
showcase:
|
|
3317
|
-
requestingUserId:
|
|
3318
|
-
});
|
|
3319
|
-
var RequestProjectFileUploadRequestSchema =
|
|
3320
|
-
projectId:
|
|
3321
|
-
taskId:
|
|
3322
|
-
fileName:
|
|
3323
|
-
mimeType:
|
|
3324
|
-
fileSize:
|
|
3325
|
-
requestingUserId:
|
|
3326
|
-
});
|
|
3327
|
-
var ConfirmProjectFileUploadRequestSchema =
|
|
3328
|
-
projectId:
|
|
3329
|
-
taskId:
|
|
3330
|
-
fileId:
|
|
3145
|
+
maxBytes: z9.number().int().positive().optional()
|
|
3146
|
+
});
|
|
3147
|
+
var DeleteProjectTaskFileRequestSchema = z9.object({
|
|
3148
|
+
projectId: z9.string(),
|
|
3149
|
+
taskId: z9.string(),
|
|
3150
|
+
fileId: z9.string(),
|
|
3151
|
+
requestingUserId: z9.string().optional()
|
|
3152
|
+
});
|
|
3153
|
+
var SetProjectTaskFileShowcaseRequestSchema = z9.object({
|
|
3154
|
+
projectId: z9.string(),
|
|
3155
|
+
taskId: z9.string(),
|
|
3156
|
+
fileId: z9.string(),
|
|
3157
|
+
showcase: z9.boolean(),
|
|
3158
|
+
requestingUserId: z9.string().optional()
|
|
3159
|
+
});
|
|
3160
|
+
var RequestProjectFileUploadRequestSchema = z9.object({
|
|
3161
|
+
projectId: z9.string(),
|
|
3162
|
+
taskId: z9.string(),
|
|
3163
|
+
fileName: z9.string().min(1).max(255),
|
|
3164
|
+
mimeType: z9.string().min(1).max(128),
|
|
3165
|
+
fileSize: z9.number().int().positive().max(MAX_FILE_SIZE_BYTES),
|
|
3166
|
+
requestingUserId: z9.string().optional()
|
|
3167
|
+
});
|
|
3168
|
+
var ConfirmProjectFileUploadRequestSchema = z9.object({
|
|
3169
|
+
projectId: z9.string(),
|
|
3170
|
+
taskId: z9.string(),
|
|
3171
|
+
fileId: z9.string(),
|
|
3331
3172
|
/** When set, the attachment is also posted to the task chat with this text. */
|
|
3332
|
-
comment:
|
|
3173
|
+
comment: z9.string().max(2e3).optional(),
|
|
3333
3174
|
/** Glossary tag names (or ids) this file is an example of. */
|
|
3334
|
-
tags:
|
|
3175
|
+
tags: z9.array(z9.string().min(1).max(MAX_FILE_TAG_LENGTH)).max(MAX_FILE_TAGS).optional(),
|
|
3335
3176
|
/** The card's showcase (its deliverable); always posts to chat, even with no `comment`. */
|
|
3336
|
-
showcase:
|
|
3177
|
+
showcase: z9.boolean().optional(),
|
|
3337
3178
|
/** Id of an older file on the same card this upload replaces. */
|
|
3338
|
-
supersedes:
|
|
3339
|
-
requestingUserId:
|
|
3179
|
+
supersedes: z9.string().min(1).max(64).optional(),
|
|
3180
|
+
requestingUserId: z9.string().optional()
|
|
3340
3181
|
});
|
|
3341
|
-
var RequestWorkspaceRecycleRequestSchema =
|
|
3342
|
-
sessionId:
|
|
3343
|
-
reason:
|
|
3182
|
+
var RequestWorkspaceRecycleRequestSchema = z10.object({
|
|
3183
|
+
sessionId: z10.string(),
|
|
3184
|
+
reason: z10.string().max(2e3)
|
|
3344
3185
|
});
|
|
3345
|
-
var ReportApiOutageRequestSchema =
|
|
3346
|
-
sessionId:
|
|
3347
|
-
detail:
|
|
3348
|
-
attempts:
|
|
3186
|
+
var ReportApiOutageRequestSchema = z10.object({
|
|
3187
|
+
sessionId: z10.string(),
|
|
3188
|
+
detail: z10.string().max(2e3),
|
|
3189
|
+
attempts: z10.number().int().min(0).max(100)
|
|
3349
3190
|
});
|
|
3350
3191
|
var CONTEXT_LINK_LOCATOR_MAX = 300;
|
|
3351
3192
|
var TEST_TITLE = /\b(?:it|test|describe)(?:\.\w+)?\s*\(\s*(['"`])((?:(?!\1)[\s\S])*)\1/g;
|
|
@@ -3362,130 +3203,130 @@ function locatorMatchesContent(content, locatorType, locator) {
|
|
|
3362
3203
|
var TAG_DESCRIPTION_MAX = CARD_DESCRIPTION_MAX;
|
|
3363
3204
|
var TAG_OVERVIEW_MAX = 32e3;
|
|
3364
3205
|
var TAG_REASON_MAX = 500;
|
|
3365
|
-
var ProjectTagContextPathSchema =
|
|
3366
|
-
type:
|
|
3367
|
-
path:
|
|
3368
|
-
label:
|
|
3206
|
+
var ProjectTagContextPathSchema = z11.object({
|
|
3207
|
+
type: z11.enum(["rule", "doc", "file", "folder"]),
|
|
3208
|
+
path: z11.string().min(1).max(500),
|
|
3209
|
+
label: z11.string().max(100).optional(),
|
|
3369
3210
|
/** Verified-link tether — text that must keep existing in the file. */
|
|
3370
|
-
locator:
|
|
3211
|
+
locator: z11.string().min(1).max(CONTEXT_LINK_LOCATOR_MAX).regex(/^[^\r\n]*$/, "Locator cannot contain line breaks").optional(),
|
|
3371
3212
|
/** test = must appear in a real test/describe title; code = any substring. */
|
|
3372
|
-
locatorType:
|
|
3213
|
+
locatorType: z11.enum(["test", "code"]).optional()
|
|
3373
3214
|
}).refine((link) => link.locator === void 0 === (link.locatorType === void 0), {
|
|
3374
3215
|
message: "locator and locatorType must be provided together"
|
|
3375
3216
|
}).refine((link) => link.locator === void 0 || link.type !== "folder", {
|
|
3376
3217
|
message: "folder links cannot carry a locator"
|
|
3377
3218
|
});
|
|
3378
|
-
var hexColor =
|
|
3379
|
-
var overviewPathSchema =
|
|
3380
|
-
var CreateProjectTagRequestSchema =
|
|
3381
|
-
projectId:
|
|
3382
|
-
name:
|
|
3219
|
+
var hexColor = z11.string().regex(/^#[0-9a-fA-F]{6}$/, "Expected #RRGGBB hex color");
|
|
3220
|
+
var overviewPathSchema = z11.string().min(1).max(500).regex(/^[^\r\n]*$/, "Overview path cannot contain line breaks");
|
|
3221
|
+
var CreateProjectTagRequestSchema = z11.object({
|
|
3222
|
+
projectId: z11.string(),
|
|
3223
|
+
name: z11.string().min(1).max(50),
|
|
3383
3224
|
color: hexColor.optional(),
|
|
3384
|
-
description:
|
|
3385
|
-
overview:
|
|
3225
|
+
description: z11.string().max(TAG_DESCRIPTION_MAX).optional(),
|
|
3226
|
+
overview: z11.string().max(TAG_OVERVIEW_MAX).optional(),
|
|
3386
3227
|
/** Source the overview from this repo file (stored overview stays as the pending fallback). */
|
|
3387
3228
|
overviewPath: overviewPathSchema.optional(),
|
|
3388
|
-
contextPaths:
|
|
3229
|
+
contextPaths: z11.array(ProjectTagContextPathSchema).max(20).optional(),
|
|
3389
3230
|
/** Parents to link at create time (multi-parent DAG). */
|
|
3390
|
-
parentTagIds:
|
|
3391
|
-
requestingUserId:
|
|
3231
|
+
parentTagIds: z11.array(z11.string()).max(25).optional(),
|
|
3232
|
+
requestingUserId: z11.string().optional()
|
|
3392
3233
|
});
|
|
3393
|
-
var UpdateProjectTagRequestSchema =
|
|
3394
|
-
projectId:
|
|
3395
|
-
tagId:
|
|
3396
|
-
name:
|
|
3234
|
+
var UpdateProjectTagRequestSchema = z11.object({
|
|
3235
|
+
projectId: z11.string(),
|
|
3236
|
+
tagId: z11.string(),
|
|
3237
|
+
name: z11.string().min(1).max(50).optional(),
|
|
3397
3238
|
color: hexColor.optional(),
|
|
3398
|
-
description:
|
|
3239
|
+
description: z11.string().max(TAG_DESCRIPTION_MAX).optional(),
|
|
3399
3240
|
/** Full markdown glossary body; null clears it. Rejected while overviewPath is set. */
|
|
3400
|
-
overview:
|
|
3241
|
+
overview: z11.string().max(TAG_OVERVIEW_MAX).nullable().optional(),
|
|
3401
3242
|
/** Repo file to source the overview from; null clears back to the stored overview. */
|
|
3402
3243
|
overviewPath: overviewPathSchema.nullable().optional(),
|
|
3403
3244
|
/** Full replacement of the tag's context links when provided. */
|
|
3404
|
-
contextPaths:
|
|
3245
|
+
contextPaths: z11.array(ProjectTagContextPathSchema).max(20).optional(),
|
|
3405
3246
|
/** Full-set replacement of the tag's parent tags (multi-parent DAG). */
|
|
3406
|
-
parentTagIds:
|
|
3247
|
+
parentTagIds: z11.array(z11.string()).max(25).optional(),
|
|
3407
3248
|
/** One-line revision provenance, recorded in the tag's history. */
|
|
3408
|
-
reason:
|
|
3249
|
+
reason: z11.string().max(TAG_REASON_MAX).optional(),
|
|
3409
3250
|
/** Card the caller was working in — stamped into the revision history. */
|
|
3410
|
-
taskId:
|
|
3411
|
-
requestingUserId:
|
|
3251
|
+
taskId: z11.string().optional(),
|
|
3252
|
+
requestingUserId: z11.string().optional()
|
|
3412
3253
|
});
|
|
3413
|
-
var PostToProjectChatRequestSchema =
|
|
3414
|
-
projectId:
|
|
3415
|
-
content:
|
|
3416
|
-
requestingUserId:
|
|
3254
|
+
var PostToProjectChatRequestSchema = z11.object({
|
|
3255
|
+
projectId: z11.string(),
|
|
3256
|
+
content: z11.string().min(1).max(2e4),
|
|
3257
|
+
requestingUserId: z11.string().optional(),
|
|
3417
3258
|
/** Marks the post so the server can persist it beyond chat (tag-audit summaries land in tag history). */
|
|
3418
|
-
kind:
|
|
3419
|
-
});
|
|
3420
|
-
var StartTagAuditRequestSchema =
|
|
3421
|
-
projectId:
|
|
3422
|
-
requestingUserId:
|
|
3423
|
-
});
|
|
3424
|
-
var StartTaskAuditRequestSchema =
|
|
3425
|
-
projectId:
|
|
3426
|
-
taskIds:
|
|
3427
|
-
requestingUserId:
|
|
3428
|
-
});
|
|
3429
|
-
var GetActiveAuditSessionsRequestSchema =
|
|
3430
|
-
projectId:
|
|
3431
|
-
});
|
|
3432
|
-
var ReportTaskAuditResultRequestSchema =
|
|
3433
|
-
projectId:
|
|
3434
|
-
taskId:
|
|
3435
|
-
summary:
|
|
3436
|
-
turnGrades:
|
|
3437
|
-
|
|
3438
|
-
turnIndex:
|
|
3439
|
-
phase:
|
|
3440
|
-
grade:
|
|
3441
|
-
reasoning:
|
|
3442
|
-
eventType:
|
|
3443
|
-
eventSummary:
|
|
3259
|
+
kind: z11.enum(["tag_audit_summary"]).optional()
|
|
3260
|
+
});
|
|
3261
|
+
var StartTagAuditRequestSchema = z11.object({
|
|
3262
|
+
projectId: z11.string(),
|
|
3263
|
+
requestingUserId: z11.string().optional()
|
|
3264
|
+
});
|
|
3265
|
+
var StartTaskAuditRequestSchema = z11.object({
|
|
3266
|
+
projectId: z11.string(),
|
|
3267
|
+
taskIds: z11.array(z11.string()).min(1).max(20),
|
|
3268
|
+
requestingUserId: z11.string().optional()
|
|
3269
|
+
});
|
|
3270
|
+
var GetActiveAuditSessionsRequestSchema = z11.object({
|
|
3271
|
+
projectId: z11.string()
|
|
3272
|
+
});
|
|
3273
|
+
var ReportTaskAuditResultRequestSchema = z11.object({
|
|
3274
|
+
projectId: z11.string(),
|
|
3275
|
+
taskId: z11.string(),
|
|
3276
|
+
summary: z11.string(),
|
|
3277
|
+
turnGrades: z11.array(
|
|
3278
|
+
z11.object({
|
|
3279
|
+
turnIndex: z11.number(),
|
|
3280
|
+
phase: z11.enum(["planning", "building", "human"]),
|
|
3281
|
+
grade: z11.enum(["correct", "neutral", "blunder"]),
|
|
3282
|
+
reasoning: z11.string(),
|
|
3283
|
+
eventType: z11.string(),
|
|
3284
|
+
eventSummary: z11.string()
|
|
3444
3285
|
})
|
|
3445
3286
|
),
|
|
3446
|
-
planningAccuracy:
|
|
3447
|
-
buildingAccuracy:
|
|
3448
|
-
humanAccuracy:
|
|
3449
|
-
planningCorrect:
|
|
3450
|
-
planningNeutral:
|
|
3451
|
-
planningBlunder:
|
|
3452
|
-
buildingCorrect:
|
|
3453
|
-
buildingNeutral:
|
|
3454
|
-
buildingBlunder:
|
|
3455
|
-
humanCorrect:
|
|
3456
|
-
humanNeutral:
|
|
3457
|
-
humanBlunder:
|
|
3458
|
-
humanEvaluations:
|
|
3459
|
-
|
|
3460
|
-
messageIndex:
|
|
3461
|
-
rating:
|
|
3462
|
-
reasoning:
|
|
3287
|
+
planningAccuracy: z11.number().nullable(),
|
|
3288
|
+
buildingAccuracy: z11.number().nullable(),
|
|
3289
|
+
humanAccuracy: z11.number().nullable(),
|
|
3290
|
+
planningCorrect: z11.number(),
|
|
3291
|
+
planningNeutral: z11.number(),
|
|
3292
|
+
planningBlunder: z11.number(),
|
|
3293
|
+
buildingCorrect: z11.number(),
|
|
3294
|
+
buildingNeutral: z11.number(),
|
|
3295
|
+
buildingBlunder: z11.number(),
|
|
3296
|
+
humanCorrect: z11.number(),
|
|
3297
|
+
humanNeutral: z11.number(),
|
|
3298
|
+
humanBlunder: z11.number(),
|
|
3299
|
+
humanEvaluations: z11.array(
|
|
3300
|
+
z11.object({
|
|
3301
|
+
messageIndex: z11.number(),
|
|
3302
|
+
rating: z11.union([z11.literal(-1), z11.literal(0), z11.literal(1)]),
|
|
3303
|
+
reasoning: z11.string()
|
|
3463
3304
|
})
|
|
3464
3305
|
).optional(),
|
|
3465
|
-
suggestionIds:
|
|
3466
|
-
auditCostUsd:
|
|
3467
|
-
model:
|
|
3306
|
+
suggestionIds: z11.array(z11.string()),
|
|
3307
|
+
auditCostUsd: z11.number().nullable(),
|
|
3308
|
+
model: z11.string().nullable(),
|
|
3468
3309
|
/** When set, the audit is marked failed with this message instead. */
|
|
3469
|
-
error:
|
|
3310
|
+
error: z11.string().optional()
|
|
3470
3311
|
});
|
|
3471
|
-
var GetTaskAuditsRequestSchema =
|
|
3472
|
-
projectId:
|
|
3473
|
-
limit:
|
|
3312
|
+
var GetTaskAuditsRequestSchema = z11.object({
|
|
3313
|
+
projectId: z11.string(),
|
|
3314
|
+
limit: z11.number().int().positive().max(200).optional().default(50)
|
|
3474
3315
|
});
|
|
3475
|
-
var GetTaskAuditRequestSchema =
|
|
3476
|
-
projectId:
|
|
3477
|
-
auditId:
|
|
3316
|
+
var GetTaskAuditRequestSchema = z11.object({
|
|
3317
|
+
projectId: z11.string(),
|
|
3318
|
+
auditId: z11.string()
|
|
3478
3319
|
});
|
|
3479
|
-
var GetTaskAuditAggregatesRequestSchema =
|
|
3480
|
-
projectId:
|
|
3320
|
+
var GetTaskAuditAggregatesRequestSchema = z11.object({
|
|
3321
|
+
projectId: z11.string()
|
|
3481
3322
|
});
|
|
3482
|
-
var DeleteTaskAuditRequestSchema =
|
|
3483
|
-
projectId:
|
|
3484
|
-
auditId:
|
|
3485
|
-
requestingUserId:
|
|
3323
|
+
var DeleteTaskAuditRequestSchema = z11.object({
|
|
3324
|
+
projectId: z11.string(),
|
|
3325
|
+
auditId: z11.string(),
|
|
3326
|
+
requestingUserId: z11.string().optional()
|
|
3486
3327
|
});
|
|
3487
|
-
var MarkInitialPromptSubmittedRequestSchema =
|
|
3488
|
-
sessionId:
|
|
3328
|
+
var MarkInitialPromptSubmittedRequestSchema = z11.object({
|
|
3329
|
+
sessionId: z11.string()
|
|
3489
3330
|
});
|
|
3490
3331
|
var CRITICAL_AUTOMATED_SOURCES = /* @__PURE__ */ new Set([
|
|
3491
3332
|
"ci_failure",
|
|
@@ -3539,165 +3380,165 @@ var DECISION_DEADLINE_MIN_HOURS = 1;
|
|
|
3539
3380
|
var DECISION_DEADLINE_MAX_DAYS = 30;
|
|
3540
3381
|
var DECISION_DEADLINE_MAX_HOURS = DECISION_DEADLINE_MAX_DAYS * 24;
|
|
3541
3382
|
var DECISION_LIST_MAX_LIMIT = 200;
|
|
3542
|
-
var decisionIdSchema =
|
|
3543
|
-
var optionInputSchema =
|
|
3544
|
-
label:
|
|
3545
|
-
description:
|
|
3546
|
-
kind:
|
|
3383
|
+
var decisionIdSchema = z12.string().cuid("Invalid decision ID");
|
|
3384
|
+
var optionInputSchema = z12.object({
|
|
3385
|
+
label: z12.string().min(1, "Option label is required").max(DECISION_OPTION_LABEL_MAX),
|
|
3386
|
+
description: z12.string().min(1, "Describe the option as GIVEN / WHEN / THEN"),
|
|
3387
|
+
kind: z12.enum(DECISION_OPTION_KINDS).optional()
|
|
3547
3388
|
});
|
|
3548
|
-
var optionsArraySchema =
|
|
3389
|
+
var optionsArraySchema = z12.array(optionInputSchema).min(DECISION_OPTIONS_MIN, `A decision needs at least ${DECISION_OPTIONS_MIN} options`).max(
|
|
3549
3390
|
DECISION_OPTIONS_MAX,
|
|
3550
3391
|
`A decision takes at most ${DECISION_OPTIONS_MAX} options \u2014 more than that means the question is not framed yet`
|
|
3551
3392
|
);
|
|
3552
|
-
var CreateDecisionRequestSchema =
|
|
3553
|
-
projectId:
|
|
3393
|
+
var CreateDecisionRequestSchema = z12.object({
|
|
3394
|
+
projectId: z12.string().cuid("Invalid project ID"),
|
|
3554
3395
|
/** The question, as one plain sentence. */
|
|
3555
|
-
title:
|
|
3556
|
-
description:
|
|
3557
|
-
context:
|
|
3396
|
+
title: z12.string().min(1, "A decision needs a question").max(DECISION_QUESTION_MAX),
|
|
3397
|
+
description: z12.string().max(CARD_DESCRIPTION_MAX).optional(),
|
|
3398
|
+
context: z12.string().min(1, "Context is required \u2014 say why this is being asked now"),
|
|
3558
3399
|
options: optionsArraySchema,
|
|
3559
3400
|
/** 1-based position of the option that wins on silence. */
|
|
3560
|
-
defaultOptionOrdinal:
|
|
3561
|
-
deadlineHours:
|
|
3401
|
+
defaultOptionOrdinal: z12.number().int().min(1).max(DECISION_OPTIONS_MAX),
|
|
3402
|
+
deadlineHours: z12.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional(),
|
|
3562
3403
|
/** Cards this decision blocks, by cuid or slug. */
|
|
3563
|
-
impactedCardRefs:
|
|
3564
|
-
tagNames:
|
|
3565
|
-
raisedByTaskId:
|
|
3566
|
-
raisedByPrNumber:
|
|
3404
|
+
impactedCardRefs: z12.array(z12.string().min(1)).max(50).optional(),
|
|
3405
|
+
tagNames: z12.array(z12.string().min(1)).max(10).optional(),
|
|
3406
|
+
raisedByTaskId: z12.string().min(1).optional(),
|
|
3407
|
+
raisedByPrNumber: z12.number().int().positive().optional()
|
|
3567
3408
|
});
|
|
3568
|
-
var VoteDecisionRequestSchema =
|
|
3409
|
+
var VoteDecisionRequestSchema = z12.object({
|
|
3569
3410
|
decisionId: decisionIdSchema,
|
|
3570
|
-
optionId:
|
|
3571
|
-
reason:
|
|
3572
|
-
source:
|
|
3411
|
+
optionId: z12.string().cuid("Invalid option ID"),
|
|
3412
|
+
reason: z12.string().max(DECISION_VOTE_REASON_MAX).optional(),
|
|
3413
|
+
source: z12.enum(DECISION_VOTE_SOURCES).optional()
|
|
3573
3414
|
});
|
|
3574
|
-
var RemoveDecisionVoteRequestSchema =
|
|
3415
|
+
var RemoveDecisionVoteRequestSchema = z12.object({
|
|
3575
3416
|
decisionId: decisionIdSchema
|
|
3576
3417
|
});
|
|
3577
|
-
var ResolveDecisionRequestSchema =
|
|
3418
|
+
var ResolveDecisionRequestSchema = z12.object({
|
|
3578
3419
|
decisionId: decisionIdSchema,
|
|
3579
|
-
chosenOptionId:
|
|
3580
|
-
resolution:
|
|
3581
|
-
resolutionNotes:
|
|
3420
|
+
chosenOptionId: z12.string().cuid("Invalid option ID"),
|
|
3421
|
+
resolution: z12.string().min(1, "A resolution is required \u2014 say what was decided").max(DECISION_RESOLUTION_MAX),
|
|
3422
|
+
resolutionNotes: z12.string().optional()
|
|
3582
3423
|
});
|
|
3583
|
-
var CancelDecisionRequestSchema =
|
|
3424
|
+
var CancelDecisionRequestSchema = z12.object({
|
|
3584
3425
|
decisionId: decisionIdSchema,
|
|
3585
3426
|
/** Why it is being dropped. Posted to the decision thread. */
|
|
3586
|
-
reason:
|
|
3427
|
+
reason: z12.string().max(DECISION_RESOLUTION_MAX).optional()
|
|
3587
3428
|
});
|
|
3588
|
-
var BulkDecisionIdsRequestSchema =
|
|
3589
|
-
projectId:
|
|
3590
|
-
decisionIds:
|
|
3429
|
+
var BulkDecisionIdsRequestSchema = z12.object({
|
|
3430
|
+
projectId: z12.string().cuid("Invalid project ID"),
|
|
3431
|
+
decisionIds: z12.array(z12.string().cuid()).min(1).max(200)
|
|
3591
3432
|
});
|
|
3592
|
-
var ReopenDecisionRequestSchema =
|
|
3433
|
+
var ReopenDecisionRequestSchema = z12.object({
|
|
3593
3434
|
decisionId: decisionIdSchema,
|
|
3594
|
-
deadlineHours:
|
|
3435
|
+
deadlineHours: z12.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional()
|
|
3595
3436
|
});
|
|
3596
|
-
var UpdateDecisionRequestSchema =
|
|
3437
|
+
var UpdateDecisionRequestSchema = z12.object({
|
|
3597
3438
|
decisionId: decisionIdSchema,
|
|
3598
|
-
title:
|
|
3599
|
-
description:
|
|
3600
|
-
context:
|
|
3601
|
-
deadlineAt:
|
|
3439
|
+
title: z12.string().min(1).max(200).optional(),
|
|
3440
|
+
description: z12.string().max(CARD_DESCRIPTION_MAX).optional(),
|
|
3441
|
+
context: z12.string().min(1).optional(),
|
|
3442
|
+
deadlineAt: z12.string().datetime().optional(),
|
|
3602
3443
|
/** Only accepted while the decision has zero votes. */
|
|
3603
3444
|
options: optionsArraySchema.optional(),
|
|
3604
|
-
defaultOptionOrdinal:
|
|
3605
|
-
addImpactedCardRefs:
|
|
3606
|
-
removeImpactedCardIds:
|
|
3445
|
+
defaultOptionOrdinal: z12.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
|
|
3446
|
+
addImpactedCardRefs: z12.array(z12.string().min(1)).max(50).optional(),
|
|
3447
|
+
removeImpactedCardIds: z12.array(z12.string().min(1)).max(50).optional()
|
|
3607
3448
|
});
|
|
3608
|
-
var GetDecisionRequestSchema =
|
|
3449
|
+
var GetDecisionRequestSchema = z12.object({
|
|
3609
3450
|
/** cuid or slug. A slug needs `projectId` to resolve unambiguously. */
|
|
3610
|
-
decisionId:
|
|
3611
|
-
projectId:
|
|
3451
|
+
decisionId: z12.string().min(1),
|
|
3452
|
+
projectId: z12.string().cuid().optional()
|
|
3612
3453
|
});
|
|
3613
|
-
var ListDecisionsRequestSchema =
|
|
3614
|
-
projectId:
|
|
3615
|
-
status:
|
|
3454
|
+
var ListDecisionsRequestSchema = z12.object({
|
|
3455
|
+
projectId: z12.string().cuid("Invalid project ID"),
|
|
3456
|
+
status: z12.enum(DECISION_STATUS_LABELS).optional(),
|
|
3616
3457
|
/** Tag name, not id — an agent knows the tag it is working under. */
|
|
3617
|
-
tag:
|
|
3458
|
+
tag: z12.string().min(1).optional(),
|
|
3618
3459
|
/** Decisions that this card is blocked by (cuid or slug). */
|
|
3619
|
-
cardId:
|
|
3620
|
-
query:
|
|
3621
|
-
limit:
|
|
3460
|
+
cardId: z12.string().min(1).optional(),
|
|
3461
|
+
query: z12.string().min(1).optional(),
|
|
3462
|
+
limit: z12.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional()
|
|
3622
3463
|
});
|
|
3623
|
-
var optionInput =
|
|
3624
|
-
label:
|
|
3625
|
-
description:
|
|
3626
|
-
kind:
|
|
3464
|
+
var optionInput = z13.object({
|
|
3465
|
+
label: z13.string().min(1).max(DECISION_OPTION_LABEL_MAX),
|
|
3466
|
+
description: z13.string().min(1),
|
|
3467
|
+
kind: z13.enum(DECISION_OPTION_KINDS).optional()
|
|
3627
3468
|
});
|
|
3628
|
-
var optionsInput =
|
|
3629
|
-
var deadlineHours =
|
|
3630
|
-
var CreateProjectDecisionRequestSchema =
|
|
3631
|
-
projectId:
|
|
3632
|
-
question:
|
|
3633
|
-
summary:
|
|
3634
|
-
context:
|
|
3469
|
+
var optionsInput = z13.array(optionInput).min(DECISION_OPTIONS_MIN).max(DECISION_OPTIONS_MAX);
|
|
3470
|
+
var deadlineHours = z13.number().min(DECISION_DEADLINE_MIN_HOURS).max(DECISION_DEADLINE_MAX_HOURS).optional();
|
|
3471
|
+
var CreateProjectDecisionRequestSchema = z13.object({
|
|
3472
|
+
projectId: z13.string(),
|
|
3473
|
+
question: z13.string().min(1).max(200),
|
|
3474
|
+
summary: z13.string().max(CARD_DESCRIPTION_MAX).optional(),
|
|
3475
|
+
context: z13.string().min(1),
|
|
3635
3476
|
options: optionsInput,
|
|
3636
|
-
defaultOption:
|
|
3477
|
+
defaultOption: z13.number().int().min(1).max(DECISION_OPTIONS_MAX),
|
|
3637
3478
|
deadlineHours,
|
|
3638
|
-
impactedCards:
|
|
3479
|
+
impactedCards: z13.array(z13.string().min(1)).max(50).optional(),
|
|
3639
3480
|
/**
|
|
3640
3481
|
* Pod surface only: also block the card this session is working on. The
|
|
3641
3482
|
* session's task id is resolved SERVER-side from `sessionId` — a
|
|
3642
3483
|
* client-supplied card id would let a pod block any card in the project.
|
|
3643
3484
|
*/
|
|
3644
|
-
includeCurrentCard:
|
|
3645
|
-
sessionId:
|
|
3646
|
-
tagNames:
|
|
3647
|
-
raisedByPr:
|
|
3485
|
+
includeCurrentCard: z13.boolean().optional(),
|
|
3486
|
+
sessionId: z13.string().optional(),
|
|
3487
|
+
tagNames: z13.array(z13.string().min(1)).max(10).optional(),
|
|
3488
|
+
raisedByPr: z13.number().int().positive().optional(),
|
|
3648
3489
|
/** Slug or id of the card that raised the question. A link back, not a block. */
|
|
3649
|
-
raisedByCard:
|
|
3490
|
+
raisedByCard: z13.string().min(1).optional(),
|
|
3650
3491
|
/** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
|
|
3651
|
-
deadlineAt:
|
|
3652
|
-
requestingUserId:
|
|
3492
|
+
deadlineAt: z13.string().datetime({ offset: true }).optional(),
|
|
3493
|
+
requestingUserId: z13.string().optional()
|
|
3653
3494
|
});
|
|
3654
|
-
var ListProjectDecisionsRequestSchema =
|
|
3655
|
-
projectId:
|
|
3656
|
-
status:
|
|
3657
|
-
tag:
|
|
3658
|
-
card:
|
|
3659
|
-
query:
|
|
3660
|
-
limit:
|
|
3661
|
-
requestingUserId:
|
|
3662
|
-
});
|
|
3663
|
-
var GetProjectDecisionRequestSchema =
|
|
3664
|
-
projectId:
|
|
3665
|
-
decision:
|
|
3666
|
-
requestingUserId:
|
|
3495
|
+
var ListProjectDecisionsRequestSchema = z13.object({
|
|
3496
|
+
projectId: z13.string(),
|
|
3497
|
+
status: z13.enum(DECISION_STATUS_LABELS).optional(),
|
|
3498
|
+
tag: z13.string().min(1).optional(),
|
|
3499
|
+
card: z13.string().min(1).optional(),
|
|
3500
|
+
query: z13.string().min(1).optional(),
|
|
3501
|
+
limit: z13.number().int().min(1).max(DECISION_LIST_MAX_LIMIT).optional(),
|
|
3502
|
+
requestingUserId: z13.string().optional()
|
|
3503
|
+
});
|
|
3504
|
+
var GetProjectDecisionRequestSchema = z13.object({
|
|
3505
|
+
projectId: z13.string(),
|
|
3506
|
+
decision: z13.string().min(1),
|
|
3507
|
+
requestingUserId: z13.string().optional()
|
|
3667
3508
|
});
|
|
3668
|
-
var VoteProjectDecisionRequestSchema =
|
|
3669
|
-
projectId:
|
|
3670
|
-
decision:
|
|
3509
|
+
var VoteProjectDecisionRequestSchema = z13.object({
|
|
3510
|
+
projectId: z13.string(),
|
|
3511
|
+
decision: z13.string().min(1),
|
|
3671
3512
|
/** An option id, or its 1-based position. */
|
|
3672
|
-
option:
|
|
3673
|
-
reason:
|
|
3674
|
-
requestingUserId:
|
|
3675
|
-
});
|
|
3676
|
-
var ResolveProjectDecisionRequestSchema =
|
|
3677
|
-
projectId:
|
|
3678
|
-
decision:
|
|
3679
|
-
option:
|
|
3680
|
-
resolution:
|
|
3681
|
-
notes:
|
|
3682
|
-
requestingUserId:
|
|
3683
|
-
});
|
|
3684
|
-
var UpdateProjectDecisionRequestSchema =
|
|
3685
|
-
projectId:
|
|
3686
|
-
decision:
|
|
3687
|
-
question:
|
|
3688
|
-
summary:
|
|
3689
|
-
context:
|
|
3513
|
+
option: z13.string().min(1),
|
|
3514
|
+
reason: z13.string().max(CARD_DESCRIPTION_MAX).optional(),
|
|
3515
|
+
requestingUserId: z13.string().optional()
|
|
3516
|
+
});
|
|
3517
|
+
var ResolveProjectDecisionRequestSchema = z13.object({
|
|
3518
|
+
projectId: z13.string(),
|
|
3519
|
+
decision: z13.string().min(1),
|
|
3520
|
+
option: z13.string().min(1),
|
|
3521
|
+
resolution: z13.string().min(1).max(DECISION_RESOLUTION_MAX),
|
|
3522
|
+
notes: z13.string().optional(),
|
|
3523
|
+
requestingUserId: z13.string().optional()
|
|
3524
|
+
});
|
|
3525
|
+
var UpdateProjectDecisionRequestSchema = z13.object({
|
|
3526
|
+
projectId: z13.string(),
|
|
3527
|
+
decision: z13.string().min(1),
|
|
3528
|
+
question: z13.string().min(1).max(200).optional(),
|
|
3529
|
+
summary: z13.string().max(CARD_DESCRIPTION_MAX).optional(),
|
|
3530
|
+
context: z13.string().min(1).optional(),
|
|
3690
3531
|
/** Accepted only while nobody has voted. */
|
|
3691
3532
|
options: optionsInput.optional(),
|
|
3692
|
-
defaultOption:
|
|
3693
|
-
tagNames:
|
|
3533
|
+
defaultOption: z13.number().int().min(1).max(DECISION_OPTIONS_MAX).optional(),
|
|
3534
|
+
tagNames: z13.array(z13.string().min(1)).max(10).optional(),
|
|
3694
3535
|
deadlineHours,
|
|
3695
3536
|
/** Absolute deadline (ISO 8601). Wins over `deadlineHours` when both are sent. */
|
|
3696
|
-
deadlineAt:
|
|
3697
|
-
addImpactedCards:
|
|
3698
|
-
removeImpactedCards:
|
|
3699
|
-
status:
|
|
3700
|
-
requestingUserId:
|
|
3537
|
+
deadlineAt: z13.string().datetime({ offset: true }).optional(),
|
|
3538
|
+
addImpactedCards: z13.array(z13.string().min(1)).max(50).optional(),
|
|
3539
|
+
removeImpactedCards: z13.array(z13.string().min(1)).max(50).optional(),
|
|
3540
|
+
status: z13.enum(["Cancelled", "Open"]).optional(),
|
|
3541
|
+
requestingUserId: z13.string().optional()
|
|
3701
3542
|
});
|
|
3702
3543
|
var EVALUATE_MAX_QUESTIONS = 32;
|
|
3703
3544
|
var EVALUATE_MAX_ITEMS = 100;
|
|
@@ -3705,29 +3546,29 @@ var EVALUATE_ITEM_MAX_CHARS = 8e3;
|
|
|
3705
3546
|
var EVALUATE_REQUEST_MAX_CHARS = 4e5;
|
|
3706
3547
|
var TEXT_MAX = 1e3;
|
|
3707
3548
|
var QUESTION_KEY = /^[A-Za-z0-9_-]{1,64}$/;
|
|
3708
|
-
var EvaluateQuestionSchema =
|
|
3709
|
-
key:
|
|
3710
|
-
type:
|
|
3711
|
-
instructions:
|
|
3712
|
-
options:
|
|
3713
|
-
|
|
3714
|
-
key:
|
|
3715
|
-
description:
|
|
3549
|
+
var EvaluateQuestionSchema = z14.object({
|
|
3550
|
+
key: z14.string().regex(QUESTION_KEY, "key must be 1-64 letters, digits, _ or -"),
|
|
3551
|
+
type: z14.enum(["noul", "choice", "score"]),
|
|
3552
|
+
instructions: z14.string().min(1).max(4e3),
|
|
3553
|
+
options: z14.array(
|
|
3554
|
+
z14.object({
|
|
3555
|
+
key: z14.string().min(1).max(200),
|
|
3556
|
+
description: z14.string().min(1).max(TEXT_MAX)
|
|
3716
3557
|
})
|
|
3717
3558
|
).optional(),
|
|
3718
|
-
levels:
|
|
3559
|
+
levels: z14.array(z14.string().min(1).max(TEXT_MAX)).optional()
|
|
3719
3560
|
}).superRefine((q, ctx) => {
|
|
3720
3561
|
if (q.type === "choice") {
|
|
3721
3562
|
const n = q.options?.length ?? 0;
|
|
3722
3563
|
if (n < 2 || n > 255) {
|
|
3723
3564
|
ctx.addIssue({
|
|
3724
|
-
code:
|
|
3565
|
+
code: z14.ZodIssueCode.custom,
|
|
3725
3566
|
path: ["options"],
|
|
3726
3567
|
message: "a choice question needs 2-255 options"
|
|
3727
3568
|
});
|
|
3728
3569
|
} else if (new Set(q.options?.map((o) => o.key)).size !== n) {
|
|
3729
3570
|
ctx.addIssue({
|
|
3730
|
-
code:
|
|
3571
|
+
code: z14.ZodIssueCode.custom,
|
|
3731
3572
|
path: ["options"],
|
|
3732
3573
|
message: "option keys must be unique"
|
|
3733
3574
|
});
|
|
@@ -3737,36 +3578,36 @@ var EvaluateQuestionSchema = z13.object({
|
|
|
3737
3578
|
const n = q.levels?.length ?? 0;
|
|
3738
3579
|
if (n < 2 || n > 10) {
|
|
3739
3580
|
ctx.addIssue({
|
|
3740
|
-
code:
|
|
3581
|
+
code: z14.ZodIssueCode.custom,
|
|
3741
3582
|
path: ["levels"],
|
|
3742
3583
|
message: "a score question needs 2-10 levels"
|
|
3743
3584
|
});
|
|
3744
3585
|
}
|
|
3745
3586
|
}
|
|
3746
3587
|
});
|
|
3747
|
-
var EvaluateQuestionsRequestSchema =
|
|
3748
|
-
projectId:
|
|
3749
|
-
state:
|
|
3750
|
-
items:
|
|
3751
|
-
questions:
|
|
3588
|
+
var EvaluateQuestionsRequestSchema = z14.object({
|
|
3589
|
+
projectId: z14.string(),
|
|
3590
|
+
state: z14.string().max(JEV_STATE_MAX_CHARS).optional(),
|
|
3591
|
+
items: z14.array(z14.string().max(EVALUATE_ITEM_MAX_CHARS)).max(EVALUATE_MAX_ITEMS).optional(),
|
|
3592
|
+
questions: z14.array(EvaluateQuestionSchema).min(1).max(EVALUATE_MAX_QUESTIONS)
|
|
3752
3593
|
}).superRefine((req, ctx) => {
|
|
3753
3594
|
if (req.state === void 0 && (!req.items || req.items.length === 0)) {
|
|
3754
3595
|
ctx.addIssue({
|
|
3755
|
-
code:
|
|
3596
|
+
code: z14.ZodIssueCode.custom,
|
|
3756
3597
|
path: ["state"],
|
|
3757
3598
|
message: "pass state, or a non-empty items array"
|
|
3758
3599
|
});
|
|
3759
3600
|
}
|
|
3760
3601
|
if (JSON.stringify(req).length > EVALUATE_REQUEST_MAX_CHARS) {
|
|
3761
3602
|
ctx.addIssue({
|
|
3762
|
-
code:
|
|
3603
|
+
code: z14.ZodIssueCode.custom,
|
|
3763
3604
|
path: [],
|
|
3764
3605
|
message: `the request is over ${EVALUATE_REQUEST_MAX_CHARS} characters; split the items across calls`
|
|
3765
3606
|
});
|
|
3766
3607
|
}
|
|
3767
3608
|
if (new Set(req.questions.map((q) => q.key)).size !== req.questions.length) {
|
|
3768
3609
|
ctx.addIssue({
|
|
3769
|
-
code:
|
|
3610
|
+
code: z14.ZodIssueCode.custom,
|
|
3770
3611
|
path: ["questions"],
|
|
3771
3612
|
message: "question keys must be unique"
|
|
3772
3613
|
});
|
|
@@ -3804,129 +3645,129 @@ var MEETING_TITLE_MAX = 200;
|
|
|
3804
3645
|
var MEETING_OCCURRED_AT_MIN_YEAR = 2e3;
|
|
3805
3646
|
var MEETING_OCCURRED_AT_MAX_FUTURE_MS = 48 * 60 * 60 * 1e3;
|
|
3806
3647
|
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.`;
|
|
3807
|
-
var MeetingOccurredAtSchema =
|
|
3648
|
+
var MeetingOccurredAtSchema = z15.string().datetime().refine((value) => {
|
|
3808
3649
|
const ms = Date.parse(value);
|
|
3809
3650
|
if (Number.isNaN(ms)) return false;
|
|
3810
3651
|
if (ms > Date.now() + MEETING_OCCURRED_AT_MAX_FUTURE_MS) return false;
|
|
3811
3652
|
return new Date(ms).getUTCFullYear() >= MEETING_OCCURRED_AT_MIN_YEAR;
|
|
3812
3653
|
}, OCCURRED_AT_RANGE_MESSAGE);
|
|
3813
|
-
var CreateMeetingFromTranscriptRequestSchema =
|
|
3814
|
-
projectId:
|
|
3815
|
-
rawText:
|
|
3816
|
-
title:
|
|
3654
|
+
var CreateMeetingFromTranscriptRequestSchema = z15.object({
|
|
3655
|
+
projectId: z15.string().cuid(),
|
|
3656
|
+
rawText: z15.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
3657
|
+
title: z15.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
3817
3658
|
/** ISO 8601. Defaults to now when the source carries no date. */
|
|
3818
3659
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
3819
3660
|
/** Override auto-detection. Rarely needed; detection handles the three formats. */
|
|
3820
|
-
format:
|
|
3821
|
-
source:
|
|
3661
|
+
format: z15.enum(["text", "vtt", "srt"]).optional(),
|
|
3662
|
+
source: z15.enum(["manual", "slack"]).optional()
|
|
3822
3663
|
});
|
|
3823
|
-
var GetMeetingRequestSchema =
|
|
3824
|
-
projectId:
|
|
3825
|
-
meetingId:
|
|
3664
|
+
var GetMeetingRequestSchema = z15.object({
|
|
3665
|
+
projectId: z15.string().cuid(),
|
|
3666
|
+
meetingId: z15.string().cuid()
|
|
3826
3667
|
});
|
|
3827
|
-
var UpdateMeetingRequestSchema =
|
|
3828
|
-
projectId:
|
|
3829
|
-
meetingId:
|
|
3830
|
-
title:
|
|
3668
|
+
var UpdateMeetingRequestSchema = z15.object({
|
|
3669
|
+
projectId: z15.string().cuid(),
|
|
3670
|
+
meetingId: z15.string().cuid(),
|
|
3671
|
+
title: z15.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
3831
3672
|
occurredAt: MeetingOccurredAtSchema.optional()
|
|
3832
3673
|
});
|
|
3833
|
-
var RegenerateMeetingSummaryRequestSchema =
|
|
3834
|
-
projectId:
|
|
3835
|
-
meetingId:
|
|
3674
|
+
var RegenerateMeetingSummaryRequestSchema = z15.object({
|
|
3675
|
+
projectId: z15.string().cuid(),
|
|
3676
|
+
meetingId: z15.string().cuid()
|
|
3836
3677
|
});
|
|
3837
|
-
var DeleteMeetingRequestSchema =
|
|
3838
|
-
projectId:
|
|
3839
|
-
meetingId:
|
|
3678
|
+
var DeleteMeetingRequestSchema = z15.object({
|
|
3679
|
+
projectId: z15.string().cuid(),
|
|
3680
|
+
meetingId: z15.string().cuid()
|
|
3840
3681
|
});
|
|
3841
|
-
var checklistTitle =
|
|
3842
|
-
var ListMeetingChecklistRequestSchema =
|
|
3843
|
-
projectId:
|
|
3844
|
-
meetingId:
|
|
3682
|
+
var checklistTitle = z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX);
|
|
3683
|
+
var ListMeetingChecklistRequestSchema = z15.object({
|
|
3684
|
+
projectId: z15.string().cuid(),
|
|
3685
|
+
meetingId: z15.string().cuid()
|
|
3845
3686
|
});
|
|
3846
|
-
var AddMeetingChecklistItemsRequestSchema =
|
|
3847
|
-
projectId:
|
|
3848
|
-
meetingId:
|
|
3849
|
-
items:
|
|
3687
|
+
var AddMeetingChecklistItemsRequestSchema = z15.object({
|
|
3688
|
+
projectId: z15.string().cuid(),
|
|
3689
|
+
meetingId: z15.string().cuid(),
|
|
3690
|
+
items: z15.array(z15.object({ title: checklistTitle })).min(1).max(50)
|
|
3850
3691
|
});
|
|
3851
|
-
var UpdateMeetingChecklistItemRequestSchema =
|
|
3852
|
-
projectId:
|
|
3853
|
-
meetingId:
|
|
3854
|
-
itemId:
|
|
3692
|
+
var UpdateMeetingChecklistItemRequestSchema = z15.object({
|
|
3693
|
+
projectId: z15.string().cuid(),
|
|
3694
|
+
meetingId: z15.string().cuid(),
|
|
3695
|
+
itemId: z15.string().cuid(),
|
|
3855
3696
|
title: checklistTitle.optional(),
|
|
3856
|
-
ordinal:
|
|
3697
|
+
ordinal: z15.number().int().min(0).optional(),
|
|
3857
3698
|
/** Explicit null clears the link; undefined leaves it alone. */
|
|
3858
|
-
linkedTaskId:
|
|
3699
|
+
linkedTaskId: z15.string().cuid().nullable().optional()
|
|
3859
3700
|
}).refine(
|
|
3860
3701
|
(v) => v.title !== void 0 || v.ordinal !== void 0 || v.linkedTaskId !== void 0,
|
|
3861
3702
|
"Pass at least one of title, ordinal, or linkedTaskId."
|
|
3862
3703
|
);
|
|
3863
|
-
var DeleteMeetingChecklistItemRequestSchema =
|
|
3864
|
-
projectId:
|
|
3865
|
-
meetingId:
|
|
3866
|
-
itemId:
|
|
3867
|
-
});
|
|
3868
|
-
var SetMeetingChecklistItemCheckedRequestSchema =
|
|
3869
|
-
projectId:
|
|
3870
|
-
meetingId:
|
|
3871
|
-
itemId:
|
|
3872
|
-
checked:
|
|
3704
|
+
var DeleteMeetingChecklistItemRequestSchema = z15.object({
|
|
3705
|
+
projectId: z15.string().cuid(),
|
|
3706
|
+
meetingId: z15.string().cuid(),
|
|
3707
|
+
itemId: z15.string().cuid()
|
|
3708
|
+
});
|
|
3709
|
+
var SetMeetingChecklistItemCheckedRequestSchema = z15.object({
|
|
3710
|
+
projectId: z15.string().cuid(),
|
|
3711
|
+
meetingId: z15.string().cuid(),
|
|
3712
|
+
itemId: z15.string().cuid(),
|
|
3713
|
+
checked: z15.boolean(),
|
|
3873
3714
|
/** Attach the card in the same call that ticks the item. */
|
|
3874
|
-
linkedTaskId:
|
|
3715
|
+
linkedTaskId: z15.string().cuid().nullable().optional()
|
|
3875
3716
|
});
|
|
3876
|
-
var ListMeetingsRequestSchema =
|
|
3877
|
-
projectId:
|
|
3878
|
-
limit:
|
|
3879
|
-
search:
|
|
3717
|
+
var ListMeetingsRequestSchema = z15.object({
|
|
3718
|
+
projectId: z15.string().cuid(),
|
|
3719
|
+
limit: z15.number().int().min(1).max(50).optional(),
|
|
3720
|
+
search: z15.string().max(200).optional()
|
|
3880
3721
|
});
|
|
3881
|
-
var ReadMeetingTranscriptRequestSchema =
|
|
3882
|
-
projectId:
|
|
3883
|
-
meetingId:
|
|
3884
|
-
offset:
|
|
3885
|
-
limit:
|
|
3722
|
+
var ReadMeetingTranscriptRequestSchema = z15.object({
|
|
3723
|
+
projectId: z15.string().cuid(),
|
|
3724
|
+
meetingId: z15.string().cuid(),
|
|
3725
|
+
offset: z15.number().int().min(0).optional(),
|
|
3726
|
+
limit: z15.number().int().min(1).max(500).optional()
|
|
3886
3727
|
});
|
|
3887
3728
|
var MEETING_SUMMARY_MAX_CHARS = 5e4;
|
|
3888
|
-
var AddProjectMeetingChecklistItemsRequestSchema =
|
|
3889
|
-
projectId:
|
|
3890
|
-
meetingId:
|
|
3891
|
-
items:
|
|
3892
|
-
requestingUserId:
|
|
3893
|
-
});
|
|
3894
|
-
var CheckProjectMeetingChecklistItemRequestSchema =
|
|
3895
|
-
projectId:
|
|
3896
|
-
meetingId:
|
|
3897
|
-
title:
|
|
3898
|
-
checked:
|
|
3729
|
+
var AddProjectMeetingChecklistItemsRequestSchema = z15.object({
|
|
3730
|
+
projectId: z15.string().cuid(),
|
|
3731
|
+
meetingId: z15.string().cuid(),
|
|
3732
|
+
items: z15.array(z15.object({ title: z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX) })).min(1).max(50),
|
|
3733
|
+
requestingUserId: z15.string().optional()
|
|
3734
|
+
});
|
|
3735
|
+
var CheckProjectMeetingChecklistItemRequestSchema = z15.object({
|
|
3736
|
+
projectId: z15.string().cuid(),
|
|
3737
|
+
meetingId: z15.string().cuid(),
|
|
3738
|
+
title: z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
3739
|
+
checked: z15.boolean(),
|
|
3899
3740
|
/** Card id or slug. Resolved server-side and required to be in the project. */
|
|
3900
|
-
linkedTask:
|
|
3901
|
-
requestingUserId:
|
|
3902
|
-
});
|
|
3903
|
-
var EditProjectMeetingChecklistItemRequestSchema =
|
|
3904
|
-
projectId:
|
|
3905
|
-
meetingId:
|
|
3906
|
-
title:
|
|
3907
|
-
newTitle:
|
|
3908
|
-
requestingUserId:
|
|
3909
|
-
});
|
|
3910
|
-
var RemoveProjectMeetingChecklistItemRequestSchema =
|
|
3911
|
-
projectId:
|
|
3912
|
-
meetingId:
|
|
3913
|
-
title:
|
|
3914
|
-
requestingUserId:
|
|
3915
|
-
});
|
|
3916
|
-
var CreateProjectMeetingRequestSchema =
|
|
3917
|
-
projectId:
|
|
3918
|
-
rawText:
|
|
3919
|
-
title:
|
|
3741
|
+
linkedTask: z15.string().min(1).optional(),
|
|
3742
|
+
requestingUserId: z15.string().optional()
|
|
3743
|
+
});
|
|
3744
|
+
var EditProjectMeetingChecklistItemRequestSchema = z15.object({
|
|
3745
|
+
projectId: z15.string().cuid(),
|
|
3746
|
+
meetingId: z15.string().cuid(),
|
|
3747
|
+
title: z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
3748
|
+
newTitle: z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
3749
|
+
requestingUserId: z15.string().optional()
|
|
3750
|
+
});
|
|
3751
|
+
var RemoveProjectMeetingChecklistItemRequestSchema = z15.object({
|
|
3752
|
+
projectId: z15.string().cuid(),
|
|
3753
|
+
meetingId: z15.string().cuid(),
|
|
3754
|
+
title: z15.string().min(1).max(MEETING_CHECKLIST_TITLE_MAX),
|
|
3755
|
+
requestingUserId: z15.string().optional()
|
|
3756
|
+
});
|
|
3757
|
+
var CreateProjectMeetingRequestSchema = z15.object({
|
|
3758
|
+
projectId: z15.string().cuid(),
|
|
3759
|
+
rawText: z15.string().min(1).max(MEETING_TRANSCRIPT_MAX_CHARS),
|
|
3760
|
+
title: z15.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
3920
3761
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
3921
|
-
requestingUserId:
|
|
3762
|
+
requestingUserId: z15.string().optional()
|
|
3922
3763
|
});
|
|
3923
|
-
var UpdateProjectMeetingRequestSchema =
|
|
3924
|
-
projectId:
|
|
3925
|
-
meetingId:
|
|
3926
|
-
title:
|
|
3764
|
+
var UpdateProjectMeetingRequestSchema = z15.object({
|
|
3765
|
+
projectId: z15.string().cuid(),
|
|
3766
|
+
meetingId: z15.string().cuid(),
|
|
3767
|
+
title: z15.string().min(1).max(MEETING_TITLE_MAX).optional(),
|
|
3927
3768
|
occurredAt: MeetingOccurredAtSchema.optional(),
|
|
3928
|
-
summary:
|
|
3929
|
-
requestingUserId:
|
|
3769
|
+
summary: z15.string().min(1).max(MEETING_SUMMARY_MAX_CHARS).optional(),
|
|
3770
|
+
requestingUserId: z15.string().optional()
|
|
3930
3771
|
}).refine(
|
|
3931
3772
|
(v) => v.title !== void 0 || v.occurredAt !== void 0 || v.summary !== void 0,
|
|
3932
3773
|
"Pass at least one of title, occurredAt, or summary."
|
|
@@ -3975,6 +3816,8 @@ When you write prose a person will read \u2014 chat messages, plan updates, PR t
|
|
|
3975
3816
|
- Define a technical term on first use when a non-engineer will read the message.
|
|
3976
3817
|
- Never drop a condition, number, or scope qualifier to shorten a sentence. Precision beats brevity.
|
|
3977
3818
|
These rules do NOT apply to code, code comments, commit messages, or quoted output.`;
|
|
3819
|
+
var PROJECT_ARCHIVE_RETENTION_DAYS = 30;
|
|
3820
|
+
var RETENTION_MS = PROJECT_ARCHIVE_RETENTION_DAYS * 24 * 60 * 60 * 1e3;
|
|
3978
3821
|
var CLAUDESPACE_WORKLOAD_LABEL = "rc-workload";
|
|
3979
3822
|
var CLAUDESPACE_WORKLOAD_VALUE = "claudespace";
|
|
3980
3823
|
var CONVEYOR_POD_SELECTOR = `${CLAUDESPACE_WORKLOAD_LABEL}=${CLAUDESPACE_WORKLOAD_VALUE}`;
|
|
@@ -5471,71 +5314,7 @@ var PortDiscovery = class {
|
|
|
5471
5314
|
}
|
|
5472
5315
|
};
|
|
5473
5316
|
|
|
5474
|
-
// src/runner/codespace-port-visibility.ts
|
|
5475
|
-
import { execFile as execFile3 } from "child_process";
|
|
5476
|
-
var GH_TIMEOUT_MS = 15e3;
|
|
5477
|
-
var VISIBILITIES = ["org", "public"];
|
|
5478
|
-
function runGh(args) {
|
|
5479
|
-
return new Promise((resolve) => {
|
|
5480
|
-
execFile3("gh", [...args], { timeout: GH_TIMEOUT_MS }, (error, _stdout, stderr) => {
|
|
5481
|
-
resolve({ ok: !error, stderr: (stderr || (error ? String(error.message) : "")).trim() });
|
|
5482
|
-
});
|
|
5483
|
-
});
|
|
5484
|
-
}
|
|
5485
|
-
function isCodespaceEnvironment(env = process.env) {
|
|
5486
|
-
return env.CODESPACES === "true" && !!env.CODESPACE_NAME;
|
|
5487
|
-
}
|
|
5488
|
-
var CodespacePortVisibility = class {
|
|
5489
|
-
env;
|
|
5490
|
-
run;
|
|
5491
|
-
log;
|
|
5492
|
-
/** Ports already attempted (success or failure) — one try per process. */
|
|
5493
|
-
attempted = /* @__PURE__ */ new Set();
|
|
5494
|
-
constructor(options = {}) {
|
|
5495
|
-
this.env = options.env ?? process.env;
|
|
5496
|
-
this.run = options.run ?? runGh;
|
|
5497
|
-
this.log = options.log ?? ((m) => process.stderr.write(`[conveyor-agent] ${m}
|
|
5498
|
-
`));
|
|
5499
|
-
}
|
|
5500
|
-
/** Flip every not-yet-attempted port. Resolves even when everything fails. */
|
|
5501
|
-
async ensureVisible(ports) {
|
|
5502
|
-
if (!isCodespaceEnvironment(this.env)) return;
|
|
5503
|
-
const codespaceName = this.env.CODESPACE_NAME;
|
|
5504
|
-
for (const port of ports) {
|
|
5505
|
-
if (this.attempted.has(port)) continue;
|
|
5506
|
-
this.attempted.add(port);
|
|
5507
|
-
await this.flip(port, codespaceName);
|
|
5508
|
-
}
|
|
5509
|
-
}
|
|
5510
|
-
async flip(port, codespaceName) {
|
|
5511
|
-
let lastError = "";
|
|
5512
|
-
for (const visibility of VISIBILITIES) {
|
|
5513
|
-
const result = await this.run([
|
|
5514
|
-
"codespace",
|
|
5515
|
-
"ports",
|
|
5516
|
-
"visibility",
|
|
5517
|
-
`${port}:${visibility}`,
|
|
5518
|
-
"-c",
|
|
5519
|
-
codespaceName
|
|
5520
|
-
]).catch((error) => ({
|
|
5521
|
-
ok: false,
|
|
5522
|
-
stderr: error instanceof Error ? error.message : String(error)
|
|
5523
|
-
}));
|
|
5524
|
-
if (result.ok) {
|
|
5525
|
-
this.log(`Forwarded port ${port} set to ${visibility} visibility`);
|
|
5526
|
-
return;
|
|
5527
|
-
}
|
|
5528
|
-
lastError = result.stderr;
|
|
5529
|
-
}
|
|
5530
|
-
this.log(
|
|
5531
|
-
`Could not change visibility of forwarded port ${port} \u2014 the preview URL may 404 for other users${lastError ? `: ${lastError}` : ""}`
|
|
5532
|
-
);
|
|
5533
|
-
}
|
|
5534
|
-
};
|
|
5535
|
-
|
|
5536
5317
|
export {
|
|
5537
|
-
fetchBootstrap,
|
|
5538
|
-
applyBootstrapToEnv,
|
|
5539
5318
|
createServiceLogger,
|
|
5540
5319
|
AgentConnection,
|
|
5541
5320
|
DEFAULT_SONNET_MODEL,
|
|
@@ -5609,6 +5388,5 @@ export {
|
|
|
5609
5388
|
buildSessionPreviewPorts,
|
|
5610
5389
|
loadAndAnnotateDiscoveredPorts,
|
|
5611
5390
|
loadConveyorConfig,
|
|
5612
|
-
PortDiscovery
|
|
5613
|
-
CodespacePortVisibility
|
|
5391
|
+
PortDiscovery
|
|
5614
5392
|
};
|