@telorun/kernel 0.63.0 → 0.65.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/dist/boot-context-registry.js +1 -3
- package/dist/boot-context-registry.js.map +1 -1
- package/dist/bundle/module-artifact.js +15 -8
- package/dist/bundle/module-artifact.js.map +1 -1
- package/dist/controller-loader.js +4 -0
- package/dist/controller-loader.js.map +1 -1
- package/dist/controller-loaders/bundle-loader.js +1 -0
- package/dist/controller-loaders/bundle-loader.js.map +1 -1
- package/dist/controller-loaders/napi-loader.d.ts.map +1 -1
- package/dist/controller-loaders/napi-loader.js +24 -8
- package/dist/controller-loaders/napi-loader.js.map +1 -1
- package/dist/controller-loaders/npm-loader.js +37 -28
- package/dist/controller-loaders/npm-loader.js.map +1 -1
- package/dist/controller-registry.js +3 -5
- package/dist/controller-registry.js.map +1 -1
- package/dist/controllers/resource-definition/abstract-controller.js +2 -1
- package/dist/controllers/resource-definition/abstract-controller.js.map +1 -1
- package/dist/controllers/resource-definition/resource-definition-controller.js +2 -1
- package/dist/controllers/resource-definition/resource-definition-controller.js.map +1 -1
- package/dist/controllers/type/json-schema-controller.js +3 -0
- package/dist/controllers/type/json-schema-controller.js.map +1 -1
- package/dist/directory-lock.js +5 -5
- package/dist/directory-lock.js.map +1 -1
- package/dist/evaluation-context.d.ts +14 -0
- package/dist/evaluation-context.d.ts.map +1 -1
- package/dist/evaluation-context.js +145 -21
- package/dist/evaluation-context.js.map +1 -1
- package/dist/events.js +1 -3
- package/dist/events.js.map +1 -1
- package/dist/host-env.js +3 -2
- package/dist/host-env.js.map +1 -1
- package/dist/kernel.d.ts.map +1 -1
- package/dist/kernel.js +58 -26
- package/dist/kernel.js.map +1 -1
- package/dist/logging/console-sink.js +18 -29
- package/dist/logging/console-sink.js.map +1 -1
- package/dist/logging/debug-wire-sink.js +11 -23
- package/dist/logging/debug-wire-sink.js.map +1 -1
- package/dist/logging/drop-accounting.js +28 -41
- package/dist/logging/drop-accounting.js.map +1 -1
- package/dist/logging/file-sink.js +28 -38
- package/dist/logging/file-sink.js.map +1 -1
- package/dist/logging/kernel-logging.js +30 -41
- package/dist/logging/kernel-logging.js.map +1 -1
- package/dist/logging/logging-pipeline.js +197 -197
- package/dist/logging/logging-pipeline.js.map +1 -1
- package/dist/logging/sampler.js +21 -34
- package/dist/logging/sampler.js.map +1 -1
- package/dist/manifest-sources/local-manifest-cache-source.js +2 -0
- package/dist/manifest-sources/local-manifest-cache-source.js.map +1 -1
- package/dist/manifest-sources/memory-source.js +1 -3
- package/dist/manifest-sources/memory-source.js.map +1 -1
- package/dist/module-context.js +62 -37
- package/dist/module-context.js.map +1 -1
- package/dist/registry.js +5 -7
- package/dist/registry.js.map +1 -1
- package/dist/resource-context.d.ts +1 -0
- package/dist/resource-context.d.ts.map +1 -1
- package/dist/resource-context.js +33 -29
- package/dist/resource-context.js.map +1 -1
- package/dist/resource-uri.js +4 -0
- package/dist/resource-uri.js.map +1 -1
- package/dist/runtime-seam.js +42 -55
- package/dist/runtime-seam.js.map +1 -1
- package/dist/schema-validator.js +20 -18
- package/dist/schema-validator.js.map +1 -1
- package/dist/tracing.js +4 -19
- package/dist/tracing.js.map +1 -1
- package/dist/transports/oci/oci-client.js +3 -1
- package/dist/transports/oci/oci-client.js.map +1 -1
- package/dist/transports/oci/oci-transport.js +17 -16
- package/dist/transports/oci/oci-transport.js.map +1 -1
- package/dist/transports/registry-transport.js +4 -0
- package/dist/transports/registry-transport.js.map +1 -1
- package/dist/transports/transport-registry.js +1 -0
- package/dist/transports/transport-registry.js.map +1 -1
- package/package.json +3 -3
- package/src/controller-loaders/napi-loader.ts +28 -9
- package/src/evaluation-context.ts +90 -0
- package/src/kernel.ts +1 -0
- package/src/resource-context.ts +7 -0
|
@@ -1,72 +1,62 @@
|
|
|
1
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _FileSink_buffer, _FileSink_encode, _FileSink_fd, _FileSink_timer, _FileSink_closed;
|
|
13
1
|
import { closeSync, openSync, writeSync } from "node:fs";
|
|
14
2
|
import { encodeJsonLine } from "./encode-json.js";
|
|
15
3
|
import { encodePrettyLine } from "./encode-pretty.js";
|
|
16
4
|
import { DEFAULT_BUFFER_POLICY } from "./log-sink.js";
|
|
17
5
|
import { RecordBuffer } from "./log-sink.js";
|
|
18
6
|
export class FileSink {
|
|
7
|
+
sinkId;
|
|
8
|
+
level;
|
|
9
|
+
syncFlushable = true;
|
|
10
|
+
#buffer;
|
|
11
|
+
#encode;
|
|
12
|
+
#fd;
|
|
13
|
+
#timer;
|
|
14
|
+
#closed = false;
|
|
19
15
|
constructor(options) {
|
|
20
|
-
this.syncFlushable = true;
|
|
21
|
-
_FileSink_buffer.set(this, void 0);
|
|
22
|
-
_FileSink_encode.set(this, void 0);
|
|
23
|
-
_FileSink_fd.set(this, void 0);
|
|
24
|
-
_FileSink_timer.set(this, void 0);
|
|
25
|
-
_FileSink_closed.set(this, false);
|
|
26
16
|
this.sinkId = options.sinkId;
|
|
27
17
|
this.level = options.level;
|
|
28
18
|
const policy = options.policy ?? DEFAULT_BUFFER_POLICY;
|
|
29
|
-
|
|
19
|
+
this.#buffer = new RecordBuffer(policy, options.onDrop);
|
|
30
20
|
const encoding = options.encoding ?? "json";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
this.#encode =
|
|
22
|
+
encoding === "pretty"
|
|
23
|
+
? (record) => encodePrettyLine(record, { color: false })
|
|
24
|
+
: (record) => encodeJsonLine(record, { encodeBytes: options.encodeBytes });
|
|
25
|
+
this.#fd = openSync(options.destination, "a");
|
|
26
|
+
this.#timer = setInterval(() => this.flushSync(), policy.flushIntervalMs);
|
|
36
27
|
// A pending flush tick must never be the reason a process stays alive; the
|
|
37
28
|
// shutdown flush is what guarantees the tail is written.
|
|
38
|
-
|
|
29
|
+
this.#timer.unref?.();
|
|
39
30
|
}
|
|
40
31
|
write(record) {
|
|
41
|
-
if (
|
|
32
|
+
if (this.#closed)
|
|
42
33
|
return;
|
|
43
|
-
|
|
34
|
+
this.#buffer.push(record);
|
|
44
35
|
}
|
|
45
36
|
async flush() {
|
|
46
37
|
this.flushSync();
|
|
47
38
|
}
|
|
48
39
|
flushSync() {
|
|
49
|
-
if (
|
|
40
|
+
if (this.#closed)
|
|
50
41
|
return;
|
|
51
|
-
const records =
|
|
42
|
+
const records = this.#buffer.drain();
|
|
52
43
|
if (records.length === 0)
|
|
53
44
|
return;
|
|
54
45
|
let payload = "";
|
|
55
46
|
for (const record of records)
|
|
56
|
-
payload +=
|
|
57
|
-
writeSync(
|
|
47
|
+
payload += this.#encode(record);
|
|
48
|
+
writeSync(this.#fd, payload);
|
|
58
49
|
}
|
|
59
50
|
async close() {
|
|
60
|
-
if (
|
|
51
|
+
if (this.#closed)
|
|
61
52
|
return;
|
|
62
53
|
this.flushSync();
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
clearInterval(
|
|
66
|
-
|
|
54
|
+
this.#closed = true;
|
|
55
|
+
if (this.#timer) {
|
|
56
|
+
clearInterval(this.#timer);
|
|
57
|
+
this.#timer = undefined;
|
|
67
58
|
}
|
|
68
|
-
closeSync(
|
|
59
|
+
closeSync(this.#fd);
|
|
69
60
|
}
|
|
70
61
|
}
|
|
71
|
-
_FileSink_buffer = new WeakMap(), _FileSink_encode = new WeakMap(), _FileSink_fd = new WeakMap(), _FileSink_timer = new WeakMap(), _FileSink_closed = new WeakMap();
|
|
72
62
|
//# sourceMappingURL=file-sink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-sink.js","sourceRoot":"","sources":["../../src/logging/file-sink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-sink.js","sourceRoot":"","sources":["../../src/logging/file-sink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAA+C,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAuB7C,MAAM,OAAO,QAAQ;IACV,MAAM,CAAS;IACf,KAAK,CAAS;IACd,aAAa,GAAG,IAAI,CAAC;IAErB,OAAO,CAAe;IACtB,OAAO,CAAgC;IACvC,GAAG,CAAS;IACrB,MAAM,CAA6C;IACnD,OAAO,GAAG,KAAK,CAAC;IAEhB,YAAY,OAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,qBAAqB,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAA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AAC,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC1B,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _KernelLogging_rootScope, _KernelLogging_bootstrap, _KernelLogging_sealed, _KernelLogging_streams;
|
|
13
1
|
import { parseLevelName, SEVERITY, } from "@telorun/sdk";
|
|
14
2
|
import { BOOTSTRAP_SINK_ID, createBootstrapWriter } from "./bootstrap-writer.js";
|
|
15
3
|
import { ConsoleSink } from "./console-sink.js";
|
|
@@ -26,14 +14,16 @@ function declaredSinkCount(manifests) {
|
|
|
26
14
|
return root?.logging?.sinks?.length ?? 0;
|
|
27
15
|
}
|
|
28
16
|
export class KernelLogging {
|
|
17
|
+
pipeline;
|
|
18
|
+
host;
|
|
19
|
+
#rootScope;
|
|
20
|
+
#bootstrap;
|
|
21
|
+
#sealed = false;
|
|
22
|
+
/** Kept so the zero-config console sink can be rebuilt at the resolved
|
|
23
|
+
* threshold once the manifest is known (see {@link sealBootstrap}). */
|
|
24
|
+
#streams;
|
|
29
25
|
constructor(options) {
|
|
30
|
-
|
|
31
|
-
_KernelLogging_bootstrap.set(this, void 0);
|
|
32
|
-
_KernelLogging_sealed.set(this, false);
|
|
33
|
-
/** Kept so the zero-config console sink can be rebuilt at the resolved
|
|
34
|
-
* threshold once the manifest is known (see {@link sealBootstrap}). */
|
|
35
|
-
_KernelLogging_streams.set(this, void 0);
|
|
36
|
-
__classPrivateFieldSet(this, _KernelLogging_streams, { env: options.env, stdout: options.stdout, stderr: options.stderr }, "f");
|
|
26
|
+
this.#streams = { env: options.env, stdout: options.stdout, stderr: options.stderr };
|
|
37
27
|
this.pipeline = new LoggingPipeline({
|
|
38
28
|
fallbackStream: options.fallbackStream ?? {
|
|
39
29
|
write: (chunk) => process.stderr.write(chunk),
|
|
@@ -42,16 +32,16 @@ export class KernelLogging {
|
|
|
42
32
|
// §12.3: a fixed default of `info` until the manifest resolves. This phase
|
|
43
33
|
// is the only one not manifest-governed, and it is deliberately not
|
|
44
34
|
// configurable by any other means.
|
|
45
|
-
|
|
35
|
+
this.#rootScope = {
|
|
46
36
|
threshold: SEVERITY.info,
|
|
47
37
|
redaction: EMPTY_REDACTION_POLICY,
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
this.pipeline.attach(
|
|
51
|
-
this.host = createLoggingHost(this.pipeline, () =>
|
|
38
|
+
};
|
|
39
|
+
this.#bootstrap = createBootstrapWriter(options);
|
|
40
|
+
this.pipeline.attach(this.#bootstrap);
|
|
41
|
+
this.host = createLoggingHost(this.pipeline, () => this.#rootScope.threshold, (sinkId, cause, count) => this.recordDrop(sinkId, cause, count));
|
|
52
42
|
}
|
|
53
43
|
get rootScope() {
|
|
54
|
-
return
|
|
44
|
+
return this.#rootScope;
|
|
55
45
|
}
|
|
56
46
|
setTraceContextProvider(provider) {
|
|
57
47
|
this.pipeline.setTraceContextProvider(provider);
|
|
@@ -67,11 +57,11 @@ export class KernelLogging {
|
|
|
67
57
|
* is no longer in force.
|
|
68
58
|
*/
|
|
69
59
|
applyRootConfig(block, secretValues) {
|
|
70
|
-
|
|
60
|
+
this.#rootScope = buildScopeConfig(block, {
|
|
71
61
|
threshold: SEVERITY.info,
|
|
72
62
|
redaction: EMPTY_REDACTION_POLICY,
|
|
73
63
|
secretValues,
|
|
74
|
-
})
|
|
64
|
+
});
|
|
75
65
|
}
|
|
76
66
|
/**
|
|
77
67
|
* Detach the bootstrap writer and stop holding records for replay. Called once
|
|
@@ -92,12 +82,12 @@ export class KernelLogging {
|
|
|
92
82
|
* so `logging: { level: debug }` with no `sinks:` behaves as documented.
|
|
93
83
|
*/
|
|
94
84
|
sealBootstrap(manifests) {
|
|
95
|
-
if (
|
|
85
|
+
if (this.#sealed)
|
|
96
86
|
return;
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
this.pipeline.detach(
|
|
100
|
-
|
|
87
|
+
this.#sealed = true;
|
|
88
|
+
if (this.#bootstrap) {
|
|
89
|
+
this.pipeline.detach(this.#bootstrap);
|
|
90
|
+
this.#bootstrap = undefined;
|
|
101
91
|
}
|
|
102
92
|
// Drop the replay buffer *before* attaching the zero-config sink, so the
|
|
103
93
|
// records the bootstrap writer already wrote live are not replayed into it.
|
|
@@ -105,19 +95,19 @@ export class KernelLogging {
|
|
|
105
95
|
if (declaredSinkCount(manifests) === 0) {
|
|
106
96
|
this.pipeline.attach(new ConsoleSink({
|
|
107
97
|
sinkId: BOOTSTRAP_SINK_ID,
|
|
108
|
-
level:
|
|
98
|
+
level: this.#rootScope.threshold,
|
|
109
99
|
destination: "stderr",
|
|
110
100
|
encoding: "auto",
|
|
111
101
|
color: "auto",
|
|
112
|
-
env:
|
|
113
|
-
stdout:
|
|
114
|
-
stderr:
|
|
102
|
+
env: this.#streams.env,
|
|
103
|
+
stdout: this.#streams.stdout,
|
|
104
|
+
stderr: this.#streams.stderr,
|
|
115
105
|
}));
|
|
116
106
|
}
|
|
117
107
|
}
|
|
118
108
|
/** A logger scoped to a module context, stamped with a resource identity. */
|
|
119
109
|
createLogger(scope, resource) {
|
|
120
|
-
return this.pipeline.createLogger(scope ??
|
|
110
|
+
return this.pipeline.createLogger(scope ?? this.#rootScope, resource);
|
|
121
111
|
}
|
|
122
112
|
/**
|
|
123
113
|
* Every module context's resolved logging configuration, keyed by its dotted
|
|
@@ -131,7 +121,7 @@ export class KernelLogging {
|
|
|
131
121
|
*/
|
|
132
122
|
scopesFrom(rootContext) {
|
|
133
123
|
const scopes = new Map();
|
|
134
|
-
scopes.set("",
|
|
124
|
+
scopes.set("", this.#rootScope);
|
|
135
125
|
const visit = (context) => {
|
|
136
126
|
for (const child of context.children ?? []) {
|
|
137
127
|
const config = child.getLoggingConfig?.();
|
|
@@ -148,13 +138,12 @@ export class KernelLogging {
|
|
|
148
138
|
* itself, which §13.1 requires to go through this pipeline rather than to
|
|
149
139
|
* `process.stderr` or `console.*`. */
|
|
150
140
|
kernelLogger() {
|
|
151
|
-
return this.pipeline.createLogger(
|
|
141
|
+
return this.pipeline.createLogger(this.#rootScope, undefined);
|
|
152
142
|
}
|
|
153
143
|
async shutdown() {
|
|
154
144
|
await this.pipeline.close();
|
|
155
145
|
}
|
|
156
146
|
}
|
|
157
|
-
_KernelLogging_rootScope = new WeakMap(), _KernelLogging_bootstrap = new WeakMap(), _KernelLogging_sealed = new WeakMap(), _KernelLogging_streams = new WeakMap();
|
|
158
147
|
/**
|
|
159
148
|
* Merge a `logging:` block over an inherited configuration. Config cascades and
|
|
160
149
|
* may be narrowed at each hop, which is what makes a dependency you do not own
|
|
@@ -193,7 +182,7 @@ function parseTickMs(tick) {
|
|
|
193
182
|
const match = /^\s*(\d+(?:\.\d+)?)\s*(ms|s|m|h)\s*$/.exec(tick);
|
|
194
183
|
if (!match)
|
|
195
184
|
return DEFAULT_SAMPLING_TICK_MS;
|
|
196
|
-
const unit = { ms: 1, s: 1000, m:
|
|
185
|
+
const unit = { ms: 1, s: 1000, m: 60_000, h: 3_600_000 }[match[2]];
|
|
197
186
|
return Number(match[1]) * unit;
|
|
198
187
|
}
|
|
199
188
|
//# sourceMappingURL=kernel-logging.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel-logging.js","sourceRoot":"","sources":["../../src/logging/kernel-logging.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kernel-logging.js","sourceRoot":"","sources":["../../src/logging/kernel-logging.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,QAAQ,GAKT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAExF,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,eAAe,EAA+C,MAAM,uBAAuB,CAAC;AAuBrG,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAUtC;;;+BAG+B;AAC/B,SAAS,iBAAiB,CAAC,SAAuC;IAChE,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,kBAAkB,CAEnD,CAAC;IACd,OAAO,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;AAC3C,CAAC;AA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