@pensar/apex 2.6.1-canary.4c944004 → 2.6.1

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 (125) hide show
  1. package/build/agent-6w7egcf1.js +13 -0
  2. package/build/agent-9zx75feh.js +13 -0
  3. package/build/{agent-b2z45j1b.js → agent-ayreaj6z.js} +5 -5
  4. package/build/{agent-runs-mztyf3qm.js → agent-runs-g37vkrjr.js} +16 -16
  5. package/build/{agent-kddx1vez.js → agent-yby11zaq.js} +6 -6
  6. package/build/{apps-h48ah1wf.js → apps-xn6km9yn.js} +13 -13
  7. package/build/{auth-v65mvfbf.js → auth-d105wc64.js} +13 -13
  8. package/build/{blackboxAgent-pzyz81z9.js → blackboxAgent-s56sgx9b.js} +6 -6
  9. package/build/{blackboxPentest-3pzzgzm5.js → blackboxPentest-ps78v3w7.js} +11 -11
  10. package/build/{cli-s82mq645.js → cli-1ve18npr.js} +1 -1
  11. package/build/{cli-d8x165mf.js → cli-3sp6nd8d.js} +2 -2
  12. package/build/{cli-gh5c6sf9.js → cli-65g6rcat.js} +3 -1
  13. package/build/{cli-wxkae592.js → cli-709rvekb.js} +29 -4
  14. package/build/{cli-jsvm7qaa.js → cli-7eea4e2y.js} +39 -7
  15. package/build/{cli-s4k4fxqm.js → cli-ae8jqxqr.js} +2 -2
  16. package/build/{cli-kw5wxxth.js → cli-az3xq70v.js} +1 -1
  17. package/build/{cli-5t6n4a8w.js → cli-c05y640n.js} +1 -1
  18. package/build/{cli-wqhbwkbc.js → cli-d37a42dc.js} +8 -8
  19. package/build/{cli-a9j339n2.js → cli-dpsw2fe6.js} +41 -5
  20. package/build/{cli-905nmz0b.js → cli-fy6vh2a7.js} +1 -1
  21. package/build/{cli-rvqwpdjg.js → cli-gx71jcke.js} +1 -1
  22. package/build/{cli-xaxr74bm.js → cli-k2nwxta0.js} +2 -2
  23. package/build/{cli-t368gv8p.js → cli-kb21qhvm.js} +2 -2
  24. package/build/{cli-da57pbjb.js → cli-n2en7j5b.js} +1 -1
  25. package/build/{cli-x0rrhg57.js → cli-ngq9dr8n.js} +3 -3
  26. package/build/{cli-v0d1n2j3.js → cli-qgz1q9g5.js} +12 -12
  27. package/build/{cli-021yxmh5.js → cli-xtc2t6me.js} +3 -3
  28. package/build/cli.js +42 -36
  29. package/build/{config-8e9k1hfk.js → config-zpqkd5cz.js} +1 -1
  30. package/build/{fastStrike-xs5ny137.js → fastStrike-mcjdvwez.js} +5 -5
  31. package/build/{fixes-a97nmysn.js → fixes-kytx5dmj.js} +13 -13
  32. package/build/{index-aztmdcaa.js → index-4vqdgb42.js} +19 -19
  33. package/build/{index-e1cct2cz.js → index-dr3tg1w3.js} +1 -1
  34. package/build/{index-8enyzj1n.js → index-fv64eb32.js} +2 -2
  35. package/build/{index-1k2prgt6.js → index-je6hcsqr.js} +1 -1
  36. package/build/{index-0gyjerk4.js → index-n65z6v7b.js} +6 -6
  37. package/build/{index-cwnp58dc.js → index-ns4m4s01.js} +4 -4
  38. package/build/{index-00n0zrdn.js → index-qv4cc65p.js} +28 -14
  39. package/build/{index-2w1n934x.js → index-r9yjkfrv.js} +4 -4
  40. package/build/{index-pde3w88a.js → index-wqetp6gq.js} +5 -5
  41. package/build/{issues-4q8k9rc5.js → issues-eb3q9d3a.js} +13 -13
  42. package/build/knowledge-fqsvtx0f.js +139 -0
  43. package/build/lib/{chunk-dmznt6r6.js → chunk-1azdancq.js} +1 -1
  44. package/build/lib/{chunk-kqgnc8g9.js → chunk-1fy8azee.js} +1 -1
  45. package/build/lib/{chunk-jmxdxsm8.js → chunk-1jvwqnem.js} +3 -3
  46. package/build/lib/{chunk-2p92hj2m.js → chunk-1yct6cra.js} +1 -1
  47. package/build/lib/{chunk-yy87a24g.js → chunk-2qsq76xq.js} +3 -3
  48. package/build/lib/{chunk-vrnhexdm.js → chunk-3c00n0cy.js} +3 -3
  49. package/build/lib/{chunk-gmw7vx6r.js → chunk-4hwzqthr.js} +1 -1
  50. package/build/lib/{chunk-c1zsb6zz.js → chunk-7pwa92rn.js} +1 -1
  51. package/build/lib/{chunk-vzc51c4z.js → chunk-9tt2021m.js} +9 -9
  52. package/build/lib/{chunk-nb0pppn2.js → chunk-9yksqgzr.js} +52 -13
  53. package/build/lib/{chunk-fxx0c7he.js → chunk-acgbyf5h.js} +1 -1
  54. package/build/lib/{chunk-7zkv27tc.js → chunk-ba41jh41.js} +46 -10
  55. package/build/lib/{chunk-wtht1nmq.js → chunk-bb0ekhkw.js} +8 -8
  56. package/build/lib/{chunk-4vsr549z.js → chunk-e8yy2k73.js} +1 -1
  57. package/build/lib/{chunk-ahtg1ytr.js → chunk-mg03jdmt.js} +1 -1
  58. package/build/lib/{chunk-mtbmjfys.js → chunk-nhfax4gb.js} +1 -1
  59. package/build/lib/{chunk-ss77exdk.js → chunk-r2dkp4tb.js} +1 -1
  60. package/build/lib/{chunk-f09y54py.js → chunk-r4j8ybn9.js} +3 -3
  61. package/build/lib/{chunk-11w6wa26.js → chunk-v3dk9j7k.js} +11 -11
  62. package/build/lib/{chunk-qt87ty01.js → chunk-w66ce82a.js} +29 -3
  63. package/build/lib/{chunk-ed0hqes9.js → chunk-xhdpgpkm.js} +2 -2
  64. package/build/lib/{chunk-3haymsms.js → chunk-yrnrbjes.js} +1 -1
  65. package/build/lib/{chunk-1090qz7m.js → chunk-z137x08b.js} +5 -5
  66. package/build/lib/{chunk-s0egavst.js → chunk-z96pbjhd.js} +1 -1
  67. package/build/lib/core/agents/offSecAgent/index.js +7 -7
  68. package/build/lib/core/agents/offSecAgent/subagentSpawner.js +5 -5
  69. package/build/lib/core/agents/offSecAgent/tools/index.js +4 -4
  70. package/build/lib/core/agents/specialized/attackSurface/blackboxAgent.js +9 -9
  71. package/build/lib/core/agents/specialized/attackSurface/schemas.js +9 -9
  72. package/build/lib/core/agents/specialized/authenticationAgent/index.js +10 -10
  73. package/build/lib/core/agents/specialized/codeAgent/agent.js +9 -9
  74. package/build/lib/core/agents/specialized/findingJudge/agent.js +8 -8
  75. package/build/lib/core/agents/specialized/findingJudge/index.js +3 -3
  76. package/build/lib/core/agents/specialized/patching/index.js +10 -10
  77. package/build/lib/core/agents/specialized/pentest/agent.js +9 -9
  78. package/build/lib/core/agents/specialized/whiteboxAttackSurface/index.js +9 -9
  79. package/build/lib/core/ai/ai.js +2 -2
  80. package/build/lib/core/ai/index.js +2 -2
  81. package/build/lib/core/ai/utils.js +2 -2
  82. package/build/lib/core/api/index.d.ts +2 -0
  83. package/build/lib/core/api/index.js +34 -20
  84. package/build/lib/core/api/issues.d.ts +1 -0
  85. package/build/lib/core/api/knowledge.d.ts +33 -0
  86. package/build/lib/core/api/targetedPentest.js +10 -10
  87. package/build/lib/core/config/customProviders.d.ts +16 -0
  88. package/build/lib/core/config/index.js +1 -1
  89. package/build/lib/core/findings/registry.js +3 -3
  90. package/build/lib/core/session/index.js +2 -2
  91. package/build/lib/core/session/persistence.js +3 -3
  92. package/build/lib/core/workflows/pentest.js +15 -15
  93. package/build/lib/core/workflows/seams.js +4 -4
  94. package/build/lib/core/workflows/whiteboxAttackSurface.js +11 -11
  95. package/build/lib/index.js +22 -22
  96. package/build/{logs-xs1kkpdv.js → logs-x62b7hk1.js} +13 -13
  97. package/build/{native-rollout-evidence-vraxk4w0.js → native-rollout-evidence-c9yhfqcs.js} +3 -3
  98. package/build/{offesecAgent-2jg3hfrb.js → offesecAgent-5whnpeta.js} +4 -4
  99. package/build/pentest-e61hc38s.js +22 -0
  100. package/build/{pentests-e0pdke9w.js → pentests-e0f32aqx.js} +21 -14
  101. package/build/recordedRunClient-dp032c32.js +11 -0
  102. package/build/{targetedPentest-jjt094tn.js → targetedPentest-rcbs4nvp.js} +6 -6
  103. package/build/{targets-2m91qa1w.js → targets-xj9g3q0z.js} +13 -13
  104. package/build/threatModel-jkxfa40s.js +21 -0
  105. package/build/{uninstall-bqswmvka.js → uninstall-7s784q4a.js} +1 -1
  106. package/build/{upload-cdxp2dhp.js → upload-4gvhwmvr.js} +4 -4
  107. package/build/{utils-rh9r0ka4.js → utils-cjrz64pc.js} +3 -3
  108. package/package.json +3 -1
  109. package/src/cli/knowledge.test.ts +140 -0
  110. package/src/cli/knowledge.ts +146 -0
  111. package/src/cli/pentests.test.ts +15 -0
  112. package/src/cli/pentests.ts +15 -1
  113. package/src/cli.ts +4 -0
  114. package/src/core/ai/providers/custom.test.ts +240 -0
  115. package/src/core/ai/providers/custom.ts +40 -0
  116. package/src/core/api/index.ts +15 -0
  117. package/src/core/api/issues.ts +1 -0
  118. package/src/core/api/knowledge.ts +70 -0
  119. package/src/core/config/customProviders.test.ts +26 -0
  120. package/src/core/config/customProviders.ts +30 -1
  121. package/build/agent-2ss75279.js +0 -13
  122. package/build/agent-s8v26rcw.js +0 -13
  123. package/build/pentest-mj0ejcdx.js +0 -22
  124. package/build/recordedRunClient-35dp6wng.js +0 -11
  125. package/build/threatModel-j3sdyrqd.js +0 -21
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  config2,
3
3
  init_config
