@moda-ai/cli 1.14.3 → 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.
package/dist/agent-schemas.js
CHANGED
|
@@ -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 = {
|
package/dist/output.d.ts
CHANGED
|
@@ -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
|
-
|
|
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