@openclaw-cloud/agent-controller 0.21.0 → 1.0.0-beta.10
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/api.d.ts +4 -0
- package/dist/api.js +10 -2
- package/dist/api.js.map +1 -1
- package/dist/commands/bootstrap.js +8 -8
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/heartbeat-cli.js +5 -4
- package/dist/commands/heartbeat-cli.js.map +1 -1
- package/dist/commands/install-deps.js +18 -8
- package/dist/commands/install-deps.js.map +1 -1
- package/dist/commands/install.js +8 -8
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/self-update.js +2 -1
- package/dist/commands/self-update.js.map +1 -1
- package/dist/config-file.js +14 -4
- package/dist/config-file.js.map +1 -1
- package/dist/config.d.ts +29 -0
- package/dist/config.js +81 -0
- package/dist/config.js.map +1 -0
- package/dist/connection.d.ts +2 -0
- package/dist/connection.js +27 -7
- package/dist/connection.js.map +1 -1
- package/dist/debug.js +2 -1
- package/dist/debug.js.map +1 -1
- package/dist/handlers/backup.js +4 -1
- package/dist/handlers/backup.js.map +1 -1
- package/dist/handlers/board-handler.d.ts +23 -1
- package/dist/handlers/board-handler.js +153 -27
- package/dist/handlers/board-handler.js.map +1 -1
- package/dist/handlers/chat.js +94 -6
- package/dist/handlers/chat.js.map +1 -1
- package/dist/handlers/deploy.js +16 -29
- package/dist/handlers/deploy.js.map +1 -1
- package/dist/handlers/diagnostics.js +12 -0
- package/dist/handlers/diagnostics.js.map +1 -1
- package/dist/handlers/knowledge-sync.js +21 -1
- package/dist/handlers/knowledge-sync.js.map +1 -1
- package/dist/handlers/memory.d.ts +7 -0
- package/dist/handlers/memory.js +41 -0
- package/dist/handlers/memory.js.map +1 -0
- package/dist/handlers/onboarding.js +18 -2
- package/dist/handlers/onboarding.js.map +1 -1
- package/dist/handlers/package-install.js +44 -12
- package/dist/handlers/package-install.js.map +1 -1
- package/dist/handlers/pair.js +14 -1
- package/dist/handlers/pair.js.map +1 -1
- package/dist/handlers/restart.js +3 -1
- package/dist/handlers/restart.js.map +1 -1
- package/dist/handlers/self-update.js +3 -1
- package/dist/handlers/self-update.js.map +1 -1
- package/dist/handlers/stop.js +7 -0
- package/dist/handlers/stop.js.map +1 -1
- package/dist/handlers/telegram-webhook.js +23 -0
- package/dist/handlers/telegram-webhook.js.map +1 -1
- package/dist/handlers/update-config.js +8 -2
- package/dist/handlers/update-config.js.map +1 -1
- package/dist/heartbeat.d.ts +7 -0
- package/dist/heartbeat.js +15 -65
- package/dist/heartbeat.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +126 -23
- package/dist/index.js.map +1 -1
- package/dist/mcp-client.d.ts +29 -0
- package/dist/mcp-client.js +70 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/memory-mcp-server.d.ts +8 -0
- package/dist/memory-mcp-server.js +291 -0
- package/dist/memory-mcp-server.js.map +1 -0
- package/dist/platform/linux.js +7 -3
- package/dist/platform/linux.js.map +1 -1
- package/dist/platform/macos.js +4 -2
- package/dist/platform/macos.js.map +1 -1
- package/dist/platform/windows.js +4 -2
- package/dist/platform/windows.js.map +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/mock/index.js.map +1 -1
- package/dist/providers/openclaw/device-identity.js +2 -2
- package/dist/providers/openclaw/device-identity.js.map +1 -1
- package/dist/providers/openclaw/gateway-adapter.js +19 -8
- package/dist/providers/openclaw/gateway-adapter.js.map +1 -1
- package/dist/providers/openclaw/gateway-client.js +9 -3
- package/dist/providers/openclaw/gateway-client.js.map +1 -1
- package/dist/providers/openclaw/index.js +14 -3
- package/dist/providers/openclaw/index.js.map +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +1 -21
- package/dist/skills/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/apply-config.js +9 -5
- package/dist/utils/apply-config.js.map +1 -1
- package/dist/utils/claude-env.js +11 -5
- package/dist/utils/claude-env.js.map +1 -1
- package/dist/utils/env.js +2 -1
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/knowledge-graph.d.ts +66 -0
- package/dist/utils/knowledge-graph.js +163 -0
- package/dist/utils/knowledge-graph.js.map +1 -0
- package/dist/utils/release-channel.js +2 -4
- package/dist/utils/release-channel.js.map +1 -1
- package/dist/workspace.js +4 -5
- package/dist/workspace.js.map +1 -1
- package/package.json +28 -5
- package/dist/skills/board-tools/SKILL.md +0 -75
- package/dist/skills/board-tools/scripts/board-artifact.sh +0 -56
- package/dist/skills/board-tools/scripts/board-artifacts.sh +0 -16
- package/dist/skills/board-tools/scripts/board-comment.sh +0 -23
- package/dist/skills/board-tools/scripts/board-move.sh +0 -13
- package/dist/skills/board-tools/scripts/board-result.sh +0 -35
package/package.json
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw-cloud/agent-controller",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"agent-controller": "bin/agent-controller.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "tsc
|
|
10
|
+
"build": "tsc",
|
|
11
11
|
"prepublishOnly": "npm run build",
|
|
12
12
|
"test": "node --experimental-vm-modules node_modules/.bin/jest --forceExit",
|
|
13
13
|
"start": "node bin/agent-controller.js",
|
|
14
|
-
"prepare": "[ -d .git ] && husky || true"
|
|
14
|
+
"prepare": "[ -d .git ] && husky || true",
|
|
15
|
+
"lint": "eslint --fix ./src"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"dist/",
|
|
18
19
|
"bin/"
|
|
19
20
|
],
|
|
20
21
|
"dependencies": {
|
|
22
|
+
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
21
23
|
"centrifuge": "^5.5.3",
|
|
22
|
-
"ws": "^8.19.0"
|
|
24
|
+
"ws": "^8.19.0",
|
|
25
|
+
"zod": "^4.3.6"
|
|
23
26
|
},
|
|
24
27
|
"devDependencies": {
|
|
25
28
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -27,15 +30,35 @@
|
|
|
27
30
|
"@types/jest": "^30.0.0",
|
|
28
31
|
"@types/node": "^25.2.3",
|
|
29
32
|
"@types/ws": "^8.18.1",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
34
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
30
35
|
"ajv": "^8.18.0",
|
|
36
|
+
"eslint": "^9.39.4",
|
|
37
|
+
"eslint-config-prettier": "^10.1.8",
|
|
38
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
39
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
40
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
41
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
31
42
|
"husky": "^9.1.7",
|
|
32
43
|
"jest": "^30.2.0",
|
|
44
|
+
"prettier": "^3.8.1",
|
|
33
45
|
"semantic-release": "^24.0.0",
|
|
34
46
|
"ts-jest": "^29.4.6",
|
|
35
|
-
"typescript": "^5.9.3"
|
|
47
|
+
"typescript": "^5.9.3",
|
|
48
|
+
"typescript-eslint": "^8.58.0"
|
|
36
49
|
},
|
|
37
50
|
"publishConfig": {
|
|
38
51
|
"access": "public",
|
|
39
52
|
"registry": "https://registry.npmjs.org/"
|
|
53
|
+
},
|
|
54
|
+
"prettier": {
|
|
55
|
+
"semi": true,
|
|
56
|
+
"arrowParens": "always",
|
|
57
|
+
"singleQuote": true,
|
|
58
|
+
"bracketSpacing": true,
|
|
59
|
+
"printWidth": 100,
|
|
60
|
+
"quoteProps": "consistent",
|
|
61
|
+
"trailingComma": "all",
|
|
62
|
+
"tabWidth": 2
|
|
40
63
|
}
|
|
41
64
|
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: board-tools
|
|
3
|
-
description: Interact with the AI Factory board — create artifacts, post comments, report task results, move cards. Use when working on a board task (card), saving work output, communicating progress, or completing a task.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Board Tools
|
|
7
|
-
|
|
8
|
-
Tools for interacting with the AI Factory kanban board. Use these when working on a task from the board.
|
|
9
|
-
|
|
10
|
-
## Available Tools
|
|
11
|
-
|
|
12
|
-
### Report Result
|
|
13
|
-
When you finish a task or encounter an unrecoverable error:
|
|
14
|
-
```bash
|
|
15
|
-
# Success
|
|
16
|
-
board-result complete
|
|
17
|
-
|
|
18
|
-
# Failure
|
|
19
|
-
board-result fail "Error description here"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Create Artifact
|
|
23
|
-
Save structured output from your work. Other agents in the pipeline will see these.
|
|
24
|
-
```bash
|
|
25
|
-
# Code artifact (PR, commit, branch)
|
|
26
|
-
board-artifact code "PR #42" --metadata '{"url":"https://gitlab.com/...","branch":"feat/oauth"}'
|
|
27
|
-
|
|
28
|
-
# Document
|
|
29
|
-
board-artifact document "Design Doc" --content "# Architecture\n\n..."
|
|
30
|
-
|
|
31
|
-
# Review
|
|
32
|
-
board-artifact review "Code Review" --content "LGTM. Minor issues:\n- Fix error handling in auth.ts"
|
|
33
|
-
|
|
34
|
-
# Decision
|
|
35
|
-
board-artifact decision "Strategy Decision" --content "We chose B2B focus because..."
|
|
36
|
-
|
|
37
|
-
# Link
|
|
38
|
-
board-artifact link "Staging Deploy" --metadata '{"url":"https://staging.example.com"}'
|
|
39
|
-
|
|
40
|
-
# Data (test results, metrics, etc.)
|
|
41
|
-
board-artifact data "Test Results" --content '{"passed":42,"failed":0}'
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Post Comment
|
|
45
|
-
Add a human-readable comment to the card (visible in the UI):
|
|
46
|
-
```bash
|
|
47
|
-
board-comment "Completed the OAuth integration. PR ready for review."
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### Move Card
|
|
51
|
-
Move the card to the next column (usually done after reporting result):
|
|
52
|
-
```bash
|
|
53
|
-
board-move
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### List Artifacts
|
|
57
|
-
See what previous agents/steps have produced:
|
|
58
|
-
```bash
|
|
59
|
-
board-artifacts
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Typical Workflow
|
|
63
|
-
|
|
64
|
-
1. Read the task prompt (provided automatically)
|
|
65
|
-
2. Review previous artifacts if any (provided in prompt, or run `board-artifacts`)
|
|
66
|
-
3. Do the work
|
|
67
|
-
4. Save outputs as artifacts (`board-artifact`)
|
|
68
|
-
5. Post a summary comment (`board-comment`)
|
|
69
|
-
6. Report result (`board-result complete`)
|
|
70
|
-
7. Move the card (`board-move`)
|
|
71
|
-
|
|
72
|
-
## Notes
|
|
73
|
-
- All scripts auto-detect the card ID from the environment (set by the board handler)
|
|
74
|
-
- Authentication is handled automatically via agent token
|
|
75
|
-
- Artifacts persist on the card — visible to all subsequent agents and in the UI
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Create artifact: board-artifact <type> <name> [--content <text>] [--metadata <json>]
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
CARD_ID="${BOARD_CARD_ID:?BOARD_CARD_ID not set}"
|
|
6
|
-
API_BASE="${BACKEND_URL:?BACKEND_URL not set}"
|
|
7
|
-
TOKEN="${AGENT_TOKEN:?AGENT_TOKEN not set}"
|
|
8
|
-
|
|
9
|
-
TYPE="${1:?Usage: board-artifact <type> <name> [--content <text>] [--metadata <json>]}"
|
|
10
|
-
NAME="${2:?Usage: board-artifact <type> <name> [--content <text>] [--metadata <json>]}"
|
|
11
|
-
shift 2
|
|
12
|
-
|
|
13
|
-
CONTENT=""
|
|
14
|
-
METADATA="{}"
|
|
15
|
-
|
|
16
|
-
while [[ $# -gt 0 ]]; do
|
|
17
|
-
case "$1" in
|
|
18
|
-
--content)
|
|
19
|
-
CONTENT="$2"
|
|
20
|
-
shift 2
|
|
21
|
-
;;
|
|
22
|
-
--metadata)
|
|
23
|
-
METADATA="$2"
|
|
24
|
-
shift 2
|
|
25
|
-
;;
|
|
26
|
-
*)
|
|
27
|
-
echo "Unknown option: $1" >&2
|
|
28
|
-
exit 1
|
|
29
|
-
;;
|
|
30
|
-
esac
|
|
31
|
-
done
|
|
32
|
-
|
|
33
|
-
# Build JSON payload using jq if available, otherwise manual construction
|
|
34
|
-
if command -v jq &>/dev/null; then
|
|
35
|
-
BODY=$(jq -n \
|
|
36
|
-
--arg type "$TYPE" \
|
|
37
|
-
--arg name "$NAME" \
|
|
38
|
-
--arg content "$CONTENT" \
|
|
39
|
-
--argjson metadata "$METADATA" \
|
|
40
|
-
'{type: $type, name: $name, content: (if $content == "" then null else $content end), metadata: $metadata}')
|
|
41
|
-
else
|
|
42
|
-
if [ -z "$CONTENT" ]; then
|
|
43
|
-
BODY="{\"type\":\"$TYPE\",\"name\":\"$NAME\",\"content\":null,\"metadata\":$METADATA}"
|
|
44
|
-
else
|
|
45
|
-
# Escape content for JSON
|
|
46
|
-
ESC_CONTENT=$(printf '%s' "$CONTENT" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
|
47
|
-
BODY="{\"type\":\"$TYPE\",\"name\":\"$NAME\",\"content\":\"$ESC_CONTENT\",\"metadata\":$METADATA}"
|
|
48
|
-
fi
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
curl -sf -X POST "${API_BASE}/api/agent/board/cards/${CARD_ID}/artifacts" \
|
|
52
|
-
-H "AgentToken: ${TOKEN}" \
|
|
53
|
-
-H "Content-Type: application/json" \
|
|
54
|
-
-d "$BODY"
|
|
55
|
-
|
|
56
|
-
echo "Artifact created: $TYPE / $NAME"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# List artifacts: board-artifacts
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
CARD_ID="${BOARD_CARD_ID:?BOARD_CARD_ID not set}"
|
|
6
|
-
API_BASE="${BACKEND_URL:?BACKEND_URL not set}"
|
|
7
|
-
TOKEN="${AGENT_TOKEN:?AGENT_TOKEN not set}"
|
|
8
|
-
|
|
9
|
-
RESPONSE=$(curl -sf "${API_BASE}/api/agent/board/cards/${CARD_ID}/artifacts" \
|
|
10
|
-
-H "AgentToken: ${TOKEN}")
|
|
11
|
-
|
|
12
|
-
if command -v jq &>/dev/null; then
|
|
13
|
-
echo "$RESPONSE" | jq -r '.[] | "[\(.type)] \(.name) (step \(.stepIndex // "n/a")): \(.content // (.metadata | tostring))"'
|
|
14
|
-
else
|
|
15
|
-
echo "$RESPONSE"
|
|
16
|
-
fi
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Post comment: board-comment <message>
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
CARD_ID="${BOARD_CARD_ID:?BOARD_CARD_ID not set}"
|
|
6
|
-
API_BASE="${BACKEND_URL:?BACKEND_URL not set}"
|
|
7
|
-
TOKEN="${AGENT_TOKEN:?AGENT_TOKEN not set}"
|
|
8
|
-
|
|
9
|
-
MESSAGE="${1:?Usage: board-comment <message>}"
|
|
10
|
-
|
|
11
|
-
if command -v jq &>/dev/null; then
|
|
12
|
-
BODY=$(jq -n --arg content "$MESSAGE" '{content: $content}')
|
|
13
|
-
else
|
|
14
|
-
ESC_MSG=$(printf '%s' "$MESSAGE" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
|
15
|
-
BODY="{\"content\":\"$ESC_MSG\"}"
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
curl -sf -X POST "${API_BASE}/api/agent/board/cards/${CARD_ID}/comments" \
|
|
19
|
-
-H "AgentToken: ${TOKEN}" \
|
|
20
|
-
-H "Content-Type: application/json" \
|
|
21
|
-
-d "$BODY"
|
|
22
|
-
|
|
23
|
-
echo "Comment posted"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Move card to next column: board-move
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
CARD_ID="${BOARD_CARD_ID:?BOARD_CARD_ID not set}"
|
|
6
|
-
API_BASE="${BACKEND_URL:?BACKEND_URL not set}"
|
|
7
|
-
TOKEN="${AGENT_TOKEN:?AGENT_TOKEN not set}"
|
|
8
|
-
|
|
9
|
-
curl -sf -X POST "${API_BASE}/api/agent/board/cards/${CARD_ID}/move" \
|
|
10
|
-
-H "AgentToken: ${TOKEN}" \
|
|
11
|
-
-H "Content-Type: application/json"
|
|
12
|
-
|
|
13
|
-
echo "Card moved to next column"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Report task result: board-result <complete|fail> [error message]
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
CARD_ID="${BOARD_CARD_ID:?BOARD_CARD_ID not set}"
|
|
6
|
-
API_BASE="${BACKEND_URL:?BACKEND_URL not set}"
|
|
7
|
-
TOKEN="${AGENT_TOKEN:?AGENT_TOKEN not set}"
|
|
8
|
-
|
|
9
|
-
STATUS="${1:?Usage: board-result <complete|fail> [error message]}"
|
|
10
|
-
shift || true
|
|
11
|
-
|
|
12
|
-
case "$STATUS" in
|
|
13
|
-
complete|completed)
|
|
14
|
-
BODY='{"status":"completed"}'
|
|
15
|
-
;;
|
|
16
|
-
fail|failed)
|
|
17
|
-
ERROR_MSG="${1:-Agent reported failure}"
|
|
18
|
-
BODY="{\"status\":\"failed\",\"error\":\"$ERROR_MSG\"}"
|
|
19
|
-
;;
|
|
20
|
-
needs-input|needs_input|blocked)
|
|
21
|
-
INPUT_MSG="${1:-Agent needs clarification}"
|
|
22
|
-
BODY="{\"status\":\"needs_input\",\"message\":\"$INPUT_MSG\"}"
|
|
23
|
-
;;
|
|
24
|
-
*)
|
|
25
|
-
echo "Usage: board-result <complete|fail|needs-input> [message]" >&2
|
|
26
|
-
exit 1
|
|
27
|
-
;;
|
|
28
|
-
esac
|
|
29
|
-
|
|
30
|
-
curl -sf -X POST "${API_BASE}/api/agent/board/cards/${CARD_ID}/result" \
|
|
31
|
-
-H "AgentToken: ${TOKEN}" \
|
|
32
|
-
-H "Content-Type: application/json" \
|
|
33
|
-
-d "$BODY"
|
|
34
|
-
|
|
35
|
-
echo "Result reported: $STATUS"
|