dsh-caveman 0.1.5 → 0.1.6
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/lib/index.js +10 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -79,8 +79,15 @@ export function apply(ctx) {
|
|
|
79
79
|
// Sessions WITHOUT a sidecar entry follow this live default (full).
|
|
80
80
|
let defaultMode = 'full'
|
|
81
81
|
let cavemanScope = null
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
// `settings` is a cordis Service (`ctx.settings`) — reach it through an
|
|
83
|
+
// injection edge. `ctx.get('settings')` at apply time returns undefined on
|
|
84
|
+
// 0.1.2-rc.1 (the provider publishes asynchronously), which silently skipped
|
|
85
|
+
// this registration: the Settings row then read a live value while every
|
|
86
|
+
// write answered 503 "settings unavailable" (found + fixed 2026-09-12).
|
|
87
|
+
// Same pattern as @linxin666/dsh-pet / web-ui-settings: ctx.inject(['settings']).
|
|
88
|
+
ctx.inject(['settings'], (settingsCtx) => {
|
|
89
|
+
const settings = settingsCtx.settings
|
|
90
|
+
if (settings === undefined) return
|
|
84
91
|
try {
|
|
85
92
|
cavemanScope = settings.register(
|
|
86
93
|
'caveman',
|
|
@@ -95,7 +102,7 @@ export function apply(ctx) {
|
|
|
95
102
|
} catch (err) {
|
|
96
103
|
console.warn('[caveman] settings namespace registration failed:', err && err.message)
|
|
97
104
|
}
|
|
98
|
-
}
|
|
105
|
+
})
|
|
99
106
|
|
|
100
107
|
// ---- per-session mode state: sidecar JSON keyed by session id ----------
|
|
101
108
|
// Truth source for the mode. Sessions WITHOUT an entry use the live
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-caveman",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"./client": "./lib/client.js",
|
|
9
9
|
"./package.json": "./package.json"
|
|
10
10
|
},
|
|
11
|
-
"description": "Per-session caveman mode state + composer dock badge + /caveman command + prompt-section injection. Writes NO session events: mode state lives in a $DSH_HOME/plugin-state sidecar keyed by session id (default from the 'caveman' settings namespace), and the badge reads GET /caveman/state (fetch mode). The KNOWN event-type registration is kept read-only for legacy sessions. Caveman skills ship from the deployment shared skill library (see ~/.dsh/skills), not from this package. Compatible with @deepseek-ai/dsh-settings 0.1.2+: the namespace is passed as a literal string because the settingsNamespace brand helper was removed upstream (broken named import on 0.1.2-rc.1 boot). 0.1.5 adds the Settings -> General row (client slot settings.general.item + host route GET/POST /caveman/default) so the default mode is editable in the UI; a registered host namespace alone does NOT produce a settings row.",
|
|
11
|
+
"description": "Per-session caveman mode state + composer dock badge + /caveman command + prompt-section injection. Writes NO session events: mode state lives in a $DSH_HOME/plugin-state sidecar keyed by session id (default from the 'caveman' settings namespace), and the badge reads GET /caveman/state (fetch mode). The KNOWN event-type registration is kept read-only for legacy sessions. Caveman skills ship from the deployment shared skill library (see ~/.dsh/skills), not from this package. Compatible with @deepseek-ai/dsh-settings 0.1.2+: the namespace is passed as a literal string because the settingsNamespace brand helper was removed upstream (broken named import on 0.1.2-rc.1 boot). 0.1.5 adds the Settings -> General row (client slot settings.general.item + host route GET/POST /caveman/default) so the default mode is editable in the UI; a registered host namespace alone does NOT produce a settings row. 0.1.6 fixes the registration itself: reach the settings service through ctx.inject(['settings'], ...) instead of ctx.get('settings') at apply time (which returns undefined on 0.1.2-rc.1, so the namespace was never registered and every write to POST /caveman/default answered 503 (settings unavailable).",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [
|
|
14
14
|
"dsh",
|