@cleocode/adapters 2026.9.21 → 2026.9.23

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/index.js CHANGED
@@ -809,7 +809,7 @@ var init_acceptance_gate_schema = __esm({
809
809
  message: "Result cannot precede input capture"
810
810
  });
811
811
  const executable = ["test", "command", "lint"].includes(result.kind);
812
- if (executable && !binding.invocation)
812
+ if (executable && !binding.invocation && result.result !== "error")
813
813
  context.addIssue({
814
814
  code: "custom",
815
815
  path: ["binding", "invocation"],
@@ -3575,12 +3575,21 @@ var init_operations_registry = __esm({
3575
3575
  gateway: "query",
3576
3576
  domain: "tasks",
3577
3577
  operation: "history",
3578
- description: "Show task work history (time tracked per task)",
3578
+ description: "Show task work history; with taskId, the task audit trail; with ranking, who changed its priority/severity/kind/depends and why (T12693)",
3579
3579
  tier: 1,
3580
3580
  idempotent: true,
3581
3581
  sessionRequired: false,
3582
3582
  requiredParams: [],
3583
- params: []
3583
+ params: [
3584
+ { name: "taskId", type: "string", required: false, description: "Task to show history for" },
3585
+ { name: "limit", type: "number", required: false, description: "Maximum entries" },
3586
+ {
3587
+ name: "ranking",
3588
+ type: "boolean",
3589
+ required: false,
3590
+ description: "Only ranking-input changes (actor, session, reason, before/after)"
3591
+ }
3592
+ ]
3584
3593
  },
3585
3594
  {
3586
3595
  gateway: "query",
@@ -6075,6 +6084,32 @@ var init_operations_registry = __esm({
6075
6084
  ],
6076
6085
  outputSchema: OUTPUT_CONTRACTS["tasks.assignee"]
6077
6086
  },
6087
+ {
6088
+ gateway: "mutate",
6089
+ domain: "tasks",
6090
+ operation: "ranking.revert",
6091
+ description: "tasks.ranking.revert (mutate) \u2014 undo one recorded ranking change (priority/severity/kind/depends) as a new audited change (T12693, D11161)",
6092
+ tier: 1,
6093
+ idempotent: false,
6094
+ sessionRequired: false,
6095
+ requiredParams: ["entryId"],
6096
+ params: [
6097
+ {
6098
+ name: "entryId",
6099
+ type: "string",
6100
+ required: true,
6101
+ description: "ranking_changed audit row id (cleo history ranking <taskId>)",
6102
+ cli: { positional: true }
6103
+ },
6104
+ { name: "reason", type: "string", required: false, description: "Why it is reverted" },
6105
+ {
6106
+ name: "force",
6107
+ type: "boolean",
6108
+ required: false,
6109
+ description: "Revert even though a field changed again since"
6110
+ }
6111
+ ]
6112
+ },
6078
6113
  {
6079
6114
  gateway: "mutate",
6080
6115
  domain: "tasks",
@@ -10998,7 +11033,7 @@ var init_operations_registry = __esm({
10998
11033
  type: "string",
10999
11034
  required: false,
11000
11035
  enum: DOCS_LIFECYCLE_STATUSES,
11001
- description: `Override the new lifecycle status. Defaults to "draft" on every update. Valid: ${DOCS_LIFECYCLE_STATUSES.join("|")}.`
11036
+ description: `Override the new lifecycle status. Defaults to "draft" on every update. Alone (no file or content) it changes only the lifecycle status. Valid: ${DOCS_LIFECYCLE_STATUSES.join("|")}.`
11002
11037
  },
11003
11038
  {
11004
11039
  name: "dryRun",
@@ -13358,11 +13393,13 @@ var init_evidence_atom_schema = __esm({
13358
13393
  });
13359
13394
  prAtomSchema = z10.object({
13360
13395
  kind: z10.literal("pr"),
13361
- prNumber: z10.number().int().positive("pr atom requires a positive integer PR number")
13396
+ prNumber: z10.number().int().positive("pr atom requires a positive integer PR number"),
13397
+ componentPrNumber: z10.number().int().positive().optional()
13362
13398
  });
13363
13399
  ciAtomSchema = z10.object({
13364
13400
  kind: z10.literal("ci"),
13365
- prNumber: z10.number().int().positive("ci atom requires a positive integer PR number")
13401
+ prNumber: z10.number().int().positive("ci atom requires a positive integer PR number"),
13402
+ componentPrNumber: z10.number().int().positive().optional()
13366
13403
  });
13367
13404
  locDropAtomSchema = z10.object({
13368
13405
  kind: z10.literal("loc-drop"),
@@ -13413,7 +13450,10 @@ var init_evidence_atom_schema = __esm({
13413
13450
  ["commit", "note"],
13414
13451
  ["decision", "files"],
13415
13452
  ["decision", "note"],
13416
- ["pr", "files"]
13453
+ ["pr", "files"],
13454
+ // T12689: a deletion-only PR (no bytes to hash). Contextual validation
13455
+ // accepts this only when every change the PR made is a deletion.
13456
+ ["pr", "note"]
13417
13457
  ]
13418
13458
  },
13419
13459
  testsPassed: { oneOf: [["test-run"], ["tool"], ["ci"]] },
@@ -17257,7 +17297,7 @@ var init_collection_keys = __esm({
17257
17297
 
17258
17298
  // packages/contracts/src/decide.ts
17259
17299
  import { z as z24 } from "zod";
17260
- var DECISION_QUESTION_TYPES, DECISION_OUTCOME_SOURCES, DECISION_REQUEST_LIMITS, decisionQuestionTypeSchema, decisionOutcomeSourceSchema, decisionInstructionsSchema, unitIntervalSchema, decisionStateSchema, noulDecisionQuestionSchema, choiceDecisionQuestionSchema, scoreDecisionQuestionSchema, decisionQuestionSchema, decisionRequestSchema, noulDecisionAnswerSchema, choiceDecisionAnswerSchema, scoreDecisionAnswerSchema, decisionAnswerSchema, decisionOutcomeSchema, decisionProviderConfigSchema;
17300
+ var DECISION_QUESTION_TYPES, DECISION_OUTCOME_SOURCES, DECISION_REQUEST_LIMITS, DECISION_PROVIDER_KINDS, decisionQuestionTypeSchema, decisionOutcomeSourceSchema, decisionInstructionsSchema, unitIntervalSchema, decisionStateSchema, noulDecisionQuestionSchema, choiceDecisionQuestionSchema, scoreDecisionQuestionSchema, decisionQuestionSchema, decisionRequestSchema, noulDecisionAnswerSchema, choiceDecisionAnswerSchema, scoreDecisionAnswerSchema, decisionAnswerSchema, decisionOutcomeSchema, decisionProviderKindSchema, decisionProviderConfigSchema;
17261
17301
  var init_decide = __esm({
17262
17302
  "packages/contracts/src/decide.ts"() {
17263
17303
  "use strict";
@@ -17281,6 +17321,7 @@ var init_decide = __esm({
17281
17321
  /** Maximum number of levels on a `score` question's scale. */
17282
17322
  maxScoreLevels: 10
17283
17323
  };
17324
+ DECISION_PROVIDER_KINDS = ["layahost", "jev"];
17284
17325
  decisionQuestionTypeSchema = z24.enum(DECISION_QUESTION_TYPES);
17285
17326
  decisionOutcomeSourceSchema = z24.enum(DECISION_OUTCOME_SOURCES);
17286
17327
  decisionInstructionsSchema = z24.union([z24.string(), z24.record(z24.string(), z24.json())]);
@@ -17318,6 +17359,8 @@ var init_decide = __esm({
17318
17359
  ]);
17319
17360
  decisionRequestSchema = z24.object({
17320
17361
  model: z24.string().min(1).optional(),
17362
+ lang: z24.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/).optional(),
17363
+ cache: z24.boolean().optional(),
17321
17364
  state: decisionStateSchema,
17322
17365
  questions: z24.record(z24.string().min(1), decisionQuestionSchema).refine(
17323
17366
  (questions) => {
@@ -17358,14 +17401,26 @@ var init_decide = __esm({
17358
17401
  requestId: z24.string().min(1).optional(),
17359
17402
  latencyMs: z24.number().nonnegative(),
17360
17403
  costUsd: z24.number().nonnegative().optional(),
17404
+ costMicros: z24.number().int().nonnegative().optional(),
17405
+ balanceMicros: z24.number().int().optional(),
17406
+ checkpoint: z24.string().min(1).optional(),
17361
17407
  inputTokens: z24.number().int().nonnegative().optional()
17362
17408
  });
17409
+ decisionProviderKindSchema = z24.enum(DECISION_PROVIDER_KINDS);
17363
17410
  decisionProviderConfigSchema = z24.object({
17364
- baseUrl: z24.url()
17411
+ baseUrl: z24.url(),
17412
+ provider: decisionProviderKindSchema.optional()
17365
17413
  });
17366
17414
  }
17367
17415
  });
17368
17416
 
17417
+ // packages/contracts/src/decide-sites.ts
17418
+ var init_decide_sites = __esm({
17419
+ "packages/contracts/src/decide-sites.ts"() {
17420
+ "use strict";
17421
+ }
17422
+ });
17423
+
17369
17424
  // packages/contracts/src/task-id.ts
17370
17425
  var init_task_id = __esm({
17371
17426
  "packages/contracts/src/task-id.ts"() {
@@ -17447,6 +17502,7 @@ var init_src = __esm({
17447
17502
  init_caamp_markers();
17448
17503
  init_collection_keys();
17449
17504
  init_decide();
17505
+ init_decide_sites();
17450
17506
  init_task_id();
17451
17507
  }
17452
17508
  });