@cydm/pie 4.3.5 → 4.3.7

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 (27) hide show
  1. package/dist/builtin/extensions/ask-user/index.js +4 -4
  2. package/dist/builtin/extensions/cron/index.js +7 -1
  3. package/dist/builtin/extensions/im-forward/index.js +101 -83
  4. package/dist/builtin/extensions/mcp-adapter/index.js +7 -1
  5. package/dist/builtin/extensions/memory/index.js +5 -5
  6. package/dist/builtin/extensions/pie-ipc/index.js +1 -1
  7. package/dist/builtin/extensions/pie-proc/index.js +3 -2
  8. package/dist/builtin/extensions/plan-mode/index.js +4 -4
  9. package/dist/builtin/extensions/subagent/index.js +5 -5
  10. package/dist/builtin/extensions/todo/index.js +4 -4
  11. package/dist/chunks/{chunk-J2LGVYH2.js → chunk-2SAFRLFJ.js} +28 -13
  12. package/dist/chunks/{chunk-JQRZLVPY.js → chunk-6JEYRAQM.js} +1898 -1692
  13. package/dist/chunks/{chunk-NCP264ZE.js → chunk-B4N5LJMD.js} +1 -1
  14. package/dist/chunks/{chunk-PFXSA2LK.js → chunk-BJ4XN5VX.js} +5 -5
  15. package/dist/chunks/{chunk-H5G55G3R.js → chunk-N3BWFAMZ.js} +11 -1
  16. package/dist/chunks/{chunk-QX6WS73C.js → chunk-VHKMWOG3.js} +1 -1
  17. package/dist/chunks/{chunk-PC6HUZAD.js → chunk-WZLO5V2X.js} +3 -3
  18. package/dist/chunks/{chunk-BK36Y35W.js → chunk-XMOWWL4B.js} +2 -2
  19. package/dist/chunks/{concierge-cli-MCHXTFBA.js → manager-cli-QNMCCIFG.js} +322 -44
  20. package/dist/chunks/{model-registry-YA6U366L.js → model-registry-NKE3BRSZ.js} +2 -2
  21. package/dist/chunks/{src-ODLT57PQ.js → src-46R5ZFOU.js} +2 -2
  22. package/dist/chunks/{src-VPMIQGEW.js → src-4EQ7PBEI.js} +3 -3
  23. package/dist/chunks/{src-XSLD2IQ2.js → src-BHIH4VLE.js} +1 -1
  24. package/dist/chunks/{src-AQ4H43UM.js → src-UVULNQOO.js} +4 -4
  25. package/dist/chunks/{test-stream-GIUD5JWS.js → test-stream-FC6ZRENI.js} +1 -1
  26. package/dist/cli.js +347 -208
  27. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunks/chunk-6DNYGVZP.js";
7
7
  import {
8
8
  ModelRegistry
9
- } from "./chunks/chunk-QX6WS73C.js";
9
+ } from "./chunks/chunk-VHKMWOG3.js";
10
10
  import {
11
11
  distillWorkerLogPath,
12
12
  readDistillWorkerLog,
@@ -14,7 +14,7 @@ import {
14
14
  runDistillWorkerMain,
15
15
  spawnDistillAutoWorker,
16
16
  spawnDistillWorker
17
- } from "./chunks/chunk-PFXSA2LK.js";
17
+ } from "./chunks/chunk-BJ4XN5VX.js";
18
18
  import {
19
19
  CLI_RETRY_MAX_RETRIES,
20
20
  classifyCliFailure,
@@ -31,7 +31,7 @@ import {
31
31
  logTransportLifecycle,
32
32
  setYoloGrantListener,
33
33
  truncateHeadTail
34
- } from "./chunks/chunk-J2LGVYH2.js";
34
+ } from "./chunks/chunk-2SAFRLFJ.js";
35
35
  import {
36
36
  VERSION,
37
37
  getAgentDir,
@@ -76,7 +76,7 @@ import {
76
76
  shouldPreserveExecutionStateForUserText,
77
77
  supersedeExecutionState,
78
78
  todayKey
79
- } from "./chunks/chunk-PC6HUZAD.js";
79
+ } from "./chunks/chunk-WZLO5V2X.js";
80
80
  import {
81
81
  AGENTS_CONTEXT_FILE_NAME,
82
82
  AgentSessionController,
@@ -116,8 +116,8 @@ import {
116
116
  setEnablementInMap,
117
117
  setExtensionEnabledInSettings,
118
118
  verifyPreparedCompactionCommit
119
- } from "./chunks/chunk-BK36Y35W.js";
120
- import "./chunks/chunk-NCP264ZE.js";
119
+ } from "./chunks/chunk-XMOWWL4B.js";
120
+ import "./chunks/chunk-B4N5LJMD.js";
121
121
  import {
122
122
  Deref,
123
123
  Errors,
@@ -136,7 +136,7 @@ import {
136
136
  setLogger,
137
137
  streamSimple,
138
138
  type_exports
139
- } from "./chunks/chunk-JQRZLVPY.js";
139
+ } from "./chunks/chunk-6JEYRAQM.js";
140
140
  import {
141
141
  readImageFormat
142
142
  } from "./chunks/chunk-F7EBZTZO.js";
@@ -1033,15 +1033,15 @@ var require_route = __commonJS({
1033
1033
  };
1034
1034
  }
1035
1035
  function wrapConversion(toModel, graph) {
1036
- const path34 = [graph[toModel].parent, toModel];
1036
+ const path35 = [graph[toModel].parent, toModel];
1037
1037
  let fn = conversions[graph[toModel].parent][toModel];
1038
1038
  let cur = graph[toModel].parent;
1039
1039
  while (graph[cur].parent) {
1040
- path34.unshift(graph[cur].parent);
1040
+ path35.unshift(graph[cur].parent);
1041
1041
  fn = link(conversions[graph[cur].parent][cur], fn);
1042
1042
  cur = graph[cur].parent;
1043
1043
  }
1044
- fn.conversion = path34;
1044
+ fn.conversion = path35;
1045
1045
  return fn;
1046
1046
  }
