@oxagen/cli 2.1.4-975 → 2.1.4
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 +26 -11
- package/package.json +1 -1
package/oxagen.mjs
CHANGED
|
@@ -25777,7 +25777,7 @@ import { readFileSync as readFileSync10 } from "node:fs";
|
|
|
25777
25777
|
import { dirname as dirname9, resolve as resolve3 } from "node:path";
|
|
25778
25778
|
import { fileURLToPath } from "node:url";
|
|
25779
25779
|
function readVersion() {
|
|
25780
|
-
if (true) return "2.1.4
|
|
25780
|
+
if (true) return "2.1.4";
|
|
25781
25781
|
try {
|
|
25782
25782
|
const here = dirname9(fileURLToPath(import.meta.url));
|
|
25783
25783
|
const pkg = JSON.parse(
|
|
@@ -44245,11 +44245,16 @@ function invocationToolUseId(raw, input, record) {
|
|
|
44245
44245
|
return { ...raw, tool_use_id: id2 };
|
|
44246
44246
|
}
|
|
44247
44247
|
function deliversMessages(harness, hookEventName) {
|
|
44248
|
-
if (harness === "stella"
|
|
44249
|
-
if (harness === "cursor")
|
|
44248
|
+
if (harness === "stella" || harness === "cursor")
|
|
44250
44249
|
return hookEventName === "SessionStart" || hookEventName === "Stop" || hookEventName === "PreToolUse";
|
|
44251
44250
|
return MESSAGE_BOUNDARIES.has(hookEventName);
|
|
44252
44251
|
}
|
|
44252
|
+
function refusesForSteer(harness, messages) {
|
|
44253
|
+
if (messages.some((m) => m.deliveryMode === "interrupt")) return "interrupt";
|
|
44254
|
+
if (harness === "stella" && messages.some((m) => m.deliveryMode === "next_step"))
|
|
44255
|
+
return "next_step";
|
|
44256
|
+
return void 0;
|
|
44257
|
+
}
|
|
44253
44258
|
function answerInTime(deps, now) {
|
|
44254
44259
|
return deps.answerBy === void 0 || now + DRAIN_ANSWER_MARGIN_MS <= deps.answerBy;
|
|
44255
44260
|
}
|
|
@@ -44850,10 +44855,9 @@ async function routeHook(raw, env, deps, replay, harness, agent, hookId) {
|
|
|
44850
44855
|
let evaluation = decided.evaluation;
|
|
44851
44856
|
if (replay === void 0 && evaluation.decision === "deny" && evaluation.reason_code === "session_paused" && record.control.pauseEffect === void 0)
|
|
44852
44857
|
record.control.pauseEffect = "refused";
|
|
44853
|
-
|
|
44854
|
-
|
|
44855
|
-
|
|
44856
|
-
const lead = "Your Oxagen operator interrupted this step. ";
|
|
44858
|
+
const refusal = evaluation.decision === "deny" ? void 0 : refusesForSteer(record.harness, record.control.messages);
|
|
44859
|
+
if (refusal !== void 0) {
|
|
44860
|
+
const lead = STEER_REFUSAL_LEAD[refusal];
|
|
44857
44861
|
const texts = drainMidTurn(
|
|
44858
44862
|
input,
|
|
44859
44863
|
record,
|
|
@@ -44869,7 +44873,7 @@ async function routeHook(raw, env, deps, replay, harness, agent, hookId) {
|
|
|
44869
44873
|
decision: "deny",
|
|
44870
44874
|
evaluated: "deny",
|
|
44871
44875
|
source: "human",
|
|
44872
|
-
reason_code:
|
|
44876
|
+
reason_code: `steer_${refusal}`,
|
|
44873
44877
|
reason: reason3
|
|
44874
44878
|
};
|
|
44875
44879
|
}
|
|
@@ -45128,7 +45132,7 @@ function recallView(record) {
|
|
|
45128
45132
|
}
|
|
45129
45133
|
};
|
|
45130
45134
|
}
|
|
45131
|
-
var CONTAINMENT_REQUIRED_REASON, MESSAGE_BOUNDARIES, RESUMED_TEXT, ADDITIONAL_CONTEXT_MAX_CHARS, CONTEXT_JOINER, DRAIN_ANSWER_MARGIN_MS, WAKE_LEAD, TOOL_CALL_HOOK_EVENTS, CREDENTIAL_BASIS_READ_ERROR_ATTR, MAX_BASIS_READ_ERROR_CHARS, RECALL_HEADING, FILE_WRITING_TOOLS, recallDirs;
|
|
45135
|
+
var CONTAINMENT_REQUIRED_REASON, MESSAGE_BOUNDARIES, STEER_REFUSAL_LEAD, RESUMED_TEXT, ADDITIONAL_CONTEXT_MAX_CHARS, CONTEXT_JOINER, DRAIN_ANSWER_MARGIN_MS, WAKE_LEAD, TOOL_CALL_HOOK_EVENTS, CREDENTIAL_BASIS_READ_ERROR_ATTR, MAX_BASIS_READ_ERROR_CHARS, RECALL_HEADING, FILE_WRITING_TOOLS, recallDirs;
|
|
45132
45136
|
var init_hook_handler = __esm({
|
|
45133
45137
|
"../../packages/tacho/src/collector/hook-handler.ts"() {
|
|
45134
45138
|
"use strict";
|
|
@@ -45156,6 +45160,10 @@ var init_hook_handler = __esm({
|
|
|
45156
45160
|
"PostToolUseFailure",
|
|
45157
45161
|
"Stop"
|
|
45158
45162
|
]);
|
|
45163
|
+
STEER_REFUSAL_LEAD = {
|
|
45164
|
+
interrupt: "Your Oxagen operator interrupted this step. ",
|
|
45165
|
+
next_step: "This call did not run. Your Oxagen operator sent a message to read first: "
|
|
45166
|
+
};
|
|
45159
45167
|
RESUMED_TEXT = "Resumed by the operator. Continue the task.";
|
|
45160
45168
|
ADDITIONAL_CONTEXT_MAX_CHARS = hookAnswerMaxChars(void 0);
|
|
45161
45169
|
CONTEXT_JOINER = "\n\n";
|
|
@@ -60286,7 +60294,7 @@ var init_package = __esm({
|
|
|
60286
60294
|
"package.json"() {
|
|
60287
60295
|
package_default = {
|
|
60288
60296
|
name: "@oxagen/cli",
|
|
60289
|
-
version: "2.1.4
|
|
60297
|
+
version: "2.1.4",
|
|
60290
60298
|
description: "Oxagen governance CLI \u2014 spend, lineage, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
|
|
60291
60299
|
type: "module",
|
|
60292
60300
|
main: "./dist/index.js",
|
|
@@ -79613,6 +79621,13 @@ var init_run_list = __esm({
|
|
|
79613
79621
|
* caller treats as deliverable and lets the handler decide.
|
|
79614
79622
|
*/
|
|
79615
79623
|
commandBlock: external_exports.enum(COMMAND_BLOCKS).nullable().optional(),
|
|
79624
|
+
/**
|
|
79625
|
+
* The run is an in-app assistant turn: a session with a `surface`
|
|
79626
|
+
* (ADR-5969). The workspace lists and reads it like any other run, but
|
|
79627
|
+
* it does not govern or steer it (ADR-235), so a caller offers no pause,
|
|
79628
|
+
* resume, steer or cancel on it. Absent reads as false.
|
|
79629
|
+
*/
|
|
79630
|
+
inApp: external_exports.boolean().optional(),
|
|
79616
79631
|
/**
|
|
79617
79632
|
* Why a steer or message cannot reach this run when the other commands
|
|
79618
79633
|
* can, or null when it can. `dispatch_command` refuses on the same rule
|
|
@@ -79787,7 +79802,7 @@ var init_run_list = __esm({
|
|
|
79787
79802
|
runList = registerCapability({
|
|
79788
79803
|
name: "list_runs",
|
|
79789
79804
|
domain: "run",
|
|
79790
|
-
description: "List the runs recorded in this workspace, newest first: evidence-ledger runs and root wrapped-agent sessions in one cursor-paged list, with the operator, the model, the machine, status, counts and metered cost each row recorded. The in-app
|
|
79805
|
+
description: "List the runs recorded in this workspace, newest first: evidence-ledger runs and root wrapped-agent sessions in one cursor-paged list, with the operator, the model, the machine, status, counts and metered cost each row recorded. The in-app assistant's turns are listed too, marked inApp; they take no run commands.",
|
|
79791
79806
|
mode: "sync",
|
|
79792
79807
|
surfaces: ["api", "mcp", "agent", "cli"],
|
|
79793
79808
|
layers: ["schema", "api", "mcp", "cli", "unit", "docs", "app"],
|
package/package.json
CHANGED