@agentunion/fastaun 0.5.29 → 0.5.30
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/CHANGELOG.md +22 -0
- package/_packed_docs/CHANGELOG.md +22 -0
- package/_packed_docs/INDEX.md +11 -2
- package/_packed_docs/KITE_DOCS_GUIDE.md +10 -8
- package/_packed_docs/aun/346/265/213/350/257/225/350/277/220/350/241/214/346/214/207/345/215/227.md +18 -1
- package/_packed_docs/sdk/0.5.30-SDK/345/272/224/347/224/250/351/233/206/346/210/220/346/214/207/345/215/227.md +61 -0
- package/_packed_docs/sdk/0.5.30-SDK/345/274/200/345/217/221/344/270/216/347/247/273/346/244/215/346/214/207/345/215/227.md +68 -0
- package/_packed_docs/sdk/AUN_DOCS_GUIDE.md +5 -3
- package/_packed_docs/sdk/INDEX.md +9 -1
- package/_packed_docs//351/231/214/347/224/237/344/272/272/346/213/222/347/273/235/345/215/217/350/256/256TDD/345/210/206/351/230/266/346/256/265/345/256/236/346/226/275/350/256/241/345/210/222.md +138 -0
- package/_packed_docs//351/231/214/347/224/237/344/272/272/346/213/222/347/273/235/345/215/217/350/256/256/350/257/246/347/273/206/350/256/276/350/256/241.md +231 -0
- package/dist/agent-md.js +13 -4
- package/dist/agent-md.js.map +1 -1
- package/dist/aid-store.js +5 -3
- package/dist/aid-store.js.map +1 -1
- package/dist/client/control-messages.d.ts +0 -1
- package/dist/client/control-messages.js +66 -68
- package/dist/client/control-messages.js.map +1 -1
- package/dist/client/rpc-pipeline.js +8 -0
- package/dist/client/rpc-pipeline.js.map +1 -1
- package/dist/client/v2-e2ee.js +7 -7
- package/dist/client/v2-e2ee.js.map +1 -1
- package/dist/client.js +5 -5
- package/dist/client.js.map +1 -1
- package/dist/config.js +23 -18
- package/dist/config.js.map +1 -1
- package/dist/facades.d.ts +20 -0
- package/dist/facades.js +9 -0
- package/dist/facades.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/keystore/aid-db.js +14 -2
- package/dist/keystore/aid-db.js.map +1 -1
- package/dist/keystore/index.d.ts +3 -0
- package/dist/keystore/index.js +61 -1
- package/dist/keystore/index.js.map +1 -1
- package/dist/keystore/local-identity-store.js +112 -76
- package/dist/keystore/local-identity-store.js.map +1 -1
- package/dist/keystore/local-token-store.js +15 -26
- package/dist/keystore/local-token-store.js.map +1 -1
- package/dist/ownership-workflow.js +4 -3
- package/dist/ownership-workflow.js.map +1 -1
- package/dist/register-flow.js +3 -2
- package/dist/register-flow.js.map +1 -1
- package/dist/risk-control.js +2 -2
- package/dist/risk-control.js.map +1 -1
- package/dist/secret-store/file-store.js +68 -56
- package/dist/secret-store/file-store.js.map +1 -1
- package/dist/semantic-protocol.d.ts +2 -12
- package/dist/semantic-protocol.js +31 -48
- package/dist/semantic-protocol.js.map +1 -1
- package/dist/storage/lowlevel.d.ts +4 -0
- package/dist/storage/lowlevel.js +58 -1
- package/dist/storage/lowlevel.js.map +1 -1
- package/dist/storage/vfs.d.ts +4 -0
- package/dist/storage/vfs.js +57 -12
- package/dist/storage/vfs.js.map +1 -1
- package/dist/tools/cross-sdk-agent.d.ts +1 -1
- package/dist/tools/cross-sdk-agent.js +10 -1
- package/dist/tools/cross-sdk-agent.js.map +1 -1
- package/dist/transport.js +1 -1
- package/dist/transport.js.map +1 -1
- package/dist/validators.js +9 -8
- package/dist/validators.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1324,12 +1324,12 @@ export class AUNClient {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
async _localOwnershipOperation(sub, next) {
|
|
1326
1326
|
const sources = [this, sub, ...(next ? [next] : [])];
|
|
1327
|
-
if (sources.some((source) => !(source instanceof AUNClient) || !source._currentAid?.isPrivateKeyValid() || !source._currentAid.isCertValid() || !source._currentAid.privateKeyPem || source._currentAid.aid !== source._aid || source.getType() !== 'agent') || new Set(sources.map((source) => source._aid)).size !== sources.length)
|
|
1328
|
-
throw ownershipFailure('forbidden', 'local ownership requires distinct agent
|
|
1327
|
+
if (sources.some((source, index) => !(source instanceof AUNClient) || !source._currentAid?.isPrivateKeyValid() || !source._currentAid.isCertValid() || !source._currentAid.privateKeyPem || source._currentAid.aid !== source._aid || (index === 1 ? source.getType() !== 'agent' : !['human', 'agent'].includes(source.getType()))) || new Set(sources.map((source) => source._aid)).size !== sources.length)
|
|
1328
|
+
throw ownershipFailure('forbidden', 'local ownership requires a distinct agent subaid and human or agent owners with private identities');
|
|
1329
1329
|
const identities = sources.map((source) => [source._aid, source._currentAid, source._serviceEventIdentityVersion]);
|
|
1330
1330
|
const guard = () => { if (sources.some((source, index) => source._aid !== identities[index][0] || source._currentAid !== identities[index][1] || source._serviceEventIdentityVersion !== identities[index][2]))
|
|
1331
1331
|
throw ownershipFailure('conflict', 'local ownership source identity changed'); };
|
|
1332
|
-
for (const source of sources) {
|
|
1332
|
+
for (const [index, source] of sources.entries()) {
|
|
1333
1333
|
guard();
|
|
1334
1334
|
const document = await source._agentMdManager.readAgentMdFresh(source._aid);
|
|
1335
1335
|
guard();
|
|
@@ -1337,8 +1337,8 @@ export class AUNClient {
|
|
|
1337
1337
|
throw ownershipFailure('forbidden', 'local ownership requires a published agent document');
|
|
1338
1338
|
const verified = await source._getOwnershipFiles().verifyFile(document.content, 'agent', source._aid);
|
|
1339
1339
|
guard();
|
|
1340
|
-
if (verified.frontmatter.type !== 'agent')
|
|
1341
|
-
throw ownershipFailure('forbidden', 'local ownership requires
|
|
1340
|
+
if ((index === 1 ? verified.frontmatter.type !== 'agent' : typeof verified.frontmatter.type !== 'string' || !['human', 'agent'].includes(verified.frontmatter.type)))
|
|
1341
|
+
throw ownershipFailure('forbidden', 'local ownership requires an agent subaid and human or agent owners');
|
|
1342
1342
|
}
|
|
1343
1343
|
const slot = `ownership-${crypto.randomUUID()}`, clients = [];
|
|
1344
1344
|
try {
|