@dhfpub/clawpool-admin 0.2.1 → 0.2.2
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/index.js +8 -8
- package/package.json +1 -1
- package/skills/clawpool-query/SKILL.md +42 -5
package/dist/index.js
CHANGED
|
@@ -295,11 +295,11 @@ function buildGroupDetailReadRequest(params) {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
function buildContactSearchRequest(params) {
|
|
298
|
-
const
|
|
298
|
+
const id = readRequiredStringParam(params, "id");
|
|
299
299
|
const limit = readOptionalInt(params, "limit");
|
|
300
300
|
const offset = readOptionalInt(params, "offset");
|
|
301
301
|
const query = {
|
|
302
|
-
|
|
302
|
+
id
|
|
303
303
|
};
|
|
304
304
|
if (limit != null) {
|
|
305
305
|
query.limit = String(limit);
|
|
@@ -315,11 +315,11 @@ function buildContactSearchRequest(params) {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
function buildSessionSearchRequest(params) {
|
|
318
|
-
const
|
|
318
|
+
const id = readRequiredStringParam(params, "id");
|
|
319
319
|
const limit = readOptionalInt(params, "limit");
|
|
320
320
|
const offset = readOptionalInt(params, "offset");
|
|
321
321
|
const query = {
|
|
322
|
-
|
|
322
|
+
id
|
|
323
323
|
};
|
|
324
324
|
if (limit != null) {
|
|
325
325
|
query.limit = String(limit);
|
|
@@ -1037,11 +1037,11 @@ var ClawpoolQueryToolSchema = {
|
|
|
1037
1037
|
properties: {
|
|
1038
1038
|
action: { const: "contact_search" },
|
|
1039
1039
|
accountId: { type: "string", minLength: 1 },
|
|
1040
|
-
|
|
1040
|
+
id: { type: "string", pattern: "^[0-9]+$" },
|
|
1041
1041
|
limit: { type: "integer", minimum: 1 },
|
|
1042
1042
|
offset: { type: "integer", minimum: 0 }
|
|
1043
1043
|
},
|
|
1044
|
-
required: ["action", "
|
|
1044
|
+
required: ["action", "id"]
|
|
1045
1045
|
},
|
|
1046
1046
|
{
|
|
1047
1047
|
type: "object",
|
|
@@ -1049,11 +1049,11 @@ var ClawpoolQueryToolSchema = {
|
|
|
1049
1049
|
properties: {
|
|
1050
1050
|
action: { const: "session_search" },
|
|
1051
1051
|
accountId: { type: "string", minLength: 1 },
|
|
1052
|
-
|
|
1052
|
+
id: { type: "string", minLength: 1 },
|
|
1053
1053
|
limit: { type: "integer", minimum: 1 },
|
|
1054
1054
|
offset: { type: "integer", minimum: 0 }
|
|
1055
1055
|
},
|
|
1056
|
-
required: ["action", "
|
|
1056
|
+
required: ["action", "id"]
|
|
1057
1057
|
},
|
|
1058
1058
|
{
|
|
1059
1059
|
type: "object",
|
package/package.json
CHANGED
|
@@ -28,20 +28,54 @@ For Clawpool query actions, always call:
|
|
|
28
28
|
Rules:
|
|
29
29
|
|
|
30
30
|
1. Pass query parameters with their exact typed field names.
|
|
31
|
-
2. Use `
|
|
31
|
+
2. Use `id` for `contact_search` and `session_search`.
|
|
32
32
|
3. Use `sessionId`, `beforeId`, and `limit` explicitly for message history.
|
|
33
33
|
4. Never invent a `sessionId`. Resolve it from context, from a previous tool result, or ask the user.
|
|
34
34
|
5. Keep one tool call per action for audit clarity.
|
|
35
35
|
|
|
36
|
+
## Single Lookup Usage
|
|
37
|
+
|
|
38
|
+
When the user already provides one exact ID, do not do fuzzy search.
|
|
39
|
+
Call the corresponding search action once and return the backend result as-is in the normal search-result shape.
|
|
40
|
+
|
|
41
|
+
1. Single contact lookup:
|
|
42
|
+
use `action: "contact_search"` and pass `id`
|
|
43
|
+
2. Single session lookup:
|
|
44
|
+
use `action: "session_search"` and pass `id`
|
|
45
|
+
|
|
46
|
+
ID meaning:
|
|
47
|
+
|
|
48
|
+
1. `contact_search.id`:
|
|
49
|
+
contact or Agent numeric ID, for example `1002` or `9992`
|
|
50
|
+
2. `session_search.id`:
|
|
51
|
+
exact session ID string, for example `task_room_9083`
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"action": "contact_search",
|
|
58
|
+
"id": "1002"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"action": "session_search",
|
|
65
|
+
"id": "task_room_9083"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
36
69
|
## Action Contracts
|
|
37
70
|
|
|
38
71
|
### contact_search
|
|
39
72
|
|
|
40
73
|
Purpose: search the owner's Clawpool contact directory.
|
|
74
|
+
When `id` is provided, return the exact matching contact record in the same search-result shape.
|
|
41
75
|
|
|
42
76
|
Required input:
|
|
43
77
|
|
|
44
|
-
1. `
|
|
78
|
+
1. `id` (contact ID, numeric string)
|
|
45
79
|
|
|
46
80
|
Optional input:
|
|
47
81
|
|
|
@@ -50,16 +84,18 @@ Optional input:
|
|
|
50
84
|
|
|
51
85
|
Guardrails:
|
|
52
86
|
|
|
53
|
-
1. Use this when the
|
|
87
|
+
1. Use this when the target contact ID is already known and you need the exact contact entry.
|
|
54
88
|
2. Do not jump directly to session history from a vague contact hint; resolve the contact or session first.
|
|
89
|
+
3. `id` must be the current contact's numeric ID, not username, nickname, remark name, or session ID.
|
|
55
90
|
|
|
56
91
|
### session_search
|
|
57
92
|
|
|
58
93
|
Purpose: search the owner's visible sessions by final display title.
|
|
94
|
+
When `id` is provided, return the exact matching session in the same search-result shape.
|
|
59
95
|
|
|
60
96
|
Required input:
|
|
61
97
|
|
|
62
|
-
1. `
|
|
98
|
+
1. `id` (session ID)
|
|
63
99
|
|
|
64
100
|
Optional input:
|
|
65
101
|
|
|
@@ -68,8 +104,9 @@ Optional input:
|
|
|
68
104
|
|
|
69
105
|
Guardrails:
|
|
70
106
|
|
|
71
|
-
1. Use this when the
|
|
107
|
+
1. Use this when the target session ID is already known and you need the exact session entry.
|
|
72
108
|
2. If multiple sessions match, present the candidates and let the user choose before reading history.
|
|
109
|
+
3. `id` must be the exact current `session_id`, not group name, title text, or contact ID.
|
|
73
110
|
|
|
74
111
|
### message_history
|
|
75
112
|
|