@cairnkeep/cli 2.24.0 → 2.25.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/CHANGELOG.md +24 -0
- package/docs/README.md +4 -0
- package/docs/agents.md +18 -0
- package/docs/design/team-mode.md +17 -9
- package/docs/harness-compatibility.md +17 -0
- package/docs/learning/CURRICULUM-MAP.md +3 -1
- package/docs/learning/FEATURE-GUIDE.md +29 -3
- package/docs/learning/README.md +5 -3
- package/docs/learning/lessons/L00-why-cairnkeep.md +1 -1
- package/docs/learning/lessons/L01-safe-trial.md +3 -3
- package/docs/learning/lessons/L02-installation.md +2 -2
- package/docs/learning/lessons/L03-first-project.md +1 -1
- package/docs/learning/lessons/L19-validated-skill-improvement.md +1 -1
- package/docs/learning/lessons/L20-mcp-tool-profiles.md +1 -1
- package/docs/learning/lessons/L21-context-packs.md +1 -1
- package/docs/learning/lessons/L22-native-windows.md +2 -2
- package/docs/learning/lessons/L23-guided-setup.md +1 -1
- package/docs/learning/lessons/L24-okf-exchange.md +1 -1
- package/docs/learning/lessons/L25-playbooks.md +1 -1
- package/docs/learning/lessons/L26-context-intelligence.md +1 -1
- package/docs/learning/lessons/L27-ecosystem-evidence.md +1 -1
- package/docs/learning/lessons/L28-security-assurance.md +2 -2
- package/docs/learning/lessons/L29-team-continuity.md +95 -0
- package/docs/learning/tracks/operator.md +2 -0
- package/docs/learning/video-scripts/V29-team-continuity.md +66 -0
- package/docs/operating.md +17 -3
- package/docs/privacy-and-data-flow.md +24 -5
- package/docs/security-assurance.md +28 -0
- package/docs/storage.md +18 -0
- package/docs/team-pilot.md +132 -0
- package/docs/team.md +234 -0
- package/examples/eval/bundled-fake.json +1 -1
- package/mcp-memory-server/dist/team-cli.js +218 -0
- package/mcp-memory-server/dist/team-http.js +193 -0
- package/mcp-memory-server/dist/team-mcp.js +82 -0
- package/mcp-memory-server/dist/team-store.js +663 -0
- package/package.json +1 -1
- package/scripts/cairn-cli.mjs +2 -0
- package/scripts/completion.sh +23 -3
- package/scripts/lib/team-retention.mjs +29 -0
- package/scripts/test-ci-sharding.sh +4 -0
- package/scripts/test-completion.sh +8 -0
- package/scripts/test-package-install.sh +9 -0
- package/scripts/test-team-docs.sh +52 -0
- package/scripts/test-team-pilot.mjs +59 -0
- package/scripts/uninstall.sh +13 -0
- package/scripts/verify-team-retention.mjs +3 -0
- package/scripts/windows-platform.mjs +6 -2
|
@@ -71,12 +71,12 @@ timestamp, and the supplied actor/session labels. It excludes prompt content,
|
|
|
71
71
|
file content, patches, command output, secrets, endpoint values, and environment
|
|
72
72
|
snapshots. Changed paths influence a decision but are not copied into receipts.
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Local playbook actor identity remains an unauthenticated assertion even when a
|
|
75
75
|
harness supplies it. Do not use receipts for employee monitoring,
|
|
76
|
-
authorization, non-repudiation, or team access decisions. The
|
|
77
|
-
[team
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
authorization, non-repudiation, or team access decisions. The separate
|
|
77
|
+
[team preview](team.md) uses verified credentials and server-side memberships,
|
|
78
|
+
never these labels. The broader [team-mode contract](design/team-mode.md)
|
|
79
|
+
retains independent production-admission, isolation and retention requirements.
|
|
80
80
|
|
|
81
81
|
## Data at rest
|
|
82
82
|
|
|
@@ -701,3 +701,22 @@ skill readable; Cairnkeep never copies it into a harness or executes it.
|
|
|
701
701
|
|
|
702
702
|
Pack digests and proposal digests protect integrity and stale-state detection;
|
|
703
703
|
they do not authenticate a publisher or make extracted statements true.
|
|
704
|
+
|
|
705
|
+
## Team preview flow and isolation
|
|
706
|
+
|
|
707
|
+
The default-off [team preview](team.md) reads no personal memory automatically.
|
|
708
|
+
Only explicitly supplied, inspected text becomes an immutable project proposal;
|
|
709
|
+
only review by a different human credential publishes a shared revision.
|
|
710
|
+
Workload tokens cannot review. The agent's local stdio bridge sends explicit
|
|
711
|
+
organization/project requests and bearer authorization to the separately
|
|
712
|
+
configured JSON API. Search uses substring matching, never an embedding/model
|
|
713
|
+
provider. There is no background ingestion or sync.
|
|
714
|
+
|
|
715
|
+
Membership and credentials, not cwd or local playbook actor labels, select
|
|
716
|
+
authority. Server checks happen on every operation. Profile/capability
|
|
717
|
+
restrictions only narrow MCP tools. Shared values, source digests and identities
|
|
718
|
+
are stored privately; audit includes operation/outcome/digests without text or
|
|
719
|
+
tokens. Backups include shared proposals and memberships and need separate
|
|
720
|
+
encryption and access control. No unapproved personal content is discoverable.
|
|
721
|
+
A hash confirmation does not establish human consent or content truth.
|
|
722
|
+
Review and production admission remain separate operator responsibilities.
|
|
@@ -222,3 +222,31 @@ fallback; its response cap is 8 MiB. OpenViking retains its 1 MiB cap, explicit
|
|
|
222
222
|
consents and HTTPS-or-loopback rule. Both reject malformed UTF-8 and suppress
|
|
223
223
|
network/stream diagnostics. Health probes use only `127.0.0.1` with a validated
|
|
224
224
|
port and the existing private token resolver, and never follow redirects.
|
|
225
|
+
|
|
226
|
+
## Team preview assurance boundary
|
|
227
|
+
|
|
228
|
+
The [team preview](team.md) adds a separate authenticated organization/project
|
|
229
|
+
boundary; it does not retrofit ACLs onto the existing personal HTTP server.
|
|
230
|
+
Expiring/revocable credentials, independent project roles, workload-review
|
|
231
|
+
denial, self-review denial, policy/base conflicts, immutable proposals and
|
|
232
|
+
transactional publication/audit have maintained synthetic controls.
|
|
233
|
+
The local MCP bridge has no review/admin tools, no scope fallback and a
|
|
234
|
+
restrictive profile/capability intersection. The loopback JSON API rejects
|
|
235
|
+
browser origins and unexpected Host headers, bounds requests/responses and
|
|
236
|
+
rechecks authority after body receipt.
|
|
237
|
+
|
|
238
|
+
`smoke-team*.mjs` additionally covers concurrent/cross-process state changes,
|
|
239
|
+
audit failure rollback, oversized chunked bodies, restore integrity, revoked
|
|
240
|
+
restored credentials, CLI exit and uninstall retention. Built-in SQLite needs
|
|
241
|
+
Node 22.13+ only when opted in. Linux fixture execution is not native Windows
|
|
242
|
+
evidence, and same-account processes remain trusted. Hash-linked local audit
|
|
243
|
+
cannot detect an OS owner rewriting the entire chain; backups are unencrypted.
|
|
244
|
+
Capacity exhaustion fails closed rather than removing audit history.
|
|
245
|
+
|
|
246
|
+
The governed internal separate-context review and approved isolated native
|
|
247
|
+
pilot are complete; this is not an external professional assessment or a study
|
|
248
|
+
with two independent human participants. The released preview remains default
|
|
249
|
+
off. Independent production security review, platform/package/container
|
|
250
|
+
verification and a deployment-specific approved real-data pilot remain
|
|
251
|
+
mandatory production gates. Inline review alone is not independent review.
|
|
252
|
+
The service is token-first JSON HTTP plus local stdio MCP, not OAuth remote MCP.
|
package/docs/storage.md
CHANGED
|
@@ -602,3 +602,21 @@ store; it does not turn the proposal directory into a second memory authority.
|
|
|
602
602
|
Context-usage receipts are strict links in the existing work-evidence store.
|
|
603
603
|
They inherit work-evidence inspection, retention, and doctor behavior; there is
|
|
604
604
|
no separate prompt or retrieved-content log.
|
|
605
|
+
|
|
606
|
+
## Separate team store (opt-in 2.25 preview)
|
|
607
|
+
|
|
608
|
+
[Team continuity](team.md) keeps organization/project records in a separate
|
|
609
|
+
`team.db` under `CAIRN_TEAM_BASE_DIR` (default `~/.cairnkeep/team`). Built-in
|
|
610
|
+
SQLite transactions serialize state and audit across processes; personal
|
|
611
|
+
AgentFS stores and layouts are unchanged. No migration or automatic copying
|
|
612
|
+
of personal memory occurs. The OS owner is trusted; stored text is unencrypted.
|
|
613
|
+
|
|
614
|
+
Use `cairn team backup`, not a live directory copy, for a verified consistent
|
|
615
|
+
snapshot. Restore publishes only a new directory, requires its exact digest,
|
|
616
|
+
and revokes all copied credentials. Doctor verifies references, object hashes,
|
|
617
|
+
audit links and temporary remnants without choosing a recovery state.
|
|
618
|
+
Manual logical key deletion retains audit metadata and does not erase free
|
|
619
|
+
pages, WAL or backup copies. Uninstall retains team data and refuses purge
|
|
620
|
+
targets overlapping its configured directory. Independently selected
|
|
621
|
+
`--data` stores must be outside purge targets or also configured through
|
|
622
|
+
`CAIRN_TEAM_BASE_DIR`. Keep encrypted backups separately protected.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# An isolated team-continuity pilot
|
|
2
|
+
|
|
3
|
+
This guide is for the opt-in Cairnkeep 2.25.0 team preview. It is **not production admission**.
|
|
4
|
+
Obtain explicit pilot approval first. Keep automated rehearsal, human review,
|
|
5
|
+
native-harness observations and release authorization as separate evidence.
|
|
6
|
+
Use the exact matching source checkout for the source controls below, not an
|
|
7
|
+
unverified global command or a production overlay. The released CLI includes
|
|
8
|
+
the optional team commands, but installation does not authorize this pilot.
|
|
9
|
+
|
|
10
|
+
The pilot runs beside existing personal memory: a new private store, expiring
|
|
11
|
+
credentials, a separate loopback port and additional isolated client profiles.
|
|
12
|
+
It never imports a personal store or replaces an existing MCP registration.
|
|
13
|
+
Use synthetic project decisions, not employer, personal or customer data.
|
|
14
|
+
|
|
15
|
+
## 1. Prepare a private lab
|
|
16
|
+
|
|
17
|
+
Build the matching checkout. The following setup uses Bash on Linux/macOS; on
|
|
18
|
+
native Windows use the equivalent explicit CLI commands from [Team continuity](team.md).
|
|
19
|
+
Choose an absolute, **nonexistent** lab directory outside source checkouts,
|
|
20
|
+
personal memory, backup stores and other private stores. Do not reuse an old lab.
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
TEAM_CAIRN=/absolute/path/to/feature-checkout/bin/cairn
|
|
24
|
+
TEAM_PILOT_DIR=/absolute/private/new-team-pilot
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Run this setup block in that shell. The operator chooses these two paths; the
|
|
28
|
+
block refuses an existing lab directory. Credential values are never printed.
|
|
29
|
+
|
|
30
|
+
<!-- team-pilot-setup:start -->
|
|
31
|
+
```sh
|
|
32
|
+
set -e
|
|
33
|
+
: "${TEAM_CAIRN:?Set the absolute feature-checkout command}"
|
|
34
|
+
: "${TEAM_PILOT_DIR:?Set a new absolute private lab directory}"
|
|
35
|
+
case "$TEAM_CAIRN:$TEAM_PILOT_DIR" in /*:/*) ;; *) exit 1 ;; esac
|
|
36
|
+
mkdir -m 0700 "$TEAM_PILOT_DIR"
|
|
37
|
+
mkdir -m 0700 "$TEAM_PILOT_DIR/author-workspace" "$TEAM_PILOT_DIR/reader-workspace"
|
|
38
|
+
TEAM_PILOT_EXPIRY=$(node -p 'new Date(Date.now() + 2 * 3600000).toISOString()')
|
|
39
|
+
team_pilot_admin() {
|
|
40
|
+
(cd "$TEAM_PILOT_DIR" && env -i PATH="$PATH" CAIRN_TEAM=1 \
|
|
41
|
+
"$TEAM_CAIRN" team "$@" --data "$TEAM_PILOT_DIR/store")
|
|
42
|
+
}
|
|
43
|
+
team_pilot_admin init --organization trial-org
|
|
44
|
+
team_pilot_admin project create trial-project
|
|
45
|
+
team_pilot_admin project create unrelated-project
|
|
46
|
+
team_pilot_admin member set author --project trial-project --roles reader,contributor
|
|
47
|
+
team_pilot_admin member set reader --project trial-project --roles reader
|
|
48
|
+
team_pilot_admin member set reviewer --project trial-project --roles reader,reviewer,auditor
|
|
49
|
+
team_pilot_admin credential issue author --class workload --expires-at "$TEAM_PILOT_EXPIRY" --output "$TEAM_PILOT_DIR/author.token"
|
|
50
|
+
team_pilot_admin credential issue reader --class workload --expires-at "$TEAM_PILOT_EXPIRY" --output "$TEAM_PILOT_DIR/reader.token"
|
|
51
|
+
team_pilot_admin credential issue reviewer --class human --expires-at "$TEAM_PILOT_EXPIRY" --output "$TEAM_PILOT_DIR/reviewer.token"
|
|
52
|
+
team_pilot_admin doctor
|
|
53
|
+
```
|
|
54
|
+
<!-- team-pilot-setup:end -->
|
|
55
|
+
|
|
56
|
+
If setup fails, stop and inspect only that generated lab; do not rerun against a
|
|
57
|
+
partially initialized directory. Keep the reviewer token outside both agent
|
|
58
|
+
workspaces. File-only credentials are private, but processes under the same OS
|
|
59
|
+
owner are not mutually isolated: use separate accounts or machines if that is
|
|
60
|
+
part of the pilot's threat model. Do not claim role tests prove OS isolation.
|
|
61
|
+
|
|
62
|
+
## 2. Start only the disposable service
|
|
63
|
+
|
|
64
|
+
In a dedicated terminal, choose a separate unused port and run the exact feature
|
|
65
|
+
command from the lab directory. Do not kill another listener to claim its port.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
cd "$TEAM_PILOT_DIR"
|
|
69
|
+
env -i PATH="$PATH" CAIRN_TEAM=1 CAIRN_TEAM_HTTP=1 \
|
|
70
|
+
"$TEAM_CAIRN" team serve --data "$TEAM_PILOT_DIR/store" --port 17955
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Keep it in the foreground and use Ctrl+C for shutdown. It binds loopback only.
|
|
74
|
+
A second machine needs an authenticated SSH tunnel, not a public API listener.
|
|
75
|
+
Keep the production service, personal stores and existing MCP definitions intact.
|
|
76
|
+
|
|
77
|
+
## 3. Use two additional client profiles
|
|
78
|
+
|
|
79
|
+
Configure only a new `cairn-team-memory` stdio server in disposable profiles for
|
|
80
|
+
the chosen harnesses. Do not edit their user-wide settings, trust lists or tokens.
|
|
81
|
+
Use the feature command with arguments `team mcp --project-root WORKSPACE` and
|
|
82
|
+
an explicit private workspace path for each client. Both clients receive:
|
|
83
|
+
|
|
84
|
+
- `CAIRN_TEAM=1`, `CAIRN_TEAM_ORGANIZATION=trial-org`;
|
|
85
|
+
- `CAIRN_TEAM_URL=http://127.0.0.1:17955` (or the explicit loopback tunnel);
|
|
86
|
+
- `CAIRN_TEAM_TOKEN_FILE` pointing to **only** their own workload credential.
|
|
87
|
+
|
|
88
|
+
Each tool call must explicitly name project `trial-project`; the working folder
|
|
89
|
+
and client name do not select or grant project access.
|
|
90
|
+
|
|
91
|
+
The author uses `author.token`; the other client uses `reader.token` and
|
|
92
|
+
`CAIRN_TEAM_MCP_TOOL_PROFILE=read-only`. Never give either model `reviewer.token`,
|
|
93
|
+
an administrative command, production credentials or an inherited cloud-provider
|
|
94
|
+
key for this lab. Use a provider explicitly authorized for the pilot. Starting
|
|
95
|
+
a server or downloading a model is not implicit subscription authorization.
|
|
96
|
+
|
|
97
|
+
## 4. Exercise the actual review boundary
|
|
98
|
+
|
|
99
|
+
Have the author propose one exact synthetic project decision, with explicit
|
|
100
|
+
mutation consent. Record the immutable proposal ID, digest, selected bytes and
|
|
101
|
+
provenance privately. The reader must not see it before publication.
|
|
102
|
+
|
|
103
|
+
In the operator-only terminal, use `proposal-show` with the human reviewer
|
|
104
|
+
credential to inspect the **actual stored proposal**, not an agent's paraphrase.
|
|
105
|
+
Only after the reviewer explicitly approves those bytes, call `review` with
|
|
106
|
+
the exact proposal digest as described in [the reference](team.md#harness-connection).
|
|
107
|
+
Do not put a human token into an agent profile or script automatic human review.
|
|
108
|
+
Checking a hash does not establish human consent or verify a person's identity.
|
|
109
|
+
|
|
110
|
+
Restart the reader harness in a different empty working folder, retaining the
|
|
111
|
+
explicit authorized team project. Verify it reads identical approved text and
|
|
112
|
+
provenance. Capture actual tool-use evidence, not a model's claim of recall.
|
|
113
|
+
Exercise an unrelated-project denial, a read-only proposal denial, membership
|
|
114
|
+
removal on a connected client, and restore into a fresh store with old tokens
|
|
115
|
+
refused. Do not change production roles or activate the restored lab implicitly.
|
|
116
|
+
|
|
117
|
+
## 5. Record, stop and decide
|
|
118
|
+
|
|
119
|
+
Keep a private, payload-free summary of source revision, client versions,
|
|
120
|
+
projects/roles, consent method and outcomes. Label unattended SDK controls as
|
|
121
|
+
automated rehearsal; do not turn their pass result into a human-pilot claim.
|
|
122
|
+
Record missing steps and failures, including model/tool-use failures.
|
|
123
|
+
|
|
124
|
+
Stop the foreground lab server. Verify its listener and clients have exited.
|
|
125
|
+
Revoke lab credentials if retaining the store; retain or remove only the exact
|
|
126
|
+
generated lab after preserving agreed evidence. Never purge a real memory base.
|
|
127
|
+
Confirm production configuration hashes are unchanged. No team setting is
|
|
128
|
+
enabled globally, so stopping the lab requires no production rollback.
|
|
129
|
+
|
|
130
|
+
Independent security review, platform checks, pilot approval/results and release
|
|
131
|
+
authorization remain distinct gates. Completing this guide does not itself
|
|
132
|
+
authorize a merge, release, production enrollment or fleet deployment.
|
package/docs/team.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Team continuity preview
|
|
2
|
+
|
|
3
|
+
Status: opt-in experimental preview included in **Cairnkeep 2.25.0**;
|
|
4
|
+
**not general production admission**. Existing local memory and trusted
|
|
5
|
+
shared-token HTTP are unchanged. Installing or upgrading does not enable team
|
|
6
|
+
sharing, enroll users or start a team service.
|
|
7
|
+
|
|
8
|
+
The governed internal security review and a separately approved isolated
|
|
9
|
+
native-harness pilot are complete. That pilot used selected synthetic context,
|
|
10
|
+
one actual human reviewer and two workload identities; it was not a study with
|
|
11
|
+
two independent human participants or an external professional assessment.
|
|
12
|
+
Independent production review and deployment-specific acceptance remain
|
|
13
|
+
necessary before using this preview with real organization data.
|
|
14
|
+
|
|
15
|
+
Team memory is a separate store of explicitly selected, reviewed project
|
|
16
|
+
context. It never scans or uploads personal stores, prompts, transcripts or
|
|
17
|
+
repositories. The same project IDs work across harnesses and working folders.
|
|
18
|
+
Sharing changes visibility: inspect and redact the selected text first.
|
|
19
|
+
|
|
20
|
+
For a trial alongside unchanged personal memory, use the
|
|
21
|
+
[isolated pilot guide](team-pilot.md). It keeps stores, credentials, ports and
|
|
22
|
+
client profiles separate and distinguishes actual human review from rehearsal.
|
|
23
|
+
|
|
24
|
+
## Trust boundary
|
|
25
|
+
|
|
26
|
+
The initial service has one organization, server-owned subjects, explicit
|
|
27
|
+
project memberships and expiring/revocable human or workload credentials.
|
|
28
|
+
Caller-supplied actor labels do not grant authority. Each operation rechecks
|
|
29
|
+
credentials and membership inside its transaction.
|
|
30
|
+
|
|
31
|
+
Roles are independent: reader retrieves approved memory; contributor submits
|
|
32
|
+
and inspects their proposals; reviewer inspects and approves/rejects proposals;
|
|
33
|
+
auditor reads scoped audit metadata. Maintainer does **not** imply review or
|
|
34
|
+
read authority. Membership administration currently trusts the local OS owner,
|
|
35
|
+
not a remote maintainer token. Workload credentials cannot review, even when
|
|
36
|
+
their subject has a reviewer role. Self-review is always refused.
|
|
37
|
+
|
|
38
|
+
Proposals retain exact selected bytes, source digest, base revision, expiry and
|
|
39
|
+
policy digest. Review confirms the proposal digest; stale policy/base produces a
|
|
40
|
+
conflict, never automatic merging. Publication, head update and audit append are
|
|
41
|
+
atomic. Audit stores identities, digests and outcomes—not memory text or tokens.
|
|
42
|
+
Hash links detect corruption; they do not prevent a trusted storage owner from
|
|
43
|
+
rewriting the database. Digests establish integrity, not publisher authenticity.
|
|
44
|
+
|
|
45
|
+
## Enable explicitly
|
|
46
|
+
|
|
47
|
+
Use Node 22.13 or newer for the optional built-in SQLite store. Node 24/26 are
|
|
48
|
+
also supported. The core's Node engine floor remains 22; the optional team
|
|
49
|
+
store needs the later built-in SQLite API. Use current maintained patch releases.
|
|
50
|
+
No new runtime dependency or personal-store migration is needed.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
export CAIRN_TEAM=1
|
|
54
|
+
cairn team init --organization demo-org --data /absolute/private/team
|
|
55
|
+
cairn team project create alpha --data /absolute/private/team
|
|
56
|
+
cairn team member set alice --project alpha --roles reader,contributor --data /absolute/private/team
|
|
57
|
+
cairn team member set bob --project alpha --roles reader,reviewer --data /absolute/private/team
|
|
58
|
+
cairn team credential issue alice --class workload --expires-at 2026-12-01T00:00:00Z --output /absolute/private/alice.token --data /absolute/private/team
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Choose a future expiry appropriate to the deployment (maximum one year), not
|
|
62
|
+
the example date blindly. Credential output is exclusive and private; the raw
|
|
63
|
+
token is never printed. Keep tokens outside source/harness directories.
|
|
64
|
+
Organization state defaults to `~/.cairnkeep/team`, overridden by
|
|
65
|
+
`CAIRN_TEAM_BASE_DIR` or `--data`. This path convention is not required.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
export CAIRN_TEAM_HTTP=1
|
|
69
|
+
cairn team serve --data /absolute/private/team --port 7955
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The server binds loopback only. Access remotely through an encrypted,
|
|
73
|
+
authenticated tunnel; direct unauthenticated/public exposure is unsupported.
|
|
74
|
+
The API refuses browser origins, unexpected Host headers, oversized/invalid
|
|
75
|
+
requests and revoked credentials. It does not support CORS browser applications.
|
|
76
|
+
This is a token-first JSON API—not an OAuth-authorized remote MCP endpoint.
|
|
77
|
+
OIDC/SSO and standards-compliant remote MCP HTTP authorization are deferred.
|
|
78
|
+
|
|
79
|
+
## Harness connection
|
|
80
|
+
|
|
81
|
+
Set `CAIRN_TEAM_URL`, `CAIRN_TEAM_ORGANIZATION` and `CAIRN_TEAM_TOKEN_FILE` in the
|
|
82
|
+
local harness environment, alongside `CAIRN_TEAM=1`. Tokens are file-only.
|
|
83
|
+
The URL may be loopback HTTP through a tunnel or HTTPS, without embedded
|
|
84
|
+
credentials, query, fragment or path prefix. Redirects are never followed.
|
|
85
|
+
|
|
86
|
+
Register **an additional** local stdio MCP named `cairn-team-memory`, command
|
|
87
|
+
`cairn`, arguments `team mcp --project-root /absolute/project`. Do not replace
|
|
88
|
+
the existing `cairn-memory` server or unrelated MCP entries. Every team call
|
|
89
|
+
names the explicit server project ID; cwd and display labels never select
|
|
90
|
+
authority. Existing personal memory remains independently available.
|
|
91
|
+
|
|
92
|
+
Tools: `team_memory_list`, `team_memory_read`, `team_memory_search`,
|
|
93
|
+
`team_memory_history` and `team_memory_propose`. No review/admin MCP exists.
|
|
94
|
+
Retrieval is deterministic substring matching, with no model/provider calls.
|
|
95
|
+
Personal-memory embeddings and reranking settings do not apply to team
|
|
96
|
+
retrieval; enabling them cannot send shared team text to a provider.
|
|
97
|
+
The remote boundary is marked open-world in MCP annotations; four retrieval
|
|
98
|
+
tools are observations, while proposal creation is an additive mutation and
|
|
99
|
+
requires the harness's explicit mutation consent. Approved memory is context,
|
|
100
|
+
not executable instruction or authority over maintained source.
|
|
101
|
+
|
|
102
|
+
The ordinary `CAIRN_MCP_TOOL_PROFILE`/project profile applies through equivalent
|
|
103
|
+
core names (`memory_list/read/search/history/write`). Optional
|
|
104
|
+
`CAIRN_TEAM_MCP_TOOL_PROFILE=full|read-only|custom` and
|
|
105
|
+
`CAIRN_TEAM_MCP_ALLOWED_TOOLS` further restrict the team catalog. Custom names
|
|
106
|
+
must be exact team tool names. `memory.write` and `memory.search` capability
|
|
107
|
+
settings restrict proposal and search when `CAIRN_CAPABILITY_CONTRACT` is on.
|
|
108
|
+
These intersections cannot grant server authority. Team results include a
|
|
109
|
+
separate effective profile digest; existing core/capability digests are unchanged.
|
|
110
|
+
|
|
111
|
+
Human CLI review uses a separately issued human credential in
|
|
112
|
+
`CAIRN_TEAM_TOKEN_FILE`:
|
|
113
|
+
|
|
114
|
+
```sh
|
|
115
|
+
cairn team proposals --project alpha
|
|
116
|
+
cairn team proposal-show --project alpha --proposal PROPOSAL_ID
|
|
117
|
+
cairn team review --project alpha --proposal PROPOSAL_ID --decision approve --confirm PROPOSAL_DIGEST
|
|
118
|
+
cairn team search --project alpha --query gateway
|
|
119
|
+
cairn team read --project alpha --key decisions/gateway
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Propose with a private JSON input file containing request UUID, key, selected
|
|
123
|
+
value, source_scope (`selected-local` or `selected-project`), source_digest,
|
|
124
|
+
base_revision (null for a new key) and expires_at. Confirm the selected value's
|
|
125
|
+
UTF-8 SHA-256 with `cairn team propose --project alpha --input FILE --confirm DIGEST`.
|
|
126
|
+
Neither CLI nor MCP derives a candidate by reading personal memory for you.
|
|
127
|
+
Inspect the proposal's exact content and provenance before confirming review.
|
|
128
|
+
|
|
129
|
+
Failure is explicit; the bridge never falls back to personal/global storage or
|
|
130
|
+
a different identity. Local memory commands still work independently offline.
|
|
131
|
+
|
|
132
|
+
## Recovery, retention and credential rotation
|
|
133
|
+
|
|
134
|
+
Local administration requires access as the trusted storage OS owner. It is
|
|
135
|
+
not exposed over HTTP or MCP. Keep the data directory private (`0700` on POSIX,
|
|
136
|
+
owner-only ACL on Windows); database, WAL, credential and snapshot files are
|
|
137
|
+
private too. Do not put a live store inside a source checkout or another store.
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
cairn team doctor --data /absolute/private/team
|
|
141
|
+
cairn team backup --data /absolute/private/team --output /absolute/private/team-snapshot.json
|
|
142
|
+
cairn team restore --input /absolute/private/team-snapshot.json --confirm SNAPSHOT_DIGEST --data /absolute/private/restored-team
|
|
143
|
+
cairn team doctor --data /absolute/private/restored-team
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Backup is a consistent transaction including records and value-free audit.
|
|
147
|
+
The output must be a new file; it contains shared text, proposals, subject IDs,
|
|
148
|
+
memberships and token hashes. Encrypt and restrict retained copies separately:
|
|
149
|
+
the store and JSON snapshot are not encrypted by Cairnkeep. Restore checks
|
|
150
|
+
schema, object digests, references and audit links before publishing a new
|
|
151
|
+
directory. It never overwrites an existing store. Concurrent cooperating
|
|
152
|
+
restores are exclusive; a failure never activates partial restored state.
|
|
153
|
+
Every restored credential is revoked. Issue fresh credentials and explicitly
|
|
154
|
+
select the restored store only after doctor passes. No automatic service switch
|
|
155
|
+
or identity approval occurs. Snapshot digests prove integrity, not authenticity.
|
|
156
|
+
|
|
157
|
+
Doctor reports temporary-remnant counts without deleting or selecting them.
|
|
158
|
+
If an interrupted restore leaves a lock or temporary directory, stop competing
|
|
159
|
+
administration, verify process ownership and preserve a copy before manually
|
|
160
|
+
removing the exact abandoned path. Doctor never chooses which version to use.
|
|
161
|
+
|
|
162
|
+
Rotate a credential by issuing a fresh private token file, distributing it
|
|
163
|
+
through a separate secure channel, and revoking the old credential ID with
|
|
164
|
+
`cairn team credential revoke ID --data DIR`. Replacing the configured token
|
|
165
|
+
file makes the bridge use it on the next request; revocation and membership
|
|
166
|
+
changes are also enforced on already-connected clients. There are no cached
|
|
167
|
+
authorization grants. Protect human reviewer tokens from agent environments.
|
|
168
|
+
|
|
169
|
+
For a compromised workload token, revoke it first and remove project roles if
|
|
170
|
+
needed. Remove all of a subject's access to one project explicitly:
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
cairn team member remove alice --project alpha --data /absolute/private/team
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
This clears that project's roles immediately, including for connected clients.
|
|
177
|
+
Other project memberships and credentials remain unchanged; revoke credentials
|
|
178
|
+
separately for complete offboarding. Existing revisions and audit history are
|
|
179
|
+
retained. To re-enroll, use `member set` with an explicit nonempty `--roles` list.
|
|
180
|
+
Missing or empty role lists are rejected rather than silently removing access.
|
|
181
|
+
|
|
182
|
+
Inspect `cairn team audit --project ID` using an auditor credential;
|
|
183
|
+
accepted, denied and conflicted authenticated operations record bounded
|
|
184
|
+
metadata. Invalid credentials do not create unauthenticated identity records.
|
|
185
|
+
Audit integrity is not external tamper resistance against the OS owner.
|
|
186
|
+
|
|
187
|
+
Current retention is manual: approved revisions, pending/rejected proposals
|
|
188
|
+
and audit events do not expire out of storage automatically. Proposal expiry
|
|
189
|
+
prevents review, not retention. An operator can delete a selected shared key,
|
|
190
|
+
its revisions and associated proposals/reviews using its current head digest:
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
cairn team memory-delete --project alpha --key decisions/gateway --confirm REVISION_DIGEST --data /absolute/private/team
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
This is logical deletion, not certified erasure: audit metadata, SQLite free
|
|
197
|
+
pages/WAL and older snapshots may retain traces or bytes. Apply a separately
|
|
198
|
+
reviewed storage/backup disposal policy if erasure is required. Ordinary
|
|
199
|
+
uninstall retains team data. Purge operations overlapping the configured team
|
|
200
|
+
store are refused before any uninstall changes; a store selected only through
|
|
201
|
+
`--data` must remain outside purge targets or also be set as
|
|
202
|
+
`CAIRN_TEAM_BASE_DIR` for that retention check.
|
|
203
|
+
|
|
204
|
+
## Bounded preview and admission
|
|
205
|
+
|
|
206
|
+
Selected values are at most 64 KiB UTF-8; requests 512 KiB; responses 2 MiB;
|
|
207
|
+
snapshots 64 MiB. Records are capped at 32,768 and 16 MiB of stored JSON;
|
|
208
|
+
audit at 100,000 events and 16 MiB, with a 1,000-event/256 KiB OS-operator reserve.
|
|
209
|
+
Limits fail closed rather than discarding records. Back up and review retention
|
|
210
|
+
before approaching them; the preview has no audit archival/compaction command.
|
|
211
|
+
Retrieval is bounded (100 list/history items, ten search results); the API
|
|
212
|
+
currently has no pagination. HTTP separately limits malformed authentication
|
|
213
|
+
per connection address and authenticated requests per subject to 120 per minute;
|
|
214
|
+
invalid token-shaped credentials receive ten attempts per token digest. Each
|
|
215
|
+
budget holds at most 512 identities, and invalid authentication cannot consume
|
|
216
|
+
an authenticated subject's quota. Headers are capped at 32 KiB, inactive
|
|
217
|
+
requests at ten seconds, and bridge fetches at fifteen seconds.
|
|
218
|
+
|
|
219
|
+
Digest confirmation proves selected bytes match; it cannot prove a human
|
|
220
|
+
clicked approval. MCP hosts must obtain mutation consent. Only separate human
|
|
221
|
+
CLI credentials can review, and the OS owner remains trusted to assign them.
|
|
222
|
+
No automatic setup, existing MCP replacement or fleet deployment is performed.
|
|
223
|
+
|
|
224
|
+
Release checks cover Node 22/24/26, native Windows, real Bash 3.2,
|
|
225
|
+
installed-package and container behavior. The internal governed review and
|
|
226
|
+
approved isolated native pilot covered exact human proposal approval,
|
|
227
|
+
cross-harness recall, offboarding, restore and project isolation. Automated
|
|
228
|
+
fixtures are regression evidence, not proof of human consent. These results do
|
|
229
|
+
not admit arbitrary production deployments: establish an independent security
|
|
230
|
+
review appropriate to the deployment, named operational ownership, a separately
|
|
231
|
+
approved limited real-data pilot with rollback, and explicit operator acceptance
|
|
232
|
+
before enabling a real organization. Keep reviewer credentials out of agents.
|
|
233
|
+
OIDC/SSO, multi-organization tenancy, team packs, remote maintainer administration,
|
|
234
|
+
provider retrieval and externally anchored audit are deferred.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"identifier":"cairn-offline-fake-v1","package_version":"2.
|
|
1
|
+
{"identifier":"cairn-offline-fake-v1","package_version":"2.25.0","schema_version":1,"task_set_digest":"13e95379f35839593047ec34521a65a8fa3ab92bd3993bca9dc8bf5c4a9ff36f"}
|