@moda-ai/cli 1.55.45 → 1.55.46
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 +7 -8
- package/dist/{agent-5ax7fqhe.js → agent-aewgndk0.js} +16 -16
- package/dist/{cli-tztzrh6b.js → cli-4kf462jq.js} +3 -3
- package/dist/{cli-xcpwp0gb.js → cli-d6gfxx8t.js} +1 -1
- package/dist/{cli-t4xfvrry.js → cli-dxbd1xxs.js} +5 -5
- package/dist/{cli-wwbr5caw.js → cli-fqc02t6h.js} +12 -91
- package/dist/{cli-sejqvvhv.js → cli-h1z9yyqk.js} +1 -1
- package/dist/{cli-dmm9jm9m.js → cli-j08a1mam.js} +1 -1
- package/dist/{cli-8pcq2et6.js → cli-m4474bnj.js} +1 -1
- package/dist/{cli-xx0pjzkh.js → cli-s7d069g0.js} +5 -19
- package/dist/{cli-4m0rgkx4.js → cli-sqnw96gj.js} +2 -2
- package/dist/{cli-d4cdczhe.js → cli-x7rc3twr.js} +42 -42
- package/dist/{cli-5aa48ry5.js → cli-xctqdn42.js} +3 -3
- package/dist/cli.js +227 -630
- package/dist/{doctor-k4tdgvgv.js → doctor-fz5kq44d.js} +8 -8
- package/dist/{harness-avynbq4f.js → harness-cy0gpyhj.js} +10 -10
- package/dist/{harness-github-actions-gd6vyxb0.js → harness-github-actions-aac3tn96.js} +9 -9
- package/dist/{index-63k2a6gb.js → index-5eyq3ykt.js} +26 -26
- package/dist/{production-intelligence-0z6v6tpp.js → production-intelligence-8j8008d2.js} +4 -4
- package/dist/{profile-commands-mh3kfqkn.js → profile-commands-zbyn9xg2.js} +5 -5
- package/dist/{prompt-attribution-wvvnzw4m.js → prompt-attribution-g9gtv191.js} +9 -9
- package/dist/prompt-source-mcp.js +9 -9
- package/dist/{prompts-snnbyxmz.js → prompts-b6awryvv.js} +9 -13
- package/dist/{provision-t1dpzcjp.js → provision-xkhwz86g.js} +6 -6
- package/dist/{registry-8zkxefjs.js → registry-d7xdm4dw.js} +4 -4
- package/dist/{skills-d4215fa9.js → skills-zfenne8w.js} +6 -6
- package/dist/{sync-17f9yxb1.js → sync-5vd8gwte.js} +12 -12
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +7 -10
- package/skills/moda-cli/references/commands.md +1 -2
- package/skills/moda-cli/references/dashboard-parity.md +2 -3
- package/skills/moda-cli/references/output-protocol.md +1 -1
- package/skills/moda-cli/references/production-intelligence.md +0 -4
- package/skills/moda-cli/references/prompts.md +1 -27
- package/skills/moda-cli/references/{replays-and-registry.md → registry.md} +15 -59
- package/dist/cli-4pc0a18x.js +0 -12
- package/dist/cli-8pksf2x7.js +0 -754
- package/dist/fix-nk5xffz8.js +0 -1440
- package/dist/prompts-ab-y7egdzg4.js +0 -64
- package/dist/prompts-propose-5nw25v9a.js +0 -256
- package/dist/{cli-e24fjyrb.js → cli-da3h2p6w.js} +28 -28
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ moda tail --signal=all --interval=30 # Traces + emotion detections
|
|
|
137
137
|
|
|
138
138
|
Legacy aliases (same behavior, kept for existing scripts): `moda conversations` = `moda traces`,
|
|
139
139
|
`moda cluster-conversations` = `moda cluster-traces`, `--conversations` = `--traces`
|
|
140
|
-
(`moda problem
|
|
140
|
+
(`moda problem`), `--signal=conversations` = `--signal=traces`.
|
|
141
141
|
|
|
142
142
|
Flag aliases: `moda context --message-index=N` = `--msg-index=N`, and
|
|
143
143
|
`moda users --limit=N` = `--page-size=N`. Each command rejects a flag it does
|
|
@@ -302,8 +302,8 @@ ASTs without importing customer modules. Static literals and supported constant
|
|
|
302
302
|
compositions become text or messages. Templates retain placeholders. Functions,
|
|
303
303
|
unsupported expressions, and runtime composition remain builder definitions with
|
|
304
304
|
source/dependency fingerprints and explicit incomplete coverage. Builders and
|
|
305
|
-
templates
|
|
306
|
-
|
|
305
|
+
templates are not plain prompt text; execute the application's builder and
|
|
306
|
+
attribute the resulting model call to its registry version.
|
|
307
307
|
|
|
308
308
|
JSON definitions accept `content`, `systemPrompt`, or `messages`, with `template`
|
|
309
309
|
as a fallback when none supplies usable text. Explicit mappings are required for
|
|
@@ -332,7 +332,7 @@ rendered = moda.prompt("support.triage").render({
|
|
|
332
332
|
})
|
|
333
333
|
```
|
|
334
334
|
|
|
335
|
-
## Register your harness
|
|
335
|
+
## Register your harness
|
|
336
336
|
|
|
337
337
|
When the GitHub App or `moda harness analyze` isn't an option, have your coding
|
|
338
338
|
agent write `.moda/registry.json` from the codebase and push it. Only what the
|
|
@@ -358,10 +358,9 @@ function schemas. The v2 sections describe how the harness runs:
|
|
|
358
358
|
- `context`: what the runtime injects into prompts.
|
|
359
359
|
- `runtime` and `mcpServers`.
|
|
360
360
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
still comes from `moda harness analyze`, the GitHub App, or an approved report.
|
|
361
|
+
The format is in the bundled `moda-cli` skill. The analyzer's citation graph
|
|
362
|
+
(the dashboard Harness map) still comes from `moda harness analyze`, the GitHub
|
|
363
|
+
App, or an approved report.
|
|
365
364
|
|
|
366
365
|
## Register a Replay Environment harness
|
|
367
366
|
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDoctorReport
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
3
|
+
} from "./cli-dxbd1xxs.js";
|
|
4
|
+
import"./cli-h1z9yyqk.js";
|
|
5
|
+
import"./cli-fqc02t6h.js";
|
|
6
6
|
import"./cli-mm48br00.js";
|
|
7
7
|
import {
|
|
8
8
|
readHarnessSyncState
|
|
9
9
|
} from "./cli-xq45etg1.js";
|
|
10
|
+
import"./cli-m4474bnj.js";
|
|
11
|
+
import"./cli-e0kbye4s.js";
|
|
12
|
+
import"./cli-4kf462jq.js";
|
|
13
|
+
import"./cli-j08a1mam.js";
|
|
14
|
+
import {
|
|
15
|
+
resolveApiKey,
|
|
16
|
+
resolveIngestUrl,
|
|
17
|
+
resolveModaBaseUrl,
|
|
18
|
+
resolveTenantId
|
|
19
|
+
} from "./cli-da3h2p6w.js";
|
|
20
|
+
import"./cli-9kfxkxmk.js";
|
|
21
|
+
import"./cli-ns5fcnkz.js";
|
|
10
22
|
import {
|
|
11
23
|
HARNESS_REPORT_APPROVAL_PATH,
|
|
12
24
|
HARNESS_REPORT_PATH,
|
|
@@ -15,21 +27,9 @@ import {
|
|
|
15
27
|
readHarnessReport,
|
|
16
28
|
validateHarnessReport
|
|
17
29
|
} from "./cli-cesds766.js";
|
|
18
|
-
import"./cli-8pcq2et6.js";
|
|
19
|
-
import"./cli-e0kbye4s.js";
|
|
20
|
-
import"./cli-tztzrh6b.js";
|
|
21
|
-
import"./cli-dmm9jm9m.js";
|
|
22
|
-
import {
|
|
23
|
-
resolveApiKey,
|
|
24
|
-
resolveIngestUrl,
|
|
25
|
-
resolveModaBaseUrl,
|
|
26
|
-
resolveTenantId
|
|
27
|
-
} from "./cli-e24fjyrb.js";
|
|
28
30
|
import {
|
|
29
31
|
CliInputError
|
|
30
32
|
} from "./cli-k4tqwah4.js";
|
|
31
|
-
import"./cli-9kfxkxmk.js";
|
|
32
|
-
import"./cli-ns5fcnkz.js";
|
|
33
33
|
import {
|
|
34
34
|
__require
|
|
35
35
|
} from "./cli-0v6na3yp.js";
|
|
@@ -95,7 +95,7 @@ async function buildAgentContext(context) {
|
|
|
95
95
|
const graph = readHarnessGraphIfPresent(context.cwd);
|
|
96
96
|
const reportState = readHarnessReportState(context.cwd);
|
|
97
97
|
const syncState = readHarnessSyncState(context.cwd);
|
|
98
|
-
const harness = graph ? await import("./harness-
|
|
98
|
+
const harness = graph ? await import("./harness-cy0gpyhj.js") : undefined;
|
|
99
99
|
const topFindings = doctor.checks.filter((check) => check.status === "fail" || check.status === "warning").slice(0, 12).map(checkToFinding);
|
|
100
100
|
const evidenceRefs = [
|
|
101
101
|
...doctor.checks.map(checkToEvidenceRef),
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ApiError,
|
|
3
3
|
callControlAPI,
|
|
4
4
|
callDataAPI
|
|
5
|
-
} from "./cli-
|
|
5
|
+
} from "./cli-j08a1mam.js";
|
|
6
6
|
import {
|
|
7
7
|
continuationCommand,
|
|
8
8
|
embeddedTenantIdFromApiKey,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveApiTenantId,
|
|
12
12
|
setPlatformTenantOverride,
|
|
13
13
|
shellArg
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-da3h2p6w.js";
|
|
15
15
|
import {
|
|
16
16
|
CliAccessError,
|
|
17
17
|
CliInputError
|
|
@@ -675,7 +675,7 @@ var MISROUTE_WORDS = /attribut|misrout|false[\s_-]?positive|wrong[\s_-]?(?:probl
|
|
|
675
675
|
function dedicatedCommandHint(category, rawCategory) {
|
|
676
676
|
if (!MISROUTE_CATEGORIES.has(category) && !(rawCategory && MISROUTE_WORDS.test(rawCategory)))
|
|
677
677
|
return;
|
|
678
|
-
return "Feedback is read by the Moda team but does not change the problem. To act on it directly, use " + "`moda problems feedback <problem_id> --action=flag_attribution --attribution-id=<uuid> --reason=TEXT` (a trace wrongly " + "attributed to a problem)
|
|
678
|
+
return "Feedback is read by the Moda team but does not change the problem. To act on it directly, use " + "`moda problems feedback <problem_id> --action=flag_attribution --attribution-id=<uuid> --reason=TEXT` (a trace wrongly " + "attributed to a problem) or `moda review <kind> <target> --reason=TEXT` (a detection that should not " + "have fired).";
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
// src/dry-run.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isAuthSessionValid,
|
|
3
3
|
loadAuthSession
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-h1z9yyqk.js";
|
|
5
5
|
import {
|
|
6
6
|
inspectPromptManifest
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-fqc02t6h.js";
|
|
8
8
|
import {
|
|
9
9
|
readHarnessSyncState,
|
|
10
10
|
renderDoctorHuman,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./cli-xq45etg1.js";
|
|
13
13
|
import {
|
|
14
14
|
callDataAPI
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-j08a1mam.js";
|
|
16
16
|
import {
|
|
17
17
|
describeModaBaseUrl,
|
|
18
18
|
ensureSecretFilePermissions,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveSecretReference,
|
|
28
28
|
resolveTenantId,
|
|
29
29
|
secretFilePathFromRef
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-da3h2p6w.js";
|
|
31
31
|
import {
|
|
32
32
|
__require
|
|
33
33
|
} from "./cli-0v6na3yp.js";
|
|
@@ -395,7 +395,7 @@ async function harnessCurrentCheck(cwd, manifestPath, manifestExists, tenantId)
|
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
397
|
try {
|
|
398
|
-
const { scanHarness } = await import("./harness-
|
|
398
|
+
const { scanHarness } = await import("./harness-cy0gpyhj.js");
|
|
399
399
|
const current = scanHarness({
|
|
400
400
|
rootDir: cwd,
|
|
401
401
|
scannerVersion: "doctor",
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
} from "./cli-mm48br00.js";
|
|
5
5
|
import {
|
|
6
6
|
createCommandContext
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-m4474bnj.js";
|
|
8
8
|
import {
|
|
9
9
|
assertFlags,
|
|
10
10
|
assertPositionals
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-4kf462jq.js";
|
|
12
12
|
import {
|
|
13
13
|
callControlAPI
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import {
|
|
16
|
-
CliInputError
|
|
17
|
-
} from "./cli-k4tqwah4.js";
|
|
14
|
+
} from "./cli-j08a1mam.js";
|
|
18
15
|
import {
|
|
19
16
|
$isSeq,
|
|
20
17
|
$parseDocument,
|
|
21
18
|
$stringify
|
|
22
19
|
} from "./cli-9kfxkxmk.js";
|
|
20
|
+
import {
|
|
21
|
+
CliInputError
|
|
22
|
+
} from "./cli-k4tqwah4.js";
|
|
23
23
|
import {
|
|
24
24
|
__commonJS,
|
|
25
25
|
__require,
|
|
@@ -5573,63 +5573,7 @@ var PROMPT_WRITE_SUBCOMMAND_FLAGS = {
|
|
|
5573
5573
|
"analyst-command",
|
|
5574
5574
|
"analyst-model"
|
|
5575
5575
|
],
|
|
5576
|
-
promote: ["label", "version", "version-id"]
|
|
5577
|
-
ab: [
|
|
5578
|
-
"baseline",
|
|
5579
|
-
"candidate",
|
|
5580
|
-
"cases",
|
|
5581
|
-
"conversations",
|
|
5582
|
-
"model",
|
|
5583
|
-
"name",
|
|
5584
|
-
"seeds",
|
|
5585
|
-
"sync",
|
|
5586
|
-
"timeout",
|
|
5587
|
-
"traces",
|
|
5588
|
-
"wait",
|
|
5589
|
-
"assistant-model",
|
|
5590
|
-
"auto-generate",
|
|
5591
|
-
"baseline-file",
|
|
5592
|
-
"baseline-key",
|
|
5593
|
-
"candidate-file",
|
|
5594
|
-
"candidate-key",
|
|
5595
|
-
"case-count",
|
|
5596
|
-
"conversation-ids",
|
|
5597
|
-
"lookback-days",
|
|
5598
|
-
"no-promote",
|
|
5599
|
-
"no-wait",
|
|
5600
|
-
"promote",
|
|
5601
|
-
"poll-interval",
|
|
5602
|
-
"replay-set-id",
|
|
5603
|
-
"seeds-per-case",
|
|
5604
|
-
"set-id",
|
|
5605
|
-
"set-name",
|
|
5606
|
-
"tenant-id",
|
|
5607
|
-
"allow-any-model",
|
|
5608
|
-
"problem",
|
|
5609
|
-
"max-cases"
|
|
5610
|
-
],
|
|
5611
|
-
propose: [
|
|
5612
|
-
"gate",
|
|
5613
|
-
"model",
|
|
5614
|
-
"out",
|
|
5615
|
-
"seeds",
|
|
5616
|
-
"timeout",
|
|
5617
|
-
"assistant-model",
|
|
5618
|
-
"from-run",
|
|
5619
|
-
"from-run-id",
|
|
5620
|
-
"gate-timeout",
|
|
5621
|
-
"max-dossiers",
|
|
5622
|
-
"poll-interval",
|
|
5623
|
-
"promote-on-win",
|
|
5624
|
-
"prompt-key",
|
|
5625
|
-
"replay-set-id",
|
|
5626
|
-
"revise-model",
|
|
5627
|
-
"run-id",
|
|
5628
|
-
"seeds-per-case",
|
|
5629
|
-
"set-id",
|
|
5630
|
-
"tenant-id",
|
|
5631
|
-
"allow-any-model"
|
|
5632
|
-
]
|
|
5576
|
+
promote: ["label", "version", "version-id"]
|
|
5633
5577
|
};
|
|
5634
5578
|
async function runPromptsCommand(input, legacyFlags, legacyProfileOptions) {
|
|
5635
5579
|
const context = Array.isArray(input) ? createCommandContext({
|
|
@@ -5724,21 +5668,15 @@ async function runPromptsCommand(input, legacyFlags, legacyProfileOptions) {
|
|
|
5724
5668
|
case "promote":
|
|
5725
5669
|
await promotePrompt(positionals, flags, profileOptions, context);
|
|
5726
5670
|
break;
|
|
5727
|
-
case "ab":
|
|
5728
|
-
return (await import("./prompts-ab-y7egdzg4.js")).runPromptAb(flags, profileOptions, context);
|
|
5729
|
-
case "propose":
|
|
5730
|
-
await (await import("./prompts-propose-5nw25v9a.js")).runPromptPropose(positionals, flags, profileOptions, context);
|
|
5731
|
-
break;
|
|
5732
5671
|
case "list":
|
|
5733
5672
|
case "show":
|
|
5734
5673
|
case "proposals":
|
|
5735
5674
|
case "usage":
|
|
5736
|
-
case "replay-runs":
|
|
5737
5675
|
case "decide":
|
|
5738
5676
|
await runPromptRegistryRead(subcommand, positionals, flags, profileOptions, context);
|
|
5739
5677
|
break;
|
|
5740
5678
|
default:
|
|
5741
|
-
throw new CliInputError(`Unknown prompts command '${subcommand}'. Use init, status, diff, migrate, sync, promote,
|
|
5679
|
+
throw new CliInputError(`Unknown prompts command '${subcommand}'. Use init, status, diff, migrate, sync, promote, list, show, proposals, usage, or decide.`, undefined, "unknown_subcommand");
|
|
5742
5680
|
}
|
|
5743
5681
|
return 0;
|
|
5744
5682
|
}
|
|
@@ -5830,7 +5768,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
5830
5768
|
const analyzedDefinitions = new Map;
|
|
5831
5769
|
if (flags["no-analyze"] !== "true") {
|
|
5832
5770
|
options.onProgress?.("Analyzing prompt sources before sync.");
|
|
5833
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
5771
|
+
const { analyzeHarnessPrompts } = await import("./harness-cy0gpyhj.js");
|
|
5834
5772
|
const result = await analyzeHarnessPrompts({
|
|
5835
5773
|
rootDir: process.cwd(),
|
|
5836
5774
|
existing: established.flatMap((prompt) => prompt.sourceDefinition ? [prompt.sourceDefinition.source] : []),
|
|
@@ -5858,7 +5796,7 @@ async function runPromptSyncExclusive(flags, profileOptions, options) {
|
|
|
5858
5796
|
const mergedSources = mergePromptSources(manifest.sources, extraSources);
|
|
5859
5797
|
const manifestUpdate = stableJson(mergedSources) === stableJson(mergePromptSources(manifest.sources, [])) ? undefined : $stringify({ version: 2, prompt_paths: manifest.promptPaths, sources: mergedSources });
|
|
5860
5798
|
const prompts = await discoverPrompts(extraSources);
|
|
5861
|
-
const { checkPromptAttribution } = await import("./prompt-attribution-
|
|
5799
|
+
const { checkPromptAttribution } = await import("./prompt-attribution-g9gtv191.js");
|
|
5862
5800
|
const attribution = checkPromptAttribution(process.cwd(), prompts.map((prompt) => prompt.key));
|
|
5863
5801
|
const brokenAttribution = attribution.references.filter((reference) => reference.status === "missing");
|
|
5864
5802
|
if (brokenAttribution.length) {
|
|
@@ -6164,7 +6102,7 @@ async function migratePromptManifest(options = {}) {
|
|
|
6164
6102
|
let addedSources = [];
|
|
6165
6103
|
let pendingSources = [];
|
|
6166
6104
|
if (options.discover) {
|
|
6167
|
-
const { analyzeHarnessPrompts } = await import("./harness-
|
|
6105
|
+
const { analyzeHarnessPrompts } = await import("./harness-cy0gpyhj.js");
|
|
6168
6106
|
const result = await analyzeHarnessPrompts({
|
|
6169
6107
|
rootDir: root,
|
|
6170
6108
|
existing: manifest.sources,
|
|
@@ -6463,14 +6401,6 @@ function atomicWrite(path, content) {
|
|
|
6463
6401
|
rmSync(temp, { force: true });
|
|
6464
6402
|
}
|
|
6465
6403
|
}
|
|
6466
|
-
function readPromptLock() {
|
|
6467
|
-
return readLock();
|
|
6468
|
-
}
|
|
6469
|
-
function parsePromptFileForAb(absPath) {
|
|
6470
|
-
const parsed = parsePromptFile(absPath);
|
|
6471
|
-
assertReplayablePrompt(parsed);
|
|
6472
|
-
return { key: parsed.key, content: parsed.content };
|
|
6473
|
-
}
|
|
6474
6404
|
function readLock() {
|
|
6475
6405
|
if (!existsSync(LOCK_PATH))
|
|
6476
6406
|
return null;
|
|
@@ -6497,11 +6427,6 @@ function writeLock(prompts, synced) {
|
|
|
6497
6427
|
atomicWrite(LOCK_PATH, `${JSON.stringify(lock, null, 2)}
|
|
6498
6428
|
`);
|
|
6499
6429
|
}
|
|
6500
|
-
function assertReplayablePrompt(prompt) {
|
|
6501
|
-
if (prompt.sourceDefinition && ["builder", "template"].includes(prompt.sourceDefinition.kind)) {
|
|
6502
|
-
throw new CliInputError(`Prompt '${prompt.key}' is a ${prompt.sourceDefinition.kind}. Run its renderer with controlled inputs; source code cannot be replayed as final instructions.`);
|
|
6503
|
-
}
|
|
6504
|
-
}
|
|
6505
6430
|
function parseFrontmatter(raw) {
|
|
6506
6431
|
if (!raw.startsWith("---"))
|
|
6507
6432
|
return { frontmatter: {}, body: raw };
|
|
@@ -6543,7 +6468,6 @@ async function runPromptRegistryRead(subcommand, positionals, flags, profileOpti
|
|
|
6543
6468
|
show: [],
|
|
6544
6469
|
proposals: [],
|
|
6545
6470
|
usage: [],
|
|
6546
|
-
"replay-runs": [],
|
|
6547
6471
|
decide: ["action", "dry-run"]
|
|
6548
6472
|
};
|
|
6549
6473
|
assertFlags(`prompts ${subcommand}`, flags, allowed[subcommand] ?? []);
|
|
@@ -6585,9 +6509,6 @@ async function runPromptRegistryRead(subcommand, positionals, flags, profileOpti
|
|
|
6585
6509
|
case "usage":
|
|
6586
6510
|
context.output.writeData(await callControlAPI(`/prompts/${needKey("moda prompts usage <key>")}/usage`, {}, profileOptions));
|
|
6587
6511
|
return;
|
|
6588
|
-
case "replay-runs":
|
|
6589
|
-
context.output.writeData(await callControlAPI(`/prompts/${needKey("moda prompts replay-runs <key>")}/replay-runs`, {}, profileOptions));
|
|
6590
|
-
return;
|
|
6591
6512
|
case "decide": {
|
|
6592
6513
|
const usage = "moda prompts decide <key> <proposal_id> --action=merge|reject|reopen";
|
|
6593
6514
|
const id = needKey(usage);
|
|
@@ -6611,4 +6532,4 @@ function asRecordValue(value) {
|
|
|
6611
6532
|
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
6612
6533
|
}
|
|
6613
6534
|
|
|
6614
|
-
export { runPromptsCommand, initPrompts, runPromptSync, writePromptSyncProgress, discoverPrompts, inspectPromptManifest, promptManifestWarnings, migratePromptManifest,
|
|
6535
|
+
export { runPromptsCommand, initPrompts, runPromptSync, writePromptSyncProgress, discoverPrompts, inspectPromptManifest, promptManifestWarnings, migratePromptManifest, parsePromptFile, importHarnessPromptSources };
|
|
@@ -13,22 +13,22 @@ import {
|
|
|
13
13
|
} from "./cli-hcwdz9sd.js";
|
|
14
14
|
import {
|
|
15
15
|
createCommandContext
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-m4474bnj.js";
|
|
17
17
|
import {
|
|
18
18
|
assertFlags,
|
|
19
19
|
assertPositionals,
|
|
20
20
|
writeDryRun
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-4kf462jq.js";
|
|
22
22
|
import {
|
|
23
23
|
callControlAPI
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-j08a1mam.js";
|
|
25
25
|
import {
|
|
26
26
|
recordApiRequest,
|
|
27
27
|
resolveApiKey,
|
|
28
28
|
resolveIngestUrl,
|
|
29
29
|
resolveTenantId,
|
|
30
30
|
shellArg
|
|
31
|
-
} from "./cli-
|
|
31
|
+
} from "./cli-da3h2p6w.js";
|
|
32
32
|
import {
|
|
33
33
|
CliInputError
|
|
34
34
|
} from "./cli-k4tqwah4.js";
|
|
@@ -78,9 +78,6 @@ function renderFixesBlock() {
|
|
|
78
78
|
"- Propose the change in the code, prompt, tool definition, or skill that",
|
|
79
79
|
" causes the issue, and cite the Moda problem or trace ids it is based on",
|
|
80
80
|
" in the PR description.",
|
|
81
|
-
"- Test a prompt change on the Problem's failing traces before it ships (a paid",
|
|
82
|
-
" replay; prompt changes only today): `moda prompts ab --problem=<problem_id>",
|
|
83
|
-
" --baseline=<prompt_key> --candidate=<edited prompt file>`.",
|
|
84
81
|
"- Prompts live in `.moda/prompts.yml` (version 2: `prompt_paths` globs plus",
|
|
85
82
|
" `sources:` mappings for prompts defined in code); after `moda prompts sync`,",
|
|
86
83
|
" pass `prompt: lock.prompts['<key>']` to createThinkTelemetry/createAI7Telemetry.",
|
|
@@ -624,25 +621,19 @@ function formatProposalRate(value) {
|
|
|
624
621
|
}
|
|
625
622
|
var SKILLS_SUBCOMMAND_FLAGS = {
|
|
626
623
|
gen: [
|
|
627
|
-
"replay",
|
|
628
624
|
"source",
|
|
629
625
|
"wait",
|
|
630
626
|
"clustering-poll-seconds",
|
|
631
627
|
"clustering-run-id",
|
|
632
628
|
"clustering-timeout-seconds",
|
|
633
629
|
"end-at",
|
|
634
|
-
"eval-set-id",
|
|
635
630
|
"force-reprocess",
|
|
636
631
|
"harness-url",
|
|
637
|
-
"improve-candidates",
|
|
638
|
-
"improvement-rounds",
|
|
639
632
|
"lookback-hours",
|
|
640
633
|
"max-cluster-pct",
|
|
641
634
|
"max-sessions",
|
|
642
635
|
"max-traces",
|
|
643
636
|
"no-clustering",
|
|
644
|
-
"no-replay",
|
|
645
|
-
"replay-set-id",
|
|
646
637
|
"reprocess-segments",
|
|
647
638
|
"start-at",
|
|
648
639
|
"tenant-id",
|
|
@@ -768,7 +759,7 @@ async function runSkillsCommand(input) {
|
|
|
768
759
|
return runSkillsInstall(context, positionals.slice(1));
|
|
769
760
|
}
|
|
770
761
|
if (sub !== "pull") {
|
|
771
|
-
throw new CliInputError(sub ? `Unknown skills subcommand '${sub}'` : "A skills subcommand is required", "Usage: moda skills gen [--source=all|sdk] [--max-sessions=N (default 200)] [--lookback-hours=N (default 720)] [--max-traces=N] [--
|
|
762
|
+
throw new CliInputError(sub ? `Unknown skills subcommand '${sub}'` : "A skills subcommand is required", "Usage: moda skills gen [--source=all|sdk] [--max-sessions=N (default 200)] [--lookback-hours=N (default 720)] [--max-traces=N] [--start-at=ISO] [--end-at=ISO] [--reprocess-segments] [--force-reprocess] [--wait] | moda skills status [run-id] | moda skills proposals list [--status=ready_for_pr] | moda skills proposal apply <proposal-id> | moda skills pull [--status=approved|proposed|all] | moda skills push [--dry-run] | moda skills install [--list] <id...>");
|
|
772
763
|
}
|
|
773
764
|
const status = (flags.status ?? "approved").toLowerCase();
|
|
774
765
|
if (!VALID_STATUSES.has(status)) {
|
|
@@ -814,17 +805,13 @@ async function generateSkills(flags) {
|
|
|
814
805
|
start_at: flags["start-at"] || undefined,
|
|
815
806
|
end_at: flags["end-at"] || undefined,
|
|
816
807
|
clustering_run_id: flags["clustering-run-id"] || undefined,
|
|
817
|
-
replay_set_id: flags["replay-set-id"] || flags["eval-set-id"] || undefined,
|
|
818
808
|
run_clustering: flags["no-clustering"] !== "true",
|
|
819
809
|
source,
|
|
820
810
|
clustering_timeout_seconds: parsePositiveInt(flags["clustering-timeout-seconds"], 7200),
|
|
821
811
|
clustering_poll_seconds: parsePositiveInt(flags["clustering-poll-seconds"], 15),
|
|
822
812
|
max_cluster_pct: parseOptionalFloat(flags["max-cluster-pct"]),
|
|
823
813
|
reprocess_segments: flags["reprocess-segments"] === "true" || forceReprocess,
|
|
824
|
-
run_replay: flags.replay === "true" && flags["no-replay"] !== "true",
|
|
825
814
|
max_traces: parseScopeInt(flags["max-traces"], "max-traces"),
|
|
826
|
-
improve_candidates: flags["improve-candidates"] === "true",
|
|
827
|
-
improvement_rounds: parseScopeInt(flags["improvement-rounds"], "improvement-rounds", MAX_IMPROVEMENT_ROUNDS) ?? 2,
|
|
828
815
|
force_reprocess: forceReprocess,
|
|
829
816
|
wait_for_completion: waitForCompletion
|
|
830
817
|
});
|
|
@@ -846,7 +833,6 @@ async function generateSkills(flags) {
|
|
|
846
833
|
}
|
|
847
834
|
return await response.json();
|
|
848
835
|
}
|
|
849
|
-
var MAX_IMPROVEMENT_ROUNDS = 3;
|
|
850
836
|
function parseScopeInt(value, flag, max) {
|
|
851
837
|
if (value === undefined)
|
|
852
838
|
return;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./cli-e0kbye4s.js";
|
|
4
4
|
import {
|
|
5
5
|
callDataAPI
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-j08a1mam.js";
|
|
7
7
|
import {
|
|
8
8
|
shellArg
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-da3h2p6w.js";
|
|
10
10
|
import {
|
|
11
11
|
CliInputError
|
|
12
12
|
} from "./cli-k4tqwah4.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
stripAnsi
|
|
3
|
+
} from "./cli-97fnztpy.js";
|
|
1
4
|
import {
|
|
2
5
|
SYNC_STATE_PATH,
|
|
3
6
|
readHarnessSyncState,
|
|
@@ -7,53 +10,19 @@ import {
|
|
|
7
10
|
renderHarnessAnalyzeHumanResult,
|
|
8
11
|
renderHarnessProgress
|
|
9
12
|
} from "./cli-xq45etg1.js";
|
|
10
|
-
import {
|
|
11
|
-
stripAnsi
|
|
12
|
-
} from "./cli-97fnztpy.js";
|
|
13
|
-
import {
|
|
14
|
-
HARNESS_ANALYZE_CONCERNS,
|
|
15
|
-
HARNESS_REPORT_PATH,
|
|
16
|
-
approveHarnessReport,
|
|
17
|
-
artifactHasBody,
|
|
18
|
-
createHarnessReport,
|
|
19
|
-
firstEvidencePath,
|
|
20
|
-
graphForReport,
|
|
21
|
-
hashHarnessReport,
|
|
22
|
-
hashStableJson,
|
|
23
|
-
loadHarnessReportForSync,
|
|
24
|
-
normalizeHarnessReport,
|
|
25
|
-
readHarnessReport,
|
|
26
|
-
requiresArtifactBody,
|
|
27
|
-
resolveHarnessReportPath,
|
|
28
|
-
stampRemoteSnapshotTruncation,
|
|
29
|
-
validateHarnessReport,
|
|
30
|
-
writeHarnessReportArtifacts
|
|
31
|
-
} from "./cli-cesds766.js";
|
|
32
|
-
import {
|
|
33
|
-
PYTHON_AGENT_MODULES,
|
|
34
|
-
TYPESCRIPT_AGENT_MODULES,
|
|
35
|
-
backfillPromptSource,
|
|
36
|
-
discoverCodePromptCandidates,
|
|
37
|
-
discoverStructuredPromptSources,
|
|
38
|
-
extractCodeSource,
|
|
39
|
-
extractPythonSource,
|
|
40
|
-
require_typescript,
|
|
41
|
-
resolvePromptSource,
|
|
42
|
-
validatePromptSource
|
|
43
|
-
} from "./cli-qpq84eee.js";
|
|
44
13
|
import {
|
|
45
14
|
createCommandContext,
|
|
46
15
|
stringOption
|
|
47
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-m4474bnj.js";
|
|
48
17
|
import {
|
|
49
18
|
assertFlags,
|
|
50
19
|
assertPositionals,
|
|
51
20
|
requireTenant
|
|
52
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-4kf462jq.js";
|
|
53
22
|
import {
|
|
54
23
|
ApiError,
|
|
55
24
|
callControlAPI
|
|
56
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-j08a1mam.js";
|
|
57
26
|
import {
|
|
58
27
|
embeddedTenantIdFromApiKey,
|
|
59
28
|
getActiveProfile,
|
|
@@ -63,11 +32,19 @@ import {
|
|
|
63
32
|
resolveModaBaseUrl,
|
|
64
33
|
resolveTenantId,
|
|
65
34
|
shellArg
|
|
66
|
-
} from "./cli-
|
|
35
|
+
} from "./cli-da3h2p6w.js";
|
|
67
36
|
import {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
37
|
+
PYTHON_AGENT_MODULES,
|
|
38
|
+
TYPESCRIPT_AGENT_MODULES,
|
|
39
|
+
backfillPromptSource,
|
|
40
|
+
discoverCodePromptCandidates,
|
|
41
|
+
discoverStructuredPromptSources,
|
|
42
|
+
extractCodeSource,
|
|
43
|
+
extractPythonSource,
|
|
44
|
+
require_typescript,
|
|
45
|
+
resolvePromptSource,
|
|
46
|
+
validatePromptSource
|
|
47
|
+
} from "./cli-qpq84eee.js";
|
|
71
48
|
import {
|
|
72
49
|
$isMap,
|
|
73
50
|
$isNode,
|
|
@@ -94,6 +71,29 @@ import {
|
|
|
94
71
|
redactDeep,
|
|
95
72
|
shouldInventoryFile
|
|
96
73
|
} from "./cli-ns5fcnkz.js";
|
|
74
|
+
import {
|
|
75
|
+
HARNESS_ANALYZE_CONCERNS,
|
|
76
|
+
HARNESS_REPORT_PATH,
|
|
77
|
+
approveHarnessReport,
|
|
78
|
+
artifactHasBody,
|
|
79
|
+
createHarnessReport,
|
|
80
|
+
firstEvidencePath,
|
|
81
|
+
graphForReport,
|
|
82
|
+
hashHarnessReport,
|
|
83
|
+
hashStableJson,
|
|
84
|
+
loadHarnessReportForSync,
|
|
85
|
+
normalizeHarnessReport,
|
|
86
|
+
readHarnessReport,
|
|
87
|
+
requiresArtifactBody,
|
|
88
|
+
resolveHarnessReportPath,
|
|
89
|
+
stampRemoteSnapshotTruncation,
|
|
90
|
+
validateHarnessReport,
|
|
91
|
+
writeHarnessReportArtifacts
|
|
92
|
+
} from "./cli-cesds766.js";
|
|
93
|
+
import {
|
|
94
|
+
CliInputError,
|
|
95
|
+
CliInputRequiredError
|
|
96
|
+
} from "./cli-k4tqwah4.js";
|
|
97
97
|
import {
|
|
98
98
|
__require,
|
|
99
99
|
__toESM
|
|
@@ -14048,7 +14048,7 @@ async function runHarnessCommand(context) {
|
|
|
14048
14048
|
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.");
|
|
14049
14049
|
}
|
|
14050
14050
|
if (context.flags["github-actions"] === "true") {
|
|
14051
|
-
const { runGithubActionsAnalyze } = await import("./harness-github-actions-
|
|
14051
|
+
const { runGithubActionsAnalyze } = await import("./harness-github-actions-aac3tn96.js");
|
|
14052
14052
|
const result = await runGithubActionsAnalyze(rootDir, {
|
|
14053
14053
|
writeReport: (report2) => {
|
|
14054
14054
|
const normalized = normalizeHarnessReport(report2);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchApiKeyProbe
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-d6gfxx8t.js";
|
|
4
4
|
import {
|
|
5
5
|
authFetch,
|
|
6
6
|
getCachedLoginContext
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-h1z9yyqk.js";
|
|
8
8
|
import {
|
|
9
9
|
embeddedTenantIdFromApiKey,
|
|
10
10
|
getModaDir,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveTenantIdFromActiveProfile,
|
|
16
16
|
saveCliConfig,
|
|
17
17
|
writeSecretJsonFile
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-da3h2p6w.js";
|
|
19
19
|
import {
|
|
20
20
|
CliAccessError,
|
|
21
21
|
CliInputError,
|