@agentunion/fastaun 0.5.30 → 0.5.32

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.
Files changed (105) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/_packed_docs/CHANGELOG.md +60 -0
  3. package/_packed_docs/sdk/0.5.31-SDK/345/272/224/347/224/250/351/233/206/346/210/220/346/214/207/345/215/227.md +162 -0
  4. package/_packed_docs/sdk/0.5.31-SDK/345/274/200/345/217/221/344/270/216/347/247/273/346/244/215/346/214/207/345/215/227.md +167 -0
  5. package/_packed_docs/sdk/0.5.32-SDK/345/272/224/347/224/250/351/233/206/346/210/220/346/214/207/345/215/227.md +350 -0
  6. package/_packed_docs/sdk/0.5.32-SDK/345/274/200/345/217/221/344/270/216/347/247/273/346/244/215/346/214/207/345/215/227.md +319 -0
  7. package/_packed_docs/sdk/AUN_DOCS_GUIDE.md +12 -5
  8. package/_packed_docs/sdk/AUN/344/272/213/344/273/266/345/217/221/345/270/203/350/256/242/351/230/205/345/272/224/347/224/250/351/233/206/346/210/220/346/214/207/345/215/227.md +459 -0
  9. package/_packed_docs/sdk/AUN/344/272/213/344/273/266/345/217/221/345/270/203/350/256/242/351/230/205/345/274/200/345/217/221/347/247/273/346/244/215/346/214/207/345/215/227.md +554 -0
  10. package/_packed_docs/sdk/INDEX.md +27 -5
  11. package/_packed_docs/sdk//345/255/220AID/344/277/256/346/224/271agent.md/351/200/232/347/237/245Owner/345/234/272/346/231/257/346/214/207/345/215/227.md +234 -0
  12. package/dist/agent-md-schema.js +7 -6
  13. package/dist/agent-md-schema.js.map +1 -1
  14. package/dist/agent-md.d.ts +2 -0
  15. package/dist/agent-md.js +20 -6
  16. package/dist/agent-md.js.map +1 -1
  17. package/dist/aid-store.d.ts +1 -0
  18. package/dist/aid-store.js +1 -0
  19. package/dist/aid-store.js.map +1 -1
  20. package/dist/aid.js +1 -1
  21. package/dist/aid.js.map +1 -1
  22. package/dist/auth.js +1 -1
  23. package/dist/auth.js.map +1 -1
  24. package/dist/client/control-messages.d.ts +22 -7
  25. package/dist/client/control-messages.js +220 -185
  26. package/dist/client/control-messages.js.map +1 -1
  27. package/dist/client/delivery.d.ts +3 -0
  28. package/dist/client/delivery.js +67 -3
  29. package/dist/client/delivery.js.map +1 -1
  30. package/dist/client/group-state.d.ts +3 -0
  31. package/dist/client/group-state.js +48 -14
  32. package/dist/client/group-state.js.map +1 -1
  33. package/dist/client/lifecycle.js +12 -3
  34. package/dist/client/lifecycle.js.map +1 -1
  35. package/dist/client/rpc-pipeline.d.ts +9 -3
  36. package/dist/client/rpc-pipeline.js +61 -26
  37. package/dist/client/rpc-pipeline.js.map +1 -1
  38. package/dist/client/v2-e2ee.d.ts +13 -1
  39. package/dist/client/v2-e2ee.js +32 -19
  40. package/dist/client/v2-e2ee.js.map +1 -1
  41. package/dist/client.d.ts +18 -1
  42. package/dist/client.js +396 -140
  43. package/dist/client.js.map +1 -1
  44. package/dist/discovery.d.ts +1 -0
  45. package/dist/discovery.js +3 -1
  46. package/dist/discovery.js.map +1 -1
  47. package/dist/group-fs.js +1 -1
  48. package/dist/group-fs.js.map +1 -1
  49. package/dist/index.d.ts +2 -0
  50. package/dist/index.js +1 -0
  51. package/dist/index.js.map +1 -1
  52. package/dist/ownership-v21.d.ts +2 -2
  53. package/dist/ownership-v21.js +18 -21
  54. package/dist/ownership-v21.js.map +1 -1
  55. package/dist/ownership-workflow.js +6 -4
  56. package/dist/ownership-workflow.js.map +1 -1
  57. package/dist/pubsub/binding.d.ts +54 -0
  58. package/dist/pubsub/binding.js +343 -0
  59. package/dist/pubsub/binding.js.map +1 -0
  60. package/dist/pubsub/channel.d.ts +45 -0
  61. package/dist/pubsub/channel.js +137 -0
  62. package/dist/pubsub/channel.js.map +1 -0
  63. package/dist/pubsub/client.d.ts +93 -0
  64. package/dist/pubsub/client.js +318 -0
  65. package/dist/pubsub/client.js.map +1 -0
  66. package/dist/pubsub/credentials.d.ts +51 -0
  67. package/dist/pubsub/credentials.js +360 -0
  68. package/dist/pubsub/credentials.js.map +1 -0
  69. package/dist/pubsub/errors.d.ts +5 -0
  70. package/dist/pubsub/errors.js +6 -0
  71. package/dist/pubsub/errors.js.map +1 -0
  72. package/dist/pubsub/index.d.ts +48 -0
  73. package/dist/pubsub/index.js +152 -0
  74. package/dist/pubsub/index.js.map +1 -0
  75. package/dist/pubsub/scheduler.d.ts +58 -0
  76. package/dist/pubsub/scheduler.js +249 -0
  77. package/dist/pubsub/scheduler.js.map +1 -0
  78. package/dist/pubsub/service.d.ts +100 -0
  79. package/dist/pubsub/service.js +650 -0
  80. package/dist/pubsub/service.js.map +1 -0
  81. package/dist/pubsub/types.d.ts +119 -0
  82. package/dist/pubsub/types.js +2 -0
  83. package/dist/pubsub/types.js.map +1 -0
  84. package/dist/register-flow.js +1 -1
  85. package/dist/register-flow.js.map +1 -1
  86. package/dist/storage/lowlevel.js +49 -8
  87. package/dist/storage/lowlevel.js.map +1 -1
  88. package/dist/storage/read-cache.d.ts +7 -3
  89. package/dist/storage/read-cache.js +137 -18
  90. package/dist/storage/read-cache.js.map +1 -1
  91. package/dist/storage/vfs.d.ts +1 -0
  92. package/dist/storage/vfs.js +12 -4
  93. package/dist/storage/vfs.js.map +1 -1
  94. package/dist/tools/cross-sdk-agent.d.ts +1 -1
  95. package/dist/tools/cross-sdk-agent.js +4 -2
  96. package/dist/tools/cross-sdk-agent.js.map +1 -1
  97. package/dist/tools/pubsub-actor.d.ts +27 -0
  98. package/dist/tools/pubsub-actor.js +260 -0
  99. package/dist/tools/pubsub-actor.js.map +1 -0
  100. package/dist/transport.d.ts +26 -2
  101. package/dist/transport.js +182 -17
  102. package/dist/transport.js.map +1 -1
  103. package/dist/version.d.ts +1 -1
  104. package/dist/version.js +1 -1
  105. package/package.json +1 -1
