@moda-ai/cli 1.55.136 → 1.55.138

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.
Files changed (29) hide show
  1. package/README.md +9 -2
  2. package/dist/{agent-g7pg6qsk.js → agent-dxmbckx7.js} +4 -4
  3. package/dist/{change-impact-p73qj0vj.js → change-impact-b997srew.js} +2 -2
  4. package/dist/{cli-6qff9sy8.js → cli-0d3s9b42.js} +3 -3
  5. package/dist/{cli-8800mp37.js → cli-117eqfj5.js} +13 -18
  6. package/dist/{cli-q96h6rs9.js → cli-8ygykkqh.js} +1 -1
  7. package/dist/{cli-6hwyagze.js → cli-f3jwv55s.js} +4 -4
  8. package/dist/{cli-zh32cntw.js → cli-fc1rx0gw.js} +3 -3
  9. package/dist/{cli-aaxzwp8g.js → cli-fv22sck1.js} +3 -3
  10. package/dist/{cli-rpyepjwb.js → cli-jkv3y2bj.js} +3 -16
  11. package/dist/{cli-8qtxp95w.js → cli-jqabndfd.js} +1 -1
  12. package/dist/{cli-hcwdz9sd.js → cli-nec99rtj.js} +4 -1
  13. package/dist/cli.js +18 -49
  14. package/dist/{doctor-yy9bj65b.js → doctor-k6ej31sr.js} +3 -3
  15. package/dist/{harness-github-actions-ngy90m19.js → harness-github-actions-bhkr14q4.js} +2 -2
  16. package/dist/{harness-cpajrhyc.js → harness-pjxdvqk7.js} +2 -4
  17. package/dist/{index-an75v9ep.js → index-kmvy4nh6.js} +3 -3
  18. package/dist/{index-eb711ctt.js → index-sy1p2vp7.js} +2 -2
  19. package/dist/{index-z8dtmg06.js → index-xedkdchx.js} +148 -987
  20. package/dist/{prompt-attribution-9cr331df.js → prompt-attribution-94cgcj50.js} +2 -2
  21. package/dist/prompt-source-mcp.js +2 -2
  22. package/dist/{prompts-ybk6gc7y.js → prompts-yssnakd8.js} +1 -1
  23. package/dist/{rules-qddx5t0j.js → rules-jchrsc39.js} +6 -2
  24. package/dist/{skills-bundled-tcxpw88n.js → skills-bundled-4wkxnba0.js} +2 -2
  25. package/dist/{skills-4bbd6shr.js → skills-qfmm05ma.js} +1 -1
  26. package/dist/{sync-sjc0av1q.js → sync-by1sp44e.js} +4 -4
  27. package/package.json +1 -1
  28. package/skills/integration/index.json +2 -2
  29. package/skills/moda-cli/references/auth.md +1 -1
package/README.md CHANGED
@@ -18,12 +18,19 @@ npx -p @moda-ai/cli moda overview
18
18
 
19
19
  ## Setup
20
20
 
21
- Run the wizard to authenticate, pick an org, and provision an API key:
21
+ Run the wizard to sign in, pick an org, and provision an API key:
22
22
 
23
23
  ```bash
24
24
  moda init
25
25
  ```
26
26
 
27
+ It then installs the moda-cli skill into detected coding agents (skip with
28
+ `--no-agent-skill`) and, when you opt in, launches your coding agent to add the
29
+ Moda SDK (`--sdk-integrate`), before a final doctor check. `moda init` does not
30
+ upload anything from your repository. Prompt sync, skill sync, harness analysis,
31
+ and CI workflows are separate: see `moda prompts`, `moda skills push`,
32
+ `moda harness`, and the Moda GitHub App.
33
+
27
34
  Or set the key manually:
28
35
 
