omp-fabric 1.26.12 → 1.26.14
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/CHANGELOG.md +24 -0
- package/dist/chunks/{chunk-7KKE52AS.js → chunk-673LUJCK.js} +2 -2
- package/dist/chunks/{chunk-JHKOG5GS.js → chunk-BV3EDWSX.js} +50 -3
- package/dist/chunks/chunk-BV3EDWSX.js.map +7 -0
- package/dist/chunks/{chunk-RFTAEH2R.js → chunk-HCUDF34P.js} +80 -1
- package/dist/chunks/{chunk-RFTAEH2R.js.map → chunk-HCUDF34P.js.map} +2 -2
- package/dist/chunks/{chunk-AVSEXLZ7.js → chunk-O5SZML2M.js} +434 -3
- package/dist/chunks/chunk-O5SZML2M.js.map +7 -0
- package/dist/chunks/{chunk-2T6EHZ5G.js → chunk-S3URDR4K.js} +1 -1
- package/dist/fabric-runtime-state.js +1 -1
- package/dist/index.js +61 -2
- package/dist/index.js.map +3 -3
- package/dist/residency/host.js +2 -2
- package/dist/residency/omp-entry.js +2 -2
- package/dist/runtime/core-override-guest-types.js +1 -1
- package/dist/runtime/guest-host-sync.d.ts +5 -0
- package/dist/runtime/guest-host-sync.d.ts.map +1 -0
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/guest-web-globals.d.ts +2 -0
- package/dist/runtime/guest-web-globals.d.ts.map +1 -0
- package/dist/runtime/node-process-child-source.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +12 -2
- package/dist/runtime/node-process-runtime.js.map +2 -2
- package/dist/runtime/quickjs-runtime.d.ts +1 -1
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +2 -2
- package/dist/runtime/type-checker.d.ts.map +1 -1
- package/dist/runtime/type-checker.js +1 -1
- package/dist/type-error-guidance.d.ts.map +1 -1
- package/docs/architecture.md +1 -1
- package/package.json +1 -1
- package/skills/fabric-exec/SKILL.md +5 -2
- package/dist/chunks/chunk-AVSEXLZ7.js.map +0 -7
- package/dist/chunks/chunk-JHKOG5GS.js.map +0 -7
- /package/dist/chunks/{chunk-7KKE52AS.js.map → chunk-673LUJCK.js.map} +0 -0
- /package/dist/chunks/{chunk-2T6EHZ5G.js.map → chunk-S3URDR4K.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.26.14
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Both executors (QuickJS and the Node process) give guest code `TextEncoder`, `TextDecoder` (UTF-8 only), `atob`, `btoa`, `URL`, `URLSearchParams` and a `crypto` subset: `randomUUID()`, `getRandomValues()`, `subtle.digest` (SHA-1, SHA-256, SHA-384, SHA-512) and HMAC through `subtle.importKey("raw", ...)`, `subtle.sign` and `subtle.verify`. The globals compile on first use and call a synchronous host bridge that runs Node's URL parser, UTF-8 codec and `node:crypto` on the bytes the guest passes; the bridge keeps no key between calls and reads no host file, environment variable or network. Other `crypto.subtle` methods reject with `NotSupportedError`. At the default 256 MB `executor.memoryLimitBytes`, digest, HMAC and `TextDecoder` inputs stop at about 32 MB. The guest declarations and the `fabric-exec` skill describe the same surface.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- An arity error (TS2554, TS2555) on a call to a function the guest program declares itself no longer rejects the program; the call runs and the function sees the arguments it got. Arity errors on host calls such as `omp.read` still reject.
|
|
12
|
+
- `Cannot find name` for `process`, `Buffer`, `fs` and `require`, and the Node type-definition errors (TS2580, TS2591), now name the `omp.*` call or web global that does the job, for example `omp.bash({ cmd: "printenv NAME" })` for an environment variable.
|
|
13
|
+
- A template literal passed to `omp.bash`, `omp.write` or `omp.edit` that ends early at an inner backtick, or that holds a shell `${VAR}` expansion, gets a recovery hint naming the line and column and pointing to `payloads`.
|
|
14
|
+
|
|
15
|
+
### Notes
|
|
16
|
+
|
|
17
|
+
- Replaying the 407 programs the type checker rejected in session logs from 9 to 11 November: 391 still reject on 1.26.13 and 315 on this release. Rejections that carry a recovery hint rise from 67 to 108.
|
|
18
|
+
- Cost for code that uses no web global: a `return 1` program changes by +0.00 to +0.07 ms median on QuickJS and +0.08 to +0.40 ms on the Node process (five interleaved rounds). An 8 MB SHA-256 digest on QuickJS takes 492 ms after chunked hex encoding, down from 1196 ms in the first draft of the bridge.
|
|
19
|
+
- Reviewed in ZHA-5739 at 00ebe589; CI run 43133823675 passed typecheck, build, dead-code lint and the full suite on ubuntu and windows at 830a0ec.
|
|
20
|
+
|
|
21
|
+
## 1.26.13
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- The `fabric_exec` guidance and the `fabric-exec` skill said `omp.wait()` rejects when no job is running. The host resolves it instead, as the 18.12.5 entry recorded: a headless `omp -p` run on 18.18.8 returned `{ ok: true, output: "Nothing to wait for: ...", details: { op: "wait", jobs: [] } }` for both 1.26.11 and 1.26.12. Both texts now say it resolves at once with a `Nothing to wait for` result. The tests that assert the host contract already matched the resolving behavior; only the prose was stale.
|
|
26
|
+
|
|
3
27
|
## 1.26.12
|
|
4
28
|
|
|
5
29
|
### Fixed
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
lifecycleSourceIdentity,
|
|
11
11
|
loadModelUsage,
|
|
12
12
|
useBudgetLedger
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-S3URDR4K.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeModelAliases,
|
|
16
16
|
resolveAvailableOmpModel
|
|
@@ -685,4 +685,4 @@ if (isMain) {
|
|
|
685
685
|
export {
|
|
686
686
|
runResidentHostFromConfigPath
|
|
687
687
|
};
|
|
688
|
-
//# sourceMappingURL=chunk-
|
|
688
|
+
//# sourceMappingURL=chunk-673LUJCK.js.map
|
|
@@ -37,6 +37,53 @@ var TYPE_CORRECTNESS_CODES = /* @__PURE__ */ new Set([
|
|
|
37
37
|
7033,
|
|
38
38
|
7034
|
|
39
39
|
]);
|
|
40
|
+
var ARITY_CODES = /* @__PURE__ */ new Set([2554, 2555]);
|
|
41
|
+
var NODE_TYPES_CODES = /* @__PURE__ */ new Set([2580, 2591]);
|
|
42
|
+
var NODE_GLOBAL_HINTS = {
|
|
43
|
+
process: 'fabric_exec has no Node globals; read an environment variable with omp.bash({ cmd: "printenv NAME" }).',
|
|
44
|
+
Buffer: "fabric_exec has no Buffer; use TextEncoder, TextDecoder, atob, btoa or Uint8Array.",
|
|
45
|
+
require: "fabric_exec cannot load modules; use omp.read, omp.write and omp.bash for files and commands, and crypto.subtle for hashes.",
|
|
46
|
+
fs: "fabric_exec has no file system module; use omp.read, omp.write and omp.find."
|
|
47
|
+
};
|
|
48
|
+
var NODE_RUNTIME_HINT = "fabric_exec has no Node runtime; use the omp.* tools.";
|
|
49
|
+
var diagnosticMessage = (diagnostic) => {
|
|
50
|
+
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
51
|
+
if (diagnostic.code !== 2304 && !NODE_TYPES_CODES.has(diagnostic.code)) return message;
|
|
52
|
+
const name = /^Cannot find name '([^']+)'/.exec(message)?.[1];
|
|
53
|
+
if (name === void 0) return message;
|
|
54
|
+
const hint = Object.prototype.hasOwnProperty.call(NODE_GLOBAL_HINTS, name) ? NODE_GLOBAL_HINTS[name] : NODE_TYPES_CODES.has(diagnostic.code) ? NODE_RUNTIME_HINT : void 0;
|
|
55
|
+
return hint === void 0 ? message : `Cannot find name '${name}'. ${hint}`;
|
|
56
|
+
};
|
|
57
|
+
var enclosingCall = (sourceFile, start, end, argumentCount) => {
|
|
58
|
+
let found;
|
|
59
|
+
const visit = (node) => {
|
|
60
|
+
if (node.getStart(sourceFile) > start || node.end < end) return;
|
|
61
|
+
if ((ts.isCallExpression(node) || ts.isNewExpression(node)) && (node.arguments?.length ?? 0) === argumentCount) {
|
|
62
|
+
found = node;
|
|
63
|
+
}
|
|
64
|
+
ts.forEachChild(node, visit);
|
|
65
|
+
};
|
|
66
|
+
visit(sourceFile);
|
|
67
|
+
return found;
|
|
68
|
+
};
|
|
69
|
+
var callsGuestDeclaredFunction = (program, sourceFile, diagnostic) => {
|
|
70
|
+
if (diagnostic.start === void 0) return false;
|
|
71
|
+
const got = /but got (\d+)/.exec(ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"))?.[1];
|
|
72
|
+
if (got === void 0) return false;
|
|
73
|
+
const call = enclosingCall(
|
|
74
|
+
sourceFile,
|
|
75
|
+
diagnostic.start,
|
|
76
|
+
diagnostic.start + (diagnostic.length ?? 0),
|
|
77
|
+
Number(got)
|
|
78
|
+
);
|
|
79
|
+
if (!call) return false;
|
|
80
|
+
const callee = ts.isPropertyAccessExpression(call.expression) ? call.expression.name : call.expression;
|
|
81
|
+
const checker = program.getTypeChecker();
|
|
82
|
+
let symbol = checker.getSymbolAtLocation(callee);
|
|
83
|
+
if (symbol && symbol.flags & ts.SymbolFlags.Alias) symbol = checker.getAliasedSymbol(symbol);
|
|
84
|
+
const declarations = symbol?.declarations ?? [];
|
|
85
|
+
return declarations.length > 0 && declarations.every((declaration) => declaration.getSourceFile() === sourceFile);
|
|
86
|
+
};
|
|
40
87
|
var nextCheckerId = 0;
|
|
41
88
|
var normalizeTypeScriptPath = (fileName) => fileName.replaceAll("\\", "/");
|
|
42
89
|
var OMP_GUEST_ENTRYPOINT = "__ompFabricMain";
|
|
@@ -116,10 +163,10 @@ var FabricTypeChecker = class {
|
|
|
116
163
|
this.#program = program;
|
|
117
164
|
const diagnostics = [
|
|
118
165
|
...program.getSyntacticDiagnostics(this.#sourceFile),
|
|
119
|
-
...program.getSemanticDiagnostics(this.#sourceFile).filter((diagnostic) => !TYPE_CORRECTNESS_CODES.has(diagnostic.code))
|
|
166
|
+
...program.getSemanticDiagnostics(this.#sourceFile).filter((diagnostic) => !TYPE_CORRECTNESS_CODES.has(diagnostic.code) && !(ARITY_CODES.has(diagnostic.code) && callsGuestDeclaredFunction(program, this.#sourceFile, diagnostic)))
|
|
120
167
|
];
|
|
121
168
|
const errors = diagnostics.map((diagnostic) => {
|
|
122
|
-
const message =
|
|
169
|
+
const message = diagnosticMessage(diagnostic);
|
|
123
170
|
if (!diagnostic.file || diagnostic.start === void 0) {
|
|
124
171
|
return { line: 0, column: 0, message };
|
|
125
172
|
}
|
|
@@ -184,4 +231,4 @@ export {
|
|
|
184
231
|
transpileFabricCodeWithSourceMap,
|
|
185
232
|
typeCheckFabricCode
|
|
186
233
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
234
|
+
//# sourceMappingURL=chunk-BV3EDWSX.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/runtime/type-checker.ts"],
|
|
4
|
+
"sourcesContent": ["import path from \"node:path\";\nimport ts from \"typescript\";\n\nexport interface FabricTypeError {\n line: number;\n column: number;\n message: string;\n}\n\nexport interface FabricTypeCheckResult {\n errors: FabricTypeError[];\n javascript?: string;\n sourceMap?: string;\n}\n\nconst compilerOptions: ts.CompilerOptions = {\n target: ts.ScriptTarget.ES2022,\n module: ts.ModuleKind.ESNext,\n moduleResolution: ts.ModuleResolutionKind.NodeNext,\n strict: false,\n noImplicitAny: false,\n strictNullChecks: false,\n strictFunctionTypes: false,\n strictBindCallApply: false,\n alwaysStrict: false,\n strictPropertyInitialization: false,\n noImplicitThis: false,\n useUnknownInCatchVariables: false,\n noEmit: false,\n sourceMap: true,\n skipLibCheck: true,\n lib: [\"lib.es2022.d.ts\"],\n};\n\nconst TYPE_CORRECTNESS_CODES = new Set<number>([\n 2339, 2551,\n 2322, 2345, 2367,\n 2531, 2532, 18047, 18048,\n 7006, 7008, 7019, 7031, 7032, 7033, 7034,\n]);\n\nconst ARITY_CODES = new Set<number>([2554, 2555]);\n\nconst NODE_TYPES_CODES = new Set<number>([2580, 2591]);\n\nconst NODE_GLOBAL_HINTS: Readonly<Record<string, string>> = {\n process: \"fabric_exec has no Node globals; read an environment variable with omp.bash({ cmd: \\\"printenv NAME\\\" }).\",\n Buffer: \"fabric_exec has no Buffer; use TextEncoder, TextDecoder, atob, btoa or Uint8Array.\",\n require: \"fabric_exec cannot load modules; use omp.read, omp.write and omp.bash for files and commands, and crypto.subtle for hashes.\",\n fs: \"fabric_exec has no file system module; use omp.read, omp.write and omp.find.\",\n};\n\nconst NODE_RUNTIME_HINT = \"fabric_exec has no Node runtime; use the omp.* tools.\";\n\nconst diagnosticMessage = (diagnostic: ts.Diagnostic): string => {\n const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, \"\\n\");\n if (diagnostic.code !== 2304 && !NODE_TYPES_CODES.has(diagnostic.code)) return message;\n const name = /^Cannot find name '([^']+)'/.exec(message)?.[1];\n if (name === undefined) return message;\n const hint = Object.prototype.hasOwnProperty.call(NODE_GLOBAL_HINTS, name)\n ? NODE_GLOBAL_HINTS[name]\n : NODE_TYPES_CODES.has(diagnostic.code) ? NODE_RUNTIME_HINT : undefined;\n return hint === undefined ? message : `Cannot find name '${name}'. ${hint}`;\n};\n\nconst enclosingCall = (\n sourceFile: ts.SourceFile,\n start: number,\n end: number,\n argumentCount: number,\n): ts.CallExpression | ts.NewExpression | undefined => {\n let found: ts.CallExpression | ts.NewExpression | undefined;\n const visit = (node: ts.Node): void => {\n if (node.getStart(sourceFile) > start || node.end < end) return;\n if (\n (ts.isCallExpression(node) || ts.isNewExpression(node)) &&\n (node.arguments?.length ?? 0) === argumentCount\n ) {\n found = node;\n }\n ts.forEachChild(node, visit);\n };\n visit(sourceFile);\n return found;\n};\n\nconst callsGuestDeclaredFunction = (\n program: ts.Program,\n sourceFile: ts.SourceFile,\n diagnostic: ts.Diagnostic,\n): boolean => {\n if (diagnostic.start === undefined) return false;\n const got = /but got (\\d+)/.exec(ts.flattenDiagnosticMessageText(diagnostic.messageText, \"\\n\"))?.[1];\n if (got === undefined) return false;\n const call = enclosingCall(\n sourceFile,\n diagnostic.start,\n diagnostic.start + (diagnostic.length ?? 0),\n Number(got),\n );\n if (!call) return false;\n const callee = ts.isPropertyAccessExpression(call.expression) ? call.expression.name : call.expression;\n const checker = program.getTypeChecker();\n let symbol = checker.getSymbolAtLocation(callee);\n if (symbol && symbol.flags & ts.SymbolFlags.Alias) symbol = checker.getAliasedSymbol(symbol);\n const declarations = symbol?.declarations ?? [];\n return declarations.length > 0 && declarations.every((declaration) => declaration.getSourceFile() === sourceFile);\n};\n\nlet nextCheckerId = 0;\n\nexport const normalizeTypeScriptPath = (fileName: string): string =>\n fileName.replaceAll(\"\\\\\", \"/\");\n\nexport const OMP_GUEST_ENTRYPOINT = \"__ompFabricMain\";\n\n/** Guest programs execute inside this wrapper; user code starts on wrapped line 2. */\nexport const wrapFabricGuestCode = (code: string): string =>\n `async function ${OMP_GUEST_ENTRYPOINT}() {\\n${code}\\n}\\n`;\n\nclass FabricTypeChecker {\n readonly #guestFile: string;\n readonly #declarationFile: string;\n readonly #baseHost = ts.createCompilerHost(compilerOptions, true);\n readonly #stableFiles = new Map<string, ts.SourceFile>();\n readonly #declarationSource: ts.SourceFile;\n readonly #host: ts.CompilerHost;\n #sourceText = \"\";\n #sourceFile: ts.SourceFile;\n #program: ts.Program | undefined;\n\n constructor(readonly declarations: string) {\n const id = ++nextCheckerId;\n this.#guestFile = normalizeTypeScriptPath(path.resolve(`/__omp_fabric_guest_${id}.ts`));\n this.#declarationFile = normalizeTypeScriptPath(\n path.resolve(`/__omp_fabric_globals_${id}.d.ts`),\n );\n this.#sourceFile = ts.createSourceFile(\n this.#guestFile,\n \"\",\n ts.ScriptTarget.ES2022,\n true,\n );\n this.#declarationSource = ts.createSourceFile(\n this.#declarationFile,\n declarations,\n ts.ScriptTarget.ES2022,\n true,\n );\n const isGuestFile = (fileName: string): boolean =>\n this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) ===\n this.#baseHost.getCanonicalFileName(this.#guestFile);\n const isDeclarationFile = (fileName: string): boolean =>\n this.#baseHost.getCanonicalFileName(normalizeTypeScriptPath(fileName)) ===\n this.#baseHost.getCanonicalFileName(this.#declarationFile);\n this.#host = {\n ...this.#baseHost,\n fileExists: (fileName) =>\n isGuestFile(fileName) ||\n isDeclarationFile(fileName) ||\n this.#baseHost.fileExists(fileName),\n readFile: (fileName) => {\n if (isGuestFile(fileName)) return this.#sourceText;\n if (isDeclarationFile(fileName)) return this.declarations;\n return this.#baseHost.readFile(fileName);\n },\n getSourceFile: (fileName, languageVersion, onError, shouldCreateNewSourceFile) => {\n if (isGuestFile(fileName)) return this.#sourceFile;\n if (isDeclarationFile(fileName)) return this.#declarationSource;\n const cached = this.#stableFiles.get(fileName);\n if (cached) return cached;\n const source = this.#baseHost.getSourceFile(\n fileName,\n languageVersion,\n onError,\n shouldCreateNewSourceFile,\n );\n if (source) this.#stableFiles.set(fileName, source);\n return source;\n },\n };\n }\n\n check(code: string): FabricTypeCheckResult {\n this.#sourceText = wrapFabricGuestCode(code);\n this.#sourceFile = ts.createSourceFile(\n this.#guestFile,\n this.#sourceText,\n ts.ScriptTarget.ES2022,\n true,\n );\n const program = ts.createProgram({\n rootNames: [this.#declarationFile, this.#guestFile],\n options: compilerOptions,\n host: this.#host,\n ...(this.#program ? { oldProgram: this.#program } : {}),\n });\n this.#program = program;\n const diagnostics = [\n ...program.getSyntacticDiagnostics(this.#sourceFile),\n ...program\n .getSemanticDiagnostics(this.#sourceFile)\n .filter((diagnostic) =>\n !TYPE_CORRECTNESS_CODES.has(diagnostic.code) &&\n !(ARITY_CODES.has(diagnostic.code) && callsGuestDeclaredFunction(program, this.#sourceFile, diagnostic))),\n ];\n const errors = diagnostics.map((diagnostic) => {\n const message = diagnosticMessage(diagnostic);\n if (!diagnostic.file || diagnostic.start === undefined) {\n return { line: 0, column: 0, message };\n }\n const position = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);\n return {\n line: Math.max(1, position.line),\n column: position.character + 1,\n message,\n };\n });\n if (errors.length > 0) return { errors };\n\n let javascript: string | undefined;\n let sourceMap: string | undefined;\n program.emit(this.#sourceFile, (fileName, content) => {\n if (fileName.endsWith(\".js.map\")) sourceMap = content;\n else if (fileName.endsWith(\".js\")) javascript = content;\n });\n return {\n errors,\n ...(javascript ? { javascript } : {}),\n ...(sourceMap ? { sourceMap } : {}),\n };\n }\n}\n\nconst checkerCache = new Map<string, FabricTypeChecker>();\nconst MAX_CHECKERS = 4;\n\nconst checkerFor = (declarations: string): FabricTypeChecker => {\n const cached = checkerCache.get(declarations);\n if (cached) {\n checkerCache.delete(declarations);\n checkerCache.set(declarations, cached);\n return cached;\n }\n const checker = new FabricTypeChecker(declarations);\n checkerCache.set(declarations, checker);\n while (checkerCache.size > MAX_CHECKERS) {\n const oldest = checkerCache.keys().next().value as string | undefined;\n if (oldest === undefined) break;\n checkerCache.delete(oldest);\n }\n return checker;\n};\n\nexport interface FabricTranspileResult {\n code: string;\n sourceMap?: string;\n}\n\nexport const transpileFabricCodeWithSourceMap = (code: string): FabricTranspileResult => {\n const result = ts.transpileModule(wrapFabricGuestCode(code), {\n compilerOptions: {\n target: ts.ScriptTarget.ES2022,\n module: ts.ModuleKind.ESNext,\n sourceMap: true,\n },\n });\n return {\n code: result.outputText,\n ...(result.sourceMapText ? { sourceMap: result.sourceMapText } : {}),\n };\n};\n\nexport const typeCheckFabricCode = (\n code: string,\n declarations: string,\n): FabricTypeCheckResult => checkerFor(declarations).check(code);\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAO,UAAU;AACjB,OAAO,QAAQ;AAcf,IAAM,kBAAsC;AAAA,EAC1C,QAAQ,GAAG,aAAa;AAAA,EACxB,QAAQ,GAAG,WAAW;AAAA,EACtB,kBAAkB,GAAG,qBAAqB;AAAA,EAC1C,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,cAAc;AAAA,EACd,8BAA8B;AAAA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S,EAAG,aAAY;AAAA,eACrC,SAAS,SAAS,KAAK,EAAG,cAAa;AAAA,IAClD,CAAC;AACD,WAAO;AAAA,MACL;AAAA,MACA,GAAI,aAAa,EAAE,WAAW,IAAI,CAAC;AAAA,MACnC,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC;AAAA,IACnC;AAAA,EACF;AACF;AAEA,IAAM,eAAe,oBAAI,IAA+B;AACxD,IAAM,eAAe;AAErB,IAAM,aAAa,CAAC,iBAA4C;AAC9D,QAAM,SAAS,aAAa,IAAI,YAAY;AAC5C,MAAI,QAAQ;AACV,iBAAa,OAAO,YAAY;AAChC,iBAAa,IAAI,cAAc,MAAM;AACrC,WAAO;AAAA,EACT;AACA,QAAM,UAAU,IAAI,kBAAkB,YAAY;AAClD,eAAa,IAAI,cAAc,OAAO;AACtC,SAAO,aAAa,OAAO,cAAc;AACvC,UAAM,SAAS,aAAa,KAAK,EAAE,KAAK,EAAE;AAC1C,QAAI,WAAW,OAAW;AAC1B,iBAAa,OAAO,MAAM;AAAA,EAC5B;AACA,SAAO;AACT;AAOO,IAAM,mCAAmC,CAAC,SAAwC;AACvF,QAAM,SAAS,GAAG,gBAAgB,oBAAoB,IAAI,GAAG;AAAA,IAC3D,iBAAiB;AAAA,MACf,QAAQ,GAAG,aAAa;AAAA,MACxB,QAAQ,GAAG,WAAW;AAAA,MACtB,WAAW;AAAA,IACb;AAAA,EACF,CAAC;AACD,SAAO;AAAA,IACL,MAAM,OAAO;AAAA,IACb,GAAI,OAAO,gBAAgB,EAAE,WAAW,OAAO,cAAc,IAAI,CAAC;AAAA,EACpE;AACF;AAEO,IAAM,sBAAsB,CACjC,MACA,iBAC0B,WAAW,YAAY,EAAE,MAAM,IAAI;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -993,6 +993,7 @@ interface FabricMemorySessionInfo {
|
|
|
993
993
|
lineageFingerprint: string | null;
|
|
994
994
|
}
|
|
995
995
|
interface FabricMemoryApi {
|
|
996
|
+
recall(query: string): Promise<FabricMemoryRecallResult>;
|
|
996
997
|
recall(args?: FabricMemoryRecallArgs): Promise<FabricMemoryRecallResult>;
|
|
997
998
|
expand(args: FabricMemoryExpandArgs): Promise<FabricMemoryExpandResult>;
|
|
998
999
|
walk(
|
|
@@ -1574,6 +1575,84 @@ declare function setTimeout(handler: (...args: any[]) => void, timeout?: number)
|
|
|
1574
1575
|
declare function clearTimeout(handle: number): void;
|
|
1575
1576
|
declare function setInterval(handler: (...args: any[]) => void, timeout?: number): number;
|
|
1576
1577
|
declare function clearInterval(handle: number): void;
|
|
1578
|
+
type FabricBufferSource = ArrayBuffer | ArrayBufferView;
|
|
1579
|
+
declare class TextEncoder {
|
|
1580
|
+
readonly encoding: "utf-8";
|
|
1581
|
+
encode(input?: string): Uint8Array;
|
|
1582
|
+
encodeInto(source: string, destination: Uint8Array): { read: number; written: number };
|
|
1583
|
+
}
|
|
1584
|
+
declare class TextDecoder {
|
|
1585
|
+
constructor(label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean });
|
|
1586
|
+
readonly encoding: "utf-8";
|
|
1587
|
+
readonly fatal: boolean;
|
|
1588
|
+
readonly ignoreBOM: boolean;
|
|
1589
|
+
decode(input?: FabricBufferSource): string;
|
|
1590
|
+
}
|
|
1591
|
+
declare function atob(data: string): string;
|
|
1592
|
+
declare function btoa(data: string): string;
|
|
1593
|
+
declare class URLSearchParams {
|
|
1594
|
+
constructor(init?: string | URLSearchParams | Record<string, string> | Iterable<readonly [string, string]>);
|
|
1595
|
+
readonly size: number;
|
|
1596
|
+
append(name: string, value: string): void;
|
|
1597
|
+
delete(name: string, value?: string): void;
|
|
1598
|
+
get(name: string): string | null;
|
|
1599
|
+
getAll(name: string): string[];
|
|
1600
|
+
has(name: string, value?: string): boolean;
|
|
1601
|
+
set(name: string, value: string): void;
|
|
1602
|
+
sort(): void;
|
|
1603
|
+
forEach(callback: (value: string, name: string, parent: URLSearchParams) => void, thisArg?: unknown): void;
|
|
1604
|
+
keys(): IterableIterator<string>;
|
|
1605
|
+
values(): IterableIterator<string>;
|
|
1606
|
+
entries(): IterableIterator<[string, string]>;
|
|
1607
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
1608
|
+
toString(): string;
|
|
1609
|
+
}
|
|
1610
|
+
declare class URL {
|
|
1611
|
+
constructor(url: string | URL, base?: string | URL);
|
|
1612
|
+
static canParse(url: string | URL, base?: string | URL): boolean;
|
|
1613
|
+
href: string;
|
|
1614
|
+
readonly origin: string;
|
|
1615
|
+
protocol: string;
|
|
1616
|
+
username: string;
|
|
1617
|
+
password: string;
|
|
1618
|
+
host: string;
|
|
1619
|
+
hostname: string;
|
|
1620
|
+
port: string;
|
|
1621
|
+
pathname: string;
|
|
1622
|
+
search: string;
|
|
1623
|
+
readonly searchParams: URLSearchParams;
|
|
1624
|
+
hash: string;
|
|
1625
|
+
toString(): string;
|
|
1626
|
+
toJSON(): string;
|
|
1627
|
+
}
|
|
1628
|
+
type FabricDigestAlgorithm = "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512";
|
|
1629
|
+
type FabricHmacAlgorithm = "HMAC" | { name: "HMAC" };
|
|
1630
|
+
type FabricKeyUsage = "sign" | "verify";
|
|
1631
|
+
interface FabricCryptoKey {
|
|
1632
|
+
readonly type: "secret";
|
|
1633
|
+
readonly extractable: boolean;
|
|
1634
|
+
readonly algorithm: { readonly name: "HMAC"; readonly hash: { readonly name: FabricDigestAlgorithm }; readonly length: number };
|
|
1635
|
+
readonly usages: readonly FabricKeyUsage[];
|
|
1636
|
+
}
|
|
1637
|
+
interface FabricSubtleCrypto {
|
|
1638
|
+
digest(algorithm: FabricDigestAlgorithm | { name: FabricDigestAlgorithm }, data: FabricBufferSource): Promise<ArrayBuffer>;
|
|
1639
|
+
importKey(
|
|
1640
|
+
format: "raw",
|
|
1641
|
+
keyData: FabricBufferSource,
|
|
1642
|
+
algorithm: { name: "HMAC"; hash: FabricDigestAlgorithm | { name: FabricDigestAlgorithm } },
|
|
1643
|
+
extractable: boolean,
|
|
1644
|
+
keyUsages: readonly FabricKeyUsage[],
|
|
1645
|
+
): Promise<FabricCryptoKey>;
|
|
1646
|
+
sign(algorithm: FabricHmacAlgorithm, key: FabricCryptoKey, data: FabricBufferSource): Promise<ArrayBuffer>;
|
|
1647
|
+
verify(algorithm: FabricHmacAlgorithm, key: FabricCryptoKey, signature: FabricBufferSource, data: FabricBufferSource): Promise<boolean>;
|
|
1648
|
+
}
|
|
1649
|
+
type FabricIntegerArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array;
|
|
1650
|
+
interface FabricCryptoApi {
|
|
1651
|
+
readonly subtle: FabricSubtleCrypto;
|
|
1652
|
+
randomUUID(): string;
|
|
1653
|
+
getRandomValues<T extends FabricIntegerArray>(array: T): T;
|
|
1654
|
+
}
|
|
1655
|
+
declare const crypto: FabricCryptoApi;
|
|
1577
1656
|
`;
|
|
1578
1657
|
var FULL_CODE_GLOBAL_DECLARATIONS = [
|
|
1579
1658
|
"declare const omp: OmpToolsApi;\n",
|
|
@@ -1621,4 +1700,4 @@ export {
|
|
|
1621
1700
|
GUEST_TYPE_DECLARATIONS,
|
|
1622
1701
|
guestTypeDeclarations
|
|
1623
1702
|
};
|
|
1624
|
-
//# sourceMappingURL=chunk-
|
|
1703
|
+
//# sourceMappingURL=chunk-HCUDF34P.js.map
|