@moda-ai/cli 1.55.5 → 1.55.7
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/README.md +18 -0
- package/dist/{cli-dw1zrtvn.js → cli-ebsqrw71.js} +5 -5
- package/dist/{cli-vxdtfys2.js → cli-fhfdnvh4.js} +2 -2
- package/dist/{cli-xtj2m4hs.js → cli-mx9r1689.js} +1 -1
- package/dist/{cli-zbpetb7v.js → cli-tw8jj190.js} +1 -1
- package/dist/{cli-tzqez7mw.js → cli-y4tb9611.js} +6642 -1379
- package/dist/cli.js +146 -20
- package/dist/{harness-sqkgk49d.js → harness-8j5v4wbg.js} +2 -2
- package/dist/{harness-github-actions-f3xffdf7.js → harness-github-actions-7qvgsn9b.js} +2 -2
- package/dist/{index-025z9q34.js → index-jmsfasm3.js} +20 -6
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{provision-69h38y7d.js → provision-parsn3xg.js} +3 -3
- package/package.json +2 -1
- package/skills/integration/index.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
runPromptsCommand,
|
|
9
9
|
runSkillsCommand,
|
|
10
10
|
runStatusCommand
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-ebsqrw71.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-
|
|
42
|
+
} from "./cli-y4tb9611.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-
|
|
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-
|
|
106
|
+
} from "./cli-mx9r1689.js";
|
|
107
107
|
import {
|
|
108
108
|
__require
|
|
109
109
|
} from "./cli-0v6na3yp.js";
|
|
@@ -2524,8 +2524,10 @@ agent and prompt handled each LLM call.
|
|
|
2524
2524
|
values, or customer data.
|
|
2525
2525
|
- Do not change runtime behaviour. Part 5 adds trace metadata only. Show the
|
|
2526
2526
|
diff and get my OK before committing it.
|
|
2527
|
-
-
|
|
2528
|
-
|
|
2527
|
+
- Parts 0 to 6 upload only \`.moda/registry.json\` (plus the files it
|
|
2528
|
+
references). Part 7 uploads a bundle of the repo, but only after I review
|
|
2529
|
+
its dry run. Secrets, env var values, and git-ignored installs are never
|
|
2530
|
+
included.
|
|
2529
2531
|
|
|
2530
2532
|
## Part 0: setup
|
|
2531
2533
|
|
|
@@ -2534,6 +2536,8 @@ agent and prompt handled each LLM call.
|
|
|
2534
2536
|
first shipped in 1.45.0). If any is missing or the command fails, run
|
|
2535
2537
|
\`npm install -g @moda-ai/cli@latest\` and check again. If they're still
|
|
2536
2538
|
missing, stop and tell me which ones; nothing below works without them.
|
|
2539
|
+
Part 7 also needs \`moda harness register --help\` to work; if it does
|
|
2540
|
+
not, finish Parts 1 to 6 and tell me.
|
|
2537
2541
|
2. Auth: \`MODA_API_KEY\` must be set, or run \`moda auth login --api-key=<key>\`.
|
|
2538
2542
|
Ask me for the key if neither is available. Check with \`moda doctor\`.
|
|
2539
2543
|
3. Run \`moda registry template\` to see a complete example manifest, and
|
|
@@ -2692,6 +2696,60 @@ registered, and registered agents never seen. Fix the manifest (or the
|
|
|
2692
2696
|
attribution) and push again until there is nothing unexplained left. Attribution
|
|
2693
2697
|
added in Part 5 only shows up on traces created after it ships.
|
|
2694
2698
|
|
|
2699
|
+
## Part 7: register the runnable harness
|
|
2700
|
+
|
|
2701
|
+
Replay Environments run our real harness in a sandbox with outbound network
|
|
2702
|
+
denied, so Moda needs the code itself, not just the manifest. \`moda harness
|
|
2703
|
+
register\` collects the git repository into a bundle. It keeps everything a
|
|
2704
|
+
build could plausibly need and records the name and reason for everything it
|
|
2705
|
+
leaves out: secret files, files that contain credentials, VCS internals,
|
|
2706
|
+
installed dependencies a lockfile reproduces, build output, and paths in
|
|
2707
|
+
\`.modaignore\`. Env var values are never read; only names are recorded.
|
|
2708
|
+
|
|
2709
|
+
1. Preview it. Nothing is uploaded:
|
|
2710
|
+
|
|
2711
|
+
moda harness register --dry-run
|
|
2712
|
+
|
|
2713
|
+
2. Review the report with me before going further:
|
|
2714
|
+
- **Excluded**: every path left out and why. If a file a build needs was
|
|
2715
|
+
withheld (for example \`secret_content\` on a fixture with a fake key),
|
|
2716
|
+
tell me; don't move secrets around to get it in.
|
|
2717
|
+
- **Git-ignored but present**: generated clients, local config, or model
|
|
2718
|
+
files the build may need. Ask me before un-ignoring anything.
|
|
2719
|
+
- **Environment variables**: each name with a proposed classification
|
|
2720
|
+
(\`secret\`, \`config\`, \`dependency_endpoint\`, \`model_endpoint\`,
|
|
2721
|
+
\`model_credential\`, \`unknown\`). Read the code for every \`unknown\`
|
|
2722
|
+
and tell me what it is.
|
|
2723
|
+
- **Dependencies and migrations**: the databases, queues, and APIs it
|
|
2724
|
+
found, the adapter Moda proposes for each, and the migrations it would
|
|
2725
|
+
run against a disposable database.
|
|
2726
|
+
- **Gaps** and **Moda will still need from you**.
|
|
2727
|
+
3. Declare the entrypoint and the model-routing env vars. The entrypoint is
|
|
2728
|
+
the exact command that starts the harness the way production does (from
|
|
2729
|
+
the Dockerfile, Procfile, start script, or deploy config). The routing vars
|
|
2730
|
+
are the names of the env vars that set the model base URL, the model id,
|
|
2731
|
+
and the API key, so replay can send inference to Moda's approved lane.
|
|
2732
|
+
Pass names, never values:
|
|
2733
|
+
|
|
2734
|
+
moda harness register <name> --dry-run \\
|
|
2735
|
+
--model-base-url-env=OPENAI_BASE_URL --model-env=OPENAI_MODEL \\
|
|
2736
|
+
--model-api-key-env=OPENAI_API_KEY \\
|
|
2737
|
+
--entry -- node dist/server.js
|
|
2738
|
+
|
|
2739
|
+
\`--entry\` goes last: everything after \`--\` is the command. If the code
|
|
2740
|
+
hardcodes the model base URL instead of reading an env var, say so in your
|
|
2741
|
+
report; do not change it.
|
|
2742
|
+
4. When I approve the dry run, register for real with the same flags and no
|
|
2743
|
+
\`--dry-run\`. It prints a registration id, a status, and a dashboard link.
|
|
2744
|
+
Then run:
|
|
2745
|
+
|
|
2746
|
+
moda harness registration status <id>
|
|
2747
|
+
|
|
2748
|
+
\`needs_input\` means the dashboard checklist still has items for me:
|
|
2749
|
+
confirming env classifications, approving dependency adapters and
|
|
2750
|
+
migrations, and acknowledging gaps. List the blocking ones in your report.
|
|
2751
|
+
I make those decisions; you don't.
|
|
2752
|
+
|
|
2695
2753
|
## Final report
|
|
2696
2754
|
|
|
2697
2755
|
Reply with:
|
|
@@ -2705,6 +2763,9 @@ Reply with:
|
|
|
2705
2763
|
5. The \`moda registry coverage\` result, plus anything unexplained you
|
|
2706
2764
|
couldn't resolve.
|
|
2707
2765
|
6. Anything you found but couldn't express in the manifest.
|
|
2766
|
+
7. The registration id and status, the entrypoint and model-routing env vars
|
|
2767
|
+
you declared, exclusions or ignored paths a build may need, and the
|
|
2768
|
+
checklist items still open.
|
|
2708
2769
|
`;
|
|
2709
2770
|
|
|
2710
2771
|
// src/registry.ts
|
|
@@ -3596,7 +3657,7 @@ async function sendCliUsageTelemetry(input) {
|
|
|
3596
3657
|
timeout.unref();
|
|
3597
3658
|
}
|
|
3598
3659
|
try {
|
|
3599
|
-
await fetch(`${resolveModaBaseUrl()}/api/v1/data/cli-usage`, {
|
|
3660
|
+
await fetch(`${resolveModaBaseUrl({ profile: input.profile })}/api/v1/data/cli-usage`, {
|
|
3600
3661
|
method: "POST",
|
|
3601
3662
|
headers: {
|
|
3602
3663
|
...apiKeyHeaders(input.apiKey),
|
|
@@ -4185,6 +4246,37 @@ var HARNESS_SUBCOMMAND_HELP = [
|
|
|
4185
4246
|
flags: [HARNESS_PATH_FLAG],
|
|
4186
4247
|
examples: ["moda harness status"]
|
|
4187
4248
|
},
|
|
4249
|
+
{
|
|
4250
|
+
name: "register",
|
|
4251
|
+
description: "Collect this repo into a Replay Environments bundle, show what is included and excluded, and upload it",
|
|
4252
|
+
usage: "moda harness register [name] [--mode=source|sealed] [--root=<dir>] [--entry -- <cmd...>] [--model-base-url-env=<NAME>] [--image=<ref>@sha256:<digest>] [--dry-run] [--json]",
|
|
4253
|
+
flags: [
|
|
4254
|
+
{ name: "[name]", description: "Harness name (default: package.json name or the directory name)." },
|
|
4255
|
+
{ name: "--mode=source|sealed", description: "source (default) uploads the source bundle; sealed runs your own image and needs --image." },
|
|
4256
|
+
{ name: "--root=<dir>", description: "Harness directory (default: the current directory). The bundle is the whole git repository it lives in." },
|
|
4257
|
+
{ name: "--entry -- <cmd...>", description: 'How the harness starts; everything after `--` is the command. `--entry="<cmd>"` also works.' },
|
|
4258
|
+
{ name: "--model-base-url-env=<NAME>", description: "Env var that sets the model base URL, so replay can route inference. Also --model-env and --model-api-key-env. Names only." },
|
|
4259
|
+
{ name: "--image=<ref>@sha256:<digest>", description: "Sealed mode: the harness image, pinned by digest." },
|
|
4260
|
+
{ name: "--dry-run", description: "Collect and print the full report; upload nothing (no API key needed)." }
|
|
4261
|
+
],
|
|
4262
|
+
examples: [
|
|
4263
|
+
"moda harness register --dry-run",
|
|
4264
|
+
"moda harness register support-agent --model-base-url-env=OPENAI_BASE_URL --entry -- node dist/server.js",
|
|
4265
|
+
"moda harness register --mode=sealed --image=ghcr.io/acme/agent@sha256:<digest>"
|
|
4266
|
+
]
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
name: "registration",
|
|
4270
|
+
description: "List harness registrations, or show one with its checklist (read-only)",
|
|
4271
|
+
usage: "moda harness registration list [--harness=<name>] [--include-retired] [--limit=N] [--offset=N] | moda harness registration status <id>",
|
|
4272
|
+
flags: [
|
|
4273
|
+
{ name: "--harness=<name>", description: "Only registrations of this harness." },
|
|
4274
|
+
{ name: "--include-retired", description: "Include deleted (retired) registrations." },
|
|
4275
|
+
{ name: "--limit=N", description: "Page size (default 50, max 200)." },
|
|
4276
|
+
{ name: "--offset=N", description: "Skip this many." }
|
|
4277
|
+
],
|
|
4278
|
+
examples: ["moda harness registration list", "moda harness registration status hrg_0123abcd"]
|
|
4279
|
+
},
|
|
4188
4280
|
{
|
|
4189
4281
|
name: "list",
|
|
4190
4282
|
description: "List the tenant's synced harnesses (read-only)",
|
|
@@ -8019,6 +8111,8 @@ Commands:
|
|
|
8019
8111
|
harness sync Sync the local harness graph to Moda Cloud
|
|
8020
8112
|
harness delete <id-or-key> Permanently delete a synced harness from Moda Cloud
|
|
8021
8113
|
harness list|show|versions|diff List synced harnesses, show one, its versions, or a version diff
|
|
8114
|
+
harness register [name] Bundle this repo for Replay Environments and upload it (--dry-run to review)
|
|
8115
|
+
harness registration list|status List registrations, or show one with what Moda still needs
|
|
8022
8116
|
harness agents List detected runtime agents and families
|
|
8023
8117
|
harness explain Explain the discovered harness graph
|
|
8024
8118
|
agent context Emit local Moda context for coding agents
|
|
@@ -8405,7 +8499,7 @@ function printCommandHelp(definition) {
|
|
|
8405
8499
|
lines.push(` ${example}`);
|
|
8406
8500
|
}
|
|
8407
8501
|
}
|
|
8408
|
-
lines.push("", "Run 'moda --help' for the full command list and
|
|
8502
|
+
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
8503
|
console.log(lines.join(`
|
|
8410
8504
|
`));
|
|
8411
8505
|
}
|
|
@@ -8881,7 +8975,7 @@ function parseCommandFlags(schema, args, command, options = {}) {
|
|
|
8881
8975
|
]);
|
|
8882
8976
|
const unknown = Object.keys(args).filter((key) => !known.has(key));
|
|
8883
8977
|
if (unknown.includes("dry_run")) {
|
|
8884
|
-
throw new CliInputError(`'moda ${command}' has no dry-run mode, so nothing was sent.`, `Remove --dry-run to run it for real. Commands with a real dry-run: sync, registry push, harness sync/delete, prompts sync/decide, skills sync/policy, signals <write subcommands>, problem-reopen.`, "unsupported_dry_run");
|
|
8978
|
+
throw new CliInputError(`'moda ${command}' has no dry-run mode, so nothing was sent.`, `Remove --dry-run to run it for real. Commands with a real dry-run: sync, registry push, harness sync/delete/register, prompts sync/decide, skills sync/policy, signals <write subcommands>, problem-reopen.`, "unsupported_dry_run");
|
|
8885
8979
|
}
|
|
8886
8980
|
if (unknown.length > 0) {
|
|
8887
8981
|
const flagKeys = schemaKeys.filter((key) => key !== options.positionalKey);
|
|
@@ -10381,7 +10475,11 @@ function initAgentWriteOptions(result) {
|
|
|
10381
10475
|
path: file,
|
|
10382
10476
|
description: "Created or verified during Moda init."
|
|
10383
10477
|
})),
|
|
10384
|
-
warnings:
|
|
10478
|
+
warnings: [
|
|
10479
|
+
...manualActions.filter((action) => action.reason).map((action) => `${action.title}: ${action.reason}`),
|
|
10480
|
+
...result.promptSync?.status === "failed" ? [`Prompt sync failed: ${result.promptSync.error}. Retry with 'moda prompts sync'.`] : [],
|
|
10481
|
+
...result.skillSync?.status === "failed" ? [`Skill sync failed: ${result.skillSync.error}. Retry with 'moda skills sync'.`] : []
|
|
10482
|
+
]
|
|
10385
10483
|
};
|
|
10386
10484
|
}
|
|
10387
10485
|
function initChangedFiles(setupPlan) {
|
|
@@ -10418,7 +10516,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
10418
10516
|
resetApiRequestCountBeforeRun: true,
|
|
10419
10517
|
telemetry: "result",
|
|
10420
10518
|
handler: async (context) => {
|
|
10421
|
-
const { runInit } = await import("./index-
|
|
10519
|
+
const { runInit } = await import("./index-jmsfasm3.js");
|
|
10422
10520
|
if (context.outputMode === "agent-stream") {
|
|
10423
10521
|
context.output.writeEvent({
|
|
10424
10522
|
event: "started",
|
|
@@ -10459,7 +10557,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
10459
10557
|
resetApiRequestCountBeforeRun: true,
|
|
10460
10558
|
telemetry: "result-and-error",
|
|
10461
10559
|
handler: async (context) => {
|
|
10462
|
-
const { runProvision } = await import("./provision-
|
|
10560
|
+
const { runProvision } = await import("./provision-parsn3xg.js");
|
|
10463
10561
|
return runProvision(context, {
|
|
10464
10562
|
resumeCommand: buildResumeCommand("provision", context.rawFlags)
|
|
10465
10563
|
});
|
|
@@ -10647,8 +10745,9 @@ var commandRegistry = createCommandRegistry([
|
|
|
10647
10745
|
},
|
|
10648
10746
|
{
|
|
10649
10747
|
name: "harness",
|
|
10650
|
-
description: "Analyze, validate, approve, sync, delete, and explain the local multi-agent harness graph",
|
|
10748
|
+
description: "Analyze, validate, approve, sync, delete, and explain the local multi-agent harness graph; register it for Replay Environments",
|
|
10651
10749
|
examples: [
|
|
10750
|
+
"moda harness register --dry-run",
|
|
10652
10751
|
"moda harness analyze --experimental --summary",
|
|
10653
10752
|
"moda harness analyze --experimental --remote",
|
|
10654
10753
|
"moda harness pull --sync",
|
|
@@ -10659,7 +10758,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
10659
10758
|
],
|
|
10660
10759
|
subcommands: HARNESS_SUBCOMMAND_HELP,
|
|
10661
10760
|
auth: "api-key",
|
|
10662
|
-
authNote: "sync, list, show, versions, diff, delete, pull, and
|
|
10761
|
+
authNote: "sync, list, show, versions, diff, delete, pull, analyze, register, and registration need the API key; scan, explain, agents, graph, approve, validate-report, and register --dry-run are local.",
|
|
10663
10762
|
outputModes: ["human", "json", "agent"],
|
|
10664
10763
|
mutability: "write",
|
|
10665
10764
|
validateConfigBeforeRun: false,
|
|
@@ -11407,7 +11506,7 @@ function printCliError(error) {
|
|
|
11407
11506
|
return ` ${field}: ${e.message}`;
|
|
11408
11507
|
});
|
|
11409
11508
|
safeWriteStderr(`Validation error:
|
|
11410
|
-
${issues.join(`
|
|
11509
|
+
${[...new Set(issues)].join(`
|
|
11411
11510
|
`)}
|
|
11412
11511
|
`);
|
|
11413
11512
|
} else if (error instanceof ApiError && error.readable) {
|
|
@@ -11496,11 +11595,38 @@ async function dispatchParsedCommandInner(parsed, startedAt) {
|
|
|
11496
11595
|
printHelp();
|
|
11497
11596
|
return 1;
|
|
11498
11597
|
}
|
|
11499
|
-
const failEarly = (error) => {
|
|
11598
|
+
const failEarly = (error, commandDefinition) => {
|
|
11500
11599
|
const mode = resolveOutputMode(commandFlags, {
|
|
11501
11600
|
isTTY: process.stdout.isTTY,
|
|
11502
11601
|
env: process.env
|
|
11503
11602
|
});
|
|
11603
|
+
const telemetryOptOut = telemetryDisabled || flags["no-telemetry"] !== undefined && flags["no-telemetry"] !== "false";
|
|
11604
|
+
if (commandDefinition && !telemetryOptOut && commandDefinition.telemetry === "result-and-error") {
|
|
11605
|
+
const telemetryCommand2 = telemetryCommandName(commandDefinition);
|
|
11606
|
+
const flagProfile = commandFlags.profile && commandFlags.profile !== "true" ? commandFlags.profile : undefined;
|
|
11607
|
+
const telemetryProfile = flagProfile && Object.hasOwn(loadProfileConfig({ env: process.env }).profiles, flagProfile) ? flagProfile : undefined;
|
|
11608
|
+
sendCliUsageTelemetry({
|
|
11609
|
+
apiKey: resolveApiKey({ profile: telemetryProfile }),
|
|
11610
|
+
profile: telemetryProfile,
|
|
11611
|
+
command: telemetryCommand2,
|
|
11612
|
+
flags: commandFlags,
|
|
11613
|
+
status: "error",
|
|
11614
|
+
errorType: classifyCliError(error),
|
|
11615
|
+
validationReason: cliValidationReason(error),
|
|
11616
|
+
exitCode: 1,
|
|
11617
|
+
durationMs: Date.now() - startedAt,
|
|
11618
|
+
apiRequestCount: 0,
|
|
11619
|
+
adoption: buildSearchAdoptionTelemetry({
|
|
11620
|
+
command: telemetryCommand2,
|
|
11621
|
+
positional: parsed.positional,
|
|
11622
|
+
flags: commandFlags,
|
|
11623
|
+
outputMode: mode,
|
|
11624
|
+
recorded: {},
|
|
11625
|
+
skillVersion: process.env.MODA_SKILL_VERSION,
|
|
11626
|
+
subcommands: commandDefinition.subcommands?.map((subcommand2) => subcommand2.name)
|
|
11627
|
+
})
|
|
11628
|
+
});
|
|
11629
|
+
}
|
|
11504
11630
|
if (mode === "agent" || mode === "agent-stream" || mode === "json") {
|
|
11505
11631
|
printAgentCliError(command, error, mode);
|
|
11506
11632
|
} else {
|
|
@@ -11513,19 +11639,19 @@ async function dispatchParsedCommandInner(parsed, startedAt) {
|
|
|
11513
11639
|
return failEarly(new CliInputError(`Unknown command '${command}'`, 'Run "moda --help" for usage information.'));
|
|
11514
11640
|
}
|
|
11515
11641
|
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'
|
|
11642
|
+
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
11643
|
}
|
|
11518
11644
|
if (switchError)
|
|
11519
|
-
return failEarly(switchError);
|
|
11645
|
+
return failEarly(switchError, definition);
|
|
11520
11646
|
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'."));
|
|
11647
|
+
return failEarly(new CliInputError("--profile needs a value, e.g. --profile=prod.", "List profiles with 'moda profiles list'.", "missing_value:profile"), definition);
|
|
11522
11648
|
}
|
|
11523
11649
|
const requestedProfile = commandFlags.profile ?? process.env.MODA_PROFILE?.trim();
|
|
11524
11650
|
if (requestedProfile && !PROFILE_MANAGING_COMMANDS.has(definition.name)) {
|
|
11525
11651
|
const known = Object.keys(loadProfileConfig({ env: process.env }).profiles);
|
|
11526
11652
|
if (!known.includes(requestedProfile)) {
|
|
11527
11653
|
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
|
|
11654
|
+
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
11655
|
}
|
|
11530
11656
|
if (commandFlags.profile)
|
|
11531
11657
|
process.env.MODA_PROFILE = commandFlags.profile;
|
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
46
|
-
import"./cli-
|
|
45
|
+
} from "./cli-y4tb9611.js";
|
|
46
|
+
import"./cli-mx9r1689.js";
|
|
47
47
|
import"./cli-0v6na3yp.js";
|
|
48
48
|
export {
|
|
49
49
|
writeHumanProgress,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initPrompts,
|
|
4
4
|
runPromptSync,
|
|
5
5
|
runSkillSync
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-ebsqrw71.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-
|
|
26
|
+
} from "./cli-y4tb9611.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-
|
|
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-
|
|
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-
|
|
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 {
|
|
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 [
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-fhfdnvh4.js";
|
|
4
4
|
import {
|
|
5
5
|
loadAuthSession
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-tw8jj190.js";
|
|
7
7
|
import {
|
|
8
8
|
CliAuthError,
|
|
9
9
|
resolveIngestUrl,
|
|
10
10
|
resolveModaBaseUrl,
|
|
11
11
|
stringOption
|
|
12
|
-
} from "./cli-
|
|
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.
|
|
3
|
+
"version": "1.55.7",
|
|
4
4
|
"description": "CLI for Moda - AI agent analytics and observability",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@moda/database": "*",
|
|
68
68
|
"@moda/eslint-config": "*",
|
|
69
|
+
"@moda/harness-bundle": "*",
|
|
69
70
|
"@moda/harness-snapshot": "*",
|
|
70
71
|
"@moda/integration-skills": "*",
|
|
71
72
|
"@types/node": "^22.10.5",
|