@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.
Files changed (42) hide show
  1. package/README.md +7 -8
  2. package/dist/{agent-5ax7fqhe.js → agent-aewgndk0.js} +16 -16
  3. package/dist/{cli-tztzrh6b.js → cli-4kf462jq.js} +3 -3
  4. package/dist/{cli-xcpwp0gb.js → cli-d6gfxx8t.js} +1 -1
  5. package/dist/{cli-t4xfvrry.js → cli-dxbd1xxs.js} +5 -5
  6. package/dist/{cli-wwbr5caw.js → cli-fqc02t6h.js} +12 -91
  7. package/dist/{cli-sejqvvhv.js → cli-h1z9yyqk.js} +1 -1
  8. package/dist/{cli-dmm9jm9m.js → cli-j08a1mam.js} +1 -1
  9. package/dist/{cli-8pcq2et6.js → cli-m4474bnj.js} +1 -1
  10. package/dist/{cli-xx0pjzkh.js → cli-s7d069g0.js} +5 -19
  11. package/dist/{cli-4m0rgkx4.js → cli-sqnw96gj.js} +2 -2
  12. package/dist/{cli-d4cdczhe.js → cli-x7rc3twr.js} +42 -42
  13. package/dist/{cli-5aa48ry5.js → cli-xctqdn42.js} +3 -3
  14. package/dist/cli.js +227 -630
  15. package/dist/{doctor-k4tdgvgv.js → doctor-fz5kq44d.js} +8 -8
  16. package/dist/{harness-avynbq4f.js → harness-cy0gpyhj.js} +10 -10
  17. package/dist/{harness-github-actions-gd6vyxb0.js → harness-github-actions-aac3tn96.js} +9 -9
  18. package/dist/{index-63k2a6gb.js → index-5eyq3ykt.js} +26 -26
  19. package/dist/{production-intelligence-0z6v6tpp.js → production-intelligence-8j8008d2.js} +4 -4
  20. package/dist/{profile-commands-mh3kfqkn.js → profile-commands-zbyn9xg2.js} +5 -5
  21. package/dist/{prompt-attribution-wvvnzw4m.js → prompt-attribution-g9gtv191.js} +9 -9
  22. package/dist/prompt-source-mcp.js +9 -9
  23. package/dist/{prompts-snnbyxmz.js → prompts-b6awryvv.js} +9 -13
  24. package/dist/{provision-t1dpzcjp.js → provision-xkhwz86g.js} +6 -6
  25. package/dist/{registry-8zkxefjs.js → registry-d7xdm4dw.js} +4 -4
  26. package/dist/{skills-d4215fa9.js → skills-zfenne8w.js} +6 -6
  27. package/dist/{sync-17f9yxb1.js → sync-5vd8gwte.js} +12 -12
  28. package/package.json +1 -1
  29. package/skills/integration/index.json +2 -2
  30. package/skills/moda-cli/SKILL.md +7 -10
  31. package/skills/moda-cli/references/commands.md +1 -2
  32. package/skills/moda-cli/references/dashboard-parity.md +2 -3
  33. package/skills/moda-cli/references/output-protocol.md +1 -1
  34. package/skills/moda-cli/references/production-intelligence.md +0 -4
  35. package/skills/moda-cli/references/prompts.md +1 -27
  36. package/skills/moda-cli/references/{replays-and-registry.md → registry.md} +15 -59
  37. package/dist/cli-4pc0a18x.js +0 -12
  38. package/dist/cli-8pksf2x7.js +0 -754
  39. package/dist/fix-nk5xffz8.js +0 -1440
  40. package/dist/prompts-ab-y7egdzg4.js +0 -64
  41. package/dist/prompts-propose-5nw25v9a.js +0 -256
  42. package/dist/{cli-e24fjyrb.js → cli-da3h2p6w.js} +28 -28
@@ -1,53 +1,15 @@
1
- # Replays and the harness registry
1
+ # Harness registry
2
2
 
3
3
  Loaded on demand from the moda-cli skill.
4
4
 
5
- ### 7a. Check a replay verdict (`moda replays`)
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
- so replays rebuild their harness faithfully, without the GitHub App or `moda
46
- harness analyze`. **You** are the analyst: read the codebase you already have,
47
- write one manifest, and push exactly what it lists. Nothing else in the repo is
48
- uploaded. For a full guided pass (inventory, prompt switching, context,
49
- attribution, and verification), run `moda registry prompt` and follow the
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. Replays load the skills an agent
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`. Replay runs the agent named on the replayed turn's trace
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; replay uses the source
139
- conversation's time), or `trace`, `memory`, `retrieval`, `tool`, or
140
- `unknown`. Those last ones are reported as unresolved in replay fidelity,
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.** For per-turn prompt switching, each LLM call
152
- should carry `gen_ai.agent.name` (or `moda.agent_name`; with the Vercel AI SDK
153
- use `experimental_telemetry.metadata["moda.agent_name"]`; `agent_name` on
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.
@@ -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 };