@oxagen/cli 3.0.1-679 → 3.0.1-685

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 +69 -49
  2. package/package.json +1 -1
package/oxagen.mjs CHANGED
@@ -29810,7 +29810,7 @@ import { readFileSync as readFileSync10 } from "node:fs";
29810
29810
  import { dirname as dirname9, resolve as resolve3 } from "node:path";
29811
29811
  import { fileURLToPath } from "node:url";
29812
29812
  function readVersion() {
29813
- if (true) return "3.0.1-679";
29813
+ if (true) return "3.0.1-685";
29814
29814
  try {
29815
29815
  const here = dirname9(fileURLToPath(import.meta.url));
29816
29816
  const pkg = JSON.parse(
@@ -72708,7 +72708,7 @@ var init_package = __esm({
72708
72708
  "package.json"() {
72709
72709
  package_default = {
72710
72710
  name: "@oxagen/cli",
72711
- version: "3.0.1-679",
72711
+ version: "3.0.1-685",
72712
72712
  description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
72713
72713
  type: "module",
72714
72714
  main: "./dist/index.js",
@@ -99736,7 +99736,10 @@ var init_work_labels_shared = __esm({
99736
99736
  });
99737
99737
 
99738
99738
  // ../../packages/oxagen/src/contracts/kinds.shared.ts
99739
- var KIND_SUBJECTS, kindSubjectSchema, KIND_NAME_MAX, KIND_DESCRIPTION_MAX, KIND_REASON_MAX, RUN_KIND_INPUTS, kindIdSchema, kindSchema, kindNameSchema;
99739
+ function kindSlugOf(name) {
99740
+ return name.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").slice(0, KIND_NAME_MAX).replace(/-+$/, "");
99741
+ }
99742
+ var KIND_SUBJECTS, kindSubjectSchema, KIND_NAME_MAX, KIND_DESCRIPTION_MAX, KIND_REASON_MAX, RUN_KIND_INPUTS, kindSlugSchema, kindIdSchema, kindSchema, recordKindSchema3, kindNameSchema;
99740
99743
  var init_kinds_shared = __esm({
99741
99744
  "../../packages/oxagen/src/contracts/kinds.shared.ts"() {
99742
99745
  "use strict";
@@ -99752,6 +99755,9 @@ var init_kinds_shared = __esm({
99752
99755
  "transcript_and_diff",
99753
99756
  "diff"
99754
99757
  ];
99758
+ kindSlugSchema = external_exports.string().min(1).max(KIND_NAME_MAX).refine((value) => kindSlugOf(value) === value, {
99759
+ message: "A kind's slug is its name in lowercase letters and digits, with one hyphen between words, such as bug or new-feature. Read the slugs with list_kinds."
99760
+ });
99755
99761
  kindIdSchema = external_exports.string().uuid();
99756
99762
  kindSchema = external_exports.object({
99757
99763
  id: kindIdSchema,
@@ -99774,6 +99780,50 @@ var init_kinds_shared = __esm({
99774
99780
  */
99775
99781
  count: external_exports.number().int().nonnegative().nullable()
99776
99782
  }).strict();
99783
+ recordKindSchema3 = external_exports.object({
99784
+ /** The kind in force, by its id in `list_kinds`. */
99785
+ id: kindIdSchema,
99786
+ name: external_exports.string().min(1).max(KIND_NAME_MAX),
99787
+ slug: external_exports.string().min(1).max(KIND_NAME_MAX),
99788
+ icon: workLabelIconSchema,
99789
+ color: workLabelColorSchema,
99790
+ variant: workLabelVariantSchema,
99791
+ /** True for Unknown, which draws in the plain badge's look whatever its stored look. */
99792
+ fixed: external_exports.boolean(),
99793
+ /** The kind is archived: it stays on the record, and the picker leaves it out. */
99794
+ archived: external_exports.boolean(),
99795
+ /**
99796
+ * The person whose pick is in force and when they made it: through
99797
+ * `set_run_classification` for a run, and `update_work_item`'s `kind_id`
99798
+ * for a work item. `name` is their name, null when their user record
99799
+ * holds none. Null when no person's pick is in force.
99800
+ */
99801
+ person: external_exports.object({
99802
+ name: external_exports.string().min(1).nullable(),
99803
+ /** RFC 3339. */
99804
+ at: external_exports.string().datetime()
99805
+ }).strict().nullable(),
99806
+ /**
99807
+ * The classifier's pick, kept apart from a person's so "Use oxagen's
99808
+ * pick" can bring it back: the kind, the reason the model gave, the model
99809
+ * id, what it read, and when. Null when nothing classified the record,
99810
+ * or when its pick names a kind the list no longer holds.
99811
+ */
99812
+ classified: external_exports.object({
99813
+ kindId: kindIdSchema,
99814
+ reason: external_exports.string().max(KIND_REASON_MAX).nullable(),
99815
+ model: external_exports.string().nullable(),
99816
+ /**
99817
+ * What the classifier read for a run: `first_prompt`,
99818
+ * `transcript_and_diff` or `diff`, and null when none was recorded.
99819
+ * Always null for a work item, which the classifier reads from its
99820
+ * title, description and labels every time.
99821
+ */
99822
+ input: external_exports.enum(RUN_KIND_INPUTS).nullable(),
99823
+ /** RFC 3339. */
99824
+ at: external_exports.string().datetime()
99825
+ }).strict().nullable()
99826
+ }).strict();
99777
99827
  kindNameSchema = external_exports.string().trim().min(1).max(KIND_NAME_MAX);
99778
99828
  }
99779
99829
  });
@@ -99792,7 +99842,6 @@ var init_run_list = __esm({
99792
99842
  init_kinds_shared();
99793
99843
  init_run_shared();
99794
99844
  init_spend_shared();
99795
- init_work_labels_shared();
99796
99845
  init_run_shared();
99797
99846
  runPublicIdSchema = external_exports.string().regex(RUN_PUBLIC_ID_REGEX, "a run public id (arun_\u2026 or tse_\u2026)");
99798
99847
  frameSeqSchema = external_exports.string().regex(/^\d{1,19}$/, "a frame sequence (up to 19 decimal digits)");
@@ -100015,44 +100064,7 @@ var init_run_list = __esm({
100015
100064
  workstream: external_exports.string().nullable().optional()
100016
100065
  }).strict().nullable()
100017
100066
  }).strict();
100018
- runKindSchema = external_exports.object({
100019
- /** The kind in force, by its id in `list_kinds`. */
100020
- id: kindIdSchema,
100021
- name: external_exports.string().min(1).max(KIND_NAME_MAX),
100022
- slug: external_exports.string().min(1).max(KIND_NAME_MAX),
100023
- icon: workLabelIconSchema,
100024
- color: workLabelColorSchema,
100025
- variant: workLabelVariantSchema,
100026
- /** True for Unknown, which draws in the plain badge's look whatever its stored look. */
100027
- fixed: external_exports.boolean(),
100028
- /** The kind is archived: it stays on the run, and the picker leaves it out. */
100029
- archived: external_exports.boolean(),
100030
- /**
100031
- * The person whose pick is in force (`set_run_classification`) and when
100032
- * they made it. `name` is their name, null when their user record holds
100033
- * none. Null when no person's pick is in force.
100034
- */
100035
- person: external_exports.object({
100036
- name: external_exports.string().min(1).nullable(),
100037
- /** RFC 3339. */
100038
- at: external_exports.string().datetime()
100039
- }).strict().nullable(),
100040
- /**
100041
- * The classifier's pick, kept apart from a person's so "Use oxagen's
100042
- * pick" can bring it back: the kind, the reason the model gave, the model
100043
- * id, what it read, and when. Null when nothing classified the run, or
100044
- * when its pick names a kind the list no longer holds.
100045
- */
100046
- classified: external_exports.object({
100047
- kindId: kindIdSchema,
100048
- reason: external_exports.string().max(KIND_REASON_MAX).nullable(),
100049
- model: external_exports.string().nullable(),
100050
- /** `first_prompt`, `transcript_and_diff` or `diff`; null when none was recorded. */
100051
- input: external_exports.enum(RUN_KIND_INPUTS).nullable(),
100052
- /** RFC 3339. */
100053
- at: external_exports.string().datetime()
100054
- }).strict().nullable()
100055
- }).strict();
100067
+ runKindSchema = recordKindSchema3;
100056
100068
  runItemSchema = external_exports.object({
100057
100069
  id: runPublicIdSchema,
100058
100070
  /**
@@ -173088,15 +173100,23 @@ function renderKindRules(rules, opts, writer) {
173088
173100
  return;
173089
173101
  }
173090
173102
  writer.write("Kind rules:");
173091
- const headers = ["KIND", "TIER", "EFFORT"];
173092
- if (opts.withSource) headers.push("SOURCE");
173103
+ const named = rules.some((rule) => typeof rule.name === "string");
173104
+ const headers = [
173105
+ ...named ? ["KIND"] : [],
173106
+ "SLUG",
173107
+ "TIER",
173108
+ "EFFORT",
173109
+ ...opts.withSource ? ["SOURCE"] : []
173110
+ ];
173093
173111
  printTable(
173094
173112
  headers,
173095
- rules.map((rule) => {
173096
- const row = [rule.kind, rule.tier.name, rule.effort ?? "none"];
173097
- if (opts.withSource) row.push(rule.source ?? "");
173098
- return row;
173099
- }),
173113
+ rules.map((rule) => [
173114
+ ...named ? [rule.name ?? ""] : [],
173115
+ rule.kind,
173116
+ rule.tier.name,
173117
+ rule.effort ?? "none",
173118
+ ...opts.withSource ? [rule.source ?? ""] : []
173119
+ ]),
173100
173120
  writer
173101
173121
  );
173102
173122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxagen/cli",
3
- "version": "3.0.1-679",
3
+ "version": "3.0.1-685",
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": {