@moda-ai/cli 1.55.44 → 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-k2ka2kjb.js → cli-sqnw96gj.js} +7 -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-sv3qx7f4.js → production-intelligence-8j8008d2.js} +6 -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
|
@@ -61,33 +61,7 @@ sources: # prompts defined in code or config, mapped in pla
|
|
|
61
61
|
To attribute runtime calls, stamp the lock entry `{ key, promptId, versionId }`
|
|
62
62
|
on telemetry. With Cloudflare Think / AI SDK 7, pass
|
|
63
63
|
`prompt: lock.prompts['<key>']` to `createThinkTelemetry` (`moda-ai/think`) or
|
|
64
|
-
`createAI7Telemetry` (`moda-ai/ai7`).
|
|
65
|
-
"top share 0%" means the evidence carries no prompt version: wire this up,
|
|
66
|
-
then check `moda prompts status`.
|
|
67
|
-
|
|
68
|
-
`prompts ab` and `prompts propose --gate` run paid replays. Before sending
|
|
69
|
-
anything they compute planned playouts (cases × seeds × 2 arms) and print it
|
|
70
|
-
(`plannedPlayouts`). Above 200, or when an existing set's case count can't be
|
|
71
|
-
read, they fail (exit 1) with the number and the exact command to re-run with `--yes`.
|
|
72
|
-
Only add `--yes` when the user has agreed to that spend. Limits: `--cases`
|
|
73
|
-
default 5, max 100; `--seeds` default 3, max 10; `--traces` at most 100
|
|
74
|
-
(`--traces=conv_id@412` replays that trace from msg_index 412, with the
|
|
75
|
-
earlier turns as history, and writes its case from the messages around 412);
|
|
76
|
-
`--problem=<problem_id>` picks a Problem's affected traces, each anchored at
|
|
77
|
-
its earliest evidence msg_index, up to
|
|
78
|
-
`--max-cases` (default 10, max 100), and prints them (`problemCases`);
|
|
79
|
-
`--model` / `--assistant-model` must be one of `openai/gpt-5.6-luna`,
|
|
80
|
-
`openai/gpt-4o-mini`, `openai/gpt-4o`, `anthropic/claude-sonnet-4-5`,
|
|
81
|
-
`anthropic/claude-haiku-4-5`, `google/gemini-2.5-flash`,
|
|
82
|
-
`google/gemini-2.5-pro` unless you pass `--allow-any-model`.
|
|
83
|
-
|
|
84
|
-
`prompts ab --traces=<ids>` builds one case per trace from Moda's distilled
|
|
85
|
-
scenario and success criteria for that trace. A trace Moda cannot distill
|
|
86
|
-
falls back to its opening user message (for `id@N`, the user message leading
|
|
87
|
-
into N) with three generic criteria (which long
|
|
88
|
-
traces pass easily); the run warns and lists it under `caseSources.fallback`.
|
|
89
|
-
`prompts ab` never makes its replay set the tenant's primary set unless you
|
|
90
|
-
pass `--promote`.
|
|
64
|
+
`createAI7Telemetry` (`moda-ai/ai7`).
|
|
91
65
|
|
|
92
66
|
Runtime code should render synced prompts through the SDK:
|
|
93
67
|
|
|
@@ -1,53 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Harness registry
|
|
2
2
|
|
|
3
3
|
Loaded on demand from the moda-cli skill.
|
|
4
4
|
|
|
5
|
-
### 7a.
|
|
6
|
-
|
|
7
|
-
Use after `prompts ab`, `prompts propose --gate`, or a dashboard replay when
|
|
8
|
-
you need to see *why* an arm passed or failed. Read-only; no replay spend.
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
moda replays sets --json # set ids
|
|
12
|
-
moda replays runs <set_id> --limit=5 --json # newest runs, every status
|
|
13
|
-
moda replays run <set_id> <run_id> --json # per-case + per-seed verdicts
|
|
14
|
-
moda replays playouts <set_id> <run_id> --json # one row per case x arm x seed
|
|
15
|
-
moda replays playouts <set_id> <run_id> --case=<case_id> --arm=proposed --seed=1 --transcript --json
|
|
16
|
-
moda replays playout <set_id> <run_id> <playout_id> --json
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
`run` returns `results[]` (one per case × arm × seed: `pass`, `abstained`,
|
|
20
|
-
`coverageReason`, `score`, `rationale`, `criteria[]`) next to the per-case
|
|
21
|
-
majority in `cases[]`. `arm=prod` is the baseline and `arm=proposed` the
|
|
22
|
-
candidate. An `abstained: true` row is not a verdict: the pair hit a replay
|
|
23
|
-
coverage hole and is excluded from pass counts.
|
|
24
|
-
|
|
25
|
-
A playout's `transcript.events[]` holds the simulated user and agent messages
|
|
26
|
-
and every tool call with its `input`, the `output` the replay served, and
|
|
27
|
-
`provenance.source`: `replay_runtime` (compiled mock over the case's recorded
|
|
28
|
-
source state), `agent_tool_simulator` (LLM simulator grounded in recorded
|
|
29
|
-
receipts; `simulator.model`), `counterfactual_reconstruction`, or
|
|
30
|
-
`generic_handler`. `provenance.errorSubtype` such as `missing_source_state`
|
|
31
|
-
marks an unservable call. `judge` is the judgement stored with the playout and
|
|
32
|
-
`verdict` the stored eval row (null when `seed` is null, which happens on
|
|
33
|
-
older runs whose graphs cannot be matched to a seed).
|
|
34
|
-
|
|
35
|
-
Limits: `--transcript` pages at most 10 playouts (`--limit` default 50, max
|
|
36
|
-
200 without it); text and tool JSON are clipped at `--max-chars` (default
|
|
37
|
-
4000, max 32000) and `transcript.truncated.fields` counts the clipped fields.
|
|
38
|
-
Page with `--cursor=<nextCursor>`. Playouts exist only for runs whose
|
|
39
|
-
playouts were captured; `playoutCount: 0` on `run` means there is no
|
|
40
|
-
transcript to read.
|
|
41
|
-
|
|
42
|
-
### 7b. Register the harness for replays (`moda registry`)
|
|
5
|
+
### 7a. Register the harness (`moda registry`)
|
|
43
6
|
|
|
44
7
|
Use when the user wants their prompts, skills, tools, or agent wiring in Moda
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
brief it prints.
|
|
8
|
+
without the GitHub App or `moda harness analyze`. **You** are the analyst: read
|
|
9
|
+
the codebase you already have, write one manifest, and push exactly what it
|
|
10
|
+
lists. Nothing else in the repo is uploaded. For a full guided pass (inventory,
|
|
11
|
+
prompt switching, context, attribution, and verification), run `moda registry
|
|
12
|
+
prompt` and follow the brief it prints.
|
|
51
13
|
|
|
52
14
|
```bash
|
|
53
15
|
moda registry prompt # the step-by-step brief for this job
|
|
@@ -113,8 +75,7 @@ tools still works; every section optional, ≤500 entries in prompts, skills, an
|
|
|
113
75
|
- **Skills:** `key` (letters, digits, `_`, `-`) plus `skillMd` or `file` (full
|
|
114
76
|
SKILL.md). Pushed skills are *local* by default. Set `"live": true`, or pass
|
|
115
77
|
`--live`, to include them in the served skill surface. Leaving `live` out
|
|
116
|
-
never demotes a skill that is already live.
|
|
117
|
-
lists in `agents[].skills`, whether or not they are live.
|
|
78
|
+
never demotes a skill that is already live.
|
|
118
79
|
- **Tools:** an OpenAI function `schema` (a wrapped
|
|
119
80
|
`{"type":"function","function":{...}}` is accepted), plus optional
|
|
120
81
|
`isActive`. Copy names and parameter schemas exactly as the agent registers
|
|
@@ -130,16 +91,11 @@ tools still works; every section optional, ≤500 entries in prompts, skills, an
|
|
|
130
91
|
`promptKeys`).
|
|
131
92
|
- **Routing (prompt switching):** `strategy` is `single`, `handoff`, `router`,
|
|
132
93
|
`rules`, or `trace_attribute`; `default` is an agent key; put code-level
|
|
133
|
-
rules in `notes`.
|
|
134
|
-
(agent name, then prompt key), else `default`, else the `entry` agent. When
|
|
135
|
-
the replayed model calls a handoff tool, replay switches to the target
|
|
136
|
-
agent's prompt, tools, model, and params.
|
|
94
|
+
rules in `notes`.
|
|
137
95
|
- **Context:** what the runtime injects. `source` is `static` (with `value`),
|
|
138
|
-
`clock` (`format`: date, datetime, or iso
|
|
139
|
-
|
|
140
|
-
`
|
|
141
|
-
never invented. `target` is `prompt_variable` (needs `variable`) or
|
|
142
|
-
`system_append`.
|
|
96
|
+
`clock` (`format`: date, datetime, or iso), or `trace`, `memory`,
|
|
97
|
+
`retrieval`, `tool`, or `unknown`. `target` is `prompt_variable` (needs
|
|
98
|
+
`variable`) or `system_append`.
|
|
143
99
|
- **Runtime:** `framework`, `language`, `maxToolRoundsPerTurn`,
|
|
144
100
|
`parallelToolCalls`, `history` (`strategy`, `maxMessages`, `maxTokens`),
|
|
145
101
|
and `skillLoading` (`tool`, `system_prompt`, or `none`).
|
|
@@ -148,9 +104,9 @@ tools still works; every section optional, ≤500 entries in prompts, skills, an
|
|
|
148
104
|
- `file` paths are relative to the directory you run the command from and must
|
|
149
105
|
stay inside it (symlinks included).
|
|
150
106
|
|
|
151
|
-
**Traces must name the agent.**
|
|
152
|
-
|
|
153
|
-
|
|
107
|
+
**Traces must name the agent.** Each LLM call should carry `gen_ai.agent.name`
|
|
108
|
+
(or `moda.agent_name`; with the Vercel AI SDK use
|
|
109
|
+
`experimental_telemetry.metadata["moda.agent_name"]`; `agent_name` on
|
|
154
110
|
`/v1/ingest`), set to an agent `key` or one of its `match.agentNames`. It
|
|
155
111
|
should also carry `moda.prompt_key` / `moda.prompt_version_id`. Only add these
|
|
156
112
|
to application code when the user asks for it or approves the diff.
|
package/dist/cli-4pc0a18x.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
callControlAPI
|
|
3
|
-
} from "./cli-dmm9jm9m.js";
|
|
4
|
-
|
|
5
|
-
// src/replay-runs.ts
|
|
6
|
-
var DEFAULT_POLL_INTERVAL_MS = 15000;
|
|
7
|
-
var DEFAULT_WAIT_TIMEOUT_MS = 2 * 60 * 60 * 1000;
|
|
8
|
-
async function fetchLatestRun(tenantId, replaySetId, runId, profileOptions) {
|
|
9
|
-
return callControlAPI(`/tenants/${encodeURIComponent(tenantId)}/replay-sets/${encodeURIComponent(replaySetId)}/runs/latest?runId=${encodeURIComponent(runId)}`, { method: "GET" }, profileOptions, { timeoutMs: 60000, retries: 2 });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { DEFAULT_POLL_INTERVAL_MS, DEFAULT_WAIT_TIMEOUT_MS, fetchLatestRun };
|