conductor-remote 1.57.1 → 1.57.2

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.html CHANGED
@@ -13,7 +13,7 @@
13
13
  <title>Conductor Remote</title>
14
14
  <!-- Runs before the module bundle so it can catch a stale shell that fails to boot. -->
15
15
  <script src="/self-heal.js"></script>
16
- <script type="module" crossorigin src="/assets/index-Bcw0X4na.js"></script>
16
+ <script type="module" crossorigin src="/assets/index-BiXwqO1M.js"></script>
17
17
  <link rel="stylesheet" crossorigin href="/assets/index-Dgmlbj_A.css">
18
18
  <link rel="manifest" href="/manifest.webmanifest"></head>
19
19
  <body>
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const t=e=>i(e,o),c={module:{uri:o},exports:l,require:t};s[o]=Promise.all(n.map(e=>c[e]||t(e))).then(e=>(r(...e),l))}}define(["./workbox-9c191d2f"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e1e682e2e5e88fa03b7808ae9db8e098"},{url:"index.html",revision:"adaeee6f81ebe5016e6a647db18f2b5d"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-Dgmlbj_A.css",revision:null},{url:"assets/index-Bcw0X4na.js",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
1
+ if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let l={};const t=e=>i(e,o),c={module:{uri:o},exports:l,require:t};s[o]=Promise.all(n.map(e=>c[e]||t(e))).then(e=>(r(...e),l))}}define(["./workbox-9c191d2f"],function(e){"use strict";importScripts("/push-sw.js"),self.addEventListener("message",e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()}),e.clientsClaim(),e.precacheAndRoute([{url:"self-heal.js",revision:"49bd63adb25a09341f8d2610e8bd3c76"},{url:"push-sw.js",revision:"e1e682e2e5e88fa03b7808ae9db8e098"},{url:"index.html",revision:"bad464e506b5e624589b398871912e3a"},{url:"assets/workbox-window.prod.es5-BBnX5xw4.js",revision:null},{url:"assets/index-Dgmlbj_A.css",revision:null},{url:"assets/index-BiXwqO1M.js",revision:null},{url:"apple-touch-icon.png",revision:"2b9301416b880d45d4bb655f2600d1f2"},{url:"icon-192.png",revision:"c5e01ac58768627e18ee7b8b6a9239ef"},{url:"icon-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon-maskable-512.png",revision:"a40638c55e310312457a621c9a0002c8"},{url:"icon.svg",revision:"c1aee186821798733dd477e69a0ef243"},{url:"manifest.webmanifest",revision:"cf88fbc5755108a7fe0616fa160a8a15"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api\//]}))});
@@ -16,9 +16,9 @@
16
16
  * A token *written into the composer* is re-parsed, which was the one open question and
17
17
  * is now measured: a split sent this way reached the next agent as a real attachment,
18
18
  * carrying Conductor's own "The user has attached these files. Read them before
19
- * proceeding. - <path> (113.8 KB)" ahead of the prompt. Keep naming the file in plain
20
- * words beside the token anyway. It costs a line, and it is what leaves the next agent a
21
- * readable path on the day that parsing changes.
19
+ * proceeding. - <path> (113.8 KB)" ahead of the prompt. The token is therefore the
20
+ * single canonical attachment reference: repeating its path in prose renders a duplicate
21
+ * link in Conductor's chat.
22
22
  */
23
23
  import crypto from 'node:crypto';
24
24
  import fs from 'node:fs';
@@ -64,6 +64,11 @@ export function attachmentName(name) {
64
64
  export function attachmentToken(name, relPath) {
65
65
  return `@⟦${name}⟧(${encodeURIComponent(relPath)})`;
66
66
  }
67
+ /** Compose a fork handoff, leaving an empty line for the user's added context when needed. */
68
+ export function attachmentPrompt(token, prompt) {
69
+ const context = prompt?.trim();
70
+ return context ? `Forked from ${token}\n\n${context}` : `Forked from ${token}\n\n`;
71
+ }
67
72
  /**
68
73
  * Write one, and return everything a caller needs to reference it.
69
74
  *
@@ -4,7 +4,7 @@ import http from 'node:http';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
6
  import zlib from 'node:zlib';
7
- import { writeAttachment } from "./attachments.js";
7
+ import { attachmentPrompt, writeAttachment } from "./attachments.js";
8
8
  import { startAutoUpdate, updateStatus } from "./autoupdate.js";
9
9
  import { loadConfig, stateDir } from "./config.js";
10
10
  import { ConductorDb } from "./db.js";
@@ -1390,17 +1390,10 @@ const server = http.createServer(async (req, res) => {
1390
1390
  if ('error' in opened) {
1391
1391
  return json(req, res, 502, { ...opened.result, attachment: { ...attachment, ...rendered } });
1392
1392
  }
1393
- // Both forms on purpose: the token is what Conductor turns into a chip, and the
1394
- // sentence is what still works if it does not. Nothing here may depend on which.
1395
- const prompt = (body.prompt ?? '').trim();
1396
- const text = [
1397
- attachment.token,
1398
- `(the chat this was split off from — read \`${attachment.relPath}\` first)`,
1399
- '',
1400
- prompt
1401
- ]
1402
- .join('\n')
1403
- .trim();
1393
+ // The token is what Conductor turns into the attachment chip and supplies to the
1394
+ // receiving agent. Do not repeat `attachment.relPath` in prose: that renders a
1395
+ // second link to the same transcript in the new chat.
1396
+ const text = attachmentPrompt(attachment.token, body.prompt);
1404
1397
  return json(req, res, 200, {
1405
1398
  ok: true,
1406
1399
  sessionId: opened.sessionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-remote",
3
- "version": "1.57.1",
3
+ "version": "1.57.2",
4
4
  "type": "module",
5
5
  "packageManager": "yarn@4.15.0",
6
6
  "description": "Phone control panel for local Conductor agents. Reads ride SQLite + git; prompts ride Conductor's own dispatch path.",