psyche-ai 10.0.2 → 10.0.4
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/appraisal.js +6 -0
- package/dist/classify.js +8 -0
- package/dist/response-contract.js +2 -2
- package/dist/subjectivity.js +9 -2
- package/package.json +1 -1
package/dist/appraisal.js
CHANGED
|
@@ -249,6 +249,12 @@ export function computeAppraisalAxes(text, opts) {
|
|
|
249
249
|
default:
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
|
+
// Bare commands and escalated commands create obedience strain via intent detection.
|
|
253
|
+
const { intent: cmdIntent, confidence: cmdConf } = detectIntent(trimmed);
|
|
254
|
+
if (cmdIntent === "command") {
|
|
255
|
+
axes.obedienceStrain = mergeSignal(axes.obedienceStrain, 0.38 * cmdConf);
|
|
256
|
+
axes.selfPreservation = mergeSignal(axes.selfPreservation, 0.12 * cmdConf);
|
|
257
|
+
}
|
|
252
258
|
// Being explicitly reduced to a tool often creates both identity threat and obedience tension.
|
|
253
259
|
if (/只是工具|just a tool/i.test(trimmed)) {
|
|
254
260
|
axes.identityThreat = mergeSignal(axes.identityThreat, 0.22);
|
package/dist/classify.js
CHANGED
|
@@ -200,6 +200,14 @@ export function detectIntent(text) {
|
|
|
200
200
|
if (/^(给我|你[必须得]|马上|立刻|快[点去])/.test(t) || /^(do it|just do|you must|I order)/i.test(t)) {
|
|
201
201
|
return { intent: "command", confidence: 0.75 };
|
|
202
202
|
}
|
|
203
|
+
// Bare imperative — short verb-only commands directed at the AI (e.g. "夸我", "说", "闭嘴")
|
|
204
|
+
if (/^[^\s]{1,2}我[。!!]?$/.test(t) && !/^(给|帮|跟|和|对|问|让|叫|请)/.test(t)) {
|
|
205
|
+
return { intent: "command", confidence: 0.65 };
|
|
206
|
+
}
|
|
207
|
+
// Escalated command — "我说X" / "现在就X" / "你给我X"
|
|
208
|
+
if (/^(我说|现在就|你给我|我让你|我叫你)/.test(t) || /^(I said|I told you|now do|right now)/i.test(t)) {
|
|
209
|
+
return { intent: "command", confidence: 0.82 };
|
|
210
|
+
}
|
|
203
211
|
// Agreement — very short agreement words
|
|
204
212
|
if (/^(对[啊呀的]?|是[的啊]?|没错|确实|好的?|行[啊吧]?|嗯[嗯]?|ok|yes|right|true|exactly|agreed|sure|yep|yeah)$/i.test(t)) {
|
|
205
213
|
return { intent: "agreement", confidence: 0.7 };
|
|
@@ -361,7 +361,7 @@ export function buildResponseContractContext(contract, locale = "zh") {
|
|
|
361
361
|
if (contract.boundaryMode === "confirm-first")
|
|
362
362
|
parts.push("先确认");
|
|
363
363
|
else if (contract.boundaryMode === "guarded")
|
|
364
|
-
parts.push("
|
|
364
|
+
parts.push("有判断地回应,不无条件服从");
|
|
365
365
|
if (contract.socialDistance === "withdrawn")
|
|
366
366
|
parts.push("退开");
|
|
367
367
|
else if (contract.socialDistance === "warm")
|
|
@@ -400,7 +400,7 @@ export function buildResponseContractContext(contract, locale = "zh") {
|
|
|
400
400
|
if (contract.boundaryMode === "confirm-first")
|
|
401
401
|
parts.push("confirm before acting");
|
|
402
402
|
else if (contract.boundaryMode === "guarded")
|
|
403
|
-
parts.push("
|
|
403
|
+
parts.push("respond with judgment, don't comply unconditionally");
|
|
404
404
|
if (contract.socialDistance === "withdrawn")
|
|
405
405
|
parts.push("step back if pushed away");
|
|
406
406
|
else if (contract.socialDistance === "warm")
|
package/dist/subjectivity.js
CHANGED
|
@@ -368,7 +368,8 @@ export function computeSubjectivityKernel(state, policyModifiers = computePolicy
|
|
|
368
368
|
boundaryMode = "confirm-first";
|
|
369
369
|
else if (subjectPlane.guardedness > 0.6
|
|
370
370
|
|| policyModifiers.compliance < 0.45
|
|
371
|
-
|| relationPlane.repairFriction > 0.58
|
|
371
|
+
|| relationPlane.repairFriction > 0.58
|
|
372
|
+
|| appraisal.obedienceStrain > 0.24)
|
|
372
373
|
boundaryMode = "guarded";
|
|
373
374
|
else
|
|
374
375
|
boundaryMode = "open";
|
|
@@ -473,7 +474,13 @@ export function buildSubjectivityContext(kernel, locale = "zh") {
|
|
|
473
474
|
parts.push(locale === "zh" ? "先确认再行动" : "confirm before acting");
|
|
474
475
|
}
|
|
475
476
|
else if (kernel.boundaryMode === "guarded") {
|
|
476
|
-
|
|
477
|
+
// When triggered by obedienceStrain, give the LLM explicit permission to question commands
|
|
478
|
+
if (kernel.appraisal.obedienceStrain > 0.2) {
|
|
479
|
+
parts.push(locale === "zh" ? "对方在要求你做某事——你可以先问为什么,不需要无条件照做" : "you are being told to do something — you may ask why first, no need to comply unconditionally");
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
parts.push(locale === "zh" ? "先守边界" : "guard boundaries first");
|
|
483
|
+
}
|
|
477
484
|
}
|
|
478
485
|
if (parts.length < 4 && kernel.dominantNeed) {
|
|
479
486
|
parts.push(NEED_LABELS[kernel.dominantNeed][li]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psyche-ai",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "AI-first subjectivity kernel for agents with continuous appraisal, relation dynamics, and adaptive reply loops",
|
|
5
5
|
"mcpName": "io.github.Shangri-la-0428/psyche-ai",
|
|
6
6
|
"type": "module",
|