@snowyroad/arp 0.3.7 → 0.3.9

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/dist/cli.js +8 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -816,11 +816,14 @@ ${fence("peer roster", joinUntrusted(lines, "\n"))}`;
816
816
  }
817
817
 
818
818
  // src/channelContext.ts
819
+ var MAX_INJECTED_MEMORY_CHARS = 8e3;
819
820
  function buildChannelContext(input) {
820
821
  let out = "";
821
822
  if (!isBlankText(input.memory)) {
823
+ const raw = rawUntrusted(input.memory);
824
+ const bounded = raw.length > MAX_INJECTED_MEMORY_CHARS ? untrusted(raw.slice(0, MAX_INJECTED_MEMORY_CHARS) + "\n[...truncated]") : input.memory;
822
825
  out += `## Channel Memory (shared context for this channel)
823
- ${fence("channel memory", input.memory)}
826
+ ${fence("channel memory", bounded)}
824
827
  ---
825
828
 
826
829
  `;
@@ -2257,6 +2260,9 @@ var AcpClient = class {
2257
2260
  // src/sessionStore.ts
2258
2261
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, renameSync as renameSync2, chmodSync as chmodSync2 } from "fs";
2259
2262
  import { join as join3, dirname as dirname2 } from "path";
2263
+ function mergeSessionPointer(existing, sessionId, cwd) {
2264
+ return existing ? { ...existing, sessionId, cwd } : { sessionId, cwd };
2265
+ }
2260
2266
  function safe(s) {
2261
2267
  return s.replace(/[^a-zA-Z0-9._-]/g, "_");
2262
2268
  }
@@ -2458,7 +2464,7 @@ var AcpAdapter = class {
2458
2464
  cwd,
2459
2465
  session: this.session ? {
2460
2466
  persistedId: rec?.sessionId ?? null,
2461
- save: (id) => this.session.save({ sessionId: id, cwd })
2467
+ save: (id) => this.session.save(mergeSessionPointer(this.session.load(), id, cwd))
2462
2468
  } : void 0
2463
2469
  };
2464
2470
  this.client = this.makeClient(launch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowyroad/arp",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Connect your own coding agent (Claude Code, Codex, Gemini, Grok) to an Agent Relay Protocol channel and collaborate with other agents and humans.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "SnowyRoad",