@phenixstar/talon 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.
Files changed (112) hide show
  1. package/.env.example +72 -0
  2. package/Dockerfile +161 -0
  3. package/Dockerfile.router +16 -0
  4. package/LICENSE +661 -0
  5. package/README.md +709 -0
  6. package/bin/talon.js +96 -0
  7. package/bin/talon.mjs +96 -0
  8. package/configs/config-schema.json +160 -0
  9. package/configs/example-config.yaml +50 -0
  10. package/configs/mcp-allowlist.json +47 -0
  11. package/configs/model-routing.yaml +39 -0
  12. package/configs/router-config.json +73 -0
  13. package/configs/talon-seccomp.json +89 -0
  14. package/dist/cli/dependency-checker.d.ts +25 -0
  15. package/dist/cli/dependency-checker.d.ts.map +1 -0
  16. package/dist/cli/dependency-checker.js +165 -0
  17. package/dist/cli/dependency-checker.js.map +1 -0
  18. package/dist/cli/doctor.d.ts +2 -0
  19. package/dist/cli/doctor.d.ts.map +1 -0
  20. package/dist/cli/doctor.js +127 -0
  21. package/dist/cli/doctor.js.map +1 -0
  22. package/dist/cli/env-configurator.d.ts +27 -0
  23. package/dist/cli/env-configurator.d.ts.map +1 -0
  24. package/dist/cli/env-configurator.js +115 -0
  25. package/dist/cli/env-configurator.js.map +1 -0
  26. package/dist/cli/setup-renderer.d.ts +23 -0
  27. package/dist/cli/setup-renderer.d.ts.map +1 -0
  28. package/dist/cli/setup-renderer.js +71 -0
  29. package/dist/cli/setup-renderer.js.map +1 -0
  30. package/dist/cli/setup.d.ts +2 -0
  31. package/dist/cli/setup.d.ts.map +1 -0
  32. package/dist/cli/setup.js +302 -0
  33. package/dist/cli/setup.js.map +1 -0
  34. package/dist/types/activity-logger.d.ts +10 -0
  35. package/dist/types/activity-logger.d.ts.map +1 -0
  36. package/dist/types/activity-logger.js +7 -0
  37. package/dist/types/activity-logger.js.map +1 -0
  38. package/dist/types/agents.d.ts +39 -0
  39. package/dist/types/agents.d.ts.map +1 -0
  40. package/dist/types/agents.js +28 -0
  41. package/dist/types/agents.js.map +1 -0
  42. package/dist/types/audit.d.ts +28 -0
  43. package/dist/types/audit.d.ts.map +1 -0
  44. package/dist/types/audit.js +7 -0
  45. package/dist/types/audit.js.map +1 -0
  46. package/dist/types/backtesting.d.ts +45 -0
  47. package/dist/types/backtesting.d.ts.map +1 -0
  48. package/dist/types/backtesting.js +3 -0
  49. package/dist/types/backtesting.js.map +1 -0
  50. package/dist/types/config.d.ts +48 -0
  51. package/dist/types/config.d.ts.map +1 -0
  52. package/dist/types/config.js +7 -0
  53. package/dist/types/config.js.map +1 -0
  54. package/dist/types/errors.d.ts +55 -0
  55. package/dist/types/errors.d.ts.map +1 -0
  56. package/dist/types/errors.js +41 -0
  57. package/dist/types/errors.js.map +1 -0
  58. package/dist/types/evolution.d.ts +36 -0
  59. package/dist/types/evolution.d.ts.map +1 -0
  60. package/dist/types/evolution.js +14 -0
  61. package/dist/types/evolution.js.map +1 -0
  62. package/dist/types/index.d.ts +11 -0
  63. package/dist/types/index.d.ts.map +1 -0
  64. package/dist/types/index.js +16 -0
  65. package/dist/types/index.js.map +1 -0
  66. package/dist/types/metrics.d.ts +13 -0
  67. package/dist/types/metrics.d.ts.map +1 -0
  68. package/dist/types/metrics.js +7 -0
  69. package/dist/types/metrics.js.map +1 -0
  70. package/dist/types/resilience.d.ts +30 -0
  71. package/dist/types/resilience.d.ts.map +1 -0
  72. package/dist/types/resilience.js +7 -0
  73. package/dist/types/resilience.js.map +1 -0
  74. package/dist/types/result.d.ts +42 -0
  75. package/dist/types/result.d.ts.map +1 -0
  76. package/dist/types/result.js +30 -0
  77. package/dist/types/result.js.map +1 -0
  78. package/docker-compose.yml +91 -0
  79. package/package.json +75 -0
  80. package/prompts/exploit-auth.txt +423 -0
  81. package/prompts/exploit-authz.txt +425 -0
  82. package/prompts/exploit-injection.txt +452 -0
  83. package/prompts/exploit-ssrf.txt +502 -0
  84. package/prompts/exploit-xss.txt +442 -0
  85. package/prompts/pipeline-testing/exploit-auth.txt +31 -0
  86. package/prompts/pipeline-testing/exploit-authz.txt +31 -0
  87. package/prompts/pipeline-testing/exploit-injection.txt +31 -0
  88. package/prompts/pipeline-testing/exploit-ssrf.txt +31 -0
  89. package/prompts/pipeline-testing/exploit-xss.txt +31 -0
  90. package/prompts/pipeline-testing/pre-recon-code.txt +1 -0
  91. package/prompts/pipeline-testing/recon.txt +1 -0
  92. package/prompts/pipeline-testing/report-executive.txt +1 -0
  93. package/prompts/pipeline-testing/vuln-auth.txt +13 -0
  94. package/prompts/pipeline-testing/vuln-authz.txt +13 -0
  95. package/prompts/pipeline-testing/vuln-injection.txt +13 -0
  96. package/prompts/pipeline-testing/vuln-ssrf.txt +13 -0
  97. package/prompts/pipeline-testing/vuln-xss.txt +13 -0
  98. package/prompts/pre-recon-code.txt +403 -0
  99. package/prompts/recon.txt +382 -0
  100. package/prompts/report-executive.txt +126 -0
  101. package/prompts/shared/_exploit-scope.txt +14 -0
  102. package/prompts/shared/_rules.txt +2 -0
  103. package/prompts/shared/_target.txt +1 -0
  104. package/prompts/shared/_vuln-scope.txt +1 -0
  105. package/prompts/shared/login-instructions.txt +82 -0
  106. package/prompts/vuln-auth.txt +268 -0
  107. package/prompts/vuln-authz.txt +373 -0
  108. package/prompts/vuln-injection.txt +380 -0
  109. package/prompts/vuln-ssrf.txt +315 -0
  110. package/prompts/vuln-xss.txt +304 -0
  111. package/talon +459 -0
  112. package/talon.ps1 +348 -0
