aglio-worker 0.102.0 → 0.105.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 +166 -3
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -70986,7 +70986,9 @@ var REMOTE_CONSULT_READ_TOOLS = [
|
|
|
70986
70986
|
"card_history",
|
|
70987
70987
|
"agent_list",
|
|
70988
70988
|
"member_list",
|
|
70989
|
-
"job_list"
|
|
70989
|
+
"job_list",
|
|
70990
|
+
"repo_list",
|
|
70991
|
+
"pr_get"
|
|
70990
70992
|
];
|
|
70991
70993
|
var REMOTE_CONSULT_TOOLS = [
|
|
70992
70994
|
...REMOTE_CONSULT_READ_TOOLS,
|
|
@@ -70994,6 +70996,15 @@ var REMOTE_CONSULT_TOOLS = [
|
|
|
70994
70996
|
"card_bulk_create",
|
|
70995
70997
|
"card_update",
|
|
70996
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",
|
|
70997
71008
|
"question_answer",
|
|
70998
71009
|
"spec_propose",
|
|
70999
71010
|
"run_start",
|
|
@@ -86124,7 +86135,8 @@ async function runRemoteCardJob(deps) {
|
|
|
86124
86135
|
name: input2.name,
|
|
86125
86136
|
label: input2.label,
|
|
86126
86137
|
mime: input2.mime,
|
|
86127
|
-
data: input2.data
|
|
86138
|
+
data: input2.data,
|
|
86139
|
+
cardId: input2.cardId ?? null
|
|
86128
86140
|
}),
|
|
86129
86141
|
pushBranch: (repo, branch) => pushBranch(repo, branch),
|
|
86130
86142
|
log: (message) => deps.log?.(message)
|
|
@@ -87679,7 +87691,8 @@ function jobApi(config2, fetchImpl, signal) {
|
|
|
87679
87691
|
"x-aglio-name": encodeURIComponent(input2.name),
|
|
87680
87692
|
"x-aglio-label": input2.label,
|
|
87681
87693
|
"x-aglio-mime": input2.mime,
|
|
87682
|
-
...input2.kind ? { "x-aglio-kind": input2.kind } : {}
|
|
87694
|
+
...input2.kind ? { "x-aglio-kind": input2.kind } : {},
|
|
87695
|
+
...input2.cardId ? { "x-aglio-card-id": input2.cardId } : {}
|
|
87683
87696
|
},
|
|
87684
87697
|
body: input2.data,
|
|
87685
87698
|
signal
|
|
@@ -99805,6 +99818,26 @@ function createConsultServer(run) {
|
|
|
99805
99818
|
},
|
|
99806
99819
|
async (input2) => forward("job_list", input2)
|
|
99807
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
|
+
);
|
|
99808
99841
|
server.registerTool(
|
|
99809
99842
|
"card_create",
|
|
99810
99843
|
{
|
|
@@ -99862,6 +99895,136 @@ function createConsultServer(run) {
|
|
|
99862
99895
|
},
|
|
99863
99896
|
async (input2) => forward("comment_add", input2)
|
|
99864
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
|
+
);
|
|
99865
100028
|
server.registerTool(
|
|
99866
100029
|
"question_answer",
|
|
99867
100030
|
{
|