shadok-ai 0.9.10 → 0.9.11

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.
@@ -135,3 +135,19 @@ The server kills the claude process when its last WS client detaches; so
135
135
  `hold` command), restarted as needed by every command. Local state:
136
136
  `~/.shadok-ai/pilotctl/<id>.json` (cwd, branch, baseSha, holderPid). Log of the
137
137
  auto-started server: `~/.shadok-ai/pilotctl/server.log`.
138
+
139
+ ## Authenticating a direct API call
140
+
141
+ The commands above do this for you. If you call the cockpit's API yourself, send
142
+ your session key — it is in your environment and it does not expire:
143
+
144
+ ```bash
145
+ curl -sS -H "x-shadok-session-key: $SHADOK_SESSION_KEY" \
146
+ "http://127.0.0.1:$SHADOK_PORT/channels"
147
+ ```
148
+
149
+ `$SHADOK_AUTH` (a cookie) is still accepted, but it was frozen into your
150
+ environment at spawn and expires after a week, so never rely on it alone. A
151
+ `401` means that header is missing — or that you were started before this
152
+ existed, in which case nothing you hold can authenticate any more and only a
153
+ human can fix it: ask them for *Reload agent* on your ⋯ menu.
@@ -38,6 +38,10 @@ Claude Code sessions in parallel. A human pilots you from a browser chat
38
38
  sessions named `sk-*`). Never kill them, and never restart the shadok-ai
39
39
  server (port 3789) — that would kill sibling sessions mid-work. Avoid
40
40
  grabbing shared ports or mutating machine-global state.
41
+ - The cockpit exposes a local API at `http://127.0.0.1:$SHADOK_PORT`. If you
42
+ call it yourself, authenticate with `-H "x-shadok-session-key:
43
+ $SHADOK_SESSION_KEY"` — a `401` means that header is missing. (The shadok
44
+ skills already do this for you.)
41
45
 
42
46
  ## Language — two different rules, don't mix them up
43
47
  - **Anything you write into a repo is in English**: code comments, identifiers,
@@ -17,3 +17,19 @@ Only your own session can be reloaded this way: it is scoped by the per-session
17
17
  key in your environment (`SHADOK_SESSION_KEY`), not by the public session id.
18
18
  Your current turn ends as the process is replaced; you come back with your
19
19
  history intact and the new prompt/skills active.
20
+
21
+ ## Authenticating a direct API call
22
+
23
+ The commands above do this for you. If you call the cockpit's API yourself, send
24
+ your session key — it is in your environment and it does not expire:
25
+
26
+ ```bash
27
+ curl -sS -H "x-shadok-session-key: $SHADOK_SESSION_KEY" \
28
+ "http://127.0.0.1:$SHADOK_PORT/channels"
29
+ ```
30
+
31
+ `$SHADOK_AUTH` (a cookie) is still accepted, but it was frozen into your
32
+ environment at spawn and expires after a week, so never rely on it alone. A
33
+ `401` means that header is missing — or that you were started before this
34
+ existed, in which case nothing you hold can authenticate any more and only a
35
+ human can fix it: ask them for *Reload agent* on your ⋯ menu.
@@ -126,3 +126,19 @@ node scripts/schedule.mjs add --schedule daily:18:00 \
126
126
 
127
127
  After creating a schedule, confirm to the user in plain language: what it watches,
128
128
  when it runs, and that quiet runs won't cost tokens (if a check was set).
129
+
130
+ ## Authenticating a direct API call
131
+
132
+ The commands above do this for you. If you call the cockpit's API yourself, send
133
+ your session key — it is in your environment and it does not expire:
134
+
135
+ ```bash
136
+ curl -sS -H "x-shadok-session-key: $SHADOK_SESSION_KEY" \
137
+ "http://127.0.0.1:$SHADOK_PORT/channels"
138
+ ```
139
+
140
+ `$SHADOK_AUTH` (a cookie) is still accepted, but it was frozen into your
141
+ environment at spawn and expires after a week, so never rely on it alone. A
142
+ `401` means that header is missing — or that you were started before this
143
+ existed, in which case nothing you hold can authenticate any more and only a
144
+ human can fix it: ask them for *Reload agent* on your ⋯ menu.
@@ -45,3 +45,19 @@ A secret the **user typed in the chat** is already exposed — it is in the
45
45
  transcript, and in Telegram's history. Storing it does not un-expose it. Point
46
46
  them at the web Secrets panel, or Telegram's `/secret NAME value`, which deletes
47
47
  their message afterwards.
48
+
49
+ ## Authenticating a direct API call
50
+
51
+ The commands above do this for you. If you call the cockpit's API yourself, send
52
+ your session key — it is in your environment and it does not expire:
53
+
54
+ ```bash
55
+ curl -sS -H "x-shadok-session-key: $SHADOK_SESSION_KEY" \
56
+ "http://127.0.0.1:$SHADOK_PORT/channels"
57
+ ```
58
+
59
+ `$SHADOK_AUTH` (a cookie) is still accepted, but it was frozen into your
60
+ environment at spawn and expires after a week, so never rely on it alone. A
61
+ `401` means that header is missing — or that you were started before this
62
+ existed, in which case nothing you hold can authenticate any more and only a
63
+ human can fix it: ask them for *Reload agent* on your ⋯ menu.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.9.10",
3
+ "version": "0.9.11",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test test/*.ts context/*/test/*.test.mjs",