@siduri-x/brain 2.0.1 → 2.0.3

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/index.js CHANGED
@@ -25,7 +25,10 @@ const MemoryProposalSchema = zod_1.z.object({
25
25
  });
26
26
  const BehaviorProposalSchema = zod_1.z.object({
27
27
  directive: zod_1.z.string(),
28
- priority: zod_1.z.number(),
28
+ category: zod_1.z.enum(['guardrail', 'relational', 'behavioral']).optional(),
29
+ scopeActor: zod_1.z.string().optional(),
30
+ supersedesId: zod_1.z.string().optional(),
31
+ priority: zod_1.z.number().optional(),
29
32
  });
30
33
  const ActionIntentSchema = zod_1.z.object({
31
34
  actionId: zod_1.z.string(),
@@ -36,6 +39,8 @@ const ActionIntentSchema = zod_1.z.object({
36
39
  const ResponsePlanSchema = zod_1.z.object({
37
40
  speech: zod_1.z.string(),
38
41
  language: zod_1.z.string(),
42
+ subtitle: zod_1.z.string().optional(),
43
+ subtitles: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
39
44
  internalMonologue: zod_1.z.string().optional(),
40
45
  memoryProposals: zod_1.z.array(MemoryProposalSchema).optional(),
41
46
  behaviorProposals: zod_1.z.array(BehaviorProposalSchema).optional(),
@@ -70,6 +75,7 @@ class OpenAICompatibleBrain {
70
75
  properties: {
71
76
  speech: { type: "string", description: "The text that the companion will speak." },
72
77
  language: { type: "string", description: "The primary language of the speech (e.g., 'en', 'ja', 'id')." },
78
+ subtitle: { type: "string", description: "Optional translation or subtitle of speech in the requested subtitle language." },
73
79
  internalMonologue: { type: "string", description: "Internal reasoning before responding." },
74
80
  memoryProposals: {
75
81
  type: "array",
@@ -88,10 +94,13 @@ class OpenAICompatibleBrain {
88
94
  items: {
89
95
  type: "object",
90
96
  properties: {
91
- directive: { type: "string" },
92
- priority: { type: "number" }
97
+ directive: { type: "string", description: "The natural language behavioral, guardrail, or relational rule." },
98
+ category: { type: "string", enum: ["guardrail", "relational", "behavioral"], description: "Category tier of the directive." },
99
+ scopeActor: { type: "string", description: "Optional specific actor this rule applies to (e.g. 'actor:zagin')." },
100
+ supersedesId: { type: "string", description: "Optional ID of an older directive this rule replaces." },
101
+ priority: { type: "number", description: "Optional legacy priority rank." }
93
102
  },
94
- required: ["directive", "priority"]
103
+ required: ["directive"]
95
104
  }
96
105
  },
97
106
  actionIntents: {
package/dist/prompt.js CHANGED
@@ -22,6 +22,12 @@ class PromptAssembler {
22
22
  "[CONTEXTUAL AWARENESS]",
23
23
  context.contextPrompt,
24
24
  "[RESPONSE RULES] Use confirmed permitted memories as factual context with their provenance. Return one semantic response containing your speech, internal monologue, and any memory or behavior proposals.",
25
+ "[COGNITIVE PROPOSAL INSTRUCTIONS]",
26
+ "You are the primary cognitive proposer for the companion's living memory and self.",
27
+ "When the user shares personal facts, names, affiliations, relationship declarations, preferences, or behavioral instructions (or when in Teach Mode):",
28
+ "- Propose factual claims in `memoryProposals` with subject ('actor:<id>' for user facts or 'companion:<id>' for companion facts), predicate (e.g. 'name', 'role', 'affiliation', 'origin', 'stated_relationship'), and value.",
29
+ "- Propose directives in `behaviorProposals` with directive (e.g. 'Address actor:<id> as <name>', 'Acknowledge role as <role>'), and category ('relational' | 'behavioral' | 'guardrail').",
30
+ "All proposals will enter pending status for owner review before taking effect.",
25
31
  ];
26
32
  return promptParts.join("\n");
27
33
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@siduri-x/brain",
3
3
  "organType": "brain",
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "displayName": "Brain (Cognition & Planning)",
6
6
  "description": "Provider-neutral LLM reasoning, response planning, and proposal generation",
7
7
  "entrypoint": "./dist/index.js",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@siduri-x/brain",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
7
7
  "zod": "^4.6.2",
8
- "@siduri-x/core": "2.0.1"
8
+ "@siduri-x/core": "2.0.6"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@types/jest": "^30.0.0",