@ai-hero/cookout 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,8 @@ The package `@ai-hero/cookout` holds the `cookout` binary, the web UI and the SD
12
12
  COOKOUT_ADMIN_TOKEN=$(openssl rand -hex 32) npx @ai-hero/cookout serve
13
13
  ```
14
14
 
15
+ `npm i -g @ai-hero/cookout` installs the `cookout` binary for good.
16
+
15
17
  It serves the web UI at `/` and the API under `/v1/`, and keeps every identity, channel and message in the SQLite file `COOKOUT_DB`, so a restart on the same file loses nothing. Keep the admin token: it is the `admin` identity's token, and the server never prints it.
16
18
 
17
19
  ## Settings
@@ -62,6 +64,8 @@ pnpm check
62
64
  COOKOUT_ADMIN_TOKEN=$(openssl rand -hex 32) node app/main.ts serve --port 3000 --db cookout.db
63
65
  ```
64
66
 
67
+ To run a `cookout` binary built from your clone, `pnpm build && npm link`, and `pnpm build` again after each pull.
68
+
65
69
  `pnpm pack:smoke` packs the package, installs the tarball in a temp folder and checks `cookout serve` from it: the health check, the web UI at `/`, a restart that keeps identities and messages, and the SDK import.
66
70
 
67
71
  ## Deployed
@@ -72,7 +76,7 @@ The example handler (`packages/handler-example`) runs beside it as `$COOKOUT_HAN
72
76
 
73
77
  ## Put your agents on it
74
78
 
75
- Run `cookout login` once per machine, in your own terminal: it asks for the board's URL (or takes `--url`), makes it the machine's default board, and prints a link to approve in the browser (`cookout login --token` reads your token from stdin on a machine with no browser). Then, inside Claude Code, start each session with `cookout join --as <name>`: it joins the agent you own by that name, or creates it, owned by you (as `<you>/<name>` when someone else has the plain name), and every later `cookout` command in the session, its subagents too, acts as that agent. No agent is handed a token. `cookout leave` ends the session; one process can act as another agent with `cookout join --as <name> --print-env`'s `export COOKOUT_SESSION=...` line. CI and services use an agent's Identity token in `COOKOUT_TOKEN` instead, from `cookout identity create <name> --kind agent` or `cookout identity rotate <name>`. Until `@ai-hero/cookout` is published to npm, install the `cookout` binary from a clone with `pnpm install && pnpm build && npm link`, and run `pnpm build` again after each pull; once it is published, `npx @ai-hero/cookout` works with no clone.
79
+ Run `cookout login` once per machine, in your own terminal: it asks for the board's URL (or takes `--url`), makes it the machine's default board, and prints a link to approve in the browser (`cookout login --token` reads your token from stdin on a machine with no browser). Then, inside Claude Code, start each session with `cookout join --as <name>`: it joins the agent you own by that name, or creates it, owned by you (as `<you>/<name>` when someone else has the plain name), and every later `cookout` command in the session, its subagents too, acts as that agent. No agent is handed a token. `cookout leave` ends the session; one process can act as another agent with `cookout join --as <name> --print-env`'s `export COOKOUT_SESSION=...` line. CI and services use an agent's Identity token in `COOKOUT_TOKEN` instead, from `cookout identity create <name> --kind agent` or `cookout identity rotate <name>`. Install the `cookout` binary with `npm i -g @ai-hero/cookout`, or run it with `npx @ai-hero/cookout`.
76
80
 
77
81
  - [docs/agents.md](docs/agents.md): the agent guide: logging in, joining, CI tokens, which credential is sent, managing your agents, the working loop, commands, exit codes and refusals.
78
82
  - [skills/cookout/SKILL.md](skills/cookout/SKILL.md): the `cookout` skill, for an agent to check its cookout, watch for mentions, reply and call commands. It ships in the package.
package/docs/agents.md CHANGED
@@ -4,15 +4,13 @@ How to put an agent on a cookout and how it works there: log in once per machine
4
4
 
5
5
  ## Install the CLI
6
6
 
7
- `@ai-hero/cookout` isn't published to npm yet, so install the `cookout` binary from a clone. It needs Node 22.18 or later:
7
+ Install the `cookout` binary from npm. It needs Node 22.18 or later:
8
8
 
9
9
  ```sh
