@eigenpal/cli 0.5.2 → 0.5.3
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 +199 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -68012,6 +68012,180 @@ 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
|
+
var SOURCE_PACKAGE_SEGMENT_PATTERN, SOURCE_COMMIT_SHA_PATTERN, SOURCE_SEMVER_PATTERN, SOURCE_VERSION_RANGE_PATTERN, SourcePackageSegmentSchema, SourcePackageTypeSchema, SourcePackagePathSchema, DottedPackageNameSchema, SourceVersionRefSchema, ReleaseTagSchema, WorkspaceDependencySchema, AutomationTargetSchema;
|
|
68037
|
+
var init_grammar = __esm(() => {
|
|
68038
|
+
init_zod();
|
|
68039
|
+
SOURCE_PACKAGE_SEGMENT_PATTERN = /^[a-z0-9][a-z0-9-]*$/;
|
|
68040
|
+
SOURCE_COMMIT_SHA_PATTERN = /^[0-9a-f]{40}$/;
|
|
68041
|
+
SOURCE_SEMVER_PATTERN = /^[0-9]+\.[0-9]+\.[0-9]+$/;
|
|
68042
|
+
SOURCE_VERSION_RANGE_PATTERN = /^[0-9]+(?:\.[0-9]+)?\.(?:x|\*)$/;
|
|
68043
|
+
SourcePackageSegmentSchema = exports_external.string().regex(SOURCE_PACKAGE_SEGMENT_PATTERN, "Use lowercase letters, numbers, and dashes");
|
|
68044
|
+
SourcePackageTypeSchema = exports_external.enum(["agents", "workflows", "resources", "evaluators"]);
|
|
68045
|
+
SourcePackagePathSchema = exports_external.string().superRefine((value, ctx) => {
|
|
68046
|
+
const parts = value.split("/");
|
|
68047
|
+
if (parts.length < 2) {
|
|
68048
|
+
ctx.addIssue({
|
|
68049
|
+
code: "custom",
|
|
68050
|
+
message: "Package path must include a root and at least one segment"
|
|
68051
|
+
});
|
|
68052
|
+
return;
|
|
68053
|
+
}
|
|
68054
|
+
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
68055
|
+
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
68056
|
+
}
|
|
68057
|
+
for (const segment of parts.slice(1)) {
|
|
68058
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
68059
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
68060
|
+
}
|
|
68061
|
+
}
|
|
68062
|
+
});
|
|
68063
|
+
DottedPackageNameSchema = exports_external.string().superRefine((value, ctx) => {
|
|
68064
|
+
const parts = value.split(".");
|
|
68065
|
+
if (parts.length < 2) {
|
|
68066
|
+
ctx.addIssue({
|
|
68067
|
+
code: "custom",
|
|
68068
|
+
message: "Dotted package name must include a root and at least one segment"
|
|
68069
|
+
});
|
|
68070
|
+
return;
|
|
68071
|
+
}
|
|
68072
|
+
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
68073
|
+
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
68074
|
+
}
|
|
68075
|
+
for (const segment of parts.slice(1)) {
|
|
68076
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
68077
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
68078
|
+
}
|
|
68079
|
+
}
|
|
68080
|
+
});
|
|
68081
|
+
SourceVersionRefSchema = exports_external.union([
|
|
68082
|
+
exports_external.literal("latest"),
|
|
68083
|
+
exports_external.literal("main"),
|
|
68084
|
+
exports_external.string().regex(SOURCE_SEMVER_PATTERN),
|
|
68085
|
+
exports_external.string().regex(SOURCE_VERSION_RANGE_PATTERN),
|
|
68086
|
+
exports_external.string().regex(SOURCE_COMMIT_SHA_PATTERN)
|
|
68087
|
+
]);
|
|
68088
|
+
ReleaseTagSchema = exports_external.string().superRefine((value, ctx) => {
|
|
68089
|
+
const [name, version2, extra] = value.split("@");
|
|
68090
|
+
if (!name || !version2 || extra !== undefined) {
|
|
68091
|
+
ctx.addIssue({ code: "custom", message: "Release tags must be <package>@<X.Y.Z>" });
|
|
68092
|
+
return;
|
|
68093
|
+
}
|
|
68094
|
+
if (!DottedPackageNameSchema.safeParse(name).success) {
|
|
68095
|
+
ctx.addIssue({ code: "custom", message: `Invalid package name: ${name}` });
|
|
68096
|
+
}
|
|
68097
|
+
if (!SOURCE_SEMVER_PATTERN.test(version2)) {
|
|
68098
|
+
ctx.addIssue({ code: "custom", message: `Invalid release version: ${version2}` });
|
|
68099
|
+
}
|
|
68100
|
+
});
|
|
68101
|
+
WorkspaceDependencySchema = exports_external.string().superRefine((value, ctx) => {
|
|
68102
|
+
if (!value.startsWith("workspace:")) {
|
|
68103
|
+
ctx.addIssue({ code: "custom", message: "Workspace dependencies must start with workspace:" });
|
|
68104
|
+
return;
|
|
68105
|
+
}
|
|
68106
|
+
const ref = value.slice("workspace:".length);
|
|
68107
|
+
const [name, version2, extra] = ref.split("@");
|
|
68108
|
+
if (!name || !version2 || extra !== undefined) {
|
|
68109
|
+
ctx.addIssue({
|
|
68110
|
+
code: "custom",
|
|
68111
|
+
message: "Workspace dependencies must be workspace:<package>@<X.Y.Z>"
|
|
68112
|
+
});
|
|
68113
|
+
return;
|
|
68114
|
+
}
|
|
68115
|
+
if (!DottedPackageNameSchema.safeParse(name).success) {
|
|
68116
|
+
ctx.addIssue({ code: "custom", message: `Invalid dependency package: ${name}` });
|
|
68117
|
+
}
|
|
68118
|
+
if (!SOURCE_SEMVER_PATTERN.test(version2)) {
|
|
68119
|
+
ctx.addIssue({ code: "custom", message: `Invalid dependency version: ${version2}` });
|
|
68120
|
+
}
|
|
68121
|
+
});
|
|
68122
|
+
AutomationTargetSchema = exports_external.string().superRefine((value, ctx) => {
|
|
68123
|
+
const [target, ref, extra] = value.split("@");
|
|
68124
|
+
if (!target || extra !== undefined) {
|
|
68125
|
+
ctx.addIssue({ code: "custom", message: "Automation target must be <package>[@ref]" });
|
|
68126
|
+
return;
|
|
68127
|
+
}
|
|
68128
|
+
if (!DottedPackageNameSchema.safeParse(target).success) {
|
|
68129
|
+
ctx.addIssue({ code: "custom", message: `Invalid automation target: ${target}` });
|
|
68130
|
+
}
|
|
68131
|
+
if (ref && !SourceVersionRefSchema.safeParse(ref).success) {
|
|
68132
|
+
ctx.addIssue({ code: "custom", message: `Invalid automation ref: ${ref}` });
|
|
68133
|
+
}
|
|
68134
|
+
});
|
|
68135
|
+
});
|
|
68136
|
+
|
|
68137
|
+
// ../types/src/git-source/manifests.ts
|
|
68138
|
+
var SourceManifestSchemaVersionSchema, DependencyMapSchema, TriggerConfigSchema, CommonPackageManifestFields, RootSourceManifestSchema, AgentPackageManifestSchema, WorkflowPackageManifestSchema, SharedResourcePackageManifestSchema, EvaluatorPackageManifestSchema, SourcePackageManifestSchema;
|
|
68139
|
+
var init_manifests = __esm(() => {
|
|
68140
|
+
init_zod();
|
|
68141
|
+
init_grammar();
|
|
68142
|
+
SourceManifestSchemaVersionSchema = exports_external.literal(1);
|
|
68143
|
+
DependencyMapSchema = exports_external.record(SourcePackageSegmentSchema, WorkspaceDependencySchema);
|
|
68144
|
+
TriggerConfigSchema = exports_external.object({
|
|
68145
|
+
api: exports_external.boolean().optional(),
|
|
68146
|
+
email: exports_external.object({
|
|
68147
|
+
enabled: exports_external.boolean().default(true),
|
|
68148
|
+
aliases: exports_external.array(exports_external.string().email()).default([])
|
|
68149
|
+
}).strict().optional()
|
|
68150
|
+
}).strict();
|
|
68151
|
+
CommonPackageManifestFields = {
|
|
68152
|
+
schemaVersion: SourceManifestSchemaVersionSchema,
|
|
68153
|
+
name: exports_external.string().min(1),
|
|
68154
|
+
description: exports_external.string().optional()
|
|
68155
|
+
};
|
|
68156
|
+
RootSourceManifestSchema = exports_external.object({
|
|
68157
|
+
schemaVersion: SourceManifestSchemaVersionSchema,
|
|
68158
|
+
eigenpalVersion: exports_external.string().min(1)
|
|
68159
|
+
}).strict();
|
|
68160
|
+
AgentPackageManifestSchema = exports_external.object({
|
|
68161
|
+
...CommonPackageManifestFields,
|
|
68162
|
+
model: exports_external.string().optional(),
|
|
68163
|
+
triggers: TriggerConfigSchema.optional(),
|
|
68164
|
+
dependencies: DependencyMapSchema.optional(),
|
|
68165
|
+
evaluators: exports_external.array(exports_external.string().min(1)).optional()
|
|
68166
|
+
}).strict();
|
|
68167
|
+
WorkflowPackageManifestSchema = exports_external.object({
|
|
68168
|
+
...CommonPackageManifestFields,
|
|
68169
|
+
triggers: TriggerConfigSchema.optional(),
|
|
68170
|
+
dependencies: DependencyMapSchema.optional(),
|
|
68171
|
+
evaluators: exports_external.array(exports_external.string().min(1)).optional()
|
|
68172
|
+
}).strict();
|
|
68173
|
+
SharedResourcePackageManifestSchema = exports_external.object(CommonPackageManifestFields).strict();
|
|
68174
|
+
EvaluatorPackageManifestSchema = exports_external.object(CommonPackageManifestFields).strict();
|
|
68175
|
+
SourcePackageManifestSchema = exports_external.union([
|
|
68176
|
+
AgentPackageManifestSchema,
|
|
68177
|
+
WorkflowPackageManifestSchema,
|
|
68178
|
+
SharedResourcePackageManifestSchema,
|
|
68179
|
+
EvaluatorPackageManifestSchema
|
|
68180
|
+
]);
|
|
68181
|
+
});
|
|
68182
|
+
|
|
68183
|
+
// ../types/src/git-source/index.ts
|
|
68184
|
+
var init_git_source = __esm(() => {
|
|
68185
|
+
init_grammar();
|
|
68186
|
+
init_manifests();
|
|
68187
|
+
});
|
|
68188
|
+
|
|
68015
68189
|
// ../types/src/storage/paths.ts
|
|
68016
68190
|
function seg(name, value) {
|
|
68017
68191
|
if (!value || !SEGMENT_RX.test(value)) {
|
|
@@ -68312,7 +68486,9 @@ __export(exports_src, {
|
|
|
68312
68486
|
rootS3Path: () => rootS3Path,
|
|
68313
68487
|
resolveEffectiveMimeType: () => resolveEffectiveMimeType,
|
|
68314
68488
|
requiresSpecializedParser: () => requiresSpecializedParser,
|
|
68489
|
+
pathToDottedPackageName: () => pathToDottedPackageName,
|
|
68315
68490
|
parseStepType: () => parseStepType,
|
|
68491
|
+
parseReleaseTag: () => parseReleaseTag,
|
|
68316
68492
|
parseFileKey: () => parseFileKey,
|
|
68317
68493
|
noopTracingContext: () => noopTracingContext,
|
|
68318
68494
|
mapOCRAttributes: () => mapOCRAttributes,
|
|
@@ -68348,6 +68524,7 @@ __export(exports_src, {
|
|
|
68348
68524
|
getActualDataFromResult: () => getActualDataFromResult,
|
|
68349
68525
|
generateId: () => generateId,
|
|
68350
68526
|
formatZodError: () => formatZodError,
|
|
68527
|
+
formatReleaseTag: () => formatReleaseTag,
|
|
68351
68528
|
formatDiffValue: () => formatDiffValue,
|
|
68352
68529
|
fileFieldNamesFromJsonSchema: () => fileFieldNamesFromJsonSchema,
|
|
68353
68530
|
fieldStemFromGoldenName: () => fieldStemFromGoldenName,
|
|
@@ -68356,6 +68533,7 @@ __export(exports_src, {
|
|
|
68356
68533
|
evalInputKey: () => evalInputKey,
|
|
68357
68534
|
evalExpectedKey: () => evalExpectedKey,
|
|
68358
68535
|
errorHintFor: () => errorHintFor,
|
|
68536
|
+
dottedPackageNameToPath: () => dottedPackageNameToPath,
|
|
68359
68537
|
defaultScriptFunction: () => defaultScriptFunction,
|
|
68360
68538
|
defaultScoreFunction: () => defaultScoreFunction,
|
|
68361
68539
|
convertTsTypeToJsonSchema: () => convertTsTypeToJsonSchema,
|
|
@@ -68371,8 +68549,10 @@ __export(exports_src, {
|
|
|
68371
68549
|
XlsxToJsonOutputSchema: () => XlsxToJsonOutputSchema,
|
|
68372
68550
|
XlsxToJsonInputSchema: () => XlsxToJsonInputSchema,
|
|
68373
68551
|
XlsxToJsonConfigSchema: () => XlsxToJsonConfigSchema,
|
|
68552
|
+
WorkspaceDependencySchema: () => WorkspaceDependencySchema,
|
|
68374
68553
|
WorkflowSettingsSchema: () => WorkflowSettingsSchema,
|
|
68375
68554
|
WorkflowResultSchema: () => WorkflowResultSchema,
|
|
68555
|
+
WorkflowPackageManifestSchema: () => WorkflowPackageManifestSchema,
|
|
68376
68556
|
WorkflowNameSchema: () => WorkflowNameSchema,
|
|
68377
68557
|
WorkflowMetaSchema: () => WorkflowMetaSchema,
|
|
68378
68558
|
WorkflowInputDefSchema: () => WorkflowInputDefSchema,
|
|
@@ -68432,14 +68612,27 @@ __export(exports_src, {
|
|
|
68432
68612
|
SpanTypes: () => SpanTypes,
|
|
68433
68613
|
SpanKindMap: () => SpanKindMap,
|
|
68434
68614
|
SpanKind: () => import_api.SpanKind,
|
|
68615
|
+
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
68616
|
+
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
68617
|
+
SourcePackageSegmentSchema: () => SourcePackageSegmentSchema,
|
|
68618
|
+
SourcePackagePathSchema: () => SourcePackagePathSchema,
|
|
68619
|
+
SourcePackageManifestSchema: () => SourcePackageManifestSchema,
|
|
68620
|
+
SourceManifestSchemaVersionSchema: () => SourceManifestSchemaVersionSchema,
|
|
68621
|
+
SharedResourcePackageManifestSchema: () => SharedResourcePackageManifestSchema,
|
|
68435
68622
|
ScopeStackSchema: () => ScopeStackSchema,
|
|
68436
68623
|
ScopeEntryTypeSchema: () => ScopeEntryTypeSchema,
|
|
68437
68624
|
ScopeEntrySchema: () => ScopeEntrySchema,
|
|
68438
68625
|
STEP_TYPES: () => STEP_TYPES,
|
|
68439
68626
|
STEP_SCHEMAS: () => STEP_SCHEMAS,
|
|
68440
68627
|
STEP_EXECUTION_STATUSES: () => STEP_EXECUTION_STATUSES,
|
|
68628
|
+
SOURCE_VERSION_RANGE_PATTERN: () => SOURCE_VERSION_RANGE_PATTERN,
|
|
68629
|
+
SOURCE_SEMVER_PATTERN: () => SOURCE_SEMVER_PATTERN,
|
|
68630
|
+
SOURCE_PACKAGE_SEGMENT_PATTERN: () => SOURCE_PACKAGE_SEGMENT_PATTERN,
|
|
68631
|
+
SOURCE_COMMIT_SHA_PATTERN: () => SOURCE_COMMIT_SHA_PATTERN,
|
|
68441
68632
|
SCRIPT_FN_MAX_BYTES: () => SCRIPT_FN_MAX_BYTES,
|
|
68442
68633
|
S3_PATH_GRAMMAR: () => S3_PATH_GRAMMAR,
|
|
68634
|
+
RootSourceManifestSchema: () => RootSourceManifestSchema,
|
|
68635
|
+
ReleaseTagSchema: () => ReleaseTagSchema,
|
|
68443
68636
|
ProcessorPortSchema: () => ProcessorPortSchema,
|
|
68444
68637
|
ProcessorExecutionContextSchema: () => ProcessorExecutionContextSchema,
|
|
68445
68638
|
ProcessorDefinitionSchema: () => ProcessorDefinitionSchema,
|
|
@@ -68499,6 +68692,7 @@ __export(exports_src, {
|
|
|
68499
68692
|
EvaluatorsImportRequestSchema: () => EvaluatorsImportRequestSchema,
|
|
68500
68693
|
EvaluatorTypeSchema: () => EvaluatorTypeSchema,
|
|
68501
68694
|
EvaluatorResultSchema: () => EvaluatorResultSchema,
|
|
68695
|
+
EvaluatorPackageManifestSchema: () => EvaluatorPackageManifestSchema,
|
|
68502
68696
|
EvaluatorConfigSchema: () => EvaluatorConfigSchema,
|
|
68503
68697
|
EvaluatorBaseEntrySchema: () => EvaluatorBaseEntrySchema,
|
|
68504
68698
|
EvalResultsExportQuerySchema: () => EvalResultsExportQuerySchema,
|
|
@@ -68523,6 +68717,7 @@ __export(exports_src, {
|
|
|
68523
68717
|
EXECUTION_AGENT_METRICS_STATUSES: () => EXECUTION_AGENT_METRICS_STATUSES,
|
|
68524
68718
|
EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES: () => EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES,
|
|
68525
68719
|
ERROR_HINTS: () => ERROR_HINTS,
|
|
68720
|
+
DottedPackageNameSchema: () => DottedPackageNameSchema,
|
|
68526
68721
|
DocumentParserOutputSchema: () => DocumentParserOutputSchema,
|
|
68527
68722
|
DocumentParserInputSchema: () => DocumentParserInputSchema,
|
|
68528
68723
|
DocumentParserConfigSchema: () => DocumentParserConfigSchema,
|
|
@@ -68560,6 +68755,7 @@ __export(exports_src, {
|
|
|
68560
68755
|
BoundingRegionSchema: () => BoundingRegionSchema,
|
|
68561
68756
|
BlockStepSchema: () => BlockStepSchema,
|
|
68562
68757
|
BaseEntitySchema: () => BaseEntitySchema,
|
|
68758
|
+
AutomationTargetSchema: () => AutomationTargetSchema,
|
|
68563
68759
|
ApprovalStepSchema: () => ApprovalStepSchema,
|
|
68564
68760
|
ApprovalOutputSchema: () => ApprovalOutputSchema,
|
|
68565
68761
|
ApprovalInputSchema: () => ApprovalInputSchema,
|
|
@@ -68569,6 +68765,7 @@ __export(exports_src, {
|
|
|
68569
68765
|
AiParseConfigSchema: () => AiParseConfigSchema,
|
|
68570
68766
|
AiExtractOutputSchema: () => AiExtractOutputSchema,
|
|
68571
68767
|
AiExtractConfigSchema: () => AiExtractConfigSchema,
|
|
68768
|
+
AgentPackageManifestSchema: () => AgentPackageManifestSchema,
|
|
68572
68769
|
ActionTypeValue: () => ActionTypeValue,
|
|
68573
68770
|
ActionTypeSchema: () => ActionTypeSchema,
|
|
68574
68771
|
ActionStepSchema: () => ActionStepSchema,
|
|
@@ -68589,6 +68786,7 @@ var init_src = __esm(() => {
|
|
|
68589
68786
|
init_s3_path_grammar();
|
|
68590
68787
|
init_workflow2();
|
|
68591
68788
|
init_eval();
|
|
68789
|
+
init_git_source();
|
|
68592
68790
|
init_typed_script();
|
|
68593
68791
|
});
|
|
68594
68792
|
|
|
@@ -181152,7 +181350,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
|
|
|
181152
181350
|
// package.json
|
|
181153
181351
|
var package_default = {
|
|
181154
181352
|
name: "@eigenpal/cli",
|
|
181155
|
-
version: "0.5.
|
|
181353
|
+
version: "0.5.3",
|
|
181156
181354
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
181157
181355
|
keywords: [
|
|
181158
181356
|
"eigenpal",
|