@moda-ai/cli 1.22.1 → 1.23.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.
Files changed (118) hide show
  1. package/dist/cli-c4se7a5d.js +762 -0
  2. package/dist/cli-mnqa4rp6.js +1563 -0
  3. package/dist/cli-stmjdgvy.js +2842 -0
  4. package/dist/cli-y55bgg14.js +6980 -0
  5. package/dist/cli-ysegdrm5.js +286 -0
  6. package/dist/cli.js +4779 -1159
  7. package/dist/harness-github-actions-7t3cncnt.js +95 -0
  8. package/dist/index-4ser01zr.js +2769 -0
  9. package/dist/provision-hm1ppwj6.js +74 -0
  10. package/package.json +3 -2
  11. package/skills/integration/index.json +2 -2
  12. package/dist/agent-schemas.d.ts +0 -3
  13. package/dist/agent-schemas.js +0 -358
  14. package/dist/agent.d.ts +0 -5
  15. package/dist/agent.js +0 -477
  16. package/dist/analyst-tui.d.ts +0 -81
  17. package/dist/analyst-tui.js +0 -314
  18. package/dist/api-client.d.ts +0 -46
  19. package/dist/api-client.js +0 -120
  20. package/dist/ask-stream.d.ts +0 -146
  21. package/dist/ask-stream.js +0 -473
  22. package/dist/auth-storage.d.ts +0 -35
  23. package/dist/auth-storage.js +0 -159
  24. package/dist/auth.d.ts +0 -50
  25. package/dist/auth.js +0 -694
  26. package/dist/cli-session.d.ts +0 -26
  27. package/dist/cli-session.js +0 -169
  28. package/dist/cli.d.ts +0 -44
  29. package/dist/command-context.d.ts +0 -62
  30. package/dist/command-context.js +0 -57
  31. package/dist/command-registry.d.ts +0 -22
  32. package/dist/command-registry.js +0 -15
  33. package/dist/config.d.ts +0 -60
  34. package/dist/config.js +0 -110
  35. package/dist/doctor.d.ts +0 -79
  36. package/dist/doctor.js +0 -1182
  37. package/dist/errors.d.ts +0 -50
  38. package/dist/errors.js +0 -64
  39. package/dist/exit-funnel.d.ts +0 -14
  40. package/dist/exit-funnel.js +0 -53
  41. package/dist/harness-artifact-bodies.d.ts +0 -28
  42. package/dist/harness-artifact-bodies.js +0 -276
  43. package/dist/harness-candidates.d.ts +0 -77
  44. package/dist/harness-candidates.js +0 -482
  45. package/dist/harness-remote.d.ts +0 -135
  46. package/dist/harness-remote.js +0 -540
  47. package/dist/harness-report.d.ts +0 -145
  48. package/dist/harness-report.js +0 -1579
  49. package/dist/harness-sync-limits.d.ts +0 -8
  50. package/dist/harness-sync-limits.js +0 -21
  51. package/dist/harness.d.ts +0 -463
  52. package/dist/harness.js +0 -4009
  53. package/dist/init/index.d.ts +0 -78
  54. package/dist/init/index.js +0 -1442
  55. package/dist/init/mcp.d.ts +0 -2
  56. package/dist/init/mcp.js +0 -27
  57. package/dist/init/progress-board.d.ts +0 -80
  58. package/dist/init/progress-board.js +0 -225
  59. package/dist/init/rules.d.ts +0 -6
  60. package/dist/init/rules.js +0 -171
  61. package/dist/init/sdk-catalog.d.ts +0 -10
  62. package/dist/init/sdk-catalog.js +0 -80
  63. package/dist/init/sdk-guide.d.ts +0 -19
  64. package/dist/init/sdk-guide.js +0 -185
  65. package/dist/init/sdk-integration.d.ts +0 -53
  66. package/dist/init/sdk-integration.js +0 -835
  67. package/dist/init/sdk-protocol.d.ts +0 -135
  68. package/dist/init/sdk-protocol.js +0 -152
  69. package/dist/init/sdk-verification.d.ts +0 -27
  70. package/dist/init/sdk-verification.js +0 -123
  71. package/dist/init/tenant.d.ts +0 -67
  72. package/dist/init/tenant.js +0 -421
  73. package/dist/intelligence-schema.d.ts +0 -349
  74. package/dist/intelligence-schema.js +0 -174
  75. package/dist/keys.d.ts +0 -47
  76. package/dist/keys.js +0 -136
  77. package/dist/manifest.d.ts +0 -5
  78. package/dist/manifest.js +0 -114
  79. package/dist/markdown-terminal.d.ts +0 -49
  80. package/dist/markdown-terminal.js +0 -212
  81. package/dist/output.d.ts +0 -191
  82. package/dist/output.js +0 -624
  83. package/dist/production-intelligence.d.ts +0 -175
  84. package/dist/production-intelligence.js +0 -1430
  85. package/dist/profile-commands.d.ts +0 -10
  86. package/dist/profile-commands.js +0 -342
  87. package/dist/profiles.d.ts +0 -112
  88. package/dist/profiles.js +0 -573
  89. package/dist/prompts-ab.d.ts +0 -71
  90. package/dist/prompts-ab.js +0 -313
  91. package/dist/prompts-propose.d.ts +0 -15
  92. package/dist/prompts-propose.js +0 -212
  93. package/dist/prompts.d.ts +0 -58
  94. package/dist/prompts.js +0 -418
  95. package/dist/provision.d.ts +0 -28
  96. package/dist/provision.js +0 -104
  97. package/dist/redact.d.ts +0 -2
  98. package/dist/redact.js +0 -90
  99. package/dist/schemas.d.ts +0 -225
  100. package/dist/schemas.js +0 -126
  101. package/dist/skills-bundled.d.ts +0 -35
  102. package/dist/skills-bundled.js +0 -157
  103. package/dist/skills-manifest.d.ts +0 -33
  104. package/dist/skills-manifest.js +0 -244
  105. package/dist/skills.d.ts +0 -57
  106. package/dist/skills.js +0 -783
  107. package/dist/sync.d.ts +0 -5
  108. package/dist/sync.js +0 -36
  109. package/dist/telemetry.d.ts +0 -56
  110. package/dist/telemetry.js +0 -167
  111. package/dist/transforms.d.ts +0 -25
  112. package/dist/transforms.js +0 -102
  113. package/dist/tui.d.ts +0 -48
  114. package/dist/tui.js +0 -393
  115. package/dist/update-check.d.ts +0 -31
  116. package/dist/update-check.js +0 -141
  117. package/dist/workspace.d.ts +0 -12
  118. package/dist/workspace.js +0 -1294