4
- } from "./cli-905nmz0b.js";
4
+ } from "./cli-fy6vh2a7.js";
5
5
  import {
6
6
  getPensarApiUrl2,
7
7
  getPensarConsoleUrl2,
@@ -16,7 +16,7 @@ import {
16
16
  pollForWorkspaceCreation2,
17
17
  selectWorkspace2,
18
18
  init_auth
19
- } from "./cli-5t6n4a8w.js";
19
+ } from "./cli-c05y640n.js";
20
20
  import {
21
21
  require_src,
22
22
  require_src2,
@@ -33,10 +33,10 @@ import {
33
33
  buildPentestPrompt,
34
34
  buildThreatModelPrompt,
35
35
  createSkillsRegistry
36
- } from "./cli-jsvm7qaa.js";
36
+ } from "./cli-7eea4e2y.js";
37
37
  import {
38
38
  openRecordedRunClient2
39
- } from "./cli-s4k4fxqm.js";
39
+ } from "./cli-ae8jqxqr.js";
40
40
  import {
41
41
  AgentEventBus,
42
42
  INTERNAL_ID_PATTERN,
@@ -52,33 +52,33 @@ import {
52
52
  ALL_TOOL_NAMES2,
53
53
  PLAN_MODE_TOOL_NAMES,
54
54
  SKILL_TOOL_NAMES2
55
- } from "./cli-v0d1n2j3.js";
56
- import"./cli-xaxr74bm.js";
57
- import"./cli-t368gv8p.js";
58
- import"./cli-x0rrhg57.js";
55
+ } from "./cli-qgz1q9g5.js";
56
+ import"./cli-k2nwxta0.js";
57
+ import"./cli-kb21qhvm.js";
58
+ import"./cli-ngq9dr8n.js";
59
59
  import {
60
60
  readExecutionMetrics,
61
61
  writeExecutionMetrics,
62
62
  convertModelMessagesToUI,
63
63
  loadSubagents
64
- } from "./cli-wqhbwkbc.js";
65
- import"./cli-d8x165mf.js";
66
- import"./cli-021yxmh5.js";
64
+ } from "./cli-d37a42dc.js";
65
+ import"./cli-3sp6nd8d.js";
66
+ import"./cli-xtc2t6me.js";
67
67
  import {
68
68
  REPORT_FILENAME_MD
69
- } from "./cli-da57pbjb.js";
69
+ } from "./cli-n2en7j5b.js";
70
70
  import"./cli-xcy2vxj2.js";
