functionalscript 0.38.0 → 0.40.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/README.md +1 -1
- package/fjs/bnf/descent/module.f.d.ts +43 -2
- package/fjs/bnf/descent/module.f.js +37 -12
- package/fjs/bnf/descent/proof.f.d.ts +1 -0
- package/fjs/bnf/descent/proof.f.js +73 -32
- package/fjs/bnf/ll1/module.f.js +2 -2
- package/fjs/bnf/token_symbol/module.f.d.ts +38 -0
- package/fjs/bnf/token_symbol/module.f.js +48 -0
- package/fjs/bnf/token_symbol/proof.f.d.ts +10 -0
- package/fjs/bnf/token_symbol/proof.f.js +37 -0
- package/fjs/cas/cli/module.f.js +6 -9
- package/fjs/cas/evo/module.f.d.ts +77 -13
- package/fjs/cas/evo/module.f.js +130 -18
- package/fjs/cas/evo/proof.f.d.ts +7 -0
- package/fjs/cas/evo/proof.f.js +120 -1
- package/fjs/cas/module.f.js +64 -37
- package/fjs/cas/proof.f.d.ts +3 -9
- package/fjs/cas/proof.f.js +94 -74
- package/fjs/ci/bun/module.f.js +3 -3
- package/fjs/ci/common/module.f.d.ts +1 -2
- package/fjs/ci/common/module.f.js +1 -5
- package/fjs/ci/config/module.f.d.ts +11 -8
- package/fjs/ci/config/module.f.js +24 -9
- package/fjs/ci/deno/module.f.js +3 -3
- package/fjs/ci/module.f.js +13 -7
- package/fjs/ci/nix/module.f.d.ts +61 -0
- package/fjs/ci/nix/module.f.js +92 -0
- package/fjs/ci/nix/proof.f.d.ts +23 -0
- package/fjs/ci/nix/proof.f.js +109 -0
- package/fjs/ci/node/module.f.d.ts +23 -1
- package/fjs/ci/node/module.f.js +58 -12
- package/fjs/ci/proof.f.d.ts +2 -0
- package/fjs/ci/proof.f.js +49 -9
- package/fjs/cli/module.f.js +2 -2
- package/fjs/common/monoid/module.f.d.ts +46 -2
- package/fjs/common/monoid/module.f.js +44 -0
- package/fjs/common/monoid/proof.f.d.ts +5 -0
- package/fjs/common/monoid/proof.f.js +27 -1
- package/fjs/dev/module.f.d.ts +1 -0
- package/fjs/dev/module.f.js +38 -27
- package/fjs/dev/update/module.f.d.ts +11 -0
- package/fjs/dev/update/module.f.js +20 -0
- package/fjs/dev/update/proof.f.d.ts +7 -0
- package/fjs/dev/update/proof.f.js +35 -0
- package/fjs/djs/ast/module.f.d.ts +47 -0
- package/fjs/djs/ast/module.f.js +9 -0
- package/fjs/djs/module.f.js +5 -8
- package/fjs/djs/parser/module.f.d.ts +3 -0
- package/fjs/djs/parser/module.f.js +17 -0
- package/fjs/djs/tokenizer/module.f.js +2 -2
- package/fjs/djs/tokenizer/proof.f.d.ts +1 -0
- package/fjs/djs/tokenizer/proof.f.js +70 -16
- package/fjs/djs/transpiler/module.f.js +6 -6
- package/fjs/effects/eff/module.f.d.ts +72 -0
- package/fjs/effects/eff/module.f.js +46 -0
- package/fjs/effects/eff/proof.f.d.ts +11 -0
- package/fjs/effects/eff/proof.f.js +58 -0
- package/fjs/effects/list/module.f.d.ts +11 -5
- package/fjs/effects/list/module.f.js +2 -1
- package/fjs/effects/memory/proof.f.js +7 -8
- package/fjs/effects/module.f.d.ts +334 -52
- package/fjs/effects/module.f.js +253 -45
- package/fjs/effects/node/memory/proof.js +3 -2
- package/fjs/effects/node/module.d.ts +3 -3
- package/fjs/effects/node/module.f.d.ts +18 -8
- package/fjs/effects/node/module.f.js +31 -11
- package/fjs/effects/node/module.js +12 -12
- package/fjs/effects/node/proof.f.d.ts +1 -0
- package/fjs/effects/node/proof.f.js +32 -11
- package/fjs/effects/node/virtual/module.f.js +1 -1
- package/fjs/effects/proof.f.d.ts +32 -6
- package/fjs/effects/proof.f.js +131 -39
- package/fjs/emergent_testing/all.test.js +2 -1
- package/fjs/emergent_testing/module.f.d.ts +3 -3
- package/fjs/emergent_testing/module.f.js +63 -49
- package/fjs/emergent_testing/proof.f.d.ts +4 -0
- package/fjs/emergent_testing/proof.f.js +54 -21
- package/fjs/emergent_testing/scenarios/thenable.pass.js +1 -1
- package/fjs/fsc/module.f.js +4 -4
- package/fjs/fsm/module.f.js +1 -1
- package/fjs/js/tokenizer/module.f.d.ts +1 -0
- package/fjs/js/tokenizer/module.f.js +13 -6
- package/fjs/{cas/mcp → mcp/cas}/module.f.d.ts +3 -25
- package/fjs/{cas/mcp → mcp/cas}/module.f.js +26 -64
- package/fjs/mcp/evo/module.f.d.ts +27 -0
- package/fjs/mcp/evo/module.f.js +94 -0
- package/fjs/{cas/evo/mcp → mcp/evo}/proof.f.d.ts +2 -0
- package/fjs/{cas/evo/mcp → mcp/evo}/proof.f.js +40 -9
- package/fjs/mcp/module.f.d.ts +54 -237
- package/fjs/mcp/module.f.js +55 -258
- package/fjs/mcp/proof.f.d.ts +43 -32
- package/fjs/mcp/proof.f.js +509 -200
- package/fjs/media/nix/module.f.d.ts +30 -0
- package/fjs/media/nix/module.f.js +166 -0
- package/fjs/media/nix/proof.f.d.ts +32 -0
- package/fjs/media/nix/proof.f.js +127 -0
- package/fjs/media/type/module.f.js +2 -2
- package/fjs/media/type/proof.f.js +7 -10
- package/fjs/module.f.js +5 -9
- package/fjs/protocol/json_rpc/module.f.d.ts +114 -0
- package/fjs/{media/json/rpc → protocol/json_rpc}/module.f.js +3 -3
- package/fjs/{media/json/rpc → protocol/json_rpc}/proof.f.js +3 -3
- package/fjs/protocol/mcp/module.f.d.ts +239 -0
- package/fjs/protocol/mcp/module.f.js +272 -0
- package/fjs/protocol/mcp/proof.f.d.ts +34 -0
- package/fjs/protocol/mcp/proof.f.js +208 -0
- package/fjs/{mcp → protocol/mcp}/stdio/module.f.d.ts +7 -7
- package/fjs/{mcp → protocol/mcp}/stdio/module.f.js +22 -22
- package/fjs/{mcp → protocol/mcp}/stdio/proof.f.js +9 -9
- package/fjs/types/bigint/module.f.js +4 -3
- package/fjs/types/bit_vec/module.f.js +5 -15
- package/fjs/types/btree/remove/module.f.d.ts +5 -0
- package/fjs/types/btree/remove/module.f.js +12 -0
- package/fjs/types/list/module.f.d.ts +21 -0
- package/fjs/types/list/module.f.js +17 -0
- package/fjs/types/list/proof.f.d.ts +1 -0
- package/fjs/types/list/proof.f.js +24 -1
- package/fjs/types/number/module.f.js +2 -1
- package/fjs/types/range_map/module.f.d.ts +14 -13
- package/fjs/types/range_map/module.f.js +18 -13
- package/fjs/types/range_map/proof.f.js +26 -39
- package/fjs/types/range_set/module.f.d.ts +5 -0
- package/fjs/types/range_set/module.f.js +16 -0
- package/fjs/types/range_set/proof.f.d.ts +1 -0
- package/fjs/types/range_set/proof.f.js +19 -0
- package/fjs/types/string/module.f.js +10 -2
- package/fjs/website/module.f.js +2 -3
- package/package.json +5 -5
- package/fjs/cas/evo/mcp/module.f.d.ts +0 -19
- package/fjs/cas/evo/mcp/module.f.js +0 -56
- package/fjs/cas/mcp/proof.f.d.ts +0 -45
- package/fjs/cas/mcp/proof.f.js +0 -545
- package/fjs/ci/playwright/module.f.d.ts +0 -2
- package/fjs/ci/playwright/module.f.js +0 -25
- package/fjs/media/json/rpc/module.f.d.ts +0 -114
- /package/fjs/{media/json/rpc → protocol/json_rpc}/proof.f.d.ts +0 -0
- /package/fjs/{mcp → protocol/mcp}/stdio/proof.f.d.ts +0 -0
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import type { Ts } from '../../../types/rtti/ts/module.f.ts';
|
|
2
|
-
import type { Result } from '../../../types/result/module.f.ts';
|
|
3
|
-
import { unknown, type Unknown } from '../module.f.ts';
|
|
4
|
-
export declare const jsonrpc: '2.0';
|
|
5
|
-
/** Request/response identifier: a string, a number, or `null`. */
|
|
6
|
-
declare const id: import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>;
|
|
7
|
-
/**
|
|
8
|
-
* A request or notification envelope. `id` present → request (a response is
|
|
9
|
-
* expected); `id` absent → notification (no response). `params` is optional.
|
|
10
|
-
*
|
|
11
|
-
* https://www.jsonrpc.org/specification#request_object
|
|
12
|
-
*/
|
|
13
|
-
export declare const request: {
|
|
14
|
-
readonly jsonrpc: "2.0";
|
|
15
|
-
readonly method: import("../../../types/rtti/module.f.ts").String;
|
|
16
|
-
readonly params: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
17
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<readonly [import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>, undefined]>;
|
|
18
|
-
};
|
|
19
|
-
/** The JSON-RPC error object. */
|
|
20
|
-
export declare const error: {
|
|
21
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
22
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
23
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
24
|
-
};
|
|
25
|
-
export type Id = Ts<typeof id>;
|
|
26
|
-
export type Request = Ts<typeof request>;
|
|
27
|
-
export type RpcError = Ts<typeof error>;
|
|
28
|
-
export declare const successResponse: {
|
|
29
|
-
readonly jsonrpc: "2.0";
|
|
30
|
-
readonly result: typeof unknown;
|
|
31
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>;
|
|
32
|
-
};
|
|
33
|
-
export declare const errorResponse: {
|
|
34
|
-
readonly jsonrpc: "2.0";
|
|
35
|
-
readonly error: {
|
|
36
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
37
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
38
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
39
|
-
};
|
|
40
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* A response envelope: either a success (`result`) or an error (`error`).
|
|
44
|
-
* Derived from the rtti schema via `Ts<>` — the same declaration is the
|
|
45
|
-
* runtime decoder and the static type, with no drift. rtti structs are open
|
|
46
|
-
* (extra keys allowed), so "result XOR error" is not enforced at runtime; in
|
|
47
|
-
* practice the dispatcher only ever constructs one or the other.
|
|
48
|
-
*
|
|
49
|
-
* https://www.jsonrpc.org/specification#response_object
|
|
50
|
-
*/
|
|
51
|
-
export declare const response: import("../../../types/rtti/module.f.ts").Or<[{
|
|
52
|
-
readonly jsonrpc: "2.0";
|
|
53
|
-
readonly result: typeof unknown;
|
|
54
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>;
|
|
55
|
-
}, {
|
|
56
|
-
readonly jsonrpc: "2.0";
|
|
57
|
-
readonly error: {
|
|
58
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
59
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
60
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
61
|
-
};
|
|
62
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>;
|
|
63
|
-
}]>;
|
|
64
|
-
export type Response = Ts<typeof response>;
|
|
65
|
-
/** Decodes an untrusted value as a JSON-RPC request / notification. */
|
|
66
|
-
export declare const decodeRequest: import("../../../types/rtti/common/module.f.ts").Validate<{
|
|
67
|
-
readonly jsonrpc: "2.0";
|
|
68
|
-
readonly method: import("../../../types/rtti/module.f.ts").String;
|
|
69
|
-
readonly params: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
70
|
-
readonly id: import("../../../types/rtti/module.f.ts").Or<readonly [import("../../../types/rtti/module.f.ts").Or<[import("../../../types/rtti/module.f.ts").String, import("../../../types/rtti/module.f.ts").Number, null]>, undefined]>;
|
|
71
|
-
}>;
|
|
72
|
-
/** A method implementation: maps `params` to a result or an `RpcError`. */
|
|
73
|
-
export type Handler = (params: Unknown | undefined) => Result<Unknown, RpcError>;
|
|
74
|
-
/** A `method` name → `Handler` map. */
|
|
75
|
-
export type Handlers = {
|
|
76
|
-
readonly [method: string]: Handler;
|
|
77
|
-
};
|
|
78
|
-
/** Builds an `RpcError` with the given `code` and `message` (no `data`). */
|
|
79
|
-
export declare const rpcError: (code: number) => (message: string) => RpcError;
|
|
80
|
-
export declare const parseError: import("../../../types/rtti/ts/module.f.ts").StructTs<{
|
|
81
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
82
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
83
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
84
|
-
}>;
|
|
85
|
-
export declare const invalidRequest: import("../../../types/rtti/ts/module.f.ts").StructTs<{
|
|
86
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
87
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
88
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
89
|
-
}>;
|
|
90
|
-
export declare const methodNotFound: import("../../../types/rtti/ts/module.f.ts").StructTs<{
|
|
91
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
92
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
93
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
94
|
-
}>;
|
|
95
|
-
export declare const invalidParams: import("../../../types/rtti/ts/module.f.ts").StructTs<{
|
|
96
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
97
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
98
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
99
|
-
}>;
|
|
100
|
-
export declare const internalError: import("../../../types/rtti/ts/module.f.ts").StructTs<{
|
|
101
|
-
readonly code: import("../../../types/rtti/module.f.ts").Number;
|
|
102
|
-
readonly message: import("../../../types/rtti/module.f.ts").String;
|
|
103
|
-
readonly data: import("../../../types/rtti/module.f.ts").Or<readonly [typeof unknown, undefined]>;
|
|
104
|
-
}>;
|
|
105
|
-
/**
|
|
106
|
-
* Dispatches an already-parsed JSON-RPC value against `handlers`.
|
|
107
|
-
*
|
|
108
|
-
* - invalid envelope → `Invalid Request` (`-32600`) with `id: null`
|
|
109
|
-
* - notification (no `id`) → `null` (never a response)
|
|
110
|
-
* - unknown method → `Method not found` (`-32601`)
|
|
111
|
-
* - otherwise the handler's `ok` / `error` result becomes a success / error response
|
|
112
|
-
*/
|
|
113
|
-
export declare const dispatch: (handlers: Handlers) => (value: Unknown) => Response | null;
|
|
114
|
-
export {};
|
|
File without changes
|
|
File without changes
|