Commit graph

44 commits

Author SHA1 Message Date
Renovate Bot
a9cfb5aafa Update dependency @types/node to v24.13.3
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m44s
2026-07-19 11:30:45 +00:00
111335d7ff
fix: correct package entry points and publish contents
Five packaging defects, all pre-existing:

1. dist/esm/index.js held ESM syntax while the package is not
   "type": "module", so Node classified it as CommonJS. It failed
   outright on Node 18 ("Unexpected token 'export'") and only worked on
   Node >= 22 because Node re-parses after guessing the module type,
   paying that cost on every import. Bundles now carry explicit
   extensions: .mjs for ES output, .cjs/.js for CommonJS. The browser
   build gained a real CommonJS output too — the exports map previously
   pointed the browser "require" condition at an ES module.
   The exports map now also leads with "types" and ends with a "default"
   fallback for resolvers matching neither "node" nor "browser".

2. files: ["native"] published the local build directory: a 94.6 kB
   Linux-x64 .node binary, a 148 kB object file and generated Makefiles.
   node-gyp-build checks build/Release before prebuilds, so every
   consumer on every platform would have found this machine's binary,
   skipped compiling, and failed to load it. It fails safe (native/
   index.js catches and returns null), but the addon could never work
   for anyone else. Narrowed to the four source files.

3. binding.gyp resolves node-addon-api at build time, but nothing
   declared it: it was a devDependency of the root, absent from
   native/package.json. The build only succeeded here because a dev
   install populates the root node_modules. Declared as a dependency of
   the native package, where it is actually needed.

