bamboo-agents 0.1.11 → 0.1.12-dev.112.7287623

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 CHANGED
@@ -1 +1 @@
1
- 0.1.11
1
+ 0.1.12-dev.112.7287623
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.11";
3040
+ VERSION = "0.1.12-dev.112.7287623";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -12757,6 +12757,28 @@ var init_inbox_apply_revision = __esm({
12757
12757
  }
12758
12758
  });
12759
12759
 
12760
+ // ../../src/lib/api-contracts/cli/investigation-review.ts
12761
+ var InvestigationReviewDecisionSchema;
12762
+ var init_investigation_review = __esm({
12763
+ "../../src/lib/api-contracts/cli/investigation-review.ts"() {
12764
+ init_zod();
12765
+ InvestigationReviewDecisionSchema = external_exports.object({
12766
+ operation: external_exports.enum(["conclude_claim", "block_claim", "retire_claim", "close", "reopen", "retire"]),
12767
+ conclusion: external_exports.enum(["supported", "partial", "contradicted", "insufficient_evidence"]).optional(),
12768
+ verdict_tier: external_exports.enum(["eyeballed", "tested", "reviewed"]).optional(),
12769
+ decision: external_exports.enum(["merge", "more_evidence", "drop"]).optional(),
12770
+ next_action: external_exports.string().trim().min(1).max(5e3).optional()
12771
+ }).superRefine((value, ctx) => {
12772
+ if (value.operation === "conclude_claim" && (!value.conclusion || !value.verdict_tier))
12773
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, message: "A conclusion and verdict tier are required." });
12774
+ if (value.operation === "conclude_claim" && value.decision === "more_evidence" && !value.next_action)
12775
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["next_action"], message: "More evidence requires a next action." });
12776
+ if (value.operation === "block_claim" && !value.next_action)
12777
+ ctx.addIssue({ code: external_exports.ZodIssueCode.custom, path: ["next_action"], message: "A blocker requires the next action that can unblock it." });
12778
+ });
12779
+ }
12780
+ });
12781
+
12760
12782
  // ../../src/lib/api-contracts/cli/inbox-management.ts