29
36
  ```bash
@@ -501,7 +508,7 @@ and CI suppress them. Read-only homes still receive cached guidance without a
501
508
  persisted cooldown. Agent envelopes continue to carry `meta.update`.
502
509
 
503
510
  After updating, run `moda skills install moda-cli` from the project directory.
504
- It refreshes the installed guide and the init-managed Moda block in `AGENTS.md`,
511
+ It refreshes the installed guide and the managed Moda block in `AGENTS.md`,
505
512
  replacing legacy `moda fixes` instructions. Text outside that block stays intact;
506
513
  locally edited skill files are kept. Malformed or duplicated block markers and
507
514
  symlinked `AGENTS.md` files are left unchanged with a warning and recovery steps.
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  buildDoctorReport
3
- } from "./cli-aaxzwp8g.js";
3
+ } from "./cli-fv22sck1.js";
4
4
  import"./cli-4fv2pthb.js";
5
- import"./cli-zh32cntw.js";
5
+ import"./cli-fc1rx0gw.js";
6
6
  import"./cli-mm48br00.js";
7
7
  import"./cli-764m5azg.js";
8
8
  import {
9
9
  readHarnessSyncState
10
- } from "./cli-rpyepjwb.js";
10
+ } from "./cli-jkv3y2bj.js";
11
11
  import {
12
12
  HARNESS_REPORT_APPROVAL_PATH,
13
13
  HARNESS_REPORT_PATH,
@@ -96,7 +96,7 @@ async function buildAgentContext(context) {
96
96
  const graph = readHarnessGraphIfPresent(context.cwd);
97
97
  const reportState = readHarnessReportState(context.cwd);
98
98
  const syncState = readHarnessSyncState(context.cwd);
99
- const harness = graph ? await import("./harness-cpajrhyc.js") : undefined;
99
+ const harness = graph ? await import("./harness-pjxdvqk7.js") : undefined;
100
100
  const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
101
101
  const evidenceRefs = [
102
102
  ...doctor.checks.map(checkToEvidenceRef),
@@ -11,8 +11,8 @@ import {
11
11
  resolvedSymbol,
12
12
  returnExpressions,
13
13
  valueDeclaration
14
- } from "./cli-8800mp37.js";
15
- import"./cli-rpyepjwb.js";
14
+ } from "./cli-117eqfj5.js";
15
+ import"./cli-jkv3y2bj.js";
16
16
  import"./cli-97fnztpy.js";
17
17
  import {
18
18
  detectBoundRuntimeClasses
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  enumerateToolCatalog,
3
3
  enumerateWorkflows
4
- } from "./cli-q96h6rs9.js";
4
+ } from "./cli-8ygykkqh.js";
5
5
  import {
6
6
  require_out
7
7
  } from "./cli-764m5azg.js";
@@ -34,8 +34,8 @@ import {
34
34
  unwrap,
35
35
  valueDeclaration,
36
36
  visit
37
- } from "./cli-8800mp37.js";
38
- import"./cli-rpyepjwb.js";
37
+ } from "./cli-117eqfj5.js";
38
+ import"./cli-jkv3y2bj.js";
39
39
  import"./cli-97fnztpy.js";
40
40
  import {
41
41
  detectBoundRuntimeClasses,
@@ -6,7 +6,7 @@ import {
6
6
  renderHarnessAnalystPreflight,
7
7
  renderHarnessAnalyzeHumanResult,
8
8
  renderHarnessProgress
9
- } from "./cli-rpyepjwb.js";
9
+ } from "./cli-jkv3y2bj.js";
10
10
  import {
11
11
  stripAnsi
12
12
  } from "./cli-97fnztpy.js";
@@ -6807,7 +6807,7 @@ async function runHarnessPull(options) {
6807
6807
  const flagRunId = stringOption(context.flags["run-id"] ?? context.flags.run_id);
6808
6808
  const runId = flagRunId ?? state?.run_id;
6809
6809
  if (!runId) {
6810
- throw new CliInputError("No server-side harness analysis run to pull.", "Start one with `moda harness analyze --remote` (or `moda init`), or pass --run-id=<id>.");
6810
+ throw new CliInputError("No server-side harness analysis run to pull.", "Start one with `moda harness analyze --remote`, or pass --run-id=<id>.");
6811
6811
  }
6812
6812
  const { apiKey, ingestUrl } = resolveRemoteAnalyzeEndpoint(context);
6813
6813
  const url = `${ingestUrl}/v1/harness/analyze/${encodeURIComponent(runId)}`;
@@ -6884,11 +6884,6 @@ function remoteAnalyzeHardFailure(final, runId) {
6884
6884
  ].join(`
