@h1r-ai/croche 0.5.1 → 0.5.2

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/dist/types.d.ts CHANGED
@@ -446,7 +446,7 @@ export interface RuntimeDebugObserverOptions {
446
446
  /** Runtime tracing only in public builds; an untyped full upgrade is refused atomically. */
447
447
  visibility?: 'runtime';
448
448
  }
449
- export type RuntimeDebugEventType = 'input.received' | 'input.replayed' | 'model.request' | 'model.response' | 'model.error' | 'model.recovery' | 'marker' | 'tool.requested' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'turn.completed' | 'runtime.ready' | 'runtime.error' | 'runtime.warning' | 'memory.inactive' | 'memory.prepared' | 'memory.prepare_failed' | 'memory.compacted' | 'memory.error' | 'model.gateway_error' | 'model.stream_mismatch' | 'maintenance.preempted' | 'cloud.unreachable' | 'telemetry.rejected' | 'attestation.fallback' | 'runtime.reregistered' | 'runtime.state' | 'command.repaired' | 'commands.relisted' | 'gateway.routing' | 'gateway.routing_rejected' | 'gateway.unsupported' | 'budget.unsupported_currency' | 'memory.refused' | 'memory.upkeep' | 'outbox.bounded' | 'output.retry' | 'tokens.table_refused' | 'turn.history_kept' | 'turn.reply_with_commands' | 'write.failed'
449
+ export type RuntimeDebugEventType = 'input.received' | 'input.replayed' | 'model.request' | 'model.response' | 'model.error' | 'model.recovery' | 'marker' | 'tool.requested' | 'tool.started' | 'tool.completed' | 'tool.failed' | 'turn.completed' | 'runtime.ready' | 'runtime.error' | 'runtime.warning' | 'memory.inactive' | 'memory.prepared' | 'memory.prepare_failed' | 'memory.compacted' | 'memory.error' | 'model.gateway_error' | 'model.stream_mismatch' | 'maintenance.preempted' | 'cloud.unreachable' | 'telemetry.rejected' | 'attestation.fallback' | 'runtime.reregistered' | 'runtime.state' | 'command.repaired' | 'commands.relisted' | 'gateway.routing' | 'gateway.routing_rejected' | 'gateway.unsupported' | 'gateway.tool_models_invalid' | 'budget.unsupported_currency' | 'memory.refused' | 'memory.upkeep' | 'outbox.bounded' | 'output.retry' | 'tokens.table_refused' | 'turn.history_kept' | 'turn.reply_with_commands' | 'write.failed'
450
450
  /** At open: held sends a closed or killed Runtime left, all resumed as the next turns
451
451
  * (`data.inputs`), or a held record that could not be read. */
452
452
  | 'held.resumed' | 'held.unreadable' | 'input.refused'
package/docs/SKILL.md CHANGED
@@ -65,15 +65,15 @@ Choose the matching path:
65
65
 
66
66
  - **Node script or web backend:** `@h1r-ai/croche`, Node.js 22+ on macOS/Linux.
67
67
  - **React Native:** `@h1r-ai/croche` + `@h1r-ai/croche-react-native`; same project/agent API.
68
- - **Native Swift/Kotlin SDKs exist.** The shared `Croche.open` project API is coming in **0.5.1**;
69
- Read the `croche-platforms` iOS/Android reference for the candidate install and first turn.
70
- TODO verify: package resolution and native execution. Describe the pending project API, not absent SDKs.
68
+ - **Native Swift/Kotlin SDKs are published as 0.5.2**, including the shared `Croche.open` project API.
69
+ Read the `croche-platforms` iOS/Android reference for installation and the first turn.
70
+ Verify package resolution and native execution in the target app; publication is not a test pass.
71
71
  If its exact release is unavailable, offer TypeScript/React Native as an alternative, not an
72
72
  automatic rewrite of a native app. Never invent native snippets.
73
73
  - **Windows:** verification pending; command forms are not a support claim. Use the
74
74
  detected shell rather than assuming Bash; `croche-cli` has PowerShell guidance.
75
75
 