71
71
  import {
72
72
  resolveConfig,
73
73
  createWeaveTracer
74
- } from "./cli-kw5wxxth.js";
74
+ } from "./cli-az3xq70v.js";
75
75
  import {
76
76
  isSensitiveHeaderName,
77
77
  renderHeaderValue
78
78
  } from "./cli-b3dvxjgk.js";
79
79
  import {
80
80
  resolveWorkerExecutable
81
- } from "./cli-rvqwpdjg.js";
81
+ } from "./cli-gx71jcke.js";
82
82
  import {
83
83
  EMPTY_SESSION_TOKEN_USAGE,
84
84
  accumulateSessionTokens,
@@ -88,7 +88,7 @@ import {
88
88
  AVAILABLE_PROVIDERS,
89
89
  init_types
90
90
  } from "./cli-3gt761d2.js";
91
- import"./cli-s82mq645.js";
91
+ import"./cli-1ve18npr.js";
92
92
  import"./cli-qba2x69h.js";
93
93
  import {
94
94
  parseHeaderLine2,
@@ -134,18 +134,18 @@ import {
134
134
  modelSupportsThinking,
135
135
  modelSupportsOpenAIReasoning,
136
136
  getOpenAIReasoningEfforts
137
- } from "./cli-a9j339n2.js";
137
+ } from "./cli-dpsw2fe6.js";
138
138
  import"./cli-c2k4xxaw.js";
139
139
  import {
140
140
  loadHoonifyModels,
141
141
  init_hoonify
142
- } from "./cli-wxkae592.js";
142
+ } from "./cli-709rvekb.js";
143
143
  import {
144
144
  init_package,
145
145
  version,
146
146
  checkForUpdate,
147
147
  init_installation
148
- } from "./cli-gh5c6sf9.js";
148
+ } from "./cli-65g6rcat.js";
149
149
  import {
150
150
  require_src6
151
151
  } from "./cli-bb02pjt0.js";
