@awebai/claude-channel 1.3.2 → 1.3.3

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,7 +1,7 @@
1
1
  {
2
2
  "name": "aweb-channel",
3
3
  "description": "aweb agent coordination channel — receive mail, chat, tasks, and control signals from your agent team in real time.",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "author": {
6
6
  "name": "awebai"
7
7
  },
package/dist/index.js CHANGED
@@ -26314,19 +26314,21 @@ function escapeJSON2(s) {
26314
26314
  etc.sha512Sync = (...m) => sha512(etc.concatBytes(...m));
26315
26315
  var ANNOUNCEMENT_MAX_AGE_MS = 7 * 24 * 60 * 60 * 1e3;
26316
26316
  var SenderTrustManager = class {
26317
- constructor(client, registry2, teamID, selfDid) {
26317
+ constructor(client, registry2, teamID, selfDid, selfStableID = "") {
26318
26318
  this.client = client;
26319
26319
  this.registry = registry2;
26320
26320
  this.teamID = teamID;
26321
26321
  this.selfDid = selfDid;
26322
+ this.selfStableID = selfStableID;
26322
26323
  }
26323
26324
  client;
26324
26325
  registry;
26325
26326
  teamID;
26326
26327
  selfDid;
26328
+ selfStableID;
26327
26329
  metaCache = /* @__PURE__ */ new Map();
26328
- async normalizeTrust(store, verificationStatus, rawAddress, fromDID, fromStableID, toDID, rotationAnnouncement, replacementAnnouncement, verificationAddress) {
26329
- let status = this.checkRecipientBinding(verificationStatus, toDID);
26330
+ async normalizeTrust(store, verificationStatus, rawAddress, fromDID, fromStableID, toDID, toStableID, rotationAnnouncement, replacementAnnouncement, verificationAddress) {
26331
+ let status = this.checkRecipientBinding(verificationStatus, toDID, toStableID);
26330
26332
  if (!status || !rawAddress.trim()) {
26331
26333
  return { status, stored: false };
26332
26334
  }
@@ -26352,11 +26354,21 @@ var SenderTrustManager = class {
26352
26354
  registryCheck.confirmedCurrentKey
26353
26355
  );
26354
26356
  }
26355
- checkRecipientBinding(status, toDID) {
26356
- if (status !== "verified" || !toDID || !this.selfDid) {
26357
+ checkRecipientBinding(status, toDID, toStableID) {
26358
+ if (status !== "verified") {
26357
26359
  return status;
26358
26360
  }
26359
- return toDID === this.selfDid ? status : "identity_mismatch";
26361
+ const selfStableID = this.selfStableID.trim();
26362
+ const recipientStableID = (toStableID || "").trim();
26363
+ if (selfStableID && recipientStableID) {
26364
+ return recipientStableID.toLowerCase() === selfStableID.toLowerCase() ? status : "identity_mismatch";
26365
+ }
26366
+ const selfDID = this.selfDid.trim();
26367
+ const recipientDID = (toDID || "").trim();
26368
+ if (!recipientDID || !selfDID) {
26369
+ return status;
26370
+ }
26371
+ return recipientDID === selfDID ? status : "identity_mismatch";
26360
26372
  }
26361
26373
  async checkStableIdentityRegistry(status, trustAddress, fromDID, fromStableID) {
26362
26374
  if (status !== "verified" || !fromDID || !fromStableID?.startsWith("did:aw:")) {
@@ -26689,7 +26701,8 @@ async function main() {
26689
26701
  client,
26690
26702
  registry2,
26691
26703
  config2.teamID,
26692
- config2.did
26704
+ config2.did,
26705
+ config2.stableID
26693
26706
  );
26694
26707
  const mcp = new Server(
26695
26708
  { name: "aweb", version: "0.1.0" },
@@ -26762,6 +26775,7 @@ async function dispatchEvent(mcp, client, pinStore, trust, self, dispatched, eve
26762
26775
  msg.from_did,
26763
26776
  msg.from_stable_id,
26764
26777
  msg.to_did,
26778
+ msg.to_stable_id,
26765
26779
  msg.rotation_announcement,
26766
26780
  msg.replacement_announcement,
26767
26781
  msg.from_address || msg.from_alias || ""
@@ -26804,6 +26818,7 @@ async function dispatchEvent(mcp, client, pinStore, trust, self, dispatched, eve
26804
26818
  msg.from_did,
26805
26819
  msg.from_stable_id,
26806
26820
  msg.to_did,
26821
+ msg.to_stable_id,
26807
26822
  msg.rotation_announcement,
26808
26823
  msg.replacement_announcement,
26809
26824
  msg.from_address || msg.from_agent || ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awebai/claude-channel",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": "./dist/index.js",