@oxagen/cli 5.5.1-317 → 5.5.1-319
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 +25 -11
- package/package.json +1 -1
package/oxagen.mjs
CHANGED
|
@@ -34833,7 +34833,7 @@ import { readFileSync as readFileSync13 } from "node:fs";
|
|
|
34833
34833
|
import { dirname as dirname14, resolve as resolve3 } from "node:path";
|
|
34834
34834
|
import { fileURLToPath } from "node:url";
|
|
34835
34835
|
function readVersion() {
|
|
34836
|
-
if (true) return "5.5.1-
|
|
34836
|
+
if (true) return "5.5.1-319";
|
|
34837
34837
|
try {
|
|
34838
34838
|
const here = dirname14(fileURLToPath(import.meta.url));
|
|
34839
34839
|
const pkg = JSON.parse(
|
|
@@ -82618,7 +82618,7 @@ var init_package = __esm({
|
|
|
82618
82618
|
"package.json"() {
|
|
82619
82619
|
package_default = {
|
|
82620
82620
|
name: "@oxagen/cli",
|
|
82621
|
-
version: "5.5.1-
|
|
82621
|
+
version: "5.5.1-319",
|
|
82622
82622
|
description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
|
|
82623
82623
|
type: "module",
|
|
82624
82624
|
main: "./dist/index.js",
|
|
@@ -109533,13 +109533,26 @@ var init_spend_attribution = __esm({
|
|
|
109533
109533
|
});
|
|
109534
109534
|
|
|
109535
109535
|
// ../../packages/oxagen/src/contracts/spend.export.ts
|
|
109536
|
-
var spendExport;
|
|
109536
|
+
var fileStream, spendExportFileContent, spendExport;
|
|
109537
109537
|
var init_spend_export = __esm({
|
|
109538
109538
|
"../../packages/oxagen/src/contracts/spend.export.ts"() {
|
|
109539
109539
|
"use strict";
|
|
109540
109540
|
init_zod();
|
|
109541
109541
|
init_registry4();
|
|
109542
109542
|
init_spend_attribution();
|
|
109543
|
+
fileStream = external_exports.custom(
|
|
109544
|
+
(value) => value instanceof ReadableStream,
|
|
109545
|
+
{ message: "Expected a byte stream" }
|
|
109546
|
+
).describe(
|
|
109547
|
+
"The web app's own download only. The API, MCP, the CLI and the in-app agent always answer content, encoding and lines."
|
|
109548
|
+
);
|
|
109549
|
+
spendExportFileContent = external_exports.object({
|
|
109550
|
+
filename: external_exports.string(),
|
|
109551
|
+
mediaType: external_exports.string(),
|
|
109552
|
+
content: external_exports.string(),
|
|
109553
|
+
encoding: external_exports.enum(["utf8", "base64"]),
|
|
109554
|
+
lines: external_exports.number().int().nonnegative()
|
|
109555
|
+
}).strict();
|
|
109543
109556
|
spendExport = registerCapability({
|
|
109544
109557
|
name: "export_spend",
|
|
109545
109558
|
domain: "spend",
|
|
@@ -109556,13 +109569,14 @@ var init_spend_export = __esm({
|
|
|
109556
109569
|
defaultRoles: spendAttribution.defaultRoles,
|
|
109557
109570
|
agent: { requiresApproval: false, riskLevel: "low", category: "billing" },
|
|
109558
109571
|
input: spendAttribution.input.extend({ format: external_exports.enum(["csv", "xlsx"]) }).strict(),
|
|
109559
|
-
output: external_exports.
|
|
109560
|
-
|
|
109561
|
-
|
|
109562
|
-
|
|
109563
|
-
|
|
109564
|
-
|
|
109565
|
-
|
|
109572
|
+
output: external_exports.union([
|
|
109573
|
+
spendExportFileContent,
|
|
109574
|
+
external_exports.object({
|
|
109575
|
+
filename: external_exports.string(),
|
|
109576
|
+
mediaType: external_exports.string(),
|
|
109577
|
+
body: fileStream
|
|
109578
|
+
}).strict()
|
|
109579
|
+
])
|
|
109566
109580
|
});
|
|
109567
109581
|
}
|
|
109568
109582
|
});
|
|
@@ -109846,7 +109860,7 @@ async function spendExport2(opts) {
|
|
|
109846
109860
|
...attributionBody({ ...opts, groupBy: opts.groupBy ?? "workspace" }),
|
|
109847
109861
|
format: opts.format
|
|
109848
109862
|
});
|
|
109849
|
-
const result2 =
|
|
109863
|
+
const result2 = spendExportFileContent.parse(
|
|
109850
109864
|
await apiPostOrThrow("spend/export", body2)
|
|
109851
109865
|
);
|
|
109852
109866
|
await writeFile3(
|
package/package.json
CHANGED