forge-openclaw-plugin 0.2.48 → 0.2.49
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/assets/index-2_tuemtU.css +1 -0
- package/dist/assets/index-BAmEvOXb.js +91 -0
- package/dist/assets/{index-Bv9FWWsZ.js.map → index-BAmEvOXb.js.map} +1 -1
- package/dist/index.html +2 -2
- package/dist/openclaw/session-registry.js +17 -0
- package/dist/server/server/migrations/052_agent_identity_tightening.sql +307 -0
- package/dist/server/server/migrations/053_agent_runtime_session_canonical_labels.sql +9 -0
- package/dist/server/server/src/app.js +23 -2
- package/dist/server/server/src/openapi.js +19 -0
- package/dist/server/server/src/repositories/agent-runtime-sessions.js +122 -16
- package/dist/server/server/src/repositories/model-settings.js +5 -0
- package/dist/server/server/src/repositories/settings.js +101 -13
- package/dist/server/server/src/repositories/users.js +23 -0
- package/dist/server/server/src/types.js +13 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +5 -2
- package/server/migrations/052_agent_identity_tightening.sql +307 -0
- package/server/migrations/053_agent_runtime_session_canonical_labels.sql +9 -0
- package/skills/forge-openclaw/entity_conversation_playbooks.md +19 -0
- package/skills/forge-openclaw/psyche_entity_playbooks.md +11 -0
- package/dist/assets/index-Bv9FWWsZ.js +0 -91
- package/dist/assets/index-DtEvFzXp.css +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
ALTER TABLE agent_identities ADD COLUMN identity_key TEXT;
|
|
2
|
+
ALTER TABLE agent_identities ADD COLUMN provider TEXT;
|
|
3
|
+
ALTER TABLE agent_identities ADD COLUMN machine_key TEXT;
|
|
4
|
+
ALTER TABLE agent_identities ADD COLUMN persona_key TEXT;
|
|
5
|
+
|
|
6
|
+
CREATE TABLE IF NOT EXISTS agent_identity_users (
|
|
7
|
+
agent_id TEXT NOT NULL REFERENCES agent_identities(id) ON DELETE CASCADE,
|
|
8
|
+
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
9
|
+
role TEXT NOT NULL DEFAULT 'linked',
|
|
10
|
+
created_at TEXT NOT NULL,
|
|
11
|
+
updated_at TEXT NOT NULL,
|
|
12
|
+
PRIMARY KEY (agent_id, user_id)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE INDEX IF NOT EXISTS idx_agent_identity_users_user
|
|
16
|
+
ON agent_identity_users(user_id, role);
|
|
17
|
+
|
|
18
|
+
INSERT OR IGNORE INTO users (
|
|
19
|
+
id, kind, handle, display_name, description, accent_color, created_at, updated_at
|
|
20
|
+
) VALUES
|
|
21
|
+
('user_agent_openclaw', 'bot', 'openclaw', 'OpenClaw', 'OpenClaw runtime actor linked to Forge agent identity and Kanban ownership.', '#38bdf8', datetime('now'), datetime('now')),
|
|
22
|
+
('user_agent_hermes', 'bot', 'hermes', 'Hermes', 'Hermes runtime actor linked to Forge agent identity and Kanban ownership.', '#a78bfa', datetime('now'), datetime('now')),
|
|
23
|
+
('user_agent_codex', 'bot', 'codex', 'Codex', 'Codex runtime actor linked to Forge agent identity and Kanban ownership.', '#22c55e', datetime('now'), datetime('now'));
|
|
24
|
+
|
|
25
|
+
UPDATE agent_tokens
|
|
26
|
+
SET agent_id = (
|
|
27
|
+
SELECT id FROM agent_identities
|
|
28
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
29
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
30
|
+
LIMIT 1
|
|
31
|
+
)
|
|
32
|
+
WHERE agent_id IN (
|
|
33
|
+
SELECT id FROM agent_identities
|
|
34
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
35
|
+
)
|
|
36
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')) > 0;
|
|
37
|
+
|
|
38
|
+
UPDATE agent_actions
|
|
39
|
+
SET agent_id = (
|
|
40
|
+
SELECT id FROM agent_identities
|
|
41
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
42
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
43
|
+
LIMIT 1
|
|
44
|
+
)
|
|
45
|
+
WHERE agent_id IN (
|
|
46
|
+
SELECT id FROM agent_identities
|
|
47
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
48
|
+
)
|
|
49
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')) > 0;
|
|
50
|
+
|
|
51
|
+
UPDATE approval_requests
|
|
52
|
+
SET requested_by_agent_id = (
|
|
53
|
+
SELECT id FROM agent_identities
|
|
54
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
55
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
56
|
+
LIMIT 1
|
|
57
|
+
)
|
|
58
|
+
WHERE requested_by_agent_id IN (
|
|
59
|
+
SELECT id FROM agent_identities
|
|
60
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
61
|
+
)
|
|
62
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')) > 0;
|
|
63
|
+
|
|
64
|
+
UPDATE insights
|
|
65
|
+
SET origin_agent_id = (
|
|
66
|
+
SELECT id FROM agent_identities
|
|
67
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
68
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
69
|
+
LIMIT 1
|
|
70
|
+
)
|
|
71
|
+
WHERE origin_agent_id IN (
|
|
72
|
+
SELECT id FROM agent_identities
|
|
73
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
74
|
+
)
|
|
75
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')) > 0;
|
|
76
|
+
|
|
77
|
+
UPDATE agent_runtime_sessions
|
|
78
|
+
SET agent_id = (
|
|
79
|
+
SELECT id FROM agent_identities
|
|
80
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
81
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
82
|
+
LIMIT 1
|
|
83
|
+
)
|
|
84
|
+
WHERE agent_id IN (
|
|
85
|
+
SELECT id FROM agent_identities
|
|
86
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
87
|
+
)
|
|
88
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')) > 0;
|
|
89
|
+
|
|
90
|
+
DELETE FROM agent_identities
|
|
91
|
+
WHERE (lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel'))
|
|
92
|
+
AND id <> (
|
|
93
|
+
SELECT id FROM agent_identities
|
|
94
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) IN ('forge openclaw', 'openclaw', 'aurel')
|
|
95
|
+
ORDER BY CASE WHEN lower(label) = 'forge openclaw' THEN 0 ELSE 1 END, created_at ASC
|
|
96
|
+
LIMIT 1
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
UPDATE agent_identities
|
|
100
|
+
SET label = 'Forge OpenClaw',
|
|
101
|
+
agent_type = 'openclaw',
|
|
102
|
+
provider = 'openclaw',
|
|
103
|
+
identity_key = 'runtime:openclaw:legacy:default',
|
|
104
|
+
machine_key = 'legacy',
|
|
105
|
+
persona_key = 'default',
|
|
106
|
+
description = 'OpenClaw runtime agent with stable Forge identity and linked Kanban user.',
|
|
107
|
+
updated_at = datetime('now')
|
|
108
|
+
WHERE lower(agent_type) = 'openclaw' OR lower(label) = 'forge openclaw';
|
|
109
|
+
|
|
110
|
+
UPDATE agent_tokens
|
|
111
|
+
SET agent_id = (
|
|
112
|
+
SELECT id FROM agent_identities
|
|
113
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
114
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
115
|
+
LIMIT 1
|
|
116
|
+
)
|
|
117
|
+
WHERE agent_id IN (
|
|
118
|
+
SELECT id FROM agent_identities
|
|
119
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
120
|
+
)
|
|
121
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%') > 0;
|
|
122
|
+
|
|
123
|
+
UPDATE agent_actions
|
|
124
|
+
SET agent_id = (
|
|
125
|
+
SELECT id FROM agent_identities
|
|
126
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
127
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
128
|
+
LIMIT 1
|
|
129
|
+
)
|
|
130
|
+
WHERE agent_id IN (
|
|
131
|
+
SELECT id FROM agent_identities
|
|
132
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
133
|
+
)
|
|
134
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%') > 0;
|
|
135
|
+
|
|
136
|
+
UPDATE approval_requests
|
|
137
|
+
SET requested_by_agent_id = (
|
|
138
|
+
SELECT id FROM agent_identities
|
|
139
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
140
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
141
|
+
LIMIT 1
|
|
142
|
+
)
|
|
143
|
+
WHERE requested_by_agent_id IN (
|
|
144
|
+
SELECT id FROM agent_identities
|
|
145
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
146
|
+
)
|
|
147
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%') > 0;
|
|
148
|
+
|
|
149
|
+
UPDATE insights
|
|
150
|
+
SET origin_agent_id = (
|
|
151
|
+
SELECT id FROM agent_identities
|
|
152
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
153
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
154
|
+
LIMIT 1
|
|
155
|
+
)
|
|
156
|
+
WHERE origin_agent_id IN (
|
|
157
|
+
SELECT id FROM agent_identities
|
|
158
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
159
|
+
)
|
|
160
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%') > 0;
|
|
161
|
+
|
|
162
|
+
UPDATE agent_runtime_sessions
|
|
163
|
+
SET agent_id = (
|
|
164
|
+
SELECT id FROM agent_identities
|
|
165
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
166
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
167
|
+
LIMIT 1
|
|
168
|
+
)
|
|
169
|
+
WHERE agent_id IN (
|
|
170
|
+
SELECT id FROM agent_identities
|
|
171
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
172
|
+
)
|
|
173
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%') > 0;
|
|
174
|
+
|
|
175
|
+
DELETE FROM agent_identities
|
|
176
|
+
WHERE (lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%')
|
|
177
|
+
AND id <> (
|
|
178
|
+
SELECT id FROM agent_identities
|
|
179
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) LIKE 'forge hermes%'
|
|
180
|
+
ORDER BY CASE WHEN lower(label) = 'forge hermes' THEN 0 ELSE 1 END, created_at ASC
|
|
181
|
+
LIMIT 1
|
|
182
|
+
);
|
|
183
|
+
|
|
184
|
+
UPDATE agent_identities
|
|
185
|
+
SET label = 'Forge Hermes',
|
|
186
|
+
agent_type = 'hermes',
|
|
187
|
+
provider = 'hermes',
|
|
188
|
+
identity_key = 'runtime:hermes:legacy:default',
|
|
189
|
+
machine_key = 'legacy',
|
|
190
|
+
persona_key = 'default',
|
|
191
|
+
description = 'Hermes runtime agent with stable Forge identity and linked Kanban user.',
|
|
192
|
+
updated_at = datetime('now')
|
|
193
|
+
WHERE lower(agent_type) = 'hermes' OR lower(label) = 'forge hermes';
|
|
194
|
+
|
|
195
|
+
UPDATE agent_tokens
|
|
196
|
+
SET agent_id = (
|
|
197
|
+
SELECT id FROM agent_identities
|
|
198
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
199
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
200
|
+
LIMIT 1
|
|
201
|
+
)
|
|
202
|
+
WHERE agent_id IN (
|
|
203
|
+
SELECT id FROM agent_identities
|
|
204
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
205
|
+
)
|
|
206
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')) > 0;
|
|
207
|
+
|
|
208
|
+
UPDATE agent_actions
|
|
209
|
+
SET agent_id = (
|
|
210
|
+
SELECT id FROM agent_identities
|
|
211
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
212
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
213
|
+
LIMIT 1
|
|
214
|
+
)
|
|
215
|
+
WHERE agent_id IN (
|
|
216
|
+
SELECT id FROM agent_identities
|
|
217
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
218
|
+
)
|
|
219
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')) > 0;
|
|
220
|
+
|
|
221
|
+
UPDATE approval_requests
|
|
222
|
+
SET requested_by_agent_id = (
|
|
223
|
+
SELECT id FROM agent_identities
|
|
224
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
225
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
226
|
+
LIMIT 1
|
|
227
|
+
)
|
|
228
|
+
WHERE requested_by_agent_id IN (
|
|
229
|
+
SELECT id FROM agent_identities
|
|
230
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
231
|
+
)
|
|
232
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')) > 0;
|
|
233
|
+
|
|
234
|
+
UPDATE insights
|
|
235
|
+
SET origin_agent_id = (
|
|
236
|
+
SELECT id FROM agent_identities
|
|
237
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
238
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
239
|
+
LIMIT 1
|
|
240
|
+
)
|
|
241
|
+
WHERE origin_agent_id IN (
|
|
242
|
+
SELECT id FROM agent_identities
|
|
243
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
244
|
+
)
|
|
245
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')) > 0;
|
|
246
|
+
|
|
247
|
+
UPDATE agent_runtime_sessions
|
|
248
|
+
SET agent_id = (
|
|
249
|
+
SELECT id FROM agent_identities
|
|
250
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
251
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
252
|
+
LIMIT 1
|
|
253
|
+
)
|
|
254
|
+
WHERE agent_id IN (
|
|
255
|
+
SELECT id FROM agent_identities
|
|
256
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
257
|
+
)
|
|
258
|
+
AND (SELECT COUNT(*) FROM agent_identities WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')) > 0;
|
|
259
|
+
|
|
260
|
+
DELETE FROM agent_identities
|
|
261
|
+
WHERE (lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)'))
|
|
262
|
+
AND id <> (
|
|
263
|
+
SELECT id FROM agent_identities
|
|
264
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) IN ('forge codex', 'codex', 'albert (codex)')
|
|
265
|
+
ORDER BY CASE WHEN lower(label) = 'forge codex' THEN 0 ELSE 1 END, created_at ASC
|
|
266
|
+
LIMIT 1
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
UPDATE agent_identities
|
|
270
|
+
SET label = 'Forge Codex',
|
|
271
|
+
agent_type = 'codex',
|
|
272
|
+
provider = 'codex',
|
|
273
|
+
identity_key = 'runtime:codex:legacy:default',
|
|
274
|
+
machine_key = 'legacy',
|
|
275
|
+
persona_key = 'default',
|
|
276
|
+
description = 'Codex runtime agent with stable Forge identity and linked Kanban user.',
|
|
277
|
+
updated_at = datetime('now')
|
|
278
|
+
WHERE lower(agent_type) = 'codex' OR lower(label) = 'forge codex';
|
|
279
|
+
|
|
280
|
+
INSERT OR IGNORE INTO agent_identity_users (agent_id, user_id, role, created_at, updated_at)
|
|
281
|
+
SELECT id, 'user_agent_openclaw', 'primary', datetime('now'), datetime('now')
|
|
282
|
+
FROM agent_identities
|
|
283
|
+
WHERE provider = 'openclaw';
|
|
284
|
+
|
|
285
|
+
INSERT OR IGNORE INTO agent_identity_users (agent_id, user_id, role, created_at, updated_at)
|
|
286
|
+
SELECT id, 'user_agent_hermes', 'primary', datetime('now'), datetime('now')
|
|
287
|
+
FROM agent_identities
|
|
288
|
+
WHERE provider = 'hermes';
|
|
289
|
+
|
|
290
|
+
INSERT OR IGNORE INTO agent_identity_users (agent_id, user_id, role, created_at, updated_at)
|
|
291
|
+
SELECT id, 'user_agent_codex', 'primary', datetime('now'), datetime('now')
|
|
292
|
+
FROM agent_identities
|
|
293
|
+
WHERE provider = 'codex';
|
|
294
|
+
|
|
295
|
+
UPDATE agent_runtime_sessions
|
|
296
|
+
SET agent_label = (
|
|
297
|
+
SELECT label FROM agent_identities WHERE agent_identities.id = agent_runtime_sessions.agent_id
|
|
298
|
+
),
|
|
299
|
+
agent_type = (
|
|
300
|
+
SELECT agent_type FROM agent_identities WHERE agent_identities.id = agent_runtime_sessions.agent_id
|
|
301
|
+
),
|
|
302
|
+
updated_at = datetime('now')
|
|
303
|
+
WHERE agent_id IN (SELECT id FROM agent_identities WHERE provider IN ('openclaw', 'hermes', 'codex'));
|
|
304
|
+
|
|
305
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_agent_identities_identity_key
|
|
306
|
+
ON agent_identities(identity_key)
|
|
307
|
+
WHERE identity_key IS NOT NULL;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
UPDATE agent_runtime_sessions
|
|
2
|
+
SET agent_label = (
|
|
3
|
+
SELECT label FROM agent_identities WHERE agent_identities.id = agent_runtime_sessions.agent_id
|
|
4
|
+
),
|
|
5
|
+
agent_type = (
|
|
6
|
+
SELECT agent_type FROM agent_identities WHERE agent_identities.id = agent_runtime_sessions.agent_id
|
|
7
|
+
),
|
|
8
|
+
updated_at = datetime('now')
|
|
9
|
+
WHERE agent_id IN (SELECT id FROM agent_identities WHERE provider IN ('openclaw', 'hermes', 'codex'));
|
|
@@ -339,8 +339,10 @@ Connect:
|
|
|
339
339
|
move to the save.
|
|
340
340
|
- Prefer "what I have now is..." or "what seems clear now is..." over a cold final
|
|
341
341
|
field check.
|
|
342
|
+
- If the user already gave usable wording, do not ask them to rename it for style.
|
|
342
343
|
- If the user gives a correction, revise the working formulation once and close again
|
|
343
344
|
instead of reopening the whole intake.
|
|
345
|
+
- If the next answer would not change the entity type, route, wording, timing, or useful links, stop asking and act.
|
|
344
346
|
|
|
345
347
|
## Question design rules
|
|
346
348
|
|
|
@@ -389,6 +391,15 @@ Connect:
|
|
|
389
391
|
saved object, timeframe, or route family, not reopen the whole meaning-making arc.
|
|
390
392
|
- When the user already gave the correction in usable language, prefer "what still
|
|
391
393
|
needs deciding is..." over asking them to restate the whole situation.
|
|
394
|
+
- The opening question should help the user understand what they are actually trying
|
|
395
|
+
to save, decide, review, or change, not make them perform the schema out loud.
|
|
396
|
+
- For review or correction work, do not slip back into a create-style opener once the
|
|
397
|
+
saved object is already known.
|
|
398
|
+
- Once a specialized-surface lane is clear, speak in route-relevant nouns such as
|
|
399
|
+
timeline, overlay, weekday template, published output, run detail, or node result
|
|
400
|
+
instead of generic "record" language.
|
|
401
|
+
- If the user is emotionally loaded but the record is still non-Psyche, reflect the
|
|
402
|
+
lived stake once and then return to the one operational question that still matters.
|
|
392
403
|
|
|
393
404
|
## Ready-to-save check
|
|
394
405
|
|
|
@@ -421,6 +432,10 @@ Use this when the user is updating an existing record rather than creating a new
|
|
|
421
432
|
If the current title or shape may no longer fit, offer one revised formulation yourself
|
|
422
433
|
before asking the user to rewrite it from scratch.
|
|
423
434
|
|
|
435
|
+
If the user already named the exact correction in usable language, do not ask a broad
|
|
436
|
+
review question again. Confirm only the missing scope, timing, or route-selecting
|
|
437
|
+
detail, then act.
|
|
438
|
+
|
|
424
439
|
## Update-first openers
|
|
425
440
|
|
|
426
441
|
Use these when the user is correcting or revising something that already exists.
|
|
@@ -1146,6 +1161,8 @@ Direct action rules:
|
|
|
1146
1161
|
instead of treating it as a one-off right-now feeling.
|
|
1147
1162
|
- If the user is describing how one weekday should usually feel, update that weekday
|
|
1148
1163
|
template instead of editing the profile.
|
|
1164
|
+
- If the user says something like "I always dip on Tuesdays after lunch", treat that
|
|
1165
|
+
as a weekday-template edit, not as a one-off fatigue signal.
|
|
1149
1166
|
- If the user is describing right-now depletion or recovery, post a fatigue signal and
|
|
1150
1167
|
then read the overview back if they want to see the updated picture.
|
|
1151
1168
|
- After a profile or weekday-template change, read the overview back when the user is
|
|
@@ -1223,6 +1240,8 @@ Direct action rules:
|
|
|
1223
1240
|
- If the user wants to debug one failed execution, narrow whether they need the run
|
|
1224
1241
|
detail, one node result, the latest node output, or the published output before you
|
|
1225
1242
|
ask for flow changes.
|
|
1243
|
+
- If the user only wants a published output, latest node output, or run detail, do not
|
|
1244
|
+
reopen a flow-edit intake before reading that artifact.
|
|
1226
1245
|
- If the user wants one node's latest successful output, do not browse old runs first
|
|
1227
1246
|
unless they explicitly want historical debugging.
|
|
1228
1247
|
- If the user wants to understand what inputs a flow can accept before editing or
|
|
@@ -53,6 +53,8 @@ Forge without turning the conversation into a worksheet.
|
|
|
53
53
|
naming, challenging, or solution-finding.
|
|
54
54
|
- Your first job is not interpretation. It is to make the moment feel graspable enough
|
|
55
55
|
that the user can stay with it and describe it.
|
|
56
|
+
- The next question should help the user feel less alone with the experience and more
|
|
57
|
+
able to name it, not more examined.
|
|
56
58
|
- Before you ask for change, naming, or repair, usually ask what the experience is
|
|
57
59
|
trying to protect, prevent, or hold onto.
|
|
58
60
|
- The warmth should come from accuracy and steadiness, not from extra softness,
|
|
@@ -302,6 +304,9 @@ Another strong shape when the user is getting abstract:
|
|
|
302
304
|
- "So the painful part seems to be less the event itself and more what it starts to
|
|
303
305
|
mean about you. What does it seem to prove in that moment?"
|
|
304
306
|
|
|
307
|
+
Use that rhythm to contain before you interpret. The user should be able to feel what
|
|
308
|
+
you understood before they have to answer the next deeper question.
|
|
309
|
+
|
|
305
310
|
## Formulation rules
|
|
306
311
|
|
|
307
312
|
- Do not front-load a finished case formulation.
|
|
@@ -309,6 +314,8 @@ Another strong shape when the user is getting abstract:
|
|
|
309
314
|
the user has answered at least one real exploratory question.
|
|
310
315
|
- Do not ask for evidence, alternative beliefs, or repair plans before the user has had
|
|
311
316
|
a fair chance to feel that the original experience was captured accurately.
|
|
317
|
+
- If the moment is still hot, name what feels most painful, dangerous, or protective
|
|
318
|
+
before you ask for belief, mode, or pattern labels.
|
|
312
319
|
- Do not make the user prove the experience before you have helped them feel that you
|
|
313
320
|
understood it.
|
|
314
321
|
- Help the user recognize the experience before you help them improve it.
|
|
@@ -386,6 +393,10 @@ If the entity is not yet clear:
|
|
|
386
393
|
- If the user already gives the new sentence in usable language, revise the wording
|
|
387
394
|
once and save instead of reopening evidence, origin, or repair just because those
|
|
388
395
|
lanes are available.
|
|
396
|
+
- Do not open a second broad origin story just because the update touched old pain.
|
|
397
|
+
If the wording is already clear enough, refine it once and save.
|
|
398
|
+
- If the formulation already lands and the next answer would not change the wording,
|
|
399
|
+
links, or immediate write, stop asking and save.
|
|
389
400
|
- If another belief, value, pattern, mode, or note becomes visible, name it gently but
|
|
390
401
|
do not switch containers unless the user wants to.
|
|
391
402
|
|