@tealbrick/kit 0.2.7 → 0.3.0-rc.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.
- package/BOOTSTRAP.md +17 -18
- package/BUZZ.md +146 -0
- package/NATIVE.md +83 -0
- package/README.md +265 -4
- package/RUNTIME.md +1 -1
- package/assets/buzz/buzz-backend-provider.py +99 -0
- package/assets/buzz/buzz-plist.py +22 -0
- package/assets/buzz/buzz-run.sh +39 -0
- package/assets/buzz/tb-provider-apply.py +97 -0
- package/dist/buzz.d.ts +63 -0
- package/dist/buzz.js +262 -0
- package/dist/cli.js +22 -4
- package/dist/index.d.ts +23 -14
- package/dist/index.js +4 -2
- package/dist/native-acp.d.ts +40 -0
- package/dist/native-acp.js +224 -0
- package/dist/native-app-capabilities.d.ts +33 -0
- package/dist/native-app-capabilities.js +37 -0
- package/dist/native-buzz.d.ts +161 -0
- package/dist/native-buzz.js +649 -0
- package/dist/native-child-guard.d.ts +1 -0
- package/dist/native-child-guard.js +22 -0
- package/dist/native-claude.d.ts +99 -0
- package/dist/native-claude.js +584 -0
- package/dist/native-enroll.d.ts +22 -0
- package/dist/native-enroll.js +85 -0
- package/dist/native-runtime-sync.d.ts +49 -0
- package/dist/native-runtime-sync.js +101 -0
- package/dist/native-selection.d.ts +27 -0
- package/dist/native-selection.js +87 -0
- package/dist/native-serve-config.d.ts +286 -0
- package/dist/native-serve-config.js +296 -0
- package/dist/native-serve.d.ts +76 -0
- package/dist/native-serve.js +145 -0
- package/dist/native-setup.d.ts +63 -0
- package/dist/native-setup.js +122 -0
- package/dist/native-standing-grants.d.ts +105 -0
- package/dist/native-standing-grants.js +226 -0
- package/dist/native.d.ts +42 -0
- package/dist/native.js +193 -0
- package/dist/onboarding.d.ts +9 -0
- package/dist/onboarding.js +9 -2
- package/dist/runtime-onboarding.js +3 -3
- package/dist/secrets.d.ts +2 -1
- package/dist/secrets.js +4 -2
- package/package.json +19 -10
package/BOOTSTRAP.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Prerelease 0.3.0-rc.10 targets fresh Eve 0.70 installations. Use the explicit candidate version or `next` tag after publication. Scoped `@tealbrick/*` `latest` remains 0.2.7 for existing Eve 0.66 installations; durable cross-version session migration is not validated.
|
|
2
2
|
|
|
3
3
|
# Deployment guide: Eve agent + Teal Brick kit
|
|
4
4
|
|
|
5
5
|
This guide installs the seven implemented packages through one kit and activates
|
|
6
|
-
only the capabilities you select. The supported harness line is **Eve 0.
|
|
7
|
-
**0.
|
|
6
|
+
only the capabilities you select. The supported harness line is **Eve 0.70.x**;
|
|
7
|
+
**0.70.0** and **AI SDK 7.0.127** are the current tested versions. Use Node **24**.
|
|
8
8
|
|
|
9
|
-
**Release status:**
|
|
9
|
+
**Release status:** this prerelease is prepared for the `next` tag. Until publication, use the reviewed local tarballs. The versioned npm commands apply after publication. Native onboarding additionally requires the matching Portal runtime setup endpoints.
|
|
10
10
|
|
|
11
11
|
## What installs what
|
|
12
12
|
|
|
@@ -18,12 +18,12 @@ Eve runs the agent and needs its own working primary-model authentication.
|
|
|
18
18
|
For a fresh machine, the sequence is:
|
|
19
19
|
|
|
20
20
|
1. Install Node 24 and npm.
|
|
21
|
-
2. Create an Eve 0.
|
|
22
|
-
3. Install `@tealbrick/kit@0.
|
|
21
|
+
2. Create an Eve 0.70.0 project and configure its primary model credentials.
|
|
22
|
+
3. Install `@tealbrick/kit@0.3.0-rc.10` inside that project.
|
|
23
23
|
4. Run `tealbrick setup` to sign in, select capabilities and register the card.
|
|
24
24
|
5. Build and start Eve, then check a real chat from desktop.
|
|
25
25
|
|
|
26
|
-
For an **existing Eve 0.
|
|
26
|
+
For an **existing Eve 0.70.0 project**, start at step 3 from its project directory.
|
|
27
27
|
Do not run `eve init` over an existing agent. Preserve its model configuration and
|
|
28
28
|
review any existing Eve channel before setup, as explained under Portal below.
|
|
29
29
|
|
|
@@ -38,15 +38,15 @@ npm --version
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The first command should report `v24.x`. Run the remaining commands as the account
|
|
41
|
-
that will own the new agent project.
|
|
42
|
-
an AVMM guest on
|
|
41
|
+
that will own the new agent project. In a typical deployment this account runs on
|
|
42
|
+
an AVMM guest on the agent host. This package guide does not provision a VM or install AVMM.
|
|
43
43
|
|
|
44
44
|
## 2. Create a fresh Eve project
|
|
45
45
|
|
|
46
46
|
Choose an unused project directory, outside any existing live agent:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
npx --yes eve@0.
|
|
49
|
+
npx --yes eve@0.70.0 init tealbrick-agent --model openai/gpt-5.6-terra
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Finish scaffolding and return to the terminal before continuing. If Eve starts
|
|
@@ -54,12 +54,12 @@ Finish scaffolding and return to the terminal before continuing. If Eve starts
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
cd tealbrick-agent
|
|
57
|
-
npm install --save-exact eve@0.
|
|
57
|
+
npm install --save-exact eve@0.70.0 ai@7.0.127
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Keep `package-lock.json` under version control.
|
|
61
61
|
The exact Eve pin is intentional: the compatibility workflow validates patches
|
|
62
|
-
before advancing it
|
|
62
|
+
before advancing it. No production pin changes automatically.
|
|
63
63
|
|
|
64
64
|
The example model uses the Vercel AI Gateway. To supply its key for this terminal
|
|
65
65
|
without putting the key in shell history, in Bash run:
|
|
@@ -81,7 +81,7 @@ Run this inside the Eve project created in step 2 (or your existing compatible
|
|
|
81
81
|
project), not in an empty directory or as a global install:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
npm install --save-exact @tealbrick/kit@0.
|
|
84
|
+
npm install --save-exact @tealbrick/kit@0.3.0-rc.10
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
This installs Portal, AVM, Voice, Vision, Deliver and the shared provider transport
|
|
@@ -184,9 +184,9 @@ does not install AVMM or grant VM administration.
|
|
|
184
184
|
|
|
185
185
|
For a paired connection use `agentvm-client@<resolvable-hostname>` and the path to
|
|
186
186
|
that paired user's dedicated SSH key. The host must already be enrolled and its
|
|
187
|
-
SSH host key trusted. AVMM binds the key to its user/workspace. For
|
|
188
|
-
hostname
|
|
189
|
-
Operator mode can use
|
|
187
|
+
SSH host key trusted. AVMM binds the key to its user/workspace. For example, the
|
|
188
|
+
hostname might be `agent-host.tailnet.invalid`. Paired mode does not read SSH aliases.
|
|
189
|
+
Operator mode can use a configured SSH alias (for example `agent-host`) and has that account's authority.
|
|
190
190
|
|
|
191
191
|
Named profiles and exact mutation grants can be supplied through a reviewed
|
|
192
192
|
configuration file using `npx --no-install tealbrick apply config.json`. Follow the
|
|
@@ -253,6 +253,5 @@ CRUD, production dispatch and desktop delivery together. Self-evolution requires
|
|
|
253
253
|
an existing `deployment/*.ts` native Eve policy module outside the writable agent
|
|
254
254
|
tree. Native proposals require the deployment's existing governed activation path.
|
|
255
255
|
|
|
256
|
-
|
|
257
|
-
records before targeting either host. Do not create new canary agents. Committed
|
|
256
|
+
Verify the deployment's canonical host records before targeting an AVMM host. Do not create new canary agents. Committed
|
|
258
257
|
source, npm publication and installed deployment are separate states.
|
package/BUZZ.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Run fleet agents from Buzz Desktop on a Mac host
|
|
2
|
+
|
|
3
|
+
Buzz Desktop can create a managed agent and hand it to an external provider.
|
|
4
|
+
The kit ships such a provider: Desktop (on your client Mac) deploys the agent
|
|
5
|
+
over ssh to an agent host Mac, which runs it as `buzz-acp` with
|
|
6
|
+
`tealbrick native acp` as the ACP agent. The kit owner's profile, expert
|
|
7
|
+
contracts and Portal grants stay the authority for what the agent may do.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
client Mac: Buzz Desktop -> buzz-backend-<name> --ssh--> host Mac: tb-provider-apply.py -> launchd -> buzz-run.sh -> buzz-acp -> tealbrick native acp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Prerequisites
|
|
14
|
+
|
|
15
|
+
- Client Mac: Buzz Desktop, Node 24+, `/usr/bin/python3` (Xcode Command Line Tools).
|
|
16
|
+
- Host Mac: Buzz.app installed (only its `buzz` and `buzz-acp` binaries are used),
|
|
17
|
+
Node 24+, `/usr/bin/python3`, and non-interactive ssh from the client
|
|
18
|
+
(key-based; `ssh agent-host true` must work without a prompt).
|
|
19
|
+
- Host Mac: one kit root per owner under the owners directory (default
|
|
20
|
+
`~/agents/tealbrick-connections/<owner>`), set up with
|
|
21
|
+
`tealbrick native setup` and `tealbrick native enroll`. The host helper refuses
|
|
22
|
+
owners without `<owner>/.tealbrick/native-serve.json`.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
On the host Mac:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npx -y @tealbrick/kit@next buzz host setup
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
On the client Mac (where Buzz Desktop runs):
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx -y @tealbrick/kit@next buzz provider install
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use the same kit version on both Macs (replace `next` with an exact version to pin it).
|
|
39
|
+
The host setup installs exactly the version it runs as.
|
|
40
|
+
|
|
41
|
+
`buzz host setup` creates `~/agents/buzz/{bin,runtime}` (0700), copies `buzz`
|
|
42
|
+
and `buzz-acp` out of the app bundle into `~/agents/buzz/bin` (so a Buzz.app
|
|
43
|
+
update never changes running agents; re-run setup to pick up a new Buzz), and
|
|
44
|
+
writes `~/agents/buzz/host.json` with the node path, kit CLI, owners directory,
|
|
45
|
+
binary paths, their sha256 and the Buzz.app version. Because npx caches are
|
|
46
|
+
temporary, it installs the same kit version into `~/agents/buzz/runtime` with
|
|
47
|
+
`npm install --prefix` and points the agents at that copy. Pass
|
|
48
|
+
`--kit-cli /absolute/path/to/dist/cli.js` to use an existing install instead.
|
|
49
|
+
Re-running it is safe; it rewrites the host scripts and `host.json`.
|
|
50
|
+
|
|
51
|
+
| Flag | Default |
|
|
52
|
+
|---|---|
|
|
53
|
+
| `--owners-dir DIR` | `~/agents/tealbrick-connections` |
|
|
54
|
+
| `--buzz-app PATH` | `/Applications/Buzz.app` |
|
|
55
|
+
| `--node PATH` | the node running setup |
|
|
56
|
+
| `--kit-cli PATH` | install into `~/agents/buzz/runtime` |
|
|
57
|
+
| `--respond-to-default owner-only\|anyone` | none (Desktop choice applies) |
|
|
58
|
+
|
|
59
|
+
`buzz provider install` writes `~/.local/bin/buzz-backend-tealbrick-mac`
|
|
60
|
+
(0755), which Desktop discovers. `--name NAME` (`[a-z0-9-]{3,40}`) changes the
|
|
61
|
+
provider id, `--bin-dir DIR` the location (it must be on Desktop's PATH or be
|
|
62
|
+
`~/.local/bin`). It refuses to overwrite a file it did not write unless
|
|
63
|
+
`--force` is given.
|
|
64
|
+
|
|
65
|
+
## Create an agent in Buzz Desktop
|
|
66
|
+
|
|
67
|
+
1. Restart Buzz Desktop after installing the provider.
|
|
68
|
+
2. Open **Agents > New agent**.
|
|
69
|
+
3. Set **Run on** to `tealbrick-mac` (shown as "Teal Brick · tealbrick-mac").
|
|
70
|
+
4. Set **owner** to the kit owner directory name on the host (for example `owner-a`).
|
|
71
|
+
5. Set **host** to the ssh alias or `user@host` of the host Mac (for example `agent-host`).
|
|
72
|
+
6. Create the agent. Desktop deploys it; the deploy waits until the agent subscribes to the relay.
|
|
73
|
+
|
|
74
|
+
The agent key goes only over ssh stdin to the host helper. It is never in a
|
|
75
|
+
command line, an environment of the provider or a log; errors redact keys.
|
|
76
|
+
On the host it is stored as `~/agents/buzz/<label>/nostr.key` (0600) and passed
|
|
77
|
+
only to that agent's `buzz-acp` process. Each agent runs in its own empty
|
|
78
|
+
environment. A failed deploy unloads its launchd unit again.
|
|
79
|
+
|
|
80
|
+
## Who the agent answers
|
|
81
|
+
|
|
82
|
+
- **Mentions:** every agent gets one rule: it wakes only when its own pubkey is
|
|
83
|
+
p-tagged (an explicit @mention), by anyone. Desktop DMs p-tag the agent, so
|
|
84
|
+
DMs work; untagged channel and thread messages are ignored.
|
|
85
|
+
- **respond_to:** the Desktop choice (`owner-only`, `allowlist`, `anyone`,
|
|
86
|
+
`nobody`) applies. If the host has `~/agents/buzz/fleet-defaults.json`
|
|
87
|
+
(written by `--respond-to-default`), its value replaces only Desktop's
|
|
88
|
+
default `owner-only`; an explicit `allowlist` or `nobody` always wins.
|
|
89
|
+
- Desktop policy settings (session policy, timeouts, parallelism up to 4, and
|
|
90
|
+
similar) pass through an allowlist; anything else is dropped.
|
|
91
|
+
|
|
92
|
+
## Sharing files
|
|
93
|
+
|
|
94
|
+
In workspace mode the agent attaches files with `buzz_send_message` `files`
|
|
95
|
+
(paths in its workspace; at most 10 files, 25 MB each, 50 MB per message). It
|
|
96
|
+
never posts a local path. The kit opens each file without following links,
|
|
97
|
+
refuses dotfiles, `inbox`, `.tealbrick`, hard links and anything that is not a
|
|
98
|
+
regular file, copies the bytes from the opened file into
|
|
99
|
+
`<root>/.tealbrick/native-serve/outbox/<uuid>/`, uploads that copy with
|
|
100
|
+
`buzz messages send --file`, and deletes it. Logs carry names and sizes only.
|
|
101
|
+
Incoming attachments still use `buzz_fetch_attachment`.
|
|
102
|
+
|
|
103
|
+
## Files and logs on the host
|
|
104
|
+
|
|
105
|
+
| Path | Content |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `~/agents/buzz/host.json` | host paths and versions from setup |
|
|
108
|
+
| `~/agents/buzz/bin/` | `buzz`, `buzz-acp`, `buzz-run.sh`, `buzz-plist.py`, `tb-provider-apply.py` |
|
|
109
|
+
| `~/agents/buzz/<label>/` | one agent: key, auth tag, owner, relay, `acp.env`, `buzz-acp.toml`, `deploy.json` |
|
|
110
|
+
| `~/agents/buzz/<label>/logs/buzz-acp.{out,err}.log` | agent logs |
|
|
111
|
+
| `~/Library/LaunchAgents/com.tealbrick.buzz-acp.<label>.plist` | launchd unit |
|
|
112
|
+
|
|
113
|
+
`<label>` is `<owner>-<first 8 hex of the agent pubkey>-<relay host>-<4 hex>`.
|
|
114
|
+
To stop an agent: `launchctl bootout gui/$(id -u)/com.tealbrick.buzz-acp.<label>`.
|
|
115
|
+
|
|
116
|
+
The agent key and auth tag are read from their files by the last shell
|
|
117
|
+
before `buzz-acp` starts; no process command line ever carries them, only
|
|
118
|
+
their paths.
|
|
119
|
+
|
|
120
|
+
If a precondition is missing (agent directory, owner kit root, relay URL,
|
|
121
|
+
auth tag or key), `buzz-run.sh` writes one `buzz-run: <label>: ...; not
|
|
122
|
+
starting` line to `buzz-acp.err.log` and exits 0. The unit keeps
|
|
123
|
+
`KeepAlive` only for unsuccessful exits, so launchd does not restart it in a
|
|
124
|
+
loop. Fix the cause, then start it again:
|
|
125
|
+
`launchctl kickstart -k gui/$(id -u)/com.tealbrick.buzz-acp.<label>`.
|
|
126
|
+
|
|
127
|
+
## Remove an agent
|
|
128
|
+
|
|
129
|
+
Buzz Desktop has no undeploy operation for provider-managed agents. Delete
|
|
130
|
+
the agent in Desktop, then on the host Mac:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
npx -y @tealbrick/kit@next buzz host remove <label>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
It boots out the launchd unit, deletes
|
|
137
|
+
`~/Library/LaunchAgents/com.tealbrick.buzz-acp.<label>.plist` and moves
|
|
138
|
+
`~/agents/buzz/<label>` to `~/agents/buzz/.removed/<label>-<timestamp>`
|
|
139
|
+
(0700). The moved directory still holds the agent key; delete it when you no
|
|
140
|
+
longer need it. By hand, the same steps are:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
launchctl bootout gui/$(id -u)/com.tealbrick.buzz-acp.<label>
|
|
144
|
+
rm ~/Library/LaunchAgents/com.tealbrick.buzz-acp.<label>.plist
|
|
145
|
+
rm -rf ~/agents/buzz/<label>
|
|
146
|
+
```
|
package/NATIVE.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Native agent setup — Stage A candidate
|
|
2
|
+
|
|
3
|
+
Prerelease suite **0.3.0-rc.10** targets the `next` tag. The seven scoped `@tealbrick/*` packages keep `latest` at 0.2.7, which lacks this flow; the unscoped `tealbrick` facade keeps `latest` at 0.3.0-rc.1. The `tealbrick` facade forwards the existing kit CLI; it is not another SDK. Matching Portal runtime setup endpoints must be deployed before native onboarding can succeed. RC4 added `tealbrick native serve` and `native enroll` (see README.md). RC5 keeps an idle serve process's runtime acknowledged in Portal, and lets the runtime reach Portal-provisioned Knowledge with short-lived Portal grants when no local app binding exists. RC6 adds the owner-only `/tealbrick/v1/capabilities` snapshot (Portal-granted apps and Marketplace consents) used by TBD Chat → Plugins, and `tealbrick native` without a subcommand prints usage. RC7 loads versioned expert contracts (`claude.contracts`) as SDK subagents with scope = contract ceiling ∩ owner grants, pauses approval operations for the owner's payload approval in TBD, and traces every delegation.
|
|
4
|
+
|
|
5
|
+
## Install and connect
|
|
6
|
+
|
|
7
|
+
Install with `npm install --save-exact tealbrick@0.3.0-rc.10` (or `tealbrick@next`) once registry publication is verified. Until then, use the review tarballs with the checksum-verifying `install-candidate.mjs`.
|
|
8
|
+
|
|
9
|
+
From your native agent workspace:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx --no-install tealbrick setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Choose Claude Agent SDK, Codex TypeScript SDK, LangChain or the existing Eve setup. Native setup then:
|
|
16
|
+
|
|
17
|
+
1. Opens the existing Portal device-consent flow for your account.
|
|
18
|
+
2. Lets you choose or create an owned workspace.
|
|
19
|
+
3. Lets you create an accurately labelled agent or select an owned existing one.
|
|
20
|
+
4. Creates/reuses its stable card through Portal, then enrolls its runtime connection.
|
|
21
|
+
5. Saves ordinary SDK configuration at `.tealbrick/native-sdk.json`.
|
|
22
|
+
|
|
23
|
+
No pre-created card, endpoint, Fleet licence, or UUID lookup is required. Names that match multiple identities require an explicit selection. Creation does not grant apps. Eve identities cannot be silently converted to native identities.
|
|
24
|
+
|
|
25
|
+
Named selections also work:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx --no-install tealbrick setup --harness claude --create-workspace Community --create-agent Researcher
|
|
29
|
+
npx --no-install tealbrick setup --harness langchain --workspace-name Community --agent-name Researcher
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The second example requires an existing **LangChain** identity. `--workspace ID --agent ID [--node ID]` remain advanced selections. Setup requires the Portal candidate's authenticated `GET/POST /api/runtime/setup`; a public gateway must expose that reviewed route. It then uses the unchanged `/api/runtime/connections` credential exchange.
|
|
33
|
+
|
|
34
|
+
Repeat setup in the same workspace to reconnect. `.tealbrick/native-setup.json` retains the account-bound identity intent and idempotency key, without credentials. A lost response or enrollment failure reuses that key on retry. The local setup lock prevents concurrent installers. If the installer is killed, verify that the PID in `.tealbrick/native-setup.lock` is no longer running before removing **only that lock** and retrying; retain the journal. A different account/harness or an attempt to replace an already-bound identity fails closed.
|
|
35
|
+
|
|
36
|
+
## Native SDK configuration
|
|
37
|
+
|
|
38
|
+
Load `.tealbrick/native-sdk.json` into the SDK's ordinary options. No tokens are present; the installed CLI path and workspace root are absolute. Keep the package at that path. Use native SDK session persistence and continuation.
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
const config = JSON.parse(await readFile('.tealbrick/native-sdk.json', 'utf8'));
|
|
42
|
+
// Claude Agent SDK 0.3.287: preserve the generated settings hook when merging.
|
|
43
|
+
const stream = query({prompt, options: {...config, model: selectedModel,
|
|
44
|
+
...(savedSessionId ? {resume: savedSessionId} : {})}});
|
|
45
|
+
// Codex TypeScript SDK 0.160.0 (not OpenAI Agents SDK)
|
|
46
|
+
const codex = new Codex(config);
|
|
47
|
+
const thread = savedThreadId ? codex.resumeThread(savedThreadId, options) : codex.startThread(options);
|
|
48
|
+
// LangChain 1.5.15 and MCP adapters 2.0.0
|
|
49
|
+
const adapter = new MCPAdapter(config);
|
|
50
|
+
const agent = createAgent({model: configuredModel, tools: await adapter.listTools(), checkpointer});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Configure provider authentication on the native host through its supported SDK. Kit does not copy login caches, choose providers or change billing. No Eve daemon, AVMM or inbound bridge is required. An optional owner-only chat endpoint for Teal Brick Desktop is available through `tealbrick native serve` and `tealbrick native enroll`; see README.md. Native mode emits no Eve mounts and uses the existing kit state and owner-only credential file.
|
|
54
|
+
|
|
55
|
+
## Children and host authority
|
|
56
|
+
|
|
57
|
+
- **Claude:** generated `settings.hooks.PreToolUse` executes the packaged guard for `mcp__tealbrick__*`. It denies requests with SDK-authored `agent_id`; parent calls receive no permission override. It preserves the host's `Agent` tool, independently scoped agents and non-Tealbrick tools. Merge this hook with existing settings instead of dropping it. Unit/process tests verify the hook; live delegated execution is still unverified.
|
|
58
|
+
- **Codex:** no verified per-child credential boundary exists in this attachment. Setup explicitly asks before generating a profile with `multi_agent` and `multi_agent_v2` disabled. For scripted selection use `--delegation disabled`; the same flag is required for `native config`. It never edits the host's existing Codex config. Do not merge this profile into a delegation-enabled agent and claim isolation.
|
|
59
|
+
- **LangChain:** `createAgent` receives only the two Tealbrick tools; no child tool is introduced. Do not pass this adapter into another agent. Child grants are unsupported.
|
|
60
|
+
|
|
61
|
+
These controls do not isolate processes sharing an OS user. A child with unrestricted filesystem/shell access can read parent files. Keep the credential directory outside child filesystem authority; independently scoped child runtimes must receive their own grants, not the parent root or credential. No full delegated-access acceptance is claimed.
|
|
62
|
+
|
|
63
|
+
## Knowledge and revocation
|
|
64
|
+
|
|
65
|
+
In the selected workspace, licence/configure Knowledge, verify its instance using the existing `tealbrick app claim` flow, and save explicit CRUD tethers. The instance admin approves the claim; runtime uses a separate scoped service-principal token. Nothing automatically grants all products.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
npx --no-install tealbrick app claim --workspace WORKSPACE_ID --node KNOWLEDGE_NODE_ID --binding community --endpoint https://YOUR_KNOWLEDGE_ORIGIN --company YOUR_PARTITION --issuer https://portal.tealbrick.com
|
|
69
|
+
npx --no-install tealbrick native disable
|
|
70
|
+
npx --no-install tealbrick native enable
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Each request reloads local activation and fetches signed Portal authorization. Revoke or unavailable authorization blocks the next app request. In-flight side effects are not undone; cancellation reaches the app request but does not prove a write rolled back. No automatic write retry is added. Re-enrollment rotates the runtime credential and keeps the logical agent. Portal logout does not revoke that connection.
|
|
74
|
+
|
|
75
|
+
## Acceptance boundary
|
|
76
|
+
|
|
77
|
+
Disposable installed-artifact tests cover empty-account creation, named selection, permission/ambiguity denial, lost-response retry, signed config, scoped Knowledge-fixture read, revoke/reconnect, deactivation and MCP cancellation. They are not real browser consent or real Knowledge product proof. Root's separate canary-agent receipt proves the earlier packed candidate's live Claude MCP inactive denial, exact-session process restart and compaction. Codex and LangChain have independent narrower fixture evidence, not live-provider parity. Marketplace, voice/vision and delegated Tealbrick grants are outside this Stage A claim.
|
|
78
|
+
|
|
79
|
+
## Name conflicts and interrupted setup
|
|
80
|
+
|
|
81
|
+
Existing cards are shown with their harness. A card for Eve cannot be converted to Claude by choosing its name. If a name is already used, select an explicitly compatible card or choose another name; setup keeps the approved login during this interaction. Duplicate compatible names require selecting the exact card ID.
|
|
82
|
+
|
|
83
|
+
A definitive Portal name-conflict rejection permits changing the proposed identity. A timeout or lost response does not: the private journal keeps the original request and idempotency key. Repeat `tealbrick setup --harness <harness>` without new identity-selection flags to reconcile that request. Changing an uncertain request fails with `kit_native_setup_pending_intent_mismatch`; do not delete the journal to bypass it.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
>
|
|
1
|
+
> Prerelease 0.3.0-rc.10 targets fresh Eve 0.70 installations. Use the explicit candidate version or `next` tag after publication. Scoped `@tealbrick/*` `latest` remains 0.2.7 for existing Eve 0.66 installations; durable cross-version session migration is not validated.
|
|
2
2
|
|
|
3
3
|
# @tealbrick/kit
|
|
4
4
|
|
|
@@ -6,16 +6,16 @@ One installation, explicitly selected capabilities. The kit includes the current
|
|
|
6
6
|
implemented Portal, Voice, Vision, Deliver and AVM packages. Dependencies are code
|
|
7
7
|
availability, not agent permissions. Nothing is mounted by installing the kit.
|
|
8
8
|
|
|
9
|
-
Install inside an existing Eve 0.
|
|
9
|
+
Install inside an existing Eve 0.70.0 project:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npm install --save-exact @tealbrick/kit@0.
|
|
12
|
+
npm install --save-exact @tealbrick/kit@0.3.0-rc.10
|
|
13
13
|
npx --no-install tealbrick setup
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The suite is published on npm. The kit does not install, create or start Eve.
|
|
17
17
|
Create the Eve project first and configure its primary-model authentication.
|
|
18
|
-
Eve 0.
|
|
18
|
+
Eve 0.70.0 and Node 24 are the validated host versions; VM provisioning remains
|
|
19
19
|
host setup. After Teal Brick setup, build and start Eve to make the agent usable.
|
|
20
20
|
|
|
21
21
|
See [BOOTSTRAP.md](BOOTSTRAP.md) for the complete deployment guide, including fresh-machine and existing-agent paths, provider prompts and verification.
|
|
@@ -92,3 +92,264 @@ including a single deduplicated provider-transport installation.
|
|
|
92
92
|
## AVMM profiles
|
|
93
93
|
|
|
94
94
|
The `avm` selection accepts the [AVM package connection/policy schema](../avm/README.md): either `{target,sudo}` or `{selectedProfile,profiles}`. Setup can select a saved profile and preserves its grants. New connections can use paired AVMM users or operator SSH. Paired mode requires a dedicated SSH identity path and a resolvable hostname; no credentials are copied. Use `tealbrick apply config.json` for full workspace, ownership, sharing, pool and ingress grants. Disabling AVM removes its entire mount.
|
|
95
|
+
|
|
96
|
+
## Buzz Desktop agents on a Mac host: `tealbrick buzz`
|
|
97
|
+
|
|
98
|
+
Buzz Desktop can deploy a managed agent to another Mac that runs it as
|
|
99
|
+
`buzz-acp` + `tealbrick native acp` for a kit owner. Two commands set it up:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
npx -y @tealbrick/kit@next buzz host setup # on the agent host Mac
|
|
103
|
+
npx -y @tealbrick/kit@next buzz provider install # on the Mac running Buzz Desktop
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Then in Desktop: Agents > New agent > Run on `tealbrick-mac`, with the kit
|
|
107
|
+
`owner` and the ssh `host`. `tealbrick buzz host remove <label>` removes an
|
|
108
|
+
agent from the host. Prerequisites, mention and respond_to rules, flags, log
|
|
109
|
+
locations and removal are in [BUZZ.md](BUZZ.md).
|
|
110
|
+
|
|
111
|
+
## Native chat endpoint: `tealbrick native serve`
|
|
112
|
+
|
|
113
|
+
Optional. Lets the owner chat with a native **Claude Agent SDK** or **Codex**
|
|
114
|
+
agent from TBD. The agent must already be set up with
|
|
115
|
+
`tealbrick setup --harness claude|codex` (kit state, runtime connection and
|
|
116
|
+
`.tealbrick/native-sdk.json`). LangChain is refused with
|
|
117
|
+
`kit_native_serve_langchain_unsupported`.
|
|
118
|
+
|
|
119
|
+
The endpoint is the Eve session subset Desktop uses (`/eve/v1/health`,
|
|
120
|
+
`/eve/v1/session` create/send, NDJSON stream with cursor catch-up, cancel,
|
|
121
|
+
`/eve/v1/session/:id/access`) plus `GET /tealbrick/v1/info`, which reports
|
|
122
|
+
`harness`, `protocol: "tealbrick-native"`, `model`, `capabilities` and
|
|
123
|
+
`unsupported` honestly. `/eve/v1/info`, reset/clear/compact, attachments,
|
|
124
|
+
approvals, subagents, workflows and schedules return 404/400. The native
|
|
125
|
+
harness keeps the conversation: Claude turns resume the same SDK session id,
|
|
126
|
+
and a restarted server only re-attaches transcripts that still exist.
|
|
127
|
+
|
|
128
|
+
While running, serve keeps the runtime connection synced with Portal even when
|
|
129
|
+
no turn is active: it fetches the signed runtime config and acknowledges it on
|
|
130
|
+
start and every 60–120 s (jittered; exponential backoff to 4 min on errors), so
|
|
131
|
+
Portal does not mark an idle runtime as expired after the 300 s config lease.
|
|
132
|
+
Changes are logged as `native.runtime.synced`; a revoked credential (HTTP 401)
|
|
133
|
+
stops the loop with one `native.runtime.sync.stopped` line. The per-turn
|
|
134
|
+
`tealbrick` MCP child still fetches a fresh authorization for every call.
|
|
135
|
+
|
|
136
|
+
### Security posture
|
|
137
|
+
|
|
138
|
+
- Binds `127.0.0.1` only. Reach it from the tailnet through a TLS-terminating
|
|
139
|
+
proxy (preferred: `tailscale serve`, including for customer deployments).
|
|
140
|
+
- Every request except `/healthz` is verified against Portal (identity token
|
|
141
|
+
plus policy bundle for this agent) and must come from the enrolled owner.
|
|
142
|
+
- The `Host` header must be loopback, the enrolled `publicUrl` host or an
|
|
143
|
+
explicit `allowedHosts` entry. Any `Origin` header is rejected. Bodies are
|
|
144
|
+
limited to 128 KiB and two concurrent turns by default (`maxActiveTurns`).
|
|
145
|
+
- New sessions are **Restricted**: `Read`/`Glob`/`Grep` contained to the
|
|
146
|
+
profile `cwd` (never the kit's `.tealbrick`), operator-vetted `readTools`, and
|
|
147
|
+
`mcp__tealbrick__*` only. Shell, file writes, network tools, delegation and
|
|
148
|
+
project/user Claude settings are unavailable; a PreToolUse hook and
|
|
149
|
+
`canUseTool` enforce the same decision. The kit's child-agent guard still
|
|
150
|
+
denies Teal Brick tools to subagents. Optional `tealbrickCalls` adds a
|
|
151
|
+
local operation ceiling on top of Portal grants.
|
|
152
|
+
- A per-agent default can widen Restricted with `defaultTools` (only
|
|
153
|
+
`WebSearch`, `WebFetch`, `Agent`, `TodoWrite`; never shell or writes).
|
|
154
|
+
`Agent` delegates only to the configured `experts`, in the foreground with
|
|
155
|
+
the session model; each expert runs with its own `tools` (workspace reads,
|
|
156
|
+
`WebSearch`, `WebFetch`) and never receives Teal Brick tools.
|
|
157
|
+
- **Expert contracts** (`claude.contracts`: absolute paths to
|
|
158
|
+
`tealbrick.expert-contract/v1` JSON files, e.g. from the Agent-creation
|
|
159
|
+
cookbook) run as SDK subagents. Effective scope = contract ceiling ∩ the
|
|
160
|
+
owner's Portal grants ∩ the owner's `tealbrickCalls` ceiling; experts never
|
|
161
|
+
hold credentials or delegate. Payload approvals: `approvalOperations`
|
|
162
|
+
(default `marketplace_execute`) and a contract's outward writes pause the
|
|
163
|
+
exact call as an `input.requested` approval in TBD; decline or timeout denies.
|
|
164
|
+
Owner **standing grants** (below) can pre-approve bounded classes of these
|
|
165
|
+
calls.
|
|
166
|
+
Each delegation is traced to `.tealbrick/native-serve/traces/*.jsonl`
|
|
167
|
+
(owner, expert@version, brief, capabilities used, output digest).
|
|
168
|
+
- `GET /tealbrick/v1/capabilities` (same owner auth) reports what Portal
|
|
169
|
+
currently grants this agent: Knowledge apps from the background runtime sync
|
|
170
|
+
and, when `tealbrick native marketplace-enable` is set, Marketplace consents
|
|
171
|
+
(plugin and action names only; no credentials, leases or account
|
|
172
|
+
references). TBD uses it for Chat → Plugins.
|
|
173
|
+
- Elevation only through Desktop's session-access control (owner, explicit
|
|
174
|
+
confirmation, optimistic revision, no turn in flight). **Native defaults**
|
|
175
|
+
snapshots `nativeTools` (still workspace-contained); **Full** uses the
|
|
176
|
+
Claude Code tool preset with permission bypass. Full is not a security
|
|
177
|
+
boundary against the local OS user.
|
|
178
|
+
- The SDK process receives an allowlisted environment (`PATH`, `HOME`, locale,
|
|
179
|
+
CA settings, `envPassthrough`) and never `TEALBRICK_*` values. Logs carry ids,
|
|
180
|
+
tool names and status codes, never prompts, tool inputs or results.
|
|
181
|
+
|
|
182
|
+
### Standing grants (`claude.standingGrants`, opt-in)
|
|
183
|
+
|
|
184
|
+
The owner can pre-approve bounded classes of approval-gated calls, so matching
|
|
185
|
+
calls run without a per-payload prompt. The kit's PreToolUse hook enforces
|
|
186
|
+
them (never the model); a grant only replaces the prompt and never widens
|
|
187
|
+
what Portal grants, the `tealbrickCalls` ceiling or an expert contract allow.
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
"standingGrants": [
|
|
191
|
+
{
|
|
192
|
+
"id": "community-telegram",
|
|
193
|
+
"description": "Post event announcements to the community channel",
|
|
194
|
+
"operation": "marketplace_execute",
|
|
195
|
+
"match": {"plugin": "community-telegram", "action": "telegram.send_*"},
|
|
196
|
+
"experts": ["publication-operator"],
|
|
197
|
+
"caps": {"perDay": 10, "perHour": 3, "minIntervalSeconds": 120},
|
|
198
|
+
"expires": "2026-12-31T23:59:59Z",
|
|
199
|
+
"deny": {"inputPattern": ["@everyone", "invoice"]}
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- **Scope.** Up to 64 grants, checked in order, only for
|
|
205
|
+
`mcp__tealbrick__tealbrick_call` calls that would otherwise pause for
|
|
206
|
+
approval (`approvalOperations` or a contract's approval rules). `operation`
|
|
207
|
+
(default `marketplace_execute`) must equal the call's operation. `match`
|
|
208
|
+
needs at least one of `registrationId` (case-sensitive), `plugin`, `action`
|
|
209
|
+
(case-insensitive); each is an exact string or a simple `*` glob, and
|
|
210
|
+
`plugin`/`action` may be lists. Plugin and action come from this runtime's
|
|
211
|
+
own Marketplace grant snapshot for the call's `registrationId`; when they
|
|
212
|
+
cannot be resolved the grant does not match.
|
|
213
|
+
- **Who.** Without `experts` a grant covers the owner session only. `experts`
|
|
214
|
+
lists contract ids whose subagents may also use it (unknown ids are refused
|
|
215
|
+
at load).
|
|
216
|
+
- **Caps.** `perDay` (1-200, rolling 24 hours), optional `perHour` and
|
|
217
|
+
`minIntervalSeconds`. A capped or expired grant falls back to the normal
|
|
218
|
+
payload approval (never a silent deny) and is traced as
|
|
219
|
+
`standing_grant.exhausted`. `deny.inputPattern` entries are case-insensitive
|
|
220
|
+
literal substrings of the call's JSON input; a hit makes the grant not apply.
|
|
221
|
+
- **Expiry.** `expires` (ISO 8601 with offset) is required; expired grants never
|
|
222
|
+
match and are not advertised to the model.
|
|
223
|
+
- **Revoke.** Remove (or edit) the grant in `native-serve.json` and restart
|
|
224
|
+
`native serve` and `native acp`.
|
|
225
|
+
- **Counters.** Usage timestamps per grant id persist in
|
|
226
|
+
`.tealbrick/native-serve/standing-grants.json` (0600, pruned to 24 hours) and
|
|
227
|
+
are shared by `native serve` and `native acp` on the same kit root. Each
|
|
228
|
+
check-and-record runs under an exclusive `standing-grants.json.lock` file
|
|
229
|
+
(`O_EXCL`, retried for up to 3 s; a lock older than 30 s is treated as
|
|
230
|
+
abandoned) and writes are tmp + rename. If the lock or the file is
|
|
231
|
+
unavailable, no standing approval is given.
|
|
232
|
+
- **Audit.** Each use logs `claude.tool` with `approval: "standing:<id>"` and
|
|
233
|
+
traces `owner.approval` with `approval: "standing"`, `grantId`, operation,
|
|
234
|
+
registration, plugin and action (no payload). `GET /tealbrick/v1/capabilities`
|
|
235
|
+
lists every grant with its caps, remaining uses today, expiry and expired
|
|
236
|
+
flag (deny patterns as a count only). The owner session's system prompt
|
|
237
|
+
lists unexpired grants and states that anything else still needs approval,
|
|
238
|
+
and that spending, contracts or signatures and first contact with strangers
|
|
239
|
+
are never covered unless a grant explicitly says so.
|
|
240
|
+
- **`native acp`** has no approval surface: calls covered by a grant proceed,
|
|
241
|
+
everything else is still declined.
|
|
242
|
+
|
|
243
|
+
### Sandboxed workspace (`claude.workspace`, opt-in)
|
|
244
|
+
|
|
245
|
+
With `"workspace": {"dir": "/abs/root/work", "network": {"allowedDomains": [...]}, "envAllow": [...]}`
|
|
246
|
+
(inside the kit root; never `.tealbrick` or `inbox`), Restricted sessions become
|
|
247
|
+
**Workspace (sandboxed)** sessions:
|
|
248
|
+
|
|
249
|
+
- Tools: `Bash` (always in the Claude Code OS sandbox; `dangerouslyDisableSandbox`
|
|
250
|
+
and background commands are refused), `WebSearch`, `WebFetch`, `Agent` and the
|
|
251
|
+
Teal Brick tools. There is **no** `Read`, `Write`, `Edit`, `Glob`, `Grep`,
|
|
252
|
+
`NotebookEdit` or other in-process file tool: those run outside the sandbox
|
|
253
|
+
(symlink and check/use races), so they are removed, listed in
|
|
254
|
+
`disallowedTools` and denied by the tool gate. The model does all file work
|
|
255
|
+
with shell commands. Experts and contracts get their tools intersected with
|
|
256
|
+
this set, so they lose their file tools in this mode too.
|
|
257
|
+
- `WebFetch` refuses non-http(s) URLs, `localhost`, `*.local`, `*.localhost`,
|
|
258
|
+
`*.internal`, `*.ts.net`, single-label names and loopback, private,
|
|
259
|
+
link-local and CGNAT (100.64/10) IP literals (IPv4 and IPv6).
|
|
260
|
+
- Sandbox filesystem: writes only to the workspace (and its `.tmp`, used as
|
|
261
|
+
`TMPDIR`; git uses `.tmp/gitconfig` as its global config). Reads are denied for
|
|
262
|
+
the SDK process's `HOME`, the owners directory (the kit root's parent),
|
|
263
|
+
`<root>/.tealbrick`, `/Volumes` and `/private/var/folders`; `allowRead`
|
|
264
|
+
re-opens only the workspace, the attachment inbox, the node install prefix,
|
|
265
|
+
Claude Code's `shell-snapshots` and present `/opt/homebrew/{bin,lib,include,share,opt,Cellar}`.
|
|
266
|
+
The SDK documents that `allowRead` takes precedence over `denyRead` for
|
|
267
|
+
matching paths; a unit test pins the generated options.
|
|
268
|
+
- Every `envPassthrough` name is removed from sandboxed commands
|
|
269
|
+
(`credentials.envVars` deny) unless listed in `envAllow`; `BUZZ_*` keys,
|
|
270
|
+
`ANTHROPIC_API_KEY`, `CLAUDE_CODE_OAUTH_TOKEN` and `TEALBRICK_*` are always removed.
|
|
271
|
+
The SDK keeps the host's Claude Code sign-in (`CLAUDE_CONFIG_DIR` is not changed).
|
|
272
|
+
- Buzz attachments (`native acp`) are downloaded by the kit into `<root>/inbox`
|
|
273
|
+
(0700, readable but not writable by the sandbox); the model copies them into
|
|
274
|
+
the workspace with Bash.
|
|
275
|
+
- macOS tools that write to the per-user system temp folder instead of `TMPDIR`
|
|
276
|
+
(for example `sips`) fail in the sandbox, because `/private/var/folders` is
|
|
277
|
+
shared by every owner on the host and stays denied. Install workspace-local
|
|
278
|
+
tools instead (a `.venv` with Pillow, or `npm install sharp`); PyPI and the npm
|
|
279
|
+
registry need to be in `allowedDomains`.
|
|
280
|
+
- Owners on one host run as one OS user. Claude Code's sandbox points Bash `TMPDIR`
|
|
281
|
+
at `/tmp/claude-<uid>`, where every session also keeps its tool output (one
|
|
282
|
+
folder per working directory). The kit makes that root unreadable except this
|
|
283
|
+
owner's own folder, write-denies the other owners' folders (it stays writable
|
|
284
|
+
for Claude Code's own cwd tracking), and rewrites each sandboxed Bash command to
|
|
285
|
+
use the workspace `.tmp` as `TMPDIR`/`TMP`/`TEMP`.
|
|
286
|
+
- No git inside the workspace: Claude Code's sandbox refuses writes to `.git/config`
|
|
287
|
+
and `.git/hooks`, and the kit does not work around it. Version an owner's
|
|
288
|
+
workspace from outside the sandbox (for example a host job that snapshots and
|
|
289
|
+
commits it).
|
|
290
|
+
|
|
291
|
+
### Configure
|
|
292
|
+
|
|
293
|
+
`.tealbrick/native-serve.json` (owner-only, `chmod 600`) holds no secrets:
|
|
294
|
+
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"version": 1,
|
|
298
|
+
"port": 5331,
|
|
299
|
+
"claude": {
|
|
300
|
+
"cwd": "/Users/you/agents/agent-serve/workspace",
|
|
301
|
+
"instructionsFile": "/Users/you/agents/agent-profile/agents/agent/INSTRUCTIONS.md",
|
|
302
|
+
"recipe": {"path": "/Users/you/.config/tealbrick-native/config.json", "agent": "agent"},
|
|
303
|
+
"requireSubscription": true,
|
|
304
|
+
"defaultTools": ["WebSearch", "WebFetch", "Agent"],
|
|
305
|
+
"experts": {
|
|
306
|
+
"source-researcher": {"promptFile": "/Users/you/agents/agent-profile/experts/source-researcher.md", "tools": ["WebSearch", "WebFetch"]},
|
|
307
|
+
"independent-reviewer": {"promptFile": "/Users/you/agents/agent-profile/experts/independent-reviewer.md"}
|
|
308
|
+
},
|
|
309
|
+
"nativeTools": ["Read", "Glob", "Grep", "Write", "Edit", "TodoWrite", "WebSearch", "WebFetch"]
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
`recipe` imports `model`, `effort`, `maxTurns`, `maxBudgetUsd`,
|
|
315
|
+
`timeoutSeconds` and the agent's `mcpServers`, `readTools` and
|
|
316
|
+
`tealbrickCalls` from an existing tealbrick-native recipe; its
|
|
317
|
+
`tealbrickSdkConfig` must point at this kit root's `native-sdk.json`. Any of
|
|
318
|
+
those keys set directly under `claude` override the recipe. Keep `cwd` stable:
|
|
319
|
+
Claude session transcripts are stored per working directory. `requireSubscription`
|
|
320
|
+
refuses turns unless the SDK reports first-party subscription sign-in.
|
|
321
|
+
Codex roots use `"codex": {"codexBin": "/abs/codex", "cwd": "/abs/dir"}`.
|
|
322
|
+
|
|
323
|
+
Install the Claude Agent SDK next to the kit (or set `claude.sdkModule` to an
|
|
324
|
+
absolute SDK package directory):
|
|
325
|
+
|
|
326
|
+
```sh
|
|
327
|
+
npm install --save-exact @anthropic-ai/claude-agent-sdk@0.3.287
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Run, expose, enroll
|
|
331
|
+
|
|
332
|
+
```sh
|
|
333
|
+
# 1. Tailnet HTTPS in front of the loopback port (pick a free HTTPS port).
|
|
334
|
+
tailscale serve --bg --https=8444 http://127.0.0.1:5331
|
|
335
|
+
# 2. Record the Portal identity and register the URL on the EXISTING agent.
|
|
336
|
+
npx --no-install tealbrick native enroll --url https://HOST.TAILNET.ts.net:8444
|
|
337
|
+
# 3. Start the endpoint (foreground) ...
|
|
338
|
+
npx --no-install tealbrick native serve
|
|
339
|
+
# ... or supervise it with a user LaunchAgent (macOS, opt-in).
|
|
340
|
+
npx --no-install tealbrick native serve --install-launchd
|
|
341
|
+
npx --no-install tealbrick native serve --uninstall
|
|
342
|
+
# 4. Re-run enroll to confirm /healthz and authenticated /tealbrick/v1/info.
|
|
343
|
+
npx --no-install tealbrick native enroll --url https://HOST.TAILNET.ts.net:8444
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
`enroll` signs in with Portal device approval, requires the kit root's owned
|
|
347
|
+
agent and canvas card to carry the native harness label, registers the origin
|
|
348
|
+
through Portal's owned-connection API (which keeps the harness label; it never
|
|
349
|
+
uses the Eve registration route, which relabels agents as Eve), records
|
|
350
|
+
`agent` and `publicUrl` in `native-serve.json`, updates the card endpoint with
|
|
351
|
+
a revision-checked draft write and verifies the sidebar URL. It then probes the
|
|
352
|
+
endpoint; exit code 2 means Portal is updated but the endpoint was not yet
|
|
353
|
+
reachable or authenticated. The user token is never written to disk.
|
|
354
|
+
LaunchAgent logs go to `.tealbrick/native-serve/logs/`; session projections
|
|
355
|
+
(customer data) to `.tealbrick/native-serve/sessions/`.
|
package/RUNTIME.md
CHANGED
|
@@ -26,7 +26,7 @@ The Portal signs a metadata-only configuration lease (maximum five minutes). The
|
|
|
26
26
|
|
|
27
27
|
### Canary verification, 2026-09-18
|
|
28
28
|
|
|
29
|
-
Private candidate tarballs installed only in
|
|
29
|
+
Private candidate tarballs installed only in a private canary agent on the deployment host exposed the three memory reads. The authenticated desktop conversation retrieved a synthetic Knowledge document with its citation; a subsequent scoped fact-only recall returned six facts extracted by native GBrain. Update/Delete, cross-partition reads and agent extraction/admin requests were denied. This is not an npm publication or a general memory-quality certification. Query expansion degraded on one live request; serialized background extraction temporarily blocked entity enumeration, and the completed entity register remained empty despite fact-linked entity slugs. See the LABS report `report/readiness-2026-09-18-knowledge-live-canary.md` for exact deployment and remaining defects.
|
|
30
30
|
|
|
31
31
|
## Native workflows
|
|
32
32
|
|