toolcraft 0.0.756 → 0.0.758
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/composition.json +2 -2
- package/dist/composition.json +2 -2
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/index.d.ts +3 -1
- package/node_modules/@poe-code/safe-fs/dist/fs/memory/index.js +16 -9
- package/node_modules/@poe-code/safe-fs/dist/testing/object-io-metrics.js +1 -0
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"name": "toolcraft",
|
|
136
|
-
"version": "0.0.
|
|
136
|
+
"version": "0.0.758",
|
|
137
137
|
"license": "MIT"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"name": "toolcraft-schema",
|
|
146
|
-
"version": "0.0.
|
|
146
|
+
"version": "0.0.758",
|
|
147
147
|
"license": "MIT"
|
|
148
148
|
},
|
|
149
149
|
{
|
package/dist/composition.json
CHANGED
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"name": "toolcraft",
|
|
136
|
-
"version": "0.0.
|
|
136
|
+
"version": "0.0.758",
|
|
137
137
|
"license": "MIT"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"name": "toolcraft-schema",
|
|
146
|
-
"version": "0.0.
|
|
146
|
+
"version": "0.0.758",
|
|
147
147
|
"license": "MIT"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
@@ -49,6 +49,9 @@ type OwnedStore = {
|
|
|
49
49
|
root: DirectoryNode;
|
|
50
50
|
ledger: MemoryLedger;
|
|
51
51
|
capabilities: FileSystem["capabilities"];
|
|
52
|
+
customCapabilities?: FileSystemCapabilities;
|
|
53
|
+
identityScope?: symbol;
|
|
54
|
+
atomicView?: MemoryAtomicView;
|
|
52
55
|
intact: () => boolean;
|
|
53
56
|
};
|
|
54
57
|
export interface ConditionalMutationBinding {
|
|
@@ -59,7 +62,6 @@ export interface ConditionalMutationBinding {
|
|
|
59
62
|
}
|
|
60
63
|
export declare function bindConditionalMutation<Result>(identityScope: object | symbol | undefined, binding: ConditionalMutationBinding, action: () => Promise<Result>): Promise<Result>;
|
|
61
64
|
export declare class MemoryFileSystem implements FileSystem {
|
|
62
|
-
#private;
|
|
63
65
|
capabilitiesFor?: NonNullable<FileSystem["capabilitiesFor"]>;
|
|
64
66
|
private get identityScope();
|
|
65
67
|
get capabilities(): FileSystemCapabilities;
|
|
@@ -405,6 +405,7 @@ const ext4HtreeEof64 = (1n << 63n) - 1n;
|
|
|
405
405
|
const extractionStreamGuard = Symbol("extractionStreamGuard");
|
|
406
406
|
const ownedStats = new WeakMap();
|
|
407
407
|
const ownedStores = new WeakMap();
|
|
408
|
+
const receiverCapabilities = new WeakMap();
|
|
408
409
|
// Ensure V8 uses Tagged representation for timestamp fields so all 4 fields share one HeapNumber pointer.
|
|
409
410
|
{
|
|
410
411
|
const dummyAlloc = new MemoryAllocation(new Uint8Array(0), new MemoryLedger(normalizeMemoryFileSystemLimits({})));
|
|
@@ -601,17 +602,24 @@ function customMemoryCapabilities(filesystem) {
|
|
|
601
602
|
}
|
|
602
603
|
export class MemoryFileSystem {
|
|
603
604
|
capabilitiesFor;
|
|
604
|
-
#customCapabilities;
|
|
605
|
-
#identityScopeSym;
|
|
606
605
|
get identityScope() {
|
|
607
|
-
return (this
|
|
606
|
+
return (this._owner.identityScope ??= Symbol());
|
|
608
607
|
}
|
|
609
608
|
get capabilities() {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
609
|
+
const owner = ownedStores.get(this);
|
|
610
|
+
if (owner) {
|
|
611
|
+
if (!owner.customCapabilities) {
|
|
612
|
+
owner.customCapabilities = customMemoryCapabilities(this);
|
|
613
|
+
owner.capabilities = owner.customCapabilities;
|
|
614
|
+
}
|
|
615
|
+
return owner.customCapabilities;
|
|
616
|
+
}
|
|
617
|
+
let caps = receiverCapabilities.get(this);
|
|
618
|
+
if (!caps) {
|
|
619
|
+
caps = customMemoryCapabilities(this);
|
|
620
|
+
receiverCapabilities.set(this, caps);
|
|
613
621
|
}
|
|
614
|
-
return
|
|
622
|
+
return caps;
|
|
615
623
|
}
|
|
616
624
|
nextInode = 1;
|
|
617
625
|
ledger;
|
|
@@ -621,7 +629,6 @@ export class MemoryFileSystem {
|
|
|
621
629
|
root;
|
|
622
630
|
totalBytes = 0;
|
|
623
631
|
symlinkCount = 0;
|
|
624
|
-
#atomicView;
|
|
625
632
|
_getAtomicView() {
|
|
626
633
|
const owner = ownedStores.get(this);
|
|
627
634
|
if (!owner ||
|
|
@@ -648,7 +655,7 @@ export class MemoryFileSystem {
|
|
|
648
655
|
return undefined;
|
|
649
656
|
}
|
|
650
657
|
}
|
|
651
|
-
return
|
|
658
|
+
return owner.atomicView ??= {
|
|
652
659
|
stat: (path) => {
|
|
653
660
|
this.validatePath(path, "overlayAtomicView");
|
|
654
661
|
let node = this.root;
|
|
@@ -48,6 +48,7 @@ export function measureObjectIoStore(store, metrics) {
|
|
|
48
48
|
const publish = store.publish;
|
|
49
49
|
const createStaging = store.createStaging;
|
|
50
50
|
return {
|
|
51
|
+
...(store.noFollow === undefined ? {} : { noFollow: store.noFollow }),
|
|
51
52
|
async acquire(...args) {
|
|
52
53
|
const head = await metrics.measure("store", "acquire", () => store.acquire(...args));
|
|
53
54
|
return head && version(head);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.758",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"@poe-code/terminal-text"
|
|
176
176
|
],
|
|
177
177
|
"optionalDependencies": {
|
|
178
|
-
"toolcraft-schema": "0.0.
|
|
178
|
+
"toolcraft-schema": "0.0.758",
|
|
179
179
|
"toolcraft-design": "*",
|
|
180
180
|
"@poe-code/frontmatter": "*",
|
|
181
181
|
"@poe-code/agent-mcp-config": "*",
|