@kanadego/dsh-heartbeat 1.5.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/LICENSE +21 -0
- package/README.md +192 -0
- package/assets/frontwin.ps1 +44 -0
- package/assets/idle.ps1 +27 -0
- package/assets/notify.ps1 +69 -0
- package/assets/presets/heartbeat/agent.cordis.yml +66 -0
- package/assets/presets/heartbeat/preset.yml +2 -0
- package/assets/screenpulse.ps1 +168 -0
- package/assets/vault.ps1 +52 -0
- package/client.js +428 -0
- package/config/busy-rules.json +63 -0
- package/config/interests.json +30 -0
- package/config/policy.json +57 -0
- package/config/profile-schema.json +68 -0
- package/config/watchlist.json +9 -0
- package/cordis.patch.yml +14 -0
- package/dist/bindings-XPPSKILN.js +19 -0
- package/dist/bindings-XPPSKILN.js.map +1 -0
- package/dist/chunk-2M35HRL6.js +1207 -0
- package/dist/chunk-2M35HRL6.js.map +1 -0
- package/dist/chunk-4UE74TUB.js +98 -0
- package/dist/chunk-4UE74TUB.js.map +1 -0
- package/dist/chunk-AISZRA4C.js +235 -0
- package/dist/chunk-AISZRA4C.js.map +1 -0
- package/dist/chunk-J6ZTRFFW.js +64 -0
- package/dist/chunk-J6ZTRFFW.js.map +1 -0
- package/dist/chunk-LLD7LUNN.js +202 -0
- package/dist/chunk-LLD7LUNN.js.map +1 -0
- package/dist/chunk-S7PTR42P.js +19 -0
- package/dist/chunk-S7PTR42P.js.map +1 -0
- package/dist/cli/index.js +589 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/inbox-MMLHISQV.js +22 -0
- package/dist/inbox-MMLHISQV.js.map +1 -0
- package/dist/index.js +2745 -0
- package/dist/index.js.map +1 -0
- package/dist/lib-FJP7J4T6.js +2281 -0
- package/dist/lib-FJP7J4T6.js.map +1 -0
- package/dist/runtime-J5NOPRBA.js +11 -0
- package/dist/runtime-J5NOPRBA.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/.pnpm/@deepseek-ai+cordis@4.0.2/node_modules/@deepseek-ai/cordis/lib/index.js","../node_modules/.pnpm/@deepseek-ai+dsh-settings@0_2dd31f709f91e7b96c62a2afe9d4c22c/node_modules/@deepseek-ai/dsh-settings/lib/index.js"],"sourcesContent":["import { defineProperty, hyphenate, isNullable } from \"@deepseek-ai/cosmokit\";\n//#region lib/types/utils.js\n/** Ordered collection of disposable values with O(1) deletion by value. */\nvar DisposableList = class {\n\tsn = 0;\n\tmap = /* @__PURE__ */ new Map();\n\tweak = /* @__PURE__ */ new WeakMap();\n\tget length() {\n\t\treturn this.map.size;\n\t}\n\tpush(value) {\n\t\tconst sn = ++this.sn;\n\t\tthis.map.set(sn, value);\n\t\tthis.weak.set(value, sn);\n\t\treturn () => this.map.delete(sn);\n\t}\n\tdelete(value) {\n\t\tconst sn = this.weak.get(value);\n\t\tif (!sn) return false;\n\t\treturn this.map.delete(sn);\n\t}\n\tclear() {\n\t\tconst values = [...this.map.values()];\n\t\tthis.map.clear();\n\t\treturn values.reverse();\n\t}\n\t[Symbol.iterator]() {\n\t\treturn this.map.values();\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn [...this];\n\t}\n};\n/** Shared symbols used to avoid public property-name collisions. */\nconst symbols = {\n\tshadow: Symbol.for(\"cordis.shadow\"),\n\treceiver: Symbol.for(\"cordis.receiver\"),\n\toriginal: Symbol.for(\"cordis.original\"),\n\tmetadata: Symbol.for(\"cordis.metadata\"),\n\tinitHooks: Symbol.for(\"cordis.initHooks\"),\n\tcheckProto: Symbol.for(\"cordis.checkProto\"),\n\teffect: Symbol.for(\"cordis.effect\"),\n\tfilter: Symbol.for(\"cordis.filter\"),\n\tisolate: Symbol.for(\"cordis.isolate\"),\n\tintercept: Symbol.for(\"cordis.intercept\"),\n\tinit: Symbol.for(\"cordis.init\"),\n\tcheck: Symbol.for(\"cordis.check\"),\n\tconfig: Symbol.for(\"cordis.config\"),\n\tinvoke: Symbol.for(\"cordis.invoke\"),\n\textend: Symbol.for(\"cordis.extend\"),\n\ttracker: Symbol.for(\"cordis.tracker\"),\n\tresolveConfig: Symbol.for(\"cordis.resolveConfig\")\n};\nconst GeneratorFunction = function* () {}.constructor;\nconst AsyncGeneratorFunction = async function* () {}.constructor;\n/** Return true when a plugin callback should be constructed with `new`. */\nfunction isConstructor(func) {\n\tif (!func.prototype) return false;\n\tif (func instanceof GeneratorFunction) return false;\n\tif (AsyncGeneratorFunction !== Function && func instanceof AsyncGeneratorFunction) return false;\n\treturn true;\n}\n/** Merge two prototype chains while preserving descriptors from `proto1`. */\nfunction joinPrototype(proto1, proto2) {\n\tif (proto1 === Object.prototype) return proto2;\n\tconst result = Object.create(joinPrototype(Object.getPrototypeOf(proto1), proto2));\n\tfor (const key of Reflect.ownKeys(proto1)) Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(proto1, key));\n\treturn result;\n}\n/** Return true for non-null objects and functions. */\nfunction isObject(value) {\n\treturn value && (typeof value === \"object\" || typeof value === \"function\");\n}\n/** Find a property descriptor by walking an object's prototype chain. */\nfunction getPropertyDescriptor(target, prop) {\n\tlet proto = target;\n\twhile (proto) {\n\t\tconst desc = Reflect.getOwnPropertyDescriptor(proto, prop);\n\t\tif (desc) return desc;\n\t\tproto = Object.getPrototypeOf(proto);\n\t}\n}\n/** Wrap services/functions so method calls see the caller's active context. */\nfunction getTraceable(ctx, value) {\n\tif (!isObject(value)) return value;\n\tif (Object.hasOwn(value, symbols.shadow)) return Object.getPrototypeOf(value);\n\tconst tracker = value[symbols.tracker];\n\tif (!tracker) return value;\n\treturn createTraceable(ctx, value, tracker);\n}\n/** Return a proxy that overlays readonly or writable properties onto a target. */\nfunction withProps(target, props) {\n\tif (!props) return target;\n\treturn new Proxy(target, {\n\t\tget: (target, prop, receiver) => {\n\t\t\tif (prop in props && prop !== \"constructor\") return Reflect.get(props, prop, receiver);\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t},\n\t\tset: (target, prop, value, receiver) => {\n\t\t\tif (prop in props && prop !== \"constructor\") return Reflect.set(props, prop, value, receiver);\n\t\t\treturn Reflect.set(target, prop, value, receiver);\n\t\t}\n\t});\n}\nfunction withProp(target, prop, value) {\n\treturn withProps(target, Object.defineProperty(Object.create(null), prop, {\n\t\tvalue,\n\t\twritable: false\n\t}));\n}\nfunction createShadow(ctx, target, property, receiver) {\n\tif (!property) return receiver;\n\tconst origin = Reflect.getOwnPropertyDescriptor(target, property)?.value;\n\tif (!origin) return receiver;\n\treturn withProp(receiver, property, ctx.extend({ [symbols.shadow]: origin }));\n}\nfunction createShadowMethod(ctx, value, outer, shadow) {\n\treturn new Proxy(value, { apply: (target, thisArg, args) => {\n\t\tif (thisArg === outer) thisArg = shadow;\n\t\treturn getTraceable(ctx, Reflect.apply(target, thisArg, args));\n\t} });\n}\nfunction createTraceable(ctx, value, tracker) {\n\tif (ctx[symbols.shadow] && !tracker.noShadow) ctx = Object.getPrototypeOf(ctx);\n\tconst proxy = new Proxy(value, {\n\t\tget: (target, prop, receiver) => {\n\t\t\tif (prop === symbols.original) return target;\n\t\t\tif (prop === tracker.property) return ctx;\n\t\t\tif (typeof prop === \"symbol\") return Reflect.get(target, prop, receiver);\n\t\t\tif (tracker.associate && ctx.reflect.props[`${tracker.associate}.${prop}`]) return Reflect.get(ctx, `${tracker.associate}.${prop}`, withProp(ctx, symbols.receiver, receiver));\n\t\t\tlet shadow, innerValue;\n\t\t\tconst desc = getPropertyDescriptor(target, prop);\n\t\t\tif (desc && \"value\" in desc) innerValue = desc.value;\n\t\t\telse {\n\t\t\t\tshadow = createShadow(ctx, target, tracker.property, receiver);\n\t\t\t\tinnerValue = Reflect.get(target, prop, shadow);\n\t\t\t}\n\t\t\tconst innerTracker = innerValue?.[symbols.tracker];\n\t\t\tif (innerTracker) return createTraceable(ctx, innerValue, innerTracker);\n\t\t\telse if (!tracker.noShadow && typeof innerValue === \"function\") {\n\t\t\t\tshadow ??= createShadow(ctx, target, tracker.property, receiver);\n\t\t\t\treturn createShadowMethod(ctx, innerValue, receiver, shadow);\n\t\t\t} else return innerValue;\n\t\t},\n\t\tset: (target, prop, value, receiver) => {\n\t\t\tif (prop === symbols.original) return false;\n\t\t\tif (prop === tracker.property) return false;\n\t\t\tif (typeof prop === \"symbol\") return Reflect.set(target, prop, value, receiver);\n\t\t\tif (tracker.associate && ctx.reflect.props[`${tracker.associate}.${prop}`]) return Reflect.set(ctx, `${tracker.associate}.${prop}`, value, withProp(ctx, symbols.receiver, receiver));\n\t\t\tconst shadow = createShadow(ctx, target, tracker.property, receiver);\n\t\t\treturn Reflect.set(target, prop, value, shadow);\n\t\t},\n\t\tapply: (target, thisArg, args) => {\n\t\t\treturn applyTraceable(proxy, target, thisArg, args);\n\t\t}\n\t});\n\treturn proxy;\n}\nfunction applyTraceable(proxy, value, thisArg, args) {\n\tif (!value[symbols.invoke]) return Reflect.apply(value, thisArg, args);\n\treturn value[symbols.invoke].apply(proxy, args);\n}\n/** Create a callable service object that dispatches through `symbols.invoke`. */\nfunction createCallable(name, proto, tracker) {\n\tconst self = function(...args) {\n\t\treturn applyTraceable(createTraceable(self[\"ctx\"], self, tracker), self, this, args);\n\t};\n\tdefineProperty(self, \"name\", name);\n\treturn Object.setPrototypeOf(self, proto);\n}\nfunction handleError(info, reason, getOuterStack) {\n\tconst innerLines = info.error.stack.split(\"\\n\");\n\tif (typeof reason?.stack !== \"string\") {\n\t\tconst outerError = new Error(reason);\n\t\tconst lines = outerError.stack.split(\"\\n\");\n\t\tlines.splice(1, Infinity, ...getOuterStack());\n\t\touterError.stack = lines.join(\"\\n\");\n\t\tthrow outerError;\n\t}\n\tconst lines = reason.stack.split(\"\\n\");\n\tlet index = lines.indexOf(innerLines[2]);\n\tif (index === -1) throw reason;\n\tindex -= info.offset;\n\twhile (index > 0) {\n\t\tif (!lines[index - 1].endsWith(\" (<anonymous>)\")) break;\n\t\tindex -= 1;\n\t}\n\tlines.splice(index, Infinity, ...getOuterStack());\n\treason.stack = lines.join(\"\\n\");\n\tthrow reason;\n}\n/** Run a callback and splice outer call-site frames into thrown async errors. */\nfunction composeError(callback, getOuterStack = buildOuterStack()) {\n\tconst info = {\n\t\toffset: 1,\n\t\terror: /* @__PURE__ */ new Error()\n\t};\n\ttry {\n\t\tconst result = callback(info);\n\t\tif (isObject(result) && \"then\" in result) return result.then(void 0, (reason) => handleError(info, reason, getOuterStack));\n\t\telse return result;\n\t} catch (reason) {\n\t\thandleError(info, reason, getOuterStack);\n\t}\n}\n/** Capture a lazy stack-frame supplier for later error composition. */\nfunction buildOuterStack(offset = 0) {\n\tconst outerError = /* @__PURE__ */ new Error();\n\treturn () => outerError.stack.split(\"\\n\").slice(3 + offset);\n}\n//#endregion\n//#region lib/types/events.js\n/**\n* Return whether an event result should stop a bail-style dispatch.\n*\n* @param value — a listener's return value.\n* @returns `true` unless `value` is `null`, `false`, or `undefined`.\n*/\nfunction isBailed(value) {\n\treturn value !== null && value !== false && value !== void 0;\n}\n/**\n* Event bus installed as `ctx.events` and mixed into every context.\n*\n* The service supports concurrent, synchronous, serial, bail, and waterfall\n* dispatch and automatically disposes listeners with their owning fiber.\n*/\nvar EventsService = class {\n\tctx;\n\t_hooks = {};\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t\tthis.on(\"internal/listener\", function(name, listener, options) {\n\t\t\tif (name === \"internal/update\" && !options.global) return (this.fiber._hooks[\"internal/update\"] ??= new DisposableList())[options.prepend ? \"unshift\" : \"push\"](listener);\n\t\t});\n\t\tthis.on(\"internal/update\", function(config, noSave, next) {\n\t\t\tconst cbs = [...this._hooks[\"internal/update\"] || []];\n\t\t\tconst _next = () => {\n\t\t\t\treturn (cbs.shift() ?? next).call(this, config, noSave, _next);\n\t\t\t};\n\t\t\treturn _next();\n\t\t}, {\n\t\t\tglobal: true,\n\t\t\tprepend: true\n\t\t});\n\t}\n\t/**\n\t* Resolve listeners for one dispatch and apply context filtering.\n\t*\n\t* @param type — the dispatch mode, reported on `internal/dispatch`.\n\t* @param args — the raw dispatch arguments; consumed up to the event name.\n\t* @returns the matching listener callbacks, bound to the dispatch `this`.\n\t*/\n\tdispatch(type, args) {\n\t\tconst thisArg = typeof args[0] === \"object\" || typeof args[0] === \"function\" ? args.shift() : null;\n\t\tconst name = args.shift();\n\t\tif (!name.startsWith(\"internal/\")) this.emit(\"internal/dispatch\", type, name, args, thisArg);\n\t\tconst filter = thisArg?.[Context.filter];\n\t\treturn (this._hooks[name] || []).filter((hook) => hook.global || !filter || filter.call(thisArg, hook.ctx)).map((hook) => hook.callback.bind(thisArg));\n\t}\n\t/**\n\t* Run listeners concurrently and wait for all of them.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns a promise resolving once every listener has settled.\n\t*/\n\tasync parallel(...args) {\n\t\tconst errors = (await Promise.allSettled(this.dispatch(\"emit\", args).map(async (cb) => cb(...args)))).filter((result) => result.status === \"rejected\");\n\t\tif (errors.length) throw new AggregateError(errors.map((error) => error.reason));\n\t}\n\t/**\n\t* Run listeners synchronously without waiting for returned promises.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t*/\n\temit(...args) {\n\t\tthis.dispatch(\"emit\", args).map((cb) => cb(...args));\n\t}\n\t/**\n\t* Run listeners in order, awaiting each, until one returns a bail value.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns the first bail value (see {@link isBailed}), if any.\n\t*/\n\tasync serial(...args) {\n\t\tfor (const cb of this.dispatch(\"serial\", args)) {\n\t\t\tconst result = await cb(...args);\n\t\t\tif (isBailed(result)) return result;\n\t\t}\n\t}\n\t/**\n\t* Run listeners synchronously until one returns a bail value.\n\t*\n\t* @param args — optional `this`, the event name, then listener arguments.\n\t* @returns the first bail value (see {@link isBailed}), if any.\n\t*/\n\tbail(...args) {\n\t\tfor (const cb of this.dispatch(\"bail\", args)) {\n\t\t\tconst result = cb(...args);\n\t\t\tif (isBailed(result)) return result;\n\t\t}\n\t}\n\t/**\n\t* Compose listeners around the final `next` callback.\n\t*\n\t* The last dispatch argument is treated as the innermost `next`. Listeners\n\t* run outermost-first; a listener that does not call `next()` vetoes the\n\t* rest of the chain, including the built-in behavior.\n\t*\n\t* @param args — optional `this`, the event name, listener arguments, then `next`.\n\t* @returns the outermost listener's return value.\n\t*/\n\twaterfall(...args) {\n\t\tconst cbs = this.dispatch(\"waterfall\", args);\n\t\tconst inner = args.pop();\n\t\tconst next = () => {\n\t\t\treturn (cbs.shift() ?? inner)(...args);\n\t\t};\n\t\targs.push(next);\n\t\treturn next();\n\t}\n\t/**\n\t* Store a listener record as an effect on the current fiber.\n\t*\n\t* @param label — effect label shown in fiber diagnostics.\n\t* @param hooks — the listener list for one event.\n\t* @param callback — the listener to store.\n\t* @param options — placement and filtering options.\n\t* @returns a disposer that unregisters the listener.\n\t*/\n\tregister(label, hooks, callback, options) {\n\t\tconst method = options.prepend ? \"unshift\" : \"push\";\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\thooks[method]({\n\t\t\t\tctx: this.ctx,\n\t\t\t\tcallback,\n\t\t\t\t...options\n\t\t\t});\n\t\t\treturn () => this.unregister(hooks, callback);\n\t\t}, label);\n\t}\n\t/**\n\t* Remove a stored listener record.\n\t*\n\t* @param hooks — the listener list for one event.\n\t* @param callback — the listener to remove.\n\t* @returns `true` if the listener was found and removed.\n\t*/\n\tunregister(hooks, callback) {\n\t\tconst index = hooks.findIndex((hook) => hook.callback === callback);\n\t\tif (index >= 0) {\n\t\t\thooks.splice(index, 1);\n\t\t\treturn true;\n\t\t}\n\t}\n\t/**\n\t* Register an event listener owned by the current fiber.\n\t*\n\t* The listener is removed automatically when the fiber unloads. Throws\n\t* `CordisError('INACTIVE_EFFECT')` if the fiber is already disposed.\n\t*\n\t* @param name — the event name to listen for.\n\t* @param listener — called with the dispatch arguments.\n\t* @param options — listener options; a boolean is shorthand for `prepend`.\n\t* @returns a disposer removing the listener; `true` if it was still registered.\n\t*/\n\ton(name, listener, options) {\n\t\tif (typeof options !== \"object\") options = { prepend: options };\n\t\tthis.ctx.fiber.assertActive();\n\t\tlistener = this.ctx.reflect.bind(listener);\n\t\tconst result = this.bail(this.ctx, \"internal/listener\", name, listener, options);\n\t\tif (result) return result;\n\t\tconst hooks = this._hooks[name] ||= [];\n\t\tconst label = `ctx.on(${typeof name === \"string\" ? JSON.stringify(name) : name.toString()})`;\n\t\treturn this.register(label, hooks, listener, options);\n\t}\n\t/**\n\t* Register an event listener that disposes itself after the first call.\n\t*\n\t* @param name — the event name to listen for.\n\t* @param listener — called at most once with the dispatch arguments.\n\t* @param options — listener options; a boolean is shorthand for `prepend`.\n\t* @returns a disposer removing the listener; `true` if it was still registered.\n\t*/\n\tonce(name, listener, options) {\n\t\tconst dispose = this.on(name, function(...args) {\n\t\t\tdispose();\n\t\t\treturn listener.apply(this, args);\n\t\t}, options);\n\t\treturn dispose;\n\t}\n};\n//#endregion\n//#region lib/types/logger.js\n/** Built-in placeholder formatters used by `Logger.format()`. */\nconst defaultFormatters = {\n\ts: (value) => String(value),\n\td: (value) => Math.trunc(Number(value)),\n\ti: (value) => Math.trunc(Number(value)),\n\tf: (value) => Number(value),\n\to: (value) => JSON.stringify(value),\n\tO: (value) => JSON.stringify(value),\n\tc: () => \"\",\n\tC: (value, exporter, message) => {\n\t\treturn Logger.color(exporter, Logger.code(message.name, exporter.colors), value);\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error[\"errors\"]);\n}\n/** Logger facade for one named subsystem. */\nvar Logger = class {\n\tservice;\n\tstatic color(exporter, code, value, decoration = \"\") {\n\t\tif (!exporter.colors) return \"\" + value;\n\t\treturn `\\u001b[3${code < 8 ? code : \"8;5;\" + code}${exporter.colors >= 2 ? decoration : \"\"}m${value}\\u001b[0m`;\n\t}\n\tstatic code(name, level) {\n\t\tlet hash = 0;\n\t\tfor (let i = 0; i < name.length; i++) {\n\t\t\thash = (hash << 3) - hash + name.charCodeAt(i) + 13;\n\t\t\thash |= 0;\n\t\t}\n\t\tconst colors = !level ? [] : level >= 2 ? c256 : c16;\n\t\treturn colors[Math.abs(hash) % colors.length];\n\t}\n\tstatic format(exporter, message) {\n\t\tconst args = message.args.slice();\n\t\tif (args[0] instanceof Error) {\n\t\t\targs[0] = args[0].stack || args[0].message;\n\t\t\targs.unshift(\"%s\");\n\t\t} else if (typeof args[0] !== \"string\") args.unshift(\"%o\");\n\t\tlet format = args.shift();\n\t\tformat = format.replace(/%([a-zA-Z%])/g, (match, char) => {\n\t\t\tif (match === \"%%\") return \"%\";\n\t\t\tconst formatter = exporter.formatters?.[char] ?? defaultFormatters[char];\n\t\t\tif (typeof formatter === \"function\") return formatter(args.shift(), exporter, message);\n\t\t\treturn match;\n\t\t});\n\t\tconst oFormatter = exporter.formatters?.o ?? defaultFormatters.o;\n\t\tfor (let arg of args) {\n\t\t\tif (typeof arg === \"object\" && arg) arg = oFormatter(arg, exporter, message);\n\t\t\tformat += \" \" + arg;\n\t\t}\n\t\tconst { maxLength = 10240 } = exporter;\n\t\treturn format.split(/\\r?\\n/g).map((line) => {\n\t\t\treturn line.slice(0, maxLength) + (line.length > maxLength ? \"...\" : \"\");\n\t\t}).join(\"\\n\");\n\t}\n\tconstructor(options, service) {\n\t\tthis.service = service;\n\t\tObject.assign(this, options);\n\t\tthis.error = this._method(\"error\", 0);\n\t\tthis.info = this._method(\"info\", 1);\n\t\tthis.warn = this._method(\"warn\", 2);\n\t\tthis.debug = this._method(\"debug\", 3);\n\t}\n\t_method(type, level) {\n\t\treturn (...args) => {\n\t\t\tif (args.length === 1 && args[0] instanceof Error) {\n\t\t\t\tif (args[0].cause) this[type](args[0].cause);\n\t\t\t\telse if (isAggregateError(args[0])) {\n\t\t\t\t\targs[0].errors.forEach((error) => this[type](error));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst sn = ++this.service._snMessage;\n\t\t\tconst ts = Date.now();\n\t\t\tfor (const exporter of this.service.exporters.values()) {\n\t\t\t\tif ((exporter.levels?.[this.name] ?? exporter.levels?.default ?? this.level ?? 1) < level) continue;\n\t\t\t\tconst message = {\n\t\t\t\t\tsn,\n\t\t\t\t\tts,\n\t\t\t\t\ttype,\n\t\t\t\t\tlevel,\n\t\t\t\t\tname: this.name,\n\t\t\t\t\t...this.meta,\n\t\t\t\t\targs\n\t\t\t\t};\n\t\t\t\texporter.export(message);\n\t\t\t}\n\t\t};\n\t}\n};\n/** ANSI 16-color palette indexes used for logger name coloring. */\nconst c16 = [\n\t6,\n\t2,\n\t3,\n\t4,\n\t5,\n\t1\n];\n/** ANSI 256-color palette indexes used for logger name coloring. */\nconst c256 = [\n\t20,\n\t21,\n\t26,\n\t27,\n\t32,\n\t33,\n\t38,\n\t39,\n\t40,\n\t41,\n\t42,\n\t43,\n\t44,\n\t45,\n\t56,\n\t57,\n\t62,\n\t63,\n\t68,\n\t69,\n\t74,\n\t75,\n\t76,\n\t77,\n\t78,\n\t79,\n\t80,\n\t81,\n\t92,\n\t93,\n\t98,\n\t99,\n\t112,\n\t113,\n\t129,\n\t134,\n\t135,\n\t148,\n\t149,\n\t160,\n\t161,\n\t162,\n\t163,\n\t164,\n\t165,\n\t166,\n\t167,\n\t168,\n\t169,\n\t170,\n\t171,\n\t172,\n\t173,\n\t178,\n\t179,\n\t184,\n\t185,\n\t196,\n\t197,\n\t198,\n\t199,\n\t200,\n\t201,\n\t202,\n\t203,\n\t204,\n\t205,\n\t206,\n\t207,\n\t208,\n\t209,\n\t214,\n\t215,\n\t220,\n\t221\n];\n/**\n* Built-in logging service.\n*\n* Call `ctx.logger()` to create a named logger, or call `ctx.logger.info()`\n* directly to log with the current fiber-derived name.\n*/\nvar LoggerService = class LoggerService {\n\tbufferSize = 1e3;\n\tbuffer = [];\n\tctx;\n\t_snMessage = 0;\n\t_snExporter = 0;\n\texporters = /* @__PURE__ */ new Map();\n\tconstructor(ctx) {\n\t\tconst tracker = {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t};\n\t\tconst self = createCallable(\"logger\", joinPrototype(Object.getPrototypeOf(this), Function.prototype), tracker);\n\t\tObject.assign(self, this);\n\t\tself.ctx = ctx;\n\t\tdefineProperty(self, symbols.tracker, tracker);\n\t\tself.exporter({\n\t\t\tcolors: 3,\n\t\t\texport: (message) => {\n\t\t\t\tself.buffer.push(message);\n\t\t\t\tif (self.buffer.length > self.bufferSize) self.buffer = self.buffer.slice(-self.bufferSize);\n\t\t\t}\n\t\t});\n\t\treturn self;\n\t}\n\t/**\n\t* Register an exporter and dispose it with the current fiber.\n\t*\n\t* @param exporter — the sink that receives structured log messages.\n\t* @returns a disposer that removes the exporter.\n\t*/\n\texporter(exporter) {\n\t\treturn this.ctx.effect(() => {\n\t\t\tthis.exporters.set(++this._snExporter, exporter);\n\t\t\treturn () => this.exporters.delete(this._snExporter);\n\t\t}, \"ctx.logger.exporter()\");\n\t}\n\t_resolveConfig() {\n\t\tlet intercept = this.ctx[symbols.intercept];\n\t\tconst configs = [];\n\t\twhile (\"logger\" in intercept) {\n\t\t\tif (Object.hasOwn(intercept, \"logger\")) configs.unshift(intercept[\"logger\"]);\n\t\t\tintercept = Object.getPrototypeOf(intercept);\n\t\t}\n\t\treturn Object.assign({}, ...configs);\n\t}\n\t[symbols.invoke](name) {\n\t\tconst config = this._resolveConfig();\n\t\tconst fiber = (this.ctx[symbols.shadow] ?? this.ctx).fiber;\n\t\tname ??= config.name;\n\t\tname ??= hyphenate(fiber.name);\n\t\treturn new Logger({\n\t\t\tname,\n\t\t\tlevel: config.level,\n\t\t\tmeta: { fiber: new WeakRef(fiber) }\n\t\t}, this);\n\t}\n\tstatic {\n\t\tfor (const type of [\n\t\t\t\"error\",\n\t\t\t\"info\",\n\t\t\t\"warn\",\n\t\t\t\"debug\"\n\t\t]) LoggerService.prototype[type] = function(...args) {\n\t\t\treturn this()[type](...args);\n\t\t};\n\t}\n};\n//#endregion\n//#region lib/types/reflect.js\nfunction enhanceError(error) {\n\tconst lines = error.stack.split(\"\\n\");\n\tlines.splice(0, 2, `Error: ${error.message}`);\n\terror.stack = lines.join(\"\\n\");\n\treturn error;\n}\nconst RESERVED_WORDS = [\"prototype\", \"then\"];\nfunction isSpecialProperty(prop) {\n\treturn typeof prop === \"symbol\" || RESERVED_WORDS.includes(prop) || parseInt(prop).toString() === prop || prop.startsWith(\"_\");\n}\n/**\n* Reflection and service-resolution layer installed as `ctx.reflect`.\n*\n* This service powers the context proxy, service registration, accessors, and\n* the mixins that expose core service methods directly on `ctx`.\n*/\nvar ReflectService = class {\n\tctx;\n\t/** Proxy traps implementing service resolution for every context object. */\n\tstatic handler = {\n\t\tget: (target, prop, ctx) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.get(target, prop, ctx);\n\t\t\tif (Reflect.has(target, prop)) return getTraceable(ctx, Reflect.get(target, prop, ctx));\n\t\t\tconst error = /* @__PURE__ */ new Error(`cannot get property \"${prop}\" without inject`);\n\t\t\ttry {\n\t\t\t\tconst def = target.reflect.props[prop];\n\t\t\t\tif (def?.type === \"accessor\") return def.get.call(ctx, ctx[symbols.receiver], error);\n\t\t\t\tif (!ctx.fiber.runtime) return ctx.reflect.get(prop, false);\n\t\t\t\treturn ctx.events.waterfall(\"internal/get\", ctx, prop, error, () => {\n\t\t\t\t\tconst key = target[symbols.isolate][prop];\n\t\t\t\t\tlet fiber = (ctx[symbols.shadow] ?? ctx).fiber;\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tconst impl = fiber.store?.[prop];\n\t\t\t\t\t\tif (impl) return getTraceable(ctx, impl.value);\n\t\t\t\t\t\tif (prop in fiber.inject) {\n\t\t\t\t\t\t\terror.message = `cannot get required service \"${prop}\" in inactive context`;\n\t\t\t\t\t\t\tthrow error;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!fiber.runtime) throw error;\n\t\t\t\t\t\tif (fiber.parent[symbols.isolate][prop] !== key) throw error;\n\t\t\t\t\t\tfiber = fiber.parent.fiber;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tthrow e === error ? enhanceError(e) : e;\n\t\t\t}\n\t\t},\n\t\tset: (target, prop, value, ctx) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.set(target, prop, value, ctx);\n\t\t\tconst error = /* @__PURE__ */ new Error(`cannot set property \"${prop}\" without provide`);\n\t\t\tconst def = target.reflect.props[prop];\n\t\t\tif (!def) {\n\t\t\t\tif (!ctx.fiber.runtime) return Reflect.set(target, prop, value, ctx);\n\t\t\t\tthrow enhanceError(error);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (def.type === \"accessor\") {\n\t\t\t\t\tif (!def.set) return false;\n\t\t\t\t\treturn def.set.call(ctx, value, ctx[symbols.receiver], error);\n\t\t\t\t}\n\t\t\t\treturn ctx.events.waterfall(\"internal/set\", ctx, prop, value, error, () => {\n\t\t\t\t\treturn ctx.reflect.set(prop, value, error);\n\t\t\t\t});\n\t\t\t} catch (e) {\n\t\t\t\tthrow e === error ? enhanceError(e) : e;\n\t\t\t}\n\t\t},\n\t\thas: (target, prop) => {\n\t\t\tif (isSpecialProperty(prop)) return Reflect.has(target, prop);\n\t\t\tif (Reflect.has(target, prop)) return true;\n\t\t\treturn !!target.reflect.props[prop];\n\t\t}\n\t};\n\t/** Service implementations, keyed by isolation label. */\n\tstore = Object.create(null);\n\t/** Declared context properties (services and accessors), by name. */\n\tprops = Object.create(null);\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t\tthis.mixin(\"reflect\", [\n\t\t\t\"get\",\n\t\t\t\"set\",\n\t\t\t\"provide\",\n\t\t\t\"accessor\",\n\t\t\t\"mixin\"\n\t\t]);\n\t\tthis.mixin(\"fiber\", [\"runtime\", \"effect\"]);\n\t\tthis.mixin(\"registry\", [\"inject\", \"plugin\"]);\n\t\tthis.mixin(\"events\", [\n\t\t\t\"on\",\n\t\t\t\"once\",\n\t\t\t\"parallel\",\n\t\t\t\"emit\",\n\t\t\t\"serial\",\n\t\t\t\"bail\",\n\t\t\t\"waterfall\"\n\t\t]);\n\t}\n\t/**\n\t* Read a service from the store without the inject requirement.\n\t*\n\t* @param name — the service name.\n\t* @param strict — when `true`, only return implementations whose providing\n\t* fiber is currently active.\n\t* @returns the service value, or `undefined` when not (yet) provided.\n\t*/\n\tget(name, strict = true) {\n\t\treturn getTraceable(this.ctx, this._getImpl(name, strict)?.value);\n\t}\n\t_getImpl(name, strict = true) {\n\t\tconst key = this.ctx[symbols.isolate][name];\n\t\tconst impl = key && this.store[key];\n\t\tif (!impl) return;\n\t\tif (strict && impl.fiber.state !== 2) return;\n\t\treturn impl;\n\t}\n\t/**\n\t* Overwrite a provided service's value.\n\t*\n\t* @param name — the service name.\n\t* @param value — the new service value.\n\t* @param error — carrier for the caller stack in diagnostics.\n\t* @returns `true` on success.\n\t* @throws when `name` was never provided, or was provided by another fiber.\n\t*/\n\tset(name, value, error) {\n\t\tconst key = this.ctx[symbols.isolate][name];\n\t\tconst impl = this.store[key];\n\t\tif (!impl) throw new Error(`cannot set property \"${name}\" without provide`);\n\t\tif (impl.fiber !== this.ctx.fiber) throw new Error(`cannot set property \"${name}\" in multiple fibers`);\n\t\timpl.value = value;\n\t\treturn true;\n\t}\n\t/**\n\t* Register a service implementation owned by the current fiber.\n\t*\n\t* See the `ctx.provide()` overload above for the full contract.\n\t*\n\t* @param name — the service name.\n\t* @param value — the service value.\n\t* @param check — optional availability predicate for dependents.\n\t* @returns a disposer that unregisters the service.\n\t*/\n\tprovide(name, value, check) {\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\tif (!this.props[name]) this.props[name] ??= { type: \"service\" };\n\t\t\telse if (this.props[name].type !== \"service\") throw new Error(`property \"${name}\" is already declared as ${this.props[name].type}`);\n\t\t\tthis.props[name] = { type: \"service\" };\n\t\t\tthis.ctx.root[symbols.isolate][name] ??= Symbol(name);\n\t\t\tconst key = this.ctx[symbols.isolate][name];\n\t\t\tconst impl = {\n\t\t\t\tname,\n\t\t\t\tvalue,\n\t\t\t\tfiber: this.ctx.fiber,\n\t\t\t\tcheck\n\t\t\t};\n\t\t\tif (this.store[key]) throw new Error(`service \"${name}\" has been registered at <${this.store[key].fiber.name}>`);\n\t\t\tthis.store[key] = impl;\n\t\t\tthis.ctx.fiber.store[name] = impl;\n\t\t\tif (this.ctx.fiber.state === 2) this.notify([name]);\n\t\t\treturn async () => {\n\t\t\t\tdelete this.store[key];\n\t\t\t\tconst fibers = this.notify([name]);\n\t\t\t\tawait Promise.allSettled(fibers.map((fiber) => fiber.await()));\n\t\t\t\tdelete this.ctx.fiber.store[name];\n\t\t\t};\n\t\t}, `ctx.provide(${JSON.stringify(name)})`);\n\t}\n\t/**\n\t* Re-evaluate every fiber that requires one of the given services.\n\t*\n\t* @param names — the service names that changed.\n\t* @param filter — restricts notification to matching isolation scopes.\n\t* @returns the fibers whose dependency state was refreshed.\n\t*/\n\tnotify(names, filter = (ctx, name) => ctx[symbols.isolate][name] === this.ctx[symbols.isolate][name]) {\n\t\tconst fibers = [];\n\t\tfor (const runtime of this.ctx.registry.values()) for (const fiber of runtime.fibers) {\n\t\t\tlet hasUpdate = false;\n\t\t\tfor (const name of names) {\n\t\t\t\tif (!(name in fiber.inject)) continue;\n\t\t\t\tif (!filter(fiber.ctx, name)) continue;\n\t\t\t\thasUpdate = true;\n\t\t\t\tfiber._checkImpl(name);\n\t\t\t}\n\t\t\tif (!hasUpdate) continue;\n\t\t\tfiber._refresh();\n\t\t\tfibers.push(fiber);\n\t\t}\n\t\tfor (const name of names) {\n\t\t\tconst self = Object.create(this.ctx);\n\t\t\tself[symbols.filter] = (target) => filter(target, name);\n\t\t\tthis.ctx.events.emit(self, \"internal/service\", name, this._getImpl(name, false)?.value);\n\t\t}\n\t\treturn fibers;\n\t}\n\t/**\n\t* Define a computed context property backed by get/set hooks.\n\t*\n\t* @param name — the context property name.\n\t* @param options — the `get` hook and optional `set` hook.\n\t* @returns a disposer that removes the accessor.\n\t*/\n\taccessor(name, options) {\n\t\treturn this.ctx.fiber.effect(() => {\n\t\t\tif (name in this.props) throw new Error(`property \"${name}\" is already declared as ${this.props[name].type}`);\n\t\t\tthis.props[name] = {\n\t\t\t\ttype: \"accessor\",\n\t\t\t\t...options\n\t\t\t};\n\t\t\treturn () => delete this.props[name];\n\t\t}, `ctx.accessor(${JSON.stringify(name)})`);\n\t}\n\t/**\n\t* Expose selected members of a service directly on `ctx`.\n\t*\n\t* See the `ctx.mixin()` overload above for the full contract.\n\t*\n\t* @param source — a context property name or a source object.\n\t* @param mixins — keys to forward, or a source-key → ctx-key map.\n\t* @returns a disposer that removes all created accessors.\n\t*/\n\tmixin(source, mixins) {\n\t\tconst self = this;\n\t\treturn this.ctx.fiber.effect(function* () {\n\t\t\tconst entries = Array.isArray(mixins) ? mixins.map((key) => [key, key]) : Object.entries(mixins);\n\t\t\tconst getTarget = (ctx, error) => {\n\t\t\t\treturn ctx[source];\n\t\t\t};\n\t\t\tfor (const [key, value] of entries) yield self.accessor(value, {\n\t\t\t\tget(receiver, error) {\n\t\t\t\t\tconst service = getTarget(this, error);\n\t\t\t\t\tif (isNullable(service)) return service;\n\t\t\t\t\tconst mixin = receiver ? withProps(receiver, service) : service;\n\t\t\t\t\tconst value = Reflect.get(service, key, mixin);\n\t\t\t\t\tif (typeof value !== \"function\") return value;\n\t\t\t\t\treturn value.bind(mixin ?? service);\n\t\t\t\t},\n\t\t\t\tset(value, receiver, error) {\n\t\t\t\t\tconst service = getTarget(this, error);\n\t\t\t\t\tconst mixin = receiver ? withProps(receiver, service) : service;\n\t\t\t\t\treturn Reflect.set(service, key, value, mixin);\n\t\t\t\t}\n\t\t\t});\n\t\t}, `ctx.mixin(${JSON.stringify(source)})`);\n\t}\n\t/**\n\t* Attach this context's tracing wrapper to a value.\n\t*\n\t* @param value — the value to wrap.\n\t* @returns the traceable wrapper (or the value itself when not applicable).\n\t*/\n\ttrace(value) {\n\t\treturn getTraceable(this.ctx, value);\n\t}\n\t/**\n\t* Wrap a callback so calls trace `this` and arguments to this context.\n\t*\n\t* @param callback — the function to wrap.\n\t* @returns a proxy delegating to `callback` with traced values.\n\t*/\n\tbind(callback) {\n\t\treturn new Proxy(callback, {\n\t\t\tapply: (target, thisArg, args) => {\n\t\t\t\treturn Reflect.apply(target, this.trace(thisArg), args.map((arg) => this.trace(arg)));\n\t\t\t},\n\t\t\tconstruct: (target, args, newTarget) => {\n\t\t\t\treturn Reflect.construct(target, args.map((arg) => this.trace(arg)), newTarget);\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\n//#region lib/types/fiber.js\nconst kValidationError = Symbol.for(\"ValidationError\");\n/** Error raised when plugin configuration fails standard-schema validation. */\nvar ValidationError = class extends TypeError {\n\tname = \"ValidationError\";\n\t/**\n\t* Build the aggregated message from schema issues.\n\t*\n\t* @param issues — the standard-schema issues, one message line each.\n\t*/\n\tconstructor(issues) {\n\t\tsuper(`invalid config:\\n` + issues.map((issue) => {\n\t\t\tif (issue.path) return ` - ${issue.message} (at ${issue.path.join(\".\")})`;\n\t\t\telse return ` - ${issue.message}`;\n\t\t}).join(\"\\n\"));\n\t}\n};\nObject.defineProperty(ValidationError.prototype, kValidationError, { value: true });\n/**\n* Validate and normalize config for a plugin runtime before it starts.\n*\n* @param runtime — the plugin runtime whose `Config` schema to apply.\n* @param config — the raw user config.\n* @returns the validated config, or `config` unchanged if the runtime has no schema.\n* @throws {ValidationError} when validation reports issues.\n*/\nfunction resolveConfig(runtime, config) {\n\tif (!runtime.Config) return config;\n\tconst result = runtime.Config[\"~standard\"].validate(config);\n\tif (\"then\" in result) throw new TypeError(\"Async config validation is not supported\");\n\tif (result.issues) throw new ValidationError(result.issues);\n\telse return result.value;\n}\nconst effectInertia = /* @__PURE__ */ new WeakMap();\nfunction runDisposable(dispose) {\n\tconst result = dispose();\n\treturn effectInertia.get(dispose)?.() ?? result;\n}\n/** Notify plugin teardown without allowing one observer to break ownership cleanup. */\nfunction emitPluginDisposed(context, fiber) {\n\tconst args = [\"internal/plugin\", fiber];\n\tlet callbacks;\n\ttry {\n\t\tcallbacks = context.events.dispatch(\"emit\", args);\n\t} catch (error) {\n\t\tcontext.logger.error(error);\n\t\treturn;\n\t}\n\tfor (const callback of callbacks) try {\n\t\tconst returned = callback(...args);\n\t\tPromise.resolve(returned).catch((error) => context.logger.error(error));\n\t} catch (error) {\n\t\tcontext.logger.error(error);\n\t}\n}\n/** Framework error with a stable machine-readable code. */\nvar CordisError = class CordisError extends Error {\n\tcode;\n\t/**\n\t* @param code — the stable error code; also the default message.\n\t* @param message — optional human-readable override.\n\t*/\n\tconstructor(code, message) {\n\t\tsuper(message ?? CordisError.Code[code]);\n\t\tthis.code = code;\n\t}\n};\n/** Cordis error code definitions. */\n(function(CordisError) {\n\tCordisError.Code = { INACTIVE_EFFECT: \"cannot create effect on inactive context\" };\n})(CordisError || (CordisError = {}));\nconst INACTIVE = \"__INACTIVE__\";\n/**\n* Runtime instance of one plugin application.\n*\n* A fiber tracks dependency state, validated config, lifecycle effects, and\n* cleanup for the plugin context returned by `ctx.plugin()`.\n*/\nvar Fiber = class {\n\tparent;\n\tinject;\n\truntime;\n\t/** Unique id within the registry; 0 for the root fiber, `null` once disposed. */\n\tuid;\n\t/** The context this fiber's plugin runs in (extends the parent context). */\n\tctx;\n\t/** The validated plugin config (updated by `update()`). */\n\tconfig;\n\t/** The raw plugin config, re-resolved before each activation. */\n\t_config;\n\t/** Current lifecycle state; transitions emit `internal/status`. */\n\tstate = 0;\n\t/** Dispose this fiber: unload the plugin, then settle once cleanup finished. */\n\tdispose;\n\t/** Snapshot of required service implementations while loaded; `undefined` otherwise. */\n\tstore;\n\t/** The in-flight load/unload transition, if one is currently running. */\n\tinertia;\n\t_hooks = Object.create(null);\n\t_disposables = new DisposableList();\n\tcontext;\n\t_error;\n\t_runner;\n\t_store = Object.create(null);\n\t/**\n\t* Create a fiber. Plugin authors normally obtain fibers from `ctx.plugin()`\n\t* rather than constructing them directly.\n\t*\n\t* @param parent — the context the plugin was loaded from.\n\t* @param config — raw config, validated against the runtime's schema.\n\t* @param inject — resolved dependency map (service name → intercept config).\n\t* @param runtime — the shared plugin runtime, or `null` for the root fiber.\n\t* @param getOuterStack — captures the caller stack for effect diagnostics.\n\t*/\n\tconstructor(parent, config, inject, runtime, getOuterStack) {\n\t\tthis.parent = parent;\n\t\tthis.inject = inject;\n\t\tthis.runtime = runtime;\n\t\tthis._config = config;\n\t\tconst collect = (dispose) => {\n\t\t\tthis._disposables.push(dispose);\n\t\t};\n\t\tif (runtime) {\n\t\t\tthis.uid = parent.registry.counter;\n\t\t\tthis.ctx = this.context = parent.extend({ fiber: this });\n\t\t\tconst injectEntries = Object.entries(this.inject);\n\t\t\tif (injectEntries.length) {\n\t\t\t\tthis.ctx[Context.intercept] = Object.create(parent[Context.intercept]);\n\t\t\t\tfor (const [name, config] of injectEntries) {\n\t\t\t\t\tif (isNullable(config)) continue;\n\t\t\t\t\tthis.ctx[Context.intercept][name] = config;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._runner = {\n\t\t\t\tepoch: INACTIVE,\n\t\t\t\tgetOuterStack,\n\t\t\t\texecute: function() {\n\t\t\t\t\tif (isConstructor(runtime.callback)) {\n\t\t\t\t\t\tconst instance = new runtime.callback(this.ctx, this.config);\n\t\t\t\t\t\tfor (const hook of instance?.[symbols.initHooks] ?? []) hook();\n\t\t\t\t\t\treturn instance?.[symbols.init]?.();\n\t\t\t\t\t} else return runtime.callback(this.ctx, this.config);\n\t\t\t\t},\n\t\t\t\tcollect\n\t\t\t};\n\t\t\tthis.dispose = parent.fiber.effect(() => {\n\t\t\t\tconst remove = runtime.fibers.push(this);\n\t\t\t\treturn async () => {\n\t\t\t\t\tthis.uid = null;\n\t\t\t\t\temitPluginDisposed(this.context, this);\n\t\t\t\t\tif (this.ctx.registry.has(runtime.callback)) {\n\t\t\t\t\t\tremove();\n\t\t\t\t\t\tif (!runtime.fibers.length) this.ctx.registry.delete(runtime.callback);\n\t\t\t\t\t}\n\t\t\t\t\tthis._setEpoch(INACTIVE);\n\t\t\t\t\tif (!this.inertia) this._updateState(() => {\n\t\t\t\t\t\tthis.inertia = this._unload();\n\t\t\t\t\t\treturn 5;\n\t\t\t\t\t});\n\t\t\t\t\twhile (this.inertia) await this.inertia;\n\t\t\t\t};\n\t\t\t}, \"ctx.plugin()\");\n\t\t\ttry {\n\t\t\t\tthis.context.emit(\"internal/plugin\", this);\n\t\t\t} catch (error) {\n\t\t\t\tPromise.resolve(this.dispose()).catch((reason) => this.ctx.logger.error(reason));\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (this.uid !== null && parent.fiber.state !== 5) {\n\t\t\t\tfor (const name of Object.keys(this.inject)) this._checkImpl(name);\n\t\t\t\tthis._refresh();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.uid = 0;\n\t\t\tthis.ctx = this.context = parent;\n\t\t\tthis.state = 2;\n\t\t\tthis.store = Object.create(null);\n\t\t\tthis._runner = {\n\t\t\t\tepoch: \"\",\n\t\t\t\tgetOuterStack,\n\t\t\t\texecute: () => {},\n\t\t\t\tcollect\n\t\t\t};\n\t\t\tthis.dispose = () => this.restart();\n\t\t}\n\t}\n\t/** The plugin's display name, inherited from the nearest named ancestor, else `'root'`. */\n\tget name() {\n\t\tlet fiber = this;\n\t\tdo {\n\t\t\tif (fiber.runtime?.name) return fiber.runtime.name;\n\t\t\tfiber = fiber.parent.fiber;\n\t\t} while (fiber !== fiber.parent.fiber);\n\t\treturn \"root\";\n\t}\n\t/**\n\t* Throw if the fiber has already been disposed.\n\t*\n\t* @returns nothing when the fiber is still active.\n\t* @throws {CordisError} `INACTIVE_EFFECT` when the fiber's uid has been cleared.\n\t*/\n\tassertActive() {\n\t\tif (this.uid !== null) return;\n\t\tthrow new CordisError(\"INACTIVE_EFFECT\");\n\t}\n\t_execute(runner) {\n\t\tconst oldEpoch = runner.epoch;\n\t\treturn composeError((info) => {\n\t\t\tconst safeCollect = (dispose) => {\n\t\t\t\tif (typeof dispose === \"function\") runner.collect(dispose);\n\t\t\t\telse if (!isNullable(dispose)) throw new TypeError(\"Invalid effect\");\n\t\t\t};\n\t\t\tconst effect = runner.execute.call(this);\n\t\t\tif (typeof effect === \"function\") return runner.collect(effect);\n\t\t\telse if (isNullable(effect)) {} else if (!isObject(effect)) throw new TypeError(\"Invalid effect\");\n\t\t\telse if (\"then\" in effect) return effect.then(safeCollect);\n\t\t\telse if (Symbol.iterator in effect) {\n\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\tconst iter = effect[Symbol.iterator]();\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst result = iter.next();\n\t\t\t\t\tsafeCollect(result.value);\n\t\t\t\t\tif (result.done) return;\n\t\t\t\t}\n\t\t\t} else if (Symbol.asyncIterator in effect) {\n\t\t\t\tconst iter = effect[Symbol.asyncIterator]();\n\t\t\t\treturn (async () => {\n\t\t\t\t\tawait Promise.resolve();\n\t\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (runner.epoch !== oldEpoch) return;\n\t\t\t\t\t\tconst result = await iter.next();\n\t\t\t\t\t\tsafeCollect(result.value);\n\t\t\t\t\t\tif (result.done) return;\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t} else throw new TypeError(\"Invalid effect\");\n\t\t}, runner.getOuterStack);\n\t}\n\teffect(execute, label = \"anonymous\") {\n\t\tthis.assertActive();\n\t\tif (this.state === 5) throw new CordisError(\"INACTIVE_EFFECT\");\n\t\tconst disposables = [];\n\t\tlet disposing = false;\n\t\tlet disposalTask;\n\t\tconst dispose = () => {\n\t\t\tif (disposing) return disposalTask;\n\t\t\tdisposing = true;\n\t\t\tlet task;\n\t\t\tfor (const disposable of disposables.splice(0).reverse()) if (task) task = task.then(() => runDisposable(disposable));\n\t\t\telse {\n\t\t\t\tconst result = runDisposable(disposable);\n\t\t\t\tif (isObject(result) && \"then\" in result) task = result;\n\t\t\t}\n\t\t\treturn disposalTask = task;\n\t\t};\n\t\tconst meta = {\n\t\t\tlabel,\n\t\t\tchildren: []\n\t\t};\n\t\tconst runner = {\n\t\t\texecute,\n\t\t\tepoch: true,\n\t\t\tcollect: (dispose) => {\n\t\t\t\tdisposables.push(dispose);\n\t\t\t\tthis._disposables.delete(dispose);\n\t\t\t\tif (dispose[symbols.effect]) meta.children.push(dispose[symbols.effect]);\n\t\t\t},\n\t\t\tgetOuterStack: buildOuterStack()\n\t\t};\n\t\tlet task;\n\t\tlet executing = true;\n\t\tlet resolveSetup;\n\t\tlet rejectSetup;\n\t\tlet setupBarrier;\n\t\tlet setupFailed = false;\n\t\tlet inFlight;\n\t\tlet removeWrapper = () => false;\n\t\tconst waitForSetup = () => {\n\t\t\tsetupBarrier ??= new Promise((resolve, reject) => {\n\t\t\t\tresolveSetup = resolve;\n\t\t\t\trejectSetup = reject;\n\t\t\t});\n\t\t\treturn setupBarrier;\n\t\t};\n\t\tconst disposeAfter = (setup) => {\n\t\t\treturn Promise.resolve(setup).then(() => dispose(), async (reason) => {\n\t\t\t\tawait dispose();\n\t\t\t\tthrow reason;\n\t\t\t});\n\t\t};\n\t\tconst finalizeDisposal = (callback) => {\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tresult = callback();\n\t\t\t} catch (error) {\n\t\t\t\tremoveWrapper();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tif (isObject(result) && \"then\" in result) {\n\t\t\t\tconst pending = Promise.resolve(result).finally(() => {\n\t\t\t\t\tremoveWrapper();\n\t\t\t\t\tif (inFlight === pending) inFlight = void 0;\n\t\t\t\t});\n\t\t\t\treturn inFlight = pending;\n\t\t\t}\n\t\t\tremoveWrapper();\n\t\t\treturn result;\n\t\t};\n\t\tconst wrapper = defineProperty(() => {\n\t\t\tif (!runner.epoch) return setupFailed ? inFlight : void 0;\n\t\t\trunner.epoch = false;\n\t\t\treturn finalizeDisposal(() => {\n\t\t\t\tif (executing) return disposeAfter(waitForSetup());\n\t\t\t\treturn task ? disposeAfter(task) : dispose();\n\t\t\t});\n\t\t}, symbols.effect, meta);\n\t\teffectInertia.set(wrapper, () => inFlight);\n\t\tremoveWrapper = this._disposables.push(wrapper);\n\t\ttry {\n\t\t\ttask = this._execute(runner);\n\t\t} catch (reason) {\n\t\t\texecuting = false;\n\t\t\tsetupFailed = true;\n\t\t\trunner.epoch = false;\n\t\t\tlet cleanup;\n\t\t\ttry {\n\t\t\t\tcleanup = finalizeDisposal(dispose);\n\t\t\t} finally {\n\t\t\t\trejectSetup?.(reason);\n\t\t\t}\n\t\t\tif (isObject(cleanup) && \"then\" in cleanup) cleanup.catch((error) => this.ctx.logger.error(error));\n\t\t\tthrow reason;\n\t\t}\n\t\texecuting = false;\n\t\tif (setupBarrier) Promise.resolve(task).then(resolveSetup, rejectSetup);\n\t\ttask?.catch(() => {\n\t\t\tif (!runner.epoch) return dispose();\n\t\t\treturn finalizeDisposal(dispose);\n\t\t}).catch((error) => this.ctx.logger.error(error));\n\t\tconst disposeAsync = () => {\n\t\t\tif (!runner.epoch) return;\n\t\t\trunner.epoch = false;\n\t\t\treturn finalizeDisposal(dispose);\n\t\t};\n\t\twrapper.then = async (onFulfilled, onRejected) => {\n\t\t\treturn Promise.resolve(task).then(() => disposeAsync).then(onFulfilled, onRejected);\n\t\t};\n\t\treturn wrapper;\n\t}\n\t/**\n\t* Return metadata for currently registered effects.\n\t*\n\t* @returns one {@link EffectMeta} tree per labeled live effect.\n\t*/\n\tgetEffects() {\n\t\treturn [...this._disposables].map((dispose) => dispose[symbols.effect]).filter(Boolean);\n\t}\n\t_getState() {\n\t\tif (this.uid === null) return 4;\n\t\tif (this._error) return 3;\n\t\tif (this._runner.epoch !== INACTIVE) return 2;\n\t\treturn 0;\n\t}\n\t_updateState(callback) {\n\t\tconst oldState = this.state;\n\t\tthis.state = callback() ?? this._getState();\n\t\tif (oldState === this.state) return;\n\t\tthis.context.emit(\"internal/status\", this, oldState);\n\t\tif (oldState !== 2 && this.state !== 2) return;\n\t\tfor (const key of Reflect.ownKeys(this.ctx.reflect.store)) {\n\t\t\tconst impl = this.ctx.reflect.store[key];\n\t\t\tif (impl.fiber !== this) continue;\n\t\t\tthis.ctx.reflect.notify([impl.name]);\n\t\t}\n\t}\n\t_checkImpl(name) {\n\t\tconst impl = this.ctx.reflect._getImpl(name, true);\n\t\tif (!impl) return delete this._store[name];\n\t\ttry {\n\t\t\tif (impl.check && !impl.check.call(getTraceable(this.ctx, impl.value))) return delete this._store[name];\n\t\t} catch (error) {\n\t\t\timpl.fiber.ctx.logger.error(error);\n\t\t\treturn delete this._store[name];\n\t\t}\n\t\tthis._store[name] = impl;\n\t}\n\t_refresh() {\n\t\tlet epoch = false;\n\t\tepoch = \"\";\n\t\tfor (const name of Object.keys(this.inject)) {\n\t\t\tconst impl = this._store[name];\n\t\t\tif (!impl) {\n\t\t\t\tepoch = INACTIVE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tepoch += \":\" + impl.fiber.uid;\n\t\t}\n\t\tthis._setEpoch(epoch);\n\t}\n\t_setEpoch(epoch) {\n\t\tconst oldEpoch = this._runner.epoch;\n\t\tif (epoch === oldEpoch) return;\n\t\tthis._runner.epoch = epoch;\n\t\tif (this.inertia) return;\n\t\tthis._updateState(() => {\n\t\t\tif (epoch !== INACTIVE && oldEpoch === INACTIVE) {\n\t\t\t\tthis.inertia = this._reload();\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\tthis.inertia = this._unload();\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t});\n\t}\n\t_resolveConfig(config) {\n\t\tconfig = this.context.waterfall(this, \"internal/config\", config, () => config);\n\t\treturn this.runtime ? resolveConfig(this.runtime, config) : config;\n\t}\n\tasync _reload() {\n\t\tthis.store = { ...this._store };\n\t\tconst oldEpoch = this._runner.epoch;\n\t\ttry {\n\t\t\tawait Promise.resolve();\n\t\t\tif (this._runner.epoch === oldEpoch) {\n\t\t\t\tthis.config = this._resolveConfig(this._config);\n\t\t\t\tawait this._execute(this._runner);\n\t\t\t\tthis._error = void 0;\n\t\t\t}\n\t\t} catch (reason) {\n\t\t\tthis.ctx.logger.error(reason);\n\t\t\tthis._error = reason;\n\t\t\tthis._runner.epoch = INACTIVE;\n\t\t}\n\t\tthis._updateState(() => {\n\t\t\tif (this._runner.epoch === oldEpoch) this.inertia = void 0;\n\t\t\telse {\n\t\t\t\tthis.inertia = this._unload();\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t});\n\t}\n\tasync _unload() {\n\t\tawait Promise.all(this._disposables.clear().map(async (dispose) => {\n\t\t\ttry {\n\t\t\t\tawait composeError(async (info) => {\n\t\t\t\t\tawait Promise.resolve();\n\t\t\t\t\tinfo.error = /* @__PURE__ */ new Error();\n\t\t\t\t\tawait runDisposable(dispose);\n\t\t\t\t}, this._runner.getOuterStack);\n\t\t\t} catch (reason) {\n\t\t\t\tthis.ctx.logger.error(reason);\n\t\t\t}\n\t\t}));\n\t\tthis.store = void 0;\n\t\tthis._updateState(() => {\n\t\t\tif (this._runner.epoch === INACTIVE) this.inertia = void 0;\n\t\t\telse {\n\t\t\t\tthis.inertia = this._reload();\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Wait for current lifecycle work and rethrow startup errors.\n\t*\n\t* @returns this fiber, once it has settled into a stable state.\n\t* @throws the config-validation or plugin-startup error, if any.\n\t*/\n\tasync await() {\n\t\twhile (this.inertia) await this.inertia;\n\t\tif (this._error) throw this._error;\n\t\treturn this;\n\t}\n\t/**\n\t* Dispose and immediately reload this plugin with its current config.\n\t*\n\t* @returns a promise resolving once the reload settled.\n\t* @throws {CordisError} `INACTIVE_EFFECT` when the fiber is already disposed.\n\t*/\n\tasync restart() {\n\t\tthis.assertActive();\n\t\tthis._setEpoch(INACTIVE);\n\t\tthis._refresh();\n\t\tawait this.await();\n\t}\n\t/**\n\t* Validate and apply new config, then restart the plugin.\n\t*\n\t* Runs the `internal/update` waterfall first, so update hooks (and HMR)\n\t* can veto or replace the restart.\n\t*\n\t* @param config — the new raw config; validated before anything restarts.\n\t* @param noSave — hint for persistence hooks not to write the change back.\n\t* @returns the update waterfall result; the default restart returns a promise.\n\t* @throws when validation, an update listener, or the restarted plugin fails.\n\t*/\n\tupdate(config, noSave = false) {\n\t\tthis.assertActive();\n\t\tthis._config = config;\n\t\tif (this.state !== 2) {\n\t\t\tthis._error = void 0;\n\t\t\tthis._setEpoch(INACTIVE);\n\t\t\tthis._refresh();\n\t\t\treturn;\n\t\t}\n\t\tconfig = this._resolveConfig(config);\n\t\treturn this.context.waterfall(this, \"internal/update\", config, noSave, () => {\n\t\t\tthis.config = config;\n\t\t\tthis._error = void 0;\n\t\t\treturn this.restart();\n\t\t});\n\t}\n};\n//#endregion\n//#region lib/types/registry.js\nfunction isApplicable(object) {\n\treturn object && typeof object === \"object\" && typeof object.apply === \"function\";\n}\n/**\n* Decorator for declaring service dependencies on classes or class methods.\n*\n* On classes it contributes to the plugin's static `inject` map. On methods it\n* delays the method call until the declared services are available.\n*/\n/**\n* @param name — the required service name.\n* @param config — optional intercept config applied for that service.\n* @returns the class or method decorator.\n*/\nfunction Inject(name, config) {\n\treturn function(value, decorator) {\n\t\tif (decorator.kind === \"class\") {\n\t\t\tif (!Object.hasOwn(value, \"inject\")) {\n\t\t\t\tdefineProperty(value, \"inject\", Object.create(Object.getPrototypeOf(value).inject ?? null));\n\t\t\t\tdefineProperty(value.inject, symbols.checkProto, true);\n\t\t\t}\n\t\t\tvalue.inject[name] = config;\n\t\t} else if (decorator.kind === \"method\") {\n\t\t\tconst inject = (value[symbols.metadata] ??= {}).inject ??= Object.create(null);\n\t\t\tinject[name] = config;\n\t\t\tdecorator.addInitializer(function() {\n\t\t\t\tconst property = this[symbols.tracker]?.property;\n\t\t\t\t(this[symbols.initHooks] ??= []).push(() => {\n\t\t\t\t\tthis.ctx.inject(inject, (ctx) => {\n\t\t\t\t\t\treturn value.call(property ? withProps(this, { [property]: ctx }) : this);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t} else throw new Error(\"@Inject() can only be used on class or class methods\");\n\t};\n}\n/** Utilities for normalizing plugin dependency declarations. */\n(function(Inject) {\n\t/**\n\t* Convert array/object/class-inherited inject metadata into a plain map.\n\t*\n\t* @param inject — the declaration to normalize; `null`/`undefined` add nothing.\n\t* @param result — the map to fill (service name → intercept config or `null`).\n\t* @returns `result`.\n\t*/\n\tfunction resolve(inject, result = Object.create(null)) {\n\t\tif (!inject) return result;\n\t\tif (Array.isArray(inject)) for (const name of inject) result[name] = null;\n\t\telse if (Reflect.has(inject, symbols.checkProto)) {\n\t\t\tObject.assign(result, resolve(Object.getPrototypeOf(inject)));\n\t\t\tfor (const name of Object.keys(inject)) result[name] = inject[name] ?? null;\n\t\t} else for (const name of Object.keys(inject)) result[name] = inject[name] ?? null;\n\t\treturn result;\n\t}\n\tInject.resolve = resolve;\n})(Inject || (Inject = {}));\n/**\n* Plugin registry installed as `ctx.registry` and mixed into every context.\n*\n* It normalizes plugin shapes, tracks plugin runtimes, starts fibers, and\n* exposes map-like inspection over active plugin callbacks.\n*/\nvar RegistryService = class {\n\tctx;\n\t_counter = 0;\n\t_internal = /* @__PURE__ */ new Map();\n\tconstructor(ctx) {\n\t\tthis.ctx = ctx;\n\t\tdefineProperty(this, symbols.tracker, {\n\t\t\tproperty: \"ctx\",\n\t\t\tnoShadow: true\n\t\t});\n\t}\n\t/** Allocate the next fiber uid (increments on every read). */\n\tget counter() {\n\t\treturn ++this._counter;\n\t}\n\t/** Number of registered plugin runtimes. */\n\tget size() {\n\t\treturn this._internal.size;\n\t}\n\t/**\n\t* Resolve a supported plugin shape to its executable callback.\n\t*\n\t* @param plugin — a function, class, or `{ apply }` object plugin.\n\t* @returns the callback identifying the plugin, or `undefined` if invalid.\n\t*/\n\tresolve(plugin) {\n\t\ttry {\n\t\t\tif (typeof plugin === \"function\") return plugin;\n\t\t\tif (isApplicable(plugin)) return plugin.apply;\n\t\t} catch {}\n\t}\n\t/**\n\t* Look up the runtime record for a plugin.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns the runtime, or `undefined` when the plugin is not registered.\n\t*/\n\tget(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\treturn key && this._internal.get(key);\n\t}\n\t/**\n\t* Check whether a plugin has a registered runtime.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns `true` when at least one fiber of the plugin exists.\n\t*/\n\thas(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\treturn !!key && this._internal.has(key);\n\t}\n\t/**\n\t* Dispose every running fiber for a plugin and remove its runtime record.\n\t*\n\t* @param plugin — any supported plugin shape.\n\t* @returns the removed runtime, or `undefined` when none was registered.\n\t*/\n\tdelete(plugin) {\n\t\tconst key = this.resolve(plugin);\n\t\tconst runtime = key && this._internal.get(key);\n\t\tif (!runtime) return;\n\t\tthis._internal.delete(key);\n\t\tfor (const fiber of runtime.fibers) fiber.dispose();\n\t\treturn runtime;\n\t}\n\t/** Iterate the registered plugin callbacks. */\n\tkeys() {\n\t\treturn this._internal.keys();\n\t}\n\t/** Iterate the registered plugin runtimes. */\n\tvalues() {\n\t\treturn this._internal.values();\n\t}\n\t/** Iterate `[callback, runtime]` pairs. */\n\tentries() {\n\t\treturn this._internal.entries();\n\t}\n\t/**\n\t* Visit every registered runtime.\n\t*\n\t* @param callback — receives each runtime and its identifying callback.\n\t*/\n\tforEach(callback) {\n\t\treturn this._internal.forEach(callback);\n\t}\n\t/**\n\t* Start a callback once the requested dependencies are available.\n\t*\n\t* @param inject — required services, as an array or a name → config map.\n\t* @param callback — plugin body called with `(ctx, config)`.\n\t* @returns the fiber; awaiting it settles once loading finished.\n\t*/\n\tinject(inject, callback) {\n\t\treturn this.plugin({\n\t\t\tinject,\n\t\t\tapply: callback,\n\t\t\tname: callback.name\n\t\t});\n\t}\n\t/**\n\t* Start a plugin in the current context and return its fiber.\n\t*\n\t* Creates (or reuses) the plugin's runtime record, then starts a new fiber\n\t* under the current context. Throws if `plugin` is not a supported shape or\n\t* if the current fiber is already disposed.\n\t*\n\t* @param plugin — a function, class, or `{ apply }` object plugin.\n\t* @param config — the plugin config, validated against its `Config` schema.\n\t* @param getOuterStack — captures the caller stack for effect diagnostics.\n\t* @returns the fiber; awaiting it settles once loading finished.\n\t*/\n\tplugin(plugin, config, getOuterStack = buildOuterStack()) {\n\t\tconst callback = this.resolve(plugin);\n\t\tif (!callback) throw new Error(\"invalid plugin, expect function or object with an \\\"apply\\\" method, received \" + typeof plugin);\n\t\tthis.ctx.fiber.assertActive();\n\t\tlet runtime = this._internal.get(callback);\n\t\tif (!runtime) {\n\t\t\tlet name = plugin.name;\n\t\t\tif (name === \"apply\") name = void 0;\n\t\t\truntime = {\n\t\t\t\tname,\n\t\t\t\tcallback,\n\t\t\t\tfibers: new DisposableList(),\n\t\t\t\tConfig: plugin.Config\n\t\t\t};\n\t\t\tthis._internal.set(callback, runtime);\n\t\t}\n\t\tconst fiber = new Fiber(this.ctx, config, Inject.resolve(plugin.inject), runtime, getOuterStack);\n\t\tconst wrapped = Object.create(fiber);\n\t\twrapped.then = (onFulfilled, onRejected) => {\n\t\t\treturn fiber.await().then(onFulfilled, onRejected);\n\t\t};\n\t\treturn wrapped;\n\t}\n};\n//#endregion\n//#region lib/types/context.js\n/**\n* Root and child dependency containers for Cordis plugins.\n*\n* A context is a proxy: normal property reads go through the service resolver,\n* while `extend()`, `isolate()`, and `intercept()` create scoped child\n* contexts without mutating their parent.\n*/\nvar Context = class Context {\n\t/** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */\n\tstatic effect = symbols.effect;\n\t/** Symbol key for a context's listener filter, consulted on every event dispatch. */\n\tstatic filter = symbols.filter;\n\t/** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */\n\tstatic isolate = symbols.isolate;\n\t/** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */\n\tstatic intercept = symbols.intercept;\n\t/**\n\t* Returns true for Cordis context proxies and context prototypes.\n\t*\n\t* Works across realms and across multiple copies of cordis, because the\n\t* brand is keyed by a global symbol rather than by `instanceof`.\n\t*\n\t* @param value — the value to test.\n\t* @returns `true` if `value` is a Cordis context, narrowing its type.\n\t*/\n\tstatic is(value) {\n\t\treturn !!value?.[Context.is];\n\t}\n\tstatic {\n\t\tContext.is[Symbol.toPrimitive] = () => Symbol.for(\"cordis.is\");\n\t\tContext.prototype[Context.is] = true;\n\t}\n\t/** Create the root context and install the built-in services. */\n\tconstructor() {\n\t\tthis[symbols.isolate] = Object.create(null);\n\t\tthis[symbols.intercept] = Object.create(null);\n\t\tconst self = new Proxy(this, ReflectService.handler);\n\t\tthis.root = self;\n\t\tthis.baseUrl = void 0;\n\t\tthis.fiber = new Fiber(self, {}, Object.create(null), null, () => []);\n\t\tthis.reflect = new ReflectService(self);\n\t\tthis.registry = new RegistryService(self);\n\t\tthis.events = new EventsService(self);\n\t\tthis.logger = new LoggerService(self);\n\t\tthis.fiber._disposables.clear();\n\t\treturn self;\n\t}\n\t[Symbol.for(\"nodejs.util.inspect.custom\")]() {\n\t\treturn `Context <${this.fiber.name}>`;\n\t}\n\t/**\n\t* Create a child context with extra metadata on top of the current scope.\n\t*\n\t* The child prototypally inherits every property of this context; own\n\t* properties of `meta` shadow the inherited ones. The parent is not mutated.\n\t*\n\t* @param meta — own properties (including symbol keys) to define on the child.\n\t* @returns a child context inheriting from this one.\n\t*/\n\textend(meta = {}) {\n\t\tconst shadow = Reflect.getOwnPropertyDescriptor(this, symbols.shadow)?.value;\n\t\tconst self = Object.create(getTraceable(this, this));\n\t\tfor (const prop of Reflect.ownKeys(meta)) Object.defineProperty(self, prop, Reflect.getOwnPropertyDescriptor(meta, prop));\n\t\tif (!shadow) return self;\n\t\treturn Object.assign(Object.create(self), { [symbols.shadow]: shadow });\n\t}\n\t/**\n\t* Create a child context with an independent service scope for `name`.\n\t*\n\t* Below the returned context, reads and writes of the service `name`\n\t* resolve against the new label instead of the parent's, so a different\n\t* implementation can be provided without affecting the parent scope.\n\t* Passing the same `label` to two `isolate()` calls joins their scopes.\n\t*\n\t* @param name — the service name to isolate.\n\t* @param label — scope label to join; defaults to a fresh unique symbol.\n\t* @returns a child context whose `name` service resolves in the new scope.\n\t*/\n\tisolate(name, label) {\n\t\tconst shadow = Object.create(this[symbols.isolate]);\n\t\tshadow[name] = label ?? Symbol(name);\n\t\treturn this.extend({ [symbols.isolate]: shadow });\n\t}\n\tintercept(name, config) {\n\t\tconst intercept = Object.create(this[symbols.intercept]);\n\t\tintercept[name] = config;\n\t\treturn this.extend({ [symbols.intercept]: intercept });\n\t}\n};\n//#endregion\n//#region lib/types/service.js\n/**\n* Base class for services that expose a named API on `ctx`.\n*\n* Subclasses call `super(ctx, name)` from their constructor. The service is\n* registered immediately and is automatically removed with the owning fiber.\n*/\nvar Service = class Service {\n\tctx;\n\t/** Symbol key of an instance method run after construction (class plugins). */\n\tstatic init = symbols.init;\n\t/** Symbol key of the availability predicate passed to `ctx.provide()`. */\n\tstatic check = symbols.check;\n\t/** Symbol key of the phantom intercept-config type parameter. */\n\tstatic config = symbols.config;\n\t/** Symbol key of the call body making a service callable (e.g. `ctx.logger()`). */\n\tstatic invoke = symbols.invoke;\n\t/** Symbol key of the helper deriving an extended service instance. */\n\tstatic extend = symbols.extend;\n\t/** Symbol key of the tracker metadata used for context tracing. */\n\tstatic tracker = symbols.tracker;\n\t/** Symbol key of the intercept-config resolution helper below. */\n\tstatic resolveConfig = symbols.resolveConfig;\n\t/** The service name this instance is registered under. */\n\tname;\n\t/**\n\t* Register this instance as `name` in the current context.\n\t*\n\t* Calls `ctx.reflect.provide(name, this, this[Service.check])`, so the\n\t* service is unregistered automatically when the owning fiber unloads.\n\t* Services with a `[Service.invoke]` body return a callable instance.\n\t*\n\t* @param ctx — the context to register in (stored as `this.ctx`).\n\t* @param name — the service name; defaults to the static `provide` field.\n\t*/\n\tconstructor(ctx, name) {\n\t\tthis.ctx = ctx;\n\t\tname ??= this.constructor[\"provide\"];\n\t\tlet self = this;\n\t\tconst tracker = {\n\t\t\tassociate: name,\n\t\t\tproperty: \"ctx\"\n\t\t};\n\t\tif (self[symbols.invoke]) self = createCallable(name, joinPrototype(Object.getPrototypeOf(this), Function.prototype), tracker);\n\t\tself.ctx = ctx;\n\t\tself.name = name;\n\t\tdefineProperty(self, symbols.tracker, tracker);\n\t\tself.ctx.reflect.provide(name, self, this[symbols.check]);\n\t\treturn self;\n\t}\n\t[symbols.filter](ctx) {\n\t\treturn ctx[symbols.isolate][this.name] === this.ctx[symbols.isolate][this.name];\n\t}\n\t[symbols.extend](props) {\n\t\tlet self;\n\t\tif (this[Service.invoke]) self = createCallable(this.name, this, this[symbols.tracker]);\n\t\telse self = Object.create(this);\n\t\treturn Object.assign(self, props);\n\t}\n\t/**\n\t* Merge intercept config from ancestors with optional base and head values.\n\t*\n\t* Entries added closer to the root apply first; `base` is prepended and\n\t* `head` appended. Uses `Config.merge` when the service declares one,\n\t* otherwise a shallow `Object.assign`.\n\t*\n\t* @param base — lowest-precedence config merged before all intercepts.\n\t* @param head — highest-precedence config merged after all intercepts.\n\t* @returns the merged config.\n\t*/\n\t[symbols.resolveConfig](base, head) {\n\t\tlet intercept = this.ctx[Context.intercept];\n\t\tconst configs = [];\n\t\twhile (this.name in intercept) {\n\t\t\tif (Object.hasOwn(intercept, this.name)) configs.unshift(intercept[this.name]);\n\t\t\tintercept = Object.getPrototypeOf(intercept);\n\t\t}\n\t\tif (base) configs.unshift(base);\n\t\tif (head) configs.push(head);\n\t\tif (this[\"Config\"]?.merge) return this[\"Config\"].merge(...configs);\n\t\telse return Object.assign({}, ...configs);\n\t}\n\tstatic [Symbol.hasInstance](instance) {\n\t\tif (!instance) return false;\n\t\tlet constructor = instance.constructor;\n\t\twhile (constructor) {\n\t\t\tconstructor = constructor.prototype?.constructor;\n\t\t\tif (constructor === this) return true;\n\t\t\tconstructor &&= Object.getPrototypeOf(constructor);\n\t\t}\n\t\treturn false;\n\t}\n};\n//#endregion\nexport { Context, CordisError, DisposableList, EventsService, Fiber, Inject, Logger, LoggerService, RegistryService, Service, ValidationError, buildOuterStack, c16, c256, composeError, createCallable, defaultFormatters, getPropertyDescriptor, getTraceable, isBailed, isConstructor, isObject, joinPrototype, resolveConfig, symbols, withProps };\n","import { Service } from \"@deepseek-ai/cordis\";\n//#region lib/types/redact.js\n/**\n* Structural secret redaction for settings values. `role('secret')` fields are\n* removed from a value before it crosses a wire boundary; a sidecar records\n* each schema-declared secret position and whether it currently holds a value,\n* so a configuration surface can render a write-only input without ever\n* receiving the secret itself.\n* @module @deepseek-ai/dsh-settings/redact\n*/\n/** Whether a value is a plain data object the walker may recurse into. */\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction walk(node, value, path, secrets) {\n\tif (node === void 0) return value;\n\tif (node.meta?.role === \"secret\") {\n\t\tsecrets.push({\n\t\t\tpath,\n\t\t\tset: value !== void 0\n\t\t});\n\t\treturn;\n\t}\n\tswitch (node.type) {\n\t\tcase \"object\": {\n\t\t\tconst properties = node.dict ?? {};\n\t\t\tconst source = isRecord(value) ? value : void 0;\n\t\t\tconst rebuilt = {};\n\t\t\tif (source !== void 0) for (const [key, entry] of Object.entries(source)) {\n\t\t\t\tif (key in properties) continue;\n\t\t\t\trebuilt[key] = entry;\n\t\t\t}\n\t\t\tfor (const [key, child] of Object.entries(properties)) {\n\t\t\t\tconst stripped = walk(child, source?.[key], [...path, key], secrets);\n\t\t\t\tif (stripped !== void 0) rebuilt[key] = stripped;\n\t\t\t}\n\t\t\treturn source === void 0 && Object.keys(rebuilt).length === 0 ? value : rebuilt;\n\t\t}\n\t\tcase \"dict\": {\n\t\t\tif (!isRecord(value)) return value;\n\t\t\tconst rebuilt = {};\n\t\t\tfor (const [key, entry] of Object.entries(value)) {\n\t\t\t\tconst stripped = walk(node.inner, entry, [...path, key], secrets);\n\t\t\t\tif (stripped !== void 0) rebuilt[key] = stripped;\n\t\t\t}\n\t\t\treturn rebuilt;\n\t\t}\n\t\tcase \"array\":\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((entry, index) => walk(node.inner, entry, [...path, String(index)], secrets));\n\t\tdefault: return value;\n\t}\n}\n/**\n* Remove every `role('secret')` field a schema declares from a value. The\n* walker follows `object`, `dict`, and `array` containers; a secret must be\n* declared directly on a field reachable through those containers (a secret\n* buried inside a union branch or transform is not reachable and must not be\n* modeled that way). The input is never mutated.\n* @param schema - live schemastery schema describing the value.\n* @param value - the value to strip; `undefined` yields an empty record with\n* object-property secret slots still enumerated.\n* @returns the stripped detached value and the ordered secret positions.\n*/\nfunction redactSecrets(schema, value) {\n\tconst secrets = [];\n\treturn {\n\t\tvalue: walk(schema, value, [], secrets),\n\t\tsecrets\n\t};\n}\n//#endregion\n//#region lib/types/index.js\n/**\n* Service Definition for the user-settings capability seam (`ctx.settings`). Providers store one raw document of\n* per-namespace sections; plugins register a namespace schema and read the\n* resolved value, which layers schema defaults, the registrant's composition\n* `base`, and the user document section, in that order.\n* @module @deepseek-ai/dsh-settings\n*/\nconst NAMESPACE_PATTERN = /^[a-z][a-z0-9-]*$/;\n/**\n* Brand a raw string as a {@link SettingsNamespace}.\n* @param value - candidate namespace; lowercase kebab-case, as in plugin short names.\n* @returns the branded namespace.\n*/\nfunction settingsNamespace(value) {\n\tif (!NAMESPACE_PATTERN.test(value)) throw new TypeError(`settings namespace \"${value}\" must match ${String(NAMESPACE_PATTERN)}`);\n\treturn value;\n}\n/**\n* Deep equality over JSON-compatible data (objects, arrays, primitives) — the\n* Service Definition's single change-detection predicate, exported so the invariant\n* companion checks exactly the implementation's relation.\n* @param a - one JSON-compatible value.\n* @param b - the other JSON-compatible value.\n* @returns whether the two values are structurally equal.\n*/\nfunction deepEqualJson(a, b) {\n\tif (a === b) return true;\n\tif (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\tif (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;\n\t\treturn a.every((entry, index) => deepEqualJson(entry, b[index]));\n\t}\n\tconst left = a;\n\tconst right = b;\n\tconst keys = Object.keys(left);\n\tif (keys.length !== Object.keys(right).length) return false;\n\treturn keys.every((key) => key in right && deepEqualJson(left[key], right[key]));\n}\n/**\n* A write refused because the namespace moved since the caller read it. The\n* Service Definition's serialized write queue orders writes; it cannot tell a fresh writer\n* from one holding a stale snapshot, which is what this reports.\n*/\nvar SettingsConflictError = class extends Error {\n\t/** Stable machine code for wire layers mapping this to their own taxonomy. */\n\tcode = \"SETTINGS_CONFLICT\";\n\t/** The revision the write expected. */\n\texpected;\n\t/** The revision the namespace actually stands at. */\n\tactual;\n\t/**\n\t* @param ns - the namespace whose write was refused.\n\t* @param expected - the revision the caller sent.\n\t* @param actual - the revision now stored.\n\t*/\n\tconstructor(ns, expected, actual) {\n\t\tsuper(`settings namespace \"${ns}\" changed since it was read (expected revision ${String(expected)}, now ${String(actual)})`);\n\t\tthis.name = \"SettingsConflictError\";\n\t\tthis.expected = expected;\n\t\tthis.actual = actual;\n\t}\n};\n/** Whether a value is a plain data object (not an array, null, or class instance). */\nfunction isPlainObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/** Apply one path op to a detached section, returning the next section. */\nfunction applyPathOp(section, op) {\n\tconst [head, ...rest] = op.path;\n\tif (head === void 0) {\n\t\tif (op.op === \"unset\") return {};\n\t\tif (!isPlainObject(op.value)) throw new TypeError(\"settings mutate: setting the section root requires a plain object\");\n\t\treturn { ...op.value };\n\t}\n\tif (rest.length === 0) {\n\t\tif (op.op === \"set\") return {\n\t\t\t...section,\n\t\t\t[head]: op.value\n\t\t};\n\t\tconst { [head]: _removed, ...kept } = section;\n\t\treturn kept;\n\t}\n\tconst child = section[head];\n\tif (!isPlainObject(child)) {\n\t\tif (op.op === \"unset\") return section;\n\t\treturn {\n\t\t\t...section,\n\t\t\t[head]: applyPathOp({}, {\n\t\t\t\t...op,\n\t\t\t\tpath: rest\n\t\t\t})\n\t\t};\n\t}\n\treturn {\n\t\t...section,\n\t\t[head]: applyPathOp(child, {\n\t\t\t...op,\n\t\t\tpath: rest\n\t\t})\n\t};\n}\n/** Human label for a value that lossless JSON cannot represent (numbers reject inline). */\nfunction describeRejected(value) {\n\tif (value === void 0) return \"undefined\";\n\tif (typeof value === \"object\" && value !== null) {\n\t\tconst name = Object.getPrototypeOf(value)?.constructor?.name;\n\t\treturn name === void 0 || name === \"Object\" ? \"a non-plain object\" : `a ${name}`;\n\t}\n\treturn `a ${typeof value}`;\n}\n/**\n* Detach and validate one write input in a single walk before persistence:\n* only JSON data (plain objects, arrays, strings, finite numbers,\n* booleans, `null`) may reach a provider document. `structuredClone` alone\n* would admit Dates, Maps, BigInts, and cycles that YAML/JSON storage then\n* silently distorts on the reload round-trip. `undefined` entries in objects\n* are skipped — the same sparse-patch semantics as {@link mergeLayers} — while\n* an `undefined` array entry is rejected rather than coerced.\n* @param root - plain-object write input (caller-checked).\n* @param reject - builds the validation error from a value label and its `$`-rooted path.\n* @returns the detached JSON-compatible clone.\n*/\nfunction cloneJsonShaped(root, reject) {\n\tconst visiting = /* @__PURE__ */ new WeakSet();\n\tconst clone = (value, path) => {\n\t\tif (value === null || typeof value === \"string\" || typeof value === \"boolean\") return value;\n\t\tif (typeof value === \"number\") {\n\t\t\tif (!Number.isFinite(value)) throw reject(\"a non-finite number\", path);\n\t\t\treturn value;\n\t\t}\n\t\tif (Array.isArray(value)) {\n\t\t\tif (visiting.has(value)) throw reject(\"a circular reference\", path);\n\t\t\tvisiting.add(value);\n\t\t\tconst entries = value.map((entry, index) => clone(entry, `${path}[${index}]`));\n\t\t\tvisiting.delete(value);\n\t\t\treturn entries;\n\t\t}\n\t\tif (isPlainObject(value)) {\n\t\t\tif (visiting.has(value)) throw reject(\"a circular reference\", path);\n\t\t\tvisiting.add(value);\n\t\t\tconst out = {};\n\t\t\tfor (const [key, entry] of Object.entries(value)) {\n\t\t\t\tif (entry === void 0) continue;\n\t\t\t\tout[key] = clone(entry, `${path}.${key}`);\n\t\t\t}\n\t\t\tvisiting.delete(value);\n\t\t\treturn out;\n\t\t}\n\t\tthrow reject(describeRejected(value), path);\n\t};\n\treturn clone(root, \"$\");\n}\n/**\n* Layer `over` onto `under`: plain objects merge recursively, every other\n* value (arrays included) replaces the lower layer wholesale. `over` never\n* carries `undefined` entries — sections come from parsed documents and write\n* snapshots pass {@link cloneJsonShaped}, which strips them so a sparse patch\n* cannot erase lower keys.\n*/\nfunction mergeLayers(under, over) {\n\tif (over === void 0) return under;\n\tif (!isPlainObject(under) || !isPlainObject(over)) return over;\n\tconst merged = { ...under };\n\tfor (const [key, value] of Object.entries(over)) merged[key] = key in merged ? mergeLayers(merged[key], value) : value;\n\treturn merged;\n}\n/** Recursively freeze one resolved value so handed-out snapshots stay immutable. */\nfunction deepFreeze(value) {\n\tif (typeof value !== \"object\" || value === null || Object.isFrozen(value)) return value;\n\tfor (const entry of Object.values(value)) deepFreeze(entry);\n\treturn Object.freeze(value);\n}\n/**\n* Abstract settings service. Providers implement raw-document storage\n* (`load`/`persist`) and push external changes through {@link Settings.publish};\n* the base class owns namespace registration, resolution, validation, change\n* detection, and the `settings/updated` commit event.\n*/\nvar SettingsProvider = class extends Service {\n\tregistrations = /* @__PURE__ */ new Map();\n\t/** Latest published raw document; empty until the provider's first publish. */\n\tdocument = {};\n\t/** Per-namespace write chains; settled tails, so a failure never poisons the queue. */\n\twriteQueues = /* @__PURE__ */ new Map();\n\t/** In-flight watcher invocation segments, drained by the dispose teardown. */\n\tpendingTails = /* @__PURE__ */ new Set();\n\t/** Set at service dispose: refuse new writes while queued ones drain. */\n\tstopped = false;\n\t/** Opaque read of {@link stopped}: control flow cannot narrow it across awaits. */\n\tisStopped() {\n\t\treturn this.stopped;\n\t}\n\tconstructor(ctx) {\n\t\tsuper(ctx, \"settings\");\n\t}\n\t/**\n\t* Load the provider's document once and publish it before the service\n\t* becomes injectable, and register the write-drain teardown. Providers with\n\t* their own init (watchers, connections) delegate here first via\n\t* `yield* super[Service.init]()`; their disposers then run before the drain.\n\t*/\n\tasync *[Service.init]() {\n\t\tyield async () => {\n\t\t\tthis.stopped = true;\n\t\t\tawait Promise.allSettled([...this.writeQueues.values(), ...this.pendingTails]);\n\t\t};\n\t\tthis.publish(await this.load());\n\t}\n\t/**\n\t* Absolute path of the provider's user-editable document, when its storage\n\t* is one local file. Configuration surfaces use this only as availability\n\t* metadata; the guarded open operation resolves the path again Host-side.\n\t* Non-file providers leave it undefined and expose no open-document affordance.\n\t* @returns the absolute local document path, or undefined for non-file storage.\n\t*/\n\tget documentPath() {}\n\t/**\n\t* Prepare the provider's user-editable document for a native editor. File\n\t* providers may materialize an absent document before returning its path;\n\t* non-file providers return undefined.\n\t* @returns the absolute local document path, or undefined for non-file storage.\n\t*/\n\tprepareDocument() {\n\t\treturn Promise.resolve(this.documentPath);\n\t}\n\t/**\n\t* Register a namespace schema and receive its owner scope. The registration\n\t* is an effect on the calling plugin's fiber: disposing that fiber removes\n\t* the namespace and its observers. An invalid stored section fails the\n\t* registration itself — the earliest point where the schema can judge it.\n\t* @param ns - unique namespace; duplicate registration fails loud.\n\t* @param schema - schemastery schema resolving this namespace's value.\n\t* @param options - composition `base` layer and effect timing.\n\t* @returns the owner scope for reads, observation, and updates.\n\t*/\n\tregister(ns, schema, options) {\n\t\tif (this.registrations.has(ns)) throw new Error(`settings namespace \"${ns}\" is already registered`);\n\t\tconst registration = {\n\t\t\tns,\n\t\t\tschema,\n\t\t\tbase: options?.base,\n\t\t\tapplies: options?.applies ?? \"live\",\n\t\t\t...options?.validate === void 0 ? {} : { validate: options.validate },\n\t\t\tresolved: deepFreeze(this.resolve(schema, options?.base, this.section(ns), options?.validate)),\n\t\t\trevision: 0,\n\t\t\twatchers: /* @__PURE__ */ new Set()\n\t\t};\n\t\tthis.ctx.effect(() => {\n\t\t\tthis.registrations.set(ns, registration);\n\t\t\treturn () => this.registrations.delete(ns);\n\t\t}, `settings.register(${JSON.stringify(String(ns))})`);\n\t\treturn {\n\t\t\tget: () => registration.resolved,\n\t\t\twatch: (callback) => {\n\t\t\t\tconst watcher = {\n\t\t\t\t\tcallback,\n\t\t\t\t\ttail: Promise.resolve(),\n\t\t\t\t\tactive: true\n\t\t\t\t};\n\t\t\t\tregistration.watchers.add(watcher);\n\t\t\t\treturn () => {\n\t\t\t\t\twatcher.active = false;\n\t\t\t\t\tregistration.watchers.delete(watcher);\n\t\t\t\t};\n\t\t\t},\n\t\t\tupdate: (patch) => this.update(ns, patch),\n\t\t\treplace: (section) => this.replace(ns, section)\n\t\t};\n\t}\n\t/**\n\t* Describe every registered namespace for configuration surfaces, including\n\t* the composition `base` and raw user layers so a form can mark which fields\n\t* the user overrode (presence in `user`) and what a reset returns to.\n\t* @param options - redaction switch; wire surfaces must redact.\n\t* @returns one descriptor per registered namespace, in registration order.\n\t*/\n\tdescribe(options) {\n\t\treturn [...this.registrations.values()].map((registration) => {\n\t\t\tlet user;\n\t\t\ttry {\n\t\t\t\tuser = this.section(registration.ns);\n\t\t\t} catch {\n\t\t\t\tuser = void 0;\n\t\t\t}\n\t\t\tconst base = registration.base === void 0 ? void 0 : structuredClone(registration.base);\n\t\t\tconst detachedUser = user === void 0 ? void 0 : structuredClone(user);\n\t\t\tconst descriptor = {\n\t\t\t\tns: registration.ns,\n\t\t\t\tschema: registration.schema.toJSON(),\n\t\t\t\tvalue: registration.resolved,\n\t\t\t\trevision: registration.revision,\n\t\t\t\t...base === void 0 ? {} : { base },\n\t\t\t\t...detachedUser === void 0 ? {} : { user: detachedUser },\n\t\t\t\tapplies: registration.applies\n\t\t\t};\n\t\t\tif (options?.redactSecrets !== true) return descriptor;\n\t\t\tconst schema = registration.schema;\n\t\t\tconst redacted = redactSecrets(schema, registration.resolved);\n\t\t\treturn {\n\t\t\t\t...descriptor,\n\t\t\t\tvalue: redacted.value,\n\t\t\t\t...base === void 0 ? {} : { base: redactSecrets(schema, base).value },\n\t\t\t\t...detachedUser === void 0 ? {} : { user: redactSecrets(schema, detachedUser).value },\n\t\t\t\tsecrets: redacted.secrets\n\t\t\t};\n\t\t});\n\t}\n\t/**\n\t* Read one registered namespace's resolved value.\n\t* @param ns - the namespace to read.\n\t* @returns the resolved value, or `undefined` while unregistered.\n\t*/\n\tget(ns) {\n\t\treturn this.registrations.get(ns)?.resolved;\n\t}\n\t/**\n\t* Merge a patch into one registered namespace's user layer, validate the\n\t* resolved candidate, persist through the provider, then commit and emit.\n\t* A validation failure rejects before anything is persisted. Writes to one\n\t* namespace are serialized: concurrent updates apply in call order, each\n\t* merging over the previous write's committed section.\n\t* @param ns - the registered namespace to update.\n\t* @param patch - plain-object patch over the user section.\n\t* @param expectedRevision - the descriptor `revision` the caller read; a\n\t* namespace that moved past it rejects with {@link SettingsConflictError}.\n\t*/\n\tasync update(ns, patch, expectedRevision) {\n\t\treturn this.write(ns, patch, \"merge\", expectedRevision);\n\t}\n\t/**\n\t* Replace one registered namespace's user section wholesale, validate,\n\t* persist, then commit and emit. Keys absent from `section` fall back to the\n\t* composition `base` and schema defaults — this is the removal/reset path a\n\t* merge-only patch cannot express (`replace({})` re-inherits everything).\n\t* @param ns - the registered namespace to replace.\n\t* @param section - the complete next user section.\n\t* @param expectedRevision - the descriptor `revision` the caller read; a\n\t* namespace that moved past it rejects with {@link SettingsConflictError}.\n\t*/\n\tasync replace(ns, section, expectedRevision) {\n\t\treturn this.write(ns, section, \"replace\", expectedRevision);\n\t}\n\t/**\n\t* Apply path-addressed edits to one registered namespace's user section,\n\t* validate, persist, then commit and emit. The ops are applied to the\n\t* section as it stands when the write reaches the front of the queue, so a\n\t* caller never has to restate fields it did not touch — and, crucially,\n\t* cannot delete fields it never saw. This is the write path for any caller\n\t* holding a redacted view; `replace` remains the wholesale reset.\n\t* @param ns - the registered namespace to edit.\n\t* @param ops - ordered path edits; later ops observe earlier ones.\n\t* @param expectedRevision - the descriptor `revision` the caller read; a\n\t* namespace that moved past it rejects with {@link SettingsConflictError}.\n\t*/\n\tasync mutate(ns, ops, expectedRevision) {\n\t\tif (!Array.isArray(ops)) throw new TypeError(`settings mutate for \"${ns}\" must be an array of path ops`);\n\t\tfor (const op of ops) {\n\t\t\tif (!isPlainObject(op) || op[\"op\"] !== \"set\" && op[\"op\"] !== \"unset\") throw new TypeError(`settings mutate for \"${ns}\" ops must be {op:'set'|'unset', path}`);\n\t\t\tif (!Array.isArray(op[\"path\"]) || op[\"path\"].some((part) => typeof part !== \"string\")) throw new TypeError(`settings mutate for \"${ns}\" op paths must be arrays of strings`);\n\t\t}\n\t\treturn this.write(ns, ops, \"mutate\", expectedRevision);\n\t}\n\t/** Validate a write, then queue it on the namespace's serialized write chain. */\n\twrite(ns, input, mode, expectedRevision) {\n\t\tconst verb = mode === \"merge\" ? \"update\" : mode === \"replace\" ? \"replace\" : \"mutate\";\n\t\tconst registration = this.registrations.get(ns);\n\t\tif (registration === void 0) throw new Error(`settings namespace \"${ns}\" is not registered`);\n\t\tif (this.isStopped()) throw new Error(`settings service is disposed: \"${ns}\" cannot be written`);\n\t\tif (!this.writable) throw new Error(`settings provider is read-only: \"${ns}\" cannot be updated in-process`);\n\t\tlet payload;\n\t\tif (mode === \"mutate\") payload = { ops: input };\n\t\telse {\n\t\t\tif (!isPlainObject(input)) throw new TypeError(`settings ${verb} for \"${ns}\" must be a plain object`);\n\t\t\tpayload = input;\n\t\t}\n\t\tconst snapshot = cloneJsonShaped(payload, (label, path) => /* @__PURE__ */ new TypeError(`settings ${verb} for \"${ns}\" must contain only JSON-compatible data (found ${label} at ${path})`));\n\t\tconst run = (this.writeQueues.get(ns) ?? Promise.resolve()).catch(() => void 0).then(async () => {\n\t\t\tif (this.isStopped()) throw new Error(`settings service was disposed before the queued \"${ns}\" ${verb} ran`);\n\t\t\tif (this.registrations.get(ns) !== registration) throw new Error(`settings namespace \"${ns}\" registration was disposed before the queued ${verb} ran`);\n\t\t\tconst current = this.section(ns) ?? {};\n\t\t\tif (expectedRevision !== void 0 && expectedRevision !== registration.revision) throw new SettingsConflictError(ns, expectedRevision, registration.revision);\n\t\t\tconst section = mode === \"merge\" ? mergeLayers(current, snapshot) : mode === \"replace\" ? snapshot : snapshot[\"ops\"].reduce(applyPathOp, current);\n\t\t\tconst next = deepFreeze(this.resolve(registration.schema, registration.base, section, registration.validate));\n\t\t\tawait this.persist(ns, section);\n\t\t\tthis.document[ns] = section;\n\t\t\tif (this.registrations.get(ns) === registration && !this.isStopped()) {\n\t\t\t\tthis.bumpRevision(registration, current, section);\n\t\t\t\tthis.commit(registration, next, \"update\");\n\t\t\t}\n\t\t});\n\t\tthis.writeQueues.set(ns, run);\n\t\treturn run;\n\t}\n\t/**\n\t* Provider hook: commit a complete raw document observed in storage. Each\n\t* registered namespace re-resolves; an invalid section keeps that\n\t* namespace's last good value and warns, other namespaces still commit.\n\t* @param doc - the detached raw document (unregistered sections preserved).\n\t* @param source - change origin; defaults to `provider`.\n\t*/\n\tpublish(doc, source = \"provider\") {\n\t\tconst before = /* @__PURE__ */ new Map();\n\t\tfor (const registration of this.registrations.values()) try {\n\t\t\tbefore.set(registration.ns, this.section(registration.ns));\n\t\t} catch {\n\t\t\tbefore.set(registration.ns, void 0);\n\t\t}\n\t\tthis.document = doc;\n\t\tfor (const registration of this.registrations.values()) {\n\t\t\tlet next;\n\t\t\ttry {\n\t\t\t\tnext = deepFreeze(this.resolve(registration.schema, registration.base, this.section(registration.ns), registration.validate));\n\t\t\t} catch (error) {\n\t\t\t\tthis.ctx.logger.warn(\"settings: keeping last good \\\"%s\\\" after invalid stored section\", registration.ns);\n\t\t\t\tthis.ctx.logger.warn(error);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.bumpRevision(registration, before.get(registration.ns), this.section(registration.ns));\n\t\t\tthis.commit(registration, next, source);\n\t\t}\n\t}\n\t/** Read one namespace's raw user section, rejecting non-object sections. */\n\tsection(ns) {\n\t\tconst section = this.document[ns];\n\t\tif (section === void 0) return void 0;\n\t\tif (!isPlainObject(section)) throw new TypeError(`settings section \"${ns}\" must be an object of keys`);\n\t\treturn section;\n\t}\n\t/** Resolve one namespace value: schema defaults, then `base`, then the user layer. */\n\tresolve(schema, base, section, validate) {\n\t\tconst value = schema(mergeLayers(base, section));\n\t\tvalidate?.(value);\n\t\treturn value;\n\t}\n\t/**\n\t* Advance a namespace's revision when its RAW section changed, and announce\n\t* it. Deliberately independent of {@link commit}'s resolved-value equality:\n\t* storing an override equal to the composition base leaves the resolved\n\t* value alone but changes what the document says, which is exactly what a\n\t* configuration surface must re-read.\n\t*/\n\tbumpRevision(registration, before, after) {\n\t\tif (deepEqualJson(before, after)) return;\n\t\tregistration.revision += 1;\n\t\tthis.emitDocumentUpdated(registration.ns, registration.revision);\n\t}\n\t/** Contained fan-out of `settings/document-updated`, mirroring {@link commit}'s. */\n\temitDocumentUpdated(ns, revision) {\n\t\tlet invariantFailure;\n\t\tconst args = [\n\t\t\t\"settings/document-updated\",\n\t\t\tns,\n\t\t\trevision\n\t\t];\n\t\tfor (const listener of this.ctx.events.dispatch(\"emit\", args)) try {\n\t\t\tconst returned = listener(ns, revision);\n\t\t\tif (returned != null && typeof returned.then === \"function\") Promise.resolve(returned).then(void 0, (error) => {\n\t\t\t\tthis.warnListenerFailure(ns, error);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error?.code === \"INVARIANT\") {\n\t\t\t\tinvariantFailure ??= error;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.warnListenerFailure(ns, error);\n\t\t}\n\t\tif (invariantFailure !== void 0) throw invariantFailure;\n\t}\n\t/** Commit a resolved value when changed: swap, notify watchers, emit the event. */\n\tcommit(registration, next, source) {\n\t\tconst prev = registration.resolved;\n\t\tif (deepEqualJson(next, prev)) return;\n\t\tregistration.resolved = next;\n\t\tfor (const watcher of [...registration.watchers]) {\n\t\t\tconst segment = watcher.tail.then(() => {\n\t\t\t\tif (!watcher.active || this.isStopped()) return;\n\t\t\t\treturn watcher.callback(next, prev);\n\t\t\t}).then(() => void 0, (error) => {\n\t\t\t\tthis.warnWatcherFailure(registration.ns, error);\n\t\t\t});\n\t\t\twatcher.tail = segment;\n\t\t\tthis.pendingTails.add(segment);\n\t\t\tsegment.then(() => this.pendingTails.delete(segment));\n\t\t}\n\t\tlet invariantFailure;\n\t\tconst args = [\n\t\t\t\"settings/updated\",\n\t\t\tregistration.ns,\n\t\t\tnext,\n\t\t\tprev,\n\t\t\tsource\n\t\t];\n\t\tfor (const listener of this.ctx.events.dispatch(\"emit\", args)) try {\n\t\t\tconst returned = listener(registration.ns, next, prev, source);\n\t\t\tif (returned != null && typeof returned.then === \"function\") Promise.resolve(returned).then(void 0, (error) => {\n\t\t\t\tthis.warnListenerFailure(registration.ns, error);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error?.code === \"INVARIANT\") {\n\t\t\t\tinvariantFailure ??= error;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.warnListenerFailure(registration.ns, error);\n\t\t}\n\t\tif (invariantFailure !== void 0) throw invariantFailure;\n\t}\n\t/** Contained-watcher diagnostic shared by the sync and async failure paths. */\n\twarnWatcherFailure(ns, error) {\n\t\tthis.ctx.logger.warn(\"settings: watcher for \\\"%s\\\" failed\", ns);\n\t\tthis.ctx.logger.warn(error);\n\t}\n\t/** Contained-listener diagnostic shared by the sync and async failure paths. */\n\twarnListenerFailure(ns, error) {\n\t\tthis.ctx.logger.warn(\"settings: a settings/updated listener for \\\"%s\\\" failed\", ns);\n\t\tthis.ctx.logger.warn(error);\n\t}\n};\n/**\n* Value mirror of the `FiberState` members {@link isUnloading} compares\n* against: a const enum has no runtime object to import, and the value is\n* needed at runtime (same rationale as the CLI boot driver's mirror).\n*/\nconst FIBER_DISPOSED = 4;\nconst FIBER_UNLOADING = 5;\n/** Whether the consumer's own fiber is tearing down (not just losing the settings service). */\nfunction isUnloading(ctx) {\n\tconst state = ctx.fiber.state;\n\treturn state === FIBER_UNLOADING || state === FIBER_DISPOSED;\n}\n/**\n* Install the canonical optional-settings consumer wiring: while a settings\n* service exists, register `ns` with the consumer's composition entry as the\n* `base` layer and point the source thunk at the resolved scope; when the\n* service goes away (disposal, provider reload), fall back to the entry so\n* the consumer keeps working exactly as composed. The registration rides the\n* scoped fiber, so no settings service ever mounted means none of this runs.\n* @param ctx - consumer plugin context owning the wiring.\n* @param ns - the consumer-owned settings namespace.\n* @param schema - schema resolving the namespace (typically the plugin Config).\n* @param entry - the consumer's composition entry config, used as `base`.\n* @param hooks - source sink and change notification.\n*/\nfunction installSettingsSection(ctx, ns, schema, entry, hooks) {\n\tctx.inject([\"settings\"], (sctx) => {\n\t\tconst scope = sctx.settings.register(ns, schema, {\n\t\t\tbase: entry,\n\t\t\t...hooks.validate === void 0 ? {} : { validate: hooks.validate }\n\t\t});\n\t\thooks.setSource(() => scope.get());\n\t\tsctx.effect(() => () => {\n\t\t\tif (isUnloading(ctx)) return;\n\t\t\thooks.setSource(() => entry);\n\t\t\thooks.onChange();\n\t\t});\n\t\thooks.onChange();\n\t\tscope.watch(() => {\n\t\t\tif (isUnloading(ctx)) return;\n\t\t\thooks.onChange();\n\t\t});\n\t});\n}\n//#endregion\nexport { SettingsConflictError, SettingsProvider, SettingsProvider as default, deepEqualJson, installSettingsSection, redactSecrets, settingsNamespace };\n"],"mappings":";;;;;;;AAGA,IAAI,iBAAiB,MAAM;AAAA,EAC1B,KAAK;AAAA,EACL,MAAsB,oBAAI,IAAI;AAAA,EAC9B,OAAuB,oBAAI,QAAQ;AAAA,EACnC,IAAI,SAAS;AACZ,WAAO,KAAK,IAAI;AAAA,EACjB;AAAA,EACA,KAAK,OAAO;AACX,UAAM,KAAK,EAAE,KAAK;AAClB,SAAK,IAAI,IAAI,IAAI,KAAK;AACtB,SAAK,KAAK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QAAI,qBAAqB,OAAQ,OAAM;AAAA,EACxC;AAAA;AAAA,EAEA,mBAAmB,IAAI,OAAO;AAC7B,SAAK,IAAI,OAAO,KAAK,qCAAuC,EAAE;AAC9D,SAAK,IAAI,OAAO,KAAK,KAAK;AAAA,EAC3B;AAAA;AAAA,EAEA,oBAAoB,IAAI,OAAO;AAC9B,SAAK,IAAI,OAAO,KAAK,yDAA2D,EAAE;AAClF,SAAK,IAAI,OAAO,KAAK,KAAK;AAAA,EAC3B;AACD;AAMA,IAAM,iBAAiB;AACvB,IAAM,kBAAkB;AAExB,SAAS,YAAY,KAAK;AACzB,QAAM,QAAQ,IAAI,MAAM;AACxB,SAAO,UAAU,mBAAmB,UAAU;AAC/C;AAcA,SAAS,uBAAuB,KAAK,IAAI,QAAQ,OAAO,OAAO;AAC9D,MAAI,OAAO,CAAC,UAAU,GAAG,CAAC,SAAS;AAClC,UAAM,QAAQ,KAAK,SAAS,SAAS,IAAI,QAAQ;AAAA,MAChD,MAAM;AAAA,MACN,GAAG,MAAM,aAAa,SAAS,CAAC,IAAI,EAAE,UAAU,MAAM,SAAS;AAAA,IAChE,CAAC;AACD,UAAM,UAAU,MAAM,MAAM,IAAI,CAAC;AACjC,SAAK,OAAO,MAAM,MAAM;AACvB,UAAI,YAAY,GAAG,EAAG;AACtB,YAAM,UAAU,MAAM,KAAK;AAC3B,YAAM,SAAS;AAAA,IAChB,CAAC;AACD,UAAM,SAAS;AACf,UAAM,MAAM,MAAM;AACjB,UAAI,YAAY,GAAG,EAAG;AACtB,YAAM,SAAS;AAAA,IAChB,CAAC;AAAA,EACF,CAAC;AACF;","names":["target","value","lines","LoggerService","CordisError","config","task","dispose","Inject","Context","Service"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kanadego/dsh-heartbeat",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "Heartbeat plugin for DeepSeek Harness: scheduled autonomous reflection loop with user profile, material pool, pace gate, and gated proactive expression.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/index.js",
|
|
12
|
+
"./cli": "./dist/cli/index.js",
|
|
13
|
+
"./client": "./client.js",
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./cordis.patch.yml": "./cordis.patch.yml"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"config",
|
|
20
|
+
"assets",
|
|
21
|
+
"client.js",
|
|
22
|
+
"cordis.patch.yml",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22.19.0"
|
|
28
|
+
},
|
|
29
|
+
"os": [
|
|
30
|
+
"win32"
|
|
31
|
+
],
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2 || ^0.1.5-rc.2"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-settings": "^0.1.1-rc.2",
|
|
38
|
+
"@deepseek-ai/schemastery": "^3.18.2",
|
|
39
|
+
"@types/node": "^24.0.0",
|
|
40
|
+
"tsup": "^8.3.0",
|
|
41
|
+
"tsx": "^4.19.0",
|
|
42
|
+
"typescript": "^5.7.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsup",
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"test": "node --import tsx --test \"tests/*.test.ts\""
|
|
48
|
+
},
|
|
49
|
+
"dsh": {
|
|
50
|
+
"bundle": {
|
|
51
|
+
"patch": "./cordis.patch.yml"
|
|
52
|
+
},
|
|
53
|
+
"client": {
|
|
54
|
+
"platform": "web"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@deepseek-ai/dsh-session-format": "^0.1.5-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-util-values": "^0.1.5-rc.2"
|
|
60
|
+
}
|
|
61
|
+
}
|