@smartergpt/lexrunner 1.2.1 → 1.4.0

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  securityCommandBlockedError
3
- } from "./chunk-L7YDEIPO.js";
3
+ } from "./chunk-26SCN2LJ.js";
4
4
  import "./chunk-V3BU2VDU.js";
5
5
 
6
6
  // src/security/commandValidator.ts
@@ -384,15 +384,23 @@ function gitOperationError(ctx) {
384
384
  }
385
385
  function planValidationError(ctx) {
386
386
  const nextActions = ["Review the plan file for schema violations"];
387
+ const errorCount = ctx.errorCount ?? ctx.errors.length;
387
388
  if (ctx.planPath) {
388
389
  nextActions.push(`Plan file: ${ctx.planPath}`);
389
390
  }
390
- nextActions.push(`Errors: ${ctx.errors.join("; ")}`);
391
+ if (ctx.errors.length > 0) {
392
+ nextActions.push(`Errors: ${ctx.errors.join("; ")}`);
393
+ }
394
+ if (ctx.errorsTruncated) {
395
+ nextActions.push(
396
+ `Only the first ${ctx.errors.length} of ${errorCount} validation errors are included`
397
+ );
398
+ }
391
399
  return createAXError(
392
400
  ErrorCodes.PLAN_VALIDATION_FAILED,
393
- `Plan validation failed with ${ctx.errors.length} error(s)`,
401
+ `Plan validation failed with ${errorCount} error(s)`,
394
402
  nextActions,
395
- { ...ctx }
403
+ { ...ctx, errorCount, errorsTruncated: ctx.errorsTruncated ?? false }
396
404
  );
397
405
  }
398
406
  function toAXError(error, code = ErrorCodes.INTERNAL_ERROR, nextActions) {
@@ -739,6 +747,12 @@ var ErrorCodes = {
739
747
  PLAN_VALIDATION_FAILED: "PLAN_VALIDATION_FAILED",
740
748
  /** Plan file not found */
741
749
  PLAN_NOT_FOUND: "PLAN_NOT_FOUND",
750
+ /** Explicit plan reference is empty, overlong, or otherwise invalid */
751
+ PLAN_REFERENCE_INVALID: "PLAN_REFERENCE_INVALID",
752
+ /** Plan reference exists but cannot be read as a bounded regular file */
753
+ PLAN_UNREADABLE: "PLAN_UNREADABLE",
754
+ /** Plan exceeds the bounded integration artifact limits */
755
+ PLAN_ARTIFACT_LIMIT_EXCEEDED: "PLAN_ARTIFACT_LIMIT_EXCEEDED",
742
756
  /** Cycle detected in plan item dependencies */
743
757
  PLAN_CYCLE_DETECTED: "PLAN_CYCLE_DETECTED",
744
758
  /** Referenced dependency not found in plan */
@@ -1,5 +1,5 @@
1
1
  export { AXError, AXErrorException, AXErrorSchema, createAXError, isAXError, isAXErrorException, wrapAsAXError } from '@smartergpt/lex/errors';
2
- export { C as CycleDetectedContext, G as GateFailureContext, a as GitHubErrorContext, b as GitOperationContext, c as GovernanceContext, M as MCPErrorContext, d as MergeConflictContext, P as PlanValidationContext, R as RunNotFoundContext, S as SecurityAuthContext, e as SecurityCommandBlockedContext, f as SecurityComplianceViolationContext, g as SecuritySarifParseErrorContext, h as SecurityScanFailedContext, i as SecuritySecretDetectedContext, j as SecuritySecretNotFoundContext, k as SecurityUnauthorizedContext, T as ToolBudgetExceededContext, U as UnknownDependencyContext, W as WeaveLockConflictContext, l as WeavePreflightFailedContext, n as WeaveStateInvalidContext, o as WithGovernance, p as configInvalidError, q as cycleDetectedError, r as gateFailedError, s as gitOperationError, t as githubApiError, m as mcpToolError, u as mergeConflictError, v as planNotFoundError, w as planValidationError, x as profileNotFoundError, y as runNotFoundError, z as securityAuthFailedError, A as securityCommandBlockedError, B as securityComplianceViolationError, D as securitySarifParseError, E as securityScanFailedError, F as securitySecretDetectedError, H as securitySecretNotFoundError, I as securityUnauthorizedError, J as throwAXError, K as toAXError, L as toolBudgetExceededError, N as unknownDependencyError, O as weaveLockConflictError, Q as weavePreflightFailedError, V as weaveStateInvalidError, X as writeProtectionError } from '../adapters-DciX_uRh.js';
2
+ export { C as CycleDetectedContext, G as GateFailureContext, a as GitHubErrorContext, b as GitOperationContext, c as GovernanceContext, M as MCPErrorContext, d as MergeConflictContext, P as PlanValidationContext, R as RunNotFoundContext, S as SecurityAuthContext, e as SecurityCommandBlockedContext, f as SecurityComplianceViolationContext, g as SecuritySarifParseErrorContext, h as SecurityScanFailedContext, i as SecuritySecretDetectedContext, j as SecuritySecretNotFoundContext, k as SecurityUnauthorizedContext, T as ToolBudgetExceededContext, U as UnknownDependencyContext, W as WeaveLockConflictContext, l as WeavePreflightFailedContext, n as WeaveStateInvalidContext, o as WithGovernance, p as configInvalidError, q as cycleDetectedError, r as gateFailedError, s as gitOperationError, t as githubApiError, m as mcpToolError, u as mergeConflictError, v as planNotFoundError, w as planValidationError, x as profileNotFoundError, y as runNotFoundError, z as securityAuthFailedError, A as securityCommandBlockedError, B as securityComplianceViolationError, D as securitySarifParseError, E as securityScanFailedError, F as securitySecretDetectedError, H as securitySecretNotFoundError, I as securityUnauthorizedError, J as throwAXError, K as toAXError, L as toolBudgetExceededError, N as unknownDependencyError, O as weaveLockConflictError, Q as weavePreflightFailedError, V as weaveStateInvalidError, X as writeProtectionError } from '../adapters-r7_TjMwo.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
@@ -47,6 +47,12 @@ declare const ErrorCodes: {
47
47
  readonly PLAN_VALIDATION_FAILED: "PLAN_VALIDATION_FAILED";
48
48
  /** Plan file not found */
49
49
  readonly PLAN_NOT_FOUND: "PLAN_NOT_FOUND";
50
+ /** Explicit plan reference is empty, overlong, or otherwise invalid */
51
+ readonly PLAN_REFERENCE_INVALID: "PLAN_REFERENCE_INVALID";
52
+ /** Plan reference exists but cannot be read as a bounded regular file */
53
+ readonly PLAN_UNREADABLE: "PLAN_UNREADABLE";
54
+ /** Plan exceeds the bounded integration artifact limits */
55
+ readonly PLAN_ARTIFACT_LIMIT_EXCEEDED: "PLAN_ARTIFACT_LIMIT_EXCEEDED";
50
56
  /** Cycle detected in plan item dependencies */
51
57
  readonly PLAN_CYCLE_DETECTED: "PLAN_CYCLE_DETECTED";
52
58
  /** Referenced dependency not found in plan */
@@ -33,7 +33,7 @@ import {
33
33
  weaveStateInvalidError,
34
34
  wrapAsAXError,
35
35
  writeProtectionError
36
- } from "../chunk-L7YDEIPO.js";
36
+ } from "../chunk-26SCN2LJ.js";
37
37
  import "../chunk-V3BU2VDU.js";
38
38
  export {
39
39
  AXErrorException,