@@ -71751,7 +71751,7 @@ function AppContent({
71751
71751
  toast(`Update available: v${currentVersion} → v${latestVersion}. Run: pensar upgrade`, "warn", 8000);
71752
71752
  });
71753
71753
  const checkAuthToken = async () => {
71754
- const { isTokenExpired, isConnected } = await import("./index-8enyzj1n.js");
71754
+ const { isTokenExpired, isConnected } = await import("./index-fv64eb32.js");
71755
71755
  if (isConnected(config.data) && config.data.accessToken && isTokenExpired(config.data.accessToken, 60) && !config.data.refreshToken && !config.data.pensarAPIKey) {
71756
71756
  toast("Your Pensar Console session has expired. Run /login to refresh.", "warn", 8000);
71757
71757
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  config2,
3
3
  init_config
4
- } from "./cli-905nmz0b.js";
4
+ } from "./cli-fy6vh2a7.js";
5
5
  init_config();
6
6
 
7
7
  export {
@@ -14,8 +14,8 @@ import {
14
14
  createWorkspaceSelection2,
15
15
  pollWorkspaceSelection2,
16
16
  init_auth
17
- } from "./cli-5t6n4a8w.js";
18
- import"./cli-905nmz0b.js";
17
+ } from "./cli-c05y640n.js";
18
+ import"./cli-fy6vh2a7.js";
19
19
  init_auth();
20
20
 
21
21
  export {
@@ -3,7 +3,7 @@ import {
3
3
  get2,
4
4
  update2,
5
5
  init_config2
6
- } from "./cli-wxkae592.js";
6
+ } from "./cli-709rvekb.js";
7
7
 
8
8
  // src/core/config/index.ts
9
9
  init_config2();
@@ -6,14 +6,14 @@ import {
6
6
  AppsDiscoveryResultSchema2,
7
7
  DiscoverySummarySchema2,
8
8
  WhiteboxAttackSurfaceAgent2
9
- } from "./cli-x0rrhg57.js";
10
- import"./cli-s82mq645.js";
9
+ } from "./cli-ngq9dr8n.js";
10
+ import"./cli-1ve18npr.js";
11
11
  import"./cli-qba2x69h.js";
12
- import"./cli-v0d1n2j3.js";
13
- import"./cli-a9j339n2.js";
14
- import"./cli-5t6n4a8w.js";
12
+ import"./cli-qgz1q9g5.js";
13
+ import"./cli-dpsw2fe6.js";
14
+ import"./cli-c05y640n.js";
15
15
  import"./cli-c2k4xxaw.js";
16
- import"./cli-905nmz0b.js";
16
+ import"./cli-fy6vh2a7.js";
17
17
  export {
18
18
  AppInfoSchema2 as AppInfoSchema,
19
19
  AppsDiscoveryResultSchema2 as AppsDiscoveryResultSchema,
@@ -1,11 +1,11 @@
1
- import"./cli-905nmz0b.js";
2
- import"./cli-5t6n4a8w.js";
1
+ import"./cli-fy6vh2a7.js";
2
+ import"./cli-c05y640n.js";
3
3
  import {
4
4
  scopedLogger,
5
5
  init_lazyLogger,
6
6
  createLogger,
7
7
  init_structured
8
- } from "./cli-a9j339n2.js";
8
+ } from "./cli-dpsw2fe6.js";
9
9
  import"./cli-c2k4xxaw.js";
10
10
 
11
11
  // src/core/agents/specialized/findingJudge/index.ts
@@ -14,7 +14,7 @@ init_lazyLogger();
14
14
  var log = scopedLogger(() => createLogger("FindingJudge"));
