@cognisphere-sh/cognisphere-harness 0.12.0 → 0.14.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +77 -11
  2. package/LICENSE +21 -0
  3. package/dist-web/assets/{file-editor-CQSmlsy_.js → file-editor-CqGYKmT3.js} +1 -1
  4. package/dist-web/assets/{index-1Hg12QW0.js → index-CDE-jsH8.js} +3 -3
  5. package/dist-web/index.html +1 -1
  6. package/home-template/config.example +0 -6
  7. package/home-template/docs/base-harness/README.md +11 -4
  8. package/home-template/scripts/build.sh +0 -5
  9. package/home-template/scripts/lib/remote-bootstrap.sh +2 -6
  10. package/home-template/scripts/setup-server.sh +7 -39
  11. package/package.json +9 -6
  12. package/skills/cognisphere-upgrade/SKILL.md +1 -1
  13. package/skills/create-plugin/SKILL.md +2 -2
  14. package/src/agents/base-agent/bootstrap/bootstrap.sh +2 -18
  15. package/src/agents/base-agent/extensions/context-meta.ts +4 -1
  16. package/src/agents/base-agent/system_prompts/0-base_prompt.md +3 -0
  17. package/src/api/agents.ts +3 -13
  18. package/src/api/credentials.ts +0 -15
  19. package/src/api/models.ts +2 -8
  20. package/src/api/secrets.ts +3 -3
  21. package/src/cli/index.ts +1 -1
  22. package/src/cli/init.ts +0 -12
  23. package/src/core/agent-manager.ts +12 -47
  24. package/src/core/config.ts +6 -0
  25. package/src/core/main.ts +10 -2
  26. package/src/core/model-access.ts +55 -0
  27. package/src/core/models-catalog.ts +72 -40
  28. package/src/core/models-store.ts +3 -4
  29. package/src/core/oauth-logins.ts +7 -3
  30. package/src/core/pi-delivery-receipts.ts +69 -0
  31. package/src/core/pi-models-sync.ts +2 -2
  32. package/src/core/queue.ts +7 -25
  33. package/src/core/rpc.ts +55 -49
  34. package/src/core/runner.ts +141 -131
  35. package/src/core/secrets.ts +2 -3
  36. package/src/core/types.ts +1 -1
  37. package/src/plugins/artifacts/index.ts +1 -1
  38. package/src/agents/base-agent/extensions/harness-bridge.ts +0 -63
package/CHANGELOG.md CHANGED
@@ -13,11 +13,77 @@ whose entries follow the form:
13
13
 
14
14
  The skill collects every section in `(current, target]`, proposes a diff against
15
15
  the harness directory, and applies it after user approval. See
