@moda-ai/cli 1.55.6 → 1.55.8
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-grn40kvh.js → cli-a0adscdx.js} +3 -3
- package/dist/{cli-gxmq4wmn.js → cli-j125g80g.js} +10581 -1478
- package/dist/cli.js +103 -8
- package/dist/{harness-github-actions-s10y3kpz.js → harness-github-actions-t4m8q3wn.js} +1 -1
- package/dist/{harness-7eabmv0v.js → harness-kpskdj9x.js} +1 -1
- package/dist/{index-6wxkhbk5.js → index-zdbe66yn.js} +2 -2
- package/dist/prompt-source-mcp.js +1 -1
- 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-a0adscdx.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-j125g80g.js";
|
|
43
43
|
import"./cli-ssfq84k5.js";
|
|
44
44
|
import {
|
|
45
45
|
authFetch,
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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);
|
|
@@ -10422,7 +10516,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
10422
10516
|
resetApiRequestCountBeforeRun: true,
|
|
10423
10517
|
telemetry: "result",
|
|
10424
10518
|
handler: async (context) => {
|
|
10425
|
-
const { runInit } = await import("./index-
|
|
10519
|
+
const { runInit } = await import("./index-zdbe66yn.js");
|
|
10426
10520
|
if (context.outputMode === "agent-stream") {
|
|
10427
10521
|
context.output.writeEvent({
|
|
10428
10522
|
event: "started",
|
|
@@ -10651,8 +10745,9 @@ var commandRegistry = createCommandRegistry([
|
|
|
10651
10745
|
},
|
|
10652
10746
|
{
|
|
10653
10747
|
name: "harness",
|
|
10654
|
-
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",
|
|
10655
10749
|
examples: [
|
|
10750
|
+
"moda harness register --dry-run",
|
|
10656
10751
|
"moda harness analyze --experimental --summary",
|
|
10657
10752
|
"moda harness analyze --experimental --remote",
|
|
10658
10753
|
"moda harness pull --sync",
|
|
@@ -10663,7 +10758,7 @@ var commandRegistry = createCommandRegistry([
|
|
|
10663
10758
|
],
|
|
10664
10759
|
subcommands: HARNESS_SUBCOMMAND_HELP,
|
|
10665
10760
|
auth: "api-key",
|
|
10666
|
-
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.",
|
|
10667
10762
|
outputModes: ["human", "json", "agent"],
|
|
10668
10763
|
mutability: "write",
|
|
10669
10764
|
validateConfigBeforeRun: false,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
initPrompts,
|
|
4
4
|
runPromptSync,
|
|
5
5
|
runSkillSync
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-a0adscdx.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-j125g80g.js";
|
|
27
27
|
import {
|
|
28
28
|
bundledSkillsDir,
|
|
29
29
|
installIntegrationSkill,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moda-ai/cli",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.8",
|
|
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",
|