@moda-ai/cli 1.1.0 → 1.2.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 (59) hide show
  1. package/README.md +36 -0
  2. package/dist/agent.d.ts +5 -0
  3. package/dist/agent.js +477 -0
  4. package/dist/analyst-tui.d.ts +81 -0
  5. package/dist/analyst-tui.js +314 -0
  6. package/dist/api-client.d.ts +4 -0
  7. package/dist/api-client.js +20 -3
  8. package/dist/auth.d.ts +22 -3
  9. package/dist/auth.js +230 -66
  10. package/dist/cli.d.ts +20 -3
  11. package/dist/cli.js +768 -93
  12. package/dist/command-context.d.ts +34 -0
  13. package/dist/command-context.js +38 -0
  14. package/dist/command-registry.d.ts +22 -0
  15. package/dist/command-registry.js +15 -0
  16. package/dist/config.d.ts +41 -2
  17. package/dist/config.js +73 -5
  18. package/dist/doctor.d.ts +79 -0
  19. package/dist/doctor.js +1102 -0
  20. package/dist/errors.d.ts +5 -0
  21. package/dist/errors.js +9 -0
  22. package/dist/harness-report.d.ts +138 -0
  23. package/dist/harness-report.js +1464 -0
  24. package/dist/harness.d.ts +233 -0
  25. package/dist/harness.js +3264 -0
  26. package/dist/init/index.d.ts +30 -1
  27. package/dist/init/index.js +383 -23
  28. package/dist/init/rules.d.ts +5 -1
  29. package/dist/init/rules.js +22 -16
  30. package/dist/init/sdk-guide.d.ts +3 -0
  31. package/dist/init/sdk-guide.js +397 -0
  32. package/dist/init/tenant.js +12 -3
  33. package/dist/keys.d.ts +47 -0
  34. package/dist/keys.js +136 -0
  35. package/dist/output.d.ts +118 -0
  36. package/dist/output.js +228 -0
  37. package/dist/production-intelligence.d.ts +134 -0
  38. package/dist/production-intelligence.js +1113 -0
  39. package/dist/profile-commands.d.ts +10 -0
  40. package/dist/profile-commands.js +252 -0
  41. package/dist/profiles.d.ts +90 -0
  42. package/dist/profiles.js +432 -0
  43. package/dist/prompts.d.ts +6 -0
  44. package/dist/prompts.js +368 -0
  45. package/dist/schemas.d.ts +4 -4
  46. package/dist/skills.d.ts +25 -0
  47. package/dist/skills.js +468 -0
  48. package/dist/sync.d.ts +5 -0
  49. package/dist/sync.js +27 -0
  50. package/dist/telemetry.d.ts +18 -0
  51. package/dist/telemetry.js +63 -0
  52. package/dist/tui.d.ts +40 -0
  53. package/dist/tui.js +387 -0
  54. package/dist/workspace.d.ts +12 -0
  55. package/dist/workspace.js +1294 -0
  56. package/hooks/moda-snapshot.sh +41 -0
  57. package/package.json +10 -7
  58. package/skills/moda-cli/SKILL.md +48 -4
  59. package/skills/integrate-moda/SKILL.md +0 -63
