openmates 0.29.0-alpha.0 → 0.29.0-alpha.10

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +21 -0
  3. package/README.md +25 -0
  4. package/dist/{chunk-5OCI636P.js → chunk-67U3XD2B.js} +10 -3
  5. package/dist/chunk-6AR2CP7K.js +1118 -0
  6. package/dist/chunk-AEUQO4PH.js +109 -0
  7. package/dist/chunk-BYYH2YTS.js +51 -0
  8. package/dist/{chunk-TOZDGDWJ.js → chunk-CZNP4FS5.js} +1764 -17809
  9. package/dist/chunk-QVCMMBD4.js +16940 -0
  10. package/dist/cli.d.ts +106 -1
  11. package/dist/cli.js +6 -4
  12. package/dist/{cli-fJnu1wIs.d.ts → client-CCQdkE5S.d.ts} +6 -107
  13. package/dist/index.d.ts +24 -10502
  14. package/dist/index.js +70 -26
  15. package/dist/sdk-entry.d.ts +20 -0
  16. package/dist/sdk-entry.js +216 -0
  17. package/dist/sdk-session-v1-entry.d.ts +118 -0
  18. package/dist/sdk-session-v1-entry.js +296 -0
  19. package/dist/sdkApiKeyRust-BW-c6ZkZ.d.ts +1056 -0
  20. package/dist/sdkTaskOrder-CJPmq9yh.d.ts +10540 -0
  21. package/dist/{tasksCli-NXIDMIL6.js → tasksCli-V2INK4CH.js} +3 -1
  22. package/fixtures/privacy-runtime/linux-arm64/libggml-base.so +0 -0
  23. package/fixtures/privacy-runtime/linux-arm64/libggml-base.so.0 +0 -0
  24. package/fixtures/privacy-runtime/linux-arm64/libggml-base.so.0.15.1 +0 -0
  25. package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so +0 -0
  26. package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so.0 +0 -0
  27. package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so.0.15.1 +0 -0
  28. package/fixtures/privacy-runtime/linux-arm64/libggml.so +0 -0
  29. package/fixtures/privacy-runtime/linux-arm64/libggml.so.0 +0 -0
  30. package/fixtures/privacy-runtime/linux-arm64/libggml.so.0.15.1 +0 -0
  31. package/fixtures/privacy-runtime/linux-arm64/manifest.json +9 -9
  32. package/package.json +29 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog — `openmates` npm package (CLI and SDK)
2
+
3
+ Only SDK-relevant compatibility notes are recorded here. Release versions follow
4
+ the product line (`0.29.x` alpha prereleases from `dev`, stable from `main`).
5
+
6
+ ## 0.29.x
7
+
8
+ ### Deprecated
9
+
10
+ - **Implicit CLI login in the root `OpenMatesClient`.** Constructing
11
+ `OpenMatesClient` (or calling `OpenMatesClient.load()`) from the root
12
+ `openmates` export without a `session` still loads the stored CLI login, but now
13
+ emits one `DeprecationWarning` per process with code `OPENMATES_SDK_CLI_SESSION`.
14
+ SDK credentials must be explicit. Migrate by passing `session` explicitly,
15
+ setting `loadStoredSession: false`, or using `SessionClient` from
16
+ `openmates/sdk/v1` (`loginPassword()` / `importSession()`).
17
+ A future minor release (planned 0.30.0) will require explicit credentials for
18
+ the root export; the `openmates` command line is unaffected.
19
+
20
+ ### Added
21
+
22
+ - `openmates/sdk` and `openmates/sdk/v1` entrypoints backed by the shared Rust
23
+ core. Privacy helpers, task ordering and embed-version reconstruction use the
24
+ portable WebAssembly build; `SessionClient` uses the Node-API build for now.
25
+ A missing artifact raises `native_binding_unavailable` (no fallback).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenMates contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -375,6 +375,31 @@ Use `chats.send()` for anonymous AI chat with automatic routing; `apps.ai.ask()`
375
375
  requires an account. With an API key, use `saveToAccount: true` when you want the
376
376
  chat saved to the OpenMates account.
377
377
 