4. No clean step, so stale output shipped — the tarball carried both
   dist/types/core/** and a dist/types/src/** tree left over from before
   rootDir was set. build now runs clean first.

5. test:browser ran `karma start` with no karma.conf.js anywhere in the
   repo, and tests/browser is an empty directory. Removed the script and
   the karma devDependency rather than leave a script that cannot run.

Verified: CommonJS require and ESM import both resolve on Node 18.19.1
and 24.18.0; TypeScript resolves types under both bundler and node16;
npm pack now produces 35 files / 103.8 kB with no build artefacts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 12:39:09 +02:00
eafab3d9ac
feat: align timeout, error types and docs with the Python SDK
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m43s
Completes the parity work (step 4).

Request timeout now defaults to 900 s, matching Python, instead of 60 s.
Encrypted inference cannot stream, so an entire completion arrives in one
response; a long generation on a busy backend legitimately takes minutes
and was timing out here while succeeding in the Python client.

Error types now distinguish malformed data from integrity failures.
Python raises ValueError for a bad package, a non-200 or unparseable
/pki/public_key, and plaintext that will not parse, reserving
SecurityError for crypto failures. This port wrapped nearly all of it in
SecurityError — so a server sending malformed JSON was reported as an
authentication failure, pointing debugging in exactly the wrong
direction. Malformed data is now a plain Error (the JS equivalent of
ValueError), carried past the deliberately opaque catch-all by a symbol
marker rather than a new exported class. Genuine crypto failures still
report a single vague message so they cannot serve as a decryption
oracle.

Also adds the missing guard Python has: decrypting without a private key
now says so, instead of failing later and being reported as an integrity
failure.

doc/attestation.md ports the Python attestation guide to the JS API, and
documents the two deliberate divergences: no verify_ssl escape hatch, and
jose injection instead of a runtime dynamic import.

Version 0.1.0 -> 0.3.0 to match the Python client's feature level, now
that the two are at parity.

Not ported: Python's warning when secure_memory=True but the SecureMemory
module is unavailable. There is no JS equivalent — zeroing is always
available, and the weaker case (mlock unavailable) is already reported
honestly by getProtectionInfo().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 12:17:52 +02:00
2495f1e6e8
fix: repair npm install and the rollup build
Some checks failed
NYX Security Scan / nyx-scan (pull_request) Failing after 5m58s
Three independent breakages, all present on main before this branch:

1. `npm ci` always exited non-zero. The root package.json carried
   "install": "node-gyp-build", but binding.gyp lives in native/, so the
   script ran in a directory with nothing to build:

     gyp: binding.gyp not found (cwd: <repo root>)

   native/package.json already declares that same install script in the
   right place, alongside its binding.gyp and "gypfile": true, so the
   root copy was a duplicate in the wrong package. Removing it also
   clears the now-inaccurate hasInstallScript flag from the lockfile.
   `npm ci` exits 0 again; the addon still builds from native/.

2. `npm run build` failed at the first step. @rollup/plugin-typescript
   requires tslib as a peer, and nothing depended on it directly — it was
   only present transitively as an optional dev dep, so a clean install
   could omit it entirely. Declared explicitly.

3. rollup.config.js used ESM syntax while package.json has no
   "type": "module", so Node parsed it as CommonJS and threw
   "Cannot use import statement outside a module". Node 24 recovers by
   reparsing (with a warning); Node 18 fails outright. Renamed to
   rollup.config.mjs, which is unambiguous on both. Setting
   "type": "module" instead would have broken jest.config.js, which is
   CommonJS.

Verified on Node 18.19.1 and Node 24.18.0: npm ci exits 0, npm run build
produces all three bundles plus declarations, and 76/76 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 11:10:36 +02:00
b055df5b87 Merge pull request 'Update dependency node-gyp to v13' (#28) from renovate/node-gyp-13.x into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/28
2026-06-26 14:58:54 +02:00
opencode-agent[bot]
d3aa0e264c Node.js min bumped to 22.22.2
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m11s
Co-authored-by: alpha-nerd <alpha-nerd@users.noreply.bitfreedom.net>
2026-06-26 12:36:50 +00:00
f8f655f5e7 Merge pull request 'Update dependency @types/node to v24.13.2' (#27) from renovate/node-24.x-lockfile into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/27
2026-06-26 14:18:12 +02:00
Renovate Bot
66b7a89cf9 Update dependency rollup to v4.62.2
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m25s
2026-06-19 15:30:17 +00:00
Renovate Bot
21caa0ebab Update dependency @types/node to v24.13.2
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m24s
2026-06-13 12:28:30 +00:00
Renovate Bot
934e12bb36 Update dependency rollup to v4.62.0
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m27s
2026-06-13 09:28:25 +00:00
Renovate Bot
88f189bced Update dependency node-gyp to v13
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m3s
2026-06-12 13:28:30 +00:00
84800d4a1b Merge pull request 'Update dependency node-gyp to v12.4.0' (#26) from renovate/node-gyp-12.x-lockfile into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/26
2026-06-10 10:25:03 +02:00
88361a42bc Merge pull request 'Update dependency @types/node to v24.13.1' (#25) from renovate/node-24.x-lockfile into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/25
2026-06-10 10:24:30 +02:00
Renovate Bot
4ebf9d9cce Update dependency node-gyp to v12.4.0
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 5m44s
2026-06-10 00:28:42 +00:00
Renovate Bot
ceaf0ac151 Update dependency @types/node to v24.13.1
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m43s
2026-06-05 22:43:41 +00:00
Renovate Bot
f9b692bc8b Update dependency rollup to v4.61.1
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m50s
2026-06-04 05:28:58 +00:00
Renovate Bot
58100da0c1 Update dependency rollup to v4.61.0
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m32s
2026-06-01 05:48:52 +00:00
Renovate Bot
14077b39bd Update dependency @rollup/plugin-commonjs to v29.0.3
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m45s
2026-05-29 13:55:53 +00:00
Renovate Bot
3646d17b8c Update dependency node-addon-api to v8.8.0
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m34s
2026-05-22 14:30:06 +00:00
Renovate Bot
25e14d6fff Update dependency ts-jest to v29.4.11
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m38s
2026-05-21 13:56:16 +00:00
Renovate Bot
e347f641f5 Update dependency rollup to v4.60.4
All checks were successful
NYX Security Scan / nyx-scan (pull_request) Successful in 6m43s
2026-05-14 18:00:49 +00:00
Renovate Bot
ced31e2713 chore(deps): update dependency @types/node to v24.12.4 2026-05-11 22:35:18 +00:00
Renovate Bot
11a204d2b1 chore(deps): update jest monorepo to v30 2026-05-10 11:00:35 +00:00
Renovate Bot
03928e4757 chore(deps): update dependency @rollup/plugin-node-resolve to v16 2026-05-10 10:51:23 +00:00
87458da079 Merge pull request 'chore(deps): update dependency @rollup/plugin-commonjs to v29' (#9) from renovate/rollup-plugin-commonjs-29.x into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/9
2026-05-10 12:51:04 +02:00
7d435babdf Merge pull request 'chore(deps): update dependency @rollup/plugin-typescript to v12' (#12) from renovate/rollup-plugin-typescript-12.x into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/12
2026-05-10 12:50:37 +02:00
3ea0594ddd Merge pull request 'chore(deps): update dependency @types/node to v24' (#13) from renovate/node-24.x into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/13
2026-05-10 12:49:35 +02:00
f07fa7633a Merge pull request 'chore(deps): update dependency node-gyp to v12' (#14) from renovate/node-gyp-12.x into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/14
2026-05-10 12:48:38 +02:00
Renovate Bot
4aa7c5cebf chore(deps): update dependency rollup to v4.60.3 2026-05-10 10:46:56 +00:00
Renovate Bot
95e3504034 chore(deps): update dependency typescript to v6 2026-05-10 10:45:29 +00:00
Renovate Bot
d9e9c82071 chore(deps): update dependency node-gyp to v12 2026-05-10 10:45:22 +00:00
Renovate Bot
04105d8200 chore(deps): update dependency @types/node to v24 2026-05-10 10:45:15 +00:00
Renovate Bot
eded84dc08 chore(deps): update dependency @rollup/plugin-typescript to v12 2026-05-10 10:45:08 +00:00
Renovate Bot
48eb1a6b73 chore(deps): update dependency @rollup/plugin-commonjs to v29 2026-05-10 10:44:53 +00:00
9f49fd85c3 Merge pull request 'build(deps-dev): bump flatted from 3.3.4 to 3.4.2' (#1) from dependabot/npm_and_yarn/flatted-3.4.2 into main
Reviewed-on: https://bitfreedom.net/code/code/nomyo-ai/nomyo-js/pulls/1
2026-05-10 11:45:25 +02:00
e6bc717a63 Merge pull request 'chore(deps): update dependency @types/node to v20.19.40' (#5) from renovate/node-20.x-lockfile into main 2026-05-10 11:42:37 +02:00
456970d50b Merge pull request 'chore(deps): update dependency node-addon-api to v8.7.0' (#7) from renovate/node-addon-api-8.x-lockfile into main 2026-05-10 11:42:32 +02:00
7d16a9ecb0 Merge pull request 'chore(deps): update dependency ts-jest to v29.4.9' (#6) from renovate/ts-jest-29.x-lockfile into main 2026-05-10 11:42:31 +02:00
Renovate Bot
c0f701d0f2 chore(deps): update dependency node-addon-api to v8.7.0 2026-05-10 09:27:05 +00:00
Renovate Bot
e775c19207 chore(deps): update dependency ts-jest to v29.4.9 2026-05-10 09:26:50 +00:00
Renovate Bot
60f1c97ebe chore(deps): update dependency @types/node to v20.19.40 2026-05-10 09:26:38 +00:00
dependabot[bot]
9aeecf985c
build(deps-dev): bump picomatch from 2.3.1 to 2.3.2
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-26 12:03:43 +00:00
dependabot[bot]
85f0c7e6d8
build(deps-dev): bump flatted from 3.3.4 to 3.4.2
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.4 to 3.4.2.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.3.4...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 12:19:17 +00:00
c7601b2270 fix:
- AES GCM protocol mismatch
- better, granular error handling
- UUID now uses crypto.randomUUID()
- added native mlock addon to improve security
- ZeroBuffer uses explicit_bzero now
- fixed imports

feat:
-  added unit tests
2026-03-04 11:30:44 +01:00