@@ -0,0 +1,5 @@
1
+ export declare class CliInputError extends Error {
2
+ readonly usage?: string | undefined;
3
+ constructor(message: string, usage?: string | undefined);
4
+ }
5
+ //# sourceMappingURL=errors.d.ts.map
package/dist/errors.js ADDED
@@ -0,0 +1,9 @@
1
+ export class CliInputError extends Error {
2
+ usage;
3
+ constructor(message, usage) {
4
+ super(message);
5
+ this.usage = usage;
6
+ this.name = 'CliInputError';
7
+ }
8
+ }
9
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1,138 @@
1
+ import type { HarnessGraph, HarnessScanReadPlan } from './harness.js';
2
+ export declare const HARNESS_REPORT_SCHEMA_VERSION = "harness_report.v0.1";
3
+ export declare const HARNESS_REPORT_VALIDATION_SCHEMA_VERSION = "harness_report_validation.v0.1";
4
+ export declare const HARNESS_REPORT_APPROVAL_SCHEMA_VERSION = "harness_report_approval.v0.1";
5
+ export declare const HARNESS_REPORT_PATH: string;
6
+ export declare const HARNESS_REPORT_MARKDOWN_PATH: string;
7
+ export declare const HARNESS_REPORT_VALIDATION_PATH: string;
8
+ export declare const HARNESS_REPORT_APPROVAL_PATH: string;
9
+ type HarnessReportClaimKind = 'runtime_agent' | 'agent_family' | 'developer_agent_adapter' | 'artifact' | 'channel_adapter' | 'identity_namespace' | 'environment' | 'agent_framework' | 'model_provider' | 'deployment' | 'relationship' | 'unknown';
10
+ export interface HarnessReportCitation {
11
+ id: string;
12
+ type: 'file' | 'generated_doc' | 'command_output' | 'production_evidence';
13
+ path?: string;
14
+ line?: number;
15
+ reason: string;
16
+ excerpt?: string;
17
+ }
18
+ export interface HarnessReportClaim {
19
+ id: string;
20
+ kind: HarnessReportClaimKind;
21
+ subjectId: string;
22
+ title: string;
23
+ summary: string;
24
+ confidence: number;
25
+ inference: 'direct' | 'inferred' | 'mixed';
26
+ citationIds: string[];
27
+ }
28
+ export interface HarnessReport {
29
+ schemaVersion: typeof HARNESS_REPORT_SCHEMA_VERSION;
30
+ reportId: string;
31
+ harnessId: string;
32
+ createdAt: string;
33
+ analyst: {
34
+ id: string;
35
+ adapter: 'claude' | 'codex' | 'cursor' | 'local-scan' | 'moda' | string;
36
+ mode: 'agent' | 'local';
37
+ version: string;
38
+ };
39
+ repo: HarnessGraph['repo'];
40
+ tenant?: HarnessGraph['tenant'];
41
+ source: {
42
+ graphSchemaVersion: string;
43
+ graphHash: string;
44
+ sourceCommit?: string;
45
+ readPlan: HarnessScanReadPlan;
46
+ deterministicInventory: boolean;
47
+ };
48
+ summary: HarnessReportSummary;
49
+ graph: HarnessGraph;
50
+ claims: HarnessReportClaim[];
51
+ citations: HarnessReportCitation[];
52
+ syncPlan: {
53
+ command: string;
54
+ dryRunCommand: string;
55
+ uploads: string[];
56
+ privacy: string[];
57
+ };
58
+ unknowns: Array<{
59
+ id: string;
60
+ question: string;
61
+ citationIds: string[];
62
+ }>;
63
+ }
64
+ export interface HarnessReportSummary {
65
+ runtimeAgentCount: number;
66
+ agentFamilyCount: number;
67
+ artifactCount: number;
68
+ sharedArtifactCount: number;
69
+ channelAdapterCount: number;
70
+ identityNamespaceCount: number;
71
+ environmentCount: number;
72
+ agentFrameworkCount: number;
73
+ modelProviderCount: number;
74
+ deploymentCount: number;
75
+ relationshipCount: number;
76
+ unknownCount: number;
77
+ }
78
+ export interface HarnessReportValidation {
79
+ schemaVersion: typeof HARNESS_REPORT_VALIDATION_SCHEMA_VERSION;
80
+ reportId: string;
81
+ reportHash: string;
82
+ status: 'pass' | 'fail';
83
+ checkedAt: string;
84
+ checks: Array<{
85
+ id: string;
86
+ status: 'pass' | 'fail' | 'warning';
87
+ message: string;
88
+ }>;
89
+ errors: string[];
90
+ warnings: string[];
91
+ }
92
+ export interface HarnessReportApproval {
93
+ schemaVersion: typeof HARNESS_REPORT_APPROVAL_SCHEMA_VERSION;
94
+ reportId: string;
95
+ reportHash: string;
96
+ approved: true;
97
+ approvedAt: string;
98
+ approvedBy: 'local-human' | '--yes';
99
+ reportPath: string;
100
+ }
101
+ export declare function createHarnessReport(options: {
102
+ graph: HarnessGraph;
103
+ rootDir: string;
104
+ sourceCommit?: string;
105
+ analystAdapter?: string;
106
+ }): HarnessReport;
107
+ export declare function validateHarnessReport(report: HarnessReport, rootDir: string): HarnessReportValidation;
108
+ export declare function approveHarnessReport(options: {
109
+ rootDir: string;
110
+ reportPath: string;
111
+ yes: boolean;
112
+ interactive: boolean;
113
+ }): Promise<{
114
+ report: HarnessReport;
115
+ validation: HarnessReportValidation;
116
+ approval: HarnessReportApproval;
117
+ }>;
118
+ export declare function loadHarnessReportForSync(rootDir: string, reportPath: string): {
119
+ report: HarnessReport;
120
+ validation: HarnessReportValidation;
121
+ approval: HarnessReportApproval | null;
122
+ approved: boolean;
123
+ };
124
+ export declare function readHarnessReport(reportPath: string): HarnessReport;
125
+ export declare function normalizeHarnessReport(value: unknown): HarnessReport;
126
+ export declare function resolveHarnessReportPath(rootDir: string, value?: string): string;
127
+ export declare function writeHarnessReportArtifacts(options: {
128
+ rootDir: string;
129
+ report: HarnessReport;
130
+ validation: HarnessReportValidation;
131
+ markdown?: boolean;
132
+ }): string[];
133
+ export declare function renderHarnessReportMarkdown(report: HarnessReport, validation: HarnessReportValidation): string;
134
+ export declare function hashHarnessReport(report: HarnessReport): string;
135
+ export declare function hashStableJson(value: unknown): string;
136
+ export declare function graphForReport(graph: HarnessGraph): HarnessGraph;
137
+ export {};
138
+ //# sourceMappingURL=harness-report.d.ts.map