378
+ ### Deprecated: implicit CLI login in the root `OpenMatesClient`
379
+
380
+ `new OpenMatesClient()` / `OpenMatesClient.load()` from the root `openmates`
381
+ export still load the stored CLI login when no `session` is passed, but this is
382
+ deprecated: SDK credentials must be explicit. It emits one `DeprecationWarning`
383
+ with code `OPENMATES_SDK_CLI_SESSION` per process. Pass `session` explicitly,
384
+ set `loadStoredSession: false`, or use `SessionClient` from `openmates/sdk/v1`.
385
+ A later minor release will require explicit credentials (see `CHANGELOG.md`).
386
+ The `openmates` command line is unaffected.
387
+
388
+ ### Native session SDK (preview)
389
+
390
+ `openmates/sdk/v1` exports `SessionClient`, `RustApiKeyClient` and related
391
+ types. Every operation runs in the shared OpenMates Rust core through a native
392
+ Node-API module loaded from `native/<platform>-<arch>.node`; the SDK never
393
+ launches the CLI and never reads CLI login state. Credentials are explicit:
394
+ log in with `loginPassword()` or import a caller-owned session. If the native
395
+ module for your platform is missing or incompatible, construction throws
396
+ `SessionClientError` with code `native_binding_unavailable` (no TypeScript
397
+ fallback). The SDK is moving to one portable WebAssembly build of the core
398
+ (`wasm/openmates_sdk_bg.wasm`, for Node, Deno, Bun, edge and browsers): privacy
399
+ helpers, task ordering and embed-version reconstruction already use it. Prebuilt
400
+ artifacts are not yet published; from a source checkout run
401
+ `npm run build:sdk:wasm` and `npm run build:sdk:native`.
402
+
378
403
  ## Versioning
379
404
 
380
405
  OpenMates shows the short product line, for example `v0.29`, in the web app.
@@ -740,7 +740,8 @@ var DEFAULT_STANDALONE_PREFIX = "TASK";
740
740
  var PRIORITY_LEVELS = ["none", "low", "medium", "high", "urgent"];
741
741
  var LABEL_INDEX_INFO = "openmates-task-label-index-v1";
742
742
  var EXTERNAL_CHAT_INDEX_INFO = "openmates-task-external-chat-index-v1";
743
- var EXTERNAL_CHAT_PROVIDERS = ["codex"];
743
+ var EXTERNAL_CHAT_PROVIDERS = ["codex", "claude"];
744
+ var CLAUDE_SESSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
744
745
  var BLOCKED_REASON_CODES = [
745
746
  "needs_user_input",
746
747
  "waiting_for_approval",
@@ -773,10 +774,15 @@ function parseExternalChatRef(value) {
773
774
  const provider = value.slice(0, separator).trim().toLowerCase();
774
775
  const id = value.slice(separator + 1).trim();
775
776
  if (separator <= 0 || !id) throw new Error("--external-chat requires provider:id.");
776
- if (!EXTERNAL_CHAT_PROVIDERS.includes(provider)) throw new Error(`Unsupported external chat provider '${provider}'. Use codex.`);
777
- return { provider, id };
777
+ return assertExternalChatRef({ provider, id });
778
+ }
779
+ function assertExternalChatRef(ref) {
780
+ if (!EXTERNAL_CHAT_PROVIDERS.includes(ref.provider)) throw new Error(`Unsupported external chat provider '${ref.provider}'. Use codex or claude.`);
781
+ if (ref.provider === "claude" && !CLAUDE_SESSION_ID.test(ref.id)) throw new Error("Claude Code external chat ids must be session UUIDs (CLAUDE_CODE_SESSION_ID).");
782
+ return ref;
778
783
  }
779
784
  function externalChatLookupHash(masterKey, context) {
785
+ assertExternalChatRef(context);
780
786
  const indexKey = Buffer.from(hkdfSync2("sha256", Buffer.from(masterKey), Buffer.alloc(0), EXTERNAL_CHAT_INDEX_INFO, 32));
781
787
  return createHmac3("sha256", indexKey).update(`${context.provider}\0${context.id}`).digest("hex");
782
788
  }
@@ -1345,6 +1351,7 @@ export {
1345
1351
  taskEditLookupScope,
1346
1352
  workflowProjectionDeleteGuidance,
1347
1353
  parseExternalChatRef,
1354
+ assertExternalChatRef,
1348
1355
  externalChatLookupHash,
1349
1356
  normalizeBlockedReasonCode,
1350
1357
  normalizeTaskStatus,