16
- [`docs/distribution-and-deployment.md`](docs/distribution-and-deployment.md) §9.
16
+ [CLI upgrades](docs/low-level/cli.md#upgrades).
17
17
 
18
18
  The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
19
19
  project adheres to [Semantic Versioning](https://semver.org/).
20
20
 
21
+ ## [0.14.0]
22
+
23
+ ### Changed
24
+
25
+ - **Pi upgraded to 1.0.0** (`@earendil-works/pi-ai` and
26
+ `@earendil-works/pi-coding-agent`, pinned exactly; from 0.99.2). RPC mode,
27
+ the extension API and the session format are unchanged, and every curated
28
+ model ID still resolves. The Models page's Anthropic sign-in now asks for
29
+ browser or copy-code login; copy-code works when the browser is on another
30
+ machine.
31
+
32
+ ## [0.13.0]
33
+
34
+ ### Breaking changes
35
+
36
+ - **Published to npmjs.org; no install token.** `@cognisphere-sh/*` packages
37
+ now come from the public npm registry instead of GitHub Packages. Delete the
38
+ `@cognisphere-sh:registry=https://npm.pkg.github.com` line from the home's
39
+ `.npmrc` (delete the file if nothing else is in it), or installs keep asking
40
+ GitHub Packages, which has no 0.13.0. `COGNISPHERE_NPM_TOKEN` and the
41
+ `npm.pkg.github.com/:_authToken` line in `~/.npmrc` are no longer used and
42
+ can be removed. [affects: .npmrc]
43
+
44
+ - **Each harness has its own Pi config folder.** The server sets
45
+ `PI_CODING_AGENT_DIR` to `harness/.secrets/pi/`, so Pi's `auth.json`,
46
+ `models.json` and `settings.json` no longer live in the run user's
47
+ `~/.pi/agent`. Subscription sign-ins (Claude Pro/Max, Codex, ChatGPT) must
48
+ be connected again once from the Models page; they are not copied, because
49
+ two copies of a rotating refresh token sign each other out. Hand-written
50
+ settings in `~/.pi/agent` no longer apply to the harness. Pi also starts
51
+ with `--no-approve`, so an agent folder's `.pi/` files are never loaded.
52
+ [affects: .secrets/pi/]
53
+
54
+ ### Changed
55
+
56
+ - Deploy scripts no longer need a GitHub token: `setup-server.sh` and
57
+ `build.sh` drop the `read:packages` checks and the `~/.npmrc` token line,
58
+ `remote-bootstrap.sh` logs `gh` in only to clone the repo, the systemd units
59
+ drop `COGNISPHERE_NPM_TOKEN`, and `config.example` drops the key
60
+ (refreshed wholesale on upgrade).
61
+ - `init` no longer writes a `.npmrc` into new homes.
62
+ - **Pi upgraded to 0.99.2** (`@earendil-works/pi-ai` and
63
+ `@earendil-works/pi-coding-agent`, pinned exactly). The runner now spawns
64
+ the `pi` bundled with the harness package instead of a global `pi` on
65
+ `PATH`, so the binary always matches the pinned version. Requires Node
66
+ `>=22.19.0` (as Pi already did).
67
+ - `bootstrap.sh` no longer installs a global `pi` or reads `PI_VERSION`.
68
+ Existing agents' copies still do; that step is now unused and can be
69
+ dropped when reseeding. [affects: agents/*/bootstrap/bootstrap.sh]
70
+ - A batch now ends when Pi reports `agent_settled` instead of `agent_end`, so
71
+ Pi's own retries (up to 3, backoff capped at 60 s), context-overflow
72
+ recovery and late follow-ups run inside the same batch. Queue retries
73
+ still apply after that.
74
+ - Delivery receipts are saved in the session file as `cognisphere.delivery`
75
+ custom entries (outside the model's context) and reported over RPC as
76
+ `entry_appended`. Inputs an extension `handled` are marked done.
77
+ - `context-meta` extension: the per-call `Model:` / `ContextUsage:` lines now
78
+ reach the model. They were dropped because the last message before each
79
+ call is the extension's own checkpoint, which the hook skipped. Reseed the
80
+ base extension. [affects: agents/*/extensions/context-meta.ts]
81
+ - Models page: Sign in with ChatGPT on the OpenAI provider; OpenAI Codex is
82
+ now labelled "(legacy)"; curated model lists refreshed to models that exist
83
+ in Pi 0.99.2 (Claude Opus/Sonnet 5.5, GPT-6.x, Gemini 3.x, Grok 4.7, …).
84
+ - `home-template/docs/base-harness/README.md`: bootstrap no longer pins `pi`;
85
+ new sign-in providers (refreshed wholesale on upgrade).
86
+
21
87
  ## [0.12.0]
22
88
 
23
89
  ### Breaking changes
@@ -46,8 +112,8 @@ project adheres to [Semantic Versioning](https://semver.org/).
46
112
 
47
113
  ### Changed
48
114
 
49
- - `docs/api.md` §1/§3, `docs/server.md` §3 and
50
- `docs/distribution-and-deployment.md` document the app bearer,
115
+ - `docs/low-level/api.md` §1/§3, `docs/low-level/agents.md#persistent-layout` and
116
+ `docs/low-level/cli.md` document the app bearer,
51
117
  `.secrets/app-secret`, and the new `app/.env.local` keys. The upgrade
52
118
  skill now refreshes `app/auth-routes/` and drift-checks the home's copies.
53
119
 
@@ -94,7 +160,7 @@ project adheres to [Semantic Versioning](https://semver.org/).
94
160
  60 s ack timeout then failed the batch repeatedly. `PiRpcClient` now
95
161
  suspends pending frame timeouts on `compaction_start` and re-arms them on
96
162
  `compaction_end`, and logs both at info with `reason` and
97
- `tokensBefore` / `estimatedTokensAfter` (`docs/server.md` §4.7).
163
+ `tokensBefore` / `estimatedTokensAfter` (`docs/low-level/core.md#execution-and-example`).
98
164
 
99
165
  ## [0.11.0]
100
166
 
@@ -382,7 +448,7 @@ project adheres to [Semantic Versioning](https://semver.org/).
382
448
  procedure moved into a plugin-owned skill: `plugin-gws.md` 204 → 50 lines,
383
449
  `plugin-telegram.md` 75 → 48. A fragment costs every turn of every thread; a
384
450
  skill costs one description line until an agent needs it.
385
- - `docs/server.md`, `docs/base-harness/skills.md` and the `create-plugin` skill
451
+ - `docs/low-level/agents.md`, `docs/base-harness/skills.md` and the `create-plugin` skill
386
452
  (v1.3.0) document the 50-line budget and what belongs in a fragment
387
453
  (identity, event shape, always-on rules) versus a skill. Both scaffold trees
388
454
  are refreshed wholesale by the upgrade skill.
@@ -450,9 +516,9 @@ project adheres to [Semantic Versioning](https://semver.org/).
450
516
  - **`create-skill` 1.2.0**, **`publish-harness` 1.1.0** — descriptions gained
451
517
  situational triggers; `publish-harness` also covers the new-plugin case of
452
518
  the shipped-artifact rule and deploy-time wiring notes.
453
- - Docs: `docs/api.md` §10 (artifact routes + header contract),
454
- `docs/server.md` (plugin list, plugin-shipped skills),
455
- `docs/distribution-and-deployment.md` §5 (deploy-time wiring),
519
+ - Docs: `docs/low-level/api.md` §10 (artifact routes + header contract),
520
+ `docs/low-level/plugins.md` (plugin list, plugin-shipped skills),
521
+ `docs/low-level/cli.md#server-deployment` (deploy-time wiring),
456
522
  `docs/base-harness/README.md`, `app/README.md`.
457
523
 
458
524
  ### Breaking changes
@@ -548,7 +614,7 @@ project adheres to [Semantic Versioning](https://semver.org/).
548
614
  the situation/task/result summary.
549
615
  - Base-agent seeds updated to match: new `knowledge/index.md` and
550
616
  `knowledge/memory.md`, refreshed `workspace/index.md`.
551
- - Docs updated: `docs/server.md` §3 on-disk tree and the shipped
617
+ - Docs updated: `docs/low-level/agents.md#persistent-layout` on-disk tree and the shipped
552
618
  `docs/base-harness/README.md` agent-anatomy list.
553
619
 
554
620
  ### Breaking changes
@@ -764,7 +830,7 @@ invisible to the agent. Per agent dir:
764
830
  Models page until an entry is added.
765
831
  - **System-prompt file ownership is now an explicit contract**, taught in
766
832
  the base prompt (new "System prompts" section) and documented in
767
- `docs/server.md` §3 and the shipped `docs/base-harness/README.md`:
833
+ `docs/low-level/agents.md#persistent-layout` and the shipped `docs/base-harness/README.md`:
768
834
  `0-*` files are harness-owned (replaced by the seed on upgrade;
769
835
  `0.1-agent-directory.md` excepted), `plugin-<id>.md` is plugin-owned
770
836
  (reseeded on every agent start — edits are clobbered), and `1-agent.md`
@@ -1945,7 +2011,7 @@ sync to adopt the feature; old copies keep working untouched.)*
1945
2011
  in the monorepo, the Vite dev server (HMR) together (`--port`/`--web-port`/
1946
2012
  `--no-web`); `serve` takes `--port` and `--headless` (mount no web UI —
1947
2013
  backend-only deploy, via `COGNISPHERE_HEADLESS`). See
1948
- [`docs/distribution-and-deployment.md`](docs/distribution-and-deployment.md) §10.
2014
+ [CLI reference](docs/low-level/cli.md#cli).
1949
2015
  - **Publishable package.** `@cognisphere-sh/cognisphere-harness` ships a `bin`, a
1950
2016
  `files` allowlist, `publishConfig` (GitHub Packages), and a `prepack` step that
1951
2017
  bundles the built web UI (`dist-web/`) and the root `CHANGELOG.md` into the
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CogniSphere 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.
@@ -1,4 +1,4 @@
1
- import{j as h}from"./radix-DHW5y7jr.js";import{r as G}from"./react-BIlrhC09.js";import{c as mt,L as kO,E as y,a as BO,C as ie,s as F,t as l,b as M,i as ft,d as ht,e as St,f as yO,g as QO,h as La,j as uO,k as $O,l as J,m as ne,n as T,o as se,p as q,q as U,r as gt,N as le,I as oe,P as Aa,u as xO,v as I,T as Ma,w as Pt,x as L,y as Xt,z as Ia,A as Na,B as Ba,D as Da,F as rO,G as Fa,H as Ja,J as Ha,K as Ka,M as Or,O as Ze,Q as er,R as tr,S as ar,U as rr,V as ir,W as nr,X as sr,Y as lr,Z as or,_ as Te,$ as Qr,a0 as ke,a1 as dr,a2 as cr,a3 as pr,a4 as ur,a5 as $r,a6 as ye,a7 as xe,a8 as mr,a9 as fr,aa as hr,ab as Sr}from"./index-1Hg12QW0.js";import"./markdown-sumxz7Eq.js";/**
1
+ import{j as h}from"./radix-DHW5y7jr.js";import{r as G}from"./react-BIlrhC09.js";import{c as mt,L as kO,E as y,a as BO,C as ie,s as F,t as l,b as M,i as ft,d as ht,e as St,f as yO,g as QO,h as La,j as uO,k as $O,l as J,m as ne,n as T,o as se,p as q,q as U,r as gt,N as le,I as oe,P as Aa,u as xO,v as I,T as Ma,w as Pt,x as L,y as Xt,z as Ia,A as Na,B as Ba,D as Da,F as rO,G as Fa,H as Ja,J as Ha,K as Ka,M as Or,O as Ze,Q as er,R as tr,S as ar,U as rr,V as ir,W as nr,X as sr,Y as lr,Z as or,_ as Te,$ as Qr,a0 as ke,a1 as dr,a2 as cr,a3 as pr,a4 as ur,a5 as $r,a6 as ye,a7 as xe,a8 as mr,a9 as fr,aa as hr,ab as Sr}from"./index-CDE-jsH8.js";import"./markdown-sumxz7Eq.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.