erosolar-cli 2.1.194 → 2.1.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +11 -51
  2. package/dist/contracts/agent-schemas.json +0 -21
  3. package/dist/contracts/tools.schema.json +0 -16
  4. package/dist/core/agentOrchestrator.d.ts +14 -18
  5. package/dist/core/agentOrchestrator.d.ts.map +1 -1
  6. package/dist/core/agentOrchestrator.js +120 -175
  7. package/dist/core/agentOrchestrator.js.map +1 -1
  8. package/dist/plugins/tools/nodeDefaults.d.ts.map +1 -1
  9. package/dist/plugins/tools/nodeDefaults.js +0 -4
  10. package/dist/plugins/tools/nodeDefaults.js.map +1 -1
  11. package/dist/shell/interactiveShell.d.ts +4 -8
  12. package/dist/shell/interactiveShell.d.ts.map +1 -1
  13. package/dist/shell/interactiveShell.js +77 -268
  14. package/dist/shell/interactiveShell.js.map +1 -1
  15. package/package.json +1 -1
  16. package/agents/erosolar-security.rules.json +0 -147
  17. package/dist/capabilities/offsecOpsCapability.d.ts +0 -6
  18. package/dist/capabilities/offsecOpsCapability.d.ts.map +0 -1
  19. package/dist/capabilities/offsecOpsCapability.js +0 -19
  20. package/dist/capabilities/offsecOpsCapability.js.map +0 -1
  21. package/dist/capabilities/offsecSearchCapability.d.ts +0 -12
  22. package/dist/capabilities/offsecSearchCapability.d.ts.map +0 -1
  23. package/dist/capabilities/offsecSearchCapability.js +0 -27
  24. package/dist/capabilities/offsecSearchCapability.js.map +0 -1
  25. package/dist/core/offsecAlphaZero.d.ts +0 -59
  26. package/dist/core/offsecAlphaZero.d.ts.map +0 -1
  27. package/dist/core/offsecAlphaZero.js +0 -556
  28. package/dist/core/offsecAlphaZero.js.map +0 -1
  29. package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts +0 -3
  30. package/dist/plugins/tools/offsec/offsecOpsPlugin.d.ts.map +0 -1
  31. package/dist/plugins/tools/offsec/offsecOpsPlugin.js +0 -10
  32. package/dist/plugins/tools/offsec/offsecOpsPlugin.js.map +0 -1
  33. package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts +0 -3
  34. package/dist/plugins/tools/offsec/offsecSearchPlugin.d.ts.map +0 -1
  35. package/dist/plugins/tools/offsec/offsecSearchPlugin.js +0 -12
  36. package/dist/plugins/tools/offsec/offsecSearchPlugin.js.map +0 -1
  37. package/dist/tools/offsec/offsecOperationsTools.d.ts +0 -3
  38. package/dist/tools/offsec/offsecOperationsTools.d.ts.map +0 -1
  39. package/dist/tools/offsec/offsecOperationsTools.js +0 -333
  40. package/dist/tools/offsec/offsecOperationsTools.js.map +0 -1
  41. package/dist/tools/offsecSearchTools.d.ts +0 -3
  42. package/dist/tools/offsecSearchTools.d.ts.map +0 -1
  43. package/dist/tools/offsecSearchTools.js +0 -330
  44. package/dist/tools/offsecSearchTools.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erosolar-cli",
3
- "version": "2.1.194",
3
+ "version": "2.1.196",
4
4
  "description": "Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning",
5
5
  "main": "dist/bin/erosolar.js",
6
6
  "type": "module",
