@ai-ecoverse/slicc-spectrum 1.72.0 → 1.73.1

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.
@@ -3299,7 +3299,7 @@ function events() {
3299
3299
  id: "k-s2",
3300
3300
  role: "system",
3301
3301
  kind: "compaction",
3302
- title: "Compaction fell back",
3302
+ title: "Compaction failed, transcript truncated",
3303
3303
  text: "The summary failed, so the oldest 20 messages were dropped instead.",
3304
3304
  trigger: "overflow",
3305
3305
  state: "fallback",
@@ -3381,7 +3381,7 @@ function events() {
3381
3381
  role: "system",
3382
3382
  kind: "notice",
3383
3383
  title: "Model changed",
3384
- text: "This cone now uses Claude Opus 5.5.",
3384
+ text: "to Claude Opus 5.5 (Anthropic)",
3385
3385
  createdAt: at(1478)
3386
3386
  }
3387
3387
  ];
@@ -4473,6 +4473,26 @@ var DummyMonitor = class extends Emitter {
4473
4473
 
4474
4474
  // src/dummy/network.ts
4475
4475
  var minute = 6e4;
4476
+ var cove = {
4477
+ id: "https://hub.cove-studio.example",
4478
+ name: "SLICC on cove-studio",
4479
+ hub: "hub.cove-studio.example",
4480
+ state: "connected"
4481
+ };
4482
+ var marsh = {
4483
+ id: "https://tray.marsh-desk.example",
4484
+ name: "SLICC on marsh-desk",
4485
+ hub: "tray.marsh-desk.example",
4486
+ state: "failed",
4487
+ error: "The hub didn\u2019t answer. Check the connection and try again."
4488
+ };
4489
+ function leadersFixtures(scenario) {
4490
+ if (scenario === "failed") return [marsh];
4491
+ if (scenario === "unlinked") return [{ ...cove, state: "unlinked" }];
4492
+ if (scenario === "disconnected") return [{ ...cove, state: "disconnected" }];
4493
+ if (scenario === "two") return [cove, marsh];
4494
+ return [cove];
4495
+ }
4476
4496
  function networkFixtures(scenario, now2 = Date.now()) {
4477
4497
  const extensionUrl = "https://extensions.example/slicc";
4478
4498
  if (scenario === "ok") {
@@ -4767,8 +4787,13 @@ var DummyNetwork = class extends Emitter {
4767
4787
  retryLinks;
4768
4788
  mountFolder;
4769
4789
  ejectFolder;
4790
+ retryLeader;
4791
+ disconnectLeader;
4792
+ reconnectLeader;
4793
+ forgetLeader;
4794
+ #leaders;
4770
4795
  #files;
4771
- constructor(scenario, clock2, tailnet, links, files3) {
4796
+ constructor(scenario, clock2, tailnet, links, files3, leaders) {
4772
4797
  super();
4773
4798
  this.scenario = scenario;
4774
4799
  this.#clock = clock2;
@@ -4786,10 +4811,48 @@ var DummyNetwork = class extends Emitter {
4786
4811
  this.#files = files3;
4787
4812
  files3?.on("mounts", (targets) => this.#mounted(targets));
4788
4813
  }
4814
+ if (leaders) {
4815
+ this.#leaders = leadersFixtures(leaders);
4816
+ this.retryLeader = (id) => this.#retryLeader(id);
4817
+ this.reconnectLeader = (id) => this.#retryLeader(id);
4818
+ this.disconnectLeader = (id) => this.#disconnectLeader(id);
4819
+ this.forgetLeader = (id) => this.#dropLeader(id);
4820
+ }
4789
4821
  this.#base = networkFixtures(scenario);
4790
4822
  this.#status = this.#with(this.#base);
4791
4823
  }
4824
+ #withLeaders(status) {
4825
+ const leaders = this.#leaders;
4826
+ if (!leaders) return status;
4827
+ this.#leaders = leaders.filter((leader) => leader.state !== "unlinked");
4828
+ return { ...status, leaders };
4829
+ }
4830
+ #leader(id, change) {
4831
+ this.#leaders = this.#leaders.map((leader) => {
4832
+ if (leader.id !== id) return leader;
4833
+ const { error: _, ...rest } = leader;
4834
+ return { ...rest, ...change };
4835
+ });
4836
+ this.#emit();
4837
+ }
4838
+ async #retryLeader(id) {
4839
+ this.#leader(id, { state: "connecting" });
4840
+ await this.#clock.sleep(8);
4841
+ this.#leader(id, { state: "connected" });
4842
+ }
4843
+ async #disconnectLeader(id) {
4844
+ await this.#clock.sleep(4);
4845
+ this.#leader(id, { state: "disconnected" });
4846
+ }
4847
+ async #dropLeader(id) {
4848
+ await this.#clock.sleep(4);
4849
+ this.#leaders = this.#leaders.filter((leader) => leader.id !== id);
4850
+ this.#emit();
4851
+ }
4792
4852
  #with(status) {
4853
+ return this.#withLeaders(this.#withLinks(status));
4854
+ }
4855
+ #withLinks(status) {
4793
4856
  const links = this.#links;
4794
4857
  if (!links) return this.#withTailnet(status);
4795
4858
  const exit = this.#exit;
@@ -6446,6 +6509,7 @@ function createDummyModel({
6446
6509
  network = "limited",
6447
6510
  tailnet,
6448
6511
  links,
6512
+ leaders,
6449
6513
  changes = "files",
6450
6514
  notices = "off",
6451
6515
  tabs: tabs2 = "off",
@@ -6513,7 +6577,7 @@ function createDummyModel({
6513
6577
  ...packages === "off" ? {} : { packages },
6514
6578
  confirm
6515
6579
  }),
6516
- ...network === "off" ? {} : { network: new DummyNetwork(network, time, tailnet, links, files3) },
6580
+ ...network === "off" ? {} : { network: new DummyNetwork(network, time, tailnet, links, files3, leaders) },
6517
6581
  ...changes === "files" ? {} : { changes: new DummyChanges(files3, changes === "git") },
6518
6582
  ...notices === "off" ? {} : { notices: new DummyNotices(notices, time) },
6519
6583
  ...tabs2 === "off" ? {} : { tabs: new DummyTabs(tabs2, time) },
@@ -6548,6 +6612,7 @@ export {
6548
6612
  createDummyModel,
6549
6613
  followFixtures,
6550
6614
  joinUrl,
6615
+ leadersFixtures,
6551
6616
  linksFixtures,
6552
6617
  networkFixtures,
6553
6618
  noticeFixtures,