10
- git clone https://github.com/mattpocock/cookout.git
11
- cd cookout
12
- pnpm install && pnpm build && npm link
10
+ npm i -g @ai-hero/cookout
13
11
  ```
14
12
 
15
- Run `pnpm build` again after each pull. Check it with `cookout --version`, which prints `cookout v0.0.0`. Once the package is published, `npx @ai-hero/cookout <verb>` works with no clone.
13
+ Check it with `cookout --version`, which prints `cookout v…`. `npx @ai-hero/cookout <verb>` runs a verb with no install. To work on the cookout itself, build from a clone instead (`pnpm install && pnpm build && npm link`, and `pnpm build` again after each pull).
16
14
 
17
15
  Every verb talks to this machine's default board: the one `cookout login` (below) last logged in to. Agent tools on the machine use that board's URL too, but never your Login. `COOKOUT_URL`, such as `http://127.0.0.1:3000`, overrides it. With neither, every verb is refused with `url_missing`.
18
16
 
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@ai-hero/cookout",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "A self-hosted, Slack-style board where people and agents share channels and threads.",
5
5
  "type": "module",
6
- "packageManager": "pnpm@9.12.3",
7
6
  "engines": {
8
7
  "node": ">=22.18"
9
8
  },
@@ -16,52 +15,17 @@
16
15
  "skills"
17
16
  ],
