@clawos-dev/clawd 0.2.170-beta.346.c7ac1be → 0.2.171-beta.347.906bfd3

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 (2) hide show
  1. package/dist/cli.cjs +182 -114
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -88,6 +88,7 @@ var init_methods = __esm({
88
88
  "history:recentDirs",
89
89
  "workspace:list",
90
90
  "workspace:read",
91
+ "shift:list",
91
92
  "skills:list",
92
93
  "agents:list",
93
94
  "git:root",
@@ -726,8 +727,8 @@ var init_parseUtil = __esm({
726
727
  init_errors2();
727
728
  init_en();
728
729
  makeIssue = (params) => {
729
- const { data, path: path61, errorMaps, issueData } = params;
730
- const fullPath = [...path61, ...issueData.path || []];
730
+ const { data, path: path62, errorMaps, issueData } = params;
731
+ const fullPath = [...path62, ...issueData.path || []];
731
732
  const fullIssue = {
732
733
  ...issueData,
733
734
  path: fullPath
@@ -1038,11 +1039,11 @@ var init_types = __esm({
1038
1039
  init_parseUtil();
1039
1040
  init_util();
1040
1041
  ParseInputLazyPath = class {
1041
- constructor(parent, value, path61, key) {
1042
+ constructor(parent, value, path62, key) {
1042
1043
  this._cachedPath = [];
1043
1044
  this.parent = parent;
1044
1045
  this.data = value;
1045
- this._path = path61;
1046
+ this._path = path62;
1046
1047
  this._key = key;
1047
1048
  }
1048
1049
  get path() {
@@ -6320,8 +6321,8 @@ var require_req = __commonJS({
6320
6321
  if (req.originalUrl) {
6321
6322
  _req.url = req.originalUrl;
6322
6323
  } else {
6323
- const path61 = req.path;
6324
- _req.url = typeof path61 === "string" ? path61 : req.url ? req.url.path || req.url : void 0;
6324
+ const path62 = req.path;
6325
+ _req.url = typeof path62 === "string" ? path62 : req.url ? req.url.path || req.url : void 0;
6325
6326
  }
6326
6327
  if (req.query) {
6327
6328
  _req.query = req.query;
@@ -6486,14 +6487,14 @@ var require_redact = __commonJS({
6486
6487
  }
6487
6488
  return obj;
6488
6489
  }
6489
- function parsePath(path61) {
6490
+ function parsePath(path62) {
6490
6491
  const parts = [];
6491
6492
  let current = "";
6492
6493
  let inBrackets = false;
6493
6494
  let inQuotes = false;
6494
6495
  let quoteChar = "";
6495
- for (let i = 0; i < path61.length; i++) {
6496
- const char = path61[i];
6496
+ for (let i = 0; i < path62.length; i++) {
6497
+ const char = path62[i];
6497
6498
  if (!inBrackets && char === ".") {
6498
6499
  if (current) {
6499
6500
  parts.push(current);
@@ -6624,10 +6625,10 @@ var require_redact = __commonJS({
6624
6625
  return current;
6625
6626
  }
6626
6627
  function redactPaths(obj, paths, censor, remove = false) {
6627
- for (const path61 of paths) {
6628
- const parts = parsePath(path61);
6628
+ for (const path62 of paths) {
6629
+ const parts = parsePath(path62);
6629
6630
  if (parts.includes("*")) {
6630
- redactWildcardPath(obj, parts, censor, path61, remove);
6631
+ redactWildcardPath(obj, parts, censor, path62, remove);
6631
6632
  } else {
6632
6633
  if (remove) {
6633
6634
  removeKey(obj, parts);
@@ -6712,8 +6713,8 @@ var require_redact = __commonJS({
6712
6713
  }
6713
6714
  } else {
6714
6715
  if (afterWildcard.includes("*")) {
6715
- const wrappedCensor = typeof censor === "function" ? (value, path61) => {
6716
- const fullPath = [...pathArray.slice(0, pathLength), ...path61];
6716
+ const wrappedCensor = typeof censor === "function" ? (value, path62) => {
6717
+ const fullPath = [...pathArray.slice(0, pathLength), ...path62];
6717
6718
  return censor(value, fullPath);
6718
6719
  } : censor;
6719
6720
  redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
@@ -6748,8 +6749,8 @@ var require_redact = __commonJS({
6748
6749
  return null;
6749
6750
  }
6750
6751
  const pathStructure = /* @__PURE__ */ new Map();
6751
- for (const path61 of pathsToClone) {
6752
- const parts = parsePath(path61);
6752
+ for (const path62 of pathsToClone) {
6753
+ const parts = parsePath(path62);
6753
6754
  let current = pathStructure;
6754
6755
  for (let i = 0; i < parts.length; i++) {
6755
6756
  const part = parts[i];
@@ -6801,24 +6802,24 @@ var require_redact = __commonJS({
6801
6802
  }
6802
6803
  return cloneSelectively(obj, pathStructure);
6803
6804
  }
6804
- function validatePath(path61) {
6805
- if (typeof path61 !== "string") {
6805
+ function validatePath(path62) {
6806
+ if (typeof path62 !== "string") {
6806
6807
  throw new Error("Paths must be (non-empty) strings");
6807
6808
  }
6808
- if (path61 === "") {
6809
+ if (path62 === "") {
6809
6810
  throw new Error("Invalid redaction path ()");
6810
6811
  }
6811
- if (path61.includes("..")) {
6812
- throw new Error(`Invalid redaction path (${path61})`);
6812
+ if (path62.includes("..")) {
6813
+ throw new Error(`Invalid redaction path (${path62})`);
6813
6814
  }
6814
- if (path61.includes(",")) {
6815
- throw new Error(`Invalid redaction path (${path61})`);
6815
+ if (path62.includes(",")) {
6816
+ throw new Error(`Invalid redaction path (${path62})`);
6816
6817
  }
6817
6818
  let bracketCount = 0;
6818
6819
  let inQuotes = false;
6819
6820
  let quoteChar = "";
6820
- for (let i = 0; i < path61.length; i++) {
6821
- const char = path61[i];
6821
+ for (let i = 0; i < path62.length; i++) {
6822
+ const char = path62[i];
6822
6823
  if ((char === '"' || char === "'") && bracketCount > 0) {
6823
6824
  if (!inQuotes) {
6824
6825
  inQuotes = true;
@@ -6832,20 +6833,20 @@ var require_redact = __commonJS({
6832
6833
  } else if (char === "]" && !inQuotes) {
6833
6834
  bracketCount--;
6834
6835
  if (bracketCount < 0) {
6835
- throw new Error(`Invalid redaction path (${path61})`);
6836
+ throw new Error(`Invalid redaction path (${path62})`);
6836
6837
  }
6837
6838
  }
6838
6839
  }
6839
6840
  if (bracketCount !== 0) {
6840
- throw new Error(`Invalid redaction path (${path61})`);
6841
+ throw new Error(`Invalid redaction path (${path62})`);
6841
6842
  }
6842
6843
  }
6843
6844
  function validatePaths(paths) {
6844
6845
  if (!Array.isArray(paths)) {
6845
6846
  throw new TypeError("paths must be an array");
6846
6847
  }
6847
- for (const path61 of paths) {
6848
- validatePath(path61);
6848
+ for (const path62 of paths) {
6849
+ validatePath(path62);
6849
6850
  }
6850
6851
  }
6851
6852
  function slowRedact(options = {}) {
@@ -7013,8 +7014,8 @@ var require_redaction = __commonJS({
7013
7014
  if (shape[k2] === null) {
7014
7015
  o[k2] = (value) => topCensor(value, [k2]);
7015
7016
  } else {
7016
- const wrappedCensor = typeof censor === "function" ? (value, path61) => {
7017
- return censor(value, [k2, ...path61]);
7017
+ const wrappedCensor = typeof censor === "function" ? (value, path62) => {
7018
+ return censor(value, [k2, ...path62]);
7018
7019
  } : censor;
7019
7020
  o[k2] = Redact({
7020
7021
  paths: shape[k2],
@@ -7232,10 +7233,10 @@ var require_atomic_sleep = __commonJS({
7232
7233
  var require_sonic_boom = __commonJS({
7233
7234
  "../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js"(exports2, module2) {
7234
7235
  "use strict";
7235
- var fs55 = require("fs");
7236
+ var fs56 = require("fs");
7236
7237
  var EventEmitter3 = require("events");
7237
7238
  var inherits = require("util").inherits;
7238
- var path61 = require("path");
7239
+ var path62 = require("path");
7239
7240
  var sleep2 = require_atomic_sleep();
7240
7241
  var assert = require("assert");
7241
7242
  var BUSY_WRITE_TIMEOUT = 100;
@@ -7289,20 +7290,20 @@ var require_sonic_boom = __commonJS({
7289
7290
  const mode = sonic.mode;
7290
7291
  if (sonic.sync) {
7291
7292
  try {
7292
- if (sonic.mkdir) fs55.mkdirSync(path61.dirname(file), { recursive: true });
7293
- const fd = fs55.openSync(file, flags, mode);
7293
+ if (sonic.mkdir) fs56.mkdirSync(path62.dirname(file), { recursive: true });
7294
+ const fd = fs56.openSync(file, flags, mode);
7294
7295
  fileOpened(null, fd);
7295
7296
  } catch (err) {
7296
7297
  fileOpened(err);
7297
7298
  throw err;
7298
7299
  }
7299
7300
  } else if (sonic.mkdir) {
7300
- fs55.mkdir(path61.dirname(file), { recursive: true }, (err) => {
7301
+ fs56.mkdir(path62.dirname(file), { recursive: true }, (err) => {
7301
7302
  if (err) return fileOpened(err);
7302
- fs55.open(file, flags, mode, fileOpened);
7303
+ fs56.open(file, flags, mode, fileOpened);
7303
7304
  });
7304
7305
  } else {
7305
- fs55.open(file, flags, mode, fileOpened);
7306
+ fs56.open(file, flags, mode, fileOpened);
7306
7307
  }
7307
7308
  }
7308
7309
  function SonicBoom(opts) {
@@ -7343,8 +7344,8 @@ var require_sonic_boom = __commonJS({
7343
7344
  this.flush = flushBuffer;
7344
7345
  this.flushSync = flushBufferSync;
7345
7346
  this._actualWrite = actualWriteBuffer;
7346
- fsWriteSync = () => fs55.writeSync(this.fd, this._writingBuf);
7347
- fsWrite = () => fs55.write(this.fd, this._writingBuf, this.release);
7347
+ fsWriteSync = () => fs56.writeSync(this.fd, this._writingBuf);
7348
+ fsWrite = () => fs56.write(this.fd, this._writingBuf, this.release);
7348
7349
  } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
7349
7350
  this._writingBuf = "";
7350
7351
  this.write = write;
@@ -7353,15 +7354,15 @@ var require_sonic_boom = __commonJS({
7353
7354
  this._actualWrite = actualWrite;
7354
7355
  fsWriteSync = () => {
7355
7356
  if (Buffer.isBuffer(this._writingBuf)) {
7356
- return fs55.writeSync(this.fd, this._writingBuf);
7357
+ return fs56.writeSync(this.fd, this._writingBuf);
7357
7358
  }
7358
- return fs55.writeSync(this.fd, this._writingBuf, "utf8");
7359
+ return fs56.writeSync(this.fd, this._writingBuf, "utf8");
7359
7360
  };
7360
7361
  fsWrite = () => {
7361
7362
  if (Buffer.isBuffer(this._writingBuf)) {
7362
- return fs55.write(this.fd, this._writingBuf, this.release);
7363
+ return fs56.write(this.fd, this._writingBuf, this.release);
7363
7364
  }
7364
- return fs55.write(this.fd, this._writingBuf, "utf8", this.release);
7365
+ return fs56.write(this.fd, this._writingBuf, "utf8", this.release);
7365
7366
  };
7366
7367
  } else {
7367
7368
  throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
@@ -7418,7 +7419,7 @@ var require_sonic_boom = __commonJS({
7418
7419
  }
7419
7420
  }
7420
7421
  if (this._fsync) {
7421
- fs55.fsyncSync(this.fd);
7422
+ fs56.fsyncSync(this.fd);
7422
7423
  }
7423
7424
  const len = this._len;
7424
7425
  if (this._reopening) {
@@ -7532,7 +7533,7 @@ var require_sonic_boom = __commonJS({
7532
7533
  const onDrain = () => {
7533
7534
  if (!this._fsync) {
7534
7535
  try {
7535
- fs55.fsync(this.fd, (err) => {
7536
+ fs56.fsync(this.fd, (err) => {
7536
7537
  this._flushPending = false;
7537
7538
  cb(err);
7538
7539
  });
@@ -7634,7 +7635,7 @@ var require_sonic_boom = __commonJS({
7634
7635
  const fd = this.fd;
7635
7636
  this.once("ready", () => {
7636
7637
  if (fd !== this.fd) {
7637
- fs55.close(fd, (err) => {
7638
+ fs56.close(fd, (err) => {
7638
7639
  if (err) {
7639
7640
  return this.emit("error", err);
7640
7641
  }
@@ -7683,7 +7684,7 @@ var require_sonic_boom = __commonJS({
7683
7684
  buf = this._bufs[0];
7684
7685
  }
7685
7686
  try {
7686
- const n = Buffer.isBuffer(buf) ? fs55.writeSync(this.fd, buf) : fs55.writeSync(this.fd, buf, "utf8");
7687
+ const n = Buffer.isBuffer(buf) ? fs56.writeSync(this.fd, buf) : fs56.writeSync(this.fd, buf, "utf8");
7687
7688
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
7688
7689
  buf = releasedBufObj.writingBuf;
7689
7690
  this._len = releasedBufObj.len;
@@ -7699,7 +7700,7 @@ var require_sonic_boom = __commonJS({
7699
7700
  }
7700
7701
  }
7701
7702
  try {
7702
- fs55.fsyncSync(this.fd);
7703
+ fs56.fsyncSync(this.fd);
7703
7704
  } catch {
7704
7705
  }
7705
7706
  }
@@ -7720,7 +7721,7 @@ var require_sonic_boom = __commonJS({
7720
7721
  buf = mergeBuf(this._bufs[0], this._lens[0]);
7721
7722
  }
7722
7723
  try {
7723
- const n = fs55.writeSync(this.fd, buf);
7724
+ const n = fs56.writeSync(this.fd, buf);
7724
7725
  buf = buf.subarray(n);
7725
7726
  this._len = Math.max(this._len - n, 0);
7726
7727
  if (buf.length <= 0) {
@@ -7748,13 +7749,13 @@ var require_sonic_boom = __commonJS({
7748
7749
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
7749
7750
  if (this.sync) {
7750
7751
  try {
7751
- const written = Buffer.isBuffer(this._writingBuf) ? fs55.writeSync(this.fd, this._writingBuf) : fs55.writeSync(this.fd, this._writingBuf, "utf8");
7752
+ const written = Buffer.isBuffer(this._writingBuf) ? fs56.writeSync(this.fd, this._writingBuf) : fs56.writeSync(this.fd, this._writingBuf, "utf8");
7752
7753
  release(null, written);
7753
7754
  } catch (err) {
7754
7755
  release(err);
7755
7756
  }
7756
7757
  } else {
7757
- fs55.write(this.fd, this._writingBuf, release);
7758
+ fs56.write(this.fd, this._writingBuf, release);
7758
7759
  }
7759
7760
  }
7760
7761
  function actualWriteBuffer() {
@@ -7763,7 +7764,7 @@ var require_sonic_boom = __commonJS({
7763
7764
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
7764
7765
  if (this.sync) {
7765
7766
  try {
7766
- const written = fs55.writeSync(this.fd, this._writingBuf);
7767
+ const written = fs56.writeSync(this.fd, this._writingBuf);
7767
7768
  release(null, written);
7768
7769
  } catch (err) {
7769
7770
  release(err);
@@ -7772,7 +7773,7 @@ var require_sonic_boom = __commonJS({
7772
7773
  if (kCopyBuffer) {
7773
7774
  this._writingBuf = Buffer.from(this._writingBuf);
7774
7775
  }
7775
- fs55.write(this.fd, this._writingBuf, release);
7776
+ fs56.write(this.fd, this._writingBuf, release);
7776
7777
  }
7777
7778
  }
7778
7779
  function actualClose(sonic) {
@@ -7788,12 +7789,12 @@ var require_sonic_boom = __commonJS({
7788
7789
  sonic._lens = [];
7789
7790
  assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
7790
7791
  try {
7791
- fs55.fsync(sonic.fd, closeWrapped);
7792
+ fs56.fsync(sonic.fd, closeWrapped);
7792
7793
  } catch {
7793
7794
  }
7794
7795
  function closeWrapped() {
7795
7796
  if (sonic.fd !== 1 && sonic.fd !== 2) {
7796
- fs55.close(sonic.fd, done);
7797
+ fs56.close(sonic.fd, done);
7797
7798
  } else {
7798
7799
  done();
7799
7800
  }
@@ -8050,7 +8051,7 @@ var require_thread_stream = __commonJS({
8050
8051
  var { version: version2 } = require_package();
8051
8052
  var { EventEmitter: EventEmitter3 } = require("events");
8052
8053
  var { Worker } = require("worker_threads");
8053
- var { join: join15 } = require("path");
8054
+ var { join: join16 } = require("path");
8054
8055
  var { pathToFileURL } = require("url");
8055
8056
  var { wait } = require_wait();
8056
8057
  var {
@@ -8086,7 +8087,7 @@ var require_thread_stream = __commonJS({
8086
8087
  function createWorker(stream, opts) {
8087
8088
  const { filename, workerData } = opts;
8088
8089
  const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
8089
- const toExecute = bundlerOverrides["thread-stream-worker"] || join15(__dirname, "lib", "worker.js");
8090
+ const toExecute = bundlerOverrides["thread-stream-worker"] || join16(__dirname, "lib", "worker.js");
8090
8091
  const worker = new Worker(toExecute, {
8091
8092
  ...opts.workerOpts,
8092
8093
  trackUnmanagedFds: false,
@@ -8472,7 +8473,7 @@ var require_transport = __commonJS({
8472
8473
  "use strict";
8473
8474
  var { createRequire } = require("module");
8474
8475
  var getCallers = require_caller();
8475
- var { join: join15, isAbsolute: isAbsolute2, sep: sep3 } = require("path");
8476
+ var { join: join16, isAbsolute: isAbsolute2, sep: sep3 } = require("path");
8476
8477
  var sleep2 = require_atomic_sleep();
8477
8478
  var onExit = require_on_exit_leak_free();
8478
8479
  var ThreadStream = require_thread_stream();
@@ -8535,7 +8536,7 @@ var require_transport = __commonJS({
8535
8536
  throw new Error("only one of target or targets can be specified");
8536
8537
  }
8537
8538
  if (targets) {
8538
- target = bundlerOverrides["pino-worker"] || join15(__dirname, "worker.js");
8539
+ target = bundlerOverrides["pino-worker"] || join16(__dirname, "worker.js");
8539
8540
  options.targets = targets.filter((dest) => dest.target).map((dest) => {
8540
8541
  return {
8541
8542
  ...dest,
@@ -8553,7 +8554,7 @@ var require_transport = __commonJS({
8553
8554
  });
8554
8555
  });
8555
8556
  } else if (pipeline3) {
8556
- target = bundlerOverrides["pino-worker"] || join15(__dirname, "worker.js");
8557
+ target = bundlerOverrides["pino-worker"] || join16(__dirname, "worker.js");
8557
8558
  options.pipelines = [pipeline3.map((dest) => {
8558
8559
  return {
8559
8560
  ...dest,
@@ -8575,7 +8576,7 @@ var require_transport = __commonJS({
8575
8576
  return origin;
8576
8577
  }
8577
8578
  if (origin === "pino/file") {
8578
- return join15(__dirname, "..", "file.js");
8579
+ return join16(__dirname, "..", "file.js");
8579
8580
  }
8580
8581
  let fixTarget2;
8581
8582
  for (const filePath of callers) {
@@ -9565,7 +9566,7 @@ var require_safe_stable_stringify = __commonJS({
9565
9566
  return circularValue;
9566
9567
  }
9567
9568
  let res = "";
9568
- let join15 = ",";
9569
+ let join16 = ",";
9569
9570
  const originalIndentation = indentation;
9570
9571
  if (Array.isArray(value)) {
9571
9572
  if (value.length === 0) {
@@ -9579,7 +9580,7 @@ var require_safe_stable_stringify = __commonJS({
9579
9580
  indentation += spacer;
9580
9581
  res += `
9581
9582
  ${indentation}`;
9582
- join15 = `,
9583
+ join16 = `,
9583
9584
  ${indentation}`;
9584
9585
  }
9585
9586
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9587,13 +9588,13 @@ ${indentation}`;
9587
9588
  for (; i < maximumValuesToStringify - 1; i++) {
9588
9589
  const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9589
9590
  res += tmp2 !== void 0 ? tmp2 : "null";
9590
- res += join15;
9591
+ res += join16;
9591
9592
  }
9592
9593
  const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9593
9594
  res += tmp !== void 0 ? tmp : "null";
9594
9595
  if (value.length - 1 > maximumBreadth) {
9595
9596
  const removedKeys = value.length - maximumBreadth - 1;
9596
- res += `${join15}"... ${getItemCount(removedKeys)} not stringified"`;
9597
+ res += `${join16}"... ${getItemCount(removedKeys)} not stringified"`;
9597
9598
  }
9598
9599
  if (spacer !== "") {
9599
9600
  res += `
@@ -9614,7 +9615,7 @@ ${originalIndentation}`;
9614
9615
  let separator = "";
9615
9616
  if (spacer !== "") {
9616
9617
  indentation += spacer;
9617
- join15 = `,
9618
+ join16 = `,
9618
9619
  ${indentation}`;
9619
9620
  whitespace = " ";
9620
9621
  }
@@ -9628,13 +9629,13 @@ ${indentation}`;
9628
9629
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
9629
9630
  if (tmp !== void 0) {
9630
9631
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9631
- separator = join15;
9632
+ separator = join16;
9632
9633
  }
9633
9634
  }
9634
9635
  if (keyLength > maximumBreadth) {
9635
9636
  const removedKeys = keyLength - maximumBreadth;
9636
9637
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
9637
- separator = join15;
9638
+ separator = join16;
9638
9639
  }
9639
9640
  if (spacer !== "" && separator.length > 1) {
9640
9641
  res = `
@@ -9675,7 +9676,7 @@ ${originalIndentation}`;
9675
9676
  }
9676
9677
  const originalIndentation = indentation;
9677
9678
  let res = "";
9678
- let join15 = ",";
9679
+ let join16 = ",";
9679
9680
  if (Array.isArray(value)) {
9680
9681
  if (value.length === 0) {
9681
9682
  return "[]";
@@ -9688,7 +9689,7 @@ ${originalIndentation}`;
9688
9689
  indentation += spacer;
9689
9690
  res += `
9690
9691
  ${indentation}`;
9691
- join15 = `,
9692
+ join16 = `,
9692
9693
  ${indentation}`;
9693
9694
  }
9694
9695
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9696,13 +9697,13 @@ ${indentation}`;
9696
9697
  for (; i < maximumValuesToStringify - 1; i++) {
9697
9698
  const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9698
9699
  res += tmp2 !== void 0 ? tmp2 : "null";
9699
- res += join15;
9700
+ res += join16;
9700
9701
  }
9701
9702
  const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9702
9703
  res += tmp !== void 0 ? tmp : "null";
9703
9704
  if (value.length - 1 > maximumBreadth) {
9704
9705
  const removedKeys = value.length - maximumBreadth - 1;
9705
- res += `${join15}"... ${getItemCount(removedKeys)} not stringified"`;
9706
+ res += `${join16}"... ${getItemCount(removedKeys)} not stringified"`;
9706
9707
  }
9707
9708
  if (spacer !== "") {
9708
9709
  res += `
@@ -9715,7 +9716,7 @@ ${originalIndentation}`;
9715
9716
  let whitespace = "";
9716
9717
  if (spacer !== "") {
9717
9718
  indentation += spacer;
9718
- join15 = `,
9719
+ join16 = `,
9719
9720
  ${indentation}`;
9720
9721
  whitespace = " ";
9721
9722
  }
@@ -9724,7 +9725,7 @@ ${indentation}`;
9724
9725
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
9725
9726
  if (tmp !== void 0) {
9726
9727
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9727
- separator = join15;
9728
+ separator = join16;
9728
9729
  }
9729
9730
  }
9730
9731
  if (spacer !== "" && separator.length > 1) {
@@ -9782,20 +9783,20 @@ ${originalIndentation}`;
9782
9783
  indentation += spacer;
9783
9784
  let res2 = `
9784
9785
  ${indentation}`;
9785
- const join16 = `,
9786
+ const join17 = `,
9786
9787
  ${indentation}`;
9787
9788
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
9788
9789
  let i = 0;
9789
9790
  for (; i < maximumValuesToStringify - 1; i++) {
9790
9791
  const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9791
9792
  res2 += tmp2 !== void 0 ? tmp2 : "null";
9792
- res2 += join16;
9793
+ res2 += join17;
9793
9794
  }
9794
9795
  const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9795
9796
  res2 += tmp !== void 0 ? tmp : "null";
9796
9797
  if (value.length - 1 > maximumBreadth) {
9797
9798
  const removedKeys = value.length - maximumBreadth - 1;
9798
- res2 += `${join16}"... ${getItemCount(removedKeys)} not stringified"`;
9799
+ res2 += `${join17}"... ${getItemCount(removedKeys)} not stringified"`;
9799
9800
  }
9800
9801
  res2 += `
9801
9802
  ${originalIndentation}`;
@@ -9811,16 +9812,16 @@ ${originalIndentation}`;
9811
9812
  return '"[Object]"';
9812
9813
  }
9813
9814
  indentation += spacer;
9814
- const join15 = `,
9815
+ const join16 = `,
9815
9816
  ${indentation}`;
9816
9817
  let res = "";
9817
9818
  let separator = "";
9818
9819
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
9819
9820
  if (isTypedArrayWithEntries(value)) {
9820
- res += stringifyTypedArray(value, join15, maximumBreadth);
9821
+ res += stringifyTypedArray(value, join16, maximumBreadth);
9821
9822
  keys = keys.slice(value.length);
9822
9823
  maximumPropertiesToStringify -= value.length;
9823
- separator = join15;
9824
+ separator = join16;
9824
9825
  }
9825
9826
  if (deterministic) {
9826
9827
  keys = sort(keys, comparator);
@@ -9831,13 +9832,13 @@ ${indentation}`;
9831
9832
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
9832
9833
  if (tmp !== void 0) {
9833
9834
  res += `${separator}${strEscape(key2)}: ${tmp}`;
9834
- separator = join15;
9835
+ separator = join16;
9835
9836
  }
9836
9837
  }
9837
9838
  if (keyLength > maximumBreadth) {
9838
9839
  const removedKeys = keyLength - maximumBreadth;
9839
9840
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
9840
- separator = join15;
9841
+ separator = join16;
9841
9842
  }
9842
9843
  if (separator !== "") {
9843
9844
  res = `
@@ -10157,7 +10158,7 @@ var require_multistream = __commonJS({
10157
10158
  var require_pino = __commonJS({
10158
10159
  "../node_modules/.pnpm/pino@9.14.0/node_modules/pino/pino.js"(exports2, module2) {
10159
10160
  "use strict";
10160
- var os22 = require("os");
10161
+ var os23 = require("os");
10161
10162
  var stdSerializers = require_pino_std_serializers();
10162
10163
  var caller = require_caller();
10163
10164
  var redaction = require_redaction();
@@ -10204,7 +10205,7 @@ var require_pino = __commonJS({
10204
10205
  } = symbols;
10205
10206
  var { epochTime, nullTime } = time;
10206
10207
  var { pid } = process;
10207
- var hostname = os22.hostname();
10208
+ var hostname = os23.hostname();
10208
10209
  var defaultErrorSerializer = stdSerializers.err;
10209
10210
  var defaultOptions = {
10210
10211
  level: "info",
@@ -10928,11 +10929,11 @@ var init_lib = __esm({
10928
10929
  }
10929
10930
  }
10930
10931
  },
10931
- addToPath: function addToPath(path61, added, removed, oldPosInc, options) {
10932
- var last = path61.lastComponent;
10932
+ addToPath: function addToPath(path62, added, removed, oldPosInc, options) {
10933
+ var last = path62.lastComponent;
10933
10934
  if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
10934
10935
  return {
10935
- oldPos: path61.oldPos + oldPosInc,
10936
+ oldPos: path62.oldPos + oldPosInc,
10936
10937
  lastComponent: {
10937
10938
  count: last.count + 1,
10938
10939
  added,
@@ -10942,7 +10943,7 @@ var init_lib = __esm({
10942
10943
  };
10943
10944
  } else {
10944
10945
  return {
10945
- oldPos: path61.oldPos + oldPosInc,
10946
+ oldPos: path62.oldPos + oldPosInc,
10946
10947
  lastComponent: {
10947
10948
  count: 1,
10948
10949
  added,
@@ -11388,10 +11389,10 @@ function attachmentToHistoryMessage(o, ts) {
11388
11389
  const memories = raw.map((m2) => {
11389
11390
  if (!m2 || typeof m2 !== "object") return null;
11390
11391
  const rec3 = m2;
11391
- const path61 = typeof rec3.path === "string" ? rec3.path : null;
11392
+ const path62 = typeof rec3.path === "string" ? rec3.path : null;
11392
11393
  const content = typeof rec3.content === "string" ? rec3.content : null;
11393
- if (!path61 || content == null) return null;
11394
- const entry = { path: path61, content };
11394
+ if (!path62 || content == null) return null;
11395
+ const entry = { path: path62, content };
11395
11396
  if (typeof rec3.mtimeMs === "number") entry.mtimeMs = rec3.mtimeMs;
11396
11397
  return entry;
11397
11398
  }).filter((m2) => m2 !== null);
@@ -12196,10 +12197,10 @@ function parseAttachment(obj) {
12196
12197
  const memories = raw.map((m2) => {
12197
12198
  if (!m2 || typeof m2 !== "object") return null;
12198
12199
  const rec3 = m2;
12199
- const path61 = typeof rec3.path === "string" ? rec3.path : null;
12200
+ const path62 = typeof rec3.path === "string" ? rec3.path : null;
12200
12201
  const content = typeof rec3.content === "string" ? rec3.content : null;
12201
- if (!path61 || content == null) return null;
12202
- const out = { path: path61, content };
12202
+ if (!path62 || content == null) return null;
12203
+ const out = { path: path62, content };
12203
12204
  if (typeof rec3.mtimeMs === "number") out.mtimeMs = rec3.mtimeMs;
12204
12205
  return out;
12205
12206
  }).filter((m2) => m2 !== null);
@@ -12369,11 +12370,15 @@ var init_claude = __esm({
12369
12370
  label: "Effort",
12370
12371
  description: "Reasoning effort level",
12371
12372
  scope: "tool-specific",
12373
+ // CC `--effort` 值域(claude --help, 2.1.187):low / medium / high / xhigh / max。
12374
+ // '' = 不传 --effort,用 CLI 默认。
12372
12375
  options: [
12373
12376
  { value: "", label: "Default" },
12374
12377
  { value: "low", label: "Low" },
12375
12378
  { value: "medium", label: "Medium" },
12376
- { value: "high", label: "High" }
12379
+ { value: "high", label: "High" },
12380
+ { value: "xhigh", label: "Extra high" },
12381
+ { value: "max", label: "Max" }
12377
12382
  ],
12378
12383
  default: ""
12379
12384
  }
@@ -21396,7 +21401,7 @@ var require_BufferList = __commonJS({
21396
21401
  this.head = this.tail = null;
21397
21402
  this.length = 0;
21398
21403
  };
21399
- BufferList.prototype.join = function join15(s) {
21404
+ BufferList.prototype.join = function join16(s) {
21400
21405
  if (this.length === 0) return "";
21401
21406
  var p2 = this.head;
21402
21407
  var ret = "" + p2.data;
@@ -23986,8 +23991,8 @@ var require_utils = __commonJS({
23986
23991
  var result = transform[inputType][outputType](input);
23987
23992
  return result;
23988
23993
  };
23989
- exports2.resolve = function(path61) {
23990
- var parts = path61.split("/");
23994
+ exports2.resolve = function(path62) {
23995
+ var parts = path62.split("/");
23991
23996
  var result = [];
23992
23997
  for (var index = 0; index < parts.length; index++) {
23993
23998
  var part = parts[index];
@@ -29840,18 +29845,18 @@ var require_object = __commonJS({
29840
29845
  var object = new ZipObject(name, zipObjectContent, o);
29841
29846
  this.files[name] = object;
29842
29847
  };
29843
- var parentFolder = function(path61) {
29844
- if (path61.slice(-1) === "/") {
29845
- path61 = path61.substring(0, path61.length - 1);
29848
+ var parentFolder = function(path62) {
29849
+ if (path62.slice(-1) === "/") {
29850
+ path62 = path62.substring(0, path62.length - 1);
29846
29851
  }
29847
- var lastSlash = path61.lastIndexOf("/");
29848
- return lastSlash > 0 ? path61.substring(0, lastSlash) : "";
29852
+ var lastSlash = path62.lastIndexOf("/");
29853
+ return lastSlash > 0 ? path62.substring(0, lastSlash) : "";
29849
29854
  };
29850
- var forceTrailingSlash = function(path61) {
29851
- if (path61.slice(-1) !== "/") {
29852
- path61 += "/";
29855
+ var forceTrailingSlash = function(path62) {
29856
+ if (path62.slice(-1) !== "/") {
29857
+ path62 += "/";
29853
29858
  }
29854
- return path61;
29859
+ return path62;
29855
29860
  };
29856
29861
  var folderAdd = function(name, createFolders) {
29857
29862
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders;
@@ -36487,8 +36492,8 @@ function turnStartInput(text) {
36487
36492
  const items = [];
36488
36493
  let leftover = text;
36489
36494
  for (const m2 of text.matchAll(SKILL_RE)) {
36490
- const [marker, name, path61] = m2;
36491
- items.push({ type: "skill", name, path: path61 });
36495
+ const [marker, name, path62] = m2;
36496
+ items.push({ type: "skill", name, path: path62 });
36492
36497
  leftover = leftover.replace(marker, "");
36493
36498
  }
36494
36499
  for (const m2 of text.matchAll(ATTACHMENT_RE2)) {
@@ -38368,13 +38373,13 @@ function mapSkillsListResponse(res) {
38368
38373
  const r = s ?? {};
38369
38374
  const name = str3(r.name);
38370
38375
  if (!name) continue;
38371
- const path61 = str3(r.path);
38376
+ const path62 = str3(r.path);
38372
38377
  const description = str3(r.description);
38373
38378
  const isPlugin = name.includes(":");
38374
38379
  out.push({
38375
38380
  name,
38376
38381
  source: isPlugin ? "plugin" : "project",
38377
- ...path61 ? { path: path61 } : {},
38382
+ ...path62 ? { path: path62 } : {},
38378
38383
  ...description ? { description } : {},
38379
38384
  ...isPlugin ? { plugin: name.split(":")[0] } : {}
38380
38385
  });
@@ -42484,9 +42489,9 @@ var CentralClientError = class extends Error {
42484
42489
  code;
42485
42490
  cause;
42486
42491
  };
42487
- async function centralRequest(opts, path61, init) {
42492
+ async function centralRequest(opts, path62, init) {
42488
42493
  const f = opts.fetchImpl ?? globalThis.fetch;
42489
- const url = `${opts.api.replace(/\/+$/, "")}${path61}`;
42494
+ const url = `${opts.api.replace(/\/+$/, "")}${path62}`;
42490
42495
  const ctrl = new AbortController();
42491
42496
  const timer = setTimeout(() => ctrl.abort(), opts.timeoutMs ?? 15e3);
42492
42497
  let res;
@@ -43872,6 +43877,7 @@ function buildPersonaHandlers(deps) {
43872
43877
  return { response: { type: "persona:info", ...persona } };
43873
43878
  };
43874
43879
  const list = async (_frame, _client, ctx) => {
43880
+ personaRegistry.reload();
43875
43881
  const all = personaRegistry.list();
43876
43882
  const isGuest = ctx?.principal.kind === "guest";
43877
43883
  const personas = isGuest ? all.filter(
@@ -45861,6 +45867,62 @@ function buildAppBuilderHandlers(deps) {
45861
45867
  };
45862
45868
  }
45863
45869
 
45870
+ // src/shift-mock-store.ts
45871
+ init_zod();
45872
+ var fs49 = __toESM(require("fs/promises"), 1);
45873
+ var ShiftScheduleSchema = external_exports.discriminatedUnion("kind", [
45874
+ external_exports.object({
45875
+ kind: external_exports.literal("single"),
45876
+ start: external_exports.string(),
45877
+ end: external_exports.string()
45878
+ }),
45879
+ external_exports.object({
45880
+ kind: external_exports.literal("recurring"),
45881
+ cron: external_exports.string(),
45882
+ tz: external_exports.string().optional(),
45883
+ durationMs: external_exports.number().int().positive()
45884
+ })
45885
+ ]);
45886
+ var ShiftSchema = external_exports.object({
45887
+ id: external_exports.string(),
45888
+ agentId: external_exports.string(),
45889
+ schedule: ShiftScheduleSchema,
45890
+ note: external_exports.string().optional()
45891
+ });
45892
+ var ShiftFileSchema = external_exports.array(ShiftSchema);
45893
+ function createShiftMockStore({ filePath }) {
45894
+ return {
45895
+ async list() {
45896
+ let raw;
45897
+ try {
45898
+ raw = await fs49.readFile(filePath, "utf-8");
45899
+ } catch (err) {
45900
+ if (err.code === "ENOENT") {
45901
+ return { shifts: [], total: 0, source: "empty" };
45902
+ }
45903
+ throw err;
45904
+ }
45905
+ const parsed = ShiftFileSchema.parse(JSON.parse(raw));
45906
+ return { shifts: parsed, total: parsed.length, source: "file" };
45907
+ }
45908
+ };
45909
+ }
45910
+
45911
+ // src/handlers/shift.ts
45912
+ function buildShiftHandlers(deps) {
45913
+ const store = createShiftMockStore({ filePath: deps.shiftFilePath });
45914
+ return {
45915
+ "shift:list": async () => {
45916
+ const result = await store.list();
45917
+ return { response: result };
45918
+ }
45919
+ };
45920
+ }
45921
+
45922
+ // src/handlers/index.ts
45923
+ var path55 = __toESM(require("path"), 1);
45924
+ var os20 = __toESM(require("os"), 1);
45925
+
45864
45926
  // src/extension/registry.ts
45865
45927
  var import_promises8 = __toESM(require("fs/promises"), 1);
45866
45928
  var import_node_path43 = __toESM(require("path"), 1);
@@ -46012,6 +46074,9 @@ function buildMethodHandlers(deps) {
46012
46074
  deployKitRoot: deps.deployKitRoot,
46013
46075
  resolvePersonaRoot: deps.resolvePersonaRoot,
46014
46076
  broadcastSessionFrame: deps.broadcastSessionFrame
46077
+ }),
46078
+ ...buildShiftHandlers({
46079
+ shiftFilePath: path55.join(os20.homedir(), ".clawd", "shift.json")
46015
46080
  })
46016
46081
  };
46017
46082
  }
@@ -46352,6 +46417,9 @@ var METHOD_GRANT_MAP = {
46352
46417
  "history:recentDirs": CAPABILITY_SCOPED,
46353
46418
  "workspace:list": CAPABILITY_SCOPED,
46354
46419
  "workspace:read": CAPABILITY_SCOPED,
46420
+ // ---- shift:* (排班 mock,owner-only 读) ----
46421
+ // mock 阶段只 owner 用;接 guest 后再考虑分级
46422
+ "shift:list": ADMIN_ANY,
46355
46423
  "skills:list": CAPABILITY_SCOPED,
46356
46424
  "agents:list": CAPABILITY_SCOPED,
46357
46425
  "git:root": CAPABILITY_SCOPED,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.170-beta.346.c7ac1be",
3
+ "version": "0.2.171-beta.347.906bfd3",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",