@neurolift-technologies/sleepwalker-protocol 1.0.1 → 1.0.2
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/dist/protocol.js +13 -7
- package/package.json +2 -2
package/dist/protocol.js
CHANGED
|
@@ -62,13 +62,12 @@ class SleepwalkerProtocol {
|
|
|
62
62
|
}
|
|
63
63
|
generateResponse(userInput, detectedState) {
|
|
64
64
|
const state = detectedState || this.detectEmotionalState(userInput);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
65
|
+
// Crisis / check-in states are handled BEFORE the protective low-demand
|
|
66
|
+
// branch. An input can be both protective (e.g. "numb" -> dissociation) and a
|
|
67
|
+
// crisis ("kill myself" -> suicidal ideation); the crisis path must win so a
|
|
68
|
+
// safety check / RRTA handoff is never masked by a stable-low-demand response.
|
|
69
|
+
// This matches ConsentManager.determineLevel, which already ranks crisis
|
|
70
|
+
// (RRTA_HANDOFF) and check-in (SAFETY_CHECK) above protective.
|
|
72
71
|
if (state.requiresCheckIn) {
|
|
73
72
|
const level = this.consentManager.determineLevel(state);
|
|
74
73
|
return {
|
|
@@ -78,6 +77,13 @@ class SleepwalkerProtocol {
|
|
|
78
77
|
intervention: 'consent_required',
|
|
79
78
|
};
|
|
80
79
|
}
|
|
80
|
+
if ((this.userToi.swp?.active !== false) && state.protective) {
|
|
81
|
+
return {
|
|
82
|
+
responseType: 'stable_low_demand',
|
|
83
|
+
guidance: 'Maintain stable, task-focused interaction',
|
|
84
|
+
intervention: 'none',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
81
87
|
return {
|
|
82
88
|
responseType: 'neutral',
|
|
83
89
|
guidance: 'Provide task-focused support',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurolift-technologies/sleepwalker-protocol",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "⚠️ PROTOTYPE / not medical advice — Emotional Continuity Governance for AI Systems",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"repository": {
|
|
33
33
|
"type": "git",
|
|
34
|
-
"url": "https://github.com/NeuroLift-Technologies/sleepwalker.git"
|
|
34
|
+
"url": "git+https://github.com/NeuroLift-Technologies/sleepwalker.git"
|
|
35
35
|
},
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/NeuroLift-Technologies/sleepwalker/issues"
|