agent-conveyor 0.1.5 → 0.1.6
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.
|
@@ -502,6 +502,7 @@ function parseRuntimeArgs(args, env) {
|
|
|
502
502
|
managerObjective: null,
|
|
503
503
|
managerPermissionsJson: null,
|
|
504
504
|
managerPermit: [],
|
|
505
|
+
managerRecipe: null,
|
|
505
506
|
managerReference: [],
|
|
506
507
|
managerRequireAcks: false,
|
|
507
508
|
managerTool: [],
|
|
@@ -1421,6 +1422,17 @@ function parseRuntimeArgs(args, env) {
|
|
|
1421
1422
|
flags.managerMode = value.value;
|
|
1422
1423
|
index += 1;
|
|
1423
1424
|
}
|
|
1425
|
+
else if (arg === "--manager-recipe") {
|
|
1426
|
+
if (command !== "pair") {
|
|
1427
|
+
return { command, enabled, error: "Unsupported TypeScript runtime option: --manager-recipe", explicit, flags, task };
|
|
1428
|
+
}
|
|
1429
|
+
const value = valueAfter(queue, index, arg);
|
|
1430
|
+
if (value.error) {
|
|
1431
|
+
return { command, enabled, error: value.error, explicit, flags, task };
|
|
1432
|
+
}
|
|
1433
|
+
flags.managerRecipe = value.value;
|
|
1434
|
+
index += 1;
|
|
1435
|
+
}
|
|
1424
1436
|
else if (arg === "--manager-objective") {
|
|
1425
1437
|
if (command !== "pair") {
|
|
1426
1438
|
return { command, enabled, error: "Unsupported TypeScript runtime option: --manager-objective", explicit, flags, task };
|
|
@@ -1555,6 +1567,17 @@ function parseRuntimeArgs(args, env) {
|
|
|
1555
1567
|
flags.managerObjective = value.value;
|
|
1556
1568
|
index += 1;
|
|
1557
1569
|
}
|
|
1570
|
+
else if (arg === "--recipe") {
|
|
1571
|
+
if (command !== "manager-config") {
|
|
1572
|
+
return { command, enabled, error: "Unsupported TypeScript runtime option: --recipe", explicit, flags, task };
|
|
1573
|
+
}
|
|
1574
|
+
const value = valueAfter(queue, index, arg);
|
|
1575
|
+
if (value.error) {
|
|
1576
|
+
return { command, enabled, error: value.error, explicit, flags, task };
|
|
1577
|
+
}
|
|
1578
|
+
flags.managerRecipe = value.value;
|
|
1579
|
+
index += 1;
|
|
1580
|
+
}
|
|
1558
1581
|
else if (arg === "--guideline") {
|
|
1559
1582
|
if (command !== "manager-config") {
|
|
1560
1583
|
return { command, enabled, error: "Unsupported TypeScript runtime option: --guideline", explicit, flags, task };
|
|
@@ -5774,6 +5797,7 @@ function runPairCommand(parsed, options) {
|
|
|
5774
5797
|
managerObjective: parsed.flags.managerObjective,
|
|
5775
5798
|
managerPermissionsJson: parsed.flags.managerPermissionsJson,
|
|
5776
5799
|
managerPermit: parsed.flags.managerPermit,
|
|
5800
|
+
managerRecipe: parsed.flags.managerRecipe,
|
|
5777
5801
|
managerReference: parsed.flags.managerReference,
|
|
5778
5802
|
managerRequireAcks: parsed.flags.managerRequireAcks,
|
|
5779
5803
|
managerTool: parsed.flags.managerTool,
|
|
@@ -6053,6 +6077,7 @@ function emitPairTelemetry(database, options) {
|
|
|
6053
6077
|
function ensurePairManagerConfig(database, options) {
|
|
6054
6078
|
const existing = managerConfigSync(database, options.taskId);
|
|
6055
6079
|
const requested = options.managerMode !== null
|
|
6080
|
+
|| options.managerRecipe !== null
|
|
6056
6081
|
|| options.managerObjective !== null
|
|
6057
6082
|
|| options.managerGuideline.length > 0
|
|
6058
6083
|
|| options.managerAcceptance.length > 0
|
|
@@ -6073,6 +6098,7 @@ function ensurePairManagerConfig(database, options) {
|
|
|
6073
6098
|
if (supervisionMode !== "light" && supervisionMode !== "guided" && supervisionMode !== "strict") {
|
|
6074
6099
|
throw new Error("manager_mode must be light, guided, or strict");
|
|
6075
6100
|
}
|
|
6101
|
+
const recipeName = cleanManagerRecipeName(options.managerRecipe, existing?.recipe_name ?? (existing === null ? "custom" : null));
|
|
6076
6102
|
const objective = options.managerObjective !== null ? options.managerObjective : existing?.objective ?? null;
|
|
6077
6103
|
const guidelines = options.managerGuideline.length > 0 ? options.managerGuideline : existing?.guidelines ?? [];
|
|
6078
6104
|
const acceptanceCriteria = options.managerAcceptance.length > 0
|
|
@@ -6093,13 +6119,14 @@ function ensurePairManagerConfig(database, options) {
|
|
|
6093
6119
|
const requireAcks = options.managerRequireAcks || (existing?.require_acks ?? false);
|
|
6094
6120
|
database.prepare(`
|
|
6095
6121
|
insert into manager_configs(
|
|
6096
|
-
task_id, supervision_mode, objective, guidelines_json,
|
|
6122
|
+
task_id, recipe_name, supervision_mode, objective, guidelines_json,
|
|
6097
6123
|
acceptance_criteria_json, reference_paths_json, permissions_json,
|
|
6098
6124
|
tools_json, epilogues_json, nudge_on_completion, require_acks,
|
|
6099
6125
|
revision, created_at, updated_at
|
|
6100
6126
|
)
|
|
6101
|
-
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?)
|
|
6127
|
+
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?)
|
|
6102
6128
|
on conflict(task_id) do update set
|
|
6129
|
+
recipe_name = excluded.recipe_name,
|
|
6103
6130
|
supervision_mode = excluded.supervision_mode,
|
|
6104
6131
|
objective = excluded.objective,
|
|
6105
6132
|
guidelines_json = excluded.guidelines_json,
|
|
@@ -6111,6 +6138,7 @@ function ensurePairManagerConfig(database, options) {
|
|
|
6111
6138
|
nudge_on_completion = excluded.nudge_on_completion,
|
|
6112
6139
|
require_acks = excluded.require_acks,
|
|
6113
6140
|
revision = case when
|
|
6141
|
+
manager_configs.recipe_name is not excluded.recipe_name or
|
|
6114
6142
|
manager_configs.supervision_mode is not excluded.supervision_mode or
|
|
6115
6143
|
manager_configs.objective is not excluded.objective or
|
|
6116
6144
|
manager_configs.guidelines_json is not excluded.guidelines_json or
|
|
@@ -6123,7 +6151,7 @@ function ensurePairManagerConfig(database, options) {
|
|
|
6123
6151
|
manager_configs.require_acks is not excluded.require_acks
|
|
6124
6152
|
then manager_configs.revision + 1 else manager_configs.revision end,
|
|
6125
6153
|
updated_at = excluded.updated_at
|
|
6126
|
-
`).run(options.taskId, supervisionMode, objective, stableJson(guidelines), stableJson(acceptanceCriteria), stableJson(referencePaths), stableJson(permissions), stableJson(tools), stableJson(epilogues), nudgeOnCompletion, requireAcks ? 1 : 0, options.timestamp, options.timestamp);
|
|
6154
|
+
`).run(options.taskId, recipeName, supervisionMode, objective, stableJson(guidelines), stableJson(acceptanceCriteria), stableJson(referencePaths), stableJson(permissions), stableJson(tools), stableJson(epilogues), nudgeOnCompletion, requireAcks ? 1 : 0, options.timestamp, options.timestamp);
|
|
6127
6155
|
const config = managerConfigSync(database, options.taskId);
|
|
6128
6156
|
if (config === null) {
|
|
6129
6157
|
throw new Error(`manager config was not recorded for task ${options.taskId}`);
|
|
@@ -11842,6 +11870,7 @@ function insertCompatEventSync(database, options) {
|
|
|
11842
11870
|
}
|
|
11843
11871
|
function managerConfigMutationRequested(parsed) {
|
|
11844
11872
|
return parsed.flags.managerMode !== null
|
|
11873
|
+
|| parsed.flags.managerRecipe !== null
|
|
11845
11874
|
|| parsed.flags.managerObjective !== null
|
|
11846
11875
|
|| parsed.flags.managerGuideline.length > 0
|
|
11847
11876
|
|| parsed.flags.managerAcceptance.length > 0
|
|
@@ -11860,6 +11889,7 @@ function upsertManagerConfigFromParsed(database, options) {
|
|
|
11860
11889
|
const parsed = options.parsed;
|
|
11861
11890
|
const existing = options.existing;
|
|
11862
11891
|
const supervisionMode = parsed.flags.managerMode ?? existing?.supervision_mode ?? "guided";
|
|
11892
|
+
const recipeName = cleanManagerRecipeName(parsed.flags.managerRecipe, existing?.recipe_name ?? null);
|
|
11863
11893
|
const objective = parsed.flags.managerObjective !== null ? parsed.flags.managerObjective : existing?.objective ?? null;
|
|
11864
11894
|
const guidelines = parsed.flags.managerGuideline.length > 0 ? parsed.flags.managerGuideline : existing?.guidelines ?? [];
|
|
11865
11895
|
const acceptanceCriteria = parsed.flags.managerAcceptance.length > 0
|
|
@@ -11880,13 +11910,14 @@ function upsertManagerConfigFromParsed(database, options) {
|
|
|
11880
11910
|
const requireAcks = parsed.flags.managerRequireAcks || (existing?.require_acks ?? false);
|
|
11881
11911
|
database.prepare(`
|
|
11882
11912
|
insert into manager_configs(
|
|
11883
|
-
task_id, supervision_mode, objective, guidelines_json,
|
|
11913
|
+
task_id, recipe_name, supervision_mode, objective, guidelines_json,
|
|
11884
11914
|
acceptance_criteria_json, reference_paths_json, permissions_json,
|
|
11885
11915
|
tools_json, epilogues_json, nudge_on_completion, require_acks,
|
|
11886
11916
|
revision, created_at, updated_at
|
|
11887
11917
|
)
|
|
11888
|
-
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?)
|
|
11918
|
+
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?)
|
|
11889
11919
|
on conflict(task_id) do update set
|
|
11920
|
+
recipe_name = excluded.recipe_name,
|
|
11890
11921
|
supervision_mode = excluded.supervision_mode,
|
|
11891
11922
|
objective = excluded.objective,
|
|
11892
11923
|
guidelines_json = excluded.guidelines_json,
|
|
@@ -11898,6 +11929,7 @@ function upsertManagerConfigFromParsed(database, options) {
|
|
|
11898
11929
|
nudge_on_completion = excluded.nudge_on_completion,
|
|
11899
11930
|
require_acks = excluded.require_acks,
|
|
11900
11931
|
revision = case when
|
|
11932
|
+
manager_configs.recipe_name is not excluded.recipe_name or
|
|
11901
11933
|
manager_configs.supervision_mode is not excluded.supervision_mode or
|
|
11902
11934
|
manager_configs.objective is not excluded.objective or
|
|
11903
11935
|
manager_configs.guidelines_json is not excluded.guidelines_json or
|
|
@@ -11910,7 +11942,7 @@ function upsertManagerConfigFromParsed(database, options) {
|
|
|
11910
11942
|
manager_configs.require_acks is not excluded.require_acks
|
|
11911
11943
|
then manager_configs.revision + 1 else manager_configs.revision end,
|
|
11912
11944
|
updated_at = excluded.updated_at
|
|
11913
|
-
`).run(options.taskId, supervisionMode, objective, stableJson(guidelines), stableJson(acceptanceCriteria), stableJson(referencePaths), stableJson(permissions), stableJson(tools), stableJson(epilogues), nudgeOnCompletion, requireAcks ? 1 : 0, options.timestamp, options.timestamp);
|
|
11945
|
+
`).run(options.taskId, recipeName, supervisionMode, objective, stableJson(guidelines), stableJson(acceptanceCriteria), stableJson(referencePaths), stableJson(permissions), stableJson(tools), stableJson(epilogues), nudgeOnCompletion, requireAcks ? 1 : 0, options.timestamp, options.timestamp);
|
|
11914
11946
|
const config = managerConfigSync(database, options.taskId);
|
|
11915
11947
|
if (config === null) {
|
|
11916
11948
|
throw new Error(`manager config was not recorded for task ${options.taskId}`);
|
|
@@ -11933,6 +11965,16 @@ function cleanManagerNudgeOnCompletion(value) {
|
|
|
11933
11965
|
}
|
|
11934
11966
|
return value;
|
|
11935
11967
|
}
|
|
11968
|
+
function cleanManagerRecipeName(value, existing) {
|
|
11969
|
+
if (value === null) {
|
|
11970
|
+
return existing;
|
|
11971
|
+
}
|
|
11972
|
+
const normalized = normalizeManagerRecipeName(value);
|
|
11973
|
+
if (normalized === "custom") {
|
|
11974
|
+
return null;
|
|
11975
|
+
}
|
|
11976
|
+
return managerRecipeDefinition(normalized).name;
|
|
11977
|
+
}
|
|
11936
11978
|
function managerPermissionWarnings(permissions) {
|
|
11937
11979
|
const warnings = [];
|
|
11938
11980
|
for (const [key, value] of Object.entries(permissions ?? {})) {
|