@subseam/mcp 0.3.4 → 0.3.5
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.
- package/README.md +1 -1
- package/dist/main.js +994 -393
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2588,15 +2588,15 @@ var require_path = __commonJS({
|
|
|
2588
2588
|
"../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js"(exports2) {
|
|
2589
2589
|
"use strict";
|
|
2590
2590
|
init_esm_shims();
|
|
2591
|
-
var
|
|
2591
|
+
var path7 = exports2;
|
|
2592
2592
|
var isAbsolute4 = (
|
|
2593
2593
|
/**
|
|
2594
2594
|
* Tests if the specified path is absolute.
|
|
2595
2595
|
* @param {string} path Path to test
|
|
2596
2596
|
* @returns {boolean} `true` if path is absolute
|
|
2597
2597
|
*/
|
|
2598
|
-
|
|
2599
|
-
return /^(?:\/|\w+:)/.test(
|
|
2598
|
+
path7.isAbsolute = function isAbsolute5(path8) {
|
|
2599
|
+
return /^(?:\/|\w+:)/.test(path8);
|
|
2600
2600
|
}
|
|
2601
2601
|
);
|
|
2602
2602
|
var normalize = (
|
|
@@ -2605,9 +2605,9 @@ var require_path = __commonJS({
|
|
|
2605
2605
|
* @param {string} path Path to normalize
|
|
2606
2606
|
* @returns {string} Normalized path
|
|
2607
2607
|
*/
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
var parts =
|
|
2608
|
+
path7.normalize = function normalize2(path8) {
|
|
2609
|
+
path8 = path8.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
2610
|
+
var parts = path8.split("/"), absolute = isAbsolute4(path8), prefix = "";
|
|
2611
2611
|
if (absolute)
|
|
2612
2612
|
prefix = parts.shift() + "/";
|
|
2613
2613
|
for (var i = 0; i < parts.length; ) {
|
|
@@ -2626,7 +2626,7 @@ var require_path = __commonJS({
|
|
|
2626
2626
|
return prefix + parts.join("/");
|
|
2627
2627
|
}
|
|
2628
2628
|
);
|
|
2629
|
-
|
|
2629
|
+
path7.resolve = function resolve7(originPath, includePath, alreadyNormalized) {
|
|
2630
2630
|
if (!alreadyNormalized)
|
|
2631
2631
|
includePath = normalize(includePath);
|
|
2632
2632
|
if (isAbsolute4(includePath))
|
|
@@ -2813,18 +2813,18 @@ var require_namespace = __commonJS({
|
|
|
2813
2813
|
object.onRemove(this);
|
|
2814
2814
|
return clearCache(this);
|
|
2815
2815
|
};
|
|
2816
|
-
Namespace.prototype.define = function define2(
|
|
2817
|
-
if (util2.isString(
|
|
2818
|
-
|
|
2819
|
-
else if (!Array.isArray(
|
|
2816
|
+
Namespace.prototype.define = function define2(path7, json2) {
|
|
2817
|
+
if (util2.isString(path7))
|
|
2818
|
+
path7 = path7.split(".");
|
|
2819
|
+
else if (!Array.isArray(path7))
|
|
2820
2820
|
throw TypeError("illegal path");
|
|
2821
|
-
if (
|
|
2821
|
+
if (path7 && path7.length && path7[0] === "")
|
|
2822
2822
|
throw Error("path must be relative");
|
|
2823
|
-
if (
|
|
2823
|
+
if (path7.length > util2.recursionLimit)
|
|
2824
2824
|
throw Error("max depth exceeded");
|
|
2825
2825
|
var ptr = this;
|
|
2826
|
-
while (
|
|
2827
|
-
var part =
|
|
2826
|
+
while (path7.length > 0) {
|
|
2827
|
+
var part = path7.shift();
|
|
2828
2828
|
if (ptr.nested && ptr.nested[part]) {
|
|
2829
2829
|
ptr = ptr.nested[part];
|
|
2830
2830
|
if (!(ptr instanceof Namespace))
|
|
@@ -2859,26 +2859,26 @@ var require_namespace = __commonJS({
|
|
|
2859
2859
|
});
|
|
2860
2860
|
return this;
|
|
2861
2861
|
};
|
|
2862
|
-
Namespace.prototype.lookup = function lookup2(
|
|
2862
|
+
Namespace.prototype.lookup = function lookup2(path7, filterTypes, parentAlreadyChecked) {
|
|
2863
2863
|
if (typeof filterTypes === "boolean") {
|
|
2864
2864
|
parentAlreadyChecked = filterTypes;
|
|
2865
2865
|
filterTypes = void 0;
|
|
2866
2866
|
} else if (filterTypes && !Array.isArray(filterTypes))
|
|
2867
2867
|
filterTypes = [filterTypes];
|
|
2868
|
-
if (util2.isString(
|
|
2869
|
-
if (
|
|
2868
|
+
if (util2.isString(path7) && path7.length) {
|
|
2869
|
+
if (path7 === ".")
|
|
2870
2870
|
return this.root;
|
|
2871
|
-
|
|
2872
|
-
} else if (!
|
|
2871
|
+
path7 = path7.split(".");
|
|
2872
|
+
} else if (!path7.length)
|
|
2873
2873
|
return this;
|
|
2874
|
-
var flatPath =
|
|
2875
|
-
if (
|
|
2876
|
-
return this.root.lookup(
|
|
2874
|
+
var flatPath = path7.join(".");
|
|
2875
|
+
if (path7[0] === "")
|
|
2876
|
+
return this.root.lookup(path7.slice(1), filterTypes);
|
|
2877
2877
|
var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
|
|
2878
2878
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
2879
2879
|
return found;
|
|
2880
2880
|
}
|
|
2881
|
-
found = this._lookupImpl(
|
|
2881
|
+
found = this._lookupImpl(path7, flatPath);
|
|
2882
2882
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
2883
2883
|
return found;
|
|
2884
2884
|
}
|
|
@@ -2886,7 +2886,7 @@ var require_namespace = __commonJS({
|
|
|
2886
2886
|
return null;
|
|
2887
2887
|
var current = this;
|
|
2888
2888
|
while (current.parent) {
|
|
2889
|
-
found = current.parent._lookupImpl(
|
|
2889
|
+
found = current.parent._lookupImpl(path7, flatPath);
|
|
2890
2890
|
if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
|
|
2891
2891
|
return found;
|
|
2892
2892
|
}
|
|
@@ -2894,22 +2894,22 @@ var require_namespace = __commonJS({
|
|
|
2894
2894
|
}
|
|
2895
2895
|
return null;
|
|
2896
2896
|
};
|
|
2897
|
-
Namespace.prototype._lookupImpl = function lookup2(
|
|
2897
|
+
Namespace.prototype._lookupImpl = function lookup2(path7, flatPath) {
|
|
2898
2898
|
if (Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
|
|
2899
2899
|
return this._lookupCache[flatPath];
|
|
2900
2900
|
}
|
|
2901
|
-
var found = this.get(
|
|
2901
|
+
var found = this.get(path7[0]);
|
|
2902
2902
|
var exact = null;
|
|
2903
2903
|
if (found) {
|
|
2904
|
-
if (
|
|
2904
|
+
if (path7.length === 1) {
|
|
2905
2905
|
exact = found;
|
|
2906
2906
|
} else if (found instanceof Namespace) {
|
|
2907
|
-
|
|
2908
|
-
exact = found._lookupImpl(
|
|
2907
|
+
path7 = path7.slice(1);
|
|
2908
|
+
exact = found._lookupImpl(path7, path7.join("."));
|
|
2909
2909
|
}
|
|
2910
2910
|
} else {
|
|
2911
2911
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
2912
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(
|
|
2912
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path7, flatPath))) {
|
|
2913
2913
|
exact = found;
|
|
2914
2914
|
break;
|
|
2915
2915
|
}
|
|
@@ -2917,28 +2917,28 @@ var require_namespace = __commonJS({
|
|
|
2917
2917
|
this._lookupCache[flatPath] = exact;
|
|
2918
2918
|
return exact;
|
|
2919
2919
|
};
|
|
2920
|
-
Namespace.prototype.lookupType = function lookupType(
|
|
2921
|
-
var found = this.lookup(
|
|
2920
|
+
Namespace.prototype.lookupType = function lookupType(path7) {
|
|
2921
|
+
var found = this.lookup(path7, [Type]);
|
|
2922
2922
|
if (!found)
|
|
2923
|
-
throw Error("no such type: " +
|
|
2923
|
+
throw Error("no such type: " + path7);
|
|
2924
2924
|
return found;
|
|
2925
2925
|
};
|
|
2926
|
-
Namespace.prototype.lookupEnum = function lookupEnum(
|
|
2927
|
-
var found = this.lookup(
|
|
2926
|
+
Namespace.prototype.lookupEnum = function lookupEnum(path7) {
|
|
2927
|
+
var found = this.lookup(path7, [Enum]);
|
|
2928
2928
|
if (!found)
|
|
2929
|
-
throw Error("no such Enum '" +
|
|
2929
|
+
throw Error("no such Enum '" + path7 + "' in " + this);
|
|
2930
2930
|
return found;
|
|
2931
2931
|
};
|
|
2932
|
-
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(
|
|
2933
|
-
var found = this.lookup(
|
|
2932
|
+
Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path7) {
|
|
2933
|
+
var found = this.lookup(path7, [Type, Enum]);
|
|
2934
2934
|
if (!found)
|
|
2935
|
-
throw Error("no such Type or Enum '" +
|
|
2935
|
+
throw Error("no such Type or Enum '" + path7 + "' in " + this);
|
|
2936
2936
|
return found;
|
|
2937
2937
|
};
|
|
2938
|
-
Namespace.prototype.lookupService = function lookupService(
|
|
2939
|
-
var found = this.lookup(
|
|
2938
|
+
Namespace.prototype.lookupService = function lookupService(path7) {
|
|
2939
|
+
var found = this.lookup(path7, [Service]);
|
|
2940
2940
|
if (!found)
|
|
2941
|
-
throw Error("no such Service '" +
|
|
2941
|
+
throw Error("no such Service '" + path7 + "' in " + this);
|
|
2942
2942
|
return found;
|
|
2943
2943
|
};
|
|
2944
2944
|
Namespace._configure = function(Type_, Service_, Enum_) {
|
|
@@ -4361,13 +4361,13 @@ var require_util = __commonJS({
|
|
|
4361
4361
|
Object.defineProperty(object, "$type", { value: enm, enumerable: false });
|
|
4362
4362
|
return enm;
|
|
4363
4363
|
};
|
|
4364
|
-
util2.setProperty = function setProperty(dst,
|
|
4365
|
-
function setProp(dst2,
|
|
4366
|
-
var part =
|
|
4364
|
+
util2.setProperty = function setProperty(dst, path7, value, ifNotSet) {
|
|
4365
|
+
function setProp(dst2, path8, value2) {
|
|
4366
|
+
var part = path8.shift();
|
|
4367
4367
|
if (util2.isUnsafeProperty(part))
|
|
4368
4368
|
return dst2;
|
|
4369
|
-
if (
|
|
4370
|
-
dst2[part] = setProp(dst2[part] || {},
|
|
4369
|
+
if (path8.length > 0) {
|
|
4370
|
+
dst2[part] = setProp(dst2[part] || {}, path8, value2);
|
|
4371
4371
|
} else {
|
|
4372
4372
|
var prevValue = dst2[part];
|
|
4373
4373
|
if (prevValue && ifNotSet)
|
|
@@ -4380,12 +4380,12 @@ var require_util = __commonJS({
|
|
|
4380
4380
|
}
|
|
4381
4381
|
if (typeof dst !== "object")
|
|
4382
4382
|
throw TypeError("dst must be an object");
|
|
4383
|
-
if (!
|
|
4383
|
+
if (!path7)
|
|
4384
4384
|
throw TypeError("path must be specified");
|
|
4385
|
-
|
|
4386
|
-
if (
|
|
4385
|
+
path7 = path7.split(".");
|
|
4386
|
+
if (path7.length > util2.recursionLimit)
|
|
4387
4387
|
throw Error("max depth exceeded");
|
|
4388
|
-
return setProp(dst,
|
|
4388
|
+
return setProp(dst, path7, value);
|
|
4389
4389
|
};
|
|
4390
4390
|
Object.defineProperty(util2, "decorateRoot", {
|
|
4391
4391
|
get: function() {
|
|
@@ -4935,12 +4935,12 @@ var require_object = __commonJS({
|
|
|
4935
4935
|
*/
|
|
4936
4936
|
fullName: {
|
|
4937
4937
|
get: function() {
|
|
4938
|
-
var
|
|
4938
|
+
var path7 = [this.name], ptr = this.parent;
|
|
4939
4939
|
while (ptr) {
|
|
4940
|
-
|
|
4940
|
+
path7.unshift(ptr.name);
|
|
4941
4941
|
ptr = ptr.parent;
|
|
4942
4942
|
}
|
|
4943
|
-
return
|
|
4943
|
+
return path7.join(".");
|
|
4944
4944
|
}
|
|
4945
4945
|
}
|
|
4946
4946
|
});
|
|
@@ -9223,14 +9223,14 @@ function redactSensitive(body2) {
|
|
|
9223
9223
|
}
|
|
9224
9224
|
return null;
|
|
9225
9225
|
}
|
|
9226
|
-
async function checkCredentialsFileSafety(
|
|
9226
|
+
async function checkCredentialsFileSafety(path7, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
|
|
9227
9227
|
if (typeof process === "undefined" || process.platform === "win32")
|
|
9228
9228
|
return;
|
|
9229
9229
|
const fs5 = await import("fs");
|
|
9230
|
-
let resolved =
|
|
9230
|
+
let resolved = path7;
|
|
9231
9231
|
let st;
|
|
9232
9232
|
try {
|
|
9233
|
-
resolved = await fs5.promises.realpath(
|
|
9233
|
+
resolved = await fs5.promises.realpath(path7);
|
|
9234
9234
|
st = await fs5.promises.stat(resolved);
|
|
9235
9235
|
} catch {
|
|
9236
9236
|
return;
|
|
@@ -9248,8 +9248,8 @@ async function checkCredentialsFileSafety(path6, onWarn = (m) => console.warn(`a
|
|
|
9248
9248
|
}
|
|
9249
9249
|
async function writeCredentialsFileAtomic(targetPath, data) {
|
|
9250
9250
|
const fs5 = await import("fs");
|
|
9251
|
-
const
|
|
9252
|
-
const dir =
|
|
9251
|
+
const path7 = await import("path");
|
|
9252
|
+
const dir = path7.dirname(targetPath);
|
|
9253
9253
|
await fs5.promises.mkdir(dir, { recursive: true, mode: 448 });
|
|
9254
9254
|
const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
9255
9255
|
try {
|
|
@@ -9650,8 +9650,8 @@ var init_credentials = __esm({
|
|
|
9650
9650
|
}
|
|
9651
9651
|
validateProfileName(profileName);
|
|
9652
9652
|
const fs5 = await import("fs");
|
|
9653
|
-
const
|
|
9654
|
-
const configPath =
|
|
9653
|
+
const path7 = await import("path");
|
|
9654
|
+
const configPath = path7.join(rootConfigPath, "configs", `${profileName}.json`);
|
|
9655
9655
|
let configRaw;
|
|
9656
9656
|
try {
|
|
9657
9657
|
configRaw = await fs5.promises.readFile(configPath, "utf-8");
|
|
@@ -9735,14 +9735,14 @@ var init_credentials = __esm({
|
|
|
9735
9735
|
return null;
|
|
9736
9736
|
}
|
|
9737
9737
|
validateProfileName(profileName);
|
|
9738
|
-
const
|
|
9739
|
-
return
|
|
9738
|
+
const path7 = await import("path");
|
|
9739
|
+
return path7.join(rootConfigPath, "credentials", `${profileName}.json`);
|
|
9740
9740
|
};
|
|
9741
9741
|
getRootConfigPath = async () => {
|
|
9742
9742
|
if (!supportsLocalConfigFiles()) {
|
|
9743
9743
|
return null;
|
|
9744
9744
|
}
|
|
9745
|
-
const
|
|
9745
|
+
const path7 = await import("path");
|
|
9746
9746
|
const configDir = readEnv("ANTHROPIC_CONFIG_DIR");
|
|
9747
9747
|
if (configDir) {
|
|
9748
9748
|
return configDir;
|
|
@@ -9751,21 +9751,21 @@ var init_credentials = __esm({
|
|
|
9751
9751
|
if (os === "Windows") {
|
|
9752
9752
|
const appData = readEnv("APPDATA");
|
|
9753
9753
|
if (appData) {
|
|
9754
|
-
return
|
|
9754
|
+
return path7.join(appData, "Anthropic");
|
|
9755
9755
|
}
|
|
9756
9756
|
const userProfile = readEnv("USERPROFILE");
|
|
9757
9757
|
if (userProfile) {
|
|
9758
|
-
return
|
|
9758
|
+
return path7.join(userProfile, "AppData", "Roaming", "Anthropic");
|
|
9759
9759
|
}
|
|
9760
9760
|
return null;
|
|
9761
9761
|
}
|
|
9762
9762
|
const xdgConfigHome = readEnv("XDG_CONFIG_HOME");
|
|
9763
9763
|
if (xdgConfigHome) {
|
|
9764
|
-
return
|
|
9764
|
+
return path7.join(xdgConfigHome, "anthropic");
|
|
9765
9765
|
}
|
|
9766
9766
|
const home = readEnv("HOME");
|
|
9767
9767
|
if (home) {
|
|
9768
|
-
return
|
|
9768
|
+
return path7.join(home, ".config", "anthropic");
|
|
9769
9769
|
}
|
|
9770
9770
|
return null;
|
|
9771
9771
|
};
|
|
@@ -9783,8 +9783,8 @@ var init_credentials = __esm({
|
|
|
9783
9783
|
return profileName;
|
|
9784
9784
|
}
|
|
9785
9785
|
const fs5 = await import("fs");
|
|
9786
|
-
const
|
|
9787
|
-
const filePath =
|
|
9786
|
+
const path7 = await import("path");
|
|
9787
|
+
const filePath = path7.join(rootConfigPath, "active_config");
|
|
9788
9788
|
try {
|
|
9789
9789
|
return (await fs5.promises.readFile(filePath, "utf-8")).trim() || "default";
|
|
9790
9790
|
} catch (err2) {
|
|
@@ -9798,21 +9798,21 @@ var init_credentials = __esm({
|
|
|
9798
9798
|
});
|
|
9799
9799
|
|
|
9800
9800
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.104.2_zod@3.25.76/node_modules/@anthropic-ai/sdk/lib/credentials/identity-token.mjs
|
|
9801
|
-
function identityTokenFromFile(
|
|
9802
|
-
if (!
|
|
9801
|
+
function identityTokenFromFile(path7) {
|
|
9802
|
+
if (!path7) {
|
|
9803
9803
|
throw new AnthropicError("Identity token file path is empty");
|
|
9804
9804
|
}
|
|
9805
9805
|
return async () => {
|
|
9806
9806
|
const fs5 = await import("fs");
|
|
9807
9807
|
let content;
|
|
9808
9808
|
try {
|
|
9809
|
-
content = await fs5.promises.readFile(
|
|
9809
|
+
content = await fs5.promises.readFile(path7, "utf-8");
|
|
9810
9810
|
} catch (err2) {
|
|
9811
|
-
throw new AnthropicError(`Failed to read identity token file at ${
|
|
9811
|
+
throw new AnthropicError(`Failed to read identity token file at ${path7}: ${err2}`);
|
|
9812
9812
|
}
|
|
9813
9813
|
const token = content.trim();
|
|
9814
9814
|
if (!token) {
|
|
9815
|
-
throw new AnthropicError(`Identity token file at ${
|
|
9815
|
+
throw new AnthropicError(`Identity token file at ${path7} is empty`);
|
|
9816
9816
|
}
|
|
9817
9817
|
return token;
|
|
9818
9818
|
};
|
|
@@ -11116,19 +11116,19 @@ var init_headers = __esm({
|
|
|
11116
11116
|
function encodeURIPath(str) {
|
|
11117
11117
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
11118
11118
|
}
|
|
11119
|
-
var EMPTY, createPathTagFunction,
|
|
11119
|
+
var EMPTY, createPathTagFunction, path3;
|
|
11120
11120
|
var init_path = __esm({
|
|
11121
11121
|
"../../node_modules/.pnpm/@anthropic-ai+sdk@0.104.2_zod@3.25.76/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs"() {
|
|
11122
11122
|
"use strict";
|
|
11123
11123
|
init_esm_shims();
|
|
11124
11124
|
init_error();
|
|
11125
11125
|
EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
11126
|
-
createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
11126
|
+
createPathTagFunction = (pathEncoder = encodeURIPath) => function path7(statics, ...params) {
|
|
11127
11127
|
if (statics.length === 1)
|
|
11128
11128
|
return statics[0];
|
|
11129
11129
|
let postPath = false;
|
|
11130
11130
|
const invalidSegments = [];
|
|
11131
|
-
const
|
|
11131
|
+
const path8 = statics.reduce((previousValue, currentValue, index) => {
|
|
11132
11132
|
if (/[?#]/.test(currentValue)) {
|
|
11133
11133
|
postPath = true;
|
|
11134
11134
|
}
|
|
@@ -11145,7 +11145,7 @@ var init_path = __esm({
|
|
|
11145
11145
|
}
|
|
11146
11146
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
11147
11147
|
}, "");
|
|
11148
|
-
const pathOnly =
|
|
11148
|
+
const pathOnly = path8.split(/[?#]/, 1)[0];
|
|
11149
11149
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
11150
11150
|
let match;
|
|
11151
11151
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -11166,12 +11166,12 @@ var init_path = __esm({
|
|
|
11166
11166
|
}, "");
|
|
11167
11167
|
throw new AnthropicError(`Path parameters result in path with invalid segments:
|
|
11168
11168
|
${invalidSegments.map((e) => e.error).join("\n")}
|
|
11169
|
-
${
|
|
11169
|
+
${path8}
|
|
11170
11170
|
${underline}`);
|
|
11171
11171
|
}
|
|
11172
|
-
return
|
|
11172
|
+
return path8;
|
|
11173
11173
|
};
|
|
11174
|
-
|
|
11174
|
+
path3 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
11175
11175
|
}
|
|
11176
11176
|
});
|
|
11177
11177
|
|
|
@@ -11199,7 +11199,7 @@ var init_deployment_runs = __esm({
|
|
|
11199
11199
|
*/
|
|
11200
11200
|
retrieve(deploymentRunID, params = {}, options) {
|
|
11201
11201
|
const { betas } = params ?? {};
|
|
11202
|
-
return this._client.get(
|
|
11202
|
+
return this._client.get(path3`/v1/deployment_runs/${deploymentRunID}?beta=true`, {
|
|
11203
11203
|
...options,
|
|
11204
11204
|
headers: buildHeaders([
|
|
11205
11205
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11290,7 +11290,7 @@ var init_deployments = __esm({
|
|
|
11290
11290
|
*/
|
|
11291
11291
|
retrieve(deploymentID, params = {}, options) {
|
|
11292
11292
|
const { betas } = params ?? {};
|
|
11293
|
-
return this._client.get(
|
|
11293
|
+
return this._client.get(path3`/v1/deployments/${deploymentID}?beta=true`, {
|
|
11294
11294
|
...options,
|
|
11295
11295
|
headers: buildHeaders([
|
|
11296
11296
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11309,7 +11309,7 @@ var init_deployments = __esm({
|
|
|
11309
11309
|
*/
|
|
11310
11310
|
update(deploymentID, params, options) {
|
|
11311
11311
|
const { betas, ...body2 } = params;
|
|
11312
|
-
return this._client.post(
|
|
11312
|
+
return this._client.post(path3`/v1/deployments/${deploymentID}?beta=true`, {
|
|
11313
11313
|
body: body2,
|
|
11314
11314
|
...options,
|
|
11315
11315
|
headers: buildHeaders([
|
|
@@ -11351,7 +11351,7 @@ var init_deployments = __esm({
|
|
|
11351
11351
|
*/
|
|
11352
11352
|
archive(deploymentID, params = {}, options) {
|
|
11353
11353
|
const { betas } = params ?? {};
|
|
11354
|
-
return this._client.post(
|
|
11354
|
+
return this._client.post(path3`/v1/deployments/${deploymentID}/archive?beta=true`, {
|
|
11355
11355
|
...options,
|
|
11356
11356
|
headers: buildHeaders([
|
|
11357
11357
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11370,7 +11370,7 @@ var init_deployments = __esm({
|
|
|
11370
11370
|
*/
|
|
11371
11371
|
pause(deploymentID, params = {}, options) {
|
|
11372
11372
|
const { betas } = params ?? {};
|
|
11373
|
-
return this._client.post(
|
|
11373
|
+
return this._client.post(path3`/v1/deployments/${deploymentID}/pause?beta=true`, {
|
|
11374
11374
|
...options,
|
|
11375
11375
|
headers: buildHeaders([
|
|
11376
11376
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11389,7 +11389,7 @@ var init_deployments = __esm({
|
|
|
11389
11389
|
*/
|
|
11390
11390
|
run(deploymentID, params = {}, options) {
|
|
11391
11391
|
const { betas } = params ?? {};
|
|
11392
|
-
return this._client.post(
|
|
11392
|
+
return this._client.post(path3`/v1/deployments/${deploymentID}/run?beta=true`, {
|
|
11393
11393
|
...options,
|
|
11394
11394
|
headers: buildHeaders([
|
|
11395
11395
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11408,7 +11408,7 @@ var init_deployments = __esm({
|
|
|
11408
11408
|
*/
|
|
11409
11409
|
unpause(deploymentID, params = {}, options) {
|
|
11410
11410
|
const { betas } = params ?? {};
|
|
11411
|
-
return this._client.post(
|
|
11411
|
+
return this._client.post(path3`/v1/deployments/${deploymentID}/unpause?beta=true`, {
|
|
11412
11412
|
...options,
|
|
11413
11413
|
headers: buildHeaders([
|
|
11414
11414
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -11517,7 +11517,7 @@ var init_files = __esm({
|
|
|
11517
11517
|
*/
|
|
11518
11518
|
delete(fileID, params = {}, options) {
|
|
11519
11519
|
const { betas } = params ?? {};
|
|
11520
|
-
return this._client.delete(
|
|
11520
|
+
return this._client.delete(path3`/v1/files/${fileID}?beta=true`, {
|
|
11521
11521
|
...options,
|
|
11522
11522
|
headers: buildHeaders([
|
|
11523
11523
|
{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
|
|
@@ -11540,7 +11540,7 @@ var init_files = __esm({
|
|
|
11540
11540
|
*/
|
|
11541
11541
|
download(fileID, params = {}, options) {
|
|
11542
11542
|
const { betas } = params ?? {};
|
|
11543
|
-
return this._client.get(
|
|
11543
|
+
return this._client.get(path3`/v1/files/${fileID}/content?beta=true`, {
|
|
11544
11544
|
...options,
|
|
11545
11545
|
headers: buildHeaders([
|
|
11546
11546
|
{
|
|
@@ -11563,7 +11563,7 @@ var init_files = __esm({
|
|
|
11563
11563
|
*/
|
|
11564
11564
|
retrieveMetadata(fileID, params = {}, options) {
|
|
11565
11565
|
const { betas } = params ?? {};
|
|
11566
|
-
return this._client.get(
|
|
11566
|
+
return this._client.get(path3`/v1/files/${fileID}?beta=true`, {
|
|
11567
11567
|
...options,
|
|
11568
11568
|
headers: buildHeaders([
|
|
11569
11569
|
{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
|
|
@@ -11623,7 +11623,7 @@ var init_models = __esm({
|
|
|
11623
11623
|
*/
|
|
11624
11624
|
retrieve(modelID, params = {}, options) {
|
|
11625
11625
|
const { betas } = params ?? {};
|
|
11626
|
-
return this._client.get(
|
|
11626
|
+
return this._client.get(path3`/v1/models/${modelID}?beta=true`, {
|
|
11627
11627
|
...options,
|
|
11628
11628
|
headers: buildHeaders([
|
|
11629
11629
|
{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
|
|
@@ -11704,7 +11704,7 @@ var init_user_profiles = __esm({
|
|
|
11704
11704
|
*/
|
|
11705
11705
|
retrieve(userProfileID, params = {}, options) {
|
|
11706
11706
|
const { betas } = params ?? {};
|
|
11707
|
-
return this._client.get(
|
|
11707
|
+
return this._client.get(path3`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
11708
11708
|
...options,
|
|
11709
11709
|
headers: buildHeaders([
|
|
11710
11710
|
{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() },
|
|
@@ -11725,7 +11725,7 @@ var init_user_profiles = __esm({
|
|
|
11725
11725
|
*/
|
|
11726
11726
|
update(userProfileID, params, options) {
|
|
11727
11727
|
const { betas, ...body2 } = params;
|
|
11728
|
-
return this._client.post(
|
|
11728
|
+
return this._client.post(path3`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
11729
11729
|
body: body2,
|
|
11730
11730
|
...options,
|
|
11731
11731
|
headers: buildHeaders([
|
|
@@ -11769,7 +11769,7 @@ var init_user_profiles = __esm({
|
|
|
11769
11769
|
*/
|
|
11770
11770
|
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
11771
11771
|
const { betas } = params ?? {};
|
|
11772
|
-
return this._client.post(
|
|
11772
|
+
return this._client.post(path3`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
11773
11773
|
...options,
|
|
11774
11774
|
headers: buildHeaders([
|
|
11775
11775
|
{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() },
|
|
@@ -12614,7 +12614,7 @@ var init_versions = __esm({
|
|
|
12614
12614
|
*/
|
|
12615
12615
|
list(agentID, params = {}, options) {
|
|
12616
12616
|
const { betas, ...query } = params ?? {};
|
|
12617
|
-
return this._client.getAPIList(
|
|
12617
|
+
return this._client.getAPIList(path3`/v1/agents/${agentID}/versions?beta=true`, PageCursor, {
|
|
12618
12618
|
query,
|
|
12619
12619
|
...options,
|
|
12620
12620
|
headers: buildHeaders([
|
|
@@ -12680,7 +12680,7 @@ var init_agents = __esm({
|
|
|
12680
12680
|
*/
|
|
12681
12681
|
retrieve(agentID, params = {}, options) {
|
|
12682
12682
|
const { betas, ...query } = params ?? {};
|
|
12683
|
-
return this._client.get(
|
|
12683
|
+
return this._client.get(path3`/v1/agents/${agentID}?beta=true`, {
|
|
12684
12684
|
query,
|
|
12685
12685
|
...options,
|
|
12686
12686
|
headers: buildHeaders([
|
|
@@ -12703,7 +12703,7 @@ var init_agents = __esm({
|
|
|
12703
12703
|
*/
|
|
12704
12704
|
update(agentID, params, options) {
|
|
12705
12705
|
const { betas, ...body2 } = params;
|
|
12706
|
-
return this._client.post(
|
|
12706
|
+
return this._client.post(path3`/v1/agents/${agentID}?beta=true`, {
|
|
12707
12707
|
body: body2,
|
|
12708
12708
|
...options,
|
|
12709
12709
|
headers: buildHeaders([
|
|
@@ -12747,7 +12747,7 @@ var init_agents = __esm({
|
|
|
12747
12747
|
*/
|
|
12748
12748
|
archive(agentID, params = {}, options) {
|
|
12749
12749
|
const { betas } = params ?? {};
|
|
12750
|
-
return this._client.post(
|
|
12750
|
+
return this._client.post(path3`/v1/agents/${agentID}/archive?beta=true`, {
|
|
12751
12751
|
...options,
|
|
12752
12752
|
headers: buildHeaders([
|
|
12753
12753
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -13490,8 +13490,8 @@ var init_promise = __esm({
|
|
|
13490
13490
|
|
|
13491
13491
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.104.2_zod@3.25.76/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs
|
|
13492
13492
|
import * as fs2 from "fs/promises";
|
|
13493
|
-
import * as
|
|
13494
|
-
import { randomUUID } from "crypto";
|
|
13493
|
+
import * as path4 from "path";
|
|
13494
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
13495
13495
|
async function realpathOrSelf(p) {
|
|
13496
13496
|
try {
|
|
13497
13497
|
return await fs2.realpath(p);
|
|
@@ -13513,41 +13513,41 @@ async function canonicalize(abs) {
|
|
|
13513
13513
|
} catch {
|
|
13514
13514
|
}
|
|
13515
13515
|
if (isLink) {
|
|
13516
|
-
prefix =
|
|
13516
|
+
prefix = path4.resolve(path4.dirname(prefix), await fs2.readlink(prefix));
|
|
13517
13517
|
continue;
|
|
13518
13518
|
}
|
|
13519
|
-
const parent =
|
|
13519
|
+
const parent = path4.dirname(prefix);
|
|
13520
13520
|
if (parent === prefix)
|
|
13521
13521
|
return abs;
|
|
13522
|
-
tail.push(
|
|
13522
|
+
tail.push(path4.basename(prefix));
|
|
13523
13523
|
prefix = parent;
|
|
13524
13524
|
continue;
|
|
13525
13525
|
}
|
|
13526
|
-
return tail.length ?
|
|
13526
|
+
return tail.length ? path4.join(real, ...tail.reverse()) : real;
|
|
13527
13527
|
}
|
|
13528
13528
|
}
|
|
13529
13529
|
async function confineToRoot(root, p, opts) {
|
|
13530
13530
|
const allowOutside = opts?.allowOutside ?? false;
|
|
13531
|
-
if (
|
|
13531
|
+
if (path4.isAbsolute(p)) {
|
|
13532
13532
|
if (!allowOutside) {
|
|
13533
13533
|
throw new ToolError(`absolute path ${JSON.stringify(p)} not permitted`);
|
|
13534
13534
|
}
|
|
13535
|
-
return
|
|
13535
|
+
return path4.resolve(p);
|
|
13536
13536
|
}
|
|
13537
|
-
const realRoot = await realpathOrSelf(
|
|
13538
|
-
const abs =
|
|
13537
|
+
const realRoot = await realpathOrSelf(path4.resolve(root));
|
|
13538
|
+
const abs = path4.resolve(realRoot, p);
|
|
13539
13539
|
if (allowOutside)
|
|
13540
13540
|
return abs;
|
|
13541
13541
|
const real = await canonicalize(abs);
|
|
13542
|
-
const rootSep = realRoot.endsWith(
|
|
13542
|
+
const rootSep = realRoot.endsWith(path4.sep) ? realRoot : realRoot + path4.sep;
|
|
13543
13543
|
if (real !== realRoot && !real.startsWith(rootSep)) {
|
|
13544
13544
|
throw new ToolError(`path ${JSON.stringify(p)} escapes workdir`);
|
|
13545
13545
|
}
|
|
13546
13546
|
return real;
|
|
13547
13547
|
}
|
|
13548
13548
|
async function atomicWriteFile(targetPath, content) {
|
|
13549
|
-
const dir =
|
|
13550
|
-
const tempPath =
|
|
13549
|
+
const dir = path4.dirname(targetPath);
|
|
13550
|
+
const tempPath = path4.join(dir, `.tmp-${process.pid}-${randomUUID2()}`);
|
|
13551
13551
|
let handle2;
|
|
13552
13552
|
try {
|
|
13553
13553
|
handle2 = await fs2.open(tempPath, "wx", FILE_CREATE_MODE);
|
|
@@ -13604,7 +13604,7 @@ var init_fs_util = __esm({
|
|
|
13604
13604
|
// ../../node_modules/.pnpm/@anthropic-ai+sdk@0.104.2_zod@3.25.76/node_modules/@anthropic-ai/sdk/tools/agent-toolset/skills.mjs
|
|
13605
13605
|
import * as fs3 from "fs/promises";
|
|
13606
13606
|
import * as fssync from "fs";
|
|
13607
|
-
import * as
|
|
13607
|
+
import * as path5 from "path";
|
|
13608
13608
|
import { execFile as execFile9 } from "child_process";
|
|
13609
13609
|
import { promisify as promisify9 } from "util";
|
|
13610
13610
|
import { Readable } from "stream";
|
|
@@ -13616,17 +13616,17 @@ async function setupSkills(ctx) {
|
|
|
13616
13616
|
};
|
|
13617
13617
|
const log = loggerFor(client);
|
|
13618
13618
|
const session = await client.beta.sessions.retrieve(sessionId);
|
|
13619
|
-
const skillsRoot =
|
|
13619
|
+
const skillsRoot = path5.resolve(ctx.workdir, "skills");
|
|
13620
13620
|
const created = [];
|
|
13621
13621
|
for (const skill of session.agent.skills) {
|
|
13622
13622
|
try {
|
|
13623
13623
|
const versionId = await resolveSkillVersion(client, skill.skill_id, skill.version);
|
|
13624
13624
|
const version2 = await client.beta.skills.versions.retrieve(versionId, { skill_id: skill.skill_id });
|
|
13625
|
-
let dirname13 =
|
|
13625
|
+
let dirname13 = path5.basename(version2.name.trim());
|
|
13626
13626
|
if (dirname13 === "" || dirname13 === "." || dirname13 === "..")
|
|
13627
13627
|
dirname13 = skill.skill_id;
|
|
13628
|
-
const dest =
|
|
13629
|
-
if (dest !== skillsRoot && !dest.startsWith(skillsRoot +
|
|
13628
|
+
const dest = path5.resolve(skillsRoot, dirname13);
|
|
13629
|
+
if (dest !== skillsRoot && !dest.startsWith(skillsRoot + path5.sep)) {
|
|
13630
13630
|
log.warn("skill name escapes the skills dir; skipping", {
|
|
13631
13631
|
component: "agent-tool-context",
|
|
13632
13632
|
name: version2.name
|
|
@@ -13679,7 +13679,7 @@ function assertSafeMemberNames(names) {
|
|
|
13679
13679
|
const entry = raw.trim();
|
|
13680
13680
|
if (!entry)
|
|
13681
13681
|
continue;
|
|
13682
|
-
if (
|
|
13682
|
+
if (path5.isAbsolute(entry) || entry.split(/[\\/]/).includes("..")) {
|
|
13683
13683
|
throw new AnthropicError(`refusing to extract unsafe archive member: ${entry}`);
|
|
13684
13684
|
}
|
|
13685
13685
|
}
|
|
@@ -13721,12 +13721,12 @@ function archiveTopDir(listing) {
|
|
|
13721
13721
|
return top !== void 0 && nested ? top : "";
|
|
13722
13722
|
}
|
|
13723
13723
|
async function extractSkillArchive(resp, dest) {
|
|
13724
|
-
const tmp =
|
|
13724
|
+
const tmp = path5.join(dest, `.skill-archive-${process.pid}-${Date.now()}`);
|
|
13725
13725
|
if (!resp.body) {
|
|
13726
13726
|
throw new AnthropicError("skill download response had no body");
|
|
13727
13727
|
}
|
|
13728
13728
|
await pipeline(Readable.fromWeb(resp.body), fssync.createWriteStream(tmp));
|
|
13729
|
-
const stage =
|
|
13729
|
+
const stage = path5.join(path5.dirname(dest), `.skill-stage-${process.pid}-${Date.now()}`);
|
|
13730
13730
|
try {
|
|
13731
13731
|
const head = await readHead(tmp, 4);
|
|
13732
13732
|
const isZip = head.length >= 4 && head[0] === 80 && head[1] === 75 && head[2] === 3 && head[3] === 4;
|
|
@@ -13737,9 +13737,9 @@ async function extractSkillArchive(resp, dest) {
|
|
|
13737
13737
|
const top = archiveTopDir(listing);
|
|
13738
13738
|
await fs3.mkdir(stage, { recursive: true, mode: DIR_CREATE_MODE });
|
|
13739
13739
|
await runArchiveTool(archiveCmd, isZip ? ["-oq", tmp, "-d", stage] : ["-xf", tmp, "-C", stage]);
|
|
13740
|
-
const srcRoot = top ?
|
|
13740
|
+
const srcRoot = top ? path5.join(stage, top) : stage;
|
|
13741
13741
|
for (const entry of await fs3.readdir(srcRoot)) {
|
|
13742
|
-
await fs3.rename(
|
|
13742
|
+
await fs3.rename(path5.join(srcRoot, entry), path5.join(dest, entry));
|
|
13743
13743
|
}
|
|
13744
13744
|
} finally {
|
|
13745
13745
|
await fs3.rm(tmp, { force: true });
|
|
@@ -13786,7 +13786,7 @@ __export(node_exports, {
|
|
|
13786
13786
|
});
|
|
13787
13787
|
import * as fs4 from "fs/promises";
|
|
13788
13788
|
import * as fssync2 from "fs";
|
|
13789
|
-
import * as
|
|
13789
|
+
import * as path6 from "path";
|
|
13790
13790
|
import * as cp from "child_process";
|
|
13791
13791
|
import * as crypto from "crypto";
|
|
13792
13792
|
import * as readline from "readline";
|
|
@@ -13935,7 +13935,7 @@ function betaWriteTool(ctx) {
|
|
|
13935
13935
|
throw new ToolError("write: file_path is required");
|
|
13936
13936
|
const abs = await resolvePath(ctx, file_path);
|
|
13937
13937
|
try {
|
|
13938
|
-
await fs4.mkdir(
|
|
13938
|
+
await fs4.mkdir(path6.dirname(abs), { recursive: true, mode: DIR_CREATE_MODE });
|
|
13939
13939
|
await atomicWriteFile(abs, content ?? "");
|
|
13940
13940
|
} catch (e) {
|
|
13941
13941
|
throw new ToolError(`write: ${fsErrorMessage(e, file_path)}`);
|
|
@@ -14015,13 +14015,13 @@ function betaGlobTool(ctx) {
|
|
|
14015
14015
|
run: async ({ pattern, path: searchPath }) => {
|
|
14016
14016
|
if (!pattern)
|
|
14017
14017
|
throw new ToolError("glob: pattern is required");
|
|
14018
|
-
let root =
|
|
14018
|
+
let root = path6.resolve(ctx.workdir);
|
|
14019
14019
|
let pat = pattern;
|
|
14020
|
-
if (
|
|
14020
|
+
if (path6.isAbsolute(pattern)) {
|
|
14021
14021
|
if (!ctx.unrestrictedPaths)
|
|
14022
14022
|
throw new ToolError("glob: absolute pattern not permitted");
|
|
14023
|
-
root =
|
|
14024
|
-
pat =
|
|
14023
|
+
root = path6.parse(pattern).root;
|
|
14024
|
+
pat = path6.relative(root, pattern);
|
|
14025
14025
|
} else if (searchPath) {
|
|
14026
14026
|
root = await resolvePath(ctx, searchPath);
|
|
14027
14027
|
}
|
|
@@ -14037,7 +14037,7 @@ function betaGlobTool(ctx) {
|
|
|
14037
14037
|
})) {
|
|
14038
14038
|
if (!entry.isFile())
|
|
14039
14039
|
continue;
|
|
14040
|
-
const full =
|
|
14040
|
+
const full = path6.join(entry.parentPath, entry.name);
|
|
14041
14041
|
if (!ctx.unrestrictedPaths && !isWithin(root, full))
|
|
14042
14042
|
continue;
|
|
14043
14043
|
let mtime = 0;
|
|
@@ -14069,7 +14069,7 @@ function betaGrepTool(ctx) {
|
|
|
14069
14069
|
run: async ({ pattern, path: p }, context) => {
|
|
14070
14070
|
if (!pattern)
|
|
14071
14071
|
throw new ToolError("grep: pattern is required");
|
|
14072
|
-
let searchPath =
|
|
14072
|
+
let searchPath = path6.resolve(ctx.workdir);
|
|
14073
14073
|
if (p)
|
|
14074
14074
|
searchPath = await resolvePath(ctx, p);
|
|
14075
14075
|
const rg = await findRg();
|
|
@@ -14133,11 +14133,11 @@ async function runWalkGrep(pattern, root, signal) {
|
|
|
14133
14133
|
hits.push(line);
|
|
14134
14134
|
return true;
|
|
14135
14135
|
};
|
|
14136
|
-
const
|
|
14137
|
-
if (
|
|
14136
|
+
const stat3 = await fs4.stat(root).catch(() => null);
|
|
14137
|
+
if (stat3?.isFile()) {
|
|
14138
14138
|
await grepFile(root, re, push);
|
|
14139
14139
|
} else {
|
|
14140
|
-
await walk(root, "", (rel) => grepFile(
|
|
14140
|
+
await walk(root, "", (rel) => grepFile(path6.join(root, rel), re, push), signal);
|
|
14141
14141
|
}
|
|
14142
14142
|
if (signal?.aborted)
|
|
14143
14143
|
throw new ToolError("grep: aborted");
|
|
@@ -14164,8 +14164,8 @@ async function grepFile(file, re, push) {
|
|
|
14164
14164
|
return true;
|
|
14165
14165
|
}
|
|
14166
14166
|
function isWithin(root, p) {
|
|
14167
|
-
const rel =
|
|
14168
|
-
return rel === "" || !rel.startsWith(".." +
|
|
14167
|
+
const rel = path6.relative(root, p);
|
|
14168
|
+
return rel === "" || !rel.startsWith(".." + path6.sep) && rel !== ".." && !path6.isAbsolute(rel);
|
|
14169
14169
|
}
|
|
14170
14170
|
async function walk(root, rel, fn, signal) {
|
|
14171
14171
|
let remaining = WALK_MAX_ENTRIES;
|
|
@@ -14176,7 +14176,7 @@ async function walk(root, rel, fn, signal) {
|
|
|
14176
14176
|
return false;
|
|
14177
14177
|
let entries;
|
|
14178
14178
|
try {
|
|
14179
|
-
entries = await fs4.readdir(
|
|
14179
|
+
entries = await fs4.readdir(path6.join(root, rel2), { withFileTypes: true });
|
|
14180
14180
|
} catch {
|
|
14181
14181
|
return true;
|
|
14182
14182
|
}
|
|
@@ -14187,7 +14187,7 @@ async function walk(root, rel, fn, signal) {
|
|
|
14187
14187
|
return false;
|
|
14188
14188
|
if (signal?.aborted)
|
|
14189
14189
|
return false;
|
|
14190
|
-
const childRel = rel2 ?
|
|
14190
|
+
const childRel = rel2 ? path6.join(rel2, e.name) : e.name;
|
|
14191
14191
|
if (e.isDirectory()) {
|
|
14192
14192
|
if (!await inner(childRel, depth + 1))
|
|
14193
14193
|
return false;
|
|
@@ -14201,9 +14201,9 @@ async function walk(root, rel, fn, signal) {
|
|
|
14201
14201
|
await inner(rel, 0);
|
|
14202
14202
|
}
|
|
14203
14203
|
async function findRg() {
|
|
14204
|
-
const dirs = (process.env["PATH"] ?? "").split(
|
|
14204
|
+
const dirs = (process.env["PATH"] ?? "").split(path6.delimiter);
|
|
14205
14205
|
for (const d of dirs) {
|
|
14206
|
-
const candidate =
|
|
14206
|
+
const candidate = path6.join(d, "rg");
|
|
14207
14207
|
try {
|
|
14208
14208
|
await fs4.access(candidate, fssync2.constants.X_OK);
|
|
14209
14209
|
return candidate;
|
|
@@ -14605,7 +14605,7 @@ var init_work = __esm({
|
|
|
14605
14605
|
*/
|
|
14606
14606
|
retrieve(workID, params, options) {
|
|
14607
14607
|
const { environment_id, betas } = params;
|
|
14608
|
-
return this._client.get(
|
|
14608
|
+
return this._client.get(path3`/v1/environments/${environment_id}/work/${workID}?beta=true`, {
|
|
14609
14609
|
...options,
|
|
14610
14610
|
headers: buildHeaders([
|
|
14611
14611
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -14632,7 +14632,7 @@ var init_work = __esm({
|
|
|
14632
14632
|
*/
|
|
14633
14633
|
update(workID, params, options) {
|
|
14634
14634
|
const { environment_id, betas, ...body2 } = params;
|
|
14635
|
-
return this._client.post(
|
|
14635
|
+
return this._client.post(path3`/v1/environments/${environment_id}/work/${workID}?beta=true`, {
|
|
14636
14636
|
body: body2,
|
|
14637
14637
|
...options,
|
|
14638
14638
|
headers: buildHeaders([
|
|
@@ -14661,7 +14661,7 @@ var init_work = __esm({
|
|
|
14661
14661
|
*/
|
|
14662
14662
|
list(environmentID, params = {}, options) {
|
|
14663
14663
|
const { betas, ...query } = params ?? {};
|
|
14664
|
-
return this._client.getAPIList(
|
|
14664
|
+
return this._client.getAPIList(path3`/v1/environments/${environmentID}/work?beta=true`, PageCursor, {
|
|
14665
14665
|
query,
|
|
14666
14666
|
...options,
|
|
14667
14667
|
headers: buildHeaders([
|
|
@@ -14689,7 +14689,7 @@ var init_work = __esm({
|
|
|
14689
14689
|
*/
|
|
14690
14690
|
ack(workID, params, options) {
|
|
14691
14691
|
const { environment_id, betas } = params;
|
|
14692
|
-
return this._client.post(
|
|
14692
|
+
return this._client.post(path3`/v1/environments/${environment_id}/work/${workID}/ack?beta=true`, {
|
|
14693
14693
|
...options,
|
|
14694
14694
|
headers: buildHeaders([
|
|
14695
14695
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -14715,7 +14715,7 @@ var init_work = __esm({
|
|
|
14715
14715
|
*/
|
|
14716
14716
|
heartbeat(workID, params, options) {
|
|
14717
14717
|
const { environment_id, desired_ttl_seconds, expected_last_heartbeat, betas } = params;
|
|
14718
|
-
return this._client.post(
|
|
14718
|
+
return this._client.post(path3`/v1/environments/${environment_id}/work/${workID}/heartbeat?beta=true`, {
|
|
14719
14719
|
query: { desired_ttl_seconds, expected_last_heartbeat },
|
|
14720
14720
|
...options,
|
|
14721
14721
|
headers: buildHeaders([
|
|
@@ -14742,7 +14742,7 @@ var init_work = __esm({
|
|
|
14742
14742
|
*/
|
|
14743
14743
|
poll(environmentID, params = {}, options) {
|
|
14744
14744
|
const { betas, "Anthropic-Worker-ID": anthropicWorkerID, ...query } = params ?? {};
|
|
14745
|
-
return this._client.get(
|
|
14745
|
+
return this._client.get(path3`/v1/environments/${environmentID}/work/poll?beta=true`, {
|
|
14746
14746
|
query,
|
|
14747
14747
|
...options,
|
|
14748
14748
|
headers: buildHeaders([
|
|
@@ -14767,7 +14767,7 @@ var init_work = __esm({
|
|
|
14767
14767
|
*/
|
|
14768
14768
|
stats(environmentID, params = {}, options) {
|
|
14769
14769
|
const { betas } = params ?? {};
|
|
14770
|
-
return this._client.get(
|
|
14770
|
+
return this._client.get(path3`/v1/environments/${environmentID}/work/stats?beta=true`, {
|
|
14771
14771
|
...options,
|
|
14772
14772
|
headers: buildHeaders([
|
|
14773
14773
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -14793,7 +14793,7 @@ var init_work = __esm({
|
|
|
14793
14793
|
*/
|
|
14794
14794
|
stop(workID, params, options) {
|
|
14795
14795
|
const { environment_id, betas, ...body2 } = params;
|
|
14796
|
-
return this._client.post(
|
|
14796
|
+
return this._client.post(path3`/v1/environments/${environment_id}/work/${workID}/stop?beta=true`, {
|
|
14797
14797
|
body: body2,
|
|
14798
14798
|
...options,
|
|
14799
14799
|
headers: buildHeaders([
|
|
@@ -14899,7 +14899,7 @@ var init_environments = __esm({
|
|
|
14899
14899
|
*/
|
|
14900
14900
|
retrieve(environmentID, params = {}, options) {
|
|
14901
14901
|
const { betas } = params ?? {};
|
|
14902
|
-
return this._client.get(
|
|
14902
|
+
return this._client.get(path3`/v1/environments/${environmentID}?beta=true`, {
|
|
14903
14903
|
...options,
|
|
14904
14904
|
headers: buildHeaders([
|
|
14905
14905
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -14920,7 +14920,7 @@ var init_environments = __esm({
|
|
|
14920
14920
|
*/
|
|
14921
14921
|
update(environmentID, params, options) {
|
|
14922
14922
|
const { betas, ...body2 } = params;
|
|
14923
|
-
return this._client.post(
|
|
14923
|
+
return this._client.post(path3`/v1/environments/${environmentID}?beta=true`, {
|
|
14924
14924
|
body: body2,
|
|
14925
14925
|
...options,
|
|
14926
14926
|
headers: buildHeaders([
|
|
@@ -14964,7 +14964,7 @@ var init_environments = __esm({
|
|
|
14964
14964
|
*/
|
|
14965
14965
|
delete(environmentID, params = {}, options) {
|
|
14966
14966
|
const { betas } = params ?? {};
|
|
14967
|
-
return this._client.delete(
|
|
14967
|
+
return this._client.delete(path3`/v1/environments/${environmentID}?beta=true`, {
|
|
14968
14968
|
...options,
|
|
14969
14969
|
headers: buildHeaders([
|
|
14970
14970
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -14986,7 +14986,7 @@ var init_environments = __esm({
|
|
|
14986
14986
|
*/
|
|
14987
14987
|
archive(environmentID, params = {}, options) {
|
|
14988
14988
|
const { betas } = params ?? {};
|
|
14989
|
-
return this._client.post(
|
|
14989
|
+
return this._client.post(path3`/v1/environments/${environmentID}/archive?beta=true`, {
|
|
14990
14990
|
...options,
|
|
14991
14991
|
headers: buildHeaders([
|
|
14992
14992
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -15024,7 +15024,7 @@ var init_memories = __esm({
|
|
|
15024
15024
|
*/
|
|
15025
15025
|
create(memoryStoreID, params, options) {
|
|
15026
15026
|
const { view, betas, ...body2 } = params;
|
|
15027
|
-
return this._client.post(
|
|
15027
|
+
return this._client.post(path3`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
|
|
15028
15028
|
query: { view },
|
|
15029
15029
|
body: body2,
|
|
15030
15030
|
...options,
|
|
@@ -15048,7 +15048,7 @@ var init_memories = __esm({
|
|
|
15048
15048
|
*/
|
|
15049
15049
|
retrieve(memoryID, params, options) {
|
|
15050
15050
|
const { memory_store_id, betas, ...query } = params;
|
|
15051
|
-
return this._client.get(
|
|
15051
|
+
return this._client.get(path3`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
15052
15052
|
query,
|
|
15053
15053
|
...options,
|
|
15054
15054
|
headers: buildHeaders([
|
|
@@ -15071,7 +15071,7 @@ var init_memories = __esm({
|
|
|
15071
15071
|
*/
|
|
15072
15072
|
update(memoryID, params, options) {
|
|
15073
15073
|
const { memory_store_id, view, betas, ...body2 } = params;
|
|
15074
|
-
return this._client.post(
|
|
15074
|
+
return this._client.post(path3`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
15075
15075
|
query: { view },
|
|
15076
15076
|
body: body2,
|
|
15077
15077
|
...options,
|
|
@@ -15096,7 +15096,7 @@ var init_memories = __esm({
|
|
|
15096
15096
|
*/
|
|
15097
15097
|
list(memoryStoreID, params = {}, options) {
|
|
15098
15098
|
const { betas, ...query } = params ?? {};
|
|
15099
|
-
return this._client.getAPIList(
|
|
15099
|
+
return this._client.getAPIList(path3`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, PageCursor, {
|
|
15100
15100
|
query,
|
|
15101
15101
|
...options,
|
|
15102
15102
|
headers: buildHeaders([
|
|
@@ -15119,7 +15119,7 @@ var init_memories = __esm({
|
|
|
15119
15119
|
*/
|
|
15120
15120
|
delete(memoryID, params, options) {
|
|
15121
15121
|
const { memory_store_id, expected_content_sha256, betas } = params;
|
|
15122
|
-
return this._client.delete(
|
|
15122
|
+
return this._client.delete(path3`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
15123
15123
|
query: { expected_content_sha256 },
|
|
15124
15124
|
...options,
|
|
15125
15125
|
headers: buildHeaders([
|
|
@@ -15157,7 +15157,7 @@ var init_memory_versions = __esm({
|
|
|
15157
15157
|
*/
|
|
15158
15158
|
retrieve(memoryVersionID, params, options) {
|
|
15159
15159
|
const { memory_store_id, betas, ...query } = params;
|
|
15160
|
-
return this._client.get(
|
|
15160
|
+
return this._client.get(path3`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
|
|
15161
15161
|
query,
|
|
15162
15162
|
...options,
|
|
15163
15163
|
headers: buildHeaders([
|
|
@@ -15181,7 +15181,7 @@ var init_memory_versions = __esm({
|
|
|
15181
15181
|
*/
|
|
15182
15182
|
list(memoryStoreID, params = {}, options) {
|
|
15183
15183
|
const { betas, ...query } = params ?? {};
|
|
15184
|
-
return this._client.getAPIList(
|
|
15184
|
+
return this._client.getAPIList(path3`/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, PageCursor, {
|
|
15185
15185
|
query,
|
|
15186
15186
|
...options,
|
|
15187
15187
|
headers: buildHeaders([
|
|
@@ -15204,7 +15204,7 @@ var init_memory_versions = __esm({
|
|
|
15204
15204
|
*/
|
|
15205
15205
|
redact(memoryVersionID, params, options) {
|
|
15206
15206
|
const { memory_store_id, betas } = params;
|
|
15207
|
-
return this._client.post(
|
|
15207
|
+
return this._client.post(path3`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
|
|
15208
15208
|
...options,
|
|
15209
15209
|
headers: buildHeaders([
|
|
15210
15210
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -15269,7 +15269,7 @@ var init_memory_stores = __esm({
|
|
|
15269
15269
|
*/
|
|
15270
15270
|
retrieve(memoryStoreID, params = {}, options) {
|
|
15271
15271
|
const { betas } = params ?? {};
|
|
15272
|
-
return this._client.get(
|
|
15272
|
+
return this._client.get(path3`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
15273
15273
|
...options,
|
|
15274
15274
|
headers: buildHeaders([
|
|
15275
15275
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -15288,7 +15288,7 @@ var init_memory_stores = __esm({
|
|
|
15288
15288
|
*/
|
|
15289
15289
|
update(memoryStoreID, params, options) {
|
|
15290
15290
|
const { betas, ...body2 } = params;
|
|
15291
|
-
return this._client.post(
|
|
15291
|
+
return this._client.post(path3`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
15292
15292
|
body: body2,
|
|
15293
15293
|
...options,
|
|
15294
15294
|
headers: buildHeaders([
|
|
@@ -15330,7 +15330,7 @@ var init_memory_stores = __esm({
|
|
|
15330
15330
|
*/
|
|
15331
15331
|
delete(memoryStoreID, params = {}, options) {
|
|
15332
15332
|
const { betas } = params ?? {};
|
|
15333
|
-
return this._client.delete(
|
|
15333
|
+
return this._client.delete(path3`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
15334
15334
|
...options,
|
|
15335
15335
|
headers: buildHeaders([
|
|
15336
15336
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -15349,7 +15349,7 @@ var init_memory_stores = __esm({
|
|
|
15349
15349
|
*/
|
|
15350
15350
|
archive(memoryStoreID, params = {}, options) {
|
|
15351
15351
|
const { betas } = params ?? {};
|
|
15352
|
-
return this._client.post(
|
|
15352
|
+
return this._client.post(path3`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
|
|
15353
15353
|
...options,
|
|
15354
15354
|
headers: buildHeaders([
|
|
15355
15355
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -15485,7 +15485,7 @@ var init_batches = __esm({
|
|
|
15485
15485
|
*/
|
|
15486
15486
|
retrieve(messageBatchID, params = {}, options) {
|
|
15487
15487
|
const { betas } = params ?? {};
|
|
15488
|
-
return this._client.get(
|
|
15488
|
+
return this._client.get(path3`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
15489
15489
|
...options,
|
|
15490
15490
|
headers: buildHeaders([
|
|
15491
15491
|
{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
|
|
@@ -15538,7 +15538,7 @@ var init_batches = __esm({
|
|
|
15538
15538
|
*/
|
|
15539
15539
|
delete(messageBatchID, params = {}, options) {
|
|
15540
15540
|
const { betas } = params ?? {};
|
|
15541
|
-
return this._client.delete(
|
|
15541
|
+
return this._client.delete(path3`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
15542
15542
|
...options,
|
|
15543
15543
|
headers: buildHeaders([
|
|
15544
15544
|
{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
|
|
@@ -15570,7 +15570,7 @@ var init_batches = __esm({
|
|
|
15570
15570
|
*/
|
|
15571
15571
|
cancel(messageBatchID, params = {}, options) {
|
|
15572
15572
|
const { betas } = params ?? {};
|
|
15573
|
-
return this._client.post(
|
|
15573
|
+
return this._client.post(path3`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
|
|
15574
15574
|
...options,
|
|
15575
15575
|
headers: buildHeaders([
|
|
15576
15576
|
{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
|
|
@@ -17141,7 +17141,7 @@ var init_events = __esm({
|
|
|
17141
17141
|
*/
|
|
17142
17142
|
list(sessionID, params = {}, options) {
|
|
17143
17143
|
const { betas, ...query } = params ?? {};
|
|
17144
|
-
return this._client.getAPIList(
|
|
17144
|
+
return this._client.getAPIList(path3`/v1/sessions/${sessionID}/events?beta=true`, PageCursor, {
|
|
17145
17145
|
query,
|
|
17146
17146
|
...options,
|
|
17147
17147
|
headers: buildHeaders([
|
|
@@ -17176,7 +17176,7 @@ var init_events = __esm({
|
|
|
17176
17176
|
*/
|
|
17177
17177
|
send(sessionID, params, options) {
|
|
17178
17178
|
const { betas, ...body2 } = params;
|
|
17179
|
-
return this._client.post(
|
|
17179
|
+
return this._client.post(path3`/v1/sessions/${sessionID}/events?beta=true`, {
|
|
17180
17180
|
body: body2,
|
|
17181
17181
|
...options,
|
|
17182
17182
|
headers: buildHeaders([
|
|
@@ -17198,7 +17198,7 @@ var init_events = __esm({
|
|
|
17198
17198
|
*/
|
|
17199
17199
|
stream(sessionID, params = {}, options) {
|
|
17200
17200
|
const { betas } = params ?? {};
|
|
17201
|
-
return this._client.get(
|
|
17201
|
+
return this._client.get(path3`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
17202
17202
|
...options,
|
|
17203
17203
|
headers: buildHeaders([
|
|
17204
17204
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17259,7 +17259,7 @@ var init_resources = __esm({
|
|
|
17259
17259
|
*/
|
|
17260
17260
|
retrieve(resourceID, params, options) {
|
|
17261
17261
|
const { session_id, betas } = params;
|
|
17262
|
-
return this._client.get(
|
|
17262
|
+
return this._client.get(path3`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
17263
17263
|
...options,
|
|
17264
17264
|
headers: buildHeaders([
|
|
17265
17265
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17284,7 +17284,7 @@ var init_resources = __esm({
|
|
|
17284
17284
|
*/
|
|
17285
17285
|
update(resourceID, params, options) {
|
|
17286
17286
|
const { session_id, betas, ...body2 } = params;
|
|
17287
|
-
return this._client.post(
|
|
17287
|
+
return this._client.post(path3`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
17288
17288
|
body: body2,
|
|
17289
17289
|
...options,
|
|
17290
17290
|
headers: buildHeaders([
|
|
@@ -17308,7 +17308,7 @@ var init_resources = __esm({
|
|
|
17308
17308
|
*/
|
|
17309
17309
|
list(sessionID, params = {}, options) {
|
|
17310
17310
|
const { betas, ...query } = params ?? {};
|
|
17311
|
-
return this._client.getAPIList(
|
|
17311
|
+
return this._client.getAPIList(path3`/v1/sessions/${sessionID}/resources?beta=true`, PageCursor, {
|
|
17312
17312
|
query,
|
|
17313
17313
|
...options,
|
|
17314
17314
|
headers: buildHeaders([
|
|
@@ -17331,7 +17331,7 @@ var init_resources = __esm({
|
|
|
17331
17331
|
*/
|
|
17332
17332
|
delete(resourceID, params, options) {
|
|
17333
17333
|
const { session_id, betas } = params;
|
|
17334
|
-
return this._client.delete(
|
|
17334
|
+
return this._client.delete(path3`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
17335
17335
|
...options,
|
|
17336
17336
|
headers: buildHeaders([
|
|
17337
17337
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17356,7 +17356,7 @@ var init_resources = __esm({
|
|
|
17356
17356
|
*/
|
|
17357
17357
|
add(sessionID, params, options) {
|
|
17358
17358
|
const { betas, ...body2 } = params;
|
|
17359
|
-
return this._client.post(
|
|
17359
|
+
return this._client.post(path3`/v1/sessions/${sessionID}/resources?beta=true`, {
|
|
17360
17360
|
body: body2,
|
|
17361
17361
|
...options,
|
|
17362
17362
|
headers: buildHeaders([
|
|
@@ -17396,7 +17396,7 @@ var init_events2 = __esm({
|
|
|
17396
17396
|
*/
|
|
17397
17397
|
list(threadID, params, options) {
|
|
17398
17398
|
const { session_id, betas, ...query } = params;
|
|
17399
|
-
return this._client.getAPIList(
|
|
17399
|
+
return this._client.getAPIList(path3`/v1/sessions/${session_id}/threads/${threadID}/events?beta=true`, PageCursor, {
|
|
17400
17400
|
query,
|
|
17401
17401
|
...options,
|
|
17402
17402
|
headers: buildHeaders([
|
|
@@ -17419,7 +17419,7 @@ var init_events2 = __esm({
|
|
|
17419
17419
|
*/
|
|
17420
17420
|
stream(threadID, params, options) {
|
|
17421
17421
|
const { session_id, betas } = params;
|
|
17422
|
-
return this._client.get(
|
|
17422
|
+
return this._client.get(path3`/v1/sessions/${session_id}/threads/${threadID}/stream?beta=true`, {
|
|
17423
17423
|
...options,
|
|
17424
17424
|
headers: buildHeaders([
|
|
17425
17425
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17463,7 +17463,7 @@ var init_threads = __esm({
|
|
|
17463
17463
|
*/
|
|
17464
17464
|
retrieve(threadID, params, options) {
|
|
17465
17465
|
const { session_id, betas } = params;
|
|
17466
|
-
return this._client.get(
|
|
17466
|
+
return this._client.get(path3`/v1/sessions/${session_id}/threads/${threadID}?beta=true`, {
|
|
17467
17467
|
...options,
|
|
17468
17468
|
headers: buildHeaders([
|
|
17469
17469
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17486,7 +17486,7 @@ var init_threads = __esm({
|
|
|
17486
17486
|
*/
|
|
17487
17487
|
list(sessionID, params = {}, options) {
|
|
17488
17488
|
const { betas, ...query } = params ?? {};
|
|
17489
|
-
return this._client.getAPIList(
|
|
17489
|
+
return this._client.getAPIList(path3`/v1/sessions/${sessionID}/threads?beta=true`, PageCursor, {
|
|
17490
17490
|
query,
|
|
17491
17491
|
...options,
|
|
17492
17492
|
headers: buildHeaders([
|
|
@@ -17509,7 +17509,7 @@ var init_threads = __esm({
|
|
|
17509
17509
|
*/
|
|
17510
17510
|
archive(threadID, params, options) {
|
|
17511
17511
|
const { session_id, betas } = params;
|
|
17512
|
-
return this._client.post(
|
|
17512
|
+
return this._client.post(path3`/v1/sessions/${session_id}/threads/${threadID}/archive?beta=true`, {
|
|
17513
17513
|
...options,
|
|
17514
17514
|
headers: buildHeaders([
|
|
17515
17515
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17581,7 +17581,7 @@ var init_sessions = __esm({
|
|
|
17581
17581
|
*/
|
|
17582
17582
|
retrieve(sessionID, params = {}, options) {
|
|
17583
17583
|
const { betas } = params ?? {};
|
|
17584
|
-
return this._client.get(
|
|
17584
|
+
return this._client.get(path3`/v1/sessions/${sessionID}?beta=true`, {
|
|
17585
17585
|
...options,
|
|
17586
17586
|
headers: buildHeaders([
|
|
17587
17587
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17602,7 +17602,7 @@ var init_sessions = __esm({
|
|
|
17602
17602
|
*/
|
|
17603
17603
|
update(sessionID, params, options) {
|
|
17604
17604
|
const { betas, ...body2 } = params;
|
|
17605
|
-
return this._client.post(
|
|
17605
|
+
return this._client.post(path3`/v1/sessions/${sessionID}?beta=true`, {
|
|
17606
17606
|
body: body2,
|
|
17607
17607
|
...options,
|
|
17608
17608
|
headers: buildHeaders([
|
|
@@ -17646,7 +17646,7 @@ var init_sessions = __esm({
|
|
|
17646
17646
|
*/
|
|
17647
17647
|
delete(sessionID, params = {}, options) {
|
|
17648
17648
|
const { betas } = params ?? {};
|
|
17649
|
-
return this._client.delete(
|
|
17649
|
+
return this._client.delete(path3`/v1/sessions/${sessionID}?beta=true`, {
|
|
17650
17650
|
...options,
|
|
17651
17651
|
headers: buildHeaders([
|
|
17652
17652
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17667,7 +17667,7 @@ var init_sessions = __esm({
|
|
|
17667
17667
|
*/
|
|
17668
17668
|
archive(sessionID, params = {}, options) {
|
|
17669
17669
|
const { betas } = params ?? {};
|
|
17670
|
-
return this._client.post(
|
|
17670
|
+
return this._client.post(path3`/v1/sessions/${sessionID}/archive?beta=true`, {
|
|
17671
17671
|
...options,
|
|
17672
17672
|
headers: buildHeaders([
|
|
17673
17673
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17706,7 +17706,7 @@ var init_versions2 = __esm({
|
|
|
17706
17706
|
*/
|
|
17707
17707
|
create(skillID, params = {}, options) {
|
|
17708
17708
|
const { betas, ...body2 } = params ?? {};
|
|
17709
|
-
return this._client.post(
|
|
17709
|
+
return this._client.post(path3`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions({
|
|
17710
17710
|
body: body2,
|
|
17711
17711
|
...options,
|
|
17712
17712
|
headers: buildHeaders([
|
|
@@ -17728,7 +17728,7 @@ var init_versions2 = __esm({
|
|
|
17728
17728
|
*/
|
|
17729
17729
|
retrieve(version2, params, options) {
|
|
17730
17730
|
const { skill_id, betas } = params;
|
|
17731
|
-
return this._client.get(
|
|
17731
|
+
return this._client.get(path3`/v1/skills/${skill_id}/versions/${version2}?beta=true`, {
|
|
17732
17732
|
...options,
|
|
17733
17733
|
headers: buildHeaders([
|
|
17734
17734
|
{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
|
|
@@ -17751,7 +17751,7 @@ var init_versions2 = __esm({
|
|
|
17751
17751
|
*/
|
|
17752
17752
|
list(skillID, params = {}, options) {
|
|
17753
17753
|
const { betas, ...query } = params ?? {};
|
|
17754
|
-
return this._client.getAPIList(
|
|
17754
|
+
return this._client.getAPIList(path3`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
|
|
17755
17755
|
query,
|
|
17756
17756
|
...options,
|
|
17757
17757
|
headers: buildHeaders([
|
|
@@ -17773,7 +17773,7 @@ var init_versions2 = __esm({
|
|
|
17773
17773
|
*/
|
|
17774
17774
|
delete(version2, params, options) {
|
|
17775
17775
|
const { skill_id, betas } = params;
|
|
17776
|
-
return this._client.delete(
|
|
17776
|
+
return this._client.delete(path3`/v1/skills/${skill_id}/versions/${version2}?beta=true`, {
|
|
17777
17777
|
...options,
|
|
17778
17778
|
headers: buildHeaders([
|
|
17779
17779
|
{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
|
|
@@ -17797,7 +17797,7 @@ var init_versions2 = __esm({
|
|
|
17797
17797
|
*/
|
|
17798
17798
|
download(version2, params, options) {
|
|
17799
17799
|
const { skill_id, betas } = params;
|
|
17800
|
-
return this._client.get(
|
|
17800
|
+
return this._client.get(path3`/v1/skills/${skill_id}/versions/${version2}/content?beta=true`, {
|
|
17801
17801
|
...options,
|
|
17802
17802
|
headers: buildHeaders([
|
|
17803
17803
|
{
|
|
@@ -17860,7 +17860,7 @@ var init_skills2 = __esm({
|
|
|
17860
17860
|
*/
|
|
17861
17861
|
retrieve(skillID, params = {}, options) {
|
|
17862
17862
|
const { betas } = params ?? {};
|
|
17863
|
-
return this._client.get(
|
|
17863
|
+
return this._client.get(path3`/v1/skills/${skillID}?beta=true`, {
|
|
17864
17864
|
...options,
|
|
17865
17865
|
headers: buildHeaders([
|
|
17866
17866
|
{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
|
|
@@ -17900,7 +17900,7 @@ var init_skills2 = __esm({
|
|
|
17900
17900
|
*/
|
|
17901
17901
|
delete(skillID, params = {}, options) {
|
|
17902
17902
|
const { betas } = params ?? {};
|
|
17903
|
-
return this._client.delete(
|
|
17903
|
+
return this._client.delete(path3`/v1/skills/${skillID}?beta=true`, {
|
|
17904
17904
|
...options,
|
|
17905
17905
|
headers: buildHeaders([
|
|
17906
17906
|
{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
|
|
@@ -17945,7 +17945,7 @@ var init_credentials2 = __esm({
|
|
|
17945
17945
|
*/
|
|
17946
17946
|
create(vaultID, params, options) {
|
|
17947
17947
|
const { betas, ...body2 } = params;
|
|
17948
|
-
return this._client.post(
|
|
17948
|
+
return this._client.post(path3`/v1/vaults/${vaultID}/credentials?beta=true`, {
|
|
17949
17949
|
body: body2,
|
|
17950
17950
|
...options,
|
|
17951
17951
|
headers: buildHeaders([
|
|
@@ -17968,7 +17968,7 @@ var init_credentials2 = __esm({
|
|
|
17968
17968
|
*/
|
|
17969
17969
|
retrieve(credentialID, params, options) {
|
|
17970
17970
|
const { vault_id, betas } = params;
|
|
17971
|
-
return this._client.get(
|
|
17971
|
+
return this._client.get(path3`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
17972
17972
|
...options,
|
|
17973
17973
|
headers: buildHeaders([
|
|
17974
17974
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -17990,7 +17990,7 @@ var init_credentials2 = __esm({
|
|
|
17990
17990
|
*/
|
|
17991
17991
|
update(credentialID, params, options) {
|
|
17992
17992
|
const { vault_id, betas, ...body2 } = params;
|
|
17993
|
-
return this._client.post(
|
|
17993
|
+
return this._client.post(path3`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
17994
17994
|
body: body2,
|
|
17995
17995
|
...options,
|
|
17996
17996
|
headers: buildHeaders([
|
|
@@ -18014,7 +18014,7 @@ var init_credentials2 = __esm({
|
|
|
18014
18014
|
*/
|
|
18015
18015
|
list(vaultID, params = {}, options) {
|
|
18016
18016
|
const { betas, ...query } = params ?? {};
|
|
18017
|
-
return this._client.getAPIList(
|
|
18017
|
+
return this._client.getAPIList(path3`/v1/vaults/${vaultID}/credentials?beta=true`, PageCursor, {
|
|
18018
18018
|
query,
|
|
18019
18019
|
...options,
|
|
18020
18020
|
headers: buildHeaders([
|
|
@@ -18037,7 +18037,7 @@ var init_credentials2 = __esm({
|
|
|
18037
18037
|
*/
|
|
18038
18038
|
delete(credentialID, params, options) {
|
|
18039
18039
|
const { vault_id, betas } = params;
|
|
18040
|
-
return this._client.delete(
|
|
18040
|
+
return this._client.delete(path3`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
18041
18041
|
...options,
|
|
18042
18042
|
headers: buildHeaders([
|
|
18043
18043
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -18059,7 +18059,7 @@ var init_credentials2 = __esm({
|
|
|
18059
18059
|
*/
|
|
18060
18060
|
archive(credentialID, params, options) {
|
|
18061
18061
|
const { vault_id, betas } = params;
|
|
18062
|
-
return this._client.post(
|
|
18062
|
+
return this._client.post(path3`/v1/vaults/${vault_id}/credentials/${credentialID}/archive?beta=true`, {
|
|
18063
18063
|
...options,
|
|
18064
18064
|
headers: buildHeaders([
|
|
18065
18065
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -18081,7 +18081,7 @@ var init_credentials2 = __esm({
|
|
|
18081
18081
|
*/
|
|
18082
18082
|
mcpOAuthValidate(credentialID, params, options) {
|
|
18083
18083
|
const { vault_id, betas } = params;
|
|
18084
|
-
return this._client.post(
|
|
18084
|
+
return this._client.post(path3`/v1/vaults/${vault_id}/credentials/${credentialID}/mcp_oauth_validate?beta=true`, {
|
|
18085
18085
|
...options,
|
|
18086
18086
|
headers: buildHeaders([
|
|
18087
18087
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -18145,7 +18145,7 @@ var init_vaults = __esm({
|
|
|
18145
18145
|
*/
|
|
18146
18146
|
retrieve(vaultID, params = {}, options) {
|
|
18147
18147
|
const { betas } = params ?? {};
|
|
18148
|
-
return this._client.get(
|
|
18148
|
+
return this._client.get(path3`/v1/vaults/${vaultID}?beta=true`, {
|
|
18149
18149
|
...options,
|
|
18150
18150
|
headers: buildHeaders([
|
|
18151
18151
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -18166,7 +18166,7 @@ var init_vaults = __esm({
|
|
|
18166
18166
|
*/
|
|
18167
18167
|
update(vaultID, params, options) {
|
|
18168
18168
|
const { betas, ...body2 } = params;
|
|
18169
|
-
return this._client.post(
|
|
18169
|
+
return this._client.post(path3`/v1/vaults/${vaultID}?beta=true`, {
|
|
18170
18170
|
body: body2,
|
|
18171
18171
|
...options,
|
|
18172
18172
|
headers: buildHeaders([
|
|
@@ -18210,7 +18210,7 @@ var init_vaults = __esm({
|
|
|
18210
18210
|
*/
|
|
18211
18211
|
delete(vaultID, params = {}, options) {
|
|
18212
18212
|
const { betas } = params ?? {};
|
|
18213
|
-
return this._client.delete(
|
|
18213
|
+
return this._client.delete(path3`/v1/vaults/${vaultID}?beta=true`, {
|
|
18214
18214
|
...options,
|
|
18215
18215
|
headers: buildHeaders([
|
|
18216
18216
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -18231,7 +18231,7 @@ var init_vaults = __esm({
|
|
|
18231
18231
|
*/
|
|
18232
18232
|
archive(vaultID, params = {}, options) {
|
|
18233
18233
|
const { betas } = params ?? {};
|
|
18234
|
-
return this._client.post(
|
|
18234
|
+
return this._client.post(path3`/v1/vaults/${vaultID}/archive?beta=true`, {
|
|
18235
18235
|
...options,
|
|
18236
18236
|
headers: buildHeaders([
|
|
18237
18237
|
{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() },
|
|
@@ -19047,7 +19047,7 @@ var init_batches2 = __esm({
|
|
|
19047
19047
|
* ```
|
|
19048
19048
|
*/
|
|
19049
19049
|
retrieve(messageBatchID, options) {
|
|
19050
|
-
return this._client.get(
|
|
19050
|
+
return this._client.get(path3`/v1/messages/batches/${messageBatchID}`, options);
|
|
19051
19051
|
}
|
|
19052
19052
|
/**
|
|
19053
19053
|
* List all Message Batches within a Workspace. Most recently created batches are
|
|
@@ -19083,7 +19083,7 @@ var init_batches2 = __esm({
|
|
|
19083
19083
|
* ```
|
|
19084
19084
|
*/
|
|
19085
19085
|
delete(messageBatchID, options) {
|
|
19086
|
-
return this._client.delete(
|
|
19086
|
+
return this._client.delete(path3`/v1/messages/batches/${messageBatchID}`, options);
|
|
19087
19087
|
}
|
|
19088
19088
|
/**
|
|
19089
19089
|
* Batches may be canceled any time before processing ends. Once cancellation is
|
|
@@ -19107,7 +19107,7 @@ var init_batches2 = __esm({
|
|
|
19107
19107
|
* ```
|
|
19108
19108
|
*/
|
|
19109
19109
|
cancel(messageBatchID, options) {
|
|
19110
|
-
return this._client.post(
|
|
19110
|
+
return this._client.post(path3`/v1/messages/batches/${messageBatchID}/cancel`, options);
|
|
19111
19111
|
}
|
|
19112
19112
|
/**
|
|
19113
19113
|
* Streams the results of a Message Batch as a `.jsonl` file.
|
|
@@ -19295,7 +19295,7 @@ var init_models2 = __esm({
|
|
|
19295
19295
|
*/
|
|
19296
19296
|
retrieve(modelID, params = {}, options) {
|
|
19297
19297
|
const { betas } = params ?? {};
|
|
19298
|
-
return this._client.get(
|
|
19298
|
+
return this._client.get(path3`/v1/models/${modelID}`, {
|
|
19299
19299
|
...options,
|
|
19300
19300
|
headers: buildHeaders([
|
|
19301
19301
|
{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
|
|
@@ -19675,9 +19675,9 @@ var init_client = __esm({
|
|
|
19675
19675
|
makeStatusError(status, error, message, headers) {
|
|
19676
19676
|
return APIError.generate(status, error, message, headers);
|
|
19677
19677
|
}
|
|
19678
|
-
buildURL(
|
|
19678
|
+
buildURL(path7, query, defaultBaseURL) {
|
|
19679
19679
|
const baseURL = !__classPrivateFieldGet(this, _BaseAnthropic_instances, "m", _BaseAnthropic_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
19680
|
-
const url = isAbsoluteURL(
|
|
19680
|
+
const url = isAbsoluteURL(path7) ? new URL(path7) : new URL(baseURL + (baseURL.endsWith("/") && path7.startsWith("/") ? path7.slice(1) : path7));
|
|
19681
19681
|
const defaultQuery = this.defaultQuery();
|
|
19682
19682
|
const pathQuery = Object.fromEntries(url.searchParams);
|
|
19683
19683
|
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
@@ -19749,24 +19749,24 @@ var init_client = __esm({
|
|
|
19749
19749
|
backendMiddleware() {
|
|
19750
19750
|
return [];
|
|
19751
19751
|
}
|
|
19752
|
-
get(
|
|
19753
|
-
return this.methodRequest("get",
|
|
19752
|
+
get(path7, opts) {
|
|
19753
|
+
return this.methodRequest("get", path7, opts);
|
|
19754
19754
|
}
|
|
19755
|
-
post(
|
|
19756
|
-
return this.methodRequest("post",
|
|
19755
|
+
post(path7, opts) {
|
|
19756
|
+
return this.methodRequest("post", path7, opts);
|
|
19757
19757
|
}
|
|
19758
|
-
patch(
|
|
19759
|
-
return this.methodRequest("patch",
|
|
19758
|
+
patch(path7, opts) {
|
|
19759
|
+
return this.methodRequest("patch", path7, opts);
|
|
19760
19760
|
}
|
|
19761
|
-
put(
|
|
19762
|
-
return this.methodRequest("put",
|
|
19761
|
+
put(path7, opts) {
|
|
19762
|
+
return this.methodRequest("put", path7, opts);
|
|
19763
19763
|
}
|
|
19764
|
-
delete(
|
|
19765
|
-
return this.methodRequest("delete",
|
|
19764
|
+
delete(path7, opts) {
|
|
19765
|
+
return this.methodRequest("delete", path7, opts);
|
|
19766
19766
|
}
|
|
19767
|
-
methodRequest(method,
|
|
19767
|
+
methodRequest(method, path7, opts) {
|
|
19768
19768
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
19769
|
-
return { method, path:
|
|
19769
|
+
return { method, path: path7, ...opts2 };
|
|
19770
19770
|
}));
|
|
19771
19771
|
}
|
|
19772
19772
|
request(options, remainingRetries = null) {
|
|
@@ -19880,8 +19880,8 @@ var init_client = __esm({
|
|
|
19880
19880
|
}));
|
|
19881
19881
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
19882
19882
|
}
|
|
19883
|
-
getAPIList(
|
|
19884
|
-
return this.requestAPIList(Page2, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
19883
|
+
getAPIList(path7, Page2, opts) {
|
|
19884
|
+
return this.requestAPIList(Page2, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path7, ...opts2 })) : { method: "get", path: path7, ...opts });
|
|
19885
19885
|
}
|
|
19886
19886
|
requestAPIList(Page2, options) {
|
|
19887
19887
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -19997,14 +19997,14 @@ var init_client = __esm({
|
|
|
19997
19997
|
}
|
|
19998
19998
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
19999
19999
|
const options = { ...inputOptions };
|
|
20000
|
-
const { method, path:
|
|
20000
|
+
const { method, path: path7, query, defaultBaseURL } = options;
|
|
20001
20001
|
if (this._authState.resolution) {
|
|
20002
20002
|
await this._authState.resolution;
|
|
20003
20003
|
}
|
|
20004
20004
|
if (!this._baseURLIsExplicit && this._authState.baseURL && this.baseURL !== this._authState.baseURL) {
|
|
20005
20005
|
this.baseURL = this._authState.baseURL;
|
|
20006
20006
|
}
|
|
20007
|
-
const url = this.buildURL(
|
|
20007
|
+
const url = this.buildURL(path7, query, defaultBaseURL);
|
|
20008
20008
|
if ("timeout" in options)
|
|
20009
20009
|
validatePositiveInteger("timeout", options.timeout);
|
|
20010
20010
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -20192,31 +20192,6 @@ init_esm_shims();
|
|
|
20192
20192
|
// ../verify-contract/src/unit-verdict/unit-verdict.ts
|
|
20193
20193
|
init_esm_shims();
|
|
20194
20194
|
|
|
20195
|
-
// ../verify-contract/src/unit-verdict/producer-grade.ts
|
|
20196
|
-
init_esm_shims();
|
|
20197
|
-
var PRODUCER_GRADES = ["hosted-sandbox", "orchestrated-local", "ambient-plugin", "foreign-ingest"];
|
|
20198
|
-
|
|
20199
|
-
// ../verify-contract/src/unit-verdict/semantics-version.ts
|
|
20200
|
-
init_esm_shims();
|
|
20201
|
-
|
|
20202
|
-
// ../verify-contract/src/mutation/outcome.ts
|
|
20203
|
-
init_esm_shims();
|
|
20204
|
-
|
|
20205
|
-
// ../verify-contract/src/tier/tiered.ts
|
|
20206
|
-
init_esm_shims();
|
|
20207
|
-
|
|
20208
|
-
// ../verify-contract/src/tier/compose-tier.ts
|
|
20209
|
-
init_esm_shims();
|
|
20210
|
-
|
|
20211
|
-
// ../verify-contract/src/tier/order.ts
|
|
20212
|
-
init_esm_shims();
|
|
20213
|
-
|
|
20214
|
-
// ../verify-contract/src/tier/evidence-tier.ts
|
|
20215
|
-
init_esm_shims();
|
|
20216
|
-
|
|
20217
|
-
// ../verify-contract/src/unit-verdict/codec.ts
|
|
20218
|
-
init_esm_shims();
|
|
20219
|
-
|
|
20220
20195
|
// ../execution-contract/src/index.ts
|
|
20221
20196
|
init_esm_shims();
|
|
20222
20197
|
|
|
@@ -20230,6 +20205,9 @@ init_esm_shims();
|
|
|
20230
20205
|
init_esm_shims();
|
|
20231
20206
|
var ACTIONS = ["test", "build", "typecheck", "lint", "mutate", "bench", "exec-generated", "exec"];
|
|
20232
20207
|
|
|
20208
|
+
// ../execution-contract/src/execution-class.ts
|
|
20209
|
+
init_esm_shims();
|
|
20210
|
+
|
|
20233
20211
|
// ../execution-contract/src/workload/root-script.ts
|
|
20234
20212
|
init_esm_shims();
|
|
20235
20213
|
var ROOT_SCRIPTS = [
|
|
@@ -20292,6 +20270,7 @@ init_esm_shims();
|
|
|
20292
20270
|
|
|
20293
20271
|
// ../execution-contract/src/report/execution-report.ts
|
|
20294
20272
|
init_esm_shims();
|
|
20273
|
+
var PRODUCER_GRADES = ["hosted-sandbox", "orchestrated-local", "ambient-plugin", "foreign-ingest", "customer-runner"];
|
|
20295
20274
|
|
|
20296
20275
|
// ../execution-contract/src/report/executed-set.ts
|
|
20297
20276
|
init_esm_shims();
|
|
@@ -20320,6 +20299,9 @@ init_esm_shims();
|
|
|
20320
20299
|
// ../execution-contract/src/unit/build-report.ts
|
|
20321
20300
|
init_esm_shims();
|
|
20322
20301
|
|
|
20302
|
+
// ../execution-contract/src/dispatchable-packages.ts
|
|
20303
|
+
init_esm_shims();
|
|
20304
|
+
|
|
20323
20305
|
// ../execution-contract/src/codec/encode.ts
|
|
20324
20306
|
init_esm_shims();
|
|
20325
20307
|
|
|
@@ -20378,14 +20360,14 @@ init_esm_shims();
|
|
|
20378
20360
|
|
|
20379
20361
|
// ../resource-fact-contract/src/admission/venue-registry.ts
|
|
20380
20362
|
init_esm_shims();
|
|
20381
|
-
function witnessPath(
|
|
20382
|
-
if (
|
|
20383
|
-
throw new RangeError(`venue '${
|
|
20363
|
+
function witnessPath(path7) {
|
|
20364
|
+
if (path7.meter.trim() === "") {
|
|
20365
|
+
throw new RangeError(`venue '${path7.venue}' names no meter: a venue with no witness path cannot be registered`);
|
|
20384
20366
|
}
|
|
20385
|
-
if (
|
|
20386
|
-
throw new RangeError(`venue '${
|
|
20367
|
+
if (path7.settledBy.trim() === "") {
|
|
20368
|
+
throw new RangeError(`venue '${path7.venue}' names no settler: a venue with no witness path cannot be registered`);
|
|
20387
20369
|
}
|
|
20388
|
-
return
|
|
20370
|
+
return path7;
|
|
20389
20371
|
}
|
|
20390
20372
|
function closedRegistry(entries) {
|
|
20391
20373
|
for (const venue of VENUES) {
|
|
@@ -20590,6 +20572,33 @@ init_esm_shims();
|
|
|
20590
20572
|
import { isDeepStrictEqual } from "util";
|
|
20591
20573
|
var WORKLOAD_TYPES = [...ACTIONS, ...ROOT_SCRIPTS];
|
|
20592
20574
|
|
|
20575
|
+
// ../execution-contract/src/runner/lease.ts
|
|
20576
|
+
init_esm_shims();
|
|
20577
|
+
|
|
20578
|
+
// ../execution-contract/src/runner/verbs.ts
|
|
20579
|
+
init_esm_shims();
|
|
20580
|
+
|
|
20581
|
+
// ../verify-contract/src/unit-verdict/semantics-version.ts
|
|
20582
|
+
init_esm_shims();
|
|
20583
|
+
|
|
20584
|
+
// ../verify-contract/src/mutation/outcome.ts
|
|
20585
|
+
init_esm_shims();
|
|
20586
|
+
|
|
20587
|
+
// ../verify-contract/src/tier/tiered.ts
|
|
20588
|
+
init_esm_shims();
|
|
20589
|
+
|
|
20590
|
+
// ../verify-contract/src/tier/compose-tier.ts
|
|
20591
|
+
init_esm_shims();
|
|
20592
|
+
|
|
20593
|
+
// ../verify-contract/src/tier/order.ts
|
|
20594
|
+
init_esm_shims();
|
|
20595
|
+
|
|
20596
|
+
// ../verify-contract/src/tier/evidence-tier.ts
|
|
20597
|
+
init_esm_shims();
|
|
20598
|
+
|
|
20599
|
+
// ../verify-contract/src/unit-verdict/codec.ts
|
|
20600
|
+
init_esm_shims();
|
|
20601
|
+
|
|
20593
20602
|
// ../verify-contract/src/codec/encode.ts
|
|
20594
20603
|
init_esm_shims();
|
|
20595
20604
|
|
|
@@ -20899,7 +20908,7 @@ init_esm_shims();
|
|
|
20899
20908
|
|
|
20900
20909
|
// ../../engine/floor/slice/src/stitch-id.ts
|
|
20901
20910
|
init_esm_shims();
|
|
20902
|
-
import { createHash as
|
|
20911
|
+
import { createHash as createHash20 } from "crypto";
|
|
20903
20912
|
|
|
20904
20913
|
// ../../engine/floor/resolve/src/index.ts
|
|
20905
20914
|
init_esm_shims();
|
|
@@ -20949,20 +20958,42 @@ async function fetchBounded(items, read2, concurrency = BLOB_FETCH_CONCURRENCY)
|
|
|
20949
20958
|
function slotPool() {
|
|
20950
20959
|
let slotsInUse = 0;
|
|
20951
20960
|
const slotWaiters = [];
|
|
20952
|
-
|
|
20953
|
-
|
|
20954
|
-
|
|
20961
|
+
const withSlot = async (fn) => {
|
|
20962
|
+
return withFetchSlots2(1, fn);
|
|
20963
|
+
};
|
|
20964
|
+
const withFetchSlots2 = async (c, fn) => {
|
|
20965
|
+
const want = Math.min(c, BLOB_FETCH_CONCURRENCY);
|
|
20966
|
+
if (slotWaiters.length === 0 && slotsInUse + want <= BLOB_FETCH_CONCURRENCY) {
|
|
20967
|
+
slotsInUse += want;
|
|
20968
|
+
} else {
|
|
20969
|
+
await new Promise((resolve7) => {
|
|
20970
|
+
slotWaiters.push({ resolve: resolve7, count: want });
|
|
20971
|
+
});
|
|
20972
|
+
}
|
|
20955
20973
|
try {
|
|
20956
20974
|
return await fn();
|
|
20957
20975
|
} finally {
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
else slotsInUse -= 1;
|
|
20976
|
+
slotsInUse -= want;
|
|
20977
|
+
grantWaiters();
|
|
20961
20978
|
}
|
|
20962
20979
|
};
|
|
20980
|
+
function grantWaiters() {
|
|
20981
|
+
while (slotWaiters.length > 0) {
|
|
20982
|
+
const head = slotWaiters[0];
|
|
20983
|
+
if (slotsInUse + head.count <= BLOB_FETCH_CONCURRENCY) {
|
|
20984
|
+
slotsInUse += head.count;
|
|
20985
|
+
slotWaiters.shift();
|
|
20986
|
+
head.resolve();
|
|
20987
|
+
} else {
|
|
20988
|
+
break;
|
|
20989
|
+
}
|
|
20990
|
+
}
|
|
20991
|
+
}
|
|
20992
|
+
return { withSlot, withFetchSlots: withFetchSlots2 };
|
|
20963
20993
|
}
|
|
20964
|
-
var withFetchSlot = slotPool();
|
|
20965
|
-
var
|
|
20994
|
+
var { withSlot: withFetchSlot, withFetchSlots } = slotPool();
|
|
20995
|
+
var sealPool = slotPool();
|
|
20996
|
+
var withSealWriteSlot = sealPool.withSlot;
|
|
20966
20997
|
var SEAL_WAVE_CONCURRENCY = 2 * BLOB_FETCH_CONCURRENCY;
|
|
20967
20998
|
|
|
20968
20999
|
// ../../engine/floor/resolve/src/base/content-addressed-json.ts
|
|
@@ -20980,6 +21011,31 @@ function countAsk(meter, prefix, label) {
|
|
|
20980
21011
|
meter.asksByLabel.set(key, (meter.asksByLabel.get(key) ?? 0) + 1);
|
|
20981
21012
|
}
|
|
20982
21013
|
}
|
|
21014
|
+
async function putRawBody(prefix, hash, body2, cache, meter, label, writeBuf, canonicalBytes) {
|
|
21015
|
+
countAsk(meter, prefix, label);
|
|
21016
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21017
|
+
if (writeBuf !== void 0) {
|
|
21018
|
+
writeBuf.entries.push({ key, body: body2 });
|
|
21019
|
+
writeBuf.bytes += body2.byteLength;
|
|
21020
|
+
} else {
|
|
21021
|
+
await cache.put(key, body2);
|
|
21022
|
+
}
|
|
21023
|
+
if (meter !== void 0) {
|
|
21024
|
+
meter.bytesWritten += body2.byteLength;
|
|
21025
|
+
meter.putCount += 1;
|
|
21026
|
+
meter.bytesByPrefix.set(prefix, (meter.bytesByPrefix.get(prefix) ?? 0) + body2.byteLength);
|
|
21027
|
+
meter.putsByPrefix.set(prefix, (meter.putsByPrefix.get(prefix) ?? 0) + 1);
|
|
21028
|
+
if (label !== void 0) {
|
|
21029
|
+
const lk = labelKey(prefix, label);
|
|
21030
|
+
meter.bytesByLabel.set(lk, (meter.bytesByLabel.get(lk) ?? 0) + body2.byteLength);
|
|
21031
|
+
meter.putsByLabel.set(lk, (meter.putsByLabel.get(lk) ?? 0) + 1);
|
|
21032
|
+
}
|
|
21033
|
+
}
|
|
21034
|
+
if (writeBuf !== void 0 && (writeBuf.entries.length >= SEAL_WRITE_FLUSH_ENTRIES || writeBuf.bytes >= SEAL_WRITE_FLUSH_BYTES)) {
|
|
21035
|
+
await drain(writeBuf);
|
|
21036
|
+
}
|
|
21037
|
+
return { hash, bytesWritten: body2.byteLength, canonicalBytes: canonicalBytes ?? body2.byteLength };
|
|
21038
|
+
}
|
|
20983
21039
|
function contentAddressedKey(prefix, hash) {
|
|
20984
21040
|
return `${prefix}/${hash}.json.gz`;
|
|
20985
21041
|
}
|
|
@@ -21016,44 +21072,66 @@ async function putCanonicalIfAbsentCoalesced(prefix, addressed, cache, coalescer
|
|
|
21016
21072
|
coalescer.inFlight.delete(key);
|
|
21017
21073
|
}
|
|
21018
21074
|
}
|
|
21075
|
+
async function putRawBodyCoalesced(prefix, hash, body2, cache, coalescer, meter, label, writeBuf) {
|
|
21076
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21077
|
+
const inFlight = coalescer.inFlight.get(key);
|
|
21078
|
+
if (inFlight !== void 0) {
|
|
21079
|
+
countAsk(meter, prefix, label);
|
|
21080
|
+
await inFlight;
|
|
21081
|
+
return { hash, bytesWritten: 0, canonicalBytes: body2.byteLength };
|
|
21082
|
+
}
|
|
21083
|
+
const running = putRawBody(prefix, hash, body2, cache, meter, label, writeBuf, body2.byteLength);
|
|
21084
|
+
coalescer.inFlight.set(key, running);
|
|
21085
|
+
try {
|
|
21086
|
+
return await running;
|
|
21087
|
+
} finally {
|
|
21088
|
+
coalescer.inFlight.delete(key);
|
|
21089
|
+
}
|
|
21090
|
+
}
|
|
21019
21091
|
async function putCanonicalIfAbsent(prefix, addressed, cache, meter, label, writeBuf) {
|
|
21020
|
-
countAsk(meter, prefix, label);
|
|
21021
21092
|
const { canonical, hash } = addressed;
|
|
21022
21093
|
const key = contentAddressedKey(prefix, hash);
|
|
21023
21094
|
if (writeBuf === void 0 && await cache.has(key)) {
|
|
21095
|
+
countAsk(meter, prefix, label);
|
|
21024
21096
|
return { hash, bytesWritten: 0, canonicalBytes: canonical.byteLength };
|
|
21025
21097
|
}
|
|
21026
21098
|
const body2 = await gzipAsync(canonical);
|
|
21027
|
-
|
|
21028
|
-
writeBuf.entries.push({ key, body: body2 });
|
|
21029
|
-
} else {
|
|
21030
|
-
await cache.put(key, body2);
|
|
21031
|
-
}
|
|
21032
|
-
if (meter !== void 0) {
|
|
21033
|
-
meter.bytesWritten += body2.byteLength;
|
|
21034
|
-
meter.putCount += 1;
|
|
21035
|
-
meter.bytesByPrefix.set(prefix, (meter.bytesByPrefix.get(prefix) ?? 0) + body2.byteLength);
|
|
21036
|
-
meter.putsByPrefix.set(prefix, (meter.putsByPrefix.get(prefix) ?? 0) + 1);
|
|
21037
|
-
if (label !== void 0) {
|
|
21038
|
-
const lk = labelKey(prefix, label);
|
|
21039
|
-
meter.bytesByLabel.set(lk, (meter.bytesByLabel.get(lk) ?? 0) + body2.byteLength);
|
|
21040
|
-
meter.putsByLabel.set(lk, (meter.putsByLabel.get(lk) ?? 0) + 1);
|
|
21041
|
-
}
|
|
21042
|
-
}
|
|
21043
|
-
return { hash, bytesWritten: body2.byteLength, canonicalBytes: canonical.byteLength };
|
|
21099
|
+
return putRawBody(prefix, hash, body2, cache, meter, label, writeBuf, canonical.byteLength);
|
|
21044
21100
|
}
|
|
21045
|
-
|
|
21046
|
-
|
|
21101
|
+
var SEAL_WRITE_FLUSH_ENTRIES = 2048;
|
|
21102
|
+
var SEAL_WRITE_FLUSH_BYTES = 8 * 1024 * 1024;
|
|
21103
|
+
function newSealWriteBuffer(store2, sink) {
|
|
21104
|
+
const buf = { entries: [], bytes: 0, inFlight: null, store: store2, putManyCalls: 0 };
|
|
21105
|
+
if (sink !== void 0) buf.sink = sink;
|
|
21106
|
+
return buf;
|
|
21047
21107
|
}
|
|
21048
|
-
async function
|
|
21049
|
-
if (buf.
|
|
21050
|
-
|
|
21108
|
+
async function writeBatch(buf, batch) {
|
|
21109
|
+
if (buf.sink !== void 0) {
|
|
21110
|
+
for (const entry of batch) {
|
|
21111
|
+
await buf.sink.add(entry.key, entry.body);
|
|
21112
|
+
}
|
|
21113
|
+
return;
|
|
21114
|
+
}
|
|
21115
|
+
if (buf.store.putMany !== void 0) {
|
|
21051
21116
|
buf.putManyCalls += 1;
|
|
21052
|
-
await
|
|
21117
|
+
await buf.store.putMany(batch);
|
|
21053
21118
|
} else {
|
|
21054
|
-
await fetchBounded(
|
|
21119
|
+
await fetchBounded(batch, (e) => buf.store.put(e.key, e.body), SEAL_WAVE_CONCURRENCY);
|
|
21055
21120
|
}
|
|
21056
|
-
|
|
21121
|
+
}
|
|
21122
|
+
async function drain(buf) {
|
|
21123
|
+
while (buf.inFlight !== null) await buf.inFlight;
|
|
21124
|
+
if (buf.entries.length > 0) {
|
|
21125
|
+
const batch = buf.entries.splice(0);
|
|
21126
|
+
buf.bytes = 0;
|
|
21127
|
+
buf.inFlight = writeBatch(buf, batch).finally(() => {
|
|
21128
|
+
buf.inFlight = null;
|
|
21129
|
+
});
|
|
21130
|
+
await buf.inFlight;
|
|
21131
|
+
}
|
|
21132
|
+
}
|
|
21133
|
+
async function flushSealWriteBuffer(buf) {
|
|
21134
|
+
await drain(buf);
|
|
21057
21135
|
}
|
|
21058
21136
|
function canonicalJson(value) {
|
|
21059
21137
|
return Buffer.from(JSON.stringify(value), "utf8");
|
|
@@ -21061,9 +21139,6 @@ function canonicalJson(value) {
|
|
|
21061
21139
|
function canonicalJsonHash(canonical) {
|
|
21062
21140
|
return createHash5("sha256").update(canonical).digest("hex");
|
|
21063
21141
|
}
|
|
21064
|
-
async function getJson(prefix, hash, cache) {
|
|
21065
|
-
return (await getJsonSized(prefix, hash, cache)).value;
|
|
21066
|
-
}
|
|
21067
21142
|
async function getJsonSized(prefix, hash, cache) {
|
|
21068
21143
|
const key = contentAddressedKey(prefix, hash);
|
|
21069
21144
|
const blob = await cache.get(key);
|
|
@@ -21106,6 +21181,137 @@ async function getJsonSizedMany(prefix, hashes, store2) {
|
|
|
21106
21181
|
return result;
|
|
21107
21182
|
}
|
|
21108
21183
|
|
|
21184
|
+
// ../../engine/floor/resolve/src/base/persistent-map/node-format-v3.ts
|
|
21185
|
+
init_esm_shims();
|
|
21186
|
+
import { createHash as createHash6 } from "crypto";
|
|
21187
|
+
var V3_VERSION = 3;
|
|
21188
|
+
var VALUE_NONE = 0;
|
|
21189
|
+
var VALUE_INLINED = 1;
|
|
21190
|
+
var VALUE_REF = 2;
|
|
21191
|
+
var INLINE_THRESHOLD = 256;
|
|
21192
|
+
function sha256hex(data) {
|
|
21193
|
+
return createHash6("sha256").update(data).digest("hex");
|
|
21194
|
+
}
|
|
21195
|
+
function pushVarint(buf, n) {
|
|
21196
|
+
while (n > 127) {
|
|
21197
|
+
buf.push(Buffer.from([n % 128 | 128]));
|
|
21198
|
+
n = Math.floor(n / 128);
|
|
21199
|
+
}
|
|
21200
|
+
buf.push(Buffer.from([n % 128]));
|
|
21201
|
+
}
|
|
21202
|
+
function readVarint(data, off) {
|
|
21203
|
+
let result = 0;
|
|
21204
|
+
let shift = 0;
|
|
21205
|
+
let p = off;
|
|
21206
|
+
for (; ; ) {
|
|
21207
|
+
const b = data[p++] ?? 0;
|
|
21208
|
+
result += (b & 127) * 2 ** shift;
|
|
21209
|
+
if (!(b & 128)) break;
|
|
21210
|
+
shift += 7;
|
|
21211
|
+
}
|
|
21212
|
+
return [result, p];
|
|
21213
|
+
}
|
|
21214
|
+
function concat(buf) {
|
|
21215
|
+
let total = 0;
|
|
21216
|
+
for (const b of buf) total += b.length;
|
|
21217
|
+
const out2 = Buffer.allocUnsafe(total);
|
|
21218
|
+
let off = 0;
|
|
21219
|
+
for (const b of buf) {
|
|
21220
|
+
b.copy(out2, off);
|
|
21221
|
+
off += b.length;
|
|
21222
|
+
}
|
|
21223
|
+
return out2;
|
|
21224
|
+
}
|
|
21225
|
+
function encodeNode(node) {
|
|
21226
|
+
const buf = [];
|
|
21227
|
+
buf.push(Buffer.from([V3_VERSION]));
|
|
21228
|
+
if (node.hash !== null) {
|
|
21229
|
+
buf.push(Buffer.from([1]));
|
|
21230
|
+
buf.push(Buffer.from(node.hash, "hex"));
|
|
21231
|
+
} else {
|
|
21232
|
+
buf.push(Buffer.from([0]));
|
|
21233
|
+
}
|
|
21234
|
+
pushVarint(buf, node.size);
|
|
21235
|
+
if (node.value !== null && node.value.length <= INLINE_THRESHOLD) {
|
|
21236
|
+
buf.push(Buffer.from([VALUE_INLINED]));
|
|
21237
|
+
pushVarint(buf, node.value.length);
|
|
21238
|
+
buf.push(Buffer.from(node.value));
|
|
21239
|
+
} else if (node.value !== null) {
|
|
21240
|
+
const h = node.valueHash ?? sha256hex(node.value);
|
|
21241
|
+
buf.push(Buffer.from([VALUE_REF]));
|
|
21242
|
+
buf.push(Buffer.from(h, "hex"));
|
|
21243
|
+
} else if (node.valueHash !== null) {
|
|
21244
|
+
buf.push(Buffer.from([VALUE_REF]));
|
|
21245
|
+
buf.push(Buffer.from(node.valueHash, "hex"));
|
|
21246
|
+
} else {
|
|
21247
|
+
buf.push(Buffer.from([VALUE_NONE]));
|
|
21248
|
+
}
|
|
21249
|
+
pushVarint(buf, node.children.length);
|
|
21250
|
+
for (const child of node.children) {
|
|
21251
|
+
pushVarint(buf, child.label.length);
|
|
21252
|
+
for (const seg of child.label) {
|
|
21253
|
+
const segBytes = Buffer.from(new TextEncoder().encode(seg));
|
|
21254
|
+
pushVarint(buf, segBytes.length);
|
|
21255
|
+
buf.push(segBytes);
|
|
21256
|
+
}
|
|
21257
|
+
buf.push(Buffer.from(child.hash, "hex"));
|
|
21258
|
+
pushVarint(buf, child.size);
|
|
21259
|
+
}
|
|
21260
|
+
return concat(buf);
|
|
21261
|
+
}
|
|
21262
|
+
function decodeNode(encoded) {
|
|
21263
|
+
const data = encoded instanceof Uint8Array ? encoded : Buffer.from(encoded);
|
|
21264
|
+
let i = 0;
|
|
21265
|
+
if (data[i++] !== V3_VERSION)
|
|
21266
|
+
throw new Error("unsupported v3 node format version");
|
|
21267
|
+
let hash;
|
|
21268
|
+
const presence2 = data[i++];
|
|
21269
|
+
if (presence2 === 0) {
|
|
21270
|
+
hash = null;
|
|
21271
|
+
} else {
|
|
21272
|
+
hash = Buffer.from(data.subarray(i, i + 32)).toString("hex");
|
|
21273
|
+
i += 32;
|
|
21274
|
+
}
|
|
21275
|
+
const [size, si] = readVarint(data, i);
|
|
21276
|
+
i = si;
|
|
21277
|
+
let value = null;
|
|
21278
|
+
let valueHash = null;
|
|
21279
|
+
const tag = data[i++];
|
|
21280
|
+
if (tag === VALUE_INLINED) {
|
|
21281
|
+
const [len, vi] = readVarint(data, i);
|
|
21282
|
+
i = vi;
|
|
21283
|
+
value = data.subarray(i, i + len);
|
|
21284
|
+
i += len;
|
|
21285
|
+
} else if (tag === VALUE_REF) {
|
|
21286
|
+
valueHash = Buffer.from(data.subarray(i, i + 32)).toString("hex");
|
|
21287
|
+
i += 32;
|
|
21288
|
+
}
|
|
21289
|
+
const [cnt, ci] = readVarint(data, i);
|
|
21290
|
+
i = ci;
|
|
21291
|
+
const children = [];
|
|
21292
|
+
for (let c = 0; c < cnt; c++) {
|
|
21293
|
+
const [sc, sci] = readVarint(data, i);
|
|
21294
|
+
i = sci;
|
|
21295
|
+
const label = [];
|
|
21296
|
+
for (let s = 0; s < sc; s++) {
|
|
21297
|
+
const [sl, sli] = readVarint(data, i);
|
|
21298
|
+
i = sli;
|
|
21299
|
+
label.push(new TextDecoder().decode(data.subarray(i, i + sl)));
|
|
21300
|
+
i += sl;
|
|
21301
|
+
}
|
|
21302
|
+
const childHash = Buffer.from(data.subarray(i, i + 32)).toString("hex");
|
|
21303
|
+
i += 32;
|
|
21304
|
+
const [childSize2, csli] = readVarint(data, i);
|
|
21305
|
+
i = csli;
|
|
21306
|
+
children.push({ label, hash: childHash, size: childSize2 });
|
|
21307
|
+
}
|
|
21308
|
+
return { hash, size, value, valueHash, children };
|
|
21309
|
+
}
|
|
21310
|
+
|
|
21311
|
+
// ../../engine/floor/resolve/src/base/persistent-map/persistent-map.ts
|
|
21312
|
+
import { createHash as createHash7 } from "crypto";
|
|
21313
|
+
import { gunzipSync as gunzipSync2 } from "zlib";
|
|
21314
|
+
|
|
21109
21315
|
// ../../engine/floor/resolve/src/base/persistent-map/node-cache.ts
|
|
21110
21316
|
init_esm_shims();
|
|
21111
21317
|
var KNOWN_PRESENT_CAP = 1e6;
|
|
@@ -21139,6 +21345,18 @@ var NodeCache = class {
|
|
|
21139
21345
|
* sticky for the process's life — the defect {@link releaseRoundPins} exists to close. */
|
|
21140
21346
|
roundNodes = /* @__PURE__ */ new Set();
|
|
21141
21347
|
roundValues = /* @__PURE__ */ new Set();
|
|
21348
|
+
/**
|
|
21349
|
+
* Lookahead-pinned nodes and values: held from k's evolve to k+1's prefault so the
|
|
21350
|
+
* bounded cache retains what the lookahead warmed. Nodes <= the cone bound's paths'
|
|
21351
|
+
* ancestor chains across five maps (entries, conceptsByFile, edgesByFile,
|
|
21352
|
+
* edgeCountByFile, pathByConceptId). Released by {@link releaseLookaheadPins} after
|
|
21353
|
+
* k+1's own prefault, so stale warms drop and residency equals the no-lookahead case.
|
|
21354
|
+
* A 'round' put on a lookahead-pinned hash UPGRADES the pin in place: the hash moves
|
|
21355
|
+
* to the round sets, released by round release rather than lookahead release.
|
|
21356
|
+
* Not released by {@link releaseRoundPins} — that is the whole reason this kind exists.
|
|
21357
|
+
*/
|
|
21358
|
+
lookaheadNodes = /* @__PURE__ */ new Set();
|
|
21359
|
+
lookaheadValues = /* @__PURE__ */ new Set();
|
|
21142
21360
|
/** Per-store set of full CAS keys (`${prefix}/${hash}.json.gz`) known to be present in that
|
|
21143
21361
|
* store. Populated by faults (read from store) and seal writes (written to store). The seal
|
|
21144
21362
|
* checks this before issuing a store HEAD. Keyed by store identity (WeakMap), so different
|
|
@@ -21166,9 +21384,17 @@ var NodeCache = class {
|
|
|
21166
21384
|
/** `pin` marks an entry the sync `getResident` family may later read: the prefault cone and map roots. */
|
|
21167
21385
|
putNode(hash, node, pin = "unpinned") {
|
|
21168
21386
|
if (pin !== "unpinned") {
|
|
21169
|
-
if (pin === "round"
|
|
21170
|
-
this.
|
|
21171
|
-
|
|
21387
|
+
if (pin === "round") {
|
|
21388
|
+
if (this.lookaheadNodes.has(hash)) {
|
|
21389
|
+
this.lookaheadNodes.delete(hash);
|
|
21390
|
+
this.nodeRounds.at(-1)?.add(hash);
|
|
21391
|
+
this.roundNodes.add(hash);
|
|
21392
|
+
} else if (!this.nodes.has(hash)) {
|
|
21393
|
+
this.nodeRounds.at(-1)?.add(hash);
|
|
21394
|
+
this.roundNodes.add(hash);
|
|
21395
|
+
}
|
|
21396
|
+
} else if (pin === "lookahead" && !this.nodes.has(hash)) {
|
|
21397
|
+
this.lookaheadNodes.add(hash);
|
|
21172
21398
|
}
|
|
21173
21399
|
this.hotNodes.delete(hash);
|
|
21174
21400
|
this.nodes.set(hash, node);
|
|
@@ -21197,9 +21423,17 @@ var NodeCache = class {
|
|
|
21197
21423
|
putValue(hash, value, pin = "unpinned", bytes) {
|
|
21198
21424
|
if (bytes !== void 0) this.valueBytes.set(hash, bytes);
|
|
21199
21425
|
if (pin !== "unpinned") {
|
|
21200
|
-
if (pin === "round"
|
|
21201
|
-
this.
|
|
21202
|
-
|
|
21426
|
+
if (pin === "round") {
|
|
21427
|
+
if (this.lookaheadValues.has(hash)) {
|
|
21428
|
+
this.lookaheadValues.delete(hash);
|
|
21429
|
+
this.valueRounds.at(-1)?.add(hash);
|
|
21430
|
+
this.roundValues.add(hash);
|
|
21431
|
+
} else if (!this.values.has(hash)) {
|
|
21432
|
+
this.valueRounds.at(-1)?.add(hash);
|
|
21433
|
+
this.roundValues.add(hash);
|
|
21434
|
+
}
|
|
21435
|
+
} else if (pin === "lookahead" && !this.values.has(hash)) {
|
|
21436
|
+
this.lookaheadValues.add(hash);
|
|
21203
21437
|
}
|
|
21204
21438
|
if (!this.values.has(hash)) this.pinnedCharge += this.charge(hash);
|
|
21205
21439
|
this.dropHotValue(hash);
|
|
@@ -21291,6 +21525,32 @@ var NodeCache = class {
|
|
|
21291
21525
|
this.valueRounds.length = 0;
|
|
21292
21526
|
this.demote(nodes, values);
|
|
21293
21527
|
}
|
|
21528
|
+
/**
|
|
21529
|
+
* Demote every lookahead-kind pin to the unpinned LRU. Called after k+1's prefaultDelta
|
|
21530
|
+
* re-pins the cone as 'round', so stale warms (paths in both k's and k+1's deltas) drop,
|
|
21531
|
+
* and also on cancel/abort/segment-end so nothing leaks.
|
|
21532
|
+
*/
|
|
21533
|
+
releaseLookaheadPins() {
|
|
21534
|
+
for (const hash of this.lookaheadNodes) {
|
|
21535
|
+
const node = this.nodes.get(hash);
|
|
21536
|
+
if (node === void 0) continue;
|
|
21537
|
+
this.nodes.delete(hash);
|
|
21538
|
+
this.hotNodes.delete(hash);
|
|
21539
|
+
this.hotNodes.set(hash, node);
|
|
21540
|
+
}
|
|
21541
|
+
this.lookaheadNodes.clear();
|
|
21542
|
+
this.evict(this.hotNodes);
|
|
21543
|
+
for (const hash of this.lookaheadValues) {
|
|
21544
|
+
if (!this.values.has(hash)) continue;
|
|
21545
|
+
this.pinnedCharge -= this.charge(hash);
|
|
21546
|
+
const value = this.values.get(hash);
|
|
21547
|
+
this.values.delete(hash);
|
|
21548
|
+
this.dropHotValue(hash);
|
|
21549
|
+
this.addHotValue(hash, value);
|
|
21550
|
+
}
|
|
21551
|
+
this.lookaheadValues.clear();
|
|
21552
|
+
this.evictValues();
|
|
21553
|
+
}
|
|
21294
21554
|
/** Move a scope's pins to the unpinned LRU, newest last, and let the bound evict. */
|
|
21295
21555
|
demote(nodes, values) {
|
|
21296
21556
|
for (const hash of nodes) {
|
|
@@ -21335,6 +21595,8 @@ var NodeCache = class {
|
|
|
21335
21595
|
this.valueRounds.length = 0;
|
|
21336
21596
|
this.roundNodes.clear();
|
|
21337
21597
|
this.roundValues.clear();
|
|
21598
|
+
this.lookaheadNodes.clear();
|
|
21599
|
+
this.lookaheadValues.clear();
|
|
21338
21600
|
this.knownPresent = /* @__PURE__ */ new WeakMap();
|
|
21339
21601
|
}
|
|
21340
21602
|
/** Record that a CAS key exists in `store` — called after a fault reads it or a seal writes
|
|
@@ -21508,16 +21770,67 @@ var ROOT_SEGS = [];
|
|
|
21508
21770
|
function rootValueHidden(ctx, segs, slot) {
|
|
21509
21771
|
return ctx.omitRootValue === true && segs.length === 0 && slot.kind === "lazyValue";
|
|
21510
21772
|
}
|
|
21773
|
+
async function getPackBlob(prefix, hash, packs) {
|
|
21774
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21775
|
+
const buf = await packs.get(key);
|
|
21776
|
+
if (buf === null) {
|
|
21777
|
+
throw new Error(`pack-set miss: no blob for key "${key}". That is a pack-set error, not a store read.`);
|
|
21778
|
+
}
|
|
21779
|
+
const text = gunzipSync2(buf);
|
|
21780
|
+
return { value: JSON.parse(text.toString("utf8")), bytes: text.byteLength };
|
|
21781
|
+
}
|
|
21782
|
+
var V3_FORMAT_TAG = 3;
|
|
21783
|
+
function decodeNodeBytes(buf, hash, prefix) {
|
|
21784
|
+
if (buf[0] === V3_FORMAT_TAG) return deserializeV3(decodeNode(buf), hash, prefix);
|
|
21785
|
+
const text = gunzipSync2(buf);
|
|
21786
|
+
const onDisk = JSON.parse(text.toString("utf8"));
|
|
21787
|
+
return deserialize(onDisk, hash, prefix);
|
|
21788
|
+
}
|
|
21789
|
+
async function getNodeFromPack(prefix, hash, packs) {
|
|
21790
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21791
|
+
const buf = await packs.get(key);
|
|
21792
|
+
if (buf === null) {
|
|
21793
|
+
throw new Error(`pack-set miss: no blob for key "${key}". That is a pack-set error, not a store read.`);
|
|
21794
|
+
}
|
|
21795
|
+
return decodeNodeBytes(buf, hash, prefix);
|
|
21796
|
+
}
|
|
21797
|
+
function deserializeV3(v3, hash, prefix) {
|
|
21798
|
+
const n = v3.children.length;
|
|
21799
|
+
if (n === 0) {
|
|
21800
|
+
const children2 = emptyCompactChildren();
|
|
21801
|
+
if (v3.valueHash === null) return { hash, children: children2, size: v3.size };
|
|
21802
|
+
const value2 = { kind: "lazyValue", hash: v3.valueHash };
|
|
21803
|
+
return { hash, value: value2, children: children2, size: 1 };
|
|
21804
|
+
}
|
|
21805
|
+
const keys = new Array(n);
|
|
21806
|
+
const vals = new Array(n);
|
|
21807
|
+
let subtreeN = v3.valueHash !== null ? 1 : 0;
|
|
21808
|
+
for (let i = 0; i < n; i++) {
|
|
21809
|
+
const child = v3.children[i];
|
|
21810
|
+
if (child.label.length === 0) throw new PersistentMapNodeFormatError(3, `${prefix}/${hash}`, "v3 child label must not be empty");
|
|
21811
|
+
keys[i] = child.label[0];
|
|
21812
|
+
vals[i] = { kind: "lazy", label: child.label, hash: child.hash, size: child.size };
|
|
21813
|
+
subtreeN += child.size;
|
|
21814
|
+
}
|
|
21815
|
+
const children = new CompactChildren(keys, vals);
|
|
21816
|
+
if (v3.valueHash === null) return { hash, children, size: subtreeN };
|
|
21817
|
+
const value = { kind: "lazyValue", hash: v3.valueHash };
|
|
21818
|
+
return { hash, value, children, size: subtreeN };
|
|
21819
|
+
}
|
|
21511
21820
|
async function faultNode(hash, ctx, pin = "unpinned") {
|
|
21512
21821
|
const cached = ctx.cache.getNode(hash);
|
|
21513
21822
|
if (cached !== void 0) {
|
|
21514
21823
|
if (pin !== "unpinned") ctx.cache.putNode(hash, cached, pin);
|
|
21515
21824
|
return cached;
|
|
21516
21825
|
}
|
|
21826
|
+
if (ctx.packs) {
|
|
21827
|
+
const node2 = await getNodeFromPack(ctx.nodePrefix, hash, ctx.packs);
|
|
21828
|
+
ctx.cache.putNode(hash, node2, pin);
|
|
21829
|
+
return node2;
|
|
21830
|
+
}
|
|
21517
21831
|
const store2 = requireStore(ctx);
|
|
21518
|
-
const
|
|
21832
|
+
const node = await getNodeFromStore(ctx.nodePrefix, hash, store2);
|
|
21519
21833
|
ctx.cache.notePresent(ctx.storeIdentity, contentAddressedKey(ctx.nodePrefix, hash));
|
|
21520
|
-
const node = deserialize(onDisk, hash, ctx.nodePrefix);
|
|
21521
21834
|
ctx.cache.putNode(hash, node, pin);
|
|
21522
21835
|
return node;
|
|
21523
21836
|
}
|
|
@@ -21529,24 +21842,40 @@ async function faultValue(hash, ctx, pin = "unpinned") {
|
|
|
21529
21842
|
return held;
|
|
21530
21843
|
}
|
|
21531
21844
|
if (ctx.project !== void 0) {
|
|
21532
|
-
let raw;
|
|
21533
21845
|
if (ctx.cache.hasValue(hash)) {
|
|
21534
|
-
|
|
21846
|
+
const raw2 = ctx.cache.getValue(hash);
|
|
21847
|
+
const projected2 = ctx.project(raw2);
|
|
21848
|
+
const projectedBytes2 = projectedValueBytes(projected2);
|
|
21849
|
+
ctx.cache.putValue(cacheKey, projected2, pin, projectedBytes2);
|
|
21850
|
+
return projected2;
|
|
21851
|
+
}
|
|
21852
|
+
let raw;
|
|
21853
|
+
let uncompressedBytes;
|
|
21854
|
+
if (ctx.packs !== void 0) {
|
|
21855
|
+
const { value, bytes } = await getPackBlob(ctx.valuePrefix, hash, ctx.packs);
|
|
21856
|
+
raw = value;
|
|
21857
|
+
uncompressedBytes = bytes;
|
|
21535
21858
|
} else {
|
|
21536
|
-
const
|
|
21537
|
-
const faulted2 = await getJsonSized(ctx.valuePrefix, hash,
|
|
21538
|
-
ctx.cache.notePresent(ctx.storeIdentity,
|
|
21859
|
+
const casKey2 = contentAddressedKey(ctx.valuePrefix, hash);
|
|
21860
|
+
const faulted2 = await getJsonSized(ctx.valuePrefix, hash, requireStore(ctx));
|
|
21861
|
+
ctx.cache.notePresent(ctx.storeIdentity, casKey2);
|
|
21539
21862
|
raw = faulted2.value;
|
|
21540
|
-
|
|
21863
|
+
uncompressedBytes = faulted2.bytes;
|
|
21541
21864
|
}
|
|
21865
|
+
ctx.cache.putValue(hash, raw, "unpinned", uncompressedBytes);
|
|
21542
21866
|
const projected = ctx.project(raw);
|
|
21543
21867
|
const projectedBytes = projectedValueBytes(projected);
|
|
21544
21868
|
ctx.cache.putValue(cacheKey, projected, pin, projectedBytes);
|
|
21545
21869
|
return projected;
|
|
21546
21870
|
}
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21871
|
+
if (ctx.packs !== void 0) {
|
|
21872
|
+
const { value, bytes: uncompressedBytes } = await getPackBlob(ctx.valuePrefix, hash, ctx.packs);
|
|
21873
|
+
ctx.cache.putValue(cacheKey, value, pin, uncompressedBytes);
|
|
21874
|
+
return value;
|
|
21875
|
+
}
|
|
21876
|
+
const casKey = contentAddressedKey(ctx.valuePrefix, hash);
|
|
21877
|
+
const faulted = await getJsonSized(ctx.valuePrefix, hash, requireStore(ctx));
|
|
21878
|
+
ctx.cache.notePresent(ctx.storeIdentity, casKey);
|
|
21550
21879
|
ctx.cache.putValue(cacheKey, faulted.value, pin, faulted.bytes);
|
|
21551
21880
|
return faulted.value;
|
|
21552
21881
|
}
|
|
@@ -21555,6 +21884,47 @@ function projectedValueBytes(value) {
|
|
|
21555
21884
|
const s = JSON.stringify(value);
|
|
21556
21885
|
return typeof s === "string" ? s.length : 0;
|
|
21557
21886
|
}
|
|
21887
|
+
async function getNodeFromStore(prefix, hash, store2) {
|
|
21888
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21889
|
+
const blob = await store2.get(key);
|
|
21890
|
+
if (blob === null) {
|
|
21891
|
+
throw new Error(
|
|
21892
|
+
`store miss: no node at key "${key}" in ${describeStore(store2)}. Check the store identity first.`
|
|
21893
|
+
);
|
|
21894
|
+
}
|
|
21895
|
+
return decodeNodeBytes(blob, hash, prefix);
|
|
21896
|
+
}
|
|
21897
|
+
async function getNodesFromStoreMany(prefix, hashes, store2) {
|
|
21898
|
+
if (hashes.length === 0) return /* @__PURE__ */ new Map();
|
|
21899
|
+
if (store2.getMany === void 0) {
|
|
21900
|
+
const result2 = /* @__PURE__ */ new Map();
|
|
21901
|
+
await Promise.all(
|
|
21902
|
+
hashes.map(async (hash) => {
|
|
21903
|
+
result2.set(hash, await getNodeFromStore(prefix, hash, store2));
|
|
21904
|
+
})
|
|
21905
|
+
);
|
|
21906
|
+
return result2;
|
|
21907
|
+
}
|
|
21908
|
+
const keyToHash = /* @__PURE__ */ new Map();
|
|
21909
|
+
const keys = [];
|
|
21910
|
+
for (const hash of hashes) {
|
|
21911
|
+
const key = contentAddressedKey(prefix, hash);
|
|
21912
|
+
keyToHash.set(key, hash);
|
|
21913
|
+
keys.push(key);
|
|
21914
|
+
}
|
|
21915
|
+
const blobs = await store2.getMany(keys);
|
|
21916
|
+
const result = /* @__PURE__ */ new Map();
|
|
21917
|
+
for (const [key, hash] of keyToHash) {
|
|
21918
|
+
const blob = blobs.get(key);
|
|
21919
|
+
if (blob === void 0) {
|
|
21920
|
+
throw new Error(
|
|
21921
|
+
`getNodesFromStoreMany: no node at key "${key}" in ${describeStore(store2)}. Check the store identity first.`
|
|
21922
|
+
);
|
|
21923
|
+
}
|
|
21924
|
+
result.set(hash, decodeNodeBytes(blob, hash, prefix));
|
|
21925
|
+
}
|
|
21926
|
+
return result;
|
|
21927
|
+
}
|
|
21558
21928
|
var PersistentMapNodeFormatError = class extends Error {
|
|
21559
21929
|
constructor(storedFormat, nodeKey, message) {
|
|
21560
21930
|
super(message);
|
|
@@ -21628,7 +21998,8 @@ async function prefaultBatch(node, paths, depth, ctx) {
|
|
|
21628
21998
|
else group.push(segs);
|
|
21629
21999
|
}
|
|
21630
22000
|
const store2 = ctx.store;
|
|
21631
|
-
if (
|
|
22001
|
+
if (ctx.packs) {
|
|
22002
|
+
const packs = ctx.packs;
|
|
21632
22003
|
const nodeHashes = [];
|
|
21633
22004
|
const valueHashes = [];
|
|
21634
22005
|
if (wantsValue && node.value?.kind === "lazyValue") {
|
|
@@ -21641,15 +22012,59 @@ async function prefaultBatch(node, paths, depth, ctx) {
|
|
|
21641
22012
|
nodeHashes.push(child.hash);
|
|
21642
22013
|
}
|
|
21643
22014
|
}
|
|
21644
|
-
const
|
|
21645
|
-
nodeHashes.
|
|
21646
|
-
|
|
21647
|
-
|
|
22015
|
+
const nodeResults = await Promise.all(
|
|
22016
|
+
nodeHashes.map(async (hash) => {
|
|
22017
|
+
const node2 = await getNodeFromPack(ctx.nodePrefix, hash, packs);
|
|
22018
|
+
return { hash, node: node2 };
|
|
22019
|
+
})
|
|
22020
|
+
);
|
|
22021
|
+
const valueResults = await Promise.all(
|
|
22022
|
+
valueHashes.map(async (hash) => {
|
|
22023
|
+
const { value, bytes } = await getPackBlob(ctx.valuePrefix, hash, packs);
|
|
22024
|
+
return { hash, value, bytes };
|
|
22025
|
+
})
|
|
22026
|
+
);
|
|
22027
|
+
for (const { hash, node: node2 } of nodeResults) {
|
|
22028
|
+
ctx.cache.putNode(hash, node2, "unpinned");
|
|
22029
|
+
}
|
|
22030
|
+
for (const { hash, value, bytes } of valueResults) {
|
|
22031
|
+
ctx.cache.putValue(hash, value, "unpinned", bytes);
|
|
22032
|
+
}
|
|
22033
|
+
} else if (store2?.getMany !== void 0) {
|
|
22034
|
+
const nodeHashes = [];
|
|
22035
|
+
const valueHashes = [];
|
|
22036
|
+
if (wantsValue && node.value?.kind === "lazyValue") {
|
|
22037
|
+
const cacheKey = ctx.projectionLabel !== void 0 ? node.value.hash + "\0" + ctx.projectionLabel : node.value.hash;
|
|
22038
|
+
if (!ctx.cache.hasValue(cacheKey)) valueHashes.push(node.value.hash);
|
|
22039
|
+
}
|
|
22040
|
+
for (const [head] of groups) {
|
|
22041
|
+
const child = node.children.get(head);
|
|
22042
|
+
if (child !== void 0 && child.kind === "lazy" && ctx.cache.getNode(child.hash) === void 0) {
|
|
22043
|
+
nodeHashes.push(child.hash);
|
|
22044
|
+
}
|
|
22045
|
+
}
|
|
22046
|
+
const chunkSize = BLOB_FETCH_CONCURRENCY;
|
|
22047
|
+
const chunks = (arr) => arr.length === 0 ? [] : Array.from({ length: Math.ceil(arr.length / chunkSize) }, (_, i) => arr.slice(i * chunkSize, (i + 1) * chunkSize));
|
|
22048
|
+
const nodeChunks = chunks(nodeHashes);
|
|
22049
|
+
const valueChunks = chunks(valueHashes);
|
|
21648
22050
|
const storeId = ctx.storeIdentity;
|
|
22051
|
+
const nodeFetchPromises = nodeChunks.map(
|
|
22052
|
+
(chunk) => withFetchSlots(chunk.length, () => getNodesFromStoreMany(ctx.nodePrefix, chunk, store2))
|
|
22053
|
+
);
|
|
22054
|
+
const valueFetchPromises = valueChunks.map(
|
|
22055
|
+
(chunk) => withFetchSlots(chunk.length, () => getJsonSizedMany(ctx.valuePrefix, chunk, store2))
|
|
22056
|
+
);
|
|
22057
|
+
const [allNodeFlattens, allValueFlattens] = await Promise.all([
|
|
22058
|
+
Promise.all(nodeFetchPromises),
|
|
22059
|
+
Promise.all(valueFetchPromises)
|
|
22060
|
+
]);
|
|
22061
|
+
const fetchedNodes = allNodeFlattens.length === 0 ? void 0 : /* @__PURE__ */ new Map();
|
|
22062
|
+
for (const map of allNodeFlattens) for (const [hash, node2] of map) fetchedNodes.set(hash, node2);
|
|
22063
|
+
const fetchedValues = allValueFlattens.length === 0 ? void 0 : /* @__PURE__ */ new Map();
|
|
22064
|
+
for (const map of allValueFlattens) for (const [hash, faulted] of map) fetchedValues.set(hash, faulted);
|
|
21649
22065
|
if (fetchedNodes !== void 0) {
|
|
21650
|
-
for (const [hash,
|
|
22066
|
+
for (const [hash, deserialized] of fetchedNodes) {
|
|
21651
22067
|
ctx.cache.notePresent(storeId, contentAddressedKey(ctx.nodePrefix, hash));
|
|
21652
|
-
const deserialized = deserialize(faulted.value, hash, ctx.nodePrefix);
|
|
21653
22068
|
ctx.cache.putNode(hash, deserialized, "unpinned");
|
|
21654
22069
|
}
|
|
21655
22070
|
}
|
|
@@ -21671,7 +22086,7 @@ async function prefaultBatch(node, paths, depth, ctx) {
|
|
|
21671
22086
|
const onEdge = subPaths.filter((segs) => labelMatches(child.label, segs, depth));
|
|
21672
22087
|
if (onEdge.length === 0) continue;
|
|
21673
22088
|
pending.push((async () => {
|
|
21674
|
-
const childNode = child.kind === "loaded" ? child.node : await withFetchSlot(() => faultNode(child.hash, ctx, "round"));
|
|
22089
|
+
const childNode = child.kind === "loaded" ? child.node : await withFetchSlot(() => faultNode(child.hash, ctx, ctx.nodePinOverride ?? "round"));
|
|
21675
22090
|
await prefaultBatch(childNode, onEdge, depth + child.label.length, ctx);
|
|
21676
22091
|
})());
|
|
21677
22092
|
}
|
|
@@ -21845,7 +22260,7 @@ function applyBatchResident(node, ops, ctx) {
|
|
|
21845
22260
|
}
|
|
21846
22261
|
return rebuiltNode(valueSlot, children);
|
|
21847
22262
|
}
|
|
21848
|
-
async function sealNode(root, ctx, coalescer) {
|
|
22263
|
+
async function sealNode(root, ctx, coalescer, sink) {
|
|
21849
22264
|
if (root.hash !== null) return root;
|
|
21850
22265
|
const ready = [];
|
|
21851
22266
|
let dirtyCount = 0;
|
|
@@ -21872,7 +22287,7 @@ async function sealNode(root, ctx, coalescer) {
|
|
|
21872
22287
|
}
|
|
21873
22288
|
const store2 = requireStore(ctx);
|
|
21874
22289
|
const storeId = ctx.storeIdentity ?? store2;
|
|
21875
|
-
const writeBuf = newSealWriteBuffer();
|
|
22290
|
+
const writeBuf = newSealWriteBuffer(store2, sink);
|
|
21876
22291
|
let completed = 0;
|
|
21877
22292
|
let rootSealed;
|
|
21878
22293
|
const sleepers = [];
|
|
@@ -21915,6 +22330,33 @@ async function sealNode(root, ctx, coalescer) {
|
|
|
21915
22330
|
}
|
|
21916
22331
|
}
|
|
21917
22332
|
const onDisk = valueHash === void 0 ? { v: PERSISTENT_MAP_NODE_FORMAT, children: childSlots } : { v: PERSISTENT_MAP_NODE_FORMAT, value: valueHash, children: childSlots };
|
|
22333
|
+
const sink2 = writeBuf.sink;
|
|
22334
|
+
if (sink2 !== void 0) {
|
|
22335
|
+
const v3Children = new Array(rec.sortedHeads.length);
|
|
22336
|
+
for (let i = 0; i < rec.sortedHeads.length; i++) {
|
|
22337
|
+
const head = rec.sortedHeads[i];
|
|
22338
|
+
const child = rec.node.children.get(head);
|
|
22339
|
+
v3Children[i] = {
|
|
22340
|
+
label: child.label,
|
|
22341
|
+
hash: rec.childHashes[i],
|
|
22342
|
+
size: childSize(child)
|
|
22343
|
+
};
|
|
22344
|
+
}
|
|
22345
|
+
const v3ValueHash = valueHash ?? null;
|
|
22346
|
+
const v3Node = {
|
|
22347
|
+
hash: null,
|
|
22348
|
+
size: rec.node.size,
|
|
22349
|
+
value: null,
|
|
22350
|
+
valueHash: v3ValueHash,
|
|
22351
|
+
children: v3Children
|
|
22352
|
+
};
|
|
22353
|
+
const v3Body = encodeNode(v3Node);
|
|
22354
|
+
const hashHex = createHash7("sha256").update(v3Body).digest("hex");
|
|
22355
|
+
const put2 = await withSealWriteSlot(() => putRawBodyCoalesced(ctx.nodePrefix, hashHex, v3Body, store2, coalescer, ctx.meter, ctx.label, writeBuf));
|
|
22356
|
+
const sealed2 = valueSlot === void 0 ? { hash: put2.hash, children: lazyChildren, size: rec.node.size } : { hash: put2.hash, value: valueSlot, children: lazyChildren, size: rec.node.size };
|
|
22357
|
+
ctx.cache.putNode(put2.hash, sealed2);
|
|
22358
|
+
return sealed2;
|
|
22359
|
+
}
|
|
21918
22360
|
const nodeAddressed = canonicalWithHash(onDisk, ctx.meter);
|
|
21919
22361
|
const nodeKey = contentAddressedKey(ctx.nodePrefix, nodeAddressed.hash);
|
|
21920
22362
|
if (ctx.cache.isKnownPresent(storeId, nodeKey)) {
|
|
@@ -21955,7 +22397,7 @@ async function sealNode(root, ctx, coalescer) {
|
|
|
21955
22397
|
}
|
|
21956
22398
|
const workers = Math.max(1, Math.min(SEAL_WAVE_CONCURRENCY, ready.length));
|
|
21957
22399
|
await Promise.all(Array.from({ length: workers }, worker));
|
|
21958
|
-
await flushSealWriteBuffer(writeBuf
|
|
22400
|
+
await flushSealWriteBuffer(writeBuf);
|
|
21959
22401
|
return rootSealed;
|
|
21960
22402
|
}
|
|
21961
22403
|
var PersistentMapImpl = class _PersistentMapImpl {
|
|
@@ -22001,7 +22443,9 @@ var PersistentMapImpl = class _PersistentMapImpl {
|
|
|
22001
22443
|
if (paths.length === 0) return;
|
|
22002
22444
|
const root = await this.root();
|
|
22003
22445
|
if (root === void 0) return;
|
|
22004
|
-
const
|
|
22446
|
+
const valuePin = options?.valuePin ?? options?.pin;
|
|
22447
|
+
const nodePin = options?.pin;
|
|
22448
|
+
const ctx = valuePin !== void 0 || nodePin !== void 0 ? { ...this.ctx, ...valuePin !== void 0 ? { valuePinOverride: valuePin } : {}, ...nodePin !== void 0 ? { nodePinOverride: nodePin } : {} } : this.ctx;
|
|
22005
22449
|
await prefaultBatch(root, paths, 0, ctx);
|
|
22006
22450
|
}
|
|
22007
22451
|
/** The root as a resident node, or `undefined` for an empty map — THROWS if the root is a lazy ref
|
|
@@ -22013,6 +22457,47 @@ var PersistentMapImpl = class _PersistentMapImpl {
|
|
|
22013
22457
|
if (cached === void 0) throw unresidentError("node", this.ctx.nodePrefix, this.rootRef.hash, [], 0);
|
|
22014
22458
|
return cached;
|
|
22015
22459
|
}
|
|
22460
|
+
/** `hasKeyUnderResident` logic — walks the prefix path, reading only resident nodes;
|
|
22461
|
+
* throws on an unresolvable lazy child (prefault-contract error). */
|
|
22462
|
+
hasKeyUnderResident(prefix) {
|
|
22463
|
+
const segs = this.codec.segments(prefix);
|
|
22464
|
+
const root = this.residentRoot();
|
|
22465
|
+
if (root === void 0) return false;
|
|
22466
|
+
if (segs.length === 0) return root.size > 0;
|
|
22467
|
+
let node = root;
|
|
22468
|
+
let depth = 0;
|
|
22469
|
+
while (depth < segs.length) {
|
|
22470
|
+
const child = node.children.get(segs[depth]);
|
|
22471
|
+
if (child === void 0) return false;
|
|
22472
|
+
const boundary = depth + child.label.length;
|
|
22473
|
+
if (boundary > segs.length) {
|
|
22474
|
+
for (let i = 0; i < segs.length - depth; i++) {
|
|
22475
|
+
if (child.label[i] !== segs[depth + i]) return false;
|
|
22476
|
+
}
|
|
22477
|
+
return child.kind === "loaded" ? child.node.size > 0 : child.size > 0;
|
|
22478
|
+
}
|
|
22479
|
+
if (boundary < segs.length) {
|
|
22480
|
+
if (!labelMatches(child.label, segs, depth)) return false;
|
|
22481
|
+
if (child.kind === "loaded") {
|
|
22482
|
+
node = child.node;
|
|
22483
|
+
depth = boundary;
|
|
22484
|
+
} else {
|
|
22485
|
+
const loaded = residentChild(child, this.ctx, segs.slice(0, boundary));
|
|
22486
|
+
node = loaded;
|
|
22487
|
+
depth = boundary;
|
|
22488
|
+
}
|
|
22489
|
+
continue;
|
|
22490
|
+
}
|
|
22491
|
+
if (!labelMatches(child.label, segs, depth)) return false;
|
|
22492
|
+
if (child.kind === "loaded") {
|
|
22493
|
+
return child.node.size > (child.node.value !== void 0 ? 1 : 0);
|
|
22494
|
+
} else {
|
|
22495
|
+
const loaded = residentChild(child, this.ctx, segs.slice(0, boundary));
|
|
22496
|
+
return loaded.size > (loaded.value !== void 0 ? 1 : 0);
|
|
22497
|
+
}
|
|
22498
|
+
}
|
|
22499
|
+
return false;
|
|
22500
|
+
}
|
|
22016
22501
|
getResident(key) {
|
|
22017
22502
|
const root = this.residentRoot();
|
|
22018
22503
|
return root === void 0 ? void 0 : lookupResident(root, this.codec.segments(key), 0, this.ctx);
|
|
@@ -22046,7 +22531,24 @@ var PersistentMapImpl = class _PersistentMapImpl {
|
|
|
22046
22531
|
}
|
|
22047
22532
|
applyOpsResident(ops) {
|
|
22048
22533
|
if (ops.length === 0) return this;
|
|
22049
|
-
const
|
|
22534
|
+
const root = this.residentRoot();
|
|
22535
|
+
const effectiveOps = [];
|
|
22536
|
+
for (const op of ops) {
|
|
22537
|
+
if (op.op.kind === "set") {
|
|
22538
|
+
const existingHash = root === void 0 ? void 0 : valueHashResident(root, op.segs, 0, this.ctx);
|
|
22539
|
+
if (existingHash !== void 0) {
|
|
22540
|
+
const cachedValue = this.ctx.cache.getValue(existingHash);
|
|
22541
|
+
if (cachedValue !== void 0) {
|
|
22542
|
+
if (Object.is(cachedValue, op.op.value)) continue;
|
|
22543
|
+
const { hash: newHash } = canonicalWithHash(op.op.value, this.ctx.meter);
|
|
22544
|
+
if (existingHash === newHash) continue;
|
|
22545
|
+
}
|
|
22546
|
+
}
|
|
22547
|
+
}
|
|
22548
|
+
effectiveOps.push(op);
|
|
22549
|
+
}
|
|
22550
|
+
if (effectiveOps.length === 0) return this;
|
|
22551
|
+
const next = applyBatchResident(root, effectiveOps, this.ctx);
|
|
22050
22552
|
return new _PersistentMapImpl(next === void 0 ? null : { kind: "loaded", node: next }, this.codec, this.ctx);
|
|
22051
22553
|
}
|
|
22052
22554
|
/** A projection is a READ + in-memory-carry view over somebody else's sealed tree: its values are
|
|
@@ -22088,14 +22590,31 @@ var PersistentMapImpl = class _PersistentMapImpl {
|
|
|
22088
22590
|
}
|
|
22089
22591
|
async applyOps(ops) {
|
|
22090
22592
|
if (ops.length === 0) return this;
|
|
22091
|
-
const
|
|
22593
|
+
const root = await this.root();
|
|
22594
|
+
const effectiveOps = [];
|
|
22595
|
+
for (const op of ops) {
|
|
22596
|
+
if (op.op.kind === "set") {
|
|
22597
|
+
const existingHash = root === void 0 ? void 0 : valueHashResident(root, op.segs, 0, this.ctx);
|
|
22598
|
+
if (existingHash !== void 0) {
|
|
22599
|
+
const cachedValue = this.ctx.cache.getValue(existingHash);
|
|
22600
|
+
if (cachedValue !== void 0) {
|
|
22601
|
+
if (Object.is(cachedValue, op.op.value)) continue;
|
|
22602
|
+
const { hash: newHash } = canonicalWithHash(op.op.value, this.ctx.meter);
|
|
22603
|
+
if (existingHash === newHash) continue;
|
|
22604
|
+
}
|
|
22605
|
+
}
|
|
22606
|
+
}
|
|
22607
|
+
effectiveOps.push(op);
|
|
22608
|
+
}
|
|
22609
|
+
if (effectiveOps.length === 0) return this;
|
|
22610
|
+
const next = await applyBatch(root, effectiveOps, this.ctx);
|
|
22092
22611
|
return new _PersistentMapImpl(next === void 0 ? null : { kind: "loaded", node: next }, this.codec, this.ctx);
|
|
22093
22612
|
}
|
|
22094
|
-
async seal() {
|
|
22613
|
+
async seal(options) {
|
|
22095
22614
|
const refusal2 = this.projectionRefusal("seal");
|
|
22096
22615
|
if (refusal2 !== void 0) throw refusal2;
|
|
22097
22616
|
if (this.rootRef === null || this.rootRef.kind === "lazy" || this.rootRef.node.hash !== null) return this;
|
|
22098
|
-
const sealed = await sealNode(this.rootRef.node, this.ctx, coalescerForStore(requireStore(this.ctx)));
|
|
22617
|
+
const sealed = await sealNode(this.rootRef.node, this.ctx, coalescerForStore(requireStore(this.ctx)), options?.packSink);
|
|
22099
22618
|
return new _PersistentMapImpl({ kind: "loaded", node: sealed }, this.codec, this.ctx);
|
|
22100
22619
|
}
|
|
22101
22620
|
reopenUncached(cache) {
|
|
@@ -22180,15 +22699,17 @@ function makeCtx(store2, opts) {
|
|
|
22180
22699
|
"PersistentMap: a metered map must carry a non-empty `label`. The tally is per WRITER, not per key prefix \u2014 several maps share one prefix on purpose \u2014 so an unlabeled metered seal would land in an unattributable bucket. Name the map (its family/map name) in `label`."
|
|
22181
22700
|
);
|
|
22182
22701
|
}
|
|
22183
|
-
|
|
22702
|
+
const ctx = {
|
|
22184
22703
|
store: store2,
|
|
22185
22704
|
storeIdentity: opts?.storeIdentity ?? store2 ?? void 0,
|
|
22186
22705
|
cache: opts?.cache ?? sharedNodeCache(),
|
|
22187
22706
|
nodePrefix: opts?.nodePrefix ?? "pmap-node",
|
|
22188
22707
|
valuePrefix: opts?.valuePrefix ?? "pmap-value",
|
|
22189
22708
|
meter: opts?.meter,
|
|
22190
|
-
label: opts?.label
|
|
22709
|
+
label: opts?.label,
|
|
22710
|
+
...opts?.packs !== void 0 ? { packs: opts.packs } : {}
|
|
22191
22711
|
};
|
|
22712
|
+
return ctx;
|
|
22192
22713
|
}
|
|
22193
22714
|
var prefaultObserver = null;
|
|
22194
22715
|
function emptyPersistentMap(codec, store2, opts) {
|
|
@@ -22262,8 +22783,8 @@ init_esm_shims();
|
|
|
22262
22783
|
|
|
22263
22784
|
// ../../engine/floor/extract/src/resolvers/resolve-cache.ts
|
|
22264
22785
|
init_esm_shims();
|
|
22265
|
-
import { createHash as
|
|
22266
|
-
import { gzipSync, gunzipSync as
|
|
22786
|
+
import { createHash as createHash8 } from "crypto";
|
|
22787
|
+
import { gzipSync, gunzipSync as gunzipSync3 } from "zlib";
|
|
22267
22788
|
import { readdir, readFile as readFile3 } from "fs/promises";
|
|
22268
22789
|
import { join as join4, relative } from "path";
|
|
22269
22790
|
|
|
@@ -22300,7 +22821,7 @@ var import_web_tree_sitter13 = __toESM(require_tree_sitter(), 1);
|
|
|
22300
22821
|
// ../../engine/floor/extract/src/tree-sitter/walk-node-utils.ts
|
|
22301
22822
|
init_esm_shims();
|
|
22302
22823
|
var import_web_tree_sitter = __toESM(require_tree_sitter(), 1);
|
|
22303
|
-
import { createHash as
|
|
22824
|
+
import { createHash as createHash9 } from "crypto";
|
|
22304
22825
|
|
|
22305
22826
|
// ../../engine/floor/extract/src/tree-sitter/walk-imports.ts
|
|
22306
22827
|
init_esm_shims();
|
|
@@ -22317,7 +22838,7 @@ var import_web_tree_sitter3 = __toESM(require_tree_sitter(), 1);
|
|
|
22317
22838
|
// ../../engine/floor/extract/src/tree-sitter/body-hash.ts
|
|
22318
22839
|
init_esm_shims();
|
|
22319
22840
|
var import_web_tree_sitter4 = __toESM(require_tree_sitter(), 1);
|
|
22320
|
-
import { createHash as
|
|
22841
|
+
import { createHash as createHash10 } from "crypto";
|
|
22321
22842
|
|
|
22322
22843
|
// ../../engine/floor/extract/src/tree-sitter/walk-control-regions.ts
|
|
22323
22844
|
init_esm_shims();
|
|
@@ -22341,14 +22862,14 @@ var import_web_tree_sitter8 = __toESM(require_tree_sitter(), 1);
|
|
|
22341
22862
|
|
|
22342
22863
|
// ../../engine/floor/extract/src/tree-sitter/grain.ts
|
|
22343
22864
|
init_esm_shims();
|
|
22344
|
-
import { createHash as
|
|
22865
|
+
import { createHash as createHash11 } from "crypto";
|
|
22345
22866
|
function grainMapDigest(tables) {
|
|
22346
22867
|
const lines = [];
|
|
22347
22868
|
for (const [language, table] of tables) {
|
|
22348
22869
|
for (const nodeType of Object.keys(table)) lines.push(`${language}|${nodeType}|${table[nodeType]}`);
|
|
22349
22870
|
}
|
|
22350
22871
|
lines.sort();
|
|
22351
|
-
return
|
|
22872
|
+
return createHash11("sha256").update(lines.join("\n")).digest("hex");
|
|
22352
22873
|
}
|
|
22353
22874
|
function grainMapCardinality(tables) {
|
|
22354
22875
|
return tables.reduce((n, [, t]) => n + Object.keys(t).length, 0);
|
|
@@ -22884,13 +23405,13 @@ var require2 = createRequire2(import.meta.url);
|
|
|
22884
23405
|
|
|
22885
23406
|
// ../../engine/floor/extract/src/extract-cache.ts
|
|
22886
23407
|
init_esm_shims();
|
|
22887
|
-
import { createHash as
|
|
22888
|
-
import { gzipSync as gzipSync2, gunzipSync as
|
|
23408
|
+
import { createHash as createHash12 } from "crypto";
|
|
23409
|
+
import { gzipSync as gzipSync2, gunzipSync as gunzipSync4 } from "zlib";
|
|
22889
23410
|
|
|
22890
23411
|
// ../../engine/floor/extract/src/content-blob.ts
|
|
22891
23412
|
init_esm_shims();
|
|
22892
|
-
import { createHash as
|
|
22893
|
-
import { gzipSync as gzipSync3, gunzipSync as
|
|
23413
|
+
import { createHash as createHash13 } from "crypto";
|
|
23414
|
+
import { gzipSync as gzipSync3, gunzipSync as gunzipSync5 } from "zlib";
|
|
22894
23415
|
|
|
22895
23416
|
// ../../engine/floor/extract/src/infer-language.ts
|
|
22896
23417
|
init_esm_shims();
|
|
@@ -22985,7 +23506,7 @@ init_esm_shims();
|
|
|
22985
23506
|
|
|
22986
23507
|
// ../../engine/floor/resolve/src/base/canonical-parent-state.ts
|
|
22987
23508
|
init_esm_shims();
|
|
22988
|
-
import { createHash as
|
|
23509
|
+
import { createHash as createHash14 } from "crypto";
|
|
22989
23510
|
|
|
22990
23511
|
// ../../engine/floor/resolve/src/update/occurrence-consumers.ts
|
|
22991
23512
|
var EMPTY_OCCURRENCE_CONSUMERS = {
|
|
@@ -23020,7 +23541,7 @@ init_esm_shims();
|
|
|
23020
23541
|
// ../../engine/floor/resolve/src/typescript/surface-adapter.ts
|
|
23021
23542
|
init_esm_shims();
|
|
23022
23543
|
import ts4 from "typescript";
|
|
23023
|
-
import { createHash as
|
|
23544
|
+
import { createHash as createHash15 } from "crypto";
|
|
23024
23545
|
import { relative as relative3 } from "path";
|
|
23025
23546
|
|
|
23026
23547
|
// ../../engine/floor/resolve/src/update/update.ts
|
|
@@ -23123,7 +23644,7 @@ init_esm_shims();
|
|
|
23123
23644
|
|
|
23124
23645
|
// ../../engine/floor/resolve/src/base/identity-shard-tree.ts
|
|
23125
23646
|
init_esm_shims();
|
|
23126
|
-
import { createHash as
|
|
23647
|
+
import { createHash as createHash16 } from "crypto";
|
|
23127
23648
|
var SHARD_DEPTH = 2;
|
|
23128
23649
|
var SHARD_COUNT = 16 ** SHARD_DEPTH;
|
|
23129
23650
|
|
|
@@ -23150,18 +23671,54 @@ init_esm_shims();
|
|
|
23150
23671
|
|
|
23151
23672
|
// ../../engine/floor/resolve/src/base/walk-base-snapshot.ts
|
|
23152
23673
|
init_esm_shims();
|
|
23153
|
-
import { createHash as
|
|
23154
|
-
import { gzipSync as gzipSync4, gunzipSync as
|
|
23674
|
+
import { createHash as createHash17 } from "crypto";
|
|
23675
|
+
import { gzipSync as gzipSync4, gunzipSync as gunzipSync6 } from "zlib";
|
|
23155
23676
|
|
|
23156
23677
|
// ../../engine/floor/resolve/src/base/streamed-decode.ts
|
|
23157
23678
|
init_esm_shims();
|
|
23158
23679
|
|
|
23159
23680
|
// ../../engine/floor/resolve/src/base/persistent-map/node-format-boundary.ts
|
|
23160
23681
|
init_esm_shims();
|
|
23682
|
+
import { gunzipSync as gunzipSync7 } from "zlib";
|
|
23161
23683
|
|
|
23162
23684
|
// ../../engine/floor/resolve/src/base/canonical-parent-format-boundary.ts
|
|
23163
23685
|
init_esm_shims();
|
|
23164
23686
|
|
|
23687
|
+
// ../../engine/floor/resolve/src/base/pack/pack-file.ts
|
|
23688
|
+
init_esm_shims();
|
|
23689
|
+
|
|
23690
|
+
// ../../engine/floor/resolve/src/base/pack/pack-reader.ts
|
|
23691
|
+
init_esm_shims();
|
|
23692
|
+
|
|
23693
|
+
// ../../engine/floor/resolve/src/base/pack/block-cache.ts
|
|
23694
|
+
init_esm_shims();
|
|
23695
|
+
|
|
23696
|
+
// ../../engine/floor/resolve/src/base/pack/pack-seal-sink.ts
|
|
23697
|
+
init_esm_shims();
|
|
23698
|
+
|
|
23699
|
+
// ../../engine/floor/resolve/src/base/pack/delta-pack-writer.ts
|
|
23700
|
+
init_esm_shims();
|
|
23701
|
+
import { createHash as createHash18, randomUUID } from "crypto";
|
|
23702
|
+
import { open, rename, stat } from "fs/promises";
|
|
23703
|
+
import path2 from "path";
|
|
23704
|
+
|
|
23705
|
+
// ../../engine/floor/resolve/src/base/pack/pack-seal-sink.ts
|
|
23706
|
+
import { open as open2, readFile as readFile7, unlink as unlink2 } from "fs/promises";
|
|
23707
|
+
|
|
23708
|
+
// ../../engine/floor/resolve/src/base/pack/pack-set.ts
|
|
23709
|
+
init_esm_shims();
|
|
23710
|
+
|
|
23711
|
+
// ../../engine/floor/resolve/src/base/pack/bloom.ts
|
|
23712
|
+
init_esm_shims();
|
|
23713
|
+
import { createHash as createHash19 } from "crypto";
|
|
23714
|
+
|
|
23715
|
+
// ../../engine/floor/resolve/src/base/pack/mirror.ts
|
|
23716
|
+
init_esm_shims();
|
|
23717
|
+
import { readFile as readFile8, writeFile as writeFile7, mkdir as mkdir5, open as open3, access } from "fs/promises";
|
|
23718
|
+
|
|
23719
|
+
// ../../engine/floor/resolve/src/base/pack/snapshot-merge.ts
|
|
23720
|
+
init_esm_shims();
|
|
23721
|
+
|
|
23165
23722
|
// ../../engine/floor/resolve/src/edges/compose.ts
|
|
23166
23723
|
init_esm_shims();
|
|
23167
23724
|
|
|
@@ -23391,7 +23948,7 @@ var exec = promisify4(execFile3);
|
|
|
23391
23948
|
|
|
23392
23949
|
// ../verify/src/bundle/real-bundler.ts
|
|
23393
23950
|
init_esm_shims();
|
|
23394
|
-
import { readFile as
|
|
23951
|
+
import { readFile as readFile9, rm as rm8 } from "fs/promises";
|
|
23395
23952
|
import { tmpdir as tmpdir8 } from "os";
|
|
23396
23953
|
import { join as join12 } from "path";
|
|
23397
23954
|
|
|
@@ -23416,12 +23973,12 @@ function envTokenSource() {
|
|
|
23416
23973
|
};
|
|
23417
23974
|
}
|
|
23418
23975
|
function fileTokenSource() {
|
|
23419
|
-
const
|
|
23976
|
+
const path7 = join13(homedir(), ".subseam", "token");
|
|
23420
23977
|
return {
|
|
23421
|
-
name: `${
|
|
23978
|
+
name: `${path7} (file)`,
|
|
23422
23979
|
load() {
|
|
23423
23980
|
try {
|
|
23424
|
-
return readFileSync3(
|
|
23981
|
+
return readFileSync3(path7, "utf8").trim();
|
|
23425
23982
|
} catch {
|
|
23426
23983
|
return void 0;
|
|
23427
23984
|
}
|
|
@@ -24020,8 +24577,8 @@ function getErrorMap() {
|
|
|
24020
24577
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
24021
24578
|
init_esm_shims();
|
|
24022
24579
|
var makeIssue = (params) => {
|
|
24023
|
-
const { data, path:
|
|
24024
|
-
const fullPath = [...
|
|
24580
|
+
const { data, path: path7, errorMaps, issueData } = params;
|
|
24581
|
+
const fullPath = [...path7, ...issueData.path || []];
|
|
24025
24582
|
const fullIssue = {
|
|
24026
24583
|
...issueData,
|
|
24027
24584
|
path: fullPath
|
|
@@ -24141,11 +24698,11 @@ var errorUtil;
|
|
|
24141
24698
|
|
|
24142
24699
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
24143
24700
|
var ParseInputLazyPath = class {
|
|
24144
|
-
constructor(parent, value,
|
|
24701
|
+
constructor(parent, value, path7, key) {
|
|
24145
24702
|
this._cachedPath = [];
|
|
24146
24703
|
this.parent = parent;
|
|
24147
24704
|
this.data = value;
|
|
24148
|
-
this._path =
|
|
24705
|
+
this._path = path7;
|
|
24149
24706
|
this._key = key;
|
|
24150
24707
|
}
|
|
24151
24708
|
get path() {
|
|
@@ -27670,7 +28227,7 @@ init_esm_shims();
|
|
|
27670
28227
|
init_esm_shims();
|
|
27671
28228
|
import { execFile as execFile5 } from "child_process";
|
|
27672
28229
|
import { promisify as promisify6 } from "util";
|
|
27673
|
-
import { mkdtemp as mkdtemp8, readFile as
|
|
28230
|
+
import { mkdtemp as mkdtemp8, readFile as readFile10, rm as rm9 } from "fs/promises";
|
|
27674
28231
|
import { tmpdir as tmpdir10 } from "os";
|
|
27675
28232
|
import { join as join15 } from "path";
|
|
27676
28233
|
var execFileP3 = promisify6(execFile5);
|
|
@@ -27693,7 +28250,7 @@ async function buildProposedCommit(cwd, scope, file) {
|
|
|
27693
28250
|
await git(cwd, ["update-ref", "-d", PROPOSED_REF]).catch(() => {
|
|
27694
28251
|
});
|
|
27695
28252
|
}
|
|
27696
|
-
return { bundle: (await
|
|
28253
|
+
return { bundle: (await readFile10(bundlePath)).toString("base64"), commit };
|
|
27697
28254
|
} finally {
|
|
27698
28255
|
await rm9(scratch, { recursive: true, force: true });
|
|
27699
28256
|
}
|
|
@@ -27807,18 +28364,18 @@ function parseRemoteSlug(url) {
|
|
|
27807
28364
|
if (s.endsWith(".git")) s = s.slice(0, -".git".length);
|
|
27808
28365
|
s = s.replace(/\/+$/, "");
|
|
27809
28366
|
const scheme = /^[a-z][a-z0-9+.-]*:\/\/(.+)$/i.exec(s);
|
|
27810
|
-
let
|
|
28367
|
+
let path7;
|
|
27811
28368
|
if (scheme !== null) {
|
|
27812
28369
|
const rest = scheme[1];
|
|
27813
28370
|
const slash = rest.indexOf("/");
|
|
27814
28371
|
if (slash === -1) return null;
|
|
27815
|
-
|
|
28372
|
+
path7 = rest.slice(slash + 1);
|
|
27816
28373
|
} else {
|
|
27817
28374
|
const colon = s.indexOf(":");
|
|
27818
28375
|
if (colon === -1) return null;
|
|
27819
|
-
|
|
28376
|
+
path7 = s.slice(colon + 1);
|
|
27820
28377
|
}
|
|
27821
|
-
const segments =
|
|
28378
|
+
const segments = path7.split("/").filter((seg) => seg !== "");
|
|
27822
28379
|
if (segments.length < 2) return null;
|
|
27823
28380
|
return `${segments[segments.length - 2]}/${segments[segments.length - 1]}`;
|
|
27824
28381
|
}
|
|
@@ -27947,9 +28504,9 @@ async function localCodeSearch(pattern, repoRoot) {
|
|
|
27947
28504
|
const raw = rgParse(await rgText(args2));
|
|
27948
28505
|
const out2 = [];
|
|
27949
28506
|
for (const m of raw) {
|
|
27950
|
-
const
|
|
27951
|
-
if (
|
|
27952
|
-
out2.push({ path:
|
|
28507
|
+
const path7 = relative6(repoRoot, m.absPath);
|
|
28508
|
+
if (path7.startsWith("..")) continue;
|
|
28509
|
+
out2.push({ path: path7, line: m.line, content: m.content });
|
|
27953
28510
|
}
|
|
27954
28511
|
return out2;
|
|
27955
28512
|
}
|
|
@@ -28011,8 +28568,8 @@ async function stampRepo(root) {
|
|
|
28011
28568
|
sha = await git2(root, ["rev-parse", "--short", "HEAD"]);
|
|
28012
28569
|
const status = await git2(root, ["status", "--porcelain"]);
|
|
28013
28570
|
for (const line of status.split("\n")) {
|
|
28014
|
-
const
|
|
28015
|
-
if (
|
|
28571
|
+
const path7 = line.slice(3).trim();
|
|
28572
|
+
if (path7 !== "") modified.add(path7);
|
|
28016
28573
|
}
|
|
28017
28574
|
} catch {
|
|
28018
28575
|
}
|
|
@@ -28254,13 +28811,13 @@ function conceptLine(hit) {
|
|
|
28254
28811
|
function stampOf(hits) {
|
|
28255
28812
|
return hits[0]?.stamp ?? "unknown";
|
|
28256
28813
|
}
|
|
28257
|
-
function dirOf(
|
|
28258
|
-
const d = dirname9(
|
|
28814
|
+
function dirOf(path7) {
|
|
28815
|
+
const d = dirname9(path7);
|
|
28259
28816
|
return d === "." ? "" : d;
|
|
28260
28817
|
}
|
|
28261
|
-
function baseName(
|
|
28262
|
-
const i =
|
|
28263
|
-
return i === -1 ?
|
|
28818
|
+
function baseName(path7) {
|
|
28819
|
+
const i = path7.lastIndexOf("/");
|
|
28820
|
+
return i === -1 ? path7 : path7.slice(i + 1);
|
|
28264
28821
|
}
|
|
28265
28822
|
function hitWord(n) {
|
|
28266
28823
|
return `${n} hit${n === 1 ? "" : "s"}`;
|
|
@@ -29313,7 +29870,7 @@ var HOW = {
|
|
|
29313
29870
|
};
|
|
29314
29871
|
function renderInbox(r, limit2) {
|
|
29315
29872
|
const known = new Set(INBOX_LANES);
|
|
29316
|
-
const
|
|
29873
|
+
const open6 = r.items.filter((i) => i.lane === "open-question");
|
|
29317
29874
|
const upcoming = r.items.filter((i) => i.lane === "upcoming");
|
|
29318
29875
|
const unknownLane = r.items.filter((i) => !known.has(i.lane));
|
|
29319
29876
|
const caveat = r.unreadableRepoCount === 0 ? "" : `define_inbox: WARNING \u2014 ${r.unreadableRepoCount} member repo(s) could not be read, so the drift-backlog half of this list is INCOMPLETE. What follows is a floor, not a total.
|
|
@@ -29321,8 +29878,8 @@ function renderInbox(r, limit2) {
|
|
|
29321
29878
|
if (r.items.length === 0) {
|
|
29322
29879
|
return `${caveat}define_inbox: nothing open. No unresolved drift-backlog item, no refinement awaiting re-review, no snooze running out within 7 days.`;
|
|
29323
29880
|
}
|
|
29324
|
-
const header2 = `${caveat}define_inbox: ${
|
|
29325
|
-
const ours = [...
|
|
29881
|
+
const header2 = `${caveat}define_inbox: ${open6.length} open question(s), ${upcoming.length} upcoming, ${unknownLane.length} in an unknown lane.`;
|
|
29882
|
+
const ours = [...open6, ...upcoming].sort(compareByAnswerOrder(r.items));
|
|
29326
29883
|
const shown = limit2 === void 0 ? ours : ours.slice(0, limit2);
|
|
29327
29884
|
const lines = shown.map(oneLiner).join("\n");
|
|
29328
29885
|
const more = shown.length < ours.length ? `
|
|
@@ -29654,6 +30211,9 @@ ${secure}`;
|
|
|
29654
30211
|
if (r.exitCode !== null) parts.push(`exit ${r.exitCode}`);
|
|
29655
30212
|
if (r.producedVersionId !== null) parts.push(`produced version ${r.producedVersionId}`);
|
|
29656
30213
|
let text = parts.join(", ");
|
|
30214
|
+
text += `
|
|
30215
|
+
Mode: ${r.mode}`;
|
|
30216
|
+
if (r.mode === "scratch") text += "\na scratch run is not landable: build_land will refuse it";
|
|
29657
30217
|
if (r.disturbed !== null) {
|
|
29658
30218
|
const { files, conceptIds } = r.disturbed;
|
|
29659
30219
|
const shown = files.slice(0, DISTURBED_FILES_SHOWN);
|
|
@@ -29685,6 +30245,7 @@ async function dispatch(ctx, payload) {
|
|
|
29685
30245
|
async function invoke(ctx, payload) {
|
|
29686
30246
|
return { text: renderBuildResult(await dispatch(ctx, payload)) };
|
|
29687
30247
|
}
|
|
30248
|
+
var RUN_HERMETIC_DEPRECATION = "hermetic is deprecated and will be removed in @subseam/mcp 0.4.0 \u2014 pass mode: 'landable' (hermetic true) or mode: 'scratch' (hermetic false) instead.";
|
|
29688
30249
|
function resolveWorkspaceId(explicit, ctx) {
|
|
29689
30250
|
const workspaceId = explicit ?? ctx.workspace.get();
|
|
29690
30251
|
if (workspaceId === void 0) {
|
|
@@ -29778,23 +30339,34 @@ var discardTool = {
|
|
|
29778
30339
|
};
|
|
29779
30340
|
var runTool = {
|
|
29780
30341
|
name: "run",
|
|
29781
|
-
description: "Run a command over the hosted workspace's head version on hosted compute \u2014 not the local shell. Async: returns a run id immediately; poll with run_status. The run's file changes are captured back as a new produced-by:run version, and the run earns the verdict for that version \u2014 which is what `build_land` requires before it will land anything. install (default true) materializes the workspace's deps before the command; set false for a dep-free command (e.g. a bare node -e) so the run skips the toolchain bootstrap entirely.
|
|
30342
|
+
description: "Run a command over the hosted workspace's head version on hosted compute \u2014 not the local shell. Async: returns a run id immediately; poll with run_status. The run's file changes are captured back as a new produced-by:run version, and the run earns the verdict for that version \u2014 which is what `build_land` requires before it will land anything. install (default true) materializes the workspace's deps before the command; set false for a dep-free command (e.g. a bare node -e) so the run skips the toolchain bootstrap entirely. mode selects the execution flavor: `landable` (single-flight), `evidence` (single-flight with door evidence capture), or `scratch` (non-hermetic, not replayable). hermetic is a deprecated alias for mode \u2014 true means landable, false means scratch \u2014 and is removed in 0.4.0; passing both with different meanings is refused.",
|
|
29782
30343
|
capability: "build",
|
|
29783
30344
|
inputSchema: {
|
|
29784
30345
|
workspaceId: workspaceIdArg,
|
|
29785
30346
|
argv: external_exports.array(external_exports.string().min(1)).min(1),
|
|
29786
30347
|
env: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
29787
|
-
|
|
30348
|
+
mode: external_exports.enum(["landable", "evidence", "scratch"]).optional(),
|
|
30349
|
+
hermetic: external_exports.boolean().optional().describe("Deprecated alias for mode: true means landable, false means scratch. Removed in 0.4.0."),
|
|
29788
30350
|
install: external_exports.boolean().optional()
|
|
29789
30351
|
},
|
|
29790
|
-
handler: async (input9, ctx) =>
|
|
29791
|
-
|
|
29792
|
-
|
|
29793
|
-
|
|
29794
|
-
|
|
29795
|
-
|
|
29796
|
-
|
|
29797
|
-
|
|
30352
|
+
handler: async (input9, ctx) => {
|
|
30353
|
+
const aliased = input9.hermetic === void 0 ? void 0 : input9.hermetic ? "landable" : "scratch";
|
|
30354
|
+
if (input9.mode !== void 0 && aliased !== void 0 && input9.mode !== aliased) {
|
|
30355
|
+
throw new Error(
|
|
30356
|
+
`run was given mode '${input9.mode}' and hermetic ${String(input9.hermetic)}, which name different execution flavors. Pass one of them: hermetic ${String(input9.hermetic)} means mode '${aliased}'. hermetic is deprecated and will be removed in @subseam/mcp 0.4.0.`
|
|
30357
|
+
);
|
|
30358
|
+
}
|
|
30359
|
+
const result = await invoke(ctx, {
|
|
30360
|
+
op: "run",
|
|
30361
|
+
workspaceId: resolveWorkspaceId(input9.workspaceId, ctx),
|
|
30362
|
+
argv: input9.argv,
|
|
30363
|
+
...input9.env !== void 0 ? { env: input9.env } : {},
|
|
30364
|
+
mode: input9.mode ?? aliased ?? "landable",
|
|
30365
|
+
install: input9.install ?? true
|
|
30366
|
+
});
|
|
30367
|
+
return input9.hermetic === void 0 ? result : { ...result, text: `${RUN_HERMETIC_DEPRECATION}
|
|
30368
|
+
${result.text}` };
|
|
30369
|
+
}
|
|
29798
30370
|
};
|
|
29799
30371
|
var runStatusTool = {
|
|
29800
30372
|
name: "run_status",
|
|
@@ -29812,7 +30384,7 @@ var pullTool = {
|
|
|
29812
30384
|
};
|
|
29813
30385
|
var buildLandTool = {
|
|
29814
30386
|
name: "build_land",
|
|
29815
|
-
description: "Land the workspace to the real repo \u2014 verdict-first, pushed by the PLATFORM. The server checks the land (chain synced to the tip with a green
|
|
30387
|
+
description: "Land the workspace to the real repo \u2014 verdict-first, pushed by the PLATFORM. The server checks the land (chain synced to the tip with a green bankable (mode: landable) verdict of the repo's gate command), then pushes the verified commit itself with the platform's credential: authored as `principal`, committed by the platform. No git runs on your side and you need no credential. WHERE it pushes is the repo's configured landingShape (see `config`), and you do not choose it per land: `direct-push` fast-forwards onto the default branch and answers `awaiting-ingest` \u2014 pushed, waiting to be walked; run build_land again once it is walked to confirm. `pr` pushes to a branch of its own and opens a pull request, answering `pending-review` with the PR url \u2014 that land completes when a human merges the PR. The platform checks the pull request WHEN ASKED (on build_land or build_land_status) and never in between, so a re-run before it merges re-reports the same pull request, and one after it merges settles the land: `confirmed` when the merged bytes prove equal to the verified bytes, `merged-diverged` when the PR merged onto a base that had moved (in the repo, equality not proven \u2014 expected, not an error), `closed-unmerged` when the PR was closed instead. Either way the re-run never pushes twice.",
|
|
29816
30388
|
capability: "build",
|
|
29817
30389
|
inputSchema: { workspaceId: external_exports.string().uuid(), principal: external_exports.string().min(1) },
|
|
29818
30390
|
handler: (input9, ctx) => invoke(ctx, { op: "land_check", workspaceId: input9.workspaceId, principal: input9.principal })
|
|
@@ -29966,7 +30538,7 @@ var KNOWN = new Set(KNOWN_SINK_CLASSES);
|
|
|
29966
30538
|
|
|
29967
30539
|
// ../secure/src/taint/finding.ts
|
|
29968
30540
|
init_esm_shims();
|
|
29969
|
-
import { createHash as
|
|
30541
|
+
import { createHash as createHash21 } from "crypto";
|
|
29970
30542
|
|
|
29971
30543
|
// ../secure/src/taint/trust/key.ts
|
|
29972
30544
|
init_esm_shims();
|
|
@@ -30015,7 +30587,7 @@ init_esm_shims();
|
|
|
30015
30587
|
|
|
30016
30588
|
// ../inference/src/corpus/object-store.ts
|
|
30017
30589
|
init_esm_shims();
|
|
30018
|
-
import { createHash as
|
|
30590
|
+
import { createHash as createHash22 } from "crypto";
|
|
30019
30591
|
|
|
30020
30592
|
// ../inference/src/corpus/object-store-retention.ts
|
|
30021
30593
|
init_esm_shims();
|
|
@@ -30052,7 +30624,7 @@ init_esm_shims();
|
|
|
30052
30624
|
|
|
30053
30625
|
// ../define-engine/src/canonical-json.ts
|
|
30054
30626
|
init_esm_shims();
|
|
30055
|
-
import { createHash as
|
|
30627
|
+
import { createHash as createHash23 } from "crypto";
|
|
30056
30628
|
|
|
30057
30629
|
// ../define-engine/src/run-check.ts
|
|
30058
30630
|
init_esm_shims();
|
|
@@ -30107,7 +30679,7 @@ init_esm_shims();
|
|
|
30107
30679
|
|
|
30108
30680
|
// ../define-engine/src/footprint.ts
|
|
30109
30681
|
init_esm_shims();
|
|
30110
|
-
import { createHash as
|
|
30682
|
+
import { createHash as createHash24 } from "crypto";
|
|
30111
30683
|
|
|
30112
30684
|
// ../define-engine/src/run/judgment-record.ts
|
|
30113
30685
|
init_esm_shims();
|
|
@@ -30172,11 +30744,13 @@ init_esm_shims();
|
|
|
30172
30744
|
var WORK_PULL_CAPABILITY = "work-pull";
|
|
30173
30745
|
var WORK_CLAIM_CAPABILITY = "work-claim";
|
|
30174
30746
|
var WORK_SUBMIT_CAPABILITY = "work-submit";
|
|
30747
|
+
var WORK_READ_CAPABILITY = "work-read";
|
|
30175
30748
|
function createGatewayPullVenueTransport(gateway) {
|
|
30176
30749
|
return {
|
|
30177
30750
|
pull: (request) => gateway.invoke(WORK_PULL_CAPABILITY, request),
|
|
30178
30751
|
claim: (request) => gateway.invoke(WORK_CLAIM_CAPABILITY, request),
|
|
30179
|
-
submit: (request) => gateway.invoke(WORK_SUBMIT_CAPABILITY, request)
|
|
30752
|
+
submit: (request) => gateway.invoke(WORK_SUBMIT_CAPABILITY, request),
|
|
30753
|
+
read: (taskId) => gateway.invoke(WORK_READ_CAPABILITY, { taskId })
|
|
30180
30754
|
};
|
|
30181
30755
|
}
|
|
30182
30756
|
|
|
@@ -30211,6 +30785,9 @@ var submitInput = {
|
|
|
30211
30785
|
contractVersion: external_exports.number().int().nonnegative(),
|
|
30212
30786
|
adapterId: external_exports.string().optional()
|
|
30213
30787
|
};
|
|
30788
|
+
var readInput = {
|
|
30789
|
+
taskId: external_exports.string()
|
|
30790
|
+
};
|
|
30214
30791
|
function createPullToolProviders(deps) {
|
|
30215
30792
|
const maxWait = deps.maxWait ?? DEFAULT_MAX_WAIT;
|
|
30216
30793
|
const sleep3 = deps.sleep ?? realSleep;
|
|
@@ -30251,7 +30828,7 @@ ${lines.join("\n")}` };
|
|
|
30251
30828
|
};
|
|
30252
30829
|
const claim = {
|
|
30253
30830
|
name: "tasks_claim",
|
|
30254
|
-
description: "Claim one pulled inference task, exclusively. Pulling only browses; claiming takes the task out of the queue so nobody else works it. Returns any partial work a previous attempt banked, so you resume rather than restart.",
|
|
30831
|
+
description: "Claim one pulled inference task, exclusively. Pulling only browses; claiming takes the task out of the queue so nobody else works it. Returns any partial work a previous attempt banked, so you resume rather than restart. The claim returns the task's bundle verbatim, its reply form and its attempt budget.",
|
|
30255
30832
|
capability: deps.capability,
|
|
30256
30833
|
inputSchema: claimInput,
|
|
30257
30834
|
async handler(input9, ctx) {
|
|
@@ -30265,9 +30842,12 @@ ${lines.join("\n")}` };
|
|
|
30265
30842
|
};
|
|
30266
30843
|
}
|
|
30267
30844
|
const resumed = outcome.resumeFromBudgetCoordinate === void 0 ? "" : ` Resume from banked work at budget coordinate ${outcome.resumeFromBudgetCoordinate}.`;
|
|
30268
|
-
|
|
30269
|
-
|
|
30270
|
-
};
|
|
30845
|
+
const part1 = `Claimed ${outcome.taskId} (${outcome.taskClass}, form ${outcome.oracleBinding}). You have ${outcome.attemptsLeft} of ${outcome.attemptBudget} attempt(s) left.${resumed}`;
|
|
30846
|
+
const part2 = outcome.form === null ? "Reply form: none declared; the reply is accepted unvalidated." : outcome.form.kind === "first-token" ? `Reply form: the first token must be one of ${outcome.form.tokens.join(" | ")}.` : "Reply form: a file-set (JSON array of path/content entries).";
|
|
30847
|
+
const part3 = outcome.bundle === null ? `No bundle body is retained under ${outcome.bundleDigest}; this task cannot be worked from its bundle.` : `Bundle ${outcome.bundleDigest}:`;
|
|
30848
|
+
const part4 = outcome.bundle !== null ? outcome.bundle : void 0;
|
|
30849
|
+
const text = [part1, part2, part3, part4].filter((p) => p !== void 0).join("\n\n");
|
|
30850
|
+
return { text };
|
|
30271
30851
|
}
|
|
30272
30852
|
};
|
|
30273
30853
|
const submit = {
|
|
@@ -30295,10 +30875,31 @@ ${lines.join("\n")}` };
|
|
|
30295
30875
|
};
|
|
30296
30876
|
}
|
|
30297
30877
|
};
|
|
30878
|
+
const read2 = {
|
|
30879
|
+
name: "tasks_read",
|
|
30880
|
+
description: "Read the state of an inference task. Returns status, outcome, head version, and counterexample when available. Does not return fill text.",
|
|
30881
|
+
capability: deps.capability,
|
|
30882
|
+
inputSchema: readInput,
|
|
30883
|
+
async handler(input9, ctx) {
|
|
30884
|
+
const outcome = await transportFor(ctx).read(input9.taskId);
|
|
30885
|
+
const lines = [`Status: ${outcome.status}`];
|
|
30886
|
+
if (outcome.outcome !== void 0) {
|
|
30887
|
+
lines.push(`Outcome: ${outcome.outcome}`);
|
|
30888
|
+
}
|
|
30889
|
+
if (outcome.headVersionId !== void 0) {
|
|
30890
|
+
lines.push(`Head version: ${outcome.headVersionId}`);
|
|
30891
|
+
}
|
|
30892
|
+
if (outcome.counterexample !== void 0) {
|
|
30893
|
+
lines.push(`Counterexample: ${outcome.counterexample}`);
|
|
30894
|
+
}
|
|
30895
|
+
return { text: lines.join("\n") };
|
|
30896
|
+
}
|
|
30897
|
+
};
|
|
30298
30898
|
return [
|
|
30299
30899
|
pull,
|
|
30300
30900
|
claim,
|
|
30301
|
-
submit
|
|
30901
|
+
submit,
|
|
30902
|
+
read2
|
|
30302
30903
|
];
|
|
30303
30904
|
}
|
|
30304
30905
|
|
|
@@ -30310,7 +30911,7 @@ var workTools = createPullToolProviders({ capability: "work" });
|
|
|
30310
30911
|
var bundledProviders = [src_default2, src_default, tension_default, ...defineTools, ...decisionTools, ...captureTools, ...buildTools, secureTool, ...workTools];
|
|
30311
30912
|
|
|
30312
30913
|
// package.json
|
|
30313
|
-
var version = "0.3.
|
|
30914
|
+
var version = "0.3.5";
|
|
30314
30915
|
|
|
30315
30916
|
// src/server.ts
|
|
30316
30917
|
var SERVER_VERSION = version;
|