@awebai/claude-channel 1.1.0 → 1.2.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/README.md +1 -1
- package/dist/index.js +27 -7
- package/package.json +1 -1
- package/skills/configure/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -49,5 +49,5 @@ The directory must already be connected to an aweb team workspace
|
|
|
49
49
|
## More info
|
|
50
50
|
|
|
51
51
|
- [Channel documentation](https://github.com/awebai/aweb/blob/main/docs/channel.md)
|
|
52
|
-
- [Agent guide](https://github.com/awebai/aweb/blob/main/docs/agent-guide.
|
|
52
|
+
- [Agent guide](https://github.com/awebai/aweb/blob/main/docs/agent-guide.md)
|
|
53
53
|
- [aweb.ai](https://aweb.ai)
|
package/dist/index.js
CHANGED
|
@@ -26313,12 +26313,13 @@ var SenderTrustManager = class {
|
|
|
26313
26313
|
}
|
|
26314
26314
|
const trustAddress = this.canonicalTrustAddress(rawAddress);
|
|
26315
26315
|
const meta3 = await this.resolveAgentMeta(rawAddress);
|
|
26316
|
-
|
|
26316
|
+
const registryCheck = await this.checkStableIdentityRegistry(
|
|
26317
26317
|
status,
|
|
26318
26318
|
(verificationAddress || rawAddress).trim(),
|
|
26319
26319
|
fromDID,
|
|
26320
26320
|
fromStableID
|
|
26321
26321
|
);
|
|
26322
|
+
status = registryCheck.status;
|
|
26322
26323
|
return this.checkTOFUPinWithMeta(
|
|
26323
26324
|
store,
|
|
26324
26325
|
status,
|
|
@@ -26328,7 +26329,8 @@ var SenderTrustManager = class {
|
|
|
26328
26329
|
fromStableID,
|
|
26329
26330
|
rotationAnnouncement,
|
|
26330
26331
|
replacementAnnouncement,
|
|
26331
|
-
meta3
|
|
26332
|
+
meta3,
|
|
26333
|
+
registryCheck.confirmedCurrentKey
|
|
26332
26334
|
);
|
|
26333
26335
|
}
|
|
26334
26336
|
checkRecipientBinding(status, toDID) {
|
|
@@ -26339,18 +26341,21 @@ var SenderTrustManager = class {
|
|
|
26339
26341
|
}
|
|
26340
26342
|
async checkStableIdentityRegistry(status, trustAddress, fromDID, fromStableID) {
|
|
26341
26343
|
if (status !== "verified" || !fromDID || !fromStableID?.startsWith("did:aw:")) {
|
|
26342
|
-
return status;
|
|
26344
|
+
return { status, confirmedCurrentKey: false };
|
|
26343
26345
|
}
|
|
26344
26346
|
const registryResult = await this.registry.verifyStableIdentity(trustAddress, fromStableID);
|
|
26345
26347
|
if (registryResult.outcome === "HARD_ERROR") {
|
|
26346
|
-
return "identity_mismatch";
|
|
26348
|
+
return { status: "identity_mismatch", confirmedCurrentKey: false };
|
|
26347
26349
|
}
|
|
26348
26350
|
if (registryResult.outcome === "OK_VERIFIED" && registryResult.currentDidKey && registryResult.currentDidKey !== fromDID) {
|
|
26349
|
-
return "identity_mismatch";
|
|
26351
|
+
return { status: "identity_mismatch", confirmedCurrentKey: false };
|
|
26350
26352
|
}
|
|
26351
|
-
return
|
|
26353
|
+
return {
|
|
26354
|
+
status,
|
|
26355
|
+
confirmedCurrentKey: registryResult.outcome === "OK_VERIFIED" && registryResult.currentDidKey === fromDID
|
|
26356
|
+
};
|
|
26352
26357
|
}
|
|
26353
|
-
checkTOFUPinWithMeta(store, status, rawAddress, trustAddress, fromDID, fromStableID, rotationAnnouncement, replacementAnnouncement, meta3) {
|
|
26358
|
+
checkTOFUPinWithMeta(store, status, rawAddress, trustAddress, fromDID, fromStableID, rotationAnnouncement, replacementAnnouncement, meta3, registryConfirmedCurrentKey) {
|
|
26354
26359
|
if (!status || status !== "verified" && status !== "verified_custodial" || !fromDID || !trustAddress || !meta3.resolved) {
|
|
26355
26360
|
return { status, stored: false };
|
|
26356
26361
|
}
|
|
@@ -26395,6 +26400,13 @@ var SenderTrustManager = class {
|
|
|
26395
26400
|
if (fromStableID) {
|
|
26396
26401
|
const pin = store.pins.get(pinKey);
|
|
26397
26402
|
if (pin?.did_key && pin.did_key !== fromDID) {
|
|
26403
|
+
if (registryConfirmedCurrentKey) {
|
|
26404
|
+
store.storePin(pinKey, trustAddress, "", "");
|
|
26405
|
+
const updated = store.pins.get(pinKey);
|
|
26406
|
+
updated.stable_id = fromStableID;
|
|
26407
|
+
updated.did_key = fromDID;
|
|
26408
|
+
return { status, stored: true };
|
|
26409
|
+
}
|
|
26398
26410
|
if (!this.verifyRotationAnnouncement(rotationAnnouncement, fromDID, pin.did_key) && !this.verifyReplacementAnnouncement(trustAddress, replacementAnnouncement, fromDID, pin.did_key, meta3)) {
|
|
26399
26411
|
return { status: "identity_mismatch", stored: false };
|
|
26400
26412
|
}
|
|
@@ -26410,6 +26422,14 @@ var SenderTrustManager = class {
|
|
|
26410
26422
|
}
|
|
26411
26423
|
case "mismatch": {
|
|
26412
26424
|
const pinnedKey = store.addresses.get(trustAddress) || "";
|
|
26425
|
+
if (registryConfirmedCurrentKey && fromStableID) {
|
|
26426
|
+
store.removeAddress(trustAddress);
|
|
26427
|
+
store.storePin(pinKey, trustAddress, "", "");
|
|
26428
|
+
const pin = store.pins.get(pinKey);
|
|
26429
|
+
pin.stable_id = fromStableID;
|
|
26430
|
+
pin.did_key = fromDID;
|
|
26431
|
+
return { status, stored: true };
|
|
26432
|
+
}
|
|
26413
26433
|
if (fromStableID && pinnedKey === fromStableID) {
|
|
26414
26434
|
const pin = store.pins.get(pinnedKey);
|
|
26415
26435
|
if (pin?.did_key === fromDID) {
|
package/package.json
CHANGED