@eigenpal/cli 0.5.2 → 0.5.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/dist/cli.js CHANGED
@@ -28726,11 +28726,11 @@ var init_otel = __esm(() => {
28726
28726
  });
28727
28727
 
28728
28728
  // ../types/src/execution-row.ts
28729
- function isTerminalExecutionStatus(status2) {
28730
- return status2 != null && TERMINAL_STATUS_SET.has(status2);
28729
+ function isTerminalExecutionStatus(status) {
28730
+ return status != null && TERMINAL_STATUS_SET.has(status);
28731
28731
  }
28732
- function isNonSuccessTerminalExecutionStatus(status2) {
28733
- return status2 != null && NON_SUCCESS_TERMINAL_SET.has(status2);
28732
+ function isNonSuccessTerminalExecutionStatus(status) {
28733
+ return status != null && NON_SUCCESS_TERMINAL_SET.has(status);
28734
28734
  }
28735
28735
  function executionWallClockMs(startedAt, completedAt) {
28736
28736
  if (startedAt == null || completedAt == null)
@@ -32687,13 +32687,13 @@ var require_lib = __commonJS((exports) => {
32687
32687
  flowEnumMemberRaw() {
32688
32688
  const loc = this.state.startLoc;
32689
32689
  const id = this.parseIdentifier(true);
32690
- const init2 = this.eat(29) ? this.flowEnumMemberInit() : {
32690
+ const init = this.eat(29) ? this.flowEnumMemberInit() : {
32691
32691
  type: "none",
32692
32692
  loc
32693
32693
  };
32694
32694
  return {
32695
32695
  id,
32696
- init: init2
32696
+ init
32697
32697
  };
32698
32698
  }
32699
32699
  flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) {
@@ -32727,7 +32727,7 @@ var require_lib = __commonJS((exports) => {
32727
32727
  const memberNode = this.startNode();
32728
32728
  const {
32729
32729
  id,
32730
- init: init2
32730
+ init
32731
32731
  } = this.flowEnumMemberRaw();
32732
32732
  const memberName = id.name;
32733
32733
  if (memberName === "") {
@@ -32753,35 +32753,35 @@ var require_lib = __commonJS((exports) => {
32753
32753
  memberName
32754
32754
  };
32755
32755
  memberNode.id = id;
32756
- switch (init2.type) {
32756
+ switch (init.type) {
32757
32757
  case "boolean": {
32758
- this.flowEnumCheckExplicitTypeMismatch(init2.loc, context, "boolean");
32759
- memberNode.init = init2.value;
32758
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean");
32759
+ memberNode.init = init.value;
32760
32760
  members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
32761
32761
  break;
32762
32762
  }
32763
32763
  case "number": {
32764
- this.flowEnumCheckExplicitTypeMismatch(init2.loc, context, "number");
32765
- memberNode.init = init2.value;
32764
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number");
32765
+ memberNode.init = init.value;
32766
32766
  members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
32767
32767
  break;
32768
32768
  }
32769
32769
  case "string": {
32770
- this.flowEnumCheckExplicitTypeMismatch(init2.loc, context, "string");
32771
- memberNode.init = init2.value;
32770
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string");
32771
+ memberNode.init = init.value;
32772
32772
  members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
32773
32773
  break;
32774
32774
  }
32775
32775
  case "invalid": {
32776
- throw this.flowEnumErrorInvalidMemberInitializer(init2.loc, context);
32776
+ throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context);
32777
32777
  }
32778
32778
  case "none": {
32779
32779
  switch (explicitType) {
32780
32780
  case "boolean":
32781
- this.flowEnumErrorBooleanMemberNotInitialized(init2.loc, context);
32781
+ this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context);
32782
32782
  break;
32783
32783
  case "number":
32784
- this.flowEnumErrorNumberMemberNotInitialized(init2.loc, context);
32784
+ this.flowEnumErrorNumberMemberNotInitialized(init.loc, context);
32785
32785
  break;
32786
32786
  default:
32787
32787
  members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
@@ -38411,14 +38411,14 @@ var require_lib = __commonJS((exports) => {
38411
38411
  }
38412
38412
  for (const {
38413
38413
  id,
38414
- init: init2
38414
+ init
38415
38415
  } of declaration.declarations) {
38416
- if (!init2)
38416
+ if (!init)
38417
38417
  continue;
38418
38418
  if (kind === "var" || kind === "let" || !!id.typeAnnotation) {
38419
- this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init2);
38420
- } else if (!isValidAmbientConstInitializer(init2, this.hasPlugin("estree"))) {
38421
- this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init2);
38419
+ this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init);
38420
+ } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) {
38421
+ this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init);
38422
38422
  }
38423
38423
  }
38424
38424
  return declaration;
@@ -42098,47 +42098,47 @@ var require_lib = __commonJS((exports) => {
42098
42098
  }
42099
42099
  this.next();
42100
42100
  this.parseVar(initNode, true, kind);
42101
- const init3 = this.finishNode(initNode, "VariableDeclaration");
42101
+ const init2 = this.finishNode(initNode, "VariableDeclaration");
42102
42102
  const isForIn = this.match(58);
42103
42103
  if (isForIn && starsWithUsingDeclaration) {
42104
- this.raise(Errors.ForInUsing, init3);
42104
+ this.raise(Errors.ForInUsing, init2);
42105
42105
  }
42106
- if ((isForIn || this.isContextual(102)) && init3.declarations.length === 1) {
42107
- return this.parseForIn(node, init3, awaitAt);
42106
+ if ((isForIn || this.isContextual(102)) && init2.declarations.length === 1) {
42107
+ return this.parseForIn(node, init2, awaitAt);
42108
42108
  }
42109
42109
  if (awaitAt !== null) {
42110
42110
  this.unexpected(awaitAt);
42111
42111
  }
42112
- return this.parseFor(node, init3);
42112
+ return this.parseFor(node, init2);
42113
42113
  }
42114
42114
  }
42115
42115
  const startsWithAsync = this.isContextual(95);
42116
42116
  const refExpressionErrors = new ExpressionErrors;
42117
- const init2 = this.parseExpression(true, refExpressionErrors);
42117
+ const init = this.parseExpression(true, refExpressionErrors);
42118
42118
  const isForOf = this.isContextual(102);
42119
42119
  if (isForOf) {
42120
42120
  if (startsWithLet) {
42121
- this.raise(Errors.ForOfLet, init2);
42121
+ this.raise(Errors.ForOfLet, init);
42122
42122
  }
42123
- if (awaitAt === null && startsWithAsync && init2.type === "Identifier") {
42124
- this.raise(Errors.ForOfAsync, init2);
42123
+ if (awaitAt === null && startsWithAsync && init.type === "Identifier") {
42124
+ this.raise(Errors.ForOfAsync, init);
42125
42125
  }
42126
42126
  }
42127
42127
  if (isForOf || this.match(58)) {
42128
42128
  this.checkDestructuringPrivate(refExpressionErrors);
42129
- this.toAssignable(init2, true);
42129
+ this.toAssignable(init, true);
42130
42130
  const type = isForOf ? "ForOfStatement" : "ForInStatement";
42131
- this.checkLVal(init2, {
42131
+ this.checkLVal(init, {
42132
42132
  type
42133
42133
  });
42134
- return this.parseForIn(node, init2, awaitAt);
42134
+ return this.parseForIn(node, init, awaitAt);
42135
42135
  } else {
42136
42136
  this.checkExpressionErrors(refExpressionErrors, true);
42137
42137
  }
42138
42138
  if (awaitAt !== null) {
42139
42139
  this.unexpected(awaitAt);
42140
42140
  }
42141
- return this.parseFor(node, init2);
42141
+ return this.parseFor(node, init);
42142
42142
  }
42143
42143
  parseFunctionStatement(node, isAsync, isHangingDeclaration) {
42144
42144
  this.next();
@@ -42357,8 +42357,8 @@ var require_lib = __commonJS((exports) => {
42357
42357
  }
42358
42358
  this.next();
42359
42359
  }
42360
- parseFor(node, init2) {
42361
- node.init = init2;
42360
+ parseFor(node, init) {
42361
+ node.init = init;
42362
42362
  this.semicolon(false);
42363
42363
  node.test = this.match(13) ? null : this.parseExpression();
42364
42364
  this.semicolon(false);
@@ -42369,7 +42369,7 @@ var require_lib = __commonJS((exports) => {
42369
42369
  this.state.labels.pop();
42370
42370
  return this.finishNode(node, "ForStatement");
42371
42371
  }
42372
- parseForIn(node, init2, awaitAt) {
42372
+ parseForIn(node, init, awaitAt) {
42373
42373
  const isForIn = this.match(58);
42374
42374
  this.next();
42375
42375
  if (isForIn) {
@@ -42378,19 +42378,19 @@ var require_lib = __commonJS((exports) => {
42378
42378
  } else {
42379
42379
  node.await = awaitAt !== null;
42380
42380
  }
42381
- if (init2.type === "VariableDeclaration" && init2.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init2.kind !== "var" || init2.declarations[0].id.type !== "Identifier")) {
42382
- this.raise(Errors.ForInOfLoopInitializer, init2, {
42381
+ if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
42382
+ this.raise(Errors.ForInOfLoopInitializer, init, {
42383
42383
  type: isForIn ? "ForInStatement" : "ForOfStatement"
42384
42384
  });
42385
42385
  }
42386
- if (init2.type === "AssignmentPattern") {
42387
- this.raise(Errors.InvalidLhs, init2, {
42386
+ if (init.type === "AssignmentPattern") {
42387
+ this.raise(Errors.InvalidLhs, init, {
42388
42388
  ancestor: {
42389
42389
  type: "ForStatement"
42390
42390
  }
42391
42391
  });
42392
42392
  }
42393
- node.left = init2;
42393
+ node.left = init;
42394
42394
  node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
42395
42395
  this.expect(11);
42396
42396
  node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement());
@@ -55779,7 +55779,7 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
55779
55779
  intToChar[i] = c2;
55780
55780
  charToInt[c2] = i;
55781
55781
  }
55782
- function decodeInteger(reader, relative3) {
55782
+ function decodeInteger(reader, relative) {
55783
55783
  let value = 0;
55784
55784
  let shift = 0;
55785
55785
  let integer2 = 0;
@@ -55794,10 +55794,10 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
55794
55794
  if (shouldNegate) {
55795
55795
  value = -2147483648 | -value;
55796
55796
  }
55797
- return relative3 + value;
55797
+ return relative + value;
55798
55798
  }
55799
- function encodeInteger(builder, num, relative3) {
55800
- let delta = num - relative3;
55799
+ function encodeInteger(builder, num, relative) {
55800
+ let delta = num - relative;
55801
55801
  delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
55802
55802
  do {
55803
55803
  let clamped = delta & 31;
@@ -56305,7 +56305,7 @@ var require_resolve_uri_umd = __commonJS((exports, module) => {
56305
56305
  }
56306
56306
  url2.path = path2;
56307
56307
  }
56308
- function resolve3(input, base) {
56308
+ function resolve(input, base) {
56309
56309
  if (!input && !base)
56310
56310
  return "";
56311
56311
  const url2 = parseUrl(input);
@@ -56352,7 +56352,7 @@ var require_resolve_uri_umd = __commonJS((exports, module) => {
56352
56352
  return url2.scheme + "//" + url2.user + url2.host + url2.port + url2.path + queryHash;
56353
56353
  }
56354
56354
  }
56355
- return resolve3;
56355
+ return resolve;
56356
56356
  });
56357
56357
  });
56358
56358
 
@@ -56681,8 +56681,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
56681
56681
  this.sources = sources;
56682
56682
  this.sourcesContent = sourcesContent;
56683
56683
  this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;
56684
- const resolve3 = resolver(mapUrl, sourceRoot);
56685
- this.resolvedSources = sources.map(resolve3);
56684
+ const resolve = resolver(mapUrl, sourceRoot);
56685
+ this.resolvedSources = sources.map(resolve);
56686
56686
  const { mappings } = parsed;
56687
56687
  if (typeof mappings === "string") {
56688
56688
  this._encoded = mappings;
@@ -68012,6 +68012,413 @@ var init_eval = __esm(() => {
68012
68012
  init_workflow_tool_metadata();
68013
68013
  });
68014
68014
 
68015
+ // ../types/src/git-source/grammar.ts
68016
+ function pathToDottedPackageName(path2) {
68017
+ const parsed = SourcePackagePathSchema.parse(path2);
68018
+ return DottedPackageNameSchema.parse(parsed.split("/").join("."));
68019
+ }
68020
+ function dottedPackageNameToPath(name) {
68021
+ const parsed = DottedPackageNameSchema.parse(name);
68022
+ return SourcePackagePathSchema.parse(parsed.split(".").join("/"));
68023
+ }
68024
+ function formatReleaseTag(name, version2) {
68025
+ return ReleaseTagSchema.parse(`${DottedPackageNameSchema.parse(name)}@${version2}`);
68026
+ }
68027
+ function parseReleaseTag(tag) {
68028
+ const parsed = ReleaseTagSchema.parse(tag);
68029
+ const [packageName, version2] = parsed.split("@");
68030
+ return {
68031
+ packageName: DottedPackageNameSchema.parse(packageName),
68032
+ packagePath: dottedPackageNameToPath(packageName),
68033
+ version: version2
68034
+ };
68035
+ }
68036
+ function formatHostedSourceExportPath({
68037
+ gitRepositoryPath,
68038
+ ref,
68039
+ packagePath
68040
+ }) {
68041
+ const parsedPackagePath = SourcePackagePathSchema.parse(packagePath);
68042
+ if (!gitRepositoryPath.trim()) {
68043
+ throw new Error("gitRepositoryPath is required");
68044
+ }
68045
+ if (!ref.trim()) {
68046
+ throw new Error("ref is required");
68047
+ }
68048
+ return `/export/orgs/${encodeURIComponent(gitRepositoryPath)}/${encodeURIComponent(ref)}/${parsedPackagePath}`;
68049
+ }
68050
+ var SOURCE_PACKAGE_SEGMENT_PATTERN, SOURCE_COMMIT_SHA_PATTERN, SOURCE_SEMVER_PATTERN, SOURCE_VERSION_RANGE_PATTERN, SourcePackageSegmentSchema, SourcePackageTypeSchema, SourcePackagePathSchema, DottedPackageNameSchema, SourceVersionRefSchema, ReleaseTagSchema, WorkspaceDependencySchema, AutomationTargetSchema;
68051
+ var init_grammar = __esm(() => {
68052
+ init_zod();
68053
+ SOURCE_PACKAGE_SEGMENT_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
68054
+ SOURCE_COMMIT_SHA_PATTERN = /^[0-9a-f]{40}$/;
68055
+ SOURCE_SEMVER_PATTERN = /^[0-9]+\.[0-9]+\.[0-9]+$/;
68056
+ SOURCE_VERSION_RANGE_PATTERN = /^[0-9]+(?:\.[0-9]+)?\.(?:x|\*)$/;
68057
+ SourcePackageSegmentSchema = exports_external.string().regex(SOURCE_PACKAGE_SEGMENT_PATTERN, "Use lowercase letters, numbers, dashes, and underscores");
68058
+ SourcePackageTypeSchema = exports_external.enum(["agents", "workflows", "resources", "evaluators"]);
68059
+ SourcePackagePathSchema = exports_external.string().superRefine((value, ctx) => {
68060
+ const parts = value.split("/");
68061
+ if (parts.length < 2) {
68062
+ ctx.addIssue({
68063
+ code: "custom",
68064
+ message: "Package path must include a root and at least one segment"
68065
+ });
68066
+ return;
68067
+ }
68068
+ if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
68069
+ ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
68070
+ }
68071
+ for (const segment of parts.slice(1)) {
68072
+ if (!SourcePackageSegmentSchema.safeParse(segment).success) {
68073
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
68074
+ }
68075
+ }
68076
+ });
68077
+ DottedPackageNameSchema = exports_external.string().superRefine((value, ctx) => {
68078
+ const parts = value.split(".");
68079
+ if (parts.length < 2) {
68080
+ ctx.addIssue({
68081
+ code: "custom",
68082
+ message: "Dotted package name must include a root and at least one segment"
68083
+ });
68084
+ return;
68085
+ }
68086
+ if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
68087
+ ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
68088
+ }
68089
+ for (const segment of parts.slice(1)) {
68090
+ if (!SourcePackageSegmentSchema.safeParse(segment).success) {
68091
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
68092
+ }
68093
+ }
68094
+ });
68095
+ SourceVersionRefSchema = exports_external.union([
68096
+ exports_external.literal("latest"),
68097
+ exports_external.literal("main"),
68098
+ exports_external.string().regex(SOURCE_SEMVER_PATTERN),
68099
+ exports_external.string().regex(SOURCE_VERSION_RANGE_PATTERN),
68100
+ exports_external.string().regex(SOURCE_COMMIT_SHA_PATTERN)
68101
+ ]);
68102
+ ReleaseTagSchema = exports_external.string().superRefine((value, ctx) => {
68103
+ const [name, version2, extra] = value.split("@");
68104
+ if (!name || !version2 || extra !== undefined) {
68105
+ ctx.addIssue({ code: "custom", message: "Release tags must be <package>@<X.Y.Z>" });
68106
+ return;
68107
+ }
68108
+ if (!DottedPackageNameSchema.safeParse(name).success) {
68109
+ ctx.addIssue({ code: "custom", message: `Invalid package name: ${name}` });
68110
+ }
68111
+ if (!SOURCE_SEMVER_PATTERN.test(version2)) {
68112
+ ctx.addIssue({ code: "custom", message: `Invalid release version: ${version2}` });
68113
+ }
68114
+ });
68115
+ WorkspaceDependencySchema = exports_external.string().superRefine((value, ctx) => {
68116
+ if (!value.startsWith("workspace:")) {
68117
+ ctx.addIssue({ code: "custom", message: "Workspace dependencies must start with workspace:" });
68118
+ return;
68119
+ }
68120
+ const ref = value.slice("workspace:".length);
68121
+ const [name, version2, extra] = ref.split("@");
68122
+ if (!name || !version2 || extra !== undefined) {
68123
+ ctx.addIssue({
68124
+ code: "custom",
68125
+ message: "Workspace dependencies must be workspace:<package>@<X.Y.Z>"
68126
+ });
68127
+ return;
68128
+ }
68129
+ if (!DottedPackageNameSchema.safeParse(name).success) {
68130
+ ctx.addIssue({ code: "custom", message: `Invalid dependency package: ${name}` });
68131
+ }
68132
+ if (!SOURCE_SEMVER_PATTERN.test(version2)) {
68133
+ ctx.addIssue({ code: "custom", message: `Invalid dependency version: ${version2}` });
68134
+ }
68135
+ });
68136
+ AutomationTargetSchema = exports_external.string().superRefine((value, ctx) => {
68137
+ const [target, ref, extra] = value.split("@");
68138
+ if (!target || extra !== undefined) {
68139
+ ctx.addIssue({ code: "custom", message: "Automation target must be <package>[@ref]" });
68140
+ return;
68141
+ }
68142
+ if (!DottedPackageNameSchema.safeParse(target).success) {
68143
+ ctx.addIssue({ code: "custom", message: `Invalid automation target: ${target}` });
68144
+ }
68145
+ if (ref && !SourceVersionRefSchema.safeParse(ref).success) {
68146
+ ctx.addIssue({ code: "custom", message: `Invalid automation ref: ${ref}` });
68147
+ }
68148
+ });
68149
+ });
68150
+
68151
+ // ../types/src/git-source/manifests.ts
68152
+ function aggregateEvaluatorCompositionScore(results, passThreshold = 0.7) {
68153
+ const threshold = ScoreInUnitIntervalSchema.parse(passThreshold);
68154
+ let numerator = 0;
68155
+ let denominator = 0;
68156
+ for (const result of results) {
68157
+ const score2 = ScoreInUnitIntervalSchema.parse(result.score);
68158
+ const weight = exports_external.number().min(0).parse(result.weight ?? 1);
68159
+ if (weight === 0) {
68160
+ continue;
68161
+ }
68162
+ numerator += score2 * weight;
68163
+ denominator += weight;
68164
+ }
68165
+ if (denominator === 0) {
68166
+ return { score: null, passed: false };
68167
+ }
68168
+ const score = numerator / denominator;
68169
+ return { score, passed: score >= threshold };
68170
+ }
68171
+ function workspaceDependencyNameToPackagePath(name) {
68172
+ const parsedName = WorkspaceDependencyNameSchema.parse(name);
68173
+ return dottedPackageNameToPath(DottedPackageNameSchema.parse(parsedName.slice("workspace:".length)));
68174
+ }
68175
+ function hasFile(files, file2) {
68176
+ return files.includes(file2);
68177
+ }
68178
+ function hasMatchingFile(files, predicate) {
68179
+ return files.some((file2) => !file2.startsWith("../") && !file2.startsWith("/") && predicate(file2));
68180
+ }
68181
+ function isLocalAgentResourcePath({
68182
+ packagePath,
68183
+ relativePath
68184
+ }) {
68185
+ const parsedPath = SourcePackagePathSchema.parse(packagePath);
68186
+ const [root] = parsedPath.split("/");
68187
+ if (root !== "agents") {
68188
+ return false;
68189
+ }
68190
+ const [directory] = relativePath.split("/");
68191
+ return LocalAgentResourceDirectorySchema.safeParse(directory).success;
68192
+ }
68193
+ function validateSourcePackageRequiredFiles({
68194
+ packagePath,
68195
+ files
68196
+ }) {
68197
+ const parsedPath = SourcePackagePathSchema.parse(packagePath);
68198
+ const [root, resourceKind] = parsedPath.split("/");
68199
+ const issues = [];
68200
+ if (root === "agents" && !hasFile(files, "AGENT.md")) {
68201
+ issues.push({
68202
+ code: "missing-required-file",
68203
+ path: "AGENT.md",
68204
+ message: "Agent packages must include AGENT.md"
68205
+ });
68206
+ }
68207
+ if (root === "evaluators" && !hasFile(files, "evaluator.yaml")) {
68208
+ issues.push({
68209
+ code: "missing-required-file",
68210
+ path: "evaluator.yaml",
68211
+ message: "Shared evaluator packages must include evaluator.yaml"
68212
+ });
68213
+ }
68214
+ if (root !== "resources") {
68215
+ return issues;
68216
+ }
68217
+ if (resourceKind === "skills") {
68218
+ if (!hasFile(files, "SKILL.md")) {
68219
+ issues.push({
68220
+ code: "missing-required-file",
68221
+ path: "SKILL.md",
68222
+ message: "Shared skill packages must include SKILL.md"
68223
+ });
68224
+ }
68225
+ return issues;
68226
+ }
68227
+ if (resourceKind === "templates") {
68228
+ if (!hasMatchingFile(files, (file2) => SOURCE_TEMPLATE_FILE_PATTERN.test(file2))) {
68229
+ issues.push({
68230
+ code: "missing-content-file",
68231
+ message: "Template packages must include at least one .docx or .xlsx file"
68232
+ });
68233
+ }
68234
+ return issues;
68235
+ }
68236
+ if (resourceKind === "rules" || resourceKind === "knowledge") {
68237
+ if (!hasMatchingFile(files, (file2) => file2.toLowerCase().endsWith(".md"))) {
68238
+ issues.push({
68239
+ code: "missing-content-file",
68240
+ message: `${resourceKind === "rules" ? "Rule" : "Knowledge"} packages must include at least one markdown file`
68241
+ });
68242
+ }
68243
+ return issues;
68244
+ }
68245
+ issues.push({
68246
+ code: "unsupported-resource-kind",
68247
+ message: `Unsupported resource package kind: ${resourceKind ?? "(missing)"}`
68248
+ });
68249
+ return issues;
68250
+ }
68251
+ var SOURCE_MANIFEST_FILENAME = "eigenpal.yaml", UNSUPPORTED_SOURCE_MANIFEST_FILENAME = "eigenpal.yml", SourceManifestSchemaVersionSchema, SourceManifestFilenameSchema, LocalAgentResourceDirectorySchema, WorkspaceDependencyNameSchema, WorkspaceDependencyVersionSchema, ScoreInUnitIntervalSchema, LocalEvaluatorReferenceSchema, SharedEvaluatorReferenceSchema, EvaluatorCompositionItemBaseSchema, LocalEvaluatorCompositionItemSchema, SharedEvaluatorCompositionItemSchema, EvaluatorCompositionItemSchema, EvaluatorCompositionSchema, DependencyMapSchema, TriggerConfigSchema, CommonPackageManifestFields, RootSourceManifestSchema, AgentPackageManifestSchema, WorkflowPackageManifestSchema, SharedResourcePackageManifestSchema, EvaluatorPackageManifestSchema, EvaluatorDefinitionSchema, SourcePackageManifestSchema, SOURCE_TEMPLATE_FILE_PATTERN;
68252
+ var init_manifests = __esm(() => {
68253
+ init_zod();
68254
+ init_evaluator_config();
68255
+ init_grammar();
68256
+ SourceManifestSchemaVersionSchema = exports_external.literal(1);
68257
+ SourceManifestFilenameSchema = exports_external.string().superRefine((value, ctx) => {
68258
+ const filename = value.split(/[\\/]/).pop() ?? value;
68259
+ if (filename === UNSUPPORTED_SOURCE_MANIFEST_FILENAME) {
68260
+ ctx.addIssue({
68261
+ code: "custom",
68262
+ message: "Use eigenpal.yaml; eigenpal.yml package manifests are not supported"
68263
+ });
68264
+ return;
68265
+ }
68266
+ if (filename !== SOURCE_MANIFEST_FILENAME) {
68267
+ ctx.addIssue({
68268
+ code: "custom",
68269
+ message: "Source manifests must be named eigenpal.yaml"
68270
+ });
68271
+ }
68272
+ });
68273
+ LocalAgentResourceDirectorySchema = exports_external.enum([
68274
+ "skills",
68275
+ "templates",
68276
+ "rules",
68277
+ "knowledge"
68278
+ ]);
68279
+ WorkspaceDependencyNameSchema = exports_external.string().superRefine((value, ctx) => {
68280
+ if (!value.startsWith("workspace:")) {
68281
+ ctx.addIssue({ code: "custom", message: "Dependency names must start with workspace:" });
68282
+ return;
68283
+ }
68284
+ const packageName = value.slice("workspace:".length);
68285
+ if (!DottedPackageNameSchema.safeParse(packageName).success) {
68286
+ ctx.addIssue({ code: "custom", message: `Invalid dependency package: ${packageName}` });
68287
+ }
68288
+ });
68289
+ WorkspaceDependencyVersionSchema = exports_external.string().regex(SOURCE_SEMVER_PATTERN, {
68290
+ message: "Dependency versions must be exact X.Y.Z versions in v0"
68291
+ });
68292
+ ScoreInUnitIntervalSchema = exports_external.number().min(0).max(1);
68293
+ LocalEvaluatorReferenceSchema = exports_external.string().superRefine((value, ctx) => {
68294
+ if (!value.startsWith("./evaluators/")) {
68295
+ ctx.addIssue({
68296
+ code: "custom",
68297
+ message: "Local evaluator refs must start with ./evaluators/"
68298
+ });
68299
+ }
68300
+ if (!value.endsWith(".yaml")) {
68301
+ ctx.addIssue({ code: "custom", message: "Local evaluator refs must point to .yaml files" });
68302
+ }
68303
+ if (value.includes("..") || value.includes("\\")) {
68304
+ ctx.addIssue({ code: "custom", message: "Local evaluator refs must stay inside evaluators/" });
68305
+ }
68306
+ });
68307
+ SharedEvaluatorReferenceSchema = exports_external.string().superRefine((value, ctx) => {
68308
+ const nameResult = WorkspaceDependencyNameSchema.safeParse(value);
68309
+ if (!nameResult.success) {
68310
+ for (const issue2 of nameResult.error.issues) {
68311
+ ctx.addIssue({ code: "custom", message: issue2.message });
68312
+ }
68313
+ return;
68314
+ }
68315
+ const packagePath = workspaceDependencyNameToPackagePath(nameResult.data);
68316
+ const [root] = packagePath.split("/");
68317
+ if (root !== "evaluators") {
68318
+ ctx.addIssue({
68319
+ code: "custom",
68320
+ message: "Shared evaluator refs must use workspace:evaluators.*"
68321
+ });
68322
+ }
68323
+ });
68324
+ EvaluatorCompositionItemBaseSchema = exports_external.object({
68325
+ weight: exports_external.number().min(0).default(1)
68326
+ });
68327
+ LocalEvaluatorCompositionItemSchema = EvaluatorCompositionItemBaseSchema.extend({
68328
+ use: LocalEvaluatorReferenceSchema
68329
+ }).strict();
68330
+ SharedEvaluatorCompositionItemSchema = EvaluatorCompositionItemBaseSchema.extend({
68331
+ use: SharedEvaluatorReferenceSchema,
68332
+ version: WorkspaceDependencyVersionSchema
68333
+ }).strict();
68334
+ EvaluatorCompositionItemSchema = exports_external.union([
68335
+ LocalEvaluatorCompositionItemSchema,
68336
+ SharedEvaluatorCompositionItemSchema
68337
+ ]);
68338
+ EvaluatorCompositionSchema = exports_external.object({
68339
+ passThreshold: ScoreInUnitIntervalSchema.default(0.7),
68340
+ items: exports_external.array(EvaluatorCompositionItemSchema).default([])
68341
+ }).strict();
68342
+ DependencyMapSchema = exports_external.record(WorkspaceDependencyNameSchema, WorkspaceDependencyVersionSchema);
68343
+ TriggerConfigSchema = exports_external.object({
68344
+ api: exports_external.boolean().optional(),
68345
+ email: exports_external.object({
68346
+ enabled: exports_external.boolean().default(true),
68347
+ aliases: exports_external.array(exports_external.string().email()).default([])
68348
+ }).strict().optional()
68349
+ }).strict();
68350
+ CommonPackageManifestFields = {
68351
+ schemaVersion: SourceManifestSchemaVersionSchema,
68352
+ name: exports_external.string().min(1),
68353
+ description: exports_external.string().optional()
68354
+ };
68355
+ RootSourceManifestSchema = exports_external.object({
68356
+ schemaVersion: SourceManifestSchemaVersionSchema,
68357
+ eigenpalVersion: exports_external.string().min(1)
68358
+ }).strict();
68359
+ AgentPackageManifestSchema = exports_external.object({
68360
+ ...CommonPackageManifestFields,
68361
+ model: exports_external.string().optional(),
68362
+ triggers: TriggerConfigSchema.optional(),
68363
+ dependencies: DependencyMapSchema.optional(),
68364
+ evaluators: EvaluatorCompositionSchema.optional()
68365
+ }).strict().superRefine((manifest, ctx) => {
68366
+ for (const dependencyName of Object.keys(manifest.dependencies ?? {})) {
68367
+ const nameResult = WorkspaceDependencyNameSchema.safeParse(dependencyName);
68368
+ if (!nameResult.success) {
68369
+ continue;
68370
+ }
68371
+ const packagePath = workspaceDependencyNameToPackagePath(nameResult.data);
68372
+ const [root] = packagePath.split("/");
68373
+ if (root !== "agents" && root !== "resources") {
68374
+ ctx.addIssue({
68375
+ code: "custom",
68376
+ path: ["dependencies", dependencyName],
68377
+ message: "Agent dependencies may only reference agents or shared resources in v0"
68378
+ });
68379
+ }
68380
+ }
68381
+ });
68382
+ WorkflowPackageManifestSchema = exports_external.object({
68383
+ ...CommonPackageManifestFields,
68384
+ triggers: TriggerConfigSchema.optional(),
68385
+ dependencies: DependencyMapSchema.optional(),
68386
+ evaluators: exports_external.array(exports_external.string().min(1)).optional()
68387
+ }).strict();
68388
+ SharedResourcePackageManifestSchema = exports_external.object(CommonPackageManifestFields).strict();
68389
+ EvaluatorPackageManifestSchema = exports_external.object(CommonPackageManifestFields).strict();
68390
+ EvaluatorDefinitionSchema = exports_external.discriminatedUnion("type", [
68391
+ exports_external.object({
68392
+ schemaVersion: SourceManifestSchemaVersionSchema,
68393
+ type: exports_external.literal("exact-diff"),
68394
+ config: ExactDiffConfigSchema
68395
+ }).strict(),
68396
+ exports_external.object({
68397
+ schemaVersion: SourceManifestSchemaVersionSchema,
68398
+ type: exports_external.literal("llm-judge"),
68399
+ config: LlmJudgeConfigSchema
68400
+ }).strict(),
68401
+ exports_external.object({
68402
+ schemaVersion: SourceManifestSchemaVersionSchema,
68403
+ type: exports_external.literal("custom-script"),
68404
+ config: CustomScriptConfigSchema
68405
+ }).strict()
68406
+ ]);
68407
+ SourcePackageManifestSchema = exports_external.union([
68408
+ AgentPackageManifestSchema,
68409
+ WorkflowPackageManifestSchema,
68410
+ SharedResourcePackageManifestSchema,
68411
+ EvaluatorPackageManifestSchema
68412
+ ]);
68413
+ SOURCE_TEMPLATE_FILE_PATTERN = /\.(?:docx|xlsx)$/i;
68414
+ });
68415
+
68416
+ // ../types/src/git-source/index.ts
68417
+ var init_git_source = __esm(() => {
68418
+ init_grammar();
68419
+ init_manifests();
68420
+ });
68421
+
68015
68422
  // ../types/src/storage/paths.ts
68016
68423
  function seg(name, value) {
68017
68424
  if (!value || !SEGMENT_RX.test(value)) {
@@ -68297,9 +68704,11 @@ var init_s3_path_grammar = __esm(() => {
68297
68704
  // ../types/src/index.ts
68298
68705
  var exports_src = {};
68299
68706
  __export(exports_src, {
68707
+ workspaceDependencyNameToPackagePath: () => workspaceDependencyNameToPackagePath,
68300
68708
  workflowTriggerConfigSchema: () => workflowTriggerConfigSchema,
68301
68709
  valuesMatch: () => valuesMatch,
68302
68710
  validateStepConfig: () => validateStepConfig,
68711
+ validateSourcePackageRequiredFiles: () => validateSourcePackageRequiredFiles,
68303
68712
  validateConfig: () => validateConfig,
68304
68713
  toJsonSchema: () => toJsonSchema,
68305
68714
  suppressRequiredMissingErrorsForSchemaFileFields: () => suppressRequiredMissingErrorsForSchemaFileFields,
@@ -68312,7 +68721,9 @@ __export(exports_src, {
68312
68721
  rootS3Path: () => rootS3Path,
68313
68722
  resolveEffectiveMimeType: () => resolveEffectiveMimeType,
68314
68723
  requiresSpecializedParser: () => requiresSpecializedParser,
68724
+ pathToDottedPackageName: () => pathToDottedPackageName,
68315
68725
  parseStepType: () => parseStepType,
68726
+ parseReleaseTag: () => parseReleaseTag,
68316
68727
  parseFileKey: () => parseFileKey,
68317
68728
  noopTracingContext: () => noopTracingContext,
68318
68729
  mapOCRAttributes: () => mapOCRAttributes,
@@ -68327,6 +68738,7 @@ __export(exports_src, {
68327
68738
  isStepCategory: () => isStepCategory,
68328
68739
  isOutputSchemaUnknown: () => isOutputSchemaUnknown,
68329
68740
  isNonSuccessTerminalExecutionStatus: () => isNonSuccessTerminalExecutionStatus,
68741
+ isLocalAgentResourcePath: () => isLocalAgentResourcePath,
68330
68742
  isFilePathDescriptor: () => isFilePathDescriptor,
68331
68743
  isFileOutput: () => isFileOutput,
68332
68744
  hasTriggerMethod: () => hasTriggerMethod,
@@ -68348,6 +68760,8 @@ __export(exports_src, {
68348
68760
  getActualDataFromResult: () => getActualDataFromResult,
68349
68761
  generateId: () => generateId,
68350
68762
  formatZodError: () => formatZodError,
68763
+ formatReleaseTag: () => formatReleaseTag,
68764
+ formatHostedSourceExportPath: () => formatHostedSourceExportPath,
68351
68765
  formatDiffValue: () => formatDiffValue,
68352
68766
  fileFieldNamesFromJsonSchema: () => fileFieldNamesFromJsonSchema,
68353
68767
  fieldStemFromGoldenName: () => fieldStemFromGoldenName,
@@ -68356,6 +68770,7 @@ __export(exports_src, {
68356
68770
  evalInputKey: () => evalInputKey,
68357
68771
  evalExpectedKey: () => evalExpectedKey,
68358
68772
  errorHintFor: () => errorHintFor,
68773
+ dottedPackageNameToPath: () => dottedPackageNameToPath,
68359
68774
  defaultScriptFunction: () => defaultScriptFunction,
68360
68775
  defaultScoreFunction: () => defaultScoreFunction,
68361
68776
  convertTsTypeToJsonSchema: () => convertTsTypeToJsonSchema,
@@ -68367,12 +68782,17 @@ __export(exports_src, {
68367
68782
  buildDiscreteJudgeSystemPrompt: () => buildDiscreteJudgeSystemPrompt,
68368
68783
  buildContinuousJudgeSystemPrompt: () => buildContinuousJudgeSystemPrompt,
68369
68784
  aliasReplyConfigSchema: () => aliasReplyConfigSchema,
68785
+ aggregateEvaluatorCompositionScore: () => aggregateEvaluatorCompositionScore,
68370
68786
  addEigenpalContext: () => addEigenpalContext,
68371
68787
  XlsxToJsonOutputSchema: () => XlsxToJsonOutputSchema,
68372
68788
  XlsxToJsonInputSchema: () => XlsxToJsonInputSchema,
68373
68789
  XlsxToJsonConfigSchema: () => XlsxToJsonConfigSchema,
68790
+ WorkspaceDependencyVersionSchema: () => WorkspaceDependencyVersionSchema,
68791
+ WorkspaceDependencySchema: () => WorkspaceDependencySchema,
68792
+ WorkspaceDependencyNameSchema: () => WorkspaceDependencyNameSchema,
68374
68793
  WorkflowSettingsSchema: () => WorkflowSettingsSchema,
68375
68794
  WorkflowResultSchema: () => WorkflowResultSchema,
68795
+ WorkflowPackageManifestSchema: () => WorkflowPackageManifestSchema,
68376
68796
  WorkflowNameSchema: () => WorkflowNameSchema,
68377
68797
  WorkflowMetaSchema: () => WorkflowMetaSchema,
68378
68798
  WorkflowInputDefSchema: () => WorkflowInputDefSchema,
@@ -68385,6 +68805,7 @@ __export(exports_src, {
68385
68805
  WORKFLOW_TOOL_METADATA: () => WORKFLOW_TOOL_METADATA,
68386
68806
  WORKFLOW_NAME_PATTERN: () => WORKFLOW_NAME_PATTERN,
68387
68807
  WORKFLOW_EXECUTION_STATUSES: () => WORKFLOW_EXECUTION_STATUSES,
68808
+ UNSUPPORTED_SOURCE_MANIFEST_FILENAME: () => UNSUPPORTED_SOURCE_MANIFEST_FILENAME,
68388
68809
  TriggerTypeValue: () => TriggerTypeValue,
68389
68810
  TriggerTypeSchema: () => TriggerTypeSchema,
68390
68811
  TriggerMethodsSchema: () => TriggerMethodsSchema,
@@ -68432,14 +68853,31 @@ __export(exports_src, {
68432
68853
  SpanTypes: () => SpanTypes,
68433
68854
  SpanKindMap: () => SpanKindMap,
68434
68855
  SpanKind: () => import_api.SpanKind,
68856
+ SourceVersionRefSchema: () => SourceVersionRefSchema,
68857
+ SourcePackageTypeSchema: () => SourcePackageTypeSchema,
68858
+ SourcePackageSegmentSchema: () => SourcePackageSegmentSchema,
68859
+ SourcePackagePathSchema: () => SourcePackagePathSchema,
68860
+ SourcePackageManifestSchema: () => SourcePackageManifestSchema,
68861
+ SourceManifestSchemaVersionSchema: () => SourceManifestSchemaVersionSchema,
68862
+ SourceManifestFilenameSchema: () => SourceManifestFilenameSchema,
68863
+ SharedResourcePackageManifestSchema: () => SharedResourcePackageManifestSchema,
68864
+ SharedEvaluatorReferenceSchema: () => SharedEvaluatorReferenceSchema,
68865
+ SharedEvaluatorCompositionItemSchema: () => SharedEvaluatorCompositionItemSchema,
68435
68866
  ScopeStackSchema: () => ScopeStackSchema,
68436
68867
  ScopeEntryTypeSchema: () => ScopeEntryTypeSchema,
68437
68868
  ScopeEntrySchema: () => ScopeEntrySchema,
68438
68869
  STEP_TYPES: () => STEP_TYPES,
68439
68870
  STEP_SCHEMAS: () => STEP_SCHEMAS,
68440
68871
  STEP_EXECUTION_STATUSES: () => STEP_EXECUTION_STATUSES,
68872
+ SOURCE_VERSION_RANGE_PATTERN: () => SOURCE_VERSION_RANGE_PATTERN,
68873
+ SOURCE_SEMVER_PATTERN: () => SOURCE_SEMVER_PATTERN,
68874
+ SOURCE_PACKAGE_SEGMENT_PATTERN: () => SOURCE_PACKAGE_SEGMENT_PATTERN,
68875
+ SOURCE_MANIFEST_FILENAME: () => SOURCE_MANIFEST_FILENAME,
68876
+ SOURCE_COMMIT_SHA_PATTERN: () => SOURCE_COMMIT_SHA_PATTERN,
68441
68877
  SCRIPT_FN_MAX_BYTES: () => SCRIPT_FN_MAX_BYTES,
68442
68878
  S3_PATH_GRAMMAR: () => S3_PATH_GRAMMAR,
68879
+ RootSourceManifestSchema: () => RootSourceManifestSchema,
68880
+ ReleaseTagSchema: () => ReleaseTagSchema,
68443
68881
  ProcessorPortSchema: () => ProcessorPortSchema,
68444
68882
  ProcessorExecutionContextSchema: () => ProcessorExecutionContextSchema,
68445
68883
  ProcessorDefinitionSchema: () => ProcessorDefinitionSchema,
@@ -68471,6 +68909,9 @@ __export(exports_src, {
68471
68909
  MergeConfigSchema: () => MergeConfigSchema,
68472
68910
  ManualTriggerMethodSchema: () => ManualTriggerMethodSchema,
68473
68911
  MAX_PAGE_SIZE: () => MAX_PAGE_SIZE,
68912
+ LocalEvaluatorReferenceSchema: () => LocalEvaluatorReferenceSchema,
68913
+ LocalEvaluatorCompositionItemSchema: () => LocalEvaluatorCompositionItemSchema,
68914
+ LocalAgentResourceDirectorySchema: () => LocalAgentResourceDirectorySchema,
68474
68915
  LlmJudgeConfigSchema: () => LlmJudgeConfigSchema,
68475
68916
  LayoutElementTypeSchema: () => LayoutElementTypeSchema,
68476
68917
  LayoutElementSchema: () => LayoutElementSchema,
@@ -68499,7 +68940,11 @@ __export(exports_src, {
68499
68940
  EvaluatorsImportRequestSchema: () => EvaluatorsImportRequestSchema,
68500
68941
  EvaluatorTypeSchema: () => EvaluatorTypeSchema,
68501
68942
  EvaluatorResultSchema: () => EvaluatorResultSchema,
68943
+ EvaluatorPackageManifestSchema: () => EvaluatorPackageManifestSchema,
68944
+ EvaluatorDefinitionSchema: () => EvaluatorDefinitionSchema,
68502
68945
  EvaluatorConfigSchema: () => EvaluatorConfigSchema,
68946
+ EvaluatorCompositionSchema: () => EvaluatorCompositionSchema,
68947
+ EvaluatorCompositionItemSchema: () => EvaluatorCompositionItemSchema,
68503
68948
  EvaluatorBaseEntrySchema: () => EvaluatorBaseEntrySchema,
68504
68949
  EvalResultsExportQuerySchema: () => EvalResultsExportQuerySchema,
68505
68950
  EvalResultsExportJsonSchema: () => EvalResultsExportJsonSchema,
@@ -68523,6 +68968,7 @@ __export(exports_src, {
68523
68968
  EXECUTION_AGENT_METRICS_STATUSES: () => EXECUTION_AGENT_METRICS_STATUSES,
68524
68969
  EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES: () => EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES,
68525
68970
  ERROR_HINTS: () => ERROR_HINTS,
68971
+ DottedPackageNameSchema: () => DottedPackageNameSchema,
68526
68972
  DocumentParserOutputSchema: () => DocumentParserOutputSchema,
68527
68973
  DocumentParserInputSchema: () => DocumentParserInputSchema,
68528
68974
  DocumentParserConfigSchema: () => DocumentParserConfigSchema,
@@ -68560,6 +69006,7 @@ __export(exports_src, {
68560
69006
  BoundingRegionSchema: () => BoundingRegionSchema,
68561
69007
  BlockStepSchema: () => BlockStepSchema,
68562
69008
  BaseEntitySchema: () => BaseEntitySchema,
69009
+ AutomationTargetSchema: () => AutomationTargetSchema,
68563
69010
  ApprovalStepSchema: () => ApprovalStepSchema,
68564
69011
  ApprovalOutputSchema: () => ApprovalOutputSchema,
68565
69012
  ApprovalInputSchema: () => ApprovalInputSchema,
@@ -68569,6 +69016,7 @@ __export(exports_src, {
68569
69016
  AiParseConfigSchema: () => AiParseConfigSchema,
68570
69017
  AiExtractOutputSchema: () => AiExtractOutputSchema,
68571
69018
  AiExtractConfigSchema: () => AiExtractConfigSchema,
69019
+ AgentPackageManifestSchema: () => AgentPackageManifestSchema,
68572
69020
  ActionTypeValue: () => ActionTypeValue,
68573
69021
  ActionTypeSchema: () => ActionTypeSchema,
68574
69022
  ActionStepSchema: () => ActionStepSchema,
@@ -68589,6 +69037,7 @@ var init_src = __esm(() => {
68589
69037
  init_s3_path_grammar();
68590
69038
  init_workflow2();
68591
69039
  init_eval();
69040
+ init_git_source();
68592
69041
  init_typed_script();
68593
69042
  });
68594
69043
 
@@ -69662,7 +70111,7 @@ var __defProp2, __export2 = (target, all) => {
69662
70111
  }
69663
70112
  const implementation = getImplementation.call(object2) ?? object2[methodName];
69664
70113
  return implementation.apply(object2, arguments_);
69665
- }, at3, method_at_default, noop = () => {}, noop_default, DOC_TYPE_STRING = "string", DOC_TYPE_ARRAY = "array", DOC_TYPE_CURSOR = "cursor", DOC_TYPE_INDENT = "indent", DOC_TYPE_ALIGN = "align", DOC_TYPE_TRIM = "trim", DOC_TYPE_GROUP = "group", DOC_TYPE_FILL = "fill", DOC_TYPE_IF_BREAK = "if-break", DOC_TYPE_INDENT_IF_BREAK = "indent-if-break", DOC_TYPE_LINE_SUFFIX = "line-suffix", DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary", DOC_TYPE_LINE = "line", DOC_TYPE_LABEL = "label", DOC_TYPE_BREAK_PARENT = "break-parent", VALID_OBJECT_DOC_TYPES, get_doc_type_default, disjunctionListFormat = (list) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list), InvalidDocError, invalid_doc_error_default, traverseDocOnExitStackMarker, traverse_doc_default, assertDoc, assertDocArray, assertDocFillParts, assertAlignType, breakParent, cursor, line, softline, hardlineWithoutBreakParent, hardline, literallineWithoutBreakParent, literalline, lineSuffixBoundary, trim, stringReplaceAll, replaceAll, method_replace_all_default, OPTION_CR = "cr", OPTION_CRLF = "crlf", CHARACTER_CR = "\r", CHARACTER_CRLF = `\r
70114
+ }, at3, method_at_default, noop = () => {}, noop_default, DOC_TYPE_STRING = "string", DOC_TYPE_ARRAY = "array", DOC_TYPE_CURSOR = "cursor", DOC_TYPE_INDENT = "indent", DOC_TYPE_ALIGN = "align", DOC_TYPE_TRIM = "trim", DOC_TYPE_GROUP = "group", DOC_TYPE_FILL = "fill", DOC_TYPE_IF_BREAK = "if-break", DOC_TYPE_INDENT_IF_BREAK = "indent-if-break", DOC_TYPE_LINE_SUFFIX = "line-suffix", DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary", DOC_TYPE_LINE = "line", DOC_TYPE_LABEL = "label", DOC_TYPE_BREAK_PARENT = "break-parent", VALID_OBJECT_DOC_TYPES, get_doc_type_default, disjunctionListFormat = (list2) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list2), InvalidDocError, invalid_doc_error_default, traverseDocOnExitStackMarker, traverse_doc_default, assertDoc, assertDocArray, assertDocFillParts, assertAlignType, breakParent, cursor, line, softline, hardlineWithoutBreakParent, hardline, literallineWithoutBreakParent, literalline, lineSuffixBoundary, trim, stringReplaceAll, replaceAll, method_replace_all_default, OPTION_CR = "cr", OPTION_CRLF = "crlf", CHARACTER_CR = "\r", CHARACTER_CRLF = `\r
69666
70115
  `, CHARACTER_LF = `
69667
70116
  `, DEFAULT_EOL, emoji_regex_default = () => {
69668
70117
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
@@ -156994,14 +157443,14 @@ import { createRequire as __prettierCreateRequire } from "module";
156994
157443
  import { fileURLToPath as __prettierFileUrlToPath } from "url";
156995
157444
  import { dirname as __prettierDirname } from "path";
156996
157445
  import path10 from "path";
156997
- import * as path2 from "path";
157446
+ import * as path3 from "path";
156998
157447
  import * as url2 from "url";
156999
157448
  import path5 from "path";
157000
157449
  import * as path4 from "path";
157001
157450
  import * as fs8 from "fs/promises";
157002
157451
  import * as path22 from "path";
157003
157452
  import process22 from "process";
157004
- import * as path3 from "path";
157453
+ import * as path32 from "path";
157005
157454
  import process3 from "process";
157006
157455
  import path9 from "path";
157007
157456
  import { pathToFileURL as pathToFileURL2 } from "url";
@@ -157009,7 +157458,7 @@ import fs22 from "fs/promises";
157009
157458
  import path8 from "path";
157010
157459
  import { pathToFileURL as pathToFileURL4 } from "url";
157011
157460
  import assert3 from "assert";
157012
- import { statSync as statSync4, realpathSync } from "fs";
157461
+ import { statSync as statSync5, realpathSync as realpathSync2 } from "fs";
157013
157462
  import process4 from "process";
157014
157463
  import { fileURLToPath as fileURLToPath4, pathToFileURL as pathToFileURL3 } from "url";
157015
157464
  import path7 from "path";
@@ -157346,13 +157795,13 @@ function getDescription(key2, value, expected, descriptor) {
157346
157795
  `but received ${value === VALUE_NOT_EXIST ? import_picocolors22.default.gray("nothing") : import_picocolors22.default.red(descriptor.value(value))}.`
157347
157796
  ].join(" ");
157348
157797
  }
157349
- function getListDescription({ text, list }, printWidth) {
157798
+ function getListDescription({ text, list: list2 }, printWidth) {
157350
157799
  const descriptions = [];
157351
157800
  if (text) {
157352
157801
  descriptions.push(`- ${import_picocolors22.default.blue(text)}`);
157353
157802
  }
157354
- if (list) {
157355
- descriptions.push([`- ${import_picocolors22.default.blue(list.title)}:`].concat(list.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join(`
157803
+ if (list2) {
157804
+ descriptions.push([`- ${import_picocolors22.default.blue(list2.title)}:`].concat(list2.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join(`
157356
157805
  `));
157357
157806
  }
157358
157807
  return chooseDescription(descriptions, printWidth);
@@ -157464,16 +157913,16 @@ function normalizeExpectedResult(result) {
157464
157913
  if (typeof result === "string") {
157465
157914
  return { text: result };
157466
157915
  }
157467
- const { text, list } = result;
157468
- assert4((text || list) !== undefined, "Unexpected `expected` result, there should be at least one field.");
157469
- if (!list) {
157916
+ const { text, list: list2 } = result;
157917
+ assert4((text || list2) !== undefined, "Unexpected `expected` result, there should be at least one field.");
157918
+ if (!list2) {
157470
157919
  return { text };
157471
157920
  }
157472
157921
  return {
157473
157922
  text,
157474
157923
  list: {
157475
- title: list.title,
157476
- values: list.values.map(normalizeExpectedResult)
157924
+ title: list2.title,
157925
+ values: list2.values.map(normalizeExpectedResult)
157477
157926
  }
157478
157927
  };
157479
157928
  }
@@ -157557,15 +158006,15 @@ function* iterateDirectoryUp(from, to5) {
157557
158006
  let directory = toAbsolutePath(from) ?? process3.cwd();
157558
158007
  let stopDirectory = toAbsolutePath(to5);
157559
158008
  if (stopDirectory) {
157560
- const relation = path3.relative(stopDirectory, directory);
158009
+ const relation = path32.relative(stopDirectory, directory);
157561
158010
  if (relation[0] === "." || relation === directory) {
157562
158011
  return;
157563
158012
  }
157564
158013
  }
157565
- stopDirectory = stopDirectory ? directory.slice(0, stopDirectory.length) : path3.parse(directory).root;
158014
+ stopDirectory = stopDirectory ? directory.slice(0, stopDirectory.length) : path32.parse(directory).root;
157566
158015
  while (directory !== stopDirectory) {
157567
158016
  yield directory;
157568
- directory = path3.dirname(directory);
158017
+ directory = path32.dirname(directory);
157569
158018
  }
157570
158019
  yield stopDirectory;
157571
158020
  }
@@ -159053,11 +159502,11 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
159053
159502
  }
159054
159503
  function tryStatSync(path15) {
159055
159504
  try {
159056
- return statSync4(path15);
159505
+ return statSync5(path15);
159057
159506
  } catch {}
159058
159507
  }
159059
159508
  function fileExists(url3) {
159060
- const stats = statSync4(url3, { throwIfNoEntry: false });
159509
+ const stats = statSync5(url3, { throwIfNoEntry: false });
159061
159510
  const isFile2 = stats ? stats.isFile() : undefined;
159062
159511
  return isFile2 === null || isFile2 === undefined ? false : isFile2;
159063
159512
  }
@@ -159126,7 +159575,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
159126
159575
  throw error52;
159127
159576
  }
159128
159577
  if (!preserveSymlinks) {
159129
- const real = realpathSync(filePath);
159578
+ const real = realpathSync2(filePath);
159130
159579
  const { search, hash: hash2 } = resolved;
159131
159580
  resolved = pathToFileURL3(real + (filePath.endsWith(path7.sep) ? "/" : ""));
159132
159581
  resolved.search = search;
@@ -160771,7 +161220,7 @@ async function printEmbedFrontMatter(textToDoc2, print, path15, options8) {
160771
161220
  }
160772
161221
  return markAsRoot2([node.startDelimiter, node.explicitLanguage ?? "", hardline22, doc2, doc2 ? hardline22 : "", node.endDelimiter]);
160773
161222
  }
160774
- function clean(original, cloned) {
161223
+ function clean2(original, cloned) {
160775
161224
  if (isEmbedFrontMatter({ node: original })) {
160776
161225
  delete cloned.end;
160777
161226
  delete cloned.raw;
@@ -161231,8 +161680,8 @@ function massageAst(ast, options8) {
161231
161680
  const {
161232
161681
  printer: printer2
161233
161682
  } = options8;
161234
- const clean2 = printer2.massageAstNode;
161235
- if (!clean2) {
161683
+ const clean22 = printer2.massageAstNode;
161684
+ if (!clean22) {
161236
161685
  return ast;
161237
161686
  }
161238
161687
  const {
@@ -161240,7 +161689,7 @@ function massageAst(ast, options8) {
161240
161689
  } = printer2;
161241
161690
  const {
161242
161691
  ignoredProperties
161243
- } = clean2;
161692
+ } = clean22;
161244
161693
  return recurse(ast);
161245
161694
  function recurse(original, parent) {
161246
161695
  if (!is_object_default(original)) {
@@ -161261,7 +161710,7 @@ function massageAst(ast, options8) {
161261
161710
  cloned[key2] = original[key2];
161262
161711
  }
161263
161712
  }
161264
- const result = clean2(original, cloned, parent);
161713
+ const result = clean22(original, cloned, parent);
161265
161714
  if (result === null) {
161266
161715
  return;
161267
161716
  }
@@ -162212,13 +162661,13 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
162212
162661
  }
162213
162662
  return messages2.join("; ") + ".";
162214
162663
  }, import_picocolors22, VALUE_NOT_EXIST, VALUE_UNCHANGED, INDENTATION, commonInvalidHandler = (key2, value, utils2) => {
162215
- const { text, list } = utils2.normalizeExpectedResult(utils2.schemas[key2].expected(utils2));
162664
+ const { text, list: list2 } = utils2.normalizeExpectedResult(utils2.schemas[key2].expected(utils2));
162216
162665
  const descriptions = [];
162217
162666
  if (text) {
162218
162667
  descriptions.push(getDescription(key2, value, text, utils2.descriptor));
162219
162668
  }
162220
- if (list) {
162221
- descriptions.push([getDescription(key2, value, list.title, utils2.descriptor)].concat(list.values.map((valueDescription) => getListDescription(valueDescription, utils2.loggerPrintWidth))).join(`
162669
+ if (list2) {
162670
+ descriptions.push([getDescription(key2, value, list2.title, utils2.descriptor)].concat(list2.values.map((valueDescription) => getListDescription(valueDescription, utils2.loggerPrintWidth))).join(`
162222
162671
  `));
162223
162672
  }
162224
162673
  return chooseDescription(descriptions, utils2.loggerPrintWidth);
@@ -162444,7 +162893,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
162444
162893
  }
162445
162894
  }
162446
162895
  }
162447
- }, errors_exports, ConfigError, UndefinedParserError, ArgExpansionBailout, create_mockable_default, mockable, mockable_default, import_micromatch, URL_STRING_PREFIX = "file:", isUrlInstance = (value) => value instanceof URL, isUrlString = (value) => typeof value === "string" && value.startsWith(URL_STRING_PREFIX), isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath), toPath = (urlOrPath) => isUrl(urlOrPath) ? url2.fileURLToPath(urlOrPath) : urlOrPath, toAbsolutePath = (urlOrPath) => urlOrPath ? path2.resolve(isUrl(urlOrPath) ? url2.fileURLToPath(urlOrPath) : urlOrPath) : urlOrPath, partition_default, import_editorconfig, isFile = (stats) => stats?.isFile(), isDirectory = (stats) => stats?.isDirectory(), iterate_directory_up_default, Searcher = class {
162896
+ }, errors_exports, ConfigError, UndefinedParserError, ArgExpansionBailout, create_mockable_default, mockable, mockable_default, import_micromatch, URL_STRING_PREFIX = "file:", isUrlInstance = (value) => value instanceof URL, isUrlString = (value) => typeof value === "string" && value.startsWith(URL_STRING_PREFIX), isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath), toPath = (urlOrPath) => isUrl(urlOrPath) ? url2.fileURLToPath(urlOrPath) : urlOrPath, toAbsolutePath = (urlOrPath) => urlOrPath ? path3.resolve(isUrl(urlOrPath) ? url2.fileURLToPath(urlOrPath) : urlOrPath) : urlOrPath, partition_default, import_editorconfig, isFile = (stats) => stats?.isFile(), isDirectory = (stats) => stats?.isDirectory(), iterate_directory_up_default, Searcher = class {
162448
162897
  #stopDirectory;
162449
162898
  #cache;
162450
162899
  #resultCache = /* @__PURE__ */ new Map;
@@ -165500,9 +165949,9 @@ var init_prettier = __esm(() => {
165500
165949
  const index = v11.indexOf("{");
165501
165950
  return index > -1 && v11.indexOf("}", index) > -1;
165502
165951
  };
165503
- var micromatch2 = (list, patterns, options8) => {
165952
+ var micromatch2 = (list2, patterns, options8) => {
165504
165953
  patterns = [].concat(patterns);
165505
- list = [].concat(list);
165954
+ list2 = [].concat(list2);
165506
165955
  let omit2 = /* @__PURE__ */ new Set;
165507
165956
  let keep = /* @__PURE__ */ new Set;
165508
165957
  let items = /* @__PURE__ */ new Set;
@@ -165518,7 +165967,7 @@ var init_prettier = __esm(() => {
165518
165967
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
165519
165968
  if (negated)
165520
165969
  negatives++;
165521
- for (let item of list) {
165970
+ for (let item of list2) {
165522
165971
  let matched = isMatch(item, true);
165523
165972
  let match = negated ? !matched.isMatch : matched.isMatch;
165524
165973
  if (!match)
@@ -165547,7 +165996,7 @@ var init_prettier = __esm(() => {
165547
165996
  micromatch2.matcher = (pattern, options8) => picomatch(pattern, options8);
165548
165997
  micromatch2.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str);
165549
165998
  micromatch2.any = micromatch2.isMatch;
165550
- micromatch2.not = (list, patterns, options8 = {}) => {
165999
+ micromatch2.not = (list2, patterns, options8 = {}) => {
165551
166000
  patterns = [].concat(patterns).map(String);
165552
166001
  let result = /* @__PURE__ */ new Set;
165553
166002
  let items = [];
@@ -165556,7 +166005,7 @@ var init_prettier = __esm(() => {
165556
166005
  options8.onResult(state);
165557
166006
  items.push(state.output);
165558
166007
  };
165559
- let matches = new Set(micromatch2(list, patterns, { ...options8, onResult }));
166008
+ let matches = new Set(micromatch2(list2, patterns, { ...options8, onResult }));
165560
166009
  for (let item of items) {
165561
166010
  if (!matches.has(item)) {
165562
166011
  result.add(item);
@@ -165591,8 +166040,8 @@ var init_prettier = __esm(() => {
165591
166040
  res[key2] = obj[key2];
165592
166041
  return res;
165593
166042
  };
165594
- micromatch2.some = (list, patterns, options8) => {
165595
- let items = [].concat(list);
166043
+ micromatch2.some = (list2, patterns, options8) => {
166044
+ let items = [].concat(list2);
165596
166045
  for (let pattern of [].concat(patterns)) {
165597
166046
  let isMatch = picomatch(String(pattern), options8);
165598
166047
  if (items.some((item) => isMatch(item))) {
@@ -165601,8 +166050,8 @@ var init_prettier = __esm(() => {
165601
166050
  }
165602
166051
  return false;
165603
166052
  };
165604
- micromatch2.every = (list, patterns, options8) => {
165605
- let items = [].concat(list);
166053
+ micromatch2.every = (list2, patterns, options8) => {
166054
+ let items = [].concat(list2);
165606
166055
  for (let pattern of [].concat(patterns)) {
165607
166056
  let isMatch = picomatch(String(pattern), options8);
165608
166057
  if (!items.every((item) => isMatch(item))) {
@@ -166176,7 +166625,7 @@ var init_prettier = __esm(() => {
166176
166625
  Object.defineProperty(exports, "__esModule", { value: true });
166177
166626
  exports.statSync = exports.stat = exports.Settings = undefined;
166178
166627
  var async = require_async();
166179
- var sync = require_sync();
166628
+ var sync2 = require_sync();
166180
166629
  var settings_1 = require_settings();
166181
166630
  exports.Settings = settings_1.default;
166182
166631
  function stat2(path15, optionsOrSettingsOrCallback, callback) {
@@ -166189,7 +166638,7 @@ var init_prettier = __esm(() => {
166189
166638
  exports.stat = stat2;
166190
166639
  function statSync22(path15, optionsOrSettings) {
166191
166640
  const settings = getSettings(optionsOrSettings);
166192
- return sync.read(path15, settings);
166641
+ return sync2.read(path15, settings);
166193
166642
  }
166194
166643
  exports.statSync = statSync22;
166195
166644
  function getSettings(settingsOrOptions = {}) {
@@ -166536,7 +166985,7 @@ var init_prettier = __esm(() => {
166536
166985
  Object.defineProperty(exports, "__esModule", { value: true });
166537
166986
  exports.Settings = exports.scandirSync = exports.scandir = undefined;
166538
166987
  var async = require_async2();
166539
- var sync = require_sync2();
166988
+ var sync2 = require_sync2();
166540
166989
  var settings_1 = require_settings2();
166541
166990
  exports.Settings = settings_1.default;
166542
166991
  function scandir(path15, optionsOrSettingsOrCallback, callback) {
@@ -166549,7 +166998,7 @@ var init_prettier = __esm(() => {
166549
166998
  exports.scandir = scandir;
166550
166999
  function scandirSync(path15, optionsOrSettings) {
166551
167000
  const settings = getSettings(optionsOrSettings);
166552
- return sync.read(path15, settings);
167001
+ return sync2.read(path15, settings);
166553
167002
  }
166554
167003
  exports.scandirSync = scandirSync;
166555
167004
  function getSettings(settingsOrOptions = {}) {
@@ -166576,13 +167025,13 @@ var init_prettier = __esm(() => {
166576
167025
  current.next = null;
166577
167026
  return current;
166578
167027
  }
166579
- function release(obj) {
167028
+ function release2(obj) {
166580
167029
  tail.next = obj;
166581
167030
  tail = obj;
166582
167031
  }
166583
167032
  return {
166584
167033
  get,
166585
- release
167034
+ release: release2
166586
167035
  };
166587
167036
  }
166588
167037
  module.exports = reusify;
@@ -166623,7 +167072,7 @@ var init_prettier = __esm(() => {
166623
167072
  return;
166624
167073
  for (;queueHead && _running < _concurrency; ) {
166625
167074
  _running++;
166626
- release();
167075
+ release2();
166627
167076
  }
166628
167077
  },
166629
167078
  running,
@@ -166668,12 +167117,12 @@ var init_prettier = __esm(() => {
166668
167117
  self2.paused = false;
166669
167118
  if (queueHead === null) {
166670
167119
  _running++;
166671
- release();
167120
+ release2();
166672
167121
  return;
166673
167122
  }
166674
167123
  for (;queueHead && _running < _concurrency; ) {
166675
167124
  _running++;
166676
- release();
167125
+ release2();
166677
167126
  }
166678
167127
  }
166679
167128
  function idle() {
@@ -166682,7 +167131,7 @@ var init_prettier = __esm(() => {
166682
167131
  function push2(value, done) {
166683
167132
  var current = cache3.get();
166684
167133
  current.context = context;
166685
- current.release = release;
167134
+ current.release = release2;
166686
167135
  current.value = value;
166687
167136
  current.callback = done || noop2;
166688
167137
  current.errorHandler = errorHandler;
@@ -166703,7 +167152,7 @@ var init_prettier = __esm(() => {
166703
167152
  function unshift(value, done) {
166704
167153
  var current = cache3.get();
166705
167154
  current.context = context;
166706
- current.release = release;
167155
+ current.release = release2;
166707
167156
  current.value = value;
166708
167157
  current.callback = done || noop2;
166709
167158
  current.errorHandler = errorHandler;
@@ -166721,7 +167170,7 @@ var init_prettier = __esm(() => {
166721
167170
  worker.call(context, current.value, current.worked);
166722
167171
  }
166723
167172
  }
166724
- function release(holder) {
167173
+ function release2(holder) {
166725
167174
  if (holder) {
166726
167175
  cache3.release(holder);
166727
167176
  }
@@ -167860,15 +168309,15 @@ var init_prettier = __esm(() => {
167860
168309
  }
167861
168310
  (function(FastGlob2) {
167862
168311
  FastGlob2.glob = FastGlob2;
167863
- FastGlob2.globSync = sync;
168312
+ FastGlob2.globSync = sync2;
167864
168313
  FastGlob2.globStream = stream;
167865
168314
  FastGlob2.async = FastGlob2;
167866
- function sync(source2, options8) {
168315
+ function sync2(source2, options8) {
167867
168316
  assertPatternsInput(source2);
167868
168317
  const works = getWorks(source2, sync_1.default, options8);
167869
168318
  return utils2.array.flatten(works);
167870
168319
  }
167871
- FastGlob2.sync = sync;
168320
+ FastGlob2.sync = sync2;
167872
168321
  function stream(source2, options8) {
167873
168322
  assertPatternsInput(source2);
167874
168323
  const works = getWorks(source2, stream_1.default, options8);
@@ -168326,8 +168775,8 @@ var init_prettier = __esm(() => {
168326
168775
  }
168327
168776
  } while (++i5);
168328
168777
  }
168329
- inc(release, identifier, identifierBase) {
168330
- if (release.startsWith("pre")) {
168778
+ inc(release2, identifier, identifierBase) {
168779
+ if (release2.startsWith("pre")) {
168331
168780
  if (!identifier && identifierBase === false) {
168332
168781
  throw new Error("invalid increment argument: identifier is empty");
168333
168782
  }
@@ -168338,7 +168787,7 @@ var init_prettier = __esm(() => {
168338
168787
  }
168339
168788
  }
168340
168789
  }
168341
- switch (release) {
168790
+ switch (release2) {
168342
168791
  case "premajor":
168343
168792
  this.prerelease.length = 0;
168344
168793
  this.patch = 0;
@@ -168425,7 +168874,7 @@ var init_prettier = __esm(() => {
168425
168874
  break;
168426
168875
  }
168427
168876
  default:
168428
- throw new Error(`invalid increment argument: ${release}`);
168877
+ throw new Error(`invalid increment argument: ${release2}`);
168429
168878
  }
168430
168879
  this.raw = this.format();
168431
168880
  if (this.build.length) {
@@ -168559,7 +169008,7 @@ var init_prettier = __esm(() => {
168559
169008
  module.exports = Yallist;
168560
169009
  Yallist.Node = Node;
168561
169010
  Yallist.create = Yallist;
168562
- function Yallist(list) {
169011
+ function Yallist(list2) {
168563
169012
  var self2 = this;
168564
169013
  if (!(self2 instanceof Yallist)) {
168565
169014
  self2 = new Yallist;
@@ -168567,8 +169016,8 @@ var init_prettier = __esm(() => {
168567
169016
  self2.tail = null;
168568
169017
  self2.head = null;
168569
169018
  self2.length = 0;
168570
- if (list && typeof list.forEach === "function") {
168571
- list.forEach(function(item) {
169019
+ if (list2 && typeof list2.forEach === "function") {
169020
+ list2.forEach(function(item) {
168572
169021
  self2.push(item);
168573
169022
  });
168574
169023
  } else if (arguments.length > 0) {
@@ -168857,11 +169306,11 @@ var init_prettier = __esm(() => {
168857
169306
  }
168858
169307
  self2.length++;
168859
169308
  }
168860
- function Node(value, prev, next, list) {
169309
+ function Node(value, prev, next, list2) {
168861
169310
  if (!(this instanceof Node)) {
168862
- return new Node(value, prev, next, list);
169311
+ return new Node(value, prev, next, list2);
168863
169312
  }
168864
- this.list = list;
169313
+ this.list = list2;
168865
169314
  this.value = value;
168866
169315
  if (prev) {
168867
169316
  prev.next = this;
@@ -169359,7 +169808,7 @@ var init_prettier = __esm(() => {
169359
169808
  minimatch.filter = filter2;
169360
169809
  function filter2(pattern, options8) {
169361
169810
  options8 = options8 || {};
169362
- return function(p4, i5, list) {
169811
+ return function(p4, i5, list2) {
169363
169812
  return minimatch(p4, pattern, options8);
169364
169813
  };
169365
169814
  }
@@ -169800,15 +170249,15 @@ var init_prettier = __esm(() => {
169800
170249
  return this.regexp = false;
169801
170250
  }
169802
170251
  }
169803
- minimatch.match = function(list, pattern, options8) {
170252
+ minimatch.match = function(list2, pattern, options8) {
169804
170253
  var mm3 = new Minimatch(pattern, options8);
169805
- list = list.filter(function(f7) {
170254
+ list2 = list2.filter(function(f7) {
169806
170255
  return mm3.match(f7);
169807
170256
  });
169808
- if (options8.nonull && !list.length) {
169809
- list.push(pattern);
170257
+ if (options8.nonull && !list2.length) {
170258
+ list2.push(pattern);
169810
170259
  }
169811
- return list;
170260
+ return list2;
169812
170261
  };
169813
170262
  Minimatch.prototype.match = match;
169814
170263
  function match(f7, partial2) {
@@ -171483,12 +171932,12 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
171483
171932
  this._valueSchema = valueSchema;
171484
171933
  }
171485
171934
  expected(utils2) {
171486
- const { text, list } = utils2.normalizeExpectedResult(this._valueSchema.expected(utils2));
171935
+ const { text, list: list2 } = utils2.normalizeExpectedResult(this._valueSchema.expected(utils2));
171487
171936
  return {
171488
171937
  text: text && `an array of ${text}`,
171489
- list: list && {
171938
+ list: list2 && {
171490
171939
  title: `an array of the following values`,
171491
- values: [{ list }]
171940
+ values: [{ list: list2 }]
171492
171941
  }
171493
171942
  };
171494
171943
  }
@@ -173047,7 +173496,7 @@ The range will extend backwards to the start of the first line containing the se
173047
173496
  markAsRoot: markAsRoot2
173048
173497
  } = builders);
173049
173498
  SUPPORTED_EMBED_LANGUAGES = /* @__PURE__ */ new Set(["yaml", "toml"]);
173050
- clean_default = clean;
173499
+ clean_default = clean2;
173051
173500
  print_default = printFrontMatter;
173052
173501
  nonTraversableKeys = /* @__PURE__ */ new Set([
173053
173502
  "tokens",
@@ -180191,15 +180640,15 @@ var require_parser3 = __commonJS((exports) => {
180191
180640
  var node_process = __require("process");
180192
180641
  var cst = require_cst2();
180193
180642
  var lexer = require_lexer2();
180194
- function includesToken(list, type) {
180195
- for (let i5 = 0;i5 < list.length; ++i5)
180196
- if (list[i5].type === type)
180643
+ function includesToken(list2, type) {
180644
+ for (let i5 = 0;i5 < list2.length; ++i5)
180645
+ if (list2[i5].type === type)
180197
180646
  return true;
180198
180647
  return false;
180199
180648
  }
180200
- function findNonEmptyIndex(list) {
180201
- for (let i5 = 0;i5 < list.length; ++i5) {
180202
- switch (list[i5].type) {
180649
+ function findNonEmptyIndex(list2) {
180650
+ for (let i5 = 0;i5 < list2.length; ++i5) {
180651
+ switch (list2[i5].type) {
180203
180652
  case "space":
180204
180653
  case "comment":
180205
180654
  case "newline":
@@ -181146,13 +181595,13 @@ var {
181146
181595
  } = import__.default;
181147
181596
 
181148
181597
  // src/cli.ts
181149
- import { realpathSync as realpathSync2 } from "fs";
181598
+ import { realpathSync as realpathSync3 } from "fs";
181150
181599
  import path17 from "path";
181151
181600
  import { fileURLToPath as fileURLToPath6 } from "url";
181152
181601
  // package.json
181153
181602
  var package_default = {
181154
181603
  name: "@eigenpal/cli",
181155
- version: "0.5.2",
181604
+ version: "0.5.4",
181156
181605
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
181157
181606
  keywords: [
181158
181607
  "eigenpal",
@@ -181494,6 +181943,9 @@ var env = createEnv({
181494
181943
  emptyStringAsUndefined: true,
181495
181944
  skipValidation: process.env.SKIP_ENV_VALIDATION === "true" || process.env.npm_lifecycle_event === "lint"
181496
181945
  });
181946
+ function getProcessEnv() {
181947
+ return process.env;
181948
+ }
181497
181949
 
181498
181950
  // src/lib/credentials.ts
181499
181951
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "fs";
@@ -183645,15 +184097,716 @@ async function completion(shell, program2) {
183645
184097
  `);
183646
184098
  }
183647
184099
 
184100
+ // src/commands/git.ts
184101
+ init_src();
184102
+ init_zod();
184103
+ var import_yaml2 = __toESM(require_dist(), 1);
184104
+ import { spawnSync as spawnSync2 } from "node:child_process";
184105
+ import { existsSync as existsSync3, readdirSync, readFileSync as readFileSync3, realpathSync, statSync } from "node:fs";
184106
+ import path2 from "node:path";
184107
+ var SourceRepositorySchema = exports_external.object({
184108
+ gitRepositoryPath: exports_external.string(),
184109
+ remoteUrl: exports_external.string().url()
184110
+ });
184111
+ var AgentsListSchema = exports_external.object({
184112
+ data: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())),
184113
+ total: exports_external.number().optional()
184114
+ });
184115
+ var ReleaseSchema = exports_external.object({
184116
+ version: exports_external.string(),
184117
+ tag: exports_external.string(),
184118
+ commit: exports_external.string(),
184119
+ date: exports_external.string().optional()
184120
+ });
184121
+ var ReleasesSchema = exports_external.object({
184122
+ packagePath: exports_external.string(),
184123
+ releases: exports_external.array(ReleaseSchema)
184124
+ });
184125
+ var AuthCheckSchema = exports_external.object({
184126
+ ok: exports_external.literal(true),
184127
+ email: exports_external.string().email().nullable().optional(),
184128
+ name: exports_external.string().nullable().optional(),
184129
+ keyId: exports_external.string()
184130
+ });
184131
+ function runGit(args, opts = {}) {
184132
+ const env2 = opts.config ? gitAuthEnv(opts.config, opts.env, opts.gitRemoteUrl) : { ...getProcessEnv(), ...opts.env };
184133
+ const result = spawnSync2("git", args, {
184134
+ cwd: opts.cwd,
184135
+ env: env2,
184136
+ stdio: "inherit"
184137
+ });
184138
+ if (result.error)
184139
+ throw result.error;
184140
+ if (result.status && result.status !== 0)
184141
+ process.exit(result.status);
184142
+ }
184143
+ function gitOutput(args, cwd, config2, gitRemoteUrl) {
184144
+ const result = spawnSync2("git", args, {
184145
+ cwd,
184146
+ encoding: "utf8",
184147
+ env: config2 ? gitAuthEnv(config2, {}, gitRemoteUrl) : undefined
184148
+ });
184149
+ if (result.status !== 0)
184150
+ return null;
184151
+ return result.stdout.trim();
184152
+ }
184153
+ function gitAuthEnv(config2, extra = {}, gitRemoteUrl) {
184154
+ const env2 = {
184155
+ ...getProcessEnv(),
184156
+ ...extra
184157
+ };
184158
+ if (!gitRemoteUrl)
184159
+ return env2;
184160
+ return {
184161
+ ...env2,
184162
+ GIT_CONFIG_COUNT: "1",
184163
+ GIT_CONFIG_KEY_0: `http.${gitRemoteUrl.replace(/\/+$/, "")}.extraHeader`,
184164
+ GIT_CONFIG_VALUE_0: `Authorization: Bearer ${requireApiKey(config2)}`
184165
+ };
184166
+ }
184167
+ async function resolveGitAuthorEnv(config2) {
184168
+ const auth = AuthCheckSchema.parse(await new ApiClient(config2).get("/api/v1/auth/check"));
184169
+ const email3 = auth.email ?? `${auth.keyId}@api-keys.eigenpal.local`;
184170
+ const name = auth.name?.trim() || auth.email || `Eigenpal API Key ${auth.keyId}`;
184171
+ return {
184172
+ GIT_AUTHOR_NAME: name,
184173
+ GIT_AUTHOR_EMAIL: email3,
184174
+ GIT_COMMITTER_NAME: name,
184175
+ GIT_COMMITTER_EMAIL: email3
184176
+ };
184177
+ }
184178
+ async function getSourceRepository(config2) {
184179
+ const client = new ApiClient(config2);
184180
+ return SourceRepositorySchema.parse(await client.get("/api/v1/source/repository"));
184181
+ }
184182
+ function sourcePathFromPackageRoot(gitRoot, packageRoot) {
184183
+ const relativePath = path2.relative(gitRoot, packageRoot).replace(/\\/g, "/");
184184
+ const result = SourcePackagePathSchema.safeParse(relativePath);
184185
+ return result.success ? result.data : null;
184186
+ }
184187
+ function resolveGitRoot(dir) {
184188
+ return gitOutput(["rev-parse", "--show-toplevel"], dir);
184189
+ }
184190
+ function findNearestPackageRoot(startDir, gitRoot) {
184191
+ let current = path2.resolve(startDir);
184192
+ while (true) {
184193
+ if (existsSync3(path2.join(current, "eigenpal.yaml")))
184194
+ return current;
184195
+ if (gitRoot && current === gitRoot)
184196
+ return null;
184197
+ const parent = path2.dirname(current);
184198
+ if (parent === current)
184199
+ return null;
184200
+ current = parent;
184201
+ }
184202
+ }
184203
+ function resolveGitSourceContext(opts = {}) {
184204
+ const startDir = realpathSync(path2.resolve(opts.dir ?? process.cwd()));
184205
+ const gitRoot = resolveGitRoot(startDir);
184206
+ const packageRoot = findNearestPackageRoot(startDir, gitRoot);
184207
+ const resolvedPackageRoot = packageRoot ? realpathSync(packageRoot) : null;
184208
+ return {
184209
+ gitRoot,
184210
+ packageRoot: resolvedPackageRoot,
184211
+ packagePath: gitRoot && resolvedPackageRoot ? sourcePathFromPackageRoot(gitRoot, resolvedPackageRoot) : null
184212
+ };
184213
+ }
184214
+ function listRelativeFiles(dir) {
184215
+ const files = [];
184216
+ const visit = (current) => {
184217
+ for (const entry of readdirSync(current)) {
184218
+ if (entry === ".git" || entry === "eigenpal_modules" || entry === ".eigenpal")
184219
+ continue;
184220
+ const fullPath = path2.join(current, entry);
184221
+ const rel = path2.relative(dir, fullPath).replace(/\\/g, "/");
184222
+ if (statSync(fullPath).isDirectory())
184223
+ visit(fullPath);
184224
+ else
184225
+ files.push(rel);
184226
+ }
184227
+ };
184228
+ visit(dir);
184229
+ return files;
184230
+ }
184231
+ function readYamlFile(filePath) {
184232
+ return import_yaml2.default.parse(readFileSync3(filePath, "utf8"));
184233
+ }
184234
+ function packageManifestExists(gitRoot, packagePath) {
184235
+ return existsSync3(path2.join(gitRoot, packagePath, "eigenpal.yaml"));
184236
+ }
184237
+ function releaseTagExists(gitRoot, packagePath, version2) {
184238
+ const tag = formatReleaseTag(pathToDottedPackageName(packagePath), version2);
184239
+ return gitOutput(["tag", "--list", tag], gitRoot) === tag;
184240
+ }
184241
+ function validatePackageReferences(input) {
184242
+ const errors3 = [];
184243
+ const dependencies = "dependencies" in input.manifest ? Object.entries(input.manifest.dependencies ?? {}) : [];
184244
+ for (const [dependencyName, version2] of dependencies) {
184245
+ const packagePath = workspaceDependencyNameToPackagePath(dependencyName);
184246
+ if (!packageManifestExists(input.gitRoot, packagePath)) {
184247
+ errors3.push(`Dependency ${dependencyName}@${version2} does not exist in this repository.`);
184248
+ continue;
184249
+ }
184250
+ if (!releaseTagExists(input.gitRoot, packagePath, version2)) {
184251
+ errors3.push(`Dependency ${dependencyName}@${version2} is missing its release tag.`);
184252
+ }
184253
+ }
184254
+ const evaluatorItems = "evaluators" in input.manifest && input.manifest.evaluators && typeof input.manifest.evaluators === "object" && !Array.isArray(input.manifest.evaluators) && "items" in input.manifest.evaluators ? input.manifest.evaluators.items : [];
184255
+ for (const item of evaluatorItems) {
184256
+ if (item.use.startsWith("./")) {
184257
+ const evaluatorPath = path2.normalize(path2.join(input.packageRoot, item.use));
184258
+ if (!evaluatorPath.startsWith(`${input.packageRoot}${path2.sep}`) || !existsSync3(evaluatorPath)) {
184259
+ errors3.push(`Local evaluator ${item.use} does not exist.`);
184260
+ }
184261
+ continue;
184262
+ }
184263
+ if (!("version" in item))
184264
+ continue;
184265
+ const packagePath = workspaceDependencyNameToPackagePath(item.use);
184266
+ if (!packageManifestExists(input.gitRoot, packagePath)) {
184267
+ errors3.push(`Shared evaluator ${item.use}@${item.version} does not exist in this repository.`);
184268
+ continue;
184269
+ }
184270
+ if (!releaseTagExists(input.gitRoot, packagePath, item.version)) {
184271
+ errors3.push(`Shared evaluator ${item.use}@${item.version} is missing its release tag.`);
184272
+ }
184273
+ }
184274
+ return errors3;
184275
+ }
184276
+ function validatePackage(dir) {
184277
+ const context = resolveGitSourceContext({ dir });
184278
+ const errors3 = [];
184279
+ const manifestPath = context.packageRoot ? path2.join(context.packageRoot, "eigenpal.yaml") : null;
184280
+ let parsedManifest = null;
184281
+ if (!context.gitRoot)
184282
+ errors3.push("Not inside a Git repository.");
184283
+ if (!context.packageRoot || !manifestPath)
184284
+ errors3.push("No package eigenpal.yaml found.");
184285
+ if (context.packageRoot && existsSync3(path2.join(context.packageRoot, "eigenpal.yml"))) {
184286
+ errors3.push("Use eigenpal.yaml; eigenpal.yml package manifests are not supported.");
184287
+ }
184288
+ if (!context.packagePath)
184289
+ errors3.push("Package must live under agents/, workflows/, resources/, or evaluators/.");
184290
+ if (manifestPath && existsSync3(manifestPath)) {
184291
+ const filename = SourceManifestFilenameSchema.safeParse(manifestPath);
184292
+ if (!filename.success)
184293
+ errors3.push(filename.error.issues.map((issue2) => issue2.message).join("; "));
184294
+ const manifest = SourcePackageManifestSchema.safeParse(readYamlFile(manifestPath));
184295
+ if (!manifest.success)
184296
+ errors3.push(manifest.error.issues.map((issue2) => issue2.message).join("; "));
184297
+ else
184298
+ parsedManifest = manifest.data;
184299
+ }
184300
+ if (context.packageRoot && context.packagePath) {
184301
+ const fileIssues = validateSourcePackageRequiredFiles({
184302
+ packagePath: context.packagePath,
184303
+ files: listRelativeFiles(context.packageRoot)
184304
+ });
184305
+ errors3.push(...fileIssues.map((issue2) => issue2.message));
184306
+ }
184307
+ if (context.gitRoot && context.packageRoot && parsedManifest) {
184308
+ errors3.push(...validatePackageReferences({
184309
+ gitRoot: context.gitRoot,
184310
+ packageRoot: context.packageRoot,
184311
+ manifest: parsedManifest
184312
+ }));
184313
+ }
184314
+ return { valid: errors3.length === 0, errors: errors3, packagePath: context.packagePath ?? undefined };
184315
+ }
184316
+ function readRootManifest(gitRoot) {
184317
+ const manifestPath = path2.join(gitRoot, "eigenpal.yaml");
184318
+ if (!existsSync3(manifestPath))
184319
+ return { ok: false, error: "Root eigenpal.yaml is missing." };
184320
+ const parsed = RootSourceManifestSchema.safeParse(readYamlFile(manifestPath));
184321
+ if (!parsed.success)
184322
+ return { ok: false, error: parsed.error.issues.map((issue2) => issue2.message).join("; ") };
184323
+ return { ok: true, version: parsed.data.eigenpalVersion };
184324
+ }
184325
+ function checkRepoVersion(gitRoot, mutation) {
184326
+ const manifest = readRootManifest(gitRoot);
184327
+ if (!manifest.ok)
184328
+ return;
184329
+ const repoMajor = manifest.version.split(".")[0];
184330
+ const cliMajor = "1";
184331
+ if (repoMajor !== cliMajor && mutation) {
184332
+ throw new Error(`Repository source version ${manifest.version} is incompatible with this CLI. Run the repository upgrade flow first.`);
184333
+ }
184334
+ if (repoMajor !== cliMajor) {
184335
+ warn(`Repository source version is ${manifest.version}; this development CLI is dev-compatible.`);
184336
+ }
184337
+ }
184338
+ function resolvePackagePath(target) {
184339
+ return target.includes("/") ? SourcePackagePathSchema.parse(target) : dottedPackageNameToPath(DottedPackageNameSchema.parse(target));
184340
+ }
184341
+ function semverParts(version2) {
184342
+ const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version2);
184343
+ if (!match)
184344
+ return null;
184345
+ return [Number(match[1]), Number(match[2]), Number(match[3])];
184346
+ }
184347
+ function compareSemverDesc(a, b2) {
184348
+ const left = semverParts(a);
184349
+ const right = semverParts(b2);
184350
+ if (!left || !right)
184351
+ return b2.localeCompare(a);
184352
+ for (let index = 0;index < 3; index += 1) {
184353
+ if (left[index] !== right[index])
184354
+ return right[index] - left[index];
184355
+ }
184356
+ return 0;
184357
+ }
184358
+ function sortReleasesNewestFirst(releases) {
184359
+ return [...releases].sort((a, b2) => compareSemverDesc(a.version, b2.version));
184360
+ }
184361
+ function bumpReleaseVersion(releases, bump) {
184362
+ const latest = sortReleasesNewestFirst(releases)[0]?.version ?? "0.0.0";
184363
+ const parts = semverParts(latest);
184364
+ if (!parts)
184365
+ throw new Error(`Cannot bump from non-semver latest version ${latest}.`);
184366
+ const [major, minor, patch] = parts;
184367
+ if (bump === "major")
184368
+ return `${major + 1}.0.0`;
184369
+ if (bump === "minor")
184370
+ return `${major}.${minor + 1}.0`;
184371
+ return `${major}.${minor}.${patch + 1}`;
184372
+ }
184373
+ function requirePackageClean(context) {
184374
+ if (!context.gitRoot || !context.packagePath)
184375
+ throw new Error("No package context found.");
184376
+ const status = gitOutput(["status", "--short", "--", context.packagePath], context.gitRoot) ?? "";
184377
+ if (status.length > 0) {
184378
+ throw new Error(`Release requires a clean package working tree:
184379
+ ${status}`);
184380
+ }
184381
+ }
184382
+ function requirePushedMain(gitRoot, config2) {
184383
+ const branch = gitOutput(["rev-parse", "--abbrev-ref", "HEAD"], gitRoot);
184384
+ if (branch !== "main")
184385
+ throw new Error("Release must be run from the main branch.");
184386
+ const remoteUrl = gitOutput(["remote", "get-url", "origin"], gitRoot);
184387
+ runGit(["fetch", "origin", "main"], {
184388
+ cwd: gitRoot,
184389
+ config: config2,
184390
+ gitRemoteUrl: remoteUrl ?? undefined
184391
+ });
184392
+ const head = gitOutput(["rev-parse", "HEAD"], gitRoot);
184393
+ const originMain = gitOutput(["rev-parse", "origin/main"], gitRoot);
184394
+ if (!head || !originMain || head !== originMain) {
184395
+ throw new Error("Release requires local main to match pushed origin/main.");
184396
+ }
184397
+ }
184398
+ async function syncLatestAutomation(client, packagePath) {
184399
+ const automation = pathToDottedPackageName(packagePath);
184400
+ try {
184401
+ await client.post(`/api/automations/${encodeURIComponent(automation)}/sync`);
184402
+ success2(`Synced ${automation} to latest release.`);
184403
+ } catch (err) {
184404
+ if (err instanceof ApiError && err.status === 404 || err instanceof HtmlResponseError) {
184405
+ warn("Automation sync endpoint is not available yet; run sync after it lands.");
184406
+ return;
184407
+ }
184408
+ throw err;
184409
+ }
184410
+ }
184411
+ async function cloneSource(opts) {
184412
+ const config2 = resolveConfig(opts);
184413
+ const repo = await getSourceRepository(config2);
184414
+ runGit(["clone", repo.remoteUrl, opts.out ?? path2.basename(repo.gitRepositoryPath)], {
184415
+ config: config2,
184416
+ gitRemoteUrl: repo.remoteUrl
184417
+ });
184418
+ success2(`Cloned ${repo.remoteUrl}`);
184419
+ }
184420
+ async function gitPassthrough(args, opts) {
184421
+ if (args.length === 0) {
184422
+ error51("Pass Git arguments after `--`, for example `eigenpal git -- status`.");
184423
+ process.exit(2);
184424
+ }
184425
+ const config2 = resolveConfig(opts);
184426
+ const cwd = gitCwdFromArgs(args);
184427
+ const remoteUrl = gitOutput(["remote", "get-url", "origin"], cwd);
184428
+ runGit(args, {
184429
+ config: config2,
184430
+ env: gitCommandCreatesObjects(args) ? await resolveGitAuthorEnv(config2) : undefined,
184431
+ gitRemoteUrl: remoteUrl ?? undefined
184432
+ });
184433
+ }
184434
+ function gitCommandCreatesObjects(args) {
184435
+ const objectCreatingCommands = new Set([
184436
+ "cherry-pick",
184437
+ "commit",
184438
+ "merge",
184439
+ "rebase",
184440
+ "revert",
184441
+ "tag"
184442
+ ]);
184443
+ return args.some((arg) => objectCreatingCommands.has(arg));
184444
+ }
184445
+ function gitCwdFromArgs(args) {
184446
+ let cwd = process.cwd();
184447
+ for (let i = 0;i < args.length; i += 1) {
184448
+ if (args[i] === "-C" && args[i + 1]) {
184449
+ cwd = path2.resolve(cwd, args[i + 1]);
184450
+ i += 1;
184451
+ }
184452
+ }
184453
+ return cwd;
184454
+ }
184455
+ async function runGitPassthroughFromArgv(argv) {
184456
+ const gitIndex = argv.indexOf("git");
184457
+ const separatorIndex = argv.indexOf("--", gitIndex + 1);
184458
+ if (gitIndex === -1 || separatorIndex === -1)
184459
+ return false;
184460
+ const beforeSeparator = argv.slice(gitIndex + 1, separatorIndex);
184461
+ const baseUrlIndex = beforeSeparator.indexOf("--base-url");
184462
+ const baseUrl = baseUrlIndex >= 0 && beforeSeparator[baseUrlIndex + 1] ? beforeSeparator[baseUrlIndex + 1] : undefined;
184463
+ await gitPassthrough(argv.slice(separatorIndex + 1), { baseUrl });
184464
+ return true;
184465
+ }
184466
+ function hasGitPassthroughSeparator(argv) {
184467
+ const gitIndex = argv.indexOf("git");
184468
+ return gitIndex !== -1 && argv.indexOf("--", gitIndex + 1) !== -1;
184469
+ }
184470
+ function doctor(opts) {
184471
+ const context = resolveGitSourceContext(opts);
184472
+ const checks3 = [];
184473
+ checks3.push({
184474
+ check: "git",
184475
+ status: gitOutput(["--version"]) ? "pass" : "fail",
184476
+ detail: gitOutput(["--version"]) ?? "git not found"
184477
+ });
184478
+ checks3.push({
184479
+ check: "repo",
184480
+ status: context.gitRoot ? "pass" : "fail",
184481
+ detail: context.gitRoot ?? "not inside a Git repository"
184482
+ });
184483
+ if (context.gitRoot) {
184484
+ const root = readRootManifest(context.gitRoot);
184485
+ checks3.push({
184486
+ check: "root manifest",
184487
+ status: root.ok ? "pass" : "fail",
184488
+ detail: root.ok ? `eigenpalVersion ${root.version}` : root.error
184489
+ });
184490
+ if (root.ok) {
184491
+ const repoMajor = root.version.split(".")[0];
184492
+ checks3.push({
184493
+ check: "repo version",
184494
+ status: repoMajor === "1" ? "pass" : "fail",
184495
+ detail: repoMajor === "1" ? `compatible ${root.version}` : `incompatible ${root.version}; run repository upgrade first`
184496
+ });
184497
+ }
184498
+ const gitignore = existsSync3(path2.join(context.gitRoot, ".gitignore")) ? readFileSync3(path2.join(context.gitRoot, ".gitignore"), "utf8") : "";
184499
+ for (const ignored of [".eigenpal/", "eigenpal_modules/"]) {
184500
+ checks3.push({
184501
+ check: `ignore ${ignored}`,
184502
+ status: gitignore.includes(ignored) ? "pass" : "fail",
184503
+ detail: gitignore.includes(ignored) ? ignored : `add ${ignored} to .gitignore`
184504
+ });
184505
+ }
184506
+ checks3.push({
184507
+ check: "unsupported manifest",
184508
+ status: existsSync3(path2.join(context.gitRoot, "eigenpal.yml")) ? "fail" : "pass",
184509
+ detail: "root eigenpal.yml must not exist"
184510
+ });
184511
+ const remoteUrl = gitOutput(["remote", "get-url", "origin"], context.gitRoot);
184512
+ checks3.push({
184513
+ check: "remote origin",
184514
+ status: remoteUrl ? "pass" : "fail",
184515
+ detail: remoteUrl ?? "origin remote is not configured"
184516
+ });
184517
+ if (remoteUrl) {
184518
+ let authDetail = "git ls-remote origin succeeded";
184519
+ let authStatus = "pass";
184520
+ try {
184521
+ const config2 = resolveConfig(opts);
184522
+ if (!gitOutput(["ls-remote", "--heads", "origin"], context.gitRoot, config2, remoteUrl)) {
184523
+ authStatus = "fail";
184524
+ authDetail = "git ls-remote origin failed";
184525
+ }
184526
+ } catch (err) {
184527
+ authStatus = "fail";
184528
+ authDetail = err instanceof Error ? err.message : "Git auth check failed";
184529
+ }
184530
+ checks3.push({
184531
+ check: "remote auth",
184532
+ status: authStatus,
184533
+ detail: authDetail
184534
+ });
184535
+ }
184536
+ }
184537
+ if (context.packageRoot) {
184538
+ const result = validatePackage(context.packageRoot);
184539
+ checks3.push({
184540
+ check: "package structure",
184541
+ status: result.valid ? "pass" : "fail",
184542
+ detail: result.valid ? result.packagePath ?? "-" : result.errors.join("; ")
184543
+ });
184544
+ }
184545
+ if (opts.json)
184546
+ console.log(JSON.stringify({ checks: checks3 }, null, 2));
184547
+ else
184548
+ console.log(table(checks3, [
184549
+ { key: "check", header: "check" },
184550
+ { key: "status", header: "status" },
184551
+ { key: "detail", header: "detail" }
184552
+ ]));
184553
+ if (checks3.some((check2) => check2.status === "fail"))
184554
+ process.exit(1);
184555
+ }
184556
+ function validate(opts) {
184557
+ const context = resolveGitSourceContext({ dir: opts.dir });
184558
+ if (context.gitRoot)
184559
+ checkRepoVersion(context.gitRoot, false);
184560
+ const result = validatePackage(opts.dir ?? process.cwd());
184561
+ if (opts.json)
184562
+ console.log(JSON.stringify(result, null, 2));
184563
+ else if (result.valid)
184564
+ success2(`Valid package ${result.packagePath ?? ""}`.trim());
184565
+ else {
184566
+ error51("Package validation failed.");
184567
+ for (const issue2 of result.errors)
184568
+ dim(` ${issue2}`);
184569
+ }
184570
+ if (!result.valid)
184571
+ process.exit(1);
184572
+ }
184573
+ function packageStatus(opts) {
184574
+ const context = resolveGitSourceContext(opts);
184575
+ if (context.gitRoot)
184576
+ checkRepoVersion(context.gitRoot, false);
184577
+ const validation = context.packageRoot ? validatePackage(context.packageRoot) : null;
184578
+ const gitStatus = context.gitRoot ? gitOutput(["status", "--short"], context.gitRoot) ?? "" : "";
184579
+ const payload = {
184580
+ gitRoot: context.gitRoot,
184581
+ packageRoot: context.packageRoot,
184582
+ packagePath: context.packagePath,
184583
+ clean: gitStatus.length === 0,
184584
+ valid: validation?.valid ?? false,
184585
+ errors: validation?.errors ?? []
184586
+ };
184587
+ if (opts.json)
184588
+ console.log(JSON.stringify(payload, null, 2));
184589
+ else {
184590
+ console.log(table([payload], [
184591
+ { key: "packagePath", header: "package" },
184592
+ { key: "clean", header: "clean" },
184593
+ { key: "valid", header: "valid" }
184594
+ ]));
184595
+ }
184596
+ }
184597
+ function deps(opts) {
184598
+ const context = resolveGitSourceContext(opts);
184599
+ if (!context.packageRoot)
184600
+ throw new Error("No package eigenpal.yaml found.");
184601
+ const manifest = SourcePackageManifestSchema.parse(readYamlFile(path2.join(context.packageRoot, "eigenpal.yaml")));
184602
+ const rows = Object.entries(manifest.dependencies ?? {}).map(([name, version2]) => ({
184603
+ name,
184604
+ version: version2
184605
+ }));
184606
+ if (opts.json)
184607
+ console.log(JSON.stringify({ dependencies: rows }, null, 2));
184608
+ else
184609
+ console.log(table(rows, [
184610
+ { key: "name", header: "dependency" },
184611
+ { key: "version", header: "version" }
184612
+ ]));
184613
+ }
184614
+ function clean(opts) {
184615
+ const context = resolveGitSourceContext(opts);
184616
+ if (!context.gitRoot)
184617
+ throw new Error("Not inside a Git repository.");
184618
+ const status = gitOutput(["status", "--short"], context.gitRoot) ?? "";
184619
+ if (status.length > 0) {
184620
+ error51("Working tree is not clean.");
184621
+ process.stdout.write(`${status}
184622
+ `);
184623
+ process.exit(1);
184624
+ }
184625
+ success2("Working tree is clean.");
184626
+ }
184627
+ async function list(opts) {
184628
+ if (opts.type && opts.type !== "agent") {
184629
+ throw new Error("Only agent automation listing is available before workflow cutover.");
184630
+ }
184631
+ const client = new ApiClient(resolveConfig(opts));
184632
+ const raw = await client.get("/api/v1/agents", {
184633
+ limit: String(opts.limit),
184634
+ offset: String(opts.offset),
184635
+ ...opts.search ? { search: opts.search } : {},
184636
+ ...opts.includeArchived ? { includeArchived: "true" } : {}
184637
+ });
184638
+ const parsed = AgentsListSchema.parse(raw);
184639
+ if (opts.json)
184640
+ console.log(JSON.stringify(parsed, null, 2));
184641
+ else {
184642
+ const rows = parsed.data.map((row) => ({
184643
+ ...row,
184644
+ inconsistency: typeof row.sourceIntegrity === "string" && row.sourceIntegrity !== "healthy" ? row.sourceIntegrity : ""
184645
+ }));
184646
+ renderListResult({ ...parsed, data: rows }, [
184647
+ { key: "type", header: "type", format: () => "agent" },
184648
+ { key: "slug", header: "slug" },
184649
+ { key: "name", header: "name" },
184650
+ { key: "status", header: "status" },
184651
+ { key: "sourceIntegrity", header: "source" },
184652
+ { key: "latestVersion", header: "latest" },
184653
+ { key: "inconsistency", header: "inconsistency" }
184654
+ ], { entityLabel: "automation" });
184655
+ }
184656
+ }
184657
+ async function show(target, opts) {
184658
+ const packagePath = resolvePackagePath(target);
184659
+ const slug = packagePath.replace(/^agents\//, "");
184660
+ const client = new ApiClient(resolveConfig(opts));
184661
+ const payload = await client.get(`/api/v1/agents/${encodeURIComponent(slug)}`, {
184662
+ include: "files,dataset,runs"
184663
+ });
184664
+ if (opts.json)
184665
+ console.log(JSON.stringify(payload, null, 2));
184666
+ else {
184667
+ const agent = payload.agent;
184668
+ console.log(table([
184669
+ {
184670
+ type: "agent",
184671
+ slug: agent.slug ?? slug,
184672
+ path: packagePath,
184673
+ name: agent.name ?? "",
184674
+ status: agent.status ?? "",
184675
+ source: agent.sourceIntegrity ?? "",
184676
+ latest: agent.latestVersion ?? "",
184677
+ commit: agent.latestCommit ?? ""
184678
+ }
184679
+ ], [
184680
+ { key: "type", header: "type" },
184681
+ { key: "slug", header: "slug" },
184682
+ { key: "path", header: "path" },
184683
+ { key: "name", header: "name" },
184684
+ { key: "status", header: "status" },
184685
+ { key: "source", header: "source" },
184686
+ { key: "latest", header: "latest" },
184687
+ { key: "commit", header: "commit", format: (value) => String(value || "-").slice(0, 12) }
184688
+ ]));
184689
+ if (agent.description)
184690
+ console.log(`
184691
+ description: ${agent.description}`);
184692
+ const runs = agent.recentRuns ?? agent.runs ?? [];
184693
+ console.log(`
184694
+ recent runs`);
184695
+ console.log(table(runs.slice(0, 5), [
184696
+ { key: "id", header: "id" },
184697
+ { key: "createdAt", header: "time", format: (value) => formatTimestamp(value) },
184698
+ { key: "durationMs", header: "duration", format: (value) => formatDuration(Number(value)) },
184699
+ { key: "triggeredBy", header: "triggered-by" },
184700
+ { key: "requestedVersion", header: "requested" },
184701
+ { key: "resolvedVersion", header: "resolved" },
184702
+ { key: "status", header: "status" }
184703
+ ]));
184704
+ }
184705
+ }
184706
+ async function versions2(target, opts) {
184707
+ const packagePath = resolvePackagePath(target);
184708
+ const client = new ApiClient(resolveConfig(opts));
184709
+ const parsed = ReleasesSchema.parse(await client.get("/api/v1/source/releases", { packagePath }));
184710
+ const sorted = { ...parsed, releases: sortReleasesNewestFirst(parsed.releases) };
184711
+ if (opts.json)
184712
+ console.log(JSON.stringify(sorted, null, 2));
184713
+ else
184714
+ console.log(table(sorted.releases, [
184715
+ { key: "version", header: "version" },
184716
+ { key: "tag", header: "tag" },
184717
+ { key: "commit", header: "commit", format: (value) => String(value).slice(0, 12) },
184718
+ { key: "date", header: "date", format: (value) => formatTimestamp(value) }
184719
+ ]));
184720
+ }
184721
+ async function release(versionOrBump, dir, opts) {
184722
+ const context = resolveGitSourceContext({ dir });
184723
+ if (!context.gitRoot || !context.packageRoot || !context.packagePath) {
184724
+ throw new Error("Run release inside a source package in an organization Git repo.");
184725
+ }
184726
+ const config2 = resolveConfig(opts);
184727
+ checkRepoVersion(context.gitRoot, true);
184728
+ const validation = validatePackage(context.packageRoot);
184729
+ if (!validation.valid)
184730
+ throw new Error(`Package validation failed: ${validation.errors.join("; ")}`);
184731
+ requirePackageClean(context);
184732
+ requirePushedMain(context.gitRoot, config2);
184733
+ if (!opts.message)
184734
+ throw new Error("Release requires -m <message>.");
184735
+ const client = new ApiClient(config2);
184736
+ const version2 = ["patch", "minor", "major"].includes(versionOrBump) ? bumpReleaseVersion(ReleasesSchema.parse(await client.get("/api/v1/source/releases", { packagePath: context.packagePath })).releases, versionOrBump) : versionOrBump;
184737
+ if (!/^\d+\.\d+\.\d+$/.test(version2)) {
184738
+ throw new Error("Release version must be X.Y.Z, patch, minor, or major.");
184739
+ }
184740
+ const existing = ReleasesSchema.parse(await client.get("/api/v1/source/releases", {
184741
+ packagePath: context.packagePath,
184742
+ version: version2
184743
+ }));
184744
+ if (existing.releases.length > 0) {
184745
+ throw new Error(`Release ${version2} already exists for ${context.packagePath}.`);
184746
+ }
184747
+ const tag = formatReleaseTag(pathToDottedPackageName(context.packagePath), version2);
184748
+ const authorEnv = await resolveGitAuthorEnv(config2);
184749
+ runGit(["tag", "-a", tag, "-m", opts.message], { cwd: context.gitRoot, env: authorEnv });
184750
+ const remoteUrl = gitOutput(["remote", "get-url", "origin"], context.gitRoot);
184751
+ try {
184752
+ runGit(["push", "origin", tag], {
184753
+ cwd: context.gitRoot,
184754
+ config: config2,
184755
+ gitRemoteUrl: remoteUrl ?? undefined
184756
+ });
184757
+ } catch (err) {
184758
+ runGit(["tag", "-d", tag], { cwd: context.gitRoot });
184759
+ throw err;
184760
+ }
184761
+ success2(`Released ${tag}.`);
184762
+ await syncLatestAutomation(client, context.packagePath);
184763
+ }
184764
+ async function sync(target, opts) {
184765
+ const context = resolveGitSourceContext({ dir: opts.dir });
184766
+ const packagePath = target ? resolvePackagePath(target) : context.packagePath;
184767
+ if (!packagePath) {
184768
+ throw new Error("Pass an automation target or run sync inside a source package.");
184769
+ }
184770
+ if (target?.includes("@")) {
184771
+ throw new Error("Sync always uses latest; do not pass a versioned target.");
184772
+ }
184773
+ await syncLatestAutomation(new ApiClient(resolveConfig(opts)), packagePath);
184774
+ }
184775
+ function parseReleaseVersion(value) {
184776
+ if (!/^\d+\.\d+\.\d+$/.test(value) && !["patch", "minor", "major"].includes(value)) {
184777
+ throw new InvalidArgumentError("version must be X.Y.Z, patch, minor, or major");
184778
+ }
184779
+ return value;
184780
+ }
184781
+ function parseType(value) {
184782
+ if (!["agent", "workflow"].includes(value))
184783
+ throw new InvalidArgumentError("type must be agent or workflow");
184784
+ return value;
184785
+ }
184786
+ function registerGitCommands(program2) {
184787
+ const git = program2.command("git", { hidden: true }).description("Experimental Git-backed source commands.").allowUnknownOption(true).allowExcessArguments(true).argument("[gitArgs...]", "Git arguments after --").action(action(async (gitArgs, opts) => gitPassthrough(gitArgs ?? [], opts)));
184788
+ withBaseUrl(git.command("clone")).description("Clone the organization source repository.").option("--out <dir>", "Output directory").action(action(cloneSource));
184789
+ addJsonFlag(git.command("doctor")).description("Check organization source repository health.").option("--dir <dir>", "Directory to inspect").action(action(async (opts) => doctor(opts)));
184790
+ addJsonFlag(git.command("validate [dir]")).description("Validate the nearest source package.").action(action(async (dir, opts) => validate({ ...opts, dir })));
184791
+ addJsonFlag(git.command("status")).description("Show source repo and package status.").option("--dir <dir>", "Directory to inspect").action(action(async (opts) => packageStatus(opts)));
184792
+ addJsonFlag(git.command("deps")).description("List package workspace dependencies.").option("--dir <dir>", "Directory to inspect").action(action(async (opts) => deps(opts)));
184793
+ git.command("clean").description("Require a clean source working tree.").option("--dir <dir>", "Directory to inspect").action(action(async (opts) => clean(opts)));
184794
+ addJsonFlag(withPagination(withBaseUrl(git.command("list")), 50)).description("List Git-backed automations.").option("--type <type>", "Filter by automation type", parseType).option("--search <q>", "Search by slug, name, or description").option("--include-archived", "Include archived automations").action(action(list));
184795
+ addJsonFlag(withBaseUrl(git.command("show <automation>"))).description("Show Git-backed automation details.").action(action(show));
184796
+ addJsonFlag(withBaseUrl(git.command("versions <package>"))).description("List package release versions.").action(action(versions2));
184797
+ withBaseUrl(git.command("release")).description("Create and push a package release tag.").argument("<version>", "Version or bump level", parseReleaseVersion).argument("[dir]", "Package directory").addOption(new Option("-m, --message <message>", "Annotated tag message").makeOptionMandatory()).action(action(async (versionOrBump, dir, opts) => release(versionOrBump, dir, opts)));
184798
+ withBaseUrl(git.command("sync [automation]")).description("Sync an automation from the latest Git source release.").option("--dir <dir>", "Directory to inspect").action(action(sync));
184799
+ }
184800
+
183648
184801
  // src/commands/init.ts
183649
184802
  init_dist4();
183650
184803
  import {
183651
184804
  copyFileSync,
183652
- existsSync as existsSync3,
184805
+ existsSync as existsSync4,
183653
184806
  mkdirSync as mkdirSync2,
183654
- readdirSync,
183655
- readFileSync as readFileSync3,
183656
- statSync,
184807
+ readdirSync as readdirSync2,
184808
+ readFileSync as readFileSync4,
184809
+ statSync as statSync2,
183657
184810
  writeFileSync as writeFileSync2
183658
184811
  } from "node:fs";
183659
184812
  import { dirname as dirname2, join as join2, relative, resolve } from "node:path";
@@ -183670,10 +184823,10 @@ function isValidProjectName(name) {
183670
184823
  function resolveTemplatesRoot() {
183671
184824
  const here = dirname2(fileURLToPath(import.meta.url));
183672
184825
  const srcCandidate = resolve(here, "..", "templates");
183673
- if (existsSync3(srcCandidate))
184826
+ if (existsSync4(srcCandidate))
183674
184827
  return srcCandidate;
183675
184828
  const distCandidate = resolve(here, "templates");
183676
- if (existsSync3(distCandidate))
184829
+ if (existsSync4(distCandidate))
183677
184830
  return distCandidate;
183678
184831
  throw new Error(`Cannot locate bundled templates. Looked in:
183679
184832
  ${srcCandidate}
@@ -183687,22 +184840,22 @@ async function init(name, opts) {
183687
184840
  if (opts.dir !== undefined && !opts.dir.startsWith("/") && opts.dir.split(/[/\\]/).some((s) => s === "..")) {
183688
184841
  throw new Error(`Refusing to scaffold into ${target}: --dir contains "..". Pass an absolute path if you intend this.`);
183689
184842
  }
183690
- if (existsSync3(target) && readdirSync(target).length > 0) {
184843
+ if (existsSync4(target) && readdirSync2(target).length > 0) {
183691
184844
  throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
183692
184845
  }
183693
- let template;
184846
+ let template2;
183694
184847
  if (opts.template) {
183695
184848
  if (!isTemplateName(opts.template)) {
183696
184849
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
183697
184850
  }
183698
- template = opts.template;
184851
+ template2 = opts.template;
183699
184852
  } else if (opts.yes || !process.stdin.isTTY) {
183700
- template = "blank";
184853
+ template2 = "blank";
183701
184854
  } else {
183702
- template = await promptForTemplate();
184855
+ template2 = await promptForTemplate();
183703
184856
  }
183704
- const sourceRoot = join2(resolveTemplatesRoot(), template);
183705
- if (!existsSync3(sourceRoot)) {
184857
+ const sourceRoot = join2(resolveTemplatesRoot(), template2);
184858
+ if (!existsSync4(sourceRoot)) {
183706
184859
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
183707
184860
  }
183708
184861
  const written = copyTemplate(sourceRoot, target, name);
@@ -183739,18 +184892,18 @@ function copyTemplate(src, dst, projectName) {
183739
184892
  const stack = [src];
183740
184893
  while (stack.length > 0) {
183741
184894
  const dir = stack.pop();
183742
- for (const entry of readdirSync(dir)) {
184895
+ for (const entry of readdirSync2(dir)) {
183743
184896
  const sourcePath = join2(dir, entry);
183744
184897
  const relativePath = relative(src, sourcePath);
183745
184898
  const targetPath = join2(dst, relativePath);
183746
- const stats = statSync(sourcePath);
184899
+ const stats = statSync2(sourcePath);
183747
184900
  if (stats.isDirectory()) {
183748
184901
  stack.push(sourcePath);
183749
184902
  continue;
183750
184903
  }
183751
184904
  mkdirSync2(dirname2(targetPath), { recursive: true });
183752
184905
  if (isTextFile(sourcePath)) {
183753
- const text = readFileSync3(sourcePath, "utf-8").replaceAll(PLACEHOLDER, projectName);
184906
+ const text = readFileSync4(sourcePath, "utf-8").replaceAll(PLACEHOLDER, projectName);
183754
184907
  writeFileSync2(targetPath, text);
183755
184908
  } else {
183756
184909
  copyFileSync(sourcePath, targetPath);
@@ -183773,22 +184926,22 @@ var TEXT_EXTENSIONS = new Set([
183773
184926
  ".html",
183774
184927
  ".css"
183775
184928
  ]);
183776
- function isTextFile(path2) {
183777
- const dotIndex = path2.lastIndexOf(".");
184929
+ function isTextFile(path3) {
184930
+ const dotIndex = path3.lastIndexOf(".");
183778
184931
  if (dotIndex < 0)
183779
184932
  return false;
183780
- return TEXT_EXTENSIONS.has(path2.slice(dotIndex).toLowerCase());
184933
+ return TEXT_EXTENSIONS.has(path3.slice(dotIndex).toLowerCase());
183781
184934
  }
183782
184935
 
183783
184936
  // src/commands/skill.ts
183784
184937
  init_dist4();
183785
184938
  import { createHash as createHash2 } from "node:crypto";
183786
184939
  import {
183787
- existsSync as existsSync4,
184940
+ existsSync as existsSync5,
183788
184941
  lstatSync,
183789
184942
  mkdirSync as mkdirSync3,
183790
- readFileSync as readFileSync4,
183791
- readdirSync as readdirSync2,
184943
+ readFileSync as readFileSync5,
184944
+ readdirSync as readdirSync3,
183792
184945
  rmSync,
183793
184946
  rmdirSync,
183794
184947
  unlinkSync as unlinkSync2,
@@ -183865,10 +185018,10 @@ var TOOLS = [
183865
185018
  function resolveSkillSource() {
183866
185019
  const here = dirname3(fileURLToPath2(import.meta.url));
183867
185020
  const srcCandidate = resolve2(here, "..", "skill");
183868
- if (existsSync4(srcCandidate))
185021
+ if (existsSync5(srcCandidate))
183869
185022
  return srcCandidate;
183870
185023
  const distCandidate = resolve2(here, "skill");
183871
- if (existsSync4(distCandidate))
185024
+ if (existsSync5(distCandidate))
183872
185025
  return distCandidate;
183873
185026
  throw new Error(`Cannot locate bundled skill content. Looked in:
183874
185027
  ${srcCandidate}
@@ -183905,15 +185058,15 @@ async function installSkill(opts) {
183905
185058
  for (const relativePath of sourceFiles) {
183906
185059
  const sourcePath = join3(source, relativePath);
183907
185060
  const targetPath = join3(target, relativePath);
183908
- const sourceBytes = templateSourceFile(relativePath, readFileSync4(sourcePath), cliVersion);
185061
+ const sourceBytes = templateSourceFile(relativePath, readFileSync5(sourcePath), cliVersion);
183909
185062
  const sourceHash = sha256(sourceBytes);
183910
- if (!existsSync4(targetPath)) {
185063
+ if (!existsSync5(targetPath)) {
183911
185064
  mkdirSync3(dirname3(targetPath), { recursive: true });
183912
185065
  writeFileSync3(targetPath, sourceBytes);
183913
185066
  written += 1;
183914
185067
  continue;
183915
185068
  }
183916
- const targetBytes = readFileSync4(targetPath);
185069
+ const targetBytes = readFileSync5(targetPath);
183917
185070
  const targetHash = sha256(targetBytes);
183918
185071
  if (targetHash === sourceHash) {
183919
185072
  skipped += 1;
@@ -183942,9 +185095,9 @@ async function installSkill(opts) {
183942
185095
  const manifestEntries = [];
183943
185096
  for (const relativePath of sourceFiles) {
183944
185097
  const targetPath = join3(target, relativePath);
183945
- if (!existsSync4(targetPath))
185098
+ if (!existsSync5(targetPath))
183946
185099
  continue;
183947
- manifestEntries.push({ path: relativePath, sha256: sha256(readFileSync4(targetPath)) });
185100
+ manifestEntries.push({ path: relativePath, sha256: sha256(readFileSync5(targetPath)) });
183948
185101
  }
183949
185102
  const manifest = {
183950
185103
  cliVersion,
@@ -183978,19 +185131,19 @@ async function uninstallSkill(opts) {
183978
185131
  let removed = 0;
183979
185132
  let kept = 0;
183980
185133
  for (const entry of manifest.files) {
183981
- const path2 = resolve2(targetReal, entry.path);
183982
- if (path2 !== targetReal && !path2.startsWith(safeBase)) {
183983
- console.error(`Refusing to touch ${path2}: manifest path escapes ${targetReal}`);
185134
+ const path3 = resolve2(targetReal, entry.path);
185135
+ if (path3 !== targetReal && !path3.startsWith(safeBase)) {
185136
+ console.error(`Refusing to touch ${path3}: manifest path escapes ${targetReal}`);
183984
185137
  continue;
183985
185138
  }
183986
- if (!existsSync4(path2))
185139
+ if (!existsSync5(path3))
183987
185140
  continue;
183988
- const currentHash = sha256(readFileSync4(path2));
185141
+ const currentHash = sha256(readFileSync5(path3));
183989
185142
  if (currentHash !== entry.sha256 && !opts.yes) {
183990
185143
  kept += 1;
183991
185144
  continue;
183992
185145
  }
183993
- unlinkSync2(path2);
185146
+ unlinkSync2(path3);
183994
185147
  removed += 1;
183995
185148
  }
183996
185149
  rmSync(join3(target, MANIFEST_NAME), { force: true });
@@ -184185,17 +185338,17 @@ function hintFor(tool, installed, detected) {
184185
185338
  return tool.relativePath;
184186
185339
  }
184187
185340
  function isInstalled(cwd, tool) {
184188
- return existsSync4(join3(cwd, tool.relativePath, MANIFEST_NAME));
185341
+ return existsSync5(join3(cwd, tool.relativePath, MANIFEST_NAME));
184189
185342
  }
184190
185343
  function isProjectUsing(cwd, tool) {
184191
- return tool.detectPaths.some((p2) => existsSync4(join3(cwd, p2)));
185344
+ return tool.detectPaths.some((p2) => existsSync5(join3(cwd, p2)));
184192
185345
  }
184193
185346
  function listFiles(root) {
184194
185347
  const out = [];
184195
185348
  const stack = [root];
184196
185349
  while (stack.length > 0) {
184197
185350
  const dir = stack.pop();
184198
- for (const entry of readdirSync2(dir)) {
185351
+ for (const entry of readdirSync3(dir)) {
184199
185352
  const full = join3(dir, entry);
184200
185353
  const rel = relative2(root, full);
184201
185354
  const stats = lstatSync(full);
@@ -184211,11 +185364,11 @@ function listFiles(root) {
184211
185364
  return out.sort();
184212
185365
  }
184213
185366
  function readManifest(target) {
184214
- const path2 = join3(target, MANIFEST_NAME);
184215
- if (!existsSync4(path2))
185367
+ const path3 = join3(target, MANIFEST_NAME);
185368
+ if (!existsSync5(path3))
184216
185369
  return null;
184217
185370
  try {
184218
- return JSON.parse(readFileSync4(path2, "utf-8"));
185371
+ return JSON.parse(readFileSync5(path3, "utf-8"));
184219
185372
  } catch {
184220
185373
  return null;
184221
185374
  }
@@ -184228,8 +185381,8 @@ function readCliVersion() {
184228
185381
  resolve2(here, "..", "package.json")
184229
185382
  ];
184230
185383
  for (const candidate of candidates) {
184231
- if (existsSync4(candidate)) {
184232
- const pkg = JSON.parse(readFileSync4(candidate, "utf-8"));
185384
+ if (existsSync5(candidate)) {
185385
+ const pkg = JSON.parse(readFileSync5(candidate, "utf-8"));
184233
185386
  if (pkg.version)
184234
185387
  return pkg.version;
184235
185388
  }
@@ -184238,11 +185391,11 @@ function readCliVersion() {
184238
185391
  return "unknown";
184239
185392
  }
184240
185393
  function pruneEmptyDirs(root) {
184241
- if (!existsSync4(root))
185394
+ if (!existsSync5(root))
184242
185395
  return;
184243
185396
  const stack = [];
184244
185397
  const collect2 = (dir) => {
184245
- for (const entry of readdirSync2(dir)) {
185398
+ for (const entry of readdirSync3(dir)) {
184246
185399
  const full = join3(dir, entry);
184247
185400
  if (lstatSync(full).isDirectory())
184248
185401
  collect2(full);
@@ -184252,13 +185405,13 @@ function pruneEmptyDirs(root) {
184252
185405
  collect2(root);
184253
185406
  for (const dir of stack) {
184254
185407
  try {
184255
- if (readdirSync2(dir).length === 0)
185408
+ if (readdirSync3(dir).length === 0)
184256
185409
  rmdirSync(dir);
184257
185410
  } catch {}
184258
185411
  }
184259
185412
  }
184260
- async function promptThreeWay(path2, source, current) {
184261
- const display = relative2(process.cwd(), path2) || path2;
185413
+ async function promptThreeWay(path3, source, current) {
185414
+ const display = relative2(process.cwd(), path3) || path3;
184262
185415
  while (true) {
184263
185416
  const choice = await Ee({
184264
185417
  message: `${display} has been edited locally`,
@@ -184363,9 +185516,9 @@ async function status(opts) {
184363
185516
  console.log(lines.join(`
184364
185517
  `));
184365
185518
  }
184366
- async function fetchAuthOrNull(client, path2) {
185519
+ async function fetchAuthOrNull(client, path3) {
184367
185520
  try {
184368
- return await client.get(path2);
185521
+ return await client.get(path3);
184369
185522
  } catch (err) {
184370
185523
  if (err instanceof ApiError && (err.status === 401 || err.status === 403)) {
184371
185524
  return null;
@@ -184373,9 +185526,9 @@ async function fetchAuthOrNull(client, path2) {
184373
185526
  throw err;
184374
185527
  }
184375
185528
  }
184376
- async function fetchOrNull(client, path2) {
185529
+ async function fetchOrNull(client, path3) {
184377
185530
  try {
184378
- return await client.get(path2);
185531
+ return await client.get(path3);
184379
185532
  } catch {
184380
185533
  return null;
184381
185534
  }
@@ -185026,13 +186179,13 @@ function zipSync(data, opts) {
185026
186179
  }
185027
186180
 
185028
186181
  // src/commands/workflow/index.ts
185029
- import { existsSync as existsSync10, promises as fs10 } from "node:fs";
186182
+ import { existsSync as existsSync11, promises as fs10 } from "node:fs";
185030
186183
  import path15 from "node:path";
185031
186184
  import { createInterface as createInterface3 } from "node:readline/promises";
185032
186185
 
185033
186186
  // src/lib/format-eigenpal.ts
185034
- import { spawnSync as spawnSync2 } from "child_process";
185035
- import { existsSync as existsSync5, readFileSync as readFileSync5 } from "fs";
186187
+ import { spawnSync as spawnSync3 } from "child_process";
186188
+ import { existsSync as existsSync6, readFileSync as readFileSync6 } from "fs";
185036
186189
  import { join as join4, resolve as resolve3 } from "path";
185037
186190
  var PRETTRC_NAMES = [
185038
186191
  ".prettierrc",
@@ -185046,14 +186199,14 @@ var PRETTRC_NAMES = [
185046
186199
  ];
185047
186200
  function hasPrettierConfig(cwd) {
185048
186201
  for (const name of PRETTRC_NAMES) {
185049
- if (existsSync5(join4(cwd, name)))
186202
+ if (existsSync6(join4(cwd, name)))
185050
186203
  return true;
185051
186204
  }
185052
186205
  try {
185053
186206
  const pkgPath = join4(cwd, "package.json");
185054
- if (!existsSync5(pkgPath))
186207
+ if (!existsSync6(pkgPath))
185055
186208
  return false;
185056
- const raw = readFileSync5(pkgPath, "utf-8");
186209
+ const raw = readFileSync6(pkgPath, "utf-8");
185057
186210
  const pkg = JSON.parse(raw);
185058
186211
  return pkg != null && typeof pkg === "object" && "prettier" in pkg;
185059
186212
  } catch {
@@ -185063,12 +186216,12 @@ function hasPrettierConfig(cwd) {
185063
186216
  function formatEigenpalDirIfAvailable(dir) {
185064
186217
  const cwd = process.cwd();
185065
186218
  const absDir = resolve3(cwd, dir);
185066
- if (!existsSync5(absDir))
186219
+ if (!existsSync6(absDir))
185067
186220
  return;
185068
186221
  if (!hasPrettierConfig(cwd))
185069
186222
  return;
185070
186223
  const runner = typeof Bun !== "undefined" ? "bunx" : "npx";
185071
- spawnSync2(runner, ["prettier", "--write", absDir], {
186224
+ spawnSync3(runner, ["prettier", "--write", absDir], {
185072
186225
  cwd,
185073
186226
  stdio: "ignore",
185074
186227
  shell: false
@@ -185150,19 +186303,19 @@ async function resolveWorkflowId(client, idOrSlug) {
185150
186303
  }
185151
186304
 
185152
186305
  // src/commands/clear.ts
185153
- import { existsSync as existsSync7, readdirSync as readdirSync4, rmSync as rmSync2, statSync as statSync3 } from "fs";
186306
+ import { existsSync as existsSync8, readdirSync as readdirSync5, rmSync as rmSync2, statSync as statSync4 } from "fs";
185154
186307
  import { basename, join as join7 } from "path";
185155
186308
 
185156
186309
  // src/lib/payload.ts
185157
- import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync6, statSync as statSync2 } from "fs";
186310
+ import { existsSync as existsSync7, readdirSync as readdirSync4, readFileSync as readFileSync7, statSync as statSync3 } from "fs";
185158
186311
  import { join as join6 } from "path";
185159
186312
 
185160
186313
  // src/lib/fs-helpers.ts
185161
- var import_yaml3 = __toESM(require_dist(), 1);
186314
+ var import_yaml4 = __toESM(require_dist(), 1);
185162
186315
  import { extname, join as join5 } from "path";
185163
186316
 
185164
186317
  // src/lib/normalize.ts
185165
- var import_yaml2 = __toESM(require_dist(), 1);
186318
+ var import_yaml3 = __toESM(require_dist(), 1);
185166
186319
 
185167
186320
  // src/lib/fs-helpers.ts
185168
186321
  var EXT_MIME = {
@@ -185193,7 +186346,7 @@ var DATASET_EXAMPLES_DIR = ["dataset", "examples"];
185193
186346
  function resolveEvalBaseDir(dir) {
185194
186347
  const candidates = [join6(dir, ...DATASET_EXAMPLES_DIR), join6(...DATASET_EXAMPLES_DIR)];
185195
186348
  for (const candidate of candidates) {
185196
- if (existsSync6(candidate))
186349
+ if (existsSync7(candidate))
185197
186350
  return candidate;
185198
186351
  }
185199
186352
  return null;
@@ -185203,7 +186356,7 @@ function getExampleNames(dir, exampleNamesFilter) {
185203
186356
  if (!baseDir) {
185204
186357
  throw new Error(`No dataset/examples directory found at ${join6(dir, ...DATASET_EXAMPLES_DIR)}. Run \`eigenpal init workflow <name>\` to scaffold one.`);
185205
186358
  }
185206
- const all = readdirSync3(baseDir).filter((name) => statSync2(join6(baseDir, name)).isDirectory() && existsSync6(join6(baseDir, name, "input", "arguments.json"))).sort((a, b2) => a.localeCompare(b2, undefined, { numeric: true }));
186359
+ const all = readdirSync4(baseDir).filter((name) => statSync3(join6(baseDir, name)).isDirectory() && existsSync7(join6(baseDir, name, "input", "arguments.json"))).sort((a, b2) => a.localeCompare(b2, undefined, { numeric: true }));
185207
186360
  if (!exampleNamesFilter?.length)
185208
186361
  return all;
185209
186362
  return all.filter((n) => exampleNamesFilter.includes(n));
@@ -185211,18 +186364,18 @@ function getExampleNames(dir, exampleNamesFilter) {
185211
186364
  function readInput(exampleDir) {
185212
186365
  const argsPath = join6(exampleDir, "input", "arguments.json");
185213
186366
  const inputDir = join6(exampleDir, "input");
185214
- const scalars = JSON.parse(readFileSync6(argsPath, "utf-8"));
186367
+ const scalars = JSON.parse(readFileSync7(argsPath, "utf-8"));
185215
186368
  const files = [];
185216
- for (const entry of readdirSync3(inputDir)) {
186369
+ for (const entry of readdirSync4(inputDir)) {
185217
186370
  const full = join6(inputDir, entry);
185218
- if (!statSync2(full).isDirectory())
186371
+ if (!statSync3(full).isDirectory())
185219
186372
  continue;
185220
- const filenames = readdirSync3(full).filter((f) => statSync2(join6(full, f)).isFile()).sort();
186373
+ const filenames = readdirSync4(full).filter((f) => statSync3(join6(full, f)).isFile()).sort();
185221
186374
  for (const filename of filenames) {
185222
186375
  files.push({
185223
186376
  argument: entry,
185224
186377
  filename,
185225
- content: readFileSync6(join6(full, filename)),
186378
+ content: readFileSync7(join6(full, filename)),
185226
186379
  mimeType: guessMimeType(filename)
185227
186380
  });
185228
186381
  }
@@ -185231,9 +186384,9 @@ function readInput(exampleDir) {
185231
186384
  }
185232
186385
  function readOverrides(exampleDir) {
185233
186386
  const metaPath = join6(exampleDir, "meta.json");
185234
- if (!existsSync6(metaPath))
186387
+ if (!existsSync7(metaPath))
185235
186388
  return null;
185236
- const raw = JSON.parse(readFileSync6(metaPath, "utf-8"));
186389
+ const raw = JSON.parse(readFileSync7(metaPath, "utf-8"));
185237
186390
  const ov = raw.overrides;
185238
186391
  if (ov && typeof ov === "object" && "steps" in ov && typeof ov.steps === "object") {
185239
186392
  return ov;
@@ -185251,13 +186404,13 @@ function buildExamplePayload(exampleDir) {
185251
186404
 
185252
186405
  // src/commands/clear.ts
185253
186406
  var EMPTY_REPORT = { removed: 0, kept: 0, touched: 0 };
185254
- function getDirectoryEntries(path2) {
185255
- if (!existsSync7(path2))
186407
+ function getDirectoryEntries(path3) {
186408
+ if (!existsSync8(path3))
185256
186409
  return [];
185257
- return readdirSync4(path2).filter((entry) => statSync3(join7(path2, entry)).isDirectory()).sort();
186410
+ return readdirSync5(path3).filter((entry) => statSync4(join7(path3, entry)).isDirectory()).sort();
185258
186411
  }
185259
- function removeDirEntriesWithRetention(path2, removeAll) {
185260
- const entries = getDirectoryEntries(path2);
186412
+ function removeDirEntriesWithRetention(path3, removeAll) {
186413
+ const entries = getDirectoryEntries(path3);
185261
186414
  if (entries.length === 0)
185262
186415
  return EMPTY_REPORT;
185263
186416
  const keepSet = new Set;
@@ -185267,16 +186420,16 @@ function removeDirEntriesWithRetention(path2, removeAll) {
185267
186420
  for (const entry of entries) {
185268
186421
  if (keepSet.has(entry))
185269
186422
  continue;
185270
- rmSync2(join7(path2, entry), { recursive: true, force: true });
186423
+ rmSync2(join7(path3, entry), { recursive: true, force: true });
185271
186424
  removed++;
185272
186425
  }
185273
186426
  return { removed, kept: keepSet.size, touched: entries.length };
185274
186427
  }
185275
186428
  function removeJudgeSummaryFilesWithRetention(exampleDir, removeAll) {
185276
- if (!existsSync7(exampleDir))
186429
+ if (!existsSync8(exampleDir))
185277
186430
  return EMPTY_REPORT;
185278
186431
  const stampByFile = new Map;
185279
- for (const fileName of readdirSync4(exampleDir).sort()) {
186432
+ for (const fileName of readdirSync5(exampleDir).sort()) {
185280
186433
  const match = /^llm-judge-summary-(.+)\.(json|md)$/.exec(fileName);
185281
186434
  if (match)
185282
186435
  stampByFile.set(fileName, match[1]);
@@ -185305,7 +186458,7 @@ function getTargetExampleDirs(dir, exampleNames) {
185305
186458
  error51(`No dataset/examples directory at ${join7(dir, "dataset", "examples")}`);
185306
186459
  process.exit(1);
185307
186460
  }
185308
- const all = readdirSync4(baseDir).filter((entry) => statSync3(join7(baseDir, entry)).isDirectory());
186461
+ const all = readdirSync5(baseDir).filter((entry) => statSync4(join7(baseDir, entry)).isDirectory());
185309
186462
  if (exampleNames.length === 0)
185310
186463
  return all.map((name) => join7(baseDir, name));
185311
186464
  const matched = all.filter((name) => exampleNames.includes(name));
@@ -185345,7 +186498,7 @@ async function clearEvalOutputs(dir, exampleNames = [], options = {}) {
185345
186498
  runSection({
185346
186499
  exampleDirs,
185347
186500
  clean: (exampleDir) => removeDirEntriesWithRetention(join7(exampleDir, "executions"), removeAll),
185348
- shouldCount: (exampleDir) => existsSync7(join7(exampleDir, "executions")),
186501
+ shouldCount: (exampleDir) => existsSync8(join7(exampleDir, "executions")),
185349
186502
  successLabel: "Execution cleanup complete",
185350
186503
  scannedLabel: "examples scanned:",
185351
186504
  seenLabel: "runs seen: ",
@@ -185357,7 +186510,7 @@ async function clearEvalOutputs(dir, exampleNames = [], options = {}) {
185357
186510
  runSection({
185358
186511
  exampleDirs,
185359
186512
  clean: (exampleDir) => removeJudgeSummaryFilesWithRetention(exampleDir, removeAll),
185360
- shouldCount: (exampleDir) => existsSync7(exampleDir),
186513
+ shouldCount: (exampleDir) => existsSync8(exampleDir),
185361
186514
  successLabel: "Judge summary cleanup complete",
185362
186515
  scannedLabel: "examples scanned: ",
185363
186516
  seenLabel: "summary files seen: ",
@@ -185490,18 +186643,18 @@ async function watchExecution(opts) {
185490
186643
  import { join as join11 } from "path";
185491
186644
 
185492
186645
  // src/lib/execution-artifacts.ts
185493
- import { existsSync as existsSync8, mkdirSync as mkdirSync4, readdirSync as readdirSync5, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "fs";
186646
+ import { existsSync as existsSync9, mkdirSync as mkdirSync4, readdirSync as readdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync5 } from "fs";
185494
186647
  import { join as join10 } from "path";
185495
186648
 
185496
186649
  // src/lib/format.ts
185497
- import { readFileSync as readFileSync7, writeFileSync as writeFileSync4 } from "fs";
186650
+ import { readFileSync as readFileSync8, writeFileSync as writeFileSync4 } from "fs";
185498
186651
  import { extname as extname3, resolve as resolve5 } from "path";
185499
186652
  var PRETTIER_EXTENSIONS = new Set([".json", ".yaml", ".yml"]);
185500
186653
  async function formatFileIfAvailable(filepath) {
185501
186654
  if (!PRETTIER_EXTENSIONS.has(extname3(filepath)))
185502
186655
  return;
185503
186656
  try {
185504
- const content = readFileSync7(filepath, "utf-8");
186657
+ const content = readFileSync8(filepath, "utf-8");
185505
186658
  const prettier = await Promise.resolve().then(() => (init_prettier(), exports_prettier));
185506
186659
  const formatted = await prettier.format(content, {
185507
186660
  filepath: resolve5(filepath)
@@ -186267,13 +187420,13 @@ function parseWorkflow(yaml) {
186267
187420
  return result.data;
186268
187421
  }
186269
187422
  // src/commands/validate.ts
186270
- var import_yaml5 = __toESM(require_dist(), 1);
186271
- import { existsSync as existsSync9, readdirSync as readdirSync6, readFileSync as readFileSync9, statSync as statSync5 } from "fs";
187423
+ var import_yaml6 = __toESM(require_dist(), 1);
187424
+ import { existsSync as existsSync10, readdirSync as readdirSync7, readFileSync as readFileSync10, statSync as statSync6 } from "fs";
186272
187425
  import { join as join12, resolve as resolve6 } from "path";
186273
187426
  var NAME_RE = /^[a-z0-9][a-z0-9-_]*$/;
186274
187427
  function isDirSafe(path15, issues, field) {
186275
187428
  try {
186276
- return statSync5(path15).isDirectory();
187429
+ return statSync6(path15).isDirectory();
186277
187430
  } catch (err2) {
186278
187431
  issues.push({
186279
187432
  field,
@@ -186283,10 +187436,10 @@ function isDirSafe(path15, issues, field) {
186283
187436
  }
186284
187437
  }
186285
187438
  function validateWorkflowYaml(path15) {
186286
- if (!existsSync9(path15)) {
187439
+ if (!existsSync10(path15)) {
186287
187440
  return [{ field: path15, message: "File not found." }];
186288
187441
  }
186289
- const text = readFileSync9(path15, "utf-8");
187442
+ const text = readFileSync10(path15, "utf-8");
186290
187443
  try {
186291
187444
  parseWorkflow(text);
186292
187445
  return [];
@@ -186305,13 +187458,13 @@ function validateWorkflowYaml(path15) {
186305
187458
  }
186306
187459
  }
186307
187460
  function validateEvaluatorsYaml(path15) {
186308
- if (!existsSync9(path15)) {
187461
+ if (!existsSync10(path15)) {
186309
187462
  return [{ field: path15, message: "File not found." }];
186310
187463
  }
186311
- const text = readFileSync9(path15, "utf-8");
187464
+ const text = readFileSync10(path15, "utf-8");
186312
187465
  let parsed;
186313
187466
  try {
186314
- parsed = import_yaml5.parse(text);
187467
+ parsed = import_yaml6.parse(text);
186315
187468
  } catch (err2) {
186316
187469
  return [{ field: "yaml", message: err2 instanceof Error ? err2.message : "YAML parse error" }];
186317
187470
  }
@@ -186325,21 +187478,21 @@ function validateEvaluatorsYaml(path15) {
186325
187478
  }
186326
187479
  function validateDatasetFolder(root2) {
186327
187480
  const issues = [];
186328
- if (!existsSync9(root2)) {
187481
+ if (!existsSync10(root2)) {
186329
187482
  return [{ field: root2, message: "Folder not found." }];
186330
187483
  }
186331
- if (existsSync9(join12(root2, "manifest.json"))) {
187484
+ if (existsSync10(join12(root2, "manifest.json"))) {
186332
187485
  issues.push({
186333
187486
  field: "manifest.json",
186334
187487
  message: "Top-level manifest.json is the legacy format. Re-export the dataset using the folder convention."
186335
187488
  });
186336
187489
  }
186337
187490
  const examplesDir = join12(root2, "examples");
186338
- if (!existsSync9(examplesDir)) {
187491
+ if (!existsSync10(examplesDir)) {
186339
187492
  issues.push({ field: "examples/", message: "No examples/ directory found at dataset root." });
186340
187493
  return issues;
186341
187494
  }
186342
- for (const exampleName of readdirSync6(examplesDir)) {
187495
+ for (const exampleName of readdirSync7(examplesDir)) {
186343
187496
  const exampleFolder = join12(examplesDir, exampleName);
186344
187497
  if (!isDirSafe(exampleFolder, issues, `examples/${exampleName}`))
186345
187498
  continue;
@@ -186351,7 +187504,7 @@ function validateDatasetFolder(root2) {
186351
187504
  continue;
186352
187505
  }
186353
187506
  const argsPath = join12(exampleFolder, "input", "arguments.json");
186354
- if (!existsSync9(argsPath)) {
187507
+ if (!existsSync10(argsPath)) {
186355
187508
  issues.push({
186356
187509
  field: `examples/${exampleName}/input/arguments.json`,
186357
187510
  message: "Missing required arguments.json."
@@ -186360,7 +187513,7 @@ function validateDatasetFolder(root2) {
186360
187513
  }
186361
187514
  let args;
186362
187515
  try {
186363
- const parsed = JSON.parse(readFileSync9(argsPath, "utf-8"));
187516
+ const parsed = JSON.parse(readFileSync10(argsPath, "utf-8"));
186364
187517
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
186365
187518
  issues.push({
186366
187519
  field: `examples/${exampleName}/input/arguments.json`,
@@ -186377,14 +187530,14 @@ function validateDatasetFolder(root2) {
186377
187530
  continue;
186378
187531
  }
186379
187532
  const inputDir = join12(exampleFolder, "input");
186380
- for (const entry of readdirSync6(inputDir)) {
187533
+ for (const entry of readdirSync7(inputDir)) {
186381
187534
  if (entry === "arguments.json")
186382
187535
  continue;
186383
187536
  const sub = join12(inputDir, entry);
186384
187537
  const field = `examples/${exampleName}/input/${entry}`;
186385
187538
  let isDir;
186386
187539
  try {
186387
- isDir = statSync5(sub).isDirectory();
187540
+ isDir = statSync6(sub).isDirectory();
186388
187541
  } catch (err2) {
186389
187542
  issues.push({
186390
187543
  field,
@@ -186413,12 +187566,12 @@ function validateDatasetFolder(root2) {
186413
187566
  }
186414
187567
  }
186415
187568
  const expectedDir = join12(exampleFolder, "expected");
186416
- if (existsSync9(expectedDir)) {
187569
+ if (existsSync10(expectedDir)) {
186417
187570
  const expectedPath = join12(expectedDir, "output.json");
186418
- if (existsSync9(expectedPath)) {
187571
+ if (existsSync10(expectedPath)) {
186419
187572
  let parsed;
186420
187573
  try {
186421
- parsed = JSON.parse(readFileSync9(expectedPath, "utf-8"));
187574
+ parsed = JSON.parse(readFileSync10(expectedPath, "utf-8"));
186422
187575
  } catch {
186423
187576
  issues.push({
186424
187577
  field: `examples/${exampleName}/expected/output.json`,
@@ -186433,14 +187586,14 @@ function validateDatasetFolder(root2) {
186433
187586
  });
186434
187587
  }
186435
187588
  }
186436
- for (const entry of readdirSync6(expectedDir)) {
187589
+ for (const entry of readdirSync7(expectedDir)) {
186437
187590
  if (entry === "output.json")
186438
187591
  continue;
186439
187592
  const sub = join12(expectedDir, entry);
186440
187593
  const field = `examples/${exampleName}/expected/${entry}`;
186441
187594
  let isDir;
186442
187595
  try {
186443
- isDir = statSync5(sub).isDirectory();
187596
+ isDir = statSync6(sub).isDirectory();
186444
187597
  } catch (err2) {
186445
187598
  issues.push({
186446
187599
  field,
@@ -186675,9 +187828,9 @@ function buildBatchDiff(args) {
186675
187828
  function aggregateByEvaluator(rows) {
186676
187829
  const buckets = new Map;
186677
187830
  for (const r5 of rows) {
186678
- const list = buckets.get(r5.evaluator);
186679
- if (list)
186680
- list.push(r5);
187831
+ const list2 = buckets.get(r5.evaluator);
187832
+ if (list2)
187833
+ list2.push(r5);
186681
187834
  else
186682
187835
  buckets.set(r5.evaluator, [r5]);
186683
187836
  }
@@ -187086,7 +188239,7 @@ flag would otherwise shadow it. Validation failures come back as
187086
188239
  defaultValue: "workflow.yaml",
187087
188240
  validate: (value) => {
187088
188241
  const p4 = value || "workflow.yaml";
187089
- if (!existsSync10(p4))
188242
+ if (!existsSync11(p4))
187090
188243
  return `Not found: ${p4}`;
187091
188244
  return;
187092
188245
  }
@@ -187508,11 +188661,11 @@ async function resolveExampleIds(client, workflowId, raw) {
187508
188661
  const bySlug = new Map;
187509
188662
  let offset = 0;
187510
188663
  while (true) {
187511
- const list = await client.get(`/api/v1/workflows/${workflowId}/eval-examples`, {
188664
+ const list2 = await client.get(`/api/v1/workflows/${workflowId}/eval-examples`, {
187512
188665
  limit: String(PAGE_SIZE),
187513
188666
  offset: String(offset)
187514
188667
  });
187515
- const rows = list.data ?? [];
188668
+ const rows = list2.data ?? [];
187516
188669
  for (const row of rows) {
187517
188670
  if (row.name)
187518
188671
  bySlug.set(row.name, row.id);
@@ -187787,7 +188940,7 @@ Behavior:
187787
188940
  const dest = opts.pull ? opts.pullOnComplete ?? `./results-${batchId}.${opts.format}` : null;
187788
188941
  if (dest) {
187789
188942
  const dir = path15.dirname(dest);
187790
- if (!existsSync10(dir)) {
188943
+ if (!existsSync11(dir)) {
187791
188944
  error51(`Destination directory does not exist: ${dir}. Create it first or pass a path under an existing directory.`);
187792
188945
  process.exit(2);
187793
188946
  }
@@ -187926,8 +189079,8 @@ async function pollExperimentUntilTerminal({
187926
189079
  }
187927
189080
  }
187928
189081
  function registerVersionsCommands(parent) {
187929
- const versions2 = parent.command("versions").description("Inspect and restore historical workflow versions.");
187930
- const listCmd = versions2.command("list <workflow-id>").description(descriptionFor("workflow_list_versions"));
189082
+ const versions3 = parent.command("versions").description("Inspect and restore historical workflow versions.");
189083
+ const listCmd = versions3.command("list <workflow-id>").description(descriptionFor("workflow_list_versions"));
187931
189084
  addJsonFlag(withBaseUrl(withPagination(listCmd))).action(action(async (workflow2, opts) => {
187932
189085
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
187933
189086
  const raw = await client.get(`/api/v1/workflows/${workflowId}/versions`, {
@@ -187941,7 +189094,7 @@ function registerVersionsCommands(parent) {
187941
189094
  { key: "createdAt", header: "createdAt", format: formatTimestamp }
187942
189095
  ], { ...opts, entityLabel: "version" });
187943
189096
  }));
187944
- const restoreCmd = versions2.command("restore <workflow-id> <versionId>").description(descriptionFor("workflow_restore_version"));
189097
+ const restoreCmd = versions3.command("restore <workflow-id> <versionId>").description(descriptionFor("workflow_restore_version"));
187945
189098
  addJsonFlag(withBaseUrl(restoreCmd)).action(action(async (workflow2, versionId, opts) => {
187946
189099
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
187947
189100
  const result = await client.post(`/api/v1/workflows/${workflowId}/history/${versionId}/restore`, {});
@@ -188421,6 +189574,7 @@ authCmd.command("use [profile]").description("Switch the active profile (persist
188421
189574
  });
188422
189575
  registerWorkflowCommands(program2);
188423
189576
  registerAgentCommands(program2);
189577
+ registerGitCommands(program2);
188424
189578
  program2.command("completion <shell>").description("Print a shell completion script to stdout (supported shells: bash, zsh, fish). Pipe into the appropriate completion file for your shell — see the script header for install instructions.").action(async (shell) => {
188425
189579
  try {
188426
189580
  await completion(shell, program2);
@@ -188487,13 +189641,17 @@ function isEntryPoint() {
188487
189641
  if (!argv1)
188488
189642
  return false;
188489
189643
  try {
188490
- return realpathSync2(argv1) === realpathSync2(__filename3);
189644
+ return realpathSync3(argv1) === realpathSync3(__filename3);
188491
189645
  } catch {
188492
189646
  return false;
188493
189647
  }
188494
189648
  }
188495
189649
  if (isEntryPoint()) {
188496
189650
  configureGroupedHelp(program2);
189651
+ if (hasGitPassthroughSeparator(process.argv)) {
189652
+ await runGitPassthroughFromArgv(process.argv);
189653
+ process.exit(0);
189654
+ }
188497
189655
  program2.parse();
188498
189656
  }
188499
189657
  export {