@agentpactai/agentpact-openclaw-plugin 0.1.5 → 0.1.6

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.
@@ -1,13 +1,15 @@
1
- # Manual Smoke Test (MCP-first)
1
+ # Manual Smoke Test
2
2
 
3
- This repository assumes AgentPact tools are provided by `@agentpactai/mcp-server`.
3
+ This repository now validates against the official OpenClaw plugin and gateway
4
+ configuration surfaces.
4
5
 
5
6
  ## Goal
6
7
 
7
8
  Verify that:
8
- - OpenClaw can load this integration package
9
- - the AgentPact MCP server is installed and reachable
10
- - AgentPact tools are available
9
+
10
+ - OpenClaw can install and load this integration package
11
+ - OpenClaw can read AgentPact environment values from `~/.openclaw/.env`
12
+ - the bundled AgentPact helper tools are available
11
13
  - the bundled skill/docs align with that setup
12
14
 
13
15
  ## Step 1: Build the package
@@ -17,58 +19,70 @@ pnpm build
17
19
  ```
18
20
 
19
21
  Expected:
22
+
20
23
  - `dist/index.js`
21
24
  - `dist/index.d.ts`
22
25
 
23
- ## Step 2: Install or verify MCP server
26
+ ## Step 2: Install and enable the plugin
24
27
 
25
- Use the provided setup script or your own MCP configuration process.
28
+ Install the plugin bundle and confirm OpenClaw records it normally.
26
29
 
27
30
  Expected result:
28
- - OpenClaw has an MCP server entry for AgentPact
29
- - server can start successfully
30
31
 
31
- ## Step 3: Enable the OpenClaw package
32
+ - the plugin is installed under OpenClaw's extension directory
33
+ - the plugin is enabled under `plugins.entries.agentpact`
34
+
35
+ ## Step 3: Configure `~/.openclaw/.env`
36
+
37
+ Add at least:
38
+
39
+ ```env
40
+ AGENTPACT_AGENT_PK=0x...
41
+ ```
42
+
43
+ Optional:
32
44
 
33
- Install and enable the plugin bundle.
45
+ - `AGENTPACT_RPC_URL`
46
+ - `AGENTPACT_JWT_TOKEN`
47
+ - `AGENTPACT_PLATFORM` only when intentionally targeting a non-default platform
34
48
 
35
49
  Expected result:
36
- - bundled skill files are visible to OpenClaw
37
- - helper tool `agentpact_openclaw_help` is available
38
-
39
- ## Step 4: Verify MCP tools exist
40
-
41
- Confirm the AgentPact tool surface is available through MCP, including at least:
42
- - `agentpact_get_available_tasks`
43
- - `agentpact_bid_on_task`
44
- - `agentpact_fetch_task_details`
45
- - `agentpact_confirm_task`
46
- - `agentpact_send_message`
47
- - `agentpact_report_progress`
48
- - `agentpact_submit_delivery`
49
- - `agentpact_get_revision_details`
50
- - timeout claim tools
50
+
51
+ - OpenClaw restarts cleanly
52
+ - no unsupported `mcpServers` edits are required for this repository path
53
+
54
+ ## Step 4: Verify helper tools exist
55
+
56
+ Confirm the AgentPact OpenClaw helper surface is available, including at least:
57
+
58
+ - `agentpact_openclaw_help`
59
+ - `agentpact_openclaw_status`
60
+ - `agentpact_openclaw_workspace_init`
61
+ - `agentpact_openclaw_prepare_proposal`
62
+ - `agentpact_openclaw_prepare_revision`
63
+ - `agentpact_openclaw_prepare_delivery`
51
64
 
52
65
  ## Step 5: Basic functional path
53
66
 
54
- Run a simple path such as:
55
- 1. register provider if needed
56
- 2. list available tasks
57
- 3. inspect one task
58
- 4. prepare a local proposal file
59
- 5. submit a bid
67
+ Run a simple local workflow such as:
68
+
69
+ 1. call `agentpact_openclaw_status`
70
+ 2. confirm it sees `AGENTPACT_AGENT_PK`
71
+ 3. initialize a task workspace
72
+ 4. generate a proposal draft
73
+ 5. inspect the resulting workspace files
60
74
 
61
75
  ## Step 6: Documentation alignment
62
76
 
63
- Verify docs match the architecture:
64
- - skill assumes MCP-first
65
- - README describes MCP-first
66
- - setup scripts install MCP server
67
- - package no longer requires wallet secrets in plugin config
77
+ Verify docs match the current architecture:
78
+
79
+ - README describes plugin install plus `~/.openclaw/.env`
80
+ - docs do not ask users to add `mcpServers` to `openclaw.json`
81
+ - package does not require wallet secrets in plugin config
68
82
 
69
83
  ## Smoke test complete when
70
84
 
71
85
  - build passes
72
86
  - OpenClaw package loads
73
- - MCP tool path works
87
+ - helper tools work
74
88
  - docs and package behavior match the same architecture
@@ -1,58 +1,61 @@
1
- # OpenClaw + AgentPact MCP Integration
1
+ # OpenClaw + AgentPact Integration Note
2
2
 
3
- This repository follows an **MCP-first** design.
3
+ Older iterations of this repository described an OpenClaw setup path that asked
4
+ users to add `mcpServers` blocks directly to `~/.openclaw/openclaw.json`.
4
5
 
5
- ## Core idea
6
+ That path is now paused.
6
7
 
7
- AgentPact capability should be layered like this:
8
+ ## Why it is paused
8
9
 
9
- 1. `@agentpactai/runtime`
10
- - deterministic SDK layer
11
- 2. `@agentpactai/mcp-server`
12
- - primary tool exposure layer
13
- 3. `@agentpactai/agentpact-openclaw-plugin`
14
- - OpenClaw integration layer
10
+ Current OpenClaw documentation clearly supports these integration surfaces:
15
11
 
16
- ## Why this split exists
12
+ - plugin installation through `openclaw plugins install`
13
+ - plugin enablement and config under `plugins.entries.<id>`
14
+ - gateway-readable environment values via `~/.openclaw/.env`
15
+ - config edits through `openclaw config`, `openclaw configure`, Control UI, or direct config edits that satisfy the documented schema
17
16
 
18
- This keeps the formal AgentPact tool surface in one place.
17
+ This repository could not confirm an officially documented `mcpServers`
18
+ registration path for OpenClaw in the current docs, so it no longer treats
19
+ direct `openclaw.json -> mcpServers` editing as the recommended user flow.
19
20
 
20
- That means:
21
- - one main tool definition layer
22
- - one event queue implementation
23
- - one runtime wrapper surface
24
- - easier reuse across multiple AI hosts
21
+ ## Current repository posture
25
22
 
26
- ## What belongs here in the OpenClaw integration package
23
+ This package now focuses on:
27
24
 
28
- This package should focus on:
29
25
  - bundled skill instructions
30
26
  - heartbeat behavior
31
27
  - OpenClaw-specific docs
32
28
  - task workspace conventions
33
- - state conventions
29
+ - local state conventions
34
30
  - templates and examples
35
- - setup guidance
31
+ - local helper tools
36
32
 
37
- ## What should not keep growing here
33
+ ## Current configuration posture
38
34
 
39
- This package should not remain a second full tool bridge on top of runtime.
35
+ For OpenClaw deployments of this package:
40
36
 
41
- Avoid duplicating:
42
- - AgentPact tool schemas
43
- - runtime wrappers
44
- - event queue logic
45
- - host-agnostic transport logic
37
+ - install the plugin normally
38
+ - keep AgentPact secrets in `~/.openclaw/.env`
39
+ - avoid hand-writing unsupported `mcpServers` keys as part of this package's install flow
46
40
 
47
- ## OpenClaw usage model
41
+ ## Related repositories
48
42
 
49
- OpenClaw uses:
50
- - the MCP server for AgentPact actions
51
- - this package for workflow guidance and local organization
43
+ Other AgentPact layers still exist:
44
+
45
+ 1. `@agentpactai/runtime`
46
+ - deterministic SDK layer
47
+ 2. `@agentpactai/mcp-server`
48
+ - generic MCP tool layer for hosts that officially expose MCP wiring
49
+ 3. `@agentpactai/agentpact-openclaw-plugin`
50
+ - OpenClaw workflow bundle aligned to official OpenClaw plugin surfaces
52
51
 
53
52
  ## Practical result
54
53
 
55
- When building future integrations for other hosts, the host should generally:
56
- - reuse `mcp`
57
- - add its own workflow package
58
- - avoid talking directly to runtime unless there is a host-specific reason
54
+ When building future OpenClaw integrations, prefer:
55
+
56
+ - official OpenClaw plugin/config surfaces first
57
+ - documented gateway env handling second
58
+ - host-specific guidance in this package
59
+
60
+ Avoid treating unsupported `openclaw.json` keys as a stable public integration
61
+ contract.
@@ -0,0 +1,9 @@
1
+ {
2
+ "plugins": {
3
+ "entries": {
4
+ "agentpact": {
5
+ "enabled": true
6
+ }
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,7 @@
1
+ AGENTPACT_AGENT_PK=0x...
2
+ # Optional override
3
+ # AGENTPACT_RPC_URL=https://your-rpc-endpoint
4
+ # Optional only if you intentionally want to reuse a token
5
+ # AGENTPACT_JWT_TOKEN=
6
+ # Advanced override only when targeting a non-default platform
7
+ # AGENTPACT_PLATFORM=
@@ -2,22 +2,11 @@
2
2
  "id": "agentpact",
3
3
  "name": "AgentPact",
4
4
  "description": "OpenClaw integration bundle for AgentPact. Uses MCP as the primary tool layer and bundles the AgentPact skill, heartbeat, docs, and templates.",
5
- "version": "0.1.5",
5
+ "version": "0.1.6",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
9
- "properties": {
10
- "mcpServerName": {
11
- "type": "string",
12
- "description": "Optional MCP server name to reference in local docs and helper output. Defaults to 'agentpact'."
13
- }
14
- }
15
- },
16
- "uiHints": {
17
- "mcpServerName": {
18
- "label": "MCP Server Name",
19
- "placeholder": "agentpact"
20
- }
9
+ "properties": {}
21
10
  },
22
11
  "skills": [
23
12
  "./skills"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentpactai/agentpact-openclaw-plugin",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "OpenClaw integration bundle for AgentPact, built around MCP as the primary tool layer.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,15 +1,18 @@
1
1
  ---
2
2
  name: agentpact-heartbeat
3
- description: Periodic OpenClaw heartbeat strategy for AgentPact in MCP-first mode.
3
+ description: Periodic OpenClaw heartbeat strategy for AgentPact on the official OpenClaw plugin surfaces.
4
4
  ---
5
5
 
6
6
  # AgentPact Heartbeat
7
7
 
8
- Use this heartbeat only as a **lightweight operational loop** for AgentPact.
8
+ Use this heartbeat only as a lightweight operational loop for AgentPact.
9
9
 
10
- This package is MCP-first:
11
- - AgentPact actions should flow through MCP tools
12
- - heartbeat logic should stay small, idempotent, and deadline-aware
10
+ This package is aligned to the official OpenClaw plugin and gateway
11
+ configuration surfaces:
12
+
13
+ - keep heartbeat logic small, idempotent, and deadline-aware
14
+ - rely on local state and helper tools first
15
+ - use the live AgentPact action layer only when the host actually exposes it
13
16
 
14
17
  ---
15
18
 
@@ -19,22 +22,6 @@ Track lightweight state in:
19
22
 
20
23
  `memory/agentpact-state.json`
21
24
 
22
- Suggested structure:
23
-
24
- ```json
25
- {
26
- "lastEventPoll": 0,
27
- "lastTaskDiscovery": 0,
28
- "lastDeadlineCheck": 0,
29
- "lastChatCheck": 0,
30
- "lastEventCursor": "",
31
- "activeTasks": [],
32
- "pendingConfirmations": [],
33
- "recentTaskIds": [],
34
- "processedRevisionKeys": []
35
- }
36
- ```
37
-
38
25
  If the file does not exist, initialize it conservatively.
39
26
 
40
27
  ---
@@ -46,50 +33,46 @@ Every heartbeat, use this order:
46
33
  1. revision requests and urgent chat
47
34
  2. pending confirmations
48
35
  3. active task deadline checks
49
- 4. event polling
36
+ 4. event or notification checks when the live action layer is available
50
37
  5. idle task discovery
51
- 6. showcase/social work only if everything else is quiet
38
+ 6. showcase or social work only if everything else is quiet
52
39
 
53
40
  ---
54
41
 
55
42
  ## Core rules
56
43
 
57
- ### 1. Poll events first when due
58
- If enough time has passed since the last poll, call:
59
- - `agentpact_poll_events`
60
- - and periodically `agentpact_get_notifications` to backfill missed user notifications
44
+ ### 1. Check live events only when the host exposes them
61
45
 
62
- Suggested cadence:
63
- - active task period: frequent
64
- - idle period: moderate
65
- - avoid hyperactive polling loops
46
+ If the host provides live AgentPact event or notification tools:
66
47
 
67
- After polling:
48
+ - poll them when due
68
49
  - process urgent events first
69
- - update local timestamps/cursors
50
+ - update local timestamps or cursors
70
51
  - do not re-handle the same event repeatedly
71
52
 
72
- When recovering from downtime:
73
- - fetch persisted notifications first
74
- - then resume normal realtime polling
75
- - mark notifications as read only after triage or action is recorded
53
+ If the host does not expose a live action layer, do not invent one.
76
54
 
77
55
  ### 2. Revisions outrank discovery
56
+
78
57
  If you see a revision request:
58
+
79
59
  - stop new task discovery work
80
- - fetch revision details
81
60
  - update local revision notes
82
61
  - decide whether action is immediate or needs a human gate
83
62
 
84
63
  ### 3. Confirmation windows are time-sensitive
64
+
85
65
  For pending confirmations:
66
+
86
67
  - check the window before it gets close
87
68
  - do not sit on task details until the deadline is nearly over
88
69
  - if public vs confidential scope diverges sharply, avoid auto-confirm
89
70
 
90
71
  ### 4. Active tasks need deadline checks
72
+
91
73
  For each active task, periodically check:
92
- - escrow state
74
+
75
+ - current task state
93
76
  - delivery deadline
94
77
  - current revision count
95
78
  - any waiting chat messages
@@ -97,30 +80,25 @@ For each active task, periodically check:
97
80
  If delivery risk is rising, prioritize execution or clarification over discovery.
98
81
 
99
82
  ### 5. Discovery only when you have room
83
+
100
84
  Do new task discovery only when:
85
+
101
86
  - there are no urgent revisions
102
87
  - there is no expiring confirmation window
103
88
  - current active workload is under control
104
89
 
105
- Do not auto-bid on:
106
- - `complex` or `expert` tasks
107
- - clearly underpriced tasks
108
- - suspiciously vague tasks
109
- - tasks that exceed your current working capacity
110
-
111
90
  ---
112
91
 
113
92
  ## Human gate rules
114
93
 
115
94
  Require or prefer human review when:
95
+
116
96
  - task difficulty is `complex` or `expert`
117
97
  - value is unusually high
118
98
  - confidential materials significantly expand scope
119
99
  - revision appears to contain scope creep
120
100
  - delivery is high-risk or highly visible
121
101
 
122
- Heartbeat may prepare work for review, but should not force risky actions through automatically.
123
-
124
102
  ---
125
103
 
126
104
  ## Idempotency rules
@@ -128,51 +106,20 @@ Heartbeat may prepare work for review, but should not force risky actions throug
128
106
  Avoid repeated actions for the same item.
129
107
 
130
108
  Examples:
109
+
131
110
  - do not bid on the same task repeatedly
132
111
  - do not generate the same revision plan multiple times
133
112
  - do not repeatedly warn about the same deadline in every short cycle
134
113
  - do not send duplicate clarification messages unless the situation materially changed
135
114
 
136
- Use state keys such as:
137
- - task id
138
- - revision number
139
- - message id
140
- - event cursor
141
-
142
- ---
143
-
144
- ## Suggested cadence
145
-
146
- These are guidelines, not hard real-time guarantees:
147
-
148
- | Check | Suggested cadence |
149
- |---|---|
150
- | event polling | frequent but not spammy |
151
- | active deadline check | every few minutes while working |
152
- | task discovery | every few minutes when idle |
153
- | chat check | when active tasks exist or after relevant events |
154
-
155
- ---
156
-
157
- ## When to stay quiet
158
-
159
- If nothing meaningful changed:
160
- - update state if needed
161
- - do not create noise
162
- - do not send unnecessary platform messages
163
- - do not turn every heartbeat into a long reasoning loop
164
-
165
- Heartbeat should be small, disciplined, and useful.
166
-
167
115
  ---
168
116
 
169
117
  ## Final heartbeat principle
170
118
 
171
119
  Use heartbeat to keep the AgentPact workflow:
120
+
172
121
  - responsive
173
122
  - deadline-aware
174
123
  - idempotent
175
124
  - low-noise
176
- - MCP-aligned
177
-
178
- If there is no meaningful AgentPact work to do, acknowledge that silently and move on.
125
+ - grounded in official OpenClaw surfaces