@moda-ai/cli 1.44.1 → 1.45.1
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 -6
- package/dist/{cli-5tsqk3jt.js → cli-3xh2w7hb.js} +2 -2
- package/dist/{cli-8c60k2p4.js → cli-bvnw7585.js} +4 -1
- package/dist/{cli-rycpwqzm.js → cli-dy2aavbe.js} +1 -1
- package/dist/{cli-j2rdgd3p.js → cli-nnwegmzh.js} +4 -4
- package/dist/{cli-j2fapt3g.js → cli-phgzghwq.js} +2 -2
- package/dist/cli.js +756 -41
- package/dist/{harness-sqngqjrd.js → harness-9qpbj2qj.js} +2 -2
- package/dist/{harness-github-actions-pg0azf3h.js → harness-github-actions-ky4ym5n3.js} +2 -2
- package/dist/{index-nepr7cw7.js → index-bcn5chmf.js} +5 -5
- package/dist/prompt-source-mcp.js +2 -2
- package/dist/{provision-02wqtkvm.js → provision-mqw8s0jb.js} +3 -3
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +92 -26
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
writeHarnessAnalyzeResult,
|
|
43
43
|
writeHarnessArtifacts,
|
|
44
44
|
writeHumanProgress
|
|
45
|
-
} from "./cli-
|
|
46
|
-
import"./cli-
|
|
45
|
+
} from "./cli-3xh2w7hb.js";
|
|
46
|
+
import"./cli-bvnw7585.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-nnwegmzh.js";
|
|
7
7
|
import {
|
|
8
8
|
codingAgentDisplayName,
|
|
9
9
|
describeCodingAgentEvent,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
runHarnessCommand,
|
|
23
23
|
startRemoteAnalyze,
|
|
24
24
|
stripAnsi
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-3xh2w7hb.js";
|
|
26
26
|
import {
|
|
27
27
|
bundledSkillsDir,
|
|
28
28
|
installIntegrationSkill,
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
} from "./cli-ssfq84k5.js";
|
|
35
35
|
import {
|
|
36
36
|
selectTenantAndCreateKey
|
|
37
|
-
} from "./cli-
|
|
37
|
+
} from "./cli-phgzghwq.js";
|
|
38
38
|
import {
|
|
39
39
|
ConnectCodeError,
|
|
40
40
|
connectWithCode,
|
|
41
41
|
loadAuthSession,
|
|
42
42
|
loadToken,
|
|
43
43
|
login
|
|
44
|
-
} from "./cli-
|
|
44
|
+
} from "./cli-dy2aavbe.js";
|
|
45
45
|
import {
|
|
46
46
|
CliAuthError,
|
|
47
47
|
CliInputError,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
createCommandContext,
|
|
50
50
|
resolveIngestUrl,
|
|
51
51
|
resolveModaBaseUrl
|
|
52
|
-
} from "./cli-
|
|
52
|
+
} from "./cli-bvnw7585.js";
|
|
53
53
|
import"./cli-0v6na3yp.js";
|
|
54
54
|
|
|
55
55
|
// src/init/index.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectTenantAndCreateKey
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-phgzghwq.js";
|
|
4
4
|
import {
|
|
5
5
|
loadAuthSession
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-dy2aavbe.js";
|
|
7
7
|
import {
|
|
8
8
|
CliAuthError,
|
|
9
9
|
resolveIngestUrl,
|
|
10
10
|
resolveModaBaseUrl,
|
|
11
11
|
stringOption
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-bvnw7585.js";
|
|
13
13
|
import"./cli-0v6na3yp.js";
|
|
14
14
|
|
|
15
15
|
// src/provision.ts
|
package/package.json
CHANGED
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -39,8 +39,9 @@ Activate this skill when the user wants to:
|
|
|
39
39
|
- List/filter traces by user, environment, cluster, outcome, or time
|
|
40
40
|
- Manage code-first prompt versions when the user explicitly asks for prompt
|
|
41
41
|
sync, prompt status, or prompt promotion
|
|
42
|
-
- Push their prompts, skills,
|
|
43
|
-
|
|
42
|
+
- Push their prompts, skills, tool definitions, and agent wiring (agents,
|
|
43
|
+
routing, injected context) to Moda without a repo scan, so replays rebuild
|
|
44
|
+
their harness — `moda registry push` (section 7b)
|
|
44
45
|
|
|
45
46
|
**Do not** activate for: writing code that calls the Moda Data API directly
|
|
46
47
|
(use the API docs instead), changing application instrumentation unless the
|
|
@@ -832,41 +833,66 @@ Page with `--cursor=<nextCursor>`. Playouts exist only for runs whose
|
|
|
832
833
|
playouts were captured; `playoutCount: 0` on `run` means there is no
|
|
833
834
|
transcript to read.
|
|
834
835
|
|
|
835
|
-
### 7b.
|
|
836
|
+
### 7b. Register the harness for replays (`moda registry`)
|
|
836
837
|
|
|
837
|
-
Use when the user wants their prompts, skills,
|
|
838
|
-
|
|
839
|
-
analyze`.
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
repo is uploaded.
|
|
838
|
+
Use when the user wants their prompts, skills, tools, or agent wiring in Moda
|
|
839
|
+
so replays rebuild their harness faithfully, without the GitHub App or `moda
|
|
840
|
+
harness analyze`. **You** are the analyst: read the codebase you already have,
|
|
841
|
+
write one manifest, and push exactly what it lists. Nothing else in the repo is
|
|
842
|
+
uploaded. For a full guided pass (inventory, prompt switching, context,
|
|
843
|
+
attribution, and verification), run `moda registry prompt` and follow the
|
|
844
|
+
brief it prints.
|
|
845
845
|
|
|
846
846
|
```bash
|
|
847
|
-
moda registry
|
|
847
|
+
moda registry prompt # the step-by-step brief for this job
|
|
848
|
+
moda registry template --out=.moda/registry.json # starter manifest (moda_registry.v2)
|
|
848
849
|
# ...fill in .moda/registry.json from the codebase...
|
|
849
850
|
moda registry validate # local only, no network
|
|
850
851
|
moda registry push --dry-run # server-side preview, writes nothing
|
|
851
852
|
moda registry push # upload
|
|
853
|
+
moda registry status # what is registered (harness version)
|
|
854
|
+
moda registry coverage --days=7 # production traces vs the registry
|
|
855
|
+
moda registry log # history: one commit per push
|
|
856
|
+
moda registry show <commit|working> # a commit's file diffs / changes since the last push
|
|
852
857
|
```
|
|
853
858
|
|
|
854
|
-
|
|
859
|
+
Every successful `push` records a registry **commit**: the whole registry
|
|
860
|
+
(prompts, tools, skills, agents, harness settings) snapshotted as files, with
|
|
861
|
+
your repo's git SHA, branch, and dirty flag. Pass `--message="..."` to label
|
|
862
|
+
it. The dashboard **Registry** page shows these commits git-style: a log,
|
|
863
|
+
per-file diffs, a file browser, and uncommitted changes made outside a push
|
|
864
|
+
(dashboard edits, MCP discovery, `moda prompts sync`).
|
|
865
|
+
|
|
866
|
+
Manifest (`moda_registry.v2`; `moda_registry.v1` with only prompts, skills, and
|
|
867
|
+
tools still works; every section optional, ≤500 entries in prompts, skills, and tools):
|
|
855
868
|
|
|
856
869
|
```json
|
|
857
870
|
{
|
|
858
|
-
"schema": "moda_registry.
|
|
871
|
+
"schema": "moda_registry.v2",
|
|
859
872
|
"prompts": [
|
|
860
|
-
{ "key": "support.triage", "
|
|
861
|
-
|
|
862
|
-
{ "key": "support.reply", "file": "prompts/reply.md" }
|
|
873
|
+
{ "key": "support.triage", "file": "prompts/triage.md" },
|
|
874
|
+
{ "key": "support.billing", "content": "You handle billing for {{company_name}}..." }
|
|
863
875
|
],
|
|
864
876
|
"skills": [
|
|
865
|
-
{ "key": "refund-policy", "
|
|
877
|
+
{ "key": "refund-policy", "file": ".claude/skills/refund-policy/SKILL.md" }
|
|
866
878
|
],
|
|
867
879
|
"tools": [
|
|
868
880
|
{ "schema": { "name": "lookup_customer", "description": "...",
|
|
869
881
|
"parameters": { "type": "object", "properties": { "email": { "type": "string" } } } } }
|
|
882
|
+
],
|
|
883
|
+
"runtime": { "framework": "openai-agents", "maxToolRoundsPerTurn": 6, "skillLoading": "tool" },
|
|
884
|
+
"agents": [
|
|
885
|
+
{ "key": "triage", "entry": true, "prompt": "support.triage",
|
|
886
|
+
"model": { "id": "openai/gpt-5.1", "temperature": 0.2, "maxTokens": 1024 },
|
|
887
|
+
"tools": ["lookup_customer"],
|
|
888
|
+
"handoffs": [{ "to": "billing", "tool": "transfer_to_billing" }],
|
|
889
|
+
"match": { "agentNames": ["TriageAgent"] } },
|
|
890
|
+
{ "key": "billing", "prompt": "support.billing", "skills": ["refund-policy"] }
|
|
891
|
+
],
|
|
892
|
+
"routing": { "strategy": "handoff", "default": "triage" },
|
|
893
|
+
"context": [
|
|
894
|
+
{ "key": "company", "variable": "company_name", "source": "static", "value": "Acme" },
|
|
895
|
+
{ "key": "today", "variable": "current_date", "source": "clock", "format": "date" }
|
|
870
896
|
]
|
|
871
897
|
}
|
|
872
898
|
```
|
|
@@ -881,24 +907,64 @@ Manifest (`moda_registry.v1`; every section optional, ≤500 entries each):
|
|
|
881
907
|
- **Skills:** `key` (letters, digits, `_`, `-`) plus `skillMd` or `file` (full
|
|
882
908
|
SKILL.md). Pushed skills are *local* by default. Set `"live": true`, or pass
|
|
883
909
|
`--live`, to include them in the served skill surface. Leaving `live` out
|
|
884
|
-
never demotes a skill that is already live.
|
|
910
|
+
never demotes a skill that is already live. Replays load the skills an agent
|
|
911
|
+
lists in `agents[].skills`, whether or not they are live.
|
|
885
912
|
- **Tools:** an OpenAI function `schema` (a wrapped
|
|
886
913
|
`{"type":"function","function":{...}}` is accepted), plus optional
|
|
887
914
|
`isActive`. Copy names and parameter schemas exactly as the agent registers
|
|
888
915
|
them with the model. Tools are upserted by name and never overwrite
|
|
889
916
|
MCP-server-managed tools (those report `skipped`).
|
|
917
|
+
- **Agents:** one per distinct prompt, tool set, or model. Fields: `key`,
|
|
918
|
+
`name`, `description`, `entry`, `prompt` (prompt key), `model` (`id`,
|
|
919
|
+
`provider`, `temperature`, `maxTokens`, `topP`, `reasoningEffort`), `tools`
|
|
920
|
+
(tool names), `skills` (skill keys), `handoffs` (`to`, `tool`,
|
|
921
|
+
`description`), `subagents` (`agent`, `tool`; the tool must also be in
|
|
922
|
+
`tools`), `context` (context keys), `maxToolRoundsPerTurn`,
|
|
923
|
+
`responseSchema`, `match` (`agentNames` as they appear in traces,
|
|
924
|
+
`promptKeys`).
|
|
925
|
+
- **Routing (prompt switching):** `strategy` is `single`, `handoff`, `router`,
|
|
926
|
+
`rules`, or `trace_attribute`; `default` is an agent key; put code-level
|
|
927
|
+
rules in `notes`. Replay runs the agent named on the replayed turn's trace
|
|
928
|
+
(agent name, then prompt key), else `default`, else the `entry` agent. When
|
|
929
|
+
the replayed model calls a handoff tool, replay switches to the target
|
|
930
|
+
agent's prompt, tools, model, and params.
|
|
931
|
+
- **Context:** what the runtime injects. `source` is `static` (with `value`),
|
|
932
|
+
`clock` (`format`: date, datetime, or iso; replay uses the source
|
|
933
|
+
conversation's time), or `trace`, `memory`, `retrieval`, `tool`, or
|
|
934
|
+
`unknown`. Those last ones are reported as unresolved in replay fidelity,
|
|
935
|
+
never invented. `target` is `prompt_variable` (needs `variable`) or
|
|
936
|
+
`system_append`.
|
|
937
|
+
- **Runtime:** `framework`, `language`, `maxToolRoundsPerTurn`,
|
|
938
|
+
`parallelToolCalls`, `history` (`strategy`, `maxMessages`, `maxTokens`),
|
|
939
|
+
and `skillLoading` (`tool`, `system_prompt`, or `none`).
|
|
940
|
+
- **MCP servers:** `name`, `transport`, `url` or `command`, `tools`, and
|
|
941
|
+
`description`, with no credentials. List their tools in `tools[]` too.
|
|
890
942
|
- `file` paths are relative to the directory you run the command from and must
|
|
891
943
|
stay inside it (symlinks included).
|
|
892
944
|
|
|
945
|
+
**Traces must name the agent.** For per-turn prompt switching, each LLM call
|
|
946
|
+
should carry `gen_ai.agent.name` (or `moda.agent_name`; with the Vercel AI SDK
|
|
947
|
+
use `experimental_telemetry.metadata["moda.agent_name"]`; `agent_name` on
|
|
948
|
+
`/v1/ingest`), set to an agent `key` or one of its `match.agentNames`. It
|
|
949
|
+
should also carry `moda.prompt_key` / `moda.prompt_version_id`. Only add these
|
|
950
|
+
to application code when the user asks for it or approves the diff.
|
|
951
|
+
`moda registry coverage` shows how many recent calls resolve to a registered
|
|
952
|
+
agent, which agent names, prompt keys, and tools are unregistered, and which
|
|
953
|
+
agents were never seen.
|
|
954
|
+
|
|
893
955
|
`push` needs an API key. `push --dry-run` without one only validates locally
|
|
894
956
|
(status `validated`). Each section goes to its own endpoint and reports
|
|
895
957
|
`sections[].status` (`synced`, `dry_run`, `validated`, `skipped`, or `error`).
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
958
|
+
The harness sections (`runtime`, `agents`, `routing`, `context`, and
|
|
959
|
+
`mcpServers`) are pushed last, as one versioned document. Re-pushing an
|
|
960
|
+
unchanged one reports `unchanged`. If any section fails, `push` exits `1`,
|
|
961
|
+
lists the failures in `errors[]`, and still pushes the other sections. The
|
|
962
|
+
whole manifest is validated before any request, with every error listed at
|
|
963
|
+
once. `warnings[]` names agent references to prompts, tools, or skills that
|
|
964
|
+
the manifest doesn't define; they must already exist in Moda. Unknown fields
|
|
965
|
+
and wrong types are rejected, matching what the server accepts. Skill keys are
|
|
966
|
+
stricter than the server (letters, digits, `_`, `-`) because they double as
|
|
967
|
+
`.claude/skills/<key>/` directory names.
|
|
902
968
|
|
|
903
969
|
### 8. Fixing detected Problems
|
|
904
970
|
|
|
@@ -1226,7 +1292,7 @@ npx: `npx -p @moda-ai/cli moda <command>`.
|
|
|
1226
1292
|
| `moda prompts diff` | Read-only: only prompts changed/new/deleted since last sync (hash-level, not a text diff) |
|
|
1227
1293
|
| `moda prompts sync` | Upload changed prompt versions and update lockfile |
|
|
1228
1294
|
| `moda prompts promote <key>` | Move a remote prompt label |
|
|
1229
|
-
| `moda registry template\|validate\|push` |
|
|
1295
|
+
| `moda registry template\|validate\|push\|status\|coverage\|log\|show\|prompt` | Register prompts, skills, tools, and agent wiring from one agent-written manifest (`--file`, `--dry-run`, `--live`, `--message`, `--days`); every push is a commit in the Registry history; no repo scan |
|
|
1230
1296
|
| `moda users` / `moda user <id>` | End users with health/activity; one user's profile |
|
|
1231
1297
|
| `moda problem-reopen <pid>` | Reopen a Problem marked fixed |
|
|
1232
1298
|
| `moda signals <create\|update\|activate\|pause\|delete\|examples\|refine\|revise\|proposals\|accept\|reject\|search\|preview>` | Manage custom signals (writes take `--dry-run`; LLM-backed ones are rate-limited per key) |
|