forge-openclaw-plugin 0.2.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.
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": "forge",
3
+ "name": "Forge",
4
+ "description": "Thin OpenClaw adapter for the live Forge /api/v1 collaboration API.",
5
+ "version": "0.2.3",
6
+ "skills": [
7
+ "./skills"
8
+ ],
9
+ "uiHints": {
10
+ "baseUrl": {
11
+ "label": "Forge Base URL",
12
+ "help": "Base URL of the live Forge API bridge.",
13
+ "placeholder": "http://127.0.0.1:3017"
14
+ },
15
+ "apiToken": {
16
+ "label": "Forge API Token",
17
+ "help": "Optional bearer token. Leave blank for one-step localhost or Tailscale operator-session bootstrap.",
18
+ "sensitive": true,
19
+ "placeholder": "fg_live_..."
20
+ },
21
+ "actorLabel": {
22
+ "label": "Actor Label",
23
+ "help": "Recorded in Forge provenance headers for plugin-originated writes.",
24
+ "placeholder": "aurel"
25
+ },
26
+ "timeoutMs": {
27
+ "label": "Request Timeout (ms)",
28
+ "help": "Maximum time to wait before the plugin aborts an upstream Forge request.",
29
+ "advanced": true
30
+ }
31
+ },
32
+ "configSchema": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "baseUrl": {
37
+ "type": "string",
38
+ "default": "http://127.0.0.1:3017",
39
+ "description": "Base URL of the live Forge API bridge."
40
+ },
41
+ "apiToken": {
42
+ "type": "string",
43
+ "default": "",
44
+ "description": "Optional bearer token for remote or explicit scoped access. Localhost and Tailscale Forge instances can bootstrap an operator session automatically."
45
+ },
46
+ "actorLabel": {
47
+ "type": "string",
48
+ "default": "aurel",
49
+ "description": "Actor label recorded in Forge provenance headers."
50
+ },
51
+ "timeoutMs": {
52
+ "type": "integer",
53
+ "default": 15000,
54
+ "minimum": 1000,
55
+ "maximum": 120000,
56
+ "description": "Timeout for proxy calls from the OpenClaw plugin to Forge."
57
+ }
58
+ }
59
+ }
60
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "forge-openclaw-plugin",
3
+ "version": "0.2.3",
4
+ "description": "Thin OpenClaw adapter for the live Forge /api/v1 collaboration API.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "private": false,
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "keywords": [
12
+ "forge",
13
+ "openclaw",
14
+ "plugin",
15
+ "agent",
16
+ "productivity"
17
+ ],
18
+ "files": [
19
+ "dist",
20
+ "skills",
21
+ "README.md",
22
+ "openclaw.plugin.json"
23
+ ],
24
+ "types": "./dist/openclaw/index.d.ts",
25
+ "exports": {
26
+ ".": "./dist/openclaw/index.js"
27
+ },
28
+ "openclaw": {
29
+ "extensions": [
30
+ "./dist/openclaw/index.js"
31
+ ]
32
+ },
33
+ "peerDependencies": {
34
+ "openclaw": "^2026.3.22"
35
+ },
36
+ "dependencies": {
37
+ "@sinclair/typebox": "^0.34.48"
38
+ },
39
+ "scripts": {
40
+ "build": "npm exec -- tsc -p tsconfig.build.json"
41
+ }
42
+ }
@@ -0,0 +1,328 @@
1
+ ---
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.
4
+ ---
5
+
6
+ # Forge OpenClaw
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.
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
17
+
18
+ ## Public working posture
19
+
20
+ Keep the main discussion natural.
21
+ Do not turn every conversation into a form.
22
+
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.
29
+
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."
33
+
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
38
+
39
+ ## Advertised plugin interface
40
+
41
+ Treat this as the public mental model:
42
+
43
+ Read first:
44
+ - `forge_get_operator_overview`
45
+
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`
52
+
53
+ Agent-authored recommendations:
54
+ - `forge_post_insight`
55
+
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.
57
+
58
+ ## Source of truth
59
+
60
+ Forge remains the source of truth.
61
+
62
+ Use:
63
+ - plugin routes under `/forge/v1/...`
64
+ - the batch entity tools for most entity work
65
+ - `forge_post_insight` for structured recommendations
66
+
67
+ Do not:
68
+ - mutate storage directly
69
+ - scrape the UI instead of using the API
70
+ - invent entities outside the real Forge model
71
+
72
+ ## Overview-first and batch-first rules
73
+
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
84
+
85
+ ## When to offer saving to Forge
86
+
87
+ Offer once, gently, near the end of the reply, when the signal is strong.
88
+
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`
100
+
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
116
+
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
121
+
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
132
+
133
+ These are the main advertised formats. Use them to decide what to ask next.
134
+
135
+ ### `goal`
136
+
137
+ Purpose:
138
+ - a long-horizon life direction or outcome
139
+
140
+ Minimum fields:
141
+ - `title`: the name of the goal
142
+
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
147
+
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?"
152
+
153
+ ### `project`
154
+
155
+ Purpose:
156
+ - a concrete workstream under a goal
157
+
158
+ Minimum fields:
159
+ - `title`: the project name
160
+ - `goalId`: the parent goal if known
161
+
162
+ Useful optional fields:
163
+ - `description`: desired outcome or scope
164
+ - `status`: `active`, `paused`, or `completed`
165
+ - `themeColor`: optional visual/editorial color
166
+
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?"
171
+
172
+ ### `task`
173
+
174
+ Purpose:
175
+ - a concrete actionable work item
176
+
177
+ Minimum fields:
178
+ - `title`: the action itself
179
+
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
187
+
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?"
192
+
193
+ ### `psyche_value`
194
+
195
+ Purpose:
196
+ - an ACT-style value or committed direction
197
+
198
+ Minimum fields:
199
+ - `title`: the value name
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?"
211
+
212
+ ### `behavior_pattern`
213
+
214
+ Purpose:
215
+ - a recurring loop, trigger chain, or repeated behavior pattern
216
+
217
+ Minimum fields:
218
+ - `title`: short name for the pattern
219
+
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.