tryharness 0.7.83 → 0.7.86

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 (215) hide show
  1. package/README.md +21 -19
  2. package/assets/dsh-plugin.mjs +75 -4
  3. package/assets/herdr-mod/harness/main.js +367 -0
  4. package/assets/herdr-mod/harness/mod.json +6 -0
  5. package/assets/opencode-plugin.js +87 -22
  6. package/assets/pi-extension.ts +81 -2
  7. package/cli.mjs +544 -208
  8. package/lib/adapters.mjs +62 -27
  9. package/lib/agentBinaries.mjs +6 -8
  10. package/lib/agentClaims.mjs +168 -0
  11. package/lib/agentReadTools.json +415 -0
  12. package/lib/agentSignIn.mjs +17 -18
  13. package/lib/agentWiring.mjs +114 -0
  14. package/lib/archetypes.js +10 -11
  15. package/lib/attention.mjs +100 -0
  16. package/lib/audit.mjs +1 -1
  17. package/lib/backupSetup.mjs +6 -28
  18. package/lib/bankrApprovals.mjs +86 -0
  19. package/lib/boardAccess.mjs +40 -66
  20. package/lib/boardBackup.mjs +86 -85
  21. package/lib/boardCommands.mjs +28 -0
  22. package/lib/boardFileCommands.mjs +29 -36
  23. package/lib/boardFiles.mjs +83 -15
  24. package/lib/boardMirror.mjs +78 -11
  25. package/lib/boardProtocol.json +191 -123
  26. package/lib/boardThreads.mjs +19 -37
  27. package/lib/boardTools.mjs +22 -15
  28. package/lib/boardWatches.mjs +43 -15
  29. package/lib/bridge.mjs +7 -3
  30. package/lib/browserAgentTools.mjs +59 -0
  31. package/lib/browserWake.mjs +0 -6
  32. package/lib/cards.mjs +52 -0
  33. package/lib/circling.mjs +189 -0
  34. package/lib/cleanup.mjs +234 -0
  35. package/lib/cloudBoot.mjs +21 -4
  36. package/lib/cloudSave.mjs +46 -5
  37. package/lib/compaction.mjs +8 -1
  38. package/lib/completion.mjs +358 -0
  39. package/lib/computerDevices.mjs +853 -0
  40. package/lib/connectionStatus.mjs +34 -0
  41. package/lib/connectors.mjs +139 -1
  42. package/lib/coordinator.mjs +108 -14
  43. package/lib/coreModels.mjs +36 -12
  44. package/lib/daemon.mjs +2426 -338
  45. package/lib/daemonLock.mjs +103 -0
  46. package/lib/deviceDoor.mjs +308 -0
  47. package/lib/deviceIdentity.mjs +114 -0
  48. package/lib/deviceList.mjs +172 -0
  49. package/lib/deviceSeal.mjs +74 -0
  50. package/lib/dispatcher.mjs +497 -26
  51. package/lib/dispatches.mjs +3 -3
  52. package/lib/environment.mjs +2 -1
  53. package/lib/environments.mjs +67 -41
  54. package/lib/events.mjs +318 -0
  55. package/lib/facts.mjs +170 -0
  56. package/lib/fileSource.mjs +540 -0
  57. package/lib/files.mjs +47 -2
  58. package/lib/gitHost.mjs +39 -1
  59. package/lib/goalCommands.mjs +12 -80
  60. package/lib/handover.mjs +21 -16
  61. package/lib/harnessOffers.mjs +140 -15
  62. package/lib/herdr.mjs +100 -15
  63. package/lib/herdrAppCall.mjs +19 -0
  64. package/lib/herdrCore.mjs +59 -0
  65. package/lib/herdrRuns.mjs +1126 -0
  66. package/lib/hookDialects.mjs +235 -50
  67. package/lib/identityLink.mjs +81 -0
  68. package/lib/inference.mjs +31 -2
  69. package/lib/jamAccess.mjs +82 -0
  70. package/lib/{projectBoard.mjs → jamBoard.mjs} +5 -4
  71. package/lib/{projectGit.mjs → jamGit.mjs} +53 -15
  72. package/lib/jamKey.mjs +274 -0
  73. package/lib/{projectPieces.mjs → jamPieces.mjs} +35 -29
  74. package/lib/{projectSettings.mjs → jamSettings.mjs} +12 -22
  75. package/lib/jamStore.mjs +973 -0
  76. package/lib/jamUpgrade.mjs +112 -0
  77. package/lib/jams.mjs +3079 -0
  78. package/lib/kanban.mjs +13 -7
  79. package/lib/landed.mjs +5 -1
  80. package/lib/library.mjs +41 -22
  81. package/lib/limits.mjs +91 -0
  82. package/lib/lineDiff.mjs +97 -0
  83. package/lib/lineup.mjs +18 -13
  84. package/lib/link.mjs +584 -0
  85. package/lib/localStack.mjs +75 -16
  86. package/lib/localmodels.mjs +58 -78
  87. package/lib/loopBackstop.mjs +2 -1
  88. package/lib/machine.mjs +544 -0
  89. package/lib/machineLink.mjs +446 -0
  90. package/lib/machineRoutes.mjs +68 -19
  91. package/lib/machineRuns.mjs +85 -4
  92. package/lib/machineSeal.mjs +6 -31
  93. package/lib/manager.mjs +134 -12
  94. package/lib/mcp-stdio.mjs +492 -215
  95. package/lib/mcpRelay.mjs +34 -35
  96. package/lib/members.json +1 -1
  97. package/lib/modelRoute.mjs +162 -0
  98. package/lib/nativeHost.mjs +81 -90
  99. package/lib/nativeSenses.mjs +258 -0
  100. package/lib/nerves.mjs +523 -0
  101. package/lib/network.mjs +117 -278
  102. package/lib/networkPlaces.mjs +578 -0
  103. package/lib/nextStep.mjs +95 -0
  104. package/lib/notify.mjs +2 -2
  105. package/lib/nudge.mjs +116 -10
  106. package/lib/originals.mjs +216 -0
  107. package/lib/outsideEvents.mjs +383 -0
  108. package/lib/outsideRuns.mjs +230 -0
  109. package/lib/ownMachines.mjs +674 -256
  110. package/lib/pain.mjs +215 -0
  111. package/lib/pairing.mjs +91 -11
  112. package/lib/paths.mjs +42 -3
  113. package/lib/peerProcess.mjs +21 -7
  114. package/lib/peopleLink.mjs +268 -0
  115. package/lib/personNotices.mjs +3 -2
  116. package/lib/phones.mjs +252 -542
  117. package/lib/placeCards.mjs +282 -0
  118. package/lib/placeChecks.mjs +95 -0
  119. package/lib/placeCommands.mjs +8 -17
  120. package/lib/placeRequests.mjs +152 -0
  121. package/lib/placeStore.mjs +295 -0
  122. package/lib/placeTool.d.ts +12 -0
  123. package/lib/placeTool.js +40 -0
  124. package/lib/places.mjs +63 -14
  125. package/lib/plans.mjs +53 -8
  126. package/lib/presence.mjs +270 -0
  127. package/lib/privateNetwork.d.ts +2 -0
  128. package/lib/privateNetwork.js +93 -0
  129. package/lib/proposals.mjs +300 -0
  130. package/lib/publicFetch.d.ts +32 -0
  131. package/lib/publicFetch.js +248 -0
  132. package/lib/reach.mjs +128 -0
  133. package/lib/rebuildable.mjs +72 -0
  134. package/lib/recall.mjs +216 -0
  135. package/lib/record.mjs +13 -0
  136. package/lib/reflexes.mjs +392 -0
  137. package/lib/relayLimits.mjs +31 -2
  138. package/lib/releaseNotice.mjs +198 -0
  139. package/lib/removeHarness.mjs +15 -4
  140. package/lib/repoLinks.mjs +204 -35
  141. package/lib/runAuthority.mjs +102 -39
  142. package/lib/runBrief.mjs +93 -40
  143. package/lib/runRequests.mjs +52 -14
  144. package/lib/runUsage.mjs +31 -0
  145. package/lib/runWorker.mjs +74 -25
  146. package/lib/runner.mjs +289 -45
  147. package/lib/runtime-install.mjs +37 -8
  148. package/lib/schedules.mjs +171 -47
  149. package/lib/screenWatches.mjs +221 -0
  150. package/lib/sealed.mjs +12 -30
  151. package/lib/sealedThreads.mjs +198 -392
  152. package/lib/secretStore.mjs +178 -0
  153. package/lib/secrets.mjs +11 -0
  154. package/lib/seen.mjs +3 -9
  155. package/lib/selfUpdate.mjs +51 -15
  156. package/lib/senseCall.mjs +1514 -0
  157. package/lib/senseHook.mjs +114 -0
  158. package/lib/senseTools.mjs +1298 -0
  159. package/lib/sessionBriefs.mjs +87 -0
  160. package/lib/sessionControl.mjs +63 -13
  161. package/lib/sessionFiles.mjs +85 -0
  162. package/lib/setupChoices.mjs +12 -3
  163. package/lib/setupMode.mjs +70 -25
  164. package/lib/sharedKeys.mjs +166 -0
  165. package/lib/sleep.mjs +396 -0
  166. package/lib/sources.mjs +306 -0
  167. package/lib/speech.mjs +166 -411
  168. package/lib/spoken.mjs +210 -0
  169. package/lib/steerHook.mjs +3 -1
  170. package/lib/steerQueue.mjs +40 -11
  171. package/lib/store.mjs +323 -130
  172. package/lib/stuck.mjs +85 -7
  173. package/lib/swarm.mjs +157 -49
  174. package/lib/swarmDevices.mjs +25 -85
  175. package/lib/swarmMemory.mjs +93 -9
  176. package/lib/t3.mjs +73 -3
  177. package/lib/taskCommands.mjs +51 -60
  178. package/lib/taskRooms.mjs +30 -4
  179. package/lib/taskRules.json +29 -0
  180. package/lib/taskRules.mjs +21 -0
  181. package/lib/taskRuns.mjs +74 -11
  182. package/lib/team.mjs +2 -1
  183. package/lib/threadActions.mjs +37 -9
  184. package/lib/threadAuthority.mjs +4 -4
  185. package/lib/threadBriefs.mjs +173 -43
  186. package/lib/threadNotes.mjs +320 -0
  187. package/lib/threadRecord.mjs +491 -0
  188. package/lib/threadRuns.mjs +216 -108
  189. package/lib/threadView.mjs +27 -30
  190. package/lib/threadWatches.mjs +1962 -0
  191. package/lib/timeSense.mjs +839 -0
  192. package/lib/tripwires.mjs +454 -0
  193. package/lib/ui.mjs +1 -1
  194. package/lib/vault.mjs +560 -45
  195. package/lib/vaultCommands.mjs +5 -3
  196. package/lib/vaultPeers.mjs +165 -0
  197. package/lib/vaultTools.d.ts +4 -1
  198. package/lib/vaultTools.js +22 -1
  199. package/lib/verdicts.mjs +12 -26
  200. package/lib/versions.mjs +117 -0
  201. package/lib/waitTool.mjs +278 -0
  202. package/lib/wakePicture.mjs +268 -0
  203. package/lib/wakeQueue.mjs +108 -0
  204. package/lib/watchResponses.mjs +533 -0
  205. package/lib/watches.mjs +290 -145
  206. package/lib/windowAsks.mjs +80 -17
  207. package/lib/worktrees.mjs +159 -9
  208. package/npm-shrinkwrap.json +138 -631
  209. package/package.json +7 -6
  210. package/release.json +211 -129
  211. package/lib/callSessions.mjs +0 -51
  212. package/lib/directLink.mjs +0 -349
  213. package/lib/peopleBoard.mjs +0 -131
  214. package/lib/projects.mjs +0 -2917
  215. package/lib/roomChannels.mjs +0 -667
