@pensar/apex 0.0.106 → 0.0.107-canary.c2ec452c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/auth.js CHANGED
@@ -8,7 +8,7 @@ import fs from "fs/promises";
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "@pensar/apex",
11
- version: "0.0.106",
11
+ version: "0.0.107-canary.c2ec452c",
12
12
  description: "AI-powered penetration testing CLI tool with terminal UI",
13
13
  module: "src/tui/index.tsx",
14
14
  main: "build/index.js",
package/build/index.js CHANGED
@@ -31880,12 +31880,6 @@ var init_openrouter = __esm(() => {
31880
31880
  var PENSAR_MODELS;
31881
31881
  var init_pensar = __esm(() => {
31882
31882
  PENSAR_MODELS = [
31883
- {
31884
- id: "pensar:anthropic.claude-opus-4-6-v1",
31885
- name: "Claude Opus 4.6 (Pensar)",
31886
- provider: "pensar",
31887
- contextLength: 200000
31888
- },
31889
31883
  {
31890
31884
  id: "pensar:anthropic.claude-sonnet-4-5-20250929-v1:0",
31891
31885
  name: "Claude Sonnet 4.5 (Pensar)",
@@ -31977,7 +31971,7 @@ var package_default2;
31977
31971
  var init_package = __esm(() => {
31978
31972
  package_default2 = {
31979
31973
  name: "@pensar/apex",
31980
- version: "0.0.106",
31974
+ version: "0.0.107-canary.c2ec452c",
31981
31975
  description: "AI-powered penetration testing CLI tool with terminal UI",
31982
31976
  module: "src/tui/index.tsx",
31983
31977
  main: "build/index.js",
@@ -194961,6 +194955,21 @@ var init_offensiveSecurityAgent = __esm(() => {
194961
194955
  }
194962
194956
  ]
194963
194957
  };
194958
+ const PERSIST_INTERVAL_MS = 15000;
194959
+ let persistTimer = null;
194960
+ let latestMessages = null;
194961
+ const schedulePersist = () => {
194962
+ if (persistTimer)
194963
+ return;
194964
+ persistTimer = setTimeout(() => {
194965
+ persistTimer = null;
194966
+ if (latestMessages) {
194967
+ const toWrite = latestMessages;
194968
+ latestMessages = null;
194969
+ writeFile3(messagesPath, JSON.stringify(toWrite)).catch(() => {});
194970
+ }
194971
+ }, PERSIST_INTERVAL_MS);
194972
+ };
194964
194973
  this.streamResult = streamResponse({
194965
194974
  prompt: input.prompt,
194966
194975
  system: (input.system ?? BASE_SYSTEM_PROMPT) + buildSessionWorkspaceSection(input.session),
@@ -194971,17 +194980,28 @@ var init_offensiveSecurityAgent = __esm(() => {
194971
194980
  stopWhen,
194972
194981
  toolChoice: "auto",
194973
194982
  onStepFinish: (event) => {
194974
- const allMessages = [
194983
+ latestMessages = [
194975
194984
  ...initialMessagesRef.current,
194976
194985
  ...event.response.messages
194977
194986
  ];
194978
- writeFile3(messagesPath, JSON.stringify(allMessages, null, 2)).catch(() => {});
194987
+ schedulePersist();
194979
194988
  input.onStepFinish?.(event);
194980
194989
  },
194981
194990
  onSummarized: () => {
194982
194991
  initialMessagesRef.current = [];
194983
194992
  },
194984
- onFinish: input.onFinish,
194993
+ onFinish: async (event) => {
194994
+ if (persistTimer) {
194995
+ clearTimeout(persistTimer);
194996
+ persistTimer = null;
194997
+ }
194998
+ const finalMessages = latestMessages ?? [
194999
+ ...initialMessagesRef.current,
195000
+ ...event.response.messages
195001
+ ];
195002
+ await writeFile3(messagesPath, JSON.stringify(finalMessages)).catch(() => {});
195003
+ await input.onFinish?.(event);
195004
+ },
194985
195005
  abortSignal: input.abortSignal,
194986
195006
  authConfig: input.authConfig,
194987
195007
  silent: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pensar/apex",
3
- "version": "0.0.106",
3
+ "version": "0.0.107-canary.c2ec452c",
4
4
  "description": "AI-powered penetration testing CLI tool with terminal UI",
5
5
  "module": "src/tui/index.tsx",
6
6
  "main": "build/index.js",