@impractical-ai/motion 0.1.12 → 0.1.14

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.
@@ -1,32 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- openBrowser
4
- } from "./chunk-4JSZNV7I.js";
3
+ DEVICE_START_BODY,
4
+ fetchWorkspaces,
5
+ grantScope,
6
+ openBrowser,
7
+ workspaceLabel
8
+ } from "./chunk-L5ERED5A.js";
5
9
  import {
6
10
  ApiError,
7
11
  admitMcpCall,
8
12
  invoke,
9
13
  invokeAt,
10
14
  loadConfig,
15
+ requireConfig,
11
16
  saveConfig,
17
+ studioQuery,
12
18
  validateApiResponse,
13
19
  withAdmissionReceipt
14
- } from "./chunk-6GR7BQDV.js";
20
+ } from "./chunk-O3BUN66P.js";
15
21
  import {
16
22
  BUILD_COMMIT,
17
23
  PACKAGE_VERSION,
18
24
  PRODUCTION_APP_URL,
19
25
  PRODUCTION_SUPABASE_URL
20
- } from "./chunk-ACBYTWXK.js";
26
+ } from "./chunk-7SNCVSTA.js";
21
27
  import {
22
28
  __commonJS,
23
29
  __export,
24
30
  __toESM
25
31
  } from "./chunk-77HVPD4G.js";
26
32
 
