@moda-ai/cli 1.14.2 → 1.15.0

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 = {
@@ -390,9 +390,12 @@ export async function selectTenantAndCreateKey(options = {}) {
390
390
  throw new CliAccessError(parsed.message ||
391
391
  'This organization has reached its CLI API key limit.', {
392
392
  // Command-agnostic: this path is shared by `moda init` and
393
- // `moda provision`.
394
- guidance: 'Revoke unused "CLI - ..." keys in the dashboard (Settings → API Keys), ' +
395
- 'or reuse the existing key already saved in ~/.moda/config.json from a previous moda init / moda provision --save, then retry.',
393
+ // `moda provision`. Prefer asking an admin to raise the
394
+ // per-tenant cap; revoke/reuse remain valid escape hatches.
395
+ guidance: 'Ask your organization admin to raise the CLI key limit in the dashboard ' +
396
+ '(Settings → API Keys → CLI key limit), or revoke unused "CLI - ..." keys, ' +
397
+ 'or reuse the existing key already saved in ~/.moda/config.json from a previous ' +
398
+ 'moda init / moda provision --save, then retry.',
396
399
  });
397
400
  }
398
401
  throw new Error(`Failed to create API key (409): ${body}`);
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.2",
3
+ "version": "1.15.0",
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:32:23.266Z",
4
- "cli_version": "1.14.2",
3
+ "bundled_at": "2026-07-08T14:05:25.151Z",
4
+ "cli_version": "1.15.0",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-node-anthropic",