@@ -1,175 +0,0 @@
1
- import { type AskStreamOutcome } from './ask-stream.js';
2
- import type { CommandContext } from './command-context.js';
3
- import type { AgentConfidence } from './output.js';
4
- import { type ModaIntelligenceV1 } from './intelligence-schema.js';
5
- declare const INVESTIGATION_SCHEMA_VERSION = "production_investigation.v0.1";
6
- declare const OVERVIEW_SCHEMA_VERSION = "production_overview.v0.1";
7
- declare const ASK_SCHEMA_VERSION = "production_ask.v0.1";
8
- type Severity = 'critical' | 'high' | 'medium' | 'low' | 'info';
9
- type FindingKind = 'tool_failure' | 'frustration' | 'prompt_regression' | 'skill_gap' | 'insufficient_data';
10
- export interface ProductionEvidenceRef {
11
- id: string;
12
- kind: 'data_api' | 'tool_failure' | 'frustration' | 'harness' | 'ask';
13
- label: string;
14
- endpoint?: string;
15
- conversationId?: string;
16
- runId?: string;
17
- detectionId?: string;
18
- toolName?: string;
19
- path?: string;
20
- line?: number;
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;
28
- }
29
- export interface LikelyLocation {
30
- kind: 'tool' | 'prompt' | 'skill' | 'entrypoint' | 'harness' | 'unknown';
31
- path?: string;
32
- label: string;
33
- confidence: AgentConfidence;
34
- reason: string;
35
- }
36
- export interface ProductionAction {
37
- id: string;
38
- title: string;
39
- rationale: string;
40
- command: string;
41
- mutability: 'read' | 'write' | 'sync' | 'unknown';
42
- requiresApproval: boolean;
43
- }
44
- export interface ProductionFinding {
45
- id: string;
46
- kind: FindingKind;
47
- title: string;
48
- severity: Severity;
49
- confidence: AgentConfidence;
50
- impactScore: number;
51
- rankReason: string;
52
- summary: string;
53
- evidenceRefIds: string[];
54
- likelyLocations: LikelyLocation[];
55
- recommendedActions: ProductionAction[];
56
- }
57
- export interface ProductionInvestigation {
58
- schemaVersion: typeof INVESTIGATION_SCHEMA_VERSION;
59
- generatedAt: string;
60
- daysBack: number;
61
- scope: {
62
- conversationId?: string;
63
- toolName?: string;
64
- question?: string;
65
- };
66
- summary: {
67
- text: string;
68
- confidence: AgentConfidence;
69
- };
70
- findings: ProductionFinding[];
71
- evidenceRefs: ProductionEvidenceRef[];
72
- nextCommands: string[];
73
- warnings: string[];
74
- sourceStatus: Record<string, 'ok' | 'unavailable'>;
75
- }
76
- export interface ProductionOverviewBriefing {
77
- schemaVersion: typeof OVERVIEW_SCHEMA_VERSION;
78
- generatedAt: string;
79
- daysBack: number;
80
- status: 'healthy' | 'attention' | 'quiet' | 'unknown';
81
- dataFlow: {
82
- status: 'flowing' | 'quiet' | 'unknown';
83
- conversations: number;
84
- lastEvent?: {
85
- summary: string;
86
- timestamp?: string;
87
- conversationId?: string;
88
- };
89
- };
90
- harnessSync: SyncBrief;
91
- promptSync: SyncBrief;
92
- skillSync: SyncBrief;
93
- metrics: Record<string, unknown>;
94
- topFinding: ProductionFinding | null;
95
- evidenceRefs: ProductionEvidenceRef[];
96
- nextCommand: string;
97
- rawOverview: unknown;
98
- }
99
- interface SyncBrief {
100
- status: 'synced' | 'present' | 'missing' | 'unknown';
101
- summary: string;
102
- path?: string;
103
- }
104
- export interface ProductionAskResult {
105
- schemaVersion: typeof ASK_SCHEMA_VERSION;
106
- generatedAt: string;
107
- source: 'cloud' | 'local_fallback';
108
- /**
109
- * True when the answer did NOT come from Moda Cloud intelligence and was
110
- * instead synthesized locally (cloud unreachable / unavailable / empty). This
111
- * is the canonical in-payload signal of a degraded answer, mirrored by exit
112
- * code 3 and envelope status `degraded`. Always `false` on the cloud path.
113
- */
114
- degraded: boolean;
115
- question: string;
116
- answer: string;
117
- confidence: AgentConfidence;
118
- evidenceRefs: ProductionEvidenceRef[];
119
- findings: ProductionFinding[];
120
- nextCommands: string[];
121
- warnings: string[];
122
- /** Why the cloud path was not used (set only when `degraded` is true). */
123
- fallbackReason?: string;
124
- /**
125
- * The canonical `moda.intelligence.v1` projection of this answer (MODA-388).
126
- * This is what `moda ask --json`/`--agent` surface as the agent envelope's
127
- * `data`, so every surface reads one versioned, snake_case payload (carrying
128
- * per-evidence `grounding`/`anchor` and per-claim grounding verdicts). On the
129
- * cloud path it is taken from `response.intelligence` when present, else
130
- * synthesized from the legacy snake_case fields for back-compat.
131
- */
132
- intelligence: ModaIntelligenceV1;
133
- }
134
- export declare function runProductionCommand(context: CommandContext): Promise<{
135
- exitCode: number;
136
- }>;
137
- export declare function loadOverviewBriefing(options: {
138
- daysBack: number;
139
- cwd: string;
140
- }): Promise<ProductionOverviewBriefing>;
141
- export declare function investigateProduction(options: {
142
- daysBack: number;
143
- cwd: string;
144
- conversationId?: string;
145
- toolName?: string;
146
- question?: string;
147
- failureOnly?: boolean;
148
- }): Promise<ProductionInvestigation>;
149
- export declare function askModa(options: {
150
- question: string;
151
- daysBack: number;
152
- cwd: string;
153
- profile?: string;
154
- /** Invoked if the POST hits a network fault and the one retry is used. */
155
- onNetworkRetry?: () => void;
156
- }): Promise<ProductionAskResult>;
157
- /**
158
- * Whether `moda ask` should use the live SSE endpoint: only for a human
159
- * watching a TTY, and only when not explicitly opted out via `--no-stream`
160
- * (or `--stream=false`). `--json`/`--agent`/piped/quiet callers always take
161
- * the buffered path so machine-readable contracts are untouched.
162
- */
163
- export declare function shouldStreamAsk(context: Pick<CommandContext, 'outputMode' | 'quiet' | 'flags'>, isTTY?: boolean): boolean;
164
- /**
165
- * Project a completed stream into the same `ProductionAskResult` the buffered
166
- * path produces, so the final human render is identical. A terminal `error`
167
- * event mirrors the buffered error contract (a generic answer with `unknown`
168
- * confidence — the buffered endpoint also returns HTTP 200 in that case).
169
- */
170
- export declare function askResultFromStreamOutcome(outcome: AskStreamOutcome, question: string): ProductionAskResult;
171
- export declare function renderAskHuman(result: ProductionAskResult, options?: {
172
- color?: boolean;
173
- }): string;
174
- export {};
175
- //# sourceMappingURL=production-intelligence.d.ts.map