6885
6885
  `));
6886
6886
  }
6887
- function isRecoverableRemoteRun(final) {
6888
- if (!final.report)
6889
- return false;
6890
- return final.status === "completed" || final.status === "failed" && serverFailedReportValidation(final);
6891
- }
6892
6887
  function serverFailedReportValidation(final) {
6893
6888
  const { validation } = final;
6894
6889
  return typeof validation === "object" && validation !== null && !Array.isArray(validation) && validation.status === "fail";
@@ -21023,7 +21018,7 @@ async function runHarnessCommand(context) {
21023
21018
  throw new CliInputError(`'moda harness ${subcommand}' has no dry-run mode, so nothing was sent.`, `Remove --dry-run to run it for real. Harness commands with a real dry-run: ${[...HARNESS_DRY_RUN_SUBCOMMANDS].join(", ")}.`);
21024
21019
  }
21025
21020
  if (subcommand === "skeleton" || subcommand === "skeleton-diff") {
21026
- const { runSkeletonCommand } = await import("./cli-6qff9sy8.js");
21021
+ const { runSkeletonCommand } = await import("./cli-0d3s9b42.js");
21027
21022
  return runSkeletonCommand(context);
21028
21023
  }
21029
21024
  if (subcommand === "register")
@@ -21035,7 +21030,7 @@ async function runHarnessCommand(context) {
21035
21030
  assertPositionals("harness impact", context.positionals, 1, "moda harness impact --from=<commit> --to=<commit>");
21036
21031
  if (!context.flags.from)
21037
21032
  throw new CliInputError("harness impact requires --from=<old-commit>.");
21038
- const { localChangeImpact, readRecordedImpactCalls } = await import("./change-impact-p73qj0vj.js");
21033
+ const { localChangeImpact, readRecordedImpactCalls } = await import("./change-impact-b997srew.js");
21039
21034
  const result = localChangeImpact({
21040
21035
  checkout: resolve10(context.cwd, context.flags.path ?? "."),
21041
21036
  from: context.flags.from,
@@ -21307,7 +21302,7 @@ async function runHarnessCommand(context) {
21307
21302
  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.");
21308
21303
  }
21309
21304
  if (context.flags["github-actions"] === "true") {
21310
- const { runGithubActionsAnalyze } = await import("./harness-github-actions-ngy90m19.js");
21305
+ const { runGithubActionsAnalyze } = await import("./harness-github-actions-bhkr14q4.js");
21311
21306
  const result = await runGithubActionsAnalyze(rootDir, {
21312
21307
  writeReport: (report2) => {
21313
21308
  const normalized = normalizeHarnessReport(report2);
@@ -21458,8 +21453,8 @@ async function runHarnessCommand(context) {
21458
21453
  }
21459
21454
  const { artifacts, unknowns, canonicalAgentIdentities } = deterministicGraphItems(rootDir, promote === "all" ? undefined : promote);
21460
21455
  tagComponentStatus({ runtimeAgents: [], artifacts }, rootDir);
21461
- const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-eb711ctt.js");
21462
- const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-an75v9ep.js");
21456
+ const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-sy1p2vp7.js");
21457
+ const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-kmvy4nh6.js");
21463
21458
  let components = { runtimeAgents: [], artifacts: [], warnings: [] };
21464
21459
  if (promote === "all" || promote === "topology" || promote === "tools") {
21465
21460
  const { result, ctx } = extractHarnessWithContext2(rootDir);
@@ -21531,8 +21526,8 @@ async function runHarnessCommand(context) {
21531
21526
  }
21532
21527
  case "extract": {
21533
21528
  writeHumanProgress(context, "Harness extract: tracing model call sites (no LLM, no network)...");
21534
- const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-eb711ctt.js");
21535
- const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-an75v9ep.js");
21529
+ const { extractHarnessWithContext: extractHarnessWithContext2, serializeExtractResult } = await import("./index-sy1p2vp7.js");
21530
+ const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-kmvy4nh6.js");
21536
21531
  const { result, ctx } = extractHarnessWithContext2(rootDir, { fresh: true });
21537
21532
  const items = deterministicGraphItems(rootDir);
21538
21533
  const artifacts = items.artifacts;
@@ -22439,8 +22434,8 @@ var CONCERN_PROMOTED_ARTIFACT_TYPES = {
22439
22434
  evals: new Set(["model_config", "eval"])
22440
22435
  };
22441
22436
  async function deterministicFloorGraph(rootDir, options = {}) {
22442
- const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-eb711ctt.js");
22443
- const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-an75v9ep.js");
22437
+ const { extractHarnessWithContext: extractHarnessWithContext2 } = await import("./index-sy1p2vp7.js");
22438
+ const { enumerateHarnessComponents, mergeEnumeratedComponents } = await import("./index-kmvy4nh6.js");
22444
22439
  const { result, ctx } = extractHarnessWithContext2(rootDir);
22445
22440
  const items = deterministicGraphItems(rootDir);
22446
22441
  const components = mergeEnumeratedComponents(items.artifacts, enumerateHarnessComponents(result, ctx));
@@ -24879,7 +24874,7 @@ function throwHarnessScanTooBroad(rootDir, details) {
24879
24874
  throw new CliInputError("Harness scan is too broad for safe local analysis.", [
24880
24875
  `Moda reached ${details.files.toLocaleString()} files while scanning ${rootDir}.`,
24881
24876
  `Text read budget: ${mib}MiB of ${maxMib}MiB. Last path: ${details.lastPath}.`,
24882
- "Run `moda init` from the actual agent project root, not a parent folder like ~/Projects.",
24877
+ "Run this from the actual agent project root, not a parent folder like ~/Projects.",
24883
24878
  "For harness-only analysis, use `moda harness analyze --path=<agent-dir> --summary`."
24884
24879
  ].join(`
