functionalscript 0.35.2 → 0.37.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/asn.1/module.f.js +1 -1
- package/fs/asserts/proof.f.js +1 -1
- package/fs/base_n/module.f.js +3 -3
- package/fs/base_n/proof.f.js +3 -3
- package/fs/{base128 → basen/base128}/module.f.d.ts +1 -1
- package/fs/{base128 → basen/base128}/module.f.js +1 -1
- package/fs/{base128 → basen/base128}/proof.f.js +3 -3
- package/fs/{base64 → basen/base64}/module.f.d.ts +2 -2
- package/fs/basen/base64/module.f.js +71 -0
- package/fs/{base64 → basen/base64}/proof.f.d.ts +2 -0
- package/fs/{base64 → basen/base64}/proof.f.js +17 -2
- package/fs/{cbase32 → basen/cbase32}/module.f.d.ts +2 -2
- package/fs/{cbase32 → basen/cbase32}/module.f.js +2 -2
- package/fs/{cbase32 → basen/cbase32}/proof.f.js +1 -1
- package/fs/bnf/data/module.f.js +4 -4
- package/fs/bnf/data/proof.f.js +6 -6
- package/fs/bnf/descent/module.f.js +6 -6
- package/fs/bnf/descent/proof.f.js +6 -6
- package/fs/bnf/ll1/module.f.js +9 -9
- package/fs/bnf/ll1/proof.f.js +6 -6
- package/fs/bnf/module.f.js +4 -4
- package/fs/bnf/proof.f.js +2 -2
- package/fs/bnf/testlib.f.js +1 -1
- package/fs/cas/cli/module.f.js +7 -7
- package/fs/cas/cli/proof.f.js +8 -8
- package/fs/cas/mcp/module.f.d.ts +8 -4
- package/fs/cas/mcp/module.f.js +124 -72
- package/fs/cas/mcp/proof.f.d.ts +3 -8
- package/fs/cas/mcp/proof.f.js +122 -186
- package/fs/cas/module.f.js +12 -19
- package/fs/cas/proof.f.d.ts +4 -2
- package/fs/cas/proof.f.js +10 -10
- package/fs/ci/bun/module.f.js +2 -2
- package/fs/ci/common/module.f.d.ts +2 -2
- package/fs/ci/common/module.f.js +4 -4
- package/fs/ci/config/module.f.d.ts +20 -21
- package/fs/ci/config/module.f.js +8 -10
- package/fs/ci/deno/module.f.js +8 -4
- package/fs/ci/module.f.js +9 -9
- package/fs/ci/node/module.f.d.ts +1 -1
- package/fs/ci/node/module.f.js +3 -5
- package/fs/ci/playwright/module.f.js +3 -3
- package/fs/ci/proof.f.js +14 -14
- package/fs/ci/rust/module.f.js +2 -2
- package/fs/cli/module.f.js +3 -3
- package/fs/cli/proof.f.js +3 -3
- package/fs/{types → common}/monoid/module.f.d.ts +1 -1
- package/fs/crypto/hmac/module.f.js +2 -2
- package/fs/crypto/hmac/proof.f.js +5 -5
- package/fs/crypto/pow/module.f.js +3 -3
- package/fs/crypto/pow/proof.f.js +4 -4
- package/fs/crypto/secp/module.f.js +2 -2
- package/fs/crypto/secp/proof.f.js +3 -3
- package/fs/crypto/sha2/module.f.js +2 -2
- package/fs/crypto/sha2/proof.f.js +6 -6
- package/fs/crypto/sign/module.f.js +4 -4
- package/fs/crypto/vdf/module.f.js +1 -1
- package/fs/crypto/vdf/proof.f.js +1 -1
- package/fs/dev/module.f.js +6 -6
- package/fs/dev/package_json/module.f.js +6 -6
- package/fs/dev/package_json/proof.f.js +3 -3
- package/fs/dev/proof.f.js +2 -2
- package/fs/djs/ast/module.f.js +2 -2
- package/fs/djs/ast/proof.f.js +4 -4
- package/fs/djs/examples/m.f.d.ts +1 -1
- package/fs/djs/module.f.d.ts +1 -1
- package/fs/djs/module.f.js +5 -5
- package/fs/djs/parser/module.f.js +4 -4
- package/fs/djs/parser/proof.f.js +19 -7
- package/fs/djs/proof.f.js +3 -3
- package/fs/djs/serializer/module.f.js +6 -6
- package/fs/djs/serializer/proof.f.js +4 -4
- package/fs/djs/tokenizer/module.f.js +3 -3
- package/fs/djs/tokenizer/proof.f.js +5 -5
- package/fs/djs/tokenizer-new/proof.f.js +6 -6
- package/fs/djs/transpiler/module.f.d.ts +5 -0
- package/fs/djs/transpiler/module.f.js +21 -11
- package/fs/djs/transpiler/proof.f.js +5 -5
- package/fs/effects/memory/module.f.js +4 -4
- package/fs/effects/memory/proof.f.js +3 -3
- package/fs/effects/module.f.d.ts +15 -0
- package/fs/effects/module.f.js +15 -1
- package/fs/effects/node/memory/module.js +2 -2
- package/fs/effects/node/memory/proof.js +3 -3
- package/fs/effects/node/module.f.js +10 -20
- package/fs/effects/node/module.js +13 -11
- package/fs/effects/node/proof.f.d.ts +3 -0
- package/fs/effects/node/proof.f.js +19 -1
- package/fs/effects/node/virtual/module.f.js +7 -8
- package/fs/effects/node/virtual/proof.f.d.ts +1 -0
- package/fs/effects/node/virtual/proof.f.js +11 -4
- package/fs/effects/proof.f.d.ts +5 -0
- package/fs/effects/proof.f.js +22 -1
- package/fs/emergent_testing/all.test.js +2 -2
- package/fs/emergent_testing/example.f.d.ts +1 -1
- package/fs/emergent_testing/module.f.js +6 -6
- package/fs/emergent_testing/proof.f.d.ts +19 -17
- package/fs/emergent_testing/proof.f.js +7 -7
- package/fs/emergent_testing/scenarios/all.js +1 -1
- package/fs/fsc/bnf.f.js +2 -2
- package/fs/fsc/json.f.js +1 -1
- package/fs/fsc/module.f.d.ts +1 -0
- package/fs/fsc/module.f.js +11 -7
- package/fs/fsc/proof.f.js +4 -4
- package/fs/fsm/module.f.js +9 -9
- package/fs/fsm/proof.f.js +7 -7
- package/fs/js/tokenizer/module.f.d.ts +1 -1
- package/fs/js/tokenizer/module.f.js +14 -8
- package/fs/js/tokenizer/proof.f.js +64 -5
- package/fs/mcp/module.f.d.ts +13 -13
- package/fs/mcp/module.f.js +8 -8
- package/fs/mcp/proof.f.js +5 -5
- package/fs/mcp/stdio/module.f.d.ts +2 -2
- package/fs/mcp/stdio/module.f.js +10 -10
- package/fs/mcp/stdio/proof.f.js +10 -10
- package/fs/{html → media/html}/module.f.d.ts +3 -3
- package/fs/{html → media/html}/module.f.js +9 -9
- package/fs/media/json/module.f.d.ts +50 -0
- package/fs/{json → media/json}/module.f.js +7 -7
- package/fs/{json → media/json}/parser/module.f.d.ts +2 -2
- package/fs/{json → media/json}/parser/module.f.js +7 -7
- package/fs/{json → media/json}/parser/proof.f.js +24 -6
- package/fs/{json → media/json}/proof.f.js +4 -4
- package/fs/media/json/rpc/module.f.d.ts +114 -0
- package/fs/{json → media/json}/rpc/module.f.js +3 -3
- package/fs/{json → media/json}/rpc/proof.f.js +4 -4
- package/fs/media/json/schema/module.f.d.ts +78 -0
- package/fs/{json → media/json}/schema/module.f.js +2 -2
- package/fs/{json → media/json}/schema/proof.f.js +3 -3
- package/fs/{json → media/json}/serializer/module.f.d.ts +1 -1
- package/fs/{json → media/json}/serializer/module.f.js +2 -2
- package/fs/{json → media/json}/serializer/proof.f.js +2 -2
- package/fs/{json → media/json}/tokenizer/module.f.d.ts +2 -2
- package/fs/{json → media/json}/tokenizer/module.f.js +4 -4
- package/fs/{json → media/json}/tokenizer/proof.f.js +5 -5
- package/fs/media/module.f.d.ts +37 -0
- package/fs/media/module.f.js +24 -0
- package/fs/media/proof.f.d.ts +9 -0
- package/fs/media/proof.f.js +57 -0
- package/fs/media/revision/module.f.d.ts +51 -0
- package/fs/media/revision/module.f.js +110 -0
- package/fs/media/revision/proof.f.d.ts +29 -0
- package/fs/media/revision/proof.f.js +119 -0
- package/fs/{mime → media/type}/module.f.d.ts +6 -6
- package/fs/{mime → media/type}/module.f.js +6 -6
- package/fs/{mime → media/type}/proof.f.js +6 -6
- package/fs/module.f.d.ts +2 -0
- package/fs/{fjs/module.f.js → module.f.js} +8 -8
- package/fs/module.js +4 -0
- package/fs/path/module.f.d.ts +6 -0
- package/fs/path/module.f.js +8 -2
- package/fs/path/proof.f.d.ts +1 -0
- package/fs/path/proof.f.js +40 -2
- package/fs/{fjs/proof.f.d.ts → proof.f.d.ts} +1 -0
- package/fs/{fjs/proof.f.js → proof.f.js} +10 -4
- package/fs/sul/id/module.f.js +9 -9
- package/fs/sul/id/proof.f.js +5 -5
- package/fs/sul/level/hash/module.f.js +3 -3
- package/fs/sul/level/hash/proof.f.js +3 -3
- package/fs/sul/level/literal/module.f.js +5 -5
- package/fs/sul/level/literal/proof.f.js +3 -3
- package/fs/sul/module.f.js +3 -3
- package/fs/sul/proof.f.js +3 -3
- package/fs/text/ascii/proof.f.js +3 -3
- package/fs/text/code_point/module.f.js +2 -2
- package/fs/text/code_point/proof.f.js +1 -1
- package/fs/text/module.f.js +5 -5
- package/fs/text/proof.f.js +4 -4
- package/fs/text/sgr/module.f.js +2 -2
- package/fs/text/sgr/proof.f.js +2 -2
- package/fs/text/utf16/module.f.js +5 -5
- package/fs/text/utf16/proof.f.js +4 -4
- package/fs/text/utf8/module.f.d.ts +6 -0
- package/fs/text/utf8/module.f.js +37 -19
- package/fs/text/utf8/proof.f.js +58 -5
- package/fs/types/array/module.f.js +1 -1
- package/fs/types/array/proof.f.js +3 -3
- package/fs/types/bigfloat/module.f.js +1 -1
- package/fs/types/bigfloat/proof.f.js +1 -1
- package/fs/types/bigint/module.f.js +2 -2
- package/fs/types/bigint/proof.f.js +3 -3
- package/fs/types/bit_vec/module.f.js +8 -8
- package/fs/types/bit_vec/proof.f.js +5 -5
- package/fs/types/btree/find/module.f.js +1 -1
- package/fs/types/btree/find/proof.f.d.ts +3 -1
- package/fs/types/btree/find/proof.f.js +7 -7
- package/fs/types/btree/module.f.js +2 -2
- package/fs/types/btree/proof.f.d.ts +11 -5
- package/fs/types/btree/proof.f.js +7 -7
- package/fs/types/btree/remove/module.f.js +4 -4
- package/fs/types/btree/remove/proof.f.d.ts +5 -2
- package/fs/types/btree/remove/proof.f.js +5 -5
- package/fs/types/btree/set/module.f.js +3 -3
- package/fs/types/btree/set/proof.f.js +4 -4
- package/fs/types/byte_set/module.f.js +2 -2
- package/fs/types/byte_set/proof.f.js +4 -4
- package/fs/types/function/compare/proof.f.js +1 -1
- package/fs/types/function/operator/proof.f.d.ts +21 -10
- package/fs/types/function/operator/proof.f.js +1 -1
- package/fs/types/function/proof.f.js +1 -1
- package/fs/types/list/module.f.js +2 -2
- package/fs/types/list/proof.f.d.ts +15 -7
- package/fs/types/list/proof.f.js +4 -4
- package/fs/types/map/proof.f.js +2 -2
- package/fs/types/nibble_set/proof.f.js +2 -2
- package/fs/types/nullable/module.f.js +2 -2
- package/fs/types/nullable/proof.f.js +1 -1
- package/fs/types/number/module.f.js +5 -5
- package/fs/types/number/proof.f.js +1 -1
- package/fs/types/object/module.f.js +4 -4
- package/fs/types/object/proof.f.js +1 -1
- package/fs/types/ordered_map/module.f.js +6 -6
- package/fs/types/ordered_map/proof.f.js +3 -3
- package/fs/types/patricia_trie/proof.f.d.ts +11 -5
- package/fs/types/patricia_trie/proof.f.js +2 -2
- package/fs/types/prime_field/module.f.js +2 -2
- package/fs/types/prime_field/proof.f.js +2 -2
- package/fs/types/range/proof.f.js +1 -1
- package/fs/types/range_map/module.f.js +4 -4
- package/fs/types/range_map/proof.f.js +7 -7
- package/fs/types/result/module.f.d.ts +4 -0
- package/fs/types/result/module.f.js +4 -0
- package/fs/types/result/module.js +1 -1
- package/fs/types/result/proof.f.d.ts +9 -3
- package/fs/types/result/proof.f.js +12 -2
- package/fs/types/rtti/common/module.f.js +4 -4
- package/fs/types/rtti/module.f.d.ts +2 -2
- package/fs/types/rtti/module.f.js +1 -1
- package/fs/types/rtti/parse/module.f.js +5 -5
- package/fs/types/rtti/parse/proof.f.js +2 -2
- package/fs/types/rtti/ts/module.f.js +1 -1
- package/fs/types/rtti/ts/proof.f.js +2 -2
- package/fs/types/rtti/validate/module.f.js +4 -4
- package/fs/types/rtti/validate/proof.f.js +2 -2
- package/fs/types/sorted_list/module.f.js +3 -3
- package/fs/types/sorted_list/proof.f.js +6 -6
- package/fs/types/sorted_set/module.f.js +1 -1
- package/fs/types/sorted_set/proof.f.js +6 -6
- package/fs/types/string/module.f.js +4 -4
- package/fs/types/string/proof.f.js +2 -2
- package/fs/types/string_set/module.f.js +6 -6
- package/fs/types/string_set/proof.f.js +1 -1
- package/fs/types/ts/proof.f.d.ts +18 -18
- package/fs/types/ts/proof.f.js +1 -1
- package/fs/types/uint8array/module.f.js +4 -4
- package/fs/types/uint8array/proof.f.js +4 -4
- package/fs/website/module.f.js +3 -3
- package/fs/website/proof.f.js +3 -3
- package/package.json +8 -8
- package/fs/base64/module.f.js +0 -60
- package/fs/fjs/module.f.d.ts +0 -2
- package/fs/fjs/module.js +0 -4
- package/fs/json/module.f.d.ts +0 -50
- package/fs/json/rpc/module.f.d.ts +0 -114
- package/fs/json/schema/module.f.d.ts +0 -77
- /package/fs/{base128 → basen/base128}/proof.f.d.ts +0 -0
- /package/fs/{cbase32 → basen/cbase32}/proof.f.d.ts +0 -0
- /package/fs/{types → common}/monoid/module.f.js +0 -0
- /package/fs/{types → common}/monoid/proof.f.d.ts +0 -0
- /package/fs/{types → common}/monoid/proof.f.js +0 -0
- /package/fs/{html → media/html}/proof.f.d.ts +0 -0
- /package/fs/{html → media/html}/proof.f.js +0 -0
- /package/fs/{json → media/json}/parser/proof.f.d.ts +0 -0
- /package/fs/{json → media/json}/proof.f.d.ts +0 -0
- /package/fs/{json → media/json}/rpc/proof.f.d.ts +0 -0
- /package/fs/{json → media/json}/schema/proof.f.d.ts +0 -0
- /package/fs/{json → media/json}/serializer/proof.f.d.ts +0 -0
- /package/fs/{json → media/json}/tokenizer/proof.f.d.ts +0 -0
- /package/fs/{mime → media/type}/proof.f.d.ts +0 -0
- /package/fs/{fjs/module.d.ts → module.d.ts} +0 -0
|
@@ -27,24 +27,25 @@ export declare const helpers: {
|
|
|
27
27
|
functionWithParamsReturnsEmpty: () => void;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
+
declare const defaultReporterExpectedToThrow: () => void;
|
|
30
31
|
export declare const proof: {
|
|
31
|
-
flat:
|
|
32
|
-
nested:
|
|
33
|
-
throwKey:
|
|
34
|
-
throwKeyFail:
|
|
35
|
-
mixedPassFail:
|
|
36
|
-
returnValueSubTree:
|
|
37
|
-
arrayKeys:
|
|
38
|
-
nonTestFilesSkipped:
|
|
39
|
-
multipleFiles:
|
|
40
|
-
throwByFunctionName:
|
|
41
|
-
namedExports:
|
|
42
|
-
defaultReporterOutput:
|
|
43
|
-
defaultReporterOutputLargeDuration:
|
|
44
|
-
defaultReporterFailOutput:
|
|
45
|
-
githubReporterOutput:
|
|
46
|
-
registerSuffixes:
|
|
47
|
-
defaultReporterExpectedToThrow:
|
|
32
|
+
flat: typeof flat;
|
|
33
|
+
nested: typeof nested;
|
|
34
|
+
throwKey: typeof throwKey;
|
|
35
|
+
throwKeyFail: typeof throwKeyFail;
|
|
36
|
+
mixedPassFail: typeof mixedPassFail;
|
|
37
|
+
returnValueSubTree: typeof returnValueSubTree;
|
|
38
|
+
arrayKeys: typeof arrayKeys;
|
|
39
|
+
nonTestFilesSkipped: typeof nonTestFilesSkipped;
|
|
40
|
+
multipleFiles: typeof multipleFiles;
|
|
41
|
+
throwByFunctionName: typeof throwByFunctionName;
|
|
42
|
+
namedExports: typeof namedExports;
|
|
43
|
+
defaultReporterOutput: typeof defaultReporterOutput;
|
|
44
|
+
defaultReporterOutputLargeDuration: typeof defaultReporterOutputLargeDuration;
|
|
45
|
+
defaultReporterFailOutput: typeof defaultReporterFailOutput;
|
|
46
|
+
githubReporterOutput: typeof githubReporterOutput;
|
|
47
|
+
registerSuffixes: typeof registerSuffixes;
|
|
48
|
+
defaultReporterExpectedToThrow: typeof defaultReporterExpectedToThrow;
|
|
48
49
|
helpers: {
|
|
49
50
|
isInteger: () => void;
|
|
50
51
|
isIdentifier: () => void;
|
|
@@ -59,3 +60,4 @@ export declare const proof: {
|
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
62
|
};
|
|
63
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { log } from
|
|
2
|
-
import { defaultNodeProgramOptions, emptyState } from
|
|
3
|
-
import { virtual } from
|
|
4
|
-
import { assert, assertEq } from
|
|
5
|
-
import { testAll, defaultReporter, fmtPath, fmtTerm, fmtImport, ghEscape, isInteger, isIdentifier, registerModule, parseTestSet, defaultTest, } from
|
|
6
|
-
import { run as mockRun } from
|
|
7
|
-
import { shouldLoad } from
|
|
1
|
+
import { log } from '../effects/node/module.f.js';
|
|
2
|
+
import { defaultNodeProgramOptions, emptyState } from '../effects/node/virtual/module.f.js';
|
|
3
|
+
import { virtual } from '../effects/node/virtual/module.f.js';
|
|
4
|
+
import { assert, assertEq } from '../asserts/module.f.js';
|
|
5
|
+
import { testAll, defaultReporter, fmtPath, fmtTerm, fmtImport, ghEscape, isInteger, isIdentifier, registerModule, parseTestSet, defaultTest, } from './module.f.js';
|
|
6
|
+
import { run as mockRun } from '../effects/mock/module.f.js';
|
|
7
|
+
import { shouldLoad } from '../dev/module.f.js';
|
|
8
8
|
const writeEvent = (event) => log(JSON.stringify(event));
|
|
9
9
|
const parseEvents = (stdout) => stdout === '' ? [] : stdout.trimEnd().split('\n').map(line => JSON.parse(line));
|
|
10
10
|
const makeReporter = () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '../all.test.js';
|
package/fs/fsc/bnf.f.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { range, remove, set, option } from
|
|
2
|
-
import { digit, json, unicode, ws0, ws1, wsNoNewLine0 } from
|
|
1
|
+
import { range, remove, set, option } from '../bnf/module.f.js';
|
|
2
|
+
import { digit, json, unicode, ws0, ws1, wsNoNewLine0 } from './json.f.js';
|
|
3
3
|
export const wsModule = () => [ws0, module];
|
|
4
4
|
const module = () => ({
|
|
5
5
|
json: [json, ws0],
|
package/fs/fsc/json.f.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join0Plus, rangeEncode, range, remove, repeat0Plus, set, option } from
|
|
1
|
+
import { join0Plus, rangeEncode, range, remove, repeat0Plus, set, option } from '../bnf/module.f.js';
|
|
2
2
|
// space
|
|
3
3
|
const wsNoNewLineItem = set(' \t\r');
|
|
4
4
|
export const wsNoNewLine0 = repeat0Plus(wsNoNewLineItem);
|
package/fs/fsc/module.f.d.ts
CHANGED
package/fs/fsc/module.f.js
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { strictEqual } from
|
|
7
|
-
import { merge as rangeMapMerge, fromRange, get, } from
|
|
8
|
-
import { reduce as listReduce, toArray, map } from
|
|
9
|
-
import { range as asciiRange } from
|
|
10
|
-
import { fn } from
|
|
11
|
-
import { one } from
|
|
6
|
+
import { strictEqual } from '../types/function/operator/module.f.js';
|
|
7
|
+
import { merge as rangeMapMerge, fromRange, get, } from '../types/range_map/module.f.js';
|
|
8
|
+
import { reduce as listReduce, toArray, map } from '../types/list/module.f.js';
|
|
9
|
+
import { range as asciiRange } from '../text/ascii/module.f.js';
|
|
10
|
+
import { fn } from '../types/function/module.f.js';
|
|
11
|
+
import { one } from '../types/range/module.f.js';
|
|
12
|
+
import { assertEq } from '../asserts/module.f.js';
|
|
12
13
|
const fromCharCode = String.fromCharCode;
|
|
13
14
|
const unexpectedSymbol = codePoint => [[`unexpected symbol ${codePoint}`], unexpectedSymbol];
|
|
14
15
|
const def = () => unexpectedSymbol;
|
|
@@ -65,5 +66,8 @@ export const proof = {
|
|
|
65
66
|
b(undefined);
|
|
66
67
|
union(a)(b);
|
|
67
68
|
}
|
|
68
|
-
}
|
|
69
|
+
},
|
|
70
|
+
// `def` is the range-map's default handler; the public API never calls it directly
|
|
71
|
+
// (`init` covers every code point), so exercise it here where it's in scope.
|
|
72
|
+
defHandler: () => assertEq(def(undefined), unexpectedSymbol)
|
|
69
73
|
};
|
package/fs/fsc/proof.f.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { init, terminal } from
|
|
2
|
-
import { one } from
|
|
3
|
-
import { stringify } from
|
|
4
|
-
import { assertEq } from
|
|
1
|
+
import { init, terminal } from './module.f.js';
|
|
2
|
+
import { one } from '../text/ascii/module.f.js';
|
|
3
|
+
import { stringify } from '../media/json/module.f.js';
|
|
4
|
+
import { assertEq } from '../asserts/module.f.js';
|
|
5
5
|
const s = stringify(i => i);
|
|
6
6
|
const f = v => {
|
|
7
7
|
const n = one(v);
|
package/fs/fsm/module.f.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { equal, isEmpty, fold, toArray, scan, foldScan, empty as emptyList } from
|
|
7
|
-
import { toRangeMap, union as byteSetUnion, one, empty, range } from
|
|
8
|
-
import { intersect, union as sortedSetUnion } from
|
|
9
|
-
import { merge, get as rangeMapGet } from
|
|
10
|
-
import { strictEqual } from
|
|
11
|
-
import { stringify } from
|
|
12
|
-
import { identity } from
|
|
13
|
-
import { stringToList } from
|
|
14
|
-
import { cmp } from
|
|
6
|
+
import { equal, isEmpty, fold, toArray, scan, foldScan, empty as emptyList } from '../types/list/module.f.js';
|
|
7
|
+
import { toRangeMap, union as byteSetUnion, one, empty, range } from '../types/byte_set/module.f.js';
|
|
8
|
+
import { intersect, union as sortedSetUnion } from '../types/sorted_set/module.f.js';
|
|
9
|
+
import { merge, get as rangeMapGet } from '../types/range_map/module.f.js';
|
|
10
|
+
import { strictEqual } from '../types/function/operator/module.f.js';
|
|
11
|
+
import { stringify } from '../media/json/module.f.js';
|
|
12
|
+
import { identity } from '../types/function/module.f.js';
|
|
13
|
+
import { stringToList } from '../text/utf16/module.f.js';
|
|
14
|
+
import { cmp } from '../types/string/module.f.js';
|
|
15
15
|
const stringifyIdentity = stringify(identity);
|
|
16
16
|
export const toRange = s => {
|
|
17
17
|
const [b, e] = toArray(stringToList(s));
|
package/fs/fsm/proof.f.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { dfa, run, toRange, toUnion } from
|
|
2
|
-
import { union } from
|
|
3
|
-
import { sort, fromEntries } from
|
|
4
|
-
import { stringify } from
|
|
5
|
-
import { identity } from
|
|
6
|
-
import { toArray } from
|
|
7
|
-
import { stringToList } from
|
|
1
|
+
import { dfa, run, toRange, toUnion } from './module.f.js';
|
|
2
|
+
import { union } from '../types/byte_set/module.f.js';
|
|
3
|
+
import { sort, fromEntries } from '../types/object/module.f.js';
|
|
4
|
+
import { stringify } from '../media/json/module.f.js';
|
|
5
|
+
import { identity } from '../types/function/module.f.js';
|
|
6
|
+
import { toArray } from '../types/list/module.f.js';
|
|
7
|
+
import { stringToList } from '../text/utf16/module.f.js';
|
|
8
8
|
const stringifyIdentity = stringify(identity);
|
|
9
9
|
const buildDfa = () => {
|
|
10
10
|
const lowercaseAlpha = toRange('az');
|
|
@@ -92,7 +92,7 @@ export type JsTokenWithMetadata = {
|
|
|
92
92
|
readonly token: JsToken;
|
|
93
93
|
readonly metadata: TokenMetadata;
|
|
94
94
|
};
|
|
95
|
-
type ErrorMessage = '" are missing' | 'unescaped character' | 'invalid hex value' | 'unexpected character' | 'invalid number' | 'invalid token' | '*\/ expected' | 'unterminated string literal' | 'eof';
|
|
95
|
+
type ErrorMessage = '" are missing' | 'unescaped character' | 'invalid hex value' | 'unexpected character' | 'invalid number' | 'invalid token' | '*\/ expected' | 'unterminated string literal' | 'unescaped control character in string' | 'eof';
|
|
96
96
|
export declare const isKeywordToken: (token: JsToken) => boolean;
|
|
97
97
|
export declare const tokenize: (input: List<number>) => (path: string) => List<JsTokenWithMetadata>;
|
|
98
98
|
export declare const proof: {
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
8
|
-
import { strictEqual } from
|
|
9
|
-
import { merge, fromRange, get } from
|
|
10
|
-
import { empty, stateScan, flat, toArray, reduce as listReduce, scan, map as listMap } from
|
|
11
|
-
import { at, fromEntries } from
|
|
12
|
-
import { one } from
|
|
8
|
+
import { strictEqual } from '../../types/function/operator/module.f.js';
|
|
9
|
+
import { merge, fromRange, get } from '../../types/range_map/module.f.js';
|
|
10
|
+
import { empty, stateScan, flat, toArray, reduce as listReduce, scan, map as listMap } from '../../types/list/module.f.js';
|
|
11
|
+
import { at, fromEntries } from '../../types/ordered_map/module.f.js';
|
|
12
|
+
import { one } from '../../types/range/module.f.js';
|
|
13
13
|
import { range,
|
|
14
14
|
//
|
|
15
15
|
backspace, ht, lf, ff, cr,
|
|
@@ -26,8 +26,8 @@ leftSquareBracket, reverseSolidus, rightSquareBracket, lowLine,
|
|
|
26
26
|
//
|
|
27
27
|
latinSmallLetterRange, latinSmallLetterA, latinSmallLetterB, latinSmallLetterE, latinSmallLetterF, latinSmallLetterN, latinSmallLetterR, latinSmallLetterT, latinSmallLetterU,
|
|
28
28
|
//
|
|
29
|
-
leftCurlyBracket, rightCurlyBracket, dollarSign } from
|
|
30
|
-
import { todo } from
|
|
29
|
+
leftCurlyBracket, rightCurlyBracket, dollarSign } from '../../text/ascii/module.f.js';
|
|
30
|
+
import { todo } from '../../asserts/module.f.js';
|
|
31
31
|
const { fromCharCode } = String;
|
|
32
32
|
const rangeOneNine = range('19');
|
|
33
33
|
const rangeSetNewLine = [
|
|
@@ -372,10 +372,16 @@ const invalidNumberStateOp = create(() => () => [empty, { kind: 'invalidNumber'
|
|
|
372
372
|
return [{ first: { kind: 'error', message: 'invalid number' }, tail: next[0] }, next[1]];
|
|
373
373
|
})
|
|
374
374
|
]);
|
|
375
|
+
const rangeSetStringControl = [
|
|
376
|
+
[0x00, 0x09],
|
|
377
|
+
[0x0b, 0x0c],
|
|
378
|
+
[0x0e, 0x1f],
|
|
379
|
+
];
|
|
375
380
|
const parseStringStateOp = create((state) => input => [empty, { kind: 'string', value: appendChar(state.value)(input) }])([
|
|
376
381
|
rangeFunc(one(quotationMark))(state => () => [[{ kind: 'string', value: state.value }], { kind: 'initial' }]),
|
|
377
382
|
rangeFunc(one(reverseSolidus))(state => () => [empty, { kind: 'escapeChar', value: state.value }]),
|
|
378
|
-
rangeSetFunc(rangeSetNewLine)(() => () => [[{ kind: 'error', message: 'unterminated string literal' }], { kind: 'nl' }])
|
|
383
|
+
rangeSetFunc(rangeSetNewLine)(() => () => [[{ kind: 'error', message: 'unterminated string literal' }], { kind: 'nl' }]),
|
|
384
|
+
rangeSetFunc(rangeSetStringControl)(state => () => [[{ kind: 'error', message: 'unescaped control character in string' }], { kind: 'string', value: state.value }])
|
|
379
385
|
]);
|
|
380
386
|
const parseEscapeDefault = state => input => {
|
|
381
387
|
const next = tokenizeOp(input, { kind: 'string', value: state.value });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { tokenize } from
|
|
2
|
-
import { map, toArray } from
|
|
3
|
-
import { stringifyAsTree } from
|
|
4
|
-
import { sort } from
|
|
5
|
-
import { stringToList } from
|
|
1
|
+
import { tokenize } from './module.f.js';
|
|
2
|
+
import { map, toArray } from '../../types/list/module.f.js';
|
|
3
|
+
import { stringifyAsTree } from '../../djs/serializer/module.f.js';
|
|
4
|
+
import { sort } from '../../types/object/module.f.js';
|
|
5
|
+
import { stringToList } from '../../text/utf16/module.f.js';
|
|
6
6
|
const tokenizeString = s => toArray(map(withoutMetada)(tokenize(stringToList(s))('')));
|
|
7
7
|
const tokenizeStringWithMetadata = s => toArray(tokenize(stringToList(s))(''));
|
|
8
8
|
const stringify = stringifyAsTree(sort);
|
|
@@ -141,6 +141,65 @@ export const proof = {
|
|
|
141
141
|
throw result;
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
+
() => {
|
|
145
|
+
// literal TAB inside a string is rejected; the escaped form is not
|
|
146
|
+
const result = stringify(tokenizeString('"\t"'));
|
|
147
|
+
if (result !== '[{"kind":"error","message":"unescaped control character in string"},{"kind":"string","value":""},{"kind":"eof"}]') {
|
|
148
|
+
throw result;
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
() => {
|
|
152
|
+
const result = stringify(tokenizeString('"\\t"'));
|
|
153
|
+
if (result !== '[{"kind":"string","value":"\\t"},{"kind":"eof"}]') {
|
|
154
|
+
throw result;
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
() => {
|
|
158
|
+
// literal VT (no JSON short escape; only \u000b is valid)
|
|
159
|
+
const result = stringify(tokenizeString('"\v"'));
|
|
160
|
+
if (result !== '[{"kind":"error","message":"unescaped control character in string"},{"kind":"string","value":""},{"kind":"eof"}]') {
|
|
161
|
+
throw result;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
() => {
|
|
165
|
+
const result = stringify(tokenizeString('"\\u000b"'));
|
|
166
|
+
if (result !== '[{"kind":"string","value":"\\u000b"},{"kind":"eof"}]') {
|
|
167
|
+
throw result;
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
() => {
|
|
171
|
+
// literal FF is rejected; the escaped form is not
|
|
172
|
+
const result = stringify(tokenizeString('"\f"'));
|
|
173
|
+
if (result !== '[{"kind":"error","message":"unescaped control character in string"},{"kind":"string","value":""},{"kind":"eof"}]') {
|
|
174
|
+
throw result;
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
() => {
|
|
178
|
+
const result = stringify(tokenizeString('"\\f"'));
|
|
179
|
+
if (result !== '[{"kind":"string","value":"\\f"},{"kind":"eof"}]') {
|
|
180
|
+
throw result;
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
() => {
|
|
184
|
+
// literal NUL (no JSON short escape; only \u0000 is valid)
|
|
185
|
+
const result = stringify(tokenizeString('"\0"'));
|
|
186
|
+
if (result !== '[{"kind":"error","message":"unescaped control character in string"},{"kind":"string","value":""},{"kind":"eof"}]') {
|
|
187
|
+
throw result;
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
() => {
|
|
191
|
+
const result = stringify(tokenizeString('"\\u0000"'));
|
|
192
|
+
if (result !== '[{"kind":"string","value":"\\u0000"},{"kind":"eof"}]') {
|
|
193
|
+
throw result;
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
() => {
|
|
197
|
+
// control character surrounded by ordinary text still recovers the rest of the string
|
|
198
|
+
const result = stringify(tokenizeString('"a\tb"'));
|
|
199
|
+
if (result !== '[{"kind":"error","message":"unescaped control character in string"},{"kind":"string","value":"ab"},{"kind":"eof"}]') {
|
|
200
|
+
throw result;
|
|
201
|
+
}
|
|
202
|
+
},
|
|
144
203
|
() => {
|
|
145
204
|
const result = stringify(tokenizeString('"\\u1234"'));
|
|
146
205
|
if (result !== '[{"kind":"string","value":"ሴ"},{"kind":"eof"}]') {
|
package/fs/mcp/module.f.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type Unknown } from '../json/module.f.ts';
|
|
1
|
+
import { unknown, type Unknown } from '../media/json/module.f.ts';
|
|
2
2
|
import type { Ts } from '../types/rtti/ts/module.f.ts';
|
|
3
3
|
import { type Operation, type Effect } from '../effects/module.f.ts';
|
|
4
4
|
import { type Key, type MemOp } from '../effects/memory/module.f.ts';
|
|
5
|
-
import { type Response } from '../json/rpc/module.f.ts';
|
|
5
|
+
import { type Response } from '../media/json/rpc/module.f.ts';
|
|
6
6
|
import type { Type } from '../types/rtti/module.f.ts';
|
|
7
7
|
/** Name + version pair sent in `initialize` requests and responses. */
|
|
8
8
|
export declare const implementation: {
|
|
@@ -20,7 +20,7 @@ export type ServerCapabilities = Ts<typeof serverCapabilities>;
|
|
|
20
20
|
/** Params for the `initialize` request. */
|
|
21
21
|
export declare const initializeParams: {
|
|
22
22
|
readonly protocolVersion: import("../types/rtti/module.f.ts").String;
|
|
23
|
-
readonly capabilities:
|
|
23
|
+
readonly capabilities: typeof unknown;
|
|
24
24
|
readonly clientInfo: {
|
|
25
25
|
readonly name: import("../types/rtti/module.f.ts").String;
|
|
26
26
|
readonly version: import("../types/rtti/module.f.ts").String;
|
|
@@ -44,7 +44,7 @@ export declare const initializeResult: {
|
|
|
44
44
|
export type InitializeResult = Ts<typeof initializeResult>;
|
|
45
45
|
/** Plain-text content item returned by a tool call. */
|
|
46
46
|
export declare const textContent: {
|
|
47
|
-
readonly type:
|
|
47
|
+
readonly type: 'text';
|
|
48
48
|
readonly text: import("../types/rtti/module.f.ts").String;
|
|
49
49
|
};
|
|
50
50
|
export type TextContent = Ts<typeof textContent>;
|
|
@@ -62,7 +62,7 @@ export declare const blobResource: {
|
|
|
62
62
|
export type BlobResource = Ts<typeof blobResource>;
|
|
63
63
|
/** An `EmbeddedResource` content item wrapping a {@link blobResource}. */
|
|
64
64
|
export declare const embeddedResource: {
|
|
65
|
-
readonly type:
|
|
65
|
+
readonly type: 'resource';
|
|
66
66
|
readonly resource: {
|
|
67
67
|
readonly uri: import("../types/rtti/module.f.ts").String;
|
|
68
68
|
readonly mimeType: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
@@ -76,10 +76,10 @@ export type EmbeddedResource = Ts<typeof embeddedResource>;
|
|
|
76
76
|
* `image` and `audio` variants are not modelled yet.
|
|
77
77
|
*/
|
|
78
78
|
export declare const contentItem: import("../types/rtti/module.f.ts").Or<[{
|
|
79
|
-
readonly type:
|
|
79
|
+
readonly type: 'text';
|
|
80
80
|
readonly text: import("../types/rtti/module.f.ts").String;
|
|
81
81
|
}, {
|
|
82
|
-
readonly type:
|
|
82
|
+
readonly type: 'resource';
|
|
83
83
|
readonly resource: {
|
|
84
84
|
readonly uri: import("../types/rtti/module.f.ts").String;
|
|
85
85
|
readonly mimeType: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
@@ -95,7 +95,7 @@ export type ContentItem = Ts<typeof contentItem>;
|
|
|
95
95
|
export declare const tool: {
|
|
96
96
|
readonly name: import("../types/rtti/module.f.ts").String;
|
|
97
97
|
readonly description: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
98
|
-
readonly inputSchema:
|
|
98
|
+
readonly inputSchema: typeof unknown;
|
|
99
99
|
};
|
|
100
100
|
export type Tool = Ts<typeof tool>;
|
|
101
101
|
/**
|
|
@@ -110,22 +110,22 @@ export declare const toolsListResult: {
|
|
|
110
110
|
readonly tools: import("../types/rtti/module.f.ts").Type1<"array", {
|
|
111
111
|
readonly name: import("../types/rtti/module.f.ts").String;
|
|
112
112
|
readonly description: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
113
|
-
readonly inputSchema:
|
|
113
|
+
readonly inputSchema: typeof unknown;
|
|
114
114
|
}>;
|
|
115
115
|
readonly nextCursor: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
116
116
|
};
|
|
117
117
|
export type ToolsListResult = Ts<typeof toolsListResult>;
|
|
118
118
|
export declare const toolsCallParams: {
|
|
119
119
|
readonly name: import("../types/rtti/module.f.ts").String;
|
|
120
|
-
readonly arguments: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").Type1<"record",
|
|
120
|
+
readonly arguments: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").Type1<"record", typeof unknown>, undefined]>;
|
|
121
121
|
};
|
|
122
122
|
export type ToolsCallParams = Ts<typeof toolsCallParams>;
|
|
123
123
|
export declare const toolsCallResult: {
|
|
124
124
|
readonly content: import("../types/rtti/module.f.ts").Type1<"array", import("../types/rtti/module.f.ts").Or<[{
|
|
125
|
-
readonly type:
|
|
125
|
+
readonly type: 'text';
|
|
126
126
|
readonly text: import("../types/rtti/module.f.ts").String;
|
|
127
127
|
}, {
|
|
128
|
-
readonly type:
|
|
128
|
+
readonly type: 'resource';
|
|
129
129
|
readonly resource: {
|
|
130
130
|
readonly uri: import("../types/rtti/module.f.ts").String;
|
|
131
131
|
readonly mimeType: import("../types/rtti/module.f.ts").Or<readonly [import("../types/rtti/module.f.ts").String, undefined]>;
|
|
@@ -191,7 +191,7 @@ export type Handle<O extends Operation> = (value: Unknown) => Effect<O, Response
|
|
|
191
191
|
export declare const notInitialized: import("../types/rtti/ts/module.f.ts").StructTs<{
|
|
192
192
|
readonly code: import("../types/rtti/module.f.ts").Number;
|
|
193
193
|
readonly message: import("../types/rtti/module.f.ts").String;
|
|
194
|
-
readonly data: import("../types/rtti/module.f.ts").Or<readonly [
|
|
194
|
+
readonly data: import("../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
195
195
|
}>;
|
|
196
196
|
/** State carried before the peer sends `initialize`. */
|
|
197
197
|
export type Uninitialized = readonly ['uninitialized'];
|
package/fs/mcp/module.f.js
CHANGED
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Each schema is both a runtime decoder (`validate(schema)`) and a static
|
|
11
11
|
* TypeScript type (`Ts<typeof schema>`). Transport framing (stdio) and the
|
|
12
|
-
* JSON-RPC dispatcher are in `fs/json/rpc/module.f.ts`.
|
|
12
|
+
* JSON-RPC dispatcher are in `fs/media/json/rpc/module.f.ts`.
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import { boolean, string, option, array, record, or } from
|
|
17
|
-
import { unknown } from
|
|
18
|
-
import { pure } from
|
|
19
|
-
import { read, write } from
|
|
20
|
-
import { decodeRequest, rpcError, invalidRequest, invalidParams, methodNotFound, jsonrpc, } from
|
|
21
|
-
import { validate } from
|
|
22
|
-
import { toJsonSchema } from
|
|
16
|
+
import { boolean, string, option, array, record, or } from '../types/rtti/module.f.js';
|
|
17
|
+
import { unknown } from '../media/json/module.f.js';
|
|
18
|
+
import { pure } from '../effects/module.f.js';
|
|
19
|
+
import { read, write } from '../effects/memory/module.f.js';
|
|
20
|
+
import { decodeRequest, rpcError, invalidRequest, invalidParams, methodNotFound, jsonrpc, } from '../media/json/rpc/module.f.js';
|
|
21
|
+
import { validate } from '../types/rtti/validate/module.f.js';
|
|
22
|
+
import { toJsonSchema } from '../media/json/schema/module.f.js';
|
|
23
23
|
// ── Shared ─────────────────────────────────────────────────────────────────────
|
|
24
24
|
/** Name + version pair sent in `initialize` requests and responses. */
|
|
25
25
|
export const implementation = {
|
package/fs/mcp/proof.f.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { assert, assertEq } from
|
|
2
|
-
import { pure } from
|
|
3
|
-
import { run } from
|
|
4
|
-
import { asBase, asNominal, create, read } from
|
|
5
|
-
import { uninitializedState, mcpStep, notInitialized, } from
|
|
1
|
+
import { assert, assertEq } from '../asserts/module.f.js';
|
|
2
|
+
import { pure } from '../effects/module.f.js';
|
|
3
|
+
import { run } from '../effects/mock/module.f.js';
|
|
4
|
+
import { asBase, asNominal, create, read } from '../effects/memory/module.f.js';
|
|
5
|
+
import { uninitializedState, mcpStep, notInitialized, } from './module.f.js';
|
|
6
6
|
const initial = { next: 0, values: {} };
|
|
7
7
|
const mock = {
|
|
8
8
|
memCreate: value => state => {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { type Effect, type Operation } from '../../effects/module.f.ts';
|
|
33
33
|
import { type Read, type Write } from '../../effects/node/module.f.ts';
|
|
34
|
-
import { type Unknown } from '../../json/module.f.ts';
|
|
35
|
-
import { type Response } from '../../json/rpc/module.f.ts';
|
|
34
|
+
import { type Unknown } from '../../media/json/module.f.ts';
|
|
35
|
+
import { type Response } from '../../media/json/rpc/module.f.ts';
|
|
36
36
|
/**
|
|
37
37
|
* A transport step: maps one parsed JSON-RPC message to a response, or `null`
|
|
38
38
|
* for a notification that needs no reply. The shape of `mcpStep(config)(handlers)(key)`.
|
package/fs/mcp/stdio/module.f.js
CHANGED
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
*
|
|
30
30
|
* @module
|
|
31
31
|
*/
|
|
32
|
-
import { pure } from
|
|
33
|
-
import { readLine, write } from
|
|
34
|
-
import { tryUtf8 } from
|
|
35
|
-
import { stringToList } from
|
|
36
|
-
import { stringify } from
|
|
37
|
-
import { tokenize } from
|
|
38
|
-
import { parse } from
|
|
39
|
-
import { sort } from
|
|
40
|
-
import { internalError, jsonrpc, parseError } from
|
|
41
|
-
import { error, ok } from
|
|
32
|
+
import { pure } from '../../effects/module.f.js';
|
|
33
|
+
import { readLine, write } from '../../effects/node/module.f.js';
|
|
34
|
+
import { tryUtf8 } from '../../text/module.f.js';
|
|
35
|
+
import { stringToList } from '../../text/utf16/module.f.js';
|
|
36
|
+
import { stringify } from '../../media/json/module.f.js';
|
|
37
|
+
import { tokenize } from '../../media/json/tokenizer/module.f.js';
|
|
38
|
+
import { parse } from '../../media/json/parser/module.f.js';
|
|
39
|
+
import { sort } from '../../types/object/module.f.js';
|
|
40
|
+
import { internalError, jsonrpc, parseError } from '../../media/json/rpc/module.f.js';
|
|
41
|
+
import { error, ok } from '../../types/result/module.f.js';
|
|
42
42
|
const stringifyJson = stringify(sort);
|
|
43
43
|
/** The parse-error response (`-32700`, `id: null`) for a malformed input line. */
|
|
44
44
|
const parseErrorResponse = { jsonrpc, error: parseError, id: null };
|
package/fs/mcp/stdio/proof.f.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { assertEq } from
|
|
2
|
-
import { pure } from
|
|
3
|
-
import { emptyState, virtual } from
|
|
4
|
-
import { stringify } from
|
|
5
|
-
import { utf8 } from
|
|
6
|
-
import { fromVec } from
|
|
7
|
-
import { maxLengthBytes } from
|
|
8
|
-
import { sort } from
|
|
9
|
-
import { internalError, jsonrpc, parseError } from
|
|
10
|
-
import { stdioTransport } from
|
|
1
|
+
import { assertEq } from '../../asserts/module.f.js';
|
|
2
|
+
import { pure } from '../../effects/module.f.js';
|
|
3
|
+
import { emptyState, virtual } from '../../effects/node/virtual/module.f.js';
|
|
4
|
+
import { stringify } from '../../media/json/module.f.js';
|
|
5
|
+
import { utf8 } from '../../text/module.f.js';
|
|
6
|
+
import { fromVec } from '../../types/uint8array/module.f.js';
|
|
7
|
+
import { maxLengthBytes } from '../../types/bit_vec/module.f.js';
|
|
8
|
+
import { sort } from '../../types/object/module.f.js';
|
|
9
|
+
import { internalError, jsonrpc, parseError } from '../../media/json/rpc/module.f.js';
|
|
10
|
+
import { stdioTransport } from './module.f.js';
|
|
11
11
|
const stringifyJson = stringify(sort);
|
|
12
12
|
// Extracts the request `id` (a request has one; a notification does not).
|
|
13
13
|
const idOf = (value) => value !== null && typeof value === 'object' && !(value instanceof Array)
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
|
-
import { type List } from '
|
|
8
|
-
import { type StringMap } from '
|
|
9
|
-
import { type Vec } from '
|
|
7
|
+
import { type List } from '../../types/list/module.f.ts';
|
|
8
|
+
import { type StringMap } from '../../types/object/module.f.ts';
|
|
9
|
+
import { type Vec } from '../../types/bit_vec/module.f.ts';
|
|
10
10
|
type Tag = string;
|
|
11
11
|
type Element1 = readonly [Tag, ...Node[]];
|
|
12
12
|
type Element2 = readonly [Tag, Attributes, ...Node[]];
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
|
-
import { map, flatMap, flat, concat as listConcat } from
|
|
8
|
-
import { concat, concat as stringConcat } from
|
|
9
|
-
import { definedEntries } from
|
|
10
|
-
import { compose } from
|
|
11
|
-
import { stringToList } from
|
|
12
|
-
import { includes } from
|
|
13
|
-
import {} from
|
|
14
|
-
import { utf8 } from
|
|
15
|
-
import { quotationMark, ampersand, lessThanSign, greaterThanSign } from
|
|
7
|
+
import { map, flatMap, flat, concat as listConcat } from '../../types/list/module.f.js';
|
|
8
|
+
import { concat, concat as stringConcat } from '../../types/string/module.f.js';
|
|
9
|
+
import { definedEntries } from '../../types/object/module.f.js';
|
|
10
|
+
import { compose } from '../../types/function/module.f.js';
|
|
11
|
+
import { stringToList } from '../../text/utf16/module.f.js';
|
|
12
|
+
import { includes } from '../../types/array/module.f.js';
|
|
13
|
+
import {} from '../../types/bit_vec/module.f.js';
|
|
14
|
+
import { utf8 } from '../../text/module.f.js';
|
|
15
|
+
import { quotationMark, ampersand, lessThanSign, greaterThanSign } from '../../text/ascii/module.f.js';
|
|
16
16
|
const { fromCharCode } = String;
|
|
17
17
|
/**
|
|
18
18
|
* Void Elements
|