@sortedyuan/plugin-runtime 0.0.0-stage → 0.2.3

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yuan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # @sortedyuan/plugin-runtime
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `createRuntimePlugin(factory?, id?)` supplies `services.runtimeFactory`. Its default
4
+ factory creates the real Core `May` runtime. Application owns each returned Runtime,
5
+ including saving, migration and closing before plugin resources are released.
6
+ It also accepts `{ id?, factory?, create?, dispose?, ...metadata }`; `create(context)`
7
+ returns the Runtime factory and may use declared services and persistent state.
8
+ Choose one of `factory` or `create` when supplying a custom source.
9
+
10
+ `createContextPlugin({ id?, create?, options?, dispose? })` supplies
11
+ `services.contextFactory`, defaulting to `InMemoryContextFactory`. `options` supplies
12
+ the single `contextOptions` service as an object or an effective-Model callback.
13
+ `create(context)` runs independently for each Application. `dispose(factory)` and
14
+ `context.defer()` manage acquired resources.
15
+
16
+ `createContextWrapperPlugin({ id, create, order?, dispose? })` registers
17
+ `(factory) => ContextFactory` returned by `create(context)`. Wrappers apply in order;
18
+ the last applied wrapper receives `create()` calls first.
19
+
20
+ `createToolsPlugin({ id, create, order?, dispose? })` registers a tool source returned
21
+ by `create(context)`: `() => Iterable<Tool>`. The contribution is automatically
22
+ removed during plugin cleanup. Actual resource handles belong to that plugin and
23
+ should be registered with `context.defer()`. Multiple sources compose into a
24
+ duplicate-checked catalog captured per Run.
25
+ Factories accept typed `config`, `configSchema`, dependencies, `requiresHooks`,
26
+ `state`, and `version` described in
27
+ [`PluginFactoryMetadata`](../../plugin-services/README.md). Configuration is
28
+ validated before setup, and required registries are declared automatically.
29
+
30
+ Tests use actual file handles, the Core Runtime factory and independent Context
31
+ instances: `pnpm --filter @sortedyuan/plugin-runtime test`.
@@ -0,0 +1,26 @@
1
+ # @sortedyuan/plugin-runtime
2
+
3
+ `createRuntimePlugin(factory?, id?)` 提供 `services.runtimeFactory`。
4
+ 默认工厂创建 Core 的实际 `May` Runtime。Application 管理返回的 Runtime,
5
+ 负责保存、迁移和关闭,并在释放插件资源之前关闭 Runtime。
6
+ 也接受 `{ id?, factory?, create?, dispose?, ...metadata }`,`create(context)`
7
+ 返回 Runtime 工厂,并可以使用声明的服务和持久状态。提供自定义来源时选择 `factory` 或 `create`。
8
+
9
+ `createContextPlugin({ id?, create?, options?, dispose? })` 提供 `services.contextFactory`,
10
+ 默认使用 `InMemoryContextFactory`。`options` 作为 `contextOptions` 服务,
11
+ 接受配置对象或接收当前有效 Model 的函数。每个 Application 分别调用 `create(context)`。
12
+ 通过 `dispose(factory)` 和 `context.defer()` 管理资源。
13
+
14
+ `createContextWrapperPlugin({ id, create, order?, dispose? })` 注册
15
+ `create(context)` 返回的 `(factory) => ContextFactory`。
16
+ 包装按照顺序应用,最后应用的包装首先接收 `create()` 调用。
17
+
18
+ `createToolsPlugin({ id, create, order?, dispose? })` 注册工厂返回的工具来源:
19
+ `() => Iterable<Tool>`。插件清理时自动移除条目,实际资源通过 `context.defer()` 注册清理。
20
+ 多个来源组合成工具目录,为每次 Run 保存快照,并检查重复名称。
21
+ 工厂支持 [`PluginFactoryMetadata`](../../plugin-services/README.zh-CN.md) 中带类型的
22
+ `config`、`configSchema`、依赖、`requiresHooks`、`state` 和 `version`。
23
+ setup 之前验证配置,并自动声明需要的注册表依赖。
24
+
25
+ 测试使用实际文件资源、Core Runtime 工厂和独立 Context 实例。
26
+ 执行 `pnpm --filter @sortedyuan/plugin-runtime test`。
@@ -0,0 +1,29 @@
1
+ import { type RuntimeFactory } from "@sortedyuan/core";
2
+ import { type ContextFactory } from "@sortedyuan/context";
3
+ import { type PluginContext, type PluginDefinition, type Disposer } from "@sortedyuan/plugin";
4
+ import { type PluginFactoryMetadata, type ContextOptionsSource, type ContextWrapper, type ContributionOptions, type ToolSource } from "@sortedyuan/plugin-services";
5
+ export interface RuntimePluginOptions<C = unknown> extends PluginFactoryMetadata<C> {
6
+ readonly id?: string;
7
+ readonly factory?: RuntimeFactory;
8
+ readonly create?: (context: PluginContext<C>) => RuntimeFactory | Promise<RuntimeFactory>;
9
+ readonly dispose?: (factory: RuntimeFactory) => void | Promise<void>;
10
+ }
11
+ export declare function createRuntimePlugin<C = unknown>(factoryOrOptions?: RuntimeFactory | RuntimePluginOptions<C>, id?: string): PluginDefinition<C>;
12
+ export interface ContextPluginOptions<C = unknown> extends PluginFactoryMetadata<C> {
13
+ readonly id?: string;
14
+ readonly create?: (context: PluginContext<C>) => ContextFactory | Promise<ContextFactory>;
15
+ readonly options?: ContextOptionsSource;
16
+ readonly dispose?: (factory: ContextFactory) => void | Promise<void>;
17
+ }
18
+ export declare function createContextPlugin<C = unknown>(options?: ContextPluginOptions<C>): PluginDefinition<C>;
19
+ export interface ContextWrapperPluginOptions<C = unknown> extends Omit<ContributionOptions, "pluginOrder">, PluginFactoryMetadata<C> {
20
+ readonly create: (context: PluginContext<C>) => ContextWrapper | Promise<ContextWrapper>;
21
+ readonly dispose?: Disposer;
22
+ }
23
+ export declare function createContextWrapperPlugin<C = unknown>(options: ContextWrapperPluginOptions<C>): PluginDefinition<C>;
24
+ export interface ToolsPluginOptions<C = unknown> extends Omit<ContributionOptions, "pluginOrder">, PluginFactoryMetadata<C> {
25
+ readonly create: (context: PluginContext<C>) => ToolSource | Promise<ToolSource>;
26
+ readonly dispose?: Disposer;
27
+ }
28
+ export declare function createToolsPlugin<C = unknown>(options: ToolsPluginOptions<C>): PluginDefinition<C>;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EAA6B,KAAK,qBAAqB,EAAE,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE/L,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,qBAAqB,CAAC,CAAC,CAAC;IACjF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,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C,GAAG,OAAO,EAAE,OAAO,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAOpH;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO,CAAE,SAAQ,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACzH,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACjF,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B;AACD,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAOlG"}
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ import { May } from "@sortedyuan/core";
2
+ import { InMemoryContextFactory } from "@sortedyuan/context";
3
+ import { definePlugin } from "@sortedyuan/plugin";
4
+ import { services, factoryMetadata } from "@sortedyuan/plugin-services";
5
+ export function createRuntimePlugin(factoryOrOptions = {}, id = "may.runtime") {
6
+ const options = typeof factoryOrOptions === "function" ? { id, factory: factoryOrOptions } : factoryOrOptions;
7
+ if (options.create !== undefined && options.factory !== undefined)
8
+ throw new TypeError("Runtime plugin accepts one factory source");
9
+ return definePlugin({ ...factoryMetadata(options), id: options.id ?? id, provides: [services.runtimeFactory], async setup(context) {
10
+ const factory = options.create === undefined ? options.factory ?? ((input) => new May(input)) : await options.create(context);
11
+ if (options.dispose)
12
+ context.defer(() => options.dispose(factory));
13
+ if (typeof factory !== "function")
14
+ throw new TypeError("Runtime plugin must create a RuntimeFactory");
15
+ context.provide(services.runtimeFactory, factory);
16
+ } });
17
+ }
18
+ export function createContextPlugin(options = {}) {
19
+ return definePlugin({ ...factoryMetadata(options), id: options.id ?? "may.context", provides: [services.contextFactory, ...(options.options === undefined ? [] : [services.contextOptions])], async setup(context) {
20
+ const factory = options.create === undefined ? new InMemoryContextFactory() : await options.create(context);
21
+ if (options.dispose)
22
+ context.defer(() => options.dispose(factory));
23
+ if (typeof factory?.create !== "function")
24
+ throw new TypeError("Context plugin must create a ContextFactory");
25
+ context.provide(services.contextFactory, factory);
26
+ if (options.options !== undefined)
27
+ context.provide(services.contextOptions, options.options);
28
+ } });
29
+ }
30
+ export function createContextWrapperPlugin(options) {
31
+ return definePlugin({ ...factoryMetadata(options, [{ service: services.contextWrappers }]), id: options.id, async setup(context) {
32
+ if (options.dispose)
33
+ context.defer(options.dispose);
34
+ context.defer(context.get(services.contextWrappers).add(await options.create(context), {
35
+ id: context.pluginId, pluginOrder: context.pluginOrder, ...(options.order === undefined ? {} : { order: options.order }),
36
+ }));
37
+ } });
38
+ }
39
+ export function createToolsPlugin(options) {
40
+ return definePlugin({ ...factoryMetadata(options, [{ service: services.toolSources }]), id: options.id, async setup(context) {
41
+ if (options.dispose)
42
+ context.defer(options.dispose);
43
+ context.defer(context.get(services.toolSources).add(await options.create(context), {
44
+ id: context.pluginId, pluginOrder: context.pluginOrder, ...(options.order === undefined ? {} : { order: options.order }),
45
+ }));
46
+ } });
47
+ }
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAuB,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAuB,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,YAAY,EAA4D,MAAM,oBAAoB,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAyH,MAAM,6BAA6B,CAAC;AAQ/L,MAAM,UAAU,mBAAmB,CAAc,gBAAgB,GAA6C,EAAE,EAAE,EAAE,GAAG,aAAa;IAClI,MAAM,OAAO,GAA4B,OAAO,gBAAgB,KAAK,UAAU,C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AE;gBACrF,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;aACzH,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,CAAC;AACP,CAAC;AAMD,MAAM,UAAU,iBAAiB,CAAc,OAA8B;IAC3E,OAAO,YAAY,CAAC,EAAE,GAAG,eAAe,CAAC,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;YACzH,IAAI,OAAO,CAAC,OAAO;gBAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;gBACjF,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;aACzH,CAAC,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,CAAC;AACP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,37 @@
1
1
  {
2
2
  "name": "@sortedyuan/plugin-runtime",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.3",
4
+ "description": "Runtime, context and tool plugin factories.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "!dist/.tsbuildinfo"
17
+ ],
18
+ "dependencies": {
19
+ "@sortedyuan/core": "0.2.0",
20
+ "@sortedyuan/context": "0.2.0",
21
+ "@sortedyuan/plugin": "0.2.0",
22
+ "@sortedyuan/plugin-services": "0.2.3"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^22.0.0"
26
+ },
27
+ "engines": {
28
+ "node": ">=22"
29
+ },
30
+ "license": "MIT",
31
+ "scripts": {
32
+ "build": "tsc -b",
33
+ "clean": "tsc -b --clean",
34
+ "test": "pnpm run build && node --test test/*.test.mjs",
35
+ "test:coverage": "pnpm run build && node --test --experimental-test-coverage test/*.test.mjs"
36
+ }
6
37
  }