24885
24880
  `));
@@ -31028,4 +31023,4 @@ function assignAgentIds(result, agentForScope) {
31028
31023
  }
31029
31024
  }
31030
31025
 
31031
- export { svelteVirtualName, relPath, lineOf, unwrap, propertyNameText, calleeChain, isFunctionLike, enclosingFunction, functionName, enclosingClass, returnExpressions, importOrigin, resolvedSymbol, valueDeclaration, isTestPath, isEvalPath, EXTRACT_SCHEMA_VERSION, valueChildren, selectKey, allValues, renderings, receiverClasses, frameworkBaseOf, createFrameworkMemo, CALL_SINKS, registerCallSink, registerClassSink, evalFileSignal, evalSuiteKey, checkPromptMapping, safePromptEvidencePath, discoverHarnessPromptSources, isModelId, collectModels, modelArtifacts, modelUnknowns, collectModelLiterals, parse, TEST_PATH2 as TEST_PATH, EVAL_PATH2 as EVAL_PATH, enumerationRepository, nameOf, visit, componentId, artifact, emptyResult, stableResult, toolNamesOf, surfaceOf, emitToolsCached, workspacePackages, toolArtifacts, clearExtractCache, extractHarness, extractHarnessWithContext, extractFingerprint, scopeOf, serializeExtractResult, assignAgentIds, createAgentScopeResolver, enumerateAgents, startRemoteAnalyze, pollRemoteAnalyzeUntilDone, isRecoverableRemoteRun, resolvePromptArguments, runHarnessCommand, writeHarnessAnalyzeResult, emitWrittenArtifacts, analyzeHarnessPrompts, isToolGroupPlaceholder, deterministicOnlyArtifactTypes, repairExternalAnalystReport, deriveRelationshipsFromGraph, deterministicFloorGraph, deterministicArtifacts, deterministicGraphItems, mergeDeterministicArtifacts, analystRefutations, describeCodingAgentEvent, analystEventProgress, isRetryableExternalAnalystFailure, sleep, summarizeInvalidAnalystReport, isDeterministicLocalAnalyst, resolveHarnessAnalyzeConcern, resolveExternalHarnessAnalystInvocation, detectAvailableCodingAgents, codingAgentDisplayName, runCodingAgent, readOnlyClaudeExtraArgs, resolveAnalystModel, renderExternalHarnessAnalystPrompt, CONCERN_CANDIDATE_KINDS, SEED_CANDIDATE_KIND_LABELS, renderAnalystCandidateLines, renderAnalystSeedLines, truncateText, scanHarness, summarizeHarness, buildSourceSnapshot, writeHumanProgress, describeSyncIdentity, describeSyncTenantLabel, findFresherHarnessReports, writeHarnessArtifacts, assertHarnessGraphSyncQuality, graphForSync, inventoryFiles, numericEnv, numericEnvAllowZero, computeDeterministicFloor, stableId, titleFromId, promptNameFromPath };
31026
+ export { svelteVirtualName, relPath, lineOf, unwrap, propertyNameText, calleeChain, isFunctionLike, enclosingFunction, functionName, enclosingClass, returnExpressions, importOrigin, resolvedSymbol, valueDeclaration, isTestPath, isEvalPath, EXTRACT_SCHEMA_VERSION, valueChildren, selectKey, allValues, renderings, receiverClasses, frameworkBaseOf, createFrameworkMemo, CALL_SINKS, registerCallSink, registerClassSink, evalFileSignal, evalSuiteKey, checkPromptMapping, safePromptEvidencePath, discoverHarnessPromptSources, isModelId, collectModels, modelArtifacts, modelUnknowns, collectModelLiterals, parse, TEST_PATH2 as TEST_PATH, EVAL_PATH2 as EVAL_PATH, enumerationRepository, nameOf, visit, componentId, artifact, emptyResult, stableResult, toolNamesOf, surfaceOf, emitToolsCached, workspacePackages, toolArtifacts, clearExtractCache, extractHarness, extractHarnessWithContext, extractFingerprint, scopeOf, serializeExtractResult, assignAgentIds, createAgentScopeResolver, enumerateAgents, resolvePromptArguments, runHarnessCommand, writeHarnessAnalyzeResult, emitWrittenArtifacts, analyzeHarnessPrompts, isToolGroupPlaceholder, deterministicOnlyArtifactTypes, repairExternalAnalystReport, deriveRelationshipsFromGraph, deterministicFloorGraph, deterministicArtifacts, deterministicGraphItems, mergeDeterministicArtifacts, analystRefutations, describeCodingAgentEvent, analystEventProgress, isRetryableExternalAnalystFailure, sleep, summarizeInvalidAnalystReport, resolveHarnessAnalyzeConcern, resolveExternalHarnessAnalystInvocation, detectAvailableCodingAgents, codingAgentDisplayName, runCodingAgent, readOnlyClaudeExtraArgs, resolveAnalystModel, renderExternalHarnessAnalystPrompt, CONCERN_CANDIDATE_KINDS, SEED_CANDIDATE_KIND_LABELS, renderAnalystCandidateLines, renderAnalystSeedLines, truncateText, scanHarness, summarizeHarness, buildSourceSnapshot, writeHumanProgress, describeSyncIdentity, describeSyncTenantLabel, findFresherHarnessReports, writeHarnessArtifacts, assertHarnessGraphSyncQuality, graphForSync, inventoryFiles, numericEnv, numericEnvAllowZero, computeDeterministicFloor, stableId, titleFromId, promptNameFromPath };
@@ -21,7 +21,7 @@ import {
21
21
  valueDeclaration,
22
22
  visit,
23
23
  workspacePackages
24
- } from "./cli-8800mp37.js";
24
+ } from "./cli-117eqfj5.js";
25
25
  import {
26
26
  require_typescript
27
27
  } from "./cli-r0pkdy83.js";
@@ -324,7 +324,7 @@ function sha256(input) {
324
324
  var MODA_CLI_SKILL_ID = "moda-cli";
325
325
  async function installModaCliSkill(context) {
326
326
  const { detectAgents } = await import("./mcp-1qre9f0n.js");
327
- const { installRules, summarizeInstall } = await import("./rules-qddx5t0j.js");
327
+ const { installRules, summarizeInstall } = await import("./rules-jchrsc39.js");
328
328
  const result = await installRules(detectAgents(), { yes: true, silent: true });
329
329
  if (result.status === "skipped") {
330
330
  throw new CliInputError("No supported coding agent was detected here, so the moda-cli skill was not installed.", "Run this from a project with a .claude or .cursor directory, or with Claude Code on PATH. Only Claude Code and Cursor are supported.");
@@ -348,10 +348,10 @@ async function installModaCliSkill(context) {
348
348
  return result.status === "failed" ? 1 : 0;
349
349
  }
350
350
  async function runSkillsInstall(context, ids) {
351
- const { installIntegrationSkill, readBundledIndex, readBundledSkillMd } = await import("./skills-bundled-tcxpw88n.js");
351
+ const { installIntegrationSkill, readBundledIndex, readBundledSkillMd } = await import("./skills-bundled-4wkxnba0.js");
352
352
  const index = readBundledIndex();
353
353
  if (context.flags.list === "true" || ids.length === 0) {
354
- const { bundledSkillVersion } = await import("./rules-qddx5t0j.js");
354
+ const { bundledSkillVersion } = await import("./rules-jchrsc39.js");
355
355
  if (!index) {
356
356
  throw new CliInputError("This CLI build has no bundled integration guides", "Install a published @moda-ai/cli, or run `bun run bundle:skills` in apps/moda-cli.");
357
357
  }
@@ -426,4 +426,4 @@ async function runSkillRegistryCommand(sub, positionals, flags, context) {
426
426
  return 0;
427
427
  }
428
428
 
429
- export { agentsMdProblem, runSkillSync, runSkillsCommand };
429
+ export { runSkillSync, runSkillsCommand };
@@ -270,7 +270,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
270
270
  const analyzedDefinitions = new Map;
271
271
  if (flags["no-analyze"] !== "true") {
272
272
  options.onProgress?.("Analyzing prompt sources before sync.");
273
- const { analyzeHarnessPrompts } = await import("./harness-cpajrhyc.js");
273
+ const { analyzeHarnessPrompts } = await import("./harness-pjxdvqk7.js");
274
274
  const result = await analyzeHarnessPrompts({
275
275
  rootDir: process.cwd(),
276
276
  existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
@@ -298,7 +298,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
298
298
  const mergedSources = mergePromptSources(manifest.sources, extraSources);
299
299
  const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
300
300
  const prompts = await discoverPrompts(extraSources);
301
- const { checkPromptAttribution } = await import("./prompt-attribution-9cr331df.js");
301
+ const { checkPromptAttribution } = await import("./prompt-attribution-94cgcj50.js");
302
302
  const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
303
303
  const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
304
304
  if (brokenAttribution.length) {
@@ -604,7 +604,7 @@ async function migratePromptManifest(options = {}) {
604
604
  let addedSources = [];
605
605
  let pendingSources = [];
606
606
  if (options.discover) {
607
- const { analyzeHarnessPrompts } = await import("./harness-cpajrhyc.js");
607
+ const { analyzeHarnessPrompts } = await import("./harness-pjxdvqk7.js");
608
608
  const result = await analyzeHarnessPrompts({
609
609
  rootDir: root,
610
610
  existing: manifest.sources,
@@ -4,12 +4,12 @@ import {
4
4
  } from "./cli-4fv2pthb.js";
5
5
  import {
6
6
  inspectPromptManifest
7
- } from "./cli-zh32cntw.js";
7
+ } from "./cli-fc1rx0gw.js";
8
8
  import {
9
9
  readHarnessSyncState,
10
10
  renderDoctorHuman,
11
11
  renderStatusHuman
12
- } from "./cli-rpyepjwb.js";
12
+ } from "./cli-jkv3y2bj.js";
13
13
  import {
14
14
  callDataAPI
15
15
  } from "./cli-6m24mgfn.js";
@@ -393,7 +393,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
393
393
  };
394
394
  }
395
395
  try {
396
- const { scanHarness } = await import("./harness-cpajrhyc.js");
396
+ const { scanHarness } = await import("./harness-pjxdvqk7.js");
397
397
  const current = scanHarness({
398
398
  rootDir: cwd,
399
399
  scannerVersion: "doctor",
@@ -872,9 +872,10 @@ function renderInitSetupPlan(actions, options = {}) {
872
872
  const suffix = action.reason ? ` - ${action.reason}` : "";
873
873
  return ui.wrap(` ${ui.status(status)} ${action.title}${suffix}`, 4);
874
874
  });
875
- if (options.snapshotConsent) {
875
+ if (options.notes?.length) {
876
876
  lines.push("");
877
- lines.push(ui.wrap(` ${ui.status("info")} Moda will analyze a snapshot of this repo on Moda's servers to map your agent harness. Secrets and .env files are excluded and the snapshot is deleted after the run.`, 4));
877
+ for (const note of options.notes)
878
+ lines.push(ui.wrap(` ${ui.status("info")} ${note}`, 4));
878
879
  }
