shadok-ai 0.16.30 → 0.16.31
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 +4 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.js +16 -0
- package/dist/config.js.map +1 -1
- package/dist/server.js +11 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +41 -2
package/README.md
CHANGED
|
@@ -177,7 +177,10 @@ Enter to skip; you can add it later from the web UI).
|
|
|
177
177
|
message can force through).
|
|
178
178
|
- **Notifications** — favicon, title badge and an optional sound when an agent
|
|
179
179
|
needs you. It only blinks when the tab is hidden *and* an unmuted channel is
|
|
180
|
-
actually waiting.
|
|
180
|
+
actually waiting. Mute a single agent from its menu, or **mute the whole
|
|
181
|
+
instance** from the version menu (*Mute this instance*): the favicon never
|
|
182
|
+
changes, no badge, no blink, no sound — for every agent and every tab, saved
|
|
183
|
+
per instance like the cockpit's name and palette.
|
|
181
184
|
- **Engine room** — the raw TUI screen, live, with clickable keys, for anything
|
|
182
185
|
the chat can't express. With tmux there is also an **experimental real
|
|
183
186
|
terminal** (xterm.js over the pane's byte stream) when a snapshot isn't enough.
|
package/dist/config.d.ts
CHANGED
|
@@ -68,6 +68,15 @@ export interface Config {
|
|
|
68
68
|
* this instance and survives a reload.
|
|
69
69
|
*/
|
|
70
70
|
cockpitTheme?: Record<string, string>;
|
|
71
|
+
/**
|
|
72
|
+
* Per launch-directory "mute the whole instance", keyed by absolute cwd.
|
|
73
|
+
* `true` = every agent on this instance raises NO web attention signal: the
|
|
74
|
+
* favicon never changes, no title badge, no blink, no chime. Absent/false =
|
|
75
|
+
* the normal per-agent behaviour. It is the instance-wide twin of the
|
|
76
|
+
* per-channel `Channel.muted`, shared across every tab and device like the
|
|
77
|
+
* name and palette.
|
|
78
|
+
*/
|
|
79
|
+
cockpitMuted?: Record<string, boolean>;
|
|
71
80
|
/**
|
|
72
81
|
* Per launch-directory two-factor sign-in (a passkey after the password),
|
|
73
82
|
* keyed by absolute cwd. Absent = off. Turned on from the Users panel, under
|
|
@@ -112,6 +121,13 @@ export declare function themeForCwd(cfg: Config, cwd: string): string | null;
|
|
|
112
121
|
* any unknown key clear the entry, so the instance falls back to the default.
|
|
113
122
|
*/
|
|
114
123
|
export declare function setThemeForCwd(cfg: Config, cwd: string, theme: string): void;
|
|
124
|
+
/** Is this whole instance muted (no web attention signal for any agent)? */
|
|
125
|
+
export declare function mutedForCwd(cfg: Config, cwd: string): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Set (or clear) this directory's instance-wide mute and persist. `false`
|
|
128
|
+
* removes the entry — the default is "not muted", stored as absent.
|
|
129
|
+
*/
|
|
130
|
+
export declare function setMutedForCwd(cfg: Config, cwd: string, on: boolean): void;
|
|
115
131
|
/** The model backend chosen for the instance launched in `cwd`, or null. */
|
|
116
132
|
export declare function backendForCwd(cfg: Config, cwd: string): ConfiguredBackend | null;
|
|
117
133
|
/** Set (or clear, with null) that backend and persist. */
|
package/dist/config.js
CHANGED
|
@@ -74,6 +74,22 @@ export function setThemeForCwd(cfg, cwd, theme) {
|
|
|
74
74
|
delete cfg.cockpitTheme[cwd];
|
|
75
75
|
saveConfig(cfg);
|
|
76
76
|
}
|
|
77
|
+
/** Is this whole instance muted (no web attention signal for any agent)? */
|
|
78
|
+
export function mutedForCwd(cfg, cwd) {
|
|
79
|
+
return cfg.cockpitMuted?.[cwd] === true;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Set (or clear) this directory's instance-wide mute and persist. `false`
|
|
83
|
+
* removes the entry — the default is "not muted", stored as absent.
|
|
84
|
+
*/
|
|
85
|
+
export function setMutedForCwd(cfg, cwd, on) {
|
|
86
|
+
cfg.cockpitMuted ??= {};
|
|
87
|
+
if (on)
|
|
88
|
+
cfg.cockpitMuted[cwd] = true;
|
|
89
|
+
else
|
|
90
|
+
delete cfg.cockpitMuted[cwd];
|
|
91
|
+
saveConfig(cfg);
|
|
92
|
+
}
|
|
77
93
|
/** The model backend chosen for the instance launched in `cwd`, or null. */
|
|
78
94
|
export function backendForCwd(cfg, cwd) {
|
|
79
95
|
return cfg.modelBackend?.[cwd] ?? null;
|
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,MAAM,WAAW,CAAC;AAkG7B,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;AAChE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACzD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAEzD,MAAM,UAAU,UAAU;IACxB,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;QAC3D,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC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,CAAC,0BAA0B;IACjF,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;IACD,UAAU,CAAC,GAAG,CAAC,CAAC;AAClB,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -52,7 +52,7 @@ import { ledgerFileFor, ensureLedgerFile, loadLedger, deltaSince, formatLedgerCh
|
|
|
52
52
|
// the server imports it rather than keeping a second copy of the kind inference.
|
|
53
53
|
import { rowKind } from "../context/ledger-skill/ledger-core.mjs";
|
|
54
54
|
import { linkRefusal, markAgentPrompt, notificationText, } from "./kinship.js";
|
|
55
|
-
import { loadConfig, saveConfig, telegramConfig, applyTelegramPatch, titleForCwd, setTitleForCwd, themeForCwd, setThemeForCwd, twoFactorForCwd, setTwoFactorForCwd, backendForCwd, setBackendForCwd, } from "./config.js";
|
|
55
|
+
import { loadConfig, saveConfig, telegramConfig, applyTelegramPatch, titleForCwd, setTitleForCwd, themeForCwd, setThemeForCwd, mutedForCwd, setMutedForCwd, twoFactorForCwd, setTwoFactorForCwd, backendForCwd, setBackendForCwd, } from "./config.js";
|
|
56
56
|
import { secretsFor, secretNames, setSecret, deleteSecret, secretWriteVerdict, recordOrigin, originProfile, } from "./secrets.js";
|
|
57
57
|
import { recordSecretAudit, readSecretAudit, filterAudit, spawnActor, httpActor, profileSecretDiff, } from "./secret-audit.js";
|
|
58
58
|
import { getProfile, profileArgs, permissionModeArgs, isPermissionMode, isEffortLevel, mcpServersVerdict, envVarsNote, seedDefaultProfiles, migrateToTracking, seedTweakProfile, loadProfiles, upsertProfile, removeProfile, promptEditVerdict, secretAttachVerdict, READONLY_DENY, TWEAK_PROFILE_NAME, promptOrigin, effectiveProfile, shippedProfile, } from "./profiles.js";
|
|
@@ -1435,6 +1435,16 @@ app.put("/theme", (req, res) => {
|
|
|
1435
1435
|
setThemeForCwd(loadConfig(), process.cwd(), String(req.body?.theme ?? ""));
|
|
1436
1436
|
res.json({ theme: themeForCwd(loadConfig(), process.cwd()) });
|
|
1437
1437
|
});
|
|
1438
|
+
// Instance-wide mute, per launch directory. `true` = NO web attention signal for
|
|
1439
|
+
// any agent (favicon frozen, no title badge, no blink, no chime). Purely a
|
|
1440
|
+
// display preference the client reads — no agent is restarted, unlike /ledger.
|
|
1441
|
+
app.get("/mute", (_req, res) => {
|
|
1442
|
+
res.json({ muted: mutedForCwd(loadConfig(), process.cwd()) });
|
|
1443
|
+
});
|
|
1444
|
+
app.put("/mute", (req, res) => {
|
|
1445
|
+
setMutedForCwd(loadConfig(), process.cwd(), req.body?.muted === true);
|
|
1446
|
+
res.json({ muted: mutedForCwd(loadConfig(), process.cwd()) });
|
|
1447
|
+
});
|
|
1438
1448
|
// Materialises shadok-ai's own source for the "Tweak Shadok-AI" CTA, and hands
|
|
1439
1449
|
// back the directory to start the agent in. Sits here so it inherits the same
|
|
1440
1450
|
// password gate as its neighbours.
|