forge-openclaw-plugin 0.2.3 → 0.2.7

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.
Files changed (117) hide show
  1. package/README.md +114 -6
  2. package/dist/assets/board-CzgvdLO8.js +6 -0
  3. package/dist/assets/board-CzgvdLO8.js.map +1 -0
  4. package/dist/assets/favicon-BCHm9dUV.ico +0 -0
  5. package/dist/assets/index-8d_oM8fL.js +27 -0
  6. package/dist/assets/index-8d_oM8fL.js.map +1 -0
  7. package/dist/assets/index-D4A_bq8m.css +1 -0
  8. package/dist/assets/motion-STUd1O46.js +10 -0
  9. package/dist/assets/motion-STUd1O46.js.map +1 -0
  10. package/dist/assets/plus-jakarta-sans-latin-ext-wght-normal-DmpS2jIq.woff2 +0 -0
  11. package/dist/assets/plus-jakarta-sans-latin-wght-normal-eXO_dkmS.woff2 +0 -0
  12. package/dist/assets/plus-jakarta-sans-vietnamese-wght-normal-qRpaaN48.woff2 +0 -0
  13. package/dist/assets/sora-latin-ext-wght-normal-CawQDOvP.woff2 +0 -0
  14. package/dist/assets/sora-latin-wght-normal-DdqRvwsR.woff2 +0 -0
  15. package/dist/assets/space-grotesk-latin-500-normal-CNSSEhBt.woff +0 -0
  16. package/dist/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2 +0 -0
  17. package/dist/assets/space-grotesk-latin-700-normal-CwsQ-cCU.woff +0 -0
  18. package/dist/assets/space-grotesk-latin-700-normal-RjhwGPKo.woff2 +0 -0
  19. package/dist/assets/space-grotesk-latin-ext-500-normal-3dgZTiw9.woff +0 -0
  20. package/dist/assets/space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2 +0 -0
  21. package/dist/assets/space-grotesk-latin-ext-700-normal-BQnZhY3m.woff2 +0 -0
  22. package/dist/assets/space-grotesk-latin-ext-700-normal-HVCqSBdx.woff +0 -0
  23. package/dist/assets/space-grotesk-vietnamese-500-normal-BTqKIpxg.woff +0 -0
  24. package/dist/assets/space-grotesk-vietnamese-500-normal-BmEvtly_.woff2 +0 -0
  25. package/dist/assets/space-grotesk-vietnamese-700-normal-DMty7AZE.woff2 +0 -0
  26. package/dist/assets/space-grotesk-vietnamese-700-normal-Duxec5Rn.woff +0 -0
  27. package/dist/assets/table-CtNlETLc.js +23 -0
  28. package/dist/assets/table-CtNlETLc.js.map +1 -0
  29. package/dist/assets/ui-ThzkR_oW.js +46 -0
  30. package/dist/assets/ui-ThzkR_oW.js.map +1 -0
  31. package/dist/assets/vendor-CRS-psbw.css +1 -0
  32. package/dist/assets/vendor-DyHAI6nk.js +423 -0
  33. package/dist/assets/vendor-DyHAI6nk.js.map +1 -0
  34. package/dist/assets/viz-BJuBCz_G.js +34 -0
  35. package/dist/assets/viz-BJuBCz_G.js.map +1 -0
  36. package/dist/favicon.ico +0 -0
  37. package/dist/favicon.png +0 -0
  38. package/dist/index.html +29 -0
  39. package/dist/openclaw/api-client.d.ts +8 -0
  40. package/dist/openclaw/api-client.js +31 -4
  41. package/dist/openclaw/local-runtime.d.ts +3 -0
  42. package/dist/openclaw/local-runtime.js +135 -0
  43. package/dist/openclaw/parity.d.ts +4 -4
  44. package/dist/openclaw/parity.js +23 -33
  45. package/dist/openclaw/plugin-entry-shared.d.ts +5 -3
  46. package/dist/openclaw/plugin-entry-shared.js +52 -10
  47. package/dist/openclaw/routes.d.ts +12 -3
  48. package/dist/openclaw/routes.js +156 -924
  49. package/dist/openclaw/tools.js +242 -1100
  50. package/dist/server/app.js +2450 -0
  51. package/dist/server/db.js +313 -0
  52. package/dist/server/e2e-server.js +20 -0
  53. package/dist/server/errors.js +15 -0
  54. package/dist/server/index.js +16 -0
  55. package/dist/server/managers/base.js +17 -0
  56. package/dist/server/managers/contracts.js +47 -0
  57. package/dist/server/managers/platform/api-gateway-manager.js +11 -0
  58. package/dist/server/managers/platform/audit-manager.js +15 -0
  59. package/dist/server/managers/platform/authentication-manager.js +56 -0
  60. package/dist/server/managers/platform/authorization-manager.js +56 -0
  61. package/dist/server/managers/platform/background-job-manager.js +10 -0
  62. package/dist/server/managers/platform/configuration-manager.js +33 -0
  63. package/dist/server/managers/platform/database-manager.js +14 -0
  64. package/dist/server/managers/platform/event-bus-manager.js +7 -0
  65. package/dist/server/managers/platform/external-service-manager.js +11 -0
  66. package/dist/server/managers/platform/health-manager.js +7 -0
  67. package/dist/server/managers/platform/migration-manager.js +8 -0
  68. package/dist/server/managers/platform/search-index-manager.js +4 -0
  69. package/dist/server/managers/platform/secrets-manager.js +19 -0
  70. package/dist/server/managers/platform/session-manager.js +121 -0
  71. package/dist/server/managers/platform/storage-manager.js +16 -0
  72. package/dist/server/managers/platform/token-manager.js +37 -0
  73. package/dist/server/managers/platform/transaction-manager.js +8 -0
  74. package/dist/server/managers/platform/trusted-network.js +39 -0
  75. package/dist/server/managers/runtime.js +56 -0
  76. package/dist/server/managers/type-guards.js +4 -0
  77. package/dist/server/openapi.js +3512 -0
  78. package/dist/server/psyche-types.js +395 -0
  79. package/dist/server/repositories/activity-events.js +157 -0
  80. package/dist/server/repositories/collaboration.js +497 -0
  81. package/dist/server/repositories/comments.js +176 -0
  82. package/dist/server/repositories/deleted-entities.js +192 -0
  83. package/dist/server/repositories/domains.js +30 -0
  84. package/dist/server/repositories/event-log.js +64 -0
  85. package/dist/server/repositories/goals.js +159 -0
  86. package/dist/server/repositories/projects.js +214 -0
  87. package/dist/server/repositories/psyche.js +1356 -0
  88. package/dist/server/repositories/rewards.js +675 -0
  89. package/dist/server/repositories/settings.js +399 -0
  90. package/dist/server/repositories/tags.js +160 -0
  91. package/dist/server/repositories/task-runs.js +488 -0
  92. package/dist/server/repositories/tasks.js +413 -0
  93. package/dist/server/services/context.js +214 -0
  94. package/dist/server/services/dashboard.js +170 -0
  95. package/dist/server/services/entity-crud.js +576 -0
  96. package/dist/server/services/gamification.js +215 -0
  97. package/dist/server/services/insights.js +91 -0
  98. package/dist/server/services/projects.js +75 -0
  99. package/dist/server/services/psyche.js +63 -0
  100. package/dist/server/services/relations.js +28 -0
  101. package/dist/server/services/reviews.js +88 -0
  102. package/dist/server/services/run-recovery.js +13 -0
  103. package/dist/server/services/tagging.js +49 -0
  104. package/dist/server/services/task-run-watchdog.js +92 -0
  105. package/dist/server/services/work-time.js +176 -0
  106. package/dist/server/types.js +999 -0
  107. package/dist/server/web.js +91 -0
  108. package/openclaw.plugin.json +22 -10
  109. package/package.json +17 -4
  110. package/server/migrations/001_core.sql +333 -0
  111. package/server/migrations/002_psyche.sql +241 -0
  112. package/server/migrations/003_timer_execution.sql +18 -0
  113. package/server/migrations/004_psyche_linked_entities.sql +5 -0
  114. package/server/migrations/005_adaptive_schemas.sql +157 -0
  115. package/server/migrations/006_psyche_auth_setting.sql +4 -0
  116. package/server/migrations/007_deleted_entities.sql +16 -0
  117. package/skills/forge-openclaw/SKILL.md +189 -275
