@oxagen/cli 5.5.1-228 → 5.5.1-231

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 +57 -8
  2. package/package.json +1 -1
package/oxagen.mjs CHANGED
@@ -33126,7 +33126,7 @@ import { readFileSync as readFileSync12 } from "node:fs";
33126
33126
  import { dirname as dirname14, resolve as resolve3 } from "node:path";
33127
33127
  import { fileURLToPath } from "node:url";
33128
33128
  function readVersion() {
33129
- if (true) return "5.5.1-228";
33129
+ if (true) return "5.5.1-231";
33130
33130
  try {
33131
33131
  const here = dirname14(fileURLToPath(import.meta.url));
33132
33132
  const pkg = JSON.parse(
@@ -44364,7 +44364,8 @@ var init_local = __esm({
44364
44364
  "list_held_decisions",
44365
44365
  "list_link_labels",
44366
44366
  "get_dataflow_slice",
44367
- "localize_fault"
44367
+ "localize_fault",
44368
+ "get_repair_context"
44368
44369
  ];
44369
44370
  READ_SET = new Set(LOCAL_CODE_GRAPH_READS);
44370
44371
  BUILD_CODE_GRAPH_TOOL = "build_code_graph";
@@ -45161,7 +45162,7 @@ function createMcpGateway(deps) {
45161
45162
  if (!isLocalCodeGraphRead(name2)) return void 0;
45162
45163
  if (allowed !== void 0 && !allowed.has(name2)) return void 0;
45163
45164
  if (args["at"] !== void 0) return void 0;
45164
- if (name2 === "localize_fault" && args["failure"] !== void 0)
45165
+ if ((name2 === "localize_fault" || name2 === "get_repair_context") && args["failure"] !== void 0)
45165
45166
  return void 0;
45166
45167
  let built;
45167
45168
  try {
@@ -45530,7 +45531,8 @@ var init_mcp_gateway = __esm({
45530
45531
  FORWARDED_LOCAL_ERRORS = /* @__PURE__ */ new Set([
45531
45532
  "not_built",
45532
45533
  "not_found",
45533
- "unavailable"
45534
+ "unavailable",
45535
+ "unknown_call"
45534
45536
  ]);
45535
45537
  UPSTREAM_LEGACY_RECHECK_MS = 10 * 6e4;
45536
45538
  UPSTREAM_PROBE_RETRY_MS = 6e4;
@@ -80458,7 +80460,7 @@ var init_package = __esm({
80458
80460
  "package.json"() {
80459
80461
  package_default = {
80460
80462
  name: "@oxagen/cli",
80461
- version: "5.5.1-228",
80463
+ version: "5.5.1-231",
80462
80464
  description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
80463
80465
  type: "module",
80464
80466
  main: "./dist/index.js",
@@ -83522,7 +83524,7 @@ var init_common = __esm({
83522
83524
  function call(name2, request4, result2) {
83523
83525
  return { call: name2, request: request4, result: result2, response: responseSchema(result2) };
83524
83526
  }
83525
- var unit3, count8, names, excluded, withinSchema, testRefSchema, SEARCH_GROUPS, searchHitSchema, SEARCH_MEANING_STATES, searchMeaningStateSchema, searchCodeGraphRequest, searchCodeGraphResult, blastTargetSchema, decisionItemSchema, blastGroupsSchema, getBlastRadiusRequest, getBlastRadiusResult, listUnitTestsRequest, listUnitTestsResult, flowDataSchema, flowNodeSchema, jobStepSchema, getExecutionFlowRequest, getExecutionFlowResult, traceSpecRequest, traceSpecResult, listGoverningDecisionsBase, listGoverningDecisionsRequest, listGoverningDecisionsResult, getEnvVarsRequest, getEnvVarsResult, connectionSchema, getInfraRequest, getInfraResult, listCiJobsRequest, listCiJobsResult, scriptEffectSchema, listScriptsRequest, listScriptsResult, getApiDocsRequest, getApiDocsResult, exportOpenapiDraftRequest, exportOpenapiDraftResult, listCoChangesRequest, listCoChangesResult, rankSymbolsRequest, rankSymbolsResult, getMeaningMapRequest, getMeaningMapResult, getRepoMapRequest, getRepoMapResult, getDomainBriefRequest, getDomainBriefResult, checkChangeRequest, checkChangeResult, findDefinitionRequest, findDefinitionResult, findReferencesRequest, findReferencesResult, findImplementationsRequest, findImplementationsResult, listNeighborsRequest, listNeighborsResult, failureRefSchema, FAILURE_KINDS, failureSchema2, DATAFLOW_EDGE_KINDS, SLICE_DIRECTIONS, SLICE_ROLES, SLICE_MAX_DEPTH, SLICE_MAX_CALL_DEPTH, SLICE_DEFAULT_CALL_DEPTH, sliceStepSchema, dataflowSliceBase, getDataflowSliceRequest, dataflowLayerKey, missingLayerSchema, getDataflowSliceResult, FAULT_SIGNALS, LOCALIZE_MAX_SUSPECTS, signalEvidenceSchema, suspectSchema, localizeFaultBase, localizeFaultRequest, localizeFaultResult, INTENT_EVIDENCE_KINDS, intentEvidenceSchema, getIntendedBehaviorRequest, getIntendedBehaviorResult, REPAIR_CONTEXT_SECTIONS, REPAIR_CONTEXT_DEFAULT_BUDGET, REPAIR_CONTEXT_MAX_BUDGET, repairContextSectionSchema, repairContextBase, getRepairContextRequest, getRepairContextResult, CODEGRAPH_CALLS;
83527
+ var unit3, count8, names, excluded, withinSchema, testRefSchema, SEARCH_GROUPS, searchHitSchema, SEARCH_MEANING_STATES, searchMeaningStateSchema, searchCodeGraphRequest, searchCodeGraphResult, blastTargetSchema, decisionItemSchema, blastGroupsSchema, getBlastRadiusRequest, getBlastRadiusResult, listUnitTestsRequest, listUnitTestsResult, flowDataSchema, flowNodeSchema, jobStepSchema, getExecutionFlowRequest, getExecutionFlowResult, traceSpecRequest, traceSpecResult, listGoverningDecisionsBase, listGoverningDecisionsRequest, listGoverningDecisionsResult, getEnvVarsRequest, getEnvVarsResult, connectionSchema, getInfraRequest, getInfraResult, listCiJobsRequest, listCiJobsResult, scriptEffectSchema, listScriptsRequest, listScriptsResult, getApiDocsRequest, getApiDocsResult, exportOpenapiDraftRequest, exportOpenapiDraftResult, listCoChangesRequest, listCoChangesResult, rankSymbolsRequest, rankSymbolsResult, getMeaningMapRequest, getMeaningMapResult, getRepoMapRequest, getRepoMapResult, getDomainBriefRequest, getDomainBriefResult, checkChangeRequest, checkChangeResult, findDefinitionRequest, findDefinitionResult, findReferencesRequest, findReferencesResult, findImplementationsRequest, findImplementationsResult, listNeighborsRequest, listNeighborsResult, failureRefSchema, FAILURE_KINDS, failureSchema2, DATAFLOW_EDGE_KINDS, SLICE_DIRECTIONS, SLICE_ROLES, SLICE_MAX_DEPTH, SLICE_MAX_CALL_DEPTH, SLICE_DEFAULT_CALL_DEPTH, sliceStepSchema, dataflowSliceBase, getDataflowSliceRequest, dataflowLayerKey, missingLayerSchema, getDataflowSliceResult, FAULT_SIGNALS, LOCALIZE_MAX_SUSPECTS, signalEvidenceSchema, suspectSchema, localizeFaultBase, localizeFaultRequest, localizeFaultResult, INTENT_EVIDENCE_KINDS, intentEvidenceSchema, getIntendedBehaviorRequest, getIntendedBehaviorResult, REPAIR_CONTEXT_SECTIONS, REPAIR_CONTEXT_DEFAULT_BUDGET, REPAIR_CONTEXT_MIN_BUDGET, REPAIR_CONTEXT_MAX_BUDGET, REPAIR_CONTEXT_MAX_FIX_RANGES, REPAIR_CONTEXT_MAX_FIX_SPAN, repairContextSectionSchema, fixLinesSchema, repairContextBase, getRepairContextRequest, repairContextCutSchema, repairContextTrimmedSchema, missingSourceSchema, getRepairContextResult, CODEGRAPH_CALLS;
83526
83528
  var init_calls = __esm({
83527
83529
  "../../packages/codegraph/src/query/calls.ts"() {
83528
83530
  "use strict";
@@ -84338,7 +84340,10 @@ var init_calls = __esm({
84338
84340
  "environment"
84339
84341
  ];
84340
84342
  REPAIR_CONTEXT_DEFAULT_BUDGET = 8e3;
84343
+ REPAIR_CONTEXT_MIN_BUDGET = 2e3;
84341
84344
  REPAIR_CONTEXT_MAX_BUDGET = 16e3;
84345
+ REPAIR_CONTEXT_MAX_FIX_RANGES = 500;
84346
+ REPAIR_CONTEXT_MAX_FIX_SPAN = 1e4;
84342
84347
  repairContextSectionSchema = external_exports.object({
84343
84348
  name: external_exports.enum(REPAIR_CONTEXT_SECTIONS),
84344
84349
  tokens: count8,
@@ -84347,23 +84352,66 @@ var init_calls = __esm({
84347
84352
  /** The nodes the text cites. */
84348
84353
  cites: external_exports.array(graphItemSchema).default([])
84349
84354
  }).strict();
84355
+ fixLinesSchema = external_exports.object({
84356
+ repo: external_exports.string().min(1).optional(),
84357
+ file: external_exports.string().min(1),
84358
+ startLine: external_exports.number().int().positive(),
84359
+ endLine: external_exports.number().int().positive()
84360
+ }).strict().refine((l) => l.endLine >= l.startLine, {
84361
+ message: "endLine is at or after startLine"
84362
+ }).refine((l) => l.endLine - l.startLine < REPAIR_CONTEXT_MAX_FIX_SPAN, {
84363
+ message: `a range spans at most ${REPAIR_CONTEXT_MAX_FIX_SPAN} lines`
84364
+ });
84350
84365
  repairContextBase = requestSchema({
84351
84366
  /** The suspects to pack, as localize_fault ranked them. */
84352
84367
  suspects: external_exports.array(nodeTargetSchema).min(1).max(20).optional(),
84353
84368
  /** Or the failure, whose top suspects are packed. */
84354
84369
  failure: failureRefSchema.optional(),
84355
84370
  sections: external_exports.array(external_exports.enum(REPAIR_CONTEXT_SECTIONS)).min(1).optional(),
84356
- budget: external_exports.number().int().positive().max(REPAIR_CONTEXT_MAX_BUDGET).default(REPAIR_CONTEXT_DEFAULT_BUDGET)
84371
+ budget: external_exports.number().int().min(REPAIR_CONTEXT_MIN_BUDGET).max(REPAIR_CONTEXT_MAX_BUDGET).default(REPAIR_CONTEXT_DEFAULT_BUDGET),
84372
+ /**
84373
+ * The lines a fix touched, when the caller already knows the fix, as a
84374
+ * replay does. The answer then reports `coverageAtBudget`.
84375
+ */
84376
+ fixLines: external_exports.array(fixLinesSchema).min(1).max(REPAIR_CONTEXT_MAX_FIX_RANGES).optional()
84357
84377
  });
84358
84378
  getRepairContextRequest = repairContextBase.refine(
84359
84379
  (r) => r.suspects !== void 0 || r.failure !== void 0,
84360
84380
  { message: "pass suspects or a failure" }
84361
84381
  );
84382
+ repairContextCutSchema = external_exports.object({
84383
+ section: external_exports.enum(REPAIR_CONTEXT_SECTIONS),
84384
+ /** The suspect or test the piece is about. */
84385
+ name: external_exports.string().min(1),
84386
+ /** What the piece would have cost. */
84387
+ tokens: count8
84388
+ }).strict();
84389
+ repairContextTrimmedSchema = external_exports.object({
84390
+ section: external_exports.enum(REPAIR_CONTEXT_SECTIONS),
84391
+ name: external_exports.string().min(1),
84392
+ shownLines: count8,
84393
+ totalLines: count8
84394
+ }).strict();
84395
+ missingSourceSchema = external_exports.object({
84396
+ repo: external_exports.string().min(1),
84397
+ file: external_exports.string().min(1),
84398
+ contentHash: external_exports.string().min(1).optional()
84399
+ }).strict();
84362
84400
  getRepairContextResult = external_exports.object({
84363
84401
  failure: failureSchema2.optional(),
84402
+ /** The suspects packed, ranked from 1. */
84403
+ suspects: external_exports.array(graphItemSchema.extend({ rank: external_exports.number().int().positive() })).default([]),
84364
84404
  sections: external_exports.array(repairContextSectionSchema),
84365
- /** On a replay: the share of the fix's lines inside the bundle. */
84405
+ /** Each piece the budget cut, the first 30 by rank; `budget.omitted` counts them all by section. */
84406
+ cut: external_exports.array(repairContextCutSchema).default([]),
84407
+ /** Each suspect whose code went out in its short form. */
84408
+ trimmed: external_exports.array(repairContextTrimmedSchema).default([]),
84409
+ /** With `fixLines`: the share of the fix's lines inside the bundle. */
84366
84410
  coverageAtBudget: unit3.optional(),
84411
+ /** Files the bundle wanted the code of. The handler reads them from the host and asks again. */
84412
+ missingSources: external_exports.array(missingSourceSchema).optional(),
84413
+ /** Def-use layers the failure's slice wanted and no host has built yet. */
84414
+ missingLayers: external_exports.array(missingLayerSchema).optional(),
84367
84415
  excluded
84368
84416
  }).strict();
84369
84417
  CODEGRAPH_CALLS = {
@@ -150333,6 +150381,7 @@ var init_dist2 = __esm({
150333
150381
  var EventSourceParserStream;
150334
150382
  var init_stream = __esm({
150335
150383
  "../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js"() {
150384
+ init_dist2();
150336
150385
  init_dist2();
150337
150386
  EventSourceParserStream = class extends TransformStream {
150338
150387
  constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxagen/cli",
3
- "version": "5.5.1-228",
3
+ "version": "5.5.1-231",
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": {