aglio-worker 0.85.0 → 0.86.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 +121 -24
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -70306,9 +70306,10 @@ var PLAN_CATALOG = {
|
|
|
70306
70306
|
enterprise: {
|
|
70307
70307
|
id: "enterprise",
|
|
70308
70308
|
label: "Enterprise",
|
|
70309
|
-
tagline: "
|
|
70309
|
+
tagline: "Custom seats, projects and usage. Agreed in your contract.",
|
|
70310
70310
|
priceLabel: "Contact us",
|
|
70311
70311
|
monthlyPriceUsd: null,
|
|
70312
|
+
customTerms: true,
|
|
70312
70313
|
entitlements: {
|
|
70313
70314
|
seats: null,
|
|
70314
70315
|
projects: null,
|
|
@@ -70758,14 +70759,44 @@ var createCommentSchema = external_exports.object({
|
|
|
70758
70759
|
mentionAgentId: external_exports.string().nullish(),
|
|
70759
70760
|
parentCommentId: external_exports.string().nullish()
|
|
70760
70761
|
});
|
|
70762
|
+
var questionOptionSchema = external_exports.object({
|
|
70763
|
+
label: external_exports.string().trim().min(1).max(120),
|
|
70764
|
+
description: external_exports.string().trim().max(200).optional(),
|
|
70765
|
+
/** Marks the answer the agent suggests, so the human can pick it in one click. */
|
|
70766
|
+
recommended: external_exports.boolean().optional()
|
|
70767
|
+
});
|
|
70761
70768
|
var questionSchema = external_exports.object({
|
|
70762
|
-
text: external_exports.string().min(1),
|
|
70769
|
+
text: external_exports.string().trim().min(1).max(2e3),
|
|
70763
70770
|
type: questionTypeSchema,
|
|
70764
|
-
options: external_exports.array(
|
|
70771
|
+
options: external_exports.array(questionOptionSchema).max(10).optional(),
|
|
70765
70772
|
required: external_exports.boolean().default(true)
|
|
70773
|
+
}).superRefine((question, ctx) => {
|
|
70774
|
+
const options = question.options ?? [];
|
|
70775
|
+
if (question.type !== "text" && options.length < 2) {
|
|
70776
|
+
ctx.addIssue({
|
|
70777
|
+
code: "custom",
|
|
70778
|
+
path: ["options"],
|
|
70779
|
+
message: "Choice questions need at least two options"
|
|
70780
|
+
});
|
|
70781
|
+
}
|
|
70782
|
+
const labels = options.map((option2) => option2.label.trim().toLowerCase());
|
|
70783
|
+
if (new Set(labels).size !== labels.length) {
|
|
70784
|
+
ctx.addIssue({
|
|
70785
|
+
code: "custom",
|
|
70786
|
+
path: ["options"],
|
|
70787
|
+
message: "Question options must be distinct"
|
|
70788
|
+
});
|
|
70789
|
+
}
|
|
70790
|
+
if (options.filter((option2) => option2.recommended).length > 1) {
|
|
70791
|
+
ctx.addIssue({
|
|
70792
|
+
code: "custom",
|
|
70793
|
+
path: ["options"],
|
|
70794
|
+
message: "Mark at most one option as recommended"
|
|
70795
|
+
});
|
|
70796
|
+
}
|
|
70766
70797
|
});
|
|
70767
70798
|
var askQuestionsSchema = external_exports.object({
|
|
70768
|
-
questions: external_exports.array(questionSchema).min(1).max(
|
|
70799
|
+
questions: external_exports.array(questionSchema).min(1).max(10)
|
|
70769
70800
|
});
|
|
70770
70801
|
var workLogSchema = external_exports.object({
|
|
70771
70802
|
type: workLogTypeSchema,
|
|
@@ -70898,7 +70929,9 @@ var REMOTE_CONSULT_READ_TOOLS = [
|
|
|
70898
70929
|
"card_get",
|
|
70899
70930
|
"card_search",
|
|
70900
70931
|
"project_history",
|
|
70901
|
-
"card_history"
|
|
70932
|
+
"card_history",
|
|
70933
|
+
"agent_list",
|
|
70934
|
+
"member_list"
|
|
70902
70935
|
];
|
|
70903
70936
|
var REMOTE_CONSULT_TOOLS = [
|
|
70904
70937
|
...REMOTE_CONSULT_READ_TOOLS,
|
|
@@ -70908,8 +70941,6 @@ var REMOTE_CONSULT_TOOLS = [
|
|
|
70908
70941
|
"comment_add",
|
|
70909
70942
|
"question_answer",
|
|
70910
70943
|
"spec_propose",
|
|
70911
|
-
"pr_open",
|
|
70912
|
-
"pr_merge",
|
|
70913
70944
|
"run_start",
|
|
70914
70945
|
"assign_card",
|
|
70915
70946
|
"card_delete"
|
|
@@ -71604,6 +71635,8 @@ var boardListMoveSchema = external_exports.object({
|
|
|
71604
71635
|
overKey: external_exports.string().min(1),
|
|
71605
71636
|
insertAfter: external_exports.boolean().default(false)
|
|
71606
71637
|
});
|
|
71638
|
+
var JOBS_COLUMN_KEY = "jobs";
|
|
71639
|
+
var BOARD_BUILTIN_COLUMNS = [JOBS_COLUMN_KEY, ...CARD_COLUMNS];
|
|
71607
71640
|
|
|
71608
71641
|
// ../../packages/shared/src/project-sections.ts
|
|
71609
71642
|
var PROJECT_SECTION_NAME_MAX = 40;
|
|
@@ -86959,7 +86992,7 @@ function workerCardApi(config2, fetchImpl, signal) {
|
|
|
86959
86992
|
const response = await jobTokenRequest(
|
|
86960
86993
|
config2,
|
|
86961
86994
|
fetchImpl,
|
|
86962
|
-
`/api/workers/jobs/${input2.jobId}/context?leaseId=${encodeURIComponent(input2.leaseId)}&workspaceRoot=${encodeURIComponent(input2.workspaceRoot)}&workspaceReady=${input2.workspaceReady ? "1" : "0"}`,
|
|
86995
|
+
`/api/workers/jobs/${input2.jobId}/context?leaseId=${encodeURIComponent(input2.leaseId)}&workspaceRoot=${encodeURIComponent(input2.workspaceRoot)}&workspaceReady=${input2.workspaceReady ? "1" : "0"}&executor=${encodeURIComponent(config2.mode)}`,
|
|
86963
86996
|
input2.token,
|
|
86964
86997
|
{ method: "GET", signal }
|
|
86965
86998
|
);
|
|
@@ -99293,20 +99326,48 @@ function createConsultServer(run) {
|
|
|
99293
99326
|
},
|
|
99294
99327
|
async (input2) => forward("card_history", input2)
|
|
99295
99328
|
);
|
|
99329
|
+
server.registerTool(
|
|
99330
|
+
"agent_list",
|
|
99331
|
+
{
|
|
99332
|
+
description: "List agents in this workspace with driver, model and archived state. Read-only.",
|
|
99333
|
+
inputSchema: { includeArchived: external_exports.boolean().optional() }
|
|
99334
|
+
},
|
|
99335
|
+
async (input2) => forward("agent_list", input2)
|
|
99336
|
+
);
|
|
99337
|
+
server.registerTool(
|
|
99338
|
+
"member_list",
|
|
99339
|
+
{
|
|
99340
|
+
description: "List workspace members with role and userId. Read-only.",
|
|
99341
|
+
inputSchema: {}
|
|
99342
|
+
},
|
|
99343
|
+
async () => forward("member_list", {})
|
|
99344
|
+
);
|
|
99296
99345
|
server.registerTool(
|
|
99297
99346
|
"card_create",
|
|
99298
99347
|
{
|
|
99299
|
-
description: "Create an unassigned
|
|
99300
|
-
inputSchema: {
|
|
99348
|
+
description: "Create an unassigned card in this workspace. Optionally pick the starting column.",
|
|
99349
|
+
inputSchema: {
|
|
99350
|
+
title: external_exports.string().min(1).max(300),
|
|
99351
|
+
body: external_exports.string().max(5e4).optional(),
|
|
99352
|
+
column: external_exports.enum(CARD_COLUMNS).optional(),
|
|
99353
|
+
...projectFields
|
|
99354
|
+
}
|
|
99301
99355
|
},
|
|
99302
99356
|
async (input2) => forward("card_create", input2)
|
|
99303
99357
|
);
|
|
99304
99358
|
server.registerTool(
|
|
99305
99359
|
"card_bulk_create",
|
|
99306
99360
|
{
|
|
99307
|
-
description: "Create many unassigned
|
|
99361
|
+
description: "Create many unassigned cards in this workspace. Optionally pick the starting column.",
|
|
99308
99362
|
inputSchema: {
|
|
99309
|
-
cards: external_exports.array(
|
|
99363
|
+
cards: external_exports.array(
|
|
99364
|
+
external_exports.object({
|
|
99365
|
+
title: external_exports.string().min(1).max(300),
|
|
99366
|
+
body: external_exports.string().max(5e4).optional(),
|
|
99367
|
+
column: external_exports.enum(CARD_COLUMNS).optional()
|
|
99368
|
+
})
|
|
99369
|
+
).min(1).max(100),
|
|
99370
|
+
column: external_exports.enum(CARD_COLUMNS).optional(),
|
|
99310
99371
|
...projectFields
|
|
99311
99372
|
}
|
|
99312
99373
|
},
|
|
@@ -99315,12 +99376,12 @@ function createConsultServer(run) {
|
|
|
99315
99376
|
server.registerTool(
|
|
99316
99377
|
"card_update",
|
|
99317
99378
|
{
|
|
99318
|
-
description: "Update
|
|
99379
|
+
description: "Update any card title, body, priority or column in this workspace.",
|
|
99319
99380
|
inputSchema: {
|
|
99320
99381
|
cardId: external_exports.string().min(1),
|
|
99321
99382
|
title: external_exports.string().min(1).max(300).optional(),
|
|
99322
99383
|
body: external_exports.string().max(5e4).optional(),
|
|
99323
|
-
column: external_exports.
|
|
99384
|
+
column: external_exports.enum(CARD_COLUMNS).optional(),
|
|
99324
99385
|
priority: external_exports.number().int().min(-100).max(100).optional()
|
|
99325
99386
|
}
|
|
99326
99387
|
},
|
|
@@ -99349,7 +99410,7 @@ function createConsultServer(run) {
|
|
|
99349
99410
|
server.registerTool(
|
|
99350
99411
|
"spec_propose",
|
|
99351
99412
|
{
|
|
99352
|
-
description: "Propose a spec for
|
|
99413
|
+
description: "Propose a spec for any card in this workspace. Optional blocks/blockedBy (top-level or split entries) accept AGLIO-123, #123 or card ids. A human still approves it.",
|
|
99353
99414
|
inputSchema: {
|
|
99354
99415
|
cardId: external_exports.string().min(1),
|
|
99355
99416
|
title: external_exports.string().min(1).max(300),
|
|
@@ -99370,12 +99431,42 @@ function createConsultServer(run) {
|
|
|
99370
99431
|
},
|
|
99371
99432
|
async (input2) => forward("spec_propose", input2)
|
|
99372
99433
|
);
|
|
99434
|
+
server.registerTool(
|
|
99435
|
+
"assign_card",
|
|
99436
|
+
{
|
|
99437
|
+
description: "Assign a card to an agent or workspace member, or release it back to the queue. Omit both ids to release.",
|
|
99438
|
+
inputSchema: {
|
|
99439
|
+
cardId: external_exports.string().min(1),
|
|
99440
|
+
agentConfigId: external_exports.string().optional(),
|
|
99441
|
+
userId: external_exports.string().optional()
|
|
99442
|
+
}
|
|
99443
|
+
},
|
|
99444
|
+
async (input2) => forward("assign_card", input2)
|
|
99445
|
+
);
|
|
99446
|
+
server.registerTool(
|
|
99447
|
+
"run_start",
|
|
99448
|
+
{
|
|
99449
|
+
description: "Start a build, consult or review run on a card in this workspace. Defaults to the card assignee, consultant agent or first active agent.",
|
|
99450
|
+
inputSchema: {
|
|
99451
|
+
cardId: external_exports.string().min(1),
|
|
99452
|
+
kind: external_exports.enum(["build", "consult", "review"]).optional(),
|
|
99453
|
+
agentConfigId: external_exports.string().optional(),
|
|
99454
|
+
prompt: external_exports.string().max(2e4).optional()
|
|
99455
|
+
}
|
|
99456
|
+
},
|
|
99457
|
+
async (input2) => forward("run_start", input2)
|
|
99458
|
+
);
|
|
99459
|
+
server.registerTool(
|
|
99460
|
+
"card_delete",
|
|
99461
|
+
{
|
|
99462
|
+
description: "Archive a card and its subtickets in this workspace.",
|
|
99463
|
+
inputSchema: { cardId: external_exports.string().min(1) }
|
|
99464
|
+
},
|
|
99465
|
+
async (input2) => forward("card_delete", input2)
|
|
99466
|
+
);
|
|
99373
99467
|
for (const [name2, description] of [
|
|
99374
|
-
["pr_open", "Workspace consultant runs cannot open pull requests."],
|
|
99375
|
-
["pr_merge", "Workspace consultant runs cannot merge pull requests."]
|
|
99376
|
-
["run_start", "Workspace consultant runs cannot start runs."],
|
|
99377
|
-
["assign_card", "Workspace consultant runs cannot assign cards."],
|
|
99378
|
-
["card_delete", "Workspace consultant runs cannot delete cards."]
|
|
99468
|
+
["pr_open", "Workspace consultant runs cannot push code or open pull requests. Use run_start."],
|
|
99469
|
+
["pr_merge", "Workspace consultant runs cannot merge pull requests."]
|
|
99379
99470
|
]) {
|
|
99380
99471
|
server.registerTool(name2, { description, inputSchema: {} }, async () => fail(description));
|
|
99381
99472
|
}
|
|
@@ -99592,16 +99683,22 @@ function createServerForRun(run) {
|
|
|
99592
99683
|
server.registerTool(
|
|
99593
99684
|
"question_ask",
|
|
99594
99685
|
{
|
|
99595
|
-
description: "Ask the human
|
|
99686
|
+
description: "Ask the human up to 10 questions and pause the run until the required ones are answered. Ask only when the answer changes what you build and you cannot infer it from the card, comments, work log or repo. Batch related questions into one call, mark one option as recommended, and mark a question required only when you cannot continue without it. Never repeat a question that is still open.",
|
|
99596
99687
|
inputSchema: {
|
|
99597
99688
|
questions: external_exports.array(
|
|
99598
99689
|
external_exports.object({
|
|
99599
|
-
text: external_exports.string().min(1).max(2e3),
|
|
99690
|
+
text: external_exports.string().trim().min(1).max(2e3),
|
|
99600
99691
|
type: external_exports.enum(QUESTION_TYPES),
|
|
99601
|
-
options: external_exports.array(
|
|
99692
|
+
options: external_exports.array(
|
|
99693
|
+
external_exports.object({
|
|
99694
|
+
label: external_exports.string().trim().min(1).max(120),
|
|
99695
|
+
description: external_exports.string().trim().max(200).optional(),
|
|
99696
|
+
recommended: external_exports.boolean().optional()
|
|
99697
|
+
})
|
|
99698
|
+
).min(2).max(10).optional(),
|
|
99602
99699
|
required: external_exports.boolean().default(true)
|
|
99603
99700
|
})
|
|
99604
|
-
).min(1).max(
|
|
99701
|
+
).min(1).max(10)
|
|
99605
99702
|
}
|
|
99606
99703
|
},
|
|
99607
99704
|
async (input2) => forward("question_ask", input2)
|