@telorun/sdk 0.11.1 → 1.0.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/README.md CHANGED
@@ -8,10 +8,6 @@ The Node.js SDK provides the authoring surface for Telo modules. It defines the
8
8
  - **Context types** for accessing the kernel, registry, and events.
9
9
  - **Shared primitives** used by Telo modules and tooling.
10
10
 
11
- ## Status
12
-
13
- Early prototype. APIs and contracts are still evolving. The API surface - including YAML shapes - may change at any time without notice.
14
-
15
11
  ## When to Use It
16
12
 
17
13
  Use the SDK when building or extending Telo modules. It is not the kernel itself; it is the contract layer that keeps module behavior consistent and predictable.
@@ -73,5 +69,5 @@ throws:
73
69
  ## Related Docs
74
70
 
75
71
  - Kernel overview: [kernel/README.md](../../kernel/README.md)
76
- - Built‑in modules: [modules/](../../modules/)
72
+ - Built‑in modules: [Standard Library](../../modules/README.md)
77
73
  - SDKs index: [sdk/README.md](../README.md)
@@ -1,4 +1,4 @@
1
- export interface Provider {
2
- init(): Promise<void>;
1
+ export interface Provider<TOutput = unknown> {
2
+ provide(): Promise<TOutput>;
3
3
  }
4
4
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/capabilities/provider.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/capabilities/provider.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ,CAAC,OAAO,GAAG,OAAO;IACzC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7B"}
@@ -1,7 +1,8 @@
1
1
  import type { Invocable } from "./capabilities/invokable.js";
2
+ import type { Provider } from "./capabilities/provider.js";
2
3
  import type { Runnable } from "./capabilities/runnable.js";
3
4
  import type { ResourceContext } from "./resource-context.js";
4
- export type ResourceInstance<TInput = Record<string, any>, TOutput = any> = Partial<Invocable<TInput, TOutput>> & Partial<Runnable> & {
5
+ export type ResourceInstance<TInput = Record<string, any>, TOutput = any> = Partial<Invocable<TInput, TOutput>> & Partial<Runnable> & Partial<Provider<TOutput>> & {
5
6
  init?(ctx?: ResourceContext): Promise<void>;
6
7
  teardown?(): void | Promise<void>;
7
8
  snapshot?(): Record<string, any> | Promise<Record<string, any>>;
@@ -1 +1 @@
1
- {"version":3,"file":"resource-instance.d.ts","sourceRoot":"","sources":["../src/resource-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CACjF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3B,GACC,OAAO,CAAC,QAAQ,CAAC,GAAG;IAClB,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,QAAQ,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;CACjE,CAAC"}
1
+ {"version":3,"file":"resource-instance.d.ts","sourceRoot":"","sources":["../src/resource-instance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,MAAM,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CACjF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAC3B,GACC,OAAO,CAAC,QAAQ,CAAC,GACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAG;IAC3B,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,QAAQ,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;CACjE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telorun/sdk",
3
- "version": "0.11.1",
3
+ "version": "1.0.0",
4
4
  "description": "Telo SDK - Public API for Telo module authors.",
5
5
  "keywords": [
6
6
  "telo",
@@ -1,3 +1,3 @@
1
- export interface Provider {
2
- init(): Promise<void>;
1
+ export interface Provider<TOutput = unknown> {
2
+ provide(): Promise<TOutput>;
3
3
  }
@@ -1,11 +1,13 @@
1
1
  import type { Invocable } from "./capabilities/invokable.js";
2
+ import type { Provider } from "./capabilities/provider.js";
2
3
  import type { Runnable } from "./capabilities/runnable.js";
3
4
  import type { ResourceContext } from "./resource-context.js";
4
5
 
5
6
  export type ResourceInstance<TInput = Record<string, any>, TOutput = any> = Partial<
6
7
  Invocable<TInput, TOutput>
7
8
  > &
8
- Partial<Runnable> & {
9
+ Partial<Runnable> &
10
+ Partial<Provider<TOutput>> & {
9
11
  init?(ctx?: ResourceContext): Promise<void>;
10
12
  teardown?(): void | Promise<void>;
11
13
  snapshot?(): Record<string, any> | Promise<Record<string, any>>;