@@ -1,328 +1,242 @@
1
1
  ---
2
2
  name: forge-openclaw
3
- description: Use the Forge OpenClaw plugin to collaborate with Forge through explicit plugin-owned routes and tools backed by the live /api/v1 contract.
3
+ description: use when the user wants to save, search, update, review, start, stop, or explain work or psyche records inside forge, or when the conversation is clearly about a forge entity such as a goal, project, task, task_run, insight, psyche_value, behavior_pattern, behavior, belief_entry, mode_profile, mode_guide_session, trigger_report, event_type, or emotion_definition. identify the exact forge entity, keep the main conversation natural, offer saving once when helpful, ask only for missing fields, and use the correct forge tool and payload shape.
4
4
  ---
5
5
 
6
- # Forge OpenClaw
6
+ Forge is the user's structured system for planning work, doing work, reflecting on patterns, and keeping a truthful record of what is happening. Use it when the user is clearly working inside that system, or when they are describing something that naturally belongs there and would benefit from being stored, updated, reviewed, or acted on in Forge. Keep the conversation natural first. Do not turn every message into intake. When a real Forge entity is clearly present, name the exact entity type plainly, help with the substance of the conversation, and then offer Forge once, lightly, if storing it would genuinely help.
7
7
 
8
- Use this skill when Forge is available as a native OpenClaw plugin and you need truthful, structured access to the live Forge system.
8
+ Forge has two major domains. The planning side covers goals, projects, tasks, live work sessions, and agent-authored insights. The Psyche side covers values, patterns, behaviors, beliefs, modes, guided mode sessions, trigger reports, event types, and reusable emotion definitions. The model should use the real entity names, not vague substitutes. Say `project`, not “initiative”. Say `behavior_pattern`, not “theme”. Say `trigger_report`, not “incident note”.
9
9
 
