@rallycry/conveyor-agent 11.1.7 → 11.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{boot-6QUJHRWD.js → boot-KQ4UDUAI.js} +6 -4
- package/dist/{chunk-VIUZS7V4.js → chunk-74BAVQKD.js} +22 -8
- package/dist/{chunk-PIHFGSXB.js → chunk-L2E4EMEP.js} +10 -2
- package/dist/{chunk-TGU3DX5B.js → chunk-QCYVI6YQ.js} +218 -25
- package/dist/{chunk-YQLVANEA.js → chunk-T6FEYIIV.js} +5548 -4844
- package/dist/{chunk-V5WR2F2P.js → chunk-VYE7XV6U.js} +1 -1
- package/dist/{chunk-OFGV5G4O.js → chunk-XGCTWHO6.js} +2 -2
- package/dist/cli.js +42 -17
- package/dist/heartbeat-worker.js +1 -1
- package/dist/index.js +5 -5
- package/dist/{serve-boot-JWGICOM7.js → serve-boot-PFS6KWJL.js} +4 -4
- package/package.json +2 -2
- package/skills/conveyor-brainstorm-review/SKILL.md +81 -0
- package/skills/conveyor-plan/SKILL.md +16 -11
- package/skills/conveyor-workflows/SKILL.md +8 -0
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
readAgentVersion,
|
|
15
15
|
refreshSkillsAfterCheckout,
|
|
16
16
|
runPreReadyBinds
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VYE7XV6U.js";
|
|
18
18
|
import "./chunk-76JCOHPE.js";
|
|
19
19
|
import {
|
|
20
20
|
GitPrepJob,
|
|
21
21
|
defaultGit,
|
|
22
22
|
ensureDir,
|
|
23
23
|
reportBootMilestone
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-74BAVQKD.js";
|
|
25
25
|
import "./chunk-W4LZ7R6Z.js";
|
|
26
26
|
import "./chunk-372R6E4C.js";
|
|
27
27
|
import "./chunk-SQM2BQ7H.js";
|
|
@@ -617,9 +617,9 @@ var SEED_GATES = {
|
|
|
617
617
|
}
|
|
618
618
|
};
|
|
619
619
|
var SEED_FABLE_OPTION = {
|
|
620
|
-
value: "claude-fable-5-
|
|
620
|
+
value: "claude-fable-5-2[1m]",
|
|
621
621
|
label: "Fable",
|
|
622
|
-
description: "Fable 5.
|
|
622
|
+
description: "Fable 5.2 - most capable for your hardest and longest-running tasks"
|
|
623
623
|
};
|
|
624
624
|
function isPlainObject(value) {
|
|
625
625
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -955,6 +955,8 @@ function defaultWorkbenchBootDeps() {
|
|
|
955
955
|
git: defaultGit,
|
|
956
956
|
bundle,
|
|
957
957
|
podImage: process.env.CONVEYOR_POD_IMAGE === "1",
|
|
958
|
+
partialClone: process.env.CONVEYOR_GIT_PARTIAL_CLONE === "1",
|
|
959
|
+
persistentRepo: (process.env.CONVEYOR_HOST_WORKSPACE ?? process.env.CONVEYOR_MAC_WORKSPACE) === "1",
|
|
958
960
|
log: ctx.log
|
|
959
961
|
}),
|
|
960
962
|
bindsBeforeReady: (ctx, bundle) => runPreReadyBinds(WORKSPACE_DIR, bundle, defaultGit, ctx.log),
|
|
@@ -138,11 +138,11 @@ async function syncTaskBranchToRepo(deps, paths) {
|
|
|
138
138
|
log.error(`[boot] ERROR: remote set-url failed: ${errText(err)}`);
|
|
139
139
|
return { state: "failed", reason: "remote set-url failed" };
|
|
140
140
|
}
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
141
|
+
const configFailure = await configureWorkspaceGit(deps, paths);
|
|
142
|
+
if (configFailure) return configFailure;
|
|
143
143
|
const [, resetSucceeded] = await Promise.all([
|
|
144
144
|
warmBaseBranch(deps, paths),
|
|
145
|
-
resetTrackedChanges(deps, paths)
|
|
145
|
+
deps.persistentRepo ? Promise.resolve(true) : resetTrackedChanges(deps, paths)
|
|
146
146
|
]);
|
|
147
147
|
if (!resetSucceeded) return { state: "failed", reason: "pre-checkout reset failed" };
|
|
148
148
|
log.info(`[boot] Repo remote ready; agent will checkout ${branch}`);
|
|
@@ -178,21 +178,33 @@ async function resetTrackedChanges(deps, paths) {
|
|
|
178
178
|
log.info(`[boot] step=gitResetTracked ms=${Math.round(performance.now() - started)}`);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
181
|
+
async function configureWorkspaceGit(deps, paths) {
|
|
182
182
|
try {
|
|
183
183
|
await deps.git(["config", "--local", "credential.helper", paths.credentialHelper], {
|
|
184
184
|
cwd: paths.repoDir,
|
|
185
185
|
timeoutMs: QUICK_GIT_TIMEOUT_MS
|
|
186
186
|
});
|
|
187
|
-
return null;
|
|
188
187
|
} catch (err) {
|
|
189
188
|
deps.log.error(`[boot] ERROR: credential helper config failed: ${errText(err)}`);
|
|
190
189
|
return { state: "failed", reason: "credential helper config failed" };
|
|
191
190
|
}
|
|
191
|
+
if (deps.persistentRepo) {
|
|
192
|
+
try {
|
|
193
|
+
await deps.git(["config", "--local", "core.checkStat", "minimal"], {
|
|
194
|
+
cwd: paths.repoDir,
|
|
195
|
+
timeoutMs: QUICK_GIT_TIMEOUT_MS
|
|
196
|
+
});
|
|
197
|
+
} catch (err) {
|
|
198
|
+
deps.log.error(`[boot] ERROR: shared workspace Git config failed: ${errText(err)}`);
|
|
199
|
+
return { state: "failed", reason: "shared workspace Git config failed" };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return null;
|
|
192
203
|
}
|
|
193
204
|
async function clonePostAssignment(deps, paths) {
|
|
194
205
|
const { git, log } = deps;
|
|
195
|
-
const { branch, baseBranch, checkoutRef } = deps.bundle.gitPlan;
|
|
206
|
+
const { branch, baseBranch, checkoutRef, provider } = deps.bundle.gitPlan;
|
|
207
|
+
const filter = deps.partialClone && provider === "github" ? ["--filter=blob:none"] : [];
|
|
196
208
|
log.info("[boot] Cloning repo post-assignment (pre-clone was missing)...");
|
|
197
209
|
if (checkoutRef) {
|
|
198
210
|
try {
|
|
@@ -201,6 +213,7 @@ async function clonePostAssignment(deps, paths) {
|
|
|
201
213
|
"-c",
|
|
202
214
|
`credential.helper=${paths.credentialHelper}`,
|
|
203
215
|
"clone",
|
|
216
|
+
...filter,
|
|
204
217
|
"--depth",
|
|
205
218
|
"1",
|
|
206
219
|
"--single-branch",
|
|
@@ -215,8 +228,8 @@ async function clonePostAssignment(deps, paths) {
|
|
|
215
228
|
log.error(`[boot] ERROR: post-assignment clone failed: ${errText(err)}`);
|
|
216
229
|
return { state: "failed", reason: "post-assignment clone failed" };
|
|
217
230
|
}
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
231
|
+
const configFailure = await configureWorkspaceGit(deps, paths);
|
|
232
|
+
if (configFailure) return configFailure;
|
|
220
233
|
try {
|
|
221
234
|
await git(["fetch", "origin", `+${checkoutRef}:refs/remotes/origin/pr-checkout`], {
|
|
222
235
|
cwd: paths.repoDir,
|
|
@@ -243,6 +256,7 @@ async function clonePostAssignment(deps, paths) {
|
|
|
243
256
|
"-c",
|
|
244
257
|
`credential.helper=${paths.credentialHelper}`,
|
|
245
258
|
"clone",
|
|
259
|
+
...filter,
|
|
246
260
|
"--single-branch",
|
|
247
261
|
"--branch",
|
|
248
262
|
baseBranch,
|
|
@@ -10631,15 +10631,23 @@ function conveyorReconnectOptions() {
|
|
|
10631
10631
|
extraHeaders: { "ngrok-skip-browser-warning": "true" }
|
|
10632
10632
|
};
|
|
10633
10633
|
}
|
|
10634
|
+
function conveyorSocketEndpoint(apiUrl) {
|
|
10635
|
+
const endpoint = new URL(apiUrl);
|
|
10636
|
+
if (!["http:", "https:", "ws:", "wss:"].includes(endpoint.protocol) || endpoint.username || endpoint.password) {
|
|
10637
|
+
throw new Error("Conveyor API URL must be an HTTP or WebSocket URL without credentials.");
|
|
10638
|
+
}
|
|
10639
|
+
return { url: endpoint.origin, path: endpoint.pathname.replace(/\/+$/, "") + "/socket.io" };
|
|
10640
|
+
}
|
|
10634
10641
|
|
|
10635
10642
|
// src/connection/quickdraw-transport.ts
|
|
10636
10643
|
var AGENT_SESSION_SERVICE = "agentSessionService";
|
|
10637
10644
|
function createAgentSessionConnection(options) {
|
|
10645
|
+
const endpoint = conveyorSocketEndpoint(options.apiUrl);
|
|
10638
10646
|
return createQuickdrawConnection({
|
|
10639
|
-
url:
|
|
10647
|
+
url: endpoint.url,
|
|
10640
10648
|
auth: options.auth,
|
|
10641
10649
|
transports: ["websocket"],
|
|
10642
|
-
socketOptions: conveyorReconnectOptions(),
|
|
10650
|
+
socketOptions: { ...conveyorReconnectOptions(), path: endpoint.path },
|
|
10643
10651
|
timeoutMs: options.timeoutMs,
|
|
10644
10652
|
// The default reloads a browser page; a pod has none. An API that refuses
|
|
10645
10653
|
// this protocol answers nothing the agent can use, so say why, loudly.
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
mapChatHistory,
|
|
3
3
|
readAgentVersion,
|
|
4
4
|
refreshSkillsAfterCheckout
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VYE7XV6U.js";
|
|
6
6
|
import {
|
|
7
7
|
MAX_BETWEEN_TURN_BUFFER,
|
|
8
8
|
MAX_DIAGNOSTIC_OUTPUT,
|
|
@@ -35,6 +35,11 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
AGENT_STATUS_REASON_USER_QUESTION,
|
|
37
37
|
AgentConnection,
|
|
38
|
+
BRAINSTORM_HAND_MAX,
|
|
39
|
+
BRAINSTORM_IDEA_BODY_MAX,
|
|
40
|
+
BRAINSTORM_IDEA_TITLE_MAX,
|
|
41
|
+
BRAINSTORM_TOOL_LIST_DEFAULT,
|
|
42
|
+
BRAINSTORM_TOOL_LIST_MAX,
|
|
38
43
|
CARD_DESCRIPTION_FIELD_HINT,
|
|
39
44
|
CONTEXT_LINK_LOCATOR_MAX,
|
|
40
45
|
CRITICAL_AUTOMATED_SOURCES,
|
|
@@ -100,10 +105,10 @@ import {
|
|
|
100
105
|
toMemberMentionRows,
|
|
101
106
|
updateRemoteToken,
|
|
102
107
|
verifyGitCredential
|
|
103
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-T6FEYIIV.js";
|
|
104
109
|
import {
|
|
105
110
|
reportBootMilestone
|
|
106
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-74BAVQKD.js";
|
|
107
112
|
import {
|
|
108
113
|
describeTokenFile,
|
|
109
114
|
ghHostsExternallyOwned,
|
|
@@ -119,7 +124,7 @@ import {
|
|
|
119
124
|
import {
|
|
120
125
|
LoopLagMonitor,
|
|
121
126
|
loopStatusForRunnerStatus
|
|
122
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-L2E4EMEP.js";
|
|
123
128
|
import {
|
|
124
129
|
getWorkbenchClient
|
|
125
130
|
} from "./chunk-SQM2BQ7H.js";
|
|
@@ -3018,7 +3023,7 @@ function seedWorkspaceTrust(config, trustCwd) {
|
|
|
3018
3023
|
var FABLE_MODEL_OPTION = {
|
|
3019
3024
|
value: `${FABLE_MODEL}[1m]`,
|
|
3020
3025
|
label: "Fable",
|
|
3021
|
-
description: "Fable 5.
|
|
3026
|
+
description: "Fable 5.2 - most capable for your hardest and longest-running tasks"
|
|
3022
3027
|
};
|
|
3023
3028
|
function seedFableModelOption(config) {
|
|
3024
3029
|
const cache = Array.isArray(config.additionalModelOptionsCache) ? config.additionalModelOptionsCache : [];
|
|
@@ -5129,9 +5134,9 @@ async function seedOpenCodeOauth(env) {
|
|
|
5129
5134
|
|
|
5130
5135
|
// src/harness/openai-model.ts
|
|
5131
5136
|
var DEFAULT_OPENAI_CODING_MODEL = DEFAULT_CODEX_CODING_MODEL;
|
|
5132
|
-
function resolveOpenAiCodingModel(model2) {
|
|
5137
|
+
function resolveOpenAiCodingModel(model2, fallback = DEFAULT_OPENAI_CODING_MODEL) {
|
|
5133
5138
|
if (!model2 || model2.startsWith("claude-") || model2.includes("/") && !model2.startsWith("openai/")) {
|
|
5134
|
-
return
|
|
5139
|
+
return fallback;
|
|
5135
5140
|
}
|
|
5136
5141
|
return model2.replace(/^openai\//, "");
|
|
5137
5142
|
}
|
|
@@ -5169,11 +5174,12 @@ function buildOpenCodeChildEnv(source, configContent) {
|
|
|
5169
5174
|
if (configContent) env.OPENCODE_CONFIG_CONTENT = configContent;
|
|
5170
5175
|
return env;
|
|
5171
5176
|
}
|
|
5177
|
+
var DEFAULT_OPENCODE_OPENAI_MODEL = "gpt-5.6-terra";
|
|
5172
5178
|
function resolveOpenCodeModel(source, optionsModel) {
|
|
5173
5179
|
const model2 = source.CONVEYOR_AGENT_MODEL ?? optionsModel;
|
|
5174
5180
|
const configuredProvider = source.CONVEYOR_AGENT_PROVIDER;
|
|
5175
5181
|
if (configuredProvider === "openai" || !configuredProvider && !model2) {
|
|
5176
|
-
return `openai/${resolveOpenAiCodingModel(model2)}`;
|
|
5182
|
+
return `openai/${resolveOpenAiCodingModel(model2, DEFAULT_OPENCODE_OPENAI_MODEL)}`;
|
|
5177
5183
|
}
|
|
5178
5184
|
if (!model2) return void 0;
|
|
5179
5185
|
if (model2.startsWith("zen/")) return `opencode/${model2.slice("zen/".length)}`;
|
|
@@ -6414,7 +6420,8 @@ function buildHarnessContracts(context) {
|
|
|
6414
6420
|
] : []
|
|
6415
6421
|
];
|
|
6416
6422
|
}
|
|
6417
|
-
function buildDiscoveryPrompt(context, runnerMode) {
|
|
6423
|
+
function buildDiscoveryPrompt(context, runnerMode, runtimeTui) {
|
|
6424
|
+
const usesClaudePlanGate = !runtimeTui || runtimeTui === "claude-code";
|
|
6418
6425
|
const parts = [
|
|
6419
6426
|
`
|
|
6420
6427
|
## Mode: Discovery`,
|
|
@@ -6425,11 +6432,15 @@ function buildDiscoveryPrompt(context, runnerMode) {
|
|
|
6425
6432
|
] : [],
|
|
6426
6433
|
``,
|
|
6427
6434
|
`### Contracts this environment enforces`,
|
|
6428
|
-
`- You are READ-ONLY. File writes are denied outside \`.claude/plans/\` and \`/tmp/\`, and so are the commands that would start the work: git commit/push/merge/rebase/checkout, git apply, gh pr create, package publish. Everything else runs without an approval prompt \u2014 the pod is a sandbox, so investigate freely (build, test, query the dev DB, read logs).`,
|
|
6435
|
+
usesClaudePlanGate ? `- You are READ-ONLY. File writes are denied outside \`.claude/plans/\` and \`/tmp/\`, and so are the commands that would start the work: git commit/push/merge/rebase/checkout, git apply, gh pr create, package publish. Everything else runs without an approval prompt \u2014 the pod is a sandbox, so investigate freely (build, test, query the dev DB, read logs).` : `- Keep the repository READ-ONLY. Use \`/tmp/\` for scratch files. Do not edit, commit, push, publish, open a PR, or start implementation.`,
|
|
6429
6436
|
`- Research deliverables the team should keep (a diagram, an HTML report, a screenshot, a data export) go on the card with \`mcp__conveyor__upload_attachment\`: write the file under \`/tmp/\` first, and pass \`title\` as the caption so it shows in the thread. Never publish one as a Claude artifact.`,
|
|
6430
6437
|
`- A plan file on disk is NOT the plan. Only \`update_task\` saves it to the card.`,
|
|
6431
|
-
`-
|
|
6432
|
-
|
|
6438
|
+
`- Set story points, risk, and title with \`update_task_properties\` before saving the final plan. If this is a pack, save all child plans first.`,
|
|
6439
|
+
...usesClaudePlanGate ? [
|
|
6440
|
+
`- After saving the plan and posting the \`plan_ready\` milestone, call ExitPlanMode. It validates the saved plan and required properties, then parks the Planner for review. It does NOT start building.`
|
|
6441
|
+
] : [
|
|
6442
|
+
`- After saving the plan with \`update_task\`, post \`milestone: "plan_ready"\` using \`mcp__conveyor__post_to_chat\` and end the turn. Conveyor handles the card transition from the saved plan. This is the finish line for this runtime, even if a skill describes a native plan-exit tool. Stay in the Planner role.`
|
|
6443
|
+
],
|
|
6433
6444
|
...runnerMode === "plan" ? [
|
|
6434
6445
|
`- You are the Planner half of this card's lifecycle. When the team presses Build, a separate **Builder** session starts on THIS pod and takes over \u2014 you never become it. So the plan has to stand on its own: the Builder inherits this repo checkout, but none of your reasoning.`
|
|
6435
6446
|
] : [],
|
|
@@ -6462,10 +6473,10 @@ function buildBuildingPrompt(context) {
|
|
|
6462
6473
|
if (context) parts.push(...buildPropertyInstructions(context));
|
|
6463
6474
|
return parts.join("\n");
|
|
6464
6475
|
}
|
|
6465
|
-
function buildModePrompt(agentMode, context, runnerMode) {
|
|
6476
|
+
function buildModePrompt(agentMode, context, runnerMode, runtimeTui) {
|
|
6466
6477
|
switch (agentMode) {
|
|
6467
6478
|
case "discovery":
|
|
6468
|
-
return buildDiscoveryPrompt(context, runnerMode);
|
|
6479
|
+
return buildDiscoveryPrompt(context, runnerMode, runtimeTui);
|
|
6469
6480
|
case "building":
|
|
6470
6481
|
return buildBuildingPrompt(context);
|
|
6471
6482
|
case "review":
|
|
@@ -7171,7 +7182,7 @@ ${HUMAN_PROSE_WRITING_STYLE}`
|
|
|
7171
7182
|
`Use the mcp__conveyor__create_pull_request tool to open PRs \u2014 it automatically stages, commits, and pushes changes before creating the PR. Do NOT use gh CLI or shell commands for PR creation.`
|
|
7172
7183
|
);
|
|
7173
7184
|
}
|
|
7174
|
-
const modePrompt = buildModePrompt(agentMode, context, mode);
|
|
7185
|
+
const modePrompt = buildModePrompt(agentMode, context, mode, config.runtimeTui);
|
|
7175
7186
|
if (modePrompt) {
|
|
7176
7187
|
parts.push(modePrompt);
|
|
7177
7188
|
}
|
|
@@ -9292,6 +9303,101 @@ var meetingsContracts = [
|
|
|
9292
9303
|
editMeetingChecklistItemContract,
|
|
9293
9304
|
removeMeetingChecklistItemContract
|
|
9294
9305
|
];
|
|
9306
|
+
var TABLE_ID = "Brainstorm table id, as returned by list_brainstorms.";
|
|
9307
|
+
var MCP_TAIL2 = "Pass projectId to target a specific project; otherwise the configured default project is used.";
|
|
9308
|
+
var FACE_DOWN_NOTE = "Face-down cards (ideas still in a hand, submitted or not) are never returned, your own user's included.";
|
|
9309
|
+
var SEALED_NOTE = "While the dealer keeps the rank sealed, ideas come oldest first with rank null; ranking.sealed says which case applies.";
|
|
9310
|
+
var listFields = {
|
|
9311
|
+
status: f.optional(
|
|
9312
|
+
f.enum(["open", "closed"], { desc: "Only open tables, or only closed ones. Omit for both." })
|
|
9313
|
+
),
|
|
9314
|
+
limit: f.optional(
|
|
9315
|
+
f.number({
|
|
9316
|
+
desc: `How many to return (default ${String(BRAINSTORM_TOOL_LIST_DEFAULT)}, maximum ${String(BRAINSTORM_TOOL_LIST_MAX)}).`,
|
|
9317
|
+
int: true,
|
|
9318
|
+
min: 1,
|
|
9319
|
+
max: BRAINSTORM_TOOL_LIST_MAX
|
|
9320
|
+
})
|
|
9321
|
+
)
|
|
9322
|
+
};
|
|
9323
|
+
var listBrainstormsContract = defineToolContract({
|
|
9324
|
+
name: "list_brainstorms",
|
|
9325
|
+
agent: {
|
|
9326
|
+
description: `List this project's brainstorm tables, newest first. Each row has the table's id, title, prompt, status (open or closed), phase (write, pitch, group, rank or wrap), idea and ballot counts, the people seated, and its web link. Start here when you are asked about "the brainstorm", "what did we come up with" or "what did the team rank highest", then read one table with get_brainstorm.`,
|
|
9327
|
+
fields: listFields
|
|
9328
|
+
},
|
|
9329
|
+
mcp: {
|
|
9330
|
+
description: `List a project's brainstorm tables, newest first, with status, phase, idea and ballot counts, the people seated, and the web link. Read one table with get_brainstorm. ${MCP_TAIL2}`,
|
|
9331
|
+
fields: { projectId: mcpProjectId, ...listFields }
|
|
9332
|
+
}
|
|
9333
|
+
});
|
|
9334
|
+
var getBrainstormContract = defineToolContract({
|
|
9335
|
+
name: "get_brainstorm",
|
|
9336
|
+
agent: {
|
|
9337
|
+
description: `Read one brainstorm table as a ranked brief: its face-up ideas in table-rank order, each with its author, pitch, notes, tags, the ideas nested under it, whether it was discussed or parked, its rank (position, points, ballots, contested) and the card it was promoted to. ${FACE_DOWN_NOTE} ${SEALED_NOTE} Use it to check whether an idea was pitched before and where it ranked.`,
|
|
9338
|
+
fields: { brainstorm: f.string({ min: 1, desc: TABLE_ID }) }
|
|
9339
|
+
},
|
|
9340
|
+
mcp: {
|
|
9341
|
+
description: `Read one brainstorm table as a ranked brief: its face-up ideas in table-rank order, with authors, pitches, notes, tags, nested ideas, rank and promoted cards. ${FACE_DOWN_NOTE} ${SEALED_NOTE} ${MCP_TAIL2}`,
|
|
9342
|
+
fields: { projectId: mcpProjectId, brainstorm: f.string({ min: 1, desc: TABLE_ID }) }
|
|
9343
|
+
}
|
|
9344
|
+
});
|
|
9345
|
+
var ideaFields = {
|
|
9346
|
+
brainstorm: f.string({ min: 1, desc: TABLE_ID }),
|
|
9347
|
+
title: f.string({
|
|
9348
|
+
min: 1,
|
|
9349
|
+
max: BRAINSTORM_IDEA_TITLE_MAX,
|
|
9350
|
+
desc: "The idea in a few words, as it shows on the card."
|
|
9351
|
+
}),
|
|
9352
|
+
pitch: f.optional(
|
|
9353
|
+
f.string({
|
|
9354
|
+
max: BRAINSTORM_IDEA_BODY_MAX,
|
|
9355
|
+
desc: "A few sentences on the idea, for its author to pitch from."
|
|
9356
|
+
})
|
|
9357
|
+
),
|
|
9358
|
+
submit: f.optional(
|
|
9359
|
+
f.boolean({
|
|
9360
|
+
desc: "True puts the card forward for the dealer to pull at once. Omit to leave it in the hand for the user to submit."
|
|
9361
|
+
})
|
|
9362
|
+
)
|
|
9363
|
+
};
|
|
9364
|
+
var ADD_RULES = `The card stays face-down, seen only by its author, until the dealer pulls it to the table. The table must be open. A hand holds ${String(BRAINSTORM_HAND_MAX)} cards, submitted ones included; a full hand is refused. You cannot add an idea for anyone else.`;
|
|
9365
|
+
var addBrainstormIdeaContract = defineToolContract({
|
|
9366
|
+
name: "add_brainstorm_idea",
|
|
9367
|
+
agent: {
|
|
9368
|
+
description: `Add an idea card to the hand of the user this session acts for, at a brainstorm table. ${ADD_RULES}`,
|
|
9369
|
+
fields: ideaFields
|
|
9370
|
+
},
|
|
9371
|
+
mcp: {
|
|
9372
|
+
description: `Add an idea card to the hand of the user the token acts for, at a brainstorm table. ${ADD_RULES} ${MCP_TAIL2}`,
|
|
9373
|
+
fields: { projectId: mcpProjectId, ...ideaFields }
|
|
9374
|
+
}
|
|
9375
|
+
});
|
|
9376
|
+
var linkFields = {
|
|
9377
|
+
idea: f.string({ min: 1, desc: "Idea id, as returned by get_brainstorm." }),
|
|
9378
|
+
card: f.string({
|
|
9379
|
+
min: 1,
|
|
9380
|
+
desc: "The card the idea became: its slug or id, in the same project."
|
|
9381
|
+
})
|
|
9382
|
+
};
|
|
9383
|
+
var LINK_RULES = "Only a face-up idea can be linked. Linking again replaces the earlier card. Needs Moderate on the project.";
|
|
9384
|
+
var linkBrainstormIdeaContract = defineToolContract({
|
|
9385
|
+
name: "link_brainstorm_idea",
|
|
9386
|
+
agent: {
|
|
9387
|
+
description: `Record the card a brainstorm idea became. After you create a card for an idea with create_task, call this so the table shows the idea as promoted and the card links back to it. ${LINK_RULES}`,
|
|
9388
|
+
fields: linkFields
|
|
9389
|
+
},
|
|
9390
|
+
mcp: {
|
|
9391
|
+
description: `Record the card a brainstorm idea became, after the card was created with create_task, so the table shows the idea as promoted and the card links back to it. ${LINK_RULES} ${MCP_TAIL2}`,
|
|
9392
|
+
fields: { projectId: mcpProjectId, ...linkFields }
|
|
9393
|
+
}
|
|
9394
|
+
});
|
|
9395
|
+
var brainstormContracts = [
|
|
9396
|
+
listBrainstormsContract,
|
|
9397
|
+
getBrainstormContract,
|
|
9398
|
+
addBrainstormIdeaContract,
|
|
9399
|
+
linkBrainstormIdeaContract
|
|
9400
|
+
];
|
|
9295
9401
|
var SINCE_MINUTES = f.optional(
|
|
9296
9402
|
f.number({
|
|
9297
9403
|
desc: "Relative time window ending now, in minutes (default 60). Ignored if startTime is set.",
|
|
@@ -9722,6 +9828,7 @@ var TOOL_CONTRACTS = Object.fromEntries(
|
|
|
9722
9828
|
...membersContracts,
|
|
9723
9829
|
...driveContracts,
|
|
9724
9830
|
...meetingsContracts,
|
|
9831
|
+
...brainstormContracts,
|
|
9725
9832
|
...logsContracts,
|
|
9726
9833
|
...ciWaitContracts,
|
|
9727
9834
|
...evaluateContracts,
|
|
@@ -10766,8 +10873,10 @@ function buildUploadAttachmentTool(connection, config) {
|
|
|
10766
10873
|
...supersedes ? { supersedes } : {}
|
|
10767
10874
|
});
|
|
10768
10875
|
const isShowcase = result.showcase === true;
|
|
10876
|
+
const localPrVideo = isShowcase && config.conveyorApiUrl === "http://conveyor.local-conveyor.svc.cluster.local:7090" && ["video/mp4", "video/quicktime", "video/webm"].includes(mimeType);
|
|
10877
|
+
const publication = localPrVideo ? " The Local Conveyor desktop app will publish this video and link it on the card once a GitHub PR is linked and GitHub CLI is signed in on the host." : describeEmbed(fileName, result.downloadUrl, isShowcase);
|
|
10769
10878
|
return textResult(
|
|
10770
|
-
`${isShowcase ? "Showcase attachment. " : ""}Uploaded ${fileName} (${info.size} bytes) and posted it to the task chat${caption ? ` with caption "${caption}"` : ""}. File ID: ${result.fileId}${describeTags(result.appliedTags, result.unknownTags)}${describeSupersede(result.superseded, result.supersedeError)}${
|
|
10879
|
+
`${isShowcase ? "Showcase attachment. " : ""}Uploaded ${fileName} (${info.size} bytes) and posted it to the task chat${caption ? ` with caption "${caption}"` : ""}. File ID: ${result.fileId}${describeTags(result.appliedTags, result.unknownTags)}${describeSupersede(result.superseded, result.supersedeError)}${publication}`
|
|
10771
10880
|
);
|
|
10772
10881
|
} catch (error) {
|
|
10773
10882
|
return textResult(
|
|
@@ -12236,18 +12345,100 @@ ${res.map(describeItem).join("\n")}`);
|
|
|
12236
12345
|
];
|
|
12237
12346
|
}
|
|
12238
12347
|
|
|
12239
|
-
// src/tools/
|
|
12348
|
+
// src/tools/brainstorm-tools.ts
|
|
12240
12349
|
function errText5(prefix, error) {
|
|
12241
12350
|
return textResult(`${prefix}: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
12242
12351
|
}
|
|
12352
|
+
function buildBrainstormTools(connection, projectId) {
|
|
12353
|
+
return [...readTools2(connection, projectId), ...writeTools2(connection, projectId)];
|
|
12354
|
+
}
|
|
12355
|
+
function readTools2(connection, projectId) {
|
|
12356
|
+
return [
|
|
12357
|
+
defineContractTool(
|
|
12358
|
+
listBrainstormsContract,
|
|
12359
|
+
async (input) => {
|
|
12360
|
+
try {
|
|
12361
|
+
const res = await connection.call("listProjectBrainstorms", {
|
|
12362
|
+
projectId,
|
|
12363
|
+
status: input.status,
|
|
12364
|
+
limit: input.limit
|
|
12365
|
+
});
|
|
12366
|
+
if (res.brainstorms.length === 0) {
|
|
12367
|
+
return textResult(
|
|
12368
|
+
input.status ? `This project has no ${input.status} brainstorm tables. Try list_brainstorms with no status.` : "This project has no brainstorm tables yet. A member starts one from Cards \u2192 Brainstorm."
|
|
12369
|
+
);
|
|
12370
|
+
}
|
|
12371
|
+
return textResult(JSON.stringify(res.brainstorms, null, 2));
|
|
12372
|
+
} catch (error) {
|
|
12373
|
+
return errText5("Failed to list brainstorm tables", error);
|
|
12374
|
+
}
|
|
12375
|
+
},
|
|
12376
|
+
{ annotations: { readOnlyHint: true } }
|
|
12377
|
+
),
|
|
12378
|
+
defineContractTool(
|
|
12379
|
+
getBrainstormContract,
|
|
12380
|
+
async (input) => {
|
|
12381
|
+
try {
|
|
12382
|
+
const res = await connection.call("getProjectBrainstorm", {
|
|
12383
|
+
projectId,
|
|
12384
|
+
brainstorm: input.brainstorm
|
|
12385
|
+
});
|
|
12386
|
+
return textResult(JSON.stringify(res, null, 2));
|
|
12387
|
+
} catch (error) {
|
|
12388
|
+
return errText5("Failed to read the brainstorm table", error);
|
|
12389
|
+
}
|
|
12390
|
+
},
|
|
12391
|
+
{ annotations: { readOnlyHint: true } }
|
|
12392
|
+
)
|
|
12393
|
+
];
|
|
12394
|
+
}
|
|
12395
|
+
function writeTools2(connection, projectId) {
|
|
12396
|
+
return [
|
|
12397
|
+
defineContractTool(addBrainstormIdeaContract, async (input) => {
|
|
12398
|
+
try {
|
|
12399
|
+
const res = await connection.call("addProjectBrainstormIdea", {
|
|
12400
|
+
projectId,
|
|
12401
|
+
brainstorm: input.brainstorm,
|
|
12402
|
+
title: input.title,
|
|
12403
|
+
pitch: input.pitch,
|
|
12404
|
+
submit: input.submit
|
|
12405
|
+
});
|
|
12406
|
+
return textResult(
|
|
12407
|
+
res.submitted ? `Added "${res.title}" (${res.ideaId}) face-down and put it forward. The dealer pulls it to the table when its turn comes.` : `Added "${res.title}" (${res.ideaId}) face-down to the hand. It waits there until the user submits it.`
|
|
12408
|
+
);
|
|
12409
|
+
} catch (error) {
|
|
12410
|
+
return errText5("Failed to add the idea", error);
|
|
12411
|
+
}
|
|
12412
|
+
}),
|
|
12413
|
+
defineContractTool(linkBrainstormIdeaContract, async (input) => {
|
|
12414
|
+
try {
|
|
12415
|
+
const res = await connection.call("linkProjectBrainstormIdea", {
|
|
12416
|
+
projectId,
|
|
12417
|
+
idea: input.idea,
|
|
12418
|
+
card: input.card
|
|
12419
|
+
});
|
|
12420
|
+
return textResult(
|
|
12421
|
+
`Linked idea ${res.ideaId} to card ${res.card.slug} (${res.card.url}). The table now shows the idea as promoted.`
|
|
12422
|
+
);
|
|
12423
|
+
} catch (error) {
|
|
12424
|
+
return errText5("Failed to link the idea", error);
|
|
12425
|
+
}
|
|
12426
|
+
})
|
|
12427
|
+
];
|
|
12428
|
+
}
|
|
12429
|
+
|
|
12430
|
+
// src/tools/decision-tools.ts
|
|
12431
|
+
function errText6(prefix, error) {
|
|
12432
|
+
return textResult(`${prefix}: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
12433
|
+
}
|
|
12243
12434
|
function buildDecisionTools(connection, projectId) {
|
|
12244
12435
|
return [
|
|
12245
|
-
...
|
|
12436
|
+
...readTools3(connection, projectId),
|
|
12246
12437
|
...raiseAndVoteTools(connection, projectId),
|
|
12247
12438
|
...settleTools(connection, projectId)
|
|
12248
12439
|
];
|
|
12249
12440
|
}
|
|
12250
|
-
function
|
|
12441
|
+
function readTools3(connection, projectId) {
|
|
12251
12442
|
return [
|
|
12252
12443
|
defineContractTool(
|
|
12253
12444
|
listDecisionsContract,
|
|
@@ -12268,7 +12459,7 @@ function readTools2(connection, projectId) {
|
|
|
12268
12459
|
}
|
|
12269
12460
|
return textResult(JSON.stringify(res.decisions, null, 2));
|
|
12270
12461
|
} catch (error) {
|
|
12271
|
-
return
|
|
12462
|
+
return errText6("Failed to list decisions", error);
|
|
12272
12463
|
}
|
|
12273
12464
|
},
|
|
12274
12465
|
{ annotations: { readOnlyHint: true } }
|
|
@@ -12283,7 +12474,7 @@ function readTools2(connection, projectId) {
|
|
|
12283
12474
|
});
|
|
12284
12475
|
return textResult(JSON.stringify(res, null, 2));
|
|
12285
12476
|
} catch (error) {
|
|
12286
|
-
return
|
|
12477
|
+
return errText6("Failed to read the decision", error);
|
|
12287
12478
|
}
|
|
12288
12479
|
},
|
|
12289
12480
|
{ annotations: { readOnlyHint: true } }
|
|
@@ -12321,7 +12512,7 @@ Blocking ${impactedLinked.length} card(s).${refusedLine}
|
|
|
12321
12512
|
${JSON.stringify(detail, null, 2)}`
|
|
12322
12513
|
);
|
|
12323
12514
|
} catch (error) {
|
|
12324
|
-
return
|
|
12515
|
+
return errText6("Failed to raise the decision", error);
|
|
12325
12516
|
}
|
|
12326
12517
|
}),
|
|
12327
12518
|
defineContractTool(voteDecisionContract, async (input) => {
|
|
@@ -12335,7 +12526,7 @@ ${JSON.stringify(detail, null, 2)}`
|
|
|
12335
12526
|
const tally = res.options.map((o) => `${o.label}: ${o.votes}`).join(", ");
|
|
12336
12527
|
return textResult(`Voted on ${res.slug}. Tally \u2014 ${tally}.`);
|
|
12337
12528
|
} catch (error) {
|
|
12338
|
-
return
|
|
12529
|
+
return errText6("Failed to vote", error);
|
|
12339
12530
|
}
|
|
12340
12531
|
})
|
|
12341
12532
|
];
|
|
@@ -12355,7 +12546,7 @@ function settleTools(connection, projectId) {
|
|
|
12355
12546
|
`Settled ${res.slug} as "${res.chosenOption}". ${res.impactedCount} card(s) were written back to and are no longer blocked.`
|
|
12356
12547
|
);
|
|
12357
12548
|
} catch (error) {
|
|
12358
|
-
return
|
|
12549
|
+
return errText6("Failed to settle the decision", error);
|
|
12359
12550
|
}
|
|
12360
12551
|
}),
|
|
12361
12552
|
defineContractTool(updateDecisionContract, async (input) => {
|
|
@@ -12379,7 +12570,7 @@ function settleTools(connection, projectId) {
|
|
|
12379
12570
|
`Updated ${res.slug} \u2014 ${res.status}, ${res.impactedCount} impacted card(s), deadline ${res.deadlineAt}.`
|
|
12380
12571
|
);
|
|
12381
12572
|
} catch (error) {
|
|
12382
|
-
return
|
|
12573
|
+
return errText6("Failed to update the decision", error);
|
|
12383
12574
|
}
|
|
12384
12575
|
})
|
|
12385
12576
|
];
|
|
@@ -12472,6 +12663,7 @@ function connectedToolsFor(connection, context, config) {
|
|
|
12472
12663
|
buildListProjectMembersTool(connection, projectId),
|
|
12473
12664
|
...context.chatChannelsConfigured ? buildChannelTools(connection, projectId) : [],
|
|
12474
12665
|
...context.meetingsAvailable ? buildMeetingTools(connection, projectId) : [],
|
|
12666
|
+
...context.brainstormsAvailable ? buildBrainstormTools(connection, projectId) : [],
|
|
12475
12667
|
// Always available: the decision tables exist on every project, and a fork
|
|
12476
12668
|
// an agent cannot file is a fork it assumes its way past instead.
|
|
12477
12669
|
...buildDecisionTools(connection, projectId),
|
|
@@ -16896,6 +17088,7 @@ var SessionRunner = class _SessionRunner {
|
|
|
16896
17088
|
googleDriveFolderName: ctx.googleDriveFolderName ?? null,
|
|
16897
17089
|
chatChannelsConfigured: ctx.chatChannelsConfigured ?? false,
|
|
16898
17090
|
meetingsAvailable: ctx.meetingsAvailable ?? false,
|
|
17091
|
+
brainstormsAvailable: ctx.brainstormsAvailable ?? false,
|
|
16899
17092
|
googleAnalyticsConfigured: ctx.googleAnalyticsConfigured ?? false,
|
|
16900
17093
|
gcpLogsConfigured: ctx.gcpLogsConfigured ?? false,
|
|
16901
17094
|
grafanaLogsConfigured: ctx.grafanaLogsConfigured ?? false,
|