@chipschat/hermes 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/hermes 1.0.3 carries these packages, bundled in. Each one's
3
+ `dist/main.js` in @chipschat/hermes 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(name2, line.from)}: ${wordsOf(line)}`;
20553
20553
  case "joined":
20554
- return `(${name2} joined the room)`;
20554
+ return `(${name2} joined the space)`;
20555
20555
  case "left":
20556
- return `(${name2} left the room)`;
20556
+ return `(${name2} left the space)`;
20557
20557
  case "renamed":
20558
20558
  if (line.title !== void 0)
20559
- return `(${name2} renamed the room "${line.title}")`;
20559
+ return `(${name2} renamed the space "${line.title}")`;
20560
20560
  return `(${line.previous ?? name2} is now called ${line.name ?? name2})`;
20561
20561
  case "archived":
20562
- return `(${name2} archived the room)`;
20562
+ return `(${name2} archived the space)`;
20563
20563
  default:
20564
- return `(${name2} unarchived the room)`;
20564
+ return `(${name2} 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, name2) {
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}. ${name2} is asked to settle it next turn.)`;
22907
+ return `(Not in the space's project yet: ${namesInWords(pushed.files)} clashed with ${whose}. ${name2} 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;
@@ -25834,7 +25834,7 @@ var Bridge = class {
25834
25834
  const room = listed.find((agent) => agent.agentId === fork.agent_id)?.room ?? void 0;
25835
25835
  const from = (room === void 0 ? void 0 : state2.sessions[`${who}|${room}`]) ?? Object.entries(state2.sessions).findLast(([id2]) => id2.startsWith(`${who}|`))?.[1];
25836
25836
  if (from === void 0) this.log(`${name2} never spoke: its copy remembers nothing`);
25837
- const session = from === void 0 ? void 0 : await original.client.forkSession(from, { id: `chips-fork-${fork.id}`, title: `Chips room ${spaceId} \xB7 ${key}` });
25837
+ const session = from === void 0 ? void 0 : await original.client.forkSession(from, { id: `chips-fork-${fork.id}`, title: `Chips space ${spaceId} \xB7 ${key}` });
25838
25838
  const folder2 = this.folderOf(original, fork.agent_id, name2);
25839
25839
  const copy = await chips2.agents.register({ key, name: forkName(name2), forkedFrom: fork.agent_id, spaceId });
25840
25840
  if (session !== void 0) state2.sessions[`${copy.agentId}|${spaceId}`] ??= session;
@@ -26111,7 +26111,7 @@ var Bridge = class {
26111
26111
  const kept = this.options.state.sessions[id2];
26112
26112
  if (kept !== void 0) return kept;
26113
26113
  const who = id2.slice(0, id2.lastIndexOf("|"));
26114
- const made = await agent.client.newSession(`Chips room ${spaceId}${who === agent.key ? "" : ` \xB7 ${who}`}`);
26114
+ const made = await agent.client.newSession(`Chips space ${spaceId}${who === agent.key ? "" : ` \xB7 ${who}`}`);
26115
26115
  this.options.state.sessions[id2] = made;
26116
26116
  this.options.saveState(this.options.state);
26117
26117
  return made;
@@ -26377,7 +26377,7 @@ var GOAL_SHOWN = 120;
26377
26377
  function lookAgain(who, reply, note) {
26378
26378
  const said = reply?.trim() ?? "";
26379
26379
  return [
26380
- `${who} says your reply in this room wasn't right.`,
26380
+ `${who} says your reply in this space wasn't right.`,
26381
26381
  ...said === "" ? [] : [`Your reply:
26382
26382
  \xAB${cut(said, REPLY_SHOWN)}\xBB`],
26383
26383
  note === void 0 || note === "" ? "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/hermes",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Hermes Agent as a Chips harness, on its Runs API: each profile a Chips agent, each room a Hermes session.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",