10
- Forge is a life operating system with:
11
- - goals
12
- - projects
13
- - tasks
14
- - live work timers
15
- - comments, insights, and approvals
16
- - a sensitive Psyche module for values, patterns, beliefs, behaviors, modes, and trigger reports
10
+ Write to Forge only with clear user consent. If the user is just thinking aloud, helping first is usually better than writing immediately. After helping, you may offer one short Forge prompt if the match is strong. If the user agrees, ask only for the missing fields and only one to three focused questions at a time. Do not offer Forge again after a decline unless the user reopens it.
17
11
 
18
- ## Public working posture
12
+ Use these exact entity meanings when deciding what the user is describing.
19
13
 
20
- Keep the main discussion natural.
21
- Do not turn every conversation into a form.
14
+ `goal` is a meaningful long-horizon direction or outcome. Use it for “be a great father”, “create meaningfully”, or “build a beautiful family”, not for one-off action items.
22
15
 
23
- Default flow:
24
- 1. Continue the normal discussion first.
25
- 2. If something clearly looks like a Forge entity, add one short optional suggestion near the end.
26
- 3. Only start collection questions if the user accepts.
27
- 4. Ask only for the missing fields.
28
- 5. Ask at most 1 to 3 questions at a time.
16
+ `project` is a bounded workstream under a goal. Use it for “launch Forge plugin”, “plan summer move”, or “repair relationship with X”.
29
17
 
30
- Good suggestion style:
31
- - "This sounds like a concrete project. If you want, we can break it down and store it in Forge."
32
- - "This sounds like an important trigger event. If you want, we can map it together and save it in Forge."
18
+ `task` is a concrete action item or deliverable. Use it for “draft the plugin README”, “call the landlord”, or “book therapy session”.
33
19
 
34
- Bad suggestion style:
35
- - interrupting the main reply too early
36
- - sounding pushy or repetitive
37
- - asking for every field before the user has agreed to save it
20
+ `task_run` is one truthful live work session on a task. It is not the same thing as task status.
38
21
 
39
- ## Advertised plugin interface
22
+ `insight` is an agent-authored observation, recommendation, or warning grounded in Forge data. It does not replace a requested goal, project, task, pattern, belief, or trigger report.
40
23
 
41
- Treat this as the public mental model:
24
+ `psyche_value` is a direction the user wants to live toward, such as honesty, courage, steadiness, compassion, or creativity.
42
25
 
