functionalscript 0.31.0 → 0.32.0
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/fs/cas/module.f.js +1 -9
- package/fs/effects/node/module.js +2 -3
- package/fs/fjs/module.f.js +13 -0
- package/package.json +1 -1
package/fs/cas/module.f.js
CHANGED
|
@@ -129,14 +129,6 @@ export const commands = [
|
|
|
129
129
|
.step(forEachStep(j => log(vecToCBase32(j))))
|
|
130
130
|
.step(() => pure(0));
|
|
131
131
|
},
|
|
132
|
-
}
|
|
133
|
-
{
|
|
134
|
-
names: ['mcp'],
|
|
135
|
-
description: 'Run an MCP server over stdio exposing the CAS as tools',
|
|
136
|
-
handler: ({ home }) => {
|
|
137
|
-
const c = cas(sha256)(fileKvStore(home));
|
|
138
|
-
return casMcpServer(c, hash => join(home, toPath(hash))).step(() => pure(0));
|
|
139
|
-
},
|
|
140
|
-
},
|
|
132
|
+
}
|
|
141
133
|
];
|
|
142
134
|
export const main = dispatch(commands);
|
|
@@ -27,8 +27,7 @@ import os from 'node:os';
|
|
|
27
27
|
import process from 'node:process';
|
|
28
28
|
import { once } from 'node:events';
|
|
29
29
|
import * as testContext from 'node:test';
|
|
30
|
-
import { concat } from "../../path/module.f.js";
|
|
31
|
-
import { normalize } from "../../path/module.f.js";
|
|
30
|
+
import { concat, normalize, toPosix } from "../../path/module.f.js";
|
|
32
31
|
import {} from "../module.f.js";
|
|
33
32
|
import { asyncRun } from "../module.js";
|
|
34
33
|
import { memoryOperationMap } from "./memory/module.js";
|
|
@@ -234,7 +233,7 @@ const playwrightTestContext = wrapInlineTest(pwTest);
|
|
|
234
233
|
const options = {
|
|
235
234
|
args: process.argv.slice(2),
|
|
236
235
|
env: process.env,
|
|
237
|
-
home: os.homedir(),
|
|
236
|
+
home: toPosix(os.homedir()),
|
|
238
237
|
std: { stdout: process.stdout, stderr: process.stderr },
|
|
239
238
|
testContext,
|
|
240
239
|
bunTestContext,
|
package/fs/fjs/module.f.js
CHANGED
|
@@ -9,6 +9,11 @@ import { commands as casCommands } from "../cas/module.f.js";
|
|
|
9
9
|
import { main as ciMain } from "../ci/module.f.js";
|
|
10
10
|
import { import_ } from "../effects/node/module.f.js";
|
|
11
11
|
import { dispatch } from "../cli/module.f.js";
|
|
12
|
+
import { casMcpServer } from "../cas/mcp/module.f.js";
|
|
13
|
+
import { cas, fileKvStore, toPath } from "../cas/module.f.js";
|
|
14
|
+
import { sha256 } from "../crypto/sha2/module.f.js";
|
|
15
|
+
import { join } from "../path/module.f.js";
|
|
16
|
+
import { pure } from "../effects/module.f.js";
|
|
12
17
|
const commands = [
|
|
13
18
|
{
|
|
14
19
|
names: ['test', 't'],
|
|
@@ -25,6 +30,14 @@ const commands = [
|
|
|
25
30
|
description: 'Content-addressable storage operations',
|
|
26
31
|
handler: casCommands,
|
|
27
32
|
},
|
|
33
|
+
{
|
|
34
|
+
names: ['mcp', 'm'],
|
|
35
|
+
description: 'Run an MCP server over stdio exposing the CAS as tools',
|
|
36
|
+
handler: ({ home }) => {
|
|
37
|
+
const c = cas(sha256)(fileKvStore(home));
|
|
38
|
+
return casMcpServer(c, hash => join(home, toPath(hash))).step(() => pure(0));
|
|
39
|
+
},
|
|
40
|
+
},
|
|
28
41
|
{
|
|
29
42
|
names: ['ci', 'i'],
|
|
30
43
|
description: 'Generate the GitHub Actions CI workflow',
|