879
880
  return lines.join(`
880
881
  `);
@@ -887,20 +888,6 @@ function renderInitComplete(options) {
887
888
  lines.push(ui.title(`Workspace ready: ${options.tenantName}`));
888
889
  lines.push(`Dashboard: ${ui.command(dashboardUrl)}`);
889
890
  lines.push("");
890
- if (options.harness?.state === "pending") {
891
- lines.push(ui.wrap(` ${ui.status("run")} Harness analysis is still running on Moda. Run ${ui.command("moda harness pull --sync")} in a few minutes.`, 4));
892
- } else if (options.harness?.state === "skipped") {
893
- const what = {
894
- unavailable: "Harness analysis did not start and was skipped.",
895
- lost: "Lost track of the harness analysis; it may still be running on Moda.",
896
- unfetched: "Harness analysis finished on Moda but could not be fetched.",
897
- failed: "Harness analysis failed on Moda and was skipped."
898
- }[options.harness.reason ?? "unavailable"];
899
- lines.push(ui.wrap(` ${ui.status("warning")} ${what} Run ${ui.command(options.harness.next ?? "moda harness pull --sync")} later.`, 4));
900
- } else if (options.harness) {
901
- lines.push(ui.wrap(` ${ui.status("pass")} Harness mapped: ${options.harness.agents ?? 0} agent(s), ${options.harness.artifacts ?? 0} artifact(s). View: ${ui.command(dashboardUrl)}`, 4));
902
- }
903
- lines.push("");
904
891
  lines.push(ui.section("Files changed"));
905
892
  if (options.filesChanged.length === 0) {
906
893
  lines.push(` ${ui.dim("none")}`);
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  claudeSkillToCursorRule,
11
11
  packageAssetPath
12
- } from "./cli-hcwdz9sd.js";
12
+ } from "./cli-nec99rtj.js";
13
13
 