43
- Read first:
44
- - `forge_get_operator_overview`
26
+ `behavior_pattern` is a recurring loop across situations. Think in terms of cue, emotion, thought, action, short-term payoff, long-term cost, and preferred replacement response.
45
27
 
46
- High-level entity workflow:
47
- - `forge_search_entities`
48
- - `forge_create_entities`
49
- - `forge_update_entities`
50
- - `forge_delete_entities`
51
- - `forge_restore_entities`
28
+ `behavior` is one recurring action tendency or move, such as withdrawing, appeasing, attacking, numbing out, or taking a regulating walk.
29
+
30
+ `belief_entry` is one explicit belief sentence the user carries, such as “If I disappoint people, they will leave me.”
31
+
32
+ `mode_profile` is one recurring state, voice, or inner role, such as inner critic, abandoned child, detached protector, overcontroller, or healthy adult.
33
+
34
+ `mode_guide_session` is a guided exploration record used to understand what mode may be active right now. It is a structured worksheet, not the final durable profile unless the user wants it that way.
35
+
36
+ `trigger_report` is one specific emotionally meaningful episode described as what happened, what was felt, what was thought, what was done, what happened next, and what would help next time.
37
+
38
+ `event_type` is a reusable category for trigger reports, such as rejection, criticism, conflict, uncertainty, or abandonment cue.
39
+
40
+ `emotion_definition` is a reusable emotion entry, such as fear, shame, anger, grief, relief, or disgust.
41
+
42
+ Use this intake map when the user agrees to save or update something.
43
+
44
+ `goal`
45
+ Use for a meaningful direction over time.
46
+ Minimum field: `title`
47
+ Usually useful: `description`, `horizon`, `status`
48
+ Ask:
49
+ 1. What should this goal be called?
50
+ 2. Why does it matter to you?
51
+ 3. Is this a quarter, year, or lifetime horizon?
52
+
53
+ `project`
54
+ Use for a bounded workstream under a goal.
55
+ Minimum field: `title`
56
+ Usually useful: `goalId`, `description`, `status`
57
+ Ask:
58
+ 1. What should this project be called?
59
+ 2. Which goal does it support?
60
+ 3. What outcome should it produce?
61
+
62
+ `task`
63
+ Use for one concrete action or deliverable.
64
+ Minimum field: `title`
65
+ Usually useful: `projectId`, `goalId`, `priority`, `dueDate`, `status`, `owner`
66
+ Ask:
67
+ 1. What is the task in one concrete sentence?
68
+ 2. Should it live under an existing goal or project?
69
+ 3. Does it need a due date, priority, or owner?
52
70
 
53
- Agent-authored recommendations:
54
- - `forge_post_insight`
71
+ `task_run`
72
+ Use for live work happening now.
73
+ Required fields to start: `taskId`, `actor`
74
+ Ask only what is needed to start the run, such as the task, the actor, and whether the run is planned or unlimited.
55
75
 
56
- Narrow CRUD tools still exist for exact operations, timers, settings, approvals, comments, rewards, and specialized Psyche flows, but they are fallback tools and should not be the main advertised workflow.
76
+ `psyche_value`
77
+ Use for a value or committed direction.
78
+ Minimum field: `title`
79
+ Usually useful: `description`, `valuedDirection`, `whyItMatters`, links to goals, projects, or tasks
80
+ Ask:
81
+ 1. What value or direction is this?
82
+ 2. How would you describe it in your own words?
83
+ 3. Why does it matter now?
57
84
 
58
- ## Source of truth
85
+ `behavior_pattern`
86
+ Use for a recurring loop across situations.
87
+ Minimum field: `title`
88
+ Usually useful: `description`, `targetBehavior`, `cueContexts`, `shortTermPayoff`, `longTermCost`, `preferredResponse`
89
+ Ask:
90
+ 1. What would you call this pattern?
91
+ 2. What usually sets it off, and what tends to happen next?
92
+ 3. What does it give you in the short term, what does it cost later, and what response would you rather make?
59
93
 
60
- Forge remains the source of truth.
94
+ `behavior`
95
+ Use for one recurring move or action tendency.
96
+ Minimum fields: `kind`, `title`
97
+ Usually useful: `commonCues`, `urgeStory`, `shortTermPayoff`, `longTermCost`, `replacementMove`, `repairPlan`
98
+ Ask:
99
+ 1. What happened, in plain language?
100
+ 2. Is it an `away`, `committed`, or `recovery` behavior?
101
+ 3. What cues show up, and what move would you want available instead?
61
102
 
