@holokai/neuron-sdk 0.1.1 → 0.2.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/README.md +80 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -778,3 +778,83 @@ Heartbeats aren't reaching the gateway, so the reaper hasn't reclaimed them. Che
|
|
|
778
778
|
### Auth 401 on every request
|
|
779
779
|
|
|
780
780
|
The `auth` callback isn't returning a valid token. If using a refresh flow, ensure the callback fetches a fresh token on each call (the SDK caches nothing — it's your callback's job).
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
784
|
+
## Releasing (maintainers)
|
|
785
|
+
|
|
786
|
+
`@holokai/neuron-sdk` is published to public npm. Releases are cut from a
|
|
787
|
+
monorepo-scoped git tag, and CI does the publish — there is no npm token on
|
|
788
|
+
anyone's laptop and none stored in the repo.
|
|
789
|
+
|
|
790
|
+
### Cut a release
|
|
791
|
+
|
|
792
|
+
1. **Bump the version** in `packages/neuron-sdk/package.json`
|
|
793
|
+
(`version`). Follow semver:
|
|
794
|
+
- Pilot phase, we are in **`0.x`**. Because the protocol is still absorbing
|
|
795
|
+
pilot-developer feedback, a **breaking** change bumps the **minor**
|
|
796
|
+
(`0.2.0` → `0.3.0`); a backward-compatible change or fix bumps the
|
|
797
|
+
**patch** (`0.2.0` → `0.2.1`). This is the standard `0.x` convention and
|
|
798
|
+
is what buys us room to break things on feedback without a major bump.
|
|
799
|
+
- Hold **`1.0.0`** until the public API has survived pilot feedback and we're
|
|
800
|
+
ready to commit to "breaking changes bump the major." Jumping to `1.0.0`
|
|
801
|
+
is a stability promise, not a milestone — don't spend it early.
|
|
802
|
+
2. **Commit** the bump (reference the Linear ticket) and merge to `main`.
|
|
803
|
+
3. **Tag and push** from `main`:
|
|
804
|
+
```sh
|
|
805
|
+
git tag neuron-sdk-v0.2.0 # must equal the package.json version
|
|
806
|
+
git push origin neuron-sdk-v0.2.0
|
|
807
|
+
```
|
|
808
|
+
The tag is prefixed `neuron-sdk-v` (the Python SDK uses
|
|
809
|
+
`neuron-sdk-python-v`) so the two never collide.
|
|
810
|
+
4. **`publish-neuron-sdk.yml`** fires on the tag: it asserts the tag version
|
|
811
|
+
matches `package.json`, runs the `prepublish` gate (`build` + `test`), and
|
|
812
|
+
publishes to npm. The `npm` GitHub Environment gates the publish behind a
|
|
813
|
+
**required-reviewer approval** — approve the run under Actions, and on success
|
|
814
|
+
the new version is live at
|
|
815
|
+
[`@holokai/neuron-sdk`](https://www.npmjs.com/package/@holokai/neuron-sdk).
|
|
816
|
+
|
|
817
|
+
> No `--provenance`: bigbrain is a private repo, so npm's provenance
|
|
818
|
+
> attestation (a public transparency-log link back to the source) adds little
|
|
819
|
+
> and has historically errored from private repos. Trusted-publishing auth is
|
|
820
|
+
> unaffected. Add the flag back if bigbrain ever goes public.
|
|
821
|
+
|
|
822
|
+
The tag→`package.json` assertion means a mismatched tag fails **before** the
|
|
823
|
+
registry is touched — npm refuses to re-upload an existing version, so there's
|
|
824
|
+
no half-published state to clean up.
|
|
825
|
+
|
|
826
|
+
### Publish auth: npm Trusted Publishing (one-time setup)
|
|
827
|
+
|
|
828
|
+
CI authenticates to npm via **OIDC trusted publishing** — GitHub Actions
|
|
829
|
+
exchanges a short-lived OIDC token for publish rights, so no long-lived
|
|
830
|
+
`NPM_TOKEN` exists to leak. This mirrors the Python SDK's PyPI trusted
|
|
831
|
+
publishing. It requires two one-time setups:
|
|
832
|
+
|
|
833
|
+
1. **On npmjs.com** (a package admin, once): open the
|
|
834
|
+
[`@holokai/neuron-sdk`](https://www.npmjs.com/package/@holokai/neuron-sdk)
|
|
835
|
+
package → **Settings → Trusted Publisher → GitHub Actions**, and register:
|
|
836
|
+
- Organization / repository: `holok-ai/bigbrain`
|
|
837
|
+
- Workflow filename: `publish-neuron-sdk.yml`
|
|
838
|
+
- Environment: `npm`
|
|
839
|
+
2. **In this repo** (once): create the **`npm`** GitHub Environment
|
|
840
|
+
(Settings → Environments). Add reviewers/branch protection here if you want a
|
|
841
|
+
manual approval gate before each publish.
|
|
842
|
+
|
|
843
|
+
Until the trusted publisher is registered, the `npm publish` step fails with an
|
|
844
|
+
auth error — that's the expected "not set up yet" signal, not a code bug.
|
|
845
|
+
|
|
846
|
+
### Manual publish (fallback / first bootstrap)
|
|
847
|
+
|
|
848
|
+
The tag flow is the norm. If you ever need to publish by hand (e.g. to bootstrap
|
|
849
|
+
the very first version before trusted publishing is configured):
|
|
850
|
+
|
|
851
|
+
```sh
|
|
852
|
+
cd packages/neuron-sdk
|
|
853
|
+
pnpm run publish:npm:dry # inspect the tarball + files list
|
|
854
|
+
pnpm run publish:npm # runs the prepublishOnly build+test gate, then publishes
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
This uses your own `npm login` credentials and skips the CI approval gate —
|
|
858
|
+
prefer the tag flow for anything a developer will consume.
|
|
859
|
+
|
|
860
|
+
<!-- ci: force full build on the self-hosted runner (HOL-2028 verify); safe to remove -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holokai/neuron-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SDK for building Holokai neurons — connect to a BigBrain gateway over HTTP+SSE or Electron IPC and execute capability-typed tasks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Holokai",
|