@eigenpal/cli 0.6.7 → 0.6.9

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
@@ -19690,6 +19690,15 @@ var init_otel = __esm(() => {
19690
19690
  });
19691
19691
 
19692
19692
  // ../types/src/execution-row.ts
19693
+ function executionPhaseDurationMs(startedAt, completedAt) {
19694
+ return executionWallClockMs(startedAt, completedAt);
19695
+ }
19696
+ function publicExecutionFailure(failure) {
19697
+ if (!failure)
19698
+ return;
19699
+ const { phase, code, category, provider, retryable, userMessage, occurredAt } = failure;
19700
+ return { phase, code, category, provider, retryable, userMessage, occurredAt };
19701
+ }
19693
19702
  function isTerminalExecutionStatus(status) {
19694
19703
  return status != null && TERMINAL_STATUS_SET.has(status);
19695
19704
  }
@@ -19706,7 +19715,7 @@ function executionWallClockMs(startedAt, completedAt) {
19706
19715
  const ms = end - start;
19707
19716
  return ms >= 0 ? ms : null;
19708
19717
  }
19709
- var DURABLE_EXECUTION_TYPES, EXECUTION_STATUSES, TERMINAL_EXECUTION_STATUSES, TERMINAL_STATUS_SET, EXECUTION_NON_TERMINAL_STATUSES, NON_SUCCESS_TERMINAL_EXECUTION_STATUSES, NON_SUCCESS_TERMINAL_SET, EXECUTION_CONCURRENCY_ACTIVE_STATUSES, EXECUTION_SHARED_CANCEL_REQUESTABLE_STATUSES, EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES, EXECUTION_AGENT_QUEUED_STATUSES, EXECUTION_AGENT_REAP_SCAN_STATUSES, EXECUTION_AGENT_METRICS_STATUSES, EXECUTION_EVAL_RUNNING_STATUSES, EXECUTION_FAILED_OR_CANCELLED_STATUSES;
19718
+ var DURABLE_EXECUTION_TYPES, EXECUTION_STATUSES, EXECUTION_PHASES, EXECUTION_PHASE_ORDER, EXECUTION_PHASE_STATUSES, EXECUTION_FAILURE_CATEGORIES, TERMINAL_EXECUTION_STATUSES, TERMINAL_STATUS_SET, EXECUTION_NON_TERMINAL_STATUSES, NON_SUCCESS_TERMINAL_EXECUTION_STATUSES, NON_SUCCESS_TERMINAL_SET, EXECUTION_CONCURRENCY_ACTIVE_STATUSES, EXECUTION_SHARED_CANCEL_REQUESTABLE_STATUSES, EXECUTION_AGENT_CANCEL_REQUESTABLE_STATUSES, EXECUTION_AGENT_QUEUED_STATUSES, EXECUTION_AGENT_REAP_SCAN_STATUSES, EXECUTION_AGENT_METRICS_STATUSES, EXECUTION_EVAL_RUNNING_STATUSES, EXECUTION_FAILED_OR_CANCELLED_STATUSES;
19710
19719
  var init_execution_row = __esm(() => {
19711
19720
  DURABLE_EXECUTION_TYPES = ["workflow", "agent"];
19712
19721
  EXECUTION_STATUSES = [
@@ -19720,6 +19729,43 @@ var init_execution_row = __esm(() => {
19720
19729
  "cancelled",
19721
19730
  "rejected"
19722
19731
  ];
19732
+ EXECUTION_PHASES = [
19733
+ "queued",
19734
+ "starting",
19735
+ "preparing_inputs",
19736
+ "preparing_environment",
19737
+ "installing_dependencies",
19738
+ "running",
19739
+ "collecting_outputs",
19740
+ "finalizing"
19741
+ ];
19742
+ EXECUTION_PHASE_ORDER = {
19743
+ queued: 10,
19744
+ starting: 20,
19745
+ preparing_inputs: 30,
19746
+ preparing_environment: 40,
19747
+ installing_dependencies: 50,
19748
+ running: 60,
19749
+ collecting_outputs: 70,
19750
+ finalizing: 80
19751
+ };
19752
+ EXECUTION_PHASE_STATUSES = [
19753
+ "pending",
19754
+ "running",
19755
+ "completed",
19756
+ "failed",
19757
+ "skipped",
19758
+ "cancelled"
19759
+ ];
19760
+ EXECUTION_FAILURE_CATEGORIES = [
19761
+ "input",
19762
+ "source",
19763
+ "environment",
19764
+ "runtime",
19765
+ "output",
19766
+ "finalization",
19767
+ "system"
19768
+ ];
19723
19769
  TERMINAL_EXECUTION_STATUSES = [
19724
19770
  "completed",
19725
19771
  "failed",
@@ -66739,6 +66785,7 @@ __export(exports_src, {
66739
66785
  rootS3Path: () => rootS3Path,
66740
66786
  resolveEffectiveMimeType: () => resolveEffectiveMimeType,
66741
66787
  requiresSpecializedParser: () => requiresSpecializedParser,
66788
+ publicExecutionFailure: () => publicExecutionFailure,
66742
66789
  projectAgentInputFiles: () => projectAgentInputFiles,
66743
66790
  pathToDottedPackageName: () => pathToDottedPackageName,
66744
66791
  parseStepType: () => parseStepType,
@@ -66791,6 +66838,7 @@ __export(exports_src, {
66791
66838
  fieldStemFromGoldenName: () => fieldStemFromGoldenName,
66792
66839
  extractFieldMetadata: () => extractFieldMetadata,
66793
66840
  executionWallClockMs: () => executionWallClockMs,
66841
+ executionPhaseDurationMs: () => executionPhaseDurationMs,
66794
66842
  evalInputKey: () => evalInputKey,
66795
66843
  evalExpectedKey: () => evalExpectedKey,
66796
66844
  errorHintFor: () => errorHintFor,
@@ -66996,7 +67044,11 @@ __export(exports_src, {
66996
67044
  EXECUTION_TYPES: () => EXECUTION_TYPES,
66997
67045
  EXECUTION_STATUSES: () => EXECUTION_STATUSES,
66998
67046
  EXECUTION_SHARED_CANCEL_REQUESTABLE_STATUSES: () => EXECUTION_SHARED_CANCEL_REQUESTABLE_STATUSES,
67047
+ EXECUTION_PHASE_STATUSES: () => EXECUTION_PHASE_STATUSES,
67048
+ EXECUTION_PHASE_ORDER: () => EXECUTION_PHASE_ORDER,
67049
+ EXECUTION_PHASES: () => EXECUTION_PHASES,
66999
67050
  EXECUTION_NON_TERMINAL_STATUSES: () => EXECUTION_NON_TERMINAL_STATUSES,
67051
+ EXECUTION_FAILURE_CATEGORIES: () => EXECUTION_FAILURE_CATEGORIES,
67000
67052
  EXECUTION_FAILED_OR_CANCELLED_STATUSES: () => EXECUTION_FAILED_OR_CANCELLED_STATUSES,
67001
67053
  EXECUTION_EVAL_RUNNING_STATUSES: () => EXECUTION_EVAL_RUNNING_STATUSES,
67002
67054
  EXECUTION_CONCURRENCY_ACTIVE_STATUSES: () => EXECUTION_CONCURRENCY_ACTIVE_STATUSES,
@@ -188719,7 +188771,7 @@ import { fileURLToPath as fileURLToPath6 } from "url";
188719
188771
  // package.json
188720
188772
  var package_default = {
188721
188773
  name: "@eigenpal/cli",
188722
- version: "0.6.7",
188774
+ version: "0.6.9",
188723
188775
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
188724
188776
  keywords: [
188725
188777
  "eigenpal",
@@ -188829,13 +188881,16 @@ function assertNotHtml(res, resolvedUrl) {
188829
188881
  class ApiClient {
188830
188882
  baseUrl;
188831
188883
  apiKey;
188884
+ tenantId;
188832
188885
  constructor(config) {
188833
188886
  this.baseUrl = config.baseUrl;
188834
188887
  this.apiKey = config.apiKey;
188888
+ this.tenantId = config.tenantId;
188835
188889
  }
188836
188890
  headers(extra = {}) {
188837
188891
  return {
188838
188892
  Authorization: `Bearer ${this.apiKey}`,
188893
+ ...this.tenantId ? { "x-eigenpal-tenant-id": this.tenantId } : {},
188839
188894
  ...extra
188840
188895
  };
188841
188896
  }
@@ -189049,6 +189104,7 @@ var env = createEnv({
189049
189104
  server: {
189050
189105
  EIGENPAL_BASE_URL: exports_external.string().optional(),
189051
189106
  EIGENPAL_API_KEY: exports_external.string().optional(),
189107
+ EIGENPAL_TENANT_ID: exports_external.string().optional(),
189052
189108
  EIGENPAL_DIR: exports_external.string().optional(),
189053
189109
  EIGENPAL_PROFILE: exports_external.string().optional(),
189054
189110
  DEBUG: exports_external.string().optional(),
@@ -189303,10 +189359,12 @@ function resolveConfig(flags) {
189303
189359
  const profile = usingEnvKey ? null : readActiveCredentials();
189304
189360
  const baseUrl = flags.baseUrl || env.EIGENPAL_BASE_URL || profile?.baseUrl || DEFAULT_BASE_URL;
189305
189361
  const apiKey = env.EIGENPAL_API_KEY || profile?.apiKey || "";
189362
+ const tenantId = flags.tenantId || env.EIGENPAL_TENANT_ID || profile?.tenantId;
189306
189363
  const dir = flags.dir || env.EIGENPAL_DIR || "./eigenpal";
189307
189364
  return {
189308
189365
  baseUrl: baseUrl.replace(/\/+$/, ""),
189309
189366
  apiKey,
189367
+ tenantId,
189310
189368
  dir
189311
189369
  };
189312
189370
  }
@@ -191240,7 +191298,7 @@ function parseReleaseVersion(value) {
191240
191298
  return value;
191241
191299
  }
191242
191300
  function registerAgentSourceCommands(agent) {
191243
- withBaseUrl(agent.command("clone")).description("Clone the organization source repository.").option("--out <dir>", "Output directory").action(action(cloneSource));
191301
+ withBaseUrl(agent.command("clone")).description("Clone the organization source repository.").option("--out <dir>", "Output directory").option("--tenant-id <tenantId>", "Target tenant id for admin-token source clones").action(action(cloneSource));
191244
191302
  withBaseUrl(agent.command("install [packageRef]")).description("Materialize a source package and its workspace dependencies.").option("--out <dir>", "Output directory for an explicit package ref").option("--lockfile <path>", "Lockfile path").option("--frozen-lockfile", "Install exactly from the existing lockfile").option("--remote-url <url>", "Use an explicit organization Git remote URL").action(action(install));
191245
191303
  registerSourceInitCommand(agent);
191246
191304
  withBaseUrl(agent.command("pull")).description("Pull organization source from origin/main with --ff-only. For datasets use agents dataset pull; for run artifacts use agents runs artifacts fetch.").option("--dir <dir>", "Repository directory").action(action(pullSource));
@@ -343,10 +343,11 @@ Clone the organization source repository.
343
343
 
344
344
  ### Options
345
345
 
346
- | Flag | Required | Default | Description |
347
- | ------------------ | -------- | ------- | ---------------- |
348
- | `--base-url <url>` | no | | Server base URL |
349
- | `--out <dir>` | no | | Output directory |
346
+ | Flag | Required | Default | Description |
347
+ | ------------------------ | -------- | ------- | ---------------------------------------------- |
348
+ | `--base-url <url>` | no | | Server base URL |
349
+ | `--out <dir>` | no | | Output directory |
350
+ | `--tenant-id <tenantId>` | no | | Target tenant id for admin-token source clones |
350
351
 
351
352
  ### `eigenpal agents|agent install [options] [packageRef]`
352
353
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/cli",
3
- "version": "0.6.7",
3
+ "version": "0.6.9",
4
4
  "description": "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
5
5
  "keywords": [
6
6
  "eigenpal",