14
14
  // src/skills-bundled.ts
15
15
  import { createHash } from "node:crypto";
@@ -261,6 +261,9 @@ function summarizeInstall(result) {
261
261
  failed && `${failed} failed`
262
262
  ].filter(Boolean).join(", ");
263
263
  }
264
+ function skillInstallDirs(detectedAgents) {
265
+ return detectedAgents.map((agent) => ADAPTERS[agent]).filter((adapter) => adapter !== undefined).map((adapter) => adapter.targetFor("moda-cli").dir);
266
+ }
264
267
  async function installRules(detectedAgents, options = {}) {
265
268
  const adapters = detectedAgents.map((a) => ADAPTERS[a]).filter((a) => a !== undefined);
266
269
  if (adapters.length === 0) {
@@ -366,4 +369,4 @@ async function installRules(detectedAgents, options = {}) {
366
369
  return result;
367
370
  }
368
371
 
369
- export { packageAssetPath, claudeSkillToCursorRule, bundledSkillVersion, summarizeInstall, installRules };
372
+ export { packageAssetPath, claudeSkillToCursorRule, INSTALL_RECORD_PATH, bundledSkillVersion, summarizeInstall, skillInstallDirs, installRules };
package/dist/cli.js CHANGED
@@ -2141,7 +2141,7 @@ var HARNESS_SUBCOMMAND_HELP = [
2141
2141
  usage: "moda harness pull [--run-id=<id>] [--sync]",
2142
2142
  flags: [
2143
2143
  { name: "--run-id=<id>", description: "Run to fetch (default: the one in .moda/harness-remote-run.json)." },
2144
- { name: "--sync", description: "When complete, approve the report and sync it (like `moda init`)." }
2144
+ { name: "--sync", description: "When complete, approve the report and sync it." }
2145
2145
  ],
2146
2146
  examples: ["moda harness pull", "moda harness pull --sync"]
2147
2147
  },
@@ -3022,25 +3022,25 @@ function leafManifestFields(leaf, commands) {
3022
3022
  import { fileURLToPath } from "url";
3023
3023
  import { realpathSync } from "fs";
3024
3024
  async function runPromptsCommand(...args) {
3025
- return (await import("./prompts-ybk6gc7y.js")).runPromptsCommand(...args);
3025
+ return (await import("./prompts-yssnakd8.js")).runPromptsCommand(...args);
3026
3026
  }
3027
3027
  async function runSkillsCommand(...args) {
3028
- return (await import("./skills-4bbd6shr.js")).runSkillsCommand(...args);
3028
+ return (await import("./skills-qfmm05ma.js")).runSkillsCommand(...args);
3029
3029
  }
3030
3030
  async function runHarnessCommand(...args) {
3031
- return (await import("./harness-cpajrhyc.js")).runHarnessCommand(...args);
3031
+ return (await import("./harness-pjxdvqk7.js")).runHarnessCommand(...args);
3032
3032
  }
3033
3033
  async function runSyncCommand(...args) {
3034
- return (await import("./sync-sjc0av1q.js")).runSyncCommand(...args);
3034
+ return (await import("./sync-by1sp44e.js")).runSyncCommand(...args);
3035
3035
  }
3036
3036
  async function runRegistryCommand(...args) {
3037
3037
  return (await import("./registry-hj1xa3n7.js")).runRegistryCommand(...args);
3038
3038
  }
3039
3039
  async function runDoctorCommand(...args) {
3040
- return (await import("./doctor-yy9bj65b.js")).runDoctorCommand(...args);
3040
+ return (await import("./doctor-k6ej31sr.js")).runDoctorCommand(...args);
3041
3041
  }
3042
3042
  async function runStatusCommand(...args) {
3043
- return (await import("./doctor-yy9bj65b.js")).runStatusCommand(...args);
3043
+ return (await import("./doctor-k6ej31sr.js")).runStatusCommand(...args);
3044
3044
  }
3045
3045
  async function runAuthCommand(...args) {
3046
3046
  return (await import("./profile-commands-3ccyj5q3.js")).runAuthCommand(...args);
@@ -3052,7 +3052,7 @@ async function runProfilesCommand(...args) {
3052
3052
  return (await import("./profile-commands-3ccyj5q3.js")).runProfilesCommand(...args);
3053
3053
  }
3054
3054
  async function runAgentCommand(...args) {
3055
- return (await import("./agent-g7pg6qsk.js")).runAgentCommand(...args);
3055
+ return (await import("./agent-dxmbckx7.js")).runAgentCommand(...args);
3056
3056
  }
3057
3057
  async function runProductionCommand(...args) {
3058
3058
  return (await import("./production-intelligence-w5avw16d.js")).runProductionCommand(...args);
@@ -6675,7 +6675,7 @@ function legacyCommand(metadata) {
6675
6675
  }
6676
6676
  function initAgentWriteOptions(result) {
6677
6677
  const changedFiles = initChangedFiles(result.setupPlan);
6678
- const manualActions = result.setupPlan.filter((action) => action.status === "manual" || action.status === "skipped");
6678
+ const manualActions = result.setupPlan.filter((action) => (action.status === "manual" || action.status === "skipped") && !action.declined);
6679
6679
  return {
6680
6680
  summary: {
6681
6681
  text: `Moda init completed for ${result.tenantName}. ${changedFiles.length} artifact(s) were created or verified.`,
@@ -6687,12 +6687,12 @@ function initAgentWriteOptions(result) {
6687
6687
  status: phase.status,
6688
6688
  description: phase.details
6689
6689
  })),
6690
- recommendedActions: manualActions.map((action) => ({
6690
+ recommendedActions: manualActions.filter((action) => action.command).map((action) => ({
6691
6691
  id: `init:action:${action.category}`,
6692
6692
  title: action.title,
6693
6693
  rationale: action.reason,
6694
6694
  command: action.command,
6695
- mutability: action.command?.includes(" sync") ? "sync" : "write",
6695
+ mutability: "write",
6696
6696
  requires_approval: true
6697
6697
  })),
6698
6698
  nextCommands: [
@@ -6707,40 +6707,23 @@ function initAgentWriteOptions(result) {
6707
6707
  purpose: "Diagnose local setup and data-flow readiness.",
6708
6708
  mutability: "read",
6709
6709
  requires_approval: false
6710
- },
6711
- {
6712
- command: "moda harness sync --summary",
6713
- purpose: "Sync the approved harness graph to Moda Cloud after review.",
6714
- mutability: "sync",
6715
- requires_approval: true
6716
6710
  }
6717
6711
  ],
6718
6712
  artifacts: changedFiles.map((file) => ({
6719
- kind: initArtifactKind(file),
6713
+ kind: "init_artifact",
6720
6714
  path: file,
6721
6715
  description: "Created or verified during Moda init."
6722
6716
  })),
6723
6717
  warnings: [
6724
6718
  ...manualActions.filter((action) => action.reason).map((action) => `${action.title}: ${action.reason}`),
6725
- ...result.promptSync?.status === "failed" ? [`Prompt sync failed: ${result.promptSync.error}. Retry with 'moda prompts sync'.`] : [],
6726
- ...result.skillSync?.status === "failed" ? [`Skill sync failed: ${result.skillSync.error}. Retry with 'moda skills push'.`] : [],
6727
- ...result.skillSync?.warnings ?? [],
6728
- ...(result.skillInstall?.warnings ?? []).map((warning) => `moda-cli skill install: ${warning}`)
6719
+ ...(result.skillInstall?.warnings ?? []).map((warning) => `moda-cli skill install: ${warning}`),
6720
+ ...result.ignoredFlagsWarning ? [result.ignoredFlagsWarning] : []
6729
6721
  ]
6730
6722
  };
6731
6723
  }
6732
6724
  function initChangedFiles(setupPlan) {
6733
6725
  return [...new Set(setupPlan.filter((action) => action.status === "applied").flatMap((action) => action.files))].filter((file) => !file.includes(".env"));
6734
6726
  }
6735
- function initArtifactKind(file) {
6736
- if (file.includes("harness"))
6737
- return "harness_artifact";
6738
- if (file.includes("prompt"))
6739
- return "prompt_manifest";
6740
- if (file.includes("workflow"))
6741
- return "ci_workflow";
6742
- return "init_artifact";
6743
- }
6744
6727
  async function canonicalNounHandler(context) {
6745
6728
  const route = routeCanonical(context.command, context.positionals, context.flags);
6746
6729
  throw new CliInputError(`'moda ${context.command}' was not routed${route ? ` (expected ${route.handler})` : ""}.`, `Run 'moda ${context.command} --help'.`, "unrouted_command");
@@ -6757,29 +6740,15 @@ var commandRegistry = createCommandRegistry([
6757
6740
  {
6758
6741
  name: "init",
6759
6742
  description: "Set up Moda in your project",
6760
- examples: ["moda init", "moda init --sdk-integrate", "moda init --ci-cd", "moda init --autosync", "moda init --harness-rescan"],
6743
+ examples: ["moda init", "moda init --sdk-integrate", "moda init --no-agent-skill", "moda init --offline"],
6761
6744
  documentedFlags: [
6762
6745
  { name: "--yes", description: "Accept all defaults (non-interactive)" },
6763
- { name: "--analyst=auto|claude|codex|cursor|local-scan", description: "Choose the harness analyst adapter" },
6764
- { name: "--analyst-model=MODEL", description: 'Model for the claude analyst (default sonnet; "default" = the claude CLI default; env MODA_HARNESS_ANALYST_MODEL)' },
6765
- { name: "--assist=none", description: "Disable agent fallback for prompt discovery" },
6766
- { name: "--concern=topology|tools|prompts|evals", description: "Harness analyze: restrict the pass to one concern (env MODA_HARNESS_CONCERN, flag wins)" },
6767
- { name: "--allow-no-agents", description: "Allow harness sync to push a graph with zero runtime agents despite detected LLM usage" },
6768
- { name: "--remote", description: "Run harness analysis server-side (the default): upload a safe source snapshot" },
6769
- { name: "--local", description: "Run harness analysis with a local coding agent instead of server-side" },
6770
- { name: "--tui", description: "Show the full-screen analyst dashboard in human TTYs" },
6771
- { name: "--no-tui", description: "Show raw external analyst output" },
6746
+ { name: "--agent-skill", description: "Install the moda-cli skill into detected coding agents (the default)" },
6747
+ { name: "--no-agent-skill", description: "Skip the moda-cli skill install" },
6772
6748
  { name: "--sdk-integrate", description: "Run your coding agent to install the Moda SDK and instrument LLM calls" },
6773
6749
  { name: "--no-sdk-integrate", description: "Skip SDK integration (alias: --no-sdk-guide)" },
6774
6750
  { name: "--verification-id=ID", description: "Tag the SDK integration's test trace with this id (the onb_ id from the onboarding page)" },
6775
6751
  { name: "--connect-code=CODE", description: "Sign in with the one-time mcc_ code from the onboarding page instead of the browser (10 min, single use)" },
6776
- { name: "--ci-cd", description: "Create the GitHub Actions Moda validation workflow" },
6777
- { name: "--no-ci-cd", description: "Skip CI/CD workflow creation" },
6778
- { name: "--autosync", description: "Create a GitHub Actions workflow that syncs prompts + skills to Moda on push to main" },
6779
- { name: "--no-autosync", description: "Skip autosync workflow creation" },
6780
- { name: "--harness-rescan", description: "Create a GitHub Actions workflow that re-scans the harness and syncs it on push to main" },
6781
- { name: "--no-harness-rescan", description: "Skip harness rescan workflow creation" },
6782
- { name: "--harness-rescan-paths=GLOBS", description: "Comma-separated path globs that scope which pushes trigger the rescan (implies --harness-rescan)" },
6783
6752
  { name: "--offline", description: "Run final validation offline (skip the online telemetry check)" }
6784
6753
  ],
6785
6754
  auth: "none",
@@ -6789,7 +6758,7 @@ var commandRegistry = createCommandRegistry([
6789
6758
  resetApiRequestCountBeforeRun: true,
6790
6759
  telemetry: "result-and-error",
6791
6760
  handler: async (context) => {
6792
- const { runInit } = await import("./index-z8dtmg06.js");
6761
+ const { runInit } = await import("./index-xedkdchx.js");
6793
6762
  if (context.outputMode === "agent-stream") {
6794
6763
  context.output.writeEvent({
6795
6764
  event: "started",
@@ -3,12 +3,12 @@ import {
3
3
  promptsDiscoveredCheck,
4
4
  runDoctorCommand,
5
5
  runStatusCommand
6
- } from "./cli-aaxzwp8g.js";
6
+ } from "./cli-fv22sck1.js";
7
7
  import"./cli-4fv2pthb.js";
8
- import"./cli-zh32cntw.js";
8
+ import"./cli-fc1rx0gw.js";
9
9
  import"./cli-mm48br00.js";
10
10
  import"./cli-764m5azg.js";
11
- import"./cli-rpyepjwb.js";
11
+ import"./cli-jkv3y2bj.js";
12
12
  import"./cli-mnhevv08.js";
13
13
  import"./cli-5vv062qj.js";
14
14
  import"./cli-e0kbye4s.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildSourceSnapshot
3
- } from "./cli-8800mp37.js";
4
- import"./cli-rpyepjwb.js";
3
+ } from "./cli-117eqfj5.js";
4
+ import"./cli-jkv3y2bj.js";
5
5
  import"./cli-97fnztpy.js";
6
6
  import"./cli-krm4w2v9.js";
7
7
  import"./cli-mnhevv08.js";
@@ -21,7 +21,6 @@ import {
21
21
  findFresherHarnessReports,
22
22
  graphForSync,
23
23
  inventoryFiles,
24
- isDeterministicLocalAnalyst,
25
24
  isRetryableExternalAnalystFailure,
26
25
  isToolGroupPlaceholder,
27
26
  mergeDeterministicArtifacts,
@@ -48,8 +47,8 @@ import {
48
47
  writeHarnessAnalyzeResult,
49
48
  writeHarnessArtifacts,
50
49
  writeHumanProgress
51
- } from "./cli-8800mp37.js";
52
- import"./cli-rpyepjwb.js";
50
+ } from "./cli-117eqfj5.js";
51
+ import"./cli-jkv3y2bj.js";
53
52
  import"./cli-97fnztpy.js";
54
53
  import {
55
54
  HARNESS_ANALYZE_CONCERNS
@@ -91,7 +90,6 @@ export {
91
90
  mergeDeterministicArtifacts,
92
91
  isToolGroupPlaceholder,
93
92
  isRetryableExternalAnalystFailure,
94
- isDeterministicLocalAnalyst,
95
93
  inventoryFiles,
96
94
  graphForSync,
97
95
  findFresherHarnessReports,
@@ -3,12 +3,12 @@ import {
3
3
  enumerateToolCatalog,
4
4
  enumerateWorkflows,
5
5
  mergeEnumeratedComponents
6
- } from "./cli-q96h6rs9.js";
6
+ } from "./cli-8ygykkqh.js";
7
7
  import {
8
8
  createAgentScopeResolver,
9
9
  enumerateAgents
10
- } from "./cli-8800mp37.js";
11
- import"./cli-rpyepjwb.js";
10
+ } from "./cli-117eqfj5.js";
11
+ import"./cli-jkv3y2bj.js";
12
12
  import"./cli-97fnztpy.js";
13
13
  import"./cli-krm4w2v9.js";
14
14
  import"./cli-mnhevv08.js";
@@ -20,8 +20,8 @@ import {
20
20
  serializeExtractResult,
21
21
  toolNamesOf,
22
22
  valueChildren
23
- } from "./cli-8800mp37.js";
24
- import"./cli-rpyepjwb.js";
23
+ } from "./cli-117eqfj5.js";
24
+ import"./cli-jkv3y2bj.js";
25
25
  import"./cli-97fnztpy.js";
26
26
  import"./cli-krm4w2v9.js";
27
27
  import"./cli-mnhevv08.js";