@oxagen/cli 5.5.1-165 → 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.
- package/oxagen.mjs +20 -18
- 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-
|
|
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
|
-
|
|
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 ??
|
|
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
|
|
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()
|
|
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
|
|
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-
|
|
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",
|
|
@@ -109251,13 +109255,11 @@ function countTokens(text6) {
|
|
|
109251
109255
|
function tokensForBytes(bytes) {
|
|
109252
109256
|
return Math.ceil(bytes / 4);
|
|
109253
109257
|
}
|
|
109254
|
-
var
|
|
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;
|
|
109255
109259
|
var init_tokens = __esm({
|
|
109256
109260
|
"../../packages/oxagen/src/steering-repo/tokens.ts"() {
|
|
109257
109261
|
"use strict";
|
|
109258
|
-
init_src4();
|
|
109259
109262
|
init_skill_folder();
|
|
109260
|
-
DEFAULT_ALWAYS_ON_TOKENS = LARGEST_PREFIX_BUDGET_TOKENS;
|
|
109261
109263
|
DEFAULT_WORKSPACE_DEFINITION_BUDGET = 2e4;
|
|
109262
109264
|
DEFAULT_SERVER_DEFINITION_BUDGET = 8e3;
|
|
109263
109265
|
ALWAYS_ON_BODY_WORDS_WARN = 120;
|
|
@@ -110738,7 +110740,7 @@ var init_governance = __esm({
|
|
|
110738
110740
|
mode: governanceModeSchema,
|
|
110739
110741
|
steering: external_exports.object({
|
|
110740
110742
|
always_on_tokens: external_exports.union([external_exports.number().int().positive(), external_exports.literal("off")]).optional().describe(
|
|
110741
|
-
"The always-on budget per code repository, or off
|
|
110743
|
+
"The always-on budget per code repository, or off for no limit. Unset means no limit. Harness hook payload limits still apply."
|
|
110742
110744
|
),
|
|
110743
110745
|
over_budget: steeringOverBudgetActionSchema.optional().describe(
|
|
110744
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."
|
|
@@ -112134,7 +112136,7 @@ function alwaysOnBudget(tree) {
|
|
|
112134
112136
|
if (value === "off") return "off";
|
|
112135
112137
|
if (isPositiveInteger(value))
|
|
112136
112138
|
return { tokens: value, source: "governance.toml" };
|
|
112137
|
-
return
|
|
112139
|
+
return "off";
|
|
112138
112140
|
}
|
|
112139
112141
|
function definitionBudget(tree) {
|
|
112140
112142
|
const tools = parseTomlLoose(tree?.get(WORKSPACE_TOML_PATH))?.tools;
|
|
@@ -112162,13 +112164,13 @@ function budgetCeiling(budget, line) {
|
|
|
112162
112164
|
);
|
|
112163
112165
|
return find2({
|
|
112164
112166
|
rule: "always-on-ceiling",
|
|
112165
|
-
severity: "
|
|
112167
|
+
severity: "warning",
|
|
112166
112168
|
path: GOVERNANCE_TOML_PATH,
|
|
112167
112169
|
line,
|
|
112168
112170
|
field: "steering.always_on_tokens",
|
|
112169
|
-
message: `always_on_tokens is ${formatCount2(budget.tokens)}, above the ${limit} tokens ${harnessNames(at2)} take from one hook answer (${chars} characters).
|
|
112170
|
-
expected: `
|
|
112171
|
-
fix: `
|
|
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.`,
|
|
112172
112174
|
detail: {
|
|
112173
112175
|
budget: budget.tokens,
|
|
112174
112176
|
budget_source: budget.source,
|
|
@@ -112221,7 +112223,7 @@ function alwaysOnPart(env) {
|
|
|
112221
112223
|
if (budget === "off") {
|
|
112222
112224
|
return {
|
|
112223
112225
|
findings: [],
|
|
112224
|
-
notes: ["
|
|
112226
|
+
notes: ["No always-on token limit is set."]
|
|
112225
112227
|
};
|
|
112226
112228
|
}
|
|
112227
112229
|
const budgetMoved = env.base !== null && !sameBudget(budget, alwaysOnBudget(env.base));
|
package/package.json
CHANGED