@pensar/apex 0.0.83 → 0.0.84-canary.4e1315ed

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 (2) hide show
  1. package/build/index.js +88 -1
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -31956,7 +31956,7 @@ var package_default2;
31956
31956
  var init_package = __esm(() => {
31957
31957
  package_default2 = {
31958
31958
  name: "@pensar/apex",
31959
- version: "0.0.83",
31959
+ version: "0.0.84-canary.4e1315ed",
31960
31960
  description: "AI-powered penetration testing CLI tool with terminal UI",
31961
31961
  module: "src/tui/index.tsx",
31962
31962
  main: "build/index.js",
@@ -277623,6 +277623,10 @@ function extractStreamableContent(args) {
277623
277623
  ` + args.remediation;
277624
277624
  return text2;
277625
277625
  }
277626
+ if (typeof args.title === "string" && typeof args.content === "string") {
277627
+ return `${args.title}
277628
+ ${args.content}`;
277629
+ }
277626
277630
  return null;
277627
277631
  }
277628
277632
  function tryParsePartialJson(text2) {
@@ -277727,6 +277731,16 @@ var TOOL_SUMMARY_MAP = {
277727
277731
  return `pentest swarm ×${targets?.length ?? "?"}`;
277728
277732
  },
277729
277733
  delegate_to_auth_subagent: (args) => `auth ${args.target || ""} — ${args.reason || ""}`,
277734
+ add_memory: (args) => `remember "${args.title || ""}"`,
277735
+ list_memories: (args) => {
277736
+ const parts = ["list memories"];
277737
+ if (args.category)
277738
+ parts.push(`[${args.category}]`);
277739
+ if (args.tag)
277740
+ parts.push(`tag:${args.tag}`);
277741
+ return parts.join(" ");
277742
+ },
277743
+ get_memory: (args) => `recall ${args.category || ""}/${args.id || ""}`,
277730
277744
  scratchpad: () => "note"
277731
277745
  };
277732
277746
  function getToolSummary(toolName, args) {
@@ -278342,6 +278356,79 @@ ${preview}${suffix}` : preview + suffix || "POC passed",
278342
278356
  }
278343
278357
  return { text: "Console retrieved", isError: false };
278344
278358
  }
278359
+ case "list_memories": {
278360
+ if (typeof result === "object" && result !== null) {
278361
+ const obj = result;
278362
+ if (obj.success === false) {
278363
+ return {
278364
+ text: String(obj.error || "Failed to list memories").slice(0, 120),
278365
+ isError: true
278366
+ };
278367
+ }
278368
+ const memories = Array.isArray(obj.memories) ? obj.memories : [];
278369
+ const count = Number(obj.count ?? memories.length);
278370
+ if (count === 0) {
278371
+ return { text: "No memories found", isError: false };
278372
+ }
278373
+ const preview = memories.slice(0, 8).map((m4) => {
278374
+ const cat = m4.category ? `[${m4.category}]` : "";
278375
+ return `${cat} ${m4.title || m4.id || "untitled"}`;
278376
+ }).join(`
278377
+ `);
278378
+ const suffix = count > 8 ? `
278379
+ … (${count} total)` : "";
278380
+ return {
278381
+ text: `${count} memor${count === 1 ? "y" : "ies"}`,
278382
+ isError: false,
278383
+ fullText: preview + suffix
278384
+ };
278385
+ }
278386
+ break;
278387
+ }
278388
+ case "add_memory": {
278389
+ if (typeof result === "object" && result !== null) {
278390
+ const obj = result;
278391
+ if (obj.success === false) {
278392
+ return {
278393
+ text: String(obj.error || "Failed to save memory").slice(0, 120),
278394
+ isError: true
278395
+ };
278396
+ }
278397
+ const title = obj.title || args?.title || "memory";
278398
+ const cat = obj.category ? `[${obj.category}] ` : "";
278399
+ return { text: `${cat}Saved "${title}"`, isError: false };
278400
+ }
278401
+ break;
278402
+ }
278403
+ case "get_memory": {
278404
+ if (typeof result === "object" && result !== null) {
278405
+ const obj = result;
278406
+ if (obj.success === false) {
278407
+ return {
278408
+ text: String(obj.error || "Memory not found").slice(0, 120),
278409
+ isError: true
278410
+ };
278411
+ }
278412
+ const memory = typeof obj.memory === "object" && obj.memory !== null ? obj.memory : null;
278413
+ if (memory) {
278414
+ const title = String(memory.title || "untitled");
278415
+ const content = typeof memory.content === "string" ? memory.content : "";
278416
+ const lines = content.split(`
278417
+ `);
278418
+ const preview = lines.slice(0, 4).join(`
278419
+ `);
278420
+ const suffix = lines.length > 4 ? `
278421
+ … (${lines.length} lines)` : "";
278422
+ return {
278423
+ text: title,
278424
+ isError: false,
278425
+ fullText: content.length > 0 ? preview + suffix : undefined
278426
+ };
278427
+ }
278428
+ return { text: "Memory retrieved", isError: false };
278429
+ }
278430
+ break;
278431
+ }
278345
278432
  case "scratchpad": {
278346
278433
  return { text: "Note saved", isError: false };
278347
278434
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pensar/apex",
3
- "version": "0.0.83",
3
+ "version": "0.0.84-canary.4e1315ed",
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",