27
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/code.js
33
+ // node_modules/ajv/dist/compile/codegen/code.js
28
34
  var require_code = __commonJS({
29
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/code.js"(exports) {
35
+ "node_modules/ajv/dist/compile/codegen/code.js"(exports) {
30
36
  "use strict";
31
37
  Object.defineProperty(exports, "__esModule", { value: true });
32
38
  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;
@@ -178,9 +184,9 @@ var require_code = __commonJS({
178
184
  }
179
185
  });
180
186
 
181
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/scope.js
187
+ // node_modules/ajv/dist/compile/codegen/scope.js
182
188
  var require_scope = __commonJS({
183
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
189
+ "node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
184
190
  "use strict";
185
191
  Object.defineProperty(exports, "__esModule", { value: true });
186
192
  exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
@@ -323,9 +329,9 @@ var require_scope = __commonJS({
323
329
  }
324
330
  });
325
331
 
326
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/index.js
332
+ // node_modules/ajv/dist/compile/codegen/index.js
327
333
  var require_codegen = __commonJS({
328
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/codegen/index.js"(exports) {
334
+ "node_modules/ajv/dist/compile/codegen/index.js"(exports) {
329
335
  "use strict";
330
336
  Object.defineProperty(exports, "__esModule", { value: true });
331
337
  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;
@@ -1043,9 +1049,9 @@ var require_codegen = __commonJS({
1043
1049
  }
1044
1050
  });
1045
1051
 
1046
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/util.js
1052
+ // node_modules/ajv/dist/compile/util.js
1047
1053
  var require_util = __commonJS({
1048
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/util.js"(exports) {
1054
+ "node_modules/ajv/dist/compile/util.js"(exports) {
1049
1055
  "use strict";
1050
1056
  Object.defineProperty(exports, "__esModule", { value: true });
1051
1057
  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;
@@ -1210,9 +1216,9 @@ var require_util = __commonJS({
1210
1216
  }
1211
1217
  });
1212
1218
 
1213
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/names.js
1219
+ // node_modules/ajv/dist/compile/names.js
1214
1220
  var require_names = __commonJS({
1215
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/names.js"(exports) {
1221
+ "node_modules/ajv/dist/compile/names.js"(exports) {
1216
1222
  "use strict";
1217
1223
  Object.defineProperty(exports, "__esModule", { value: true });
1218
1224
  var codegen_1 = require_codegen();
@@ -1249,9 +1255,9 @@ var require_names = __commonJS({
1249
1255
  }
1250
1256
  });
1251
1257
 
1252
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/errors.js
1258
+ // node_modules/ajv/dist/compile/errors.js
1253
1259
  var require_errors = __commonJS({
1254
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/errors.js"(exports) {
1260
+ "node_modules/ajv/dist/compile/errors.js"(exports) {
1255
1261
  "use strict";
1256
1262
  Object.defineProperty(exports, "__esModule", { value: true });
1257
1263
  exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
@@ -1371,9 +1377,9 @@ var require_errors = __commonJS({
1371
1377
  }
1372
1378
  });
1373
1379
 
1374
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/boolSchema.js
1380
+ // node_modules/ajv/dist/compile/validate/boolSchema.js
1375
1381
  var require_boolSchema = __commonJS({
1376
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
1382
+ "node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
1377
1383
  "use strict";
1378
1384
  Object.defineProperty(exports, "__esModule", { value: true });
1379
1385
  exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
@@ -1422,9 +1428,9 @@ var require_boolSchema = __commonJS({
1422
1428
  }
1423
1429
  });
1424
1430
 
1425
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/rules.js
1431
+ // node_modules/ajv/dist/compile/rules.js
1426
1432
  var require_rules = __commonJS({
1427
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/rules.js"(exports) {
1433
+ "node_modules/ajv/dist/compile/rules.js"(exports) {
1428
1434
  "use strict";
1429
1435
  Object.defineProperty(exports, "__esModule", { value: true });
1430
1436
  exports.getRules = exports.isJSONType = void 0;
@@ -1453,9 +1459,9 @@ var require_rules = __commonJS({
1453
1459
  }
1454
1460
  });
1455
1461
 
1456
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/applicability.js
1462
+ // node_modules/ajv/dist/compile/validate/applicability.js
1457
1463
  var require_applicability = __commonJS({
1458
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
1464
+ "node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
1459
1465
  "use strict";
1460
1466
  Object.defineProperty(exports, "__esModule", { value: true });
1461
1467
  exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
@@ -1476,9 +1482,9 @@ var require_applicability = __commonJS({
1476
1482
  }
1477
1483
  });
1478
1484
 
1479
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/dataType.js
1485
+ // node_modules/ajv/dist/compile/validate/dataType.js
1480
1486
  var require_dataType = __commonJS({
1481
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
1487
+ "node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
1482
1488
  "use strict";
1483
1489
  Object.defineProperty(exports, "__esModule", { value: true });
1484
1490
  exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
@@ -1660,9 +1666,9 @@ var require_dataType = __commonJS({
1660
1666
  }
1661
1667
  });
1662
1668
 
1663
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/defaults.js
1669
+ // node_modules/ajv/dist/compile/validate/defaults.js
1664
1670
  var require_defaults = __commonJS({
1665
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
1671
+ "node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
1666
1672
  "use strict";
1667
1673
  Object.defineProperty(exports, "__esModule", { value: true });
1668
1674
  exports.assignDefaults = void 0;
@@ -1697,9 +1703,9 @@ var require_defaults = __commonJS({
1697
1703
  }
1698
1704
  });
1699
1705
 
1700
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/code.js
1706
+ // node_modules/ajv/dist/vocabularies/code.js
1701
1707
  var require_code2 = __commonJS({
1702
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/code.js"(exports) {
1708
+ "node_modules/ajv/dist/vocabularies/code.js"(exports) {
1703
1709
  "use strict";
1704
1710
  Object.defineProperty(exports, "__esModule", { value: true });
1705
1711
  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;
@@ -1830,9 +1836,9 @@ var require_code2 = __commonJS({
1830
1836
  }
1831
1837
  });
1832
1838
 
1833
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/keyword.js
1839
+ // node_modules/ajv/dist/compile/validate/keyword.js
1834
1840
  var require_keyword = __commonJS({
1835
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
1841
+ "node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
1836
1842
  "use strict";
1837
1843
  Object.defineProperty(exports, "__esModule", { value: true });
1838
1844
  exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
@@ -1948,9 +1954,9 @@ var require_keyword = __commonJS({
1948
1954
  }
1949
1955
  });
1950
1956
 
1951
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/subschema.js
1957
+ // node_modules/ajv/dist/compile/validate/subschema.js
1952
1958
  var require_subschema = __commonJS({
1953
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
1959
+ "node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
1954
1960
  "use strict";
1955
1961
  Object.defineProperty(exports, "__esModule", { value: true });
1956
1962
  exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
@@ -2031,9 +2037,9 @@ var require_subschema = __commonJS({
2031
2037
  }
2032
2038
  });
2033
2039
 
2034
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-deep-equal/index.js
2040
+ // node_modules/fast-deep-equal/index.js
2035
2041
  var require_fast_deep_equal = __commonJS({
2036
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-deep-equal/index.js"(exports, module) {
2042
+ "node_modules/fast-deep-equal/index.js"(exports, module) {
2037
2043
  "use strict";
2038
2044
  module.exports = function equal(a, b) {
2039
2045
  if (a === b) return true;
@@ -2066,9 +2072,9 @@ var require_fast_deep_equal = __commonJS({
2066
2072
  }
2067
2073
  });
2068
2074
 
2069
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/json-schema-traverse/index.js
2075
+ // node_modules/json-schema-traverse/index.js
2070
2076
  var require_json_schema_traverse = __commonJS({
2071
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/json-schema-traverse/index.js"(exports, module) {
2077
+ "node_modules/json-schema-traverse/index.js"(exports, module) {
2072
2078
  "use strict";
2073
2079
  var traverse = module.exports = function(schema, opts, cb) {
2074
2080
  if (typeof opts == "function") {
@@ -2154,9 +2160,9 @@ var require_json_schema_traverse = __commonJS({
2154
2160
  }
2155
2161
  });
2156
2162
 
2157
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/resolve.js
2163
+ // node_modules/ajv/dist/compile/resolve.js
2158
2164
  var require_resolve = __commonJS({
2159
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/resolve.js"(exports) {
2165
+ "node_modules/ajv/dist/compile/resolve.js"(exports) {
2160
2166
  "use strict";
2161
2167
  Object.defineProperty(exports, "__esModule", { value: true });
2162
2168
  exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
@@ -2310,9 +2316,9 @@ var require_resolve = __commonJS({
2310
2316
  }
2311
2317
  });
2312
2318
 
2313
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/index.js
2319
+ // node_modules/ajv/dist/compile/validate/index.js
2314
2320
  var require_validate = __commonJS({
2315
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/validate/index.js"(exports) {
2321
+ "node_modules/ajv/dist/compile/validate/index.js"(exports) {
2316
2322
  "use strict";
2317
2323
  Object.defineProperty(exports, "__esModule", { value: true });
2318
2324
  exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
@@ -2818,9 +2824,9 @@ var require_validate = __commonJS({
2818
2824
  }
2819
2825
  });
2820
2826
 
2821
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/validation_error.js
2827
+ // node_modules/ajv/dist/runtime/validation_error.js
2822
2828
  var require_validation_error = __commonJS({
2823
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/validation_error.js"(exports) {
2829
+ "node_modules/ajv/dist/runtime/validation_error.js"(exports) {
2824
2830
  "use strict";
2825
2831
  Object.defineProperty(exports, "__esModule", { value: true });
2826
2832
  var ValidationError = class extends Error {
@@ -2834,9 +2840,9 @@ var require_validation_error = __commonJS({
2834
2840
  }
2835
2841
  });
2836
2842
 
2837
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/ref_error.js
2843
+ // node_modules/ajv/dist/compile/ref_error.js
2838
2844
  var require_ref_error = __commonJS({
2839
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/ref_error.js"(exports) {
2845
+ "node_modules/ajv/dist/compile/ref_error.js"(exports) {
2840
2846
  "use strict";
2841
2847
  Object.defineProperty(exports, "__esModule", { value: true });
2842
2848
  var resolve_1 = require_resolve();
@@ -2851,9 +2857,9 @@ var require_ref_error = __commonJS({
2851
2857
  }
2852
2858
  });
2853
2859
 
2854
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/index.js
2860
+ // node_modules/ajv/dist/compile/index.js
2855
2861
  var require_compile = __commonJS({
2856
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/compile/index.js"(exports) {
2862
+ "node_modules/ajv/dist/compile/index.js"(exports) {
2857
2863
  "use strict";
2858
2864
  Object.defineProperty(exports, "__esModule", { value: true });
2859
2865
  exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
@@ -3075,9 +3081,9 @@ var require_compile = __commonJS({
3075
3081
  }
3076
3082
  });
3077
3083
 
3078
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/refs/data.json
3084
+ // node_modules/ajv/dist/refs/data.json
3079
3085
  var require_data = __commonJS({
3080
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/refs/data.json"(exports, module) {
3086
+ "node_modules/ajv/dist/refs/data.json"(exports, module) {
3081
3087
  module.exports = {
3082
3088
  $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
3083
3089
  description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
@@ -3094,15 +3100,34 @@ var require_data = __commonJS({
3094
3100
  }
3095
3101
  });
3096
3102
 
3097
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/lib/utils.js
3103
+ // node_modules/fast-uri/lib/utils.js
3098
3104
  var require_utils = __commonJS({
3099
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/lib/utils.js"(exports, module) {
3105
+ "node_modules/fast-uri/lib/utils.js"(exports, module) {
3100
3106
  "use strict";
3101
3107
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3102
3108
  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);
3109
+ var isPort = RegExp.prototype.test.bind(/^\d*$/u);
3103
3110
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3104
3111
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3105
- var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3112
+ var isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u);
3113
+ var isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u);
3114
+ var isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u);
3115
+ var BYTE_HEX = new Array(256);
3116
+ {
3117
+ const HEX_DIGITS = "0123456789ABCDEF";
3118
+ for (let i = 0; i < 256; i++) {
3119
+ BYTE_HEX[i] = "%" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];
3120
+ }
3121
+ }
3122
+ function percentEncodeNonAscii(cp) {
3123
+ if (cp < 2048) {
3124
+ return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];
3125
+ }
3126
+ if (cp < 65536) {
3127
+ return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3128
+ }
3129
+ return BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];
3130
+ }
3106
3131
  function stringArrayToHexStripped(input) {
3107
3132
  let acc = "";
3108
3133
  let code = 0;
@@ -3127,91 +3152,105 @@ var require_utils = __commonJS({
3127
3152
  }
3128
3153
  return acc;
3129
3154
  }
3155
+ var isHextet = RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/);
3156
+ var isIPvFuture = RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/);
3157
+ var isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/);
3130
3158
  var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
3131
- function consumeIsZone(buffer) {
3132
- buffer.length = 0;
3133
- return true;
3134
- }
3135
- function consumeHextets(buffer, address, output) {
3136
- if (buffer.length) {
3137
- const hex3 = stringArrayToHexStripped(buffer);
3138
- if (hex3 !== "") {
3139
- address.push(hex3);
3140
- } else {
3141
- output.error = true;
3142
- return false;
3159
+ function isZoneIdentifier(zone) {
3160
+ if (zone.length === 0) return false;
3161
+ for (let i = 0; i < zone.length; i++) {
3162
+ if (isZoneCharacter(zone[i])) continue;
3163
+ if (zone[i] === "%" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {
3164
+ i += 2;
3165
+ continue;
3143
3166
  }
3144
- buffer.length = 0;
3167
+ return false;
3145
3168
  }
3146
3169
  return true;
3147
3170
  }
3148
- function getIPV6(input) {
3149
- let tokenCount = 0;
3150
- const output = { error: false, address: "", zone: "" };
3151
- const address = [];
3152
- const buffer = [];
3153
- let endipv6Encountered = false;
3154
- let endIpv6 = false;
3155
- let consume = consumeHextets;
3156
- for (let i = 0; i < input.length; i++) {
3157
- const cursor = input[i];
3158
- if (cursor === "[" || cursor === "]") {
3159
- continue;
3160
- }
3161
- if (cursor === ":") {
3162
- if (endipv6Encountered === true) {
3163
- endIpv6 = true;
3164
- }
3165
- if (!consume(buffer, address, output)) {
3166
- break;
3171
+ function compressIPv6ZeroRun(hextets) {
3172
+ let bestStart = -1;
3173
+ let bestLength = 0;
3174
+ let runStart = -1;
3175
+ let runLength = 0;
3176
+ for (let i = 0; i < hextets.length; i++) {
3177
+ if (hextets[i] === "0") {
3178
+ if (runStart === -1) runStart = i;
3179
+ runLength++;
3180
+ if (runLength > bestLength) {
3181
+ bestLength = runLength;
3182
+ bestStart = runStart;
3167
3183
  }
3168
- if (++tokenCount > 7) {
3169
- output.error = true;
3170
- break;
3171
- }
3172
- if (i > 0 && input[i - 1] === ":") {
3173
- endipv6Encountered = true;
3174
- }
3175
- address.push(":");
3176
- continue;
3177
- } else if (cursor === "%") {
3178
- if (!consume(buffer, address, output)) {
3179
- break;
3180
- }
3181
- consume = consumeIsZone;
3182
3184
  } else {
3183
- buffer.push(cursor);
3185
+ runStart = -1;
3186
+ runLength = 0;
3187
+ }
3188
+ }
3189
+ if (bestLength < 2) return hextets.join(":");
3190
+ const head = hextets.slice(0, bestStart).join(":");
3191
+ const tail = hextets.slice(bestStart + bestLength).join(":");
3192
+ return head + "::" + tail;
3193
+ }
3194
+ function normalizeIPv6Address(input) {
3195
+ const compression = input.indexOf("::");
3196
+ if (compression !== -1 && input.indexOf("::", compression + 1) !== -1) return void 0;
3197
+ const left = compression === -1 ? input.split(":") : input.slice(0, compression).split(":");
3198
+ const right = compression === -1 ? [] : input.slice(compression + 2).split(":");
3199
+ if (compression !== -1) {
3200
+ if (left.length === 1 && left[0] === "") left.length = 0;
3201
+ if (right.length === 1 && right[0] === "") right.length = 0;
3202
+ }
3203
+ const parts = left.concat(right);
3204
+ let hextetCount = 0;
3205
+ for (let i = 0; i < parts.length; i++) {
3206
+ const part = parts[i];
3207
+ if (part === "") return void 0;
3208
+ if (part.indexOf(".") !== -1) {
3209
+ if (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;
3210
+ hextetCount += 2;
3184
3211
  continue;
3185
3212
  }
3213
+ if (!isHextet(part)) return void 0;
3214
+ parts[i] = parseInt(part, 16).toString(16);
3215
+ hextetCount++;
3186
3216
  }
3187
- if (buffer.length) {
3188
- if (consume === consumeIsZone) {
3189
- output.zone = buffer.join("");
3190
- } else if (endIpv6) {
3191
- address.push(buffer.join(""));
3192
- } else {
3193
- address.push(stringArrayToHexStripped(buffer));
3194
- }
3217
+ if (compression === -1) {
3218
+ if (hextetCount !== 8) return void 0;
3219
+ return compressIPv6ZeroRun(parts);
3195
3220
  }
3196
- output.address = address.join("");
3197
- return output;
3221
+ if (hextetCount >= 8) return void 0;
3222
+ const expanded = parts.slice(0, left.length);
3223
+ for (let i = hextetCount; i < 8; i++) expanded.push("0");
3224
+ for (let i = left.length; i < parts.length; i++) expanded.push(parts[i]);
3225
+ return compressIPv6ZeroRun(expanded);
3198
3226
  }
3199
3227
  function normalizeIPv6(host) {
3200
- if (findToken(host, ":") < 2) {
3201
- return { host, isIPV6: false };
3202
- }
3203
- const ipv63 = getIPV6(host);
3204
- if (!ipv63.error) {
3205
- let newHost = ipv63.address;
3206
- let escapedHost = ipv63.address;
3207
- if (ipv63.zone) {
3208
- newHost += "%" + ipv63.zone;
3209
- escapedHost += "%25" + ipv63.zone;
3210
- }
3211
- return { host: newHost, isIPV6: true, escapedHost };
3212
- } else {
3213
- return { host, isIPV6: false };
3214
- }
3228
+ const bracketed = host[0] === "[" && host[host.length - 1] === "]";
3229
+ const hasBracket = host[0] === "[" || host[host.length - 1] === "]";
3230
+ if (hasBracket && !bracketed) return { host, isIPV6: false, error: true };
3231
+ let input = bracketed ? host.slice(1, -1) : host;
3232
+ if (bracketed && isIPvFuture(input)) {
3233
+ input = input.toLowerCase();
3234
+ return { host: `[${input}]`, escapedHost: input, isIPV6: false, isIPVFuture: true };
3235
+ }
3236
+ if (findToken(input, ":") < 2) {
3237
+ return { host, isIPV6: false, error: bracketed };
3238
+ }
3239
+ let zoneIdentifier = "";
3240
+ const zoneSeparator = input.indexOf("%");
3241
+ if (zoneSeparator !== -1) {
3242
+ const separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === "%25" ? 3 : 1;
3243
+ zoneIdentifier = input.slice(zoneSeparator + separatorLength);
3244
+ if (!isZoneIdentifier(zoneIdentifier)) return { host, isIPV6: false, error: true };
3245
+ input = input.slice(0, zoneSeparator);
3246
+ }
3247
+ const address = normalizeIPv6Address(input);
3248
+ if (address === void 0) return { host, isIPV6: false, error: true };
3249
+ return {
3250
+ host: address + (zoneIdentifier ? "%" + zoneIdentifier : ""),
3251
+ escapedHost: address + (zoneIdentifier ? "%25" + zoneIdentifier : ""),
3252
+ isIPV6: true
3253
+ };
3215
3254
  }
3216
3255
  function findToken(str, token) {
3217
3256
  let ind = 0;
@@ -3220,8 +3259,8 @@ var require_utils = __commonJS({
3220
3259
  }
3221
3260
  return ind;
3222
3261
  }
3223
- function removeDotSegments(path6) {
3224
- let input = path6;
3262
+ function removeDotSegments(path7) {
3263
+ let input = path7;
3225
3264
  const output = [];
3226
3265
  let nextSlash = -1;
3227
3266
  let len = 0;
@@ -3330,7 +3369,8 @@ var require_utils = __commonJS({
3330
3369
  function normalizePathEncoding(input) {
3331
3370
  let output = "";
3332
3371
  for (let i = 0; i < input.length; i++) {
3333
- if (input[i] === "%" && i + 2 < input.length) {
3372
+ const ch = input[i];
3373
+ if (ch === "%" && i + 2 < input.length) {
3334
3374
  const hex3 = input.slice(i + 1, i + 3);
3335
3375
  if (isHexPair(hex3)) {
3336
3376
  const normalizedHex = hex3.toUpperCase();
@@ -3344,10 +3384,152 @@ var require_utils = __commonJS({
3344
3384
  continue;
3345
3385
  }
3346
3386
  }
3347
- if (isPathCharacter(input[i])) {
3348
- output += input[i];
3387
+ if (isPathCharacter(ch)) {
3388
+ output += ch;
3389
+ } else {
3390
+ const code = input.charCodeAt(i);
3391
+ if (code < 128) {
3392
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3393
+ } else if (code < 55296 || code > 57343) {
3394
+ output += percentEncodeNonAscii(code);
3395
+ } else if (code <= 56319 && i + 1 < input.length) {
3396
+ const low = input.charCodeAt(i + 1);
3397
+ if (low >= 56320 && low <= 57343) {
3398
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3399
+ i++;
3400
+ } else {
3401
+ output += percentEncodeNonAscii(65533);
3402
+ }
3403
+ } else {
3404
+ output += percentEncodeNonAscii(65533);
3405
+ }
3406
+ }
3407
+ }
3408
+ return output;
3409
+ }
3410
+ function serializePathEncoding(input, pathNoScheme = false) {
3411
+ let output = "";
3412
+ let firstSegment = pathNoScheme && input[0] !== "/";
3413
+ for (let i = 0; i < input.length; i++) {
3414
+ const ch = input[i];
3415
+ if (ch === "%" && i + 2 < input.length) {
3416
+ const hex3 = input.slice(i + 1, i + 3);
3417
+ if (isHexPair(hex3)) {
3418
+ output += "%" + hex3.toUpperCase();
3419
+ i += 2;
3420
+ continue;
3421
+ }
3422
+ }
3423
+ if (ch === "/") {
3424
+ firstSegment = false;
3425
+ }
3426
+ if (isPathCharacter(ch) && (ch !== ":" || !firstSegment)) {
3427
+ output += ch;
3428
+ } else {
3429
+ const code = input.charCodeAt(i);
3430
+ if (code < 128) {
3431
+ output += BYTE_HEX[code];
3432
+ } else if (code < 55296 || code > 57343) {
3433
+ output += percentEncodeNonAscii(code);
3434
+ } else if (code <= 56319 && i + 1 < input.length) {
3435
+ const low = input.charCodeAt(i + 1);
3436
+ if (low >= 56320 && low <= 57343) {
3437
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3438
+ i++;
3439
+ } else {
3440
+ output += percentEncodeNonAscii(65533);
3441
+ }
3442
+ } else {
3443
+ output += percentEncodeNonAscii(65533);
3444
+ }
3445
+ }
3446
+ }
3447
+ return output;
3448
+ }
3449
+ function encodeComponent(input, isAllowed) {
3450
+ let output = "";
3451
+ for (let i = 0; i < input.length; i++) {
3452
+ const ch = input[i];
3453
+ if (ch === "%" && i + 2 < input.length) {
3454
+ const hex3 = input.slice(i + 1, i + 3);
3455
+ if (isHexPair(hex3)) {
3456
+ output += "%" + hex3.toUpperCase();
3457
+ i += 2;
3458
+ continue;
3459
+ }
3460
+ }
3461
+ if (isAllowed(ch)) {
3462
+ output += ch;
3463
+ } else {
3464
+ const code = input.charCodeAt(i);
3465
+ if (code < 128) {
3466
+ output += BYTE_HEX[code];
3467
+ } else if (code < 55296 || code > 57343) {
3468
+ output += percentEncodeNonAscii(code);
3469
+ } else if (code <= 56319 && i + 1 < input.length) {
3470
+ const low = input.charCodeAt(i + 1);
3471
+ if (low >= 56320 && low <= 57343) {
3472
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3473
+ i++;
3474
+ } else {
3475
+ output += percentEncodeNonAscii(65533);
3476
+ }
3477
+ } else {
3478
+ output += percentEncodeNonAscii(65533);
3479
+ }
3480
+ }
3481
+ }
3482
+ return output;
3483
+ }
3484
+ function encodeUserinfo(input) {
3485
+ return encodeComponent(input, isUserinfoCharacter);
3486
+ }
3487
+ function encodeQuery(input) {
3488
+ return encodeComponent(input, isQueryFragmentCharacter);
3489
+ }
3490
+ function encodeFragment(input) {
3491
+ return encodeComponent(input, isQueryFragmentCharacter);
3492
+ }
3493
+ function isEscapeSafe(cp) {
3494
+ return cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;
3495
+ }
3496
+ function normalizeQueryFragmentEncoding(input) {
3497
+ let output = "";
3498
+ for (let i = 0; i < input.length; i++) {
3499
+ const ch = input[i];
3500
+ if (ch === "%" && i + 2 < input.length) {
3501
+ const hex3 = input.slice(i + 1, i + 3);
3502
+ if (isHexPair(hex3)) {
3503
+ const normalizedHex = hex3.toUpperCase();
3504
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3505
+ if (isUnreserved(decoded)) {
3506
+ output += decoded;
3507
+ } else {
3508
+ output += "%" + normalizedHex;
3509
+ }
3510
+ i += 2;
3511
+ continue;
3512
+ }
3513
+ }
3514
+ if (isQueryFragmentCharacter(ch)) {
3515
+ output += ch;
3349
3516
  } else {
3350
- output += escape(input[i]);
3517
+ const code = input.charCodeAt(i);
3518
+ if (code < 128) {
3519
+ output += isEscapeSafe(code) ? ch : BYTE_HEX[code];
3520
+ } else if (code < 55296 || code > 57343) {
3521
+ output += percentEncodeNonAscii(code);
3522
+ } else if (code <= 56319 && i + 1 < input.length) {
3523
+ const low = input.charCodeAt(i + 1);
3524
+ if (low >= 56320 && low <= 57343) {
3525
+ output += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));
3526
+ i++;
3527
+ } else {
3528
+ output += percentEncodeNonAscii(65533);
3529
+ }
3530
+ } else {
3531
+ output += percentEncodeNonAscii(65533);
3532
+ }
3351
3533
  }
3352
3534
  }
3353
3535
  return output;
@@ -3370,14 +3552,18 @@ var require_utils = __commonJS({
3370
3552
  function recomposeAuthority(component) {
3371
3553
  const uriTokens = [];
3372
3554
  if (component.userinfo !== void 0) {
3373
- uriTokens.push(component.userinfo);
3555
+ uriTokens.push(encodeUserinfo(component.userinfo));
3374
3556
  uriTokens.push("@");
3375
3557
  }
3376
3558
  if (component.host !== void 0) {
3377
- let host = unescape(component.host);
3559
+ let host = component.host;
3378
3560
  if (!isIPv4(host)) {
3379
- const ipV6res = normalizeIPv6(host);
3380
- if (ipV6res.isIPV6 === true) {
3561
+ let ipV6res = normalizeIPv6(host);
3562
+ if (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {
3563
+ host = normalizePercentEncoding(host, true);
3564
+ ipV6res = normalizeIPv6(host);
3565
+ }
3566
+ if (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) {
3381
3567
  host = `[${ipV6res.escapedHost}]`;
3382
3568
  } else {
3383
3569
  host = reescapeHostDelimiters(host, false);
@@ -3386,8 +3572,12 @@ var require_utils = __commonJS({
3386
3572
  uriTokens.push(host);
3387
3573
  }
3388
3574
  if (typeof component.port === "number" || typeof component.port === "string") {
3575
+ const port = String(component.port);
3576
+ if (!isPort(port)) {
3577
+ throw new TypeError("URI port is malformed.");
3578
+ }
3389
3579
  uriTokens.push(":");
3390
- uriTokens.push(String(component.port));
3580
+ uriTokens.push(port);
3391
3581
  }
3392
3582
  return uriTokens.length ? uriTokens.join("") : void 0;
3393
3583
  }
@@ -3397,6 +3587,11 @@ var require_utils = __commonJS({
3397
3587
  reescapeHostDelimiters,
3398
3588
  normalizePercentEncoding,
3399
3589
  normalizePathEncoding,
3590
+ serializePathEncoding,
3591
+ normalizeQueryFragmentEncoding,
3592
+ encodeUserinfo,
3593
+ encodeQuery,
3594
+ encodeFragment,
3400
3595
  escapePreservingEscapes,
3401
3596
  removeDotSegments,
3402
3597
  isIPv4,
@@ -3407,12 +3602,12 @@ var require_utils = __commonJS({
3407
3602
  }
3408
3603
  });
3409
3604
 
3410
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/lib/schemes.js
3605
+ // node_modules/fast-uri/lib/schemes.js
3411
3606
  var require_schemes = __commonJS({
3412
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3607
+ "node_modules/fast-uri/lib/schemes.js"(exports, module) {
3413
3608
  "use strict";
3414
3609
  var { isUUID } = require_utils();
3415
- var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
3610
+ var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
3416
3611
  var supportedSchemeNames = (
3417
3612
  /** @type {const} */
3418
3613
  [
@@ -3473,9 +3668,10 @@ var require_schemes = __commonJS({
3473
3668
  wsComponent.secure = void 0;
3474
3669
  }
3475
3670
  if (wsComponent.resourceName) {
3476
- const [path6, query] = wsComponent.resourceName.split("?");
3477
- wsComponent.path = path6 && path6 !== "/" ? path6 : void 0;
3478
- wsComponent.query = query;
3671
+ const queryIndex = wsComponent.resourceName.indexOf("?");
3672
+ const path7 = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);
3673
+ wsComponent.path = path7 && path7 !== "/" ? path7 : void 0;
3674
+ wsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);
3479
3675
  wsComponent.resourceName = void 0;
3480
3676
  }
3481
3677
  wsComponent.fragment = void 0;
@@ -3487,7 +3683,7 @@ var require_schemes = __commonJS({
3487
3683
  return urnComponent;
3488
3684
  }
3489
3685
  const matches = urnComponent.path.match(URN_REG);
3490
- if (matches) {
3686
+ if (matches && matches[0] === urnComponent.path) {
3491
3687
  const scheme = options.scheme || urnComponent.scheme || "urn";
3492
3688
  urnComponent.nid = matches[1].toLowerCase();
3493
3689
  urnComponent.nss = matches[2];
@@ -3617,12 +3813,21 @@ var require_schemes = __commonJS({
3617
3813
  }
3618
3814
  });
3619
3815
 
3620
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/index.js
3816
+ // node_modules/fast-uri/index.js
3621
3817
  var require_fast_uri = __commonJS({
3622
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/fast-uri/index.js"(exports, module) {
3818
+ "node_modules/fast-uri/index.js"(exports, module) {
3623
3819
  "use strict";
3624
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3820
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3625
3821
  var { SCHEMES, getSchemeHandler } = require_schemes();
3822
+ var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3823
+ var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
3824
+ function decodeValidScheme(scheme) {
3825
+ const decodedScheme = unescape(String(scheme));
3826
+ if (!VALID_SCHEME.test(decodedScheme)) {
3827
+ throw new TypeError(MALFORMED_SCHEME_ERROR);
3828
+ }
3829
+ return decodedScheme;
3830
+ }
3626
3831
  function normalize2(uri, options) {
3627
3832
  if (typeof uri === "string") {
3628
3833
  uri = /** @type {T} */
@@ -3635,12 +3840,34 @@ var require_fast_uri = __commonJS({
3635
3840
  }
3636
3841
  function resolve(baseURI, relativeURI, options) {
3637
3842
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3638
- const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3639
- const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3640
- if (baseMalformed || relativeMalformed) {
3843
+ const {
3844
+ parsed: baseParsed,
3845
+ malformedAuthorityOrPort: baseMalformed,
3846
+ malformedPercentEncoding: baseMalformedPercentEncoding,
3847
+ malformedSchemeSpecific: baseMalformedSchemeSpecific,
3848
+ malformedHost: baseMalformedHost,
3849
+ malformedScheme: baseMalformedScheme
3850
+ } = parseWithStatus(baseURI, schemelessOptions);
3851
+ const {
3852
+ parsed: relativeParsed,
3853
+ malformedAuthorityOrPort: relativeMalformed,
3854
+ malformedPercentEncoding: relativeMalformedPercentEncoding,
3855
+ malformedSchemeSpecific: relativeMalformedSchemeSpecific,
3856
+ malformedHost: relativeMalformedHost,
3857
+ malformedScheme: relativeMalformedScheme
3858
+ } = parseWithStatus(relativeURI, schemelessOptions);
3859
+ if (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) {
3641
3860
  throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3642
3861
  }
3643
3862
  const resolved2 = resolveComponent2(baseParsed, relativeParsed, schemelessOptions, true);
3863
+ const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved2.scheme);
3864
+ const resolvedHost = resolved2.host;
3865
+ const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
3866
+ canonicalizeHost(resolved2, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
3867
+ const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
3868
+ if (resolved2.error && !encodedASCIIHost) {
3869
+ throw new Error(resolved2.error);
3870
+ }
3644
3871
  schemelessOptions.skipEscape = true;
3645
3872
  return serialize(resolved2, schemelessOptions);
3646
3873
  }
@@ -3700,7 +3927,7 @@ var require_fast_uri = __commonJS({
3700
3927
  function equal(uriA, uriB, options) {
3701
3928
  const normalizedA = normalizeComparableURI(uriA, options);
3702
3929
  const normalizedB = normalizeComparableURI(uriB, options);
3703
- return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
3930
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;
3704
3931
  }
3705
3932
  function serialize(cmpts, opts) {
3706
3933
  const component = {
@@ -3721,19 +3948,22 @@ var require_fast_uri = __commonJS({
3721
3948
  };
3722
3949
  const options = Object.assign({}, opts);
3723
3950
  const uriTokens = [];
3951
+ if (component.scheme) {
3952
+ component.scheme = decodeValidScheme(component.scheme);
3953
+ }
3724
3954
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
3725
3955
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3956
+ const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
3957
+ const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
3726
3958
  if (component.path !== void 0) {
3727
3959
  if (!options.skipEscape) {
3728
- component.path = escapePreservingEscapes(component.path);
3729
- if (component.scheme !== void 0) {
3730
- component.path = component.path.split("%3A").join(":");
3731
- }
3960
+ component.path = serializePathEncoding(component.path, pathNoScheme);
3732
3961
  } else {
3733
3962
  component.path = normalizePercentEncoding(component.path);
3734
3963
  }
3735
3964
  }
3736
3965
  if (options.reference !== "suffix" && component.scheme) {
3966
+ component.scheme = decodeValidScheme(component.scheme);
3737
3967
  uriTokens.push(component.scheme, ":");
3738
3968
  }
3739
3969
  const authority = recomposeAuthority(component);
@@ -3751,16 +3981,19 @@ var require_fast_uri = __commonJS({
3751
3981
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
3752
3982
  s = removeDotSegments(s);
3753
3983
  }
3984
+ if (pathNoScheme) {
3985
+ s = serializePathEncoding(s, true);
3986
+ }
3754
3987
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
3755
3988
  s = "/%2F" + s.slice(2);
3756
3989
  }
3757
3990
  uriTokens.push(s);
3758
3991
  }
3759
3992
  if (component.query !== void 0) {
3760
- uriTokens.push("?", component.query);
3993
+ uriTokens.push("?", encodeQuery(component.query));
3761
3994
  }
3762
3995
  if (component.fragment !== void 0) {
3763
- uriTokens.push("#", component.fragment);
3996
+ uriTokens.push("#", encodeFragment(component.fragment));
3764
3997
  }
3765
3998
  return uriTokens.join("");
3766
3999
  }
@@ -3776,6 +4009,35 @@ var require_fast_uri = __commonJS({
3776
4009
  }
3777
4010
  return void 0;
3778
4011
  }
4012
+ function hasMalformedPercentEncoding(component) {
4013
+ if (component === void 0) return false;
4014
+ let percent = component.indexOf("%");
4015
+ while (percent !== -1) {
4016
+ if (percent + 2 >= component.length || !/^[\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) {
4017
+ return true;
4018
+ }
4019
+ percent = component.indexOf("%", percent + 3);
4020
+ }
4021
+ return false;
4022
+ }
4023
+ function isIPLiteral(host) {
4024
+ return host[0] === "[" && host[host.length - 1] === "]";
4025
+ }
4026
+ function hasMalformedComponentPercentEncoding(matches) {
4027
+ const host = matches[4];
4028
+ return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
4029
+ }
4030
+ function canonicalizeHost(parsed, options, schemeHandler, isIP) {
4031
+ if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4032
+ try {
4033
+ parsed.host = new URL("http://" + parsed.host).hostname;
4034
+ } catch (e) {
4035
+ parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
4036
+ return true;
4037
+ }
4038
+ }
4039
+ return false;
4040
+ }
3779
4041
  function parseWithStatus(uri, opts) {
3780
4042
  const options = Object.assign({}, opts);
3781
4043
  const parsed = {
@@ -3788,6 +4050,11 @@ var require_fast_uri = __commonJS({
3788
4050
  fragment: void 0
3789
4051
  };
3790
4052
  let malformedAuthorityOrPort = false;
4053
+ let malformedPercentEncoding = false;
4054
+ let malformedSchemeSpecific = false;
4055
+ let malformedHost = false;
4056
+ let malformedIPLiteral = false;
4057
+ let malformedScheme = false;
3791
4058
  let isIP = false;
3792
4059
  if (options.reference === "suffix") {
3793
4060
  if (options.scheme) {
@@ -3824,6 +4091,19 @@ var require_fast_uri = __commonJS({
3824
4091
  parsed.path = matches[6] || "";
3825
4092
  parsed.query = matches[7];
3826
4093
  parsed.fragment = matches[8];
4094
+ if (parsed.scheme !== void 0) {
4095
+ const decodedScheme = unescape(parsed.scheme);
4096
+ if (VALID_SCHEME.test(decodedScheme)) {
4097
+ parsed.scheme = decodedScheme.toLowerCase();
4098
+ } else {
4099
+ parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
4100
+ malformedScheme = true;
4101
+ }
4102
+ }
4103
+ malformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);
4104
+ if (malformedPercentEncoding) {
4105
+ parsed.error = parsed.error || "URI contains malformed percent-encoding.";
4106
+ }
3827
4107
  if (isNaN(parsed.port)) {
3828
4108
  parsed.port = matches[5];
3829
4109
  }
@@ -3835,9 +4115,16 @@ var require_fast_uri = __commonJS({
3835
4115
  if (parsed.host) {
3836
4116
  const ipv4result = isIPv4(parsed.host);
3837
4117
  if (ipv4result === false) {
4118
+ const bracketedIPLiteral = isIPLiteral(parsed.host);
4119
+ const hasIPLiteralBracket = parsed.host.indexOf("[") !== -1 || parsed.host.indexOf("]") !== -1;
3838
4120
  const ipv6result = normalizeIPv6(parsed.host);
3839
- parsed.host = ipv6result.host.toLowerCase();
3840
- isIP = ipv6result.isIPV6;
4121
+ isIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;
4122
+ malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
4123
+ parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
4124
+ if (malformedIPLiteral) {
4125
+ parsed.error = parsed.error || "URI host is malformed.";
4126
+ malformedAuthorityOrPort = true;
4127
+ }
3841
4128
  } else {
3842
4129
  isIP = true;
3843
4130
  }
@@ -3855,42 +4142,37 @@ var require_fast_uri = __commonJS({
3855
4142
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
3856
4143
  }
3857
4144
  const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
3858
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3859
- if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3860
- try {
3861
- parsed.host = new URL("http://" + parsed.host).hostname;
3862
- } catch (e) {
3863
- parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3864
- }
4145
+ if (!malformedIPLiteral) {
4146
+ malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);
4147
+ }
4148
+ if (uri.indexOf("%") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {
4149
+ let host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);
4150
+ if (!isIP) {
4151
+ host = normalizePercentEncoding(host.toLowerCase());
3865
4152
  }
4153
+ parsed.host = reescapeHostDelimiters(host, isIP);
3866
4154
  }
3867
4155
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
3868
- if (uri.indexOf("%") !== -1) {
3869
- if (parsed.scheme !== void 0) {
3870
- parsed.scheme = unescape(parsed.scheme);
3871
- }
3872
- if (parsed.host !== void 0) {
3873
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
3874
- }
3875
- }
3876
4156
  if (parsed.path) {
3877
4157
  parsed.path = normalizePathEncoding(parsed.path);
3878
4158
  }
4159
+ if (parsed.query) {
4160
+ parsed.query = normalizeQueryFragmentEncoding(parsed.query);
4161
+ }
3879
4162
  if (parsed.fragment) {
3880
- try {
3881
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3882
- } catch {
3883
- parsed.error = parsed.error || "URI malformed";
3884
- }
4163
+ parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);
3885
4164
  }
3886
4165
  }
3887
4166
  if (schemeHandler && schemeHandler.parse) {
3888
4167
  schemeHandler.parse(parsed, options);
4168
+ if (schemeHandler === SCHEMES.urn && parsed.nid === void 0) {
4169
+ malformedSchemeSpecific = true;
4170
+ }
3889
4171
  }
3890
4172
  } else {
3891
4173
  parsed.error = parsed.error || "URI can not be parsed.";
3892
4174
  }
3893
- return { parsed, malformedAuthorityOrPort };
4175
+ return { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme };
3894
4176
  }
3895
4177
  function parse4(uri, opts) {
3896
4178
  return parseWithStatus(uri, opts).parsed;
@@ -3899,20 +4181,28 @@ var require_fast_uri = __commonJS({
3899
4181
  return normalizeStringWithStatus(uri, opts).normalized;
3900
4182
  }
3901
4183
  function normalizeStringWithStatus(uri, opts) {
3902
- const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
4184
+ const { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);
3903
4185
  return {
3904
- normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
3905
- malformedAuthorityOrPort
4186
+ normalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),
4187
+ malformedAuthorityOrPort,
4188
+ malformedPercentEncoding,
4189
+ malformedSchemeSpecific,
4190
+ malformedHost,
4191
+ malformedScheme
3906
4192
  };
3907
4193
  }
3908
4194
  function normalizeComparableURI(uri, opts) {
3909
- if (typeof uri === "string") {
3910
- const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
3911
- return malformedAuthorityOrPort ? void 0 : normalized;
4195
+ if (typeof uri !== "string" && typeof uri !== "object") {
4196
+ return void 0;
3912
4197
  }
3913
- if (typeof uri === "object") {
3914
- return serialize(uri, opts);
4198
+ let value;
4199
+ try {
4200
+ value = typeof uri === "string" ? uri : serialize(uri, opts);
4201
+ } catch {
4202
+ return void 0;
3915
4203
  }
4204
+ const { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);
4205
+ return malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;
3916
4206
  }
3917
4207
  var fastUri = {
3918
4208
  SCHEMES,
@@ -3929,9 +4219,9 @@ var require_fast_uri = __commonJS({
3929
4219
  }
3930
4220
  });
3931
4221
 
3932
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/uri.js
4222
+ // node_modules/ajv/dist/runtime/uri.js
3933
4223
  var require_uri = __commonJS({
3934
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/uri.js"(exports) {
4224
+ "node_modules/ajv/dist/runtime/uri.js"(exports) {
3935
4225
  "use strict";
3936
4226
  Object.defineProperty(exports, "__esModule", { value: true });
3937
4227
  var uri = require_fast_uri();
@@ -3940,9 +4230,9 @@ var require_uri = __commonJS({
3940
4230
  }
3941
4231
  });
3942
4232
 
3943
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/core.js
4233
+ // node_modules/ajv/dist/core.js
3944
4234
  var require_core = __commonJS({
3945
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/core.js"(exports) {
4235
+ "node_modules/ajv/dist/core.js"(exports) {
3946
4236
  "use strict";
3947
4237
  Object.defineProperty(exports, "__esModule", { value: true });
3948
4238
  exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
@@ -4332,7 +4622,7 @@ var require_core = __commonJS({
4332
4622
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
4333
4623
  if (!errors || errors.length === 0)
4334
4624
  return "No errors";
4335
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
4625
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
4336
4626
  }
4337
4627
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
4338
4628
  const rules = this.RULES.all;
@@ -4551,9 +4841,9 @@ var require_core = __commonJS({
4551
4841
  }
4552
4842
  });
4553
4843
 
4554
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/id.js
4844
+ // node_modules/ajv/dist/vocabularies/core/id.js
4555
4845
  var require_id = __commonJS({
4556
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
4846
+ "node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
4557
4847
  "use strict";
4558
4848
  Object.defineProperty(exports, "__esModule", { value: true });
4559
4849
  var def = {
@@ -4566,9 +4856,9 @@ var require_id = __commonJS({
4566
4856
  }
4567
4857
  });
4568
4858
 
4569
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/ref.js
4859
+ // node_modules/ajv/dist/vocabularies/core/ref.js
4570
4860
  var require_ref = __commonJS({
4571
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
4861
+ "node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
4572
4862
  "use strict";
4573
4863
  Object.defineProperty(exports, "__esModule", { value: true });
4574
4864
  exports.callRef = exports.getValidate = void 0;
@@ -4688,9 +4978,9 @@ var require_ref = __commonJS({
4688
4978
  }
4689
4979
  });
4690
4980
 
4691
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/index.js
4981
+ // node_modules/ajv/dist/vocabularies/core/index.js
4692
4982
  var require_core2 = __commonJS({
4693
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
4983
+ "node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
4694
4984
  "use strict";
4695
4985
  Object.defineProperty(exports, "__esModule", { value: true });
4696
4986
  var id_1 = require_id();
@@ -4709,9 +4999,9 @@ var require_core2 = __commonJS({
4709
4999
  }
4710
5000
  });
4711
5001
 
4712
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
5002
+ // node_modules/ajv/dist/vocabularies/validation/limitNumber.js
4713
5003
  var require_limitNumber = __commonJS({
4714
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
5004
+ "node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
4715
5005
  "use strict";
4716
5006
  Object.defineProperty(exports, "__esModule", { value: true });
4717
5007
  var codegen_1 = require_codegen();
@@ -4741,9 +5031,9 @@ var require_limitNumber = __commonJS({
4741
5031
  }
4742
5032
  });
4743
5033
 
4744
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
5034
+ // node_modules/ajv/dist/vocabularies/validation/multipleOf.js
4745
5035
  var require_multipleOf = __commonJS({
4746
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
5036
+ "node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
4747
5037
  "use strict";
4748
5038
  Object.defineProperty(exports, "__esModule", { value: true });
4749
5039
  var codegen_1 = require_codegen();
@@ -4769,9 +5059,9 @@ var require_multipleOf = __commonJS({
4769
5059
  }
4770
5060
  });
4771
5061
 
4772
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/ucs2length.js
5062
+ // node_modules/ajv/dist/runtime/ucs2length.js
4773
5063
  var require_ucs2length = __commonJS({
4774
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
5064
+ "node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
4775
5065
  "use strict";
4776
5066
  Object.defineProperty(exports, "__esModule", { value: true });
4777
5067
  function ucs2length(str) {
@@ -4795,9 +5085,9 @@ var require_ucs2length = __commonJS({
4795
5085
  }
4796
5086
  });
4797
5087
 
4798
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitLength.js
5088
+ // node_modules/ajv/dist/vocabularies/validation/limitLength.js
4799
5089
  var require_limitLength = __commonJS({
4800
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
5090
+ "node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
4801
5091
  "use strict";
4802
5092
  Object.defineProperty(exports, "__esModule", { value: true });
4803
5093
  var codegen_1 = require_codegen();
@@ -4827,9 +5117,9 @@ var require_limitLength = __commonJS({
4827
5117
  }
4828
5118
  });
4829
5119
 
4830
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/pattern.js
5120
+ // node_modules/ajv/dist/vocabularies/validation/pattern.js
4831
5121
  var require_pattern = __commonJS({
4832
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
5122
+ "node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
4833
5123
  "use strict";
4834
5124
  Object.defineProperty(exports, "__esModule", { value: true });
4835
5125
  var code_1 = require_code2();
@@ -4864,9 +5154,9 @@ var require_pattern = __commonJS({
4864
5154
  }
4865
5155
  });
4866
5156
 
4867
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
5157
+ // node_modules/ajv/dist/vocabularies/validation/limitProperties.js
4868
5158
  var require_limitProperties = __commonJS({
4869
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
5159
+ "node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
4870
5160
  "use strict";
4871
5161
  Object.defineProperty(exports, "__esModule", { value: true });
4872
5162
  var codegen_1 = require_codegen();
@@ -4893,9 +5183,9 @@ var require_limitProperties = __commonJS({
4893
5183
  }
4894
5184
  });
4895
5185
 
4896
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/required.js
5186
+ // node_modules/ajv/dist/vocabularies/validation/required.js
4897
5187
  var require_required = __commonJS({
4898
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
5188
+ "node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
4899
5189
  "use strict";
4900
5190
  Object.defineProperty(exports, "__esModule", { value: true });
4901
5191
  var code_1 = require_code2();
@@ -4975,9 +5265,9 @@ var require_required = __commonJS({
4975
5265
  }
4976
5266
  });
4977
5267
 
4978
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitItems.js
5268
+ // node_modules/ajv/dist/vocabularies/validation/limitItems.js
4979
5269
  var require_limitItems = __commonJS({
4980
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
5270
+ "node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
4981
5271
  "use strict";
4982
5272
  Object.defineProperty(exports, "__esModule", { value: true });
4983
5273
  var codegen_1 = require_codegen();
@@ -5004,9 +5294,9 @@ var require_limitItems = __commonJS({
5004
5294
  }
5005
5295
  });
5006
5296
 
5007
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/equal.js
5297
+ // node_modules/ajv/dist/runtime/equal.js
5008
5298
  var require_equal = __commonJS({
5009
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/runtime/equal.js"(exports) {
5299
+ "node_modules/ajv/dist/runtime/equal.js"(exports) {
5010
5300
  "use strict";
5011
5301
  Object.defineProperty(exports, "__esModule", { value: true });
5012
5302
  var equal = require_fast_deep_equal();
@@ -5015,9 +5305,9 @@ var require_equal = __commonJS({
5015
5305
  }
5016
5306
  });
5017
5307
 
5018
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
5308
+ // node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
5019
5309
  var require_uniqueItems = __commonJS({
5020
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
5310
+ "node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
5021
5311
  "use strict";
5022
5312
  Object.defineProperty(exports, "__esModule", { value: true });
5023
5313
  var dataType_1 = require_dataType();
@@ -5082,9 +5372,9 @@ var require_uniqueItems = __commonJS({
5082
5372
  }
5083
5373
  });
5084
5374
 
5085
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/const.js
5375
+ // node_modules/ajv/dist/vocabularies/validation/const.js
5086
5376
  var require_const = __commonJS({
5087
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
5377
+ "node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
5088
5378
  "use strict";
5089
5379
  Object.defineProperty(exports, "__esModule", { value: true });
5090
5380
  var codegen_1 = require_codegen();
@@ -5111,9 +5401,9 @@ var require_const = __commonJS({
5111
5401
  }
5112
5402
  });
5113
5403
 
5114
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/enum.js
5404
+ // node_modules/ajv/dist/vocabularies/validation/enum.js
5115
5405
  var require_enum = __commonJS({
5116
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
5406
+ "node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
5117
5407
  "use strict";
5118
5408
  Object.defineProperty(exports, "__esModule", { value: true });
5119
5409
  var codegen_1 = require_codegen();
@@ -5160,9 +5450,9 @@ var require_enum = __commonJS({
5160
5450
  }
5161
5451
  });
5162
5452
 
5163
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/index.js
5453
+ // node_modules/ajv/dist/vocabularies/validation/index.js
5164
5454
  var require_validation = __commonJS({
5165
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
5455
+ "node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
5166
5456
  "use strict";
5167
5457
  Object.defineProperty(exports, "__esModule", { value: true });
5168
5458
  var limitNumber_1 = require_limitNumber();
@@ -5198,9 +5488,9 @@ var require_validation = __commonJS({
5198
5488
  }
5199
5489
  });
5200
5490
 
5201
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5491
+ // node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5202
5492
  var require_additionalItems = __commonJS({
5203
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
5493
+ "node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
5204
5494
  "use strict";
5205
5495
  Object.defineProperty(exports, "__esModule", { value: true });
5206
5496
  exports.validateAdditionalItems = void 0;
@@ -5251,9 +5541,9 @@ var require_additionalItems = __commonJS({
5251
5541
  }
5252
5542
  });
5253
5543
 
5254
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/items.js
5544
+ // node_modules/ajv/dist/vocabularies/applicator/items.js
5255
5545
  var require_items = __commonJS({
5256
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
5546
+ "node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
5257
5547
  "use strict";
5258
5548
  Object.defineProperty(exports, "__esModule", { value: true });
5259
5549
  exports.validateTuple = void 0;
@@ -5308,9 +5598,9 @@ var require_items = __commonJS({
5308
5598
  }
5309
5599
  });
5310
5600
 
5311
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5601
+ // node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
5312
5602
  var require_prefixItems = __commonJS({
5313
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
5603
+ "node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
5314
5604
  "use strict";
5315
5605
  Object.defineProperty(exports, "__esModule", { value: true });
5316
5606
  var items_1 = require_items();
@@ -5325,9 +5615,9 @@ var require_prefixItems = __commonJS({
5325
5615
  }
5326
5616
  });
5327
5617
 
5328
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/items2020.js
5618
+ // node_modules/ajv/dist/vocabularies/applicator/items2020.js
5329
5619
  var require_items2020 = __commonJS({
5330
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
5620
+ "node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
5331
5621
  "use strict";
5332
5622
  Object.defineProperty(exports, "__esModule", { value: true });
5333
5623
  var codegen_1 = require_codegen();
@@ -5360,9 +5650,9 @@ var require_items2020 = __commonJS({
5360
5650
  }
5361
5651
  });
5362
5652
 
5363
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/contains.js
5653
+ // node_modules/ajv/dist/vocabularies/applicator/contains.js
5364
5654
  var require_contains = __commonJS({
5365
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
5655
+ "node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
5366
5656
  "use strict";
5367
5657
  Object.defineProperty(exports, "__esModule", { value: true });
5368
5658
  var codegen_1 = require_codegen();
@@ -5454,9 +5744,9 @@ var require_contains = __commonJS({
5454
5744
  }
5455
5745
  });
5456
5746
 
5457
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5747
+ // node_modules/ajv/dist/vocabularies/applicator/dependencies.js
5458
5748
  var require_dependencies = __commonJS({
5459
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
5749
+ "node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
5460
5750
  "use strict";
5461
5751
  Object.defineProperty(exports, "__esModule", { value: true });
5462
5752
  exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
@@ -5548,9 +5838,9 @@ var require_dependencies = __commonJS({
5548
5838
  }
5549
5839
  });
5550
5840
 
5551
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5841
+ // node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
5552
5842
  var require_propertyNames = __commonJS({
5553
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
5843
+ "node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
5554
5844
  "use strict";
5555
5845
  Object.defineProperty(exports, "__esModule", { value: true });
5556
5846
  var codegen_1 = require_codegen();
@@ -5591,9 +5881,9 @@ var require_propertyNames = __commonJS({
5591
5881
  }
5592
5882
  });
5593
5883
 
5594
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5884
+ // node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
5595
5885
  var require_additionalProperties = __commonJS({
5596
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
5886
+ "node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
5597
5887
  "use strict";
5598
5888
  Object.defineProperty(exports, "__esModule", { value: true });
5599
5889
  var code_1 = require_code2();
@@ -5697,9 +5987,9 @@ var require_additionalProperties = __commonJS({
5697
5987
  }
5698
5988
  });
5699
5989
 
5700
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/properties.js
5990
+ // node_modules/ajv/dist/vocabularies/applicator/properties.js
5701
5991
  var require_properties = __commonJS({
5702
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
5992
+ "node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
5703
5993
  "use strict";
5704
5994
  Object.defineProperty(exports, "__esModule", { value: true });
5705
5995
  var validate_1 = require_validate();
@@ -5755,9 +6045,9 @@ var require_properties = __commonJS({
5755
6045
  }
5756
6046
  });
5757
6047
 
5758
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
6048
+ // node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
5759
6049
  var require_patternProperties = __commonJS({
5760
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
6050
+ "node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
5761
6051
  "use strict";
5762
6052
  Object.defineProperty(exports, "__esModule", { value: true });
5763
6053
  var code_1 = require_code2();
@@ -5829,9 +6119,9 @@ var require_patternProperties = __commonJS({
5829
6119
  }
5830
6120
  });
5831
6121
 
5832
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/not.js
6122
+ // node_modules/ajv/dist/vocabularies/applicator/not.js
5833
6123
  var require_not = __commonJS({
5834
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
6124
+ "node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
5835
6125
  "use strict";
5836
6126
  Object.defineProperty(exports, "__esModule", { value: true });
5837
6127
  var util_1 = require_util();
@@ -5860,9 +6150,9 @@ var require_not = __commonJS({
5860
6150
  }
5861
6151
  });
5862
6152
 
5863
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
6153
+ // node_modules/ajv/dist/vocabularies/applicator/anyOf.js
5864
6154
  var require_anyOf = __commonJS({
5865
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
6155
+ "node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
5866
6156
  "use strict";
5867
6157
  Object.defineProperty(exports, "__esModule", { value: true });
5868
6158
  var code_1 = require_code2();
@@ -5877,9 +6167,9 @@ var require_anyOf = __commonJS({
5877
6167
  }
5878
6168
  });
5879
6169
 
5880
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
6170
+ // node_modules/ajv/dist/vocabularies/applicator/oneOf.js
5881
6171
  var require_oneOf = __commonJS({
5882
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
6172
+ "node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
5883
6173
  "use strict";
5884
6174
  Object.defineProperty(exports, "__esModule", { value: true });
5885
6175
  var codegen_1 = require_codegen();
@@ -5935,9 +6225,9 @@ var require_oneOf = __commonJS({
5935
6225
  }
5936
6226
  });
5937
6227
 
5938
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/allOf.js
6228
+ // node_modules/ajv/dist/vocabularies/applicator/allOf.js
5939
6229
  var require_allOf = __commonJS({
5940
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
6230
+ "node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
5941
6231
  "use strict";
5942
6232
  Object.defineProperty(exports, "__esModule", { value: true });
5943
6233
  var util_1 = require_util();
@@ -5962,9 +6252,9 @@ var require_allOf = __commonJS({
5962
6252
  }
5963
6253
  });
5964
6254
 
5965
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/if.js
6255
+ // node_modules/ajv/dist/vocabularies/applicator/if.js
5966
6256
  var require_if = __commonJS({
5967
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
6257
+ "node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
5968
6258
  "use strict";
5969
6259
  Object.defineProperty(exports, "__esModule", { value: true });
5970
6260
  var codegen_1 = require_codegen();
@@ -6031,9 +6321,9 @@ var require_if = __commonJS({
6031
6321
  }
6032
6322
  });
6033
6323
 
6034
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
6324
+ // node_modules/ajv/dist/vocabularies/applicator/thenElse.js
6035
6325
  var require_thenElse = __commonJS({
6036
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
6326
+ "node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
6037
6327
  "use strict";
6038
6328
  Object.defineProperty(exports, "__esModule", { value: true });
6039
6329
  var util_1 = require_util();
@@ -6049,9 +6339,9 @@ var require_thenElse = __commonJS({
6049
6339
  }
6050
6340
  });
6051
6341
 
6052
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/index.js
6342
+ // node_modules/ajv/dist/vocabularies/applicator/index.js
6053
6343
  var require_applicator = __commonJS({
6054
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
6344
+ "node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
6055
6345
  "use strict";
6056
6346
  Object.defineProperty(exports, "__esModule", { value: true });
6057
6347
  var additionalItems_1 = require_additionalItems();
@@ -6097,9 +6387,9 @@ var require_applicator = __commonJS({
6097
6387
  }
6098
6388
  });
6099
6389
 
6100
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/format/format.js
6390
+ // node_modules/ajv/dist/vocabularies/format/format.js
6101
6391
  var require_format = __commonJS({
6102
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
6392
+ "node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
6103
6393
  "use strict";
6104
6394
  Object.defineProperty(exports, "__esModule", { value: true });
6105
6395
  var codegen_1 = require_codegen();
@@ -6187,9 +6477,9 @@ var require_format = __commonJS({
6187
6477
  }
6188
6478
  });
6189
6479
 
6190
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/format/index.js
6480
+ // node_modules/ajv/dist/vocabularies/format/index.js
6191
6481
  var require_format2 = __commonJS({
6192
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
6482
+ "node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
6193
6483
  "use strict";
6194
6484
  Object.defineProperty(exports, "__esModule", { value: true });
6195
6485
  var format_1 = require_format();
@@ -6198,9 +6488,9 @@ var require_format2 = __commonJS({
6198
6488
  }
6199
6489
  });
6200
6490
 
6201
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/metadata.js
6491
+ // node_modules/ajv/dist/vocabularies/metadata.js
6202
6492
  var require_metadata = __commonJS({
6203
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
6493
+ "node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
6204
6494
  "use strict";
6205
6495
  Object.defineProperty(exports, "__esModule", { value: true });
6206
6496
  exports.contentVocabulary = exports.metadataVocabulary = void 0;
@@ -6221,9 +6511,9 @@ var require_metadata = __commonJS({
6221
6511
  }
6222
6512
  });
6223
6513
 
6224
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/draft7.js
6514
+ // node_modules/ajv/dist/vocabularies/draft7.js
6225
6515
  var require_draft7 = __commonJS({
6226
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
6516
+ "node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
6227
6517
  "use strict";
6228
6518
  Object.defineProperty(exports, "__esModule", { value: true });
6229
6519
  var core_1 = require_core2();
@@ -6243,9 +6533,9 @@ var require_draft7 = __commonJS({
6243
6533
  }
6244
6534
  });
6245
6535
 
6246
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/discriminator/types.js
6536
+ // node_modules/ajv/dist/vocabularies/discriminator/types.js
6247
6537
  var require_types = __commonJS({
6248
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
6538
+ "node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
6249
6539
  "use strict";
6250
6540
  Object.defineProperty(exports, "__esModule", { value: true });
6251
6541
  exports.DiscrError = void 0;
@@ -6257,9 +6547,9 @@ var require_types = __commonJS({
6257
6547
  }
6258
6548
  });
6259
6549
 
6260
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/discriminator/index.js
6550
+ // node_modules/ajv/dist/vocabularies/discriminator/index.js
6261
6551
  var require_discriminator = __commonJS({
6262
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
6552
+ "node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
6263
6553
  "use strict";
6264
6554
  Object.defineProperty(exports, "__esModule", { value: true });
6265
6555
  var codegen_1 = require_codegen();
@@ -6362,9 +6652,9 @@ var require_discriminator = __commonJS({
6362
6652
  }
6363
6653
  });
6364
6654
 
6365
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/refs/json-schema-draft-07.json
6655
+ // node_modules/ajv/dist/refs/json-schema-draft-07.json
6366
6656
  var require_json_schema_draft_07 = __commonJS({
6367
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
6657
+ "node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports, module) {
6368
6658
  module.exports = {
6369
6659
  $schema: "http://json-schema.org/draft-07/schema#",
6370
6660
  $id: "http://json-schema.org/draft-07/schema#",
@@ -6519,9 +6809,9 @@ var require_json_schema_draft_07 = __commonJS({
6519
6809
  }
6520
6810
  });
6521
6811
 
6522
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/ajv.js
6812
+ // node_modules/ajv/dist/ajv.js
6523
6813
  var require_ajv = __commonJS({
6524
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv/dist/ajv.js"(exports, module) {
6814
+ "node_modules/ajv/dist/ajv.js"(exports, module) {
6525
6815
  "use strict";
6526
6816
  Object.defineProperty(exports, "__esModule", { value: true });
6527
6817
  exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
@@ -6589,9 +6879,9 @@ var require_ajv = __commonJS({
6589
6879
  }
6590
6880
  });
6591
6881
 
6592
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/formats.js
6882
+ // node_modules/ajv-formats/dist/formats.js
6593
6883
  var require_formats = __commonJS({
6594
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/formats.js"(exports) {
6884
+ "node_modules/ajv-formats/dist/formats.js"(exports) {
6595
6885
  "use strict";
6596
6886
  Object.defineProperty(exports, "__esModule", { value: true });
6597
6887
  exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
@@ -6792,9 +7082,9 @@ var require_formats = __commonJS({
6792
7082
  }
6793
7083
  });
6794
7084
 
6795
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/limit.js
7085
+ // node_modules/ajv-formats/dist/limit.js
6796
7086
  var require_limit = __commonJS({
6797
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/limit.js"(exports) {
7087
+ "node_modules/ajv-formats/dist/limit.js"(exports) {
6798
7088
  "use strict";
6799
7089
  Object.defineProperty(exports, "__esModule", { value: true });
6800
7090
  exports.formatLimitDefinition = void 0;
@@ -6864,9 +7154,9 @@ var require_limit = __commonJS({
6864
7154
  }
6865
7155
  });
6866
7156
 
6867
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/index.js
7157
+ // node_modules/ajv-formats/dist/index.js
6868
7158
  var require_dist = __commonJS({
6869
- "../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/ajv-formats/dist/index.js"(exports, module) {
7159
+ "node_modules/ajv-formats/dist/index.js"(exports, module) {
6870
7160
  "use strict";
6871
7161
  Object.defineProperty(exports, "__esModule", { value: true });
6872
7162
  var formats_1 = require_formats();
@@ -35549,9 +35839,9 @@ var require_lib4 = __commonJS({
35549
35839
  // src/mcp/stdio.ts
35550
35840
  import { readFileSync as readFileSync7 } from "node:fs";
35551
35841
  import { readFile as readFile4 } from "node:fs/promises";
35552
- import { fileURLToPath as fileURLToPath3 } from "node:url";
35842
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
35553
35843
 
35554
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/helpers/util.js
35844
+ // node_modules/zod/v3/helpers/util.js
35555
35845
  var util;
35556
35846
  (function(util2) {
35557
35847
  util2.assertEqual = (_) => {
@@ -35685,7 +35975,7 @@ var getParsedType = (data) => {
35685
35975
  }
35686
35976
  };
35687
35977
 
35688
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/ZodError.js
35978
+ // node_modules/zod/v3/ZodError.js
35689
35979
  var ZodIssueCode = util.arrayToEnum([
35690
35980
  "invalid_type",
35691
35981
  "invalid_literal",
@@ -35799,7 +36089,7 @@ ZodError.create = (issues) => {
35799
36089
  return error51;
35800
36090
  };
35801
36091
 
35802
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/locales/en.js
36092
+ // node_modules/zod/v3/locales/en.js
35803
36093
  var errorMap = (issue2, _ctx) => {
35804
36094
  let message;
35805
36095
  switch (issue2.code) {
@@ -35902,16 +36192,16 @@ var errorMap = (issue2, _ctx) => {
35902
36192
  };
35903
36193
  var en_default = errorMap;
35904
36194
 
35905
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/errors.js
36195
+ // node_modules/zod/v3/errors.js
35906
36196
  var overrideErrorMap = en_default;
35907
36197
  function getErrorMap() {
35908
36198
  return overrideErrorMap;
35909
36199
  }
35910
36200
 
35911
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/helpers/parseUtil.js
36201
+ // node_modules/zod/v3/helpers/parseUtil.js
35912
36202
  var makeIssue = (params) => {
35913
- const { data, path: path6, errorMaps, issueData } = params;
35914
- const fullPath = [...path6, ...issueData.path || []];
36203
+ const { data, path: path7, errorMaps, issueData } = params;
36204
+ const fullPath = [...path7, ...issueData.path || []];
35915
36205
  const fullIssue = {
35916
36206
  ...issueData,
35917
36207
  path: fullPath
@@ -36017,20 +36307,20 @@ var isDirty = (x) => x.status === "dirty";
36017
36307
  var isValid = (x) => x.status === "valid";
36018
36308
  var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
36019
36309
 
36020
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/helpers/errorUtil.js
36310
+ // node_modules/zod/v3/helpers/errorUtil.js
36021
36311
  var errorUtil;
36022
36312
  (function(errorUtil2) {
36023
36313
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
36024
36314
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
36025
36315
  })(errorUtil || (errorUtil = {}));
36026
36316
 
36027
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v3/types.js
36317
+ // node_modules/zod/v3/types.js
36028
36318
  var ParseInputLazyPath = class {
36029
- constructor(parent, value, path6, key) {
36319
+ constructor(parent, value, path7, key) {
36030
36320
  this._cachedPath = [];
36031
36321
  this.parent = parent;
36032
36322
  this.data = value;
36033
- this._path = path6;
36323
+ this._path = path7;
36034
36324
  this._key = key;
36035
36325
  }
36036
36326
  get path() {
@@ -39428,7 +39718,7 @@ var nullableType = ZodNullable.create;
39428
39718
  var preprocessType = ZodEffects.createWithPreprocess;
39429
39719
  var pipelineType = ZodPipeline.create;
39430
39720
 
39431
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/index.js
39721
+ // node_modules/zod/v4/core/index.js
39432
39722
  var core_exports2 = {};
39433
39723
  __export(core_exports2, {
39434
39724
  $ZodAny: () => $ZodAny,
@@ -39707,7 +39997,7 @@ __export(core_exports2, {
39707
39997
  version: () => version
39708
39998
  });
39709
39999
 
39710
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/core.js
40000
+ // node_modules/zod/v4/core/core.js
39711
40001
  var _a;
39712
40002
  var NEVER = /* @__PURE__ */ Object.freeze({
39713
40003
  status: "aborted"
@@ -39784,7 +40074,7 @@ function config(newConfig) {
39784
40074
  return globalConfig;
39785
40075
  }
39786
40076
 
39787
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/util.js
40077
+ // node_modules/zod/v4/core/util.js
39788
40078
  var util_exports = {};
39789
40079
  __export(util_exports, {
39790
40080
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -39951,10 +40241,10 @@ function mergeDefs(...defs) {
39951
40241
  function cloneDef(schema) {
39952
40242
  return mergeDefs(schema._zod.def);
39953
40243
  }
39954
- function getElementAtPath(obj, path6) {
39955
- if (!path6)
40244
+ function getElementAtPath(obj, path7) {
40245
+ if (!path7)
39956
40246
  return obj;
39957
- return path6.reduce((acc, key) => acc?.[key], obj);
40247
+ return path7.reduce((acc, key) => acc?.[key], obj);
39958
40248
  }
39959
40249
  function promiseAllObject(promisesObj) {
39960
40250
  const keys = Object.keys(promisesObj);
@@ -40363,11 +40653,11 @@ function explicitlyAborted(x, startIndex = 0) {
40363
40653
  }
40364
40654
  return false;
40365
40655
  }
40366
- function prefixIssues(path6, issues) {
40656
+ function prefixIssues(path7, issues) {
40367
40657
  return issues.map((iss) => {
40368
40658
  var _a3;
40369
40659
  (_a3 = iss).path ?? (_a3.path = []);
40370
- iss.path.unshift(path6);
40660
+ iss.path.unshift(path7);
40371
40661
  return iss;
40372
40662
  });
40373
40663
  }
@@ -40480,7 +40770,7 @@ var Class = class {
40480
40770
  }
40481
40771
  };
40482
40772
 
40483
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/errors.js
40773
+ // node_modules/zod/v4/core/errors.js
40484
40774
  var initializer = (inst, def) => {
40485
40775
  inst.name = "$ZodError";
40486
40776
  Object.defineProperty(inst, "_zod", {
@@ -40514,16 +40804,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
40514
40804
  }
40515
40805
  function formatError(error51, mapper = (issue2) => issue2.message) {
40516
40806
  const fieldErrors = { _errors: [] };
40517
- const processError = (error52, path6 = []) => {
40807
+ const processError = (error52, path7 = []) => {
40518
40808
  for (const issue2 of error52.issues) {
40519
40809
  if (issue2.code === "invalid_union" && issue2.errors.length) {
40520
- issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
40810
+ issue2.errors.map((issues) => processError({ issues }, [...path7, ...issue2.path]));
40521
40811
  } else if (issue2.code === "invalid_key") {
40522
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
40812
+ processError({ issues: issue2.issues }, [...path7, ...issue2.path]);
40523
40813
  } else if (issue2.code === "invalid_element") {
40524
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
40814
+ processError({ issues: issue2.issues }, [...path7, ...issue2.path]);
40525
40815
  } else {
40526
- const fullpath = [...path6, ...issue2.path];
40816
+ const fullpath = [...path7, ...issue2.path];
40527
40817
  if (fullpath.length === 0) {
40528
40818
  fieldErrors._errors.push(mapper(issue2));
40529
40819
  } else {
@@ -40550,17 +40840,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
40550
40840
  }
40551
40841
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
40552
40842
  const result = { errors: [] };
40553
- const processError = (error52, path6 = []) => {
40843
+ const processError = (error52, path7 = []) => {
40554
40844
  var _a3, _b;
40555
40845
  for (const issue2 of error52.issues) {
40556
40846
  if (issue2.code === "invalid_union" && issue2.errors.length) {
40557
- issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
40847
+ issue2.errors.map((issues) => processError({ issues }, [...path7, ...issue2.path]));
40558
40848
  } else if (issue2.code === "invalid_key") {
40559
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
40849
+ processError({ issues: issue2.issues }, [...path7, ...issue2.path]);
40560
40850
  } else if (issue2.code === "invalid_element") {
40561
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
40851
+ processError({ issues: issue2.issues }, [...path7, ...issue2.path]);
40562
40852
  } else {
40563
- const fullpath = [...path6, ...issue2.path];
40853
+ const fullpath = [...path7, ...issue2.path];
40564
40854
  if (fullpath.length === 0) {
40565
40855
  result.errors.push(mapper(issue2));
40566
40856
  continue;
@@ -40592,8 +40882,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
40592
40882
  }
40593
40883
  function toDotPath(_path) {
40594
40884
  const segs = [];
40595
- const path6 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
40596
- for (const seg of path6) {
40885
+ const path7 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
40886
+ for (const seg of path7) {
40597
40887
  if (typeof seg === "number")
40598
40888
  segs.push(`[${seg}]`);
40599
40889
  else if (typeof seg === "symbol")
@@ -40619,7 +40909,7 @@ function prettifyError(error51) {
40619
40909
  return lines.join("\n");
40620
40910
  }
40621
40911
 
40622
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/parse.js
40912
+ // node_modules/zod/v4/core/parse.js
40623
40913
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
40624
40914
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
40625
40915
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -40707,7 +40997,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
40707
40997
  };
40708
40998
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
40709
40999
 
40710
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/regexes.js
41000
+ // node_modules/zod/v4/core/regexes.js
40711
41001
  var regexes_exports = {};
40712
41002
  __export(regexes_exports, {
40713
41003
  base64: () => base64,
@@ -40866,7 +41156,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
40866
41156
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
40867
41157
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
40868
41158
 
40869
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/checks.js
41159
+ // node_modules/zod/v4/core/checks.js
40870
41160
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
40871
41161
  var _a3;
40872
41162
  inst._zod ?? (inst._zod = {});
@@ -41414,7 +41704,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
41414
41704
  };
41415
41705
  });
41416
41706
 
41417
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/doc.js
41707
+ // node_modules/zod/v4/core/doc.js
41418
41708
  var Doc = class {
41419
41709
  constructor(args = []) {
41420
41710
  this.content = [];
@@ -41450,14 +41740,14 @@ var Doc = class {
41450
41740
  }
41451
41741
  };
41452
41742
 
41453
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/versions.js
41743
+ // node_modules/zod/v4/core/versions.js
41454
41744
  var version = {
41455
41745
  major: 4,
41456
41746
  minor: 4,
41457
41747
  patch: 3
41458
41748
  };
41459
41749
 
41460
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/schemas.js
41750
+ // node_modules/zod/v4/core/schemas.js
41461
41751
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
41462
41752
  var _a3;
41463
41753
  inst ?? (inst = {});
@@ -43550,7 +43840,7 @@ function handleRefineResult(result, payload, input, inst) {
43550
43840
  }
43551
43841
  }
43552
43842
 
43553
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/index.js
43843
+ // node_modules/zod/v4/locales/index.js
43554
43844
  var locales_exports = {};
43555
43845
  __export(locales_exports, {
43556
43846
  ar: () => ar_default,
@@ -43607,7 +43897,7 @@ __export(locales_exports, {
43607
43897
  zhTW: () => zh_TW_default
43608
43898
  });
43609
43899
 
43610
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ar.js
43900
+ // node_modules/zod/v4/locales/ar.js
43611
43901
  var error = () => {
43612
43902
  const Sizable = {
43613
43903
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -43714,7 +44004,7 @@ function ar_default() {
43714
44004
  };
43715
44005
  }
43716
44006
 
43717
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/az.js
44007
+ // node_modules/zod/v4/locales/az.js
43718
44008
  var error2 = () => {
43719
44009
  const Sizable = {
43720
44010
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -43820,7 +44110,7 @@ function az_default() {
43820
44110
  };
43821
44111
  }
43822
44112
 
43823
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/be.js
44113
+ // node_modules/zod/v4/locales/be.js
43824
44114
  function getBelarusianPlural(count, one, few, many) {
43825
44115
  const absCount = Math.abs(count);
43826
44116
  const lastDigit = absCount % 10;
@@ -43977,7 +44267,7 @@ function be_default() {
43977
44267
  };
43978
44268
  }
43979
44269
 
43980
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/bg.js
44270
+ // node_modules/zod/v4/locales/bg.js
43981
44271
  var error4 = () => {
43982
44272
  const Sizable = {
43983
44273
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -44098,7 +44388,7 @@ function bg_default() {
44098
44388
  };
44099
44389
  }
44100
44390
 
44101
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ca.js
44391
+ // node_modules/zod/v4/locales/ca.js
44102
44392
  var error5 = () => {
44103
44393
  const Sizable = {
44104
44394
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -44207,7 +44497,7 @@ function ca_default() {
44207
44497
  };
44208
44498
  }
44209
44499
 
44210
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/cs.js
44500
+ // node_modules/zod/v4/locales/cs.js
44211
44501
  var error6 = () => {
44212
44502
  const Sizable = {
44213
44503
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -44319,7 +44609,7 @@ function cs_default() {
44319
44609
  };
44320
44610
  }
44321
44611
 
44322
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/da.js
44612
+ // node_modules/zod/v4/locales/da.js
44323
44613
  var error7 = () => {
44324
44614
  const Sizable = {
44325
44615
  string: { unit: "tegn", verb: "havde" },
@@ -44435,7 +44725,7 @@ function da_default() {
44435
44725
  };
44436
44726
  }
44437
44727
 
44438
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/de.js
44728
+ // node_modules/zod/v4/locales/de.js
44439
44729
  var error8 = () => {
44440
44730
  const Sizable = {
44441
44731
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -44544,7 +44834,7 @@ function de_default() {
44544
44834
  };
44545
44835
  }
44546
44836
 
44547
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/el.js
44837
+ // node_modules/zod/v4/locales/el.js
44548
44838
  var error9 = () => {
44549
44839
  const Sizable = {
44550
44840
  string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
@@ -44654,7 +44944,7 @@ function el_default() {
44654
44944
  };
44655
44945
  }
44656
44946
 
44657
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/en.js
44947
+ // node_modules/zod/v4/locales/en.js
44658
44948
  var error10 = () => {
44659
44949
  const Sizable = {
44660
44950
  string: { unit: "characters", verb: "to have" },
@@ -44767,7 +45057,7 @@ function en_default2() {
44767
45057
  };
44768
45058
  }
44769
45059
 
44770
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/eo.js
45060
+ // node_modules/zod/v4/locales/eo.js
44771
45061
  var error11 = () => {
44772
45062
  const Sizable = {
44773
45063
  string: { unit: "karaktrojn", verb: "havi" },
@@ -44877,7 +45167,7 @@ function eo_default() {
44877
45167
  };
44878
45168
  }
44879
45169
 
44880
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/es.js
45170
+ // node_modules/zod/v4/locales/es.js
44881
45171
  var error12 = () => {
44882
45172
  const Sizable = {
44883
45173
  string: { unit: "caracteres", verb: "tener" },
@@ -45010,7 +45300,7 @@ function es_default() {
45010
45300
  };
45011
45301
  }
45012
45302
 
45013
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/fa.js
45303
+ // node_modules/zod/v4/locales/fa.js
45014
45304
  var error13 = () => {
45015
45305
  const Sizable = {
45016
45306
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -45125,7 +45415,7 @@ function fa_default() {
45125
45415
  };
45126
45416
  }
45127
45417
 
45128
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/fi.js
45418
+ // node_modules/zod/v4/locales/fi.js
45129
45419
  var error14 = () => {
45130
45420
  const Sizable = {
45131
45421
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -45238,7 +45528,7 @@ function fi_default() {
45238
45528
  };
45239
45529
  }
45240
45530
 
45241
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/fr.js
45531
+ // node_modules/zod/v4/locales/fr.js
45242
45532
  var error15 = () => {
45243
45533
  const Sizable = {
45244
45534
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -45364,7 +45654,7 @@ function fr_default() {
45364
45654
  };
45365
45655
  }
45366
45656
 
45367
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/fr-CA.js
45657
+ // node_modules/zod/v4/locales/fr-CA.js
45368
45658
  var error16 = () => {
45369
45659
  const Sizable = {
45370
45660
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -45472,7 +45762,7 @@ function fr_CA_default() {
45472
45762
  };
45473
45763
  }
45474
45764
 
45475
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/he.js
45765
+ // node_modules/zod/v4/locales/he.js
45476
45766
  var error17 = () => {
45477
45767
  const TypeNames = {
45478
45768
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -45667,7 +45957,7 @@ function he_default() {
45667
45957
  };
45668
45958
  }
45669
45959
 
45670
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/hr.js
45960
+ // node_modules/zod/v4/locales/hr.js
45671
45961
  var error18 = () => {
45672
45962
  const Sizable = {
45673
45963
  string: { unit: "znakova", verb: "imati" },
@@ -45790,7 +46080,7 @@ function hr_default() {
45790
46080
  };
45791
46081
  }
45792
46082
 
45793
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/hu.js
46083
+ // node_modules/zod/v4/locales/hu.js
45794
46084
  var error19 = () => {
45795
46085
  const Sizable = {
45796
46086
  string: { unit: "karakter", verb: "legyen" },
@@ -45899,7 +46189,7 @@ function hu_default() {
45899
46189
  };
45900
46190
  }
45901
46191
 
45902
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/hy.js
46192
+ // node_modules/zod/v4/locales/hy.js
45903
46193
  function getArmenianPlural(count, one, many) {
45904
46194
  return Math.abs(count) === 1 ? one : many;
45905
46195
  }
@@ -46047,7 +46337,7 @@ function hy_default() {
46047
46337
  };
46048
46338
  }
46049
46339
 
46050
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/id.js
46340
+ // node_modules/zod/v4/locales/id.js
46051
46341
  var error21 = () => {
46052
46342
  const Sizable = {
46053
46343
  string: { unit: "karakter", verb: "memiliki" },
@@ -46154,7 +46444,7 @@ function id_default() {
46154
46444
  };
46155
46445
  }
46156
46446
 
46157
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/is.js
46447
+ // node_modules/zod/v4/locales/is.js
46158
46448
  var error22 = () => {
46159
46449
  const Sizable = {
46160
46450
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -46264,7 +46554,7 @@ function is_default() {
46264
46554
  };
46265
46555
  }
46266
46556
 
46267
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/it.js
46557
+ // node_modules/zod/v4/locales/it.js
46268
46558
  var error23 = () => {
46269
46559
  const Sizable = {
46270
46560
  string: { unit: "caratteri", verb: "avere" },
@@ -46373,7 +46663,7 @@ function it_default() {
46373
46663
  };
46374
46664
  }
46375
46665
 
46376
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ja.js
46666
+ // node_modules/zod/v4/locales/ja.js
46377
46667
  var error24 = () => {
46378
46668
  const Sizable = {
46379
46669
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -46481,7 +46771,7 @@ function ja_default() {
46481
46771
  };
46482
46772
  }
46483
46773
 
46484
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ka.js
46774
+ // node_modules/zod/v4/locales/ka.js
46485
46775
  var error25 = () => {
46486
46776
  const Sizable = {
46487
46777
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -46594,7 +46884,7 @@ function ka_default() {
46594
46884
  };
46595
46885
  }
46596
46886
 
46597
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/km.js
46887
+ // node_modules/zod/v4/locales/km.js
46598
46888
  var error26 = () => {
46599
46889
  const Sizable = {
46600
46890
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -46705,12 +46995,12 @@ function km_default() {
46705
46995
  };
46706
46996
  }
46707
46997
 
46708
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/kh.js
46998
+ // node_modules/zod/v4/locales/kh.js
46709
46999
  function kh_default() {
46710
47000
  return km_default();
46711
47001
  }
46712
47002
 
46713
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ko.js
47003
+ // node_modules/zod/v4/locales/ko.js
46714
47004
  var error27 = () => {
46715
47005
  const Sizable = {
46716
47006
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -46822,9 +47112,9 @@ function ko_default() {
46822
47112
  };
46823
47113
  }
46824
47114
 
46825
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/lt.js
46826
- var capitalizeFirstCharacter = (text) => {
46827
- return text.charAt(0).toUpperCase() + text.slice(1);
47115
+ // node_modules/zod/v4/locales/lt.js
47116
+ var capitalizeFirstCharacter = (text2) => {
47117
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
46828
47118
  };
46829
47119
  function getUnitTypeFromNumber(number4) {
46830
47120
  const abs = Math.abs(number4);
@@ -47026,7 +47316,7 @@ function lt_default() {
47026
47316
  };
47027
47317
  }
47028
47318
 
47029
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/mk.js
47319
+ // node_modules/zod/v4/locales/mk.js
47030
47320
  var error29 = () => {
47031
47321
  const Sizable = {
47032
47322
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -47136,7 +47426,7 @@ function mk_default() {
47136
47426
  };
47137
47427
  }
47138
47428
 
47139
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ms.js
47429
+ // node_modules/zod/v4/locales/ms.js
47140
47430
  var error30 = () => {
47141
47431
  const Sizable = {
47142
47432
  string: { unit: "aksara", verb: "mempunyai" },
@@ -47244,7 +47534,7 @@ function ms_default() {
47244
47534
  };
47245
47535
  }
47246
47536
 
47247
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/nl.js
47537
+ // node_modules/zod/v4/locales/nl.js
47248
47538
  var error31 = () => {
47249
47539
  const Sizable = {
47250
47540
  string: { unit: "tekens", verb: "heeft" },
@@ -47355,7 +47645,7 @@ function nl_default() {
47355
47645
  };
47356
47646
  }
47357
47647
 
47358
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/no.js
47648
+ // node_modules/zod/v4/locales/no.js
47359
47649
  var error32 = () => {
47360
47650
  const Sizable = {
47361
47651
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -47464,7 +47754,7 @@ function no_default() {
47464
47754
  };
47465
47755
  }
47466
47756
 
47467
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ota.js
47757
+ // node_modules/zod/v4/locales/ota.js
47468
47758
  var error33 = () => {
47469
47759
  const Sizable = {
47470
47760
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -47574,7 +47864,7 @@ function ota_default() {
47574
47864
  };
47575
47865
  }
47576
47866
 
47577
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ps.js
47867
+ // node_modules/zod/v4/locales/ps.js
47578
47868
  var error34 = () => {
47579
47869
  const Sizable = {
47580
47870
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -47689,7 +47979,7 @@ function ps_default() {
47689
47979
  };
47690
47980
  }
47691
47981
 
47692
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/pl.js
47982
+ // node_modules/zod/v4/locales/pl.js
47693
47983
  var error35 = () => {
47694
47984
  const Sizable = {
47695
47985
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -47799,7 +48089,7 @@ function pl_default() {
47799
48089
  };
47800
48090
  }
47801
48091
 
47802
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/pt.js
48092
+ // node_modules/zod/v4/locales/pt.js
47803
48093
  var error36 = () => {
47804
48094
  const Sizable = {
47805
48095
  string: { unit: "caracteres", verb: "ter" },
@@ -47908,7 +48198,7 @@ function pt_default() {
47908
48198
  };
47909
48199
  }
47910
48200
 
47911
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ro.js
48201
+ // node_modules/zod/v4/locales/ro.js
47912
48202
  var error37 = () => {
47913
48203
  const Sizable = {
47914
48204
  string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
@@ -48028,7 +48318,7 @@ function ro_default() {
48028
48318
  };
48029
48319
  }
48030
48320
 
48031
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ru.js
48321
+ // node_modules/zod/v4/locales/ru.js
48032
48322
  function getRussianPlural(count, one, few, many) {
48033
48323
  const absCount = Math.abs(count);
48034
48324
  const lastDigit = absCount % 10;
@@ -48185,7 +48475,7 @@ function ru_default() {
48185
48475
  };
48186
48476
  }
48187
48477
 
48188
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/sl.js
48478
+ // node_modules/zod/v4/locales/sl.js
48189
48479
  var error39 = () => {
48190
48480
  const Sizable = {
48191
48481
  string: { unit: "znakov", verb: "imeti" },
@@ -48295,7 +48585,7 @@ function sl_default() {
48295
48585
  };
48296
48586
  }
48297
48587
 
48298
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/sv.js
48588
+ // node_modules/zod/v4/locales/sv.js
48299
48589
  var error40 = () => {
48300
48590
  const Sizable = {
48301
48591
  string: { unit: "tecken", verb: "att ha" },
@@ -48406,7 +48696,7 @@ function sv_default() {
48406
48696
  };
48407
48697
  }
48408
48698
 
48409
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ta.js
48699
+ // node_modules/zod/v4/locales/ta.js
48410
48700
  var error41 = () => {
48411
48701
  const Sizable = {
48412
48702
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -48517,7 +48807,7 @@ function ta_default() {
48517
48807
  };
48518
48808
  }
48519
48809
 
48520
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/th.js
48810
+ // node_modules/zod/v4/locales/th.js
48521
48811
  var error42 = () => {
48522
48812
  const Sizable = {
48523
48813
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -48628,7 +48918,7 @@ function th_default() {
48628
48918
  };
48629
48919
  }
48630
48920
 
48631
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/tr.js
48921
+ // node_modules/zod/v4/locales/tr.js
48632
48922
  var error43 = () => {
48633
48923
  const Sizable = {
48634
48924
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -48734,7 +49024,7 @@ function tr_default() {
48734
49024
  };
48735
49025
  }
48736
49026
 
48737
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/uk.js
49027
+ // node_modules/zod/v4/locales/uk.js
48738
49028
  var error44 = () => {
48739
49029
  const Sizable = {
48740
49030
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -48843,12 +49133,12 @@ function uk_default() {
48843
49133
  };
48844
49134
  }
48845
49135
 
48846
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ua.js
49136
+ // node_modules/zod/v4/locales/ua.js
48847
49137
  function ua_default() {
48848
49138
  return uk_default();
48849
49139
  }
48850
49140
 
48851
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/ur.js
49141
+ // node_modules/zod/v4/locales/ur.js
48852
49142
  var error45 = () => {
48853
49143
  const Sizable = {
48854
49144
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -48959,7 +49249,7 @@ function ur_default() {
48959
49249
  };
48960
49250
  }
48961
49251
 
48962
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/uz.js
49252
+ // node_modules/zod/v4/locales/uz.js
48963
49253
  var error46 = () => {
48964
49254
  const Sizable = {
48965
49255
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -49070,7 +49360,7 @@ function uz_default() {
49070
49360
  };
49071
49361
  }
49072
49362
 
49073
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/vi.js
49363
+ // node_modules/zod/v4/locales/vi.js
49074
49364
  var error47 = () => {
49075
49365
  const Sizable = {
49076
49366
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -49179,7 +49469,7 @@ function vi_default() {
49179
49469
  };
49180
49470
  }
49181
49471
 
49182
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/zh-CN.js
49472
+ // node_modules/zod/v4/locales/zh-CN.js
49183
49473
  var error48 = () => {
49184
49474
  const Sizable = {
49185
49475
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -49289,7 +49579,7 @@ function zh_CN_default() {
49289
49579
  };
49290
49580
  }
49291
49581
 
49292
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/zh-TW.js
49582
+ // node_modules/zod/v4/locales/zh-TW.js
49293
49583
  var error49 = () => {
49294
49584
  const Sizable = {
49295
49585
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -49397,7 +49687,7 @@ function zh_TW_default() {
49397
49687
  };
49398
49688
  }
49399
49689
 
49400
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/locales/yo.js
49690
+ // node_modules/zod/v4/locales/yo.js
49401
49691
  var error50 = () => {
49402
49692
  const Sizable = {
49403
49693
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -49505,7 +49795,7 @@ function yo_default() {
49505
49795
  };
49506
49796
  }
49507
49797
 
49508
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/registries.js
49798
+ // node_modules/zod/v4/core/registries.js
49509
49799
  var _a2;
49510
49800
  var $output = Symbol("ZodOutput");
49511
49801
  var $input = Symbol("ZodInput");
@@ -49555,7 +49845,7 @@ function registry() {
49555
49845
  (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
49556
49846
  var globalRegistry = globalThis.__zod_globalRegistry;
49557
49847
 
49558
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/api.js
49848
+ // node_modules/zod/v4/core/api.js
49559
49849
  // @__NO_SIDE_EFFECTS__
49560
49850
  function _string(Class2, params) {
49561
49851
  return new Class2({
@@ -50594,7 +50884,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
50594
50884
  return inst;
50595
50885
  }
50596
50886
 
50597
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/to-json-schema.js
50887
+ // node_modules/zod/v4/core/to-json-schema.js
50598
50888
  function initializeContext(params) {
50599
50889
  let target = params?.target ?? "draft-2020-12";
50600
50890
  if (target === "draft-4")
@@ -50953,7 +51243,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
50953
51243
  return finalize(ctx, schema);
50954
51244
  };
50955
51245
 
50956
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/json-schema-processors.js
51246
+ // node_modules/zod/v4/core/json-schema-processors.js
50957
51247
  var formatMap = {
50958
51248
  guid: "uuid",
50959
51249
  url: "uri",
@@ -51497,7 +51787,7 @@ function toJSONSchema(input, params) {
51497
51787
  return finalize(ctx, input);
51498
51788
  }
51499
51789
 
51500
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/json-schema-generator.js
51790
+ // node_modules/zod/v4/core/json-schema-generator.js
51501
51791
  var JSONSchemaGenerator = class {
51502
51792
  /** @deprecated Access via ctx instead */
51503
51793
  get metadataRegistry() {
@@ -51572,10 +51862,10 @@ var JSONSchemaGenerator = class {
51572
51862
  }
51573
51863
  };
51574
51864
 
51575
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/core/json-schema.js
51865
+ // node_modules/zod/v4/core/json-schema.js
51576
51866
  var json_schema_exports = {};
51577
51867
 
51578
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/mini/schemas.js
51868
+ // node_modules/zod/v4/mini/schemas.js
51579
51869
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
51580
51870
  if (!inst._zod)
51581
51871
  throw new Error("Uninitialized schema in ZodMiniType.");
@@ -51621,7 +51911,7 @@ function object(shape, params) {
51621
51911
  return new ZodMiniObject(def);
51622
51912
  }
51623
51913
 
51624
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
51914
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
51625
51915
  function isZ4Schema(s) {
51626
51916
  const schema = s;
51627
51917
  return !!schema._zod;
@@ -51705,11 +51995,11 @@ function normalizeObjectSchema(schema) {
51705
51995
  }
51706
51996
  return void 0;
51707
51997
  }
51708
- function getDotPath(path6) {
51709
- if (path6.length === 0) {
51998
+ function getDotPath(path7) {
51999
+ if (path7.length === 0) {
51710
52000
  return "object root";
51711
52001
  }
51712
- return path6.reduce((acc, seg, index) => {
52002
+ return path7.reduce((acc, seg, index) => {
51713
52003
  if (index === 0) {
51714
52004
  return String(seg);
51715
52005
  }
@@ -51781,7 +52071,7 @@ function getLiteralValue(schema) {
51781
52071
  return void 0;
51782
52072
  }
51783
52073
 
51784
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/external.js
52074
+ // node_modules/zod/v4/classic/external.js
51785
52075
  var external_exports = {};
51786
52076
  __export(external_exports, {
51787
52077
  $brand: () => $brand,
@@ -52024,7 +52314,7 @@ __export(external_exports, {
52024
52314
  xor: () => xor
52025
52315
  });
52026
52316
 
52027
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/schemas.js
52317
+ // node_modules/zod/v4/classic/schemas.js
52028
52318
  var schemas_exports2 = {};
52029
52319
  __export(schemas_exports2, {
52030
52320
  ZodAny: () => ZodAny2,
@@ -52195,7 +52485,7 @@ __export(schemas_exports2, {
52195
52485
  xor: () => xor
52196
52486
  });
52197
52487
 
52198
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/checks.js
52488
+ // node_modules/zod/v4/classic/checks.js
52199
52489
  var checks_exports2 = {};
52200
52490
  __export(checks_exports2, {
52201
52491
  endsWith: () => _endsWith,
@@ -52229,7 +52519,7 @@ __export(checks_exports2, {
52229
52519
  uppercase: () => _uppercase
52230
52520
  });
52231
52521
 
52232
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/iso.js
52522
+ // node_modules/zod/v4/classic/iso.js
52233
52523
  var iso_exports2 = {};
52234
52524
  __export(iso_exports2, {
52235
52525
  ZodISODate: () => ZodISODate,
@@ -52270,7 +52560,7 @@ function duration2(params) {
52270
52560
  return _isoDuration(ZodISODuration, params);
52271
52561
  }
52272
52562
 
52273
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/errors.js
52563
+ // node_modules/zod/v4/classic/errors.js
52274
52564
  var initializer2 = (inst, issues) => {
52275
52565
  $ZodError.init(inst, issues);
52276
52566
  inst.name = "ZodError";
@@ -52310,7 +52600,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
52310
52600
  Parent: Error
52311
52601
  });
52312
52602
 
52313
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/parse.js
52603
+ // node_modules/zod/v4/classic/parse.js
52314
52604
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
52315
52605
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
52316
52606
  var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -52324,7 +52614,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
52324
52614
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
52325
52615
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
52326
52616
 
52327
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/schemas.js
52617
+ // node_modules/zod/v4/classic/schemas.js
52328
52618
  var _installedGroups = /* @__PURE__ */ new WeakMap();
52329
52619
  function _installLazyMethods(inst, group, methods) {
52330
52620
  const proto = Object.getPrototypeOf(inst);
@@ -53614,7 +53904,7 @@ function preprocess(fn, schema) {
53614
53904
  });
53615
53905
  }
53616
53906
 
53617
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/compat.js
53907
+ // node_modules/zod/v4/classic/compat.js
53618
53908
  var ZodIssueCode2 = {
53619
53909
  invalid_type: "invalid_type",
53620
53910
  too_big: "too_big",
@@ -53640,7 +53930,7 @@ var ZodFirstPartyTypeKind2;
53640
53930
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind3) {
53641
53931
  })(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
53642
53932
 
53643
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/from-json-schema.js
53933
+ // node_modules/zod/v4/classic/from-json-schema.js
53644
53934
  var z = {
53645
53935
  ...schemas_exports2,
53646
53936
  ...checks_exports2,
@@ -53734,13 +54024,13 @@ function resolveRef(ref, ctx) {
53734
54024
  if (!ref.startsWith("#")) {
53735
54025
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
53736
54026
  }
53737
- const path6 = ref.slice(1).split("/").filter(Boolean);
53738
- if (path6.length === 0) {
54027
+ const path7 = ref.slice(1).split("/").filter(Boolean);
54028
+ if (path7.length === 0) {
53739
54029
  return ctx.rootSchema;
53740
54030
  }
53741
54031
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
53742
- if (path6[0] === defsKey) {
53743
- const key = path6[1];
54032
+ if (path7[0] === defsKey) {
54033
+ const key = path7[1];
53744
54034
  if (!key || !ctx.defs[key]) {
53745
54035
  throw new Error(`Reference not found: ${ref}`);
53746
54036
  }
@@ -54120,7 +54410,7 @@ function fromJSONSchema(schema, params) {
54120
54410
  return convertSchema(normalized, ctx);
54121
54411
  }
54122
54412
 
54123
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/coerce.js
54413
+ // node_modules/zod/v4/classic/coerce.js
54124
54414
  var coerce_exports2 = {};
54125
54415
  __export(coerce_exports2, {
54126
54416
  bigint: () => bigint3,
@@ -54145,10 +54435,10 @@ function date4(params) {
54145
54435
  return _coercedDate(ZodDate2, params);
54146
54436
  }
54147
54437
 
54148
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod/v4/classic/external.js
54438
+ // node_modules/zod/v4/classic/external.js
54149
54439
  config(en_default2());
54150
54440
 
54151
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
54441
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
54152
54442
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
54153
54443
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
54154
54444
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -55679,12 +55969,12 @@ var UrlElicitationRequiredError = class extends McpError {
55679
55969
  }
55680
55970
  };
55681
55971
 
55682
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
55972
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
55683
55973
  function isTerminal(status) {
55684
55974
  return status === "completed" || status === "failed" || status === "cancelled";
55685
55975
  }
55686
55976
 
55687
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/Options.js
55977
+ // node_modules/zod-to-json-schema/dist/esm/Options.js
55688
55978
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
55689
55979
  var defaultOptions = {
55690
55980
  name: void 0,
@@ -55718,7 +56008,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
55718
56008
  ...options
55719
56009
  };
55720
56010
 
55721
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/Refs.js
56011
+ // node_modules/zod-to-json-schema/dist/esm/Refs.js
55722
56012
  var getRefs = (options) => {
55723
56013
  const _options = getDefaultOptions(options);
55724
56014
  const currentPath = _options.name !== void 0 ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
@@ -55739,7 +56029,7 @@ var getRefs = (options) => {
55739
56029
  };
55740
56030
  };
55741
56031
 
55742
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
56032
+ // node_modules/zod-to-json-schema/dist/esm/errorMessages.js
55743
56033
  function addErrorMessage(res, key, errorMessage, refs) {
55744
56034
  if (!refs?.errorMessages)
55745
56035
  return;
@@ -55755,7 +56045,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
55755
56045
  addErrorMessage(res, key, errorMessage, refs);
55756
56046
  }
55757
56047
 
55758
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
56048
+ // node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
55759
56049
  var getRelativePath = (pathA, pathB) => {
55760
56050
  let i = 0;
55761
56051
  for (; i < pathA.length && i < pathB.length; i++) {
@@ -55765,7 +56055,7 @@ var getRelativePath = (pathA, pathB) => {
55765
56055
  return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
55766
56056
  };
55767
56057
 
55768
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
56058
+ // node_modules/zod-to-json-schema/dist/esm/parsers/any.js
55769
56059
  function parseAnyDef(refs) {
55770
56060
  if (refs.target !== "openAi") {
55771
56061
  return {};
@@ -55781,7 +56071,7 @@ function parseAnyDef(refs) {
55781
56071
  };
55782
56072
  }
55783
56073
 
55784
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
56074
+ // node_modules/zod-to-json-schema/dist/esm/parsers/array.js
55785
56075
  function parseArrayDef(def, refs) {
55786
56076
  const res = {
55787
56077
  type: "array"
@@ -55805,7 +56095,7 @@ function parseArrayDef(def, refs) {
55805
56095
  return res;
55806
56096
  }
55807
56097
 
55808
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
56098
+ // node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
55809
56099
  function parseBigintDef(def, refs) {
55810
56100
  const res = {
55811
56101
  type: "integer",
@@ -55851,24 +56141,24 @@ function parseBigintDef(def, refs) {
55851
56141
  return res;
55852
56142
  }
55853
56143
 
55854
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
56144
+ // node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
55855
56145
  function parseBooleanDef() {
55856
56146
  return {
55857
56147
  type: "boolean"
55858
56148
  };
55859
56149
  }
55860
56150
 
55861
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
56151
+ // node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
55862
56152
  function parseBrandedDef(_def, refs) {
55863
56153
  return parseDef(_def.type._def, refs);
55864
56154
  }
55865
56155
 
55866
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
56156
+ // node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
55867
56157
  var parseCatchDef = (def, refs) => {
55868
56158
  return parseDef(def.innerType._def, refs);
55869
56159
  };
55870
56160
 
55871
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
56161
+ // node_modules/zod-to-json-schema/dist/esm/parsers/date.js
55872
56162
  function parseDateDef(def, refs, overrideDateStrategy) {
55873
56163
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
55874
56164
  if (Array.isArray(strategy)) {
@@ -55927,7 +56217,7 @@ var integerDateParser = (def, refs) => {
55927
56217
  return res;
55928
56218
  };
55929
56219
 
55930
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
56220
+ // node_modules/zod-to-json-schema/dist/esm/parsers/default.js
55931
56221
  function parseDefaultDef(_def, refs) {
55932
56222
  return {
55933
56223
  ...parseDef(_def.innerType._def, refs),
@@ -55935,12 +56225,12 @@ function parseDefaultDef(_def, refs) {
55935
56225
  };
55936
56226
  }
55937
56227
 
55938
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
56228
+ // node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
55939
56229
  function parseEffectsDef(_def, refs) {
55940
56230
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
55941
56231
  }
55942
56232
 
55943
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
56233
+ // node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
55944
56234
  function parseEnumDef(def) {
55945
56235
  return {
55946
56236
  type: "string",
@@ -55948,7 +56238,7 @@ function parseEnumDef(def) {
55948
56238
  };
55949
56239
  }
55950
56240
 
55951
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
56241
+ // node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
55952
56242
  var isJsonSchema7AllOfType = (type) => {
55953
56243
  if ("type" in type && type.type === "string")
55954
56244
  return false;
@@ -55990,7 +56280,7 @@ function parseIntersectionDef(def, refs) {
55990
56280
  } : void 0;
55991
56281
  }
55992
56282
 
55993
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
56283
+ // node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
55994
56284
  function parseLiteralDef(def, refs) {
55995
56285
  const parsedType2 = typeof def.value;
55996
56286
  if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") {
@@ -56010,7 +56300,7 @@ function parseLiteralDef(def, refs) {
56010
56300
  };
56011
56301
  }
56012
56302
 
56013
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
56303
+ // node_modules/zod-to-json-schema/dist/esm/parsers/string.js
56014
56304
  var emojiRegex2 = void 0;
56015
56305
  var zodPatterns = {
56016
56306
  /**
@@ -56335,7 +56625,7 @@ function stringifyRegExpWithFlags(regex, refs) {
56335
56625
  return pattern;
56336
56626
  }
56337
56627
 
56338
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
56628
+ // node_modules/zod-to-json-schema/dist/esm/parsers/record.js
56339
56629
  function parseRecordDef(def, refs) {
56340
56630
  if (refs.target === "openAi") {
56341
56631
  console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
@@ -56387,7 +56677,7 @@ function parseRecordDef(def, refs) {
56387
56677
  return schema;
56388
56678
  }
56389
56679
 
56390
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
56680
+ // node_modules/zod-to-json-schema/dist/esm/parsers/map.js
56391
56681
  function parseMapDef(def, refs) {
56392
56682
  if (refs.mapStrategy === "record") {
56393
56683
  return parseRecordDef(def, refs);
@@ -56412,7 +56702,7 @@ function parseMapDef(def, refs) {
56412
56702
  };
56413
56703
  }
56414
56704
 
56415
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
56705
+ // node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
56416
56706
  function parseNativeEnumDef(def) {
56417
56707
  const object3 = def.values;
56418
56708
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -56426,7 +56716,7 @@ function parseNativeEnumDef(def) {
56426
56716
  };
56427
56717
  }
56428
56718
 
56429
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
56719
+ // node_modules/zod-to-json-schema/dist/esm/parsers/never.js
56430
56720
  function parseNeverDef(refs) {
56431
56721
  return refs.target === "openAi" ? void 0 : {
56432
56722
  not: parseAnyDef({
@@ -56436,7 +56726,7 @@ function parseNeverDef(refs) {
56436
56726
  };
56437
56727
  }
56438
56728
 
56439
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
56729
+ // node_modules/zod-to-json-schema/dist/esm/parsers/null.js
56440
56730
  function parseNullDef(refs) {
56441
56731
  return refs.target === "openApi3" ? {
56442
56732
  enum: ["null"],
@@ -56446,7 +56736,7 @@ function parseNullDef(refs) {
56446
56736
  };
56447
56737
  }
56448
56738
 
56449
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
56739
+ // node_modules/zod-to-json-schema/dist/esm/parsers/union.js
56450
56740
  var primitiveMappings = {
56451
56741
  ZodString: "string",
56452
56742
  ZodNumber: "number",
@@ -56514,7 +56804,7 @@ var asAnyOf = (def, refs) => {
56514
56804
  return anyOf.length ? { anyOf } : void 0;
56515
56805
  };
56516
56806
 
56517
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
56807
+ // node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
56518
56808
  function parseNullableDef(def, refs) {
56519
56809
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
56520
56810
  if (refs.target === "openApi3") {
@@ -56546,7 +56836,7 @@ function parseNullableDef(def, refs) {
56546
56836
  return base && { anyOf: [base, { type: "null" }] };
56547
56837
  }
56548
56838
 
56549
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
56839
+ // node_modules/zod-to-json-schema/dist/esm/parsers/number.js
56550
56840
  function parseNumberDef(def, refs) {
56551
56841
  const res = {
56552
56842
  type: "number"
@@ -56595,7 +56885,7 @@ function parseNumberDef(def, refs) {
56595
56885
  return res;
56596
56886
  }
56597
56887
 
56598
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
56888
+ // node_modules/zod-to-json-schema/dist/esm/parsers/object.js
56599
56889
  function parseObjectDef(def, refs) {
56600
56890
  const forceOptionalIntoNullable = refs.target === "openAi";
56601
56891
  const result = {
@@ -56665,7 +56955,7 @@ function safeIsOptional(schema) {
56665
56955
  }
56666
56956
  }
56667
56957
 
56668
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
56958
+ // node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
56669
56959
  var parseOptionalDef = (def, refs) => {
56670
56960
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
56671
56961
  return parseDef(def.innerType._def, refs);
@@ -56684,7 +56974,7 @@ var parseOptionalDef = (def, refs) => {
56684
56974
  } : parseAnyDef(refs);
56685
56975
  };
56686
56976
 
56687
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
56977
+ // node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
56688
56978
  var parsePipelineDef = (def, refs) => {
56689
56979
  if (refs.pipeStrategy === "input") {
56690
56980
  return parseDef(def.in._def, refs);
@@ -56704,12 +56994,12 @@ var parsePipelineDef = (def, refs) => {
56704
56994
  };
56705
56995
  };
56706
56996
 
56707
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
56997
+ // node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
56708
56998
  function parsePromiseDef(def, refs) {
56709
56999
  return parseDef(def.type._def, refs);
56710
57000
  }
56711
57001
 
56712
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
57002
+ // node_modules/zod-to-json-schema/dist/esm/parsers/set.js
56713
57003
  function parseSetDef(def, refs) {
56714
57004
  const items = parseDef(def.valueType._def, {
56715
57005
  ...refs,
@@ -56729,7 +57019,7 @@ function parseSetDef(def, refs) {
56729
57019
  return schema;
56730
57020
  }
56731
57021
 
56732
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
57022
+ // node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
56733
57023
  function parseTupleDef(def, refs) {
56734
57024
  if (def.rest) {
56735
57025
  return {
@@ -56757,24 +57047,24 @@ function parseTupleDef(def, refs) {
56757
57047
  }
56758
57048
  }
56759
57049
 
56760
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
57050
+ // node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
56761
57051
  function parseUndefinedDef(refs) {
56762
57052
  return {
56763
57053
  not: parseAnyDef(refs)
56764
57054
  };
56765
57055
  }
56766
57056
 
56767
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
57057
+ // node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
56768
57058
  function parseUnknownDef(refs) {
56769
57059
  return parseAnyDef(refs);
56770
57060
  }
56771
57061
 
56772
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
57062
+ // node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
56773
57063
  var parseReadonlyDef = (def, refs) => {
56774
57064
  return parseDef(def.innerType._def, refs);
56775
57065
  };
56776
57066
 
56777
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/selectParser.js
57067
+ // node_modules/zod-to-json-schema/dist/esm/selectParser.js
56778
57068
  var selectParser = (def, typeName, refs) => {
56779
57069
  switch (typeName) {
56780
57070
  case ZodFirstPartyTypeKind.ZodString:
@@ -56850,7 +57140,7 @@ var selectParser = (def, typeName, refs) => {
56850
57140
  }
56851
57141
  };
56852
57142
 
56853
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/parseDef.js
57143
+ // node_modules/zod-to-json-schema/dist/esm/parseDef.js
56854
57144
  function parseDef(def, refs, forceResolution = false) {
56855
57145
  const seenItem = refs.seen.get(def);
56856
57146
  if (refs.override) {
@@ -56906,7 +57196,7 @@ var addMeta = (def, refs, jsonSchema) => {
56906
57196
  return jsonSchema;
56907
57197
  };
56908
57198
 
56909
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
57199
+ // node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
56910
57200
  var zodToJsonSchema = (schema, options) => {
56911
57201
  const refs = getRefs(options);
56912
57202
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name3, schema2]) => ({
@@ -56968,7 +57258,7 @@ var zodToJsonSchema = (schema, options) => {
56968
57258
  return combined;
56969
57259
  };
56970
57260
 
56971
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
57261
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
56972
57262
  function mapMiniTarget(t4) {
56973
57263
  if (!t4)
56974
57264
  return "draft-7";
@@ -57010,7 +57300,7 @@ function parseWithCompat(schema, data) {
57010
57300
  return result.data;
57011
57301
  }
57012
57302
 
57013
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
57303
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
57014
57304
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
57015
57305
  var Protocol = class {
57016
57306
  constructor(_options) {
@@ -57051,6 +57341,9 @@ var Protocol = class {
57051
57341
  this.setRequestHandler(GetTaskPayloadRequestSchema, async (request, extra) => {
57052
57342
  const handleTaskResult = async () => {
57053
57343
  const taskId = request.params.taskId;
57344
+ if (!await this._taskStore.getTask(taskId, extra.sessionId)) {
57345
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
57346
+ }
57054
57347
  if (this._taskMessageQueue) {
57055
57348
  let queuedMessage;
57056
57349
  while (queuedMessage = await this._taskMessageQueue.dequeue(taskId, extra.sessionId)) {
@@ -57081,12 +57374,12 @@ var Protocol = class {
57081
57374
  throw new McpError(ErrorCode.InvalidParams, `Task not found: ${taskId}`);
57082
57375
  }
57083
57376
  if (!isTerminal(task.status)) {
57084
- await this._waitForTaskUpdate(taskId, extra.signal);
57377
+ await this._waitForTaskUpdate(taskId, extra.signal, extra.sessionId);
57085
57378
  return await handleTaskResult();
57086
57379
  }
57087
57380
  if (isTerminal(task.status)) {
57088
57381
  const result = await this._taskStore.getTaskResult(taskId, extra.sessionId);
57089
- this._clearTaskQueue(taskId);
57382
+ this._clearTaskQueue(taskId, extra.sessionId);
57090
57383
  return {
57091
57384
  ...result,
57092
57385
  _meta: {
@@ -57123,7 +57416,7 @@ var Protocol = class {
57123
57416
  throw new McpError(ErrorCode.InvalidParams, `Cannot cancel task in terminal status: ${task.status}`);
57124
57417
  }
57125
57418
  await this._taskStore.updateTaskStatus(request.params.taskId, "cancelled", "Client cancelled task execution.", extra.sessionId);
57126
- this._clearTaskQueue(request.params.taskId);
57419
+ this._clearTaskQueue(request.params.taskId, extra.sessionId);
57127
57420
  const cancelledTask = await this._taskStore.getTask(request.params.taskId, extra.sessionId);
57128
57421
  if (!cancelledTask) {
57129
57422
  throw new McpError(ErrorCode.InvalidParams, `Task not found after cancellation: ${request.params.taskId}`);
@@ -57251,6 +57544,19 @@ var Protocol = class {
57251
57544
  const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
57252
57545
  const capturedTransport = this._transport;
57253
57546
  const relatedTaskId = request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;
57547
+ const sessionId = capturedTransport?.sessionId;
57548
+ const store = this._taskStore;
57549
+ let relatedTaskFound = true;
57550
+ let relatedTaskLookup;
57551
+ if (relatedTaskId && store && this._taskMessageQueue && sessionId !== void 0) {
57552
+ relatedTaskFound = false;
57553
+ relatedTaskLookup = (async () => {
57554
+ if (!await store.getTask(relatedTaskId, sessionId)) {
57555
+ throw new McpError(ErrorCode.InvalidParams, `Task not found: ${relatedTaskId}`);
57556
+ }
57557
+ relatedTaskFound = true;
57558
+ })();
57559
+ }
57254
57560
  if (handler === void 0) {
57255
57561
  const errorResponse = {
57256
57562
  jsonrpc: "2.0",
@@ -57260,7 +57566,10 @@ var Protocol = class {
57260
57566
  message: "Method not found"
57261
57567
  }
57262
57568
  };
57263
- if (relatedTaskId && this._taskMessageQueue) {
57569
+ if (relatedTaskId && relatedTaskLookup) {
57570
+ const queuedError = { type: "error", message: errorResponse, timestamp: Date.now() };
57571
+ relatedTaskLookup.then(() => this._enqueueTaskMessage(relatedTaskId, queuedError, sessionId), () => capturedTransport?.send(errorResponse)).catch((error51) => this._onerror(new Error(`Failed to send an error response: ${error51}`)));
57572
+ } else if (relatedTaskId && this._taskMessageQueue) {
57264
57573
  this._enqueueTaskMessage(relatedTaskId, {
57265
57574
  type: "error",
57266
57575
  message: errorResponse,
@@ -57311,7 +57620,10 @@ var Protocol = class {
57311
57620
  closeSSEStream: extra?.closeSSEStream,
57312
57621
  closeStandaloneSSEStream: extra?.closeStandaloneSSEStream
57313
57622
  };
57314
- Promise.resolve().then(() => {
57623
+ (relatedTaskLookup ?? Promise.resolve()).then(() => {
57624
+ if (relatedTaskLookup && abortController.signal.aborted) {
57625
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
57626
+ }
57315
57627
  if (taskCreationParams) {
57316
57628
  this.assertTaskHandlerCapability(request.method);
57317
57629
  }
@@ -57346,7 +57658,7 @@ var Protocol = class {
57346
57658
  ...error51["data"] !== void 0 && { data: error51["data"] }
57347
57659
  }
57348
57660
  };
57349
- if (relatedTaskId && this._taskMessageQueue) {
57661
+ if (relatedTaskId && this._taskMessageQueue && relatedTaskFound) {
57350
57662
  await this._enqueueTaskMessage(relatedTaskId, {
57351
57663
  type: "error",
57352
57664
  message: errorResponse,
@@ -57826,7 +58138,7 @@ var Protocol = class {
57826
58138
  throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");
57827
58139
  }
57828
58140
  const maxQueueSize = this._options?.maxTaskQueueSize;
57829
- await this._taskMessageQueue.enqueue(taskId, message, sessionId, maxQueueSize);
58141
+ await this._taskMessageQueue.enqueue(taskId, message, sessionId ?? this._transport?.sessionId, maxQueueSize);
57830
58142
  }
57831
58143
  /**
57832
58144
  * Clears the message queue for a task and rejects any pending request resolvers.
@@ -57855,12 +58167,13 @@ var Protocol = class {
57855
58167
  * Uses polling to check for updates at the task's configured poll interval.
57856
58168
  * @param taskId The task ID to wait for
57857
58169
  * @param signal Abort signal to cancel the wait
58170
+ * @param sessionId Session of the request that waits, passed to the task store
57858
58171
  * @returns Promise that resolves when an update occurs or rejects if aborted
57859
58172
  */
57860
- async _waitForTaskUpdate(taskId, signal) {
58173
+ async _waitForTaskUpdate(taskId, signal, sessionId) {
57861
58174
  let interval = this._options?.defaultTaskPollInterval ?? 1e3;
57862
58175
  try {
57863
- const task = await this._taskStore?.getTask(taskId);
58176
+ const task = await this._taskStore?.getTask(taskId, sessionId);
57864
58177
  if (task?.pollInterval) {
57865
58178
  interval = task.pollInterval;
57866
58179
  }
@@ -57964,7 +58277,7 @@ function mergeCapabilities(base, additional) {
57964
58277
  return result;
57965
58278
  }
57966
58279
 
57967
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
58280
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
57968
58281
  var import_ajv = __toESM(require_ajv(), 1);
57969
58282
  var import_ajv_formats = __toESM(require_dist(), 1);
57970
58283
  function createDefaultAjvInstance() {
@@ -58032,7 +58345,7 @@ var AjvJsonSchemaValidator = class {
58032
58345
  }
58033
58346
  };
58034
58347
 
58035
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
58348
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
58036
58349
  var ExperimentalServerTasks = class {
58037
58350
  constructor(_server) {
58038
58351
  this._server = _server;
@@ -58245,7 +58558,7 @@ var ExperimentalServerTasks = class {
58245
58558
  }
58246
58559
  };
58247
58560
 
58248
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
58561
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
58249
58562
  function assertToolsCallTaskCapability(requests, method, entityName) {
58250
58563
  if (!requests) {
58251
58564
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -58280,7 +58593,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
58280
58593
  }
58281
58594
  }
58282
58595
 
58283
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
58596
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
58284
58597
  var Server = class extends Protocol {
58285
58598
  /**
58286
58599
  * Initializes this server with the given name and version information.
@@ -58651,7 +58964,7 @@ var Server = class extends Protocol {
58651
58964
  }
58652
58965
  };
58653
58966
 
58654
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
58967
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
58655
58968
  var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
58656
58969
  function isCompletable(schema) {
58657
58970
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -58665,7 +58978,7 @@ var McpZodTypeKind;
58665
58978
  McpZodTypeKind2["Completable"] = "McpCompletable";
58666
58979
  })(McpZodTypeKind || (McpZodTypeKind = {}));
58667
58980
 
58668
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
58981
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
58669
58982
  var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
58670
58983
  function validateToolName(name2) {
58671
58984
  const warnings = [];
@@ -58723,7 +59036,7 @@ function validateAndWarnToolName(name2) {
58723
59036
  return result.isValid;
58724
59037
  }
58725
59038
 
58726
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
59039
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
58727
59040
  var ExperimentalMcpServerTasks = class {
58728
59041
  constructor(_mcpServer) {
58729
59042
  this._mcpServer = _mcpServer;
@@ -58738,7 +59051,43 @@ var ExperimentalMcpServerTasks = class {
58738
59051
  }
58739
59052
  };
58740
59053
 
58741
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
59054
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
59055
+ function toolInputElementCount(value, max) {
59056
+ let count = 0;
59057
+ const stack = [value];
59058
+ while (stack.length > 0) {
59059
+ const node = stack.pop();
59060
+ if (node === null || typeof node !== "object")
59061
+ continue;
59062
+ if (Array.isArray(node)) {
59063
+ for (const child of node) {
59064
+ if (++count > max)
59065
+ return count;
59066
+ if (child !== null && typeof child === "object")
59067
+ stack.push(child);
59068
+ }
59069
+ } else {
59070
+ for (const key in node) {
59071
+ if (!Object.prototype.hasOwnProperty.call(node, key))
59072
+ continue;
59073
+ if (++count > max)
59074
+ return count;
59075
+ const child = node[key];
59076
+ if (child !== null && typeof child === "object")
59077
+ stack.push(child);
59078
+ }
59079
+ }
59080
+ }
59081
+ return count;
59082
+ }
59083
+ function resolveMaxToolInputElements(value) {
59084
+ if (value === void 0 || value === Infinity)
59085
+ return void 0;
59086
+ if (typeof value !== "number" || Number.isNaN(value) || value < 1) {
59087
+ throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(value)}`);
59088
+ }
59089
+ return value;
59090
+ }
58742
59091
  var McpServer = class {
58743
59092
  constructor(serverInfo, options) {
58744
59093
  this._registeredResources = {};
@@ -58750,6 +59099,7 @@ var McpServer = class {
58750
59099
  this._resourceHandlersInitialized = false;
58751
59100
  this._promptHandlersInitialized = false;
58752
59101
  this.server = new Server(serverInfo, options);
59102
+ this._maxToolInputElements = resolveMaxToolInputElements(options?.maxToolInputElements);
58753
59103
  }
58754
59104
  /**
58755
59105
  * Access experimental features.
@@ -58880,12 +59230,15 @@ var McpServer = class {
58880
59230
  * Validates tool input arguments against the tool's input schema.
58881
59231
  */
58882
59232
  async validateToolInput(tool, args, toolName) {
59233
+ if (this._maxToolInputElements !== void 0 && toolInputElementCount(args, this._maxToolInputElements) > this._maxToolInputElements) {
59234
+ throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for tool ${toolName}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);
59235
+ }
58883
59236
  if (!tool.inputSchema) {
58884
59237
  return void 0;
58885
59238
  }
58886
59239
  const inputObj = normalizeObjectSchema(tool.inputSchema);
58887
59240
  const schemaToParse = inputObj ?? tool.inputSchema;
58888
- const parseResult = await safeParseAsync2(schemaToParse, args);
59241
+ const parseResult = await safeParseAsync2(schemaToParse, args ?? {});
58889
59242
  if (!parseResult.success) {
58890
59243
  const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
58891
59244
  const errorMessage = getParseErrorMessage(error51);
@@ -59123,7 +59476,7 @@ var McpServer = class {
59123
59476
  }
59124
59477
  if (prompt.argsSchema) {
59125
59478
  const argsObj = normalizeObjectSchema(prompt.argsSchema);
59126
- const parseResult = await safeParseAsync2(argsObj, request.params.arguments);
59479
+ const parseResult = await safeParseAsync2(argsObj, request.params.arguments ?? {});
59127
59480
  if (!parseResult.success) {
59128
59481
  const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
59129
59482
  const errorMessage = getParseErrorMessage(error51);
@@ -59530,10 +59883,10 @@ var EMPTY_COMPLETION_RESULT = {
59530
59883
  }
59531
59884
  };
59532
59885
 
59533
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
59886
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
59534
59887
  import process3 from "node:process";
59535
59888
 
59536
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
59889
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
59537
59890
  var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
59538
59891
  var ReadBuffer = class {
59539
59892
  constructor(options) {
@@ -59570,7 +59923,7 @@ function serializeMessage(message) {
59570
59923
  return JSON.stringify(message) + "\n";
59571
59924
  }
59572
59925
 
59573
- // ../../../../Desktop/impractical-motion/impractical-motion/cli/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
59926
+ // node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
59574
59927
  var StdioServerTransport = class {
59575
59928
  constructor(_stdin = process3.stdin, _stdout = process3.stdout, options) {
59576
59929
  this._stdin = _stdin;
@@ -59637,6 +59990,79 @@ var StdioServerTransport = class {
59637
59990
  }
59638
59991
  };
59639
59992
 
59993
+ // src/mcp/workspaces.ts
59994
+ var fail = (text2) => ({ text: text2, isError: true });
59995
+ var LEGACY_KEY_NOTE = "This connection uses an older key bound to a single workspace. Call `connect` once (the user approves in the browser) to replace it with one key that reaches every workspace they belong to.";
59996
+ var TARGETED_TOOLS = /* @__PURE__ */ new Set(["create_video", "brand_extract", "brand_get", "motion_profile"]);
59997
+ var WORKSPACE_ACTING_TOOLS = /* @__PURE__ */ new Set([
59998
+ "create_video",
59999
+ "write_draft_files",
60000
+ "edit_draft_file",
60001
+ "export_video",
60002
+ "brand_extract",
60003
+ "install_kits",
60004
+ "install_font",
60005
+ "install_components",
60006
+ "motion_profile"
60007
+ ]);
60008
+ var CREATING_TOOLS = /* @__PURE__ */ new Set(["create_video", "brand_extract"]);
60009
+ var text = (value) => typeof value === "string" && value.trim() ? value.trim() : void 0;
60010
+ function admissionTarget(toolName, args, envWorkspace) {
60011
+ const projectId = text(args.projectId);
60012
+ const draftId = text(args.draftId);
60013
+ const jobIds = Array.isArray(args.jobIds) ? args.jobIds.filter((id) => typeof id === "string").slice(0, 50) : void 0;
60014
+ const addressed = Boolean(projectId || draftId || jobIds?.length);
60015
+ const workspace = text(args.workspace) ?? (addressed ? void 0 : envWorkspace);
60016
+ const targeted = TARGETED_TOOLS.has(toolName) || Boolean(text(args.brandSlug));
60017
+ return {
60018
+ ...workspace ? { workspace } : {},
60019
+ ...projectId ? { projectId } : {},
60020
+ ...draftId ? { draftId } : {},
60021
+ ...jobIds?.length ? { jobIds } : {},
60022
+ ...!workspace && !addressed && !targeted ? { all: true } : {}
60023
+ };
60024
+ }
60025
+ function workspaceNote(toolName, workspace) {
60026
+ const label = workspaceLabel(workspace);
60027
+ const why = workspace.because ? ` (${workspace.because})` : "";
60028
+ return CREATING_TOOLS.has(toolName) ? `Created in ${label}${why}.` : `Workspace: ${label}${why}`;
60029
+ }
60030
+ function describeRow(workspace, lastOpen) {
60031
+ const usage = workspace.usage;
60032
+ return `- ${workspaceLabel(workspace)}${workspace.id === lastOpen ? " [open in the web app]" : ""} \u2014 role: ${workspace.role || "unknown"}` + (workspace.plan ? `, plan: ${workspace.plan}` : "") + (usage?.summary ? `, ${usage.summary}` : "");
60033
+ }
60034
+ var listWorkspacesTool = {
60035
+ name: "list_workspaces",
60036
+ title: "List the workspaces this connection can use",
60037
+ description: "List every Impractical workspace the connected user belongs to (id, name, slug, role, plan) and which one is open in the web app. Pass a workspace id, slug or name as `workspace` to create_video / brand_extract to choose where new work goes. Does not use quota.",
60038
+ inputSchema: {},
60039
+ local: true,
60040
+ handler: async (_args, ctx) => {
60041
+ const listing = await fetchWorkspaces(ctx.invoke);
60042
+ if (!listing.supported) {
60043
+ return {
60044
+ text: "This Impractical server does not support workspace listing yet; this connection keeps using its one workspace. account_status shows which."
60045
+ };
60046
+ }
60047
+ if (listing.keyScope !== "user") {
60048
+ const only = listing.workspaces[0];
60049
+ return {
60050
+ text: (only ? `Connected workspace: ${describeRow(only, null).slice(2)}
60051
+
60052
+ ` : "") + LEGACY_KEY_NOTE
60053
+ };
60054
+ }
60055
+ if (!listing.workspaces.length) {
60056
+ return fail("The connected user is not an active member of any workspace.");
60057
+ }
60058
+ const open = listing.workspaces.find((workspace) => workspace.id === listing.lastOpenWorkspaceId);
60059
+ return {
60060
+ text: "Workspaces:\n" + listing.workspaces.map((workspace) => describeRow(workspace, listing.lastOpenWorkspaceId)).join("\n") + "\n\nLists span all of these. Tools given a project/draft id act in its workspace. New work goes to `workspace` if passed, else " + (open ? `${workspaceLabel(open)}, the one open in the web app.` : listing.workspaces.length === 1 ? "the only workspace." : "the workspace open in the web app \u2014 none is recorded, so pass `workspace` explicitly.")
60061
+ };
60062
+ }
60063
+ };
60064
+ var WORKSPACE_TOOLS = [listWorkspacesTool];
60065
+
59640
60066
  // src/mcp/contract-mode.ts
59641
60067
  var CONTRACT_ENV = "IMPRACTICAL_CONTRACT";
59642
60068
  function b20Semantics(env = process.env) {
@@ -59653,7 +60079,6 @@ var POSITIONING_RULE = "POSITIONING: never hand-position an element relative to
59653
60079
 
59654
60080
  // src/mcp/atelier.ts
59655
60081
  import { readFile as readFile2 } from "node:fs/promises";
59656
- import { fileURLToPath as fileURLToPath2 } from "node:url";
59657
60082
 
59658
60083
  // src/mcp/motion-context.ts
59659
60084
  import { readFile } from "node:fs/promises";
@@ -59781,13 +60206,13 @@ function killDaemon(advert) {
59781
60206
  function cachedBinary(launcher) {
59782
60207
  try {
59783
60208
  const cache2 = JSON.parse(readFileSync(BINARIES(), "utf8"));
59784
- const path6 = cache2[launcher];
59785
- return path6 && existsSync(path6) ? path6 : void 0;
60209
+ const path7 = cache2[launcher];
60210
+ return path7 && existsSync(path7) ? path7 : void 0;
59786
60211
  } catch {
59787
60212
  return void 0;
59788
60213
  }
59789
60214
  }
59790
- function cacheBinary(launcher, path6) {
60215
+ function cacheBinary(launcher, path7) {
59791
60216
  try {
59792
60217
  mkdirSync(STATE_DIR(), { recursive: true });
59793
60218
  let cache2 = {};
@@ -59795,7 +60220,7 @@ function cacheBinary(launcher, path6) {
59795
60220
  cache2 = JSON.parse(readFileSync(BINARIES(), "utf8"));
59796
60221
  } catch {
59797
60222
  }
59798
- cache2[launcher] = path6;
60223
+ cache2[launcher] = path7;
59799
60224
  writeFileSync(BINARIES(), JSON.stringify(cache2, null, 2));
59800
60225
  } catch {
59801
60226
  }
@@ -59805,10 +60230,10 @@ async function resolveBinary(launcher, options) {
59805
60230
  if (cached2) return cached2;
59806
60231
  const server = await chromium.launchServer(options);
59807
60232
  try {
59808
- const path6 = server.process()?.spawnfile;
59809
- if (!path6) throw new Error("Playwright launched a browser without recording its path");
59810
- cacheBinary(launcher, path6);
59811
- return path6;
60233
+ const path7 = server.process()?.spawnfile;
60234
+ if (!path7) throw new Error("Playwright launched a browser without recording its path");
60235
+ cacheBinary(launcher, path7);
60236
+ return path7;
59812
60237
  } finally {
59813
60238
  await server.close().catch(() => void 0);
59814
60239
  }
@@ -60512,8 +60937,8 @@ var collectFocusProbe = (input) => {
60512
60937
  if (!parent) break;
60513
60938
  for (const sibling of Array.from(parent.children)) {
60514
60939
  if (sibling === level) continue;
60515
- const text = textOf(sibling);
60516
- if (text && siblingTexts.length < 16) siblingTexts.push(text);
60940
+ const text2 = textOf(sibling);
60941
+ if (text2 && siblingTexts.length < 16) siblingTexts.push(text2);
60517
60942
  }
60518
60943
  level = parent;
60519
60944
  }
@@ -60540,11 +60965,11 @@ var NARRATIVE_ENTITY_STOPLIST = new Set(
60540
60965
  "the a an and or but nor to for with without your our their his her its my you we they it this that these those here there now new all one every each more most best better first last next meet introducing get set go from in on at by of no not just say hello welcome today tomorrow how what when where why who which try free start build ship launch power fast easy simple ai app team plan pro data live real time work works make made let us see watch look".split(/\s+/)
60541
60966
  );
60542
60967
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
60543
- var containsEntity = (text, entity) => new RegExp(`(?:^|[^A-Za-z0-9])${escapeRegExp(entity)}(?:[^A-Za-z0-9]|$)`, "i").test(text);
60968
+ var containsEntity = (text2, entity) => new RegExp(`(?:^|[^A-Za-z0-9])${escapeRegExp(entity)}(?:[^A-Za-z0-9]|$)`, "i").test(text2);
60544
60969
  function extractEntityTokens(copy) {
60545
60970
  const out = [];
60546
- for (const text of copy) {
60547
- for (const match of text.matchAll(/\b[A-Z][a-zA-Z0-9'&-]*(?:\s+[A-Z][a-zA-Z0-9'&-]*){0,2}\b/g)) {
60971
+ for (const text2 of copy) {
60972
+ for (const match of text2.matchAll(/\b[A-Z][a-zA-Z0-9'&-]*(?:\s+[A-Z][a-zA-Z0-9'&-]*){0,2}\b/g)) {
60548
60973
  const words = match[0].trim().split(/\s+/);
60549
60974
  while (words.length && NARRATIVE_ENTITY_STOPLIST.has(words[0].toLowerCase())) words.shift();
60550
60975
  while (words.length && NARRATIVE_ENTITY_STOPLIST.has(words[words.length - 1].toLowerCase()))
@@ -60566,7 +60991,7 @@ function narrativeCameraFindings(probes) {
60566
60991
  const key = entity.toLowerCase();
60567
60992
  if (flagged.has(key)) continue;
60568
60993
  if (containsEntity(probe.focusedText, entity)) continue;
60569
- const sibling = probe.siblingTexts.find((text) => containsEntity(text, entity));
60994
+ const sibling = probe.siblingTexts.find((text2) => containsEntity(text2, entity));
60570
60995
  if (!sibling) continue;
60571
60996
  flagged.add(key);
60572
60997
  out.push(
@@ -60736,20 +61161,20 @@ var collectPoseGeometry = (input) => {
60736
61161
  }
60737
61162
  const connectors = [];
60738
61163
  for (const svg of Array.from(document.querySelectorAll("svg[data-connector]"))) {
60739
- const path6 = svg.querySelector("path");
60740
- if (!path6 || !(path6 instanceof SVGPathElement)) continue;
61164
+ const path7 = svg.querySelector("path");
61165
+ if (!path7 || !(path7 instanceof SVGPathElement)) continue;
60741
61166
  const opacity = effectiveOpacity(svg);
60742
61167
  if (opacity <= 0) continue;
60743
61168
  let aIn = false;
60744
61169
  let bIn = false;
60745
61170
  let midIn = false;
60746
61171
  try {
60747
- const total = path6.getTotalLength();
60748
- const ctm = path6.getScreenCTM();
61172
+ const total = path7.getTotalLength();
61173
+ const ctm = path7.getScreenCTM();
60749
61174
  if (!ctm || !(total > 0)) continue;
60750
61175
  const owner = svg.createSVGPoint ? svg : null;
60751
61176
  const project = (t4) => {
60752
- const p = path6.getPointAtLength(t4);
61177
+ const p = path7.getPointAtLength(t4);
60753
61178
  if (owner) {
60754
61179
  const pt = owner.createSVGPoint();
60755
61180
  pt.x = p.x;
@@ -60804,8 +61229,8 @@ var collectPoseGeometry = (input) => {
60804
61229
  for (const node of Array.from(el2.childNodes)) {
60805
61230
  if (node.nodeType === Node.TEXT_NODE) direct += node.textContent ?? "";
60806
61231
  }
60807
- const text = direct.trim();
60808
- if (text.length < 3) continue;
61232
+ const text2 = direct.trim();
61233
+ if (text2.length < 3) continue;
60809
61234
  const r = el2.getBoundingClientRect();
60810
61235
  if (r.width < 2 || r.height < 8) continue;
60811
61236
  const frac = clippedVisibleFraction(r, el2);
@@ -60815,7 +61240,7 @@ var collectPoseGeometry = (input) => {
60815
61240
  edgeTexts.push({
60816
61241
  textId: tagOf(el2, "data-motion-textid"),
60817
61242
  selector: describe3(el2),
60818
- text: text.slice(0, 60),
61243
+ text: text2.slice(0, 60),
60819
61244
  opacity,
60820
61245
  visibleFraction: frac,
60821
61246
  screenHeight: r.height
@@ -61205,8 +61630,8 @@ var PLATE_EXPOSED_MIN = 0.25;
61205
61630
  var PLATE_PERSISTENCE_MIN = 0.75;
61206
61631
  function parseShotBeats(raw) {
61207
61632
  if (!raw) return [];
61208
- const text = raw.replace(/^\[shotlist\.json[^\n]*\]\s*\n/, "");
61209
- const parsed = JSON.parse(text);
61633
+ const text2 = raw.replace(/^\[shotlist\.json[^\n]*\]\s*\n/, "");
61634
+ const parsed = JSON.parse(text2);
61210
61635
  return (parsed.beats ?? []).map((b, i) => ({
61211
61636
  index: i + 1,
61212
61637
  start: Number(b.start ?? 0),
@@ -62187,17 +62612,17 @@ function collectTableInPage(rootSelector) {
62187
62612
  };
62188
62613
  const conns = [];
62189
62614
  for (const svg of Array.from(document.querySelectorAll("svg[data-connector]"))) {
62190
- const path6 = svg.querySelector("path");
62191
- if (!(path6 instanceof SVGPathElement)) continue;
62615
+ const path7 = svg.querySelector("path");
62616
+ if (!(path7 instanceof SVGPathElement)) continue;
62192
62617
  const op = effectiveOpacity(svg);
62193
62618
  if (op <= 0.05) continue;
62194
62619
  try {
62195
- const total = path6.getTotalLength();
62196
- const ctm = path6.getScreenCTM();
62620
+ const total = path7.getTotalLength();
62621
+ const ctm = path7.getScreenCTM();
62197
62622
  if (!ctm || !(total > 0)) continue;
62198
62623
  const owner = svg;
62199
62624
  const project = (t4) => {
62200
- const p = path6.getPointAtLength(t4);
62625
+ const p = path7.getPointAtLength(t4);
62201
62626
  const pt = owner.createSVGPoint();
62202
62627
  pt.x = p.x;
62203
62628
  pt.y = p.y;
@@ -62334,8 +62759,8 @@ function collectCallerValues(ast) {
62334
62759
  const inner = t3.isJSXExpressionContainer(v) ? v.expression : v;
62335
62760
  if (t3.isJSXEmptyExpression(inner) || t3.isBooleanLiteral(inner) || t3.isNullLiteral(inner)) continue;
62336
62761
  if (t3.isIdentifier(inner) && inner.name === "undefined") continue;
62337
- const text = t3.isStringLiteral(inner) ? inner.value : t3.isTemplateLiteral(inner) ? inner.quasis.map((q) => q.value.cooked ?? "").join("\u2026") : "";
62338
- props.set(attr.name.name, [...props.get(attr.name.name) ?? [], text]);
62762
+ const text2 = t3.isStringLiteral(inner) ? inner.value : t3.isTemplateLiteral(inner) ? inner.quasis.map((q) => q.value.cooked ?? "").join("\u2026") : "";
62763
+ props.set(attr.name.name, [...props.get(attr.name.name) ?? [], text2]);
62339
62764
  }
62340
62765
  byComponent.set(el2.name.name, props);
62341
62766
  });
@@ -63009,8 +63434,8 @@ function serializeMarkSet(set2) {
63009
63434
  if (w.overflow) notes.push(`content overflows its box (${w.overflow})`);
63010
63435
  if (!w.visible) notes.push("not visible");
63011
63436
  if (w.src) notes.push(`src ${w.src}`);
63012
- const text = w.text ? JSON.stringify(w.text) : "\u2014";
63013
- lines.push(`${w.mark} | ${w.type} | ${text} | ${Math.round(w.rect.x)},${Math.round(w.rect.y)},${Math.round(w.rect.w)},${Math.round(w.rect.h)} | ${w.click ? "yes" : "no"} | ${notes.join("; ") || "\u2014"}`);
63437
+ const text2 = w.text ? JSON.stringify(w.text) : "\u2014";
63438
+ lines.push(`${w.mark} | ${w.type} | ${text2} | ${Math.round(w.rect.x)},${Math.round(w.rect.y)},${Math.round(w.rect.w)},${Math.round(w.rect.h)} | ${w.click ? "yes" : "no"} | ${notes.join("; ") || "\u2014"}`);
63014
63439
  }
63015
63440
  return lines.join("\n");
63016
63441
  }
@@ -64291,7 +64716,7 @@ async function runReviewModules(input) {
64291
64716
  // frame-sized, so geometry cannot tell the target from its wrapper or its children.
64292
64717
  // The author wrote the intent down — world.camera.zoomTo(detailCard, …).
64293
64718
  subjectAt: async (t4) => describeShot(shotAt(shots, t4)),
64294
- log: (name2, text) => writeFileSync5(path4.join(frameDir, name2), text),
64719
+ log: (name2, text2) => writeFileSync5(path4.join(frameDir, name2), text2),
64295
64720
  // One red box around the element the action names — Set-of-Mark scoped to a single
64296
64721
  // element, so the eye is pointed without the 26-mark noise that hurt the earlier test.
64297
64722
  annotate: async (jpg, action) => {
@@ -64385,7 +64810,7 @@ async function runReviewModules(input) {
64385
64810
  duration: duration3,
64386
64811
  ask: (prompt, images2) => runner(family2)(prompt, images2, { timeoutMs: 3e5 }),
64387
64812
  variant: reviewWalkVariant(),
64388
- log: (name2, text) => writeFileSync5(path4.join(frameDir, name2), text)
64813
+ log: (name2, text2) => writeFileSync5(path4.join(frameDir, name2), text2)
64389
64814
  });
64390
64815
  for (const f of res.findings) failures.push(`ACTION ${f.index} ${f.start.toFixed(2)}\u2013${f.end.toFixed(2)}s: ${f.label} \u2014 ${f.claim.slice(0, 90)} \u2014 ${f.evidence.slice(0, 160)}`);
64391
64816
  }
@@ -64494,10 +64919,10 @@ async function runReviewModules(input) {
64494
64919
  );
64495
64920
  }
64496
64921
  if (ledger) {
64497
- const text = describeLedger(ledger);
64498
- if (text.trim()) {
64922
+ const text2 = describeLedger(ledger);
64923
+ if (text2.trim()) {
64499
64924
  lines.push(" ISSUE LEDGER \u2014 the same defect seen at several actions is ONE issue; support counts how many saw it:");
64500
- for (const l of text.split("\n")) lines.push(" " + l);
64925
+ for (const l of text2.split("\n")) lines.push(" " + l);
64501
64926
  }
64502
64927
  }
64503
64928
  if (!failures.length) lines.push(" all beats clean \u2014 every module ran and every action was checked; export is not held by the review modules");
@@ -64747,7 +65172,7 @@ async function sampleCatalogFeatures(page, frames) {
64747
65172
  // src/mcp/preflight.ts
64748
65173
  var esbuildPromise = null;
64749
65174
  function loadEsbuild() {
64750
- esbuildPromise ??= import("./main-72BNF5J2.js").then(
65175
+ esbuildPromise ??= import("./main-BEONOBG5.js").then(
64751
65176
  (mod) => mod,
64752
65177
  () => null
64753
65178
  );
@@ -65014,9 +65439,9 @@ function pushAdvisoryEnabled(env = process.env) {
65014
65439
  return motionSlopEnabled(env) && env.IMPRACTICAL_PUSH_ADVISORY !== "0";
65015
65440
  }
65016
65441
  var lineOf = (content, index) => content.slice(0, index).split("\n").length;
65017
- var scannable = (path6) => !path6.startsWith("kit/") && !path6.endsWith(".json") && !path6.endsWith(".md") && /\.(tsx?|jsx?|css|html)$/.test(path6);
65018
- var clip = (text, max = 90) => {
65019
- const flat = text.replace(/\s+/g, " ").trim();
65442
+ var scannable = (path7) => !path7.startsWith("kit/") && !path7.endsWith(".json") && !path7.endsWith(".md") && /\.(tsx?|jsx?|css|html)$/.test(path7);
65443
+ var clip = (text2, max = 90) => {
65444
+ const flat = text2.replace(/\s+/g, " ").trim();
65020
65445
  return flat.length > max ? `${flat.slice(0, max - 1)}\u2026` : flat;
65021
65446
  };
65022
65447
  var CLASSNAME_RE = /className\s*=\s*(?:"([^"]*)"|'([^']*)'|\{`([^`]*)`\})/g;
@@ -65197,8 +65622,8 @@ var CARD_PAD_RE = /\bp[xy]?-(?:\d|\[)/;
65197
65622
  var CARD_FIXED_RE = /\b[wh]-\[\d/;
65198
65623
  function cssCardClasses(files) {
65199
65624
  const classes = /* @__PURE__ */ new Set();
65200
- for (const [path6, content] of Object.entries(files)) {
65201
- if (!scannable(path6) || !path6.endsWith(".css") || typeof content !== "string") continue;
65625
+ for (const [path7, content] of Object.entries(files)) {
65626
+ if (!scannable(path7) || !path7.endsWith(".css") || typeof content !== "string") continue;
65202
65627
  for (const chunk of content.split("}")) {
65203
65628
  const brace = chunk.indexOf("{");
65204
65629
  if (brace < 0) continue;
@@ -65287,10 +65712,10 @@ function collectCardConstructs(file2, content, cssCards) {
65287
65712
  function detectCardGridReflex(files) {
65288
65713
  const cssCards = cssCardClasses(files);
65289
65714
  const constructs = [];
65290
- for (const [path6, content] of Object.entries(files)) {
65291
- if (!scannable(path6) || typeof content !== "string") continue;
65292
- if (path6.endsWith(".css")) continue;
65293
- constructs.push(...collectCardConstructs(path6, content, cssCards));
65715
+ for (const [path7, content] of Object.entries(files)) {
65716
+ if (!scannable(path7) || typeof content !== "string") continue;
65717
+ if (path7.endsWith(".css")) continue;
65718
+ constructs.push(...collectCardConstructs(path7, content, cssCards));
65294
65719
  }
65295
65720
  const scenes = new Set(constructs.map((c) => c.scene));
65296
65721
  if (scenes.size < 2) return [];
@@ -65317,13 +65742,13 @@ function detectNakedFonts(files) {
65317
65742
  }
65318
65743
  function detectMotionSlop(files) {
65319
65744
  const findings = [];
65320
- for (const [path6, content] of Object.entries(files)) {
65321
- if (!scannable(path6) || typeof content !== "string") continue;
65745
+ for (const [path7, content] of Object.entries(files)) {
65746
+ if (!scannable(path7) || typeof content !== "string") continue;
65322
65747
  findings.push(
65323
- ...detectEyebrows(path6, content),
65324
- ...detectTextInCards(path6, content),
65325
- ...detectMetronome(path6, content),
65326
- ...detectSingleTemplate(path6, content)
65748
+ ...detectEyebrows(path7, content),
65749
+ ...detectTextInCards(path7, content),
65750
+ ...detectMetronome(path7, content),
65751
+ ...detectSingleTemplate(path7, content)
65327
65752
  );
65328
65753
  }
65329
65754
  findings.push(...detectCardGridReflex(files));
@@ -65911,7 +66336,7 @@ async function sampleTextBlocks(page, minFontPx) {
65911
66336
  const viewportHeight = window.innerHeight;
65912
66337
  const margin = 0.02 * Math.min(viewportWidth, viewportHeight);
65913
66338
  const shown = (style) => style.visibility !== "hidden" && style.display !== "none" && !(parseFloat(style.opacity) < 0.05);
65914
- const describe3 = (el2, text) => {
66339
+ const describe3 = (el2, text2) => {
65915
66340
  const style = getComputedStyle(el2);
65916
66341
  const fontSize = parseFloat(style.fontSize);
65917
66342
  if (!Number.isFinite(fontSize)) return null;
@@ -65930,7 +66355,7 @@ async function sampleTextBlocks(page, minFontPx) {
65930
66355
  }
65931
66356
  }
65932
66357
  return {
65933
- text: text.slice(0, 40),
66358
+ text: text2.slice(0, 40),
65934
66359
  fontSize,
65935
66360
  x: rect.x,
65936
66361
  y: rect.y,
@@ -65962,8 +66387,8 @@ async function sampleTextBlocks(page, minFontPx) {
65962
66387
  }
65963
66388
  for (const [root, slot] of slotOf) {
65964
66389
  if (!liveRoots.has(root)) continue;
65965
- const text = (root.textContent ?? "").replace(/\s+/g, " ").trim();
65966
- out[slot] = describe3(root, text);
66390
+ const text2 = (root.textContent ?? "").replace(/\s+/g, " ").trim();
66391
+ out[slot] = describe3(root, text2);
65967
66392
  }
65968
66393
  return out.filter((block) => block !== null);
65969
66394
  },
@@ -65983,7 +66408,7 @@ var WITNESS_SCALE_FRACTION = 0.04;
65983
66408
  var MIN_WITNESS_SECONDS = 0.9;
65984
66409
  var STATEMENT_HOLD_SECONDS = 1.2;
65985
66410
  var RIDING_DIFF_THRESHOLD = 0.05;
65986
- var normalize = (text) => text.trim().replace(/\s+/g, " ");
66411
+ var normalize = (text2) => text2.trim().replace(/\s+/g, " ");
65987
66412
  var settledBetween = (a, b, frameDiagonal) => Math.hypot(a.x + a.width / 2 - (b.x + b.width / 2), a.y + a.height / 2 - (b.y + b.height / 2)) < frameDiagonal * 0.01;
65988
66413
  var ICON_GLYPHS = /^[\s\u2190-\u21FF\u27F0-\u27FF\u2794-\u27BF\u2713\u2714\u2705\u2717\u2718\u2716\u274C\u25B6\u25C0\u25B2\u25BC\u2605\u2606\u2B50]+$|^\s*(->|=>|<-|<=|\[x\]|\[ \])\s*$/;
65989
66414
  function analyzeTextContract(input) {
@@ -66062,12 +66487,12 @@ function analyzeTextContract(input) {
66062
66487
  );
66063
66488
  const firstLocked = lockedLines?.length ? normalize(lockedLines[0]) : null;
66064
66489
  for (const [index, block] of openers.entries()) {
66065
- const text = normalize(block.text);
66066
- const isDeclaredOpening = firstLocked ? firstLocked.startsWith(text) || text.startsWith(firstLocked) : index === 0 && openers.length === 1;
66490
+ const text2 = normalize(block.text);
66491
+ const isDeclaredOpening = firstLocked ? firstLocked.startsWith(text2) || text2.startsWith(firstLocked) : index === 0 && openers.length === 1;
66067
66492
  if (!isDeclaredOpening && (firstLocked || openers.length > 1)) {
66068
66493
  findings.push({
66069
66494
  kind: "frame0-leak",
66070
- detail: `"${text.slice(0, 30)}" is visible at frame 0 but is not the film's opening \u2014 a later element is leaking its initial state. Hide it statically (App.tsx or gsap.set in setup); a from() tween does not hide anything on a cold seek.`
66495
+ detail: `"${text2.slice(0, 30)}" is visible at frame 0 but is not the film's opening \u2014 a later element is leaking its initial state. Hide it statically (App.tsx or gsap.set in setup); a from() tween does not hide anything on a cold seek.`
66071
66496
  });
66072
66497
  }
66073
66498
  }
@@ -66105,13 +66530,13 @@ function analyzeTextContract(input) {
66105
66530
  const glyphSeen = /* @__PURE__ */ new Set();
66106
66531
  for (const sample of samples) {
66107
66532
  for (const block of sample.blocks) {
66108
- const text = block.text.trim();
66109
- if (!text || block.fontSize < CANDIDATE_MIN_PX) continue;
66110
- if (!ICON_GLYPHS.test(text) || glyphSeen.has(text)) continue;
66111
- glyphSeen.add(text);
66533
+ const text2 = block.text.trim();
66534
+ if (!text2 || block.fontSize < CANDIDATE_MIN_PX) continue;
66535
+ if (!ICON_GLYPHS.test(text2) || glyphSeen.has(text2)) continue;
66536
+ glyphSeen.add(text2);
66112
66537
  findings.push({
66113
66538
  kind: "glyph-icon",
66114
- detail: `"${text}" is a text glyph doing an icon's job. Use the real icon from lucide-react (import { ArrowRight, Check } from 'lucide-react') \u2014 a glyph inherits the text font, so it sits on the baseline at the wrong weight and optical size, and it cannot take a stroke width or animate as its own element.`
66539
+ detail: `"${text2}" is a text glyph doing an icon's job. Use the real icon from lucide-react (import { ArrowRight, Check } from 'lucide-react') \u2014 a glyph inherits the text font, so it sits on the baseline at the wrong weight and optical size, and it cannot take a stroke width or animate as its own element.`
66115
66540
  });
66116
66541
  }
66117
66542
  }
@@ -70105,7 +70530,7 @@ function normalizeBundle(html) {
70105
70530
  var INLINEABLE = /\.(png|jpe?g|gif|webp|svg|mp4|webm|mov|woff2)$/i;
70106
70531
  function skippedMedia(html, slug) {
70107
70532
  const pattern = new RegExp(`/scenes/${slug.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/[^"'\\s)]+`, "g");
70108
- return [...new Set(html.match(pattern) ?? [])].filter((path6) => INLINEABLE.test(path6));
70533
+ return [...new Set(html.match(pattern) ?? [])].filter((path7) => INLINEABLE.test(path7));
70109
70534
  }
70110
70535
  async function resolvePreview(ctx, draftId) {
70111
70536
  const draft = await ctx.invoke("get-draft", { draftId });
@@ -70159,11 +70584,11 @@ async function openPreview(ctx, draftId) {
70159
70584
  const consoleTail = [];
70160
70585
  page.on("pageerror", (err) => pageErrors.push((err.stack || err.message || String(err)).slice(0, 900)));
70161
70586
  page.on("console", (msg) => {
70162
- const text = msg.text();
70163
- if (/music\.json|connect-src/.test(text)) return;
70164
- consoleTail.push(`console.${msg.type()}: ${text.slice(0, 300)}`);
70587
+ const text2 = msg.text();
70588
+ if (/music\.json|connect-src/.test(text2)) return;
70589
+ consoleTail.push(`console.${msg.type()}: ${text2.slice(0, 300)}`);
70165
70590
  if (consoleTail.length > 30) consoleTail.shift();
70166
- if (msg.type() === "error") pageErrors.push("console.error: " + text.slice(0, 600));
70591
+ if (msg.type() === "error") pageErrors.push("console.error: " + text2.slice(0, 600));
70167
70592
  });
70168
70593
  await page.goto(PREVIEW_URL, { waitUntil: "load", timeout: 6e4 });
70169
70594
  try {
@@ -70478,6 +70903,9 @@ var motionContextTool = {
70478
70903
  title: "Study the motion library",
70479
70904
  description: `Retrieve the current versioned house skills, relevant templates, selected production reference sources, the catalog of house kits this draft can install, and rendered style frames for this brief. CALL THIS after engine_types and before create_video. The production library is fetched live; local development may explicitly override its guidance with ${LOCAL_MOTION_LIBRARY_ENV}.`,
70480
70905
  inputSchema: {
70906
+ workspace: external_exports.string().min(1).max(200).optional().describe(
70907
+ "Workspace holding brandSlug (id, slug or name). Default: the one open in the web app, or the only one."
70908
+ ),
70481
70909
  brief: external_exports.string().min(1).describe("What the video should communicate and how it should feel."),
70482
70910
  styleId: external_exports.string().optional().describe("Optional style id from a previous motion_context result."),
70483
70911
  templateId: external_exports.string().optional().describe("Optional template id to study in detail."),
@@ -70533,6 +70961,21 @@ ${notes.join("\n")}`.trim(),
70533
70961
  }
70534
70962
  };
70535
70963
 
70964
+ // src/mcp/checkout.ts
70965
+ import { existsSync as existsSync6 } from "node:fs";
70966
+ import path5 from "node:path";
70967
+ function checkoutFile(relative, cwd = process.cwd()) {
70968
+ let directory = path5.resolve(cwd);
70969
+ for (let depth = 0; depth < 6; depth += 1) {
70970
+ const candidate = path5.join(directory, relative);
70971
+ if (existsSync6(candidate)) return candidate;
70972
+ const parent = path5.dirname(directory);
70973
+ if (parent === directory) break;
70974
+ directory = parent;
70975
+ }
70976
+ return void 0;
70977
+ }
70978
+
70536
70979
  // src/mcp/atelier.ts
70537
70980
  var ATELIER_ENV = "IMPRACTICAL_ATELIER";
70538
70981
  function atelierEnabled(env = process.env) {
@@ -70540,33 +70983,51 @@ function atelierEnabled(env = process.env) {
70540
70983
  }
70541
70984
  var ATELIER_FIRST_PASS_RULE = "ATELIER FIRST PASS: on the first authored attempt, every entrance, transition, and typography beat must use an Atelier component. Preserve its native choreography and replace content through its supported structure. If the user asks to change that treatment, follow the user and allow custom motion or another approach; this default must never block a requested revision. Use components_catalog/component_study/install_components when the exact-source component extension is available; atelier_catalog/atelier_study provide the skeleton alternative. Both are Atelier components, and a beat needs only one integration. Keep the current World motion standard.";
70542
70985
  var ATELIER_RULE = ATELIER_FIRST_PASS_RULE + " For skeleton studies, preserve the required elements, use atelier.place() to fit the wrapper, and atelier.plan() inside film.cut() for boundaries. World cut semantics start all boundary plans together after the previous end horizon. Use atelier.play() for explicit in-scene cues; atelier.target() provides camera targets inside transformed studies.";
70543
- async function loadCatalog() {
70986
+ async function loadLocalCatalog() {
70544
70987
  const file2 = process.env[LOCAL_MOTION_LIBRARY_ENV]?.trim();
70545
- if (!file2) {
70546
- const candidates = ["../assets/atelier-catalog.json", "../../assets/atelier-catalog.json"];
70547
- for (const relative of candidates) {
70548
- try {
70549
- return JSON.parse(await readFile2(fileURLToPath2(new URL(relative, import.meta.url)), "utf8"));
70550
- } catch (error51) {
70551
- if (error51.code !== "ENOENT") throw error51;
70552
- }
70553
- }
70554
- throw new Error("No local Atelier catalog is available. Start the MCP from the World checkout or configure a matching local motion-library file.");
70555
- }
70556
- const local2 = parseLocalMotionLibrary(await readFile2(file2, "utf8"), file2);
70557
- if (!Array.isArray(local2.atelier) || !local2.atelier.length) {
70558
- throw new Error(`${file2} carries no Atelier catalog. Clear the override to use the bundled snapshot, or supply its matching catalog and kit together.`);
70988
+ if (file2) {
70989
+ const local2 = parseLocalMotionLibrary(await readFile2(file2, "utf8"), file2);
70990
+ if (!Array.isArray(local2.atelier) || !local2.atelier.length) {
70991
+ throw new Error(`${file2} carries no Atelier catalog. Clear the override to use the live library, or supply its matching catalog and kit together.`);
70992
+ }
70993
+ return local2.atelier;
70994
+ }
70995
+ const checkout = checkoutFile("experiment/atelier/atelier-catalog.json");
70996
+ return checkout ? JSON.parse(await readFile2(checkout, "utf8")) : null;
70997
+ }
70998
+ var remoteLabels = null;
70999
+ var REMOTE_LABELS_TTL_MS = 5 * 6e4;
71000
+ async function catalogLabels(ctx) {
71001
+ const local2 = await loadLocalCatalog();
71002
+ if (local2) return local2;
71003
+ if (remoteLabels && Date.now() - remoteLabels.at < REMOTE_LABELS_TTL_MS) return remoteLabels.studies;
71004
+ if (!ctx) throw new Error("The Atelier library is served live; no connection is available here.");
71005
+ const index = await ctx.invoke("atelier-library", { action: "index" });
71006
+ if (!Array.isArray(index.studies) || !index.studies.length) {
71007
+ throw new Error("The Atelier library returned no studies \u2014 the server may predate live Atelier serving.");
71008
+ }
71009
+ remoteLabels = { at: Date.now(), studies: index.studies };
71010
+ return index.studies;
71011
+ }
71012
+ async function studyEntry(id, ctx) {
71013
+ const local2 = await loadLocalCatalog();
71014
+ if (local2) return local2.find((entry) => entry.id === id) ?? null;
71015
+ if (!/^[a-z0-9][a-z0-9-]{0,79}$/.test(id)) return null;
71016
+ try {
71017
+ return (await ctx.invoke("atelier-library", { action: "study", id })).study;
71018
+ } catch (error51) {
71019
+ if (/\b404\b|not published/i.test(error51 instanceof Error ? error51.message : "")) return null;
71020
+ throw error51;
70559
71021
  }
70560
- return local2.atelier;
70561
71022
  }
70562
71023
  var SECTIONS = ["entrances", "transitions", "typography", "camera", "choreography", "interactions", "backgrounds"];
70563
- async function atelierSourceFindings(direction, app = "") {
71024
+ async function atelierSourceFindings(direction, app = "", ctx) {
70564
71025
  const plays = [...direction.matchAll(/atelier\.play\(\s*'([^']+)'/g)].map((m) => m[1]);
70565
71026
  const out = [];
70566
71027
  if (!plays.length && !/data-atelier=/.test(app)) return out;
70567
71028
  let sections = /* @__PURE__ */ new Map();
70568
71029
  try {
70569
- sections = new Map((await loadCatalog()).map((c) => [c.id, c.section]));
71030
+ sections = new Map((await catalogLabels(ctx)).map((c) => [c.id, c.section]));
70570
71031
  } catch {
70571
71032
  return [];
70572
71033
  }
@@ -70598,8 +71059,8 @@ var atelierCatalogTool = {
70598
71059
  position: external_exports.string().optional().describe("Only studies usable at this film position: 'opening', 'anywhere', 'payoff', 'close'.")
70599
71060
  },
70600
71061
  local: true,
70601
- handler: async (args) => {
70602
- const all = await loadCatalog();
71062
+ handler: async (args, ctx) => {
71063
+ const all = await catalogLabels(ctx);
70603
71064
  const rows = all.filter(
70604
71065
  (c) => (!args.section || c.section === args.section || c.secondary_sections.includes(String(args.section))) && (!args.role || c.role.includes(String(args.role))) && (!args.position || c.position_in_film.includes(String(args.position)))
70605
71066
  );
@@ -70621,10 +71082,10 @@ var atelierStudyTool = {
70621
71082
  id: external_exports.string().describe("Study id from atelier_catalog.")
70622
71083
  },
70623
71084
  local: true,
70624
- handler: async (args) => {
70625
- const all = await loadCatalog();
70626
- const c = all.find((x) => x.id === String(args.id));
71085
+ handler: async (args, ctx) => {
71086
+ const c = await studyEntry(String(args.id), ctx);
70627
71087
  if (!c) {
71088
+ const all = await catalogLabels(ctx);
70628
71089
  const near = all.filter((x) => x.id.includes(String(args.id).slice(0, 6))).map((x) => x.id).slice(0, 6);
70629
71090
  return { text: `No Atelier study "${args.id}".${near.length ? " Near: " + near.join(", ") : ""} Call atelier_catalog.`, isError: true };
70630
71091
  }
@@ -70632,7 +71093,7 @@ var atelierStudyTool = {
70632
71093
  text: `ATELIER STUDY ${c.id} \u2014 ${c.name} (${c.duration}s)
70633
71094
  ${c.premise}
70634
71095
 
70635
- This study requires its mounted React component; a static skeleton does not preserve its lifecycle or canvas rendering. Call component_study({id:${JSON.stringify(c.component_id ?? c.id)}}), then install_components for that ID. Mount Component and use playComponent as shown in its usage. Do not call atelier.play/plan for this study. If those tools are absent, run the consolidated local CLI launcher with its matching component manifest.
71096
+ This study requires its mounted React component; a static skeleton does not preserve its lifecycle or canvas rendering. Call component_study({id:${JSON.stringify(c.component_id ?? c.id)}}), then install_components for that ID. Mount Component and use playComponent as shown in its usage. Do not call atelier.play/plan for this study.
70636
71097
 
70637
71098
  ` + ATELIER_FIRST_PASS_RULE
70638
71099
  };
@@ -70683,43 +71144,43 @@ var APP_STAGE_TRANSFORM = /data-stage[^>]*(?:transform\s*:\s*['"`]?\s*(?:scale|t
70683
71144
  var RETURN_TIMELINE = /(?:^|[;{\s])return\s+(?:ctx\.)?(?:tl|timeline)\s*(?:;|\}|$)/;
70684
71145
  function cameraLint(files) {
70685
71146
  const out = [];
70686
- for (const [path6, content] of Object.entries(files)) {
70687
- if (path6.startsWith("kit/") || !/\.(ts|tsx|js|jsx)$/.test(path6)) continue;
71147
+ for (const [path7, content] of Object.entries(files)) {
71148
+ if (path7.startsWith("kit/") || !/\.(ts|tsx|js|jsx)$/.test(path7)) continue;
70688
71149
  const lines = content.split("\n");
70689
71150
  lines.forEach((raw, i) => {
70690
71151
  if (ALLOW.test(raw)) return;
70691
71152
  const line = i + 1;
70692
- const text = raw.trim().slice(0, 140);
70693
- if (path6.endsWith("App.tsx") || path6.endsWith(".tsx")) {
71153
+ const text2 = raw.trim().slice(0, 140);
71154
+ if (path7.endsWith("App.tsx") || path7.endsWith(".tsx")) {
70694
71155
  if (APP_STAGE_TRANSFORM.test(raw))
70695
- out.push({ path: path6, line, text, severity: "note", why: "the stage element carries its own transform \u2014 that is a hand-rolled camera", fix: "remove it; the World Camera moves the stage" });
71156
+ out.push({ path: path7, line, text: text2, severity: "note", why: "the stage element carries its own transform \u2014 that is a hand-rolled camera", fix: "remove it; the World Camera moves the stage" });
70696
71157
  return;
70697
71158
  }
70698
71159
  let m;
70699
71160
  if (RETURN_TIMELINE.test(raw)) {
70700
- out.push({ path: path6, line, text, severity: "note", why: "the direction returns the timeline \u2014 the stage awaits that value, and a GSAP timeline is a thenable that resolves only when the film COMPLETES; a paused film never does, so the preview never becomes ready", fix: "return nothing from direction (delete this line); the engine already owns ctx.tl" });
71161
+ out.push({ path: path7, line, text: text2, severity: "note", why: "the direction returns the timeline \u2014 the stage awaits that value, and a GSAP timeline is a thenable that resolves only when the film COMPLETES; a paused film never does, so the preview never becomes ready", fix: "return nothing from direction (delete this line); the engine already owns ctx.tl" });
70701
71162
  return;
70702
71163
  }
70703
71164
  if (m = LEGACY.exec(raw)) {
70704
71165
  const verb = m[1];
70705
71166
  const fix = verb === "set" || verb === "full" ? "world.camera.cutTo(subject) (or world.camera.moveTo for a glide)" : verb === "move" ? "film.at(t).do(world.camera.moveTo(subject)) \u2014 name the subject, the verb centres and frames it" : verb === "crop" || verb === "focus" ? "world.camera.zoomTo(subject) (or focusOn)" : "world.camera.moveTo / zoomTo / cutTo / whipTo";
70706
- out.push({ path: path6, line, text, severity: "note", why: `legacy camera API (camera.${verb})`, fix });
71167
+ out.push({ path: path7, line, text: text2, severity: "note", why: `legacy camera API (camera.${verb})`, fix });
70707
71168
  return;
70708
71169
  }
70709
71170
  if (!b20Semantics() && HAND_TIMED_BOUNDARY.test(raw)) {
70710
- out.push({ path: path6, line, text, severity: "note", why: "a scene boundary scheduled by hand (film.at(<number>) with an exit/strike/transition)", fix: "film.cut(previous.exit(...), next.enter(...), world.camera.moveTo(...)) \u2014 the sequencer advances on the previous plan's end horizon; typed times are for in-scene cues only" });
71171
+ out.push({ path: path7, line, text: text2, severity: "note", why: "a scene boundary scheduled by hand (film.at(<number>) with an exit/strike/transition)", fix: "film.cut(previous.exit(...), next.enter(...), world.camera.moveTo(...)) \u2014 the sequencer advances on the previous plan's end horizon; typed times are for in-scene cues only" });
70711
71172
  return;
70712
71173
  }
70713
71174
  if (STAGE_TWEEN.test(raw)) {
70714
- out.push({ path: path6, line, text, severity: "note", why: "a tween on the stage element is a hand-rolled camera move", fix: "world.camera.moveTo / zoomTo on the subject instead" });
71175
+ out.push({ path: path7, line, text: text2, severity: "note", why: "a tween on the stage element is a hand-rolled camera move", fix: "world.camera.moveTo / zoomTo on the subject instead" });
70715
71176
  return;
70716
71177
  }
70717
71178
  if (m = SCENE_ROOT.exec(raw)) {
70718
71179
  const vars = m[1];
70719
71180
  if (SCALE_IN.test(vars))
70720
- out.push({ path: path6, line, text, severity: "note", why: "scaling a scene root is a zoom in disguise", fix: "world.camera.zoomTo(the component the story is about)" });
71181
+ out.push({ path: path7, line, text: text2, severity: "note", why: "scaling a scene root is a zoom in disguise", fix: "world.camera.zoomTo(the component the story is about)" });
70721
71182
  else if (TRANSLATE_IN.test(vars))
70722
- out.push({ path: path6, line, text, severity: "note", why: "translating a scene root by hand", fix: "use the engine's exit families or world.strike / world.transition for a scene change" });
71183
+ out.push({ path: path7, line, text: text2, severity: "note", why: "translating a scene root by hand", fix: "use the engine's exit families or world.strike / world.transition for a scene change" });
70723
71184
  }
70724
71185
  });
70725
71186
  }
@@ -70741,6 +71202,8 @@ var UNMETERED_MCP_TOOLS = /* @__PURE__ */ new Set([
70741
71202
  "whoami",
70742
71203
  "upgrade",
70743
71204
  "studio_link",
71205
+ // Lists the user's workspaces (multi-workspace keys); read-only.
71206
+ "list_workspaces",
70744
71207
  // This tool has a packaged local fallback and is explicitly required before
70745
71208
  // authentication-dependent work. Admission must not block that fallback.
70746
71209
  "engine_types"
@@ -70757,8 +71220,9 @@ var createSessionState = () => ({
70757
71220
  shotListByDraft: /* @__PURE__ */ new Map(),
70758
71221
  measuredByDraft: /* @__PURE__ */ new Map()
70759
71222
  });
71223
+ var WORKSPACE_ARG = external_exports.string().min(1).max(200).optional();
70760
71224
  var json2 = (value) => ({ text: JSON.stringify(value, null, 2) });
70761
- var fail = (text) => ({ text, isError: true });
71225
+ var fail2 = (text2) => ({ text: text2, isError: true });
70762
71226
  var nap = (ctx, ms) => ctx.sleep ? ctx.sleep(ms) : new Promise((resolve) => setTimeout(resolve, ms));
70763
71227
  var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "canceled"]);
70764
71228
  var POLL_ERROR_LIMIT = 5;
@@ -70856,16 +71320,20 @@ async function measuredBlock(ctx, rows) {
70856
71320
  return parts.length ? "\n\n" + parts.join("\n") : "";
70857
71321
  }
70858
71322
  var getDraft = (ctx, draftId) => ctx.invoke("get-draft", { draftId });
70859
- var studioLink = (ctx, projectId, slug) => {
71323
+ var studioLink = (ctx, projectId, slug, workspace = ctx.callWorkspaceId) => {
70860
71324
  const base = (ctx.appUrl ?? "https://motion.impractical.ai").replace(/\/$/, "");
70861
- return `${base}/projects/${projectId}/studio${slug ? `?scene=${slug}` : ""}`;
71325
+ return `${base}/projects/${projectId}/studio${studioQuery(slug, workspace)}`;
71326
+ };
71327
+ var resolvedStudioLink = async (ctx, projectId, slug) => {
71328
+ const workspace = ctx.callWorkspaceId ?? await ctx.projectWorkspace?.(projectId).catch(() => null) ?? null;
71329
+ return studioLink(ctx, projectId, slug, workspace);
70862
71330
  };
70863
71331
  async function saveDraft(ctx, draftId, apply) {
70864
71332
  let conflicts = 0;
70865
71333
  while (true) {
70866
71334
  const draft = await getDraft(ctx, draftId);
70867
71335
  if (draft.lockedByJobId) {
70868
- return fail(
71336
+ return fail2(
70869
71337
  `Draft ${draftId} is locked by job ${draft.lockedByJobId}. Wait for it with job_status({ jobIds: ["${draft.lockedByJobId}"], wait: true }), then retry.`
70870
71338
  );
70871
71339
  }
@@ -70881,15 +71349,15 @@ async function saveDraft(ctx, draftId, apply) {
70881
71349
  const merged = { ...draft.files, ...change.files };
70882
71350
  for (const deleted of change.deletedPaths) delete merged[deleted];
70883
71351
  const cameraFindings = cameraLintEnabled() ? cameraLint(change.files) : [];
70884
- const atelierFindings = atelierEnabled() ? await atelierSourceFindings(String(merged["direction.ts"] ?? ""), String(merged["App.tsx"] ?? "")) : [];
71352
+ const atelierFindings = atelierEnabled() ? await atelierSourceFindings(String(merged["direction.ts"] ?? ""), String(merged["App.tsx"] ?? ""), ctx) : [];
70885
71353
  const preflightError = await preflightDraft(merged);
70886
71354
  if (preflightError) {
70887
- return fail(
71355
+ return fail2(
70888
71356
  "Local build preflight failed \u2014 nothing was sent to the cloud, fix and save again:\n" + preflightError
70889
71357
  );
70890
71358
  }
70891
71359
  let advisory = "";
70892
- if (pushAdvisoryEnabled() && Object.keys(change.files).some((path6) => /\.(tsx?|jsx?|css|html)$/.test(path6))) {
71360
+ if (pushAdvisoryEnabled() && Object.keys(change.files).some((path7) => /\.(tsx?|jsx?|css|html)$/.test(path7))) {
70893
71361
  try {
70894
71362
  advisory = formatSlopFindings(detectMotionSlop(merged));
70895
71363
  } catch {
@@ -70935,7 +71403,7 @@ async function saveDraft(ctx, draftId, apply) {
70935
71403
  continue;
70936
71404
  }
70937
71405
  if (status === 409) {
70938
- return fail(
71406
+ return fail2(
70939
71407
  `Save rejected (409): ${message}. The draft changed underneath this edit \u2014 re-read the file and re-apply your change on top of the new content.`
70940
71408
  );
70941
71409
  }
@@ -71005,9 +71473,24 @@ function reviewModulesFailure(capture, session, draftId) {
71005
71473
  var accountStatus = {
71006
71474
  name: "account_status",
71007
71475
  title: "Show account, plan, and MCP usage",
71008
- description: "Show the connected workspace, current role, plan, weekly MCP usage, reset time, seats, and billing state. Run this once at the start of a session to confirm the connection works.",
71476
+ description: "Show the connected workspace(s) with role, plan, weekly MCP usage, reset time, seats, and billing state. Run this once at the start of a session to confirm the connection works.",
71009
71477
  inputSchema: {},
71010
- handler: async (_args, ctx) => json2(await ctx.invoke("workspace-bootstrap"))
71478
+ handler: async (_args, ctx) => {
71479
+ const listing = await fetchWorkspaces(ctx.invoke);
71480
+ if (listing.supported && listing.keyScope === "user") {
71481
+ const open = listing.workspaces.find((w) => w.id === listing.lastOpenWorkspaceId);
71482
+ return json2({
71483
+ keyScope: "user",
71484
+ workspaces: listing.workspaces,
71485
+ openInWebApp: open ? workspaceLabel(open) : null,
71486
+ howWorkspacesWork: "This connection reaches every workspace listed. Lists span all of them; tools given a project/draft id act in its workspace; new work goes to `workspace` if passed, else the workspace open in the web app, else the only one."
71487
+ });
71488
+ }
71489
+ const snapshot = await ctx.invoke("workspace-bootstrap");
71490
+ return json2(
71491
+ listing.supported ? { ...snapshot, workspaceAccess: LEGACY_KEY_NOTE } : snapshot
71492
+ );
71493
+ }
71011
71494
  };
71012
71495
  var whoami = {
71013
71496
  ...accountStatus,
@@ -71056,8 +71539,11 @@ var upgradeTool = {
71056
71539
  var listProjects = {
71057
71540
  name: "list_projects",
71058
71541
  title: "List video projects",
71059
- description: "List video projects in the connected workspace, newest first. Large workspaces: pass limit/offset to page instead of relying on a truncated dump, and nameFilter to search. The tool pages through the server list internally, so totals describe the whole workspace (up to 2,000 projects).",
71542
+ description: "List video projects, newest first \u2014 across every workspace the user belongs to (each project tagged with its workspace), or one workspace with `workspace`. Large lists: pass limit/offset to page instead of relying on a truncated dump, and nameFilter to search. The tool pages through the server list internally, so totals describe the whole listing (up to 2,000 projects in total).",
71060
71543
  inputSchema: {
71544
+ workspace: WORKSPACE_ARG.describe(
71545
+ "Only this workspace (id, slug or name). Default: every workspace you belong to."
71546
+ ),
71061
71547
  limit: external_exports.number().int().min(1).max(200).optional().describe("Return at most this many projects (default: all)."),
71062
71548
  offset: external_exports.number().int().min(0).optional().describe("Skip this many projects, for paging."),
71063
71549
  nameFilter: external_exports.string().optional().describe("Case-insensitive substring match on the project name/slug.")
@@ -71068,7 +71554,9 @@ var listProjects = {
71068
71554
  for (let pageCount = 0; serverOffset !== null && pageCount < 20; pageCount++) {
71069
71555
  const result = await ctx.invoke("list-projects", {
71070
71556
  offset: serverOffset,
71071
- limit: 100
71557
+ limit: 100,
71558
+ // Spans every workspace for a multi-workspace key; ignored otherwise.
71559
+ ...args.workspace ? {} : { allWorkspaces: true }
71072
71560
  });
71073
71561
  const rows = result.projects ?? [];
71074
71562
  fetched.push(...rows);
@@ -71093,7 +71581,7 @@ var listProjects = {
71093
71581
  offset,
71094
71582
  returned: projects.length,
71095
71583
  hasMore: offset + projects.length < matched,
71096
- ...truncated ? { note: "Workspace exceeds 2,000 projects; totals reflect the first 2,000." } : {},
71584
+ ...truncated ? { note: "More than 2,000 projects; totals reflect the newest 2,000." } : {},
71097
71585
  projects
71098
71586
  });
71099
71587
  }
@@ -71110,6 +71598,9 @@ var createVideo = {
71110
71598
  title: "Create a video project",
71111
71599
  description: "Create a new video project and an empty draft for you to direct. This does NOT run Impractical's own director \u2014 it scaffolds App.tsx, direction.ts and brand.json and hands them to you. Read the `impractical://engine.d.ts` resource, then write the scene yourself with edit_draft_file / write_draft_files.",
71112
71600
  inputSchema: {
71601
+ workspace: WORKSPACE_ARG.describe(
71602
+ 'Workspace to create the video in (id, slug or name \u2014 e.g. when the user says "a video for Rox"). Default: the one open in the web app, else the only one; with several and none open, the call fails listing them. The result says where it landed and why.'
71603
+ ),
71113
71604
  valueProp: external_exports.string().min(1).describe("One or two sentences on what ships and why it matters."),
71114
71605
  name: external_exports.string().optional().describe("Human-readable project name. Defaults to the slug."),
71115
71606
  slug: external_exports.string().optional().describe(
@@ -71135,24 +71626,24 @@ var createVideo = {
71135
71626
  },
71136
71627
  handler: async (args, ctx) => {
71137
71628
  if (ctx.qualityLoop && !args.creativeContract) {
71138
- return fail(
71629
+ return fail2(
71139
71630
  "The local quality loop requires creativeContract before scaffolding. Name the audience, singleIdea, visualProof, referenceStrategy, productSource, opening, proof, and payoff. This is a planning gate only; it does not change the scene schema."
71140
71631
  );
71141
71632
  }
71142
71633
  if (ctx.phasedFlow) {
71143
71634
  const gate = phasedGateFailure({ concept: args.concept, content: args.content });
71144
- if (gate) return fail(gate);
71635
+ if (gate) return fail2(gate);
71145
71636
  if (shotListEnabled()) {
71146
71637
  const shotGap = shotListGateFailure(args.concept);
71147
- if (shotGap) return fail(shotGap);
71638
+ if (shotGap) return fail2(shotGap);
71148
71639
  }
71149
71640
  const refDir = refInjectDir();
71150
71641
  if (refDir) {
71151
71642
  const refGap = refInjectGateFailure(args.concept, refDir);
71152
- if (refGap) return fail(refGap);
71643
+ if (refGap) return fail2(refGap);
71153
71644
  }
71154
71645
  if (!ctx.qualityLoopState?.referenceLedger) {
71155
- return fail(
71646
+ return fail2(
71156
71647
  "The phased flow requires gather_references BEFORE create_video: record the real references this film is designed against (or an honest noneFound after exhausting the ladder: local code -> product site -> screenshots -> component-class images)."
71157
71648
  );
71158
71649
  }
@@ -71239,7 +71730,7 @@ var listDraftFiles = {
71239
71730
  revision: draft.revision,
71240
71731
  staleNote: `Any file contents read before revision ${draft.revision} are stale \u2014 re-read before editing them.`,
71241
71732
  lockedByJobId: draft.lockedByJobId,
71242
- files: Object.entries(draft.files).map(([path6, content]) => ({ path: path6, bytes: Buffer.byteLength(content, "utf8") })).sort((a, b) => a.path.localeCompare(b.path))
71733
+ files: Object.entries(draft.files).map(([path7, content]) => ({ path: path7, bytes: Buffer.byteLength(content, "utf8") })).sort((a, b) => a.path.localeCompare(b.path))
71243
71734
  });
71244
71735
  }
71245
71736
  };
@@ -71255,14 +71746,14 @@ var readDraftFile = {
71255
71746
  },
71256
71747
  handler: async (args, ctx) => {
71257
71748
  const draft = await getDraft(ctx, String(args.draftId));
71258
- const path6 = String(args.path);
71259
- const content = draft.files[path6];
71749
+ const path7 = String(args.path);
71750
+ const content = draft.files[path7];
71260
71751
  if (content === void 0) {
71261
- return fail(
71262
- `No file "${path6}" in draft ${args.draftId}. Available: ${Object.keys(draft.files).sort().join(", ")}`
71752
+ return fail2(
71753
+ `No file "${path7}" in draft ${args.draftId}. Available: ${Object.keys(draft.files).sort().join(", ")}`
71263
71754
  );
71264
71755
  }
71265
- const stamp = `[${path6} @ revision ${draft.revision} \u2014 earlier copies of this file in your context are stale if this revision is newer]`;
71756
+ const stamp = `[${path7} @ revision ${draft.revision} \u2014 earlier copies of this file in your context are stale if this revision is newer]`;
71266
71757
  const lines = content.split("\n");
71267
71758
  const startLine = typeof args.startLine === "number" ? Math.max(1, args.startLine) : 1;
71268
71759
  const lineCount = typeof args.lineCount === "number" ? Math.max(1, args.lineCount) : lines.length;
@@ -71275,7 +71766,7 @@ ${content}` };
71275
71766
  };
71276
71767
  }
71277
71768
  return {
71278
- text: `[lines ${startLine}-${startLine - 1 + slice.length} of ${lines.length}, ${path6} @ revision ${draft.revision} \u2014 page with startLine/lineCount]
71769
+ text: `[lines ${startLine}-${startLine - 1 + slice.length} of ${lines.length}, ${path7} @ revision ${draft.revision} \u2014 page with startLine/lineCount]
71279
71770
  ` + slice.join("\n")
71280
71771
  };
71281
71772
  }
@@ -71307,7 +71798,7 @@ var editDraftFile = {
71307
71798
  replaceAll: external_exports.boolean().optional().describe("Replace every occurrence. Default false, which requires a unique match.")
71308
71799
  },
71309
71800
  handler: async (args, ctx) => {
71310
- const path6 = String(args.path);
71801
+ const path7 = String(args.path);
71311
71802
  const oldString = String(args.oldString);
71312
71803
  const newString = String(args.newString);
71313
71804
  let problem = null;
@@ -71315,25 +71806,25 @@ var editDraftFile = {
71315
71806
  ctx,
71316
71807
  String(args.draftId),
71317
71808
  (draft) => {
71318
- const content = draft.files[path6];
71809
+ const content = draft.files[path7];
71319
71810
  if (content === void 0) {
71320
- problem = `No file "${path6}" in this draft. Available: ${Object.keys(draft.files).sort().join(", ")}`;
71811
+ problem = `No file "${path7}" in this draft. Available: ${Object.keys(draft.files).sort().join(", ")}`;
71321
71812
  return { files: {}, deletedPaths: [] };
71322
71813
  }
71323
71814
  const occurrences = content.split(oldString).length - 1;
71324
71815
  if (occurrences === 0) {
71325
- problem = `oldString was not found in ${path6} at revision ${draft.revision}. Either the match is inexact, or your copy of this file is stale \u2014 if you last read it at an earlier revision, read_draft_file again and re-apply the edit against the current text.`;
71816
+ problem = `oldString was not found in ${path7} at revision ${draft.revision}. Either the match is inexact, or your copy of this file is stale \u2014 if you last read it at an earlier revision, read_draft_file again and re-apply the edit against the current text.`;
71326
71817
  return { files: {}, deletedPaths: [] };
71327
71818
  }
71328
71819
  if (occurrences > 1 && !args.replaceAll) {
71329
- problem = `oldString appears ${occurrences} times in ${path6} at revision ${draft.revision}. Add more surrounding context to make it unique, or pass replaceAll: true.`;
71820
+ problem = `oldString appears ${occurrences} times in ${path7} at revision ${draft.revision}. Add more surrounding context to make it unique, or pass replaceAll: true.`;
71330
71821
  return { files: {}, deletedPaths: [] };
71331
71822
  }
71332
71823
  const next = args.replaceAll ? content.split(oldString).join(newString) : content.replace(oldString, newString);
71333
- return { files: { [path6]: next }, deletedPaths: [] };
71824
+ return { files: { [path7]: next }, deletedPaths: [] };
71334
71825
  }
71335
71826
  );
71336
- return problem ? fail(problem) : output;
71827
+ return problem ? fail2(problem) : output;
71337
71828
  }
71338
71829
  };
71339
71830
  var jobStatus = {
@@ -71442,7 +71933,7 @@ var exportVideo = {
71442
71933
  gateReform,
71443
71934
  capture: ctx.qualityLoopState?.finalMotionReviewByDraft.get(String(args.draftId))
71444
71935
  }) ?? driftMotionFailure(ctx.qualityLoopState?.finalMotionReviewByDraft.get(String(args.draftId)));
71445
- if (failure) return fail(`Quality gate blocked export: ${failure}`);
71936
+ if (failure) return fail2(`Quality gate blocked export: ${failure}`);
71446
71937
  }
71447
71938
  const started = await ctx.invoke("start-export", { draftId: args.draftId });
71448
71939
  return json2({
@@ -71458,15 +71949,25 @@ var exportVideo = {
71458
71949
  var brandList = {
71459
71950
  name: "brand_list",
71460
71951
  title: "List brand kits",
71461
- description: "List the brand kits saved in this workspace.",
71462
- inputSchema: {},
71463
- handler: async (_args, ctx) => json2(await ctx.invoke("brand-kits", { action: "list" }))
71952
+ description: "List saved brand kits \u2014 across every workspace the user belongs to (each tagged with its workspace), or one workspace with `workspace`.",
71953
+ inputSchema: {
71954
+ workspace: WORKSPACE_ARG.describe("Only this workspace. Default: all of them.")
71955
+ },
71956
+ handler: async (args, ctx) => json2(await ctx.invoke("brand-kits", {
71957
+ action: "list",
71958
+ ...args.workspace ? {} : { allWorkspaces: true }
71959
+ }))
71464
71960
  };
71465
71961
  var brandGet = {
71466
71962
  name: "brand_get",
71467
71963
  title: "Get a brand kit",
71468
71964
  description: "Get one brand kit \u2014 its colors, fonts and logo. Treat these as law when directing.",
71469
- inputSchema: { slug: external_exports.string().describe("Brand kit slug.") },
71965
+ inputSchema: {
71966
+ slug: external_exports.string().describe("Brand kit slug."),
71967
+ workspace: WORKSPACE_ARG.describe(
71968
+ "Workspace holding the kit (brand_list shows it). Default: the one open in the web app, or the only one."
71969
+ )
71970
+ },
71470
71971
  handler: async (args, ctx) => json2(await ctx.invoke("brand-kits", { action: "get", slug: args.slug }))
71471
71972
  };
71472
71973
  var brandExtract = {
@@ -71474,6 +71975,9 @@ var brandExtract = {
71474
71975
  title: "Extract a brand kit from a URL",
71475
71976
  description: "Start extracting a brand kit (colors, fonts, logo) from a website and return the run id immediately. To observe an existing run, call this tool with jobId instead of url; that status mode never starts another extraction.",
71476
71977
  inputSchema: {
71978
+ workspace: WORKSPACE_ARG.describe(
71979
+ "Workspace to save the kit in (id, slug or name). Default: the one open in the web app, else the only one; with several and none open, the call fails listing them. Pass the same value when continuing by jobId."
71980
+ ),
71477
71981
  url: external_exports.string().optional().describe("The brand website URL. Omit when continuing by jobId."),
71478
71982
  jobId: external_exports.string().optional().describe("Run id returned by a previous brand_extract call."),
71479
71983
  reextract: external_exports.boolean().optional().describe("Re-extract even if a kit already exists."),
@@ -71485,8 +71989,8 @@ var brandExtract = {
71485
71989
  handler: async (args, ctx, progress) => {
71486
71990
  const url2 = typeof args.url === "string" ? args.url : "";
71487
71991
  const jobId = typeof args.jobId === "string" ? args.jobId : "";
71488
- if (url2 && jobId) return fail("Pass either url to start or jobId to continue, not both.");
71489
- if (!url2 && !jobId) return fail("Pass url to start an extraction, or jobId to continue one.");
71992
+ if (url2 && jobId) return fail2("Pass either url to start or jobId to continue, not both.");
71993
+ if (!url2 && !jobId) return fail2("Pass url to start an extraction, or jobId to continue one.");
71490
71994
  if (url2) {
71491
71995
  const started = await ctx.invoke("brand-extraction", {
71492
71996
  action: "start",
@@ -71506,7 +72010,7 @@ var brandExtract = {
71506
72010
  if (!args.wait) {
71507
72011
  const status = await readStatus();
71508
72012
  if (status.status === "error" || status.status === "failed" || status.error) {
71509
- return fail(`Brand extraction failed${status.error ? `: ${status.error}` : ""}`);
72013
+ return fail2(`Brand extraction failed${status.error ? `: ${status.error}` : ""}`);
71510
72014
  }
71511
72015
  return json2({ jobId, ...status });
71512
72016
  }
@@ -71528,7 +72032,7 @@ var brandExtract = {
71528
72032
  return json2({ jobId, ...status });
71529
72033
  }
71530
72034
  if (status.status === "error" || status.status === "failed" || status.error) {
71531
- return fail(`Brand extraction failed${status.error ? `: ${status.error}` : ""}`);
72035
+ return fail2(`Brand extraction failed${status.error ? `: ${status.error}` : ""}`);
71532
72036
  }
71533
72037
  } catch (error51) {
71534
72038
  lastError = error51 instanceof Error ? error51.message : String(error51);
@@ -71556,6 +72060,9 @@ var motionProfile = {
71556
72060
  title: "Manage the personal motion profile",
71557
72061
  description: "Inspect and manage the user's learned motion preferences. Call with action 'get' to see the effective profile before directing. Use 'remember' ONLY when the user explicitly asks to remember a preference; use 'propose' to submit an inferred preference as a pending proposal for the user to confirm \u2014 never confirm an inferred preference yourself. 'confirm'/'reject' decide a pending proposal after asking the user; 'forget', 'pause', 'resume' and 'reset' manage stored preferences on the user's behalf.",
71558
72062
  inputSchema: {
72063
+ workspace: WORKSPACE_ARG.describe(
72064
+ "Workspace whose profile layers to use. Default: the draft's workspace when draftId is given, else the one open in the web app, else the only one."
72065
+ ),
71559
72066
  action: external_exports.enum(["get", "remember", "propose", "confirm", "reject", "forget", "pause", "resume", "reset"]).describe("The profile command to run."),
71560
72067
  rule: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
71561
72068
  "Structured preference for remember/propose, e.g. {kind:'trait',trait:'pacing',value:'fast'}, {kind:'library',itemType:'style',itemId:'optical',stance:'prefer'}, {kind:'freeform',text:'...'}, {kind:'duration',max:15}, or {kind:'example',draftId:'...'}."
@@ -71567,7 +72074,10 @@ var motionProfile = {
71567
72074
  contentType: external_exports.string().optional().describe("Content type this preference applies to."),
71568
72075
  draftId: external_exports.string().optional().describe("Draft that motivated a proposal.")
71569
72076
  },
71570
- handler: async (args, ctx) => json2(await ctx.invoke("motion-profile", args))
72077
+ handler: async (args, ctx) => {
72078
+ const { workspace: _workspace, ...body } = args;
72079
+ return json2(await ctx.invoke("motion-profile", body));
72080
+ }
71571
72081
  };
71572
72082
  var studioLinkTool = {
71573
72083
  name: "studio_link",
@@ -71578,7 +72088,7 @@ var studioLinkTool = {
71578
72088
  slug: external_exports.string().optional().describe("Draft slug to open directly.")
71579
72089
  },
71580
72090
  handler: async (args, ctx) => ({
71581
- text: studioLink(ctx, String(args.projectId), args.slug)
72091
+ text: await resolvedStudioLink(ctx, String(args.projectId), args.slug)
71582
72092
  })
71583
72093
  };
71584
72094
  var REMOTE_SAFE_TOOLS = [
@@ -71601,7 +72111,7 @@ var REMOTE_SAFE_TOOLS = [
71601
72111
  ];
71602
72112
 
71603
72113
  // src/mcp/gather-references.ts
71604
- import { existsSync as existsSync6, statSync as statSync2 } from "node:fs";
72114
+ import { existsSync as existsSync7, statSync as statSync2 } from "node:fs";
71605
72115
  var referenceEntry = external_exports.object({
71606
72116
  kind: external_exports.enum(["local-code", "product-ui-screenshot", "site-code", "website", "screenshot", "image-to-use", "component-class-image", "mockup"]),
71607
72117
  /** URL or local file path. */
@@ -71634,7 +72144,7 @@ async function captureSource(source) {
71634
72144
  }
71635
72145
  }
71636
72146
  try {
71637
- return { verified: existsSync6(source) && statSync2(source).size > 0 };
72147
+ return { verified: existsSync7(source) && statSync2(source).size > 0 };
71638
72148
  } catch {
71639
72149
  return { verified: false };
71640
72150
  }
@@ -71727,10 +72237,10 @@ function kitCatalog(sources, {
71727
72237
  if (header.length) break;
71728
72238
  continue;
71729
72239
  }
71730
- const text = line.replace(/^\/\/\s*/, "").replace(/[─]+/g, "").trim();
71731
- if (!text) continue;
71732
- if (!header.length) standsAlone = KIT_TITLE_BAR.test(raw) || /[.!?]$/.test(text);
71733
- header.push(text);
72240
+ const text2 = line.replace(/^\/\/\s*/, "").replace(/[─]+/g, "").trim();
72241
+ if (!text2) continue;
72242
+ if (!header.length) standsAlone = KIT_TITLE_BAR.test(raw) || /[.!?]$/.test(text2);
72243
+ header.push(text2);
71734
72244
  if (header.length >= (headerMode === "title" && standsAlone ? 1 : 2)) break;
71735
72245
  }
71736
72246
  const exports = [...file2.content.matchAll(/^export (?:const|function) (\w+)/gm)].map((m) => m[1]).filter((n) => !n.startsWith("_")).filter(
@@ -71810,16 +72320,16 @@ async function assertKitOverrideParity(files, overridePath, expectedKitsVersion)
71810
72320
  );
71811
72321
  }
71812
72322
  }
71813
- for (const [path6, content] of Object.entries(files)) {
71814
- const want = expected.get(path6);
72323
+ for (const [path7, content] of Object.entries(files)) {
72324
+ const want = expected.get(path7);
71815
72325
  if (want === void 0) {
71816
72326
  throw new Error(
71817
- `Kit override parity failure: served file ${path6} does not exist in ${overridePath} \u2014 a second kit lineage leaked into the install. Refusing to install.`
72327
+ `Kit override parity failure: served file ${path7} does not exist in ${overridePath} \u2014 a second kit lineage leaked into the install. Refusing to install.`
71818
72328
  );
71819
72329
  }
71820
72330
  if (want !== content) {
71821
72331
  throw new Error(
71822
- `Kit override parity failure: ${path6} does not byte-match ${overridePath} \u2014 mixed kit lineages. Refusing to install.`
72332
+ `Kit override parity failure: ${path7} does not byte-match ${overridePath} \u2014 mixed kit lineages. Refusing to install.`
71823
72333
  );
71824
72334
  }
71825
72335
  }
@@ -71979,8 +72489,8 @@ var installFontTool = {
71979
72489
 
71980
72490
  // src/mcp/components.ts
71981
72491
  import { createHash as createHash2 } from "node:crypto";
71982
- import { existsSync as existsSync7 } from "node:fs";
71983
- import path5 from "node:path";
72492
+ import { existsSync as existsSync8 } from "node:fs";
72493
+ import path6 from "node:path";
71984
72494
  import { readFileSync as readFileSync6 } from "node:fs";
71985
72495
  var COMPONENT_MANIFEST_ENV = "IMPRACTICAL_COMPONENT_MANIFEST";
71986
72496
  var hash2 = (content) => createHash2("sha256").update(content).digest("hex");
@@ -72014,8 +72524,8 @@ var manifestSchema = external_exports.object({
72014
72524
  runtime: sourceSchema,
72015
72525
  components: external_exports.array(componentSchema).min(1)
72016
72526
  });
72017
- function loadComponentManifest(path6) {
72018
- const manifest = manifestSchema.parse(JSON.parse(readFileSync6(path6, "utf8")));
72527
+ function loadComponentManifest(path7) {
72528
+ const manifest = manifestSchema.parse(JSON.parse(readFileSync6(path7, "utf8")));
72019
72529
  const aliases = /* @__PURE__ */ new Map();
72020
72530
  const paths = /* @__PURE__ */ new Set([manifest.runtime.path]);
72021
72531
  for (const file2 of [manifest.runtime, ...manifest.components.map((item) => item.source)]) {
@@ -72039,38 +72549,80 @@ function resolveComponent(manifest, id) {
72039
72549
  function componentManifestPath(env = process.env, cwd = process.cwd()) {
72040
72550
  const override = env[COMPONENT_MANIFEST_ENV]?.trim();
72041
72551
  if (override) return override;
72042
- let directory = path5.resolve(cwd);
72552
+ let directory = path6.resolve(cwd);
72043
72553
  for (let depth = 0; depth < 6; depth += 1) {
72044
- const candidate = path5.join(directory, "experiment/component-handoff/generated/manifest.json");
72045
- if (existsSync7(candidate)) return candidate;
72046
- const parent = path5.dirname(directory);
72554
+ const candidate = path6.join(directory, "experiment/component-handoff/generated/manifest.json");
72555
+ if (existsSync8(candidate)) return candidate;
72556
+ const parent = path6.dirname(directory);
72047
72557
  if (parent === directory) break;
72048
72558
  directory = parent;
72049
72559
  }
72050
72560
  return void 0;
72051
72561
  }
72052
- function componentServerInstructions(path6) {
72053
- return path6 ? "\n\nVIDEO CREATIVE DIRECTION:\nYou are a professional motion graphics designer and pro social media specialist. You need to design an eye catching, popping video that will stand out to people scrolling social media or catch the eye when run on ads. You need to be harsh, critical on yourself when designing, and meeting the bar of a motion graphics video isn't enough. your work needs to rival other motion designers that are making stuff with adobe after effects.\n\nLOCAL COMPONENT HANDOFF IS ENABLED. When a brief names Explore component IDs or slugs, call components_catalog and component_study for those exact selections before authoring. These tools expose a versioned snapshot of the local app, including source, selectors, and usage. Call install_components to copy the selected sources and runtime into your draft, then import them using the returned examples. Keep all selected components; never substitute a similarly named house style. A missing ID is a handoff failure to report, not permission to invent it. Read engine_types and use the normal create_video, write_draft_files, job_status, get_frames and export_video workflow. Components use their own deterministic timeline through the supplied runtime. \nCOMPONENT PROMO EDITORIAL REQUIREMENTS FOR THIS LOCAL EXPERIMENT: the user requires each shot to last at most THREE SECONDS, including its transition and reading hold. Plan the shot boundaries before writing code; a 24-second film needs at least eight substantive visual beats. Connected shots can develop one concrete scene without cutting away or reintroducing its subject. A new label, another card landing, or a cut to the same unchanged screen does not make a new beat. Each beat must advance the product story with a new visible action, state change, or benefit. Cover the real workflow from input through transformation, decision, and outcome; do not spend an entire promo on three cards and a static list. For fictional test products, keep added workflow clearly illustrative; for real products use verified capabilities only. Study each selected component as a motion primitive, not a full scene whose demo duration must be preserved. Use playComponent duration to fit the choreography inside the shot, trim native demo holds, and author short readable copy. User pacing requirements override generic slower house defaults. A continuous ambient backdrop may span scenes, but cannot count as new content. Vary scale, composition, camera direction and transitions with narrative purpose. Review the complete sequence in motion: prove every shot is <=3 seconds and show the meaningful product change in every interval. Do not excuse dead time as a reading hold or dismiss actual pacing warnings because compilation and still frames pass. \nVISUAL COMPREHENSION: the user must understand the component at a glance. Do not fill product cards with paragraphs, quotations, opportunity briefs, or marketing explanations. Show the capability through imagery, a recognizable control, a visible interaction, and its result. Keep only essential short UI labels inside the component. Give explanatory primary copy its own clear hierarchy in the scene, separate from the product UI contents. More content means more visible product behavior, not more words or denser dashboards. Each selected entrance introduces a distinct component or concept. After an entrance, develop that subject through interactions and purposeful camera framing; do not repeatedly reintroduce the same dashboard to demonstrate different styles. Connected three-second shots may follow the same subject as long as the visible action and framing advance. Before expanding the film, review a short product proof with captions hidden: its action and outcome should still be understandable. Treat a need to read the card to understand the scene as a creative defect, even if every word is technically legible. \nSILENT VIDEO NARRATIVE: minimal component text does not mean minimal explanation. When there is no voiceover, primary copy must carry a complete, understandable product story: who the product is for or what it does, the capabilities being demonstrated, and the payoff. Before authoring, extract only the intended message text and read it in sequence without the visuals or UI labels. It must make sense as a concise standalone script, not a few disconnected slogans. Then pair each line with a visual demonstration of that claim. Use short meaningful titles, timed for comfortable reading, rather than paragraphs, redundant labels, or title-only slides between every action. Reserve real space for this copy; do not cover important controls, crowd components, or shrink everything to fit. Budget entrance, fully readable hold, and exit separately. Start the reading hold only after the complete line has landed; end it when motion or occlusion starts obscuring it. Let words arrive and leave deliberately, with deceleration and enough time to follow their motion. Reclaim empty success holds before rushing the message or slowing the entire video. Check the reading rhythm in playback, not just on paused frames. Review both layers independently: the primary-copy transcript should explain the story, and the caption-free product view should demonstrate an immediately recognizable action. \nCOPY IN THE SCENE: primary copy is part of the authored visual world, not a pinned webpage header or a fixed caption band pasted over the film. Plan where the words live relative to the subject, their depth or plane when appropriate, and how the subject or camera affects their entrance, action, and exit. Use specific readable relationships: a subject can make room for words, carry or push them, pass in front of them, or reveal them as the camera reframes. Share the relevant world/camera transform when that is the intended relationship. Keep clear reading moments, but do not equate readable with permanently locked to the screen. Solve collisions with scene composition and timing, not an opaque header strip covering the product. Do not force every line into the same interaction or bury explanatory copy inside a dense product card. \nSELECTED MOTION FIDELITY: preserve what makes each selected reference recognizable. An imported source ID is not proof that the effect works. Inspect the actual motion and transform hierarchy; avoid competing animations on one node and wrappers that flatten the intended perspective. If a reference combines continuous subject movement with editorial camera cuts, preserve both and their relationship. Do not silently remove defining motion to accommodate another reference; reorganize the sequence or assign a distinct subject instead. Compare the result against the selected reference at the moments that demonstrate its distinctive behavior. \nCURSOR ACCURACY: verify the visible cursor hotspot lands inside the intended control at the actual press frame, after camera transforms and component motion. Use compatible coordinate spaces or scope the cursor to the product world; do not compensate with guessed offsets. Check that direct seeks and continuous playback agree. Tie the visible UI response to that press and leave enough time to see the resulting state. \nAMBIENT COMPONENT MOTION: during settled holds, consider a very light continuous drift of the component or its camera so the composition still feels alive. Background motion alone is not a substitute. Keep it barely perceptible, coherent with perspective, and subordinate to the primary interaction. Preserve readable copy and maintain the relationship between controls and any cursor; settle the drift during precise clicks or tracking if needed. Use a separate wrapper or compose transforms so drift does not fight the selected entrance, camera, or exit. Evaluate it deterministically from timeline time, without an independent clock or reset at shot boundaries. Do not bob every element, force motion where stillness is intentional, or count ambient drift as a substantive story beat. \nSCENE HANDOFFS: plan how each concrete scene exits as deliberately as how its subject enters. Do not default to entrance, token action, then unrelated cut. In the shot plan, name the outgoing subject and state, the action or camera move that carries us out, and the incoming subject and relationship that makes the connection understandable. Build the transition from what is already happening: an artifact can carry forward, an interaction can change the framing, or a meaningful object can occlude and reveal the next view. These are options, not a mandatory recipe; choose a connection specific to the product story. A selected transition effect supplies motion language, not the narrative reason for the handoff. Preserve recognizable details through the connection and do not imply a product feature or causal relationship that does not exist. Three-second shot pacing does not require a cut or a fresh entrance every three seconds. A motivated cut can be right; do not force every connection into a morph or add decorative travel that delays the story. Review at least one complete entrance, developed action, and outgoing handoff in the caption-free proof, then review all scene boundaries in motion before delivery. This local extension does not mean these components are available in the published CLI." : "";
72562
+ function componentServerInstructions(path7) {
72563
+ return path7 ? "\n\nVIDEO CREATIVE DIRECTION:\nYou are a professional motion graphics designer and pro social media specialist. You need to design an eye catching, popping video that will stand out to people scrolling social media or catch the eye when run on ads. You need to be harsh, critical on yourself when designing, and meeting the bar of a motion graphics video isn't enough. your work needs to rival other motion designers that are making stuff with adobe after effects.\n\nLOCAL COMPONENT HANDOFF IS ENABLED. When a brief names Explore component IDs or slugs, call components_catalog and component_study for those exact selections before authoring. These tools expose a versioned snapshot of the local app, including source, selectors, and usage. Call install_components to copy the selected sources and runtime into your draft, then import them using the returned examples. Keep all selected components; never substitute a similarly named house style. A missing ID is a handoff failure to report, not permission to invent it. Read engine_types and use the normal create_video, write_draft_files, job_status, get_frames and export_video workflow. Components use their own deterministic timeline through the supplied runtime. \nCOMPONENT PROMO EDITORIAL REQUIREMENTS FOR THIS LOCAL EXPERIMENT: the user requires each shot to last at most THREE SECONDS, including its transition and reading hold. Plan the shot boundaries before writing code; a 24-second film needs at least eight substantive visual beats. Connected shots can develop one concrete scene without cutting away or reintroducing its subject. A new label, another card landing, or a cut to the same unchanged screen does not make a new beat. Each beat must advance the product story with a new visible action, state change, or benefit. Cover the real workflow from input through transformation, decision, and outcome; do not spend an entire promo on three cards and a static list. For fictional test products, keep added workflow clearly illustrative; for real products use verified capabilities only. Study each selected component as a motion primitive, not a full scene whose demo duration must be preserved. Use playComponent duration to fit the choreography inside the shot, trim native demo holds, and author short readable copy. User pacing requirements override generic slower house defaults. A continuous ambient backdrop may span scenes, but cannot count as new content. Vary scale, composition, camera direction and transitions with narrative purpose. Review the complete sequence in motion: prove every shot is <=3 seconds and show the meaningful product change in every interval. Do not excuse dead time as a reading hold or dismiss actual pacing warnings because compilation and still frames pass. \nVISUAL COMPREHENSION: the user must understand the component at a glance. Do not fill product cards with paragraphs, quotations, opportunity briefs, or marketing explanations. Show the capability through imagery, a recognizable control, a visible interaction, and its result. Keep only essential short UI labels inside the component. Give explanatory primary copy its own clear hierarchy in the scene, separate from the product UI contents. More content means more visible product behavior, not more words or denser dashboards. Each selected entrance introduces a distinct component or concept. After an entrance, develop that subject through interactions and purposeful camera framing; do not repeatedly reintroduce the same dashboard to demonstrate different styles. Connected three-second shots may follow the same subject as long as the visible action and framing advance. Before expanding the film, review a short product proof with captions hidden: its action and outcome should still be understandable. Treat a need to read the card to understand the scene as a creative defect, even if every word is technically legible. \nSILENT VIDEO NARRATIVE: minimal component text does not mean minimal explanation. When there is no voiceover, primary copy must carry a complete, understandable product story: who the product is for or what it does, the capabilities being demonstrated, and the payoff. Before authoring, extract only the intended message text and read it in sequence without the visuals or UI labels. It must make sense as a concise standalone script, not a few disconnected slogans. Then pair each line with a visual demonstration of that claim. Use short meaningful titles, timed for comfortable reading, rather than paragraphs, redundant labels, or title-only slides between every action. Reserve real space for this copy; do not cover important controls, crowd components, or shrink everything to fit. Budget entrance, fully readable hold, and exit separately. Start the reading hold only after the complete line has landed; end it when motion or occlusion starts obscuring it. Let words arrive and leave deliberately, with deceleration and enough time to follow their motion. Reclaim empty success holds before rushing the message or slowing the entire video. Check the reading rhythm in playback, not just on paused frames. Review both layers independently: the primary-copy transcript should explain the story, and the caption-free product view should demonstrate an immediately recognizable action. \nCOPY IN THE SCENE: primary copy is part of the authored visual world, not a pinned webpage header or a fixed caption band pasted over the film. Plan where the words live relative to the subject, their depth or plane when appropriate, and how the subject or camera affects their entrance, action, and exit. Use specific readable relationships: a subject can make room for words, carry or push them, pass in front of them, or reveal them as the camera reframes. Share the relevant world/camera transform when that is the intended relationship. Keep clear reading moments, but do not equate readable with permanently locked to the screen. Solve collisions with scene composition and timing, not an opaque header strip covering the product. Do not force every line into the same interaction or bury explanatory copy inside a dense product card. \nSELECTED MOTION FIDELITY: preserve what makes each selected reference recognizable. An imported source ID is not proof that the effect works. Inspect the actual motion and transform hierarchy; avoid competing animations on one node and wrappers that flatten the intended perspective. If a reference combines continuous subject movement with editorial camera cuts, preserve both and their relationship. Do not silently remove defining motion to accommodate another reference; reorganize the sequence or assign a distinct subject instead. Compare the result against the selected reference at the moments that demonstrate its distinctive behavior. \nCURSOR ACCURACY: verify the visible cursor hotspot lands inside the intended control at the actual press frame, after camera transforms and component motion. Use compatible coordinate spaces or scope the cursor to the product world; do not compensate with guessed offsets. Check that direct seeks and continuous playback agree. Tie the visible UI response to that press and leave enough time to see the resulting state. \nAMBIENT COMPONENT MOTION: during settled holds, consider a very light continuous drift of the component or its camera so the composition still feels alive. Background motion alone is not a substitute. Keep it barely perceptible, coherent with perspective, and subordinate to the primary interaction. Preserve readable copy and maintain the relationship between controls and any cursor; settle the drift during precise clicks or tracking if needed. Use a separate wrapper or compose transforms so drift does not fight the selected entrance, camera, or exit. Evaluate it deterministically from timeline time, without an independent clock or reset at shot boundaries. Do not bob every element, force motion where stillness is intentional, or count ambient drift as a substantive story beat. \nSCENE HANDOFFS: plan how each concrete scene exits as deliberately as how its subject enters. Do not default to entrance, token action, then unrelated cut. In the shot plan, name the outgoing subject and state, the action or camera move that carries us out, and the incoming subject and relationship that makes the connection understandable. Build the transition from what is already happening: an artifact can carry forward, an interaction can change the framing, or a meaningful object can occlude and reveal the next view. These are options, not a mandatory recipe; choose a connection specific to the product story. A selected transition effect supplies motion language, not the narrative reason for the handoff. Preserve recognizable details through the connection and do not imply a product feature or causal relationship that does not exist. Three-second shot pacing does not require a cut or a fresh entrance every three seconds. A motivated cut can be right; do not force every connection into a morph or add decorative travel that delays the story. Review at least one complete entrance, developed action, and outgoing handoff in the caption-free proof, then review all scene boundaries in motion before delivery. This local extension does not mean these components are available in the published CLI." : "";
72054
72564
  }
72055
- function createComponentTools(pathArg = componentManifestPath()) {
72056
- if (!pathArg) return [];
72565
+ function localLibrary(pathArg) {
72057
72566
  const load = () => loadComponentManifest(pathArg);
72567
+ return {
72568
+ async index() {
72569
+ const indexPath = path6.join(path6.dirname(pathArg), "catalog-index.json");
72570
+ return existsSync8(indexPath) ? JSON.parse(readFileSync6(indexPath, "utf8")) : load();
72571
+ },
72572
+ async study(_ctx, id, include) {
72573
+ const manifest = load();
72574
+ const component = resolveComponent(manifest, id);
72575
+ return {
72576
+ snapshot: manifest.snapshot,
72577
+ component: { ...component, source: include ? component.source : { path: component.source.path, sha256: component.source.sha256 } },
72578
+ runtime: include ? manifest.runtime : { path: manifest.runtime.path, sha256: manifest.runtime.sha256 }
72579
+ };
72580
+ },
72581
+ async install(_ctx, ids) {
72582
+ const manifest = load();
72583
+ const components = [...new Map(ids.map((id) => {
72584
+ const component = resolveComponent(manifest, id);
72585
+ return [component.id, component];
72586
+ })).values()];
72587
+ return { snapshot: manifest.snapshot, components, runtime: manifest.runtime };
72588
+ }
72589
+ };
72590
+ }
72591
+ var liveInstallShape = external_exports.object({
72592
+ snapshot: external_exports.object({ sha256: external_exports.string() }).passthrough(),
72593
+ components: external_exports.array(componentSchema).min(1),
72594
+ runtime: sourceSchema
72595
+ });
72596
+ function liveLibrary() {
72597
+ return {
72598
+ index: (ctx) => ctx.invoke("atelier-library", { action: "index" }),
72599
+ study: (ctx, id, includeSource) => ctx.invoke("atelier-library", { action: "component", id, includeSource }),
72600
+ async install(ctx, ids) {
72601
+ const served = liveInstallShape.parse(await ctx.invoke("atelier-library", { action: "install", ids }));
72602
+ for (const file2 of [served.runtime, ...served.components.map((item) => item.source)]) {
72603
+ if (hash2(file2.content) !== file2.sha256) throw new Error(`Component source checksum mismatch: ${file2.path}`);
72604
+ }
72605
+ return served;
72606
+ }
72607
+ };
72608
+ }
72609
+ function createComponentTools(pathArg = componentManifestPath()) {
72610
+ const library = pathArg ? localLibrary(pathArg) : liveLibrary();
72058
72611
  const json3 = (value) => ({ text: JSON.stringify(value, null, 2) });
72059
72612
  return [
72060
72613
  {
72061
72614
  name: "components_catalog",
72062
- title: "Discover the local Explore components",
72063
- description: "List exact component IDs, slugs, canonical source IDs, categories, and the source snapshot version. Use for briefs copied from Create from components. Reads a lightweight catalog index from the matching World checkout or an explicit local manifest.",
72615
+ title: "Discover the Atelier components",
72616
+ description: "List exact component IDs, slugs, canonical source IDs, categories, and the source snapshot version for the Atelier components shown in Explore. Use for briefs copied from Create from components.",
72064
72617
  inputSchema: {
72065
72618
  category: external_exports.string().optional().describe("Optional exact category filter."),
72066
72619
  query: external_exports.string().optional().describe("Optional case-insensitive title, description, or ID search.")
72067
72620
  },
72068
72621
  local: true,
72069
- // Same policy as gather_references: purely local reads have no cloud routes.
72622
+ // Same policy as gather_references: library reads are not metered.
72070
72623
  admitAs: "studio_link",
72071
- handler: async (args) => {
72072
- const indexPath = path5.join(path5.dirname(pathArg), "catalog-index.json");
72073
- const index = existsSync7(indexPath) ? JSON.parse(readFileSync6(indexPath, "utf8")) : load();
72624
+ handler: async (args, ctx) => {
72625
+ const index = await library.index(ctx);
72074
72626
  const query = String(args.query ?? "").trim().toLowerCase();
72075
72627
  const components = index.components.filter(
72076
72628
  (item) => (!args.category || item.category === args.category) && (!query || [item.id, item.slug, item.sourceId, item.title, item.description].some((value) => value.toLowerCase().includes(query)))
@@ -72088,20 +72640,11 @@ function createComponentTools(pathArg = componentManifestPath()) {
72088
72640
  },
72089
72641
  local: true,
72090
72642
  admitAs: "studio_link",
72091
- handler: async (args) => {
72092
- const manifest = load();
72093
- const component = resolveComponent(manifest, String(args.id));
72094
- const include = args.includeSource !== false;
72095
- return json3({
72096
- snapshot: manifest.snapshot,
72097
- component: { ...component, source: include ? component.source : { path: component.source.path, sha256: component.source.sha256 } },
72098
- runtime: include ? manifest.runtime : { path: manifest.runtime.path, sha256: manifest.runtime.sha256 }
72099
- });
72100
- }
72643
+ handler: async (args, ctx) => json3(await library.study(ctx, String(args.id), args.includeSource !== false))
72101
72644
  },
72102
72645
  {
72103
72646
  name: "install_components",
72104
- title: "Install selected Explore component source into a draft",
72647
+ title: "Install selected Atelier component source into a draft",
72105
72648
  description: "Copy exact selected component sources plus their shared runtime into a cloud draft under components/. Pass every selected ID. Uses normal draft-write admission, revision checks, build preflight, and preview jobs. Does not overwrite modified files unless overwrite is explicitly true. Pin snapshotSha256 from component_study for reproducibility.",
72106
72649
  inputSchema: {
72107
72650
  draftId: external_exports.string().min(1),
@@ -72112,15 +72655,11 @@ function createComponentTools(pathArg = componentManifestPath()) {
72112
72655
  local: true,
72113
72656
  admitAs: "write_draft_files",
72114
72657
  handler: async (args, ctx) => {
72115
- const manifest = load();
72116
- if (args.snapshotSha256 && args.snapshotSha256 !== manifest.snapshot.sha256) {
72658
+ const { snapshot, components: selected, runtime } = await library.install(ctx, args.ids);
72659
+ if (args.snapshotSha256 && args.snapshotSha256 !== snapshot.sha256) {
72117
72660
  throw new Error("Component snapshot changed. Re-read component_study before installing this version.");
72118
72661
  }
72119
- const selected = [...new Map(args.ids.map((id) => {
72120
- const component = resolveComponent(manifest, id);
72121
- return [component.id, component];
72122
- })).values()];
72123
- const sources = [manifest.runtime, ...selected.map((component) => component.source)];
72662
+ const sources = [runtime, ...selected.map((component) => component.source)];
72124
72663
  const output = await saveDraft(ctx, String(args.draftId), (draft) => {
72125
72664
  const files = {};
72126
72665
  for (const source of sources) {
@@ -72136,9 +72675,9 @@ function createComponentTools(pathArg = componentManifestPath()) {
72136
72675
  if (output.isError) return output;
72137
72676
  return {
72138
72677
  text: JSON.stringify({
72139
- snapshotSha256: manifest.snapshot.sha256,
72678
+ snapshotSha256: snapshot.sha256,
72140
72679
  installed: selected.map(({ id, sourceId, source, usage }) => ({ id, sourceId, path: source.path, sha256: source.sha256, usage })),
72141
- runtime: { path: manifest.runtime.path, sha256: manifest.runtime.sha256 }
72680
+ runtime: { path: runtime.path, sha256: runtime.sha256 }
72142
72681
  }, null, 2) + "\n\n" + output.text
72143
72682
  };
72144
72683
  }
@@ -72237,7 +72776,7 @@ var openStudioTool = {
72237
72776
  slug: external_exports.string().optional().describe("Draft slug to open directly.")
72238
72777
  },
72239
72778
  handler: async (args, ctx) => {
72240
- const url2 = studioLink(ctx, String(args.projectId), args.slug);
72779
+ const url2 = await resolvedStudioLink(ctx, String(args.projectId), args.slug);
72241
72780
  const needle = `/projects/${String(args.projectId)}`;
72242
72781
  try {
72243
72782
  const existing = await findOpenStudioTab(needle);
@@ -72259,9 +72798,11 @@ var openStudioTool = {
72259
72798
  // src/mcp/connect.ts
72260
72799
  var CONNECT_WAIT_SECONDS = 300;
72261
72800
  async function connectWorkspace(input, deps) {
72262
- const grant = await deps.request(deps.supabaseUrl, "cli-device-auth", {
72263
- action: "start"
72264
- });
72801
+ const grant = await deps.request(
72802
+ deps.supabaseUrl,
72803
+ "cli-device-auth",
72804
+ DEVICE_START_BODY
72805
+ );
72265
72806
  const browserOpened = deps.open(grant.verificationUri);
72266
72807
  const expiry = Date.parse(grant.expiresAt);
72267
72808
  const deadline = Math.min(
@@ -72286,7 +72827,12 @@ async function connectWorkspace(input, deps) {
72286
72827
  supabaseUrl: deps.supabaseUrl,
72287
72828
  appUrl: deps.appUrl
72288
72829
  });
72289
- return { status: "connected", userCode: grant.userCode, browserOpened };
72830
+ return {
72831
+ status: "connected",
72832
+ userCode: grant.userCode,
72833
+ browserOpened,
72834
+ keyScope: grantScope(poll)
72835
+ };
72290
72836
  }
72291
72837
  await deps.sleep(intervalMs);
72292
72838
  }
@@ -72300,7 +72846,7 @@ async function connectWorkspace(input, deps) {
72300
72846
  var connectTool = {
72301
72847
  name: "connect",
72302
72848
  title: "Connect this workspace",
72303
- description: "Authenticate Impractical Motion for this machine. Opens the user's browser to approve the connection, waits for them to confirm, and stores the credential locally. TELL THE USER YOU ARE ABOUT TO OPEN THEIR BROWSER BEFORE CALLING THIS \u2014 the call blocks until they approve. Use it whenever a tool reports that the workspace is not connected.",
72849
+ description: "Authenticate Impractical Motion for this machine. Opens the user's browser to approve the connection, waits for them to confirm, and stores the credential locally. TELL THE USER YOU ARE ABOUT TO OPEN THEIR BROWSER BEFORE CALLING THIS \u2014 the call blocks until they approve. Use it whenever a tool reports that the workspace is not connected. The key it stores reaches every workspace the user belongs to; calling it again also upgrades an older single-workspace connection.",
72304
72850
  inputSchema: {
72305
72851
  waitSeconds: external_exports.number().optional().describe(`How long to wait for browser approval. Default ${CONNECT_WAIT_SECONDS}.`)
72306
72852
  },
@@ -72331,6 +72877,13 @@ var connectTool = {
72331
72877
  };
72332
72878
  }
72333
72879
  try {
72880
+ if (result.keyScope === "user") {
72881
+ const listing = await fetchWorkspaces(ctx.invoke);
72882
+ const open = listing.workspaces.find((w) => w.id === listing.lastOpenWorkspaceId);
72883
+ return {
72884
+ text: `Connected. This key reaches all ${listing.workspaces.length} of the user's workspaces: ` + listing.workspaces.map(workspaceLabel).join(", ") + ". Lists span all of them; tools that address a project or draft act in its workspace; new videos go to the workspace named with `workspace`, else " + (open ? `the one open in the web app (now ${workspaceLabel(open)})` : "the one open in the web app") + (listing.workspaces.length === 1 ? " \u2014 here the only one." : ".")
72885
+ };
72886
+ }
72334
72887
  const snapshot = await ctx.invoke(
72335
72888
  "workspace-bootstrap"
72336
72889
  );
@@ -72387,6 +72940,7 @@ var engineTypesTool = {
72387
72940
  };
72388
72941
  var TOOLS = [
72389
72942
  connectTool,
72943
+ ...WORKSPACE_TOOLS,
72390
72944
  upgradeTool,
72391
72945
  ...REMOTE_SAFE_TOOLS,
72392
72946
  getFramesTool,
@@ -72504,12 +73058,23 @@ function register(server, tool, ctx) {
72504
73058
  async (args, extra) => {
72505
73059
  try {
72506
73060
  const admissionName = tool.admitAs ?? tool.name;
72507
- const admission = ctx.admit && !UNMETERED_MCP_TOOLS.has(admissionName) ? await ctx.admit(admissionName) : null;
72508
- const execute = () => tool.handler(args ?? {}, ctx, toolProgress(extra));
72509
- const output = admission?.receipt && ctx.withAdmission ? await ctx.withAdmission(admission.receipt, execute) : await execute();
73061
+ const admission = ctx.admit && !UNMETERED_MCP_TOOLS.has(admissionName) ? await ctx.admit(
73062
+ admissionName,
73063
+ admissionTarget(tool.name, args ?? {}, ctx.defaultWorkspace)
73064
+ ) : null;
73065
+ const admitted = admission?.keyScope === "user" ? admission.workspace ?? null : null;
73066
+ const linkWorkspace = admission?.workspace?.id && admission.workspace.reason !== "any" ? admission.workspace.id : void 0;
73067
+ const callCtx = linkWorkspace ? { ...ctx, callWorkspaceId: linkWorkspace } : ctx;
73068
+ const execute = () => tool.handler(args ?? {}, callCtx, toolProgress(extra));
73069
+ const output = admission?.receipt && ctx.withAdmission ? await ctx.withAdmission(admission.receipt, execute, admitted?.id) : await execute();
72510
73070
  if (admission?.warning) output.text += `
72511
73071
 
72512
73072
  ${formatUsageNotice(admission.warning)}`;
73073
+ if (admitted && !output.isError && WORKSPACE_ACTING_TOOLS.has(tool.name)) {
73074
+ output.text += `
73075
+
73076
+ ${workspaceNote(tool.name, admitted)}`;
73077
+ }
72513
73078
  return toContent(output);
72514
73079
  } catch (error51) {
72515
73080
  const status = error51.status;
@@ -72527,7 +73092,11 @@ ${formatUsageNotice(admission.warning)}`;
72527
73092
  isError: true
72528
73093
  });
72529
73094
  }
72530
- const hint = status === 401 || isNotConnected(message) ? "\n\nCall the `connect` tool to authenticate this workspace." : status === 402 ? "\n\nThe workspace needs an active subscription or trial." : "";
73095
+ const hint = status === 401 || isNotConnected(message) ? "\n\nCall the `connect` tool to authenticate this workspace." : status === 409 && details?.error === "workspace_selection_required" ? `
73096
+
73097
+ The user belongs to several workspaces${workspaceChoices(details)} and none was named or open in the web app. Ask which one, then retry with \`workspace\`.` : status === 403 && details?.error === "workspace_access_denied" ? `
73098
+
73099
+ That workspace is not available to this user${workspaceChoices(details)}. Call list_workspaces and retry with one of them.` : status === 402 ? "\n\nThe workspace needs an active subscription or trial." : "";
72531
73100
  return toContent({ text: `${tool.name} failed: ${message}${hint}`, isError: true });
72532
73101
  }
72533
73102
  }
@@ -72535,7 +73104,7 @@ ${formatUsageNotice(admission.warning)}`;
72535
73104
  }
72536
73105
  var ENGINE_DTS_URI = "impractical://engine.d.ts";
72537
73106
  function readEngineTypes() {
72538
- return readFileSync7(fileURLToPath3(new URL("../assets/engine.d.ts", import.meta.url)), "utf8");
73107
+ return readFileSync7(fileURLToPath2(new URL("../assets/engine.d.ts", import.meta.url)), "utf8");
72539
73108
  }
72540
73109
  function registerEngineResource(server) {
72541
73110
  server.registerResource(
@@ -72617,6 +73186,31 @@ function createServer(ctx) {
72617
73186
  registerEngineResource(server);
72618
73187
  return server;
72619
73188
  }
73189
+ function workspaceChoices(details) {
73190
+ const list = Array.isArray(details?.workspaces) ? details.workspaces : [];
73191
+ const names = list.filter((row) => typeof row === "object" && row !== null && typeof row.id === "string" && /^[A-Za-z0-9_-]{1,100}$/.test(row.id)).slice(0, 20).map(
73192
+ (row) => typeof row.name === "string" && row.name.length <= 100 ? `${row.name.replace(/[\u0000-\u001f]/g, "")} \u2014 ${row.id}` : row.id
73193
+ );
73194
+ return names.length ? ` (${names.join(", ")})` : "";
73195
+ }
73196
+ function createProjectWorkspaceLookup(request = (body) => {
73197
+ const { apiKey, supabaseUrl } = requireConfig();
73198
+ return invokeAt(supabaseUrl, "workspace-bootstrap", body, apiKey);
73199
+ }) {
73200
+ const cache2 = /* @__PURE__ */ new Map();
73201
+ return async (projectId) => {
73202
+ if (cache2.has(projectId)) return cache2.get(projectId) ?? null;
73203
+ let id = null;
73204
+ try {
73205
+ const result = await request({ action: "project_workspace", projectId });
73206
+ id = typeof result?.workspace?.id === "string" ? result.workspace.id : null;
73207
+ } catch {
73208
+ id = null;
73209
+ }
73210
+ cache2.set(projectId, id);
73211
+ return id;
73212
+ };
73213
+ }
72620
73214
  async function runStdioServer() {
72621
73215
  const config2 = loadConfig();
72622
73216
  if (!config2.apiKey) {
@@ -72638,7 +73232,9 @@ async function runStdioServer() {
72638
73232
  phasedFlow: phasedFlowEnabled(),
72639
73233
  // stdio runs on the user's machine, so completed preview builds can be
72640
73234
  // measured in the local browser and answered with what the frame became.
72641
- measurePreview: measureStage
73235
+ measurePreview: measureStage,
73236
+ defaultWorkspace: config2.workspace,
73237
+ projectWorkspace: createProjectWorkspaceLookup()
72642
73238
  });
72643
73239
  await server.connect(new StdioServerTransport());
72644
73240
  const served = TOOLS.length + 2 + createComponentTools().length + (motionLabEnabled() ? 1 : 0) + (phasedFlowEnabled() ? 1 : 0);
@@ -72648,6 +73244,7 @@ async function runStdioServer() {
72648
73244
  export {
72649
73245
  ENGINE_DTS_URI,
72650
73246
  buildServerInstructions,
73247
+ createProjectWorkspaceLookup,
72651
73248
  createServer,
72652
73249
  runStdioServer
72653
73250
  };