@llm-dev-ops/agentics-cli 1.0.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/README.md +1 -0
- package/dist/adapters/base-adapter.d.ts +73 -0
- package/dist/adapters/base-adapter.d.ts.map +1 -0
- package/dist/adapters/base-adapter.js +311 -0
- package/dist/adapters/base-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +7 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/audit/audit-trail.d.ts +68 -0
- package/dist/audit/audit-trail.d.ts.map +1 -0
- package/dist/audit/audit-trail.js +172 -0
- package/dist/audit/audit-trail.js.map +1 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +265 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/deploy.d.ts +23 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +97 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/diligence.d.ts +23 -0
- package/dist/commands/diligence.d.ts.map +1 -0
- package/dist/commands/diligence.js +97 -0
- package/dist/commands/diligence.js.map +1 -0
- package/dist/commands/export.d.ts +23 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +99 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/index.d.ts +20 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +13 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/inspect.d.ts +25 -0
- package/dist/commands/inspect.d.ts.map +1 -0
- package/dist/commands/inspect.js +101 -0
- package/dist/commands/inspect.js.map +1 -0
- package/dist/commands/plan.d.ts +23 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +114 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/quantify.d.ts +26 -0
- package/dist/commands/quantify.d.ts.map +1 -0
- package/dist/commands/quantify.js +102 -0
- package/dist/commands/quantify.js.map +1 -0
- package/dist/commands/simulate.d.ts +23 -0
- package/dist/commands/simulate.d.ts.map +1 -0
- package/dist/commands/simulate.js +97 -0
- package/dist/commands/simulate.js.map +1 -0
- package/dist/config/endpoints.d.ts +16 -0
- package/dist/config/endpoints.d.ts.map +1 -0
- package/dist/config/endpoints.js +73 -0
- package/dist/config/endpoints.js.map +1 -0
- package/dist/errors/index.d.ts +120 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +281 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/modules/artifact-handoff.d.ts +57 -0
- package/dist/modules/artifact-handoff.d.ts.map +1 -0
- package/dist/modules/artifact-handoff.js +85 -0
- package/dist/modules/artifact-handoff.js.map +1 -0
- package/dist/modules/command-parser.d.ts +28 -0
- package/dist/modules/command-parser.d.ts.map +1 -0
- package/dist/modules/command-parser.js +176 -0
- package/dist/modules/command-parser.js.map +1 -0
- package/dist/modules/index.d.ts +14 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +10 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/orchestration-engine.d.ts +43 -0
- package/dist/modules/orchestration-engine.d.ts.map +1 -0
- package/dist/modules/orchestration-engine.js +159 -0
- package/dist/modules/orchestration-engine.js.map +1 -0
- package/dist/modules/output-renderer.d.ts +51 -0
- package/dist/modules/output-renderer.d.ts.map +1 -0
- package/dist/modules/output-renderer.js +193 -0
- package/dist/modules/output-renderer.js.map +1 -0
- package/dist/types/index.d.ts +223 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +33 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-trail.js","sourceRoot":"","sources":["../../src/audit/audit-trail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,KAAK,MAAM,M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,CAAC;IACH,CAAC;CACF;AAED,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,UAAU,gBAAgB;IAC9B,OAAO,IAAI,UAAU,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAiC;IACjE,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Agentics CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* SPARC Architecture Reference: Main CLI Entry
|
|
6
|
+
*
|
|
7
|
+
* PURPOSE: Parse arguments, dispatch to commands, render output
|
|
8
|
+
*
|
|
9
|
+
* FORBIDDEN:
|
|
10
|
+
* - Business Logic (NO data interpretation)
|
|
11
|
+
* - State Storage (NO caching)
|
|
12
|
+
* - Direct API Calls (delegate to adapters)
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Agentics CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* SPARC Architecture Reference: Main CLI Entry
|
|
6
|
+
*
|
|
7
|
+
* PURPOSE: Parse arguments, dispatch to commands, render output
|
|
8
|
+
*
|
|
9
|
+
* FORBIDDEN:
|
|
10
|
+
* - Business Logic (NO data interpretation)
|
|
11
|
+
* - State Storage (NO caching)
|
|
12
|
+
* - Direct API Calls (delegate to adapters)
|
|
13
|
+
*/
|
|
14
|
+
import { createCommandParser, SUPPORTED_COMMANDS } from '../modules/command-parser.js';
|
|
15
|
+
import { createOutputRenderer } from '../modules/output-renderer.js';
|
|
16
|
+
import { CLIError, errorHandler } from '../errors/index.js';
|
|
17
|
+
import { EXIT_CODES } from '../types/index.js';
|
|
18
|
+
// Import command executors
|
|
19
|
+
import { executePlanCommand } from '../commands/plan.js';
|
|
20
|
+
import { executeSimulateCommand } from '../commands/simulate.js';
|
|
21
|
+
import { executeInspectCommand } from '../commands/inspect.js';
|
|
22
|
+
import { executeQuantifyCommand } from '../commands/quantify.js';
|
|
23
|
+
import { executeDeployCommand } from '../commands/deploy.js';
|
|
24
|
+
import { executeExportCommand } from '../commands/export.js';
|
|
25
|
+
import { executeDiligenceCommand } from '../commands/diligence.js';
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// CLI Version
|
|
28
|
+
// ============================================================================
|
|
29
|
+
const VERSION = '1.0.0';
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Main CLI Function
|
|
32
|
+
// ============================================================================
|
|
33
|
+
async function main() {
|
|
34
|
+
const args = process.argv.slice(2);
|
|
35
|
+
const parser = createCommandParser();
|
|
36
|
+
const renderer = createOutputRenderer();
|
|
37
|
+
// Parse command line arguments
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = parser.parse(args);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
if (error instanceof CLIError) {
|
|
44
|
+
const formatted = renderer.renderError(error.toErrorInfo(), {
|
|
45
|
+
format: 'text',
|
|
46
|
+
pretty: true,
|
|
47
|
+
});
|
|
48
|
+
console.error(formatted);
|
|
49
|
+
process.exit(error.exitCode);
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
// Extract common options
|
|
54
|
+
const options = {
|
|
55
|
+
timeout: parsed.options['timeout'] ? parseInt(parsed.options['timeout'], 10) : undefined,
|
|
56
|
+
trace_id: parsed.options['trace-id'] ?? crypto.randomUUID(),
|
|
57
|
+
format: parsed.options['format'] ?? 'json',
|
|
58
|
+
verbose: parsed.flags['verbose'] ?? false,
|
|
59
|
+
};
|
|
60
|
+
// Handle built-in commands
|
|
61
|
+
if (parsed.command === 'version' || parsed.flags['version']) {
|
|
62
|
+
console.log(VERSION);
|
|
63
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
64
|
+
}
|
|
65
|
+
if (parsed.command === 'help' || parsed.flags['help']) {
|
|
66
|
+
printHelp();
|
|
67
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
68
|
+
}
|
|
69
|
+
// Dispatch to command handlers
|
|
70
|
+
try {
|
|
71
|
+
let result;
|
|
72
|
+
switch (parsed.command) {
|
|
73
|
+
case 'plan':
|
|
74
|
+
result = await executePlanCommand({
|
|
75
|
+
manifestQuery: parsed.positionalArgs[0] ?? '',
|
|
76
|
+
params: parsed.options['params'] ? JSON.parse(parsed.options['params']) : undefined,
|
|
77
|
+
}, options);
|
|
78
|
+
break;
|
|
79
|
+
case 'simulate':
|
|
80
|
+
result = await executeSimulateCommand({
|
|
81
|
+
planRef: JSON.parse(parsed.positionalArgs[0] ?? '{}'),
|
|
82
|
+
config: parsed.options['config'] ? JSON.parse(parsed.options['config']) : undefined,
|
|
83
|
+
iterations: parsed.options['iterations'] ? parseInt(parsed.options['iterations'], 10) : undefined,
|
|
84
|
+
}, options);
|
|
85
|
+
break;
|
|
86
|
+
case 'inspect':
|
|
87
|
+
result = await executeInspectCommand({
|
|
88
|
+
simRef: JSON.parse(parsed.positionalArgs[0] ?? '{}'),
|
|
89
|
+
outputType: (parsed.options['output-type'] ?? 'summary'),
|
|
90
|
+
}, options);
|
|
91
|
+
break;
|
|
92
|
+
case 'quantify':
|
|
93
|
+
result = await executeQuantifyCommand({
|
|
94
|
+
simRef: JSON.parse(parsed.positionalArgs[0] ?? '{}'),
|
|
95
|
+
reportType: (parsed.options['report-type'] ?? 'cfo-grade'),
|
|
96
|
+
params: parsed.options['params'] ? JSON.parse(parsed.options['params']) : undefined,
|
|
97
|
+
}, options);
|
|
98
|
+
break;
|
|
99
|
+
case 'deploy':
|
|
100
|
+
result = await executeDeployCommand({
|
|
101
|
+
simRef: JSON.parse(parsed.positionalArgs[0] ?? '{}'),
|
|
102
|
+
spec: parsed.options['spec'] ? JSON.parse(parsed.options['spec']) : undefined,
|
|
103
|
+
environment: parsed.options['environment'],
|
|
104
|
+
}, options);
|
|
105
|
+
break;
|
|
106
|
+
case 'export':
|
|
107
|
+
result = await executeExportCommand({
|
|
108
|
+
intentRef: JSON.parse(parsed.positionalArgs[0] ?? '{}'),
|
|
109
|
+
format: (parsed.options['export-format'] ?? 'terraform'),
|
|
110
|
+
outputPath: parsed.options['output'],
|
|
111
|
+
}, options);
|
|
112
|
+
break;
|
|
113
|
+
case 'diligence':
|
|
114
|
+
result = await executeDiligenceCommand({
|
|
115
|
+
refs: JSON.parse(parsed.positionalArgs[0] ?? '[]'),
|
|
116
|
+
frameworks: (parsed.options['frameworks'] ?? 'SOC2').split(','),
|
|
117
|
+
requirements: parsed.options['requirements'] ? JSON.parse(parsed.options['requirements']) : undefined,
|
|
118
|
+
}, options);
|
|
119
|
+
break;
|
|
120
|
+
default:
|
|
121
|
+
console.error(`Unknown command: ${parsed.command}`);
|
|
122
|
+
console.error(`Supported commands: ${SUPPORTED_COMMANDS.join(', ')}`);
|
|
123
|
+
process.exit(EXIT_CODES.USAGE_ERROR);
|
|
124
|
+
}
|
|
125
|
+
// Output result
|
|
126
|
+
const output = renderer.renderReference(result.reference, {
|
|
127
|
+
format: options.format ?? 'json',
|
|
128
|
+
pretty: parsed.flags['pretty'] ?? true,
|
|
129
|
+
});
|
|
130
|
+
console.log(output);
|
|
131
|
+
// Verbose timing output
|
|
132
|
+
if (options.verbose) {
|
|
133
|
+
console.error(`Completed in ${result.timing}ms`);
|
|
134
|
+
}
|
|
135
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
// Handle errors
|
|
139
|
+
const errorInfo = errorHandler.handle(error instanceof Error ? error : new Error(String(error)), { command: parsed.command, correlationId: options.trace_id });
|
|
140
|
+
const formatted = renderer.renderError(errorInfo, {
|
|
141
|
+
format: options.format ?? 'text',
|
|
142
|
+
pretty: true,
|
|
143
|
+
includeStack: options.verbose,
|
|
144
|
+
});
|
|
145
|
+
console.error(formatted);
|
|
146
|
+
// Exit with appropriate code
|
|
147
|
+
if (error instanceof CLIError) {
|
|
148
|
+
process.exit(error.exitCode);
|
|
149
|
+
}
|
|
150
|
+
process.exit(EXIT_CODES.GENERAL_ERROR);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// ============================================================================
|
|
154
|
+
// Help Output
|
|
155
|
+
// ============================================================================
|
|
156
|
+
function printHelp() {
|
|
157
|
+
console.log(`
|
|
158
|
+
agentics - CLI for the Agentics Platform
|
|
159
|
+
|
|
160
|
+
USAGE:
|
|
161
|
+
agentics <command> [options] [arguments]
|
|
162
|
+
|
|
163
|
+
WORKFLOW:
|
|
164
|
+
The recommended end-to-end workflow follows these steps:
|
|
165
|
+
|
|
166
|
+
plan → simulate → inspect → quantify → deploy → export
|
|
167
|
+
|
|
168
|
+
1. plan - Create a simulation plan from org manifest
|
|
169
|
+
2. simulate - Execute simulation via agentics-simulation-runner
|
|
170
|
+
3. inspect - Retrieve deterministic outputs from simulation-engine
|
|
171
|
+
4. quantify - Generate CFO-grade ROI analysis (optional)
|
|
172
|
+
5. deploy - Resolve deployment intent from simulation
|
|
173
|
+
6. export - Generate deployment artifacts (terraform, k8s, etc.)
|
|
174
|
+
|
|
175
|
+
COMMANDS:
|
|
176
|
+
plan Create a simulation plan from manifest
|
|
177
|
+
Uses: agentics-simulation-planner
|
|
178
|
+
simulate Execute a simulation from a plan
|
|
179
|
+
Uses: agentics-simulation-runner → agentics-simulation-engine
|
|
180
|
+
inspect Retrieve simulation outputs and artifacts
|
|
181
|
+
Uses: agentics-simulation-engine
|
|
182
|
+
quantify Generate ROI/financial impact analysis
|
|
183
|
+
Uses: enterprise-roi-engine
|
|
184
|
+
deploy Resolve deployment intent from simulation
|
|
185
|
+
Uses: agentics-deployment-intent
|
|
186
|
+
export Generate deployment artifacts
|
|
187
|
+
Uses: agentics-deployment-exporters
|
|
188
|
+
diligence Package compliance artifacts
|
|
189
|
+
Uses: diligence-artifacts
|
|
190
|
+
version Show version information
|
|
191
|
+
help Show this help message
|
|
192
|
+
|
|
193
|
+
GLOBAL OPTIONS:
|
|
194
|
+
--timeout <ms> Request timeout in milliseconds
|
|
195
|
+
--trace-id <id> Correlation ID for tracing
|
|
196
|
+
--format <fmt> Output format: json, yaml, table, text, csv
|
|
197
|
+
--verbose, -v Enable verbose output
|
|
198
|
+
--pretty Pretty-print output
|
|
199
|
+
--help, -h Show help
|
|
200
|
+
|
|
201
|
+
COMMAND OPTIONS:
|
|
202
|
+
plan:
|
|
203
|
+
--params <json> Parameters for plan creation
|
|
204
|
+
|
|
205
|
+
simulate:
|
|
206
|
+
--config <json> Runtime configuration
|
|
207
|
+
--iterations <n> Number of iterations (default: 1)
|
|
208
|
+
|
|
209
|
+
inspect:
|
|
210
|
+
--output-type <type> Output type: metrics, logs, state, events, summary, full
|
|
211
|
+
(default: summary)
|
|
212
|
+
|
|
213
|
+
quantify:
|
|
214
|
+
--report-type <type> Report type: executive-summary, detailed-analysis,
|
|
215
|
+
cfo-grade, custom (default: cfo-grade)
|
|
216
|
+
--params <json> Additional parameters for ROI calculation
|
|
217
|
+
|
|
218
|
+
deploy:
|
|
219
|
+
--spec <json> Intent specification
|
|
220
|
+
--environment <env> Target environment
|
|
221
|
+
|
|
222
|
+
export:
|
|
223
|
+
--export-format <fmt> Format: terraform, kubernetes, cloudformation,
|
|
224
|
+
pulumi, ansible, custom (default: terraform)
|
|
225
|
+
--output <path> Output path for artifacts
|
|
226
|
+
|
|
227
|
+
diligence:
|
|
228
|
+
--frameworks <list> Comma-separated: SOC2, HIPAA, GDPR, PCI-DSS, custom
|
|
229
|
+
--requirements <json> Custom requirements
|
|
230
|
+
|
|
231
|
+
EXAMPLES:
|
|
232
|
+
# Complete workflow example
|
|
233
|
+
agentics plan "production-deployment"
|
|
234
|
+
agentics simulate '{"id":"plan-123",...}' --iterations 10
|
|
235
|
+
agentics inspect '{"id":"sim-456",...}' --output-type metrics
|
|
236
|
+
agentics quantify '{"id":"sim-456",...}' --report-type cfo-grade
|
|
237
|
+
agentics deploy '{"id":"sim-456",...}' --environment staging
|
|
238
|
+
agentics export '{"id":"intent-789",...}' --export-format terraform
|
|
239
|
+
agentics diligence '[{"id":"ref-1"},...]' --frameworks SOC2,HIPAA
|
|
240
|
+
|
|
241
|
+
ENVIRONMENT VARIABLES:
|
|
242
|
+
AGENTICS_MANIFESTS_URL Override manifests service URL
|
|
243
|
+
AGENTICS_PLANNER_URL Override planner service URL
|
|
244
|
+
AGENTICS_RUNNER_URL Override runner service URL
|
|
245
|
+
AGENTICS_SIMULATION_ENGINE_URL Override simulation engine URL
|
|
246
|
+
ENTERPRISE_ROI_ENGINE_URL Override ROI engine URL
|
|
247
|
+
AGENTICS_INTENT_URL Override intent service URL
|
|
248
|
+
AGENTICS_EXPORTERS_URL Override exporters service URL
|
|
249
|
+
DILIGENCE_URL Override diligence service URL
|
|
250
|
+
|
|
251
|
+
PLATFORM UI:
|
|
252
|
+
For API key management and interactive workflows, visit:
|
|
253
|
+
https://platform.agentics.org
|
|
254
|
+
|
|
255
|
+
For more information, visit: https://docs.agentics.org/cli
|
|
256
|
+
`);
|
|
257
|
+
}
|
|
258
|
+
// ============================================================================
|
|
259
|
+
// Entry Point
|
|
260
|
+
// ============================================================================
|
|
261
|
+
main().catch((error) => {
|
|
262
|
+
console.error('Fatal error:', error);
|
|
263
|
+
process.exit(EXIT_CODES.INTERNAL_CLI_ERROR);
|
|
264
|
+
});
|
|
265
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,mBAAmB,EAAE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O,CAAC,QAAQ,EAAE,CAC7D,CAAC;QAEF,MAAM,SAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE;YAChD,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,MAAM;YAChC,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,OAAO,CAAC,OAAO;SAC9B,CAAC,CAAC;QACH,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEzB,6BAA6B;QAC7B,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGb,CAAC,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy Command
|
|
3
|
+
*
|
|
4
|
+
* SPARC Pseudocode Reference: §2.3
|
|
5
|
+
*
|
|
6
|
+
* FLOW:
|
|
7
|
+
* 1. Parse arguments → CommandObject
|
|
8
|
+
* 2. Resolve intent via agentics-deployment-intent
|
|
9
|
+
* 3. Record audit entry
|
|
10
|
+
* 4. Return IntentReference
|
|
11
|
+
*/
|
|
12
|
+
import type { CommandOptions, IntentReference, SimulationReference } from '../types/index.js';
|
|
13
|
+
export interface DeployCommandInput {
|
|
14
|
+
simRef: SimulationReference;
|
|
15
|
+
spec?: Record<string, unknown>;
|
|
16
|
+
environment?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DeployCommandResult {
|
|
19
|
+
reference: IntentReference;
|
|
20
|
+
timing: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function executeDeployCommand(input: DeployCommandInput, options: CommandOptions): Promise<DeployCommandResult>;
|
|
23
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAe3B,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAmF9B"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy Command
|
|
3
|
+
*
|
|
4
|
+
* SPARC Pseudocode Reference: §2.3
|
|
5
|
+
*
|
|
6
|
+
* FLOW:
|
|
7
|
+
* 1. Parse arguments → CommandObject
|
|
8
|
+
* 2. Resolve intent via agentics-deployment-intent
|
|
9
|
+
* 3. Record audit entry
|
|
10
|
+
* 4. Return IntentReference
|
|
11
|
+
*/
|
|
12
|
+
import { IntentAdapter } from '../adapters/base-adapter.js';
|
|
13
|
+
import { createOrchestrationEngine, } from '../modules/orchestration-engine.js';
|
|
14
|
+
import { createArtifactHandoff } from '../modules/artifact-handoff.js';
|
|
15
|
+
import { createAuditTrail } from '../audit/audit-trail.js';
|
|
16
|
+
import { failFast } from '../errors/index.js';
|
|
17
|
+
import { loadEndpointConfig } from '../config/endpoints.js';
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// Deploy Command Implementation
|
|
20
|
+
// ============================================================================
|
|
21
|
+
export async function executeDeployCommand(input, options) {
|
|
22
|
+
const correlationId = options.trace_id ?? crypto.randomUUID();
|
|
23
|
+
const startTime = Date.now();
|
|
24
|
+
// Initialize components
|
|
25
|
+
const engine = createOrchestrationEngine(correlationId);
|
|
26
|
+
const handoff = createArtifactHandoff();
|
|
27
|
+
const audit = createAuditTrail();
|
|
28
|
+
// Create adapter
|
|
29
|
+
const intentConfig = loadEndpointConfig('agentics-deployment-intent');
|
|
30
|
+
const intentAdapter = new IntentAdapter(intentConfig, correlationId);
|
|
31
|
+
// Define orchestration stages
|
|
32
|
+
const stages = [
|
|
33
|
+
{
|
|
34
|
+
name: 'resolve-intent',
|
|
35
|
+
adapter: intentAdapter,
|
|
36
|
+
request: {
|
|
37
|
+
endpoint: '/api/v1/intents/resolve',
|
|
38
|
+
method: 'POST',
|
|
39
|
+
buildBody: () => ({
|
|
40
|
+
sim_ref: handoff.passthrough(input.simRef),
|
|
41
|
+
spec: input.spec ?? {},
|
|
42
|
+
environment: input.environment ?? 'default',
|
|
43
|
+
}),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
try {
|
|
48
|
+
// Execute orchestration
|
|
49
|
+
const result = await engine.execute(stages, options);
|
|
50
|
+
if (!result.success) {
|
|
51
|
+
const failedStage = result.stages.find(s => s.status === 'failed');
|
|
52
|
+
throw new Error(failedStage?.error?.message ?? 'Deployment intent resolution failed');
|
|
53
|
+
}
|
|
54
|
+
// Extract intent reference
|
|
55
|
+
const intentStage = result.stages.find(s => s.name === 'resolve-intent');
|
|
56
|
+
const intentRef = handoff.extractReference(intentStage?.response);
|
|
57
|
+
// Record audit entry
|
|
58
|
+
audit.record({
|
|
59
|
+
command: 'deploy',
|
|
60
|
+
inputs: { simRef: input.simRef.id, spec: input.spec, environment: input.environment },
|
|
61
|
+
outputs: intentRef,
|
|
62
|
+
dependencies: [
|
|
63
|
+
{ service: 'agentics-deployment-intent', method: 'resolve', timestamp: new Date().toISOString(), duration_ms: result.timing.total, success: true },
|
|
64
|
+
],
|
|
65
|
+
duration_ms: result.timing.total,
|
|
66
|
+
status: 'SUCCESS',
|
|
67
|
+
trace_id: correlationId,
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
reference: intentRef,
|
|
71
|
+
timing: Date.now() - startTime,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
// Record failure in audit
|
|
76
|
+
audit.record({
|
|
77
|
+
command: 'deploy',
|
|
78
|
+
inputs: { simRef: input.simRef.id, spec: input.spec },
|
|
79
|
+
outputs: null,
|
|
80
|
+
dependencies: [],
|
|
81
|
+
duration_ms: Date.now() - startTime,
|
|
82
|
+
status: 'FAILED',
|
|
83
|
+
error_code: error instanceof Error ? error.name : 'UNKNOWN',
|
|
84
|
+
error_message: error instanceof Error ? error.message : 'Unknown error',
|
|
85
|
+
trace_id: correlationId,
|
|
86
|
+
});
|
|
87
|
+
// Fail fast
|
|
88
|
+
failFast({
|
|
89
|
+
command: 'deploy',
|
|
90
|
+
phase: 'intent-resolution',
|
|
91
|
+
upstreamError: error instanceof Error ? error : new Error(String(error)),
|
|
92
|
+
inputs: input,
|
|
93
|
+
correlationId,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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* 1. Parse arguments → CommandObject
|
|
8
|
+
* 2. Package artifacts via diligence-artifacts
|
|
9
|
+
* 3. Record audit entry
|
|
10
|
+
* 4. Return DiligencePackageReference
|
|
11
|
+
*/
|
|
12
|
+
import type { CommandOptions, DiligencePackageReference, BaseReference, ComplianceFramework } from '../types/index.js';
|
|
13
|
+
export interface DiligenceCommandInput {
|
|
14
|
+
refs: BaseReference[];
|
|
15
|
+
frameworks: ComplianceFramework[];
|
|
16
|
+
requirements?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface DiligenceCommandResult {
|
|
19
|
+
reference: DiligencePackageReference;
|
|
20
|
+
timing: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function executeDiligenceCommand(input: DiligenceCommandInput, options: CommandOptions): Promise<DiligenceCommandResult>;
|
|
23
|
+
//# sourceMappingURL=diligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diligence.d.ts","sourceRoot":"","sources":["../../src/commands/diligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAe3B,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,aAAa,EAAE,CAAC;IACtB,UAAU,EAAE,mBAAmB,EAAE,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,yBAAyB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,qBAAqB,EAC5B,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,sBAAsB,CAAC,CAmFjC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diligence Command
|
|
3
|
+
*
|
|
4
|
+
* SPARC Pseudocode Reference: §2.5
|
|
5
|
+
*
|
|
6
|
+
* FLOW:
|
|
7
|
+
* 1. Parse arguments → CommandObject
|
|
8
|
+
* 2. Package artifacts via diligence-artifacts
|
|
9
|
+
* 3. Record audit entry
|
|
10
|
+
* 4. Return DiligencePackageReference
|
|
11
|
+
*/
|
|
12
|
+
import { DiligenceAdapter } from '../adapters/base-adapter.js';
|
|
13
|
+
import { createOrchestrationEngine, } from '../modules/orchestration-engine.js';
|
|
14
|
+
import { createArtifactHandoff } from '../modules/artifact-handoff.js';
|
|
15
|
+
import { createAuditTrail } from '../audit/audit-trail.js';
|
|
16
|
+
import { failFast } from '../errors/index.js';
|
|
17
|
+
import { loadEndpointConfig } from '../config/endpoints.js';
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// Diligence Command Implementation
|
|
20
|
+
// ============================================================================
|
|
21
|
+
export async function executeDiligenceCommand(input, options) {
|
|
22
|
+
const correlationId = options.trace_id ?? crypto.randomUUID();
|
|
23
|
+
const startTime = Date.now();
|
|
24
|
+
// Initialize components
|
|
25
|
+
const engine = createOrchestrationEngine(correlationId);
|
|
26
|
+
const handoff = createArtifactHandoff();
|
|
27
|
+
const audit = createAuditTrail();
|
|
28
|
+
// Create adapter
|
|
29
|
+
const diligenceConfig = loadEndpointConfig('diligence-artifacts');
|
|
30
|
+
const diligenceAdapter = new DiligenceAdapter(diligenceConfig, correlationId);
|
|
31
|
+
// Define orchestration stages
|
|
32
|
+
const stages = [
|
|
33
|
+
{
|
|
34
|
+
name: 'package-diligence',
|
|
35
|
+
adapter: diligenceAdapter,
|
|
36
|
+
request: {
|
|
37
|
+
endpoint: '/api/v1/diligence/package',
|
|
38
|
+
method: 'POST',
|
|
39
|
+
buildBody: () => ({
|
|
40
|
+
refs: input.refs.map(ref => handoff.passthrough(ref)),
|
|
41
|
+
frameworks: input.frameworks,
|
|
42
|
+
requirements: input.requirements ?? {},
|
|
43
|
+
}),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
try {
|
|
48
|
+
// Execute orchestration
|
|
49
|
+
const result = await engine.execute(stages, options);
|
|
50
|
+
if (!result.success) {
|
|
51
|
+
const failedStage = result.stages.find(s => s.status === 'failed');
|
|
52
|
+
throw new Error(failedStage?.error?.message ?? 'Diligence packaging failed');
|
|
53
|
+
}
|
|
54
|
+
// Extract diligence package reference
|
|
55
|
+
const diligenceStage = result.stages.find(s => s.name === 'package-diligence');
|
|
56
|
+
const diligenceRef = handoff.extractReference(diligenceStage?.response);
|
|
57
|
+
// Record audit entry
|
|
58
|
+
audit.record({
|
|
59
|
+
command: 'diligence',
|
|
60
|
+
inputs: { refs: input.refs.map(r => r.id), frameworks: input.frameworks },
|
|
61
|
+
outputs: diligenceRef,
|
|
62
|
+
dependencies: [
|
|
63
|
+
{ service: 'diligence-artifacts', method: 'package', timestamp: new Date().toISOString(), duration_ms: result.timing.total, success: true },
|
|
64
|
+
],
|
|
65
|
+
duration_ms: result.timing.total,
|
|
66
|
+
status: 'SUCCESS',
|
|
67
|
+
trace_id: correlationId,
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
reference: diligenceRef,
|
|
71
|
+
timing: Date.now() - startTime,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
// Record failure in audit
|
|
76
|
+
audit.record({
|
|
77
|
+
command: 'diligence',
|
|
78
|
+
inputs: { refs: input.refs.map(r => r.id), frameworks: input.frameworks },
|
|
79
|
+
outputs: null,
|
|
80
|
+
dependencies: [],
|
|
81
|
+
duration_ms: Date.now() - startTime,
|
|
82
|
+
status: 'FAILED',
|
|
83
|
+
error_code: error instanceof Error ? error.name : 'UNKNOWN',
|
|
84
|
+
error_message: error instanceof Error ? error.message : 'Unknown error',
|
|
85
|
+
trace_id: correlationId,
|
|
86
|
+
});
|
|
87
|
+
// Fail fast
|
|
88
|
+
failFast({
|
|
89
|
+
command: 'diligence',
|
|
90
|
+
phase: 'packaging',
|
|
91
|
+
upstreamError: error instanceof Error ? error : new Error(String(error)),
|
|
92
|
+
inputs: input,
|
|
93
|
+
correlationId,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=diligence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diligence.js","sourceRoot":"","sources":["../../src/commands/diligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,yBAAyB,GAE1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAiB5D,+EAA+E;AAC/E,mCAAmC;AACnC,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAA4B,EAC5B,OAAuB;IAEvB,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,wBAAwB;IACxB,MAAM,MAAM,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,gBAAgB,EAAE,CAAC;IAEjC,iBAAiB;IACjB,MAAM,eAAe,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;IAClE,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAE9E,8BAA8B;IAC9B,MAAM,MAAM,GAAyB;QACnC;YACE,IAAI,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AC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACxE,MAAM,EAAE,KAAK;YACb,aAAa;SACd,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export Command
|
|
3
|
+
*
|
|
4
|
+
* SPARC Pseudocode Reference: §2.4
|
|
5
|
+
*
|
|
6
|
+
* FLOW:
|
|
7
|
+
* 1. Parse arguments → CommandObject
|
|
8
|
+
* 2. Generate exports via agentics-deployment-exporters
|
|
9
|
+
* 3. Record audit entry
|
|
10
|
+
* 4. Return ExportReference
|
|
11
|
+
*/
|
|
12
|
+
import type { CommandOptions, ExportReference, IntentReference, ExportFormat } from '../types/index.js';
|
|
13
|
+
export interface ExportCommandInput {
|
|
14
|
+
intentRef: IntentReference;
|
|
15
|
+
format: ExportFormat;
|
|
16
|
+
outputPath?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ExportCommandResult {
|
|
19
|
+
reference: ExportReference;
|
|
20
|
+
timing: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function executeExportCommand(input: ExportCommandInput, options: CommandOptions): Promise<ExportCommandResult>;
|
|
23
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/commands/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,EACb,MAAM,mBAAmB,CAAC;AAe3B,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,mBAAmB,CAAC,CAqF9B"}
|