aglio-worker 0.101.23 → 0.104.0
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/agent.js +199 -4
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -70483,6 +70483,11 @@ var agentRoleDialsMapSchema = external_exports.object({
|
|
|
70483
70483
|
planning: agentRoleDialsSchema.optional()
|
|
70484
70484
|
});
|
|
70485
70485
|
|
|
70486
|
+
// ../../packages/shared/src/agent-colors.ts
|
|
70487
|
+
var DEFAULT_AGENT_COLOR = "#22c55e";
|
|
70488
|
+
var HEX_COLOR = /^#[0-9a-f]{6}$/;
|
|
70489
|
+
var agentColorSchema = external_exports.string().trim().toLowerCase().regex(HEX_COLOR, "Use a six-digit hex color").default(DEFAULT_AGENT_COLOR);
|
|
70490
|
+
|
|
70486
70491
|
// ../../packages/shared/src/auto-mode.ts
|
|
70487
70492
|
var AUTO_MODE_PAUSE_REASONS = ["manual", "failures", "blocker", "costCap"];
|
|
70488
70493
|
var autoModePauseReasonSchema = external_exports.enum(AUTO_MODE_PAUSE_REASONS);
|
|
@@ -70529,6 +70534,24 @@ var autoModeSettingsSchema = external_exports.object({
|
|
|
70529
70534
|
consecutiveFailureLimit: external_exports.number().int().min(1).max(10).default(3),
|
|
70530
70535
|
/** GitHub Actions workflow file name for workflow_dispatch. */
|
|
70531
70536
|
shipWorkflow: external_exports.string().trim().max(200).nullable().default(null),
|
|
70537
|
+
/** Goals to start after the current goal finishes, in order. */
|
|
70538
|
+
queueCardIds: external_exports.array(external_exports.string().uuid()).default([]),
|
|
70539
|
+
/** Overseer agent. Null uses the goal assignee, then the project default. */
|
|
70540
|
+
overseerAgentConfigId: external_exports.string().uuid().nullable().default(null),
|
|
70541
|
+
/** Agent for planned tickets. Null uses the project builder settings. */
|
|
70542
|
+
buildAgentConfigId: external_exports.string().uuid().nullable().default(null),
|
|
70543
|
+
/** Worker labels for the overseer. Null inherits the project build labels. */
|
|
70544
|
+
overseerRequiredWorkerLabels: external_exports.array(external_exports.string().trim().min(1).max(100)).max(20).nullable().default(null),
|
|
70545
|
+
/** Worker labels for planned tickets. Null inherits the project build labels. */
|
|
70546
|
+
buildRequiredWorkerLabels: external_exports.array(external_exports.string().trim().min(1).max(100)).max(20).nullable().default(null),
|
|
70547
|
+
/** Where the overseer runs. Null follows the project runner target. */
|
|
70548
|
+
overseerRunnerTarget: external_exports.enum(JOB_TARGETS).nullable().default(null),
|
|
70549
|
+
/** Cloud size for the overseer. Null follows the project cloud size. */
|
|
70550
|
+
overseerPoolSize: external_exports.enum(POOL_SIZES).nullable().default(null),
|
|
70551
|
+
/** Where goal tickets build. Null follows the project runner target. */
|
|
70552
|
+
buildRunnerTarget: external_exports.enum(JOB_TARGETS).nullable().default(null),
|
|
70553
|
+
/** Cloud size for goal tickets. Null follows the project cloud size. */
|
|
70554
|
+
buildPoolSize: external_exports.enum(POOL_SIZES).nullable().default(null),
|
|
70532
70555
|
/** Runtime pause/failure state. Never edited by the settings form. */
|
|
70533
70556
|
state: autoModeStateSchema.default(defaultAutoModeState)
|
|
70534
70557
|
});
|
|
@@ -70539,6 +70562,15 @@ var defaultAutoMode = {
|
|
|
70539
70562
|
maxCardsPerTick: 3,
|
|
70540
70563
|
consecutiveFailureLimit: 3,
|
|
70541
70564
|
shipWorkflow: null,
|
|
70565
|
+
queueCardIds: [],
|
|
70566
|
+
overseerAgentConfigId: null,
|
|
70567
|
+
buildAgentConfigId: null,
|
|
70568
|
+
overseerRequiredWorkerLabels: null,
|
|
70569
|
+
buildRequiredWorkerLabels: null,
|
|
70570
|
+
overseerRunnerTarget: null,
|
|
70571
|
+
overseerPoolSize: null,
|
|
70572
|
+
buildRunnerTarget: null,
|
|
70573
|
+
buildPoolSize: null,
|
|
70542
70574
|
state: defaultAutoModeState
|
|
70543
70575
|
};
|
|
70544
70576
|
|
|
@@ -70866,7 +70898,7 @@ var createAgentConfigSchema = external_exports.object({
|
|
|
70866
70898
|
provider: external_exports.string().trim().min(1).max(100),
|
|
70867
70899
|
model: external_exports.string().trim().min(1).max(200),
|
|
70868
70900
|
authMode: external_exports.enum(["byok", "aglio"]).default("byok"),
|
|
70869
|
-
color:
|
|
70901
|
+
color: agentColorSchema,
|
|
70870
70902
|
credentialId: external_exports.string().nullish(),
|
|
70871
70903
|
options: agentConfigOptionsSchema.default({})
|
|
70872
70904
|
});
|
|
@@ -70954,7 +70986,9 @@ var REMOTE_CONSULT_READ_TOOLS = [
|
|
|
70954
70986
|
"card_history",
|
|
70955
70987
|
"agent_list",
|
|
70956
70988
|
"member_list",
|
|
70957
|
-
"job_list"
|
|
70989
|
+
"job_list",
|
|
70990
|
+
"repo_list",
|
|
70991
|
+
"pr_get"
|
|
70958
70992
|
];
|
|
70959
70993
|
var REMOTE_CONSULT_TOOLS = [
|
|
70960
70994
|
...REMOTE_CONSULT_READ_TOOLS,
|
|
@@ -70962,6 +70996,15 @@ var REMOTE_CONSULT_TOOLS = [
|
|
|
70962
70996
|
"card_bulk_create",
|
|
70963
70997
|
"card_update",
|
|
70964
70998
|
"comment_add",
|
|
70999
|
+
"worklog_add",
|
|
71000
|
+
"artifact_attach",
|
|
71001
|
+
"subtask_create",
|
|
71002
|
+
"subtask_update",
|
|
71003
|
+
"card_block_list",
|
|
71004
|
+
"card_block_add",
|
|
71005
|
+
"card_block_remove",
|
|
71006
|
+
"card_propose",
|
|
71007
|
+
"request_human_action",
|
|
70965
71008
|
"question_answer",
|
|
70966
71009
|
"spec_propose",
|
|
70967
71010
|
"run_start",
|
|
@@ -86092,7 +86135,8 @@ async function runRemoteCardJob(deps) {
|
|
|
86092
86135
|
name: input2.name,
|
|
86093
86136
|
label: input2.label,
|
|
86094
86137
|
mime: input2.mime,
|
|
86095
|
-
data: input2.data
|
|
86138
|
+
data: input2.data,
|
|
86139
|
+
cardId: input2.cardId ?? null
|
|
86096
86140
|
}),
|
|
86097
86141
|
pushBranch: (repo, branch) => pushBranch(repo, branch),
|
|
86098
86142
|
log: (message) => deps.log?.(message)
|
|
@@ -87647,7 +87691,8 @@ function jobApi(config2, fetchImpl, signal) {
|
|
|
87647
87691
|
"x-aglio-name": encodeURIComponent(input2.name),
|
|
87648
87692
|
"x-aglio-label": input2.label,
|
|
87649
87693
|
"x-aglio-mime": input2.mime,
|
|
87650
|
-
...input2.kind ? { "x-aglio-kind": input2.kind } : {}
|
|
87694
|
+
...input2.kind ? { "x-aglio-kind": input2.kind } : {},
|
|
87695
|
+
...input2.cardId ? { "x-aglio-card-id": input2.cardId } : {}
|
|
87651
87696
|
},
|
|
87652
87697
|
body: input2.data,
|
|
87653
87698
|
signal
|
|
@@ -99773,6 +99818,26 @@ function createConsultServer(run) {
|
|
|
99773
99818
|
},
|
|
99774
99819
|
async (input2) => forward("job_list", input2)
|
|
99775
99820
|
);
|
|
99821
|
+
server.registerTool(
|
|
99822
|
+
"repo_list",
|
|
99823
|
+
{
|
|
99824
|
+
description: "List repositories in this workspace with project, base branch and verification commands. Read-only.",
|
|
99825
|
+
inputSchema: { projectId: external_exports.string().optional() }
|
|
99826
|
+
},
|
|
99827
|
+
async (input2) => forward("repo_list", input2)
|
|
99828
|
+
);
|
|
99829
|
+
server.registerTool(
|
|
99830
|
+
"pr_get",
|
|
99831
|
+
{
|
|
99832
|
+
description: "Read linked pull requests for a card, or one pull request with reviews, comments and checks by repoId and number. Read-only.",
|
|
99833
|
+
inputSchema: {
|
|
99834
|
+
cardId: external_exports.string().optional(),
|
|
99835
|
+
repoId: external_exports.string().optional(),
|
|
99836
|
+
number: external_exports.number().int().positive().optional()
|
|
99837
|
+
}
|
|
99838
|
+
},
|
|
99839
|
+
async (input2) => forward("pr_get", input2)
|
|
99840
|
+
);
|
|
99776
99841
|
server.registerTool(
|
|
99777
99842
|
"card_create",
|
|
99778
99843
|
{
|
|
@@ -99830,6 +99895,136 @@ function createConsultServer(run) {
|
|
|
99830
99895
|
},
|
|
99831
99896
|
async (input2) => forward("comment_add", input2)
|
|
99832
99897
|
);
|
|
99898
|
+
server.registerTool(
|
|
99899
|
+
"worklog_add",
|
|
99900
|
+
{
|
|
99901
|
+
description: "Add a short work log entry to any card in this workspace. Keep summaries to one or two short sentences.",
|
|
99902
|
+
inputSchema: {
|
|
99903
|
+
cardId: external_exports.string().min(1),
|
|
99904
|
+
type: external_exports.enum(WORK_LOG_TYPES),
|
|
99905
|
+
summary: external_exports.string().min(1).max(400),
|
|
99906
|
+
details: external_exports.string().max(2e4).optional(),
|
|
99907
|
+
artifactIds: external_exports.array(external_exports.string()).optional()
|
|
99908
|
+
}
|
|
99909
|
+
},
|
|
99910
|
+
async (input2) => forward("worklog_add", input2)
|
|
99911
|
+
);
|
|
99912
|
+
server.registerTool(
|
|
99913
|
+
"artifact_attach",
|
|
99914
|
+
{
|
|
99915
|
+
description: "Upload a file from /workspace as an artifact on any card in this workspace. Max 10MB.",
|
|
99916
|
+
inputSchema: {
|
|
99917
|
+
path: external_exports.string().min(1),
|
|
99918
|
+
cardId: external_exports.string().min(1),
|
|
99919
|
+
label: external_exports.string().min(1).max(200).optional(),
|
|
99920
|
+
kind: external_exports.enum(["image", "log", "file", "recording"]).optional()
|
|
99921
|
+
}
|
|
99922
|
+
},
|
|
99923
|
+
async ({ path, cardId, label, kind }) => {
|
|
99924
|
+
try {
|
|
99925
|
+
const host = workspaceHostPath(run.workspace, path);
|
|
99926
|
+
const info = await stat4(host).catch(() => null);
|
|
99927
|
+
if (!info?.isFile()) return fail("File not found in workspace");
|
|
99928
|
+
if (info.size > 10 * 1024 * 1024) return fail("Artifact exceeds 10MB");
|
|
99929
|
+
const mime = guessMime(basename(host));
|
|
99930
|
+
const data = await readFile5(host);
|
|
99931
|
+
const artifactId = await run.uploadArtifact({
|
|
99932
|
+
name: `${run.job.id}/${basename(host)}`,
|
|
99933
|
+
label: label ?? basename(host),
|
|
99934
|
+
mime,
|
|
99935
|
+
data,
|
|
99936
|
+
cardId
|
|
99937
|
+
});
|
|
99938
|
+
return toolText({ artifactId, size: info.size, mime, kind: kind ?? artifactKind(mime), cardId });
|
|
99939
|
+
} catch (error63) {
|
|
99940
|
+
return fail(error63 instanceof Error ? error63.message : String(error63));
|
|
99941
|
+
}
|
|
99942
|
+
}
|
|
99943
|
+
);
|
|
99944
|
+
server.registerTool(
|
|
99945
|
+
"subtask_create",
|
|
99946
|
+
{
|
|
99947
|
+
description: "Create a subticket inside any card in this workspace.",
|
|
99948
|
+
inputSchema: {
|
|
99949
|
+
cardId: external_exports.string().min(1),
|
|
99950
|
+
title: external_exports.string().min(1).max(300),
|
|
99951
|
+
body: external_exports.string().max(2e4).optional()
|
|
99952
|
+
}
|
|
99953
|
+
},
|
|
99954
|
+
async (input2) => forward("subtask_create", input2)
|
|
99955
|
+
);
|
|
99956
|
+
server.registerTool(
|
|
99957
|
+
"subtask_update",
|
|
99958
|
+
{
|
|
99959
|
+
description: "Update a subticket title, body or status.",
|
|
99960
|
+
inputSchema: {
|
|
99961
|
+
subtaskId: external_exports.string().min(1),
|
|
99962
|
+
cardId: external_exports.string().optional(),
|
|
99963
|
+
title: external_exports.string().min(1).max(300).optional(),
|
|
99964
|
+
body: external_exports.string().max(2e4).optional(),
|
|
99965
|
+
column: external_exports.enum(CARD_COLUMNS).optional()
|
|
99966
|
+
}
|
|
99967
|
+
},
|
|
99968
|
+
async (input2) => forward("subtask_update", input2)
|
|
99969
|
+
);
|
|
99970
|
+
server.registerTool(
|
|
99971
|
+
"card_block_list",
|
|
99972
|
+
{
|
|
99973
|
+
description: "List the cards blocking one card and the cards it blocks.",
|
|
99974
|
+
inputSchema: { cardId: external_exports.string().min(1) }
|
|
99975
|
+
},
|
|
99976
|
+
async (input2) => forward("card_block_list", input2)
|
|
99977
|
+
);
|
|
99978
|
+
server.registerTool(
|
|
99979
|
+
"card_block_add",
|
|
99980
|
+
{
|
|
99981
|
+
description: "Link a block between two cards. direction=blocks means cardId blocks targetCardId; blocked_by means targetCardId blocks cardId.",
|
|
99982
|
+
inputSchema: {
|
|
99983
|
+
cardId: external_exports.string().min(1),
|
|
99984
|
+
targetCardId: external_exports.string().min(1),
|
|
99985
|
+
direction: external_exports.enum(["blocks", "blocked_by"]).optional()
|
|
99986
|
+
}
|
|
99987
|
+
},
|
|
99988
|
+
async (input2) => forward("card_block_add", input2)
|
|
99989
|
+
);
|
|
99990
|
+
server.registerTool(
|
|
99991
|
+
"card_block_remove",
|
|
99992
|
+
{
|
|
99993
|
+
description: "Remove a block between two cards. Same direction values as card_block_add.",
|
|
99994
|
+
inputSchema: {
|
|
99995
|
+
cardId: external_exports.string().min(1),
|
|
99996
|
+
targetCardId: external_exports.string().min(1),
|
|
99997
|
+
direction: external_exports.enum(["blocks", "blocked_by"]).optional()
|
|
99998
|
+
}
|
|
99999
|
+
},
|
|
100000
|
+
async (input2) => forward("card_block_remove", input2)
|
|
100001
|
+
);
|
|
100002
|
+
server.registerTool(
|
|
100003
|
+
"card_propose",
|
|
100004
|
+
{
|
|
100005
|
+
description: "Propose a new top-level Todo card from a source card in this workspace. Requires human approval.",
|
|
100006
|
+
inputSchema: {
|
|
100007
|
+
cardId: external_exports.string().min(1),
|
|
100008
|
+
title: external_exports.string().min(1).max(300),
|
|
100009
|
+
body: external_exports.string().min(1).max(5e4),
|
|
100010
|
+
reason: external_exports.string().min(1).max(1e3)
|
|
100011
|
+
}
|
|
100012
|
+
},
|
|
100013
|
+
async (input2) => forward("card_propose", input2)
|
|
100014
|
+
);
|
|
100015
|
+
server.registerTool(
|
|
100016
|
+
"request_human_action",
|
|
100017
|
+
{
|
|
100018
|
+
description: "Create a Todo card for the project owner and block a card until the human finishes it. Use for secrets, access, manual steps or decisions only.",
|
|
100019
|
+
inputSchema: {
|
|
100020
|
+
blockedCardId: external_exports.string().min(1),
|
|
100021
|
+
reason: external_exports.string().min(1).max(300),
|
|
100022
|
+
instructions: external_exports.string().min(1).max(1e4),
|
|
100023
|
+
kind: external_exports.enum(["secret", "manual", "decision", "access"])
|
|
100024
|
+
}
|
|
100025
|
+
},
|
|
100026
|
+
async (input2) => forward("request_human_action", input2)
|
|
100027
|
+
);
|
|
99833
100028
|
server.registerTool(
|
|
99834
100029
|
"question_answer",
|
|
99835
100030
|
{
|