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