@ai-ecoverse/slicc-spectrum 1.102.0 → 1.103.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.
@@ -8,9 +8,11 @@ import {
8
8
  accounts,
9
9
  agents,
10
10
  clock,
11
+ codexAccount,
11
12
  conversations,
12
13
  defaults,
13
14
  directories,
15
+ dualAccount,
14
16
  files,
15
17
  laterModels,
16
18
  longAsk,
@@ -26,7 +28,7 @@ import {
26
28
  skillEdit,
27
29
  tabs,
28
30
  terminals
29
- } from "./chunk-3IV5AAUZ.js";
31
+ } from "./chunk-7O5TLOZV.js";
30
32
  import {
31
33
  Emitter
32
34
  } from "./chunk-T5NHW4KC.js";
@@ -5418,8 +5420,75 @@ var userPackages = () => [
5418
5420
  range: "^0.3.0"
5419
5421
  })
5420
5422
  ];
5423
+ var longDescription = "Type-checks and compiles **TypeScript** to JavaScript. See [the handbook](https://example.test/handbook) and `tsc --init`, " + "<b>projects</b>, _watch mode_ and incremental builds for large monorepos with many references. ".repeat(
5424
+ 3
5425
+ );
5426
+ function fromNpm(items) {
5427
+ const disk = { git: 584e5, python: 851e5 };
5428
+ const npm = items.map((item) => ({
5429
+ ...item,
5430
+ size: disk[item.id] ?? item.size * 3,
5431
+ unpacked: true
5432
+ }));
5433
+ const at = (id) => npm.findIndex((item) => item.id === id);
5434
+ const patch = (id, change) => {
5435
+ npm[at(id)] = { ...npm[at(id)], ...change };
5436
+ };
5437
+ patch("tsc", { description: longDescription });
5438
+ patch("ruff", { notes: ["Rules that need a native plugin are left out in seven."] });
5439
+ patch("esbuild", {
5440
+ state: "available",
5441
+ actions: ["install"],
5442
+ log: void 0,
5443
+ newer: { version: "0.26.0", reason: "needs slicc-kernel 1.48.0 or newer" }
5444
+ });
5445
+ patch("pdf", {
5446
+ state: "available",
5447
+ offered: null,
5448
+ size: void 0,
5449
+ unpacked: void 0,
5450
+ error: null,
5451
+ log: void 0,
5452
+ actions: [],
5453
+ withheld: "needs slicc-kernel 1.48.0 or newer"
5454
+ });
5455
+ patch("biome", {
5456
+ state: "installed",
5457
+ offered: "2.2.4",
5458
+ actions: ["remove"],
5459
+ newer: { version: "2.3.0", reason: "needs slicc-kernel 1.48.0 or newer" }
5460
+ });
5461
+ npm[at("biome")] = Object.assign(npm[at("biome")], {
5462
+ homepage: "javascript:alert(1)",
5463
+ repository: { type: "git", url: "https://evil.example/biome" }
5464
+ });
5465
+ return npm;
5466
+ }
5467
+ function unknown(items, registry) {
5468
+ return items.map((item) => {
5469
+ const installed = item.version !== null;
5470
+ return {
5471
+ id: item.id,
5472
+ package: item.package,
5473
+ label: item.label,
5474
+ description: "",
5475
+ commands: [],
5476
+ ...item.requires ? { requires: item.requires } : {},
5477
+ state: installed ? "installed" : "available",
5478
+ version: item.version,
5479
+ offered: null,
5480
+ progress: null,
5481
+ error: null,
5482
+ actions: installed ? ["remove"] : registry === "unreachable" ? ["retry"] : [],
5483
+ registry
5484
+ };
5485
+ });
5486
+ }
5421
5487
  function packageFixtures(scenario) {
5422
5488
  if (scenario === "empty") return [];
5489
+ if (scenario === "npm") return fromNpm(packageFixtures("mixed"));
5490
+ if (scenario === "checking" || scenario === "offline")
5491
+ return unknown(packageFixtures("npm"), scenario === "offline" ? "unreachable" : "checking");
5423
5492
  const items = [
5424
5493
  offer("git", "git", "Version control for your projects.", ["git"], "2.47.1", 43e5),
5425
5494
  offer(
@@ -5546,6 +5615,7 @@ var DummyUpdates = class extends Emitter {
5546
5615
  #packages = [];
5547
5616
  #fail = false;
5548
5617
  #confirm;
5618
+ #offline = false;
5549
5619
  #beta;
5550
5620
  #developer = true;
5551
5621
  constructor(scenario, clock2, options = {}) {
@@ -5563,7 +5633,10 @@ var DummyUpdates = class extends Emitter {
5563
5633
  this.#packages = packageFixtures(options.packages);
5564
5634
  this.#fail = options.packages === "fail";
5565
5635
  this.packages = () => this.#packages;
5566
- this.actPackage = (id, action) => this.#actPackage(id, action);
5636
+ this.actPackage = (id, action) => action === "retry" && this.#packages.find((item) => item.id === id)?.registry ? this.#refresh() : this.#actPackage(id, action);
5637
+ this.#offline = options.packages === "offline";
5638
+ if (options.packages === "npm" || options.packages === "checking" || this.#offline)
5639
+ this.refreshPackages = () => this.#refresh();
5567
5640
  }
5568
5641
  }
5569
5642
  #patchPackage(id, patch) {
@@ -5679,6 +5752,24 @@ Progress: resolved 1, downloaded 1, added 1
5679
5752
  Done in 3.8s`
5680
5753
  });
5681
5754
  }
5755
+ async #refresh() {
5756
+ const before = this.#packages;
5757
+ this.#packages = before.map(
5758
+ (item) => item.registry ? { ...item, registry: "checking", actions: item.version ? ["remove"] : [] } : item
5759
+ );
5760
+ this.emit("packages", this.#packages);
5761
+ await this.#clock.sleep(4);
5762
+ if (this.#offline) {
5763
+ this.#offline = false;
5764
+ this.#packages = before;
5765
+ } else {
5766
+ const fresh = packageFixtures("npm");
5767
+ this.#packages = this.#packages.map(
5768
+ (item) => item.registry ? fresh.find((next) => next.id === item.id) : item
5769
+ );
5770
+ }
5771
+ this.emit("packages", this.#packages);
5772
+ }
5682
5773
  list() {
5683
5774
  return this.#items;
5684
5775
  }
@@ -6564,20 +6655,39 @@ function vaultAccounts(accounts2) {
6564
6655
  }
6565
6656
  var docsUrl = "https://docs.example/mcp";
6566
6657
  var movedDocs = "https://docs.eu.example/mcp";
6658
+ function hinted(login) {
6659
+ return login === "code" || login === "url" || login === "lookalike";
6660
+ }
6661
+ function signInChat(conversations2, login) {
6662
+ if (!hinted(login)) return conversations2;
6663
+ return {
6664
+ ...conversations2,
6665
+ "cone-kitchen": conversations2["cone-kitchen"].map(
6666
+ (message) => message.id === "k-s3" ? {
6667
+ ...message,
6668
+ account: "openai-codex",
6669
+ text: "The OpenAI Codex session expired. Log in again to continue."
6670
+ } : message
6671
+ )
6672
+ };
6673
+ }
6567
6674
  function settingsAccounts(accounts2, providers, transport, mcp) {
6568
6675
  return listedAccounts(accounts2, providers, transport).map(
6569
6676
  (account) => mcp === "moved" && account.id === "mcp:docs" ? { ...account, url: movedDocs } : account
6570
6677
  );
6571
6678
  }
6572
6679
  function listedAccounts(accounts2, providers, transport) {
6573
- const all = accounts2 === "vault" ? vaultAccounts(accounts) : accounts;
6680
+ const all = accounts2 === "settings" ? accounts : [
6681
+ ...vaultAccounts(accounts),
6682
+ ...accounts2 === "dual" ? [dualAccount] : []
6683
+ ];
6574
6684
  if (providers === "all") return providerAccounts(all, transport === "none" ? "none" : void 0);
6575
6685
  return all.map(
6576
6686
  (account) => providers === "none" && account.group !== "mcp" ? { ...account, status: "disconnected", identity: "" } : account
6577
6687
  );
6578
6688
  }
6579
6689
  function vaultRecords(accounts2, mcp) {
6580
- if (accounts2 !== "vault") return [];
6690
+ if (accounts2 === "settings") return [];
6581
6691
  return accountRecords(Date.now(), mcp === "moved" ? docsUrl : void 0);
6582
6692
  }
6583
6693
  function guestsPort(guests, time) {
@@ -6640,12 +6750,10 @@ function createDummyModel({
6640
6750
  history: browserHistory(scenario),
6641
6751
  controlled: scenario === "driving" ? ["tab-preview", "tab-pull"] : []
6642
6752
  });
6753
+ const chats = signInChat(conversations, login);
6643
6754
  const agent = new DummyAgent(
6644
6755
  agents,
6645
- asks === "long" ? {
6646
- ...conversations,
6647
- "cone-kitchen": [...conversations["cone-kitchen"], longAsk()]
6648
- } : conversations,
6756
+ asks === "long" ? { ...chats, "cone-kitchen": [...chats["cone-kitchen"], longAsk()] } : chats,
6649
6757
  { files: files3, browser },
6650
6758
  time,
6651
6759
  queues,
@@ -6668,7 +6776,10 @@ function createDummyModel({
6668
6776
  settings: new DummySettings(
6669
6777
  defaults,
6670
6778
  providers === "none" ? [...models, ...laterModels] : models,
6671
- settingsAccounts(accounts2, providers, transport, mcp),
6779
+ [
6780
+ ...settingsAccounts(accounts2, providers, transport, mcp),
6781
+ ...hinted(login) ? [codexAccount] : []
6782
+ ],
6672
6783
  storage,
6673
6784
  time,
6674
6785
  void 0,