@ontrove/sdk 0.4.0 → 0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ontrove/sdk
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 12ff00e: Docs: align README one-liners to the v2 positioning — lead with "the tools you give Claude" (capabilities Claude doesn't have on its own), not the knowledge base. No API changes.
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ## 0.3.3
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @ontrove/sdk
2
2
 
3
- The thin standard library for authoring **Trove sources** — the things that fill
4
- your Library. You write a `sync(ctx)` that fetches new content and returns
3
+ The thin standard library for authoring **Trove sources** — scheduled adapters
4
+ that fetch content into your knowledge base. (Source authoring is an early,
5
+ still-developing surface.) You write a `sync(ctx)` that fetches new content and returns
5
6
  documents; the SDK owns the document shape, the typed `ctx` capability object,
6
7
  the watermark/cursor model, the local-run harness the CLI drives, and manifest
7
8
  validation.
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,SAAS,EAET,cAAc,EAEd,WAAW,EACX,SAAS,EACV,MAAM,YAAY,CAAC;AAKpB;;;;;;GAMG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrD,yEAAyE;IACzE,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,wFAAwF;IACxF,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,qEAAqE;IACr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CAAC;IAClB,6EAA6E;IAC7E,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;IAClB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AA+ED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzD,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,OAAO,GAAE,UAAU,CAAC,CAAC,CAAM,GAC1B,OAAO,CAAC,SAAS,CAAC,CAkCpB"}
package/dist/runtime.js CHANGED
@@ -103,7 +103,8 @@ function dedup(documents) {
103
103
  export async function runSource(source, options = {}) {
104
104
  const logs = [];
105
105
  const cursor = options.cursor ?? { type: 'none' };
106
- const fetchImpl = options.fetchImpl ?? ((url, init) => globalThis.fetch(url, init));
106
+ const fetchImpl = options.fetchImpl ??
107
+ ((url, init) => globalThis.fetch(url, init));
107
108
  const now = options.now ?? (() => new Date());
108
109
  const ctx = {
109
110
  config: options.config ?? {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontrove/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Thin standard library for authoring Trove sources — defineSource, the sync(ctx) capability object, the document shape, the local-run harness, and manifest validation.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/runtime.ts CHANGED
@@ -163,8 +163,10 @@ export async function runSource<C = Record<string, unknown>>(
163
163
  ): Promise<RunResult> {
164
164
  const logs: unknown[][] = [];
165
165
  const cursor: Watermark = options.cursor ?? { type: 'none' };
166
- const fetchImpl: FetchLike = options.fetchImpl ?? ((url, init) => globalThis.fetch(url, init));
167
- const now = options.now ?? (() => new Date());
166
+ const fetchImpl: FetchLike =
167
+ options.fetchImpl ??
168
+ ((url: string | URL, init?: RequestInit): Promise<Response> => globalThis.fetch(url, init));
169
+ const now = options.now ?? ((): Date => new Date());
168
170
 
169
171
  const ctx: SourceContext<C> = {
170
172
  config: options.config ?? ({} as C),