@llm-dev-ops/agentics-cli 1.0.1 → 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.
- package/README.md +66 -16
- package/dist/cli/index.js +88 -24
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/deploy.d.ts +2 -2
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +13 -3
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/diligence.d.ts +2 -2
- package/dist/commands/diligence.d.ts.map +1 -1
- package/dist/commands/diligence.js +13 -3
- package/dist/commands/diligence.js.map +1 -1
- package/dist/commands/export.d.ts +2 -2
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +13 -3
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/inspect.d.ts +2 -2
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +13 -3
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/login.d.ts +30 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +135 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/quantify.d.ts +2 -2
- package/dist/commands/quantify.d.ts.map +1 -1
- package/dist/commands/quantify.js +13 -3
- package/dist/commands/quantify.js.map +1 -1
- package/dist/commands/simulate.d.ts +2 -2
- package/dist/commands/simulate.d.ts.map +1 -1
- package/dist/commands/simulate.js +13 -3
- package/dist/commands/simulate.js.map +1 -1
- package/dist/modules/command-parser.d.ts +1 -1
- package/dist/modules/command-parser.d.ts.map +1 -1
- package/dist/modules/command-parser.js +1 -0
- package/dist/modules/command-parser.js.map +1 -1
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +50 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/credentials.d.ts +36 -0
- package/dist/utils/credentials.d.ts.map +1 -0
- package/dist/utils/credentials.js +104 -0
- package/dist/utils/credentials.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agentics-CLI
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@llm-dev-ops/agentics-cli)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
6
|
CLI for the Agentics Platform - orchestrate simulations, analyze ROI, and deploy AI agent infrastructure.
|
|
7
7
|
|
|
8
|
+
**Supports natural language input:** Use plain English in quotes after any workflow command.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
agentics simulate "run an enterprise ERP cost optimization simulation"
|
|
12
|
+
agentics quantify "calculate ROI for the Q4 infrastructure upgrade"
|
|
13
|
+
```
|
|
14
|
+
|
|
8
15
|
## Installation
|
|
9
16
|
|
|
10
17
|
```bash
|
|
@@ -14,29 +21,26 @@ npm install -g @llm-dev-ops/agentics-cli
|
|
|
14
21
|
Or run directly with npx:
|
|
15
22
|
|
|
16
23
|
```bash
|
|
17
|
-
npx @llm-dev-ops/agentics-cli
|
|
24
|
+
npx @llm-dev-ops/agentics-cli help
|
|
18
25
|
```
|
|
19
26
|
|
|
20
27
|
## Quick Start
|
|
21
28
|
|
|
29
|
+
Commands accept either natural language in quotes or structured JSON references:
|
|
30
|
+
|
|
22
31
|
```bash
|
|
23
|
-
#
|
|
32
|
+
# Using natural language (just describe what you want in quotes)
|
|
24
33
|
agentics plan "production-deployment"
|
|
34
|
+
agentics simulate "run an enterprise ERP cost optimization simulation"
|
|
35
|
+
agentics inspect "show me the results from the last production test"
|
|
36
|
+
agentics quantify "calculate ROI for the Q4 infrastructure upgrade"
|
|
37
|
+
agentics deploy "deploy the microservices update to staging"
|
|
38
|
+
agentics export "generate terraform for the new kubernetes cluster"
|
|
25
39
|
|
|
26
|
-
#
|
|
40
|
+
# Using JSON references (for programmatic workflows)
|
|
27
41
|
agentics simulate '{"id":"plan-123"}' --iterations 10
|
|
28
|
-
|
|
29
|
-
# Inspect results
|
|
30
42
|
agentics inspect '{"id":"sim-456"}' --output-type metrics
|
|
31
|
-
|
|
32
|
-
# Generate ROI report
|
|
33
43
|
agentics quantify '{"id":"sim-456"}' --report-type cfo-grade
|
|
34
|
-
|
|
35
|
-
# Deploy
|
|
36
|
-
agentics deploy '{"id":"sim-456"}' --environment staging
|
|
37
|
-
|
|
38
|
-
# Export infrastructure
|
|
39
|
-
agentics export '{"id":"intent-789"}' --export-format terraform
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
## Workflow
|
|
@@ -69,10 +73,14 @@ agentics plan <manifest-query> [--params <json>]
|
|
|
69
73
|
|
|
70
74
|
### simulate
|
|
71
75
|
|
|
72
|
-
Execute a simulation from a plan reference.
|
|
76
|
+
Execute a simulation from a plan reference or natural language description.
|
|
73
77
|
|
|
74
78
|
```bash
|
|
79
|
+
# With JSON reference
|
|
75
80
|
agentics simulate <plan-ref> [--config <json>] [--iterations <n>]
|
|
81
|
+
|
|
82
|
+
# With natural language
|
|
83
|
+
agentics simulate "run an enterprise ERP cost optimization simulation"
|
|
76
84
|
```
|
|
77
85
|
|
|
78
86
|
### inspect
|
|
@@ -80,7 +88,11 @@ agentics simulate <plan-ref> [--config <json>] [--iterations <n>]
|
|
|
80
88
|
Retrieve deterministic outputs from a simulation.
|
|
81
89
|
|
|
82
90
|
```bash
|
|
91
|
+
# With JSON reference
|
|
83
92
|
agentics inspect <sim-ref> [--output-type <type>]
|
|
93
|
+
|
|
94
|
+
# With natural language
|
|
95
|
+
agentics inspect "show me the results from the last production test"
|
|
84
96
|
```
|
|
85
97
|
|
|
86
98
|
Output types: `metrics`, `logs`, `state`, `events`, `summary`, `full`
|
|
@@ -90,7 +102,11 @@ Output types: `metrics`, `logs`, `state`, `events`, `summary`, `full`
|
|
|
90
102
|
Generate financial impact and ROI analysis.
|
|
91
103
|
|
|
92
104
|
```bash
|
|
105
|
+
# With JSON reference
|
|
93
106
|
agentics quantify <sim-ref> [--report-type <type>] [--params <json>]
|
|
107
|
+
|
|
108
|
+
# With natural language
|
|
109
|
+
agentics quantify "calculate ROI for the Q4 infrastructure upgrade"
|
|
94
110
|
```
|
|
95
111
|
|
|
96
112
|
Report types: `executive-summary`, `detailed-analysis`, `cfo-grade`, `custom`
|
|
@@ -100,7 +116,11 @@ Report types: `executive-summary`, `detailed-analysis`, `cfo-grade`, `custom`
|
|
|
100
116
|
Resolve deployment intent from simulation results.
|
|
101
117
|
|
|
102
118
|
```bash
|
|
119
|
+
# With JSON reference
|
|
103
120
|
agentics deploy <sim-ref> [--spec <json>] [--environment <env>]
|
|
121
|
+
|
|
122
|
+
# With natural language
|
|
123
|
+
agentics deploy "deploy the microservices update to staging"
|
|
104
124
|
```
|
|
105
125
|
|
|
106
126
|
### export
|
|
@@ -108,7 +128,11 @@ agentics deploy <sim-ref> [--spec <json>] [--environment <env>]
|
|
|
108
128
|
Generate infrastructure-as-code deployment artifacts.
|
|
109
129
|
|
|
110
130
|
```bash
|
|
131
|
+
# With JSON reference
|
|
111
132
|
agentics export <intent-ref> [--export-format <format>] [--output <path>]
|
|
133
|
+
|
|
134
|
+
# With natural language
|
|
135
|
+
agentics export "generate terraform for the new kubernetes cluster"
|
|
112
136
|
```
|
|
113
137
|
|
|
114
138
|
Export formats: `terraform`, `kubernetes`, `cloudformation`, `pulumi`, `ansible`, `custom`
|
|
@@ -118,11 +142,36 @@ Export formats: `terraform`, `kubernetes`, `cloudformation`, `pulumi`, `ansible`
|
|
|
118
142
|
Package compliance and audit artifacts.
|
|
119
143
|
|
|
120
144
|
```bash
|
|
145
|
+
# With JSON reference
|
|
121
146
|
agentics diligence <refs> [--frameworks <list>] [--requirements <json>]
|
|
147
|
+
|
|
148
|
+
# With natural language
|
|
149
|
+
agentics diligence "package compliance docs for the SOC2 audit"
|
|
122
150
|
```
|
|
123
151
|
|
|
124
152
|
Frameworks: `SOC2`, `HIPAA`, `GDPR`, `PCI-DSS`, `custom`
|
|
125
153
|
|
|
154
|
+
## Natural Language Input
|
|
155
|
+
|
|
156
|
+
The CLI supports Claude-style natural language invocation for workflow commands. Instead of passing structured JSON references, you can describe what you want in plain English:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Natural language examples
|
|
160
|
+
agentics simulate "run an enterprise ERP cost optimization simulation"
|
|
161
|
+
agentics inspect "show me the results from the last production test"
|
|
162
|
+
agentics quantify "calculate ROI for the Q4 infrastructure upgrade"
|
|
163
|
+
agentics deploy "deploy the microservices update to staging"
|
|
164
|
+
agentics export "generate terraform for the new kubernetes cluster"
|
|
165
|
+
agentics diligence "package compliance docs for the SOC2 audit"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Natural language input is automatically detected and forwarded to downstream services unchanged. Structured JSON input continues to work as before for backward compatibility.
|
|
169
|
+
|
|
170
|
+
**Input Detection Rules:**
|
|
171
|
+
- Input starting with `{` or `[` is parsed as JSON
|
|
172
|
+
- All other input is treated as natural language description
|
|
173
|
+
- Invalid JSON syntax is treated as natural language
|
|
174
|
+
|
|
126
175
|
## Global Options
|
|
127
176
|
|
|
128
177
|
| Option | Description |
|
|
@@ -132,9 +181,10 @@ Frameworks: `SOC2`, `HIPAA`, `GDPR`, `PCI-DSS`, `custom`
|
|
|
132
181
|
| `--format <fmt>` | Output format: `json`, `yaml`, `table`, `text`, `csv` |
|
|
133
182
|
| `--verbose, -v` | Enable verbose output |
|
|
134
183
|
| `--pretty` | Pretty-print output |
|
|
135
|
-
| `--help, -h` | Show help |
|
|
136
184
|
| `--version` | Show version |
|
|
137
185
|
|
|
186
|
+
Use `agentics help` to display full usage information.
|
|
187
|
+
|
|
138
188
|
## Environment Variables
|
|
139
189
|
|
|
140
190
|
Override default service endpoints:
|
package/dist/cli/index.js
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
import { createCommandParser, SUPPORTED_COMMANDS } from '../modules/command-parser.js';
|
|
15
15
|
import { createOutputRenderer } from '../modules/output-renderer.js';
|
|
16
16
|
import { CLIError, errorHandler } from '../errors/index.js';
|
|
17
|
-
import { EXIT_CODES } from '../types/index.js';
|
|
17
|
+
import { EXIT_CODES, parseFlexibleInput, isNaturalLanguage } from '../types/index.js';
|
|
18
18
|
// Import command executors
|
|
19
|
+
import { executeLoginCommand } from '../commands/login.js';
|
|
19
20
|
import { executePlanCommand } from '../commands/plan.js';
|
|
20
21
|
import { executeSimulateCommand } from '../commands/simulate.js';
|
|
21
22
|
import { executeInspectCommand } from '../commands/inspect.js';
|
|
@@ -68,69 +69,114 @@ async function main() {
|
|
|
68
69
|
}
|
|
69
70
|
// Dispatch to command handlers
|
|
70
71
|
try {
|
|
71
|
-
let result;
|
|
72
|
+
let result = null;
|
|
72
73
|
switch (parsed.command) {
|
|
74
|
+
case 'login': {
|
|
75
|
+
const loginResult = await executeLoginCommand({
|
|
76
|
+
noBrowser: parsed.flags['no-browser'] ?? false,
|
|
77
|
+
}, options);
|
|
78
|
+
// Login command outputs its own messages, just exit successfully
|
|
79
|
+
if (loginResult.success) {
|
|
80
|
+
process.exit(EXIT_CODES.SUCCESS);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
process.exit(EXIT_CODES.AUTH_ERROR);
|
|
84
|
+
}
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
73
87
|
case 'plan':
|
|
74
88
|
result = await executePlanCommand({
|
|
75
89
|
manifestQuery: parsed.positionalArgs[0] ?? '',
|
|
76
90
|
params: parsed.options['params'] ? JSON.parse(parsed.options['params']) : undefined,
|
|
77
91
|
}, options);
|
|
78
92
|
break;
|
|
79
|
-
case 'simulate':
|
|
93
|
+
case 'simulate': {
|
|
94
|
+
const simInput = parsed.positionalArgs[0] ?? '';
|
|
95
|
+
const simFlexibleInput = parseFlexibleInput(simInput);
|
|
80
96
|
result = await executeSimulateCommand({
|
|
81
|
-
planRef:
|
|
97
|
+
planRef: isNaturalLanguage(simFlexibleInput)
|
|
98
|
+
? simFlexibleInput // Pass NL input directly
|
|
99
|
+
: simFlexibleInput,
|
|
82
100
|
config: parsed.options['config'] ? JSON.parse(parsed.options['config']) : undefined,
|
|
83
101
|
iterations: parsed.options['iterations'] ? parseInt(parsed.options['iterations'], 10) : undefined,
|
|
84
102
|
}, options);
|
|
85
103
|
break;
|
|
86
|
-
|
|
104
|
+
}
|
|
105
|
+
case 'inspect': {
|
|
106
|
+
const inspectInput = parsed.positionalArgs[0] ?? '';
|
|
107
|
+
const inspectFlexibleInput = parseFlexibleInput(inspectInput);
|
|
87
108
|
result = await executeInspectCommand({
|
|
88
|
-
simRef:
|
|
109
|
+
simRef: isNaturalLanguage(inspectFlexibleInput)
|
|
110
|
+
? inspectFlexibleInput // Pass NL input directly
|
|
111
|
+
: inspectFlexibleInput,
|
|
89
112
|
outputType: (parsed.options['output-type'] ?? 'summary'),
|
|
90
113
|
}, options);
|
|
91
114
|
break;
|
|
92
|
-
|
|
115
|
+
}
|
|
116
|
+
case 'quantify': {
|
|
117
|
+
const quantifyInput = parsed.positionalArgs[0] ?? '';
|
|
118
|
+
const quantifyFlexibleInput = parseFlexibleInput(quantifyInput);
|
|
93
119
|
result = await executeQuantifyCommand({
|
|
94
|
-
simRef:
|
|
120
|
+
simRef: isNaturalLanguage(quantifyFlexibleInput)
|
|
121
|
+
? quantifyFlexibleInput // Pass NL input directly
|
|
122
|
+
: quantifyFlexibleInput,
|
|
95
123
|
reportType: (parsed.options['report-type'] ?? 'cfo-grade'),
|
|
96
124
|
params: parsed.options['params'] ? JSON.parse(parsed.options['params']) : undefined,
|
|
97
125
|
}, options);
|
|
98
126
|
break;
|
|
99
|
-
|
|
127
|
+
}
|
|
128
|
+
case 'deploy': {
|
|
129
|
+
const deployInput = parsed.positionalArgs[0] ?? '';
|
|
130
|
+
const deployFlexibleInput = parseFlexibleInput(deployInput);
|
|
100
131
|
result = await executeDeployCommand({
|
|
101
|
-
simRef:
|
|
132
|
+
simRef: isNaturalLanguage(deployFlexibleInput)
|
|
133
|
+
? deployFlexibleInput // Pass NL input directly
|
|
134
|
+
: deployFlexibleInput,
|
|
102
135
|
spec: parsed.options['spec'] ? JSON.parse(parsed.options['spec']) : undefined,
|
|
103
136
|
environment: parsed.options['environment'],
|
|
104
137
|
}, options);
|
|
105
138
|
break;
|
|
106
|
-
|
|
139
|
+
}
|
|
140
|
+
case 'export': {
|
|
141
|
+
const exportInput = parsed.positionalArgs[0] ?? '';
|
|
142
|
+
const exportFlexibleInput = parseFlexibleInput(exportInput);
|
|
107
143
|
result = await executeExportCommand({
|
|
108
|
-
intentRef:
|
|
144
|
+
intentRef: isNaturalLanguage(exportFlexibleInput)
|
|
145
|
+
? exportFlexibleInput // Pass NL input directly
|
|
146
|
+
: exportFlexibleInput,
|
|
109
147
|
format: (parsed.options['export-format'] ?? 'terraform'),
|
|
110
148
|
outputPath: parsed.options['output'],
|
|
111
149
|
}, options);
|
|
112
150
|
break;
|
|
113
|
-
|
|
151
|
+
}
|
|
152
|
+
case 'diligence': {
|
|
153
|
+
const diligenceInput = parsed.positionalArgs[0] ?? '';
|
|
154
|
+
const diligenceFlexibleInput = parseFlexibleInput(diligenceInput);
|
|
114
155
|
result = await executeDiligenceCommand({
|
|
115
|
-
refs:
|
|
156
|
+
refs: isNaturalLanguage(diligenceFlexibleInput)
|
|
157
|
+
? diligenceFlexibleInput // Pass NL input directly
|
|
158
|
+
: diligenceFlexibleInput,
|
|
116
159
|
frameworks: (parsed.options['frameworks'] ?? 'SOC2').split(','),
|
|
117
160
|
requirements: parsed.options['requirements'] ? JSON.parse(parsed.options['requirements']) : undefined,
|
|
118
161
|
}, options);
|
|
119
162
|
break;
|
|
163
|
+
}
|
|
120
164
|
default:
|
|
121
165
|
console.error(`Unknown command: ${parsed.command}`);
|
|
122
166
|
console.error(`Supported commands: ${SUPPORTED_COMMANDS.join(', ')}`);
|
|
123
167
|
process.exit(EXIT_CODES.USAGE_ERROR);
|
|
124
168
|
}
|
|
125
|
-
// Output result
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
169
|
+
// Output result (skip for commands that handle their own output)
|
|
170
|
+
if (result) {
|
|
171
|
+
const output = renderer.renderReference(result.reference, {
|
|
172
|
+
format: options.format ?? 'json',
|
|
173
|
+
pretty: parsed.flags['pretty'] ?? true,
|
|
174
|
+
});
|
|
175
|
+
console.log(output);
|
|
176
|
+
// Verbose timing output
|
|
177
|
+
if (options.verbose) {
|
|
178
|
+
console.error(`Completed in ${result.timing}ms`);
|
|
179
|
+
}
|
|
134
180
|
}
|
|
135
181
|
process.exit(EXIT_CODES.SUCCESS);
|
|
136
182
|
}
|
|
@@ -173,6 +219,8 @@ WORKFLOW:
|
|
|
173
219
|
6. export - Generate deployment artifacts (terraform, k8s, etc.)
|
|
174
220
|
|
|
175
221
|
COMMANDS:
|
|
222
|
+
login Authenticate with the Agentics platform
|
|
223
|
+
Opens browser for authorization, stores API key locally
|
|
176
224
|
plan Create a simulation plan from manifest
|
|
177
225
|
Uses: agentics-simulation-planner
|
|
178
226
|
simulate Execute a simulation from a plan
|
|
@@ -199,6 +247,9 @@ GLOBAL OPTIONS:
|
|
|
199
247
|
--help, -h Show help
|
|
200
248
|
|
|
201
249
|
COMMAND OPTIONS:
|
|
250
|
+
login:
|
|
251
|
+
--no-browser Skip opening browser automatically
|
|
252
|
+
|
|
202
253
|
plan:
|
|
203
254
|
--params <json> Parameters for plan creation
|
|
204
255
|
|
|
@@ -229,7 +280,11 @@ COMMAND OPTIONS:
|
|
|
229
280
|
--requirements <json> Custom requirements
|
|
230
281
|
|
|
231
282
|
EXAMPLES:
|
|
232
|
-
#
|
|
283
|
+
# Authenticate with the platform
|
|
284
|
+
agentics login
|
|
285
|
+
agentics login --no-browser
|
|
286
|
+
|
|
287
|
+
# Complete workflow example (with JSON references)
|
|
233
288
|
agentics plan "production-deployment"
|
|
234
289
|
agentics simulate '{"id":"plan-123",...}' --iterations 10
|
|
235
290
|
agentics inspect '{"id":"sim-456",...}' --output-type metrics
|
|
@@ -238,7 +293,16 @@ EXAMPLES:
|
|
|
238
293
|
agentics export '{"id":"intent-789",...}' --export-format terraform
|
|
239
294
|
agentics diligence '[{"id":"ref-1"},...]' --frameworks SOC2,HIPAA
|
|
240
295
|
|
|
296
|
+
# Natural language input (Claude-style invocation)
|
|
297
|
+
agentics simulate "run an enterprise ERP cost optimization simulation"
|
|
298
|
+
agentics inspect "show me the results from the last production test"
|
|
299
|
+
agentics quantify "calculate ROI for the Q4 infrastructure upgrade"
|
|
300
|
+
agentics deploy "deploy the microservices update to staging"
|
|
301
|
+
agentics export "generate terraform for the new kubernetes cluster"
|
|
302
|
+
agentics diligence "package compliance docs for the SOC2 audit"
|
|
303
|
+
|
|
241
304
|
ENVIRONMENT VARIABLES:
|
|
305
|
+
AGENTICS_PLATFORM_URL Override platform URL for authentication
|
|
242
306
|
AGENTICS_MANIFESTS_URL Override manifests service URL
|
|
243
307
|
AGENTICS_PLANNER_URL Override planner service URL
|
|
244
308
|
AGENTICS_RUNNER_URL Override runner service URL
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","source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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqHb,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"}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* 3. Record audit entry
|
|
10
10
|
* 4. Return IntentReference
|
|
11
11
|
*/
|
|
12
|
-
import type { CommandOptions, IntentReference, SimulationReference } from '../types/index.js';
|
|
12
|
+
import type { CommandOptions, IntentReference, SimulationReference, FlexibleInput } from '../types/index.js';
|
|
13
13
|
export interface DeployCommandInput {
|
|
14
|
-
simRef: SimulationReference
|
|
14
|
+
simRef: FlexibleInput<SimulationReference>;
|
|
15
15
|
spec?: Record<string, unknown>;
|
|
16
16
|
environment?: string;
|
|
17
17
|
}
|
|
@@ -1 +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,
|
|
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,EACnB,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAgB3B,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC3C,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,CA4F9B"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* 3. Record audit entry
|
|
10
10
|
* 4. Return IntentReference
|
|
11
11
|
*/
|
|
12
|
+
import { isNaturalLanguage } from '../types/index.js';
|
|
12
13
|
import { IntentAdapter } from '../adapters/base-adapter.js';
|
|
13
14
|
import { createOrchestrationEngine, } from '../modules/orchestration-engine.js';
|
|
14
15
|
import { createArtifactHandoff } from '../modules/artifact-handoff.js';
|
|
@@ -37,7 +38,10 @@ export async function executeDeployCommand(input, options) {
|
|
|
37
38
|
endpoint: '/api/v1/intents/resolve',
|
|
38
39
|
method: 'POST',
|
|
39
40
|
buildBody: () => ({
|
|
40
|
-
|
|
41
|
+
// Pass natural language input or structured reference unchanged
|
|
42
|
+
sim_ref: isNaturalLanguage(input.simRef)
|
|
43
|
+
? { natural_language: input.simRef.description }
|
|
44
|
+
: handoff.passthrough(input.simRef),
|
|
41
45
|
spec: input.spec ?? {},
|
|
42
46
|
environment: input.environment ?? 'default',
|
|
43
47
|
}),
|
|
@@ -55,9 +59,12 @@ export async function executeDeployCommand(input, options) {
|
|
|
55
59
|
const intentStage = result.stages.find(s => s.name === 'resolve-intent');
|
|
56
60
|
const intentRef = handoff.extractReference(intentStage?.response);
|
|
57
61
|
// Record audit entry
|
|
62
|
+
const simRefId = isNaturalLanguage(input.simRef)
|
|
63
|
+
? `nl:${input.simRef.description.slice(0, 50)}`
|
|
64
|
+
: input.simRef.id;
|
|
58
65
|
audit.record({
|
|
59
66
|
command: 'deploy',
|
|
60
|
-
inputs: { simRef:
|
|
67
|
+
inputs: { simRef: simRefId, spec: input.spec, environment: input.environment },
|
|
61
68
|
outputs: intentRef,
|
|
62
69
|
dependencies: [
|
|
63
70
|
{ service: 'agentics-deployment-intent', method: 'resolve', timestamp: new Date().toISOString(), duration_ms: result.timing.total, success: true },
|
|
@@ -73,9 +80,12 @@ export async function executeDeployCommand(input, options) {
|
|
|
73
80
|
}
|
|
74
81
|
catch (error) {
|
|
75
82
|
// Record failure in audit
|
|
83
|
+
const failedSimRefId = isNaturalLanguage(input.simRef)
|
|
84
|
+
? `nl:${input.simRef.description.slice(0, 50)}`
|
|
85
|
+
: input.simRef.id;
|
|
76
86
|
audit.record({
|
|
77
87
|
command: 'deploy',
|
|
78
|
-
inputs: { simRef:
|
|
88
|
+
inputs: { simRef: failedSimRefId, spec: input.spec },
|
|
79
89
|
outputs: null,
|
|
80
90
|
dependencies: [],
|
|
81
91
|
duration_ms: Date.now() - startTime,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,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,gCAAgC;AAChC,+EAA+E;AAE/E,MAAM,CA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|
|
11
11
|
*/
|
|
12
|
-
import type { CommandOptions, DiligencePackageReference, BaseReference, ComplianceFramework } from '../types/index.js';
|
|
12
|
+
import type { CommandOptions, DiligencePackageReference, BaseReference, ComplianceFramework, FlexibleInput } from '../types/index.js';
|
|
13
13
|
export interface DiligenceCommandInput {
|
|
14
|
-
refs: BaseReference[]
|
|
14
|
+
refs: FlexibleInput<BaseReference[]>;
|
|
15
15
|
frameworks: ComplianceFramework[];
|
|
16
16
|
requirements?: Record<string, unknown>;
|
|
17
17
|
}
|
|
@@ -1 +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,
|
|
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,EACnB,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAgB3B,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,aAAa,CAAC,aAAa,EAAE,CAAC,CAAC;IACrC,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,CA4FjC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* 3. Record audit entry
|
|
10
10
|
* 4. Return DiligencePackageReference
|
|
11
11
|
*/
|
|
12
|
+
import { isNaturalLanguage } from '../types/index.js';
|
|
12
13
|
import { DiligenceAdapter } from '../adapters/base-adapter.js';
|
|
13
14
|
import { createOrchestrationEngine, } from '../modules/orchestration-engine.js';
|
|
14
15
|
import { createArtifactHandoff } from '../modules/artifact-handoff.js';
|
|
@@ -37,7 +38,10 @@ export async function executeDiligenceCommand(input, options) {
|
|
|
37
38
|
endpoint: '/api/v1/diligence/package',
|
|
38
39
|
method: 'POST',
|
|
39
40
|
buildBody: () => ({
|
|
40
|
-
|
|
41
|
+
// Pass natural language input or structured references unchanged
|
|
42
|
+
refs: isNaturalLanguage(input.refs)
|
|
43
|
+
? { natural_language: input.refs.description }
|
|
44
|
+
: input.refs.map(ref => handoff.passthrough(ref)),
|
|
41
45
|
frameworks: input.frameworks,
|
|
42
46
|
requirements: input.requirements ?? {},
|
|
43
47
|
}),
|
|
@@ -55,9 +59,12 @@ export async function executeDiligenceCommand(input, options) {
|
|
|
55
59
|
const diligenceStage = result.stages.find(s => s.name === 'package-diligence');
|
|
56
60
|
const diligenceRef = handoff.extractReference(diligenceStage?.response);
|
|
57
61
|
// Record audit entry
|
|
62
|
+
const refsId = isNaturalLanguage(input.refs)
|
|
63
|
+
? `nl:${input.refs.description.slice(0, 50)}`
|
|
64
|
+
: input.refs.map(r => r.id);
|
|
58
65
|
audit.record({
|
|
59
66
|
command: 'diligence',
|
|
60
|
-
inputs: { refs:
|
|
67
|
+
inputs: { refs: refsId, frameworks: input.frameworks },
|
|
61
68
|
outputs: diligenceRef,
|
|
62
69
|
dependencies: [
|
|
63
70
|
{ service: 'diligence-artifacts', method: 'package', timestamp: new Date().toISOString(), duration_ms: result.timing.total, success: true },
|
|
@@ -73,9 +80,12 @@ export async function executeDiligenceCommand(input, options) {
|
|
|
73
80
|
}
|
|
74
81
|
catch (error) {
|
|
75
82
|
// Record failure in audit
|
|
83
|
+
const failedRefsId = isNaturalLanguage(input.refs)
|
|
84
|
+
? `nl:${input.refs.description.slice(0, 50)}`
|
|
85
|
+
: input.refs.map(r => r.id);
|
|
76
86
|
audit.record({
|
|
77
87
|
command: 'diligence',
|
|
78
|
-
inputs: { refs:
|
|
88
|
+
inputs: { refs: failedRefsId, frameworks: input.frameworks },
|
|
79
89
|
outputs: null,
|
|
80
90
|
dependencies: [],
|
|
81
91
|
duration_ms: Date.now() - startTime,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diligence.js","sourceRoot":"","sources":["../../src/commands/diligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"diligence.js","sourceRoot":"","sources":["../../src/commands/diligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,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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E,EAAE,CAAC,EAAE;YACvE,CAAC,CAAE,KAAK,CAAC,IAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACnD,KAAK,CAAC,MAAM,CAAC;YACX,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE;YAC5D,OAAO,EAAE,IAAI;YACb,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YACnC,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YAC3D,aAAa,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;YACvE,QAAQ,EAAE,aAAa;SACxB,CAAC,CAAC;QAEH,YAAY;QACZ,QAAQ,CAAC;YACP,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,WAAW;YAClB,aAAa,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,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"}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* 3. Record audit entry
|
|
10
10
|
* 4. Return ExportReference
|
|
11
11
|
*/
|
|
12
|
-
import type { CommandOptions, ExportReference, IntentReference, ExportFormat } from '../types/index.js';
|
|
12
|
+
import type { CommandOptions, ExportReference, IntentReference, ExportFormat, FlexibleInput } from '../types/index.js';
|
|
13
13
|
export interface ExportCommandInput {
|
|
14
|
-
intentRef: IntentReference
|
|
14
|
+
intentRef: FlexibleInput<IntentReference>;
|
|
15
15
|
format: ExportFormat;
|
|
16
16
|
outputPath?: string;
|
|
17
17
|
}
|
|
@@ -1 +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,
|
|
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,EACZ,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAgB3B,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC1C,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,CA8F9B"}
|
package/dist/commands/export.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* 3. Record audit entry
|
|
10
10
|
* 4. Return ExportReference
|
|
11
11
|
*/
|
|
12
|
+
import { isNaturalLanguage } from '../types/index.js';
|
|
12
13
|
import { ExportersAdapter } from '../adapters/base-adapter.js';
|
|
13
14
|
import { createOrchestrationEngine, } from '../modules/orchestration-engine.js';
|
|
14
15
|
import { createArtifactHandoff } from '../modules/artifact-handoff.js';
|
|
@@ -37,7 +38,10 @@ export async function executeExportCommand(input, options) {
|
|
|
37
38
|
endpoint: '/api/v1/exports/generate',
|
|
38
39
|
method: 'POST',
|
|
39
40
|
buildBody: () => ({
|
|
40
|
-
|
|
41
|
+
// Pass natural language input or structured reference unchanged
|
|
42
|
+
intent_ref: isNaturalLanguage(input.intentRef)
|
|
43
|
+
? { natural_language: input.intentRef.description }
|
|
44
|
+
: handoff.passthrough(input.intentRef),
|
|
41
45
|
format_spec: {
|
|
42
46
|
format: input.format,
|
|
43
47
|
output_path: input.outputPath,
|
|
@@ -57,9 +61,12 @@ export async function executeExportCommand(input, options) {
|
|
|
57
61
|
const exportStage = result.stages.find(s => s.name === 'generate-export');
|
|
58
62
|
const exportRef = handoff.extractReference(exportStage?.response);
|
|
59
63
|
// Record audit entry
|
|
64
|
+
const intentRefId = isNaturalLanguage(input.intentRef)
|
|
65
|
+
? `nl:${input.intentRef.description.slice(0, 50)}`
|
|
66
|
+
: input.intentRef.id;
|
|
60
67
|
audit.record({
|
|
61
68
|
command: 'export',
|
|
62
|
-
inputs: { intentRef:
|
|
69
|
+
inputs: { intentRef: intentRefId, format: input.format, outputPath: input.outputPath },
|
|
63
70
|
outputs: exportRef,
|
|
64
71
|
dependencies: [
|
|
65
72
|
{ service: 'agentics-deployment-exporters', method: 'generate', timestamp: new Date().toISOString(), duration_ms: result.timing.total, success: true },
|
|
@@ -75,9 +82,12 @@ export async function executeExportCommand(input, options) {
|
|
|
75
82
|
}
|
|
76
83
|
catch (error) {
|
|
77
84
|
// Record failure in audit
|
|
85
|
+
const failedIntentRefId = isNaturalLanguage(input.intentRef)
|
|
86
|
+
? `nl:${input.intentRef.description.slice(0, 50)}`
|
|
87
|
+
: input.intentRef.id;
|
|
78
88
|
audit.record({
|
|
79
89
|
command: 'export',
|
|
80
|
-
inputs: { intentRef:
|
|
90
|
+
inputs: { intentRef: failedIntentRefId, format: input.format },
|
|
81
91
|
outputs: null,
|
|
82
92
|
dependencies: [],
|
|
83
93
|
duration_ms: Date.now() - startTime,
|