@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAMA;;GAEG;AAEH;;;;;;GAMG;AACH,oBAAY,SAAS;IAEnB,gBAAgB,qBAAqB;IACrC,wBAAwB,6BAA6B;IACrD,kBAAkB,uBAAuB;IAGzC,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;IAGrD,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,oBAAoB,yBAAyB;IAG7C,qBAAqB,0BAA0B;IAC/C,mBAAmB,wBAAwB;IAG3C,kBAAkB,uBAAuB;IAGzC,qBAAqB,0BAA0B;IAG/C,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;CAChC;AAED,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,SAAS,GACT,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,gBAAgB,CAAC;QACvB,SAAS,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;CACd"}
@@ -0,0 +1,41 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ /**
7
+ * Error type definitions
8
+ */
9
+ /**
10
+ * Specific error codes for reliable classification.
11
+ *
12
+ * ErrorCode provides precision within the coarse 8-category PentestErrorType.
13
+ * Used by classifyErrorForTemporal for code-based classification (preferred)
14
+ * with string matching as fallback for external errors.
15
+ */
16
+ export var ErrorCode;
17
+ (function (ErrorCode) {
18
+ // Config errors (PentestErrorType: 'config')
19
+ ErrorCode["CONFIG_NOT_FOUND"] = "CONFIG_NOT_FOUND";
20
+ ErrorCode["CONFIG_VALIDATION_FAILED"] = "CONFIG_VALIDATION_FAILED";
21
+ ErrorCode["CONFIG_PARSE_ERROR"] = "CONFIG_PARSE_ERROR";
22
+ // Agent execution errors (PentestErrorType: 'validation')
23
+ ErrorCode["AGENT_EXECUTION_FAILED"] = "AGENT_EXECUTION_FAILED";
24
+ ErrorCode["OUTPUT_VALIDATION_FAILED"] = "OUTPUT_VALIDATION_FAILED";
25
+ // Billing errors (PentestErrorType: 'billing')
26
+ ErrorCode["API_RATE_LIMITED"] = "API_RATE_LIMITED";
27
+ ErrorCode["SPENDING_CAP_REACHED"] = "SPENDING_CAP_REACHED";
28
+ ErrorCode["INSUFFICIENT_CREDITS"] = "INSUFFICIENT_CREDITS";
29
+ // Git errors (PentestErrorType: 'filesystem')
30
+ ErrorCode["GIT_CHECKPOINT_FAILED"] = "GIT_CHECKPOINT_FAILED";
31
+ ErrorCode["GIT_ROLLBACK_FAILED"] = "GIT_ROLLBACK_FAILED";
32
+ // Prompt errors (PentestErrorType: 'prompt')
33
+ ErrorCode["PROMPT_LOAD_FAILED"] = "PROMPT_LOAD_FAILED";
34
+ // Validation errors (PentestErrorType: 'validation')
35
+ ErrorCode["DELIVERABLE_NOT_FOUND"] = "DELIVERABLE_NOT_FOUND";
36
+ // Preflight validation errors
37
+ ErrorCode["REPO_NOT_FOUND"] = "REPO_NOT_FOUND";
38
+ ErrorCode["AUTH_FAILED"] = "AUTH_FAILED";
39
+ ErrorCode["BILLING_ERROR"] = "BILLING_ERROR";
40
+ })(ErrorCode || (ErrorCode = {}));
41
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD;AAEhD;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB,6CAA6C;IAC7C,kDAAqC,CAAA;IACrC,kEAAqD,CAAA;IACrD,sDAAyC,CAAA;IAEzC,0DAA0D;IAC1D,8DAAiD,CAAA;IACjD,kEAAqD,CAAA;IAErD,+CAA+C;IAC/C,kDAAqC,CAAA;IACrC,0DAA6C,CAAA;IAC7C,0DAA6C,CAAA;IAE7C,8CAA8C;IAC9C,4DAA+C,CAAA;IAC/C,wDAA2C,CAAA;IAE3C,6CAA6C;IAC7C,sDAAyC,CAAA;IAEzC,qDAAqD;IACrD,4DAA+C,CAAA;IAE/C,8BAA8B;IAC9B,8CAAiC,CAAA;IACjC,wCAA2B,CAAA;IAC3B,4CAA+B,CAAA;AACjC,CAAC,EA7BW,SAAS,KAAT,SAAS,QA6BpB"}
@@ -0,0 +1,36 @@
1
+ /** A single evolved payload unit with fitness metadata */
2
+ export interface Gene {
3
+ id: string;
4
+ cwe: string;
5
+ payload: string;
6
+ technique: string;
7
+ mutationHistory: string[];
8
+ fitness: number;
9
+ generation: number;
10
+ }
11
+ /** A snapshot of the full population at a given generation */
12
+ export interface Population {
13
+ genes: Gene[];
14
+ generation: number;
15
+ bestFitness: number;
16
+ averageFitness: number;
17
+ }
18
+ /** Fitness evaluation result for a single gene */
19
+ export interface FitnessResult {
20
+ geneId: string;
21
+ f1Score: number;
22
+ evasionRate: number;
23
+ speed: number;
24
+ compositeFitness: number;
25
+ }
26
+ /** Tuning parameters for the evolutionary algorithm */
27
+ export interface EvolutionConfig {
28
+ populationSize: number;
29
+ mutationRate: number;
30
+ crossoverRate: number;
31
+ eliteCount: number;
32
+ tournamentSize: number;
33
+ maxGenerations: number;
34
+ }
35
+ export declare const DEFAULT_EVOLUTION_CONFIG: EvolutionConfig;
36
+ //# sourceMappingURL=evolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evolution.d.ts","sourceRoot":"","sources":["../../src/types/evolution.ts"],"names":[],"mappings":"AAMA,0DAA0D;AAC1D,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,8DAA8D;AAC9D,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,wBAAwB,EAAE,eAOtC,CAAC"}
@@ -0,0 +1,14 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ export const DEFAULT_EVOLUTION_CONFIG = {
7
+ populationSize: 100,
8
+ mutationRate: 0.1,
9
+ crossoverRate: 0.7,
10
+ eliteCount: 5,
11
+ tournamentSize: 3,
12
+ maxGenerations: 50,
13
+ };
14
+ //# sourceMappingURL=evolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evolution.js","sourceRoot":"","sources":["../../src/types/evolution.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD;AAwChD,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,GAAG;IAClB,UAAU,EAAE,CAAC;IACb,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;CACnB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Type definitions barrel export
3
+ */
4
+ export * from './activity-logger.js';
5
+ export * from './errors.js';
6
+ export * from './config.js';
7
+ export * from './agents.js';
8
+ export * from './audit.js';
9
+ export * from './result.js';
10
+ export * from './metrics.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAMA;;GAEG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ /**
7
+ * Type definitions barrel export
8
+ */
9
+ export * from './activity-logger.js';
10
+ export * from './errors.js';
11
+ export * from './config.js';
12
+ export * from './agents.js';
13
+ export * from './audit.js';
14
+ export * from './result.js';
15
+ export * from './metrics.js';
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD;AAEhD;;GAEG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Agent metrics types used across services and activities.
3
+ * Centralized here to avoid temporal/shared.ts import boundary violations.
4
+ */
5
+ export interface AgentMetrics {
6
+ durationMs: number;
7
+ inputTokens: number | null;
8
+ outputTokens: number | null;
9
+ costUsd: number | null;
10
+ numTurns: number | null;
11
+ model?: string | undefined;
12
+ }
13
+ //# sourceMappingURL=metrics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/types/metrics.ts"],"names":[],"mappings":"AAMA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B"}
@@ -0,0 +1,7 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ export {};
7
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../src/types/metrics.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Types for the resilience subsystem (WAF fingerprinting, payload mutation, pivoting).
3
+ */
4
+ export type WafType = 'cloudflare' | 'aws-waf' | 'azure-waf' | 'cloud-armor' | 'modsecurity' | 'akamai' | 'imperva' | 'unknown';
5
+ export interface WafFingerprint {
6
+ wafType: WafType;
7
+ confidence: number;
8
+ signatures: string[];
9
+ }
10
+ export type MutationTier = 'structural' | 'case' | 'encoding' | 'obfuscation' | 'technique-rotation';
11
+ export interface MutationResult {
12
+ original: string;
13
+ mutated: string;
14
+ operator: string;
15
+ tier: MutationTier;
16
+ }
17
+ export interface PivotDecision {
18
+ blockedVector: string;
19
+ alternativeVectors: string[];
20
+ confidence: number;
21
+ reason: string;
22
+ }
23
+ export interface BypassTechnique {
24
+ name: string;
25
+ successRate: number;
26
+ effort: number;
27
+ applicableVulnTypes: string[];
28
+ example: string;
29
+ }
30
+ //# sourceMappingURL=resilience.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resilience.d.ts","sourceRoot":"","sources":["../../src/types/resilience.ts"],"names":[],"mappings":"AAMA;;GAEG;AAEH,MAAM,MAAM,OAAO,GACf,YAAY,GACZ,SAAS,GACT,WAAW,GACX,aAAa,GACb,aAAa,GACb,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,MAAM,GACN,UAAU,GACV,aAAa,GACb,oBAAoB,CAAC;AAEzB,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,7 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ export {};
7
+ //# sourceMappingURL=resilience.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resilience.js","sourceRoot":"","sources":["../../src/types/resilience.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Minimal Result type for explicit error handling.
3
+ *
4
+ * A discriminated union that makes error handling explicit without adding
5
+ * heavy machinery. Used in key modules (config loading, agent execution,
6
+ * queue validation) where callers need to make decisions based on error type.
7
+ */
8
+ /**
9
+ * Success variant of Result
10
+ */
11
+ export interface Ok<T> {
12
+ readonly ok: true;
13
+ readonly value: T;
14
+ }
15
+ /**
16
+ * Error variant of Result
17
+ */
18
+ export interface Err<E> {
19
+ readonly ok: false;
20
+ readonly error: E;
21
+ }
22
+ /**
23
+ * Result type - either Ok with a value or Err with an error
24
+ */
25
+ export type Result<T, E> = Ok<T> | Err<E>;
26
+ /**
27
+ * Create a success Result
28
+ */
29
+ export declare function ok<T>(value: T): Ok<T>;
30
+ /**
31
+ * Create an error Result
32
+ */
33
+ export declare function err<E>(error: E): Err<E>;
34
+ /**
35
+ * Type guard for Ok variant
36
+ */
37
+ export declare function isOk<T, E>(result: Result<T, E>): result is Ok<T>;
38
+ /**
39
+ * Type guard for Err variant
40
+ */
41
+ export declare function isErr<T, E>(result: Result<T, E>): result is Err<E>;
42
+ //# sourceMappingURL=result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/types/result.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,EAAE,CAAC,CAAC;IACnB,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAClB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,GAAG,CAAC,CAAC;IACpB,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAE1C;;GAEG;AACH,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAErC;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAEvC;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAEhE;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAElE"}
@@ -0,0 +1,30 @@
1
+ // Copyright (C) 2025 PhenixStar (Alaa Qweider)
2
+ //
3
+ // This program is free software: you can redistribute it and/or modify
4
+ // it under the terms of the GNU Affero General Public License version 3
5
+ // as published by the Free Software Foundation.
6
+ /**
7
+ * Create a success Result
8
+ */
9
+ export function ok(value) {
10
+ return { ok: true, value };
11
+ }
12
+ /**
13
+ * Create an error Result
14
+ */
15
+ export function err(error) {
16
+ return { ok: false, error };
17
+ }
18
+ /**
19
+ * Type guard for Ok variant
20
+ */
21
+ export function isOk(result) {
22
+ return result.ok === true;
23
+ }
24
+ /**
25
+ * Type guard for Err variant
26
+ */
27
+ export function isErr(result) {
28
+ return result.ok === false;
29
+ }
30
+ //# sourceMappingURL=result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/types/result.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,uEAAuE;AACvE,wEAAwE;AACxE,gDAAgD;AA+BhD;;GAEG;AACH,MAAM,UAAU,EAAE,CAAI,KAAQ;IAC5B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAI,KAAQ;IAC7B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAO,MAAoB;IAC7C,OAAO,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAO,MAAoB;IAC9C,OAAO,MAAM,CAAC,EAAE,KAAK,KAAK,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,91 @@
1
+ services:
2
+ temporal:
3
+ image: temporalio/temporal:latest
4
+ command: ["server", "start-dev", "--db-filename", "/home/temporal/temporal.db", "--ip", "0.0.0.0"]
5
+ ports:
6
+ - "127.0.0.1:7233:7233" # gRPC
7
+ - "127.0.0.1:8233:8233" # Web UI (built-in)
8
+ volumes:
9
+ - temporal-data:/home/temporal
10
+ healthcheck:
11
+ test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "localhost:7233"]
12
+ interval: 10s
13
+ timeout: 5s
14
+ retries: 10
15
+ start_period: 30s
16
+
17
+ worker:
18
+ build: .
19
+ entrypoint: ["node", "dist/temporal/worker.js"]
20
+ environment:
21
+ - TEMPORAL_ADDRESS=temporal:7233
22
+ - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
23
+ - ANTHROPIC_BASE_URL=${ANTHROPIC_BASE_URL:-} # Optional: route through claude-code-router
24
+ - ANTHROPIC_AUTH_TOKEN=${ANTHROPIC_AUTH_TOKEN:-} # Auth token for router
25
+ - ROUTER_DEFAULT=${ROUTER_DEFAULT:-} # Model name when using router (e.g., "gemini,gemini-2.5-pro")
26
+ - CLAUDE_CODE_OAUTH_TOKEN=${CLAUDE_CODE_OAUTH_TOKEN:-}
27
+ - CLAUDE_CODE_USE_BEDROCK=${CLAUDE_CODE_USE_BEDROCK:-}
28
+ - AWS_REGION=${AWS_REGION:-}
29
+ - AWS_BEARER_TOKEN_BEDROCK=${AWS_BEARER_TOKEN_BEDROCK:-}
30
+ - CLAUDE_CODE_USE_VERTEX=${CLAUDE_CODE_USE_VERTEX:-}
31
+ - CLOUD_ML_REGION=${CLOUD_ML_REGION:-}
32
+ - ANTHROPIC_VERTEX_PROJECT_ID=${ANTHROPIC_VERTEX_PROJECT_ID:-}
33
+ - GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS:-}
34
+ - ANTHROPIC_SMALL_MODEL=${ANTHROPIC_SMALL_MODEL:-}
35
+ - ANTHROPIC_MEDIUM_MODEL=${ANTHROPIC_MEDIUM_MODEL:-}
36
+ - ANTHROPIC_LARGE_MODEL=${ANTHROPIC_LARGE_MODEL:-}
37
+ - CLAUDE_CODE_MAX_OUTPUT_TOKENS=${CLAUDE_CODE_MAX_OUTPUT_TOKENS:-64000}
38
+ - TALON_MAX_TURNS=${TALON_MAX_TURNS:-500}
39
+ - TALON_PERMISSION_MODE=${TALON_PERMISSION_MODE:-bypassPermissions}
40
+ depends_on:
41
+ temporal:
42
+ condition: service_healthy
43
+ volumes:
44
+ - ./configs:/app/configs
45
+ - ./prompts:/app/prompts
46
+ - ./audit-logs:/app/audit-logs
47
+ - ${OUTPUT_DIR:-./audit-logs}:/app/output
48
+ - ./credentials:/app/credentials:ro
49
+ - ./repos:/repos
50
+ - ${BENCHMARKS_BASE:-.}:/benchmarks
51
+ read_only: true
52
+ tmpfs:
53
+ - /tmp:size=512m
54
+ - /var/tmp:size=256m
55
+ - /run:size=128m
56
+ shm_size: 2gb
57
+ cap_drop:
58
+ - ALL
59
+ cap_add:
60
+ - NET_RAW
61
+ - NET_BIND_SERVICE
62
+ security_opt:
63
+ - seccomp=configs/talon-seccomp.json
64
+
65
+ # Optional: claude-code-router for multi-model support
66
+ # Start with: ROUTER=true ./talon start ...
67
+ router:
68
+ build:
69
+ context: .
70
+ dockerfile: Dockerfile.router
71
+ profiles: ["router"] # Only starts when explicitly requested
72
+ ports:
73
+ - "127.0.0.1:3456:3456"
74
+ volumes:
75
+ - ./configs/router-config.json:/config/router-config.json:ro
76
+ environment:
77
+ - HOST=0.0.0.0
78
+ - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
79
+ - OPENAI_API_KEY=${OPENAI_API_KEY:-}
80
+ - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
81
+ - ROUTER_DEFAULT=${ROUTER_DEFAULT:-openai,gpt-4o}
82
+ - TALON_ROUTER_KEY=${TALON_ROUTER_KEY:-}
83
+ healthcheck:
84
+ test: ["CMD", "node", "-e", "require('http').get('http://localhost:3456/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
85
+ interval: 10s
86
+ timeout: 5s
87
+ retries: 5
88
+ start_period: 30s
89
+
90
+ volumes:
91
+ temporal-data:
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@phenixstar/talon",
3
+ "version": "1.0.0",
4
+ "description": "AI penetration testing framework — autonomous security assessment with 13 agents across a 5-phase pipeline",
5
+ "type": "module",
6
+ "bin": {
7
+ "talon": "bin/talon.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "dist/cli/",
12
+ "dist/types/",
13
+ "prompts/",
14
+ "configs/",
15
+ ".env.example",
16
+ "docker-compose.yml",
17
+ "Dockerfile",
18
+ "Dockerfile.router",
19
+ "talon",
20
+ "talon.ps1"
21
+ ],
22
+ "keywords": [
23
+ "security",
24
+ "pentesting",
25
+ "ai",
26
+ "claude",
27
+ "vulnerability-scanner",
28
+ "autonomous-agent"
29
+ ],
30
+ "author": "PhenixStar",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/PhenixStar/talon.git"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "temporal:server": "docker compose -f docker/docker-compose.temporal.yml up temporal -d",
42
+ "temporal:server:stop": "docker compose -f docker/docker-compose.temporal.yml down",
43
+ "temporal:worker": "node dist/temporal/worker.js",
44
+ "temporal:start": "node dist/temporal/client.js",
45
+ "test": "vitest run",
46
+ "test:watch": "vitest",
47
+ "test:coverage": "vitest run --coverage"
48
+ },
49
+ "dependencies": {
50
+ "@anthropic-ai/claude-agent-sdk": "^0.2.38",
51
+ "@inquirer/prompts": "^8.3.0",
52
+ "@temporalio/activity": "^1.11.0",
53
+ "@temporalio/client": "^1.11.0",
54
+ "@temporalio/worker": "^1.11.0",
55
+ "@temporalio/workflow": "^1.11.0",
56
+ "ajv": "^8.12.0",
57
+ "ajv-formats": "^2.1.1",
58
+ "boxen": "^8.0.1",
59
+ "chalk": "^5.0.0",
60
+ "dotenv": "^16.4.5",
61
+ "figlet": "^1.9.3",
62
+ "gradient-string": "^3.0.0",
63
+ "js-yaml": "^4.1.0",
64
+ "ora": "^9.3.0",
65
+ "yaml": "^2.8.2",
66
+ "zx": "^8.0.0"
67
+ },
68
+ "devDependencies": {
69
+ "@types/js-yaml": "^4.0.9",
70
+ "@types/node": "^25.0.3",
71
+ "@vitest/coverage-v8": "^3.0.0",
72
+ "typescript": "^5.9.3",
73
+ "vitest": "^3.0.0"
74
+ }
75
+ }