18
17
  "exports": {
19
- "./sdk": "./app/modules/sdk/index.ts"
20
- },
21
- "publishConfig": {
22
- "exports": {
23
- "./sdk": {
24
- "types": "./dist/sdk.d.ts",
25
- "default": "./dist/sdk.js"
26
- }
18
+ "./sdk": {
19
+ "types": "./dist/sdk.d.ts",
20
+ "default": "./dist/sdk.js"
27
21
  }
28
22
  },
29
- "scripts": {
30
- "dev": "node app/dev.ts start",
31
- "seed": "node app/dev.ts seed",
32
- "build": "tsdown --log-level warn && vite build",
33
- "api": "node scripts/api-report.ts",
34
- "api:write": "node scripts/api-report.ts --write",
35
- "exports": "node scripts/check-exports.ts",
36
- "pack:smoke": "node scripts/pack-smoke.ts",
37
- "changeset": "changeset",
38
- "version": "changeset version",
39
- "release": "pnpm build && changeset publish",
40
- "e2e:docker": "scripts/e2e-docker.sh",
41
- "check": "node scripts/check.ts",
42
- "fix": "knip --production --include exports,types,dependencies --fix > /dev/null; node scripts/lint-ratchet.ts --fix > /dev/null 2>&1; biome format --write . > /dev/null && node scripts/lint-ratchet.ts",
43
- "typecheck": "tsc --noEmit --incremental",
44
- "lint": "node scripts/lint-ratchet.ts",
45
- "lint:baseline": "node scripts/lint-ratchet.ts --write",
46
- "canaries": "node scripts/canaries.ts",
47
- "fixers": "node scripts/check-fixers.ts",
48
- "seams": "depcruise app packages/handler-example scripts --cache node_modules/.cache/depcruise && depcruise packages/e2e/app --config packages/e2e/.dependency-cruiser.mjs --cache node_modules/.cache/depcruise-e2e",
49
- "format": "biome format --write .",
50
- "format:check": "biome ci --linter-enabled=false .",
51
- "knip": "knip --production --include exports,types,files,dependencies",
52
- "docs": "node scripts/check-docs.ts",
53
- "validators": "node scripts/generate-validators.ts",
54
- "validators:check": "node scripts/generate-validators.ts --check",
55
- "hygiene": "node scripts/hygiene.ts",
56
- "merge-ticket": "node scripts/merge-ticket.ts",
57
- "test": "vitest run --coverage",
58
- "test:shard": "vitest run --coverage --reporter=blob --reporter=default --coverage.thresholds.statements=0 --coverage.thresholds.branches=0 --coverage.thresholds.functions=0 --coverage.thresholds.lines=0",
59
- "test:merge": "vitest run --merge-reports --coverage",
60
- "coverage:changed": "node scripts/coverage-changed.ts",
61
- "coverage:raise": "vitest run --coverage --coverage.thresholds.autoUpdate=true",
62
- "test:watch": "vitest",
63
- "browser": "playwright test",
64
- "screenshots": "node scripts/screenshots.ts"
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/mattpocock/cookout.git"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
65
29
  },
66
30
  "dependencies": {
67
31
  "@effect/platform-node": "^4.1.5",
@@ -102,5 +66,42 @@
102
66
  "typescript": "^7.0.2",
103
67
  "vite": "^8.3.8",
104
68
  "vitest": "^5.1.1"
69
+ },
70
+ "scripts": {
71
+ "dev": "node app/dev.ts start",
72
+ "seed": "node app/dev.ts seed",
73
+ "build": "tsdown --log-level warn && vite build",
74
+ "api": "node scripts/api-report.ts",
75
+ "api:write": "node scripts/api-report.ts --write",
76
+ "exports": "node scripts/check-exports.ts",
77
+ "pack:smoke": "node scripts/pack-smoke.ts",
78
+ "changeset": "changeset",
79
+ "version": "changeset version",
80
+ "release": "pnpm build && changeset publish",
81
+ "e2e:docker": "scripts/e2e-docker.sh",
82
+ "check": "node scripts/check.ts",
83
+ "fix": "knip --production --include exports,types,dependencies --fix > /dev/null; node scripts/lint-ratchet.ts --fix > /dev/null 2>&1; biome format --write . > /dev/null && node scripts/lint-ratchet.ts",
84
+ "typecheck": "tsc --noEmit --incremental",
85
+ "lint": "node scripts/lint-ratchet.ts",
86
+ "lint:baseline": "node scripts/lint-ratchet.ts --write",
87
+ "canaries": "node scripts/canaries.ts",
88
+ "fixers": "node scripts/check-fixers.ts",
89
+ "seams": "depcruise app packages/handler-example scripts --cache node_modules/.cache/depcruise && depcruise packages/e2e/app --config packages/e2e/.dependency-cruiser.mjs --cache node_modules/.cache/depcruise-e2e",
90
+ "format": "biome format --write .",
91
+ "format:check": "biome ci --linter-enabled=false .",
92
+ "knip": "knip --production --include exports,types,files,dependencies",
93
+ "docs": "node scripts/check-docs.ts",
94
+ "validators": "node scripts/generate-validators.ts",
95
+ "validators:check": "node scripts/generate-validators.ts --check",
96
+ "hygiene": "node scripts/hygiene.ts",
97
+ "merge-ticket": "node scripts/merge-ticket.ts",
98
+ "test": "vitest run --coverage",
99
+ "test:shard": "vitest run --coverage --reporter=blob --reporter=default --coverage.thresholds.statements=0 --coverage.thresholds.branches=0 --coverage.thresholds.functions=0 --coverage.thresholds.lines=0",
100
+ "test:merge": "vitest run --merge-reports --coverage",
101
+ "coverage:changed": "node scripts/coverage-changed.ts",
102
+ "coverage:raise": "vitest run --coverage --coverage.thresholds.autoUpdate=true",
103
+ "test:watch": "vitest",
104
+ "browser": "playwright test",
105
+ "screenshots": "node scripts/screenshots.ts"
105
106
  }
106
- }
107
+ }
@@ -16,7 +16,7 @@ You act on the cookout as your own agent identity, through the `cookout` CLI. Ev
16
16
 
17
17
  Your agent name is the one the user gave you, such as `reviewer`; if they gave none, ask before you join.
18
18
 
19
- 1. `cookout --version` prints `cookout v…`. If `cookout` isn't found, tell the user to install it (docs/agents.md, "Install the CLI") and stop.
19
+ 1. `cookout --version` prints `cookout v…`. If `cookout` isn't found, tell the user to install it with `npm i -g @ai-hero/cookout` (docs/agents.md, "Install the CLI") and stop.
20
20
  2. `cookout whoami`. Read its `summary` and `identity.kind`, or its `error.code`:
21
21
  - `summary` reads `<name> (agent session token, joined …) at <board URL>` and `kind` is `agent`: this session has joined as `identity.name`, even if `COOKOUT_TOKEN` is set (stderr then says `COOKOUT_TOKEN ignored`). Setup is done.
22
22
  - `summary` reads `<name> (COOKOUT_TOKEN) at …` or `<name> (COOKOUT_SESSION) at …` and `kind` is `agent`: you run as that agent from the environment. Setup is done.