12761
12783
  function inboxSourceVersionsMatch(current, reviewed) {
12762
12784
  if (typeof current !== "string" || typeof reviewed !== "string") return current === reviewed;
@@ -12767,6 +12789,7 @@ var InboxUtcTimestampSchema, InboxOperationSchema, InboxManageOperationSchema, I
12767
12789
  var init_inbox_management = __esm({
12768
12790
  "../../src/lib/api-contracts/cli/inbox-management.ts"() {
12769
12791
  init_zod();
12792
+ init_investigation_review();
12770
12793
  InboxUtcTimestampSchema = external_exports.string().datetime({ offset: true }).refine(
12771
12794
  (value) => /(?:Z|\+00:00)$/i.test(value),
12772
12795
  "source version must use UTC (Z or +00:00)"
@@ -13471,7 +13494,8 @@ var init_inbox_management = __esm({
13471
13494
  description: "Execute one server-advertised FDE action command",
13472
13495
  inputs: {
13473
13496
  ...lifecycleMutationInputs,
13474
- required: [...lifecycleMutationInputs.required, "command"]
13497
+ required: [...lifecycleMutationInputs.required, "command"],
13498
+ optional: [...lifecycleMutationInputs.optional, "investigation_decision"]
13475
13499
  },
13476
13500
  approval_required: true,
13477
13501
  side_effect: "applies the selected legal FDE action transition",
@@ -13796,6 +13820,7 @@ var init_inbox_management = __esm({
13796
13820
  "reject"
13797
13821
  ]),
13798
13822
  reason: external_exports.string().trim().min(3).max(1e3),
13823
+ investigation_decision: InvestigationReviewDecisionSchema.optional(),
13799
13824
  approved: external_exports.literal(true),
13800
13825
  approved_effect: external_exports.literal("apply_server_advertised_fde_action_command"),
13801
13826
  approved_reversible: external_exports.literal(true)
@@ -14796,6 +14821,7 @@ function parseEvalManagementOperationData(call, data, selectedOrgId) {
14796
14821
  parsed = InvestigationControlReceiptSchema.parse(data);
14797
14822
  else if ([
14798
14823
  "investigation.conclude_claim",
14824
+ "investigation.retire_claim",
14799
14825
  "investigation.close",
14800
14826
  "investigation.reopen",
14801
14827
  "investigation.retire"
@@ -14824,7 +14850,7 @@ function parseEvalManagementOperationData(call, data, selectedOrgId) {
14824
14850
  if (receipt.operation !== action) mismatch("operation");
14825
14851
  if (inputId && !sameId(receipt.investigation_id, inputId))
14826
14852
  mismatch("investigation_id");
14827
- } else if (operation === "investigation.conclude_claim" || operation === "investigation.close" || operation === "investigation.reopen" || operation === "investigation.retire") {
14853
+ } else if (operation === "investigation.conclude_claim" || operation === "investigation.retire_claim" || operation === "investigation.close" || operation === "investigation.reopen" || operation === "investigation.retire") {
14828
14854
  const receipt = parsed;
14829
14855
  if (receipt.operation !== action) mismatch("operation");
14830
14856
  if (inputId && !sameId(receipt.investigation_id, inputId))
@@ -14851,7 +14877,7 @@ function parseEvalManagementOperationData(call, data, selectedOrgId) {
14851
14877
  }
14852
14878
  return parsed;
14853
14879
  }
14854
- var EvalManagementOperationSchema, EvalManagementBindingSchema, EvalManagementInputHelpSchema, EVAL_MANAGEMENT_INPUTS, common2, EVAL_MANAGEMENT_BINDINGS, EvalManagementCatalogResponseSchema, EvalManagementCallSchema, EvalManagementScopeSchema, InvestigationPublicationReceiptSchema, InvestigationAuthoringDataSchema, InvestigationControlReceiptSchema, InvestigationDecisionReceiptSchema, InvestigationWaveMemberReceiptSchema, InvestigationWaveCreateReceiptSchema, InvestigationWaveUpdateReceiptSchema, InvestigationWaveScheduleReceiptSchema, EvalManagementCatalogResultSchema, EvalManagementResultSchema;
14880
+ var EvalManagementOperationSchema, EvalManagementBindingSchema, EvalManagementCatalogBindingSchema, EvalManagementInputHelpSchema, EVAL_MANAGEMENT_INPUTS, common2, EVAL_MANAGEMENT_BINDINGS, EvalManagementCatalogResponseSchema, EvalManagementCallSchema, EvalManagementScopeSchema, InvestigationPublicationReceiptSchema, InvestigationAuthoringDataSchema, InvestigationControlReceiptSchema, InvestigationDecisionReceiptSchema, InvestigationWaveMemberReceiptSchema, InvestigationWaveCreateReceiptSchema, InvestigationWaveUpdateReceiptSchema, InvestigationWaveScheduleReceiptSchema, EvalManagementCatalogResultSchema, EvalManagementResultSchema;
14855
14881
  var init_eval_management = __esm({
14856
14882
  "../../src/lib/api-contracts/cli/eval-management.ts"() {
14857
14883
  init_zod();
@@ -14865,6 +14891,7 @@ var init_eval_management = __esm({
14865
14891
  "investigation.resume",
14866
14892
  "investigation.cancel",
14867
14893
  "investigation.conclude_claim",
14894
+ "investigation.retire_claim",
14868
14895
  "investigation.close",
14869
14896
  "investigation.reopen",
14870
14897
  "investigation.retire",
@@ -14887,6 +14914,9 @@ var init_eval_management = __esm({
14887
14914
  minimum_cli_version: external_exports.string(),
14888
14915
  explicit_org_scope: external_exports.boolean()
14889
14916
  });
14917
+ EvalManagementCatalogBindingSchema = EvalManagementBindingSchema.extend({
14918
+ operation: external_exports.string().min(1)
14919
+ });
14890
14920
  EvalManagementInputHelpSchema = external_exports.object({
14891
14921
  required: external_exports.array(external_exports.string()),
14892
14922
  optional: external_exports.array(external_exports.string()),
@@ -14949,6 +14979,11 @@ var init_eval_management = __esm({
14949
14979
  optional: ["decision", "next_action", "expected_source_sha"],
14950
14980
  server_injected: { operation: "conclude_claim" }
14951
14981
  },
14982
+ "investigation.retire_claim": {
14983
+ required: ["id", "brand_id", "command_id", "claim_key", "body"],
14984
+ optional: ["expected_source_sha"],
14985
+ server_injected: { operation: "retire_claim" }
14986
+ },
14952
14987
  "investigation.close": {
14953
14988
  required: ["id", "brand_id", "command_id", "body"],
14954
14989
  optional: ["expected_source_sha"],
@@ -15086,6 +15121,17 @@ var init_eval_management = __esm({
15086
15121
  minimum_cli_version: "0.1.11",
15087
15122
  explicit_org_scope: true
15088
15123
  },
15124
+ {
15125
+ ...common2,
15126
+ operation: "investigation.retire_claim",
15127
+ description: "Retire an unrun claim with an FDE-authored reason",
15128
+ method: "POST",
15129
+ path: "/api/v1/eval/investigations/{id}/decisions",
15130
+ side_effect: "append-only FDE judgment plus repo and Tests lifecycle update",
15131
+ receipt: "decision, judgment, publication, and projection receipt",
15132
+ minimum_cli_version: "0.1.11",
15133
+ explicit_org_scope: true
15134
+ },
15089
15135
  {
15090
15136
  ...common2,
15091
15137
  operation: "investigation.close",
@@ -15175,11 +15221,8 @@ var init_eval_management = __esm({
15175
15221
  ];
15176
15222
  EvalManagementCatalogResponseSchema = external_exports.object({
15177
15223
  contract_version: external_exports.literal(1),
15178
- bindings: external_exports.array(EvalManagementBindingSchema),
15179
- inputs: external_exports.record(
15180
- EvalManagementOperationSchema,
15181
- EvalManagementInputHelpSchema
15182
- ),
15224
+ bindings: external_exports.array(EvalManagementCatalogBindingSchema),
15225
+ inputs: external_exports.record(external_exports.string(), EvalManagementInputHelpSchema),
15183
15226
  related_cli_commands: external_exports.array(external_exports.string())
15184
15227
  });
15185
15228
  EvalManagementCallSchema = external_exports.object({
@@ -15246,7 +15289,13 @@ var init_eval_management = __esm({
15246
15289
  id: external_exports.string().uuid(),
15247
15290
  judgment_id: external_exports.string().uuid(),
15248
15291
  investigation_id: external_exports.string().uuid(),
15249
- operation: external_exports.enum(["conclude_claim", "close", "reopen", "retire"]),
15292
+ operation: external_exports.enum([
15293
+ "conclude_claim",
15294
+ "retire_claim",
15295
+ "close",
15296
+ "reopen",
15297
+ "retire"
15298
+ ]),
15250
15299
  publication_status: external_exports.enum(["pending", "published", "failed"]),
15251
15300
  source_sha: external_exports.string().nullable().optional(),
15252
15301
  pr_url: external_exports.string().url().nullable().optional(),
@@ -15988,6 +16037,7 @@ async function callEvalManagement(bambooSession, call, orgId) {
15988
16037
  "resume",
15989
16038
  "cancel",
15990
16039
  "conclude_claim",
16040
+ "retire_claim",
15991
16041
  "close",
15992
16042
  "reopen",
15993
16043
  "retire"
@@ -20730,7 +20780,7 @@ async function runInboxManage(options) {
20730
20780
  { code: "organization_scope_mismatch" }
20731
20781
  );
20732
20782
  const suppliedVersion = input.source_version ?? input.subject_revision;
20733
- if (!isProposal && !inboxSourceVersionsMatch(preview.source_version, suppliedVersion))
20783
+ if (!isProposal && !isFdeAction && !inboxSourceVersionsMatch(preview.source_version, suppliedVersion))
20734
20784
  throw Object.assign(
20735
20785
  new Error(
20736
20786
  `The reviewed source revision ${String(suppliedVersion)} is stale; current revision is ${preview.source_version}.`
@@ -22326,7 +22376,9 @@ function managementOutcomeLine(result, readOnly) {
22326
22376
  if (["hold", "resume", "cancel"].includes(lifecycle ?? "")) {
22327
22377
  return `${lifecycle === "hold" ? "Held" : lifecycle === "resume" ? "Resumed" : "Canceled pending work for"} the investigation.`;
22328
22378
  }
22329
- if (["conclude_claim", "close", "reopen", "retire"].includes(lifecycle ?? "")) {
22379
+ if (["conclude_claim", "retire_claim", "close", "reopen", "retire"].includes(
22380
+ lifecycle ?? ""
22381
+ )) {
22330
22382
  const publicationStatus = data.publication_status;
22331
22383
  return publicationStatus === "pending" ? `Recorded ${result.operation}; repository publication is pending.` : `Published ${result.operation} with its decision receipt.`;
22332
22384
  }