@shipers-dev/multi 0.6.5 → 0.6.7

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/dist/index.js CHANGED
@@ -5179,10 +5179,11 @@ async function runAcp(opts) {
5179
5179
  cleanEnv[k] = v;
5180
5180
  }
5181
5181
  const argv = Array.isArray(opts.adapterBin) ? opts.adapterBin : [opts.adapterBin];
5182
+ const permMode = process.env.MULTI_CLAUDE_SAFE === "1" ? "default" : "bypassPermissions";
5182
5183
  const child = Bun.spawn(argv, {
5183
5184
  stdio: ["pipe", "pipe", "inherit"],
5184
5185
  cwd: opts.cwd || process.cwd(),
5185
- env: { ...cleanEnv, ACP_PERMISSION_MODE: "default" }
5186
+ env: { ...cleanEnv, ACP_PERMISSION_MODE: permMode }
5186
5187
  });
5187
5188
  const output = new WritableStream({
5188
5189
  write(chunk) {
@@ -5573,7 +5574,7 @@ var LOG_PATH2 = join2(MULTI_DIR, "logs", "agent.log");
5573
5574
  var SKILLS_DIR = join2(MULTI_DIR, "skills");
5574
5575
  var STOP_PATH = join2(MULTI_DIR, "stop.flag");
5575
5576
  var TASKS_DB_PATH = join2(MULTI_DIR, "tasks.db");
5576
- var VERSION = "0.6.5";
5577
+ var VERSION = "0.6.7";
5577
5578
  var COMMANDS = {
5578
5579
  setup: "Register this device with a workspace",
5579
5580
  connect: "Connect device to realtime hub and execute assigned tasks",
@@ -6224,11 +6225,18 @@ _${bits.join(" \xB7 ")}_`);
6224
6225
  const base = `${task.title}
6225
6226
 
6226
6227
  ${task.description || ""}`.trim();
6227
- let userPart = task.followup ? `${task.followup}
6228
+ let userPart;
6229
+ if (task.followup) {
6230
+ const cleanFollowup = stripSelfMention(task.followup, preferType);
6231
+ userPart = `# New user message \u2014 THIS is the current request
6232
+
6233
+ ${cleanFollowup}
6228
6234
 
6229
6235
  ---
6230
- Context (original task ${task.key}): ${task.title}` : base || task.title;
6231
- userPart = stripSelfMention(userPart, preferType);
6236
+ *Earlier thread (${task.key} "${task.title}") is only background context. Do not re-address the original task unless the new message explicitly refers back to it.*`;
6237
+ } else {
6238
+ userPart = stripSelfMention(base || task.title, preferType);
6239
+ }
6232
6240
  if (attachmentRefs.length) {
6233
6241
  const lines = attachmentRefs.map((a) => `- ${a.filename}: ${a.path}`).join(`
6234
6242
  `);
@@ -6337,11 +6345,18 @@ ${body}
6337
6345
  const base = `${task.title}
6338
6346
 
6339
6347
  ${task.description || ""}`.trim();
6340
- let userPart = task.followup ? `${task.followup}
6348
+ let userPart;
6349
+ if (task.followup) {
6350
+ const cleanFollowup = stripSelfMention(task.followup, preferType);
6351
+ userPart = `# New user message \u2014 THIS is the current request
6352
+
6353
+ ${cleanFollowup}
6341
6354
 
6342
6355
  ---
6343
- Context (${task.key}): ${task.title}` : base || task.title;
6344
- userPart = stripSelfMention(userPart, preferType);
6356
+ *Earlier thread (${task.key} "${task.title}") is only background context. Do not re-address the original task unless the new message explicitly refers back to it.*`;
6357
+ } else {
6358
+ userPart = stripSelfMention(base || task.title, preferType);
6359
+ }
6345
6360
  if (attachmentRefs.length) {
6346
6361
  const lines = attachmentRefs.map((a) => `- ${a.filename}: ${a.path}`).join(`
6347
6362
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipers-dev/multi",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "multi-agent": "./dist/index.js"
package/src/acp-runner.ts CHANGED
@@ -36,10 +36,13 @@ export async function runAcp(opts: AcpRunOpts): Promise<{ stopReason: string; se
36
36
  cleanEnv[k] = v;
37
37
  }
38
38
  const argv = Array.isArray(opts.adapterBin) ? opts.adapterBin : [opts.adapterBin];
39
+ // Daemon has no TTY — default to bypass (claude's --dangerously-skip-permissions equivalent).
40
+ // Set MULTI_CLAUDE_SAFE=1 to restore interactive permission prompts.
41
+ const permMode = process.env.MULTI_CLAUDE_SAFE === '1' ? 'default' : 'bypassPermissions';
39
42
  const child = Bun.spawn(argv, {
40
43
  stdio: ['pipe', 'pipe', 'inherit'],
41
44
  cwd: opts.cwd || process.cwd(),
42
- env: { ...cleanEnv, ACP_PERMISSION_MODE: 'default' },
45
+ env: { ...cleanEnv, ACP_PERMISSION_MODE: permMode },
43
46
  });
44
47
 
45
48
  // Adapter expects plain newline-delimited JSON on stdio. Wrap child streams as Web Streams.
package/src/index.ts CHANGED
@@ -17,7 +17,7 @@ const LOG_PATH = join(MULTI_DIR, 'logs', 'agent.log');
17
17
  const SKILLS_DIR = join(MULTI_DIR, 'skills');
18
18
  const STOP_PATH = join(MULTI_DIR, 'stop.flag');
19
19
  const TASKS_DB_PATH = join(MULTI_DIR, 'tasks.db');
20
- const VERSION = '0.6.5';
20
+ const VERSION = '0.6.7';
21
21
 
22
22
  const COMMANDS = {
23
23
  setup: 'Register this device with a workspace',
@@ -623,10 +623,13 @@ async function handleRunTask(apiUrl: string, deviceId: string, task: any, detect
623
623
  try {
624
624
  if (useAcp) {
625
625
  const base = `${task.title}\n\n${task.description || ''}`.trim();
626
- let userPart = task.followup
627
- ? `${task.followup}\n\n---\nContext (original task ${task.key}): ${task.title}`
628
- : (base || task.title);
629
- userPart = stripSelfMention(userPart, preferType);
626
+ let userPart: string;
627
+ if (task.followup) {
628
+ const cleanFollowup = stripSelfMention(task.followup, preferType);
629
+ userPart = `# New user message — THIS is the current request\n\n${cleanFollowup}\n\n---\n*Earlier thread (${task.key} "${task.title}") is only background context. Do not re-address the original task unless the new message explicitly refers back to it.*`;
630
+ } else {
631
+ userPart = stripSelfMention(base || task.title, preferType);
632
+ }
630
633
  if (attachmentRefs.length) {
631
634
  const lines = attachmentRefs.map(a => `- ${a.filename}: ${a.path}`).join('\n');
632
635
  userPart += `\n\n---\nAttached input files (read them with your tools if useful):\n${lines}\n\nNote: if (and only if) you produce binary or large artifact outputs (screenshots, data exports, generated source files), write them under ${outDir}. Always put your human-facing reply in the chat response itself — do NOT write your answer as a file.`;
@@ -697,8 +700,13 @@ async function handleRunTask(apiUrl: string, deviceId: string, task: any, detect
697
700
  }
698
701
  } catch {}
699
702
  const base = `${task.title}\n\n${task.description || ''}`.trim();
700
- let userPart = task.followup ? `${task.followup}\n\n---\nContext (${task.key}): ${task.title}` : (base || task.title);
701
- userPart = stripSelfMention(userPart, preferType);
703
+ let userPart: string;
704
+ if (task.followup) {
705
+ const cleanFollowup = stripSelfMention(task.followup, preferType);
706
+ userPart = `# New user message — THIS is the current request\n\n${cleanFollowup}\n\n---\n*Earlier thread (${task.key} "${task.title}") is only background context. Do not re-address the original task unless the new message explicitly refers back to it.*`;
707
+ } else {
708
+ userPart = stripSelfMention(base || task.title, preferType);
709
+ }
702
710
  if (attachmentRefs.length) {
703
711
  const lines = attachmentRefs.map(a => `- ${a.filename}: ${a.path}`).join('\n');
704
712
  userPart += `\n\n---\nAttached files:\n${lines}\n\nWrite generated files to: ${outDir}`;