@oxagen/cli 5.5.1-161 → 5.5.1-171

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.
Files changed (2) hide show
  1. package/oxagen.mjs +24 -20
  2. package/package.json +1 -1
package/oxagen.mjs CHANGED
@@ -32034,7 +32034,7 @@ import { readFileSync as readFileSync11 } from "node:fs";
32034
32034
  import { dirname as dirname14, resolve as resolve3 } from "node:path";
32035
32035
  import { fileURLToPath } from "node:url";
32036
32036
  function readVersion() {
32037
- if (true) return "5.5.1-161";
32037
+ if (true) return "5.5.1-171";
32038
32038
  try {
32039
32039
  const here = dirname14(fileURLToPath(import.meta.url));
32040
32040
  const pkg = JSON.parse(
@@ -60995,6 +60995,7 @@ function presentSteeringHashes(texts) {
60995
60995
  add2(item);
60996
60996
  }
60997
60997
  }
60998
+ let spanCharactersLeft = text6.length * 8;
60998
60999
  const boundaries = [];
60999
61000
  for (const match of text6.matchAll(INSTRUCTION_BOUNDARY)) {
61000
61001
  if (boundaries.length >= 128 || hashes.size >= 2e3) break;
@@ -61005,8 +61006,11 @@ function presentSteeringHashes(texts) {
61005
61006
  const from = marker.index + marker[0].length;
61006
61007
  for (let end = start + 1; end <= boundaries.length && hashes.size < 2e3; end += 1) {
61007
61008
  const to = boundaries[end]?.index ?? text6.length;
61008
- if (to - from <= MODEL_STEERING_BUDGET_TOKENS * 4)
61009
+ const characters = to - from;
61010
+ if (characters <= spanCharactersLeft) {
61011
+ spanCharactersLeft -= characters;
61009
61012
  add2(text6.slice(from, to));
61013
+ }
61010
61014
  }
61011
61015
  }
61012
61016
  }
@@ -61035,7 +61039,7 @@ function mandatorySteeringCut(manifest) {
61035
61039
  }
61036
61040
  function overBudgetAction(rendered) {
61037
61041
  if (!mandatorySteeringCut(rendered.manifest)) return null;
61038
- return rendered.over_budget ?? "stop";
61042
+ return rendered.over_budget ?? DEFAULT_STEERING_OVER_BUDGET;
61039
61043
  }
61040
61044
  function overBudgetWarning(manifest) {
61041
61045
  const cut = requiredBudgetCuts(manifest);
@@ -61050,13 +61054,12 @@ function withOverBudgetWarning(text6, manifest) {
61050
61054
 
61051
61055
  ${text6}`;
61052
61056
  }
61053
- var MODEL_STEERING_BUDGET_TOKENS, MODEL_STEERING_TIMEOUT_MS, MODEL_STEERING_MANIFEST_ATTR, MODEL_STEERING_STATUS_ATTR, MODEL_STEERING_RUN_HEADER, MODEL_STEERING_PATH, MODEL_STEERING_OVER_BUDGET_ATTR, STEERING_OVER_BUDGET_ACTIONS, steeringOverBudgetActionSchema, entrySchema2, modelSteeringManifestSchema, renderedModelSteeringSchema, modelSteeringContextSchema, INSTRUCTION_HEADING, INSTRUCTION_BULLET, INSTRUCTION_BOUNDARY, OVER_BUDGET_WARNING_PREFIX;
61057
+ var MODEL_STEERING_TIMEOUT_MS, MODEL_STEERING_MANIFEST_ATTR, MODEL_STEERING_STATUS_ATTR, MODEL_STEERING_RUN_HEADER, MODEL_STEERING_PATH, MODEL_STEERING_OVER_BUDGET_ATTR, STEERING_OVER_BUDGET_ACTIONS, steeringOverBudgetActionSchema, DEFAULT_STEERING_OVER_BUDGET, entrySchema2, modelSteeringManifestSchema, renderedModelSteeringSchema, modelSteeringContextSchema, INSTRUCTION_HEADING, INSTRUCTION_BULLET, INSTRUCTION_BOUNDARY, OVER_BUDGET_WARNING_PREFIX;
61054
61058
  var init_model_steering = __esm({
61055
61059
  "../../packages/tacho/src/model-steering.ts"() {
61056
61060
  "use strict";
61057
61061
  init_zod();
61058
61062
  init_digest();
61059
- MODEL_STEERING_BUDGET_TOKENS = 4096;
61060
61063
  MODEL_STEERING_TIMEOUT_MS = 12e3;
61061
61064
  MODEL_STEERING_MANIFEST_ATTR = "oxagen.steering_manifest";
61062
61065
  MODEL_STEERING_STATUS_ATTR = "oxagen.steering_status";
@@ -61072,6 +61075,7 @@ var init_model_steering = __esm({
61072
61075
  steeringOverBudgetActionSchema = external_exports.enum(
61073
61076
  STEERING_OVER_BUDGET_ACTIONS
61074
61077
  );
61078
+ DEFAULT_STEERING_OVER_BUDGET = "warn";
61075
61079
  entrySchema2 = external_exports.object({
61076
61080
  lineage: external_exports.string().min(1),
61077
61081
  as: external_exports.enum(["body", "index"]),
@@ -61100,13 +61104,13 @@ var init_model_steering = __esm({
61100
61104
  }).strict().optional()
61101
61105
  }).strict();
61102
61106
  renderedModelSteeringSchema = external_exports.object({
61103
- text: external_exports.string().max(MODEL_STEERING_BUDGET_TOKENS * 4),
61107
+ text: external_exports.string(),
61104
61108
  prefix_length: external_exports.number().int().nonnegative(),
61105
61109
  manifest: modelSteeringManifestSchema,
61106
61110
  /**
61107
61111
  * The workspace's choice for required steering that does not fit. The
61108
61112
  * control plane sends it only to a caller that asked for it, because an
61109
- * older recorder reads this object strictly. Absent, the caller stops.
61113
+ * older recorder reads this object strictly. Absent, the caller warns.
61110
61114
  */
61111
61115
  over_budget: steeringOverBudgetActionSchema.optional()
61112
61116
  }).strict();
@@ -78060,7 +78064,7 @@ var init_package = __esm({
78060
78064
  "package.json"() {
78061
78065
  package_default = {
78062
78066
  name: "@oxagen/cli",
78063
- version: "5.5.1-161",
78067
+ version: "5.5.1-171",
78064
78068
  description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
78065
78069
  type: "module",
78066
78070
  main: "./dist/index.js",
@@ -92774,7 +92778,7 @@ var init_work_order_shared = __esm({
92774
92778
  workRevisionSchema = external_exports.number().int().min(1);
92775
92779
  workDigestSchema = external_exports.string().regex(/^sha256:[0-9a-f]{64}$/);
92776
92780
  workHeadShaSchema = external_exports.string().regex(/^[0-9a-f]{40}$/, "a head commit is 40 lowercase hex characters");
92777
- workReasonSchema = external_exports.string().trim().min(1).max(2e3);
92781
+ workReasonSchema = external_exports.string().trim().max(2e3).default("");
92778
92782
  WORK_STEERING_MAX = 4e3;
92779
92783
  workSteeringSchema = external_exports.string().trim().max(WORK_STEERING_MAX);
92780
92784
  WORK_STEERING_MENTIONS_MAX = 20;
@@ -92840,7 +92844,9 @@ var init_work_order_shared = __esm({
92840
92844
  "declined",
92841
92845
  "duplicate",
92842
92846
  "stale",
92843
- "addressed"
92847
+ "addressed",
92848
+ "fixed",
92849
+ "shipped"
92844
92850
  ];
92845
92851
  WORK_CLOSURE_RESOLUTIONS = [
92846
92852
  ...WORK_ACTION_CLOSE_RESOLUTIONS,
@@ -109249,13 +109255,11 @@ function countTokens(text6) {
109249
109255
  function tokensForBytes(bytes) {
109250
109256
  return Math.ceil(bytes / 4);
109251
109257
  }
109252
- var DEFAULT_ALWAYS_ON_TOKENS, DEFAULT_WORKSPACE_DEFINITION_BUDGET, DEFAULT_SERVER_DEFINITION_BUDGET, ALWAYS_ON_BODY_WORDS_WARN, SKILL_LINES_WARN, FOLDER_FILES_WARN, RECORD_BYTES_MAX, DESCRIPTION_MAX, SKILL_DESCRIPTION_MAX;
109258
+ var DEFAULT_WORKSPACE_DEFINITION_BUDGET, DEFAULT_SERVER_DEFINITION_BUDGET, ALWAYS_ON_BODY_WORDS_WARN, SKILL_LINES_WARN, FOLDER_FILES_WARN, RECORD_BYTES_MAX, DESCRIPTION_MAX, SKILL_DESCRIPTION_MAX;
109253
109259
  var init_tokens = __esm({
109254
109260
  "../../packages/oxagen/src/steering-repo/tokens.ts"() {
109255
109261
  "use strict";
109256
- init_src4();
109257
109262
  init_skill_folder();
109258
- DEFAULT_ALWAYS_ON_TOKENS = LARGEST_PREFIX_BUDGET_TOKENS;
109259
109263
  DEFAULT_WORKSPACE_DEFINITION_BUDGET = 2e4;
109260
109264
  DEFAULT_SERVER_DEFINITION_BUDGET = 8e3;
109261
109265
  ALWAYS_ON_BODY_WORDS_WARN = 120;
@@ -110736,7 +110740,7 @@ var init_governance = __esm({
110736
110740
  mode: governanceModeSchema,
110737
110741
  steering: external_exports.object({
110738
110742
  always_on_tokens: external_exports.union([external_exports.number().int().positive(), external_exports.literal("off")]).optional().describe(
110739
- "The always-on budget per code repository, or off. Unset inherits Oxagen's default, the largest harness hook limit. A budget above that limit fails the budget check."
110743
+ "The always-on budget per code repository, or off for no limit. Unset means no limit. Harness hook payload limits still apply."
110740
110744
  ),
110741
110745
  over_budget: steeringOverBudgetActionSchema.optional().describe(
110742
110746
  "What a model call does when the workspace's required steering does not fit the steering budget. none: send it with the steering that fits. recorded: send it and mark the run. warn: send it, mark the run, and warn the person. stop: refuse it until the steering fits. Unset is warn."
@@ -112132,7 +112136,7 @@ function alwaysOnBudget(tree) {
112132
112136
  if (value === "off") return "off";
112133
112137
  if (isPositiveInteger(value))
112134
112138
  return { tokens: value, source: "governance.toml" };
112135
- return { tokens: DEFAULT_ALWAYS_ON_TOKENS, source: "Oxagen's default" };
112139
+ return "off";
112136
112140
  }
112137
112141
  function definitionBudget(tree) {
112138
112142
  const tools = parseTomlLoose(tree?.get(WORKSPACE_TOML_PATH))?.tools;
@@ -112160,13 +112164,13 @@ function budgetCeiling(budget, line) {
112160
112164
  );
112161
112165
  return find2({
112162
112166
  rule: "always-on-ceiling",
112163
- severity: "error",
112167
+ severity: "warning",
112164
112168
  path: GOVERNANCE_TOML_PATH,
112165
112169
  line,
112166
112170
  field: "steering.always_on_tokens",
112167
- message: `always_on_tokens is ${formatCount2(budget.tokens)}, above the ${limit} tokens ${harnessNames(at2)} take from one hook answer (${chars} characters). No harness would hand an agent the extra text.`,
112168
- expected: `At most ${limit} tokens, the largest harness hook limit.`,
112169
- fix: `Set always_on_tokens to ${limit} or less in this PR, or remove it to inherit Oxagen's default, which is that limit.`,
112171
+ message: `always_on_tokens is ${formatCount2(budget.tokens)}, above the ${limit} tokens ${harnessNames(at2)} take from one hook answer (${chars} characters). Hooks cannot carry all of this text; model requests use the configured token budget.`,
112172
+ expected: `Hooks carry at most ${limit} tokens; model requests can carry more.`,
112173
+ fix: `Use ${limit} tokens or less to fit every record in a hook answer, or keep this budget for model requests. Remove the budget for no token limit.`,
112170
112174
  detail: {
112171
112175
  budget: budget.tokens,
112172
112176
  budget_source: budget.source,
@@ -112219,7 +112223,7 @@ function alwaysOnPart(env) {
112219
112223
  if (budget === "off") {
112220
112224
  return {
112221
112225
  findings: [],
112222
- notes: ["governance.toml turns the always-on budget off."]
112226
+ notes: ["No always-on token limit is set."]
112223
112227
  };
112224
112228
  }
112225
112229
  const budgetMoved = env.base !== null && !sameBudget(budget, alwaysOnBudget(env.base));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxagen/cli",
3
- "version": "5.5.1-161",
3
+ "version": "5.5.1-171",
4
4
  "description": "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
5
5
  "type": "module",
6
6
  "bin": {