@moda-ai/cli 1.13.2 → 1.13.3

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.
@@ -44,7 +44,10 @@ const HARNESS_REPORT_CITATION_TYPES = new Set([
44
44
  'command_output',
45
45
  'production_evidence',
46
46
  ]);
47
- const MAX_HARNESS_REPORT_BYTES = 1_500_000;
47
+ // Raised from 1.5 MB to 12 MB so artifacts can carry their full usable content
48
+ // (prompt bodies, tool signatures/docstrings, guardrail rules) for downstream
49
+ // prompt/tool optimization — not just location metadata.
50
+ const MAX_HARNESS_REPORT_BYTES = 12_000_000;
48
51
  const MAX_HARNESS_REPORT_CLAIMS = 250;
49
52
  const MAX_HARNESS_REPORT_CITATIONS = 400;
50
53
  const MAX_HARNESS_REPORT_SUMMARY_LENGTH = 1_200;
package/dist/harness.d.ts CHANGED
@@ -90,6 +90,14 @@ export interface HarnessArtifact extends HarnessDetection {
90
90
  contentHash?: string;
91
91
  ownedByAgentId?: string;
92
92
  usedByAgentIds: string[];
93
+ /**
94
+ * The actual usable content of the artifact, captured so downstream
95
+ * consumers (prompt optimization, tool optimization) can use it without
96
+ * re-reading the repo: the full prompt text for `prompt`, the signature +
97
+ * docstring/description for `tool`, the rule for `guardrail`, the assertion
98
+ * for `eval`, the config values for `model_config`, etc.
99
+ */
100
+ body?: string;
93
101
  }
94
102
  export interface HarnessIdentityNamespace extends HarnessDetection {
95
103
  id: string;
package/dist/harness.js CHANGED
@@ -1374,6 +1374,7 @@ function renderExternalHarnessAnalystPrompt(options) {
1374
1374
  'Each graph item with evidence must use evidence: [{ path, reason }], not citationIds/citations.',
1375
1375
  'Runtime agents must include id, name, kind:"runtime_agent", root, entrypointIds, channelAdapterIds, artifactIds, identityNamespaceIds, deploymentIds, frameworkIds, modelProviderIds, confidence, evidence.',
1376
1376
  'Artifacts must include id, type, name, scope, usedByAgentIds, confidence, evidence, and optional sourcePath/contentHash/ownedByAgentId. Emit one artifact PER tool, PER prompt (including each inline system prompt), PER guardrail, and PER eval — enumerate them all; artifact types are entrypoint, prompt, tool, skill, eval, retrieval_index, memory, guardrail, model_config, unknown.',
1377
+ 'Also set `body` on each artifact to its actual usable content so it can be consumed downstream WITHOUT re-reading the repo: for `prompt` the COMPLETE prompt text verbatim (full inline `instructions=`/system-prompt string or full prompt file); for `tool` the signature (name + parameters + types) and its docstring/description; for `guardrail` the rule/condition; for `eval` what it asserts; for `model_config` the configuration values. Copy the text in full — do not summarize or truncate `body` (it is the artifact we optimize). Redact any secret literals.',
1377
1378
  'For every `prompt` and `tool` artifact, at least one evidence entry MUST pin an exact source location so downstream optimization can retrieve the item text: carry a numeric `line` (the definition line, or the first line of the range) — evidence: [{ path, line, reason }]. The only exception is an artifact whose entire dedicated file is the text (e.g. a standalone prompt file); set its sourcePath and cite that same file and no line is required. When a single file holds multiple inline prompts or tool definitions, give each its own distinct line — a bare { path, reason } is a defect there.',
1378
1379
  'Agent families must include id, name, runtimeAgentIds, sharedArtifactIds, confidence, evidence.',
1379
1380
  'Frameworks/providers must include packageNames and runtimeAgentIds arrays; providers also include envVars and modelHints arrays.',
@@ -1401,6 +1402,7 @@ function renderExternalAnalystProtocol() {
1401
1402
  '- Also emit artifacts for guardrails (type "guardrail"), evals/tests-of-agents (type "eval"), memory/session stores (type "memory"), retrieval indexes (type "retrieval_index"), and model configuration (type "model_config").',
1402
1403
  '- Only runtime AGENTS may be modeled representatively: if the repo is a framework/SDK/examples collection, you need not treat every example as a distinct production agent — but you MUST still enumerate every distinct tool, prompt, guardrail, and eval as its own artifact.',
1403
1404
  '- Each enumerated artifact needs evidence: [{ path, reason }] (file path + short reason); a full line+excerpt citation is required only for the narrative `claims`, NOT for every artifact — so listing hundreds of tools/prompts is cheap and expected.',
1405
+ '- Capture the actual usable content in each artifact\'s `body`: full prompt text for prompts, signature+docstring for tools, the rule for guardrails, the assertion for evals, config values for model configs. This inventory is consumed directly for optimization, so `body` must be the complete text (verbatim, not summarized), with secret literals redacted.',
1404
1406
  '- EXCEPTION — `prompt` and `tool` artifacts MUST pin an exact location: put a numeric `line` on at least one evidence entry (evidence: [{ path, line, reason }]) at the definition line. That structured location is what lets downstream optimization retrieve the exact prompt/tool text; when one file has several inline prompts or tools, each artifact gets its own line. The only case that needs no line is a whole dedicated file whose entire content is the artifact (set sourcePath to that file and cite it). Still no excerpt required — just the line.',
1405
1407
  '- For every runtime agent, read and cite at least one concrete entrypoint or orchestration line, and link its prompts/tools via artifactIds.',
1406
1408
  '- Keep going until every prompt, tool, guardrail, and eval in scope is represented as an artifact. Use unknowns only for genuinely ambiguous items — never to skip enumeration. Respect the hard caps (<=250 claims, <=400 citations): artifacts are uncapped, so when there are many items keep enumerating them as artifacts and reserve claims/citations for the most important ones.',
@@ -2529,13 +2531,17 @@ function maybeAddPromptArtifact(graph, file) {
2529
2531
  if (!isPrompt)
2530
2532
  return;
2531
2533
  const id = stableId('prompt', file.path);
2534
+ const text = file.text ?? readFileSync(file.absPath, 'utf8');
2532
2535
  upsertArtifact(graph, {
2533
2536
  id,
2534
2537
  type: 'prompt',
2535
2538
  name: promptNameFromPath(file.path),
2536
2539
  scope: 'agent',
2537
2540
  sourcePath: file.path,
2538
- contentHash: hashText(file.text ?? readFileSync(file.absPath, 'utf8')),
2541
+ contentHash: hashText(text),
2542
+ // Capture the full prompt text so downstream prompt optimization can use it
2543
+ // directly without re-reading the repo.
2544
+ body: text,
2539
2545
  usedByAgentIds: [],
2540
2546
  confidence: 0.72,
2541
2547
  evidence: [{ path: file.path, reason: 'Prompt-like file found under prompts directory.' }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.13.2",
3
+ "version": "1.13.3",
4
4
  "description": "CLI for Moda - AI agent analytics and observability",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": "moda.skill_index.v1",
3
- "bundled_at": "2026-07-06T10:32:52.250Z",
4
- "cli_version": "1.13.2",
3
+ "bundled_at": "2026-07-06T18:51:44.915Z",
4
+ "cli_version": "1.13.3",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-node-anthropic",