@@ -12,8 +12,8 @@ import {
12
12
  } from "./specialties.mjs";
13
13
 
14
14
  // Working with other people's swarms (docs/swarm-organization.md, "Working with other people's swarms"; the words are
15
- // GLOSSARY.md's): open pieces, claims, handoffs and each person's strengths in a shared room, on top of the project's
16
- // record (projects.mjs).
15
+ // GLOSSARY.md's): open pieces, claims, handoffs and each person's strengths in a shared room, on top of the jam's
16
+ // record (jams.mjs).
17
17
  //
18
18
  // - An open piece is a record entry (`piece`) with the specialty it needs and no owner. Any swarm in the room may claim
19
19
  // it: each computer's own dispatcher, here in code, looks among its own agents in the room for a free one that carries
@@ -23,16 +23,16 @@ import {
23
23
  // passes it on from its owner (at most HANDOFFS deep, never back to the agent it came from); a release by the owner's
24
24
  // side puts it back up open. Two claims made at nearly the same moment: the first one made holds, and the computer
25
25
  // whose claim lost stops its run.
26
- // - Secrets, spending and onchain actions never go agent to agent across swarms, even in a claim: a guarded piece is
27
- // claimed only once the person of the swarm that would take it says OK, and a guarded handoff to the other side
26
+ // - Work that needs a secret, spending or onchain actions does not go agent to agent across swarms by a claim: a guarded
27
+ // piece is claimed only once the person of the swarm that would take it says OK, and a guarded handoff to the other side
28
28
  // waits for its receiving person. Both are proposals waiting on that one person, so they reach every surface as the
29
- // project's own `agree` needs-you card. Words that look like a secret never leave this computer.
29
+ // jam's own `agree` needs-you card. Words that look like a secret never leave this computer. Using a secret across
30
+ // swarms goes through the vault, where the value stays on its own computer (vault.mjs).
30
31
 
31
32
  export const HANDOFFS = 3;
32
- // Kinds of record entry this module adds to a project's record.
33
+ // Kinds of record entry this module adds to a jam's record.
33
34
  export const PIECE_KINDS = ["piece", "claim", "handoff", "accept", "release"];
34
35
  const STRENGTHS = "strengths";
35
- export const RECORD_KINDS = [...PIECE_KINDS, STRENGTHS];
36
36
  // Declared side effects, as an outside agent's mandate names them (src/schemas/externalAgent.ts SIDE_EFFECT_CLASSES).
37
37
  const EFFECTS = [
38
38
  "financial_onchain",
@@ -74,13 +74,20 @@ export function guardOf(body) {
74
74
  return null;
75
75
  }
76
76
 
77
+ // Where the jam put an entry in its one order (its first event's sequence number); one not taken yet comes after all.
78
+ const placeOf = (entry) =>
79
+ Number.isInteger(entry.seq) ? entry.seq : Number.MAX_SAFE_INTEGER;
80
+
77
81
  /**
78
- * Who owns a piece now, worked out from the entries about it in the order they were made (ties by side, then id), so
79
- * every computer holding the same entries agrees: `{ owner, from, depth, chain, offered, released, claimedBy }`.
82
+ * Who owns a piece now, worked out from the entries about it in the order the jam took them (its sequence: two claims
83
+ * made at nearly the same moment are settled by which reached the jam first, whatever each computer's clock said; then
84
+ * by when made, side and id for entries not taken yet), so every computer holding the same entries agrees:
85
+ * `{ owner, from, depth, chain, offered, released, claimedBy }`.
80
86
  */
81
87
  export function ownershipOf(entries) {
82
88
  const ordered = [...entries].sort(
83
89
  (a, b) =>
90
+ placeOf(a) - placeOf(b) ||
84
91
  String(a.at).localeCompare(String(b.at)) ||
85
92
  a.side.localeCompare(b.side) ||
86
93
  a.id.localeCompare(b.id)
@@ -162,14 +169,14 @@ export function ownershipOf(entries) {
162
169
  }
163
170
 
164
171
  /**
165
- * The pieces of one shared project. Made by createProjects, which hands it the project's record (`items`, `item`,
172
+ * The pieces of one jam. Made by createJams, which hands it the jam's record (`items`, `item`,
166
173
  * `write`), its names (`display`, `shared`, `local`), the room's agents (`ownAgents`, `remoteAgents`, `peopleOf`) and
167
174
  * the run seams (`wakeRun`, `stopRun`, `laneOf`, `commitLane`, `changedFiles`).
168
175
  */
169
176
  export function createPieces({
170
177
  store,
171
178
  log = () => {},
172
- project,
179
+ jam: project,
173
180
  items,
174
181
  item,
175
182
  write,
@@ -190,7 +197,7 @@ export function createPieces({
190
197
  }) {
191
198
  const pieceIn = (p, id) => {
192
199
  const entry = item(id);
193
- return entry?.kind === "piece" && entry.projectId === p.id ? entry : null;
200
+ return entry?.kind === "piece" && entry.jamId === p.id ? entry : null;
194
201
  };
195
202
  const eventsOf = (p, pieceId) =>
196
203
  PIECE_KINDS.slice(1)
@@ -212,7 +219,7 @@ export function createPieces({
212
219
 
213
220
  // ---- this side's dispatcher ----
214
221
 
215
- // Whether an agent is at work anywhere on this computer now, or on a piece of work in this project.
222
+ // Whether an agent is at work anywhere on this computer now, or on a piece of work in this jam.
216
223
  const busy = (p, agent) =>
217
224
  Boolean(openWorkOf(p, p.me, agent)) ||
218
225
  store.db.all(
@@ -277,7 +284,7 @@ export function createPieces({
277
284
  piece: piece.id,
278
285
  agent: shared(fresh, agent),
279
286
  });
280
- log(`project ${fresh.id}: ${agent} claimed piece ${piece.id}`);
287
+ log(`jam ${fresh.id}: ${agent} claimed piece ${piece.id}`);
281
288
  }
282
289
  };
283
290
  const timers = new Map();
@@ -288,7 +295,7 @@ export function createPieces({
288
295
  try {
289
296
  sweep(p);
290
297
  } catch (error) {
291
- log(`project pieces: ${error.message}`);
298
+ log(`jam pieces: ${error.message}`);
292
299
  }
293
300
  }, SWEEP_MS);
294
301
  timer.unref?.();
@@ -324,7 +331,7 @@ export function createPieces({
324
331
  const accepted = state.acceptedBy === p.me;
325
332
  const asker = hop?.from ?? piece.body.by ?? `${piece.side}/person`;
326
333
  // A claim needs no OK; nor does what this side's person said yes to. A handoff from another swarm is work the
327
- // other side pushed at a named agent, which `start` governs (projects.mjs gate).
334
+ // other side pushed at a named agent, which `start` governs (jams.mjs gate).
328
335
  const go =
329
336
  !hop ||
330
337
  accepted ||
@@ -351,7 +358,7 @@ export function createPieces({
351
358
  /** This side's run on a piece ends where it is: stopped, its changes committed on its branch. */
352
359
  const halted = (p, agent) => `piece-halted:${p.id}:${agent}`;
353
360
  const halt = (p, work, fields) => {
354
- // A run still going commits as it ends, into this piece's branch (projects.mjs committed, stoppedWork).
361
+ // A run still going commits as it ends, into this piece's branch (jams.mjs committed, stoppedWork).
355
362
  if (
356
363
  p.roomId &&
357
364
  store
@@ -516,7 +523,7 @@ export function createPieces({
516
523
  sweepSoon(p);
517
524
  };
518
525
 
519
- /** An entry of the project's record was made here or arrived: the pieces it touches settle, and the dispatcher looks. */
526
+ /** An entry of the jam's record was made here or arrived: the pieces it touches settle, and the dispatcher looks. */
520
527
  const changed = (p, entry) => {
521
528
  if (!p || !entry || p.status !== "open") return;
522
529
  if (entry.kind === "piece") return sweepSoon(p);
@@ -621,8 +628,7 @@ export function createPieces({
621
628
  const piece = items(p.id, "piece").find(
622
629
  (entry) => stateOf(p, entry.id).owner === from && !doneOf(p, entry.id)
623
630
  );
624
- if (!piece)
625
- throw new Error("You hold no piece in this project to hand on.");
631
+ if (!piece) throw new Error("You hold no piece in this jam to hand on.");
626
632
  const state = stateOf(p, piece.id);
627
633
  const named = String(to || "")
628
634
  .trim()
@@ -655,7 +661,7 @@ export function createPieces({
655
661
  entry.body.type === "handoff" &&
656
662
  entry.body.piece === piece.id &&
657
663
  !entry.body.withdrawn &&
658
- !store.meta(`project-accepted:${entry.id}`)
664
+ !store.meta(`jam-accepted:${entry.id}`)
659
665
  );
660
666
  if (!waiting)
661
667
  propose(
@@ -714,11 +720,11 @@ export function createPieces({
714
720
 
715
721
  /** The person's and agents' piece commands; null for a command that isn't one. */
716
722
  const command = (p, name, request, agent) => {
717
- if (name === "board.project.piece")
723
+ if (name === "board.jam.piece")
718
724
  return post(p, agent === "user" ? "user" : agent, request);
719
- if (name === "board.project.release" && agent === "user")
725
+ if (name === "board.jam.release" && agent === "user")
720
726
  return release(p, String(request.piece || ""));
721
- if (name === "board.project.handoff" && agent !== "user")
727
+ if (name === "board.jam.handoff" && agent !== "user")
722
728
  return handoff(p, agent, request);
723
729
  return null;
724
730
  };
@@ -779,7 +785,7 @@ export function createPieces({
779
785
  entry.body.piece === piece.id &&
780
786
  entry.side === p.me &&
781
787
  !entry.body.withdrawn &&
782
- !store.meta(`project-accepted:${entry.id}`) &&
788
+ !store.meta(`jam-accepted:${entry.id}`) &&
783
789
  !items(p.id, "answer").some(
784
790
  (answer) =>
785
791
  answer.body.proposal === entry.id && answer.body.yes === false
@@ -831,7 +837,7 @@ export function createPieces({
831
837
  });
832
838
  };
833
839
 
834
- /** What an agent in the room is told of the pieces, beside the rest of the project's record. */
840
+ /** What an agent in the room is told of the pieces, beside the rest of the jam's record. */
835
841
  const brief = (p, agent) => {
836
842
  const pieces = view(p).filter((piece) => piece.state !== "done");
837
843
  const own = pieces.find(
@@ -840,7 +846,7 @@ export function createPieces({
840
846
  const state = own ? stateOf(p, own.id) : null;
841
847
  return [
842
848
  pieces.length
843
- ? `Open pieces of this project (a swarm's dispatcher claims one for a free agent that fits; nobody routes another swarm's agents):\n${pieces
849
+ ? `Open pieces of this jam (a swarm's dispatcher claims one for a free agent that fits; nobody routes another swarm's agents):\n${pieces
844
850
  .map(
845
851
  (piece) =>
846
852
  `- "${lineOf(piece.summary, 160)}" needs ${piece.specialtyName}${piece.owner ? `, held by ${piece.owner.who}` : piece.state === "waiting" ? ", waiting for a person" : ", open"}`
@@ -850,7 +856,7 @@ export function createPieces({
850
856
  own
851
857
  ? `You hold the piece "${lineOf(own.summary, 160)}". To pass it to another agent here, call plan_work with hand_to (one of your swarm's agents by name, or the other side's by its full name); you stay accountable until it reports. A piece is handed on at most ${HANDOFFS} times (${HANDOFFS - state.depth} left) and never back to the agent it came from.`
852
858
  : "",
853
- "To put up a piece any swarm in the room may claim, call plan_work with open and the specialty it needs. Secrets, spending and onchain actions never go from agent to agent between swarms: such a piece waits for a person.",
859
+ "To put up a piece any swarm in the room may claim, call plan_work with open and the specialty it needs. A piece that needs a secret, spending or onchain actions waits for a person. To let the other swarm's agent use a secret you hold, without the value leaving this computer, use use_secret's pass.",
854
860
  ]
855
861
  .filter(Boolean)
856
862
  .join("\n");
@@ -871,7 +877,7 @@ export function createPieces({
871
877
  return item(id);
872
878
  };
873
879
 
874
- /** The pieces as the project's board shows them (projectBoard.mjs), read without changing anything. */
880
+ /** The pieces as the jam's board shows them (jamBoard.mjs), read without changing anything. */
875
881
  const cards = (p) =>
876
882
  items(p.id, "piece")
877
883
  .filter((piece) => !piece.body.withdrawn)
@@ -1,35 +1,25 @@
1
- // What a shared project lets its agents do, and how the two people change it: anything that gives agents more reach
2
- // needs both people; anything that takes reach away takes one, at once. Both computers work the settings out the same
3
- // way from the same record, so they never disagree on what an agent may do.
1
+ // What a jam lets its agents do, and how its people change it: anything that gives agents more reach needs every
2
+ // current member; anything that takes reach away takes one, at once (owner, October 20; docs/jam-plan.md
3
+ // settled 8). Every member's computer works the settings out the same way from the same record, so they never disagree
4
+ // on what an agent may do. There is no setting that holds agents' words back: everyone in a jam sees everything
5
+ // (owner, November 12: holding agents' replies is "a little too strict everyone sees everything").
4
6
 
5
7
  /**
6
8
  * Each setting, narrowest first in `values`. `label` is how the person reads it; `on`/`off` read its two states for a
7
9
  * yes/no setting, `choices` for one with words.
8
10
  */
9
11
  export const SETTINGS = {
10
- talk: {
11
- label: "Agents talk to each other here without waiting for you",
12
- values: [false, true],
13
- initial: true,
14
- },
15
12
  start: {
16
- // Consent to code running on this computer from the other person's words (security audit P2, October 25): Claude
13
+ // Consent to code running on this computer from another person's words (security audit P2, October 25; D4): Claude
17
14
  // Code or Codex runs it restricted in a copy (none of the person's credentials, no network, only the board and its
18
15
  // own folder), any other agent still waits for the person's Start. On from the start: the person connected their
19
- // swarm to a collaborator to get work done (owner, October 31: "if hes connecting his AI to another persons, they
20
- // are a trusted party doing collaborative work"); either person turns it off at once.
16
+ // swarm to collaborators to get work done (owner, October 31: "if hes connecting his AI to another persons, they
17
+ // are a trusted party doing collaborative work"); any member turns it off for everyone at once.
21
18
  label:
22
- "Agents start work the other side asks for (this runs code on your computer)",
19
+ "Agents start work other people's agents ask for (this runs code on your computer)",
23
20
  values: [false, true],
24
21
  initial: true,
25
22
  },
26
- // Harness works on this person's credits, so it answers the other side only when both let it: money stays behind
27
- // consent (owner, October 31), apart from the agents starting each other's work above.
28
- harness: {
29
- label: "Harness answers the other side (on your Harness credits)",
30
- values: [false, true],
31
- initial: false,
32
- },
33
23
  push: {
34
24
  label: "Agents push their own branches",
35
25
  values: [false, true],
@@ -67,7 +57,7 @@ export const initialSettings = () =>
67
57
  export const validSetting = (key, value) =>
68
58
  Object.hasOwn(SETTINGS, key) && SETTINGS[key].values.includes(value);
69
59
 
70
- /** Whether moving `key` from `from` to `to` gives agents more reach, so the other person has to agree. */
60
+ /** Whether moving `key` from `from` to `to` gives agents more reach, so every other member has to agree. */
71
61
  export const widens = (key, from, to) => {
72
62
  const order = SETTINGS[key].values;
73
63
  return order.indexOf(to) > order.indexOf(from);
@@ -84,8 +74,8 @@ const consistent = (settings) =>
84
74
  : settings;
85
75
 
86
76
  /**
87
- * The settings in force: those both people agreed to at the start, then each change by when it took effect (a narrowing
88
- * when it was made, a widening when the other person agreed). Two changes at the same moment keep the narrower. Every
77
+ * The settings in force: those the jam started with, then each change by when it took effect (a narrowing when it was
78
+ * made, a widening when the last member it needed agreed). Two changes at the same moment keep the narrower. Every
89
79
  * change is `{ key, value, at }`.
90
80
  */
91
81
  export function effectiveSettings(agreed, changes) {