@hashgraphonline/standards-agent-kit 0.2.135 → 0.2.136

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.
@@ -51,14 +51,6 @@ export declare class InscribeHashinalTool extends BaseInscriberQueryTool impleme
51
51
  * Returns the focused schema for form generation
52
52
  */
53
53
  getFormSchema(): z.ZodObject<z.ZodRawShape>;
54
- /**
55
- * Implementation of FormValidatable interface
56
- * Validates metadata quality and provides detailed feedback
57
- */
58
- validateMetadataQuality(input: unknown): {
59
- needsForm: boolean;
60
- reason: string;
61
- };
62
54
  protected executeQuery(params: z.infer<typeof inscribeHashinalSchema>, _runManager?: CallbackManagerForToolRun): Promise<InscriptionResponse>;
63
55
  /**
64
56
  * Creates HashLink block configuration for Hashinal inscriptions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashgraphonline/standards-agent-kit",
3
- "version": "0.2.135",
3
+ "version": "0.2.136",
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",
@@ -19,27 +19,20 @@ export interface FormValidatable {
19
19
  getFormSchema(): z.ZodSchema;
20
20
 
21
21
  /**
22
- * Optional method to validate metadata quality and provide detailed feedback
23
- * @param input The input data to analyze
24
- * @returns Object indicating if form is needed and the reason
25
- */
26
- validateMetadataQuality?(input: unknown): { needsForm: boolean; reason: string };
27
-
28
- /**
29
- * Optional method to define which fields are essential for this tool
22
+ * Defines which fields are essential for this tool
30
23
  * Essential fields are always shown in forms even if marked as optional
31
24
  * @returns Array of field names that are essential for user experience
32
25
  */
33
- getEssentialFields?(): string[];
26
+ getEssentialFields(): string[];
34
27
 
35
28
  /**
36
- * Optional method to determine if a field value should be considered empty
29
+ * Determines if a field value should be considered empty
37
30
  * Allows tools to define custom empty logic for their specific data types
38
31
  * @param fieldName The name of the field
39
32
  * @param value The value to check
40
33
  * @returns true if the field should be considered empty
41
34
  */
42
- isFieldEmpty?(fieldName: string, value: unknown): boolean;
35
+ isFieldEmpty(fieldName: string, value: unknown): boolean;
43
36
  }
44
37
 
45
38
  /**
@@ -51,7 +44,11 @@ export function isFormValidatable(tool: unknown): tool is FormValidatable {
51
44
  typeof tool === 'object' &&
52
45
  'shouldGenerateForm' in tool &&
53
46
  'getFormSchema' in tool &&
47
+ 'getEssentialFields' in tool &&
48
+ 'isFieldEmpty' in tool &&
54
49
  typeof (tool as FormValidatable).shouldGenerateForm === 'function' &&
55
- typeof (tool as FormValidatable).getFormSchema === 'function'
50
+ typeof (tool as FormValidatable).getFormSchema === 'function' &&
51
+ typeof (tool as FormValidatable).getEssentialFields === 'function' &&
52
+ typeof (tool as FormValidatable).isFieldEmpty === 'function'
56
53
  );
57
54
  }
@@ -379,35 +379,6 @@ export class InscribeHashinalTool
379
379
  return focusedSchema as unknown as z.ZodObject<z.ZodRawShape>;
380
380
  }
381
381
 
382
- /**
383
- * Implementation of FormValidatable interface
384
- * Validates metadata quality and provides detailed feedback
385
- */
386
- validateMetadataQuality(input: unknown): {
387
- needsForm: boolean;
388
- reason: string;
389
- } {
390
- const inputObj = input as Record<string, unknown>;
391
- const hasRequiredMetadata = !!(
392
- inputObj.name &&
393
- inputObj.description &&
394
- inputObj.creator
395
- );
396
-
397
- if (!hasRequiredMetadata) {
398
- return {
399
- needsForm: true,
400
- reason:
401
- 'Missing essential metadata (name, description, creator) for NFT creation',
402
- };
403
- }
404
-
405
- return {
406
- needsForm: false,
407
- reason: 'All required metadata fields present',
408
- };
409
- }
410
-
411
382
  protected async executeQuery(
412
383
  params: z.infer<typeof inscribeHashinalSchema>,
413
384
  _runManager?: CallbackManagerForToolRun
@@ -606,7 +577,7 @@ export class InscribeHashinalTool
606
577
  this.onEntityCreated?.({
607
578
  entityId: jsonTopicId || imageTopicId || 'unknown',
608
579
  entityName: params.name || 'Unnamed Inscription',
609
- entityType: 'topic',
580
+ entityType: 'topicId',
610
581
  transactionId: (result.result as { transactionId?: string })
611
582
  ?.transactionId,
612
583
  });
@@ -671,7 +642,7 @@ export class InscribeHashinalTool
671
642
  this.onEntityCreated?.({
672
643
  entityId: jsonTopicId || imageTopicId || 'unknown',
673
644
  entityName: params.name || 'Unnamed Inscription',
674
- entityType: 'topic',
645
+ entityType: 'topicId',
675
646
  transactionId: (result.result as { transactionId?: string })
676
647
  ?.transactionId,
677
648
  });