shadok-ai 0.17.51 → 0.17.53
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 +27 -1
- package/context/instance-context-skill/SKILL.md +46 -0
- package/context/instance-context-skill/scripts/write.mjs +35 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.js +18 -0
- package/dist/config.js.map +1 -1
- package/dist/greeting.d.ts +9 -0
- package/dist/greeting.js +17 -0
- package/dist/greeting.js.map +1 -1
- package/dist/instance-context.d.ts +32 -0
- package/dist/instance-context.js +47 -0
- package/dist/instance-context.js.map +1 -0
- package/dist/preprompt.d.ts +2 -0
- package/dist/preprompt.js +12 -18
- package/dist/preprompt.js.map +1 -1
- package/dist/server.js +216 -28
- package/dist/server.js.map +1 -1
- package/dist/ssh.d.ts +57 -0
- package/dist/ssh.js +47 -0
- package/dist/ssh.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +99 -0
package/README.md
CHANGED
|
@@ -104,6 +104,13 @@ Enter to skip; you can add it later from the web UI).
|
|
|
104
104
|
stay collapsed, so the picker says so. There is deliberately no thinking
|
|
105
105
|
on/off switch: current models always think, and the settings that used to
|
|
106
106
|
disable it are ignored by them — a toggle would change nothing.
|
|
107
|
+
- **Instance context** — a handful of lines every agent on this cockpit
|
|
108
|
+
receives at spawn, on top of its role: what the instance is for, who works on
|
|
109
|
+
it, its language. On a new instance the lead agent asks two or three questions
|
|
110
|
+
in its first message and writes it once; after that only a human edits it
|
|
111
|
+
(version menu → **🧭 Instance context…**). Running agents see a change at their
|
|
112
|
+
next reload. If it is still empty, **Ask general to draft it** runs the same
|
|
113
|
+
short interview.
|
|
107
114
|
- **Agent profiles** — a named bundle of role prompt, permission guardrails
|
|
108
115
|
(e.g. forbid `git commit`), model, and which secrets to inject. Applied at
|
|
109
116
|
spawn, remembered across resume. A profile can also carry **MCP servers**
|
|
@@ -599,6 +606,24 @@ across OS users (Claude rewrites the credential single-owner on refresh), which
|
|
|
599
606
|
is why each user logs in separately. Design:
|
|
600
607
|
`docs/superpowers/specs/2026-11-04-connectors-via-global-login-design.md`.
|
|
601
608
|
|
|
609
|
+
**Git over SSH, per group.** Each group has its own SSH identity: the shared
|
|
610
|
+
*commons* (every public group) reuses the cockpit's historical container key —
|
|
611
|
+
the one already registered on your forge — and every **walled** group (restricted
|
|
612
|
+
or private) gets a key of its own. The keypairs live on the `shadok-data` volume,
|
|
613
|
+
so they survive a recreate even though the agent homes do not, and the private
|
|
614
|
+
half never leaves the server's own 0700 home: a copy is written into each
|
|
615
|
+
agent's `~/.ssh` as that OS user.
|
|
616
|
+
|
|
617
|
+
A key is only an identity once a remote accepts it, so **read a group's public
|
|
618
|
+
key and register it** where its agents must clone or push: `GET /groups/ssh`
|
|
619
|
+
returns one row per group you can see — `{group, name, osUser, publicKey,
|
|
620
|
+
shared}` — and `shared: true` marks the historical key, which you register once
|
|
621
|
+
for every public group. The rows go through the same visibility filter as
|
|
622
|
+
`GET /groups` (a private group stays invisible even to an admin), and only the
|
|
623
|
+
`.pub` half is ever read. A `publicKey: null` means no keypair has been minted
|
|
624
|
+
yet, not an error. Until a group's key is registered, its agents simply cannot
|
|
625
|
+
reach that remote over SSH.
|
|
626
|
+
|
|
602
627
|
**Persist the group homes (recommended in Docker).** Each dropped agent runs as
|
|
603
628
|
its own OS user with HOME under `SHADOK_HOME_BASE` (default `/home`), which is
|
|
604
629
|
**not** on the `shadok-data` volume by default — so a `docker rm` + recreate
|
|
@@ -1207,7 +1232,8 @@ client, or immediately on an explicit `stop` (which ends it for everyone).
|
|
|
1207
1232
|
|
|
1208
1233
|
HTTP endpoints (same auth): `/usage`, `/live`, `/sessions`, `/recover`,
|
|
1209
1234
|
`/diff`, `/channels` (its GET adds a **derived** `crons` field — never stored),
|
|
1210
|
-
`/channel` (DELETE), `/groups`, `/
|
|
1235
|
+
`/channel` (DELETE), `/groups`, `/groups/ssh` (GET — the SSH **public** key to
|
|
1236
|
+
register per group, filtered like `/groups`), `/crons`, `/timezone`, `/title` (GET/PUT — the
|
|
1211
1237
|
cockpit's name, per launch directory: click the header brand to rename it, so
|
|
1212
1238
|
several cockpits stay apart in the tab bar; an empty PUT reverts to the default),
|
|
1213
1239
|
`/theme` (GET/PUT — the cockpit's colour palette, per launch directory: an accent
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shadok-instance-context
|
|
3
|
+
description: Write this cockpit's instance context — the few lines every agent here receives at spawn (what the instance is for, who uses it, its language). Use ONLY when you are the lead agent and it is still empty (first run, or when asked to draft it). Never to change it afterwards.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# shadok-instance-context
|
|
7
|
+
|
|
8
|
+
Every agent on this cockpit receives a short **instance context** in its system
|
|
9
|
+
prompt: what this instance is for, who works on it, the language, and anything
|
|
10
|
+
that should shape every agent's work. Roles say *how* to work; this says *what
|
|
11
|
+
for*.
|
|
12
|
+
|
|
13
|
+
## Write it once
|
|
14
|
+
|
|
15
|
+
Only the lead agent (the instance's home channel) can write it, and only while
|
|
16
|
+
it is empty — the server refuses anything else. Write it after asking the
|
|
17
|
+
person, never from a guess:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
node ~/.claude/skills/shadok-instance-context/scripts/write.mjs --stdin <<'CTX'
|
|
21
|
+
This instance runs side projects with a few friends, to try to get small
|
|
22
|
+
businesses off the ground. Each person may start their own project.
|
|
23
|
+
Language: French in conversation; code, commits and docs in English.
|
|
24
|
+
CTX
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Keep it to **a handful of lines**:
|
|
28
|
+
- the purpose of the instance;
|
|
29
|
+
- the people involved, by role or first name;
|
|
30
|
+
- the **language**: deduce it from the language the person answered you in;
|
|
31
|
+
ask only if you cannot tell. If deliverables (code, docs, commits) use another
|
|
32
|
+
language than the conversation, say both;
|
|
33
|
+
- any tone or constraint every agent should respect.
|
|
34
|
+
|
|
35
|
+
No project wiki, no status, no secrets — the shared ledger is the place for
|
|
36
|
+
status, the vault for credentials.
|
|
37
|
+
|
|
38
|
+
Then show the person what you saved in a few lines, and tell them they can edit
|
|
39
|
+
it from the cockpit menu (**Instance context…**).
|
|
40
|
+
|
|
41
|
+
## Afterwards: suggest, never rewrite
|
|
42
|
+
|
|
43
|
+
Once it is set, nobody but a human changes it. If you learn something that
|
|
44
|
+
makes it wrong (a new person joins, the focus moves), **suggest** the new
|
|
45
|
+
wording in the chat and point to the cockpit menu. Do not try to write it
|
|
46
|
+
again — the server will refuse, and that refusal is the design.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Write the instance context ONCE — the short text every agent on this cockpit
|
|
3
|
+
// receives at spawn. The server accepts it only from the lead agent (the home
|
|
4
|
+
// channel) and only while it is empty; afterwards humans own it.
|
|
5
|
+
//
|
|
6
|
+
// The text comes on stdin, never on the command line: it can be long, and a
|
|
7
|
+
// quote or a newline in argv is a quoting accident waiting to happen.
|
|
8
|
+
const die = (m) => { console.error(m); process.exit(1); };
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
if (args.length !== 1 || args[0] !== "--stdin")
|
|
11
|
+
die('usage: write.mjs --stdin (pipe the text in, e.g. with a heredoc)');
|
|
12
|
+
|
|
13
|
+
const port = process.env.SHADOK_PORT;
|
|
14
|
+
const key = process.env.SHADOK_SESSION_KEY;
|
|
15
|
+
if (!port) die("Not inside a shadok-ai agent (SHADOK_PORT unset).");
|
|
16
|
+
if (!key) die("SHADOK_SESSION_KEY is unset — ask the human to reload this agent.");
|
|
17
|
+
|
|
18
|
+
let text = "";
|
|
19
|
+
for await (const chunk of process.stdin) text += chunk;
|
|
20
|
+
if (!text.trim()) die("Nothing on stdin — pipe the instance context in.");
|
|
21
|
+
|
|
22
|
+
let res;
|
|
23
|
+
try {
|
|
24
|
+
res = await fetch(`http://127.0.0.1:${port}/instance-context/first`, {
|
|
25
|
+
method: "PUT",
|
|
26
|
+
headers: { "content-type": "application/json", "x-shadok-session-key": key },
|
|
27
|
+
body: JSON.stringify({ text }),
|
|
28
|
+
signal: AbortSignal.timeout(15_000),
|
|
29
|
+
});
|
|
30
|
+
} catch (e) {
|
|
31
|
+
die(`The cockpit did not answer (${e?.message ?? e}). Say so rather than working around it.`);
|
|
32
|
+
}
|
|
33
|
+
const body = await res.json().catch(() => ({}));
|
|
34
|
+
if (!res.ok) die(`Refused (${res.status}): ${body.error ?? "no reason given"}`);
|
|
35
|
+
console.log("instance context saved — every agent spawned from now on receives it.");
|
package/dist/config.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export interface Config {
|
|
|
62
62
|
* stay distinguishable. Absent = the default "shadok-ai".
|
|
63
63
|
*/
|
|
64
64
|
cockpitTitle?: Record<string, string>;
|
|
65
|
+
/** Per launch dir: the instance context every agent gets (src/instance-context.ts). */
|
|
66
|
+
instanceContext?: Record<string, string>;
|
|
65
67
|
/**
|
|
66
68
|
* Per launch-directory colour palette (an accent key like "emerald"), keyed by
|
|
67
69
|
* absolute cwd. Absent = the default "amber". Like the name, it re-themes only
|
|
@@ -120,6 +122,12 @@ export declare function setTokenForCwd(cfg: Config, cwd: string, token: string |
|
|
|
120
122
|
export declare function effectiveToken(cfg: Config, cwd: string, env?: NodeJS.ProcessEnv): string | null;
|
|
121
123
|
/** This directory's cockpit name, or null when none is set (→ default brand). */
|
|
122
124
|
export declare function titleForCwd(cfg: Config, cwd: string): string | null;
|
|
125
|
+
/** This directory's instance context, "" when unset (src/instance-context.ts). */
|
|
126
|
+
export declare function instanceContextForCwd(cfg: Config, cwd: string): string;
|
|
127
|
+
/** Pure: set (or, with "", remove) this directory's instance context on `cfg`. */
|
|
128
|
+
export declare function applyInstanceContext(cfg: Config, cwd: string, text: string): Config;
|
|
129
|
+
/** Set (or clear) this directory's instance context and persist. */
|
|
130
|
+
export declare function setInstanceContextForCwd(cfg: Config, cwd: string, text: string): void;
|
|
123
131
|
/**
|
|
124
132
|
* Set (or clear) this directory's cockpit name and persist. An empty/blank
|
|
125
133
|
* title removes the entry so the cockpit falls back to the default brand.
|
package/dist/config.js
CHANGED
|
@@ -41,6 +41,24 @@ export function titleForCwd(cfg, cwd) {
|
|
|
41
41
|
const t = cfg.cockpitTitle?.[cwd];
|
|
42
42
|
return t && t.trim() ? t.trim() : null;
|
|
43
43
|
}
|
|
44
|
+
/** This directory's instance context, "" when unset (src/instance-context.ts). */
|
|
45
|
+
export function instanceContextForCwd(cfg, cwd) {
|
|
46
|
+
return cfg.instanceContext?.[cwd]?.trim() ?? "";
|
|
47
|
+
}
|
|
48
|
+
/** Pure: set (or, with "", remove) this directory's instance context on `cfg`. */
|
|
49
|
+
export function applyInstanceContext(cfg, cwd, text) {
|
|
50
|
+
const t = text.trim();
|
|
51
|
+
cfg.instanceContext ??= {};
|
|
52
|
+
if (t)
|
|
53
|
+
cfg.instanceContext[cwd] = t;
|
|
54
|
+
else
|
|
55
|
+
delete cfg.instanceContext[cwd];
|
|
56
|
+
return cfg;
|
|
57
|
+
}
|
|
58
|
+
/** Set (or clear) this directory's instance context and persist. */
|
|
59
|
+
export function setInstanceContextForCwd(cfg, cwd, text) {
|
|
60
|
+
saveConfig(applyInstanceContext(cfg, cwd, text));
|
|
61
|
+
}
|
|
44
62
|
/**
|
|
45
63
|
* Set (or clear) this directory's cockpit name and persist. An empty/blank
|
|
46
64
|
* title removes the entry so the cockpit falls back to the default brand.
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,M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W,EAAE,WAAoB;IAC/E,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,CAAC,WAAW;QAAE,OAAO;IAC5D,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,IAAI,CAAC;QACH,KAAK,GAAG,gBAAgB,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;IACD,IAAI,CAAC,KAAK,IAAI,OAAO,GAAG,CAAC,aAAa,KAAK,QAAQ;QAAE,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC;IAC/E,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,CAAC,GAAG,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACjC,OAAO,GAAG,CAAC,aAAa,CAAC,CAAC,2BAA2B;IACrD,IAAI,CAAC;QACH,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,0BAA0B;IACjF,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;IACD,UAAU,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/greeting.d.ts
CHANGED
|
@@ -93,7 +93,16 @@ export interface GreetingBriefInput {
|
|
|
93
93
|
profiles: readonly Profile[];
|
|
94
94
|
/** The launch directory's own name — what the person calls this place. */
|
|
95
95
|
dirName: string;
|
|
96
|
+
/** No instance context yet (src/instance-context.ts): ask about it first. */
|
|
97
|
+
instanceContextEmpty?: boolean;
|
|
96
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* The few questions that give birth to the instance context — what the cockpit
|
|
101
|
+
* is for, who works on it — with the language deduced from the answer. Shared by
|
|
102
|
+
* the first-run greeting and the cockpit's "Ask general to draft it", so both
|
|
103
|
+
* ask the same way. Optional by construction: nothing waits on the answer.
|
|
104
|
+
*/
|
|
105
|
+
export declare function instanceContextInterviewBrief(): string;
|
|
97
106
|
/**
|
|
98
107
|
* The hidden prompt that produces the greeting.
|
|
99
108
|
*
|
package/dist/greeting.js
CHANGED
|
@@ -118,6 +118,21 @@ export function groundFacts(g, dirName) {
|
|
|
118
118
|
}
|
|
119
119
|
return lines;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* The few questions that give birth to the instance context — what the cockpit
|
|
123
|
+
* is for, who works on it — with the language deduced from the answer. Shared by
|
|
124
|
+
* the first-run greeting and the cockpit's "Ask general to draft it", so both
|
|
125
|
+
* ask the same way. Optional by construction: nothing waits on the answer.
|
|
126
|
+
*/
|
|
127
|
+
export function instanceContextInterviewBrief() {
|
|
128
|
+
return ("INSTANCE CONTEXT. This cockpit has no instance context yet: the few lines every agent here receives about what " +
|
|
129
|
+
"the instance is for. In the SAME message, before the offer, ask two or three short questions — what this " +
|
|
130
|
+
"cockpit will be used for, and who will work on it (by first name or role). Not a form: one message, and the " +
|
|
131
|
+
"person may ignore it. Deduce the working language from the language they answer in; ask only if you cannot " +
|
|
132
|
+
"tell. When they answer, write it ONCE with the shadok-instance-context skill (a handful of lines: purpose, " +
|
|
133
|
+
"people, language — and the deliverables' language if it differs from the conversation's), show them what you " +
|
|
134
|
+
"saved in a few lines, and say they can edit it from the cockpit menu (Instance context…).");
|
|
135
|
+
}
|
|
121
136
|
/**
|
|
122
137
|
* The hidden prompt that produces the greeting.
|
|
123
138
|
*
|
|
@@ -135,6 +150,8 @@ export function homeGreetingBrief(input) {
|
|
|
135
150
|
"will read. Write ONE short chat message: introduce yourself in a line, then make the single offer below. " +
|
|
136
151
|
"Then stop and wait. This is an offer, not a form — if they ignore it entirely, the cockpit must still be " +
|
|
137
152
|
"perfectly usable, so never ask a question they have to answer before anything works.");
|
|
153
|
+
if (input.instanceContextEmpty)
|
|
154
|
+
parts.push(instanceContextInterviewBrief());
|
|
138
155
|
parts.push("WHAT I ALREADY READ FOR YOU. This came from a deterministic pass over the directory (no model, no guessing). " +
|
|
139
156
|
"Do not contradict it, and do NOT go and read the project now — reading it properly is what you are about to " +
|
|
140
157
|
"OFFER, and doing it first spends their quota on a question nobody asked.\n" +
|
package/dist/greeting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greeting.js","sourceRoot":"","sources":["../src/greeting.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,gBAAgB,EAAgB,MAAM,eAAe,CAAC;AAyCzG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkB;IAC5C,KAAK,EACH,+HAA+H;IACjI,OAAO,EAAE,iEAAiE;CAC3E,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,CAAS;IACpC,4EAA4E;IAC5E,2EAA2E;IAC3E,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,YAAY;QAAE,OAAO,IAAI,CAAC;IAE3C,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACnB,IAAI,EAAE,EAAE,CAAC;QACP,OAAO;YACL,KAAK,EACH,0HAA0H;YAC5H,OAAO,EACL,GAAG,EAAE,CAAC,MAAM,oGAAoG;gBAChH,uCAAuC;SAC1C,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;QAC7B,OAAO;YACL,KAAK,EACH,+IAA+I;YACjJ,OAAO,EACL,GAAG,KAAK,CAAC,MAAM,kGAAkG;gBACjH,oCAAoC;SACvC,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,CAAS;IACxC,IAAI,CAAC,CAAC,KAAK,IAAI,C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AI,CACR,4GAA4G;YAC1G,4GAA4G,CAC/G,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CACR,+GAA+G;YAC7G,4GAA4G;YAC5G,+GAA+G;YAC/G,kCAAkC,CACrC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CACR,QAAQ,CAAC,MAAM;QACb,CAAC,CAAC,2GAA2G;YACzG,8BAA8B;YAC9B,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,0GAA0G;YAC1G,yGAAyG;YACzG,qFAAqF;QACzF,CAAC,CAAC,0GAA0G;YACxG,yDAAyD,CAChE,CAAC;IAEF,KAAK,CAAC,IAAI,CACR,+GAA+G,CAChH,CAAC;IAEF,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The instance context: one short text per instance — what it is for, who it
|
|
3
|
+
* serves, its working language — that every agent receives at spawn whatever
|
|
4
|
+
* its profile. A role says HOW to work; nothing told an agent what the instance
|
|
5
|
+
* it runs on is FOR, so every agent rediscovered it, or never did.
|
|
6
|
+
*
|
|
7
|
+
* Written ONCE by the lead agent at first run (after asking), then owned by the
|
|
8
|
+
* humans who edit it in the cockpit. An agent never rewrites it afterwards — it
|
|
9
|
+
* suggests — because an agent quietly changing the purpose every agent is told
|
|
10
|
+
* is the failure to avoid (invariant 26's family).
|
|
11
|
+
*
|
|
12
|
+
* Design: docs/superpowers/specs/2026-11-09-instance-context-design.md
|
|
13
|
+
*/
|
|
14
|
+
export declare const INSTANCE_CONTEXT_MAX = 2000;
|
|
15
|
+
export declare const INSTANCE_CONTEXT_LABEL = "Instance context";
|
|
16
|
+
/** Trim; empty is allowed (it clears); over the cap is refused, never truncated. */
|
|
17
|
+
export declare function normalizeInstanceContext(raw: unknown): {
|
|
18
|
+
ok: true;
|
|
19
|
+
text: string;
|
|
20
|
+
} | {
|
|
21
|
+
ok: false;
|
|
22
|
+
error: string;
|
|
23
|
+
};
|
|
24
|
+
/** The lead's once-only write: null = allowed, else the reason it is refused. */
|
|
25
|
+
export declare function firstWriteVerdict(input: {
|
|
26
|
+
isHome: boolean;
|
|
27
|
+
current: string;
|
|
28
|
+
}): string | null;
|
|
29
|
+
/** The section appended to every agent's system prompt, or null when there is none. */
|
|
30
|
+
export declare function instanceContextSection(text: string): string | null;
|
|
31
|
+
/** The spawn flags carrying it — nothing at all when it is empty. */
|
|
32
|
+
export declare function instanceContextArgs(text: string): string[];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The instance context: one short text per instance — what it is for, who it
|
|
3
|
+
* serves, its working language — that every agent receives at spawn whatever
|
|
4
|
+
* its profile. A role says HOW to work; nothing told an agent what the instance
|
|
5
|
+
* it runs on is FOR, so every agent rediscovered it, or never did.
|
|
6
|
+
*
|
|
7
|
+
* Written ONCE by the lead agent at first run (after asking), then owned by the
|
|
8
|
+
* humans who edit it in the cockpit. An agent never rewrites it afterwards — it
|
|
9
|
+
* suggests — because an agent quietly changing the purpose every agent is told
|
|
10
|
+
* is the failure to avoid (invariant 26's family).
|
|
11
|
+
*
|
|
12
|
+
* Design: docs/superpowers/specs/2026-11-09-instance-context-design.md
|
|
13
|
+
*/
|
|
14
|
+
export const INSTANCE_CONTEXT_MAX = 2000;
|
|
15
|
+
export const INSTANCE_CONTEXT_LABEL = "Instance context";
|
|
16
|
+
/** Trim; empty is allowed (it clears); over the cap is refused, never truncated. */
|
|
17
|
+
export function normalizeInstanceContext(raw) {
|
|
18
|
+
if (raw === undefined || raw === null)
|
|
19
|
+
return { ok: true, text: "" };
|
|
20
|
+
if (typeof raw !== "string")
|
|
21
|
+
return { ok: false, error: "the instance context must be text" };
|
|
22
|
+
const text = raw.trim();
|
|
23
|
+
if (text.length > INSTANCE_CONTEXT_MAX)
|
|
24
|
+
return { ok: false, error: `the instance context is limited to ${INSTANCE_CONTEXT_MAX} characters (got ${text.length})` };
|
|
25
|
+
return { ok: true, text };
|
|
26
|
+
}
|
|
27
|
+
/** The lead's once-only write: null = allowed, else the reason it is refused. */
|
|
28
|
+
export function firstWriteVerdict(input) {
|
|
29
|
+
if (!input.isHome)
|
|
30
|
+
return "only the instance's lead agent (its home channel) may write the instance context";
|
|
31
|
+
if (input.current.trim())
|
|
32
|
+
return "the instance context is already set — suggest the change in the chat; a human edits it from the cockpit menu";
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
/** The section appended to every agent's system prompt, or null when there is none. */
|
|
36
|
+
export function instanceContextSection(text) {
|
|
37
|
+
const t = text.trim();
|
|
38
|
+
if (!t)
|
|
39
|
+
return null;
|
|
40
|
+
return "## This instance\n\nWhat this shadok instance is for, set by the people who run it. It applies to every agent here, whatever its role.\n\n" + t;
|
|
41
|
+
}
|
|
42
|
+
/** The spawn flags carrying it — nothing at all when it is empty. */
|
|
43
|
+
export function instanceContextArgs(text) {
|
|
44
|
+
const s = instanceContextSection(text);
|
|
45
|
+
return s ? ["--append-system-prompt", s] : [];
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=instance-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-context.js","sourceRoot":"","sources":["../src/instance-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAEzD,oFAAoF;AACpF,MAAM,UAAU,wBAAwB,CAAC,GAAY;IACnD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACrE,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,mCAAmC,EAAE,CAAC;IAC9F,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACxB,IAAI,IAAI,CAAC,MAAM,GAAG,oBAAoB;QACpC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,sCAAsC,oBAAoB,oBAAoB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IAC5H,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,KAA2C;IAC3E,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,kFAAkF,CAAC;IAC7G,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE;QACtB,OAAO,8GAA8G,CAAC;IACxH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IACtB,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACpB,OAAO,4IAA4I,GAAG,CAAC,CAAC;AAC1J,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,MAAM,CAAC,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC"}
|
package/dist/preprompt.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export interface PrepromptInput {
|
|
|
26
26
|
profileName?: string | null;
|
|
27
27
|
/** The profile's role prompt, as resolved at spawn. */
|
|
28
28
|
role?: string;
|
|
29
|
+
/** The instance context (src/instance-context.ts), as read at spawn. */
|
|
30
|
+
instanceContext?: string;
|
|
29
31
|
model?: string;
|
|
30
32
|
deny?: string[];
|
|
31
33
|
allow?: string[];
|
package/dist/preprompt.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* What shadok itself adds to an agent's context, as labelled sections.
|
|
3
|
-
*
|
|
4
|
-
* Everything here is passed to `claude` at spawn — appended system prompts,
|
|
5
|
-
* guardrails, the permission mode — and until now it was invisible: the agent
|
|
6
|
-
* knew its role, the person reading the chat did not, and a surprising answer
|
|
7
|
-
* had no explanation on screen.
|
|
8
|
-
*
|
|
9
|
-
* IT TAKES SECRET NAMES, NEVER VALUES. Values live in the child's environment
|
|
10
|
-
* and never in its arguments; keeping them out of this function's signature
|
|
11
|
-
* means they cannot leak through the panel by mistake, which is stronger than
|
|
12
|
-
* a test that says they currently don't.
|
|
13
|
-
*
|
|
14
|
-
* This is shadok's half only. Claude Code adds its own context — CLAUDE.md,
|
|
15
|
-
* skills, its built-in instructions — which shadok never sees, and the panel
|
|
16
|
-
* says so rather than implying it shows everything.
|
|
17
|
-
*/
|
|
1
|
+
import { INSTANCE_CONTEXT_LABEL } from "./instance-context.js";
|
|
18
2
|
const bullets = (items) => items.map((i) => `• ${i}`).join("\n");
|
|
19
3
|
/** Pure: the sections to show, in reading order, skipping what is absent. */
|
|
20
4
|
export function prepromptParts(input) {
|
|
@@ -26,6 +10,13 @@ export function prepromptParts(input) {
|
|
|
26
10
|
text: input.role.trim(),
|
|
27
11
|
});
|
|
28
12
|
}
|
|
13
|
+
if (input.instanceContext?.trim()) {
|
|
14
|
+
parts.push({
|
|
15
|
+
label: INSTANCE_CONTEXT_LABEL,
|
|
16
|
+
source: "Instance context (cockpit menu)",
|
|
17
|
+
text: input.instanceContext.trim(),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
29
20
|
const rails = [];
|
|
30
21
|
if (input.model)
|
|
31
22
|
rails.push(`model: ${input.model}`);
|
|
@@ -91,7 +82,10 @@ export function prepromptParts(input) {
|
|
|
91
82
|
*/
|
|
92
83
|
export function prepromptFingerprint(parts) {
|
|
93
84
|
let h = 5381;
|
|
94
|
-
|
|
85
|
+
// The instance context is left out on purpose: one Save in the cockpit must
|
|
86
|
+
// not mark every running agent stale and offer to respawn the whole fleet —
|
|
87
|
+
// the editor offers a restart instead (instance-context design).
|
|
88
|
+
const s = parts.filter((p) => p.label !== INSTANCE_CONTEXT_LABEL).map((p) => `${p.label}\u0000${p.source}\u0000${p.text}`).join("\u0001");
|
|
95
89
|
for (let i = 0; i < s.length; i++)
|
|
96
90
|
h = ((h * 33) ^ s.charCodeAt(i)) >>> 0;
|
|
97
91
|
return h.toString(16);
|
package/dist/preprompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprompt.js","sourceRoot":"","sources":["../src/preprompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"preprompt.js","sourceRoot":"","sources":["../src/preprompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAiD/D,MAAM,OAAO,GAAG,CAAC,KAAe,EAAU,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEnF,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,KAAqB;IAClD,MAAM,KAAK,GAAoB,EAAE,CAAC;IAElC,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC;YACT,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM;YACjE,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,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