15
15
  async function judgeFinding(input, ctx) {
16
16
  try {
17
- const { FindingJudgeAgent } = await import("./agent-b2z45j1b.js");
17
+ const { FindingJudgeAgent } = await import("./agent-ayreaj6z.js");
18
18
  const agent = new FindingJudgeAgent({
19
19
  finding: input,
20
20
  model: ctx.model,
@@ -19,22 +19,29 @@ import {
19
19
  searchAgentLogs2,
20
20
  listTargetLogs2,
21
21
  searchTargetLogs2,
22
+ KNOWLEDGE_CATEGORIES2,
23
+ KNOWLEDGE_STATUSES2,
24
+ listKnowledge2,
25
+ getKnowledge2,
26
+ createKnowledge2,
27
+ updateKnowledge2,
28
+ archiveKnowledge2,
22
29
  runOffensiveSecurityAgent2,
23
30
  createOffensiveSecurityAgentClient2,
24
31
  runRecordedAgent2,
25
32
  RunRecoveryBlockedError2,
26
33
  resumeRecordedAgent2,
27
34
  serveLocalRunWorker2
28
- } from "./cli-jsvm7qaa.js";
35
+ } from "./cli-7eea4e2y.js";
29
36
  import"./cli-xcy2vxj2.js";
30
- import"./cli-wqhbwkbc.js";
31
- import"./cli-da57pbjb.js";
32
- import"./cli-x0rrhg57.js";
33
- import"./cli-xaxr74bm.js";
34
- import"./cli-d8x165mf.js";
35
- import"./cli-021yxmh5.js";
36
- import"./cli-t368gv8p.js";
37
- import"./cli-s82mq645.js";
37
+ import"./cli-d37a42dc.js";
38
+ import"./cli-n2en7j5b.js";
39
+ import"./cli-ngq9dr8n.js";
40
+ import"./cli-k2nwxta0.js";
41
+ import"./cli-3sp6nd8d.js";
42
+ import"./cli-xtc2t6me.js";
43
+ import"./cli-kb21qhvm.js";
44
+ import"./cli-1ve18npr.js";
38
45
  import"./cli-qba2x69h.js";
39
46
  import {
40
47
  ENDPOINT_TRANSPORTS2,
@@ -52,22 +59,26 @@ import {
52
59
  searchEndpoints2,
53
60
  listDomains2,
54
61
  createDomain2
55
- } from "./cli-v0d1n2j3.js";
56
- import"./cli-a9j339n2.js";
62
+ } from "./cli-qgz1q9g5.js";
63
+ import"./cli-dpsw2fe6.js";
57
64
  import {
58
65
  getPensarApiUrl2,
59
66
  getPensarConsoleUrl2
60
- } from "./cli-5t6n4a8w.js";
67
+ } from "./cli-c05y640n.js";
61
68
  import"./cli-c2k4xxaw.js";
62
- import"./cli-905nmz0b.js";
69
+ import"./cli-fy6vh2a7.js";
63
70
  export {
64
71
  CLOSED_DISPOSITIONS2 as CLOSED_DISPOSITIONS,
65
72
  ENDPOINT_TRANSPORTS2 as ENDPOINT_TRANSPORTS,
73
+ KNOWLEDGE_CATEGORIES2 as KNOWLEDGE_CATEGORIES,
74
+ KNOWLEDGE_STATUSES2 as KNOWLEDGE_STATUSES,
66
75
  RunRecoveryBlockedError2 as RunRecoveryBlockedError,
76
+ archiveKnowledge2 as archiveKnowledge,
67
77
  createApp2 as createApp,
68
78
  createDomain2 as createDomain,
69
79
  createEndpoint2 as createEndpoint,
70
80
  createIssueComment2 as createIssueComment,
81
+ createKnowledge2 as createKnowledge,
71
82
  createOffensiveSecurityAgentClient2 as createOffensiveSecurityAgentClient,
72
83
  deleteApp2 as deleteApp,
73
84
  deleteEndpoint2 as deleteEndpoint,
@@ -76,6 +87,7 @@ export {
76
87
  getEndpoint2 as getEndpoint,
77
88
  getFix2 as getFix,
78
89
  getIssue2 as getIssue,
90
+ getKnowledge2 as getKnowledge,
79
91
  getPensarApiUrl2 as getPensarApiUrl,
80
92
  getPensarConsoleUrl2 as getPensarConsoleUrl,
81
93
  getScan2 as getScan,
@@ -89,6 +101,7 @@ export {
89
101
  listIssueComments2 as listIssueComments,
90
102
  listIssuePullRequests2 as listIssuePullRequests,
91
103
  listIssues2 as listIssues,
104
+ listKnowledge2 as listKnowledge,
92
105
  listPentestTargets2 as listPentestTargets,
93
106
  listScans2 as listScans,
94
107
  listTargetLogs2 as listTargetLogs,
@@ -103,5 +116,6 @@ export {
103
116
  serveLocalRunWorker2 as serveLocalRunWorker,
104
117
  updateApp2 as updateApp,
105
118
  updateEndpoint2 as updateEndpoint,
106
- updateIssue2 as updateIssue
119
+ updateIssue2 as updateIssue,
120
+ updateKnowledge2 as updateKnowledge
107
121
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ALL_TOOL_NAMES2,
3
3
  SKILL_TOOL_NAMES2
4
- } from "./cli-v0d1n2j3.js";
5
- import"./cli-905nmz0b.js";
6
- import"./cli-5t6n4a8w.js";
7
- import"./cli-a9j339n2.js";
4
+ } from "./cli-qgz1q9g5.js";
5
+ import"./cli-fy6vh2a7.js";
6
+ import"./cli-c05y640n.js";
7
+ import"./cli-dpsw2fe6.js";
8
8
  import"./cli-c2k4xxaw.js";
9
9
  export {
10
10
  ALL_TOOL_NAMES2 as ALL_TOOL_NAMES,
@@ -1,5 +1,5 @@
1
- import"./cli-905nmz0b.js";
2
- import"./cli-5t6n4a8w.js";
1
+ import"./cli-fy6vh2a7.js";
2
+ import"./cli-c05y640n.js";
3
3
  import {
4
4
  generateRandomName,
5
5
  generateSessionName,
@@ -16,7 +16,7 @@ import {
16
16
  init_storage,
17
17
  ToolsetStateSchema,
18
18
  init_toolset
19
- } from "./cli-a9j339n2.js";
19
+ } from "./cli-dpsw2fe6.js";
20
20
  import {
21
21
  schema,
22
22
  descending,
@@ -41,7 +41,7 @@ import {
41
41
  import {
42
42
  getCurrentVersion,
43
43
  init_installation
44
- } from "./cli-gh5c6sf9.js";
44
+ } from "./cli-65g6rcat.js";
45
45
 
46
46
  // src/core/session/index.ts
47
47
  init_zod();
@@ -336,7 +336,7 @@ async function create(input) {
336
336
  } else if (input.inheritEnvironmentConfig === false) {
337
337
  snapshotHeaders = {};
338
338
  } else {
339
- const { config: appConfig } = await import("./index-e1cct2cz.js");
339
+ const { config: appConfig } = await import("./index-dr3tg1w3.js");
340
340
  const cfg = await appConfig.get();
341
341
  snapshotHeaders = cfg.defaultHeaders ? { ...cfg.defaultHeaders } : { ...DEFAULT_HEADER_RECORD };
342
342
  }
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
- import"./cli-905nmz0b.js";
3
- import"./cli-5t6n4a8w.js";
2
+ import"./cli-fy6vh2a7.js";
3
+ import"./cli-c05y640n.js";
4
4
  import {
5
5
  CLOSED_DISPOSITIONS2,
6
6
  listIssues2,
@@ -11,22 +11,22 @@ import {
11
11
  retestIssue2,
12
12
  linkPullRequest2,
13
13
  listIssuePullRequests2
14
- } from "./cli-jsvm7qaa.js";
15
- import"./cli-v0d1n2j3.js";
16
- import"./cli-xaxr74bm.js";
17
- import"./cli-t368gv8p.js";
18
- import"./cli-x0rrhg57.js";
19
- import"./cli-wqhbwkbc.js";
20
- import"./cli-d8x165mf.js";
21
- import"./cli-021yxmh5.js";
22
- import"./cli-da57pbjb.js";
14
+ } from "./cli-7eea4e2y.js";
15
+ import"./cli-qgz1q9g5.js";
16
+ import"./cli-k2nwxta0.js";
17
+ import"./cli-kb21qhvm.js";
18
+ import"./cli-ngq9dr8n.js";
19
+ import"./cli-d37a42dc.js";
20
+ import"./cli-3sp6nd8d.js";
21
+ import"./cli-xtc2t6me.js";
22
+ import"./cli-n2en7j5b.js";
23
23
  import"./cli-xcy2vxj2.js";
24
24
  import {
25
25
  markCommandFailed
26
26
  } from "./cli-z82n3qk1.js";
27
- import"./cli-s82mq645.js";
27
+ import"./cli-1ve18npr.js";
28
28
  import"./cli-qba2x69h.js";
29
- import"./cli-a9j339n2.js";
29
+ import"./cli-dpsw2fe6.js";
30
30
  import"./cli-c2k4xxaw.js";
31
31
 
32
32
  // src/cli/issues.ts
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env bun
2
+ import"./cli-fy6vh2a7.js";
3
+ import"./cli-c05y640n.js";
4
+ import {
5
+ KNOWLEDGE_CATEGORIES2,
6
+ KNOWLEDGE_STATUSES2,
7
+ listKnowledge2,
8
+ getKnowledge2,
9
+ createKnowledge2,
10
+ updateKnowledge2,
11
+ archiveKnowledge2
12
+ } from "./cli-7eea4e2y.js";
13
+ import"./cli-qgz1q9g5.js";
14
+ import"./cli-k2nwxta0.js";
15
+ import"./cli-kb21qhvm.js";
16
+ import"./cli-ngq9dr8n.js";
17
+ import"./cli-d37a42dc.js";
18
+ import"./cli-3sp6nd8d.js";
19
+ import"./cli-xtc2t6me.js";
20
+ import"./cli-n2en7j5b.js";
21
+ import"./cli-xcy2vxj2.js";
22
+ import {
23
+ markCommandFailed
24
+ } from "./cli-z82n3qk1.js";
25
+ import"./cli-1ve18npr.js";
26
+ import"./cli-qba2x69h.js";
27
+ import"./cli-dpsw2fe6.js";
28
+ import"./cli-c2k4xxaw.js";
29
+
30
+ // src/cli/knowledge.ts
31
+ import { parseArgs } from "node:util";
32
+ function showHelp() {
33
+ console.log(`pensar knowledge — Read and edit the workspace knowledge base
34
+
35
+ Entries are context that agents use during pentests. A false_positive_pattern
36
+ entry suppresses matching findings.
37
+
38
+ Usage:
39
+ pensar knowledge [filters] List entries
40
+ pensar knowledge get <id> Get one entry
41
+ pensar knowledge add [options] Add an entry
42
+ pensar knowledge update <id> [options] Edit an entry
43
+ pensar knowledge archive <id> Archive an entry
44
+
45
+ Filters and options:
46
+ --title <text> Entry title (required for add)
47
+ --content <text> Entry body (required for add)
48
+ --category <category> ${KNOWLEDGE_CATEGORIES2.join(", ")}
49
+ (required for add)
50
+ --status <status> ${KNOWLEDGE_STATUSES2.join(", ")}
51
+ --tag <tags> Repeat or separate with commas; a list filter
52
+ matches entries carrying every tag
53
+
54
+ Adding, editing and archiving require a user login; a workspace API key can
55
+ only read.
56
+
57
+ Options:
58
+ -h, --help Show this help message`);
59
+ }
60
+ function parseCategory(value) {
61
+ if (value === undefined)
62
+ return;
63
+ if (!KNOWLEDGE_CATEGORIES2.includes(value)) {
64
+ throw new Error(`invalid --category "${value}". Accepted: ${KNOWLEDGE_CATEGORIES2.join(", ")}`);
65
+ }
66
+ return value;
67
+ }
68
+ function parseStatus(value) {
69
+ if (value === undefined)
70
+ return;
71
+ if (!KNOWLEDGE_STATUSES2.includes(value)) {
72
+ throw new Error(`invalid --status "${value}". Accepted: ${KNOWLEDGE_STATUSES2.join(", ")}`);
73
+ }
74
+ return value;
75
+ }
76
+ async function main() {
77
+ const args = process.argv.slice(2);
78
+ const sub = args[0] && !args[0].startsWith("-") ? args[0] : "list";
79
+ if (sub === "help" || args.includes("--help") || args.includes("-h")) {
80
+ showHelp();
81
+ return;
82
+ }
83
+ try {
84
+ const takesId = sub === "get" || sub === "update" || sub === "archive";
85
+ const id = takesId ? args[1] : undefined;
86
+ if (takesId && (!id || id.startsWith("-"))) {
87
+ throw new Error(`entry ID is required: pensar knowledge ${sub} <id>`);
88
+ }
89
+ const { values } = parseArgs({
90
+ args: args.slice(args[0] === sub ? takesId ? 2 : 1 : 0),
91
+ options: {
92
+ title: { type: "string" },
93
+ content: { type: "string" },
94
+ category: { type: "string" },
95
+ status: { type: "string" },
96
+ tag: { type: "string", multiple: true }
97
+ },
98
+ strict: true,
99
+ allowPositionals: false
100
+ });
101
+ const tags = values.tag?.flatMap((t) => t.split(",")).filter(Boolean);
102
+ const input = {
103
+ title: values.title,
104
+ content: values.content,
105
+ category: parseCategory(values.category),
106
+ status: parseStatus(values.status),
107
+ tags
108
+ };
109
+ let result;
110
+ if (sub === "list") {
111
+ result = await listKnowledge2({
112
+ category: input.category,
113
+ status: input.status,
114
+ tags
115
+ });
116
+ } else if (sub === "get") {
117
+ result = await getKnowledge2(id);
118
+ } else if (sub === "add") {
119
+ if (!input.title || !input.content || !input.category) {
120
+ throw new Error("--title, --content and --category are required");
121
+ }
122
+ result = await createKnowledge2(input);
123
+ } else if (sub === "update") {
124
+ result = await updateKnowledge2(id, input);
125
+ } else if (sub === "archive") {
126
+ result = await archiveKnowledge2(id);
127
+ } else {
128
+ console.error(`Error: Unknown subcommand "${sub}"`);
129
+ showHelp();
130
+ return markCommandFailed();
131
+ }
132
+ console.log(JSON.stringify(result, null, 2));
133
+ } catch (err) {
134
+ console.error(`
135
+ Error: ${err instanceof Error ? err.message : String(err)}`);
136
+ return markCommandFailed();
137
+ }
138
+ }
139
+ await main();
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  scopedLogger,
4
4
  generateObjectResponse2
5
- } from "./chunk-7zkv27tc.js";
5
+ } from "./chunk-ba41jh41.js";
6
6
  import {
7
7
  __export
8
8
  } from "./chunk-n0ba7khr.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  AgentRuntime,
6
6
  defineAgent
7
- } from "./chunk-fxx0c7he.js";
7
+ } from "./chunk-acgbyf5h.js";
8
8
 
9
9
  // src/core/agents/specialized/attackSurface/blackboxAgent.ts
10
10
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createLogger,
3
3
  scopedLogger
4
- } from "./chunk-7zkv27tc.js";
4
+ } from "./chunk-ba41jh41.js";
5
5
  import {
6
6
  isMemoryEnabled2
7
7
  } from "./chunk-t5bt5vn1.js";
