bamboo-agents 0.1.14 → 0.1.15-dev.129.f105aa4
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/VERSION +1 -1
- package/dist/index.js +244 -19
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.15-dev.129.f105aa4
|
package/dist/index.js
CHANGED
|
@@ -3037,7 +3037,7 @@ var VERSION;
|
|
|
3037
3037
|
var init_version = __esm({
|
|
3038
3038
|
"src/version.ts"() {
|
|
3039
3039
|
"use strict";
|
|
3040
|
-
VERSION = "0.1.
|
|
3040
|
+
VERSION = "0.1.15-dev.129.f105aa4";
|
|
3041
3041
|
}
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -12866,6 +12866,12 @@ function parseEvalManagementOperationData(call, data, selectedOrgId) {
|
|
|
12866
12866
|
parsed = InvestigationWaveUpdateReceiptSchema.parse(data);
|
|
12867
12867
|
else if (operation === "wave.schedule")
|
|
12868
12868
|
parsed = InvestigationWaveScheduleReceiptSchema.parse(data);
|
|
12869
|
+
else if (operation === "case.create" || operation === "case.update")
|
|
12870
|
+
parsed = CaseAuthoringReceiptSchema.parse(data);
|
|
12871
|
+
else if (operation === "case.retire")
|
|
12872
|
+
parsed = CaseRetireReceiptSchema.parse(data);
|
|
12873
|
+
else if (operation === "case.attach" || operation === "case.detach")
|
|
12874
|
+
parsed = CaseRefsReceiptSchema.parse(data);
|
|
12869
12875
|
else return data;
|
|
12870
12876
|
const mismatch = (label) => {
|
|
12871
12877
|
throw new Error(`eval_management_receipt_mismatch:${label}`);
|
|
@@ -12907,10 +12913,41 @@ function parseEvalManagementOperationData(call, data, selectedOrgId) {
|
|
|
12907
12913
|
const expectedRevision = call.input.expected_membership_revision;
|
|
12908
12914
|
if (typeof expectedRevision === "number" && receipt.membership_revision !== expectedRevision)
|
|
12909
12915
|
mismatch("membership_revision");
|
|
12916
|
+
} else if (operation === "case.create" || operation === "case.update") {
|
|
12917
|
+
const receipt = parsed;
|
|
12918
|
+
if (inputBrandId && !sameId(receipt.brand_id, inputBrandId))
|
|
12919
|
+
mismatch("brand_id");
|
|
12920
|
+
const inputAgentId = typeof call.input.agent_id === "string" ? call.input.agent_id : void 0;
|
|
12921
|
+
if (inputAgentId && !sameId(receipt.agent_id, inputAgentId))
|
|
12922
|
+
mismatch("agent_id");
|
|
12923
|
+
if (inputId && (!receipt.case_id || !sameId(receipt.case_id, inputId)))
|
|
12924
|
+
mismatch("case_id");
|
|
12925
|
+
const inputSourcePath = typeof call.input.source_path === "string" ? call.input.source_path : void 0;
|
|
12926
|
+
if (inputSourcePath && receipt.source_path !== inputSourcePath)
|
|
12927
|
+
mismatch("source_path");
|
|
12928
|
+
} else if (operation === "case.retire") {
|
|
12929
|
+
const receipt = parsed;
|
|
12930
|
+
if (inputBrandId && !sameId(receipt.brand_id, inputBrandId))
|
|
12931
|
+
mismatch("brand_id");
|
|
12932
|
+
if (inputId && (!receipt.case_id || !sameId(receipt.case_id, inputId)))
|
|
12933
|
+
mismatch("case_id");
|
|
12934
|
+
const inputSourcePath = typeof call.input.source_path === "string" ? call.input.source_path : void 0;
|
|
12935
|
+
if (inputSourcePath && receipt.source_path !== inputSourcePath)
|
|
12936
|
+
mismatch("source_path");
|
|
12937
|
+
const commandId = typeof call.input.command_id === "string" ? call.input.command_id : void 0;
|
|
12938
|
+
if (commandId && receipt.command_id !== commandId) mismatch("command_id");
|
|
12939
|
+
} else if (operation === "case.attach" || operation === "case.detach") {
|
|
12940
|
+
const receipt = parsed;
|
|
12941
|
+
if (receipt.operation !== action) mismatch("operation");
|
|
12942
|
+
if (inputId && !sameId(receipt.investigation_id, inputId))
|
|
12943
|
+
mismatch("investigation_id");
|
|
12944
|
+
const claimKeys = Array.isArray(call.input.claim_keys) ? call.input.claim_keys.filter((k) => typeof k === "string") : [];
|
|
12945
|
+
const receiptKeys = new Set(receipt.claims.map((c) => c.key));
|
|
12946
|
+
if (claimKeys.some((key) => !receiptKeys.has(key))) mismatch("claim_keys");
|
|
12910
12947
|
}
|
|
12911
12948
|
return parsed;
|
|
12912
12949
|
}
|
|
12913
|
-
var EvalManagementOperationSchema, EvalManagementBindingSchema, EvalManagementCatalogBindingSchema, EvalManagementInputHelpSchema, EVAL_MANAGEMENT_INPUTS, common, EVAL_MANAGEMENT_BINDINGS, EvalManagementCatalogResponseSchema, EvalManagementCallSchema, EvalManagementScopeSchema, InvestigationPublicationReceiptSchema, InvestigationAuthoringDataSchema, InvestigationControlReceiptSchema, InvestigationDecisionReceiptSchema, InvestigationWaveMemberReceiptSchema, InvestigationWaveCreateReceiptSchema, InvestigationWaveUpdateReceiptSchema, InvestigationWaveScheduleReceiptSchema, EvalManagementCatalogResultSchema, EvalManagementResultSchema, EvalManagementWriteErrorSchema;
|
|
12950
|
+
var EvalManagementOperationSchema, EvalManagementBindingSchema, EvalManagementCatalogBindingSchema, EvalManagementInputHelpSchema, EVAL_MANAGEMENT_INPUTS, common, EVAL_MANAGEMENT_BINDINGS, EvalManagementCatalogResponseSchema, EvalManagementCallSchema, EvalManagementScopeSchema, InvestigationPublicationReceiptSchema, InvestigationAuthoringDataSchema, InvestigationControlReceiptSchema, InvestigationDecisionReceiptSchema, InvestigationWaveMemberReceiptSchema, InvestigationWaveCreateReceiptSchema, InvestigationWaveUpdateReceiptSchema, InvestigationWaveScheduleReceiptSchema, CaseAuthoringReceiptSchema, CaseRetireReceiptSchema, CaseRefsReceiptSchema, EvalManagementCatalogResultSchema, EvalManagementResultSchema, EvalManagementWriteErrorSchema;
|
|
12914
12951
|
var init_eval_management = __esm({
|
|
12915
12952
|
"../../src/lib/api-contracts/cli/eval-management.ts"() {
|
|
12916
12953
|
init_zod();
|
|
@@ -12932,7 +12969,12 @@ var init_eval_management = __esm({
|
|
|
12932
12969
|
"wave.get",
|
|
12933
12970
|
"wave.create",
|
|
12934
12971
|
"wave.update",
|
|
12935
|
-
"wave.schedule"
|
|
12972
|
+
"wave.schedule",
|
|
12973
|
+
"case.create",
|
|
12974
|
+
"case.update",
|
|
12975
|
+
"case.retire",
|
|
12976
|
+
"case.attach",
|
|
12977
|
+
"case.detach"
|
|
12936
12978
|
]);
|
|
12937
12979
|
EvalManagementBindingSchema = external_exports.object({
|
|
12938
12980
|
operation: EvalManagementOperationSchema,
|
|
@@ -12974,6 +13016,11 @@ var init_eval_management = __esm({
|
|
|
12974
13016
|
},
|
|
12975
13017
|
"investigation.update": {
|
|
12976
13018
|
required: ["id", "brand_id"],
|
|
13019
|
+
// `claims` is a MERGE-BY-KEY patch (BAM-5180): each entry is matched to
|
|
13020
|
+
// the existing claim with the same `key`; fields you omit keep their
|
|
13021
|
+
// current values (status, conclusion, verdict_tier, decision, evidence,
|
|
13022
|
+
// case_refs, …); an unmatched key is appended as a new claim; a claim
|
|
13023
|
+
// you leave out is NEVER removed — removal is `investigation.retire_claim`.
|
|
12977
13024
|
optional: [
|
|
12978
13025
|
"title",
|
|
12979
13026
|
"hypothesis",
|
|
@@ -13058,6 +13105,57 @@ var init_eval_management = __esm({
|
|
|
13058
13105
|
"idempotency_key"
|
|
13059
13106
|
],
|
|
13060
13107
|
optional: ["not_before"]
|
|
13108
|
+
},
|
|
13109
|
+
// BAM-5180 — case authoring. A case is one repo-authored probe-set file
|
|
13110
|
+
// (`brands/<brand>/agents/<agent>/evals/<category>/<probe>.yaml`) beside its
|
|
13111
|
+
// `_set.yaml`; `eval_cases` is the projection, never the target.
|
|
13112
|
+
"case.create": {
|
|
13113
|
+
required: ["brand_id", "agent_id", "category", "probe", "input", "rubric"],
|
|
13114
|
+
optional: [
|
|
13115
|
+
"slot",
|
|
13116
|
+
"family",
|
|
13117
|
+
"split",
|
|
13118
|
+
"skills",
|
|
13119
|
+
"set_hypothesis",
|
|
13120
|
+
"set_evidence_kind",
|
|
13121
|
+
"set_priority",
|
|
13122
|
+
"set_rubric_version"
|
|
13123
|
+
],
|
|
13124
|
+
server_injected: { operation: "create" }
|
|
13125
|
+
},
|
|
13126
|
+
"case.update": {
|
|
13127
|
+
// Identify the case by `id` (eval_cases uuid) OR `source_path` (full
|
|
13128
|
+
// repo path) — exactly one. `expected_source_sha` is the optimistic fence.
|
|
13129
|
+
required: ["brand_id"],
|
|
13130
|
+
optional: [
|
|
13131
|
+
"id",
|
|
13132
|
+
"source_path",
|
|
13133
|
+
"input",
|
|
13134
|
+
"rubric",
|
|
13135
|
+
"slot",
|
|
13136
|
+
"family",
|
|
13137
|
+
"split",
|
|
13138
|
+
"skills",
|
|
13139
|
+
"expected_source_sha"
|
|
13140
|
+
],
|
|
13141
|
+
server_injected: { operation: "update" }
|
|
13142
|
+
},
|
|
13143
|
+
"case.retire": {
|
|
13144
|
+
required: ["brand_id", "command_id", "body"],
|
|
13145
|
+
optional: ["id", "source_path", "expected_source_sha"],
|
|
13146
|
+
server_injected: { operation: "retire" }
|
|
13147
|
+
},
|
|
13148
|
+
"case.attach": {
|
|
13149
|
+
// `id` is the INVESTIGATION id. `case_refs` are eval_cases uuids or full
|
|
13150
|
+
// `source_path`s; a bare filename stem is rejected as ambiguous.
|
|
13151
|
+
required: ["id", "brand_id", "claim_keys", "case_refs"],
|
|
13152
|
+
optional: ["expected_source_sha"],
|
|
13153
|
+
server_injected: { operation: "attach" }
|
|
13154
|
+
},
|
|
13155
|
+
"case.detach": {
|
|
13156
|
+
required: ["id", "brand_id", "claim_keys", "case_refs"],
|
|
13157
|
+
optional: ["expected_source_sha"],
|
|
13158
|
+
server_injected: { operation: "detach" }
|
|
13061
13159
|
}
|
|
13062
13160
|
};
|
|
13063
13161
|
common = {
|
|
@@ -13102,7 +13200,9 @@ var init_eval_management = __esm({
|
|
|
13102
13200
|
{
|
|
13103
13201
|
...common,
|
|
13104
13202
|
operation: "investigation.update",
|
|
13105
|
-
|
|
13203
|
+
// The served catalog is where the FDE skill discovers behaviour, so the
|
|
13204
|
+
// merge-by-key contract lives in the description, not only in a comment.
|
|
13205
|
+
description: "Revise an authored investigation with optimistic source concurrency; `claims` merges by key \u2014 omitted fields keep their values, unlisted claims are never removed (use retire_claim)",
|
|
13106
13206
|
method: "PATCH",
|
|
13107
13207
|
path: "/api/v1/plays/{id}",
|
|
13108
13208
|
side_effect: "repo-authored investigation revision",
|
|
@@ -13253,6 +13353,68 @@ var init_eval_management = __esm({
|
|
|
13253
13353
|
receipt: "wave request and per-investigation run receipts",
|
|
13254
13354
|
minimum_cli_version: "0.1.11",
|
|
13255
13355
|
explicit_org_scope: true
|
|
13356
|
+
},
|
|
13357
|
+
// BAM-5180 — the five case operations. Every one is withheld from a stable
|
|
13358
|
+
// CLI below 0.1.15 (`isBindingAdvertisedTo` in the operations route): the
|
|
13359
|
+
// published 0.1.12, 0.1.13 and 0.1.14 stables parse the catalog but bundle a
|
|
13360
|
+
// closed 17-operation call enum that cannot invoke them (0.1.13 and 0.1.14
|
|
13361
|
+
// were cut by BAM-5352 before this landed), so advertising them would only
|
|
13362
|
+
// tell an FDE about an operation their client rejects on dispatch. 0.1.15 is
|
|
13363
|
+
// the first stable that can carry them.
|
|
13364
|
+
{
|
|
13365
|
+
...common,
|
|
13366
|
+
operation: "case.create",
|
|
13367
|
+
description: "Author one executable case as a repo probe-set file; does not queue execution",
|
|
13368
|
+
method: "POST",
|
|
13369
|
+
path: "/api/v1/eval/cases/authoring",
|
|
13370
|
+
side_effect: "repo-authored case file (plus _set.yaml for a new category) and eval_cases projection",
|
|
13371
|
+
receipt: "case id, source path, source SHA, and publication result",
|
|
13372
|
+
minimum_cli_version: "0.1.15",
|
|
13373
|
+
explicit_org_scope: true
|
|
13374
|
+
},
|
|
13375
|
+
{
|
|
13376
|
+
...common,
|
|
13377
|
+
operation: "case.update",
|
|
13378
|
+
description: "Revise an authored case's prompt, rubric, or constraints with optimistic source concurrency",
|
|
13379
|
+
method: "POST",
|
|
13380
|
+
path: "/api/v1/eval/cases/authoring",
|
|
13381
|
+
side_effect: "repo-authored case revision and eval_cases projection",
|
|
13382
|
+
receipt: "case id, source path, source SHA, and publication result",
|
|
13383
|
+
minimum_cli_version: "0.1.15",
|
|
13384
|
+
explicit_org_scope: true
|
|
13385
|
+
},
|
|
13386
|
+
{
|
|
13387
|
+
...common,
|
|
13388
|
+
operation: "case.retire",
|
|
13389
|
+
description: "Retire an authored case canonically by removing its file; history and evidence are kept",
|
|
13390
|
+
method: "POST",
|
|
13391
|
+
path: "/api/v1/eval/cases/authoring",
|
|
13392
|
+
side_effect: "repo file removal; the bank reconciler marks the projected case inactive",
|
|
13393
|
+
receipt: "case id, source path, and publication result",
|
|
13394
|
+
minimum_cli_version: "0.1.15",
|
|
13395
|
+
explicit_org_scope: true
|
|
13396
|
+
},
|
|
13397
|
+
{
|
|
13398
|
+
...common,
|
|
13399
|
+
operation: "case.attach",
|
|
13400
|
+
description: "Attach existing cases to one or more claims of an investigation by id or full source path",
|
|
13401
|
+
method: "POST",
|
|
13402
|
+
path: "/api/v1/eval/investigations/{id}/case-refs",
|
|
13403
|
+
side_effect: "repo-authored investigation revision (claim case_refs) and Tests membership projection",
|
|
13404
|
+
receipt: "per-claim case references, source SHA, and publication result",
|
|
13405
|
+
minimum_cli_version: "0.1.15",
|
|
13406
|
+
explicit_org_scope: true
|
|
13407
|
+
},
|
|
13408
|
+
{
|
|
13409
|
+
...common,
|
|
13410
|
+
operation: "case.detach",
|
|
13411
|
+
description: "Detach cases from one or more claims; never deletes the case or its evidence",
|
|
13412
|
+
method: "POST",
|
|
13413
|
+
path: "/api/v1/eval/investigations/{id}/case-refs",
|
|
13414
|
+
side_effect: "repo-authored investigation revision (claim case_refs) and Tests membership projection",
|
|
13415
|
+
receipt: "per-claim case references, source SHA, and publication result",
|
|
13416
|
+
minimum_cli_version: "0.1.15",
|
|
13417
|
+
explicit_org_scope: true
|
|
13256
13418
|
}
|
|
13257
13419
|
];
|
|
13258
13420
|
EvalManagementCatalogResponseSchema = external_exports.object({
|
|
@@ -13392,6 +13554,46 @@ var init_eval_management = __esm({
|
|
|
13392
13554
|
})
|
|
13393
13555
|
)
|
|
13394
13556
|
});
|
|
13557
|
+
CaseAuthoringReceiptSchema = external_exports.object({
|
|
13558
|
+
case_id: external_exports.string().uuid().nullable(),
|
|
13559
|
+
brand_id: external_exports.string().uuid(),
|
|
13560
|
+
agent_id: external_exports.string().uuid(),
|
|
13561
|
+
category: external_exports.string().min(1),
|
|
13562
|
+
probe: external_exports.string().min(1),
|
|
13563
|
+
source_path: external_exports.string().min(1),
|
|
13564
|
+
set_path: external_exports.string().min(1),
|
|
13565
|
+
publication: InvestigationPublicationReceiptSchema
|
|
13566
|
+
}).passthrough();
|
|
13567
|
+
CaseRetireReceiptSchema = external_exports.object({
|
|
13568
|
+
case_id: external_exports.string().uuid().nullable(),
|
|
13569
|
+
brand_id: external_exports.string().uuid(),
|
|
13570
|
+
agent_id: external_exports.string().uuid(),
|
|
13571
|
+
source_path: external_exports.string().min(1),
|
|
13572
|
+
command_id: external_exports.string().min(1),
|
|
13573
|
+
already_retired: external_exports.boolean(),
|
|
13574
|
+
set_retired: external_exports.boolean().optional(),
|
|
13575
|
+
publication: InvestigationPublicationReceiptSchema
|
|
13576
|
+
}).passthrough();
|
|
13577
|
+
CaseRefsReceiptSchema = external_exports.object({
|
|
13578
|
+
investigation_id: external_exports.string().uuid(),
|
|
13579
|
+
source_path: external_exports.string().min(1),
|
|
13580
|
+
operation: external_exports.enum(["attach", "detach"]),
|
|
13581
|
+
claims: external_exports.array(
|
|
13582
|
+
external_exports.object({
|
|
13583
|
+
key: external_exports.string().min(1),
|
|
13584
|
+
case_refs: external_exports.array(external_exports.string().min(1)),
|
|
13585
|
+
case_ids: external_exports.array(external_exports.string().uuid())
|
|
13586
|
+
})
|
|
13587
|
+
),
|
|
13588
|
+
cases: external_exports.array(
|
|
13589
|
+
external_exports.object({
|
|
13590
|
+
ref: external_exports.string().min(1),
|
|
13591
|
+
case_id: external_exports.string().uuid(),
|
|
13592
|
+
source_path: external_exports.string().nullable()
|
|
13593
|
+
})
|
|
13594
|
+
),
|
|
13595
|
+
publication: InvestigationPublicationReceiptSchema
|
|
13596
|
+
}).passthrough();
|
|
13395
13597
|
EvalManagementCatalogResultSchema = EvalManagementCatalogResponseSchema.extend({
|
|
13396
13598
|
scope: EvalManagementScopeSchema.optional()
|
|
13397
13599
|
});
|
|
@@ -16181,18 +16383,8 @@ async function callEvalManagement(bambooSession, call, orgId) {
|
|
|
16181
16383
|
path2 = path2.replace("{id}", encodeURIComponent(id));
|
|
16182
16384
|
delete input.id;
|
|
16183
16385
|
}
|
|
16184
|
-
const
|
|
16185
|
-
|
|
16186
|
-
"hold",
|
|
16187
|
-
"resume",
|
|
16188
|
-
"cancel",
|
|
16189
|
-
"conclude_claim",
|
|
16190
|
-
"retire_claim",
|
|
16191
|
-
"close",
|
|
16192
|
-
"reopen",
|
|
16193
|
-
"retire"
|
|
16194
|
-
].includes(action)) {
|
|
16195
|
-
input.operation = action;
|
|
16386
|
+
for (const [field, value] of Object.entries(help.server_injected ?? {})) {
|
|
16387
|
+
input[field] = value;
|
|
16196
16388
|
}
|
|
16197
16389
|
let url = `${apiBase()}${path2}`;
|
|
16198
16390
|
const init = {
|
|
@@ -16250,7 +16442,7 @@ async function callEvalManagement(bambooSession, call, orgId) {
|
|
|
16250
16442
|
}
|
|
16251
16443
|
function unknownEvalMutationOutcome(call, orgId) {
|
|
16252
16444
|
const operation = call.operation;
|
|
16253
|
-
const recovery = operation === "investigation.create" ? `Do not blindly retry. Reconcile the selected scope first with: bamboo-agents eval manage investigation.list${orgId ? ` --org ${orgId}` : ""} --input '${JSON.stringify({ brand_id: call.input.brand_id, agent_id: call.input.agent_id, search: call.input.title })}'` : "Read the scoped investigation and repository receipt before retrying.";
|
|
16445
|
+
const recovery = operation === "investigation.create" ? `Do not blindly retry. Reconcile the selected scope first with: bamboo-agents eval manage investigation.list${orgId ? ` --org ${orgId}` : ""} --input '${JSON.stringify({ brand_id: call.input.brand_id, agent_id: call.input.agent_id, search: call.input.title })}'` : operation === "case.create" ? "Do not blindly retry: a repeat create refuses with case_exists if the first landed. Read the case path in the workspace repo (or eval_cases by source_path) before retrying." : "Read the scoped investigation and repository receipt before retrying.";
|
|
16254
16446
|
return new ApiError(
|
|
16255
16447
|
`The ${operation} request received no HTTP response, so its outcome is unknown. ${recovery}`,
|
|
16256
16448
|
502,
|
|
@@ -22684,6 +22876,9 @@ function managementOutcomeLine(result, readOnly) {
|
|
|
22684
22876
|
const reason = publication.publication_error ?? publication.error;
|
|
22685
22877
|
return `Failed to publish ${result.operation}${typeof reason === "string" ? `: ${reason}` : "."}`;
|
|
22686
22878
|
}
|
|
22879
|
+
if (result.operation.startsWith("case.")) {
|
|
22880
|
+
return caseOutcomeLine(result.operation, data, publication);
|
|
22881
|
+
}
|
|
22687
22882
|
if (publication?.status === "published" && publication.projection_status === "projected") {
|
|
22688
22883
|
return `Published ${result.operation} and projected it into Tests.`;
|
|
22689
22884
|
}
|
|
@@ -22721,6 +22916,36 @@ function managementOutcomeLine(result, readOnly) {
|
|
|
22721
22916
|
}
|
|
22722
22917
|
return `Applied ${result.operation}.`;
|
|
22723
22918
|
}
|
|
22919
|
+
function caseOutcomeLine(operation, data, publication) {
|
|
22920
|
+
const status = publication?.status;
|
|
22921
|
+
const projected = publication?.projection_status === "projected";
|
|
22922
|
+
const sourcePath = typeof data.source_path === "string" ? data.source_path : "the case";
|
|
22923
|
+
if (operation === "case.attach" || operation === "case.detach") {
|
|
22924
|
+
const claims = Array.isArray(data.claims) ? data.claims.length : 0;
|
|
22925
|
+
const verb2 = operation === "case.attach" ? "Attached" : "Detached";
|
|
22926
|
+
const membership = projected ? "Tests membership is projected" : "Tests membership projection is pending";
|
|
22927
|
+
if (status === "pending")
|
|
22928
|
+
return `${verb2} case references on ${claims} claim(s); the investigation revision is pending publication and ${membership.toLowerCase()}.`;
|
|
22929
|
+
if (status === "noop")
|
|
22930
|
+
return `No change: the ${claims} named claim(s) already carried those case references.`;
|
|
22931
|
+
return `${verb2} case references on ${claims} claim(s); ${membership}. No run was scheduled.`;
|
|
22932
|
+
}
|
|
22933
|
+
if (operation === "case.retire") {
|
|
22934
|
+
if (data.already_retired === true)
|
|
22935
|
+
return `${sourcePath} was already retired; nothing was written.`;
|
|
22936
|
+
const category = data.set_retired === true ? " and its category (last case)" : "";
|
|
22937
|
+
if (status === "pending")
|
|
22938
|
+
return `Retirement of ${sourcePath}${category} is queued for publication; the projected case stays active until it merges.`;
|
|
22939
|
+
return projected ? `Retired ${sourcePath}${category}: the file is removed and the projected case is inactive.` : `Retired ${sourcePath}${category}: the file is removed, but the projected case has not been marked inactive yet.`;
|
|
22940
|
+
}
|
|
22941
|
+
const verb = operation === "case.create" ? "Authored" : "Updated";
|
|
22942
|
+
const caseId = typeof data.case_id === "string" ? ` (eval_cases ${data.case_id})` : "";
|
|
22943
|
+
if (status === "pending")
|
|
22944
|
+
return `${verb} ${sourcePath}; publication is pending review and the case is not projected yet.`;
|
|
22945
|
+
if (status === "noop")
|
|
22946
|
+
return `No change for ${sourcePath}; the published case is current.`;
|
|
22947
|
+
return projected ? `${verb} ${sourcePath} and projected it into eval_cases${caseId}. No run was scheduled.` : `${verb} ${sourcePath}; the eval_cases projection is pending.`;
|
|
22948
|
+
}
|
|
22724
22949
|
var init_eval_management2 = __esm({
|
|
22725
22950
|
"src/commands/eval-management.ts"() {
|
|
22726
22951
|
"use strict";
|
|
@@ -23676,11 +23901,11 @@ evals.command("scope").description("Resolve one organization and list its author
|
|
|
23676
23901
|
const { runEvalScope: runEvalScope2 } = await Promise.resolve().then(() => (init_eval_management2(), eval_management_exports));
|
|
23677
23902
|
await runEvalScope2(options);
|
|
23678
23903
|
});
|
|
23679
|
-
evals.command("operations").description("List the exact supported investigation and
|
|
23904
|
+
evals.command("operations").description("List the exact supported investigation, wave, and case management operations").option("--org <uuid-or-name>", "Operate in this organization (exact/unique names resolve authoritatively)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").action(async (options) => {
|
|
23680
23905
|
const { runEvalOperations: runEvalOperations2 } = await Promise.resolve().then(() => (init_eval_management2(), eval_management_exports));
|
|
23681
23906
|
await runEvalOperations2(options);
|
|
23682
23907
|
});
|
|
23683
|
-
evals.command("manage").description("Call one canonical investigation or
|
|
23908
|
+
evals.command("manage").description("Call one canonical investigation, wave, or case operation").argument("<operation>", "Exact name from `eval operations`").requiredOption("--input <json-or-@file>", "JSON object, inline or loaded from @path").option("--org <uuid-or-name>", "Operate in this organization (exact/unique names resolve authoritatively)").option("--json", "Emit a JSON envelope for agent consumption").option("--fields <list>", "Project only these dotted field paths from data (comma-separated)").option("--quiet", "Suppress human chatter (data/errors only)").option("--no-sync", "Skip the auto-sync git pull on this command").action(async (operation, options) => {
|
|
23684
23909
|
const { runEvalManage: runEvalManage2 } = await Promise.resolve().then(() => (init_eval_management2(), eval_management_exports));
|
|
23685
23910
|
await runEvalManage2({ operation, ...options });
|
|
23686
23911
|
});
|