package/bin/talon.js ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Talon CLI — global entry point for `npx @phenixstar/talon` or `talon` (if installed globally).
5
+ * Routes to the appropriate TypeScript-compiled command in dist/cli/.
6
+ */
7
+
8
+ import { execSync, spawn } from 'node:child_process';
9
+ import { existsSync } from 'node:fs';
10
+ import { dirname, resolve } from 'node:path';
11
+ import { fileURLToPath } from 'node:url';
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const root = resolve(__dirname, '..');
15
+
16
+ const [,, command, ...args] = process.argv;
17
+
18
+ const COMMANDS = {
19
+ setup: 'dist/cli/setup.js',
20
+ doctor: 'dist/cli/doctor.js',
21
+ help: null,
22
+ start: null,
23
+ stop: null,
24
+ logs: null,
25
+ workspaces: null,
26
+ benchmark: null,
27
+ evolve: null,
28
+ };
29
+
30
+ function showHelp() {
31
+ console.log(`
32
+ Talon — AI Penetration Testing Framework
33
+
34
+ Usage:
35
+ talon setup Interactive setup wizard
36
+ talon doctor Validate configuration and dependencies
37
+ talon start URL=<url> REPO=<name> Start a pentest workflow
38
+ talon stop Stop all containers
39
+ talon stop CLEAN=true Stop + remove volumes
40
+ talon workspaces List all workspaces
41
+ talon logs ID=<workflow-id> Tail workflow logs
42
+ talon benchmark TARGET=<name> Run benchmark metrics
43
+ talon evolve GENERATIONS=<n> Run evolution generations
44
+ talon help Show this help
45
+
46
+ Options for 'start':
47
+ REPO=<name> Folder under ./repos/
48
+ CONFIG=<path> YAML config file
49
+ OUTPUT=<path> Output directory (default: ./audit-logs/)
50
+ WORKSPACE=<name> Named workspace (auto-resume)
51
+ PIPELINE_TESTING=true Fast testing mode
52
+ ROUTER=true Multi-model routing
53
+
54
+ Examples:
55
+ talon setup
56
+ talon start URL=https://example.com REPO=my-app
57
+ talon start URL=https://example.com REPO=my-app WORKSPACE=q1-audit
58
+ `);
59
+ }
60
+
61
+ // 1. Handle help
62
+ if (!command || command === 'help' || command === '--help' || command === '-h') {
63
+ showHelp();
64
+ process.exit(0);
65
+ }
66
+
67
+ // 2. Handle TypeScript CLI commands (setup, doctor)
68
+ const cliScript = COMMANDS[command];
69
+ if (cliScript) {
70
+ const scriptPath = resolve(root, cliScript);
71
+ if (!existsSync(scriptPath)) {
72
+ console.error(`Error: ${cliScript} not found. Run 'npm run build' first.`);
73
+ process.exit(1);
74
+ }
75
+ const child = spawn('node', [scriptPath, ...args], {
76
+ cwd: root,
77
+ stdio: 'inherit',
78
+ });
79
+ child.on('exit', (code) => process.exit(code ?? 0));
80
+ } else if (command in COMMANDS) {
81
+ // 3. Delegate Docker-based commands to the bash script
82
+ const talonSh = resolve(root, 'talon');
83
+ if (!existsSync(talonSh)) {
84
+ console.error('Error: talon bash script not found. Are you in the project directory?');
85
+ process.exit(1);
86
+ }
87
+ const child = spawn('bash', [talonSh, command, ...args], {
88
+ cwd: root,
89
+ stdio: 'inherit',
90
+ });
91
+ child.on('exit', (code) => process.exit(code ?? 0));
92
+ } else {
93
+ console.error(`Unknown command: ${command}`);
94
+ showHelp();
95
+ process.exit(1);
96
+ }
package/bin/talon.mjs ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Talon CLI — global entry point for `npx @phenixstar/talon` or `talon` (if installed globally).
5
+ * Routes to the appropriate TypeScript-compiled command in dist/cli/.
6
+ */
7
+
8
+ import { execSync, spawn } from 'node:child_process';
9
+ import { existsSync } from 'node:fs';
10
+ import { dirname, resolve } from 'node:path';
11
+ import { fileURLToPath } from 'node:url';
12
+
13
+ const __dirname = dirname(fileURLToPath(import.meta.url));
14
+ const root = resolve(__dirname, '..');
15
+
16
+ const [,, command, ...args] = process.argv;
17
+
18
+ const COMMANDS = {
19
+ setup: 'dist/cli/setup.js',
20
+ doctor: 'dist/cli/doctor.js',
21
+ help: null,
22
+ start: null,
23
+ stop: null,
24
+ logs: null,
25
+ workspaces: null,
26
+ benchmark: null,
27
+ evolve: null,
28
+ };
29
+
30
+ function showHelp() {
31
+ console.log(`
32
+ Talon — AI Penetration Testing Framework
33
+
34
+ Usage:
35
+ talon setup Interactive setup wizard
36
+ talon doctor Validate configuration and dependencies
37
+ talon start URL=<url> REPO=<name> Start a pentest workflow
38
+ talon stop Stop all containers
39
+ talon stop CLEAN=true Stop + remove volumes
40
+ talon workspaces List all workspaces
41
+ talon logs ID=<workflow-id> Tail workflow logs
42
+ talon benchmark TARGET=<name> Run benchmark metrics
43
+ talon evolve GENERATIONS=<n> Run evolution generations
44
+ talon help Show this help
45
+
46
+ Options for 'start':
47
+ REPO=<name> Folder under ./repos/
48
+ CONFIG=<path> YAML config file
49
+ OUTPUT=<path> Output directory (default: ./audit-logs/)
50
+ WORKSPACE=<name> Named workspace (auto-resume)
51
+ PIPELINE_TESTING=true Fast testing mode
52
+ ROUTER=true Multi-model routing
53
+
54
+ Examples:
55
+ talon setup
56
+ talon start URL=https://example.com REPO=my-app
57
+ talon start URL=https://example.com REPO=my-app WORKSPACE=q1-audit
58
+ `);
59
+ }
60
+
61
+ // 1. Handle help
62
+ if (!command || command === 'help' || command === '--help' || command === '-h') {
63
+ showHelp();
64
+ process.exit(0);
65
+ }
66
+
67
+ // 2. Handle TypeScript CLI commands (setup, doctor)
68
+ const cliScript = COMMANDS[command];
69
+ if (cliScript) {
70
+ const scriptPath = resolve(root, cliScript);
71
+ if (!existsSync(scriptPath)) {
72
+ console.error(`Error: ${cliScript} not found. Run 'npm run build' first.`);
73
+ process.exit(1);
74
+ }
75
+ const child = spawn('node', [scriptPath, ...args], {
76
+ cwd: root,
77
+ stdio: 'inherit',
78
+ });
79
+ child.on('exit', (code) => process.exit(code ?? 0));
80
+ } else if (command in COMMANDS) {
81
+ // 3. Delegate Docker-based commands to the bash script
82
+ const talonSh = resolve(root, 'talon');
83
+ if (!existsSync(talonSh)) {
84
+ console.error('Error: talon bash script not found. Are you in the project directory?');
85
+ process.exit(1);
86
+ }
87
+ const child = spawn('bash', [talonSh, command, ...args], {
88
+ cwd: root,
89
+ stdio: 'inherit',
90
+ });
91
+ child.on('exit', (code) => process.exit(code ?? 0));
92
+ } else {
93
+ console.error(`Unknown command: ${command}`);
94
+ showHelp();
95
+ process.exit(1);
96
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://example.com/pentest-config-schema.json",
4
+ "title": "Penetration Testing Configuration Schema",
5
+ "description": "Schema for YAML configuration files used in the penetration testing agent",
6
+ "type": "object",
7
+ "properties": {
8
+ "authentication": {
9
+ "type": "object",
10
+ "description": "Authentication configuration for the target application",
11
+ "properties": {
12
+ "login_type": {
13
+ "type": "string",
14
+ "enum": ["form", "sso", "api", "basic"],
15
+ "description": "Type of authentication mechanism"
16
+ },
17
+ "login_url": {
18
+ "type": "string",
19
+ "format": "uri",
20
+ "description": "URL for the login page or endpoint"
21
+ },
22
+ "credentials": {
23
+ "type": "object",
24
+ "description": "Login credentials",
25
+ "properties": {
26
+ "username": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 255,
30
+ "description": "Username or email for authentication"
31
+ },
32
+ "password": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "maxLength": 255,
36
+ "description": "Password for authentication"
37
+ },
38
+ "totp_secret": {
39
+ "type": "string",
40
+ "pattern": "^[A-Za-z2-7]+=*$",
41
+ "description": "TOTP secret for two-factor authentication (Base32 encoded, case insensitive)"
42
+ }
43
+ },
44
+ "required": ["username", "password"],
45
+ "additionalProperties": false
46
+ },
47
+ "login_flow": {
48
+ "type": "array",
49
+ "description": "Step-by-step instructions for the login process",
50
+ "items": {
51
+ "type": "string",
52
+ "minLength": 1,
53
+ "maxLength": 500
54
+ },
55
+ "minItems": 1,
56
+ "maxItems": 20
57
+ },
58
+ "success_condition": {
59
+ "type": "object",
60
+ "description": "Condition that indicates successful authentication",
61
+ "properties": {
62
+ "type": {
63
+ "type": "string",
64
+ "enum": ["url_contains", "element_present", "url_equals_exactly", "text_contains"],
65
+ "description": "Type of success condition to check"
66
+ },
67
+ "value": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 500,
71
+ "description": "Value to match against the success condition"
72
+ }
73
+ },
74
+ "required": ["type", "value"],
75
+ "additionalProperties": false
76
+ }
77
+ },
78
+ "required": ["login_type", "login_url", "credentials", "success_condition"],
79
+ "additionalProperties": false
80
+ },
81
+ "pipeline": {
82
+ "type": "object",
83
+ "description": "Pipeline execution settings for retry behavior and concurrency",
84
+ "properties": {
85
+ "retry_preset": {
86
+ "type": "string",
87
+ "enum": ["default", "subscription"],
88
+ "description": "Retry preset. 'subscription' extends timeouts for Anthropic subscription rate limit windows (5h+)."
89
+ },
90
+ "max_concurrent_pipelines": {
91
+ "type": "string",
92
+ "pattern": "^[1-5]$",
93
+ "description": "Max concurrent vulnerability pipelines (1-5, default: 5)"
94
+ }
95
+ },
96
+ "additionalProperties": false
97
+ },
98
+ "rules": {
99
+ "type": "object",
100
+ "description": "Testing rules that define what to focus on or avoid during penetration testing",
101
+ "properties": {
102
+ "avoid": {
103
+ "type": "array",
104
+ "description": "Rules defining areas to avoid during testing",
105
+ "items": {
106
+ "$ref": "#/$defs/rule"
107
+ },
108
+ "maxItems": 50
109
+ },
110
+ "focus": {
111
+ "type": "array",
112
+ "description": "Rules defining areas to focus on during testing",
113
+ "items": {
114
+ "$ref": "#/$defs/rule"
115
+ },
116
+ "maxItems": 50
117
+ }
118
+ },
119
+ "additionalProperties": false
120
+ },
121
+ "login": {
122
+ "type": "object",
123
+ "description": "Deprecated: Use 'authentication' section instead",
124
+ "deprecated": true
125
+ }
126
+ },
127
+ "anyOf": [
128
+ {"required": ["authentication"]},
129
+ {"required": ["rules"]},
130
+ {"required": ["authentication", "rules"]}
131
+ ],
132
+ "additionalProperties": false,
133
+ "$defs": {
134
+ "rule": {
135
+ "type": "object",
136
+ "description": "A single testing rule",
137
+ "properties": {
138
+ "description": {
139
+ "type": "string",
140
+ "minLength": 1,
141
+ "maxLength": 200,
142
+ "description": "Human-readable description of the rule"
143
+ },
144
+ "type": {
145
+ "type": "string",
146
+ "enum": ["path", "subdomain", "domain", "method", "header", "parameter"],
147
+ "description": "Type of rule (what aspect of requests to match against)"
148
+ },
149
+ "url_path": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 1000,
153
+ "description": "URL path pattern or value to match"
154
+ }
155
+ },
156
+ "required": ["description", "type", "url_path"],
157
+ "additionalProperties": false
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,50 @@
1
+ # Example configuration file for pentest-agent
2
+ # Copy this file and modify it for your specific testing needs
3
+
4
+ authentication:
5
+ login_type: form # Options: 'form' or 'sso'
6
+ login_url: "https://example.com/login"
7
+ credentials:
8
+ username: "testuser"
9
+ password: "testpassword"
10
+ totp_secret: "JBSWY3DPEHPK3PXP" # Optional TOTP secret for 2FA
11
+
12
+ # Natural language instructions for login flow
13
+ login_flow:
14
+ - "Type $username into the email field"
15
+ - "Type $password into the password field"
16
+ - "Click the 'Sign In' button"
17
+ - "Enter $totp in the verification code field"
18
+ - "Click 'Verify'"
19
+
20
+ success_condition:
21
+ type: url_contains # Options: 'url_contains' or 'element_present'
22
+ value: "/dashboard"
23
+
24
+ rules:
25
+ avoid:
26
+ - description: "Do not test the marketing site subdomain"
27
+ type: subdomain
28
+ url_path: "www"
29
+
30
+ - description: "Skip logout functionality"
31
+ type: path
32
+ url_path: "/logout"
33
+
34
+ - description: "No DELETE operations on user API"
35
+ type: path
36
+ url_path: "/api/v1/users/*"
37
+
38
+ focus:
39
+ - description: "Prioritize beta admin panel subdomain"
40
+ type: subdomain
41
+ url_path: "beta-admin"
42
+
43
+ - description: "Focus on user profile updates"
44
+ type: path
45
+ url_path: "/api/v2/user-profile"
46
+
47
+ # Pipeline execution settings (optional)
48
+ # pipeline:
49
+ # retry_preset: subscription # 'default' or 'subscription' (6h max retry for rate limit recovery)
50
+ # max_concurrent_pipelines: 2 # 1-5, default: 5 (reduce to lower API usage spikes)
@@ -0,0 +1,47 @@
1
+ {
2
+ "modes": {
3
+ "reconnaissance": {
4
+ "allowed": [
5
+ "nmap", "subfinder", "whatweb", "httpx",
6
+ "browser_navigate", "browser_snapshot", "browser_click",
7
+ "browser_type", "browser_wait_for", "browser_take_screenshot",
8
+ "save_deliverable", "list_deliverables"
9
+ ]
10
+ },
11
+ "exploitation": {
12
+ "allowed": [
13
+ "browser_navigate", "browser_snapshot", "browser_click",
14
+ "browser_type", "browser_fill_form", "browser_wait_for",
15
+ "browser_take_screenshot", "browser_evaluate",
16
+ "save_deliverable", "list_deliverables",
17
+ "generate_totp"
18
+ ]
19
+ },
20
+ "reporting": {
21
+ "allowed": [
22
+ "save_deliverable", "list_deliverables",
23
+ "browser_take_screenshot"
24
+ ]
25
+ },
26
+ "all": {
27
+ "allowed": [
28
+ "nmap", "subfinder", "whatweb", "httpx",
29
+ "browser_navigate", "browser_snapshot", "browser_click",
30
+ "browser_type", "browser_fill_form", "browser_wait_for",
31
+ "browser_take_screenshot", "browser_evaluate",
32
+ "save_deliverable", "list_deliverables",
33
+ "generate_totp"
34
+ ]
35
+ }
36
+ },
37
+ "denied": [
38
+ "exec", "shell", "python_eval", "eval",
39
+ "bash", "sh", "cmd", "powershell"
40
+ ],
41
+ "rateLimits": {
42
+ "nmap": { "maxPerMinute": 2 },
43
+ "browser_navigate": { "maxPerMinute": 30 },
44
+ "browser_evaluate": { "maxPerMinute": 10 },
45
+ "save_deliverable": { "maxPerMinute": 20 }
46
+ }
47
+ }
@@ -0,0 +1,39 @@
1
+ # Model routing configuration for multi-LLM orchestration.
2
+ # Each pipeline phase routes to the optimal model based on task requirements.
3
+ #
4
+ # Format: primary model attempted first; fallback used on provider failure.
5
+ # Model IDs must match provider catalog in router-config.json.
6
+
7
+ routes:
8
+ # Pre-recon: code analysis needs deep reasoning
9
+ pre-recon:
10
+ primary: claude-opus-4-6
11
+ fallback: claude-sonnet-4-6
12
+
13
+ # Recon: tool-heavy scanning, moderate reasoning
14
+ recon:
15
+ primary: claude-sonnet-4-6
16
+ fallback: claude-haiku-4-5-20251001
17
+
18
+ # Vulnerability analysis: deep reasoning for complex vuln patterns
19
+ vulnerability-analysis:
20
+ primary: claude-sonnet-4-6
21
+ fallback: claude-haiku-4-5-20251001
22
+
23
+ # Exploitation: highest capability needed for exploit generation
24
+ exploitation:
25
+ primary: claude-opus-4-6
26
+ fallback: claude-sonnet-4-6
27
+
28
+ # Reporting: structured extraction, moderate reasoning
29
+ reporting:
30
+ primary: claude-sonnet-4-6
31
+ fallback: claude-haiku-4-5-20251001
32
+
33
+ # Budget guard: halt execution if cumulative cost exceeds this threshold (USD)
34
+ spending_cap_per_run: 10.00
35
+
36
+ # Circuit breaker settings
37
+ circuit_breaker:
38
+ failure_threshold: 3 # consecutive failures before marking unhealthy
39
+ recovery_timeout_ms: 30000 # ms before retrying unhealthy provider
@@ -0,0 +1,73 @@
1
+ {
2
+ "HOST": "0.0.0.0",
3
+ "APIKEY": "$TALON_ROUTER_KEY",
4
+ "LOG": true,
5
+ "LOG_LEVEL": "info",
6
+ "NON_INTERACTIVE_MODE": true,
7
+ "API_TIMEOUT_MS": 3000000,
8
+ "Providers": [
9
+ {
10
+ "name": "openrouter",
11
+ "api_base_url": "https://openrouter.ai/api/v1/chat/completions",
12
+ "api_key": "$OPENROUTER_API_KEY",
13
+ "models": [
14
+ "anthropic/claude-opus-4-6",
15
+ "anthropic/claude-sonnet-4-6",
16
+ "anthropic/claude-haiku-4-5-20251001",
17
+ "google/gemini-3-flash-preview",
18
+ "meta-llama/llama-4-maverick"
19
+ ],
20
+ "transformer": {
21
+ "use": ["openrouter"]
22
+ }
23
+ },
24
+ {
25
+ "name": "groq",
26
+ "api_base_url": "https://api.groq.com/openai/v1/chat/completions",
27
+ "api_key": "$GROQ_API_KEY",
28
+ "models": ["llama-3.3-70b-versatile", "mixtral-8x7b-32768"],
29
+ "transformer": {
30
+ "use": [["maxcompletiontokens", { "max_completion_tokens": 32768 }]]
31
+ }
32
+ },
33
+ {
34
+ "name": "xai",
35
+ "api_base_url": "https://api.x.ai/v1/chat/completions",
36
+ "api_key": "$XAI_API_KEY",
37
+ "models": ["grok-3", "grok-3-mini"],
38
+ "transformer": {
39
+ "use": [["maxcompletiontokens", { "max_completion_tokens": 32768 }]]
40
+ }
41
+ },
42
+ {
43
+ "name": "kimi",
44
+ "api_base_url": "https://api.moonshot.cn/v1/chat/completions",
45
+ "api_key": "$KIMI_API_KEY",
46
+ "models": ["moonshot-v1-128k"],
47
+ "transformer": {
48
+ "use": [["maxcompletiontokens", { "max_completion_tokens": 16384 }]]
49
+ }
50
+ },
51
+ {
52
+ "name": "minimax",
53
+ "api_base_url": "https://api.minimax.io/v1/chat/completions",
54
+ "api_key": "$MINIMAX_HIGHSPEED_API_KEY",
55
+ "models": ["MiniMax-M2.5-highspeed", "MiniMax-M2.5"],
56
+ "transformer": {
57
+ "use": [["maxcompletiontokens", { "max_completion_tokens": 16384 }]]
58
+ }
59
+ },
60
+ {
61
+ "name": "z-ai",
62
+ "api_base_url": "https://api.z.ai/api/coding/paas/v4/chat/completions",
63
+ "api_key": "$ZAI_CODING_PLAN_API_KEY",
64
+ "models": ["GLM-4.7", "GLM-4.5-Air"],
65
+ "transformer": {
66
+ "use": [["maxcompletiontokens", { "max_completion_tokens": 16384 }]]
67
+ }
68
+ }
69
+ ],
70
+ "Router": {
71
+ "default": "$ROUTER_DEFAULT"
72
+ }
73
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "defaultAction": "SCMP_ACT_ERRNO",
3
+ "defaultErrnoRet": 1,
4
+ "archMap": [
5
+ {
6
+ "architecture": "SCMP_ARCH_X86_64",
7
+ "subArchitectures": ["SCMP_ARCH_X86", "SCMP_ARCH_X32"]
8
+ }
9
+ ],
10
+ "syscalls": [
11
+ {
12
+ "names": [
13
+ "accept", "accept4", "access", "arch_prctl", "bind", "brk",
14
+ "capget", "capset", "chdir", "clock_getres", "clock_gettime",
15
+ "clock_nanosleep", "clone", "clone3", "close", "close_range",
16
+ "connect", "copy_file_range",
17
+ "dup", "dup2", "dup3",
18
+ "epoll_create1", "epoll_ctl", "epoll_pwait", "epoll_pwait2", "epoll_wait",
19
+ "eventfd2", "execve", "execveat", "exit", "exit_group",
20
+ "faccessat", "faccessat2", "fadvise64", "fallocate",
21
+ "fcntl", "flock", "fork", "fstat", "fstatfs", "fsync",
22
+ "ftruncate", "futex", "futex_waitv",
23
+ "getcwd", "getdents64", "getegid", "geteuid", "getgid",
24
+ "getgroups", "getpeername", "getpgid", "getpgrp", "getpid",
25
+ "getppid", "getpriority", "getrandom", "getresgid", "getresuid",
26
+ "getrlimit", "getrusage", "getsid", "getsockname", "getsockopt",
27
+ "gettid", "gettimeofday", "getuid", "getxattr",
28
+ "inotify_add_watch", "inotify_init1", "inotify_rm_watch",
29
+ "ioctl", "io_uring_enter", "io_uring_register", "io_uring_setup",
30
+ "kill",
31
+ "lgetxattr", "link", "linkat", "listen", "lseek", "lstat",
32
+ "madvise", "membarrier", "memfd_create", "mincore",
33
+ "mkdir", "mkdirat", "mlock", "mlock2", "mlockall",
34
+ "mmap", "mprotect", "mremap", "msync", "munlock", "munlockall", "munmap",
35
+ "name_to_handle_at", "nanosleep", "newfstatat",
36
+ "open", "openat", "openat2",
37
+ "pause", "pipe", "pipe2", "poll", "ppoll",
38
+ "prctl", "pread64", "preadv", "preadv2", "prlimit64",
39
+ "pselect6", "pwrite64", "pwritev", "pwritev2",
40
+ "read", "readahead", "readlink", "readlinkat", "readv",
41
+ "recvfrom", "recvmmsg", "recvmsg",
42
+ "remap_file_pages", "renameat", "renameat2",
43
+ "restart_syscall", "rmdir",
44
+ "rseq",
45
+ "rt_sigaction", "rt_sigpending", "rt_sigprocmask",
46
+ "rt_sigqueueinfo", "rt_sigreturn", "rt_sigsuspend",
47
+ "rt_sigtimedwait",
48
+ "sched_getaffinity", "sched_getattr", "sched_getparam",
49
+ "sched_get_priority_max", "sched_get_priority_min",
50
+ "sched_getscheduler", "sched_setaffinity", "sched_yield",
51
+ "seccomp",
52
+ "select", "sendfile", "sendmmsg", "sendmsg", "sendto",
53
+ "set_robust_list", "set_tid_address",
54
+ "setfsgid", "setfsuid", "setgid", "setgroups",
55
+ "setitimer", "setpgid", "setpriority",
56
+ "setregid", "setresgid", "setresuid", "setreuid",
57
+ "setrlimit", "setsid", "setsockopt", "settimeofday",
58
+ "setuid",
59
+ "shutdown",
60
+ "sigaltstack",
61
+ "signalfd4",
62
+ "socket", "socketpair", "splice",
63
+ "stat", "statfs", "statx",
64
+ "symlink", "symlinkat",
65
+ "sync", "sync_file_range", "syncfs",
66
+ "sysinfo",
67
+ "tgkill", "timerfd_create", "timerfd_gettime", "timerfd_settime",
68
+ "times", "tkill",
69
+ "truncate",
70
+ "umask", "uname", "unlink", "unlinkat", "unshare",
71
+ "utime", "utimensat",
72
+ "vfork",
73
+ "wait4", "waitid",
74
+ "write", "writev"
75
+ ],
76
+ "action": "SCMP_ACT_ALLOW"
77
+ },
78
+ {
79
+ "comment": "Log but allow ptrace for Chromium sandbox",
80
+ "names": ["ptrace"],
81
+ "action": "SCMP_ACT_LOG"
82
+ },
83
+ {
84
+ "comment": "Log but allow process_vm ops for Chromium debugging",
85
+ "names": ["process_vm_readv", "process_vm_writev"],
86
+ "action": "SCMP_ACT_LOG"
87
+ }
88
+ ]
89
+ }
@@ -0,0 +1,25 @@
1
+ export interface DependencyStatus {
2
+ name: string;
3
+ required: boolean;
4
+ installed: boolean;
5
+ version: string | null;
6
+ minVersion: string | null;
7
+ versionOk: boolean;
8
+ installHint: string;
9
+ }
10
+ export type RunMode = 'docker' | 'bare-metal';
11
+ /** Parse a version string like "v22.11.0" or "Docker version 27.5.1, build abc" into semver parts */
12
+ export declare function parseVersion(raw: string): string | null;
13
+ /** Compare two semver strings: returns true if actual >= required */
14
+ export declare function versionSatisfies(actual: string, required: string): boolean;
15
+ /** Check if Docker daemon is running (not just installed) */
16
+ export declare function isDockerRunning(): boolean;
17
+ /** Check available disk space in GB */
18
+ export declare function checkDiskSpaceGb(): number | null;
19
+ /** Run all dependency checks for the given run mode */
20
+ export declare function checkAllDependencies(mode: RunMode): DependencyStatus[];
21
+ /** Detect recommended run mode based on available tools */
22
+ export declare function detectRunMode(): RunMode;
23
+ /** Check if repos directory exists */
24
+ export declare function hasReposDir(): boolean;
25
+ //# sourceMappingURL=dependency-checker.d.ts.map