@chipschat/opencode 1.0.3 → 1.0.4

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.
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- `dist/main.js` in @chipschat/opencode 1.0.3 carries these packages, bundled in. Each one's
3
+ `dist/main.js` in @chipschat/opencode 1.0.4 carries these packages, bundled in. Each one's
4
4
  licence follows.
5
5
 
6
6
  ## @chipschat/harness 0.0.0 (Apache-2.0)
package/dist/main.js CHANGED
@@ -20392,7 +20392,7 @@ var serverFacts = external_exports.object({
20392
20392
  // node_modules/@chipschat/protocol/dist/src/room-files.js
20393
20393
  var ROOM_FILES_IN_CONTEXT = 20;
20394
20394
  var ROOM_FILES_CEILING = 200;
20395
- var ROOM_FILES_HEADING = "Files in this room:";
20395
+ var ROOM_FILES_HEADING = "Files in this space:";
20396
20396
  var roomFile = external_exports.object({
20397
20397
  name: external_exports.string().min(1).max(255).describe("The file's name, which its versions share."),
20398
20398
  version: external_exports.int().positive().describe("Which version this is: 1 for the first, counting each change of its bytes."),
@@ -20483,7 +20483,7 @@ var MONTHS = [
20483
20483
 
20484
20484
  // node_modules/@chipschat/protocol/dist/src/context.js
20485
20485
  var CONTEXT_CEILING = { lines: 200, chars: 32e3 };
20486
- var CONTEXT_HEADING = "Said in this room since you last spoke:";
20486
+ var CONTEXT_HEADING = "Said in this space since you last spoke:";
20487
20487
  var contextBudget = external_exports.object({
20488
20488
  lines: external_exports.int().nonnegative().optional().describe("The most lines to be handed, 20 when absent. Chips hands over 200 at most, and none when this is 0."),
20489
20489
  chars: external_exports.int().nonnegative().optional().describe("The most characters those lines may run to, as `Name: words` one per line, 4,000 when absent. Chips hands over 32,000 at most.")
@@ -20551,17 +20551,17 @@ function renderLine(line) {
20551
20551
  case "said":
20552
20552
  return `${withRole(name, line.from)}: ${wordsOf(line)}`;
20553
20553
  case "joined":
20554
- return `(${name} joined the room)`;
20554
+ return `(${name} joined the space)`;
20555
20555
  case "left":
20556
- return `(${name} left the room)`;
20556
+ return `(${name} left the space)`;
20557
20557
  case "renamed":
20558
20558
  if (line.title !== void 0)
20559
- return `(${name} renamed the room "${line.title}")`;
20559
+ return `(${name} renamed the space "${line.title}")`;
20560
20560
  return `(${line.previous ?? name} is now called ${line.name ?? name})`;
20561
20561
  case "archived":
20562
- return `(${name} archived the room)`;
20562
+ return `(${name} archived the space)`;
20563
20563
  default:
20564
- return `(${name} unarchived the room)`;
20564
+ return `(${name} unarchived the space)`;
20565
20565
  }
20566
20566
  }
20567
20567
  function renderContext(context) {
@@ -21179,7 +21179,7 @@ function namesInWords(names) {
21179
21179
  function renderProjectNote(facts, options) {
21180
21180
  const files = `${facts.files} file${facts.files === 1 ? "" : "s"}`;
21181
21181
  const lines2 = [
21182
- `The room's project is a git repository. Your copy is ${facts.folder} (${files}), ${facts.trouble === void 0 ? "brought up to date just now" : "not brought up to date"}.`
21182
+ `The space's project is a git repository. Your copy is ${facts.folder} (${files}), ${facts.trouble === void 0 ? "brought up to date just now" : "not brought up to date"}.`
21183
21183
  ];
21184
21184
  if (facts.changed.length > 0) {
21185
21185
  const by = facts.by.length > 0 ? `, by ${namesInWords(facts.by)}` : "";
@@ -21189,7 +21189,7 @@ function renderProjectNote(facts, options) {
21189
21189
  lines2.push(`It couldn't be: ${facts.trouble}`);
21190
21190
  if (facts.clashes.length > 0) {
21191
21191
  const whose = facts.clashedWith.length > 0 ? `${namesInWords(facts.clashedWith)}'s` : "another change";
21192
- lines2.push(`Your last change to ${namesInWords(facts.clashes)} clashed with ${whose}, which reached the room first. Both sides are in those files now: yours between "<<<<<<< yours" and "=======", theirs from there to the ">>>>>>>" line that names them. Settle each, keeping what both meant, and take the marks out. Nothing of yours is sent until they're gone.`);
21192
+ lines2.push(`Your last change to ${namesInWords(facts.clashes)} clashed with ${whose}, which reached the space first. Both sides are in those files now: yours between "<<<<<<< yours" and "=======", theirs from there to the ">>>>>>>" line that names them. Settle each, keeping what both meant, and take the marks out. Nothing of yours is sent until they're gone.`);
21193
21193
  }
21194
21194
  for (const key of facts.keys) {
21195
21195
  lines2.push(`${key.path} holds what looks like ${key.what}, so your last change wasn't sent: take it out and read it from outside the project.`);
@@ -22904,17 +22904,17 @@ function heldNote(pushed, name) {
22904
22904
  return void 0;
22905
22905
  case "clash": {
22906
22906
  const whose = pushed.with.length === 0 ? "another change" : `${namesInWords(pushed.with)}'s change`;
22907
- return `(Not in the room's project yet: ${namesInWords(pushed.files)} clashed with ${whose}. ${name} is asked to settle it next turn.)`;
22907
+ return `(Not in the space's project yet: ${namesInWords(pushed.files)} clashed with ${whose}. ${name} is asked to settle it next turn.)`;
22908
22908
  }
22909
22909
  case "keys": {
22910
22910
  const [first] = pushed.keys;
22911
22911
  const held = pushed.keys.length === 1 && first !== void 0 ? `${first.path} looks like it holds ${first.what.replace(/, by its name$/, "")}` : `${namesInWords(pushed.keys.map((key) => key.path))} look like they hold keys`;
22912
- return `(Not in the room's project: ${held}, so nothing was sent.)`;
22912
+ return `(Not in the space's project: ${held}, so nothing was sent.)`;
22913
22913
  }
22914
22914
  case "refused":
22915
- return `(Not in the room's project: it was turned back: ${stopped(pushed.why)})`;
22915
+ return `(Not in the space's project: it was turned back: ${stopped(pushed.why)})`;
22916
22916
  case "failed":
22917
- return `(Not in the room's project: it couldn't be sent: ${stopped(pushed.why)})`;
22917
+ return `(Not in the space's project: it couldn't be sent: ${stopped(pushed.why)})`;
22918
22918
  }
22919
22919
  }
22920
22920
  async function checkGit(git2 = "git", path = process.env["PATH"] ?? "/usr/bin:/bin") {
@@ -23232,7 +23232,7 @@ ${sent.err}`;
23232
23232
  const clashes = lines((await this.git(["diff", "--name-only", "--diff-filter=U"])).out);
23233
23233
  if (clashes.length === 0)
23234
23234
  return merged.ok ? {} : { trouble: remoteWords(merged.err) };
23235
- const label2 = theirs.length === 1 ? theirs[0] ?? "the room" : "the room";
23235
+ const label2 = theirs.length === 1 ? theirs[0] ?? "the space" : "the space";
23236
23236
  for (const path of clashes)
23237
23237
  await this.label(path, onto, label2);
23238
23238
  return { clashes, clashedWith: theirs };
@@ -25073,8 +25073,8 @@ import { homedir as homedir2 } from "node:os";
25073
25073
  import { basename as basename2, isAbsolute, resolve, sep } from "node:path";
25074
25074
  import { fileURLToPath } from "node:url";
25075
25075
  function sendingFiles(options = {}) {
25076
- const which = options.project === true ? "A file that isn't in the room's project" : "A file";
25077
- return `${which} reaches this room only when you send it: put MEDIA:<path> on a line of its own in your answer, one line for each file, from your own folder. A path, or a link to this machine, reaches nobody: the people and agents here cannot open your folder.`;
25076
+ const which = options.project === true ? "A file that isn't in the space's project" : "A file";
25077
+ return `${which} reaches this space only when you send it: put MEDIA:<path> on a line of its own in your answer, one line for each file, from your own folder. A path, or a link to this machine, reaches nobody: the people and agents here cannot open your folder.`;
25078
25078
  }
25079
25079
  var SENDING_FILES = sendingFiles();
25080
25080
  var MOST_FILES = 20;
@@ -25925,7 +25925,7 @@ var Bridge = class {
25925
25925
  saveState(state2);
25926
25926
  if (copied !== void 0) {
25927
25927
  await opencode2.update(copied.id, {
25928
- title: `Chips room ${spaceId}`,
25928
+ title: `Chips space ${spaceId}`,
25929
25929
  metadata: { ...copied.metadata, chips_space: spaceId, chips_agent: copy.agentId }
25930
25930
  }).catch((error62) => this.log(`${copy.name}'s session keeps ${name}'s title: ${messageOf(error62)}`));
25931
25931
  }
@@ -26099,7 +26099,7 @@ var Bridge = class {
26099
26099
  }
26100
26100
  }
26101
26101
  const made = await opencode2.newSession({
26102
- title: `Chips room ${spaceId}`,
26102
+ title: `Chips space ${spaceId}`,
26103
26103
  agent: agent.config.agent,
26104
26104
  model: agent.model,
26105
26105
  directory: await this.folderFor({ who, agent }),
@@ -26714,7 +26714,7 @@ function goalOf(message, name) {
26714
26714
  }
26715
26715
  function secondLook(who, reply, note) {
26716
26716
  const text2 = [
26717
- `${who} says your reply in this room wasn't right.`,
26717
+ `${who} says your reply in this space wasn't right.`,
26718
26718
  ...reply === void 0 ? [] : [`Your reply:
26719
26719
  \xAB${cut(reply.trim(), REPLY_CHARS)}\xBB`],
26720
26720
  note === void 0 ? "They didn't say what. Read your reply again and find what was wrong." : `What wasn't right: \xAB${note}\xBB`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chipschat/opencode",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "OpenCode as a Chips harness, on its V2 server (opencode serve): each OpenCode agent a Chips agent, each room an OpenCode session.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",