Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/core/test/policy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -645,20 +645,20 @@ test("event task planner supports task-specific item prefixes", () => {
eventController: {
enabled: true,
tasks: [{
id: "tailscale-inventory",
id: "network-inventory",
sourceBotId: "111",
sourceMention: "<@111>",
target: { guildId: "g1", channelId: "c1" },
itemLabel: "node/user",
itemPrefixes: ["Node", "User"],
stopConditions: [{ type: "phrase", value: "Tailscale inventory complete" }]
stopConditions: [{ type: "phrase", value: "Network inventory complete" }]
}]
}
};

const nodePlan = planDiscordEventTaskTurn(cfg, {
request: {
taskId: "tailscale-inventory",
taskId: "network-inventory",
source: { botId: "111" },
target: { guildId: "g1", channelId: "c1" },
messages: [{ id: "n1", content: "Node: lab-node\nStatus: online\nWarning: none" }]
Expand All @@ -668,12 +668,12 @@ test("event task planner supports task-specific item prefixes", () => {
assert.equal(nodePlan.reason, "event_task_follow_up_required");
assert.equal(nodePlan.item, "lab-node");
assert.match(nodePlan.followUpMessage, /next unreported node\/user/);
assert.match(nodePlan.followUpMessage, /Tailscale inventory complete/);
assert.match(nodePlan.followUpMessage, /Network inventory complete/);
assert.doesNotMatch(nodePlan.followUpMessage, /“Inventory complete”/);

const userPlan = planDiscordEventTaskTurn(cfg, {
request: {
taskId: "tailscale-inventory",
taskId: "network-inventory",
source: { botId: "111" },
target: { guildId: "g1", channelId: "c1" },
messages: [{ id: "u1", content: "User: admin@example.invalid\nStatus: active" }]
Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ $ npm test -- --test-reporter=dot
# pass 99
# fail 0

$ /root/.local/lib/node_modules/openclaw/node_modules/.bin/tsc -p tsconfig.json --noEmit
$ ./node_modules/.bin/tsc -p tsconfig.json --noEmit
# pass
```

Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/docs/rollout-sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Verification commands after cleanup:

```bash
npm test -- --test-reporter=dot
/root/.local/lib/node_modules/openclaw/node_modules/.bin/tsc -p tsconfig.json --noEmit
./node_modules/.bin/tsc -p tsconfig.json --noEmit
```

Results:
Expand Down
4 changes: 2 additions & 2 deletions packages/gateway/src/core/task-thread-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ function classifyTask(task: TaskThreadTaskInput, taskId: string): TaskThreadClas
} else if (matches(haystack, ["domain-alpha", "fatture", "invoice", "receipt", "refund"])) {
domain = "domain-alpha";
reasons.push("Domain Alpha/backoffice keywords matched");
} else if (matches(haystack, ["nestdev", "odido", "wipro", "jira"])) {
} else if (matches(haystack, ["nestdev", "client-ops", "vendor", "ticketing"])) {
domain = "nestdev";
reasons.push("NestDev/Odido keywords matched");
reasons.push("NestDev/client-ops keywords matched");
} else if (matches(haystack, ["openclaw", "memory", "docs", "documentation", "gateway", "codex", "cas"])) {
domain = "openclaw";
reasons.push("OpenClaw platform keywords matched");
Expand Down
16 changes: 8 additions & 8 deletions packages/runtime-wrapper/test/policy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ test("event task planner normalizes unknown advisor enum to ambiguous confirmati
request: {
source: { botId: "111" },
target: { guildId: "g1", channelId: "c1" },
messages: [{ id: "m1", content: "Boh, forse abbiamo finito." }]
messages: [{ id: "m1", content: "Maybe this is complete." }]
},
advisor: { classification: "maybe_done", confidence: 0.9 }
});
Expand All @@ -677,35 +677,35 @@ test("event task planner supports task-specific item prefixes", () => {
eventController: {
enabled: true,
tasks: [{
id: "tailscale-inventory",
id: "network-inventory",
sourceBotId: "111",
sourceMention: "<@111>",
target: { guildId: "g1", channelId: "c1" },
itemLabel: "node/user",
itemPrefixes: ["Node", "User"],
stopConditions: [{ type: "phrase", value: "Tailscale inventory complete" }]
stopConditions: [{ type: "phrase", value: "Network inventory complete" }]
}]
}
};

const nodePlan = planDiscordEventTaskTurn(cfg, {
request: {
taskId: "tailscale-inventory",
taskId: "network-inventory",
source: { botId: "111" },
target: { guildId: "g1", channelId: "c1" },
messages: [{ id: "n1", content: "Node: cc-lab\nStatus: online\nWarning: none" }]
messages: [{ id: "n1", content: "Node: lab-node\nStatus: online\nWarning: none" }]
},
state: { status: "awaiting_status", itemCount: 0 }
});
assert.equal(nodePlan.reason, "event_task_follow_up_required");
assert.equal(nodePlan.item, "cc-lab");
assert.equal(nodePlan.item, "lab-node");
assert.match(nodePlan.followUpMessage, /prossimo node\/user/);
assert.match(nodePlan.followUpMessage, /Tailscale inventory complete/);
assert.match(nodePlan.followUpMessage, /Network inventory complete/);
assert.doesNotMatch(nodePlan.followUpMessage, /“Inventory complete”/);

const userPlan = planDiscordEventTaskTurn(cfg, {
request: {
taskId: "tailscale-inventory",
taskId: "network-inventory",
source: { botId: "111" },
target: { guildId: "g1", channelId: "c1" },
messages: [{ id: "u1", content: "User: admin@example.invalid\nStatus: active" }]
Expand Down