@hashgraphonline/standards-agent-kit 0.2.121 → 0.2.122

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.
@@ -7,15 +7,12 @@ import { CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';
7
7
  */
8
8
  declare const CreateDynamicRegistrySchema: z.ZodObject<{
9
9
  ttl: z.ZodDefault<z.ZodNumber>;
10
- adminKey: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
11
10
  submitKey: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
12
11
  }, "strip", z.ZodTypeAny, {
13
12
  ttl: number;
14
- adminKey?: string | boolean | undefined;
15
13
  submitKey?: string | boolean | undefined;
16
14
  }, {
17
15
  ttl?: number | undefined;
18
- adminKey?: string | boolean | undefined;
19
16
  submitKey?: string | boolean | undefined;
20
17
  }>;
21
18
  export type CreateDynamicRegistryInput = z.infer<typeof CreateDynamicRegistrySchema>;
@@ -27,15 +24,12 @@ export declare class CreateDynamicRegistryTool extends BaseHCS6QueryTool<typeof
27
24
  description: string;
28
25
  get specificInputSchema(): z.ZodObject<{
29
26
  ttl: z.ZodDefault<z.ZodNumber>;
30
- adminKey: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
31
27
  submitKey: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
32
28
  }, "strip", z.ZodTypeAny, {
33
29
  ttl: number;
34
- adminKey?: string | boolean | undefined;
35
30
  submitKey?: string | boolean | undefined;
36
31
  }, {
37
32
  ttl?: number | undefined;
38
- adminKey?: string | boolean | undefined;
39
33
  submitKey?: string | boolean | undefined;
40
34
  }>;
41
35
  constructor(params: HCS6QueryToolParams);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraphonline/standards-agent-kit",
3
- "version": "0.2.121",
3
+ "version": "0.2.122",
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/cjs/standards-agent-kit.cjs",
@@ -21,6 +21,32 @@
21
21
  "LICENSE",
22
22
  "README.md"
23
23
  ],
24
+ "scripts": {
25
+ "clean": "rimraf dist",
26
+ "build:es": "BUILD_FORMAT=es vite build",
27
+ "build:cjs": "BUILD_FORMAT=cjs vite build",
28
+ "build:umd": "BUILD_FORMAT=umd vite build",
29
+ "build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs && pnpm run build:umd",
30
+ "test": "jest",
31
+ "lint": "eslint . --ext .ts",
32
+ "lint:fix": "eslint . --ext .ts --fix",
33
+ "prepare": "pnpm run build",
34
+ "prepublishOnly": "pnpm run build",
35
+ "release": "pnpm publish --access public",
36
+ "release:canary": "pnpm run prepublishOnly && pnpm publish --tag canary --access public",
37
+ "version:canary": "pnpm version prerelease --preid canary --no-git-tag-version",
38
+ "publish:canary": "pnpm run version:canary && pnpm run release:canary",
39
+ "demo:cli": "tsx examples/cli-demo.ts",
40
+ "demo:interactive": "tsx examples/interactive-demo.ts",
41
+ "demo:langchain": "tsx examples/langchain-demo.ts",
42
+ "demo:plugin": "tsx examples/plugin-system-example.ts",
43
+ "demo:plugin:weather": "tsx examples/plugins/weather/index.ts",
44
+ "demo:plugin:defi": "tsx examples/plugins/defi/index.ts",
45
+ "demo:plugin:openconvai": "tsx examples/openconvai-plugin-example.ts",
46
+ "standards-agent:start": "tsx examples/standards-expert/cli.ts -- start",
47
+ "standards-agent:process-docs": "tsx examples/standards-expert/cli.ts -- process-docs --all-repos",
48
+ "typecheck": "tsc --noEmit"
49
+ },
24
50
  "keywords": [
25
51
  "hedera",
26
52
  "hcs10",
@@ -63,7 +89,7 @@
63
89
  },
64
90
  "dependencies": {
65
91
  "@hashgraph/sdk": "^2.69.0",
66
- "@hashgraphonline/standards-sdk": "file:.yalc/@hashgraphonline/standards-sdk",
92
+ "@hashgraphonline/standards-sdk": "0.0.170",
67
93
  "@langchain/community": "^0.3.49",
68
94
  "@langchain/core": "^0.3.66",
69
95
  "@langchain/openai": "^0.6.3",
@@ -101,28 +127,5 @@
101
127
  "vite-plugin-node-polyfills": "^0.23.0",
102
128
  "vite-plugin-string-replace": "^1.1.3"
103
129
  },