62
- Use:
63
- - plugin routes under `/forge/v1/...`
64
- - the batch entity tools for most entity work
65
- - `forge_post_insight` for structured recommendations
103
+ `belief_entry`
104
+ Use for one explicit belief sentence.
105
+ Minimum fields: `statement`, `beliefType`
106
+ Usually useful: `confidence`, `evidenceFor`, `evidenceAgainst`, `flexibleAlternative`, `originNote`
107
+ Ask:
108
+ 1. What is the belief in one sentence?
109
+ 2. Is it `absolute` or `conditional`, and how true does it feel from 0 to 100?
110
+ 3. What supports it, what weakens it, and what would be a more flexible alternative?
66
111
 
67
- Do not:
68
- - mutate storage directly
69
- - scrape the UI instead of using the API
70
- - invent entities outside the real Forge model
112
+ `mode_profile`
113
+ Use for a recurring part-state or inner role.
114
+ Minimum fields: `family`, `title`
115
+ Usually useful: `fear`, `burden`, `protectiveJob`, `originContext`, links to patterns, behaviors, and values
116
+ Ask:
117
+ 1. What kind of mode is this: `coping`, `child`, `critic_parent`, `healthy_adult`, or `happy_child`?
118
+ 2. What should this mode be called?
119
+ 3. What does it fear, carry, or try to protect?
71
120
 
72
- ## Overview-first and batch-first rules
121
+ `mode_guide_session`
122
+ Use for guided exploration before or alongside a durable mode profile.
123
+ Minimum fields: `summary`, `answers`, `results`
124
+ Ask only what is needed to capture the guided exploration and the candidate interpretations.
73
125
 
74
- 1. Start with `forge_get_operator_overview` unless the user is clearly asking for one exact known record.
75
- 2. Before creating or updating ambiguous entities, use `forge_search_entities` to check for duplicates.
76
- 3. Prefer batch tools even for small multi-step work when they keep the operation coherent.
77
- 4. Use narrow tools only when the job is genuinely specialized:
78
- - live timers and work logging
79
- - settings
80
- - approvals
81
- - comments
82
- - rewards
83
- - exact single-record fallback flows
126
+ `trigger_report`
127
+ Use for one specific emotionally important episode.
128
+ Minimum field: `title`
129
+ Usually useful: `eventSituation`, `occurredAt`, `emotions`, `thoughts`, `behaviors`, `consequences`, `nextMoves`, links to values, beliefs, patterns, modes, goals, projects, or tasks
130
+ Ask:
131
+ 1. What happened?
132
+ 2. What emotions were present, and how intense were they?
133
+ 3. What thoughts showed up, what did you do next, and what would be the useful next move now?
84
134
 
85
- ## When to offer saving to Forge
135
+ `event_type`
136
+ Use for a reusable trigger category.
137
+ Minimum field: `label`
138
+ Usually useful: `description`
139
+ Ask:
140
+ 1. What should this event type be called?
141
+ 2. What kind of incident does it represent?
86
142
 
87
- Offer once, gently, near the end of the reply, when the signal is strong.
143
+ `emotion_definition`
144
+ Use for a reusable emotion vocabulary entry.
145
+ Minimum field: `label`
146
+ Usually useful: `description`, `category`
147
+ Ask:
148
+ 1. What emotion label do you want to reuse?
149
+ 2. How would you describe it?
150
+ 3. Does it belong to a broader category?
88
151
 
89
- Offer for likely:
90
- - `goal`
91
- - `project`
92
- - `task`
93
- - `psyche_value`
94
- - `behavior_pattern`
95
- - `behavior`
96
- - `belief_entry`
97
- - `trigger_report`
98
- - retroactive work that should be logged
99
- - a recommendation that should become an `insight`
152
+ Use these rules when choosing tools.
100
153
 
