@ai-ecoverse/slicc-kernel 1.178.4 → 1.179.0

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.
@@ -8130,7 +8130,7 @@ var UserDb = class {
8130
8130
  };
8131
8131
 
8132
8132
  // src/client/protocol.ts
8133
- var PROTOCOL = [1, 13];
8133
+ var PROTOCOL = [1, 14];
8134
8134
  var FS_METHODS = [
8135
8135
  "readFile",
8136
8136
  "writeFile",
@@ -8779,7 +8779,7 @@ function satisfies(version, range2) {
8779
8779
  }
8780
8780
 
8781
8781
  // src/version.ts
8782
- var KERNEL_VERSION = true ? "1.178.4" : "0.0.0-dev";
8782
+ var KERNEL_VERSION = true ? "1.179.0" : "0.0.0-dev";
8783
8783
  var OS_RELEASE = "6.0.0-slicc";
8784
8784
  function procVersion() {
8785
8785
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -33714,6 +33714,11 @@ function usersMode(mode = "off") {
33714
33714
  function tagOption(tag) {
33715
33715
  if (tag !== void 0 && typeof tag !== "string") throw new TypeError("a tag must be a string");
33716
33716
  }
33717
+ function cwdMissingOption(value2) {
33718
+ if (value2 === void 0 || value2 === "create") return "create";
33719
+ if (value2 === "error") return "error";
33720
+ throw new TypeError("cwdMissing must be 'create' or 'error'");
33721
+ }
33717
33722
  function withTag(tags, tag) {
33718
33723
  if (tag === void 0 || tags?.includes(tag)) return tags;
33719
33724
  return [...tags ?? [], tag];
@@ -36592,7 +36597,7 @@ var Launcher = class {
36592
36597
  const kept = keepingOpen(fs, nodes, (path) => this.changes.publish(path));
36593
36598
  return this.swaps.wrap(unlinked.wrap(kept));
36594
36599
  }
36595
- async starting(argv, dir, account, tags, base) {
36600
+ async starting(argv, dir, account, tags, base, missing6 = "create") {
36596
36601
  const tag = tags?.[0];
36597
36602
  await this.swaps.settled();
36598
36603
  this.resetCatalogs();
@@ -36601,8 +36606,13 @@ var Launcher = class {
36601
36606
  const cwd = await physicalPathAsync(this.base, start2.startsWith("/") ? start2 : `/${start2}`);
36602
36607
  await this.enterable(this.execGuard(credOf(account), 0, tag), cwd);
36603
36608
  const file = await this.execFile(argv[0] ?? "", cwd, this.execGuard(credOf(account), 0, tag));
36604
- if (!await this.base.exists(cwd))
36609
+ if (!await this.base.exists(cwd)) {
36610
+ if (missing6 === "error")
36611
+ throw Object.assign(new Error(`cannot change to ${cwd}: No such file or directory`), {
36612
+ code: "ENOENT"
36613
+ });
36605
36614
  await this.stackFor(tags, base).fs.mkdir(cwd, { recursive: true });
36615
+ }
36606
36616
  const plan = async () => {
36607
36617
  const found = await this.plan(file, argv, cwd, scope);
36608
36618
  await this.mayExec(credOf(account), { file, cwd, pid: 0, tag }, found);
@@ -36613,6 +36623,7 @@ var Launcher = class {
36613
36623
  }
36614
36624
  async openTerminal(argv, options) {
36615
36625
  const tagged = tagsOption(options);
36626
+ const missing6 = cwdMissingOption(options.cwdMissing);
36616
36627
  const { tags } = tagged;
36617
36628
  const { account, tty: ttyGroup } = await this.terminalAccount(options.user);
36618
36629
  const { cwd, file, planned } = await this.starting(
@@ -36620,7 +36631,8 @@ var Launcher = class {
36620
36631
  options.cwd,
36621
36632
  account,
36622
36633
  tags,
36623
- tagged.tagBase
36634
+ tagged.tagBase,
36635
+ missing6
36624
36636
  );
36625
36637
  if (!planned) throw new Error(`${file}: command not found`);
36626
36638
  let leader = 0;
@@ -36672,6 +36684,7 @@ var Launcher = class {
36672
36684
  }
36673
36685
  async run(argv, options = {}) {
36674
36686
  const tagged = tagsOption(options);
36687
+ const missing6 = cwdMissingOption(options.cwdMissing);
36675
36688
  const { tags } = tagged;
36676
36689
  const account = await this.account(options.user);
36677
36690
  const { cwd, file, planned } = await this.starting(
@@ -36679,7 +36692,8 @@ var Launcher = class {
36679
36692
  options.cwd,
36680
36693
  account,
36681
36694
  tags,
36682
- tagged.tagBase
36695
+ tagged.tagBase,
36696
+ missing6
36683
36697
  );
36684
36698
  const env = this.environment(cwd, options.env, account, options.login);
36685
36699
  const out = [];