104
- "scripts": {
105
- "clean": "rimraf dist",
106
- "build:es": "BUILD_FORMAT=es vite build",
107
- "build:cjs": "BUILD_FORMAT=cjs vite build",
108
- "build:umd": "BUILD_FORMAT=umd vite build",
109
- "build": "pnpm run clean && pnpm run build:es && pnpm run build:cjs && pnpm run build:umd",
110
- "test": "jest",
111
- "lint": "eslint . --ext .ts",
112
- "lint:fix": "eslint . --ext .ts --fix",
113
- "release": "pnpm publish --access public",
114
- "release:canary": "pnpm run prepublishOnly && pnpm publish --tag canary --access public",
115
- "version:canary": "pnpm version prerelease --preid canary --no-git-tag-version",
116
- "publish:canary": "pnpm run version:canary && pnpm run release:canary",
117
- "demo:cli": "tsx examples/cli-demo.ts",
118
- "demo:interactive": "tsx examples/interactive-demo.ts",
119
- "demo:langchain": "tsx examples/langchain-demo.ts",
120
- "demo:plugin": "tsx examples/plugin-system-example.ts",
121
- "demo:plugin:weather": "tsx examples/plugins/weather/index.ts",
122
- "demo:plugin:defi": "tsx examples/plugins/defi/index.ts",
123
- "demo:plugin:openconvai": "tsx examples/openconvai-plugin-example.ts",
124
- "standards-agent:start": "tsx examples/standards-expert/cli.ts -- start",
125
- "standards-agent:process-docs": "tsx examples/standards-expert/cli.ts -- process-docs --all-repos",
126
- "typecheck": "tsc --noEmit"
127
- }
128
- }
130
+ "packageManager": "pnpm@10.11.1+sha512.e519b9f7639869dc8d5c3c5dfef73b3f091094b0a006d7317353c72b124e80e1afd429732e28705ad6bfa1ee879c1fce46c128ccebd3192101f43dd67c667912"
131
+ }
@@ -32,7 +32,7 @@ export class HCS6Builder extends BaseServiceBuilder {
32
32
  if (!this.hcs6Client) {
33
33
  const operatorId = this.hederaKit.signer.getAccountId().toString();
34
34
  const operatorPrivateKey = this.hederaKit.signer?.getOperatorPrivateKey()
35
- ? this.hederaKit.signer.getOperatorPrivateKey().toStringRaw()
35
+ ? this.hederaKit.signer.getOperatorPrivateKey().toString()
36
36
  : '';
37
37
 
38
38
  const network = this.hederaKit.client.network;
@@ -59,7 +59,11 @@ export class HCS6Builder extends BaseServiceBuilder {
59
59
  options: HCS6CreateRegistryOptions = {}
60
60
  ): Promise<HCS6TopicRegistrationResponse> {
61
61
  const client = await this.getHCS6Client();
62
- return await client.createRegistry(options);
62
+ const sanitized = { ...options };
63
+ if ('adminKey' in sanitized) {
64
+ delete (sanitized as any).adminKey;
65
+ }
66
+ return await client.createRegistry(sanitized);
63
67
  }
64
68
 
65
69
  /**
@@ -91,7 +95,19 @@ export class HCS6Builder extends BaseServiceBuilder {
91
95
  options: HCS6CreateHashinalOptions
92
96
  ): Promise<HCS6CreateHashinalResponse> {
93
97
  const client = await this.getHCS6Client();
94
- return await client.createHashinal(options);
98
+ const metadata = {
99
+ name: options.metadata?.name || 'Dynamic Hashinal',
100
+ creator:
101
+ options.metadata?.creator || this.hederaKit.signer.getAccountId().toString(),
102
+ description: options.metadata?.description || 'Dynamic hashinal metadata',
103
+ type: options.metadata?.type || 'json',
104
+ ...options.metadata,
105
+ } as Record<string, unknown>;
106
+
107
+ return await client.createHashinal({
108
+ ...options,
109
+ metadata,
110
+ });
95
111
  }
96
112
 
97
113
  /**
@@ -102,7 +118,20 @@ export class HCS6Builder extends BaseServiceBuilder {
102
118
  options: HCS6RegisterOptions
103
119
  ): Promise<HCS6CreateHashinalResponse> {
104
120
  const client = await this.getHCS6Client();
105
- return await client.register(options);
121
+ const metadata = {
122
+ name: options.metadata?.name || 'Dynamic Hashinal',
123
+ creator:
124
+ options.metadata?.creator || this.hederaKit.signer.getAccountId().toString(),
125
+ description:
126
+ options.metadata?.description || 'Dynamic hashinal registration',
127
+ type: options.metadata?.type || 'json',
128
+ ...options.metadata,
129
+ } as Record<string, unknown>;
130
+
131
+ return await client.register({
132
+ ...options,
133
+ metadata,
134
+ });
106
135
  }
107
136
 
108
137
  /**
@@ -7,14 +7,13 @@ import { CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';
7
7
  * Schema for creating a dynamic hashinal registry
8
8
  */
9
9
  const CreateDynamicRegistrySchema = z.object({
10
- ttl: z.number()
10
+ ttl: z
11
+ .number()
11
12
  .min(3600)
12
13
  .default(86400)
13
14
  .describe('Time-to-live in seconds (minimum 3600 seconds/1 hour)'),
14
- adminKey: z.union([z.boolean(), z.string()])
15
- .optional()
16
- .describe('Admin key for the registry topic. Can be boolean (use operator key) or a public key string'),
17
- submitKey: z.union([z.boolean(), z.string()])
15
+ submitKey: z
16
+ .union([z.boolean(), z.string()])
18
17
  .optional()
19
18
  .describe('Submit key for the registry topic. Can be boolean (use operator key) or a public key string'),
20
19
  });
@@ -42,7 +41,6 @@ export class CreateDynamicRegistryTool extends BaseHCS6QueryTool<typeof CreateDy
42
41
  ): Promise<unknown> {
43
42
  const result = await this.hcs6Builder.createRegistry({
44
43
  ttl: params.ttl,
45
- adminKey: params.adminKey,
46
44
  submitKey: params.submitKey,
47
45
  });
48
46