@h1r-ai/croche 0.5.2 → 0.5.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/README.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Croche Runtime SDK
2
2
 
3
+ ## App temperature (0.5.3)
4
+
5
+ Set `temperature` in the app `config`: a finite number from 0 to 2. If the effective
6
+ config omits it, plain agent calls use a tuned default; `temperature: null` sends no temperature
7
+ and uses the provider's default. In an override, absence inherits; null explicitly
8
+ disables an inherited value. Structured calls with `responseFormat` always omit it,
9
+ including their shared fallback/retry body. Summary calls remain unchanged.
10
+
11
+ ```ts
12
+ const config = { instructions: 'Be helpful.', temperature: null };
13
+ // temperature: 0 is valid too. Omit the property for Core's tuned default.
14
+ ```
15
+
16
+ Local config selects its compatible grammar automatically. Studio/CLI documents
17
+ that contain `temperature` use schema 4; Cloud serves them only to SDK 0.5.3+ that
18
+ also advertise schema-4 support. Schema-2/3 configs retain their existing identities.
19
+ A structured-call HTTP 404 beginning `No endpoints found that can handle the requested
20
+ parameters`, or naming `Filter by Parameters` in its message or failed routing step, is
21
+ `structured_output_unsupported`. Data-policy refusals remain `provider_rejected`.
22
+ Neither code causes a paid retry or removes privacy constraints.
23
+
3
24
  Build an AI character or assistant by supplying instructions, application state,
4
25
  and JavaScript functions. The SDK runs the model/tool loop, persists conversations
5
26
  and causal results, enforces per-user allowances, and reports every call to Croche
@@ -12,7 +33,7 @@ and receives a report of every call in the background. **A Cloud outage does not
12
33
  The shared Rust Core owns conversations, command routing, receipts, spending and
13
34
  Cloud synchronization. This package embeds its WebAssembly build for browsers,
14
35
  Node, and WebViews. Native iOS (Swift) and Android (Kotlin) SDKs are published as
15
- 0.5.2, with the same `Croche.open` API.
36
+ 0.5.3, with the same `Croche.open` API.
16
37
  For React Native, install `@h1r-ai/croche-react-native` beside this package; it carries
