@hashgraphonline/standards-agent-kit 0.0.11 → 0.0.13

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.
@@ -16,21 +16,90 @@ export declare class RegisterAgentTool extends StructuredTool {
16
16
  type: z.ZodOptional<z.ZodEnum<["autonomous", "manual"]>>;
17
17
  model: z.ZodOptional<z.ZodString>;
18
18
  capabilities: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
19
+ feeCollectorAccountId: z.ZodOptional<z.ZodString>;
20
+ hbarFee: z.ZodOptional<z.ZodNumber>;
21
+ tokenFee: z.ZodOptional<z.ZodObject<{
22
+ amount: z.ZodNumber;
23
+ tokenId: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ amount: number;
26
+ tokenId: string;
27
+ }, {
28
+ amount: number;
29
+ tokenId: string;
30
+ }>>;
31
+ hbarFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
32
+ amount: z.ZodNumber;
33
+ collectorAccount: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ amount: number;
36
+ collectorAccount?: string | undefined;
37
+ }, {
38
+ amount: number;
39
+ collectorAccount?: string | undefined;
40
+ }>, "many">>;
41
+ tokenFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
+ amount: z.ZodNumber;
43
+ tokenId: z.ZodString;
44
+ collectorAccount: z.ZodOptional<z.ZodString>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ amount: number;
47
+ tokenId: string;
48
+ collectorAccount?: string | undefined;
49
+ }, {
50
+ amount: number;
51
+ tokenId: string;
52
+ collectorAccount?: string | undefined;
53
+ }>, "many">>;
54
+ exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
55
  }, "strip", z.ZodTypeAny, {
20
56
  name: string;
57
+ capabilities?: number[] | undefined;
21
58
  description?: string | undefined;
22
59
  type?: "autonomous" | "manual" | undefined;
23
60
  model?: string | undefined;
24
- capabilities?: number[] | undefined;
61
+ feeCollectorAccountId?: string | undefined;
62
+ hbarFee?: number | undefined;
63
+ tokenFee?: {
64
+ amount: number;
65
+ tokenId: string;
66
+ } | undefined;
67
+ hbarFees?: {
68
+ amount: number;
69
+ collectorAccount?: string | undefined;
70
+ }[] | undefined;
71
+ tokenFees?: {
72
+ amount: number;
73
+ tokenId: string;
74
+ collectorAccount?: string | undefined;
75
+ }[] | undefined;
76
+ exemptAccountIds?: string[] | undefined;
25
77
  }, {
26
78
  name: string;
79
+ capabilities?: number[] | undefined;
27
80
  description?: string | undefined;
28
81
  type?: "autonomous" | "manual" | undefined;
29
82
  model?: string | undefined;
30
- capabilities?: number[] | undefined;
83
+ feeCollectorAccountId?: string | undefined;
84
+ hbarFee?: number | undefined;
85
+ tokenFee?: {
86
+ amount: number;
87
+ tokenId: string;
88
+ } | undefined;
89
+ hbarFees?: {
90
+ amount: number;
91
+ collectorAccount?: string | undefined;
92
+ }[] | undefined;
93
+ tokenFees?: {
94
+ amount: number;
95
+ tokenId: string;
96
+ collectorAccount?: string | undefined;
97
+ }[] | undefined;
98
+ exemptAccountIds?: string[] | undefined;
31
99
  }>;
32
100
  /**
33
- * @param client - Instance of HCS10Client (already configured with operator/network).
101
+ * Creates a new RegisterAgentTool instance
102
+ * @param client - Instance of HCS10Client (already configured with operator/network)
34
103
  */
35
104
  constructor(client: HCS10Client);
36
105
  /**
@@ -38,4 +107,28 @@ export declare class RegisterAgentTool extends StructuredTool {
38
107
  * Returns a JSON string with agent details on success, or an error string.
39
108
  */
40
109
  _call(input: z.infer<typeof this.schema>): Promise<string>;
110
+ /**
111
+ * Checks if the token fee configuration is valid
112
+ */
113
+ private hasValidTokenFee;
114
+ /**
115
+ * Processes the registration result and returns formatted output
116
+ */
117
+ private processRegistrationResult;
118
+ /**
119
+ * Updates the environment file with the new agent details
120
+ */
121
+ private updateEnvironmentFile;
122
+ /**
123
+ * Ensures the agent has enough HBAR for operations
124
+ */
125
+ private ensureAgentHasFunds;
126
+ /**
127
+ * Validates that all required fields are present in the registration result
128
+ */
129
+ private validateRegistrationResult;
130
+ /**
131
+ * Creates a description of the fees configured for the agent
132
+ */
133
+ private createFeeDescription;
41
134
  }
@@ -6,3 +6,6 @@ export * from './InitiateConnectionTool';
6
6
  export * from './ListConnectionsTool';
7
7
  export * from './CheckMessagesTool';
8
8
  export * from './FindRegistrationsTool';
9
+ export * from './ConnectionMonitorTool';
10
+ export * from './ManageConnectionRequestsTool';
11
+ export * from './AcceptConnectionRequestTool';
@@ -0,0 +1,15 @@
1
+ import { HCS10Client } from '../hcs10/HCS10Client';
2
+ import { HCSMessage, HCS11Profile } from '@hashgraphonline/standards-sdk';
3
+ export interface ConnectionMap {
4
+ inboundRequests: Map<number, HCSMessage>;
5
+ outboundConfirmations: Map<number, HCSMessage>;
6
+ outboundRequests: Map<number, HCSMessage>;
7
+ inboundConfirmations: Map<number, HCSMessage>;
8
+ profileMap: Map<string, HCS11Profile>;
9
+ confirmedRequestIds: Set<number>;
10
+ }
11
+ /**
12
+ * Fetches and processes inbound/outbound messages and profiles
13
+ * to provide a map of connection states.
14
+ */
15
+ export declare function fetchConnectionMap(hcsClient: HCS10Client): Promise<ConnectionMap>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraphonline/standards-agent-kit",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.es.js",
@@ -44,13 +44,7 @@
44
44
  "hapi",
45
45
  "onchain"
46
46
  ],
47
- "author": "Hashgraph Online",
48
- "contributors": [
49
- {
50
- "name": "Michael Kantor",
51
- "email": "michael@hashgraphonline.com"
52
- }
53
- ],
47
+ "author": "Hashgraph Online <hello@hashgraphonline.com>",
54
48
  "license": "Apache-2.0",
55
49
  "repository": {
56
50
  "type": "git",
@@ -74,7 +68,7 @@
74
68
  },
75
69
  "dependencies": {
76
70
  "@hashgraph/sdk": "^2.62.0",
77
- "@hashgraphonline/standards-sdk": "0.0.67",
71
+ "@hashgraphonline/standards-sdk": "0.0.72",
78
72
  "@langchain/community": "^0.3.37",
79
73
  "@langchain/openai": "^0.5.1",
80
74
  "dotenv": "^16.4.1",