@moda-ai/cli 1.1.1 → 1.3.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 +745 -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 +40 -1
  17. package/dist/config.js +70 -3
  18. package/dist/doctor.d.ts +79 -0
  19. package/dist/doctor.js +1111 -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 +389 -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,233 @@
1
+ import type { CommandContext } from './command-context.js';
2
+ declare const SCHEMA_VERSION = "harness.v0.1";
3
+ export interface HarnessEvidence {
4
+ path: string;
5
+ reason: string;
6
+ }
7
+ export interface HarnessDetection {
8
+ confidence: number;
9
+ evidence: HarnessEvidence[];
10
+ }
11
+ export interface HarnessRepo {
12
+ root: string;
13
+ name: string;
14
+ packageManagers: string[];
15
+ languages: string[];
16
+ remoteHash?: string;
17
+ }
18
+ export interface HarnessScanMetadata {
19
+ createdAt: string;
20
+ scannerVersion: string;
21
+ mode: 'permissioned' | 'dry-run';
22
+ rootPaths: string[];
23
+ readPlan: HarnessScanReadPlan;
24
+ skipped: Array<{
25
+ path: string;
26
+ reason: string;
27
+ }>;
28
+ }
29
+ export interface HarnessScanReadPlan {
30
+ scope: 'broad' | 'narrow';
31
+ rootPaths: string[];
32
+ willRead: string[];
33
+ willSkip: string[];
34
+ skipsSecretFiles: boolean;
35
+ followsSymlinks: boolean;
36
+ uploadsSourceByDefault: boolean;
37
+ }
38
+ export interface HarnessTenantContext {
39
+ tenantId: string;
40
+ source: 'flag' | 'env_or_config' | 'scan_option';
41
+ }
42
+ export interface HarnessAgentFamily extends HarnessDetection {
43
+ id: string;
44
+ name: string;
45
+ description?: string;
46
+ runtimeAgentIds: string[];
47
+ sharedArtifactIds: string[];
48
+ }
49
+ export interface HarnessRuntimeAgent extends HarnessDetection {
50
+ id: string;
51
+ name: string;
52
+ kind: 'runtime_agent';
53
+ purpose?: string;
54
+ familyId?: string;
55
+ root: string;
56
+ entrypointIds: string[];
57
+ channelAdapterIds: string[];
58
+ artifactIds: string[];
59
+ identityNamespaceIds: string[];
60
+ deploymentIds: string[];
61
+ frameworkIds: string[];
62
+ modelProviderIds: string[];
63
+ }
64
+ export interface HarnessDeveloperAgentAdapter extends HarnessDetection {
65
+ id: string;
66
+ name: string;
67
+ kind: 'developer_agent_adapter';
68
+ sourcePath: string;
69
+ }
70
+ export interface HarnessChannelAdapter extends HarnessDetection {
71
+ id: string;
72
+ name: string;
73
+ kind: string;
74
+ sourcePath?: string;
75
+ }
76
+ export type HarnessArtifactType = 'entrypoint' | 'prompt' | 'tool' | 'skill' | 'eval' | 'retrieval_index' | 'memory' | 'guardrail' | 'model_config' | 'unknown';
77
+ export interface HarnessArtifact extends HarnessDetection {
78
+ id: string;
79
+ type: HarnessArtifactType;
80
+ name: string;
81
+ scope: 'agent' | 'shared' | 'global';
82
+ sourcePath?: string;
83
+ contentHash?: string;
84
+ ownedByAgentId?: string;
85
+ usedByAgentIds: string[];
86
+ }
87
+ export interface HarnessIdentityNamespace extends HarnessDetection {
88
+ id: string;
89
+ name: string;
90
+ kind: string;
91
+ canonicalId?: string;
92
+ sourcePath?: string;
93
+ }
94
+ export interface HarnessEnvironment extends HarnessDetection {
95
+ id: string;
96
+ name: string;
97
+ kind: string;
98
+ sourcePath?: string;
99
+ }
100
+ export interface HarnessAgentFramework extends HarnessDetection {
101
+ id: string;
102
+ name: string;
103
+ kind: string;
104
+ packageNames: string[];
105
+ runtimeAgentIds: string[];
106
+ }
107
+ export interface HarnessModelProvider extends HarnessDetection {
108
+ id: string;
109
+ name: string;
110
+ kind: string;
111
+ packageNames: string[];
112
+ runtimeAgentIds: string[];
113
+ envVars: string[];
114
+ modelHints: string[];
115
+ }
116
+ export interface HarnessDeployment extends HarnessDetection {
117
+ id: string;
118
+ name: string;
119
+ environmentId?: string;
120
+ sourcePath?: string;
121
+ }
122
+ export interface HarnessRelationship {
123
+ type: 'uses_artifact' | 'owns_artifact' | 'shares_artifact_with' | 'invoked_by_channel' | 'deployed_as' | 'runs_in_environment' | 'resolves_identity_to' | 'covered_by_eval' | 'emits_telemetry';
124
+ from: string;
125
+ to: string;
126
+ artifactId?: string;
127
+ evidence: HarnessEvidence[];
128
+ }
129
+ export interface HarnessUnknown {
130
+ id: string;
131
+ question: string;
132
+ candidateIds: string[];
133
+ evidence: HarnessEvidence[];
134
+ }
135
+ export interface HarnessGraph {
136
+ schemaVersion: typeof SCHEMA_VERSION;
137
+ harnessId: string;
138
+ tenant?: HarnessTenantContext;
139
+ repo: HarnessRepo;
140
+ scan: HarnessScanMetadata;
141
+ agentFamilies: HarnessAgentFamily[];
142
+ runtimeAgents: HarnessRuntimeAgent[];
143
+ developerAgentAdapters: HarnessDeveloperAgentAdapter[];
144
+ channelAdapters: HarnessChannelAdapter[];
145
+ artifacts: HarnessArtifact[];
146
+ identityNamespaces: HarnessIdentityNamespace[];
147
+ environments: HarnessEnvironment[];
148
+ agentFrameworks: HarnessAgentFramework[];
149
+ modelProviders: HarnessModelProvider[];
150
+ deployments: HarnessDeployment[];
151
+ relationships: HarnessRelationship[];
152
+ unknowns: HarnessUnknown[];
153
+ }
154
+ interface ScanOptions {
155
+ rootDir?: string;
156
+ dryRun?: boolean;
157
+ scannerVersion?: string;
158
+ tenantId?: string;
159
+ tenantSource?: HarnessTenantContext['source'];
160
+ pathWasExplicit?: boolean;
161
+ }
162
+ export interface HarnessSummary {
163
+ schemaVersion: string;
164
+ harnessId: string;
165
+ tenantId?: string;
166
+ runtimeAgentCount: number;
167
+ agentFamilyCount: number;
168
+ sharedArtifactCount: number;
169
+ channelAdapterCount: number;
170
+ identityNamespaceCount: number;
171
+ agentFrameworkCount: number;
172
+ modelProviderCount: number;
173
+ deploymentCount: number;
174
+ unknownCount: number;
175
+ }
176
+ interface HarnessSyncResponse {
177
+ tenantId: string;
178
+ harnessId: string;
179
+ harnessKey: string;
180
+ versionId: string;
181
+ graphHash: string;
182
+ changed: boolean;
183
+ dryRun: boolean;
184
+ reportHash?: string | null;
185
+ reportValidationStatus?: string | null;
186
+ counts: Record<string, number>;
187
+ }
188
+ interface HarnessSyncPlan {
189
+ endpoint: '/api/harnesses/sync';
190
+ resource: 'harness';
191
+ source: 'local_scan' | 'approved_report';
192
+ profile: string;
193
+ tenantId?: string;
194
+ rootPath: string;
195
+ sourceCommit?: string;
196
+ harnessId: string;
197
+ localGraphHash: string;
198
+ counts: Record<string, number>;
199
+ uploads: string[];
200
+ localWrites: string[];
201
+ privacy: string[];
202
+ }
203
+ export interface HarnessSyncState {
204
+ schemaVersion: 'sync_state.v0.1';
205
+ updatedAt: string;
206
+ resource: 'harness';
207
+ source: HarnessSyncPlan['source'];
208
+ profile: string;
209
+ tenantId?: string;
210
+ rootPath: string;
211
+ sourceCommit?: string;
212
+ harnessId: string;
213
+ localGraphHash: string;
214
+ report?: {
215
+ reportId: string;
216
+ reportHash: string;
217
+ validationStatus: string;
218
+ };
219
+ remote: HarnessSyncResponse;
220
+ summary: HarnessSummary;
221
+ uploads: string[];
222
+ privacy: string[];
223
+ written: string[];
224
+ }
225
+ export declare function runHarnessCommand(context: CommandContext): Promise<{
226
+ exitCode: number;
227
+ }>;
228
+ export declare function scanHarness(options?: ScanOptions): HarnessGraph;
229
+ export declare function summarizeHarness(graph: HarnessGraph): HarnessSummary;
230
+ export declare function readHarnessSyncState(rootDir: string): HarnessSyncState | undefined;
231
+ export declare function graphForSync(graph: HarnessGraph): HarnessGraph;
232
+ export {};
233
+ //# sourceMappingURL=harness.d.ts.map