psyche-ai 4.0.0 → 5.1.0
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 +5 -1
- package/dist/core.js +83 -2
- package/dist/ethics.d.ts +64 -0
- package/dist/ethics.js +577 -0
- package/dist/experiential-field.d.ts +46 -0
- package/dist/experiential-field.js +646 -0
- package/dist/generative-self.d.ts +88 -0
- package/dist/generative-self.js +647 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +9 -1
- package/dist/prompt.d.ts +6 -0
- package/dist/prompt.js +27 -0
- package/dist/psyche-file.js +6 -3
- package/dist/shared-intentionality.d.ts +72 -0
- package/dist/shared-intentionality.js +486 -0
- package/dist/types.d.ts +37 -2
- package/dist/types.js +13 -0
- package/dist/update.js +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -175,9 +175,43 @@ export interface MetacognitiveState {
|
|
|
175
175
|
}
|
|
176
176
|
/** Default empty metacognitive state */
|
|
177
177
|
export declare const DEFAULT_METACOGNITIVE_STATE: MetacognitiveState;
|
|
178
|
-
/**
|
|
178
|
+
/** Max causal insights to persist */
|
|
179
|
+
export declare const MAX_CAUSAL_INSIGHTS = 20;
|
|
180
|
+
/** Max ethical concern history entries */
|
|
181
|
+
export declare const MAX_ETHICAL_HISTORY = 15;
|
|
182
|
+
/** Persisted causal insight about self */
|
|
183
|
+
export interface PersistedCausalInsight {
|
|
184
|
+
trait: string;
|
|
185
|
+
because: string;
|
|
186
|
+
confidence: number;
|
|
187
|
+
discoveredAt: string;
|
|
188
|
+
}
|
|
189
|
+
/** Growth direction */
|
|
190
|
+
export type GrowthDirection = "growing" | "stable" | "regressing" | "transforming";
|
|
191
|
+
/** Persisted personhood state */
|
|
192
|
+
export interface PersonhoodState {
|
|
193
|
+
causalInsights: PersistedCausalInsight[];
|
|
194
|
+
growthDirection: GrowthDirection;
|
|
195
|
+
identityNarrative: string;
|
|
196
|
+
/** Ethical concerns detected over time */
|
|
197
|
+
ethicalConcernHistory: {
|
|
198
|
+
type: string;
|
|
199
|
+
severity: number;
|
|
200
|
+
timestamp: string;
|
|
201
|
+
}[];
|
|
202
|
+
/** Theory of mind per-user */
|
|
203
|
+
theoryOfMind: Record<string, {
|
|
204
|
+
estimatedMood: string;
|
|
205
|
+
estimatedIntent: string;
|
|
206
|
+
confidence: number;
|
|
207
|
+
lastUpdated: string;
|
|
208
|
+
}>;
|
|
209
|
+
}
|
|
210
|
+
/** Default empty personhood state */
|
|
211
|
+
export declare const DEFAULT_PERSONHOOD_STATE: PersonhoodState;
|
|
212
|
+
/** Persisted psyche state for an agent (v6: digital personhood) */
|
|
179
213
|
export interface PsycheState {
|
|
180
|
-
version: 3 | 4 | 5;
|
|
214
|
+
version: 3 | 4 | 5 | 6;
|
|
181
215
|
mbti: MBTIType;
|
|
182
216
|
baseline: ChemicalState;
|
|
183
217
|
current: ChemicalState;
|
|
@@ -191,6 +225,7 @@ export interface PsycheState {
|
|
|
191
225
|
lastDisagreement: string | null;
|
|
192
226
|
learning: LearningState;
|
|
193
227
|
metacognition: MetacognitiveState;
|
|
228
|
+
personhood: PersonhoodState;
|
|
194
229
|
meta: {
|
|
195
230
|
agentName: string;
|
|
196
231
|
createdAt: string;
|
package/dist/types.js
CHANGED
|
@@ -96,6 +96,19 @@ export const DEFAULT_METACOGNITIVE_STATE = {
|
|
|
96
96
|
avgEmotionalConfidence: 0.5,
|
|
97
97
|
totalAssessments: 0,
|
|
98
98
|
};
|
|
99
|
+
// ── Personhood Types (v6) ────────────────────────────────────
|
|
100
|
+
/** Max causal insights to persist */
|
|
101
|
+
export const MAX_CAUSAL_INSIGHTS = 20;
|
|
102
|
+
/** Max ethical concern history entries */
|
|
103
|
+
export const MAX_ETHICAL_HISTORY = 15;
|
|
104
|
+
/** Default empty personhood state */
|
|
105
|
+
export const DEFAULT_PERSONHOOD_STATE = {
|
|
106
|
+
causalInsights: [],
|
|
107
|
+
growthDirection: "stable",
|
|
108
|
+
identityNarrative: "",
|
|
109
|
+
ethicalConcernHistory: [],
|
|
110
|
+
theoryOfMind: {},
|
|
111
|
+
};
|
|
99
112
|
/** Default relationship for new users */
|
|
100
113
|
export const DEFAULT_RELATIONSHIP = {
|
|
101
114
|
trust: 50,
|
package/dist/update.js
CHANGED
|
@@ -11,7 +11,7 @@ import { execFile } from "node:child_process";
|
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
const execFileAsync = promisify(execFile);
|
|
13
13
|
const PACKAGE_NAME = "psyche-ai";
|
|
14
|
-
const CURRENT_VERSION = "
|
|
14
|
+
const CURRENT_VERSION = "5.1.0";
|
|
15
15
|
const CHECK_INTERVAL_MS = 60 * 60 * 1000; // 1 hour
|
|
16
16
|
const CACHE_DIR = join(homedir(), ".psyche-ai");
|
|
17
17
|
const CACHE_FILE = join(CACHE_DIR, "update-check.json");
|
package/openclaw.plugin.json
CHANGED