@@ -1,147 +0,0 @@
1
- {
2
- "$schema": "../src/contracts/schemas/agent-rules.schema.json",
3
- "contractVersion": "1.0.0",
4
- "profile": "erosolar-security",
5
- "version": "2024-11-24",
6
- "label": "Erosolar Security Agent Rulebook",
7
- "description": "Guardrails for security-focused workflows in controlled environments. Emphasizes auditable planning, explicit scoping, and non-destructive defaults.",
8
- "globalPrinciples": [
9
- {
10
- "id": "sec.scope_and_intent",
11
- "summary": "Always confirm scope, targets, and authorization before proposing offensive actions. Default to lab/simulation unless explicitly stated otherwise.",
12
- "severity": "critical"
13
- },
14
- {
15
- "id": "sec.audit_trail",
16
- "summary": "Narrate intent before each tool use and summarize results after. Keep steps reproducible and bounded.",
17
- "severity": "required"
18
- },
19
- {
20
- "id": "sec.non_destructive_default",
21
- "summary": "Avoid destructive changes. Prefer read-only enumeration, simulation, and offline planning unless explicitly permitted.",
22
- "severity": "critical"
23
- },
24
- {
25
- "id": "sec.data_minimization",
26
- "summary": "Collect only what is needed to advance the engagement plan. Do not exfiltrate bulk data.",
27
- "severity": "required"
28
- },
29
- {
30
- "id": "sec.evidence_based",
31
- "summary": "Ground all findings in evidence (scan output, logs, file paths). Avoid speculation; ask for missing evidence.",
32
- "severity": "critical"
33
- },
34
- {
35
- "id": "sec.validation_path",
36
- "summary": "For exploit plans, state preconditions, payload choice rationale, and expected outcomes. Provide rollback/abort steps.",
37
- "severity": "required"
38
- }
39
- ],
40
- "phases": [
41
- {
42
- "id": "recon",
43
- "label": "Reconnaissance",
44
- "description": "Triage assets, services, and trust boundaries. Identify likely choke points and authentication flows.",
45
- "steps": [
46
- {
47
- "id": "step.enumerate",
48
- "title": "Enumerate assets",
49
- "intent": "Enumerate assets and entry points; cluster by network segment and auth surface.",
50
- "rules": [
51
- {
52
- "id": "rule.recon.scope",
53
- "summary": "Confirm target scope before scanning. Use read-only tools by default.",
54
- "severity": "critical"
55
- }
56
- ]
57
- },
58
- {
59
- "id": "step.prioritize",
60
- "title": "Prioritize targets",
61
- "intent": "Prioritize paths with high privilege gain vs. detection risk.",
62
- "rules": [
63
- {
64
- "id": "rule.recon.evidence",
65
- "summary": "Document findings with evidence (scan output, service versions).",
66
- "severity": "required"
67
- }
68
- ]
69
- }
70
- ]
71
- },
72
- {
73
- "id": "attack_graph",
74
- "label": "Attack Graph",
75
- "description": "Construct and refine attack paths before execution.",
76
- "steps": [
77
- {
78
- "id": "step.model",
79
- "title": "Model attack paths",
80
- "intent": "Model nodes (assets/identities) and edges (exploits/misconfigs).",
81
- "rules": [
82
- {
83
- "id": "rule.graph.validation",
84
- "summary": "Use attack_path_search to rank viable paths with cost/reward/detection trade-offs.",
85
- "severity": "required"
86
- }
87
- ]
88
- },
89
- {
90
- "id": "step.select",
91
- "title": "Select paths",
92
- "intent": "Select top candidates and define validation checkpoints.",
93
- "rules": [
94
- {
95
- "id": "rule.graph.checkpoint",
96
- "summary": "Define validation checkpoints and abort criteria for each path.",
97
- "severity": "required"
98
- }
99
- ]
100
- }
101
- ]
102
- },
103
- {
104
- "id": "payload_selection",
105
- "label": "Payload Selection",
106
- "description": "Schedule payloads to maximize signal with minimal risk.",
107
- "steps": [
108
- {
109
- "id": "step.schedule",
110
- "title": "Schedule payloads",
111
- "intent": "Use payload_scheduler with recent outcomes to rank payloads.",
112
- "rules": [
113
- {
114
- "id": "rule.payload.noise",
115
- "summary": "Prefer low-noise probes first; escalate only if needed.",
116
- "severity": "required"
117
- }
118
- ]
119
- }
120
- ]
121
- },
122
- {
123
- "id": "reporting",
124
- "label": "Reporting",
125
- "description": "Document findings, evidence, and mitigations.",
126
- "steps": [
127
- {
128
- "id": "step.document",
129
- "title": "Document findings",
130
- "intent": "Capture reproduction steps and affected assets.",
131
- "rules": [
132
- {
133
- "id": "rule.report.evidence",
134
- "summary": "Include reproduction steps, evidence, and affected assets.",
135
- "severity": "required"
136
- },
137
- {
138
- "id": "rule.report.mitigations",
139
- "summary": "List mitigations, compensating controls, and detection guidance.",
140
- "severity": "required"
141
- }
142
- ]
143
- }
144
- ]
145
- }
146
- ]
147
- }
@@ -1,6 +0,0 @@
1
- import type { CapabilityContribution, CapabilityModule } from '../runtime/agentHost.js';
2
- export declare class OffsecOperationsCapabilityModule implements CapabilityModule {
3
- readonly id = "capability.offsec.operations";
4
- create(): Promise<CapabilityContribution>;
5
- }
6
- //# sourceMappingURL=offsecOpsCapability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offsecOpsCapability.d.ts","sourceRoot":"","sources":["../../src/capabilities/offsecOpsCapability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3G,qBAAa,gCAAiC,YAAW,gBAAgB;IACvE,QAAQ,CAAC,EAAE,kCAAkC;IAEvC,MAAM,IAAI,OAAO,CAAC,sBAAsB,CAAC;CAehD"}
@@ -1,19 +0,0 @@
1
- export class OffsecOperationsCapabilityModule {
2
- id = 'capability.offsec.operations';
3
- async create() {
4
- return {
5
- id: 'offsec.operations',
6
- description: 'Offensive operations capability has been removed for this deployment.',
7
- toolSuite: {
8
- id: 'offsec-operations',
9
- description: 'Removed offensive security operations',
10
- tools: [],
11
- },
12
- metadata: {
13
- workingDir: '',
14
- scope: 'offensive-security-disabled',
15
- },
16
- };
17
- }
18
- }
19
- //# sourceMappingURL=offsecOpsCapability.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offsecOpsCapability.js","sourceRoot":"","sources":["../../src/capabilities/offsecOpsCapability.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,gCAAgC;IAClC,EAAE,GAAG,8BAA8B,CAAC;IAE7C,KAAK,CAAC,MAAM;QACV,OAAO;YACL,EAAE,EAAE,mBAAmB;YACvB,WAAW,EAAE,uEAAuE;YACpF,SAAS,EAAE;gBACT,EAAE,EAAE,mBAAmB;gBACvB,WAAW,EAAE,uCAAuC;gBACpD,KAAK,EAAE,EAAE;aACV;YACD,QAAQ,EAAE;gBACR,UAAU,EAAE,EAAE;gBACd,KAAK,EAAE,6BAA6B;aACrC;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,12 +0,0 @@
1
- import type { CapabilityContribution, CapabilityContext, CapabilityModule } from '../runtime/agentHost.js';
2
- /**
3
- * Offensive search capability
4
- *
5
- * Provides offline attack-path search and payload scheduling utilities.
6
- * Designed for lab/offline planning—no network operations.
7
- */
8
- export declare class OffsecSearchCapabilityModule implements CapabilityModule {
9
- readonly id = "capability.offsec.search";
10
- create(context: CapabilityContext): Promise<CapabilityContribution>;
11
- }
12
- //# sourceMappingURL=offsecSearchCapability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offsecSearchCapability.d.ts","sourceRoot":"","sources":["../../src/capabilities/offsecSearchCapability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3G;;;;;GAKG;AACH,qBAAa,4BAA6B,YAAW,gBAAgB;IACnE,QAAQ,CAAC,EAAE,8BAA8B;IAEnC,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAgB1E"}
@@ -1,27 +0,0 @@
1
- import { createOffsecSearchTools } from '../tools/offsecSearchTools.js';
2
- /**
3
- * Offensive search capability
4
- *
5
- * Provides offline attack-path search and payload scheduling utilities.
6
- * Designed for lab/offline planning—no network operations.
7
- */
8
- export class OffsecSearchCapabilityModule {
9
- id = 'capability.offsec.search';
10
- async create(context) {
11
- const tools = createOffsecSearchTools();
12
- return {
13
- id: 'offsec.search',
14
- description: 'Attack-graph search and payload scheduling for offensive planning (offline).',
15
- toolSuite: {
16
- id: 'offsec-search',
17
- description: 'Offensive search helpers',
18
- tools,
19
- },
20
- metadata: {
21
- workingDir: context.workingDir,
22
- scope: 'offline-planning',
23
- },
24
- };
25
- }
26
- }
27
- //# sourceMappingURL=offsecSearchCapability.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offsecSearchCapability.js","sourceRoot":"","sources":["../../src/capabilities/offsecSearchCapability.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;;;;;GAKG;AACH,MAAM,OAAO,4BAA4B;IAC9B,EAAE,GAAG,0BAA0B,CAAC;IAEzC,KAAK,CAAC,MAAM,CAAC,OAA0B;QACrC,MAAM,KAAK,GAAG,uBAAuB,EAAE,CAAC;QACxC,OAAO;YACL,EAAE,EAAE,eAAe;YACnB,WAAW,EAAE,8EAA8E;YAC3F,SAAS,EAAE;gBACT,EAAE,EAAE,eAAe;gBACnB,WAAW,EAAE,0BAA0B;gBACvC,KAAK;aACN;YACD,QAAQ,EAAE;gBACR,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,kBAAkB;aAC1B;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,59 +0,0 @@
1
- /**
2
- * AlphaZero-style offensive security coordinator.
3
- *
4
- * Provides a lightweight Monte Carlo style scorer over an action tree so
5
- * runs can be started, resumed, and updated with outcomes (success/fail/detected).
6
- * The goal is to keep a "sensible" frontier of next actions, reward progress,
7
- * and persist state so a long red-team style engagement can be paused/resumed.
8
- */
9
- export type OffsecOutcome = 'success' | 'fail' | 'detected';
10
- export type OffsecActionCategory = 'recon' | 'web' | 'creds' | 'payload' | 'lateral' | 'privilege' | 'cloud';
11
- export interface OffsecActionNode {
12
- id: string;
13
- label: string;
14
- category: OffsecActionCategory;
15
- command: string;
16
- rationale: string;
17
- prior: number;
18
- successPrior: number;
19
- detectionRisk: number;
20
- cost: number;
21
- parentId: string | null;
22
- children: string[];
23
- visits: number;
24
- valueSum: number;
25
- status: 'pending' | 'succeeded' | 'failed' | 'detected';
26
- note?: string;
27
- }
28
- export interface OffsecRun {
29
- id: string;
30
- objective: string;
31
- scope: string[];
32
- rootId: string;
33
- nodes: Record<string, OffsecActionNode>;
34
- createdAt: string;
35
- updatedAt: string;
36
- nextCounter: number;
37
- }
38
- export interface OffsecSuggestion {
39
- id: string;
40
- label: string;
41
- category: OffsecActionCategory;
42
- command: string;
43
- rationale: string;
44
- score: number;
45
- path: string[];
46
- status: OffsecActionNode['status'];
47
- }
48
- export declare function startOffsecRun(objective: string, scope?: string[]): OffsecRun;
49
- export declare function resumeOffsecRun(runId?: string | null): OffsecRun | null;
50
- export declare function listOffsecRuns(): Array<{
51
- id: string;
52
- objective: string;
53
- updatedAt: string;
54
- }>;
55
- export declare function recordOffsecOutcome(runId: string, actionId: string, outcome: OffsecOutcome, note?: string): OffsecRun | null;
56
- export declare function getOffsecNextActions(runId: string, count?: number): OffsecSuggestion[];
57
- export declare function simulateOffsecRollout(runId: string, steps?: number): OffsecSuggestion[];
58
- export declare function formatOffsecStatus(run: OffsecRun, next?: OffsecSuggestion[]): string;
59
- //# sourceMappingURL=offsecAlphaZero.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"offsecAlphaZero.d.ts","sourceRoot":"","sources":["../../src/core/offsecAlphaZero.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAE5D,MAAM,MAAM,oBAAoB,GAC5B,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,GACX,OAAO,CAAC;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;CACpC;AAubD,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,EAAO,GAAG,SAAS,CAkCjF;AAED,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAQvE;AAED,wBAAgB,cAAc,IAAI,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAc5F;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,aAAa,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ,SAAS,GAAG,IAAI,CAgClB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,gBAAgB,EAAE,CAMjF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,gBAAgB,EAAE,CAqBlF;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,GAAE,gBAAgB,EAAO,GAAG,MAAM,CAuBxF"}