@awebai/claude-channel 1.4.11 → 1.5.0
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +5 -0
- package/dist/index.js +39 -0
- package/package.json +2 -1
- package/skills/configure/SKILL.md +10 -4
package/CHANGELOG.md
ADDED
package/dist/index.js
CHANGED
|
@@ -22501,6 +22501,7 @@ var KNOWN_TYPES = /* @__PURE__ */ new Set([
|
|
|
22501
22501
|
"work_available",
|
|
22502
22502
|
"claim_update",
|
|
22503
22503
|
"claim_removed",
|
|
22504
|
+
"app_event",
|
|
22504
22505
|
"error",
|
|
22505
22506
|
"actionable_mail",
|
|
22506
22507
|
"actionable_chat"
|
|
@@ -26895,10 +26896,42 @@ async function dispatchAgentEvent(options, dispatched, event) {
|
|
|
26895
26896
|
}
|
|
26896
26897
|
});
|
|
26897
26898
|
break;
|
|
26899
|
+
case "app_event":
|
|
26900
|
+
await dispatchAppEvent(options, dispatched, event);
|
|
26901
|
+
break;
|
|
26898
26902
|
default:
|
|
26899
26903
|
break;
|
|
26900
26904
|
}
|
|
26901
26905
|
}
|
|
26906
|
+
async function dispatchAppEvent(options, dispatched, event) {
|
|
26907
|
+
if (!event.event_id)
|
|
26908
|
+
return;
|
|
26909
|
+
const key = dispatchKey("app", event.app_event_type || "app_event", event.event_id);
|
|
26910
|
+
if (dispatched.has(key) || options.deliveryStore?.has(key))
|
|
26911
|
+
return;
|
|
26912
|
+
const meta3 = {
|
|
26913
|
+
type: event.app_event_type || "app_event",
|
|
26914
|
+
event_id: event.event_id,
|
|
26915
|
+
app_id: event.app_id || "",
|
|
26916
|
+
app_event_type: event.app_event_type || "",
|
|
26917
|
+
resource_ref: event.resource_ref || "",
|
|
26918
|
+
producer_delivery_intent: event.producer_delivery_intent || ""
|
|
26919
|
+
};
|
|
26920
|
+
const payload = event.payload && typeof event.payload === "object" ? event.payload : void 0;
|
|
26921
|
+
if (payload)
|
|
26922
|
+
meta3.payload = summarizePayload(payload);
|
|
26923
|
+
await options.onAwakening({
|
|
26924
|
+
kind: "app",
|
|
26925
|
+
content: "",
|
|
26926
|
+
deliveryIntent: event.delivery_intent || "ambient",
|
|
26927
|
+
meta: meta3
|
|
26928
|
+
});
|
|
26929
|
+
dispatched.add(key);
|
|
26930
|
+
if (options.deliveryStore) {
|
|
26931
|
+
options.deliveryStore.mark(key);
|
|
26932
|
+
await options.deliveryStore.save();
|
|
26933
|
+
}
|
|
26934
|
+
}
|
|
26902
26935
|
async function dispatchMailEvent(options, dispatched, event) {
|
|
26903
26936
|
const messages = await fetchInbox(options.client, true, MAIL_FETCH_LIMIT, event.message_id);
|
|
26904
26937
|
let pinsDirty = false;
|
|
@@ -27092,6 +27125,12 @@ function dispatchKey(channel, conversationID, messageID) {
|
|
|
27092
27125
|
const conversation = (conversationID || "").trim();
|
|
27093
27126
|
return `${channel}:${conversation}:${messageID}`;
|
|
27094
27127
|
}
|
|
27128
|
+
function summarizePayload(payload) {
|
|
27129
|
+
const json3 = JSON.stringify(payload);
|
|
27130
|
+
if (!json3)
|
|
27131
|
+
return "";
|
|
27132
|
+
return json3.length > 500 ? `${json3.slice(0, 497)}...` : json3;
|
|
27133
|
+
}
|
|
27095
27134
|
function senderDisplayAddress(alias, address) {
|
|
27096
27135
|
const qualified = (address || "").trim();
|
|
27097
27136
|
if (qualified)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awebai/claude-channel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"mcpName": "io.github.awebai/channel",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
".mcp.json",
|
|
13
13
|
"skills",
|
|
14
14
|
"README.md",
|
|
15
|
+
"CHANGELOG.md",
|
|
15
16
|
"package.json"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
@@ -17,20 +17,26 @@ Diagnose and fix the aweb channel setup for this project.
|
|
|
17
17
|
test -f .aw/team-cert.pem && echo "CERT OK" || echo "CERT MISSING"
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
If `.aw/workspace.yaml` is missing, the
|
|
21
|
-
Tell the user
|
|
20
|
+
If `.aw/workspace.yaml` is missing, the channel does not yet know which
|
|
21
|
+
aweb team or service this directory should use. Do not guess. Tell the user
|
|
22
|
+
to initialize or join the workspace through the correct source first, for
|
|
23
|
+
example:
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
|
-
aw
|
|
26
|
+
aw init
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
Or
|
|
29
|
+
Or, when they have an explicit invite/service/BYOT source:
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
32
|
aw id team accept-invite <token>
|
|
31
33
|
AWEB_URL=<server-url> aw init
|
|
34
|
+
aw service init --service <service-url> --team <team:namespace>
|
|
32
35
|
```
|
|
33
36
|
|
|
37
|
+
After `.aw/workspace.yaml` exists, continue with the channel MCP
|
|
38
|
+
configuration checks below.
|
|
39
|
+
|
|
34
40
|
Do not instruct the user to use legacy project bootstrap commands.
|
|
35
41
|
|
|
36
42
|
2. **Verify the workspace is valid.**
|