package/dist/client.d.ts CHANGED
@@ -12,9 +12,11 @@
12
12
  */
13
13
  import { AIDStore } from './aid-store.js';
14
14
  import { type Subscription, type EventHandler } from './events.js';
15
+ import { type RpcCallOptions } from './client/rpc-pipeline.js';
15
16
  import { type RiskStateEvent } from './risk-control.js';
16
17
  import { CollabClient } from './collab/client.js';
17
18
  import { DebugFacade, CredentialFacade, OrgFacade, GroupFacade, MailFacade, MessageFacade, StreamFacade } from './facades.js';
19
+ import { EventService } from './pubsub/index.js';
18
20
  import { StorageVFS } from './storage/vfs.js';
19
21
  import { type JsonObject, type JsonValue, type RpcParams, type RpcResult, ConnectionState } from './types.js';
20
22
  import { AID } from './aid.js';
@@ -102,6 +104,7 @@ export declare class AUNClient {
102
104
  private _credentialRenewalTimer;
103
105
  private _credentialRenewalAbort;
104
106
  private _credentialRenewalScan;
107
+ private _credentialRenewalBackground;
105
108
  private _nextCredentialRevocationSyncAt;
106
109
  private _getCredentialRenewal;
107
110
  _assertCredentialNotRevoked(credential: JsonObject, proofChain?: JsonObject[]): () => void;
@@ -161,6 +164,8 @@ export declare class AUNClient {
161
164
  private _agentMdManager;
162
165
  private _aidStore?;
163
166
  private _groupIdentityOperations;
167
+ private _entityOwnershipConnection;
168
+ private _entityOwnershipChecks;
164
169
  private _groupIndexMetaCache;
165
170
  /** 消息序列号跟踪器(群消息 + P2P 空洞检测) */
166
171
  private _p2pPeerPullEnabled;
@@ -235,6 +240,8 @@ export declare class AUNClient {
235
240
  private _reconnectTask;
236
241
  private _reconnectEventDispatchDepth;
237
242
  private _gatewayConnectionId;
243
+ private _gatewayRuntimeIdentity;
244
+ private _gatewayReleaseRevision;
238
245
  private _negotiatedCapabilities;
239
246
  private _riskNegotiated;
240
247
  private _riskRestoredAid;
@@ -262,6 +269,7 @@ export declare class AUNClient {
262
269
  private _storage?;
263
270
  private _collab?;
264
271
  private _message?;
272
+ private _eventServiceFacade?;
265
273
  private _debug?;
266
274
  private _mail?;
267
275
  private _group?;
@@ -280,6 +288,7 @@ export declare class AUNClient {
280
288
  /** AUN Collab 入口 */
281
289
  get collab(): CollabClient;
282
290
  get debug(): DebugFacade;
291
+ get EventService(): EventService;
283
292
  /** Message facade 入口 */
284
293
  get message(): MessageFacade;
285
294
  /** Group facade 入口 */
@@ -396,7 +405,11 @@ export declare class AUNClient {
396
405
  * 发送 JSON-RPC 调用。
397
406
  * 自动处理内部方法限制、E2EE 加解密、客户端签名等。
398
407
  */
399
- call(method: string, params?: RpcParams): Promise<RpcResult>;
408
+ call(method: string, params?: RpcParams, options?: RpcCallOptions): Promise<RpcResult>;
409
+ private _entityOwnershipGuard;
410
+ private _prepareEntityOwnershipLifecycle;
411
+ private _checkEntityOwnershipOnAccess;
412
+ private _completeEntityOwnership;
400
413
  private _maybeHandleHalfOpenRpcFailure;
401
414
  _recoverIdentityAdmission(err: unknown, _method?: string, params?: RpcParams): Promise<boolean>;
402
415
  private _ensureInitialAgentMd;
@@ -404,6 +417,7 @@ export declare class AUNClient {
404
417
  private _runGroupIdentityOperation;
405
418
  private _resumeOrgRequest;
406
419
  createOrg(params?: RpcParams, options?: OrgIdentityOptions): Promise<RpcResult>;
420
+ private _createOrg;
407
421
  private _resumeOrgIdentityAfterConnect;
408
422
  private _verifyOrgTransferMaterials;
409
423
  completeOrgTransfer(params?: RpcParams, options?: OrgIdentityOptions): Promise<RpcResult>;
@@ -418,6 +432,8 @@ export declare class AUNClient {
418
432
  private _freshEntityCertificate;
419
433
  private _freshEntitySigner;
420
434
  private _resolveEntityAgentMdOwner;
435
+ private _entityLifecycle;
436
+ private _entityLifecycleOwner;
421
437
  bindGroupAid(params?: RpcParams, options?: BindGroupAidOptions): Promise<RpcResult>;
422
438
  startGroupTransfer(params?: RpcParams, options?: CompleteGroupTransferOptions): Promise<RpcResult>;
423
439
  renewGroupAid(params?: RpcParams, options?: BindGroupAidOptions): Promise<RpcResult>;
@@ -648,6 +664,7 @@ export declare class AUNClient {
648
664
  private _unrefTimer;
649
665
  /** 不重连 close code 集合:认证失败/权限错误/被踢等,重连无意义 */
650
666
  private static readonly _NO_RECONNECT_CODES;
667
+ private _bindGatewayRuntimeIdentity;
651
668
  private _onGatewayMigrate;
652
669
  private _runGatewayMigration;
653
670
  /** 处理服务端主动断开通知 event/gateway.disconnect。