@moda-ai/cli 1.14.3 → 1.15.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.
@@ -48,6 +48,10 @@ const agentEvidenceRefSchema = {
48
48
  path: { type: 'string' },
49
49
  line: { type: 'number' },
50
50
  status: { type: 'string' },
51
+ href: {
52
+ type: 'string',
53
+ description: 'Root-relative Moda dashboard deep-link for this evidence (e.g. /dashboard/conversations/<id>?turn=5). Prefix the Moda base URL to open.',
54
+ },
51
55
  },
52
56
  };
53
57
  const agentRecommendedActionSchema = {
@@ -907,6 +907,12 @@ function normalizeGraphItemFieldAliases(collection, item) {
907
907
  else if (typeof item.target === 'string')
908
908
  item.to = item.target;
909
909
  }
910
+ // Pre-1.14 analysts (e.g. a hosted container whose baked CLI predates the
911
+ // rename) emit the relationship type as `kind`. Observed in production:
912
+ // hosted reports failing validation with "relationships.<id> must include
913
+ // string type" while carrying the value under `kind`.
914
+ if (typeof item.type !== 'string' && typeof item.kind === 'string')
915
+ item.type = item.kind;
910
916
  }
911
917
  }
912
918
  /** Canonical evidence path for graph items: prefer explicit sourcePath, then evidence. */
package/dist/output.d.ts CHANGED
@@ -42,6 +42,8 @@ export interface AgentEvidenceRef {
42
42
  path?: string;
43
43
  line?: number;
44
44
  status?: string;
45
+ /** Root-relative dashboard deep-link (prefix the Moda base URL to open). */
46
+ href?: string;
45
47
  }
46
48
  export interface AgentRecommendedAction {
47
49
  id: string;
@@ -19,6 +19,12 @@ export interface ProductionEvidenceRef {
19
19
  path?: string;
20
20
  line?: number;
21
21
  value?: unknown;
22
+ /**
23
+ * Root-relative dashboard deep-link supplied by the backend
24
+ * (e.g. `/dashboard/conversations/<id>?turn=5`). Prefix the Moda base URL
25
+ * to open it; absent when the evidence has no navigable record.
26
+ */
27
+ href?: string;
22
28
  }
23
29
  export interface LikelyLocation {
24
30
  kind: 'tool' | 'prompt' | 'skill' | 'entrypoint' | 'harness' | 'unknown';
@@ -2,6 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { callControlAPI, callDataAPI } from './api-client.js';
4
4
  import { streamAsk } from './ask-stream.js';
5
+ import { resolveModaBaseUrl } from './config.js';
5
6
  import { CliAuthError, CliInputError } from './errors.js';
6
7
  import { EXIT_DEGRADED, EXIT_OK, safeWriteStderr } from './output.js';
7
8
  import { asNumber, asRecord, asString } from './transforms.js';
@@ -300,6 +301,7 @@ export function askResultFromStreamOutcome(outcome, question) {
300
301
  id: citation.id,
301
302
  kind: evidenceKind(citation.source),
302
303
  label: citation.label,
304
+ href: citation.href,
303
305
  }));
304
306
  const nextCommands = outcome.errorMessage ? [] : outcome.nextCommands;
305
307
  const warnings = outcome.errorMessage
@@ -575,6 +577,7 @@ function normalizeCloudAsk(response, question) {
575
577
  label: asString(ref.label) ?? asString(ref.id) ?? 'Cloud evidence',
576
578
  path: asString(ref.path) ?? undefined,
577
579
  value: ref.value,
580
+ href: asString(ref.href) ?? undefined,
578
581
  }];
579
582
  })
580
583
  : [];
@@ -926,6 +929,7 @@ function agentEvidence(ref) {
926
929
  label: ref.label,
927
930
  path: ref.path,
928
931
  line: ref.line,
932
+ href: ref.href,
929
933
  };
930
934
  }
931
935
  function agentAction(action) {
@@ -1038,9 +1042,13 @@ export function renderAskHuman(result) {
1038
1042
  // Subtle grounding marker: flag model-inferred evidence so a human reader
1039
1043
  // can weight it. Ids/anchors stay hidden in the human projection.
1040
1044
  const grounding = new Map(result.intelligence.evidence_refs.map((ref) => [ref.id, ref.grounding]));
1045
+ const dashboardBase = resolveModaBaseUrl();
1041
1046
  for (const ref of result.evidenceRefs.slice(0, 8)) {
1042
1047
  const marker = grounding.get(ref.id) === 'inferred' ? ' (inferred)' : '';
1043
- lines.push(` - ${ref.label}${ref.path ? ` (${ref.path})` : ''}${marker}`);
1048
+ // Backend hrefs are root-relative dashboard paths; print the absolute
1049
+ // URL so terminals auto-linkify it and the reader can click through.
1050
+ const link = ref.href ? `\n ${dashboardBase}${ref.href}` : '';
1051
+ lines.push(` - ${ref.label}${ref.path ? ` (${ref.path})` : ''}${marker}${link}`);
1044
1052
  }
1045
1053
  }
1046
1054
  const unverifiedClaims = result.intelligence.answer_claims.filter((claim) => claim.status !== 'grounded').length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.14.3",
3
+ "version": "1.15.1",
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-08T10:46:16.499Z",
4
- "cli_version": "1.14.3",
3
+ "bundled_at": "2026-07-08T14:31:50.320Z",
4
+ "cli_version": "1.15.1",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-node-anthropic",