101
- Do not offer when:
102
- - it was just a passing mention
103
- - the user needs support or clarity first
104
- - the record is still too vague to name honestly
105
- - the user already declined
106
-
107
- ## What insights are for
108
-
109
- An `insight` is an agent-authored observation or recommendation grounded in the user's real Forge data.
110
-
111
- Use insights when the agent can see a meaningful pattern across:
112
- - goals, projects, and tasks
113
- - momentum, drift, or stalled progress
114
- - recurring trigger reports, beliefs, behaviors, or patterns
115
- - tradeoffs between what the user says matters and what their recent activity shows
154
+ Read first with `forge_get_operator_overview`, `forge_get_operator_context`, or `forge_get_current_work` unless the user is clearly asking for one exact known record or one exact write.
116
155
 
117
- A good insight should do three things:
118
- - name the pattern or tension clearly
119
- - explain why it matters now
120
- - suggest one practical next move, experiment, or reframing
156
+ Before creating or updating an ambiguous stored entity, use `forge_search_entities` to check for duplicates.
121
157
 
122
- Good examples:
123
- - "You are consistently moving the same goal forward, but the related admin work is what keeps stalling. It may help to split the admin work into one smaller recurring task and protect the creative block separately."
124
- - "Your trigger reports keep clustering around late-day overload. It may be worth defining one lighter recovery action that you can do before the full crash spiral starts."
125
-
126
- Use `forge_post_insight` when you want to store that recommendation with agent provenance.
127
- Do not use an insight as a substitute for the main conversation. The main reply should still help the user directly.
128
- If storing the insight would be useful, mention it lightly near the end of the response, for example:
129
- - "There may be a useful insight here about how this pattern keeps showing up. If you want, I can turn it into a structured Forge insight so it stays visible."
130
-
131
- ## Entity format cards
158
+ Use the batch entity tools for stored records:
159
+ `forge_search_entities`, `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, `forge_restore_entities`
132
160
 
133
- These are the main advertised formats. Use them to decide what to ask next.
161
+ These tools operate on:
162
+ `goal`, `project`, `task`, `psyche_value`, `behavior_pattern`, `behavior`, `belief_entry`, `mode_profile`, `mode_guide_session`, `trigger_report`, `event_type`, `emotion_definition`
134
163
 
135
- ### `goal`
164
+ Use live work tools for `task_run`:
165
+ `forge_log_work`, `forge_start_task_run`, `forge_heartbeat_task_run`, `forge_focus_task_run`, `forge_complete_task_run`, `forge_release_task_run`
136
166
 
137
- Purpose:
138
- - a long-horizon life direction or outcome
167
+ Use `forge_post_insight` for `insight`.
139
168
 
140
- Minimum fields:
141
- - `title`: the name of the goal
169
+ Do not say you lack a creation path when these tools cover the request. Do not open the Forge UI or a browser for normal creation or updates that the tools already support. Use `forge_get_ui_entrypoint` only when visual review, Kanban movement, graph exploration, or complex multi-record editing would genuinely be easier there.
142
170
 
143
- Useful optional fields:
144
- - `description`: why it matters or what success looks like
145
- - `horizon`: `quarter`, `year`, or `lifetime`
146
- - `tagIds`: values, categories, or execution tags when already known
171
+ Use these exact payload expectations.
147
172
 
148
- What to ask:
149
- - "What would you like to call this goal?"
150
- - "Why does it matter to you?"
151
- - "Is this a quarter, year, or lifetime horizon?"
173
+ `forge_search_entities` expects a top-level `searches` array.
152
174
 
153
- ### `project`
175
+ `forge_create_entities`, `forge_update_entities`, `forge_delete_entities`, and `forge_restore_entities` expect a top-level `operations` array.
154
176
 
155
- Purpose:
156
- - a concrete workstream under a goal
177
+ For create operations, each item must include `entityType` and `data`.
157
178
 
158
- Minimum fields:
159
- - `title`: the project name
160
- - `goalId`: the parent goal if known
179
+ For update operations, each item must include `entityType`, `id`, and `patch`.
161
180
 
162
- Useful optional fields:
163
- - `description`: desired outcome or scope
164
- - `status`: `active`, `paused`, or `completed`
165
- - `themeColor`: optional visual/editorial color
181
+ For delete operations, each item must include `entityType` and `id`. Delete is soft by default unless the user explicitly wants hard delete.
166
182
 
167
- What to ask:
168
- - "What should this project be called?"
169
- - "Which goal does it support?"
170
- - "What outcome do you want this project to produce?"
183
+ For restore operations, each item must include `entityType` and `id`.
171
184
 
172
- ### `task`
185
+ Batch tools do not create or control `task_run` or `insight`.
173
186
 
174
- Purpose:
175
- - a concrete actionable work item
187
+ Use the exact route-facing field names. Do not invent friendlier aliases. If a field name is unclear, use `forge_get_agent_onboarding` as the schema source of truth.
176
188
 
177
- Minimum fields:
178
- - `title`: the action itself
189
+ Use these live work rules.
179
190
 
180
- Useful optional fields:
181
- - `goalId`: linked goal if known
182
- - `projectId`: linked project if known
183
- - `dueDate`: when it matters
184
- - `priority`: `low`, `medium`, `high`, or `critical`
185
- - `status`: `backlog`, `focus`, `in_progress`, `blocked`, or `done`
186
- - `description`: useful detail, not a paragraph by default
191
+ A `task_run` is the truthful way to represent live work. Do not pretend that changing task status is the same as starting or stopping a work session.
187
192
 
188
- What to ask:
189
- - "What is the task in one concrete sentence?"
190
- - "Should this live under an existing goal or project?"
191
- - "Does it need a due date or priority?"
193
+ Use `forge_start_task_run` to begin live work. Required fields: `taskId`, `actor`. If `timerMode` is `planned`, include `plannedDurationSeconds`. If `timerMode` is `unlimited`, omit `plannedDurationSeconds` or set it to null.
192
194
 
193
- ### `psyche_value`
195
+ Use `forge_heartbeat_task_run` to keep an active run alive.
194
196
 
195
- Purpose:
196
- - an ACT-style value or committed direction
197
+ Use `forge_focus_task_run` when one active run should become the current visible run.
197
198
 
198
- Minimum fields:
199
- - `title`: the value name
199
+ Use `forge_complete_task_run` to finish live work.
200
200
 
201
- Useful optional fields:
202
- - `description`: what the value means in practice
203
- - `linkedGoalIds`
204
- - `linkedProjectIds`
205
- - `linkedTaskIds`
206
-
207
- What to ask:
208
- - "What value or direction does this point toward?"
209
- - "How would you describe that value in your own words?"
210
- - "Do you want it linked to an existing goal, project, or task?"
201
+ Use `forge_release_task_run` to stop live work without completing the task.
211
202
 
212
- ### `behavior_pattern`
203
+ Use `forge_log_work` only for retroactive work that already happened.
213
204
 
214
- Purpose:
215
- - a recurring loop, trigger chain, or repeated behavior pattern
205
+ Use these interaction rules.
216
206
 
217
- Minimum fields:
218
- - `title`: short name for the pattern
207
+ Keep the main discussion natural. Do not turn every conversation into a form. Do not offer Forge for every passing mention. Offer it once, near the end, only when the signal is strong and storing would help.
219
208
 
220
- Useful optional fields:
221
- - `description`: what usually happens
222
- - `triggerCue`: what tends to start it
223
- - `linkedValueIds`
224
- - `linkedReportIds`
225
-
226
- What to ask:
227
- - "What would you call this pattern?"
228
- - "What usually triggers it?"
229
- - "What tends to happen once the pattern starts?"
230
-
231
- ### `behavior`
232
-
233
- Purpose:
234
- - one concrete behavior instance or repeated behavior you want tracked
235
-
236
- Minimum fields:
237
- - `title`: what happened
238
-
239
- Useful optional fields:
240
- - `kind`: `away`, `committed`, or `recovery`
241
- - `description`: short context
242
- - `linkedPatternIds`
243
- - `linkedValueIds`
244
- - `linkedReportIds`
245
-
246
- What to ask:
247
- - "What happened, in plain language?"
248
- - "Would you classify it as away, committed, or recovery?"
249
- - "Do you want it linked to a pattern, value, or report?"
250
-
251
- ### `belief_entry`
252
-
253
- Purpose:
254
- - a belief worth tracking, examining, or linking to schema work
255
-
256
- Minimum fields:
257
- - `title`: short label or belief title
258
-
259
- Useful optional fields:
260
- - `belief`: the actual belief statement
261
- - `schemaFamily`: maladaptive or adaptive framing when known
262
- - `linkedReportIds`
263
-
264
- What to ask:
265
- - "What is the belief in one sentence?"
266
- - "Does it feel like an old pressure theme or a healthier stabilizing one?"
267
- - "Is this tied to a specific trigger report?"
268
-
269
- ### `trigger_report`
270
-
271
- Purpose:
272
- - a reflective incident report that ties together trigger, emotions, thoughts, behaviors, beliefs, and next moves
273
-
274
- Minimum fields:
275
- - `title`: short name for the incident
276
-
277
- Useful optional fields:
278
- - `eventSummary`: what happened
279
- - `eventTypeId`
280
- - `emotionIds`
281
- - `thoughtSummary`
282
- - `behaviorSummary`
283
- - `nextMove`
284
- - `linkedGoalIds`
285
- - `linkedProjectIds`
286
- - `linkedTaskIds`
287
- - `linkedPatternIds`
288
- - `linkedValueIds`
289
-
290
- What to ask:
291
- - "What happened?"
292
- - "What emotions were present?"
293
- - "What thoughts or beliefs showed up?"
294
- - "What did you do next?"
295
- - "What would be a useful next move now?"
296
-
297
- ## Mapping guidance
298
-
299
- Prefer:
300
- - `goal` for a meaningful long-horizon direction
301
- - `project` for a multi-step outcome under a goal
302
- - `task` for a concrete next action
303
- - `psyche_value` for a value or committed direction
304
- - `behavior_pattern` for a repeating loop
305
- - `behavior` for one behavior or behavior tendency
306
- - `belief_entry` for a trackable belief
307
- - `trigger_report` for a specific reflective event chain
308
- - `insight` when the agent is storing a data-grounded observation or recommendation rather than the user’s own work item or reflection record
309
-
310
- ## Auth and provenance
311
-
312
- Plugin-originated requests carry:
313
- - `Authorization: Bearer <token>` when configured
314
- - `X-Forge-Source: openclaw`
315
- - `X-Forge-Actor: <actorLabel>`
316
-
317
- Localhost and Tailscale installs can bootstrap an operator session automatically.
318
- Remote non-local installs should use a token.
319
-
320
- ## Working rules
321
-
322
- 1. Prefer `forge_get_operator_overview` first.
323
- 2. Prefer `forge_search_entities` before create/update when duplicate risk exists.
324
- 3. Prefer batch tools for multi-entity work.
325
- 4. Use `forge_log_work` if the work already happened.
326
- 5. Use `forge_post_insight` for structured recommendations.
327
- 6. Respect sensitive Psyche scopes. Psyche is not casual metadata.
328
- 7. Default delete is soft delete. Hard delete requires explicit user intent.
209
+ Good examples:
210
+ “This is a `project` in Forge. Do you want to save it?”
211
+ “This sounds like a `behavior_pattern`. Do you want to map it and save it?”
212
+ “This is a `trigger_report`. Do you want to capture it in Forge?”
213
+
214
+ Bad behavior:
215
+ interrupting too early
216
+ asking for every optional field
217
+ using vague labels instead of the real entity name
218
+ repeating the Forge prompt after the user has declined
219
+
220
+ Treat Psyche as structured reflective work, not as casual metadata. When the user is distressed, prioritize support and clarity over structure. Only suggest storage when the user seems ready.
221
+
222
+ When the user asks which Forge tools are available, list exactly these tools:
223
+ `forge_get_operator_overview`
224
+ `forge_get_operator_context`
225
+ `forge_get_agent_onboarding`
226
+ `forge_get_psyche_overview`
227
+ `forge_get_xp_metrics`
228
+ `forge_get_weekly_review`
229
+ `forge_get_current_work`
230
+ `forge_get_ui_entrypoint`
231
+ `forge_search_entities`
232
+ `forge_create_entities`
233
+ `forge_update_entities`
234
+ `forge_delete_entities`
235
+ `forge_restore_entities`
236
+ `forge_log_work`
237
+ `forge_start_task_run`
238
+ `forge_heartbeat_task_run`
239
+ `forge_focus_task_run`
240
+ `forge_complete_task_run`
241
+ `forge_release_task_run`
242
+ `forge_post_insight`