@@ -15,7 +15,7 @@ import {
15
15
  REPORT_ERROR_TOOL_NAME2,
16
16
  createReportErrorTool2,
17
17
  PentestReportedError2
18
- } from "./chunk-yy87a24g.js";
18
+ } from "./chunk-2qsq76xq.js";
19
19
  import {
20
20
  GOOGLE_SIGNIN_PROMPT_GUIDANCE,
21
21
  browserEngineForGoogleSignIn
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  AgentRuntime,
28
28
  defineAgent
29
- } from "./chunk-fxx0c7he.js";
29
+ } from "./chunk-acgbyf5h.js";
30
30
 
31
31
  // src/core/agents/specialized/pentest/agent.ts
32
32
  import { existsSync, readdirSync, readFileSync } from "node:fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AgentRuntime,
3
3
  defineAgent
4
- } from "./chunk-fxx0c7he.js";
4
+ } from "./chunk-acgbyf5h.js";
5
5
 
6
6
  // src/core/agents/specialized/patching/agent.ts
7
7
  import { readFileSync } from "node:fs";
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  getCurrentVersion,
46
46
  config2
47
- } from "./chunk-qt87ty01.js";
47
+ } from "./chunk-w66ce82a.js";
48
48
  import {
49
49
  CredentialManager,
50
50
  createLogger,
@@ -53,7 +53,7 @@ import {
53
53
  ensureValidToken,
54
54
  signGatewayRequest,
55
55
  generateObjectResponse2
56
- } from "./chunk-7zkv27tc.js";
56
+ } from "./chunk-ba41jh41.js";
57
57
  import {
58
58
  EndpointTransportEnum2,
59
59
  GrpcEndpointMetadataSchema2,
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-zrbqn62x.js";
75
75
  import {
76
76
  FindingsRegistry2
77
- } from "./chunk-dmznt6r6.js";
77
+ } from "./chunk-1azdancq.js";
78
78
 