17
38
  the native Core ([React Native](#react-native)).
18
39
  Your app can choose the model with `model` in the `config` passed to `Croche.open`; if it
@@ -26,6 +47,9 @@ From npm (an app; no Rust and no Croche checkout needed):
26
47
  npm install @h1r-ai/croche
27
48
  ```
28
49
 
50
+ Install from npm without a version suffix. Commit the project lockfile to record the
51
+ resolved versions for that app.
52
+
29
53
  To build the tarball yourself, from the Croche repository:
30
54
 
31
55
  ```sh
@@ -41,7 +65,7 @@ WASM Core, with no runtime npm dependencies. Consuming apps need no Rust compile
41
65
  or source checkout. Rust is needed only to rebuild the Core from source. A strict
42
66
  browser CSP must include `script-src 'self' 'wasm-unsafe-eval'`; JavaScript `eval`
43
67
  and `new Function` remain unnecessary.
44
- Version 0.5.2 is published on the public npm registry as `@h1r-ai/croche`.
68
+ Version 0.5.3 is published on the public npm registry as `@h1r-ai/croche`.
45
69
 
46
70
  ## Projects and agents
47
71
 
@@ -157,7 +157,7 @@ function _assertClass(instance, klass) {
157
157
  throw new Error(`expected instance of ${klass.name}`);
158
158
  }
159
159
  }
160
- function __wbg_adapter_10(arg0, arg1, arg2) {
160
+ function __wbg_adapter_6(arg0, arg1, arg2) {
161
161
  wasm.closure216_externref_shim(arg0, arg1, arg2);
162
162
  }
163
163
  function __wbg_adapter_135(arg0, arg1, arg2, arg3) {
@@ -1213,7 +1213,7 @@ function __wbg_get_imports() {
1213
1213
  return ret;
1214
1214
  }, arguments);
1215
1215
  };
1216
- imports.wbg.__wbg_http_18b3e005e7618f7a = function (arg0, arg1, arg2, arg3) {
1216
+ imports.wbg.__wbg_http_2af639ea7c47fa89 = function (arg0, arg1, arg2, arg3) {
1217
1217
  const ret = arg0.http(arg1, WasmSink.__wrap(arg2), WasmCancel.__wrap(arg3));
1218
1218
  return ret;
1219
1219
  };
@@ -1236,7 +1236,7 @@ function __wbg_get_imports() {
1236
1236
  const ret = arg0.length;
1237
1237
  return ret;
1238
1238
  };
1239
- imports.wbg.__wbg_lock_904efb61fb548b1f = function (arg0, arg1, arg2) {
1239
+ imports.wbg.__wbg_lock_dd2690b270c25bed = function (arg0, arg1, arg2) {
1240
1240
  const ret = arg0.lock(getStringFromWasm0(arg1, arg2));
1241
1241
  return ret;
1242
1242
  };
@@ -1272,7 +1272,7 @@ function __wbg_get_imports() {
1272
1272
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1273
1273
  return ret;
1274
1274
  };
1275
- imports.wbg.__wbg_nowMs_14c2a07c06614f73 = function (arg0) {
1275
+ imports.wbg.__wbg_nowMs_358fa26e354a964c = function (arg0) {
1276
1276
  const ret = arg0.nowMs();
1277
1277
  return ret;
1278
1278
  };
@@ -1294,26 +1294,26 @@ function __wbg_get_imports() {
1294
1294
  const ret = arg0.queueMicrotask;
1295
1295
  return ret;
1296
1296
  };
1297
- imports.wbg.__wbg_random_679898e6bd0741ac = function (arg0, arg1) {
1297
+ imports.wbg.__wbg_random_9d0f5651e42e694a = function (arg0, arg1) {
1298
1298
  const ret = arg1.random();
1299
1299
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1300
1300
  const len1 = WASM_VECTOR_LEN;
1301
1301
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1302
1302
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1303
1303
  };
1304
- imports.wbg.__wbg_readSecret_f65ef4b8ddd21804 = function (arg0, arg1, arg2) {
1304
+ imports.wbg.__wbg_readSecret_b1d5c388a03a92b4 = function (arg0, arg1, arg2) {
1305
1305
  const ret = arg0.readSecret(getStringFromWasm0(arg1, arg2));
1306
1306
  return ret;
1307
1307
  };
1308
- imports.wbg.__wbg_read_ce1fe505575c8a22 = function (arg0, arg1, arg2) {
1308
+ imports.wbg.__wbg_read_8068502494b93816 = function (arg0, arg1, arg2) {
1309
1309
  const ret = arg0.read(getStringFromWasm0(arg1, arg2));
1310
1310
  return ret;
1311
1311
  };
1312
- imports.wbg.__wbg_removeSecret_0fb2f98faf247a00 = function (arg0, arg1, arg2) {
1312
+ imports.wbg.__wbg_removeSecret_1cab0de66f9f1716 = function (arg0, arg1, arg2) {
1313
1313
  const ret = arg0.removeSecret(getStringFromWasm0(arg1, arg2));
1314
1314
  return ret;
1315
1315
  };
1316
- imports.wbg.__wbg_remove_48ab8ef2bf887788 = function (arg0, arg1, arg2) {
1316
+ imports.wbg.__wbg_remove_a5b71afcbc195bcc = function (arg0, arg1, arg2) {
1317
1317
  const ret = arg0.remove(getStringFromWasm0(arg1, arg2));
1318
1318
  return ret;
1319
1319
  };
@@ -1327,7 +1327,7 @@ function __wbg_get_imports() {
1327
1327
  return ret;
1328
1328
  }, arguments);
1329
1329
  };
1330
- imports.wbg.__wbg_sleep_6f4058b67459cecd = function (arg0, arg1) {
1330
+ imports.wbg.__wbg_sleep_8ade2ea00354679d = function (arg0, arg1) {
1331
1331
  const ret = arg0.sleep(arg1);
1332
1332
  return ret;
1333
1333
  };
@@ -1347,7 +1347,7 @@ function __wbg_get_imports() {
1347
1347
  const ret = typeof window === 'undefined' ? null : window;
1348
1348
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1349
1349
  };
1350
- imports.wbg.__wbg_storeIdentity_77a87bc19ddddbc0 = function (arg0, arg1) {
1350
+ imports.wbg.__wbg_storeIdentity_3fa0855af69906b4 = function (arg0, arg1) {
1351
1351
  const ret = arg1.storeIdentity();
1352
1352
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1353
1353
  const len1 = WASM_VECTOR_LEN;
@@ -1368,7 +1368,7 @@ function __wbg_get_imports() {
1368
1368
  const ret = arg0.then(arg1);
1369
1369
  return ret;
1370
1370
  };
1371
- imports.wbg.__wbg_tool_50b751b1e195c261 = function (arg0, arg1, arg2, arg3) {
1371
+ imports.wbg.__wbg_tool_d5419c25f721b310 = function (arg0, arg1, arg2, arg3) {
1372
1372
  let deferred0_0;
1373
1373
  let deferred0_1;
1374
1374
  try {
@@ -1381,15 +1381,15 @@ function __wbg_get_imports() {
1381
1381
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1382
1382
  }
1383
1383
  };
1384
- imports.wbg.__wbg_unlock_dc85d9ec9f810f34 = function (arg0, arg1, arg2) {
1384
+ imports.wbg.__wbg_unlock_c8e87e66ad631344 = function (arg0, arg1, arg2) {
1385
1385
  const ret = arg0.unlock(getStringFromWasm0(arg1, arg2));
1386
1386
  return ret;
1387
1387
  };
1388
- imports.wbg.__wbg_utcOffsetMinutes_5c6173afedde38dc = function (arg0, arg1) {
1388
+ imports.wbg.__wbg_utcOffsetMinutes_ecca33e83b96a5ba = function (arg0, arg1) {
1389
1389
  const ret = arg0.utcOffsetMinutes(arg1);
1390
1390
  return ret;
1391
1391
  };
1392
- imports.wbg.__wbg_wake_0ae632fff1f043e5 = function (arg0, arg1) {
1392
+ imports.wbg.__wbg_wake_259f7faf1f3d2cba = function (arg0, arg1) {
1393
1393
  arg0.wake(arg1);
1394
1394
  };
1395
1395
  imports.wbg.__wbg_wasmproject_new = function (arg0) {
@@ -1428,7 +1428,7 @@ function __wbg_get_imports() {
1428
1428
  imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
1429
1429
  throw new Error(getStringFromWasm0(arg0, arg1));
1430
1430
  };
1431
- imports.wbg.__wbg_writeSecret_8ccdd2b3efc6f6f2 = function (arg0, arg1, arg2, arg3, arg4) {
1431
+ imports.wbg.__wbg_writeSecret_9a516bf7cb787763 = function (arg0, arg1, arg2, arg3, arg4) {
1432
1432
  let deferred0_0;
1433
1433
  let deferred0_1;
1434
1434
  try {
@@ -1441,7 +1441,7 @@ function __wbg_get_imports() {
1441
1441
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1442
1442
  }
1443
1443
  };
1444
- imports.wbg.__wbg_write_2073bd38037ca3be = function (arg0, arg1, arg2, arg3, arg4) {
1444
+ imports.wbg.__wbg_write_a61538f7cb11ab8c = function (arg0, arg1, arg2, arg3, arg4) {
1445
1445
  let deferred0_0;
1446
1446
  let deferred0_1;
1447
1447
  try {
@@ -1461,7 +1461,7 @@ function __wbg_get_imports() {
1461
1461
  };
1462
1462
  imports.wbg.__wbindgen_cast_9bf690dfafdef3b5 = function (arg0, arg1) {
1463
1463
  // Cast intrinsic for `Closure(Closure { dtor_idx: 215, function: Function { arguments: [Externref], shim_idx: 216, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1464
- const ret = makeMutClosure(arg0, arg1, 215, __wbg_adapter_10);
1464
+ const ret = makeMutClosure(arg0, arg1, 215, __wbg_adapter_6);
1465
1465
  return ret;
1466
1466
  };
1467
1467
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
@@ -3,7 +3,7 @@ import type { CoreRuntimeOptions, RuntimeTool, RuntimeToolMetadata } from './com
3
3
  import type { OpenOptions as ProjectOpenOptions } from './project-types.js';
4
4
  import { type BudgetAdjustment, type BudgetSnapshot, type DeferredWrite, type DisplayMessage, type RuntimeDebugObserverOptions, type RuntimeStatus, type SendInput, type SendOptions, type TurnResult, type RuntimeMemoryApi, type RuntimeWiki, type UserWikiResult, type WikiDocument } from './types.js';
5
5
  export declare const DEFAULT_MODEL = "deepseek/deepseek-v4.1-flash";
6
- export declare const SDK_VERSION = "0.5.2";
6
+ export declare const SDK_VERSION = "0.5.3";
7
7
  /** What one round of background upkeep did. */
8
8
  export interface MaintenanceResult {
9
9
  ran: boolean;
@@ -4,7 +4,7 @@ import { browserCodec, isToolResult, preparable, prepareImage } from './images.j
4
4
  import { CrocheError, } from './types.js';
5
5
  // Mirrors the protocol default; kept standalone so published SDK imports need no workspace.
6
6
  export const DEFAULT_MODEL = 'deepseek/deepseek-v4.1-flash';
7
- export const SDK_VERSION = '0.5.2';
7
+ export const SDK_VERSION = '0.5.3';
8
8
  const DEFAULT_MAINTENANCE_INTERVAL_MS = 60_000;
9
9
  const localOwners = new WeakMap();
10
10
  /** The longest delay a JS timer holds (2^31 - 1 ms, about 24.8 days); a longer one fires at once.