@moda-ai/cli 1.55.5 → 1.55.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  authFetch,
3
3
  getCachedLoginContext
4
- } from "./cli-zbpetb7v.js";
4
+ } from "./cli-tw8jj190.js";
5
5
  import {
6
6
  CliAccessError,
7
7
  CliInputError,
@@ -16,7 +16,7 @@ import {
16
16
  resolveTenantIdFromActiveProfile,
17
17
  saveCliConfig,
18
18
  writeSecretJsonFile
19
- } from "./cli-xtj2m4hs.js";
19
+ } from "./cli-mx9r1689.js";
20
20
 
21
21
  // src/init/tenant.ts
22
22
  import { randomUUID } from "node:crypto";
@@ -21,7 +21,7 @@ import {
21
21
  safePromptEvidencePath,
22
22
  scanHarness,
23
23
  setPlatformTenantOverride
24
- } from "./cli-tzqez7mw.js";
24
+ } from "./cli-gxmq4wmn.js";
25
25
  import {
26
26
  SKILL_SOURCE_HARNESS,
27
27
  SKILL_SOURCE_INTEGRATION_BUNDLED,
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  isAuthSessionValid,
36
36
  loadAuthSession
37
- } from "./cli-zbpetb7v.js";
37
+ } from "./cli-tw8jj190.js";
38
38
  import {
39
39
  CliInputError,
40
40
  EXIT_ERROR,
@@ -54,7 +54,7 @@ import {
54
54
  resolveTenantId,
55
55
  secretFilePathFromRef,
56
56
  validateConfig
57
- } from "./cli-xtj2m4hs.js";
57
+ } from "./cli-mx9r1689.js";
58
58
  import {
59
59
  __commonJS,
60
60
  __require,
@@ -6752,7 +6752,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
6752
6752
  const analyzedDefinitions = new Map;
6753
6753
  if (flags["no-analyze"] !== "true") {
6754
6754
  options.onProgress?.("Analyzing prompt sources before sync.");
6755
- const { analyzeHarnessPrompts } = await import("./harness-sqkgk49d.js");
6755
+ const { analyzeHarnessPrompts } = await import("./harness-7eabmv0v.js");
6756
6756
  const result = await analyzeHarnessPrompts({
6757
6757
  rootDir: process.cwd(),
6758
6758
  existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
@@ -7082,7 +7082,7 @@ async function migratePromptManifest(options = {}) {
7082
7082
  let addedSources = [];
7083
7083
  let pendingSources = [];
7084
7084
  if (options.discover) {
7085
- const { analyzeHarnessPrompts } = await import("./harness-sqkgk49d.js");
7085
+ const { analyzeHarnessPrompts } = await import("./harness-7eabmv0v.js");
7086
7086
  const result = await analyzeHarnessPrompts({
7087
7087
  rootDir: root,
7088
7088
  existing: manifest.sources,
@@ -27,7 +27,7 @@ import {
27
27
  resolveTenantId,
28
28
  shouldInventoryFile,
29
29
  stringOption
30
- } from "./cli-xtj2m4hs.js";
30
+ } from "./cli-mx9r1689.js";
31
31
  import {
32
32
  __commonJS,
33
33
  __require,
@@ -184914,7 +184914,7 @@ async function runHarnessCommand(context) {
184914
184914
  throw new CliInputError("Focused remote prompt analysis is not supported yet.", "Use local --analyst=claude|codex|cursor|local-scan, or drop --concern for a full remote report.");
184915
184915
  }
184916
184916
  if (context.flags["github-actions"] === "true") {
184917
- const { runGithubActionsAnalyze } = await import("./harness-github-actions-f3xffdf7.js");
184917
+ const { runGithubActionsAnalyze } = await import("./harness-github-actions-s10y3kpz.js");
184918
184918
  const result = await runGithubActionsAnalyze(rootDir, {
184919
184919
  writeReport: (report2) => {
184920
184920
  const normalized = normalizeHarnessReport(report2);
@@ -1547,7 +1547,7 @@ function formatValidationMessage(error) {
1547
1547
  const message = typeof record.message === "string" ? record.message : "is invalid";
1548
1548
  return `${path}: ${message}`;
1549
1549
  });
1550
- return `Validation error — ${parts.join("; ")}`;
1550
+ return `Validation error — ${[...new Set(parts)].join("; ")}`;
1551
1551
  }
1552
1552
  function errorToAgentError(error) {
1553
1553
  if (error instanceof CliInputRequiredError) {
@@ -8,7 +8,7 @@ import {
8
8
  saveProfileConfig,
9
9
  secretFilePathFromRef,
10
10
  writeSecretJsonFile
11
- } from "./cli-xtj2m4hs.js";
11
+ } from "./cli-mx9r1689.js";
12
12
  import {
13
13
  __require
14
14
  } from "./cli-0v6na3yp.js";
package/dist/cli.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  runPromptsCommand,
9
9
  runSkillsCommand,
10
10
  runStatusCommand
11
- } from "./cli-dw1zrtvn.js";
11
+ } from "./cli-grn40kvh.js";
12
12
  import"./cli-mm48br00.js";
13
13
  import {
14
14
  ApiError,
@@ -39,7 +39,7 @@ import {
39
39
  terminalStyles,
40
40
  unknownSignalsSubcommandError,
41
41
  validateHarnessReport
42
- } from "./cli-tzqez7mw.js";
42
+ } from "./cli-gxmq4wmn.js";
43
43
  import"./cli-ssfq84k5.js";
44
44
  import {
45
45
  authFetch,
@@ -48,7 +48,7 @@ import {
48
48
  loadAuthSession,
49
49
  login,
50
50
  revokeCliSessionToken
51
- } from "./cli-zbpetb7v.js";
51
+ } from "./cli-tw8jj190.js";
52
52
  import {
53
53
  AGENT_ERROR_CODES,
54
54
  CliAccessError,
@@ -103,7 +103,7 @@ import {
103
103
  validateConfig,
104
104
  wasOutputCancelled,
105
105
  writeSecretJsonFile
106
- } from "./cli-xtj2m4hs.js";
106
+ } from "./cli-mx9r1689.js";
107
107
  import {
108
108
  __require
109
109
  } from "./cli-0v6na3yp.js";
@@ -3596,7 +3596,7 @@ async function sendCliUsageTelemetry(input) {
3596
3596
  timeout.unref();
3597
3597
  }
3598
3598
  try {
3599
- await fetch(`${resolveModaBaseUrl()}/api/v1/data/cli-usage`, {
3599
+ await fetch(`${resolveModaBaseUrl({ profile: input.profile })}/api/v1/data/cli-usage`, {
3600
3600
  method: "POST",
3601
3601
  headers: {
3602
3602
  ...apiKeyHeaders(input.apiKey),
@@ -8405,7 +8405,7 @@ function printCommandHelp(definition) {
8405
8405
  lines.push(` ${example}`);
8406
8406
  }
8407
8407
  }
8408
- lines.push("", "Run 'moda --help' for the full command list and common flags", "(--json, --agent, --profile, --days-back, --limit, --time-range, ...).");
8408
+ lines.push("", "Run 'moda --help' for the full command list and the output flags every command", "takes (--json, --agent, --human, --profile). Window and paging flags (--days-back,", "--time-range, --limit, --offset) differ by command; an unsupported one is rejected.");
8409
8409
  console.log(lines.join(`
8410
8410
  `));
8411
8411
  }
@@ -10381,7 +10381,11 @@ function initAgentWriteOptions(result) {
10381
10381
  path: file,
10382
10382
  description: "Created or verified during Moda init."
10383
10383
  })),
10384
- warnings: manualActions.filter((action) => action.reason).map((action) => `${action.title}: ${action.reason}`)
10384
+ warnings: [
10385
+ ...manualActions.filter((action) => action.reason).map((action) => `${action.title}: ${action.reason}`),
10386
+ ...result.promptSync?.status === "failed" ? [`Prompt sync failed: ${result.promptSync.error}. Retry with 'moda prompts sync'.`] : [],
10387
+ ...result.skillSync?.status === "failed" ? [`Skill sync failed: ${result.skillSync.error}. Retry with 'moda skills sync'.`] : []
10388
+ ]
10385
10389
  };
10386
10390
  }
10387
10391
  function initChangedFiles(setupPlan) {
@@ -10418,7 +10422,7 @@ var commandRegistry = createCommandRegistry([
10418
10422
  resetApiRequestCountBeforeRun: true,
10419
10423
  telemetry: "result",
10420
10424
  handler: async (context) => {
10421
- const { runInit } = await import("./index-025z9q34.js");
10425
+ const { runInit } = await import("./index-6wxkhbk5.js");
10422
10426
  if (context.outputMode === "agent-stream") {
10423
10427
  context.output.writeEvent({
10424
10428
  event: "started",
@@ -10459,7 +10463,7 @@ var commandRegistry = createCommandRegistry([
10459
10463
  resetApiRequestCountBeforeRun: true,
10460
10464
  telemetry: "result-and-error",
10461
10465
  handler: async (context) => {
10462
- const { runProvision } = await import("./provision-69h38y7d.js");
10466
+ const { runProvision } = await import("./provision-parsn3xg.js");
10463
10467
  return runProvision(context, {
10464
10468
  resumeCommand: buildResumeCommand("provision", context.rawFlags)
10465
10469
  });
@@ -11407,7 +11411,7 @@ function printCliError(error) {
11407
11411
  return ` ${field}: ${e.message}`;
11408
11412
  });
11409
11413
  safeWriteStderr(`Validation error:
11410
- ${issues.join(`
11414
+ ${[...new Set(issues)].join(`
11411
11415
  `)}
11412
11416
  `);
11413
11417
  } else if (error instanceof ApiError && error.readable) {
@@ -11496,11 +11500,38 @@ async function dispatchParsedCommandInner(parsed, startedAt) {
11496
11500
  printHelp();
11497
11501
  return 1;
11498
11502
  }
11499
- const failEarly = (error) => {
11503
+ const failEarly = (error, commandDefinition) => {
11500
11504
  const mode = resolveOutputMode(commandFlags, {
11501
11505
  isTTY: process.stdout.isTTY,
11502
11506
  env: process.env
11503
11507
  });
11508
+ const telemetryOptOut = telemetryDisabled || flags["no-telemetry"] !== undefined && flags["no-telemetry"] !== "false";
11509
+ if (commandDefinition && !telemetryOptOut && commandDefinition.telemetry === "result-and-error") {
11510
+ const telemetryCommand2 = telemetryCommandName(commandDefinition);
11511
+ const flagProfile = commandFlags.profile && commandFlags.profile !== "true" ? commandFlags.profile : undefined;
11512
+ const telemetryProfile = flagProfile && Object.hasOwn(loadProfileConfig({ env: process.env }).profiles, flagProfile) ? flagProfile : undefined;
11513
+ sendCliUsageTelemetry({
11514
+ apiKey: resolveApiKey({ profile: telemetryProfile }),
11515
+ profile: telemetryProfile,
11516
+ command: telemetryCommand2,
11517
+ flags: commandFlags,
11518
+ status: "error",
11519
+ errorType: classifyCliError(error),
11520
+ validationReason: cliValidationReason(error),
11521
+ exitCode: 1,
11522
+ durationMs: Date.now() - startedAt,
11523
+ apiRequestCount: 0,
11524
+ adoption: buildSearchAdoptionTelemetry({
11525
+ command: telemetryCommand2,
11526
+ positional: parsed.positional,
11527
+ flags: commandFlags,
11528
+ outputMode: mode,
11529
+ recorded: {},
11530
+ skillVersion: process.env.MODA_SKILL_VERSION,
11531
+ subcommands: commandDefinition.subcommands?.map((subcommand2) => subcommand2.name)
11532
+ })
11533
+ });
11534
+ }
11504
11535
  if (mode === "agent" || mode === "agent-stream" || mode === "json") {
11505
11536
  printAgentCliError(command, error, mode);
11506
11537
  } else {
@@ -11513,19 +11544,19 @@ async function dispatchParsedCommandInner(parsed, startedAt) {
11513
11544
  return failEarly(new CliInputError(`Unknown command '${command}'`, 'Run "moda --help" for usage information.'));
11514
11545
  }
11515
11546
  if (parsed.shortFlags?.length) {
11516
- return failEarly(new CliInputError(`Short options are not supported (${parsed.shortFlags.join(", ")}), so nothing was run.`, `Use the long form, e.g. --dry-run, --json, --quiet. See 'moda ${command} --help'.`));
11547
+ return failEarly(new CliInputError(`Short options are not supported (${parsed.shortFlags.join(", ")}), so nothing was run.`, `Use the long form, e.g. --dry-run, --json, --quiet. See 'moda ${command} --help'.`, "short_flag"), definition);
11517
11548
  }
11518
11549
  if (switchError)
11519
- return failEarly(switchError);
11550
+ return failEarly(switchError, definition);
11520
11551
  if (commandFlags.profile === "true" || commandFlags.profile === "") {
11521
- return failEarly(new CliInputError("--profile needs a value, e.g. --profile=prod.", "List profiles with 'moda profiles list'."));
11552
+ return failEarly(new CliInputError("--profile needs a value, e.g. --profile=prod.", "List profiles with 'moda profiles list'.", "missing_value:profile"), definition);
11522
11553
  }
11523
11554
  const requestedProfile = commandFlags.profile ?? process.env.MODA_PROFILE?.trim();
11524
11555
  if (requestedProfile && !PROFILE_MANAGING_COMMANDS.has(definition.name)) {
11525
11556
  const known = Object.keys(loadProfileConfig({ env: process.env }).profiles);
11526
11557
  if (!known.includes(requestedProfile)) {
11527
11558
  const source = commandFlags.profile ? `--profile=${requestedProfile}` : `MODA_PROFILE=${requestedProfile}`;
11528
- return failEarly(new CliInputError(`Moda profile '${requestedProfile}' does not exist (from ${source}), so nothing was run.`, `Known profiles: ${known.join(", ")}. Create it with 'moda profiles create ${requestedProfile}' or fix the name.`));
11559
+ return failEarly(new CliInputError(`Moda profile '${requestedProfile}' does not exist (from ${source}), so nothing was run.`, `Known profiles: ${known.join(", ")}. Create it with 'moda profiles create ${requestedProfile}' or fix the name.`, "unknown_profile"), definition);
11529
11560
  }
11530
11561
  if (commandFlags.profile)
11531
11562
  process.env.MODA_PROFILE = commandFlags.profile;
@@ -42,8 +42,8 @@ import {
42
42
  writeHarnessAnalyzeResult,
43
43
  writeHarnessArtifacts,
44
44
  writeHumanProgress
45
- } from "./cli-tzqez7mw.js";
46
- import"./cli-xtj2m4hs.js";
45
+ } from "./cli-gxmq4wmn.js";
46
+ import"./cli-mx9r1689.js";
47
47
  import"./cli-0v6na3yp.js";
48
48
  export {
49
49
  writeHumanProgress,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  buildSourceSnapshot
3
- } from "./cli-tzqez7mw.js";
3
+ } from "./cli-gxmq4wmn.js";
4
4
  import {
5
5
  recordApiRequest
6
- } from "./cli-xtj2m4hs.js";
6
+ } from "./cli-mx9r1689.js";
7
7
  import"./cli-0v6na3yp.js";
8
8
 
9
9
  // src/harness-github-actions.ts
@@ -3,7 +3,7 @@ import {
3
3
  initPrompts,
4
4
  runPromptSync,
5
5
  runSkillSync
6
- } from "./cli-dw1zrtvn.js";
6
+ } from "./cli-grn40kvh.js";
7
7
  import"./cli-mm48br00.js";
8
8
  import {
9
9
  codingAgentDisplayName,
@@ -23,7 +23,7 @@ import {
23
23
  runHarnessCommand,
24
24
  startRemoteAnalyze,
25
25
  stripAnsi
26
- } from "./cli-tzqez7mw.js";
26
+ } from "./cli-gxmq4wmn.js";
27
27
  import {
28
28
  bundledSkillsDir,
29
29
  installIntegrationSkill,
@@ -35,14 +35,14 @@ import {
35
35
  } from "./cli-ssfq84k5.js";
36
36
  import {
37
37
  selectTenantAndCreateKey
38
- } from "./cli-vxdtfys2.js";
38
+ } from "./cli-fhfdnvh4.js";
39
39
  import {
40
40
  ConnectCodeError,
41
41
  connectWithCode,
42
42
  loadAuthSession,
43
43
  loadToken,
44
44
  login
45
- } from "./cli-zbpetb7v.js";
45
+ } from "./cli-tw8jj190.js";
46
46
  import {
47
47
  CliAuthError,
48
48
  CliInputError,
@@ -51,7 +51,7 @@ import {
51
51
  recordApiRequest,
52
52
  resolveIngestUrl,
53
53
  resolveModaBaseUrl
54
- } from "./cli-xtj2m4hs.js";
54
+ } from "./cli-mx9r1689.js";
55
55
  import"./cli-0v6na3yp.js";
56
56
 
57
57
  // src/init/index.ts
@@ -2019,20 +2019,26 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
2019
2019
  laneBoard?.complete("agent-skills", "no coding agents detected");
2020
2020
  }
2021
2021
  await initPrompts({ silent: true });
2022
+ let promptSyncOutcome;
2023
+ let skillSyncOutcome;
2022
2024
  laneBoard?.startLane("prompts", "Prompts", { detail: "Created or verified .moda/prompts.yml" });
2023
2025
  try {
2024
2026
  const promptSync = await runPromptSync({}, { profile });
2027
+ promptSyncOutcome = { status: "ok", synced: promptSync.synced.map((prompt) => prompt.key) };
2025
2028
  laneBoard?.complete("prompts", promptSync.synced.length > 0 ? `${promptSync.synced.length} prompt(s) synced` : "manifest ready (no prompt files to sync yet)");
2026
2029
  } catch (err) {
2027
2030
  const message = err instanceof Error ? err.message : String(err);
2031
+ promptSyncOutcome = { status: "failed", synced: [], error: message };
2028
2032
  laneBoard?.warn("prompts", `sync skipped: ${message}`);
2029
2033
  }
2030
2034
  laneBoard?.startLane("skills", "Skills");
2031
2035
  try {
2032
2036
  const skillSync = await runSkillSync({}, { profile });
2037
+ skillSyncOutcome = { status: "ok", synced: skillSync.synced.map((skill) => skill.key) };
2033
2038
  laneBoard?.complete("skills", skillSync.synced.length > 0 ? `${skillSync.synced.length} skill(s) synced` : "no local skills to sync yet");
2034
2039
  } catch (err) {
2035
2040
  const message = err instanceof Error ? err.message : String(err);
2041
+ skillSyncOutcome = { status: "failed", synced: [], error: message };
2036
2042
  laneBoard?.warn("skills", `sync skipped: ${message}`);
2037
2043
  }
2038
2044
  if (setupPlan.find((action) => action.category === "ci-cd")?.approved === true) {
@@ -2181,7 +2187,15 @@ Harness analysis keeps running on Moda. Resume anytime with \`${HARNESS_PULL_REC
2181
2187
  skipped: setupPlan.filter((item) => item.status === "skipped" || item.status === "manual"),
2182
2188
  telemetrySeen
2183
2189
  }));
2184
- return { apiKey, tenantName, phases, setupPlan, ...sdkIntegration ? { sdk_integration: sdkIntegration } : {} };
2190
+ return {
2191
+ apiKey,
2192
+ tenantName,
2193
+ phases,
2194
+ setupPlan,
2195
+ promptSync: promptSyncOutcome,
2196
+ skillSync: skillSyncOutcome,
2197
+ ...sdkIntegration ? { sdk_integration: sdkIntegration } : {}
2198
+ };
2185
2199
  }
2186
2200
  function buildSetupPlan(options) {
2187
2201
  return [
@@ -5,8 +5,8 @@ import {
5
5
  inspectCodeSelectors,
6
6
  inspectPythonSelectors,
7
7
  safePromptEvidencePath
8
- } from "./cli-tzqez7mw.js";
9
- import"./cli-xtj2m4hs.js";
8
+ } from "./cli-gxmq4wmn.js";
9
+ import"./cli-mx9r1689.js";
10
10
  import {
11
11
  __commonJS,
12
12
  __toESM
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  selectTenantAndCreateKey
3
- } from "./cli-vxdtfys2.js";
3
+ } from "./cli-fhfdnvh4.js";
4
4
  import {
5
5
  loadAuthSession
6
- } from "./cli-zbpetb7v.js";
6
+ } from "./cli-tw8jj190.js";
7
7
  import {
8
8
  CliAuthError,
9
9
  resolveIngestUrl,
10
10
  resolveModaBaseUrl,
11
11
  stringOption
12
- } from "./cli-xtj2m4hs.js";
12
+ } from "./cli-mx9r1689.js";
13
13
  import"./cli-0v6na3yp.js";
14
14
 
15
15
  // src/provision.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.55.5",
3
+ "version": "1.55.6",
4
4
  "description": "CLI for Moda - AI agent analytics and observability",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": "moda.skill_index.v1",
3
- "bundled_at": "2026-10-14T05:39:19.721Z",
4
- "cli_version": "1.55.5",
3
+ "bundled_at": "2026-10-14T10:49:23.091Z",
4
+ "cli_version": "1.55.6",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-cloudflare-think",