@llm-dev-ops/agentics-cli 1.4.4 → 1.4.7
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/dist/adapters/base-adapter.d.ts +117 -0
- package/dist/adapters/base-adapter.d.ts.map +1 -1
- package/dist/adapters/base-adapter.js +143 -0
- package/dist/adapters/base-adapter.js.map +1 -1
- package/dist/agents/cli-ux-agent.d.ts.map +1 -1
- package/dist/agents/cli-ux-agent.js +2 -1
- package/dist/agents/cli-ux-agent.js.map +1 -1
- package/dist/auth/identity-resolver.d.ts +21 -0
- package/dist/auth/identity-resolver.d.ts.map +1 -0
- package/dist/auth/identity-resolver.js +68 -0
- package/dist/auth/identity-resolver.js.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/role-permissions.d.ts +12 -0
- package/dist/auth/role-permissions.d.ts.map +1 -0
- package/dist/auth/role-permissions.js +43 -0
- package/dist/auth/role-permissions.js.map +1 -0
- package/dist/cli/index.js +162 -157
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/deploy.d.ts +4 -4
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +83 -21
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/erp.d.ts +1 -1
- package/dist/commands/erp.d.ts.map +1 -1
- package/dist/commands/erp.js +65 -5
- package/dist/commands/erp.js.map +1 -1
- package/dist/commands/export.d.ts +5 -5
- package/dist/commands/export.js +5 -5
- package/dist/commands/inspect.d.ts +28 -0
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +113 -0
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/login.d.ts +8 -6
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +171 -89
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts.map +1 -1
- package/dist/commands/logout.js +4 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/plan.d.ts +8 -5
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +88 -63
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/policy.d.ts +53 -0
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +201 -5
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/quantify.d.ts +1 -1
- package/dist/commands/quantify.d.ts.map +1 -1
- package/dist/commands/quantify.js +2 -4
- package/dist/commands/quantify.js.map +1 -1
- package/dist/commands/simulate.d.ts +3 -2
- package/dist/commands/simulate.d.ts.map +1 -1
- package/dist/commands/simulate.js +154 -37
- package/dist/commands/simulate.js.map +1 -1
- package/dist/commands/usage.d.ts +3 -3
- package/dist/commands/usage.js +7 -7
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +44 -7
- package/dist/commands/whoami.js.map +1 -1
- package/dist/contracts/adr-002-operational-enforcement.d.ts +684 -0
- package/dist/contracts/adr-002-operational-enforcement.d.ts.map +1 -0
- package/dist/contracts/adr-002-operational-enforcement.js +671 -0
- package/dist/contracts/adr-002-operational-enforcement.js.map +1 -0
- package/dist/contracts/adr-003-governance-architecture.d.ts +766 -0
- package/dist/contracts/adr-003-governance-architecture.d.ts.map +1 -0
- package/dist/contracts/adr-003-governance-architecture.js +773 -0
- package/dist/contracts/adr-003-governance-architecture.js.map +1 -0
- package/dist/contracts/adr-004-enterprise-integration-memory.d.ts +1150 -0
- package/dist/contracts/adr-004-enterprise-integration-memory.d.ts.map +1 -0
- package/dist/contracts/adr-004-enterprise-integration-memory.js +1158 -0
- package/dist/contracts/adr-004-enterprise-integration-memory.js.map +1 -0
- package/dist/contracts/adr-005-system-coherence-drift-self-governance.d.ts +1393 -0
- package/dist/contracts/adr-005-system-coherence-drift-self-governance.d.ts.map +1 -0
- package/dist/contracts/adr-005-system-coherence-drift-self-governance.js +1371 -0
- package/dist/contracts/adr-005-system-coherence-drift-self-governance.js.map +1 -0
- package/dist/contracts/adr-command-semantics.d.ts +150 -0
- package/dist/contracts/adr-command-semantics.d.ts.map +1 -0
- package/dist/contracts/adr-command-semantics.js +984 -0
- package/dist/contracts/adr-command-semantics.js.map +1 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +16 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/enterprise/index.d.ts +16 -0
- package/dist/enterprise/index.d.ts.map +1 -0
- package/dist/enterprise/index.js +17 -0
- package/dist/enterprise/index.js.map +1 -0
- package/dist/enterprise/integration-registry.d.ts +73 -0
- package/dist/enterprise/integration-registry.d.ts.map +1 -0
- package/dist/enterprise/integration-registry.js +252 -0
- package/dist/enterprise/integration-registry.js.map +1 -0
- package/dist/enterprise/lineage.d.ts +73 -0
- package/dist/enterprise/lineage.d.ts.map +1 -0
- package/dist/enterprise/lineage.js +218 -0
- package/dist/enterprise/lineage.js.map +1 -0
- package/dist/gates/argument-guard.d.ts +39 -0
- package/dist/gates/argument-guard.d.ts.map +1 -0
- package/dist/gates/argument-guard.js +180 -0
- package/dist/gates/argument-guard.js.map +1 -0
- package/dist/gates/auth-session-gate.d.ts +47 -0
- package/dist/gates/auth-session-gate.d.ts.map +1 -0
- package/dist/gates/auth-session-gate.js +151 -0
- package/dist/gates/auth-session-gate.js.map +1 -0
- package/dist/gates/execution-gate.d.ts +12 -17
- package/dist/gates/execution-gate.d.ts.map +1 -1
- package/dist/gates/execution-gate.js +74 -46
- package/dist/gates/execution-gate.js.map +1 -1
- package/dist/gates/index.d.ts +25 -2
- package/dist/gates/index.d.ts.map +1 -1
- package/dist/gates/index.js +31 -2
- package/dist/gates/index.js.map +1 -1
- package/dist/gates/lineage-gate.d.ts +55 -0
- package/dist/gates/lineage-gate.d.ts.map +1 -0
- package/dist/gates/lineage-gate.js +127 -0
- package/dist/gates/lineage-gate.js.map +1 -0
- package/dist/gates/output-format-gate.d.ts +54 -0
- package/dist/gates/output-format-gate.d.ts.map +1 -0
- package/dist/gates/output-format-gate.js +136 -0
- package/dist/gates/output-format-gate.js.map +1 -0
- package/dist/gates/service-health-gate.d.ts +56 -0
- package/dist/gates/service-health-gate.d.ts.map +1 -0
- package/dist/gates/service-health-gate.js +179 -0
- package/dist/gates/service-health-gate.js.map +1 -0
- package/dist/modules/help-renderer.d.ts +25 -0
- package/dist/modules/help-renderer.d.ts.map +1 -0
- package/dist/modules/help-renderer.js +163 -0
- package/dist/modules/help-renderer.js.map +1 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +16 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/auth.d.ts.map +1 -1
- package/dist/server/routes/auth.js +45 -8
- package/dist/server/routes/auth.js.map +1 -1
- package/dist/server/routes/identity.d.ts +9 -0
- package/dist/server/routes/identity.d.ts.map +1 -0
- package/dist/server/routes/identity.js +100 -0
- package/dist/server/routes/identity.js.map +1 -0
- package/dist/server/routes/index.d.ts +2 -0
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +2 -0
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/lineage.d.ts +15 -0
- package/dist/server/routes/lineage.d.ts.map +1 -0
- package/dist/server/routes/lineage.js +128 -0
- package/dist/server/routes/lineage.js.map +1 -0
- package/dist/types/index.d.ts +134 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/identity-store.d.ts +31 -0
- package/dist/utils/identity-store.d.ts.map +1 -0
- package/dist/utils/identity-store.js +97 -0
- package/dist/utils/identity-store.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output Format Gate Module
|
|
3
|
+
*
|
|
4
|
+
* CONTROL PLANE HARDENING
|
|
5
|
+
*
|
|
6
|
+
* PURPOSE: Enforce strict JSON-only output for CLI operations.
|
|
7
|
+
* CLI MUST NOT produce narrative output for operational commands.
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL REQUIREMENTS:
|
|
10
|
+
* - Enforce strict JSON outputs
|
|
11
|
+
* - Never allow narrative output
|
|
12
|
+
* - Validate output format before rendering
|
|
13
|
+
*
|
|
14
|
+
* FORBIDDEN:
|
|
15
|
+
* - Narrative/prose output
|
|
16
|
+
* - Unstructured text responses
|
|
17
|
+
* - Human-readable summaries (for operational commands)
|
|
18
|
+
*/
|
|
19
|
+
import { EXIT_CODES } from '../types/index.js';
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Output Format Gate Configuration
|
|
22
|
+
// ============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Allowed output formats for operational commands.
|
|
25
|
+
* Only structured formats are permitted.
|
|
26
|
+
*/
|
|
27
|
+
const ALLOWED_STRUCTURED_FORMATS = new Set([
|
|
28
|
+
'json',
|
|
29
|
+
'yaml',
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Exit code for invalid output format.
|
|
33
|
+
*/
|
|
34
|
+
export const INVALID_FORMAT_EXIT_CODE = EXIT_CODES.DATA_FORMAT_ERROR;
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// Output Format Gate Error
|
|
37
|
+
// ============================================================================
|
|
38
|
+
export class InvalidOutputFormatError extends Error {
|
|
39
|
+
requestedFormat;
|
|
40
|
+
allowedFormats;
|
|
41
|
+
constructor(requestedFormat, allowedFormats) {
|
|
42
|
+
super(`\n` +
|
|
43
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
|
|
44
|
+
` INVALID OUTPUT FORMAT\n` +
|
|
45
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
|
|
46
|
+
`\n` +
|
|
47
|
+
` Requested format: ${requestedFormat}\n` +
|
|
48
|
+
` Allowed formats: ${allowedFormats.join(', ')}\n` +
|
|
49
|
+
`\n` +
|
|
50
|
+
` The CLI enforces strict JSON output for operational commands.\n` +
|
|
51
|
+
` Narrative output formats are not permitted.\n` +
|
|
52
|
+
`\n` +
|
|
53
|
+
` TO FIX:\n` +
|
|
54
|
+
`\n` +
|
|
55
|
+
` Use --format json (default) or --format yaml\n` +
|
|
56
|
+
`\n` +
|
|
57
|
+
` Example:\n` +
|
|
58
|
+
` agentics plan "my plan" --format json\n` +
|
|
59
|
+
`\n` +
|
|
60
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`);
|
|
61
|
+
this.name = 'InvalidOutputFormatError';
|
|
62
|
+
this.requestedFormat = requestedFormat;
|
|
63
|
+
this.allowedFormats = allowedFormats;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// Output Format Gate Implementation
|
|
68
|
+
// ============================================================================
|
|
69
|
+
/**
|
|
70
|
+
* Validate the requested output format.
|
|
71
|
+
* Only structured formats (json, yaml) are allowed for operational commands.
|
|
72
|
+
*/
|
|
73
|
+
export function checkOutputFormatGate(requestedFormat, command) {
|
|
74
|
+
// Default to JSON if no format specified
|
|
75
|
+
const format = requestedFormat ?? 'json';
|
|
76
|
+
// Check if format is allowed
|
|
77
|
+
if (requiresStructuredOutput(command) && !ALLOWED_STRUCTURED_FORMATS.has(format)) {
|
|
78
|
+
const allowedFormats = Array.from(ALLOWED_STRUCTURED_FORMATS);
|
|
79
|
+
return {
|
|
80
|
+
valid: false,
|
|
81
|
+
format,
|
|
82
|
+
exitCode: INVALID_FORMAT_EXIT_CODE,
|
|
83
|
+
message: new InvalidOutputFormatError(format, allowedFormats).message,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
valid: true,
|
|
88
|
+
format,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Enforce the output format gate.
|
|
93
|
+
* Exits the process if an invalid format is requested.
|
|
94
|
+
*/
|
|
95
|
+
export function enforceOutputFormatGate(requestedFormat, command) {
|
|
96
|
+
const result = checkOutputFormatGate(requestedFormat, command);
|
|
97
|
+
if (!result.valid) {
|
|
98
|
+
console.error(result.message);
|
|
99
|
+
process.exit(result.exitCode);
|
|
100
|
+
}
|
|
101
|
+
return result.format;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Commands that require structured (JSON/YAML) output.
|
|
105
|
+
* All operational commands require structured output.
|
|
106
|
+
* Identity and meta commands can use any format.
|
|
107
|
+
*/
|
|
108
|
+
const STRUCTURED_OUTPUT_COMMANDS = new Set([
|
|
109
|
+
'plan',
|
|
110
|
+
'simulate',
|
|
111
|
+
'inspect',
|
|
112
|
+
'quantify',
|
|
113
|
+
'deploy',
|
|
114
|
+
'export',
|
|
115
|
+
'diligence',
|
|
116
|
+
'usage',
|
|
117
|
+
'policy',
|
|
118
|
+
'erp',
|
|
119
|
+
]);
|
|
120
|
+
/**
|
|
121
|
+
* Check if a command requires structured output.
|
|
122
|
+
*/
|
|
123
|
+
export function requiresStructuredOutput(command) {
|
|
124
|
+
return STRUCTURED_OUTPUT_COMMANDS.has(command);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get the default output format for a command.
|
|
128
|
+
* Always returns 'json' for operational commands.
|
|
129
|
+
*/
|
|
130
|
+
export function getDefaultFormat(command) {
|
|
131
|
+
if (requiresStructuredOutput(command)) {
|
|
132
|
+
return 'json';
|
|
133
|
+
}
|
|
134
|
+
return 'text';
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=output-format-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-format-gate.js","sourceRoot":"","sources":["../../src/gates/output-format-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAqB,MAAM,mBAAmB,CAAC;AAElE,+EAA+E;AAC/E,mCAAmC;AACnC,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,0BAA0B,GAA8B,IAAI,GAAG,CAAC;IACpE,MAAM;IACN,MAAM;CACP,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC,iBAAiB,CAAC;AAErE,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACxC,eAAe,CAAS;IACxB,cAAc,CAAW;IAElC,YAAY,eAAuB,EAAE,cAAwB;QAC3D,KAAK,CACH,IAAI;YACJ,+EAA+E;YAC/E,2BAA2B;YAC3B,+EAA+E;YAC/E,IAAI;YACJ,uBAAuB,eAAe,IAAI;YAC1C,uBAAuB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACpD,IAAI;YACJ,mEAAmE;YACnE,iDAAiD;YACjD,IAAI;YACJ,aAAa;YACb,IAAI;YACJ,kDAAkD;YAClD,IAAI;YACJ,cAAc;YACd,6CAA6C;YAC7C,IAAI;YACJ,+EAA+E,CAChF,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;CACF;AAaD,+EAA+E;AAC/E,oCAAoC;AACpC,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,eA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9C,IAAI,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Health Gate Module
|
|
3
|
+
*
|
|
4
|
+
* CONTROL PLANE HARDENING
|
|
5
|
+
*
|
|
6
|
+
* PURPOSE: Validate Ruvector-backed service availability before ANY remote execution.
|
|
7
|
+
* This gate ensures the CLI NEVER executes against misconfigured or unavailable services.
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL REQUIREMENTS:
|
|
10
|
+
* - CLI MUST require Ruvector-backed services
|
|
11
|
+
* - CLI MUST fail loudly if services are misconfigured
|
|
12
|
+
* - Abort command if health check fails
|
|
13
|
+
*
|
|
14
|
+
* FORBIDDEN:
|
|
15
|
+
* - Fallback behavior
|
|
16
|
+
* - Local caching of results
|
|
17
|
+
* - Silent failures
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Exit code for service unavailable.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SERVICE_UNAVAILABLE_EXIT_CODE: 69;
|
|
23
|
+
export declare class ServiceHealthError extends Error {
|
|
24
|
+
readonly serviceName: string;
|
|
25
|
+
readonly healthCheckUrl: string;
|
|
26
|
+
readonly cause?: Error;
|
|
27
|
+
constructor(serviceName: string, healthCheckUrl: string, cause?: Error);
|
|
28
|
+
}
|
|
29
|
+
export interface ServiceHealthResult {
|
|
30
|
+
healthy: boolean;
|
|
31
|
+
service: string;
|
|
32
|
+
url: string;
|
|
33
|
+
latency?: number;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ServiceHealthGateResult {
|
|
37
|
+
passed: boolean;
|
|
38
|
+
results: ServiceHealthResult[];
|
|
39
|
+
exitCode?: number;
|
|
40
|
+
message?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Check if all critical services are healthy.
|
|
44
|
+
* Returns a structured result - does not exit the process.
|
|
45
|
+
*/
|
|
46
|
+
export declare function checkServiceHealthGate(): Promise<ServiceHealthGateResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Enforce the service health gate. Exits the process if any critical service is unhealthy.
|
|
49
|
+
* This is the HARD gate that blocks all operations if services are misconfigured.
|
|
50
|
+
*/
|
|
51
|
+
export declare function enforceServiceHealthGate(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Check if a command requires service health check.
|
|
54
|
+
*/
|
|
55
|
+
export declare function requiresHealthCheck(command: string): boolean;
|
|
56
|
+
//# sourceMappingURL=service-health-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-health-gate.d.ts","sourceRoot":"","sources":["../../src/gates/service-health-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAsBH;;GAEG;AACH,eAAO,MAAM,6BAA6B,IAAiC,CAAC;AAM5E,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEX,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAoCvE;AAMD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA4CD;;;GAGG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAgC/E;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC,CAO9D;AAoBD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Health Gate Module
|
|
3
|
+
*
|
|
4
|
+
* CONTROL PLANE HARDENING
|
|
5
|
+
*
|
|
6
|
+
* PURPOSE: Validate Ruvector-backed service availability before ANY remote execution.
|
|
7
|
+
* This gate ensures the CLI NEVER executes against misconfigured or unavailable services.
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL REQUIREMENTS:
|
|
10
|
+
* - CLI MUST require Ruvector-backed services
|
|
11
|
+
* - CLI MUST fail loudly if services are misconfigured
|
|
12
|
+
* - Abort command if health check fails
|
|
13
|
+
*
|
|
14
|
+
* FORBIDDEN:
|
|
15
|
+
* - Fallback behavior
|
|
16
|
+
* - Local caching of results
|
|
17
|
+
* - Silent failures
|
|
18
|
+
*/
|
|
19
|
+
import { loadEndpointConfig } from '../config/endpoints.js';
|
|
20
|
+
import { BaseAdapter } from '../adapters/base-adapter.js';
|
|
21
|
+
import { EXIT_CODES } from '../types/index.js';
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// Service Health Gate Configuration
|
|
24
|
+
// ============================================================================
|
|
25
|
+
/**
|
|
26
|
+
* Critical services that MUST be healthy before any operational command.
|
|
27
|
+
* Ruvector is the primary persistence layer - without it, operations cannot be verified.
|
|
28
|
+
*/
|
|
29
|
+
const CRITICAL_SERVICES = ['ruvector-service'];
|
|
30
|
+
/**
|
|
31
|
+
* Timeout for health checks (in milliseconds).
|
|
32
|
+
* Fast timeout - services should respond quickly if healthy.
|
|
33
|
+
*/
|
|
34
|
+
const HEALTH_CHECK_TIMEOUT_MS = 5000;
|
|
35
|
+
/**
|
|
36
|
+
* Exit code for service unavailable.
|
|
37
|
+
*/
|
|
38
|
+
export const SERVICE_UNAVAILABLE_EXIT_CODE = EXIT_CODES.SERVICE_UNAVAILABLE;
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Service Health Gate Error
|
|
41
|
+
// ============================================================================
|
|
42
|
+
export class ServiceHealthError extends Error {
|
|
43
|
+
serviceName;
|
|
44
|
+
healthCheckUrl;
|
|
45
|
+
cause;
|
|
46
|
+
constructor(serviceName, healthCheckUrl, cause) {
|
|
47
|
+
super(`\n` +
|
|
48
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
|
|
49
|
+
` SERVICE UNAVAILABLE\n` +
|
|
50
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n` +
|
|
51
|
+
`\n` +
|
|
52
|
+
` Service: ${serviceName}\n` +
|
|
53
|
+
` Health URL: ${healthCheckUrl}/health\n` +
|
|
54
|
+
` Status: UNREACHABLE\n` +
|
|
55
|
+
`\n` +
|
|
56
|
+
` The CLI requires this Ruvector-backed service to be available.\n` +
|
|
57
|
+
` All operational commands are blocked until the service is healthy.\n` +
|
|
58
|
+
`\n` +
|
|
59
|
+
` TROUBLESHOOTING:\n` +
|
|
60
|
+
`\n` +
|
|
61
|
+
` 1. Verify service deployment:\n` +
|
|
62
|
+
` Check that the Cloud Run service is deployed and running.\n` +
|
|
63
|
+
`\n` +
|
|
64
|
+
` 2. Check network connectivity:\n` +
|
|
65
|
+
` Ensure you have network access to the service URL.\n` +
|
|
66
|
+
`\n` +
|
|
67
|
+
` 3. Verify authentication:\n` +
|
|
68
|
+
` Run 'agentics whoami' to check authentication status.\n` +
|
|
69
|
+
`\n` +
|
|
70
|
+
` 4. Contact platform support:\n` +
|
|
71
|
+
` If the issue persists, contact the Agentics platform team.\n` +
|
|
72
|
+
`\n` +
|
|
73
|
+
(cause ? ` Error: ${cause.message}\n\n` : '') +
|
|
74
|
+
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`);
|
|
75
|
+
this.name = 'ServiceHealthError';
|
|
76
|
+
this.serviceName = serviceName;
|
|
77
|
+
this.healthCheckUrl = healthCheckUrl;
|
|
78
|
+
this.cause = cause;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// ============================================================================
|
|
82
|
+
// Service Health Gate Implementation
|
|
83
|
+
// ============================================================================
|
|
84
|
+
/**
|
|
85
|
+
* Check health of a single service.
|
|
86
|
+
* Returns structured result - does not throw.
|
|
87
|
+
*/
|
|
88
|
+
async function checkServiceHealth(serviceName) {
|
|
89
|
+
const startTime = Date.now();
|
|
90
|
+
try {
|
|
91
|
+
const config = loadEndpointConfig(serviceName);
|
|
92
|
+
const adapter = new BaseAdapter({
|
|
93
|
+
serviceName,
|
|
94
|
+
config: {
|
|
95
|
+
...config,
|
|
96
|
+
timeout: HEALTH_CHECK_TIMEOUT_MS,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
const healthResult = await adapter.health();
|
|
100
|
+
return {
|
|
101
|
+
healthy: healthResult.healthy,
|
|
102
|
+
service: serviceName,
|
|
103
|
+
url: config.baseUrl,
|
|
104
|
+
latency: Date.now() - startTime,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
return {
|
|
109
|
+
healthy: false,
|
|
110
|
+
service: serviceName,
|
|
111
|
+
url: 'unknown',
|
|
112
|
+
latency: Date.now() - startTime,
|
|
113
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Check if all critical services are healthy.
|
|
119
|
+
* Returns a structured result - does not exit the process.
|
|
120
|
+
*/
|
|
121
|
+
export async function checkServiceHealthGate() {
|
|
122
|
+
const results = [];
|
|
123
|
+
// Check all critical services in parallel
|
|
124
|
+
const healthChecks = CRITICAL_SERVICES.map(service => checkServiceHealth(service));
|
|
125
|
+
const healthResults = await Promise.all(healthChecks);
|
|
126
|
+
for (const result of healthResults) {
|
|
127
|
+
results.push(result);
|
|
128
|
+
}
|
|
129
|
+
// Gate passes only if ALL critical services are healthy
|
|
130
|
+
const unhealthyServices = results.filter(r => !r.healthy);
|
|
131
|
+
if (unhealthyServices.length > 0) {
|
|
132
|
+
const failedService = unhealthyServices[0];
|
|
133
|
+
return {
|
|
134
|
+
passed: false,
|
|
135
|
+
results,
|
|
136
|
+
exitCode: SERVICE_UNAVAILABLE_EXIT_CODE,
|
|
137
|
+
message: new ServiceHealthError(failedService.service, failedService.url, failedService.error ? new Error(failedService.error) : undefined).message,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
passed: true,
|
|
142
|
+
results,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Enforce the service health gate. Exits the process if any critical service is unhealthy.
|
|
147
|
+
* This is the HARD gate that blocks all operations if services are misconfigured.
|
|
148
|
+
*/
|
|
149
|
+
export async function enforceServiceHealthGate() {
|
|
150
|
+
const result = await checkServiceHealthGate();
|
|
151
|
+
if (!result.passed) {
|
|
152
|
+
console.error(result.message);
|
|
153
|
+
process.exit(result.exitCode);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Commands that require service health check.
|
|
158
|
+
* All operational commands require healthy services.
|
|
159
|
+
* Identity commands (login, logout, whoami) and meta commands (help, version) do NOT require health checks.
|
|
160
|
+
*/
|
|
161
|
+
const HEALTH_CHECK_REQUIRED_COMMANDS = new Set([
|
|
162
|
+
'plan',
|
|
163
|
+
'simulate',
|
|
164
|
+
'inspect',
|
|
165
|
+
'quantify',
|
|
166
|
+
'deploy',
|
|
167
|
+
'export',
|
|
168
|
+
'diligence',
|
|
169
|
+
'usage',
|
|
170
|
+
'policy',
|
|
171
|
+
'erp',
|
|
172
|
+
]);
|
|
173
|
+
/**
|
|
174
|
+
* Check if a command requires service health check.
|
|
175
|
+
*/
|
|
176
|
+
export function requiresHealthCheck(command) {
|
|
177
|
+
return HEALTH_CHECK_REQUIRED_COMMANDS.has(command);
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=service-health-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-health-gate.js","sourceRoot":"","sources":["../../src/gates/service-health-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,+EAA+E;AAC/E,oCAAoC;AACpC,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AAExD;;;GAGG;AACH,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,CAAC,mBAAmB,CAAC;AAE5E,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAClC,WAAW,CAAS;IACpB,cAAc,CAAS;IACvB,KAAK,CAAS;IAEvB,YAAY,WAAmB,EAAE,cAAsB,EAAE,KAAa;QACpE,KAAK,CACH,IAAI;YACJ,+EAA+E;YAC/E,yBAAyB;YACzB,+EAA+E;YAC/E,IAAI;YACJ,kBAAkB,WAAW,IAAI;YACjC,kBAAkB,cAAc,WAAW;YAC3C,8BAA8B;YAC9B,IAAI;YACJ,oEAAoE;YACpE,wEAAwE;YACxE,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AAC,KAAK,UAAU,wBAAwB;IAC5C,MAAM,MAAM,GAAG,MAAM,sBAAsB,EAAE,CAAC;IAE9C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACnB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IAC7C,MAAM;IACN,UAAU;IACV,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,OAAO;IACP,QAAQ;IACR,KAAK;CACN,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,OAAO,8BAA8B,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Renderer — Auto-Generated from ADR-001
|
|
3
|
+
*
|
|
4
|
+
* This module renders CLI help output directly from the command registry
|
|
5
|
+
* defined in adr-command-semantics.ts. No hand-maintained help strings.
|
|
6
|
+
*
|
|
7
|
+
* The ADR is the single source of truth for:
|
|
8
|
+
* - Command descriptions
|
|
9
|
+
* - Argument names and types
|
|
10
|
+
* - Synthesis classification
|
|
11
|
+
* - Examples
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Render the top-level help screen.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderHelp(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Render help for a specific command (including all its subcommands).
|
|
19
|
+
*/
|
|
20
|
+
export declare function renderCommandHelp(primary: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Render help for a specific command + subcommand.
|
|
23
|
+
*/
|
|
24
|
+
export declare function renderSubcommandHelp(primary: string, subcommand: string): string;
|
|
25
|
+
//# sourceMappingURL=help-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-renderer.d.ts","sourceRoot":"","sources":["../../src/modules/help-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAcH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAwCnC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmCzD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAYhF"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Renderer — Auto-Generated from ADR-001
|
|
3
|
+
*
|
|
4
|
+
* This module renders CLI help output directly from the command registry
|
|
5
|
+
* defined in adr-command-semantics.ts. No hand-maintained help strings.
|
|
6
|
+
*
|
|
7
|
+
* The ADR is the single source of truth for:
|
|
8
|
+
* - Command descriptions
|
|
9
|
+
* - Argument names and types
|
|
10
|
+
* - Synthesis classification
|
|
11
|
+
* - Examples
|
|
12
|
+
*/
|
|
13
|
+
import { COMMAND_REGISTRY, getSubcommands, lookupCommand, } from '../contracts/adr-command-semantics.js';
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Help Rendering
|
|
16
|
+
// ============================================================================
|
|
17
|
+
/**
|
|
18
|
+
* Render the top-level help screen.
|
|
19
|
+
*/
|
|
20
|
+
export function renderHelp() {
|
|
21
|
+
const lines = [];
|
|
22
|
+
lines.push('Agentics CLI — Enterprise Orchestration Platform');
|
|
23
|
+
lines.push('');
|
|
24
|
+
lines.push('USAGE:');
|
|
25
|
+
lines.push(' agentics <command> [subcommand] [args] [options]');
|
|
26
|
+
lines.push('');
|
|
27
|
+
lines.push('COMMANDS:');
|
|
28
|
+
// Group commands by primary
|
|
29
|
+
const groups = groupByPrimary();
|
|
30
|
+
for (const [primary, specs] of groups) {
|
|
31
|
+
const mainSpec = specs.find(s => !s.subcommand) ?? specs[0];
|
|
32
|
+
const label = primary.padEnd(14);
|
|
33
|
+
const desc = mainSpec.description;
|
|
34
|
+
const tag = formatSynthesisTag(mainSpec.synthesis);
|
|
35
|
+
lines.push(` ${label} ${desc} ${tag}`);
|
|
36
|
+
}
|
|
37
|
+
lines.push('');
|
|
38
|
+
lines.push('ARGUMENT TYPES:');
|
|
39
|
+
lines.push(' <id> Stable identifier (lowercase, hyphenated, or UUID)');
|
|
40
|
+
lines.push(' "<description>" Quoted natural language (seeds synthesis)');
|
|
41
|
+
lines.push(' latest Read-only selector keyword');
|
|
42
|
+
lines.push('');
|
|
43
|
+
lines.push('SYNTHESIS TAGS:');
|
|
44
|
+
lines.push(' [synth] Command invokes LLM synthesis');
|
|
45
|
+
lines.push(' [commit] Irreversible command (requires ID + confirmation)');
|
|
46
|
+
lines.push(' (unmarked) Read-only or identity command, no synthesis');
|
|
47
|
+
lines.push('');
|
|
48
|
+
lines.push('GLOBAL OPTIONS:');
|
|
49
|
+
lines.push(' --verbose Enable verbose output');
|
|
50
|
+
lines.push(' --format <fmt> Output format: json | yaml | text');
|
|
51
|
+
lines.push(' --help Show help for a specific command');
|
|
52
|
+
lines.push('');
|
|
53
|
+
lines.push('Run `agentics <command> --help` for command-specific help.');
|
|
54
|
+
return lines.join('\n');
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Render help for a specific command (including all its subcommands).
|
|
58
|
+
*/
|
|
59
|
+
export function renderCommandHelp(primary) {
|
|
60
|
+
const specs = getSubcommands(primary);
|
|
61
|
+
if (specs.length === 0) {
|
|
62
|
+
return `Unknown command: ${primary}\n\nRun \`agentics help\` to see available commands.`;
|
|
63
|
+
}
|
|
64
|
+
const lines = [];
|
|
65
|
+
lines.push(`agentics ${primary} — ${specs[0].description}`);
|
|
66
|
+
lines.push('');
|
|
67
|
+
if (specs.length === 1 && !specs[0].subcommand) {
|
|
68
|
+
// Single command, no subcommands
|
|
69
|
+
lines.push(...renderSpecDetail(specs[0]));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
lines.push('SUBCOMMANDS:');
|
|
73
|
+
lines.push('');
|
|
74
|
+
for (const spec of specs) {
|
|
75
|
+
if (spec.subcommand) {
|
|
76
|
+
lines.push(...renderSpecDetail(spec));
|
|
77
|
+
lines.push('');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
// Also show main command if it has args
|
|
81
|
+
const mainSpec = specs.find(s => !s.subcommand);
|
|
82
|
+
if (mainSpec !== undefined && mainSpec.args.length > 0) {
|
|
83
|
+
lines.push('DEFAULT (no subcommand):');
|
|
84
|
+
lines.push(...renderSpecDetail(mainSpec));
|
|
85
|
+
lines.push('');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return lines.join('\n');
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Render help for a specific command + subcommand.
|
|
92
|
+
*/
|
|
93
|
+
export function renderSubcommandHelp(primary, subcommand) {
|
|
94
|
+
const spec = lookupCommand(primary, subcommand);
|
|
95
|
+
if (!spec) {
|
|
96
|
+
return `Unknown subcommand: ${primary} ${subcommand}\n\n` +
|
|
97
|
+
`Run \`agentics ${primary} --help\` to see available subcommands.`;
|
|
98
|
+
}
|
|
99
|
+
const lines = [];
|
|
100
|
+
lines.push(`agentics ${spec.command}`);
|
|
101
|
+
lines.push('');
|
|
102
|
+
lines.push(...renderSpecDetail(spec));
|
|
103
|
+
return lines.join('\n');
|
|
104
|
+
}
|
|
105
|
+
// ============================================================================
|
|
106
|
+
// Internal Rendering Helpers
|
|
107
|
+
// ============================================================================
|
|
108
|
+
function renderSpecDetail(spec) {
|
|
109
|
+
const lines = [];
|
|
110
|
+
const tag = formatSynthesisTag(spec.synthesis);
|
|
111
|
+
const subcmd = spec.subcommand ?? '';
|
|
112
|
+
lines.push(` ${subcmd.padEnd(12)} ${spec.description} ${tag}`);
|
|
113
|
+
if (spec.args.length > 0) {
|
|
114
|
+
const usage = spec.args
|
|
115
|
+
.map(a => a.required ? `<${a.name}>` : `[${a.name}]`)
|
|
116
|
+
.join(' ');
|
|
117
|
+
lines.push(` Usage: agentics ${spec.command} ${usage}`);
|
|
118
|
+
for (const arg of spec.args) {
|
|
119
|
+
const typeLabel = formatArgumentTypeLabel(arg.type);
|
|
120
|
+
lines.push(` ${`<${arg.name}>`.padEnd(20)} ${typeLabel} ${arg.description}`);
|
|
121
|
+
lines.push(` ${''.padEnd(20)} Example: ${arg.example}`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (spec.irreversible) {
|
|
125
|
+
lines.push(` WARNING: This command is irreversible.`);
|
|
126
|
+
}
|
|
127
|
+
if (spec.requiresConfirmation) {
|
|
128
|
+
lines.push(` Requires explicit confirmation (--force or interactive).`);
|
|
129
|
+
}
|
|
130
|
+
return lines;
|
|
131
|
+
}
|
|
132
|
+
function formatSynthesisTag(synthesis) {
|
|
133
|
+
switch (synthesis) {
|
|
134
|
+
case 'SYNTHESIS_REQUIRED':
|
|
135
|
+
return '[synth]';
|
|
136
|
+
case 'COMMITMENT_GRADE':
|
|
137
|
+
return '[commit]';
|
|
138
|
+
case 'SYNTHESIS_FORBIDDEN':
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function formatArgumentTypeLabel(type) {
|
|
143
|
+
switch (type) {
|
|
144
|
+
case 'ID':
|
|
145
|
+
return '(ID)';
|
|
146
|
+
case 'NATURAL_LANGUAGE':
|
|
147
|
+
return '(text)';
|
|
148
|
+
case 'SELECTOR':
|
|
149
|
+
return '(selector)';
|
|
150
|
+
default:
|
|
151
|
+
return '';
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function groupByPrimary() {
|
|
155
|
+
const groups = new Map();
|
|
156
|
+
for (const spec of COMMAND_REGISTRY) {
|
|
157
|
+
const existing = groups.get(spec.primary) ?? [];
|
|
158
|
+
existing.push(spec);
|
|
159
|
+
groups.set(spec.primary, existing);
|
|
160
|
+
}
|
|
161
|
+
return groups;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=help-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-renderer.js","sourceRoot":"","sources":["../../src/modules/help-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,aAAa,GAGd,MAAM,uCAAuC,CAAC;AAE/C,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;IAC/D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrB,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IACjE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAExB,4BAA4B;IAC5B,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAEhC,KAAK,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,CAAC,CAAE,CAAC;QAC7D,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,CAAC;QAClC,MAAM,GAAG,GAAG,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC,CAA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AI,gBAAgB,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAChD,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/modules/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export { ArtifactHandoff, createArtifactHandoff, isPlanReference, isSimulationRe
|
|
|
11
11
|
export type { IArtifactHandoff } from './artifact-handoff.js';
|
|
12
12
|
export { OutputRenderer, createOutputRenderer } from './output-renderer.js';
|
|
13
13
|
export type { IOutputRenderer } from './output-renderer.js';
|
|
14
|
+
export { renderHelp, renderCommandHelp, renderSubcommandHelp } from './help-renderer.js';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExG,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC1L,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3F,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExG,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC1L,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/modules/index.js
CHANGED
|
@@ -7,4 +7,5 @@ export { CommandParser, createCommandParser, SUPPORTED_COMMANDS } from './comman
|
|
|
7
7
|
export { OrchestrationEngine, createOrchestrationEngine } from './orchestration-engine.js';
|
|
8
8
|
export { ArtifactHandoff, createArtifactHandoff, isPlanReference, isSimulationReference, isIntentReference, isExportReference, isDiligencePackageReference } from './artifact-handoff.js';
|
|
9
9
|
export { OutputRenderer, createOutputRenderer } from './output-renderer.js';
|
|
10
|
+
export { renderHelp, renderCommandHelp, renderSubcommandHelp } from './help-renderer.js';
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG7F,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAG1L,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAG7F,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAG1L,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* - GET /ready - Readiness check
|
|
10
10
|
* - POST /v1/cli/auth/sessions - OAuth device flow session creation
|
|
11
11
|
* - GET /v1/cli/auth/sessions/:code - Poll auth status
|
|
12
|
+
* - GET /v1/identity/whoami - Identity resolution (user + org + role)
|
|
13
|
+
* - POST /v1/identity/check-permission - Server-side permission check
|
|
12
14
|
* - POST /v1/simulate - Simulation engine (inspect command)
|
|
13
15
|
* - POST /v1/manifests - Manifests service (plan command)
|
|
14
16
|
* - POST /v1/plans - Planner service (plan command)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAwB5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAoJvB,OAAO,EAAE,GAAG,EAAE,CAAC;AACf,eAAe,GAAG,CAAC"}
|