@gobing-ai/ts-runtime 0.3.4 → 0.3.6

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/README.md CHANGED
@@ -272,9 +272,9 @@ relativePath('/a/x', '/a/y'); // '../y'
272
272
  getProcessCwd(); // process.cwd() or '/' on Workers
273
273
  ```
274
274
 
275
- ### 6. Plugin core (`@gobing-ai/ts-runtime/plugin`)
275
+ ### 6. Extension core (`@gobing-ai/ts-runtime/extension`)
276
276
 
277
- The `./plugin` subpath exposes a generic, domain-agnostic plugin/capability core used by both
277
+ The `./extension` subpath exposes a generic, domain-agnostic extension/capability core used by both
278
278
  `ts-rule-engine` and `ts-dual-workflow-engine` (ADR-010). It shares the mechanism — a typed registry
279
279
  with origin metadata, a trust-gated extension loader, and a path guard — without knowing anything
280
280
  about evaluators, resolvers, actions, or guards. Each engine owns its domain-specific kinds,
@@ -282,7 +282,7 @@ schemas, error types, and override semantics.
282
282
  #### Capability registry
283
283
 
284
284
  ```ts
285
- import { CapabilityRegistry } from '@gobing-ai/ts-runtime/plugin';
285
+ import { CapabilityRegistry } from '@gobing-ai/ts-runtime/extension';
286
286
 
287
287
  interface Widget { execute(): void; }
288
288
  const registry = new CapabilityRegistry<Widget>('widget');
@@ -306,7 +306,7 @@ registry.entries(); // [['core', { capability, origin: 'builti
306
306
  Extension modules are arbitrary code — the loader is disabled by default and fails closed:
307
307
 
308
308
  ```ts
309
- import { loadExtensionModules, type ExtensionRef } from '@gobing-ai/ts-runtime/plugin';
309
+ import { loadExtensionModules, type ExtensionRef } from '@gobing-ai/ts-runtime/extension';
310
310
 
311
311
  const refs: ExtensionRef<'actions'>[] = [{
312
312
  kind: 'actions',
@@ -338,7 +338,7 @@ no ambient `import()` capability of its own.
338
338
  of any engine's zod schema (defense in depth):
339
339
 
340
340
  ```ts
341
- import { assertRelativeExtensionPath } from '@gobing-ai/ts-runtime/plugin';
341
+ import { assertRelativeExtensionPath } from '@gobing-ai/ts-runtime/extension';
342
342
 
343
343
  assertRelativeExtensionPath('./ext/my.ts'); // ok
344
344
  assertRelativeExtensionPath('/etc/evil.ts'); // throws: must be relative
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability-registry.d.ts","sourceRoot":"","sources":["../../src/extension/capability-registry.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvD,+BAA+B;AAC/B,MAAM,WAAW,eAAe,CAAC,WAAW;IACxC,iCAAiC;IACjC,UAAU,EAAE,WAAW,CAAC;IACxB,2BAA2B;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAkB,CAAC,WAAW;IAG3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmD;gBAEnD,IAAI,EAAE,MAAM;IAEzC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAE,gBAA8B,GAAG,IAAI;IAI7F,4CAA4C;IAC5C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,0DAA0D;IAC1D,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAQ9B,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,SAAS;IAIhE,2DAA2D;IAC3D,IAAI,IAAI,MAAM,EAAE;IAIhB,+EAA+E;IAC/E,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;CAGpE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-loader.d.ts","sourceRoot":"","sources":["../../src/extension/extension-loader.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY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],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAQrG"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extension/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './extension/index';
2
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './extension/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/ts-runtime",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "@gobing-ai/ts-runtime — Runtime abstractions for Bun, Node, and Cloudflare Workers.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -36,9 +36,9 @@
36
36
  "types": "./dist/bun-sqlite.d.ts",
37
37
  "import": "./dist/bun-sqlite.js"
38
38
  },
39
- "./plugin": {
40
- "types": "./dist/plugin.d.ts",
41
- "import": "./dist/plugin.js"
39
+ "./extension": {
40
+ "types": "./dist/extension.d.ts",
41
+ "import": "./dist/extension.js"
42
42
  }
43
43
  },
44
44
  "files": [
@@ -58,7 +58,7 @@
58
58
  "release": "echo 'Manual publish is disabled. Releases go through GitHub Actions via Trusted Publishing — push a tag: git tag @gobing-ai/ts-runtime-v<version> && git push --tags' && exit 1"
59
59
  },
60
60
  "dependencies": {
61
- "@gobing-ai/ts-utils": "^0.3.4",
61
+ "@gobing-ai/ts-utils": "^0.3.6",
62
62
  "execa": "^9.5.0",
63
63
  "yaml": "^2.7.0",
64
64
  "zod": "^4.1.0"
@@ -0,0 +1 @@
1
+ export * from './extension/index';
@@ -1 +0,0 @@
1
- {"version":3,"file":"capability-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/capability-registry.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvD,+BAA+B;AAC/B,MAAM,WAAW,eAAe,CAAC,WAAW;IACxC,iCAAiC;IACjC,UAAU,EAAE,WAAW,CAAC;IACxB,2BAA2B;IAC3B,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAkB,CAAC,WAAW;IAG3B,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmD;gBAEnD,IAAI,EAAE,MAAM;IAEzC,wCAAwC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAE,gBAA8B,GAAG,IAAI;IAI7F,4CAA4C;IAC5C,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,0DAA0D;IAC1D,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW;IAQ9B,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAC,WAAW,CAAC,GAAG,SAAS;IAIhE,2DAA2D;IAC3D,IAAI,IAAI,MAAM,EAAE;IAIhB,+EAA+E;IAC/E,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;CAGpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"extension-loader.d.ts","sourceRoot":"","sources":["../../src/plugin/extension-loader.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY,CAAC,cAAc,SAAS,MAAM,GAAG,MAAM;IAChE,6EA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AA2B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,IAAI,CAQrG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
package/dist/plugin.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './plugin/index';
2
- //# sourceMappingURL=plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
package/dist/plugin.js DELETED
@@ -1 +0,0 @@
1
- export * from './plugin/index.js';
package/src/plugin.ts DELETED
@@ -1 +0,0 @@
1
- export * from './plugin/index';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes