@rotifer/playground 0.31.0 → 0.33.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/CHANGELOG.md +40 -0
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/client.js +9 -0
- package/dist/cloud/client.js.map +1 -1
- package/dist/cloud/types.d.ts +7 -0
- package/dist/cloud/types.d.ts.map +1 -1
- package/dist/cloud/types.js.map +1 -1
- package/dist/commands/agent-create.d.ts +11 -0
- package/dist/commands/agent-create.d.ts.map +1 -1
- package/dist/commands/agent-create.js +50 -1
- package/dist/commands/agent-create.js.map +1 -1
- package/dist/commands/agent-memory.d.ts +64 -0
- package/dist/commands/agent-memory.d.ts.map +1 -0
- package/dist/commands/agent-memory.js +235 -0
- package/dist/commands/agent-memory.js.map +1 -0
- package/dist/commands/agent-run.d.ts.map +1 -1
- package/dist/commands/agent-run.js +84 -26
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/arena-submit.d.ts.map +1 -1
- package/dist/commands/arena-submit.js +34 -36
- package/dist/commands/arena-submit.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +32 -6
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/genome-format.d.ts +5 -1
- package/dist/commands/genome-format.d.ts.map +1 -1
- package/dist/commands/genome-format.js +5 -1
- package/dist/commands/genome-format.js.map +1 -1
- package/dist/commands/hello.d.ts.map +1 -1
- package/dist/commands/hello.js +15 -2
- package/dist/commands/hello.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +59 -4
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +78 -23
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +28 -70
- package/dist/commands/wrap.js.map +1 -1
- package/dist/index.js +47 -1
- package/dist/index.js.map +1 -1
- package/dist/memory/access.d.ts +53 -0
- package/dist/memory/access.d.ts.map +1 -0
- package/dist/memory/access.js +111 -0
- package/dist/memory/access.js.map +1 -0
- package/dist/memory/audit.d.ts +26 -0
- package/dist/memory/audit.d.ts.map +1 -0
- package/dist/memory/audit.js +30 -0
- package/dist/memory/audit.js.map +1 -0
- package/dist/memory/backend.d.ts +141 -0
- package/dist/memory/backend.d.ts.map +1 -0
- package/dist/memory/backend.js +536 -0
- package/dist/memory/backend.js.map +1 -0
- package/dist/memory/codec.d.ts +34 -0
- package/dist/memory/codec.d.ts.map +1 -0
- package/dist/memory/codec.js +184 -0
- package/dist/memory/codec.js.map +1 -0
- package/dist/memory/data-policy.d.ts +39 -0
- package/dist/memory/data-policy.d.ts.map +1 -0
- package/dist/memory/data-policy.js +42 -0
- package/dist/memory/data-policy.js.map +1 -0
- package/dist/memory/host.d.ts +119 -0
- package/dist/memory/host.d.ts.map +1 -0
- package/dist/memory/host.js +226 -0
- package/dist/memory/host.js.map +1 -0
- package/dist/memory/index.d.ts +37 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +64 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/telemetry.d.ts +35 -0
- package/dist/memory/telemetry.d.ts.map +1 -0
- package/dist/memory/telemetry.js +51 -0
- package/dist/memory/telemetry.js.map +1 -0
- package/dist/memory/types.d.ts +110 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +74 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/publish/auto-publish.d.ts +1 -1
- package/dist/publish/auto-publish.js +1 -1
- package/dist/runtime/network-gateway.d.ts +24 -4
- package/dist/runtime/network-gateway.d.ts.map +1 -1
- package/dist/runtime/network-gateway.js +86 -12
- package/dist/runtime/network-gateway.js.map +1 -1
- package/dist/testsuite/gate.d.ts +8 -0
- package/dist/testsuite/gate.d.ts.map +1 -1
- package/dist/testsuite/gate.js +13 -3
- package/dist/testsuite/gate.js.map +1 -1
- package/dist/testsuite/run.d.ts +6 -11
- package/dist/testsuite/run.d.ts.map +1 -1
- package/dist/testsuite/run.js +29 -4
- package/dist/testsuite/run.js.map +1 -1
- package/dist/utils/arena-success.d.ts +10 -0
- package/dist/utils/arena-success.d.ts.map +1 -1
- package/dist/utils/arena-success.js +35 -8
- package/dist/utils/arena-success.js.map +1 -1
- package/dist/utils/binding.d.ts +6 -2
- package/dist/utils/binding.d.ts.map +1 -1
- package/dist/utils/binding.js.map +1 -1
- package/dist/utils/clawhub-client.d.ts +73 -0
- package/dist/utils/clawhub-client.d.ts.map +1 -0
- package/dist/utils/clawhub-client.js +176 -0
- package/dist/utils/clawhub-client.js.map +1 -0
- package/dist/utils/config.d.ts +7 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +15 -1
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/fitness-formula.d.ts +20 -4
- package/dist/utils/fitness-formula.d.ts.map +1 -1
- package/dist/utils/fitness-formula.js +24 -6
- package/dist/utils/fitness-formula.js.map +1 -1
- package/dist/utils/gene-id-display.d.ts +14 -0
- package/dist/utils/gene-id-display.d.ts.map +1 -0
- package/dist/utils/gene-id-display.js +64 -0
- package/dist/utils/gene-id-display.js.map +1 -0
- package/dist/utils/l0-gate.d.ts.map +1 -1
- package/dist/utils/l0-gate.js +4 -1
- package/dist/utils/l0-gate.js.map +1 -1
- package/dist/utils/rust-phenotype.d.ts +17 -5
- package/dist/utils/rust-phenotype.d.ts.map +1 -1
- package/dist/utils/rust-phenotype.js +25 -4
- package/dist/utils/rust-phenotype.js.map +1 -1
- package/package.json +10 -5
package/dist/index.js
CHANGED
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
3
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
37
|
const commander_1 = require("commander");
|
|
5
38
|
const node_fs_1 = require("node:fs");
|
|
6
39
|
const node_path_1 = require("node:path");
|
|
40
|
+
const config_js_1 = require("./utils/config.js");
|
|
41
|
+
const display = __importStar(require("./utils/display.js"));
|
|
7
42
|
const init_js_1 = require("./commands/init.js");
|
|
8
43
|
const scan_js_1 = require("./commands/scan.js");
|
|
9
44
|
const wrap_js_1 = require("./commands/wrap.js");
|
|
@@ -17,6 +52,7 @@ const arena_audit_js_1 = require("./commands/arena-audit.js");
|
|
|
17
52
|
const agent_create_js_1 = require("./commands/agent-create.js");
|
|
18
53
|
const agent_list_js_1 = require("./commands/agent-list.js");
|
|
19
54
|
const agent_run_js_1 = require("./commands/agent-run.js");
|
|
55
|
+
const agent_memory_js_1 = require("./commands/agent-memory.js");
|
|
20
56
|
const genome_js_1 = require("./commands/genome.js");
|
|
21
57
|
const genome_import_js_1 = require("./commands/genome-import.js");
|
|
22
58
|
const login_js_1 = require("./commands/login.js");
|
|
@@ -101,6 +137,7 @@ const agent = program.command("agent").description("Agent lifecycle commands");
|
|
|
101
137
|
agent.addCommand(agent_create_js_1.agentCreateCommand);
|
|
102
138
|
agent.addCommand(agent_list_js_1.agentListCommand);
|
|
103
139
|
agent.addCommand(agent_run_js_1.agentRunCommand);
|
|
140
|
+
agent.addCommand(agent_memory_js_1.agentMemoryCommand);
|
|
104
141
|
genome_js_1.genomeCommand.addCommand(genome_import_js_1.genomeImportCommand);
|
|
105
142
|
program.addCommand(genome_js_1.genomeCommand);
|
|
106
143
|
program.addCommand(hello_js_1.helloCommand);
|
|
@@ -140,5 +177,14 @@ if (userConfig["update-check"] !== false) {
|
|
|
140
177
|
})
|
|
141
178
|
.catch(() => { });
|
|
142
179
|
}
|
|
143
|
-
|
|
180
|
+
// A broken rotifer.json is the user's to fix, not a crash: say which file and
|
|
181
|
+
// what is wrong with it (#456). Every other error surfaces as before.
|
|
182
|
+
program.parseAsync().catch((err) => {
|
|
183
|
+
if (err instanceof config_js_1.ConfigError) {
|
|
184
|
+
display.error(err.message);
|
|
185
|
+
display.hint("Fix the JSON in rotifer.json, then run the command again.");
|
|
186
|
+
process.exit(1);
|
|
187
|
+
}
|
|
188
|
+
throw err;
|
|
189
|
+
});
|
|
144
190
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAA0C;AAC1C,qCAAuC;AACvC,yCAAiC;AACjC,iDAAgD;AAChD,4DAA8C;AAC9C,gDAAiD;AACjD,gDAAiD;AACjD,gDAAiD;AACjD,gDAAiD;AACjD,sDAAuD;AACvD,oDAAqD;AACrD,gEAAgE;AAChE,4DAA4D;AAC5D,8DAA8D;AAC9D,8DAA8D;AAC9D,gEAAgE;AAChE,4DAA4D;AAC5D,0DAA0D;AAC1D,gEAAgE;AAChE,oDAAqD;AACrD,kEAAkE;AAClE,kDAAmD;AACnD,oDAAqD;AACrD,sDAAuD;AACvD,0DAA6E;AAC7E,oDAAqD;AACrD,sDAAuD;AACvD,wDAA2E;AAC3E,4DAA6D;AAC7D,gDAAiD;AACjD,gDAAiD;AACjD,8CAA+C;AAC/C,wDAAyD;AACzD,oDAAqD;AACrD,kDAAmD;AACnD,sDAAuD;AACvD,sDAAuD;AACvD,0DAA2D;AAC3D,4CAA6C;AAC7C,kDAAmD;AACnD,8DAA8D;AAC9D,8DAA8D;AAC9D,sDAAsD;AACtD,6DAAkG;AAClG,2DAAwD;AACxD,mDAAoG;AAEpG,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAErF,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CACV,uEAAuE,CACxE;KACA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;KACpB,MAAM,CAAC,QAAQ,EAAE,wCAAwC,CAAC;KAC1D,MAAM,CAAC,SAAS,EAA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,CAAC;QACX,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAA,yCAAuB,EAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,IAAA,gCAAc,EAAC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC;SAC/C,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QACb,IAAI,IAAI,IAAI,CAAC,MAAM;YAAE,IAAA,yCAAuB,EAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IAC5E,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AACrB,CAAC;AAED,8EAA8E;AAC9E,sEAAsE;AACtE,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC1C,IAAI,GAAG,YAAY,uBAAW,EAAE,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,2DAA2D,CAAC,CAAC;QAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,GAAG,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeneMemoryAccess — spec §38.2, the interface a gene reads and writes its
|
|
3
|
+
* agent's memory through (–S4, S6).
|
|
4
|
+
*
|
|
5
|
+
* A gene gets one bound to its agent and to itself: every call carries the
|
|
6
|
+
* gene's identity, so the store can check the entry's scope.
|
|
7
|
+
* The methods return the result and throw MemoryError carrying a memory
|
|
8
|
+
* code (MEMORY_NOT_FOUND / MEMORY_ACCESS_DENIED / MEMORY_QUOTA_EXCEEDED /
|
|
9
|
+
* MEMORY_INVALID_INPUT); an absent entry on read is `null`, not an error, as
|
|
10
|
+
* §38.2 types it (`-> MemoryEntry?`).
|
|
11
|
+
*
|
|
12
|
+
* Synchronous on purpose. The WASM host functions (rotifer.readMemory …,
|
|
13
|
+
* the host functions) are synchronous calls from the guest, and so is the
|
|
14
|
+
* rotifer-napi store; a gene written against this interface needs no
|
|
15
|
+
* `async express()`, which Javy rejects (E0025) — so the same gene source can
|
|
16
|
+
* move from the Node path to a Native artifact.
|
|
17
|
+
*/
|
|
18
|
+
import type { MemoryBackend, MemoryCaller } from "./backend.js";
|
|
19
|
+
import { type DataPolicy } from "./data-policy.js";
|
|
20
|
+
import { type MemoryTelemetrySink } from "./telemetry.js";
|
|
21
|
+
import type { MemoryAuditSink } from "./audit.js";
|
|
22
|
+
import { type MemoryAccessPolicy, type MemoryCategory, type MemoryEntry, type MemoryFilter, type RetentionPolicy } from "./types.js";
|
|
23
|
+
export interface GeneMemoryAccess {
|
|
24
|
+
/** The entry under `key`, or null. With `category`, only an entry of that category. */
|
|
25
|
+
readMemory(key: string, category?: MemoryCategory): MemoryEntry | null;
|
|
26
|
+
/**
|
|
27
|
+
* Write or update the entry under `key`; returns the stored entry.
|
|
28
|
+
*
|
|
29
|
+
* A new entry's `accessPolicy` defaults to SAME_DOMAIN read and write,
|
|
30
|
+
* PRIVATE sharing, and its `retentionPolicy` to null (inherit the agent's
|
|
31
|
+
* DataPolicy). An update keeps the entry's creator and its stored
|
|
32
|
+
* policies; only the creating gene may change them. Another gene passing
|
|
33
|
+
* a policy different from the stored one gets MEMORY_ACCESS_DENIED
|
|
34
|
+
* — leave the policies out when overwriting someone else's
|
|
35
|
+
* entry.
|
|
36
|
+
*/
|
|
37
|
+
writeMemory(key: string, value: Uint8Array, category: MemoryCategory, accessPolicy?: MemoryAccessPolicy, retentionPolicy?: RetentionPolicy | null): MemoryEntry;
|
|
38
|
+
/** The entries this gene may read that match every given filter field, newest first. */
|
|
39
|
+
queryMemory(filter?: MemoryFilter): MemoryEntry[];
|
|
40
|
+
/** Delete the entry under `key` (needs its write scope). */
|
|
41
|
+
deleteMemory(key: string): void;
|
|
42
|
+
}
|
|
43
|
+
export interface GeneMemoryAccessOptions {
|
|
44
|
+
backend: MemoryBackend;
|
|
45
|
+
caller: MemoryCaller;
|
|
46
|
+
dataPolicy: DataPolicy;
|
|
47
|
+
/** §17 sink for the denials this layer raises (DataPolicy); the backend records its own. */
|
|
48
|
+
telemetry: MemoryTelemetrySink;
|
|
49
|
+
/** Audit sink for the same denials: a refusal is audited, not only reported. */
|
|
50
|
+
audit: MemoryAuditSink;
|
|
51
|
+
}
|
|
52
|
+
export declare function createGeneMemoryAccess(options: GeneMemoryAccessOptions): GeneMemoryAccess;
|
|
53
|
+
//# sourceMappingURL=access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/memory/access.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAqB,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,gBAAgB;IAC/B,uFAAuF;IACvF,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,IAAI,CAAC;IACvE;;;;;;;;;;OAUG;IACH,WAAW,CACT,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,cAAc,EACxB,YAAY,CAAC,EAAE,kBAAkB,EACjC,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,GACvC,WAAW,CAAC;IACf,wFAAwF;IACxF,WAAW,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,EAAE,CAAC;IAClD,4DAA4D;IAC5D,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,4FAA4F;IAC5F,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gFAAgF;IAChF,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,gBAAgB,CAyFzF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createGeneMemoryAccess = createGeneMemoryAccess;
|
|
4
|
+
const codec_js_1 = require("./codec.js");
|
|
5
|
+
const data_policy_js_1 = require("./data-policy.js");
|
|
6
|
+
const telemetry_js_1 = require("./telemetry.js");
|
|
7
|
+
const types_js_1 = require("./types.js");
|
|
8
|
+
function createGeneMemoryAccess(options) {
|
|
9
|
+
const { backend, caller, dataPolicy, telemetry, audit } = options;
|
|
10
|
+
/**
|
|
11
|
+
* A DataPolicy refusal: MEMORY_ACCESS_DENIED, audited and reported to §17
|
|
12
|
+
* before it is thrown. The audit line comes first and is not best-effort:
|
|
13
|
+
* if it cannot be written the call fails with MEMORY_STORAGE_ERROR.
|
|
14
|
+
*/
|
|
15
|
+
function refuse(key, category, violation) {
|
|
16
|
+
const error = new types_js_1.MemoryError("MEMORY_ACCESS_DENIED", `the agent's DataPolicy does not allow this write: ${violation}`);
|
|
17
|
+
const { totalSize, quota } = backend.usage(caller.agentId);
|
|
18
|
+
audit({
|
|
19
|
+
ts: new Date().toISOString(),
|
|
20
|
+
kind: "agent_memory",
|
|
21
|
+
action: "access_denied",
|
|
22
|
+
agentId: caller.agentId,
|
|
23
|
+
entryId: (0, codec_js_1.entryIdFor)(caller.agentId, key),
|
|
24
|
+
category,
|
|
25
|
+
geneId: caller.geneId,
|
|
26
|
+
sizeDelta: 0,
|
|
27
|
+
totalSize,
|
|
28
|
+
quota,
|
|
29
|
+
error: "MEMORY_ACCESS_DENIED",
|
|
30
|
+
});
|
|
31
|
+
telemetry((0, telemetry_js_1.accessDeniedEvent)({
|
|
32
|
+
agentId: caller.agentId,
|
|
33
|
+
geneId: caller.geneId,
|
|
34
|
+
entryId: (0, codec_js_1.entryIdFor)(caller.agentId, key),
|
|
35
|
+
operation: "write",
|
|
36
|
+
message: error.message,
|
|
37
|
+
}));
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
readMemory(key, category) {
|
|
42
|
+
(0, codec_js_1.checkKey)(key);
|
|
43
|
+
if (category !== undefined && !(0, types_js_1.isMemoryCategory)(category)) {
|
|
44
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", `unknown category '${String(category)}'`);
|
|
45
|
+
}
|
|
46
|
+
const json = backend.read(caller, key, category ?? null);
|
|
47
|
+
return json ? (0, codec_js_1.fromEntryJson)(json) : null;
|
|
48
|
+
},
|
|
49
|
+
writeMemory(key, value, category, accessPolicy, retentionPolicy) {
|
|
50
|
+
(0, codec_js_1.checkKey)(key);
|
|
51
|
+
if (!(value instanceof Uint8Array)) {
|
|
52
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", "value must be bytes (Uint8Array)");
|
|
53
|
+
}
|
|
54
|
+
if (value.byteLength > types_js_1.MEMORY_MAX_VALUE_BYTES) {
|
|
55
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", `value is ${value.byteLength} bytes; a memory value is at most ${types_js_1.MEMORY_MAX_VALUE_BYTES} bytes (1 MiB)`);
|
|
56
|
+
}
|
|
57
|
+
if (!(0, types_js_1.isMemoryCategory)(category)) {
|
|
58
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", `unknown category '${String(category)}'`);
|
|
59
|
+
}
|
|
60
|
+
// Omitted stays omitted on the wire: for an update it means "keep the
|
|
61
|
+
// stored policy", which the store resolves.
|
|
62
|
+
const policy = accessPolicy === undefined ? undefined : (0, codec_js_1.checkAccessPolicy)(accessPolicy);
|
|
63
|
+
const retention = retentionPolicy === undefined ? undefined : (0, codec_js_1.checkRetentionPolicy)(retentionPolicy);
|
|
64
|
+
// A caller without a v2 id is refused and recorded by the store itself
|
|
65
|
+
//; there is no gene to hold to a DataPolicy.
|
|
66
|
+
const violation = (0, codec_js_1.isV2GeneId)(caller.geneId) ? (0, data_policy_js_1.dataPolicyViolation)(dataPolicy, policy ?? types_js_1.DEFAULT_ACCESS_POLICY, retention ?? null) : null;
|
|
67
|
+
if (violation)
|
|
68
|
+
refuse(key, category, violation);
|
|
69
|
+
return (0, codec_js_1.fromEntryJson)(backend.write(caller, {
|
|
70
|
+
key,
|
|
71
|
+
value: (0, codec_js_1.encodeValue)(value),
|
|
72
|
+
category,
|
|
73
|
+
...(policy === undefined ? {} : { accessPolicy: policy }),
|
|
74
|
+
...(retention === undefined ? {} : { retentionPolicy: retention }),
|
|
75
|
+
}));
|
|
76
|
+
},
|
|
77
|
+
queryMemory(filter = {}) {
|
|
78
|
+
checkFilter(filter);
|
|
79
|
+
return backend.query(caller, filter).map(codec_js_1.fromEntryJson);
|
|
80
|
+
},
|
|
81
|
+
deleteMemory(key) {
|
|
82
|
+
(0, codec_js_1.checkKey)(key);
|
|
83
|
+
backend.delete(caller, key);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** The five fields, nothing else, each well-formed. */
|
|
88
|
+
function checkFilter(filter) {
|
|
89
|
+
if (!filter || typeof filter !== "object" || Array.isArray(filter)) {
|
|
90
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", "filter must be an object");
|
|
91
|
+
}
|
|
92
|
+
const f = filter;
|
|
93
|
+
const unknown = Object.keys(f).filter((k) => !types_js_1.MEMORY_FILTER_FIELDS.includes(k));
|
|
94
|
+
if (unknown.length > 0) {
|
|
95
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", `unknown filter field(s) ${unknown.join(", ")}; a MemoryFilter has ${types_js_1.MEMORY_FILTER_FIELDS.join(", ")}`);
|
|
96
|
+
}
|
|
97
|
+
if (f.category !== undefined && !(0, types_js_1.isMemoryCategory)(f.category)) {
|
|
98
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", `unknown category '${String(f.category)}'`);
|
|
99
|
+
}
|
|
100
|
+
if (f.keyPrefix !== undefined && typeof f.keyPrefix !== "string") {
|
|
101
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", "keyPrefix must be a string");
|
|
102
|
+
}
|
|
103
|
+
if (f.since !== undefined)
|
|
104
|
+
(0, codec_js_1.parseTimestamp)(f.since, "since");
|
|
105
|
+
if (f.until !== undefined)
|
|
106
|
+
(0, codec_js_1.parseTimestamp)(f.until, "until");
|
|
107
|
+
if (f.limit !== undefined && !(Number.isInteger(f.limit) && f.limit > 0)) {
|
|
108
|
+
throw new types_js_1.MemoryError("MEMORY_INVALID_INPUT", "limit must be a positive whole number (default 100, at most 1000 are returned)");
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=access.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/memory/access.ts"],"names":[],"mappings":";;AAwEA,wDAyFC;AA/ID,yCAAmJ;AACnJ,qDAAwE;AACxE,iDAA6E;AAE7E,yCAWoB;AAuCpB,SAAgB,sBAAsB,CAAC,OAAgC;IACrE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAElE;;;;OAIG;IACH,SAAS,MAAM,CAAC,GAAW,EAAE,QAAwB,EAAE,SAAi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js";
|
|
2
|
+
export type MemoryAuditAction = "memory_created" | "write" | "update" | "delete" | "evict" | "quota_rejected" | "access_denied"
|
|
3
|
+
/** Removed because its retention ran out. */
|
|
4
|
+
| "expired"
|
|
5
|
+
/** The agent's DataPolicy retention was set. */
|
|
6
|
+
| "retention_changed";
|
|
7
|
+
export interface MemoryAuditLine {
|
|
8
|
+
ts: string;
|
|
9
|
+
kind: "agent_memory";
|
|
10
|
+
action: MemoryAuditAction;
|
|
11
|
+
agentId: string;
|
|
12
|
+
entryId: string | null;
|
|
13
|
+
category: MemoryCategory | null;
|
|
14
|
+
/** The gene whose call caused it; null for the deployer / CLI. */
|
|
15
|
+
geneId: string | null;
|
|
16
|
+
/** Bytes added (positive) or freed (negative) by this event. */
|
|
17
|
+
sizeDelta: number;
|
|
18
|
+
/** AgentMemory total after the event. */
|
|
19
|
+
totalSize: number;
|
|
20
|
+
quota: number;
|
|
21
|
+
error: MemoryErrorCode | null;
|
|
22
|
+
}
|
|
23
|
+
export type MemoryAuditSink = (line: MemoryAuditLine) => void;
|
|
24
|
+
/** Appends to `<root>/.rotifer/audit.jsonl`, created owner-only (0600). */
|
|
25
|
+
export declare function fileAuditSink(root: string): MemoryAuditSink;
|
|
26
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/memory/audit.ts"],"names":[],"mappings":"AAYA,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpF,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,eAAe;AACjB,6CAA6C;GAC3C,SAAS;AACX,gDAAgD;GAC9C,mBAAmB,CAAC;AAExB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,kEAAkE;IAClE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;AAE9D,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAU3D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fileAuditSink = fileAuditSink;
|
|
4
|
+
/**
|
|
5
|
+
* AgentMemory lifecycle lines in `<root>/.rotifer/audit.jsonl`, in
|
|
6
|
+
* rotifer-core's MemoryAuditEvent shape (memory/events.rs), so a reader sees
|
|
7
|
+
* one format whichever side wrote the line.
|
|
8
|
+
*
|
|
9
|
+
* No key and no value: memory can hold user data (§30); the entryId
|
|
10
|
+
* identifies the entry. Audit is written whatever ROTIFER_TELEMETRY says
|
|
11
|
+
*. A failed audit write is MEMORY_STORAGE_ERROR, and the
|
|
12
|
+
* operation it describes does not happen.
|
|
13
|
+
*/
|
|
14
|
+
const node_fs_1 = require("node:fs");
|
|
15
|
+
const node_path_1 = require("node:path");
|
|
16
|
+
const types_js_1 = require("./types.js");
|
|
17
|
+
/** Appends to `<root>/.rotifer/audit.jsonl`, created owner-only (0600). */
|
|
18
|
+
function fileAuditSink(root) {
|
|
19
|
+
const path = (0, node_path_1.join)(root, ".rotifer", "audit.jsonl");
|
|
20
|
+
return (line) => {
|
|
21
|
+
try {
|
|
22
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(path), { recursive: true, mode: 0o700 });
|
|
23
|
+
(0, node_fs_1.appendFileSync)(path, JSON.stringify(line) + "\n", { mode: 0o600 });
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
throw new types_js_1.MemoryError("MEMORY_STORAGE_ERROR", `could not write the audit log: ${err.code ?? "error"}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/memory/audit.ts"],"names":[],"mappings":";;AA+CA,sCAUC;AAzDD;;;;;;;;;GASG;AACH,qCAAoD;AACpD,yCAA0C;AAC1C,yCAAoF;AAkCpF,2EAA2E;AAC3E,SAAgB,aAAa,CAAC,IAAY;IACxC,MAAM,IAAI,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC;YACH,IAAA,mBAAS,EAAC,IAAA,mBAAO,EAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC3D,IAAA,wBAAc,EAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACrE,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,sBAAW,CAAC,sBAAsB,EAAE,kCAAmC,GAA6B,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;QACpI,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { MemoryAuditSink } from "./audit.js";
|
|
2
|
+
import { type MemoryTelemetrySink } from "./telemetry.js";
|
|
3
|
+
import { MemoryError, type MemoryAccessPolicy, type MemoryCategory, type MemoryEntryJson, type MemoryFilter, type RetentionPolicy } from "./types.js";
|
|
4
|
+
/** Who is asking: the agent, and the gene inside it making the call. */
|
|
5
|
+
export interface MemoryCaller {
|
|
6
|
+
agentId: string;
|
|
7
|
+
/** Content-derived gene id (createdBy / lastAccessedBy). */
|
|
8
|
+
geneId: string;
|
|
9
|
+
/** The calling gene's phenotype domain (SAME_DOMAIN checks). */
|
|
10
|
+
domain: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MemoryWriteRequest {
|
|
13
|
+
key: string;
|
|
14
|
+
/** Standard base64. */
|
|
15
|
+
value: string;
|
|
16
|
+
category: MemoryCategory;
|
|
17
|
+
/** Omitted: a new entry gets the default; an update keeps the stored one. */
|
|
18
|
+
accessPolicy?: MemoryAccessPolicy;
|
|
19
|
+
/** Omitted: a new entry gets null (inherit); an update keeps the stored one. null resets to inherit (creator only). */
|
|
20
|
+
retentionPolicy?: RetentionPolicy | null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The store. Each call checks the caller's scope first and
|
|
24
|
+
* throws MemoryError with a memory error code; every state change is audited.
|
|
25
|
+
*/
|
|
26
|
+
export interface MemoryBackend {
|
|
27
|
+
read(caller: MemoryCaller, key: string, category: MemoryCategory | null): MemoryEntryJson | null;
|
|
28
|
+
write(caller: MemoryCaller, request: MemoryWriteRequest): MemoryEntryJson;
|
|
29
|
+
query(caller: MemoryCaller, filter: MemoryFilter): MemoryEntryJson[];
|
|
30
|
+
delete(caller: MemoryCaller, key: string): void;
|
|
31
|
+
/** Bytes the agent's memory counts against its quota, and the quota. */
|
|
32
|
+
usage(agentId: string): {
|
|
33
|
+
totalSize: number;
|
|
34
|
+
quota: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** What the deployer configured for an agent's memory (agent record). */
|
|
38
|
+
export interface AgentMemoryConfig {
|
|
39
|
+
/** Bytes. */
|
|
40
|
+
quota: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The AgentMemory methods of rotifer-napi's PlaygroundBinding (v0.9.4).
|
|
44
|
+
* Requests are the wire JSON; errors are thrown as "CODE: message".
|
|
45
|
+
*/
|
|
46
|
+
export interface NativeMemoryApi {
|
|
47
|
+
memoryRead(agentId: string, callerGeneId: string, callerDomain: string, requestJson: string): unknown;
|
|
48
|
+
memoryWrite(agentId: string, callerGeneId: string, callerDomain: string, requestJson: string): unknown;
|
|
49
|
+
memoryQuery(agentId: string, callerGeneId: string, callerDomain: string, requestJson: string): unknown;
|
|
50
|
+
memoryDelete(agentId: string, callerGeneId: string, callerDomain: string, requestJson: string): unknown;
|
|
51
|
+
/** The whole AgentMemory (wire JSON): the deployer's view. */
|
|
52
|
+
memoryGet(agentId: string): unknown;
|
|
53
|
+
memoryCreate(agentId: string, quotaBytes?: number): unknown;
|
|
54
|
+
/** The agent's DataPolicy retention in days, inherited by entries with no retentionPolicy; null: unlimited. */
|
|
55
|
+
memorySetDataPolicyRetention(agentId: string, days: number | null): unknown;
|
|
56
|
+
}
|
|
57
|
+
export declare function hasNativeMemory(binding: unknown): binding is NativeMemoryApi;
|
|
58
|
+
/** The napi store, behind MemoryBackend. Its errors become MemoryError. */
|
|
59
|
+
export declare class NapiMemoryBackend implements MemoryBackend {
|
|
60
|
+
private readonly native;
|
|
61
|
+
constructor(native: NativeMemoryApi);
|
|
62
|
+
read(caller: MemoryCaller, key: string, category: MemoryCategory | null): MemoryEntryJson | null;
|
|
63
|
+
write(caller: MemoryCaller, request: MemoryWriteRequest): MemoryEntryJson;
|
|
64
|
+
query(caller: MemoryCaller, filter: MemoryFilter): MemoryEntryJson[];
|
|
65
|
+
delete(caller: MemoryCaller, key: string): void;
|
|
66
|
+
usage(agentId: string): {
|
|
67
|
+
totalSize: number;
|
|
68
|
+
quota: number;
|
|
69
|
+
};
|
|
70
|
+
private call;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* napi throws "MEMORY_X: message" → MemoryError(code, message). Anything else
|
|
74
|
+
* the binding throws is a storage failure, not a pass-through.
|
|
75
|
+
*/
|
|
76
|
+
export declare function asMemoryError(err: unknown): MemoryError;
|
|
77
|
+
/**
|
|
78
|
+
* Complete test double: one JSON file per agent under
|
|
79
|
+
* `<root>/.rotifer/memory/<agentId>.json`. Audit lines go to the given sink
|
|
80
|
+
* before the file is replaced, and a failed audit or file write fails the
|
|
81
|
+
* call with MEMORY_STORAGE_ERROR. Not safe for concurrent
|
|
82
|
+
* writers across processes — it is not a production store.
|
|
83
|
+
*/
|
|
84
|
+
export declare class JsonFileMemoryBackend implements MemoryBackend {
|
|
85
|
+
private readonly root;
|
|
86
|
+
private readonly configFor;
|
|
87
|
+
private readonly telemetry;
|
|
88
|
+
private readonly audit;
|
|
89
|
+
private readonly now;
|
|
90
|
+
constructor(root: string, configFor: (agentId: string) => AgentMemoryConfig, telemetry: MemoryTelemetrySink, audit: MemoryAuditSink, options?: {
|
|
91
|
+
now?: () => number;
|
|
92
|
+
});
|
|
93
|
+
read(caller: MemoryCaller, key: string, category: MemoryCategory | null): MemoryEntryJson | null;
|
|
94
|
+
write(caller: MemoryCaller, request: MemoryWriteRequest): MemoryEntryJson;
|
|
95
|
+
query(caller: MemoryCaller, filter: MemoryFilter): MemoryEntryJson[];
|
|
96
|
+
delete(caller: MemoryCaller, key: string): void;
|
|
97
|
+
/** Like napi's memoryGet, which it stands for: expired entries are purged first. */
|
|
98
|
+
usage(agentId: string): {
|
|
99
|
+
totalSize: number;
|
|
100
|
+
quota: number;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* napi's memorySetDataPolicyRetention: the agent's own retention, which an
|
|
104
|
+
* entry with no retentionPolicy inherits; null is unlimited. An integer
|
|
105
|
+
* 1..2147483647 or null, else MEMORY_INVALID_INPUT; an agent without memory
|
|
106
|
+
* is MEMORY_NOT_FOUND. Audited as retention_changed.
|
|
107
|
+
*/
|
|
108
|
+
setDataPolicyRetention(agentId: string, days: number | null): void;
|
|
109
|
+
/** Bytes of key + value + retention currently stored for the agent. */
|
|
110
|
+
totalSize(agentId: string): number;
|
|
111
|
+
private mayAccess;
|
|
112
|
+
private requireScope;
|
|
113
|
+
/**
|
|
114
|
+
* Every call comes from a gene with a v2 id, which is
|
|
115
|
+
* what createdBy / lastAccessedBy record. Any other caller is refused —
|
|
116
|
+
* audited with geneId null (and the entry, when the call named a key) and
|
|
117
|
+
* reported — before anything is read or written.
|
|
118
|
+
*/
|
|
119
|
+
private requireIdentity;
|
|
120
|
+
private deny;
|
|
121
|
+
private pathFor;
|
|
122
|
+
/**
|
|
123
|
+
* An entry expires once now >= updatedAt + maxRetentionDays. Only an entry
|
|
124
|
+
* with no retentionPolicy inherits the agent's; its own maxRetentionDays:
|
|
125
|
+
* null is unlimited.
|
|
126
|
+
*/
|
|
127
|
+
private isExpired;
|
|
128
|
+
/**
|
|
129
|
+
* The agent's memory with its expired entries purged first — removed,
|
|
130
|
+
* audited one "expired" line each (no key, geneId null), in entryId order —
|
|
131
|
+
* before the call that asked for it, which may still be refused: as
|
|
132
|
+
* rotifer-core does it at the start of each call's transaction.
|
|
133
|
+
*/
|
|
134
|
+
private loadLive;
|
|
135
|
+
private load;
|
|
136
|
+
/** Audit lines first, then the file; a failure in either is MEMORY_STORAGE_ERROR. */
|
|
137
|
+
private save;
|
|
138
|
+
private writeAudit;
|
|
139
|
+
private line;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/memory/backend.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAsC,eAAe,EAAE,MAAM,YAAY,CAAC;AAEtF,OAAO,EAA2C,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAOL,WAAW,EA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