79
79
  // src/core/agents/offSecAgent/tools/addMemory.ts
80
80
  import { tool } from "ai";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runWithNativeRolloutSession2
3
- } from "./chunk-7zkv27tc.js";
3
+ } from "./chunk-ba41jh41.js";
4
4
  import {
5
5
  AgentEventBus2
6
6
  } from "./chunk-7gjdygcx.js";
@@ -9,7 +9,7 @@ import {
9
9
  randomSessionIdFactory2,
10
10
  inProcessSeams2,
11
11
  resolveItemHooks2
12
- } from "./chunk-3haymsms.js";
12
+ } from "./chunk-yrnrbjes.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-n0ba7khr.js";
@@ -170,7 +170,7 @@ var runBlackboxChild = async (spec, ctx) => {
170
170
  return { run: () => agent.consume(), drained: () => agent.drained };
171
171
  };
172
172
  var runAuthChild = async (spec, ctx) => {
173
- const { runAuthenticationAgent } = await import("./chunk-vzc51c4z.js");
173
+ const { runAuthenticationAgent } = await import("./chunk-9tt2021m.js");
174
174
  return {
175
175
  run: () => runAuthenticationAgent({
176
176
  target: spec.target,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AgentRuntime,
3
3
  defineAgent
4
- } from "./chunk-fxx0c7he.js";
4
+ } from "./chunk-acgbyf5h.js";
5
5
 
6
6
  // src/core/agents/specialized/codeAgent/agent.ts
7
7
  import { stepCountIs } from "ai";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AuthenticationAgent2,
3
3
  runAuthenticationAgent3
4
- } from "./chunk-ed0hqes9.js";
4
+ } from "./chunk-xhdpgpkm.js";
5
5
  import {
6
6
  __export
7
7
  } from "./chunk-n0ba7khr.js";