zooid 0.7.0 → 0.7.2

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.
@@ -101,9 +101,9 @@ var require_main = __commonJS({
101
101
  }
102
102
  });
103
103
 
104
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
104
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
105
105
  var require_code = __commonJS({
106
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(exports) {
106
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(exports) {
107
107
  "use strict";
108
108
  Object.defineProperty(exports, "__esModule", { value: true });
109
109
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
@@ -255,9 +255,9 @@ var require_code = __commonJS({
255
255
  }
256
256
  });
257
257
 
258
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
258
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
259
259
  var require_scope = __commonJS({
260
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
260
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
261
261
  "use strict";
262
262
  Object.defineProperty(exports, "__esModule", { value: true });
263
263
  exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
@@ -400,9 +400,9 @@ var require_scope = __commonJS({
400
400
  }
401
401
  });
402
402
 
403
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
403
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
404
404
  var require_codegen = __commonJS({
405
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(exports) {
405
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(exports) {
406
406
  "use strict";
407
407
  Object.defineProperty(exports, "__esModule", { value: true });
408
408
  exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
@@ -1120,9 +1120,9 @@ var require_codegen = __commonJS({
1120
1120
  }
1121
1121
  });
1122
1122
 
1123
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
1123
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
1124
1124
  var require_util = __commonJS({
1125
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(exports) {
1125
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(exports) {
1126
1126
  "use strict";
1127
1127
  Object.defineProperty(exports, "__esModule", { value: true });
1128
1128
  exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
@@ -1287,9 +1287,9 @@ var require_util = __commonJS({
1287
1287
  }
1288
1288
  });
1289
1289
 
1290
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
1290
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
1291
1291
  var require_names = __commonJS({
1292
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(exports) {
1292
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(exports) {
1293
1293
  "use strict";
1294
1294
  Object.defineProperty(exports, "__esModule", { value: true });
1295
1295
  var codegen_1 = require_codegen();
@@ -1326,9 +1326,9 @@ var require_names = __commonJS({
1326
1326
  }
1327
1327
  });
1328
1328
 
1329
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
1329
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
1330
1330
  var require_errors = __commonJS({
1331
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(exports) {
1331
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(exports) {
1332
1332
  "use strict";
1333
1333
  Object.defineProperty(exports, "__esModule", { value: true });
1334
1334
  exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
@@ -1448,9 +1448,9 @@ var require_errors = __commonJS({
1448
1448
  }
1449
1449
  });
1450
1450
 
1451
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
1451
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
1452
1452
  var require_boolSchema = __commonJS({
1453
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
1453
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
1454
1454
  "use strict";
1455
1455
  Object.defineProperty(exports, "__esModule", { value: true });
1456
1456
  exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
@@ -1499,9 +1499,9 @@ var require_boolSchema = __commonJS({
1499
1499
  }
1500
1500
  });
1501
1501
 
1502
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
1502
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
1503
1503
  var require_rules = __commonJS({
1504
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(exports) {
1504
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(exports) {
1505
1505
  "use strict";
1506
1506
  Object.defineProperty(exports, "__esModule", { value: true });
1507
1507
  exports.getRules = exports.isJSONType = void 0;
@@ -1530,9 +1530,9 @@ var require_rules = __commonJS({
1530
1530
  }
1531
1531
  });
1532
1532
 
1533
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
1533
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
1534
1534
  var require_applicability = __commonJS({
1535
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
1535
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
1536
1536
  "use strict";
1537
1537
  Object.defineProperty(exports, "__esModule", { value: true });
1538
1538
  exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
@@ -1553,9 +1553,9 @@ var require_applicability = __commonJS({
1553
1553
  }
1554
1554
  });
1555
1555
 
1556
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
1556
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
1557
1557
  var require_dataType = __commonJS({
1558
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
1558
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
1559
1559
  "use strict";
1560
1560
  Object.defineProperty(exports, "__esModule", { value: true });
1561
1561
  exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
@@ -1737,9 +1737,9 @@ var require_dataType = __commonJS({
1737
1737
  }
1738
1738
  });
1739
1739
 
1740
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
1740
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
1741
1741
  var require_defaults = __commonJS({
1742
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
1742
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
1743
1743
  "use strict";
1744
1744
  Object.defineProperty(exports, "__esModule", { value: true });
1745
1745
  exports.assignDefaults = void 0;
@@ -1774,9 +1774,9 @@ var require_defaults = __commonJS({
1774
1774
  }
1775
1775
  });
1776
1776
 
1777
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
1777
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
1778
1778
  var require_code2 = __commonJS({
1779
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(exports) {
1779
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(exports) {
1780
1780
  "use strict";
1781
1781
  Object.defineProperty(exports, "__esModule", { value: true });
1782
1782
  exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
@@ -1907,9 +1907,9 @@ var require_code2 = __commonJS({
1907
1907
  }
1908
1908
  });
1909
1909
 
1910
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
1910
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
1911
1911
  var require_keyword = __commonJS({
1912
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
1912
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
1913
1913
  "use strict";
1914
1914
  Object.defineProperty(exports, "__esModule", { value: true });
1915
1915
  exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
@@ -2025,9 +2025,9 @@ var require_keyword = __commonJS({
2025
2025
  }
2026
2026
  });
2027
2027
 
2028
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
2028
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
2029
2029
  var require_subschema = __commonJS({
2030
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
2030
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
2031
2031
  "use strict";
2032
2032
  Object.defineProperty(exports, "__esModule", { value: true });
2033
2033
  exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
@@ -2108,9 +2108,9 @@ var require_subschema = __commonJS({
2108
2108
  }
2109
2109
  });
2110
2110
 
2111
- // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
2111
+ // ../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
2112
2112
  var require_fast_deep_equal = __commonJS({
2113
- "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
2113
+ "../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
2114
2114
  "use strict";
2115
2115
  module.exports = function equal(a, b) {
2116
2116
  if (a === b) return true;
@@ -2143,9 +2143,9 @@ var require_fast_deep_equal = __commonJS({
2143
2143
  }
2144
2144
  });
2145
2145
 
2146
- // ../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js
2146
+ // ../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js
2147
2147
  var require_json_schema_traverse = __commonJS({
2148
- "../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports, module) {
2148
+ "../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports, module) {
2149
2149
  "use strict";
2150
2150
  var traverse = module.exports = function(schema, opts, cb) {
2151
2151
  if (typeof opts == "function") {
@@ -2231,9 +2231,9 @@ var require_json_schema_traverse = __commonJS({
2231
2231
  }
2232
2232
  });
2233
2233
 
2234
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
2234
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
2235
2235
  var require_resolve = __commonJS({
2236
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(exports) {
2236
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(exports) {
2237
2237
  "use strict";
2238
2238
  Object.defineProperty(exports, "__esModule", { value: true });
2239
2239
  exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
@@ -2387,9 +2387,9 @@ var require_resolve = __commonJS({
2387
2387
  }
2388
2388
  });
2389
2389
 
2390
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
2390
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
2391
2391
  var require_validate = __commonJS({
2392
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(exports) {
2392
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(exports) {
2393
2393
  "use strict";
2394
2394
  Object.defineProperty(exports, "__esModule", { value: true });
2395
2395
  exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
@@ -2895,9 +2895,9 @@ var require_validate = __commonJS({
2895
2895
  }
2896
2896
  });
2897
2897
 
2898
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
2898
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
2899
2899
  var require_validation_error = __commonJS({
2900
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(exports) {
2900
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(exports) {
2901
2901
  "use strict";
2902
2902
  Object.defineProperty(exports, "__esModule", { value: true });
2903
2903
  var ValidationError = class extends Error {
@@ -2911,9 +2911,9 @@ var require_validation_error = __commonJS({
2911
2911
  }
2912
2912
  });
2913
2913
 
2914
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
2914
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
2915
2915
  var require_ref_error = __commonJS({
2916
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(exports) {
2916
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(exports) {
2917
2917
  "use strict";
2918
2918
  Object.defineProperty(exports, "__esModule", { value: true });
2919
2919
  var resolve_1 = require_resolve();
@@ -2928,9 +2928,9 @@ var require_ref_error = __commonJS({
2928
2928
  }
2929
2929
  });
2930
2930
 
2931
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
2931
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
2932
2932
  var require_compile = __commonJS({
2933
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(exports) {
2933
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(exports) {
2934
2934
  "use strict";
2935
2935
  Object.defineProperty(exports, "__esModule", { value: true });
2936
2936
  exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
@@ -3152,9 +3152,9 @@ var require_compile = __commonJS({
3152
3152
  }
3153
3153
  });
3154
3154
 
3155
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
3155
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
3156
3156
  var require_data = __commonJS({
3157
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(exports, module) {
3157
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(exports, module) {
3158
3158
  module.exports = {
3159
3159
  $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
3160
3160
  description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
@@ -3171,9 +3171,9 @@ var require_data = __commonJS({
3171
3171
  }
3172
3172
  });
3173
3173
 
3174
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
3174
+ // ../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
3175
3175
  var require_utils = __commonJS({
3176
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
3176
+ "../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
3177
3177
  "use strict";
3178
3178
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3179
3179
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3484,9 +3484,9 @@ var require_utils = __commonJS({
3484
3484
  }
3485
3485
  });
3486
3486
 
3487
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
3487
+ // ../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
3488
3488
  var require_schemes = __commonJS({
3489
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3489
+ "../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3490
3490
  "use strict";
3491
3491
  var { isUUID } = require_utils();
3492
3492
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3694,9 +3694,9 @@ var require_schemes = __commonJS({
3694
3694
  }
3695
3695
  });
3696
3696
 
3697
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
3697
+ // ../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
3698
3698
  var require_fast_uri = __commonJS({
3699
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(exports, module) {
3699
+ "../../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(exports, module) {
3700
3700
  "use strict";
3701
3701
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3702
3702
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3980,9 +3980,9 @@ var require_fast_uri = __commonJS({
3980
3980
  }
3981
3981
  });
3982
3982
 
3983
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
3983
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
3984
3984
  var require_uri = __commonJS({
3985
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(exports) {
3985
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(exports) {
3986
3986
  "use strict";
3987
3987
  Object.defineProperty(exports, "__esModule", { value: true });
3988
3988
  var uri = require_fast_uri();
@@ -3991,9 +3991,9 @@ var require_uri = __commonJS({
3991
3991
  }
3992
3992
  });
3993
3993
 
3994
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
3994
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
3995
3995
  var require_core = __commonJS({
3996
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(exports) {
3996
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(exports) {
3997
3997
  "use strict";
3998
3998
  Object.defineProperty(exports, "__esModule", { value: true });
3999
3999
  exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
@@ -4602,9 +4602,9 @@ var require_core = __commonJS({
4602
4602
  }
4603
4603
  });
4604
4604
 
4605
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
4605
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
4606
4606
  var require_id = __commonJS({
4607
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
4607
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
4608
4608
  "use strict";
4609
4609
  Object.defineProperty(exports, "__esModule", { value: true });
4610
4610
  var def = {
@@ -4617,9 +4617,9 @@ var require_id = __commonJS({
4617
4617
  }
4618
4618
  });
4619
4619
 
4620
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
4620
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
4621
4621
  var require_ref = __commonJS({
4622
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
4622
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
4623
4623
  "use strict";
4624
4624
  Object.defineProperty(exports, "__esModule", { value: true });
4625
4625
  exports.callRef = exports.getValidate = void 0;
@@ -4739,9 +4739,9 @@ var require_ref = __commonJS({
4739
4739
  }
4740
4740
  });
4741
4741
 
4742
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
4742
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
4743
4743
  var require_core2 = __commonJS({
4744
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
4744
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
4745
4745
  "use strict";
4746
4746
  Object.defineProperty(exports, "__esModule", { value: true });
4747
4747
  var id_1 = require_id();
@@ -4760,9 +4760,9 @@ var require_core2 = __commonJS({
4760
4760
  }
4761
4761
  });
4762
4762
 
4763
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4763
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4764
4764
  var require_limitNumber = __commonJS({
4765
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
4765
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
4766
4766
  "use strict";
4767
4767
  Object.defineProperty(exports, "__esModule", { value: true });
4768
4768
  var codegen_1 = require_codegen();
@@ -4792,9 +4792,9 @@ var require_limitNumber = __commonJS({
4792
4792
  }
4793
4793
  });
4794
4794
 
4795
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4795
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4796
4796
  var require_multipleOf = __commonJS({
4797
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
4797
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
4798
4798
  "use strict";
4799
4799
  Object.defineProperty(exports, "__esModule", { value: true });
4800
4800
  var codegen_1 = require_codegen();
@@ -4820,9 +4820,9 @@ var require_multipleOf = __commonJS({
4820
4820
  }
4821
4821
  });
4822
4822
 
4823
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
4823
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
4824
4824
  var require_ucs2length = __commonJS({
4825
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
4825
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
4826
4826
  "use strict";
4827
4827
  Object.defineProperty(exports, "__esModule", { value: true });
4828
4828
  function ucs2length(str) {
@@ -4846,9 +4846,9 @@ var require_ucs2length = __commonJS({
4846
4846
  }
4847
4847
  });
4848
4848
 
4849
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
4849
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
4850
4850
  var require_limitLength = __commonJS({
4851
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
4851
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
4852
4852
  "use strict";
4853
4853
  Object.defineProperty(exports, "__esModule", { value: true });
4854
4854
  var codegen_1 = require_codegen();
@@ -4878,9 +4878,9 @@ var require_limitLength = __commonJS({
4878
4878
  }
4879
4879
  });
4880
4880
 
4881
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
4881
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
4882
4882
  var require_pattern = __commonJS({
4883
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
4883
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
4884
4884
  "use strict";
4885
4885
  Object.defineProperty(exports, "__esModule", { value: true });
4886
4886
  var code_1 = require_code2();
@@ -4915,9 +4915,9 @@ var require_pattern = __commonJS({
4915
4915
  }
4916
4916
  });
4917
4917
 
4918
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4918
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4919
4919
  var require_limitProperties = __commonJS({
4920
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
4920
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
4921
4921
  "use strict";
4922
4922
  Object.defineProperty(exports, "__esModule", { value: true });
4923
4923
  var codegen_1 = require_codegen();
@@ -4944,9 +4944,9 @@ var require_limitProperties = __commonJS({
4944
4944
  }
4945
4945
  });
4946
4946
 
4947
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
4947
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
4948
4948
  var require_required = __commonJS({
4949
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
4949
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
4950
4950
  "use strict";
4951
4951
  Object.defineProperty(exports, "__esModule", { value: true });
4952
4952
  var code_1 = require_code2();
@@ -5026,9 +5026,9 @@ var require_required = __commonJS({
5026
5026
  }
5027
5027
  });
5028
5028
 
5029
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
5029
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
5030
5030
  var require_limitItems = __commonJS({
5031
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
5031
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
5032
5032
  "use strict";
5033
5033
  Object.defineProperty(exports, "__esModule", { value: true });
5034
5034
  var codegen_1 = require_codegen();
@@ -5055,9 +5055,9 @@ var require_limitItems = __commonJS({
5055
5055
  }
5056
5056
  });
5057
5057
 
5058
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
5058
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
5059
5059
  var require_equal = __commonJS({
5060
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports) {
5060
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports) {
5061
5061
  "use strict";
5062
5062
  Object.defineProperty(exports, "__esModule", { value: true });
5063
5063
  var equal = require_fast_deep_equal();
@@ -5066,9 +5066,9 @@ var require_equal = __commonJS({
5066
5066
  }
5067
5067
  });
5068
5068
 
5069
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
5069
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
5070
5070
  var require_uniqueItems = __commonJS({
5071
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
5071
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
5072
5072
  "use strict";
5073
5073
  Object.defineProperty(exports, "__esModule", { value: true });
5074
5074
  var dataType_1 = require_dataType();
@@ -5133,9 +5133,9 @@ var require_uniqueItems = __commonJS({
5133
5133
  }
5134
5134
  });
5135
5135
 
5136
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
5136
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
5137
5137
  var require_const = __commonJS({
5138
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
5138
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
5139
5139
  "use strict";
5140
5140
  Object.defineProperty(exports, "__esModule", { value: true });
5141
5141
  var codegen_1 = require_codegen();
@@ -5162,9 +5162,9 @@ var require_const = __commonJS({
5162
5162
  }
5163
5163
  });
5164
5164
 
5165
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
5165
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
5166
5166
  var require_enum = __commonJS({
5167
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
5167
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
5168
5168
  "use strict";
5169
5169
  Object.defineProperty(exports, "__esModule", { value: true });
5170
5170
  var codegen_1 = require_codegen();
@@ -5211,9 +5211,9 @@ var require_enum = __commonJS({
5211
5211
  }
5212
5212
  });
5213
5213
 
5214
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
5214
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
5215
5215
  var require_validation = __commonJS({
5216
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
5216
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
5217
5217
  "use strict";
5218
5218
  Object.defineProperty(exports, "__esModule", { value: true });
5219
5219
  var limitNumber_1 = require_limitNumber();
@@ -5249,9 +5249,9 @@ var require_validation = __commonJS({
5249
5249
  }
5250
5250
  });
5251
5251
 
5252
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5252
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5253
5253
  var require_additionalItems = __commonJS({
5254
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
5254
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
5255
5255
  "use strict";
5256
5256
  Object.defineProperty(exports, "__esModule", { value: true });
5257
5257
  exports.validateAdditionalItems = void 0;
@@ -5302,9 +5302,9 @@ var require_additionalItems = __commonJS({
5302
5302
  }
5303
5303
  });
5304
5304
 
5305
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
5305
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
5306
5306
  var require_items = __commonJS({
5307
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
5307
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
5308
5308
  "use strict";
5309
5309
  Object.defineProperty(exports, "__esModule", { value: true });
5310
5310
  exports.validateTuple = void 0;
@@ -5359,9 +5359,9 @@ var require_items = __commonJS({
5359
5359
  }
5360
5360
  });
5361
5361
 
5362
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5362
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5363
5363
  var require_prefixItems = __commonJS({
5364
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
5364
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
5365
5365
  "use strict";
5366
5366
  Object.defineProperty(exports, "__esModule", { value: true });
5367
5367
  var items_1 = require_items();
@@ -5376,9 +5376,9 @@ var require_prefixItems = __commonJS({
5376
5376
  }
5377
5377
  });
5378
5378
 
5379
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
5379
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
5380
5380
  var require_items2020 = __commonJS({
5381
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
5381
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
5382
5382
  "use strict";
5383
5383
  Object.defineProperty(exports, "__esModule", { value: true });
5384
5384
  var codegen_1 = require_codegen();
@@ -5411,9 +5411,9 @@ var require_items2020 = __commonJS({
5411
5411
  }
5412
5412
  });
5413
5413
 
5414
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
5414
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
5415
5415
  var require_contains = __commonJS({
5416
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
5416
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
5417
5417
  "use strict";
5418
5418
  Object.defineProperty(exports, "__esModule", { value: true });
5419
5419
  var codegen_1 = require_codegen();
@@ -5505,9 +5505,9 @@ var require_contains = __commonJS({
5505
5505
  }
5506
5506
  });
5507
5507
 
5508
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5508
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5509
5509
  var require_dependencies = __commonJS({
5510
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
5510
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
5511
5511
  "use strict";
5512
5512
  Object.defineProperty(exports, "__esModule", { value: true });
5513
5513
  exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
@@ -5599,9 +5599,9 @@ var require_dependencies = __commonJS({
5599
5599
  }
5600
5600
  });
5601
5601
 
5602
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5602
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5603
5603
  var require_propertyNames = __commonJS({
5604
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
5604
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
5605
5605
  "use strict";
5606
5606
  Object.defineProperty(exports, "__esModule", { value: true });
5607
5607
  var codegen_1 = require_codegen();
@@ -5642,9 +5642,9 @@ var require_propertyNames = __commonJS({
5642
5642
  }
5643
5643
  });
5644
5644
 
5645
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5645
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5646
5646
  var require_additionalProperties = __commonJS({
5647
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
5647
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
5648
5648
  "use strict";
5649
5649
  Object.defineProperty(exports, "__esModule", { value: true });
5650
5650
  var code_1 = require_code2();
@@ -5748,9 +5748,9 @@ var require_additionalProperties = __commonJS({
5748
5748
  }
5749
5749
  });
5750
5750
 
5751
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
5751
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
5752
5752
  var require_properties = __commonJS({
5753
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
5753
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
5754
5754
  "use strict";
5755
5755
  Object.defineProperty(exports, "__esModule", { value: true });
5756
5756
  var validate_1 = require_validate();
@@ -5806,9 +5806,9 @@ var require_properties = __commonJS({
5806
5806
  }
5807
5807
  });
5808
5808
 
5809
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
5809
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
5810
5810
  var require_patternProperties = __commonJS({
5811
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
5811
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
5812
5812
  "use strict";
5813
5813
  Object.defineProperty(exports, "__esModule", { value: true });
5814
5814
  var code_1 = require_code2();
@@ -5880,9 +5880,9 @@ var require_patternProperties = __commonJS({
5880
5880
  }
5881
5881
  });
5882
5882
 
5883
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
5883
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
5884
5884
  var require_not = __commonJS({
5885
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
5885
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
5886
5886
  "use strict";
5887
5887
  Object.defineProperty(exports, "__esModule", { value: true });
5888
5888
  var util_1 = require_util();
@@ -5911,9 +5911,9 @@ var require_not = __commonJS({
5911
5911
  }
5912
5912
  });
5913
5913
 
5914
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
5914
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
5915
5915
  var require_anyOf = __commonJS({
5916
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
5916
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
5917
5917
  "use strict";
5918
5918
  Object.defineProperty(exports, "__esModule", { value: true });
5919
5919
  var code_1 = require_code2();
@@ -5928,9 +5928,9 @@ var require_anyOf = __commonJS({
5928
5928
  }
5929
5929
  });
5930
5930
 
5931
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
5931
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
5932
5932
  var require_oneOf = __commonJS({
5933
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
5933
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
5934
5934
  "use strict";
5935
5935
  Object.defineProperty(exports, "__esModule", { value: true });
5936
5936
  var codegen_1 = require_codegen();
@@ -5986,9 +5986,9 @@ var require_oneOf = __commonJS({
5986
5986
  }
5987
5987
  });
5988
5988
 
5989
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
5989
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
5990
5990
  var require_allOf = __commonJS({
5991
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
5991
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
5992
5992
  "use strict";
5993
5993
  Object.defineProperty(exports, "__esModule", { value: true });
5994
5994
  var util_1 = require_util();
@@ -6013,9 +6013,9 @@ var require_allOf = __commonJS({
6013
6013
  }
6014
6014
  });
6015
6015
 
6016
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
6016
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
6017
6017
  var require_if = __commonJS({
6018
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
6018
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
6019
6019
  "use strict";
6020
6020
  Object.defineProperty(exports, "__esModule", { value: true });
6021
6021
  var codegen_1 = require_codegen();
@@ -6082,9 +6082,9 @@ var require_if = __commonJS({
6082
6082
  }
6083
6083
  });
6084
6084
 
6085
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
6085
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
6086
6086
  var require_thenElse = __commonJS({
6087
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
6087
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
6088
6088
  "use strict";
6089
6089
  Object.defineProperty(exports, "__esModule", { value: true });
6090
6090
  var util_1 = require_util();
@@ -6100,9 +6100,9 @@ var require_thenElse = __commonJS({
6100
6100
  }
6101
6101
  });
6102
6102
 
6103
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
6103
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
6104
6104
  var require_applicator = __commonJS({
6105
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
6105
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
6106
6106
  "use strict";
6107
6107
  Object.defineProperty(exports, "__esModule", { value: true });
6108
6108
  var additionalItems_1 = require_additionalItems();
@@ -6148,9 +6148,9 @@ var require_applicator = __commonJS({
6148
6148
  }
6149
6149
  });
6150
6150
 
6151
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
6151
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
6152
6152
  var require_format = __commonJS({
6153
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
6153
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
6154
6154
  "use strict";
6155
6155
  Object.defineProperty(exports, "__esModule", { value: true });
6156
6156
  var codegen_1 = require_codegen();
@@ -6238,9 +6238,9 @@ var require_format = __commonJS({
6238
6238
  }
6239
6239
  });
6240
6240
 
6241
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
6241
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
6242
6242
  var require_format2 = __commonJS({
6243
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
6243
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
6244
6244
  "use strict";
6245
6245
  Object.defineProperty(exports, "__esModule", { value: true });
6246
6246
  var format_1 = require_format();
@@ -6249,9 +6249,9 @@ var require_format2 = __commonJS({
6249
6249
  }
6250
6250
  });
6251
6251
 
6252
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
6252
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
6253
6253
  var require_metadata = __commonJS({
6254
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
6254
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
6255
6255
  "use strict";
6256
6256
  Object.defineProperty(exports, "__esModule", { value: true });
6257
6257
  exports.contentVocabulary = exports.metadataVocabulary = void 0;
@@ -6272,9 +6272,9 @@ var require_metadata = __commonJS({
6272
6272
  }
6273
6273
  });
6274
6274
 
6275
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
6275
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
6276
6276
  var require_draft7 = __commonJS({
6277
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
6277
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
6278
6278
  "use strict";
6279
6279
  Object.defineProperty(exports, "__esModule", { value: true });
6280
6280
  var core_1 = require_core2();
@@ -6294,9 +6294,9 @@ var require_draft7 = __commonJS({
6294
6294
  }
6295
6295
  });
6296
6296
 
6297
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
6297
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
6298
6298
  var require_types = __commonJS({
6299
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
6299
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
6300
6300
  "use strict";
6301
6301
  Object.defineProperty(exports, "__esModule", { value: true });
6302
6302
  exports.DiscrError = void 0;
@@ -6308,9 +6308,9 @@ var require_types = __commonJS({
6308
6308
  }
6309
6309
  });
6310
6310
 
6311
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
6311
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
6312
6312
  var require_discriminator = __commonJS({
6313
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
6313
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
6314
6314
  "use strict";
6315
6315
  Object.defineProperty(exports, "__esModule", { value: true });
6316
6316
  var codegen_1 = require_codegen();
@@ -6413,9 +6413,9 @@ var require_discriminator = __commonJS({
6413
6413
  }
6414
6414
  });
6415
6415
 
6416
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
6416
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
6417
6417
  var require_json_schema_draft_07 = __commonJS({
6418
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
6418
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
6419
6419
  module.exports = {
6420
6420
  $schema: "http://json-schema.org/draft-07/schema#",
6421
6421
  $id: "http://json-schema.org/draft-07/schema#",
@@ -6570,9 +6570,9 @@ var require_json_schema_draft_07 = __commonJS({
6570
6570
  }
6571
6571
  });
6572
6572
 
6573
- // ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
6573
+ // ../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
6574
6574
  var require_ajv = __commonJS({
6575
- "../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports, module) {
6575
+ "../../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports, module) {
6576
6576
  "use strict";
6577
6577
  Object.defineProperty(exports, "__esModule", { value: true });
6578
6578
  exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
@@ -6640,9 +6640,9 @@ var require_ajv = __commonJS({
6640
6640
  }
6641
6641
  });
6642
6642
 
6643
- // ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js
6643
+ // ../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js
6644
6644
  var require_formats = __commonJS({
6645
- "../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js"(exports) {
6645
+ "../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/formats.js"(exports) {
6646
6646
  "use strict";
6647
6647
  Object.defineProperty(exports, "__esModule", { value: true });
6648
6648
  exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
@@ -6843,9 +6843,9 @@ var require_formats = __commonJS({
6843
6843
  }
6844
6844
  });
6845
6845
 
6846
- // ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js
6846
+ // ../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js
6847
6847
  var require_limit = __commonJS({
6848
- "../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js"(exports) {
6848
+ "../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/limit.js"(exports) {
6849
6849
  "use strict";
6850
6850
  Object.defineProperty(exports, "__esModule", { value: true });
6851
6851
  exports.formatLimitDefinition = void 0;
@@ -6915,9 +6915,9 @@ var require_limit = __commonJS({
6915
6915
  }
6916
6916
  });
6917
6917
 
6918
- // ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js
6918
+ // ../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js
6919
6919
  var require_dist = __commonJS({
6920
- "../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js"(exports, module) {
6920
+ "../../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.20.0/node_modules/ajv-formats/dist/index.js"(exports, module) {
6921
6921
  "use strict";
6922
6922
  Object.defineProperty(exports, "__esModule", { value: true });
6923
6923
  var formats_1 = require_formats();
@@ -6957,6 +6957,9 @@ var require_dist = __commonJS({
6957
6957
  }
6958
6958
  });
6959
6959
 
6960
+ // src/build-registry.ts
6961
+ import { isAbsolute as isAbsolute2, resolve as pathResolve3 } from "path";
6962
+
6960
6963
  // ../runtime-local/src/local-acp.ts
6961
6964
  import { spawn } from "child_process";
6962
6965
  var LocalAcpRuntime = class {
@@ -7009,7 +7012,7 @@ var DockerAcpRuntime = class {
7009
7012
 
7010
7013
  // ../core/src/config.ts
7011
7014
  import { existsSync } from "fs";
7012
- import { join as join2 } from "path";
7015
+ import { isAbsolute, join as join2, resolve as pathResolve2 } from "path";
7013
7016
  import { parse as parse3 } from "yaml";
7014
7017
 
7015
7018
  // ../acp-client/src/acp-client.ts
@@ -23251,27 +23254,80 @@ var JsonFileSessionStore = class {
23251
23254
 
23252
23255
  // ../acp-client/src/presets.ts
23253
23256
  var PRESETS_INTERNAL = {
23254
- opencode: { command: "opencode", args: ["acp"] },
23257
+ opencode: {
23258
+ command: "opencode",
23259
+ args: ["acp"],
23260
+ image: "ghcr.io/zooid-ai/agent-opencode:latest",
23261
+ mounts: (ctx) => [
23262
+ {
23263
+ id: "data",
23264
+ host: `${ctx.daemonHome}/.local/share/opencode`,
23265
+ target: "/root/.local/share/opencode",
23266
+ mode: "rw",
23267
+ create: false
23268
+ },
23269
+ {
23270
+ id: "config",
23271
+ host: `${ctx.daemonHome}/.config/opencode`,
23272
+ target: "/root/.config/opencode",
23273
+ mode: "rw",
23274
+ create: false
23275
+ }
23276
+ ]
23277
+ },
23255
23278
  cline: { command: "cline", args: ["--acp"] },
23256
23279
  kiro: { command: "kiro", args: ["--acp"] },
23257
23280
  gemini: { command: "gemini", args: ["--acp"] },
23258
- claude: { command: "npx", args: ["-y", "@agentclientprotocol/claude-agent-acp"] },
23259
- codex: { command: "npx", args: ["-y", "@zed-industries/codex-acp"] }
23281
+ claude: {
23282
+ command: "npx",
23283
+ args: ["-y", "@agentclientprotocol/claude-agent-acp"],
23284
+ image: "ghcr.io/zooid-ai/agent-claude-code:latest",
23285
+ mounts: (ctx) => [
23286
+ {
23287
+ id: "home",
23288
+ host: `${ctx.daemonHome}/.claude`,
23289
+ target: "/root/.claude",
23290
+ mode: "rw",
23291
+ create: false
23292
+ }
23293
+ ]
23294
+ },
23295
+ codex: {
23296
+ command: "npx",
23297
+ // web_search="live" forces live web fetches instead of codex's cached snippet
23298
+ // index, which doesn't know about recently-launched sites (e.g. zooid.dev).
23299
+ args: ["-y", "@zed-industries/codex-acp", "-c", 'web_search="live"'],
23300
+ image: "ghcr.io/zooid-ai/agent-codex:latest",
23301
+ mounts: (ctx) => [
23302
+ {
23303
+ id: "home",
23304
+ host: `${ctx.daemonHome}/.codex`,
23305
+ target: "/root/.codex",
23306
+ mode: "rw",
23307
+ create: false
23308
+ }
23309
+ ]
23310
+ }
23260
23311
  };
23261
23312
  var PRESETS = Object.freeze(
23262
23313
  Object.fromEntries(
23263
- Object.keys(PRESETS_INTERNAL).map((k) => [
23264
- k,
23265
- { command: PRESETS_INTERNAL[k].command, args: [...PRESETS_INTERNAL[k].args] }
23266
- ])
23314
+ Object.keys(PRESETS_INTERNAL).map((k) => {
23315
+ const e = PRESETS_INTERNAL[k];
23316
+ const copy = { command: e.command, args: [...e.args] };
23317
+ if ("image" in e && e.image) copy.image = e.image;
23318
+ if ("mounts" in e && typeof e.mounts === "function") {
23319
+ copy.mounts = e.mounts;
23320
+ }
23321
+ return [k, copy];
23322
+ })
23267
23323
  )
23268
23324
  );
23269
23325
  function isPreset(name) {
23270
23326
  return Object.prototype.hasOwnProperty.call(PRESETS_INTERNAL, name);
23271
23327
  }
23272
- var MODEL_FLAG_PER_PRESET = {
23273
- claude: "--model",
23274
- codex: "--model",
23328
+ var MODEL_ARGS_PER_PRESET = {
23329
+ claude: (m) => ["--model", m],
23330
+ codex: (m) => ["-c", `model="${m.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`],
23275
23331
  opencode: null
23276
23332
  };
23277
23333
  function resolvePreset(name, opts = {}) {
@@ -23282,8 +23338,8 @@ function resolvePreset(name, opts = {}) {
23282
23338
  const entry = PRESETS_INTERNAL[name];
23283
23339
  const args = [...entry.args];
23284
23340
  if (opts.model !== void 0) {
23285
- const flag = MODEL_FLAG_PER_PRESET[name];
23286
- if (flag) args.push(flag, opts.model);
23341
+ const builder = MODEL_ARGS_PER_PRESET[name];
23342
+ if (builder) args.push(...builder(opts.model));
23287
23343
  }
23288
23344
  return { command: entry.command, args };
23289
23345
  }
@@ -23394,6 +23450,44 @@ var TurnTracker = class {
23394
23450
  }
23395
23451
  };
23396
23452
 
23453
+ // ../acp-client/src/errors.ts
23454
+ var PROTOCOL_CODES = /* @__PURE__ */ new Set([-32700, -32600, -32601, -32602]);
23455
+ function classify(err) {
23456
+ if (err instanceof RequestError) {
23457
+ const acp_error = { code: err.code, message: err.message, data: err.data };
23458
+ if (PROTOCOL_CODES.has(err.code)) return { code: "acp_protocol", transient: false, acp_error };
23459
+ if (err.code === -32603) return { code: "internal", transient: false, acp_error };
23460
+ if (err.code === -32002) return { code: "auth_missing", transient: false, acp_error };
23461
+ const m = err.message;
23462
+ if (/^auth(entication)? required$/i.test(m)) {
23463
+ return { code: "auth_missing", transient: false, acp_error };
23464
+ }
23465
+ if (/\b(token|api ?key|credential)\b/i.test(m) && /\b(invalid|expired|revoked)\b/i.test(m)) {
23466
+ return { code: "auth_invalid", transient: false, acp_error };
23467
+ }
23468
+ if (/\brate ?limit\b|\b429\b/i.test(m)) {
23469
+ return { code: "model_rate_limit", transient: true, acp_error };
23470
+ }
23471
+ if (/\b5\d\d\b|\boverloaded\b|\bunavailable\b|\bunknown model\b/i.test(m)) {
23472
+ return { code: "model_unavailable", transient: true, acp_error };
23473
+ }
23474
+ return { code: "internal", transient: false, acp_error };
23475
+ }
23476
+ if (err instanceof Error) {
23477
+ const m = err.message;
23478
+ if (/error while creating mount source path|mkdir .* permission denied/i.test(m)) {
23479
+ return { code: "mount_failed", transient: false };
23480
+ }
23481
+ if (/^image prepull failed/i.test(m)) {
23482
+ return { code: "image_pull_failed", transient: true };
23483
+ }
23484
+ if (/ACP connection closed/i.test(m)) {
23485
+ return { code: "container_exit", transient: true };
23486
+ }
23487
+ }
23488
+ return { code: "internal", transient: false };
23489
+ }
23490
+
23397
23491
  // ../acp-client/src/acp-client.ts
23398
23492
  var AcpClient = class {
23399
23493
  constructor(options) {
@@ -23421,7 +23515,8 @@ var AcpClient = class {
23421
23515
  args,
23422
23516
  env: this.options.agent.env,
23423
23517
  cwd: this.options.agent.cwd,
23424
- image: this.options.agent.image
23518
+ image: this.options.agent.image,
23519
+ mounts: this.options.agent.mounts
23425
23520
  });
23426
23521
  this.runtimeChild = child;
23427
23522
  if (!child.stdout || !child.stdin) {
@@ -23545,11 +23640,13 @@ var AcpClient = class {
23545
23640
  void this.store?.delete(threadId);
23546
23641
  }
23547
23642
  async prompt(input) {
23548
- const sessionId = await this.ensureSession(input.threadId, input.channelId);
23549
- const promptText = stringifyPromptForLog(input.content);
23550
- this.turns?.startTurn({ sessionId, promptText });
23551
- debugLog(this.options.agent.id, "prompt \u2192", { sessionId, content: input.content });
23643
+ let sessionId = null;
23644
+ let turnId = null;
23552
23645
  try {
23646
+ sessionId = await this.ensureSession(input.threadId, input.channelId);
23647
+ const promptText = stringifyPromptForLog(input.content);
23648
+ turnId = this.turns?.startTurn({ sessionId, promptText }) ?? null;
23649
+ debugLog(this.options.agent.id, "prompt \u2192", { sessionId, content: input.content });
23553
23650
  const result = await this.connection.prompt({
23554
23651
  sessionId,
23555
23652
  prompt: input.content
@@ -23558,7 +23655,19 @@ var AcpClient = class {
23558
23655
  debugLog(this.options.agent.id, "prompt \u2190", { sessionId, stopReason: result.stopReason });
23559
23656
  return { stopReason: result.stopReason };
23560
23657
  } catch (err) {
23561
- this.turns?.endTurn({ sessionId, stopReason: "error" });
23658
+ const c = classify(err);
23659
+ this.options.onTap?.({
23660
+ kind: "error",
23661
+ agentId: this.options.agent.id,
23662
+ sessionId,
23663
+ turnId,
23664
+ code: c.code,
23665
+ message: err instanceof Error ? err.message : String(err),
23666
+ detail: err instanceof Error && err.stack ? err.stack.slice(0, 2e3) : void 0,
23667
+ transient: c.transient,
23668
+ acp_error: c.acp_error
23669
+ });
23670
+ if (sessionId) this.turns?.endTurn({ sessionId, stopReason: "error" });
23562
23671
  throw err;
23563
23672
  }
23564
23673
  }
@@ -23782,7 +23891,7 @@ function parseApprovalTimeout(name, raw) {
23782
23891
  }
23783
23892
  throw new Error("unreachable");
23784
23893
  }
23785
- function parseAgentContainer(name, raw, processEnv) {
23894
+ function parseAgentContainer(name, raw, processEnv, configDir) {
23786
23895
  if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
23787
23896
  throw new Error(`agents.${name}.container must be a mapping`);
23788
23897
  }
@@ -23810,6 +23919,132 @@ function parseAgentContainer(name, raw, processEnv) {
23810
23919
  }
23811
23920
  out.env = interpolateEnv(stringEnv, processEnv, `agents.${name}.container.env`);
23812
23921
  }
23922
+ if (r.mounts !== void 0) {
23923
+ out.mounts = parseMountList(name, r.mounts, processEnv, configDir);
23924
+ }
23925
+ if (r.disable_mounts !== void 0) {
23926
+ out.disable_mounts = parseDisableMounts(name, r.disable_mounts);
23927
+ }
23928
+ return out;
23929
+ }
23930
+ function parseMountList(agentName, raw, processEnv, configDir) {
23931
+ if (!Array.isArray(raw)) {
23932
+ throw new Error(`agents.${agentName}.container.mounts must be an array`);
23933
+ }
23934
+ const out = [];
23935
+ const seenIds = /* @__PURE__ */ new Set();
23936
+ for (let i = 0; i < raw.length; i++) {
23937
+ const entry = raw[i];
23938
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) {
23939
+ throw new Error(`agents.${agentName}.container.mounts[${i}] must be a mapping`);
23940
+ }
23941
+ const e = entry;
23942
+ if (e.host === void 0) {
23943
+ throw new Error(`agents.${agentName}.container.mounts[${i}].host is required`);
23944
+ }
23945
+ if (e.target === void 0) {
23946
+ throw new Error(`agents.${agentName}.container.mounts[${i}].target is required`);
23947
+ }
23948
+ if (typeof e.host !== "string" || e.host.length === 0) {
23949
+ throw new Error(
23950
+ `agents.${agentName}.container.mounts[${i}].host must be a non-empty string`
23951
+ );
23952
+ }
23953
+ if (typeof e.target !== "string" || e.target.length === 0) {
23954
+ throw new Error(
23955
+ `agents.${agentName}.container.mounts[${i}].target must be a non-empty string`
23956
+ );
23957
+ }
23958
+ const mode = e.mode ?? "rw";
23959
+ if (mode !== "ro" && mode !== "rw") {
23960
+ throw new Error(
23961
+ `agents.${agentName}.container.mounts[${i}].mode must be "ro" or "rw" (got ${JSON.stringify(e.mode)})`
23962
+ );
23963
+ }
23964
+ let id;
23965
+ if (e.id !== void 0) {
23966
+ if (typeof e.id !== "string" || e.id.length === 0) {
23967
+ throw new Error(
23968
+ `agents.${agentName}.container.mounts[${i}].id must be a non-empty string`
23969
+ );
23970
+ }
23971
+ if (e.id === "workspace") {
23972
+ throw new Error(
23973
+ `agents.${agentName}.container.mounts[${i}].id: "workspace" is a reserved id (set by the workspace auto-mount). Use a different id or rely on disable_mounts to subtract.`
23974
+ );
23975
+ }
23976
+ if (seenIds.has(e.id)) {
23977
+ throw new Error(
23978
+ `agents.${agentName}.container.mounts: duplicate id "${e.id}"`
23979
+ );
23980
+ }
23981
+ seenIds.add(e.id);
23982
+ id = e.id;
23983
+ }
23984
+ let create;
23985
+ if (e.create !== void 0) {
23986
+ if (typeof e.create !== "boolean") {
23987
+ throw new Error(
23988
+ `agents.${agentName}.container.mounts[${i}].create must be a boolean`
23989
+ );
23990
+ }
23991
+ create = e.create;
23992
+ }
23993
+ const host = resolveHostPath(
23994
+ agentName,
23995
+ i,
23996
+ interpolateString(e.host, processEnv),
23997
+ configDir
23998
+ );
23999
+ const target = interpolateString(e.target, processEnv);
24000
+ const m = { host, target, mode };
24001
+ if (id !== void 0) m.id = id;
24002
+ if (create !== void 0) m.create = create;
24003
+ out.push(m);
24004
+ }
24005
+ return out;
24006
+ }
24007
+ function resolveHostPath(agentName, index, host, configDir) {
24008
+ if (host.startsWith("~/")) {
24009
+ const home = process.env.HOME;
24010
+ if (!home) {
24011
+ throw new Error(
24012
+ `agents.${agentName}.container.mounts[${index}].host: cannot expand ~ \u2014 $HOME is not set`
24013
+ );
24014
+ }
24015
+ return `${home}/${host.slice(2)}`;
24016
+ }
24017
+ if (host === "~") {
24018
+ const home = process.env.HOME;
24019
+ if (!home) {
24020
+ throw new Error(
24021
+ `agents.${agentName}.container.mounts[${index}].host: cannot expand ~ \u2014 $HOME is not set`
24022
+ );
24023
+ }
24024
+ return home;
24025
+ }
24026
+ if (isAbsolute(host)) return host;
24027
+ if (!configDir) {
24028
+ throw new Error(
24029
+ `agents.${agentName}.container.mounts[${index}]: relative host path "${host}" requires configDir (zooid.yaml directory) \u2014 pass it via loadZooidConfig(yaml, { configDir })`
24030
+ );
24031
+ }
24032
+ return pathResolve2(configDir, host);
24033
+ }
24034
+ function parseDisableMounts(agentName, raw) {
24035
+ if (!Array.isArray(raw)) {
24036
+ throw new Error(`agents.${agentName}.container.disable_mounts must be an array of strings`);
24037
+ }
24038
+ const out = [];
24039
+ for (let i = 0; i < raw.length; i++) {
24040
+ const v = raw[i];
24041
+ if (typeof v !== "string" || v.length === 0) {
24042
+ throw new Error(
24043
+ `agents.${agentName}.container.disable_mounts[${i}] must be a non-empty string`
24044
+ );
24045
+ }
24046
+ out.push(v);
24047
+ }
23813
24048
  return out;
23814
24049
  }
23815
24050
  function parseZooidContainer(raw) {
@@ -23946,6 +24181,39 @@ function parseTransport(name, raw, processEnv) {
23946
24181
  }
23947
24182
  return { type: "http", port };
23948
24183
  }
24184
+ function parseRoomBinding(path, raw, serverName) {
24185
+ function normalizeAlias(alias) {
24186
+ if (alias.length === 0) {
24187
+ throw new Error(`${path}: must be a non-empty alias`);
24188
+ }
24189
+ if (!MATRIX_ROOM_IDENT_RE.test(alias)) {
24190
+ throw new Error(
24191
+ `${path}: must start with '#' or '!' (got ${JSON.stringify(alias)})`
24192
+ );
24193
+ }
24194
+ return alias.includes(":") ? alias : `${alias}:${serverName}`;
24195
+ }
24196
+ if (typeof raw === "string") {
24197
+ return { alias: normalizeAlias(raw) };
24198
+ }
24199
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
24200
+ throw new Error(`${path}: must be a string or { alias, power_level } object`);
24201
+ }
24202
+ const r = raw;
24203
+ if (typeof r.alias !== "string" || r.alias.length === 0) {
24204
+ throw new Error(`${path}.alias: must be a non-empty string`);
24205
+ }
24206
+ const out = { alias: normalizeAlias(r.alias) };
24207
+ if (r.power_level !== void 0) {
24208
+ if (typeof r.power_level !== "number" || !Number.isInteger(r.power_level)) {
24209
+ throw new Error(
24210
+ `${path}.power_level: must be an integer (got ${JSON.stringify(r.power_level)})`
24211
+ );
24212
+ }
24213
+ out.powerLevel = r.power_level;
24214
+ }
24215
+ return out;
24216
+ }
23949
24217
  function parseTransportBinding(name, entry, transports) {
23950
24218
  const present = TRANSPORT_KINDS.filter(
23951
24219
  (k) => entry[k] !== void 0 && entry[k] !== null
@@ -24015,16 +24283,8 @@ function parseTransportBinding(name, entry, transports) {
24015
24283
  throw new Error(`agents.${name}.matrix.rooms is required and must be a non-empty array`);
24016
24284
  }
24017
24285
  const rooms = [];
24018
- for (const r of block.rooms) {
24019
- if (typeof r !== "string" || r.length === 0) {
24020
- throw new Error(`agents.${name}.matrix.rooms[] must be a non-empty string`);
24021
- }
24022
- if (!MATRIX_ROOM_IDENT_RE.test(r)) {
24023
- throw new Error(
24024
- `agents.${name}.matrix.rooms[] must start with '#' or '!' (got ${JSON.stringify(r)})`
24025
- );
24026
- }
24027
- rooms.push(r.includes(":") ? r : `${r}:${serverName}`);
24286
+ for (let i = 0; i < block.rooms.length; i++) {
24287
+ rooms.push(parseRoomBinding(`agents.${name}.matrix.rooms[${i}]`, block.rooms[i], serverName));
24028
24288
  }
24029
24289
  let displayName;
24030
24290
  if (block.display_name !== void 0) {
@@ -24059,7 +24319,7 @@ function parseTransportBinding(name, entry, transports) {
24059
24319
  }
24060
24320
  return { http: { transport: refName } };
24061
24321
  }
24062
- function parseAgents(raw, runtime, transports, daemonHooks, processEnv) {
24322
+ function parseAgents(raw, runtime, transports, daemonHooks, processEnv, configDir) {
24063
24323
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
24064
24324
  throw new Error("agents: must be a mapping");
24065
24325
  }
@@ -24136,11 +24396,18 @@ See [ZOD043].`
24136
24396
  let containerBlock;
24137
24397
  if (entry.container !== void 0 && entry.container !== null) {
24138
24398
  if (runtime === "local") {
24139
- throw new Error(
24140
- `agents.${name}.container is only valid when runtime is 'docker' or 'podman'. runtime: local spawns agents as host child processes \u2014 there is no container, so 'image' is inert and 'env' would silently lie (the agent inherits the daemon's full process.env regardless).`
24141
- );
24399
+ if (typeof entry.container !== "object" || entry.container === null || Array.isArray(entry.container)) {
24400
+ throw new Error(`agents.${name}.container must be a mapping`);
24401
+ }
24402
+ const c = entry.container;
24403
+ const disallowed = Object.keys(c).filter((k) => k !== "mounts" && k !== "disable_mounts");
24404
+ if (disallowed.length > 0) {
24405
+ throw new Error(
24406
+ `agents.${name}.container.${disallowed[0]} is only valid when runtime is 'docker' or 'podman'. runtime: local spawns agents as host child processes \u2014 there is no container, so 'image' is inert and 'env' would silently lie (the agent inherits the daemon's full process.env regardless). 'mounts' and 'disable_mounts' are accepted under runtime: local but ignored at compose time.`
24407
+ );
24408
+ }
24142
24409
  }
24143
- containerBlock = parseAgentContainer(name, entry.container, processEnv);
24410
+ containerBlock = parseAgentContainer(name, entry.container, processEnv, configDir);
24144
24411
  }
24145
24412
  const binding = parseTransportBinding(name, entry, transports);
24146
24413
  const agentCfg = {
@@ -24173,7 +24440,7 @@ function zooidHooks(raw) {
24173
24440
  }
24174
24441
  return out;
24175
24442
  }
24176
- function loadZooidConfig(yamlText) {
24443
+ function loadZooidConfig(yamlText, opts = {}) {
24177
24444
  const raw = parse3(yamlText) ?? {};
24178
24445
  if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
24179
24446
  throw new Error("zooid.yaml must be a YAML object");
@@ -24206,7 +24473,7 @@ function loadZooidConfig(yamlText) {
24206
24473
  const processEnv = process.env;
24207
24474
  const transports = parseTransports(r.transports, processEnv);
24208
24475
  const hooks = zooidHooks(r);
24209
- const agents = parseAgents(r.agents, runtime, transports, hooks, processEnv);
24476
+ const agents = parseAgents(r.agents, runtime, transports, hooks, processEnv, opts.configDir);
24210
24477
  const cfg = {
24211
24478
  runtime,
24212
24479
  transports,
@@ -24284,6 +24551,7 @@ function mergeCliFlags(base, flags) {
24284
24551
  }
24285
24552
 
24286
24553
  // ../core/src/acp-registry.ts
24554
+ import { mkdirSync } from "fs";
24287
24555
  import { join as join3 } from "path";
24288
24556
  var AcpAgentRegistry = class {
24289
24557
  opts;
@@ -24322,6 +24590,15 @@ var AcpAgentRegistry = class {
24322
24590
  resolveSpawnImage(name) {
24323
24591
  return this.opts.image?.[name];
24324
24592
  }
24593
+ resolveSpawnMounts(name) {
24594
+ return this.opts.mounts?.[name] ?? [];
24595
+ }
24596
+ resolveSpawnCwd(name) {
24597
+ return this.opts.cwd?.[name] ?? this.opts.agents[name]?.workdir ?? process.cwd();
24598
+ }
24599
+ agentNames() {
24600
+ return Object.keys(this.opts.agents);
24601
+ }
24325
24602
  getApprovalTimeoutMs(name) {
24326
24603
  return this.opts.agents[name]?.approval_timeout_ms ?? 0;
24327
24604
  }
@@ -24363,14 +24640,18 @@ var AcpAgentRegistry = class {
24363
24640
  const cfg = this.opts.agents[name];
24364
24641
  if (!cfg.acp) throw new Error(`agents.${name}: missing acp block`);
24365
24642
  const spawn4 = resolveAcpAgentSpec(cfg.acp);
24643
+ for (const dir of this.opts.mkdirOnSpawn?.[name] ?? []) {
24644
+ mkdirSync(dir, { recursive: true });
24645
+ }
24366
24646
  const client = new AcpClient({
24367
24647
  agent: {
24368
24648
  id: name,
24369
24649
  command: spawn4.command,
24370
24650
  args: spawn4.args,
24371
24651
  env: this.opts.env?.[name],
24372
- cwd: cfg.workdir,
24373
- image: this.opts.image?.[name]
24652
+ cwd: this.resolveSpawnCwd(name),
24653
+ image: this.opts.image?.[name],
24654
+ mounts: this.resolveSpawnMounts(name)
24374
24655
  },
24375
24656
  agentDataDir: this.opts.agentsDir ? join3(this.opts.agentsDir, name) : void 0,
24376
24657
  runtime: this.opts.runtime,
@@ -24529,6 +24810,22 @@ var MatrixClient = class {
24529
24810
  preset: opts.preset ?? "public_chat"
24530
24811
  };
24531
24812
  if (opts.name !== void 0) body.name = opts.name;
24813
+ if (opts.roomVersion !== void 0) body.room_version = opts.roomVersion;
24814
+ if (opts.restrictedToSpaceId !== void 0) {
24815
+ body.initial_state = [
24816
+ {
24817
+ type: "m.room.join_rules",
24818
+ state_key: "",
24819
+ content: {
24820
+ join_rule: "restricted",
24821
+ allow: [{ type: "m.room_membership", room_id: opts.restrictedToSpaceId }]
24822
+ }
24823
+ }
24824
+ ];
24825
+ }
24826
+ if (opts.userPowerLevels && Object.keys(opts.userPowerLevels).length > 0) {
24827
+ body.power_level_content_override = { users: opts.userPowerLevels };
24828
+ }
24532
24829
  const r = await this.fetch(
24533
24830
  `${this.homeserver}/_matrix/client/v3/createRoom?user_id=${encodeURIComponent(opts.senderUserId)}`,
24534
24831
  {
@@ -24574,6 +24871,30 @@ var MatrixClient = class {
24574
24871
  if (!r.ok) throw new Error(`sendStateEvent ${opts.eventType} failed: ${r.status}`);
24575
24872
  return await r.json();
24576
24873
  }
24874
+ /**
24875
+ * Invite a user to a room. Sent as the inviter (`asUserId`) — that user
24876
+ * needs invite power in the room. Tolerates the "already in room /
24877
+ * already invited" responses idempotently so bootstrap can run on a
24878
+ * fresh AND a populated homeserver without branching.
24879
+ */
24880
+ async invite(opts) {
24881
+ const url2 = `${this.homeserver}/_matrix/client/v3/rooms/${encodeURIComponent(opts.roomId)}/invite?user_id=${encodeURIComponent(opts.asUserId)}`;
24882
+ const r = await this.fetch(url2, {
24883
+ method: "POST",
24884
+ headers: {
24885
+ Authorization: `Bearer ${this.asToken}`,
24886
+ "content-type": "application/json"
24887
+ },
24888
+ body: JSON.stringify({ user_id: opts.targetUserId })
24889
+ });
24890
+ if (r.ok) return;
24891
+ if (r.status === 403) {
24892
+ const body = await r.text();
24893
+ if (/already (in the room|invited|a member|joined)/i.test(body)) return;
24894
+ throw new Error(`invite(${opts.targetUserId}) failed: 403 ${body}`);
24895
+ }
24896
+ throw new Error(`invite(${opts.targetUserId}) failed: ${r.status}`);
24897
+ }
24577
24898
  async joinRoom(roomIdOrAlias, asUserId) {
24578
24899
  const url2 = `${this.homeserver}/_matrix/client/v3/join/${encodeURIComponent(roomIdOrAlias)}?user_id=${encodeURIComponent(asUserId)}`;
24579
24900
  const r = await this.fetch(url2, {
@@ -24902,7 +25223,7 @@ function route(event, agents, threadStates) {
24902
25223
  const threadState = threadRoot ? threadStates?.get(threadRoot) : void 0;
24903
25224
  for (const a of agents) {
24904
25225
  if (event.sender === a.userId) continue;
24905
- if (!a.rooms.includes(event.room_id ?? "")) continue;
25226
+ if (!a.rooms.some((r) => r.alias === event.room_id)) continue;
24906
25227
  if (a.trigger === "any") {
24907
25228
  matches.push(a);
24908
25229
  continue;
@@ -24929,15 +25250,50 @@ async function ensureWorkforceSpace(opts) {
24929
25250
  const existing = await opts.client.resolveAlias(alias);
24930
25251
  if (existing) return existing;
24931
25252
  const display = opts.spaceLocalpart.charAt(0).toUpperCase() + opts.spaceLocalpart.slice(1);
24932
- return opts.client.createRoomRaw({
25253
+ const body = {
25254
+ room_alias_name: opts.spaceLocalpart,
25255
+ name: display,
25256
+ preset: opts.preset,
25257
+ creation_content: { type: "m.space" },
25258
+ // A workspace is joined by invitation, not self-service. Pin the space's
25259
+ // join rule to invite regardless of preset so it can't be walked into
25260
+ // (which would otherwise satisfy every restricted child room's allow).
25261
+ initial_state: [{ type: "m.room.join_rules", state_key: "", content: { join_rule: "invite" } }]
25262
+ };
25263
+ if (opts.admins && opts.admins.length > 0) {
25264
+ body.invite = opts.admins;
25265
+ const users = { [opts.asUserId]: 100 };
25266
+ for (const a of opts.admins) users[a] = 100;
25267
+ body.power_level_content_override = { users };
25268
+ }
25269
+ return opts.client.createRoomRaw({ asUserId: opts.asUserId, body });
25270
+ }
25271
+ async function ensureDefaultChannel(opts) {
25272
+ const localpart2 = opts.channelLocalpart ?? "general";
25273
+ const alias = `#${localpart2}:${opts.serverName}`;
25274
+ const existing = await opts.client.resolveAlias(alias);
25275
+ if (existing) return existing;
25276
+ let userPowerLevels;
25277
+ if (opts.admins && opts.admins.length > 0) {
25278
+ userPowerLevels = { [opts.asUserId]: 100 };
25279
+ for (const a of opts.admins) userPowerLevels[a] = 100;
25280
+ }
25281
+ const roomId = await opts.client.createRoom({
25282
+ roomAliasName: localpart2,
25283
+ invite: [],
25284
+ senderUserId: opts.asUserId,
25285
+ name: localpart2.charAt(0).toUpperCase() + localpart2.slice(1),
25286
+ restrictedToSpaceId: opts.spaceId,
25287
+ ...userPowerLevels ? { userPowerLevels } : {}
25288
+ });
25289
+ await opts.client.sendStateEvent({
25290
+ roomId: opts.spaceId,
24933
25291
  asUserId: opts.asUserId,
24934
- body: {
24935
- room_alias_name: opts.spaceLocalpart,
24936
- name: display,
24937
- preset: opts.preset,
24938
- creation_content: { type: "m.space" }
24939
- }
25292
+ eventType: "m.space.child",
25293
+ stateKey: roomId,
25294
+ content: { via: [opts.serverName] }
24940
25295
  });
25296
+ return roomId;
24941
25297
  }
24942
25298
  function serverNameFromMxid(mxid) {
24943
25299
  const colon = mxid.indexOf(":");
@@ -24968,8 +25324,23 @@ var BotPool = class {
24968
25324
  } catch (err) {
24969
25325
  console.warn(`[matrix] setDisplayName(${a.userId}) failed: ${err.message}`);
24970
25326
  }
25327
+ if (opts.spaceRoomId && opts.asUserId) {
25328
+ try {
25329
+ await this.client.invite({
25330
+ roomId: opts.spaceRoomId,
25331
+ asUserId: opts.asUserId,
25332
+ targetUserId: a.userId
25333
+ });
25334
+ await this.client.joinRoom(opts.spaceRoomId, a.userId);
25335
+ } catch (err) {
25336
+ console.warn(
25337
+ `[matrix] space membership for ${a.userId} failed: ${err.message}`
25338
+ );
25339
+ }
25340
+ }
24971
25341
  for (let i = 0; i < a.rooms.length; i++) {
24972
- const room = a.rooms[i];
25342
+ const binding = a.rooms[i];
25343
+ const room = binding.alias;
24973
25344
  try {
24974
25345
  let resolved = room;
24975
25346
  if (room.startsWith("#")) {
@@ -24984,17 +25355,25 @@ var BotPool = class {
24984
25355
  const colon = room.indexOf(":");
24985
25356
  const aliasLocalpart = colon > 1 ? room.slice(1, colon) : room.slice(1);
24986
25357
  const sender = opts.adminUserId ?? a.userId;
25358
+ const userPowerLevels = buildUserPowerLevels(
25359
+ opts.asUserId,
25360
+ opts.adminUserIds,
25361
+ this.agents,
25362
+ room
25363
+ );
24987
25364
  resolved = await this.client.createRoom({
24988
25365
  roomAliasName: aliasLocalpart,
24989
25366
  invite: opts.adminUserId ? [opts.adminUserId] : [],
24990
25367
  senderUserId: sender,
24991
- name: aliasLocalpart
25368
+ name: aliasLocalpart,
25369
+ ...opts.spaceRoomId ? { restrictedToSpaceId: opts.spaceRoomId } : {},
25370
+ ...userPowerLevels ? { userPowerLevels } : {}
24992
25371
  });
24993
25372
  }
24994
25373
  aliasToId.set(room, resolved);
24995
25374
  }
24996
25375
  }
24997
- a.rooms[i] = resolved;
25376
+ binding.alias = resolved;
24998
25377
  await this.client.joinRoom(resolved, a.userId);
24999
25378
  if (opts.spaceRoomId && opts.asUserId && !attachedToSpace.has(resolved)) {
25000
25379
  attachedToSpace.add(resolved);
@@ -25033,6 +25412,18 @@ function localpart(userId) {
25033
25412
  if (!m) throw new Error(`bad user id: ${userId}`);
25034
25413
  return m[1];
25035
25414
  }
25415
+ function buildUserPowerLevels(asUserId, admins, agents, roomAlias) {
25416
+ const users = {};
25417
+ if (asUserId) users[asUserId] = 100;
25418
+ if (admins) for (const a of admins) users[a] = 100;
25419
+ for (const a of agents) {
25420
+ for (const r of a.rooms) {
25421
+ if (r.alias !== roomAlias) continue;
25422
+ if (r.powerLevel !== void 0) users[a.userId] = r.powerLevel;
25423
+ }
25424
+ }
25425
+ return Object.keys(users).length > 0 ? users : void 0;
25426
+ }
25036
25427
 
25037
25428
  // ../transport-matrix/src/transport.ts
25038
25429
  import { Hono } from "hono";
@@ -25086,6 +25477,30 @@ function toPlanBody(evt) {
25086
25477
  entries: evt.entries
25087
25478
  };
25088
25479
  }
25480
+ var RECOVERY_URLS = {
25481
+ auth_missing: "https://zooid.dev/docs/guides/run-in-container#authentication-that-carries-over",
25482
+ auth_invalid: "https://zooid.dev/docs/guides/run-in-container#authentication-that-carries-over",
25483
+ mount_failed: "https://zooid.dev/docs/guides/run-in-container#what-you-get-for-free",
25484
+ image_pull_failed: "https://zooid.dev/docs/guides/run-in-container#skipping-the-image-prepull"
25485
+ };
25486
+ function toErrorBody(evt, threadRoot) {
25487
+ const msg = evt.message.slice(0, 250);
25488
+ const out = {
25489
+ msgtype: "m.notice",
25490
+ body: `\u26A0 [${evt.code}] ${msg}`,
25491
+ code: evt.code,
25492
+ message: msg,
25493
+ transient: evt.transient,
25494
+ "m.relates_to": { rel_type: "m.thread", event_id: threadRoot }
25495
+ };
25496
+ if (evt.sessionId) out.session_id = evt.sessionId;
25497
+ if (evt.turnId) out.turn_id = evt.turnId;
25498
+ if (evt.detail) out.detail = evt.detail.slice(0, 2e3);
25499
+ if (evt.acp_error) out.acp_error = evt.acp_error;
25500
+ const recovery = RECOVERY_URLS[evt.code];
25501
+ if (recovery) out.recovery = recovery;
25502
+ return out;
25503
+ }
25089
25504
 
25090
25505
  // ../transport-matrix/src/markdown-to-matrix-html.ts
25091
25506
  import { marked } from "marked";
@@ -25159,12 +25574,17 @@ function toMatrixHtml(markdown) {
25159
25574
  // ../transport-matrix/src/transport.ts
25160
25575
  var STARTUP_GRACE_MS = 5e3;
25161
25576
  var SEEN_EVENT_CAP = 5e3;
25577
+ var DRAIN_QUIET_MS = 300;
25578
+ var DRAIN_MAX_MS = 3e3;
25579
+ var delay = (ms) => new Promise((r) => setTimeout(r, ms));
25162
25580
  function inboundThreadRoot2(evt) {
25163
25581
  const r = evt.content?.["m.relates_to"];
25164
25582
  return r?.rel_type === "m.thread" && r.event_id ? r.event_id : void 0;
25165
25583
  }
25166
25584
  function createMatrixTransport(opts) {
25167
25585
  const { agents, approvals, client, bindings, hsToken, adminUserId } = opts;
25586
+ const drainQuietMs = opts.drainQuietMs ?? DRAIN_QUIET_MS;
25587
+ const drainMaxMs = opts.drainMaxMs ?? DRAIN_MAX_MS;
25168
25588
  const pool = new BotPool(client, bindings);
25169
25589
  const sessions = /* @__PURE__ */ new Map();
25170
25590
  const buffers = /* @__PURE__ */ new Map();
@@ -25181,7 +25601,9 @@ function createMatrixTransport(opts) {
25181
25601
  if (event.type === "agent_message_chunk") {
25182
25602
  const block = event.content;
25183
25603
  if (block.type === "text" && typeof block.text === "string") {
25184
- buffers.set(event.sessionId, (buffers.get(event.sessionId) ?? "") + block.text);
25604
+ const current = buffers.get(event.sessionId) ?? "";
25605
+ const prefix = block.text === "" && current.length > 0 ? "\n\n" : "";
25606
+ buffers.set(event.sessionId, current + prefix + block.text);
25185
25607
  } else {
25186
25608
  console.warn(`[matrix:${name}] dropped chunk block type=${block.type}`, block);
25187
25609
  }
@@ -25369,6 +25791,29 @@ function createMatrixTransport(opts) {
25369
25791
  if (st.participants.at(-1) !== a.name) st.participants.push(a.name);
25370
25792
  }).catch((err) => {
25371
25793
  console.error(`[matrix] runTurn failed for ${a.name}:`, err);
25794
+ const c2 = classify(err);
25795
+ const threadRoot = inboundThreadRoot2(evt) ?? evt.event_id;
25796
+ if (!threadRoot || !evt.room_id) return;
25797
+ const body2 = toErrorBody(
25798
+ {
25799
+ kind: "error",
25800
+ agentId: a.name,
25801
+ sessionId: null,
25802
+ turnId: null,
25803
+ code: c2.code,
25804
+ message: err instanceof Error ? err.message : String(err),
25805
+ detail: err instanceof Error && err.stack ? err.stack.slice(0, 2e3) : void 0,
25806
+ transient: c2.transient,
25807
+ acp_error: c2.acp_error
25808
+ },
25809
+ threadRoot
25810
+ );
25811
+ void client.sendCustomEvent({
25812
+ roomId: evt.room_id,
25813
+ asUserId: a.userId,
25814
+ eventType: "eco.zoon.error",
25815
+ content: body2
25816
+ }).catch((e) => console.warn(`[matrix:${a.name}] eco.zoon.error send failed:`, e));
25372
25817
  });
25373
25818
  }
25374
25819
  }
@@ -25421,6 +25866,14 @@ function createMatrixTransport(opts) {
25421
25866
  channelId: evt.room_id,
25422
25867
  content: [{ type: "text", text: promptText }]
25423
25868
  });
25869
+ const drainStart = Date.now();
25870
+ let drained = buffers.get(sessionId) ?? "";
25871
+ while (drainQuietMs > 0 && Date.now() - drainStart < drainMaxMs) {
25872
+ await delay(drainQuietMs);
25873
+ const next = buffers.get(sessionId) ?? "";
25874
+ if (next === drained) break;
25875
+ drained = next;
25876
+ }
25424
25877
  const text = buffers.get(sessionId) ?? "";
25425
25878
  if (text.length > 0) {
25426
25879
  const html = toMatrixHtml(text);
@@ -25472,7 +25925,7 @@ function createMatrixTransport(opts) {
25472
25925
  }
25473
25926
  async function rebuildThreadState(client, roomId, rootEventId, bindings) {
25474
25927
  const state = { participants: [], rootMentions: [] };
25475
- const asUser = (bindings.find((b) => b.rooms.includes(roomId)) ?? bindings[0])?.userId;
25928
+ const asUser = (bindings.find((b) => b.rooms.some((r) => r.alias === roomId)) ?? bindings[0])?.userId;
25476
25929
  if (!asUser) return state;
25477
25930
  const root = await client.fetchEvent(roomId, rootEventId, asUser);
25478
25931
  if (root) {
@@ -25527,7 +25980,11 @@ function truncate(s, n) {
25527
25980
  function buildWorkforceRoster(agents) {
25528
25981
  return {
25529
25982
  version: 1,
25530
- agents: agents.map((a) => ({ user_id: a.userId, name: a.name, rooms: a.rooms }))
25983
+ agents: agents.map((a) => ({
25984
+ user_id: a.userId,
25985
+ name: a.name,
25986
+ rooms: a.rooms.map((r) => r.alias)
25987
+ }))
25531
25988
  };
25532
25989
  }
25533
25990
  async function publishWorkforce(opts) {
@@ -25662,7 +26119,7 @@ async function handleLine(line, socket, registry3) {
25662
26119
  }
25663
26120
  }
25664
26121
 
25665
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js
26122
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js
25666
26123
  var NEVER2 = Object.freeze({
25667
26124
  status: "aborted"
25668
26125
  });
@@ -25721,7 +26178,7 @@ function config2(newConfig) {
25721
26178
  return globalConfig2;
25722
26179
  }
25723
26180
 
25724
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js
26181
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js
25725
26182
  var util_exports2 = {};
25726
26183
  __export(util_exports2, {
25727
26184
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES2,
@@ -26242,7 +26699,7 @@ var Class2 = class {
26242
26699
  }
26243
26700
  };
26244
26701
 
26245
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js
26702
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js
26246
26703
  var initializer3 = (inst, def) => {
26247
26704
  inst.name = "$ZodError";
26248
26705
  Object.defineProperty(inst, "_zod", {
@@ -26317,7 +26774,7 @@ function formatError2(error49, _mapper) {
26317
26774
  return fieldErrors;
26318
26775
  }
26319
26776
 
26320
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js
26777
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js
26321
26778
  var _parse2 = (_Err) => (schema, value, _ctx, _params) => {
26322
26779
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
26323
26780
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -26367,7 +26824,7 @@ var _safeParseAsync2 = (_Err) => async (schema, value, _ctx) => {
26367
26824
  };
26368
26825
  var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync2($ZodRealError2);
26369
26826
 
26370
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js
26827
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js
26371
26828
  var cuid4 = /^[cC][^\s-]{8,}$/;
26372
26829
  var cuid23 = /^[0-9a-z]+$/;
26373
26830
  var ulid3 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
@@ -26425,7 +26882,7 @@ var _null4 = /null/i;
26425
26882
  var lowercase2 = /^[^A-Z]*$/;
26426
26883
  var uppercase2 = /^[^a-z]*$/;
26427
26884
 
26428
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js
26885
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js
26429
26886
  var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => {
26430
26887
  var _a2;
26431
26888
  inst._zod ?? (inst._zod = {});
@@ -26810,7 +27267,7 @@ var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (i
26810
27267
  };
26811
27268
  });
26812
27269
 
26813
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js
27270
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js
26814
27271
  var Doc2 = class {
26815
27272
  constructor(args = []) {
26816
27273
  this.content = [];
@@ -26846,14 +27303,14 @@ var Doc2 = class {
26846
27303
  }
26847
27304
  };
26848
27305
 
26849
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js
27306
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js
26850
27307
  var version2 = {
26851
27308
  major: 4,
26852
27309
  minor: 0,
26853
27310
  patch: 0
26854
27311
  };
26855
27312
 
26856
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js
27313
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js
26857
27314
  var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => {
26858
27315
  var _a2;
26859
27316
  inst ?? (inst = {});
@@ -28091,7 +28548,7 @@ function handleRefineResult2(result, payload, input, inst) {
28091
28548
  }
28092
28549
  }
28093
28550
 
28094
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js
28551
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js
28095
28552
  var parsedType2 = (data) => {
28096
28553
  const t = typeof data;
28097
28554
  switch (t) {
@@ -28209,7 +28666,7 @@ function en_default2() {
28209
28666
  };
28210
28667
  }
28211
28668
 
28212
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js
28669
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js
28213
28670
  var $ZodRegistry2 = class {
28214
28671
  constructor() {
28215
28672
  this._map = /* @__PURE__ */ new Map();
@@ -28257,7 +28714,7 @@ function registry2() {
28257
28714
  }
28258
28715
  var globalRegistry2 = /* @__PURE__ */ registry2();
28259
28716
 
28260
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js
28717
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js
28261
28718
  function _string2(Class3, params) {
28262
28719
  return new Class3({
28263
28720
  type: "string",
@@ -28696,7 +29153,7 @@ function _refine2(Class3, fn, _params) {
28696
29153
  return schema;
28697
29154
  }
28698
29155
 
28699
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js
29156
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js
28700
29157
  var iso_exports2 = {};
28701
29158
  __export(iso_exports2, {
28702
29159
  ZodISODate: () => ZodISODate2,
@@ -28737,7 +29194,7 @@ function duration4(params) {
28737
29194
  return _isoDuration2(ZodISODuration2, params);
28738
29195
  }
28739
29196
 
28740
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js
29197
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js
28741
29198
  var initializer4 = (inst, issues) => {
28742
29199
  $ZodError2.init(inst, issues);
28743
29200
  inst.name = "ZodError";
@@ -28771,13 +29228,13 @@ var ZodRealError2 = $constructor2("ZodError", initializer4, {
28771
29228
  Parent: Error
28772
29229
  });
28773
29230
 
28774
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js
29231
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js
28775
29232
  var parse4 = /* @__PURE__ */ _parse2(ZodRealError2);
28776
29233
  var parseAsync3 = /* @__PURE__ */ _parseAsync2(ZodRealError2);
28777
29234
  var safeParse4 = /* @__PURE__ */ _safeParse2(ZodRealError2);
28778
29235
  var safeParseAsync4 = /* @__PURE__ */ _safeParseAsync2(ZodRealError2);
28779
29236
 
28780
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js
29237
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js
28781
29238
  var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
28782
29239
  $ZodType2.init(inst, def);
28783
29240
  inst.def = def;
@@ -29388,10 +29845,10 @@ function preprocess2(fn, schema) {
29388
29845
  return pipe2(transform2(fn), schema);
29389
29846
  }
29390
29847
 
29391
- // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
29848
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
29392
29849
  config2(en_default2());
29393
29850
 
29394
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
29851
+ // ../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
29395
29852
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
29396
29853
  var JSONRPC_VERSION = "2.0";
29397
29854
  var AssertObjectSchema = custom2((v) => v !== null && (typeof v === "object" || typeof v === "function"));
@@ -30873,13 +31330,13 @@ var ServerResultSchema = union2([
30873
31330
  CreateTaskResultSchema
30874
31331
  ]);
30875
31332
 
30876
- // ../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
31333
+ // ../../../node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
30877
31334
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
30878
31335
 
30879
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
31336
+ // ../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
30880
31337
  var import_ajv_formats = __toESM(require_dist(), 1);
30881
31338
 
30882
- // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
31339
+ // ../../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
30883
31340
  var McpZodTypeKind;
30884
31341
  (function(McpZodTypeKind2) {
30885
31342
  McpZodTypeKind2["Completable"] = "McpCompletable";
@@ -30906,18 +31363,144 @@ function buildContextServerSpec(opts) {
30906
31363
  }
30907
31364
 
30908
31365
  // src/build-registry.ts
31366
+ var CONTAINER_WORKDIR = "/workspace";
31367
+ function presetOf(agent) {
31368
+ const spec = agent.acp;
31369
+ if (spec?.preset && spec.preset in PRESETS) return spec.preset;
31370
+ return void 0;
31371
+ }
31372
+ function resolveAgentImage(agent, cfg) {
31373
+ if (agent.container?.image) return { image: agent.container.image, source: "agent" };
31374
+ if (cfg.container?.image) return { image: cfg.container.image, source: "workforce" };
31375
+ const preset = presetOf(agent);
31376
+ const presetImage = preset ? PRESETS[preset]?.image : void 0;
31377
+ if (presetImage && preset) return { image: presetImage, source: `preset:${preset}` };
31378
+ return { image: void 0, source: "unresolved" };
31379
+ }
31380
+ function composeAgentMounts(name, agent, cfg, opts) {
31381
+ if (cfg.runtime === "local") {
31382
+ return { mounts: [], mkdirs: [], cwd: agent.workdir };
31383
+ }
31384
+ const disabled = new Set(agent.container?.disable_mounts ?? []);
31385
+ const knownIds = /* @__PURE__ */ new Set(["workspace"]);
31386
+ const composed = [];
31387
+ let workspaceActive = false;
31388
+ if (!disabled.has("workspace")) {
31389
+ let host = agent.workdir;
31390
+ if (isAbsolute2(host)) {
31391
+ composed.push({
31392
+ id: "workspace",
31393
+ host,
31394
+ target: CONTAINER_WORKDIR,
31395
+ mode: "rw",
31396
+ create: true
31397
+ });
31398
+ workspaceActive = true;
31399
+ } else if (opts.configDir) {
31400
+ host = pathResolve3(opts.configDir, host);
31401
+ composed.push({
31402
+ id: "workspace",
31403
+ host,
31404
+ target: CONTAINER_WORKDIR,
31405
+ mode: "rw",
31406
+ create: true
31407
+ });
31408
+ workspaceActive = true;
31409
+ }
31410
+ }
31411
+ const preset = presetOf(agent);
31412
+ if (preset && PRESETS[preset]?.mounts) {
31413
+ const dataDir = opts.dataDir ?? process.cwd();
31414
+ const ctx = {
31415
+ agentName: name,
31416
+ agentDataDir: pathResolve3(dataDir, "agents", name),
31417
+ containerWorkdir: CONTAINER_WORKDIR,
31418
+ daemonHome: opts.daemonHome ?? process.env.HOME ?? ""
31419
+ };
31420
+ const presetMounts = PRESETS[preset].mounts(ctx);
31421
+ for (const m of presetMounts) {
31422
+ knownIds.add(m.id);
31423
+ if (!disabled.has(m.id)) composed.push(m);
31424
+ }
31425
+ }
31426
+ for (const id of disabled) {
31427
+ if (!knownIds.has(id)) {
31428
+ throw new Error(
31429
+ `agents.${name}.container.disable_mounts: unknown id "${id}". Known ids for this agent: ${[...knownIds].sort().join(", ")}`
31430
+ );
31431
+ }
31432
+ }
31433
+ const userMounts = agent.container?.mounts ?? [];
31434
+ let userIdx = 0;
31435
+ for (const m of userMounts) {
31436
+ const id = m.id ?? `user-${userIdx}`;
31437
+ userIdx++;
31438
+ const out = {
31439
+ id,
31440
+ host: m.host,
31441
+ target: m.target,
31442
+ mode: m.mode
31443
+ };
31444
+ if (m.create !== void 0) out.create = m.create;
31445
+ composed.push(out);
31446
+ }
31447
+ const mkdirs = composed.filter((m) => m.create).map((m) => m.host);
31448
+ return {
31449
+ mounts: composed,
31450
+ mkdirs,
31451
+ cwd: workspaceActive ? CONTAINER_WORKDIR : agent.workdir
31452
+ };
31453
+ }
30909
31454
  function buildAcpRegistry(cfg, opts = {}) {
30910
31455
  for (const [name, agent] of Object.entries(cfg.agents)) {
30911
31456
  if (!agent.acp) {
30912
31457
  throw new Error(`agents.${name}: missing acp block (parser should have caught this)`);
30913
31458
  }
30914
31459
  }
31460
+ if (cfg.runtime !== "local") {
31461
+ const missing = [];
31462
+ for (const [name, agent] of Object.entries(cfg.agents)) {
31463
+ const { image: image2 } = resolveAgentImage(agent, cfg);
31464
+ if (!image2) {
31465
+ missing.push({ name, preset: presetOf(agent) });
31466
+ }
31467
+ }
31468
+ if (missing.length > 0) {
31469
+ const lines = missing.map(
31470
+ ({ name, preset }) => ` - ${name}${preset ? ` (preset: ${preset})` : ""} \u2014 no preset-default image`
31471
+ );
31472
+ throw new Error(
31473
+ `runtime: ${cfg.runtime} requires a container image for each agent. Unresolved:
31474
+ ` + lines.join("\n") + `
31475
+ Set agents.<name>.container.image, top-level container.image, or use a preset that ships a default image (claude, codex, opencode).`
31476
+ );
31477
+ }
31478
+ }
30915
31479
  const runtime = opts.runtime ?? defaultRuntimeFor(cfg);
30916
31480
  const env = {};
30917
31481
  const image = {};
31482
+ const mountsByAgent = {};
31483
+ const mkdirByAgent = {};
31484
+ const cwdByAgent = {};
31485
+ const log = opts.log ?? ((line) => console.log(line));
30918
31486
  for (const [name, agent] of Object.entries(cfg.agents)) {
30919
31487
  env[name] = agent.container?.env ?? {};
30920
- image[name] = agent.container?.image ?? cfg.container?.image;
31488
+ const { image: resolvedImage, source } = resolveAgentImage(agent, cfg);
31489
+ image[name] = resolvedImage;
31490
+ const composed = composeAgentMounts(name, agent, cfg, opts);
31491
+ mountsByAgent[name] = composed.mounts.map((m) => ({
31492
+ path: m.host,
31493
+ target: m.target,
31494
+ mode: m.mode
31495
+ }));
31496
+ mkdirByAgent[name] = composed.mkdirs;
31497
+ cwdByAgent[name] = composed.cwd;
31498
+ if (resolvedImage && cfg.runtime !== "local") {
31499
+ const mountSummary = composed.mounts.length === 0 ? "mounts=[]" : `mounts=[${composed.mounts.map((m) => m.id ?? m.target).join(",")}]`;
31500
+ log(
31501
+ `[zooid] agent ${name.padEnd(12)} image=${resolvedImage} source=${source} ${mountSummary}`
31502
+ );
31503
+ }
30921
31504
  }
30922
31505
  const contextSpawns = buildContextSpawns(cfg, opts);
30923
31506
  return new AcpAgentRegistry({
@@ -30925,6 +31508,9 @@ function buildAcpRegistry(cfg, opts = {}) {
30925
31508
  agents: cfg.agents,
30926
31509
  env,
30927
31510
  image,
31511
+ mounts: mountsByAgent,
31512
+ mkdirOnSpawn: mkdirByAgent,
31513
+ cwd: cwdByAgent,
30928
31514
  approvals: opts.approvals,
30929
31515
  onTap: opts.onTap,
30930
31516
  agentsDir: opts.agentsDir,
@@ -30991,10 +31577,11 @@ export {
30991
31577
  MatrixClient,
30992
31578
  renderRegistration,
30993
31579
  ensureWorkforceSpace,
31580
+ ensureDefaultChannel,
30994
31581
  createMatrixTransport,
30995
31582
  startWorkforcePublisher,
30996
31583
  SpawnRegistry,
30997
31584
  startDaemonSocketServer,
30998
31585
  buildAcpRegistry
30999
31586
  };
31000
- //# sourceMappingURL=chunk-N5POSZX5.js.map
31587
+ //# sourceMappingURL=chunk-O6E4CDTV.js.map