76
- The TypeScript SDK, React Native SDK and CLI **0.5.1 are published on npm**. Use
76
+ The TypeScript SDK, React Native SDK and CLI **0.5.2 are published on npm**. Use
77
77
  `npm install @h1r-ai/croche` and `npm install -g @h1r-ai/croche-cli`; check the installed
78
78
  version and command help. Publication alone does not prove the user's platform or first turn.
79
79
  TODO verify: the matching release's first-turn and login workflows. The examples use
@@ -290,6 +290,8 @@ agent.subscribe({ onEvent(event) {
290
290
  Use new input IDs for new messages; retain an ID and identical payload for delivery retries.
291
291
  3. When the app needs actions, read [tools.md](references/tools.md). Add declarations and
292
292
  matching handlers; enforce permissions and user approval in the handler/UI.
293
+ For current web facts, turn on the built-in web search in the project's Studio config instead
294
+ of writing your own: [web-search.md](references/web-search.md).
293
295
  4. Write the app's code config and integration code yourself; do not hand the user a list of
294
296
  implementation chores. For streaming, multiple agents or memory UI, read [agents.md](references/agents.md).
295
297
  5. Run local syntax/type checks first. With live-usage authorization, make one small request.
@@ -1,7 +1,7 @@
1
1
  # Node: one real reply
2
2
 
3
3
  Use for a Node script or the first local check before adding UI. Node.js 22+ on macOS/Linux;
4
- Windows verification pending. SDK 0.5.1 is published on npm; a real first turn on the user’s
4
+ Windows verification pending. SDK 0.5.2 is published on npm; a real first turn on the user’s
5
5
  platform still needs verification. With installation permission, install the published SDK:
6
6
 
7
7
  ```sh
@@ -0,0 +1,85 @@
1
+ # Built-in web search: `web.search` and `web.open_reference`
2
+
3
+ Use when the agent must answer from current information on the web (news, prices, opening
4
+ hours, recent releases). Croche provides the tools. The app writes no handler and needs no
5
+ extra key. Web search works only in apps on Croche 0.5.2 or later; 0.5.1 apps don't get it.
6
+
7
+ ## What it does
8
+
9
+ The agent sees two commands, `web search <query>` and `web open_reference <ref>`. The agent
10
+ passes only the query or the reference number; it never picks a model, engine or URL.
11
+
12
+ - **`web.search`** takes **one argument: `query`**. A separate search worker runs one search and
13
+ sees only the query and today's date (UTC), never the conversation, instructions or app
14
+ state. The agent gets a short summary (at most 1,200 characters) and up to `maxResults`
15
+ numbered references:
16
+ `{"status":"ok","summary":"…","references":[{"ref":1,"url":"…","title":"…"}]}`.
17
+ References come only from the search engine's citations. URLs written in the summary text are
18
+ not references, and private or local addresses are dropped.
19
+ - **`web.open_reference`** takes **one argument: `ref`**, a number from the agent's **most
20
+ recent** search. It reads that page and returns a short extract (at most 1,500 characters):
21
+ `{"status":"ok","ref":1,"url":"…","evidence":"…"}`, or `{"status":"unavailable","ref":1,"url":"…"}`
22
+ when the page can't be read. A number not in the most recent search fails as `unknown_ref`.
23
+
24
+ **References are not proof.** A summary can credit a claim to the wrong source. Before stating a
25
+ specific fact, figure or quote, the agent should open the reference with `web.open_reference`.
26
+ Put that rule in `instructions` when accuracy matters.
27
+
28
+ Searching takes about 7–11 s, and opening a reference 6–8 s (30 s at most by default). The
29
+ agent answers "processing" first and replies again with the result. Search calls don't count
30
+ against `maxIterations`. Search results are untrusted web content, handled as data, never as
31
+ instructions.
32
+
33
+ Other results: `{"status":"failed","reason":…}` with `timeout`, `budget`, `limit`, `network`,
34
+ `invalid_output` or `unavailable`. With no usable sources, `references` is empty. The
35
+ conversation continues.
36
+
37
+ ## Turn it on and preset it
38
+
39
+ Tool settings live in the **project config in Studio**, not in app code. `Croche.open` has no
40
+ option for them. Edit the draft with the CLI (see the `croche-config` skill): get the whole
41
+ draft, set `"schema": 3`, add the tool under `config.crocheTools`, and save it.
42
+
43
+ ```sh
44
+ croche config get --project PROJECT_ID --output croche.config.json
45
+ # Edit croche.config.json (keep the complete config and every app tool), then:
46
+ croche config save croche.config.json --project PROJECT_ID
47
+ ```
48
+
49
+ ```jsonc
50
+ // Inside the draft document: "schema": 3, "config": { ... }
51
+ "crocheTools": {
52
+ "web.search": { "maxResults": 3, "excludeDomains": ["example-spam.com"] } // or true / false
53
+ }
54
+ ```
55
+
56
+ Put "open a reference before quoting it" in `instructions` when accuracy matters.
57
+
58
+ - **Debug-key installs:** a saved draft reaches them at their next open after a sync.
59
+ - **Production:** a human releases the config in Studio (Build → AI config → Running config).
60
+ - Cloud checks the settings against the chosen model when the draft is saved or released.
61
+
62
+ | Field | Default | Notes |
63
+ | --- | --- | --- |
64
+ | `model` | `google/gemini-3.8-flash` | The search worker's model, independent of the agent's model. |
65
+ | `engine` | `exa` | The only engine in 0.5.2. |
66
+ | `maxResults` | 3 | 1–5 references per search. |
67
+ | `includeDomains`, `excludeDomains` | none | At most 20 lowercase hostnames each (no `https://`, port or path). The lists must not overlap. |
68
+ | `maxPerTurn` | 3 | 1–10. Searches and reference opens count together. |
69
+ | `timeoutMs` | 30000 | 10–300000, for each search or open. |
70
+
71
+ One object replaces another whole: an agent's or language's object replaces the project's, and
72
+ fields it omits take the tool defaults. Unknown fields are refused.
73
+
74
+ ## Cost
75
+
76
+ Billed at actual cost from the project's budget: about **$0.0095 per search** and
77
+ **$0.002–0.005 per reference opened**. `maxPerTurn` bounds the spend per turn. The budget is
78
+ checked before each call; when it is used up, the call is refused as `budget` and nothing is
79
+ spent.
80
+
81
+ ## Verify
82
+
83
+ In a development build, ask one question that needs current information. Check that the reply
84
+ uses the references and that `web.open_reference` was used before a specific claim. Check the
85
+ cost in **Studio → project → Monitoring → Logs** (development filter).
@@ -7,7 +7,7 @@ description: Use the Croche CLI to create an app project and private debug-key f
7
7
 
8
8
  Do the permitted CLI work and explain the next user action. Node.js 22+ on macOS/Linux;
9
9
  Windows verification pending. Check `croche --help` and installed version before relying on
10
- a command. CLI 0.5.1 is published on npm; platform and login verification remain separate.
10
+ a command. CLI 0.5.2 is published on npm; platform and login verification remain separate.
11
11
  With installation permission:
12
12
 
13
13
  ```sh
@@ -99,7 +99,8 @@ croche config save croche.config.json --project PROJECT_ID
99
99
  ```
100
100
 
101
101
  Preserve the full project document. If no draft exists, prepare `schema: 2` with the complete
102
- app config in `config`, not the returned `null`. On a conflict, keep the local edit, fetch the
102
+ app config in `config`, not the returned `null`. Use `schema: 3` when `crocheTools` sets an object for
103
+ `web.search` (see the `croche` skill's web-search.md). On a conflict, keep the local edit, fetch the
103
104
  latest draft separately and reconcile; do not force an empty base or blindly overwrite.
104
105
  Saving affects debug-key apps, not production: every debug key follows drafts. Verify all tool
105
106
  handlers, allow sync and reopen; the change applies on the **next open after sync**, never
@@ -14,11 +14,11 @@ use the usage and limits shown in Studio, not a separate model-service setup.
14
14
  | Local Node check | `@h1r-ai/croche`, durable `FileStorage`, SDK debug key | Core `croche` skill |
15
15
  | React Native | `Croche` from `@h1r-ai/croche-react-native`, SDK-managed storage | [react-native.md](references/react-native.md) |
16
16
  | Web (local and production) | `Croche` on the app's Node backend, server key stays there | [web-backend.md](references/web-backend.md) |
17
- | iOS · Swift | SPM, exact **0.5.1**, `Croche.open` | [ios.md](references/ios.md) |
18
- | Android · Kotlin | Maven, exact **0.5.1**, `Croche.open` | [android.md](references/android.md) |
17
+ | iOS · Swift | SPM, exact **0.5.2**, `Croche.open` | [ios.md](references/ios.md) |
18
+ | Android · Kotlin | Maven, exact **0.5.2**, `Croche.open` | [android.md](references/android.md) |
19
19
 
20
20
  Node.js 22+ on macOS/Linux; Windows verification pending. PowerShell syntax does not establish
21
- Windows support. SDK 0.5.1 is published on npm; verify the installed version and platform behavior.
21
+ Windows support. SDK 0.5.2 is published on npm; verify the installed version and platform behavior.
22
22
  Node and RN do not automatically load the CLI-created `.env`: Node needs `--env-file` or an
23
23
  existing dotenv loader, web secrets stay server-side only, and RN needs debug-only build config
24
24
  with no secret in release artifacts. Read the matching reference above before the first turn.
@@ -36,13 +36,13 @@ Use `croche-config` for the complete selection and next-open rules.
36
36
 
37
37
  ## Native gate
38
38
 
39
- **Native Swift and Kotlin SDKs exist.** Their shared **project/agent `Croche.open` API** is
40
- coming in **0.5.1**. Do not describe a pending API/release as nonexistent SDKs.
41
- Candidate installation and `Croche.open` first-turn examples are in [ios.md](references/ios.md)
39
+ **Native Swift and Kotlin SDKs are published as 0.5.2**, including the shared
40
+ **project/agent `Croche.open` API**. Do not describe published SDKs as nonexistent.
41
+ Installation and `Croche.open` first-turn examples are in [ios.md](references/ios.md)
42
42
  and [android.md](references/android.md). For a native request, read the matching reference,
43
- prepare the integration and check exact 0.5.1 availability. TODO verify: package resolution,
44
- simulator/emulator first turn and release credential exclusion. Do not substitute the native
45
- 0.5.0 single-agent API or claim the candidate was run. Use git-ignored `.xcconfig` (iOS) or
43
+ prepare the integration and resolve exactly 0.5.2. Verify simulator/emulator first turn
44
+ and release credential exclusion in the target app. Do not substitute the native
45
+ 0.5.0 single-agent API or claim an example was run without running it. Use git-ignored `.xcconfig` (iOS) or
46
46
  `local.properties` (Android), wired only into Debug and excluded from Release at build time.
47
47
  If a native release is unavailable, report that blocker; offer TypeScript/React Native for a
48
48
  new hackathon app, but never rewrite an existing native app into a different stack unasked.
@@ -1,11 +1,11 @@
1
1
  # Android · Kotlin project API
2
2
 
3
- Use this guide for a native Android app, not the single-agent API. It targets **0.5.1** and
3
+ Use this guide for a native Android app, not the single-agent API. It targets **0.5.2** and
4
4
  `Croche.open` → `agent()` → `request()`.
5
5
 
6
- > TODO verify: 0.5.1 Maven availability, Gradle integration, emulator first turn and release
7
- > credential exclusion. These are candidate instructions, not a claim of a published or tested
8
- > native release. If the exact package is unavailable, report that blocker; do not downgrade the API.
6
+ > Version 0.5.2 is published on Maven. Verify Gradle integration, emulator first turn and
7
+ > release credential exclusion in the target app; package publication is not proof of those checks.
8
+ > If the exact package cannot be resolved, report that blocker; do not downgrade the API.
9
9
 
10
10
  ## Install from Maven
11
11
 
@@ -25,7 +25,7 @@ Add the exact dependency in `app/build.gradle.kts`:
25
25
 
26
26
  ```kotlin
27
27
  dependencies {
28
- implementation("ai.croche:croche-android:0.5.1")
28
+ implementation("ai.croche:croche-android:0.5.2")
29
29
  }
30
30
  ```
31
31
 
@@ -176,7 +176,7 @@ Choose a model using [Models](https://docs.croche.ai/models.md).
176
176
 
177
177
  ## Verify before shipping
178
178
 
179
- - Resolve exactly 0.5.1, build Debug and run on the selected emulator. Confirm a nonempty,
179
+ - Resolve exactly 0.5.2, build Debug and run on the selected emulator. Confirm a nonempty,
180
180
  completed reply; report the real error if it fails. In Studio, inspect **Monitoring → Logs**
181
181
  with the development filter. Never paste credentials or private app data into the report.
182
182
  - Inspect a clean Release APK/AAB without printing secrets: no debug key in classes/resources,
@@ -1,24 +1,24 @@
1
1
  # iOS · Swift project API
2
2
 
3
- Use this guide for a native iOS app, not the single-agent API. It targets **0.5.1** and
3
+ Use this guide for a native iOS app, not the single-agent API. It targets **0.5.2** and
4
4
  `Croche.open` → `agent()` → `request()`.
5
5
 
6
- > TODO verify: 0.5.1 package availability, Xcode integration, simulator first turn and release
7
- > credential exclusion. These are candidate instructions, not a claim of a published or tested
8
- > native release. If the exact package is unavailable, report that blocker; do not downgrade the API.
6
+ > Version 0.5.2 is published through SPM. Verify Xcode integration, simulator first turn and
7
+ > release credential exclusion in the target app; package publication is not proof of those checks.
8
+ > If the exact package cannot be resolved, report that blocker; do not downgrade the API.
9
9
 
10
10
  ## Install with Swift Package Manager
11
11
 
12
12
  Requires iOS 15+ and a Swift 6-capable Xcode. In Xcode, **File → Add Package Dependencies…**:
13
13
 
14
14
  - URL: `https://github.com/H1R-AI/croche-swift`
15
- - Dependency rule: **Exact Version**, **0.5.1**
15
+ - Dependency rule: **Exact Version**, **0.5.2**
16
16
  - Add the **CrocheRuntime** product to your app target; import `CrocheRuntime`.
17
17
 
18
18
  For a Swift package target, add the dependency and product to its existing manifest:
19
19
 
20
20
  ```swift
21
- .package(url: "https://github.com/H1R-AI/croche-swift", exact: "0.5.1")
21
+ .package(url: "https://github.com/H1R-AI/croche-swift", exact: "0.5.2")
22
22
  // In the app target's dependencies:
23
23
  .product(name: "CrocheRuntime", package: "croche-swift")
24
24
  ```
@@ -156,7 +156,7 @@ Choose a model using [Models](https://docs.croche.ai/models.md).
156
156
 
157
157
  ## Verify before shipping
158
158
 
159
- - Resolve exactly 0.5.1, build Debug and run on the selected simulator. Confirm a nonempty,
159
+ - Resolve exactly 0.5.2, build Debug and run on the selected simulator. Confirm a nonempty,
160
160
  completed reply; report the real error if it fails. In Studio, inspect **Monitoring → Logs**
161
161
  with the development filter. Never paste credentials or private app data into the report.
162
162
  - Inspect a clean Release archive without printing secrets: no debug key in the binary/plist,
@@ -1,7 +1,7 @@
1
1
  # React Native
2
2
 
3
3
  Requirements: React Native 0.76+ with New Architecture, iOS 15.1+ / Android API 26+.
4
- TODO verify matching public packages before installing; use the app's existing package manager.
4
+ Version 0.5.2 packages are published on npm; use the app's existing package manager.
5
5
  With permission:
6
6
 
7
7
  ```sh
@@ -28,4 +28,4 @@ agent without deleting the whole project directory or another user's data.
28
28
 
29
29
  Do not apply this recipe blindly to custom single-agent storage or an instance-specific case;
30
30
  confirm the installed SDK's scoped deletion API first. A busy store must be closed, not forcibly
31
- erased. Native 0.5.1 recovery requires its reviewed API; do not translate this snippet by guesswork.
31
+ erased. Native 0.5.2 recovery requires its reviewed API; do not translate this snippet by guesswork.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h1r-ai/croche",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1229,7 +1229,7 @@ function __wbg_get_imports() {
1229
1229
  const ret = Reflect.get(arg0, arg1);
1230
1230
  return ret;
1231
1231
  }, arguments) };
1232
- imports.wbg.__wbg_http_36f5cf45b54f9a8a = function(arg0, arg1, arg2, arg3) {
1232
+ imports.wbg.__wbg_http_18b3e005e7618f7a = function(arg0, arg1, arg2, arg3) {
1233
1233
  const ret = arg0.http(arg1, WasmSink.__wrap(arg2), WasmCancel.__wrap(arg3));
1234
1234
  return ret;
1235
1235
  };
@@ -1251,7 +1251,7 @@ function __wbg_get_imports() {
1251
1251
  const ret = arg0.length;
1252
1252
  return ret;
1253
1253
  };
1254
- imports.wbg.__wbg_lock_ffb73b1af2e996ca = function(arg0, arg1, arg2) {
1254
+ imports.wbg.__wbg_lock_904efb61fb548b1f = function(arg0, arg1, arg2) {
1255
1255
  const ret = arg0.lock(getStringFromWasm0(arg1, arg2));
1256
1256
  return ret;
1257
1257
  };
@@ -1285,7 +1285,7 @@ function __wbg_get_imports() {
1285
1285
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1286
1286
  return ret;
1287
1287
  };
1288
- imports.wbg.__wbg_nowMs_9aa4f6c3c6b72511 = function(arg0) {
1288
+ imports.wbg.__wbg_nowMs_14c2a07c06614f73 = function(arg0) {
1289
1289
  const ret = arg0.nowMs();
1290
1290
  return ret;
1291
1291
  };
@@ -1307,26 +1307,26 @@ function __wbg_get_imports() {
1307
1307
  const ret = arg0.queueMicrotask;
1308
1308
  return ret;
1309
1309
  };
1310
- imports.wbg.__wbg_random_df7fdc2e3d8ae9d8 = function(arg0, arg1) {
1310
+ imports.wbg.__wbg_random_679898e6bd0741ac = function(arg0, arg1) {
1311
1311
  const ret = arg1.random();
1312
1312
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1313
1313
  const len1 = WASM_VECTOR_LEN;
1314
1314
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1315
1315
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1316
1316
  };
1317
- imports.wbg.__wbg_readSecret_743a2ddb0168daf4 = function(arg0, arg1, arg2) {
1317
+ imports.wbg.__wbg_readSecret_f65ef4b8ddd21804 = function(arg0, arg1, arg2) {
1318
1318
  const ret = arg0.readSecret(getStringFromWasm0(arg1, arg2));
1319
1319
  return ret;
1320
1320
  };
1321
- imports.wbg.__wbg_read_132d87080ce45fd5 = function(arg0, arg1, arg2) {
1321
+ imports.wbg.__wbg_read_ce1fe505575c8a22 = function(arg0, arg1, arg2) {
1322
1322
  const ret = arg0.read(getStringFromWasm0(arg1, arg2));
1323
1323
  return ret;
1324
1324
  };
1325
- imports.wbg.__wbg_removeSecret_59aad54cf2b3f780 = function(arg0, arg1, arg2) {
1325
+ imports.wbg.__wbg_removeSecret_0fb2f98faf247a00 = function(arg0, arg1, arg2) {
1326
1326
  const ret = arg0.removeSecret(getStringFromWasm0(arg1, arg2));
1327
1327
  return ret;
1328
1328
  };
1329
- imports.wbg.__wbg_remove_09411f236af05924 = function(arg0, arg1, arg2) {
1329
+ imports.wbg.__wbg_remove_48ab8ef2bf887788 = function(arg0, arg1, arg2) {
1330
1330
  const ret = arg0.remove(getStringFromWasm0(arg1, arg2));
1331
1331
  return ret;
1332
1332
  };
@@ -1338,7 +1338,7 @@ function __wbg_get_imports() {
1338
1338
  const ret = Reflect.set(arg0, arg1, arg2);
1339
1339
  return ret;
1340
1340
  }, arguments) };
1341
- imports.wbg.__wbg_sleep_9b720f4c69a09fe3 = function(arg0, arg1) {
1341
+ imports.wbg.__wbg_sleep_6f4058b67459cecd = function(arg0, arg1) {
1342
1342
  const ret = arg0.sleep(arg1);
1343
1343
  return ret;
1344
1344
  };
@@ -1358,7 +1358,7 @@ function __wbg_get_imports() {
1358
1358
  const ret = typeof window === 'undefined' ? null : window;
1359
1359
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1360
1360
  };
1361
- imports.wbg.__wbg_storeIdentity_ca548355c80bd820 = function(arg0, arg1) {
1361
+ imports.wbg.__wbg_storeIdentity_77a87bc19ddddbc0 = function(arg0, arg1) {
1362
1362
  const ret = arg1.storeIdentity();
1363
1363
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1364
1364
  const len1 = WASM_VECTOR_LEN;
@@ -1377,7 +1377,7 @@ function __wbg_get_imports() {
1377
1377
  const ret = arg0.then(arg1);
1378
1378
  return ret;
1379
1379
  };
1380
- imports.wbg.__wbg_tool_e17f330fb8f92f1f = function(arg0, arg1, arg2, arg3) {
1380
+ imports.wbg.__wbg_tool_50b751b1e195c261 = function(arg0, arg1, arg2, arg3) {
1381
1381
  let deferred0_0;
1382
1382
  let deferred0_1;
1383
1383
  try {
@@ -1389,15 +1389,15 @@ function __wbg_get_imports() {
1389
1389
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1390
1390
  }
1391
1391
  };
1392
- imports.wbg.__wbg_unlock_9cd7d86380527acf = function(arg0, arg1, arg2) {
1392
+ imports.wbg.__wbg_unlock_dc85d9ec9f810f34 = function(arg0, arg1, arg2) {
1393
1393
  const ret = arg0.unlock(getStringFromWasm0(arg1, arg2));
1394
1394
  return ret;
1395
1395
  };
1396
- imports.wbg.__wbg_utcOffsetMinutes_e75cc28f0dd11b37 = function(arg0, arg1) {
1396
+ imports.wbg.__wbg_utcOffsetMinutes_5c6173afedde38dc = function(arg0, arg1) {
1397
1397
  const ret = arg0.utcOffsetMinutes(arg1);
1398
1398
  return ret;
1399
1399
  };
1400
- imports.wbg.__wbg_wake_d81543b22f9a2d0d = function(arg0, arg1) {
1400
+ imports.wbg.__wbg_wake_0ae632fff1f043e5 = function(arg0, arg1) {
1401
1401
  arg0.wake(arg1);
1402
1402
  };
1403
1403
  imports.wbg.__wbg_wasmproject_new = function(arg0) {
@@ -1436,7 +1436,7 @@ function __wbg_get_imports() {
1436
1436
  imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
1437
1437
  throw new Error(getStringFromWasm0(arg0, arg1));
1438
1438
  };
1439
- imports.wbg.__wbg_writeSecret_680e5076c2c6ce22 = function(arg0, arg1, arg2, arg3, arg4) {
1439
+ imports.wbg.__wbg_writeSecret_8ccdd2b3efc6f6f2 = function(arg0, arg1, arg2, arg3, arg4) {
1440
1440
  let deferred0_0;
1441
1441
  let deferred0_1;
1442
1442
  try {
@@ -1448,7 +1448,7 @@ function __wbg_get_imports() {
1448
1448
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1449
1449
  }
1450
1450
  };
1451
- imports.wbg.__wbg_write_41d57f1d7256755f = function(arg0, arg1, arg2, arg3, arg4) {
1451
+ imports.wbg.__wbg_write_2073bd38037ca3be = function(arg0, arg1, arg2, arg3, arg4) {
1452
1452
  let deferred0_0;
1453
1453
  let deferred0_1;
1454
1454
  try {
@@ -14,7 +14,7 @@ import {
14
14
 
15
15
  // Mirrors the protocol default; kept standalone so published SDK imports need no workspace.
16
16
  export const DEFAULT_MODEL = 'deepseek/deepseek-v4.1-flash';
17
- export const SDK_VERSION = '0.5.1';
17
+ export const SDK_VERSION = '0.5.2';
18
18
  const DEFAULT_MAINTENANCE_INTERVAL_MS = 60_000;
19
19
  /** What one round of background upkeep did. */
20
20
  export interface MaintenanceResult { ran: boolean; ok?: boolean; preempted?: boolean; pendingEvents?: number; error?: { code: string; message: string } }