1047
1047
  module.exports = function(fromModel) {
@@ -1964,7 +1964,7 @@ var require_core = __commonJS({
1964
1964
  return match && match.index === 0;
1965
1965
  }
1966
1966
  var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
1967
- function join23(regexps, separator = "|") {
1967
+ function join24(regexps, separator = "|") {
1968
1968
  let numCaptures = 0;
1969
1969
  return regexps.map((regex) => {
1970
1970
  numCaptures += 1;
@@ -2268,7 +2268,7 @@ var require_core = __commonJS({
2268
2268
  this.exec = () => null;
2269
2269
  }
2270
2270
  const terminators = this.regexes.map((el) => el[1]);
2271
- this.matcherRe = langRe(join23(terminators), true);
2271
+ this.matcherRe = langRe(join24(terminators), true);
2272
2272
  this.lastIndex = 0;
2273
2273
  }
2274
2274
  /** @param {string} s */
@@ -44081,17 +44081,17 @@ var require_visit = __commonJS({
44081
44081
  visit.BREAK = BREAK;
44082
44082
  visit.SKIP = SKIP;
44083
44083
  visit.REMOVE = REMOVE;
44084
- function visit_(key, node, visitor, path34) {
44085
- const ctrl = callVisitor(key, node, visitor, path34);
44084
+ function visit_(key, node, visitor, path35) {
44085
+ const ctrl = callVisitor(key, node, visitor, path35);
44086
44086
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
44087
- replaceNode(key, path34, ctrl);
44088
- return visit_(key, ctrl, visitor, path34);
44087
+ replaceNode(key, path35, ctrl);
44088
+ return visit_(key, ctrl, visitor, path35);
44089
44089
  }
44090
44090
  if (typeof ctrl !== "symbol") {
44091
44091
  if (identity.isCollection(node)) {
44092
- path34 = Object.freeze(path34.concat(node));
44092
+ path35 = Object.freeze(path35.concat(node));
44093
44093
  for (let i = 0; i < node.items.length; ++i) {
44094
- const ci = visit_(i, node.items[i], visitor, path34);
44094
+ const ci = visit_(i, node.items[i], visitor, path35);
44095
44095
  if (typeof ci === "number")
44096
44096
  i = ci - 1;
44097
44097
  else if (ci === BREAK)
@@ -44102,13 +44102,13 @@ var require_visit = __commonJS({
44102
44102
  }
44103
44103
  }
44104
44104
  } else if (identity.isPair(node)) {
44105
- path34 = Object.freeze(path34.concat(node));
44106
- const ck = visit_("key", node.key, visitor, path34);
44105
+ path35 = Object.freeze(path35.concat(node));
44106
+ const ck = visit_("key", node.key, visitor, path35);
44107
44107
  if (ck === BREAK)
44108
44108
  return BREAK;
44109
44109
  else if (ck === REMOVE)
44110
44110
  node.key = null;
44111
- const cv = visit_("value", node.value, visitor, path34);
44111
+ const cv = visit_("value", node.value, visitor, path35);
44112
44112
  if (cv === BREAK)
44113
44113
  return BREAK;
44114
44114
  else if (cv === REMOVE)
@@ -44129,17 +44129,17 @@ var require_visit = __commonJS({
44129
44129
  visitAsync.BREAK = BREAK;
44130
44130
  visitAsync.SKIP = SKIP;
44131
44131
  visitAsync.REMOVE = REMOVE;
44132
- async function visitAsync_(key, node, visitor, path34) {
44133
- const ctrl = await callVisitor(key, node, visitor, path34);
44132
+ async function visitAsync_(key, node, visitor, path35) {
44133
+ const ctrl = await callVisitor(key, node, visitor, path35);
44134
44134
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
44135
- replaceNode(key, path34, ctrl);
44136
- return visitAsync_(key, ctrl, visitor, path34);
44135
+ replaceNode(key, path35, ctrl);
44136
+ return visitAsync_(key, ctrl, visitor, path35);
44137
44137
  }
44138
44138
  if (typeof ctrl !== "symbol") {
44139
44139
  if (identity.isCollection(node)) {
44140
- path34 = Object.freeze(path34.concat(node));
44140
+ path35 = Object.freeze(path35.concat(node));
44141
44141
  for (let i = 0; i < node.items.length; ++i) {
44142
- const ci = await visitAsync_(i, node.items[i], visitor, path34);
44142
+ const ci = await visitAsync_(i, node.items[i], visitor, path35);
44143
44143
  if (typeof ci === "number")
44144
44144
  i = ci - 1;
44145
44145
  else if (ci === BREAK)
@@ -44150,13 +44150,13 @@ var require_visit = __commonJS({
44150
44150
  }
44151
44151
  }
44152
44152
  } else if (identity.isPair(node)) {
44153
- path34 = Object.freeze(path34.concat(node));
44154
- const ck = await visitAsync_("key", node.key, visitor, path34);
44153
+ path35 = Object.freeze(path35.concat(node));
44154
+ const ck = await visitAsync_("key", node.key, visitor, path35);
44155
44155
  if (ck === BREAK)
44156
44156
  return BREAK;
44157
44157
  else if (ck === REMOVE)
44158
44158
  node.key = null;
44159
- const cv = await visitAsync_("value", node.value, visitor, path34);
44159
+ const cv = await visitAsync_("value", node.value, visitor, path35);
44160
44160
  if (cv === BREAK)
44161
44161
  return BREAK;
44162
44162
  else if (cv === REMOVE)
@@ -44183,23 +44183,23 @@ var require_visit = __commonJS({
44183
44183
  }
44184
44184
  return visitor;
44185
44185
  }
44186
- function callVisitor(key, node, visitor, path34) {
44186
+ function callVisitor(key, node, visitor, path35) {
44187
44187
  if (typeof visitor === "function")
44188
- return visitor(key, node, path34);
44188
+ return visitor(key, node, path35);
44189
44189
  if (identity.isMap(node))
44190
- return visitor.Map?.(key, node, path34);
44190
+ return visitor.Map?.(key, node, path35);
44191
44191
  if (identity.isSeq(node))
44192
- return visitor.Seq?.(key, node, path34);
44192
+ return visitor.Seq?.(key, node, path35);
44193
44193
  if (identity.isPair(node))
44194
- return visitor.Pair?.(key, node, path34);
44194
+ return visitor.Pair?.(key, node, path35);
44195
44195
  if (identity.isScalar(node))
44196
- return visitor.Scalar?.(key, node, path34);
44196
+ return visitor.Scalar?.(key, node, path35);
44197
44197
  if (identity.isAlias(node))
44198
- return visitor.Alias?.(key, node, path34);
44198
+ return visitor.Alias?.(key, node, path35);
44199
44199
  return void 0;
44200
44200
  }
44201
- function replaceNode(key, path34, node) {
44202
- const parent = path34[path34.length - 1];
44201
+ function replaceNode(key, path35, node) {
44202
+ const parent = path35[path35.length - 1];
44203
44203
  if (identity.isCollection(parent)) {
44204
44204
  parent.items[key] = node;
44205
44205
  } else if (identity.isPair(parent)) {
@@ -44807,10 +44807,10 @@ var require_Collection = __commonJS({
44807
44807
  var createNode = require_createNode();
44808
44808
  var identity = require_identity();
44809
44809
  var Node = require_Node();
44810
- function collectionFromPath(schema, path34, value) {
44810
+ function collectionFromPath(schema, path35, value) {
44811
44811
  let v2 = value;
44812
- for (let i = path34.length - 1; i >= 0; --i) {
44813
- const k2 = path34[i];
44812
+ for (let i = path35.length - 1; i >= 0; --i) {
44813
+ const k2 = path35[i];
44814
44814
  if (typeof k2 === "number" && Number.isInteger(k2) && k2 >= 0) {
44815
44815
  const a = [];
44816
44816
  a[k2] = v2;
@@ -44829,7 +44829,7 @@ var require_Collection = __commonJS({
44829
44829
  sourceObjects: /* @__PURE__ */ new Map()
44830
44830
  });
44831
44831
  }
44832
- var isEmptyPath = (path34) => path34 == null || typeof path34 === "object" && !!path34[Symbol.iterator]().next().done;
44832
+ var isEmptyPath = (path35) => path35 == null || typeof path35 === "object" && !!path35[Symbol.iterator]().next().done;
44833
44833
  var Collection = class extends Node.NodeBase {
44834
44834
  constructor(type, schema) {
44835
44835
  super(type);
@@ -44859,11 +44859,11 @@ var require_Collection = __commonJS({
44859
44859
  * be a Pair instance or a `{ key, value }` object, which may not have a key
44860
44860
  * that already exists in the map.
44861
44861
  */
44862
- addIn(path34, value) {
44863
- if (isEmptyPath(path34))
44862
+ addIn(path35, value) {
44863
+ if (isEmptyPath(path35))
44864
44864
  this.add(value);
44865
44865
  else {
44866
- const [key, ...rest] = path34;
44866
+ const [key, ...rest] = path35;
44867
44867
  const node = this.get(key, true);
44868
44868
  if (identity.isCollection(node))
44869
44869
  node.addIn(rest, value);
@@ -44877,8 +44877,8 @@ var require_Collection = __commonJS({
44877
44877
  * Removes a value from the collection.
44878
44878
  * @returns `true` if the item was found and removed.
44879
44879
  */
44880
- deleteIn(path34) {
44881
- const [key, ...rest] = path34;
44880
+ deleteIn(path35) {
44881
+ const [key, ...rest] = path35;
44882
44882
  if (rest.length === 0)
44883
44883
  return this.delete(key);
44884
44884
  const node = this.get(key, true);
@@ -44892,8 +44892,8 @@ var require_Collection = __commonJS({
44892
44892
  * scalar values from their surrounding node; to disable set `keepScalar` to
44893
44893
  * `true` (collections are always returned intact).
44894
44894
  */
44895
- getIn(path34, keepScalar) {
44896
- const [key, ...rest] = path34;
44895
+ getIn(path35, keepScalar) {
44896
+ const [key, ...rest] = path35;
44897
44897
  const node = this.get(key, true);
44898
44898
  if (rest.length === 0)
44899
44899
  return !keepScalar && identity.isScalar(node) ? node.value : node;
@@ -44911,8 +44911,8 @@ var require_Collection = __commonJS({
44911
44911
  /**
44912
44912
  * Checks if the collection includes a value with the key `key`.
44913
44913
  */
44914
- hasIn(path34) {
44915
- const [key, ...rest] = path34;
44914
+ hasIn(path35) {
44915
+ const [key, ...rest] = path35;
44916
44916
  if (rest.length === 0)
44917
44917
  return this.has(key);
44918
44918
  const node = this.get(key, true);
@@ -44922,8 +44922,8 @@ var require_Collection = __commonJS({
44922
44922
  * Sets a value in this collection. For `!!set`, `value` needs to be a
44923
44923
  * boolean to add/remove the item from the set.
44924
44924
  */
44925
- setIn(path34, value) {
44926
- const [key, ...rest] = path34;
44925
+ setIn(path35, value) {
44926
+ const [key, ...rest] = path35;
44927
44927
  if (rest.length === 0) {
44928
44928
  this.set(key, value);
44929
44929
  } else {
@@ -47435,9 +47435,9 @@ var require_Document = __commonJS({
47435
47435
  this.contents.add(value);
47436
47436
  }
47437
47437
  /** Adds a value to the document. */
47438
- addIn(path34, value) {
47438
+ addIn(path35, value) {
47439
47439
  if (assertCollection(this.contents))
47440
- this.contents.addIn(path34, value);
47440
+ this.contents.addIn(path35, value);
47441
47441
  }
47442
47442
  /**
47443
47443
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -47512,14 +47512,14 @@ var require_Document = __commonJS({
47512
47512
  * Removes a value from the document.
47513
47513
  * @returns `true` if the item was found and removed.
47514
47514
  */
47515
- deleteIn(path34) {
47516
- if (Collection.isEmptyPath(path34)) {
47515
+ deleteIn(path35) {
47516
+ if (Collection.isEmptyPath(path35)) {
47517
47517
  if (this.contents == null)
47518
47518
  return false;
47519
47519
  this.contents = null;
47520
47520
  return true;
47521
47521
  }
47522
- return assertCollection(this.contents) ? this.contents.deleteIn(path34) : false;
47522
+ return assertCollection(this.contents) ? this.contents.deleteIn(path35) : false;
47523
47523
  }
47524
47524
  /**
47525
47525
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -47534,10 +47534,10 @@ var require_Document = __commonJS({
47534
47534
  * scalar values from their surrounding node; to disable set `keepScalar` to
47535
47535
  * `true` (collections are always returned intact).
47536
47536
  */
47537
- getIn(path34, keepScalar) {
47538
- if (Collection.isEmptyPath(path34))
47537
+ getIn(path35, keepScalar) {
47538
+ if (Collection.isEmptyPath(path35))
47539
47539
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
47540
- return identity.isCollection(this.contents) ? this.contents.getIn(path34, keepScalar) : void 0;
47540
+ return identity.isCollection(this.contents) ? this.contents.getIn(path35, keepScalar) : void 0;
47541
47541
  }
47542
47542
  /**
47543
47543
  * Checks if the document includes a value with the key `key`.
@@ -47548,10 +47548,10 @@ var require_Document = __commonJS({
47548
47548
  /**
47549
47549
  * Checks if the document includes a value at `path`.
47550
47550
  */
47551
- hasIn(path34) {
47552
- if (Collection.isEmptyPath(path34))
47551
+ hasIn(path35) {
47552
+ if (Collection.isEmptyPath(path35))
47553
47553
  return this.contents !== void 0;
47554
- return identity.isCollection(this.contents) ? this.contents.hasIn(path34) : false;
47554
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path35) : false;
47555
47555
  }
47556
47556
  /**
47557
47557
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -47568,13 +47568,13 @@ var require_Document = __commonJS({
47568
47568
  * Sets a value in this document. For `!!set`, `value` needs to be a
47569
47569
  * boolean to add/remove the item from the set.
47570
47570
  */
47571
- setIn(path34, value) {
47572
- if (Collection.isEmptyPath(path34)) {
47571
+ setIn(path35, value) {
47572
+ if (Collection.isEmptyPath(path35)) {
47573
47573
  this.contents = value;
47574
47574
  } else if (this.contents == null) {
47575
- this.contents = Collection.collectionFromPath(this.schema, Array.from(path34), value);
47575
+ this.contents = Collection.collectionFromPath(this.schema, Array.from(path35), value);
47576
47576
  } else if (assertCollection(this.contents)) {
47577
- this.contents.setIn(path34, value);
47577
+ this.contents.setIn(path35, value);
47578
47578
  }
47579
47579
  }
47580
47580
  /**
@@ -49531,9 +49531,9 @@ var require_cst_visit = __commonJS({
49531
49531
  visit.BREAK = BREAK;
49532
49532
  visit.SKIP = SKIP;
49533
49533
  visit.REMOVE = REMOVE;
49534
- visit.itemAtPath = (cst, path34) => {
49534
+ visit.itemAtPath = (cst, path35) => {
49535
49535
  let item = cst;
49536
- for (const [field, index] of path34) {
49536
+ for (const [field, index] of path35) {
49537
49537
  const tok = item?.[field];
49538
49538
  if (tok && "items" in tok) {
49539
49539
  item = tok.items[index];
@@ -49542,23 +49542,23 @@ var require_cst_visit = __commonJS({
49542
49542
  }
49543
49543
  return item;
49544
49544
  };
49545
- visit.parentCollection = (cst, path34) => {
49546
- const parent = visit.itemAtPath(cst, path34.slice(0, -1));
49547
- const field = path34[path34.length - 1][0];
49545
+ visit.parentCollection = (cst, path35) => {
49546
+ const parent = visit.itemAtPath(cst, path35.slice(0, -1));
49547
+ const field = path35[path35.length - 1][0];
49548
49548
  const coll = parent?.[field];
49549
49549
  if (coll && "items" in coll)
49550
49550
  return coll;
49551
49551
  throw new Error("Parent collection not found");
49552
49552
  };
49553
- function _visit(path34, item, visitor) {
49554
- let ctrl = visitor(item, path34);
49553
+ function _visit(path35, item, visitor) {
49554
+ let ctrl = visitor(item, path35);
49555
49555
  if (typeof ctrl === "symbol")
49556
49556
  return ctrl;
49557
49557
  for (const field of ["key", "value"]) {
49558
49558
  const token = item[field];
49559
49559
  if (token && "items" in token) {
49560
49560
  for (let i = 0; i < token.items.length; ++i) {
49561
- const ci = _visit(Object.freeze(path34.concat([[field, i]])), token.items[i], visitor);
49561
+ const ci = _visit(Object.freeze(path35.concat([[field, i]])), token.items[i], visitor);
49562
49562
  if (typeof ci === "number")
49563
49563
  i = ci - 1;
49564
49564
  else if (ci === BREAK)
@@ -49569,10 +49569,10 @@ var require_cst_visit = __commonJS({
49569
49569
  }
49570
49570
  }
49571
49571
  if (typeof ctrl === "function" && field === "key")
49572
- ctrl = ctrl(item, path34);
49572
+ ctrl = ctrl(item, path35);
49573
49573
  }
49574
49574
  }
49575
- return typeof ctrl === "function" ? ctrl(item, path34) : ctrl;
49575
+ return typeof ctrl === "function" ? ctrl(item, path35) : ctrl;
49576
49576
  }
49577
49577
  exports.visit = visit;
49578
49578
  }
@@ -50857,14 +50857,14 @@ var require_parser2 = __commonJS({
50857
50857
  case "scalar":
50858
50858
  case "single-quoted-scalar":
50859
50859
  case "double-quoted-scalar": {
50860
- const fs30 = this.flowScalar(this.type);
50860
+ const fs31 = this.flowScalar(this.type);
50861
50861
  if (atNextItem || it.value) {
50862
- map.items.push({ start, key: fs30, sep: [] });
50862
+ map.items.push({ start, key: fs31, sep: [] });
50863
50863
  this.onKeyLine = true;
50864
50864
  } else if (it.sep) {
50865
- this.stack.push(fs30);
50865
+ this.stack.push(fs31);
50866
50866
  } else {
50867
- Object.assign(it, { key: fs30, sep: [] });
50867
+ Object.assign(it, { key: fs31, sep: [] });
50868
50868
  this.onKeyLine = true;
50869
50869
  }
50870
50870
  return;
@@ -50992,13 +50992,13 @@ var require_parser2 = __commonJS({
50992
50992
  case "scalar":
50993
50993
  case "single-quoted-scalar":
50994
50994
  case "double-quoted-scalar": {
50995
- const fs30 = this.flowScalar(this.type);
50995
+ const fs31 = this.flowScalar(this.type);
50996
50996
  if (!it || it.value)
50997
- fc.items.push({ start: [], key: fs30, sep: [] });
50997
+ fc.items.push({ start: [], key: fs31, sep: [] });
50998
50998
  else if (it.sep)
50999
- this.stack.push(fs30);
50999
+ this.stack.push(fs31);
51000
51000
  else
51001
- Object.assign(it, { key: fs30, sep: [] });
51001
+ Object.assign(it, { key: fs31, sep: [] });
51002
51002
  return;
51003
51003
  }
51004
51004
  case "flow-map-end":
@@ -51307,8 +51307,8 @@ var require_dist2 = __commonJS({
51307
51307
  });
51308
51308
 
51309
51309
  // src/cli.ts
51310
- import * as fs29 from "fs";
51311
- import * as path33 from "path";
51310
+ import * as fs30 from "fs";
51311
+ import * as path34 from "path";
51312
51312
 
51313
51313
  // src/cli-args.ts
51314
51314
  var FLAGS_WITH_VALUES = /* @__PURE__ */ new Set(["--session-id", "--extension-path", "--developer-instructions", "--developer-instructions-file"]);
@@ -51895,6 +51895,7 @@ var SettingsManager = class {
51895
51895
  this.settingsLastWritten = cloneJsonDocument(this.settings);
51896
51896
  this.legacyConfig = this.loadLegacyConfigFile();
51897
51897
  this.legacyConfigLastWritten = cloneJsonDocument(this.legacyConfig);
51898
+ this.managerScopedEnv = this.readManagerScopedEnv();
51898
51899
  }
51899
51900
  readJson(filePath) {
51900
51901
  if (!fs2.existsSync(filePath)) return null;
@@ -51956,10 +51957,27 @@ var SettingsManager = class {
51956
51957
  getLegacyApiKey() {
51957
51958
  return this.legacyConfig.apiKey;
51958
51959
  }
51960
+ /** 4.3.7 manager-scoped model env, scoped to manager-bootstrapped
51961
+ * processes: the env pair is injected by managerSpawnEnv() and — because
51962
+ * spawn env is inherited by EVERY descendant (a pie the user starts
51963
+ * inside a manager-owned shell would otherwise silently switch models,
51964
+ * P2 review) — it only applies while the process was itself launched
51965
+ * with the manager bootstrap marker. The marker is set by the same
51966
+ * spawn env, and the bash tool strips both vars from child shells, so
51967
+ * the pair never leaks past the manager's own process tree boundary. */
51968
+ managerScopedEnv;
51969
+ readManagerScopedEnv() {
51970
+ if (process.env.PIE_MANAGER_BOOTSTRAP !== "1") return {};
51971
+ const provider = process.env.PIE_DEFAULT_PROVIDER?.trim();
51972
+ const model = process.env.PIE_DEFAULT_MODEL?.trim();
51973
+ return provider && model ? { provider, model } : {};
51974
+ }
51959
51975
  getDefaultProvider() {
51976
+ if (this.managerScopedEnv.provider) return this.managerScopedEnv.provider;
51960
51977
  return this.settings.defaultProvider || this.legacyConfig.provider;
51961
51978
  }
51962
51979
  getDefaultModel() {
51980
+ if (this.managerScopedEnv.model) return this.managerScopedEnv.model;
51963
51981
  return this.settings.defaultModel || this.legacyConfig.modelId;
51964
51982
  }
51965
51983
  getDefaultThinkingLevel() {
@@ -54936,19 +54954,19 @@ var CommandTree = class {
54936
54954
  * register(["session", "new"], { description, handler })
54937
54955
  * register(["tools", "subagent", "spawn", "local"], { description, handler })
54938
54956
  */
54939
- register(path34, info) {
54940
- if (path34.length === 0) {
54957
+ register(path35, info) {
54958
+ if (path35.length === 0) {
54941
54959
  throw new Error("Command path cannot be empty");
54942
54960
  }
54943
54961
  let current = this.root;
54944
54962
  const fullPath = [];
54945
- for (let i = 0; i < path34.length; i++) {
54946
- const segment = path34[i];
54963
+ for (let i = 0; i < path35.length; i++) {
54964
+ const segment = path35[i];
54947
54965
  fullPath.push(segment);
54948
54966
  if (!current.children) {
54949
54967
  current.children = [];
54950
54968
  }
54951
- const isLast = i === path34.length - 1;
54969
+ const isLast = i === path35.length - 1;
54952
54970
  let node = current.children.find((n) => n.name === segment);
54953
54971
  if (!node) {
54954
54972
  node = {
@@ -54978,31 +54996,31 @@ var CommandTree = class {
54978
54996
  /**
54979
54997
  * Find a node by path
54980
54998
  */
54981
- find(path34) {
54982
- if (path34.length === 0) {
54999
+ find(path35) {
55000
+ if (path35.length === 0) {
54983
55001
  return this.root;
54984
55002
  }
54985
- const key = path34.join("/");
55003
+ const key = path35.join("/");
54986
55004
  return this.pathCache.get(key) || null;
54987
55005
  }
54988
55006
  /**
54989
55007
  * Get children of a path
54990
55008
  */
54991
- getChildren(path34) {
54992
- const node = this.find(path34);
55009
+ getChildren(path35) {
55010
+ const node = this.find(path35);
54993
55011
  return (node?.children || []).filter((child) => !child.hidden);
54994
55012
  }
54995
55013
  /**
54996
55014
  * Check if a path exists (as category or command)
54997
55015
  */
54998
- exists(path34) {
54999
- return this.find(path34) !== null;
55016
+ exists(path35) {
55017
+ return this.find(path35) !== null;
55000
55018
  }
55001
55019
  /**
55002
55020
  * Check if path is a category (has children)
55003
55021
  */
55004
- isCategory(path34) {
55005
- const node = this.find(path34);
55022
+ isCategory(path35) {
55023
+ const node = this.find(path35);
55006
55024
  return node?.isCategory || false;
55007
55025
  }
55008
55026
  /**
@@ -55081,8 +55099,8 @@ var CommandTree = class {
55081
55099
  * Supports dot notation: "tools.subagent.spawn.local"
55082
55100
  */
55083
55101
  registerFromPath(pathStr, info) {
55084
- const path34 = pathStr.split(/[./]/).filter(Boolean);
55085
- this.register(path34, info);
55102
+ const path35 = pathStr.split(/[./]/).filter(Boolean);
55103
+ this.register(path35, info);
55086
55104
  }
55087
55105
  };
55088
55106
  var commandTree = new CommandTree();
@@ -55163,13 +55181,13 @@ function createExtensionContext(extension, cwd, uiContext, abortFn, isIdleFn, ca
55163
55181
  actions?.sendUserMessage(content);
55164
55182
  },
55165
55183
  ...actions?.attachLocalFile ? {
55166
- attachLocalFile: (path34, displayName) => actions.attachLocalFile(path34, displayName)
55184
+ attachLocalFile: (path35, displayName) => actions.attachLocalFile(path35, displayName)
55167
55185
  } : {},
55168
55186
  ...actions?.beginUserInput ? {
55169
55187
  beginUserInput: (isCurrent) => actions.beginUserInput(isCurrent)
55170
55188
  } : {},
55171
55189
  ...actions?.attachLocalFileAndSubmit ? {
55172
- attachLocalFileAndSubmit: (path34, displayName, submitText) => actions.attachLocalFileAndSubmit(path34, displayName, submitText)
55190
+ attachLocalFileAndSubmit: (path35, displayName, submitText) => actions.attachLocalFileAndSubmit(path35, displayName, submitText)
55173
55191
  } : {},
55174
55192
  setPlanMode(enabled, options) {
55175
55193
  actions?.setPlanMode(enabled, options);
@@ -63157,7 +63175,12 @@ var Osc5522Client = class {
63157
63175
  };
63158
63176
 
63159
63177
  // ../../packages/tui/src/terminal.ts
63160
- var ProcessTerminal = class {
63178
+ var TERMINATION_SIGNAL_CODES = {
63179
+ SIGHUP: 1,
63180
+ SIGINT: 2,
63181
+ SIGTERM: 15
63182
+ };
63183
+ var ProcessTerminal = class _ProcessTerminal {
63161
63184
  wasRaw = false;
63162
63185
  /** Client for the Kitty OSC 5522 clipboard protocol (read side). */
63163
63186
  osc5522Client = new Osc5522Client();
@@ -63168,6 +63191,84 @@ var ProcessTerminal = class {
63168
63191
  inputHandler;
63169
63192
  resizeHandler;
63170
63193
  _kittyProtocolActive = false;
63194
+ /** Restore sequences sent on every teardown path. Idempotent: re-sending
63195
+ * on an already-clean terminal is a no-op, so the exit hook and stop()
63196
+ * can both run. 4.3.7: any abnormal exit (timeout kill, SIGKILL-adjacent
63197
+ * paths, crash) used to leak kitty-keyboard push / bracketed-paste /
63198
+ * DECAWM state into the user's shell (arrows echoed as CSI-u text). */
63199
+ static RESTORE_SEQUENCE = "\x1B[<9999u\x1B[?2004l\x1B[?2026l\x1B[?7h";
63200
+ exitHookInstalled = false;
63201
+ /** Whether stop() has completed. The exit hook uses this to only touch
63202
+ * raw mode on teardown paths that bypassed stop() (crash/kill). */
63203
+ stopped = false;
63204
+ /** Emit the idempotent mode-stack reset (kitty pop-all + bracketed paste
63205
+ * off + sync output off + autowrap on). Safe any number of times: these
63206
+ * are pure state sets/pops, so stop() and the exit hook may both run.
63207
+ * Raw mode is deliberately NOT handled here — stop() restores it AFTER
63208
+ * stdin.pause() (ordering matters: pause-then-unraw closes the Ctrl+D
63209
+ * race with the parent shell), and the exit hook only forces cooked
63210
+ * mode when stop() never ran. */
63211
+ restoreTerminalState() {
63212
+ process.stdout.write(_ProcessTerminal.RESTORE_SEQUENCE);
63213
+ if (this._kittyProtocolActive) {
63214
+ this._kittyProtocolActive = false;
63215
+ setKittyProtocolActive(false);
63216
+ }
63217
+ }
63218
+ /** Crash-path raw-mode fallback: if the process is exiting while the TUI
63219
+ * still owns a raw tty (stop() bypassed), leaving raw mode on hands the
63220
+ * user's shell a broken input state. Only stop() knows the correct
63221
+ * previous value (wasRaw) — on crash paths cooked mode is the safe bet.
63222
+ * P2(review): pause BEFORE unraw, mirroring stop()'s documented Ctrl+D
63223
+ * race ordering — a crash while input is flowing must not hand the
63224
+ * parent shell buffered input in cooked mode. */
63225
+ forceCookedModeIfActive() {
63226
+ if (this.stopped) return;
63227
+ if (process.stdin.setRawMode && process.stdin.isRaw) {
63228
+ try {
63229
+ process.stdin.pause();
63230
+ } catch {
63231
+ }
63232
+ try {
63233
+ process.stdin.setRawMode(false);
63234
+ } catch {
63235
+ }
63236
+ }
63237
+ }
63238
+ /** P1(review 4.3.7): process.on("exit") does NOT run when the process is
63239
+ * terminated by a signal under default disposition — `timeout 25 pie`
63240
+ * sends SIGTERM, external kills send SIGTERM/SIGHUP, and the exit hook
63241
+ * alone never fires on those paths (verified on Node 24). Register
63242
+ * explicit teardown for the signals that terminate the interactive TUI:
63243
+ * restore the terminal, then exit with the conventional 128+sig status.
63244
+ * Removed in stop() so a stopped-TUI process falls back to default
63245
+ * disposition. SIGINT is included because raw mode clears ISIG — a
63246
+ * keyboard Ctrl+C is delivered as INPUT (handled by the app's clean
63247
+ * exit), so this handler only sees external `kill -INT`. */
63248
+ static TERMINATION_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
63249
+ signalListener;
63250
+ installTerminationSignalHandlers() {
63251
+ if (this.signalListener) return;
63252
+ this.signalListener = (signal) => {
63253
+ try {
63254
+ this.restoreTerminalState();
63255
+ } finally {
63256
+ this.forceCookedModeIfActive();
63257
+ }
63258
+ const signo = TERMINATION_SIGNAL_CODES[signal];
63259
+ process.exit(signo !== void 0 ? 128 + signo : 128);
63260
+ };
63261
+ for (const signal of _ProcessTerminal.TERMINATION_SIGNALS) {
63262
+ process.on(signal, this.signalListener);
63263
+ }
63264
+ }
63265
+ removeTerminationSignalHandlers() {
63266
+ if (!this.signalListener) return;
63267
+ for (const signal of _ProcessTerminal.TERMINATION_SIGNALS) {
63268
+ process.removeListener(signal, this.signalListener);
63269
+ }
63270
+ this.signalListener = void 0;
63271
+ }
63171
63272
  stdinBuffer;
63172
63273
  stdinDataHandler;
63173
63274
  writeLogPath = process.env.PIE_TUI_WRITE_LOG || "";
@@ -63181,6 +63282,19 @@ var ProcessTerminal = class {
63181
63282
  start(onInput, onResize) {
63182
63283
  this.inputHandler = onInput;
63183
63284
  this.resizeHandler = onResize;
63285
+ process.stdout.write(_ProcessTerminal.RESTORE_SEQUENCE);
63286
+ this.stopped = false;
63287
+ this.installTerminationSignalHandlers();
63288
+ if (!this.exitHookInstalled) {
63289
+ this.exitHookInstalled = true;
63290
+ process.on("exit", () => {
63291
+ try {
63292
+ this.restoreTerminalState();
63293
+ } finally {
63294
+ this.forceCookedModeIfActive();
63295
+ }
63296
+ });
63297
+ }
63184
63298
  this.wasRaw = process.stdin.isRaw || false;
63185
63299
  if (process.stdin.setRawMode) {
63186
63300
  process.stdin.setRawMode(true);
@@ -63302,14 +63416,10 @@ var ProcessTerminal = class {
63302
63416
  }
63303
63417
  }
63304
63418
  stop() {
63305
- process.stdout.write("\x1B[?2004l");
63419
+ this.restoreTerminalState();
63420
+ this.stopped = true;
63421
+ this.removeTerminationSignalHandlers();
63306
63422
  this.lastTitle = null;
63307
- process.stdout.write("\x1B[?7h");
63308
- if (this._kittyProtocolActive && !process.env.PIE_DISABLE_KITTY_PROTOCOL) {
63309
- process.stdout.write("\x1B[<u");
63310
- this._kittyProtocolActive = false;
63311
- setKittyProtocolActive(false);
63312
- }
63313
63423
  if (this.stdinBuffer) {
63314
63424
  this.stdinBuffer.destroy();
63315
63425
  this.stdinBuffer = void 0;
@@ -63609,13 +63719,13 @@ var ExtensionRunner = class {
63609
63719
  getActiveTools: () => this.actions.getActiveTools(),
63610
63720
  sendUserMessage: (content) => this.actions.sendUserMessage(content),
63611
63721
  ...this.actions.attachLocalFile ? {
63612
- attachLocalFile: (path34, displayName) => this.actions.attachLocalFile(path34, displayName)
63722
+ attachLocalFile: (path35, displayName) => this.actions.attachLocalFile(path35, displayName)
63613
63723
  } : {},
63614
63724
  ...this.actions.beginUserInput ? {
63615
63725
  beginUserInput: (isCurrent) => this.actions.beginUserInput(isCurrent)
63616
63726
  } : {},
63617
63727
  ...this.actions.attachLocalFileAndSubmit ? {
63618
- attachLocalFileAndSubmit: (path34, displayName, submitText) => this.actions.attachLocalFileAndSubmit(path34, displayName, submitText)
63728
+ attachLocalFileAndSubmit: (path35, displayName, submitText) => this.actions.attachLocalFileAndSubmit(path35, displayName, submitText)
63619
63729
  } : {},
63620
63730
  setPlanMode: (enabled, options) => this.actions.setPlanMode(enabled, options),
63621
63731
  setExecutionReminder: (text) => this.actions.setExecutionReminder(text),
@@ -64316,10 +64426,10 @@ var KeybindingsManager = class _KeybindingsManager {
64316
64426
  static inMemory(config = {}) {
64317
64427
  return new _KeybindingsManager(config);
64318
64428
  }
64319
- static loadFromFile(path34) {
64320
- if (!existsSync6(path34)) return {};
64429
+ static loadFromFile(path35) {
64430
+ if (!existsSync6(path35)) return {};
64321
64431
  try {
64322
- return JSON.parse(readFileSync7(path34, "utf-8"));
64432
+ return JSON.parse(readFileSync7(path35, "utf-8"));
64323
64433
  } catch {
64324
64434
  return {};
64325
64435
  }
@@ -70211,10 +70321,10 @@ function parseProjectContextSection(section) {
70211
70321
  const parts = section.split(/^### (.+)$/m);
70212
70322
  const files = [];
70213
70323
  for (let i = 1; i + 1 < parts.length + 1; i += 2) {
70214
- const path34 = (parts[i] ?? "").trim();
70324
+ const path35 = (parts[i] ?? "").trim();
70215
70325
  const content = (parts[i + 1] ?? "").trim();
70216
- if (!path34 || !content) continue;
70217
- files.push({ path: path34, content });
70326
+ if (!path35 || !content) continue;
70327
+ files.push({ path: path35, content });
70218
70328
  }
70219
70329
  return files;
70220
70330
  }
@@ -71659,13 +71769,13 @@ function formatSize2(bytes) {
71659
71769
  }
71660
71770
  var DEFAULT_MAX_BYTES = 102400;
71661
71771
  var DEFAULT_MAX_LINES = 100;
71662
- function shortenPath(path34) {
71663
- if (typeof path34 !== "string") return "";
71772
+ function shortenPath(path35) {
71773
+ if (typeof path35 !== "string") return "";
71664
71774
  const home = os5.homedir();
71665
- if (path34.startsWith(home)) {
71666
- return `~${path34.slice(home.length)}`;
71775
+ if (path35.startsWith(home)) {
71776
+ return `~${path35.slice(home.length)}`;
71667
71777
  }
71668
- return path34;
71778
+ return path35;
71669
71779
  }
71670
71780
  function replaceTabs(text) {
71671
71781
  return text.replace(/\t/g, " ");
@@ -71776,14 +71886,14 @@ ${renderManageTodoListResult(this.result, { expanded: this.expanded }, theme)}`;
71776
71886
  }
71777
71887
  } else if (this.toolName === "read_file") {
71778
71888
  const rawPath = str(this.args?.file_path ?? this.args?.path);
71779
- const path34 = rawPath !== null ? shortenPath(rawPath) : null;
71889
+ const path35 = rawPath !== null ? shortenPath(rawPath) : null;
71780
71890
  const offset = typeof this.args?.offset === "number" ? this.args.offset : void 0;
71781
71891
  const limit = typeof this.args?.limit === "number" ? this.args.limit : void 0;
71782
71892
  let pathDisplay;
71783
- if (path34 === null) {
71893
+ if (path35 === null) {
71784
71894
  pathDisplay = invalidArg;
71785
- } else if (path34) {
71786
- pathDisplay = theme.fg("accent", path34);
71895
+ } else if (path35) {
71896
+ pathDisplay = theme.fg("accent", path35);
71787
71897
  } else {
71788
71898
  const partialPath = partialStr(this.args?.file_path ?? this.args?.path);
71789
71899
  pathDisplay = theme.fg("toolOutput", partialPath);
@@ -71830,12 +71940,12 @@ ${renderManageTodoListResult(this.result, { expanded: this.expanded }, theme)}`;
71830
71940
  } else if (this.toolName === "write_file") {
71831
71941
  const rawPath = str(this.args?.file_path ?? this.args?.path);
71832
71942
  const fileContent = str(this.args?.content);
71833
- const path34 = rawPath !== null ? shortenPath(rawPath) : null;
71943
+ const path35 = rawPath !== null ? shortenPath(rawPath) : null;
71834
71944
  let pathDisplay;
71835
- if (path34 === null) {
71945
+ if (path35 === null) {
71836
71946
  pathDisplay = invalidArg;
71837
- } else if (path34) {
71838
- pathDisplay = theme.fg("accent", path34);
71947
+ } else if (path35) {
71948
+ pathDisplay = theme.fg("accent", path35);
71839
71949
  } else {
71840
71950
  const partialPath = partialStr(this.args?.file_path ?? this.args?.path);
71841
71951
  pathDisplay = theme.fg("toolOutput", partialPath);
@@ -71872,12 +71982,12 @@ ${theme.fg("error", errorText)}`;
71872
71982
  }
71873
71983
  } else if (this.toolName === "edit_file") {
71874
71984
  const rawPath = str(this.args?.file_path ?? this.args?.path);
71875
- const path34 = rawPath !== null ? shortenPath(rawPath) : null;
71985
+ const path35 = rawPath !== null ? shortenPath(rawPath) : null;
71876
71986
  let pathDisplay;
71877
- if (path34 === null) {
71987
+ if (path35 === null) {
71878
71988
  pathDisplay = invalidArg;
71879
- } else if (path34) {
71880
- pathDisplay = theme.fg("accent", path34);
71989
+ } else if (path35) {
71990
+ pathDisplay = theme.fg("accent", path35);
71881
71991
  } else {
71882
71992
  const partialPath = partialStr(this.args?.file_path ?? this.args?.path);
71883
71993
  pathDisplay = theme.fg("toolOutput", partialPath);
@@ -71902,7 +72012,7 @@ ${theme.fg("error", errorText)}`;
71902
72012
  const diff = this.result.details.diff;
71903
72013
  const firstChangedLine = this.result.details.firstChangedLine;
71904
72014
  if (firstChangedLine) {
71905
- text = `${theme.fg("toolTitle", theme.bold("edit_file"))} ${theme.fg("accent", path34 || rawPath)}${theme.fg("warning", `:${firstChangedLine}`)}`;
72015
+ text = `${theme.fg("toolTitle", theme.bold("edit_file"))} ${theme.fg("accent", path35 || rawPath)}${theme.fg("warning", `:${firstChangedLine}`)}`;
71906
72016
  }
71907
72017
  const lines = diff.split("\n");
71908
72018
  const maxLines = this.expanded ? lines.length : 15;
@@ -71922,7 +72032,7 @@ ${theme.fg("error", errorText)}`;
71922
72032
  const diff = generateEditDiff(oldText, newText, rawPath);
71923
72033
  const firstChangedLine = findFirstChangedLine(oldText, newText);
71924
72034
  if (firstChangedLine) {
71925
- text = `${theme.fg("toolTitle", theme.bold("edit_file"))} ${theme.fg("accent", path34 || rawPath)}${theme.fg("warning", `:${firstChangedLine}`)}`;
72035
+ text = `${theme.fg("toolTitle", theme.bold("edit_file"))} ${theme.fg("accent", path35 || rawPath)}${theme.fg("warning", `:${firstChangedLine}`)}`;
71926
72036
  }
71927
72037
  const lines = diff.split("\n");
71928
72038
  const maxLines = this.expanded ? lines.length : 15;
@@ -71941,9 +72051,9 @@ ${theme.fg("error", errorText)}`;
71941
72051
  }
71942
72052
  } else if (this.toolName === "list_dir") {
71943
72053
  const rawPath = str(this.args?.path);
71944
- const path34 = rawPath !== null ? shortenPath(rawPath || ".") : null;
72054
+ const path35 = rawPath !== null ? shortenPath(rawPath || ".") : null;
71945
72055
  const limit = this.args?.limit;
71946
- text = `${theme.fg("toolTitle", theme.bold("list_dir"))} ${path34 === null ? invalidArg : theme.fg("accent", path34)}`;
72056
+ text = `${theme.fg("toolTitle", theme.bold("list_dir"))} ${path35 === null ? invalidArg : theme.fg("accent", path35)}`;
71947
72057
  if (limit !== void 0) {
71948
72058
  text += theme.fg("toolOutput", ` (limit ${limit})`);
71949
72059
  }
@@ -71979,9 +72089,9 @@ ${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
71979
72089
  } else if (this.toolName === "find_files") {
71980
72090
  const pattern = str(this.args?.pattern);
71981
72091
  const rawPath = str(this.args?.path);
71982
- const path34 = rawPath !== null ? shortenPath(rawPath || ".") : null;
72092
+ const path35 = rawPath !== null ? shortenPath(rawPath || ".") : null;
71983
72093
  const limit = this.args?.limit;
71984
- text = theme.fg("toolTitle", theme.bold("find_files")) + " " + (pattern === null ? invalidArg : theme.fg("accent", pattern || "")) + theme.fg("toolOutput", ` in ${path34 === null ? invalidArg : path34}`);
72094
+ text = theme.fg("toolTitle", theme.bold("find_files")) + " " + (pattern === null ? invalidArg : theme.fg("accent", pattern || "")) + theme.fg("toolOutput", ` in ${path35 === null ? invalidArg : path35}`);
71985
72095
  if (limit !== void 0) {
71986
72096
  text += theme.fg("toolOutput", ` (limit ${limit})`);
71987
72097
  }
@@ -72017,10 +72127,10 @@ ${theme.fg("warning", `[Truncated: ${warnings.join(", ")}]`)}`;
72017
72127
  } else if (this.toolName === "grep_text") {
72018
72128
  const pattern = str(this.args?.pattern);
72019
72129
  const rawPath = str(this.args?.path);
72020
- const path34 = rawPath !== null ? shortenPath(rawPath || ".") : null;
72130
+ const path35 = rawPath !== null ? shortenPath(rawPath || ".") : null;
72021
72131
  const glob = str(this.args?.glob);
72022
72132
  const limit = this.args?.limit;
72023
- text = theme.fg("toolTitle", theme.bold("grep_text")) + " " + (pattern === null ? invalidArg : theme.fg("accent", `/${pattern || ""}/`)) + theme.fg("toolOutput", ` in ${path34 === null ? invalidArg : path34}`);
72133
+ text = theme.fg("toolTitle", theme.bold("grep_text")) + " " + (pattern === null ? invalidArg : theme.fg("accent", `/${pattern || ""}/`)) + theme.fg("toolOutput", ` in ${path35 === null ? invalidArg : path35}`);
72024
72134
  if (glob) {
72025
72135
  text += theme.fg("toolOutput", ` (${glob})`);
72026
72136
  }
@@ -72722,8 +72832,8 @@ async function forkAtEntry(host, entryId) {
72722
72832
  host.showError("Failed to branch at entry");
72723
72833
  return;
72724
72834
  }
72725
- const path34 = host.sessionManager.getPathSummaries(entryId);
72726
- const pathNames = path34.map((summary) => summary.role || summary.type).join(" \u2192 ");
72835
+ const path35 = host.sessionManager.getPathSummaries(entryId);
72836
+ const pathNames = path35.map((summary) => summary.role || summary.type).join(" \u2192 ");
72727
72837
  const messages = host.sessionManager.getMessages();
72728
72838
  host.syncAgentFromActiveSession(messages);
72729
72839
  await host.syncSessionScopedState(messages);
@@ -72736,7 +72846,7 @@ async function forkAtEntry(host, entryId) {
72736
72846
  host.updatePendingMessagesDisplay();
72737
72847
  host.renderMessageHistory(messages);
72738
72848
  await host.sessionManager.save();
72739
- host.showStatus(`Branched at: ${pathNames} (${path34.length} messages). Continue to add to this branch.`);
72849
+ host.showStatus(`Branched at: ${pathNames} (${path35.length} messages). Continue to add to this branch.`);
72740
72850
  } catch (error) {
72741
72851
  host.showError(
72742
72852
  `Failed to branch: ${error instanceof Error ? error.message : String(error)}`
@@ -72764,10 +72874,10 @@ async function navigateToEntry(host, entryId) {
72764
72874
  host.sessionManager.save().catch((err) => {
72765
72875
  console.error("[Session] Save after navigation failed:", err);
72766
72876
  });
72767
- const path34 = host.sessionManager.getPathSummaries(entryId);
72877
+ const path35 = host.sessionManager.getPathSummaries(entryId);
72768
72878
  const summary = host.sessionManager.getEntrySummary(entryId);
72769
72879
  const role = summary?.role || summary?.type || "entry";
72770
- host.showStatus(`Switched to branch: ${role} (${path34.length} entries in path)`);
72880
+ host.showStatus(`Switched to branch: ${role} (${path35.length} entries in path)`);
72771
72881
  } catch (error) {
72772
72882
  host.showError(
72773
72883
  `Failed to navigate: ${error instanceof Error ? error.message : String(error)}`
@@ -78363,8 +78473,8 @@ var MentionHandler = class {
78363
78473
  * picker-selected file, so submit-time queueing and attachment resolution
78364
78474
  * behave identically.
78365
78475
  */
78366
- async attachLocalFile(path34, displayName, pendingMention, isCurrent) {
78367
- return this.attachFileFromPath(path34, { sourceName: displayName, queryToken: pendingMention, isCurrent });
78476
+ async attachLocalFile(path35, displayName, pendingMention, isCurrent) {
78477
+ return this.attachFileFromPath(path35, { sourceName: displayName, queryToken: pendingMention, isCurrent });
78368
78478
  }
78369
78479
  /** Prepare a message-owned mention without reading or mutating the editor.
78370
78480
  * Errors propagate to the caller; no caption-only submission on failure. */
@@ -78400,12 +78510,12 @@ var MentionHandler = class {
78400
78510
  * mention, stage or upload the file, then replace the pending mention with
78401
78511
  * the final one (or remove it on failure).
78402
78512
  */
78403
- async attachFileFromPath(path34, options) {
78404
- const sourceName = options.sourceName ?? path34.split(/[\\/]/).pop() ?? path34;
78513
+ async attachFileFromPath(path35, options) {
78514
+ const sourceName = options.sourceName ?? path35.split(/[\\/]/).pop() ?? path35;
78405
78515
  this.pendingUploadCount += 1;
78406
78516
  const pendingMention = options.queryToken?.includes("pending:clipboard-") ? options.queryToken : this.formatPendingMention(sourceName);
78407
78517
  this.onInsertMention(pendingMention, options.queryToken);
78408
- const pendingStatusKey = `${path34}:${Date.now()}:${Math.random().toString(36).slice(2, 8)}`;
78518
+ const pendingStatusKey = `${path35}:${Date.now()}:${Math.random().toString(36).slice(2, 8)}`;
78409
78519
  try {
78410
78520
  if (options.cacheStatus === "uploaded") {
78411
78521
  this.pushPendingStatus(
@@ -78420,7 +78530,7 @@ var MentionHandler = class {
78420
78530
  } else {
78421
78531
  this.pushPendingStatus(pendingStatusKey, `Preparing ${sourceName}...`);
78422
78532
  }
78423
- const mimeType = FileCache.getMimeType(path34);
78533
+ const mimeType = FileCache.getMimeType(path35);
78424
78534
  const isMedia = mimeType.startsWith("image/") || mimeType.startsWith("video/");
78425
78535
  const shouldStageLocally = !isMedia || !this.fileManager.hasAdapter();
78426
78536
  if (isMedia && shouldStageLocally) {
@@ -78433,7 +78543,7 @@ var MentionHandler = class {
78433
78543
  this.formatUploadProgress(sourceName, progress, stage)
78434
78544
  );
78435
78545
  };
78436
- const result = await this.prepareFile(path34, sourceName, onProgress);
78546
+ const result = await this.prepareFile(path35, sourceName, onProgress);
78437
78547
  if (options.isCurrent && !options.isCurrent()) return false;
78438
78548
  if (result.success) {
78439
78549
  const mention = this.formatMention(result.name, result.fileId);
@@ -79329,23 +79439,23 @@ var TempImageResources = class {
79329
79439
  this.directory = mkdtempSync(join19(tmpdir(), "pie-clipboard-"));
79330
79440
  if (process.platform !== "win32") chmodSync(this.directory, 448);
79331
79441
  }
79332
- const path34 = this.injectedPath ? this.injectedPath(ext) : join19(this.directory, `image${ext}`);
79333
- const fd = openSync2(path34, "wx", 384);
79334
- this.files.add(path34);
79442
+ const path35 = this.injectedPath ? this.injectedPath(ext) : join19(this.directory, `image${ext}`);
79443
+ const fd = openSync2(path35, "wx", 384);
79444
+ this.files.add(path35);
79335
79445
  try {
79336
79446
  if (process.platform !== "win32") fchmodSync(fd, 384);
79337
79447
  } finally {
79338
79448
  closeSync2(fd);
79339
79449
  }
79340
- return path34;
79450
+ return path35;
79341
79451
  };
79342
79452
  cleanup = () => {
79343
- for (const path34 of this.files) {
79453
+ for (const path35 of this.files) {
79344
79454
  try {
79345
- unlinkSync5(path34);
79346
- this.files.delete(path34);
79455
+ unlinkSync5(path35);
79456
+ this.files.delete(path35);
79347
79457
  } catch (err) {
79348
- if (err.code === "ENOENT") this.files.delete(path34);
79458
+ if (err.code === "ENOENT") this.files.delete(path35);
79349
79459
  }
79350
79460
  }
79351
79461
  if (this.directory) {
@@ -79570,20 +79680,20 @@ function writeImageBytes(bytes, declaredMime, mkTempPath) {
79570
79680
  mimeType
79571
79681
  };
79572
79682
  }
79573
- function finalizeTempImage(path34, mimeType) {
79683
+ function finalizeTempImage(path35, mimeType) {
79574
79684
  let bytes;
79575
79685
  try {
79576
- if (!existsSync16(path34)) {
79686
+ if (!existsSync16(path35)) {
79577
79687
  return { ok: false, kind: "no-image", message: "Clipboard does not contain an image." };
79578
79688
  }
79579
- const size = statSync12(path34).size;
79689
+ const size = statSync12(path35).size;
79580
79690
  if (size === 0) {
79581
79691
  return { ok: false, kind: "no-image", message: "Clipboard does not contain an image." };
79582
79692
  }
79583
79693
  if (size > MAX_IMAGE_BYTES) {
79584
79694
  return { ok: false, kind: "too-large", message: `Clipboard image is too large (${formatBytes2(size)}).` };
79585
79695
  }
79586
- bytes = readFileSync17(path34);
79696
+ bytes = readFileSync17(path35);
79587
79697
  } catch (err) {
79588
79698
  return { ok: false, kind: "failed", message: `Failed to read clipboard image: ${errorMessage4(err)}` };
79589
79699
  }
@@ -79591,7 +79701,7 @@ function finalizeTempImage(path34, mimeType) {
79591
79701
  if (!detected) {
79592
79702
  return { ok: false, kind: "no-image", message: "Clipboard does not contain a supported image (PNG/JPEG)." };
79593
79703
  }
79594
- return { ok: true, path: path34, mimeType: detected };
79704
+ return { ok: true, path: path35, mimeType: detected };
79595
79705
  }
79596
79706
  function detectMimeFromMagic(bytes) {
79597
79707
  if (bytes.length >= 8 && bytes[0] === 137 && bytes[1] === 80 && bytes[2] === 78 && bytes[3] === 71) {
@@ -79659,11 +79769,11 @@ function terminalResultToClipboardResult(result) {
79659
79769
  let dir;
79660
79770
  try {
79661
79771
  dir = mkdtempSync2(join20(tmpdir2(), "pie-osc5522-"));
79662
- const path34 = join20(dir, formatPastedImageName(/* @__PURE__ */ new Date(), ext));
79663
- writeFileSync10(path34, result.bytes);
79772
+ const path35 = join20(dir, formatPastedImageName(/* @__PURE__ */ new Date(), ext));
79773
+ writeFileSync10(path35, result.bytes);
79664
79774
  return {
79665
79775
  ok: true,
79666
- path: path34,
79776
+ path: path35,
79667
79777
  mimeType: result.mimeType,
79668
79778
  cleanup: () => {
79669
79779
  try {
@@ -80820,11 +80930,11 @@ var HierarchicalSelectorComponent = class extends Container {
80820
80930
  // src/runtime/interactive-ui-helpers.ts
80821
80931
  function showHierarchicalMenu(host, initialPath = []) {
80822
80932
  const basePath = [...initialPath];
80823
- const showAtPath = (path34) => {
80933
+ const showAtPath = (path35) => {
80824
80934
  host.showSelector((done) => {
80825
80935
  const selector = new HierarchicalSelectorComponent({
80826
80936
  tree: commandTree,
80827
- path: path34,
80937
+ path: path35,
80828
80938
  basePath,
80829
80939
  onNavigate: (newPath) => {
80830
80940
  done();
@@ -80832,7 +80942,7 @@ function showHierarchicalMenu(host, initialPath = []) {
80832
80942
  },
80833
80943
  onSelect: async (selectedPath, node, searchArgs) => {
80834
80944
  if (node.handler) {
80835
- const args = searchArgs || (selectedPath.length > path34.length ? selectedPath.slice(path34.length).join(" ") : void 0);
80945
+ const args = searchArgs || (selectedPath.length > path35.length ? selectedPath.slice(path35.length).join(" ") : void 0);
80836
80946
  const commandPath = "/" + selectedPath.join("/");
80837
80947
  if (!args && host.isInteractiveCommand(commandPath)) {
80838
80948
  done();
@@ -81691,7 +81801,13 @@ async function handleDirectBash(host, command) {
81691
81801
  const { spawn: spawn5 } = await import("child_process");
81692
81802
  const child = spawn5(shellCommand.file, shellCommand.args, {
81693
81803
  cwd: process.cwd(),
81694
- env: process.env,
81804
+ // R5-P2: the interactive ! shell is a user-owned context — a pie
81805
+ // started inside it must resolve its OWN defaults, not the manager's
81806
+ // inherited model identity (same boundary as the bash tool).
81807
+ env: (() => {
81808
+ const { PIE_DEFAULT_PROVIDER: _p, PIE_DEFAULT_MODEL: _m, PIE_MANAGER_BOOTSTRAP: _b, PIE_PROC_CURATED_NAME: _c, ...cleanEnv } = process.env;
81809
+ return cleanEnv;
81810
+ })(),
81695
81811
  windowsHide: true
81696
81812
  });
81697
81813
  const output = new DirectBashOutputCollector();
@@ -82355,17 +82471,17 @@ async function loadInteractiveExtensions(host) {
82355
82471
  void host.editor.onSubmit(content);
82356
82472
  }
82357
82473
  },
82358
- attachLocalFile: async (path34, displayName) => {
82474
+ attachLocalFile: async (path35, displayName) => {
82359
82475
  const handler = host.attachmentMentionHandler?.();
82360
82476
  if (!handler) return false;
82361
- return handler.attachLocalFile(path34, displayName);
82477
+ return handler.attachLocalFile(path35, displayName);
82362
82478
  },
82363
82479
  beginUserInput: (isCurrent) => beginUserInput(host, isCurrent),
82364
- attachLocalFileAndSubmit: async (path34, displayName, submitText) => {
82480
+ attachLocalFileAndSubmit: async (path35, displayName, submitText) => {
82365
82481
  const scope = beginUserInput(host);
82366
82482
  if (!scope) return false;
82367
82483
  try {
82368
- return await scope.submit(submitText, [{ path: path34, displayName }]);
82484
+ return await scope.submit(submitText, [{ path: path35, displayName }]);
82369
82485
  } finally {
82370
82486
  scope.dispose();
82371
82487
  }
@@ -82487,8 +82603,8 @@ async function loadInteractiveExtensions(host) {
82487
82603
  host.extensionRunner.setUIContext(host.extensionUIContext);
82488
82604
  await restoreExtensionProviderCredentials(host.options.modelRegistry);
82489
82605
  if (process.env.PIE_VERBOSE) {
82490
- for (const { path: path34, error } of errors) {
82491
- console.error(`[Extension] Failed to load ${path34}: ${error}`);
82606
+ for (const { path: path35, error } of errors) {
82607
+ console.error(`[Extension] Failed to load ${path35}: ${error}`);
82492
82608
  }
82493
82609
  }
82494
82610
  const policyContext = () => ({
@@ -82965,7 +83081,7 @@ var InteractiveMode = class {
82965
83081
  async init() {
82966
83082
  const activeSession = this.sessionManager.getActiveSession();
82967
83083
  this.thinkingLevel = resolveInitialThinkingLevel({ session: activeSession, settingsManager: this.options.settingsManager });
82968
- const { Agent } = await import("./chunks/src-ODLT57PQ.js");
83084
+ const { Agent } = await import("./chunks/src-46R5ZFOU.js");
82969
83085
  this.agent = new Agent({
82970
83086
  initialState: {
82971
83087
  systemPrompt: this.buildSystemPrompt(),
@@ -83406,8 +83522,30 @@ var InteractiveMode = class {
83406
83522
 
83407
83523
  // src/app/runtime-composition.ts
83408
83524
  import { existsSync as existsSync17, mkdirSync as mkdirSync11 } from "fs";
83409
- import { randomUUID as randomUUID2 } from "crypto";
83525
+
83526
+ // src/app/manager-service-bootstrap.ts
83527
+ import * as fs28 from "fs";
83410
83528
  import * as path31 from "path";
83529
+ function applyManagerServiceBootstrapEnv() {
83530
+ if (process.env.PIE_PROC_CURATED_NAME !== "manager") return;
83531
+ if (process.env.PIE_MANAGER_BOOTSTRAP) return;
83532
+ try {
83533
+ const workspaceConfigPath = path31.join(process.cwd(), "config.json");
83534
+ const parsed = JSON.parse(fs28.readFileSync(workspaceConfigPath, "utf8"));
83535
+ const provider = typeof parsed.provider === "string" ? parsed.provider.trim() : "";
83536
+ const modelId = typeof parsed.modelId === "string" ? parsed.modelId.trim() : "";
83537
+ if (provider && modelId) {
83538
+ process.env.PIE_DEFAULT_PROVIDER = provider;
83539
+ process.env.PIE_DEFAULT_MODEL = modelId;
83540
+ process.env.PIE_MANAGER_BOOTSTRAP = "1";
83541
+ }
83542
+ } catch {
83543
+ }
83544
+ }
83545
+
83546
+ // src/app/runtime-composition.ts
83547
+ import { randomUUID as randomUUID2 } from "crypto";
83548
+ import * as path32 from "path";
83411
83549
  var CliMissingApiKeyError = class extends Error {
83412
83550
  constructor(message) {
83413
83551
  super(message);
@@ -83428,8 +83566,8 @@ var CliSessionResumeError = class extends Error {
83428
83566
  function getCliRuntimePaths() {
83429
83567
  const configDir = getConfigDir();
83430
83568
  const sessionsDir = getSessionsDir();
83431
- const skillsDir = path31.join(configDir, "skills");
83432
- const builtinSkillsDir = path31.join(getBuiltinDir(), "skills");
83569
+ const skillsDir = path32.join(configDir, "skills");
83570
+ const builtinSkillsDir = path32.join(getBuiltinDir(), "skills");
83433
83571
  return { configDir, sessionsDir, skillsDir, builtinSkillsDir };
83434
83572
  }
83435
83573
  function ensureCliRuntimePaths(paths = getCliRuntimePaths()) {
@@ -83459,6 +83597,7 @@ function createUnconfiguredModel() {
83459
83597
  async function composeCliRuntime(params) {
83460
83598
  const paths = ensureCliRuntimePaths(params.paths);
83461
83599
  const compositionTrace = createCliCompositionTrace();
83600
+ applyManagerServiceBootstrapEnv();
83462
83601
  const settingsManager = new SettingsManager();
83463
83602
  const authStorage = AuthStorage.fromStorage(new FileAuthStorageBackend());
83464
83603
  authStorage.setLegacyApiKey(settingsManager.getLegacyApiKey());
@@ -83549,7 +83688,7 @@ async function composeCliRuntime(params) {
83549
83688
  fileLogger.log("cli", `Using API key for provider ${provider}`, {
83550
83689
  keyPrefix: apiKey ? maskApiKey2(apiKey) : "none"
83551
83690
  });
83552
- const projectSkillsDir = path31.join(cwd, ".pie", "skills");
83691
+ const projectSkillsDir = path32.join(cwd, ".pie", "skills");
83553
83692
  const { skills: discoveredSkills, diagnostics } = loadSkills({
83554
83693
  dirs: buildSkillDirs({
83555
83694
  builtinDir: paths.builtinSkillsDir,
@@ -83868,7 +84007,7 @@ async function runPrintMode(params) {
83868
84007
  `);
83869
84008
  console.log("Assistant: ");
83870
84009
  }
83871
- const { Agent: AgentClass } = await import("./chunks/src-ODLT57PQ.js");
84010
+ const { Agent: AgentClass } = await import("./chunks/src-46R5ZFOU.js");
83872
84011
  let agent;
83873
84012
  const printModeExtensions = await loadPrintModeExtensions({
83874
84013
  cwd: runtime.cwd,
@@ -84453,7 +84592,7 @@ async function loadJsonModeExtensions(params) {
84453
84592
  // r17 P1: session naming on the resident host — im-forward's explicit
84454
84593
  // addressing escape hatch ("<session name>: text") reads the session
84455
84594
  // name; without these the json-events host returned undefined and a
84456
- // cold-started concierge had NO intake route at all (its route table is
84595
+ // cold-started manager had NO intake route at all (its route table is
84457
84596
  // empty until the first outbound forward, and --idle closes stdin —
84458
84597
  // every inbound IM message hit "no route; ignoring" until something
84459
84598
  // else happened to make the resident speak first).
@@ -84533,7 +84672,7 @@ async function loadJsonModeExtensions(params) {
84533
84672
  if (errors.length) {
84534
84673
  await runner.dispose("shutdown");
84535
84674
  throw new Error(
84536
- errors.map(({ path: path34, error }) => `${path34}: ${error}`).join("\n")
84675
+ errors.map(({ path: path35, error }) => `${path35}: ${error}`).join("\n")
84537
84676
  );
84538
84677
  }
84539
84678
  try {
@@ -85089,7 +85228,7 @@ async function runJsonEventsMode(params) {
85089
85228
  const sideTrace = trace;
85090
85229
  const sideApiKey = runtime.apiKey;
85091
85230
  const snapshot = structuredClone(parent.state.messages);
85092
- const { Agent: AgentClass } = await import("./chunks/src-ODLT57PQ.js");
85231
+ const { Agent: AgentClass } = await import("./chunks/src-46R5ZFOU.js");
85093
85232
  const sideAgent = new AgentClass({
85094
85233
  initialState: {
85095
85234
  systemPrompt: parent.state.systemPrompt,
@@ -85639,7 +85778,7 @@ async function runJsonEventsMode(params) {
85639
85778
  if (runtime.initialModel.unconfigured || controller) {
85640
85779
  return;
85641
85780
  }
85642
- const { Agent: AgentClass } = await import("./chunks/src-ODLT57PQ.js");
85781
+ const { Agent: AgentClass } = await import("./chunks/src-46R5ZFOU.js");
85643
85782
  if (runtimeClosing) return;
85644
85783
  const compositionRegistry = createCliHostEnvelopeRegistry();
85645
85784
  const jsonModeExtensions = await loadJsonModeExtensions({
@@ -86419,19 +86558,19 @@ async function runJsonEventsMode(params) {
86419
86558
  }
86420
86559
 
86421
86560
  // src/developer-instructions.ts
86422
- import * as fs28 from "fs";
86423
- import * as path32 from "path";
86561
+ import * as fs29 from "fs";
86562
+ import * as path33 from "path";
86424
86563
  var MAX_DEVELOPER_INSTRUCTIONS_CHARS = 64e3;
86425
86564
  function readTextFileBounded(filePath) {
86426
- const resolved = path32.resolve(filePath);
86427
- const stat2 = fs28.statSync(resolved);
86565
+ const resolved = path33.resolve(filePath);
86566
+ const stat2 = fs29.statSync(resolved);
86428
86567
  if (!stat2.isFile()) {
86429
86568
  throw new Error(`Developer instructions file is not a regular file: ${filePath}`);
86430
86569
  }
86431
86570
  if (stat2.size > MAX_DEVELOPER_INSTRUCTIONS_CHARS * 4) {
86432
86571
  throw new Error(`Developer instructions file is too large: ${filePath}`);
86433
86572
  }
86434
- return fs28.readFileSync(resolved, "utf8");
86573
+ return fs29.readFileSync(resolved, "utf8");
86435
86574
  }
86436
86575
  function collectFlagValues(args, flag) {
86437
86576
  const values = [];
@@ -86550,8 +86689,8 @@ var logError = (msg, err) => {
86550
86689
  const logPath = getRuntimeLogPath();
86551
86690
  const timestamp = (/* @__PURE__ */ new Date()).toISOString();
86552
86691
  const stack = err instanceof Error ? err.stack || "" : "";
86553
- fs29.mkdirSync(path33.dirname(logPath), { recursive: true });
86554
- fs29.appendFileSync(logPath, `[${timestamp}] ${msg}
86692
+ fs30.mkdirSync(path34.dirname(logPath), { recursive: true });
86693
+ fs30.appendFileSync(logPath, `[${timestamp}] ${msg}
86555
86694
  ${stack}
86556
86695
 
86557
86696
  `);
@@ -86566,7 +86705,7 @@ var STABLE_CLI_COMMANDS = {
86566
86705
  sessions: "sessions",
86567
86706
  extensions: "extensions",
86568
86707
  permissions: "permissions",
86569
- concierge: "concierge"
86708
+ manager: "manager"
86570
86709
  };
86571
86710
  async function runWithJsonEventsConsoleIsolation(fn) {
86572
86711
  const originalLog = console.log;
@@ -86586,7 +86725,7 @@ async function runWithJsonEventsConsoleIsolation(fn) {
86586
86725
  }
86587
86726
  async function createCliTestStreamFnFromEnv() {
86588
86727
  if (!process.env.PIE_TEST_MOCK_STREAM_SEQUENCE) return void 0;
86589
- return (await import("./chunks/test-stream-GIUD5JWS.js")).createTestStreamFnFromSequenceEnv();
86728
+ return (await import("./chunks/test-stream-FC6ZRENI.js")).createTestStreamFnFromSequenceEnv();
86590
86729
  }
86591
86730
  function resolveJsonEventsDetailFlag() {
86592
86731
  for (let index = 0; index < process.argv.length; index += 1) {
@@ -86781,10 +86920,10 @@ async function main() {
86781
86920
  await runMemoryCommand(args.slice(1));
86782
86921
  return;
86783
86922
  }
86784
- if (args[0] === STABLE_CLI_COMMANDS.concierge) {
86785
- const { runConciergeCommand } = await import("./chunks/concierge-cli-MCHXTFBA.js");
86923
+ if (args[0] === STABLE_CLI_COMMANDS.manager) {
86924
+ const { runManagerCommand } = await import("./chunks/manager-cli-QNMCCIFG.js");
86786
86925
  try {
86787
- await runConciergeCommand(args.slice(1));
86926
+ await runManagerCommand(args.slice(1));
86788
86927
  } catch (error) {
86789
86928
  console.error(error instanceof Error ? error.message : String(error));
86790
86929
  process.exitCode = 1;