@hashgraphonline/standards-agent-kit 0.0.18 → 0.0.19
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/README.md +83 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index12.js +8 -0
- package/dist/_virtual/index12.js.map +1 -0
- package/dist/_virtual/index13.js +5 -0
- package/dist/_virtual/index13.js.map +1 -0
- package/dist/_virtual/index14.js +5 -0
- package/dist/_virtual/index14.js.map +1 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.js +8 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.js +8 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.js +6 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.js +8 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/lower-bound.js +5 -0
- package/dist/_virtual/lower-bound.js.map +1 -0
- package/dist/_virtual/priority-queue.js +5 -0
- package/dist/_virtual/priority-queue.js.map +1 -0
- package/dist/_virtual/re.js +5 -0
- package/dist/_virtual/re.js.map +1 -0
- package/dist/_virtual/retry.js +5 -0
- package/dist/_virtual/retry.js.map +1 -0
- package/dist/agents/index.d.ts +0 -0
- package/dist/hcs10/HCS10Client.d.ts +117 -0
- package/dist/hcs10/HCS10Client.js +251 -0
- package/dist/hcs10/HCS10Client.js.map +1 -0
- package/dist/hcs10/index.d.ts +1 -0
- package/dist/hcs10/types.d.ts +35 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +9747 -11699
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +59 -0
- package/dist/init.js +92 -0
- package/dist/init.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/base.js +98 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/base.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/manager.js +419 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/manager.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/promises.js +16 -0
- package/dist/node_modules/@langchain/core/dist/callbacks/promises.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/language_models/base.js +42 -0
- package/dist/node_modules/@langchain/core/dist/language_models/base.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/load/map_keys.js +16 -0
- package/dist/node_modules/@langchain/core/dist/load/map_keys.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/load/serializable.js +121 -0
- package/dist/node_modules/@langchain/core/dist/load/serializable.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/messages/ai.js +95 -0
- package/dist/node_modules/@langchain/core/dist/messages/ai.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/messages/base.js +112 -0
- package/dist/node_modules/@langchain/core/dist/messages/base.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/messages/utils.js +30 -0
- package/dist/node_modules/@langchain/core/dist/messages/utils.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/base.js +1277 -0
- package/dist/node_modules/@langchain/core/dist/runnables/base.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/config.js +83 -0
- package/dist/node_modules/@langchain/core/dist/runnables/config.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/graph.js +106 -0
- package/dist/node_modules/@langchain/core/dist/runnables/graph.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/iter.js +33 -0
- package/dist/node_modules/@langchain/core/dist/runnables/iter.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/utils.js +54 -0
- package/dist/node_modules/@langchain/core/dist/runnables/utils.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js +20 -0
- package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/singletons/index.js +34 -0
- package/dist/node_modules/@langchain/core/dist/singletons/index.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tools.js +69 -0
- package/dist/node_modules/@langchain/core/dist/tools.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/base.js +299 -0
- package/dist/node_modules/@langchain/core/dist/tracers/base.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/console.js +193 -0
- package/dist/node_modules/@langchain/core/dist/tracers/console.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/initialize.js +10 -0
- package/dist/node_modules/@langchain/core/dist/tracers/initialize.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js +284 -0
- package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js +54 -0
- package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js +68 -0
- package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/async_caller.js +86 -0
- package/dist/node_modules/@langchain/core/dist/utils/async_caller.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/env.js +33 -0
- package/dist/node_modules/@langchain/core/dist/utils/env.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/core.js +218 -0
- package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/core.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/helpers.js +117 -0
- package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/helpers.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/json.js +40 -0
- package/dist/node_modules/@langchain/core/dist/utils/json.js.map +1 -0
- package/dist/node_modules/@langchain/core/dist/utils/stream.js +164 -0
- package/dist/node_modules/@langchain/core/dist/utils/stream.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js +111 -0
- package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js +30 -0
- package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js +2002 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js +8 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js +5 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js +12 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js +94 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js +96 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js +20 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +82 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js +15 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js +27 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js +8 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js +8 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js +10 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js +10 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js +14 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js +11 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js +10 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js +14 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/node_modules/base64-js/index.js +53 -0
- package/dist/node_modules/base64-js/index.js.map +1 -0
- package/dist/node_modules/decamelize/index.js +12 -0
- package/dist/node_modules/decamelize/index.js.map +1 -0
- package/dist/node_modules/eventemitter3/index.js +112 -0
- package/dist/node_modules/eventemitter3/index.js.map +1 -0
- package/dist/node_modules/js-tiktoken/dist/chunk-Z5MDQTGX.js +117 -0
- package/dist/node_modules/js-tiktoken/dist/chunk-Z5MDQTGX.js.map +1 -0
- package/dist/node_modules/p-finally/index.js +18 -0
- package/dist/node_modules/p-finally/index.js.map +1 -0
- package/dist/node_modules/p-queue/dist/index.js +198 -0
- package/dist/node_modules/p-queue/dist/index.js.map +1 -0
- package/dist/node_modules/p-queue/dist/lower-bound.js +20 -0
- package/dist/node_modules/p-queue/dist/lower-bound.js.map +1 -0
- package/dist/node_modules/p-queue/dist/priority-queue.js +41 -0
- package/dist/node_modules/p-queue/dist/priority-queue.js.map +1 -0
- package/dist/node_modules/p-retry/index.js +63 -0
- package/dist/node_modules/p-retry/index.js.map +1 -0
- package/dist/node_modules/p-timeout/index.js +45 -0
- package/dist/node_modules/p-timeout/index.js.map +1 -0
- package/dist/node_modules/retry/index.js +9 -0
- package/dist/node_modules/retry/index.js.map +1 -0
- package/dist/node_modules/retry/lib/retry.js +59 -0
- package/dist/node_modules/retry/lib/retry.js.map +1 -0
- package/dist/node_modules/retry/lib/retry_operation.js +58 -0
- package/dist/node_modules/retry/lib/retry_operation.js.map +1 -0
- package/dist/node_modules/semver/classes/comparator.js +57 -0
- package/dist/node_modules/semver/classes/comparator.js.map +1 -0
- package/dist/node_modules/semver/classes/range.js +149 -0
- package/dist/node_modules/semver/classes/range.js.map +1 -0
- package/dist/node_modules/semver/classes/semver.js +170 -0
- package/dist/node_modules/semver/classes/semver.js.map +1 -0
- package/dist/node_modules/semver/functions/clean.js +15 -0
- package/dist/node_modules/semver/functions/clean.js.map +1 -0
- package/dist/node_modules/semver/functions/cmp.js +40 -0
- package/dist/node_modules/semver/functions/cmp.js.map +1 -0
- package/dist/node_modules/semver/functions/coerce.js +34 -0
- package/dist/node_modules/semver/functions/coerce.js.map +1 -0
- package/dist/node_modules/semver/functions/compare-build.js +15 -0
- package/dist/node_modules/semver/functions/compare-build.js.map +1 -0
- package/dist/node_modules/semver/functions/compare-loose.js +12 -0
- package/dist/node_modules/semver/functions/compare-loose.js.map +1 -0
- package/dist/node_modules/semver/functions/compare.js +12 -0
- package/dist/node_modules/semver/functions/compare.js.map +1 -0
- package/dist/node_modules/semver/functions/diff.js +25 -0
- package/dist/node_modules/semver/functions/diff.js.map +1 -0
- package/dist/node_modules/semver/functions/eq.js +12 -0
- package/dist/node_modules/semver/functions/eq.js.map +1 -0
- package/dist/node_modules/semver/functions/gt.js +12 -0
- package/dist/node_modules/semver/functions/gt.js.map +1 -0
- package/dist/node_modules/semver/functions/gte.js +12 -0
- package/dist/node_modules/semver/functions/gte.js.map +1 -0
- package/dist/node_modules/semver/functions/inc.js +22 -0
- package/dist/node_modules/semver/functions/inc.js.map +1 -0
- package/dist/node_modules/semver/functions/lt.js +12 -0
- package/dist/node_modules/semver/functions/lt.js.map +1 -0
- package/dist/node_modules/semver/functions/lte.js +12 -0
- package/dist/node_modules/semver/functions/lte.js.map +1 -0
- package/dist/node_modules/semver/functions/major.js +12 -0
- package/dist/node_modules/semver/functions/major.js.map +1 -0
- package/dist/node_modules/semver/functions/minor.js +12 -0
- package/dist/node_modules/semver/functions/minor.js.map +1 -0
- package/dist/node_modules/semver/functions/neq.js +12 -0
- package/dist/node_modules/semver/functions/neq.js.map +1 -0
- package/dist/node_modules/semver/functions/parse.js +22 -0
- package/dist/node_modules/semver/functions/parse.js.map +1 -0
- package/dist/node_modules/semver/functions/patch.js +12 -0
- package/dist/node_modules/semver/functions/patch.js.map +1 -0
- package/dist/node_modules/semver/functions/prerelease.js +15 -0
- package/dist/node_modules/semver/functions/prerelease.js.map +1 -0
- package/dist/node_modules/semver/functions/rcompare.js +12 -0
- package/dist/node_modules/semver/functions/rcompare.js.map +1 -0
- package/dist/node_modules/semver/functions/rsort.js +12 -0
- package/dist/node_modules/semver/functions/rsort.js.map +1 -0
- package/dist/node_modules/semver/functions/satisfies.js +19 -0
- package/dist/node_modules/semver/functions/satisfies.js.map +1 -0
- package/dist/node_modules/semver/functions/sort.js +12 -0
- package/dist/node_modules/semver/functions/sort.js.map +1 -0
- package/dist/node_modules/semver/functions/valid.js +15 -0
- package/dist/node_modules/semver/functions/valid.js.map +1 -0
- package/dist/node_modules/semver/index.js +98 -0
- package/dist/node_modules/semver/index.js.map +1 -0
- package/dist/node_modules/semver/internal/constants.js +29 -0
- package/dist/node_modules/semver/internal/constants.js.map +1 -0
- package/dist/node_modules/semver/internal/debug.js +9 -0
- package/dist/node_modules/semver/internal/debug.js.map +1 -0
- package/dist/node_modules/semver/internal/identifiers.js +17 -0
- package/dist/node_modules/semver/internal/identifiers.js.map +1 -0
- package/dist/node_modules/semver/internal/lrucache.js +33 -0
- package/dist/node_modules/semver/internal/lrucache.js.map +1 -0
- package/dist/node_modules/semver/internal/parse-options.js +11 -0
- package/dist/node_modules/semver/internal/parse-options.js.map +1 -0
- package/dist/node_modules/semver/internal/re.js +33 -0
- package/dist/node_modules/semver/internal/re.js.map +1 -0
- package/dist/node_modules/semver/ranges/gtr.js +12 -0
- package/dist/node_modules/semver/ranges/gtr.js.map +1 -0
- package/dist/node_modules/semver/ranges/intersects.js +12 -0
- package/dist/node_modules/semver/ranges/intersects.js.map +1 -0
- package/dist/node_modules/semver/ranges/ltr.js +12 -0
- package/dist/node_modules/semver/ranges/ltr.js.map +1 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +23 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js.map +1 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +23 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js.map +1 -0
- package/dist/node_modules/semver/ranges/min-version.js +43 -0
- package/dist/node_modules/semver/ranges/min-version.js.map +1 -0
- package/dist/node_modules/semver/ranges/outside.js +45 -0
- package/dist/node_modules/semver/ranges/outside.js.map +1 -0
- package/dist/node_modules/semver/ranges/simplify.js +25 -0
- package/dist/node_modules/semver/ranges/simplify.js.map +1 -0
- package/dist/node_modules/semver/ranges/subset.js +95 -0
- package/dist/node_modules/semver/ranges/subset.js.map +1 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +12 -0
- package/dist/node_modules/semver/ranges/to-comparators.js.map +1 -0
- package/dist/node_modules/semver/ranges/valid.js +18 -0
- package/dist/node_modules/semver/ranges/valid.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +32 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +22 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +44 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +7 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +17 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +26 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +9 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +8 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +6 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +59 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +11 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +8 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +10 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +36 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +16 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +27 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +11 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +9 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +12 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +30 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +28 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +50 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +22 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +21 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +8 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +6 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +17 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +245 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +27 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +9 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +69 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +7 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +110 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +26 -0
- package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
- package/dist/plugins/BasePlugin.d.ts +28 -0
- package/dist/plugins/BasePlugin.js +19 -0
- package/dist/plugins/BasePlugin.js.map +1 -0
- package/dist/plugins/PluginInterface.d.ts +64 -0
- package/dist/plugins/PluginLoader.d.ts +38 -0
- package/dist/plugins/PluginLoader.js +60 -0
- package/dist/plugins/PluginLoader.js.map +1 -0
- package/dist/plugins/PluginRegistry.d.ts +47 -0
- package/dist/plugins/PluginRegistry.js +71 -0
- package/dist/plugins/PluginRegistry.js.map +1 -0
- package/dist/plugins/__tests__/BasePlugin.test.d.ts +1 -0
- package/dist/plugins/__tests__/PluginLoader.test.d.ts +1 -0
- package/dist/plugins/__tests__/PluginRegistry.test.d.ts +1 -0
- package/dist/plugins/defi/index.d.ts +13 -0
- package/dist/plugins/hedera/HbarPricePlugin.d.ts +45 -0
- package/dist/plugins/hedera/HbarPricePlugin.js +70 -0
- package/dist/plugins/hedera/HbarPricePlugin.js.map +1 -0
- package/dist/plugins/hedera/__tests__/HbarPricePlugin.test.d.ts +1 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/weather/index.d.ts +15 -0
- package/dist/src/agents/index.d.ts +0 -0
- package/dist/src/plugins/hedera/HbarPricePlugin.d.ts +45 -0
- package/dist/src/plugins/index.d.ts +1 -0
- package/dist/src/tools/CheckMessagesTool.d.ts +9 -2
- package/dist/src/utils/state-tools.d.ts +23 -0
- package/dist/state/index.d.ts +2 -0
- package/dist/state/open-convai-state.d.ts +84 -0
- package/dist/state/open-convai-state.js +132 -0
- package/dist/state/open-convai-state.js.map +1 -0
- package/dist/state/state-types.d.ts +143 -0
- package/dist/tools/AcceptConnectionRequestTool.d.ts +33 -0
- package/dist/tools/AcceptConnectionRequestTool.js +116 -0
- package/dist/tools/AcceptConnectionRequestTool.js.map +1 -0
- package/dist/tools/CheckMessagesTool.d.ts +34 -0
- package/dist/tools/CheckMessagesTool.js +96 -0
- package/dist/tools/CheckMessagesTool.js.map +1 -0
- package/dist/tools/ConnectionMonitorTool.d.ts +96 -0
- package/dist/tools/ConnectionMonitorTool.js +289 -0
- package/dist/tools/ConnectionMonitorTool.js.map +1 -0
- package/dist/tools/ConnectionTool.d.ts +40 -0
- package/dist/tools/ConnectionTool.js +114 -0
- package/dist/tools/ConnectionTool.js.map +1 -0
- package/dist/tools/FindRegistrationsTool.d.ts +27 -0
- package/dist/tools/FindRegistrationsTool.js +64 -0
- package/dist/tools/FindRegistrationsTool.js.map +1 -0
- package/dist/tools/InitiateConnectionTool.d.ts +30 -0
- package/dist/tools/InitiateConnectionTool.js +79 -0
- package/dist/tools/InitiateConnectionTool.js.map +1 -0
- package/dist/tools/ListConnectionsTool.d.ts +33 -0
- package/dist/tools/ListConnectionsTool.js +327 -0
- package/dist/tools/ListConnectionsTool.js.map +1 -0
- package/dist/tools/ListUnapprovedConnectionRequestsTool.d.ts +53 -0
- package/dist/tools/ListUnapprovedConnectionRequestsTool.js +177 -0
- package/dist/tools/ListUnapprovedConnectionRequestsTool.js.map +1 -0
- package/dist/tools/ManageConnectionRequestsTool.d.ts +39 -0
- package/dist/tools/ManageConnectionRequestsTool.js +161 -0
- package/dist/tools/ManageConnectionRequestsTool.js.map +1 -0
- package/dist/tools/RegisterAgentTool.d.ts +188 -0
- package/dist/tools/RegisterAgentTool.js +331 -0
- package/dist/tools/RegisterAgentTool.js.map +1 -0
- package/dist/tools/RetrieveProfileTool.d.ts +34 -0
- package/dist/tools/RetrieveProfileTool.js +53 -0
- package/dist/tools/RetrieveProfileTool.js.map +1 -0
- package/dist/tools/SendMessageToConnectionTool.d.ts +31 -0
- package/dist/tools/SendMessageToConnectionTool.js +74 -0
- package/dist/tools/SendMessageToConnectionTool.js.map +1 -0
- package/dist/tools/SendMessageTool.d.ts +44 -0
- package/dist/tools/SendMessageTool.js +75 -0
- package/dist/tools/SendMessageTool.js.map +1 -0
- package/dist/tools/index.d.ts +13 -0
- package/dist/utils/Encryption.d.ts +7 -0
- package/dist/utils/Encryption.js +7 -0
- package/dist/utils/Encryption.js.map +1 -0
- package/dist/utils/HederaClient.d.ts +18 -0
- package/dist/utils/connectionUtils.d.ts +15 -0
- package/dist/utils/connectionUtils.js +64 -0
- package/dist/utils/connectionUtils.js.map +1 -0
- package/dist/utils/state-tools.d.ts +23 -0
- package/dist/utils/state-tools.js +90 -0
- package/dist/utils/state-tools.js.map +1 -0
- package/package.json +20 -10
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
+
import { IStateManager } from '../state/state-types';
|
|
5
|
+
export interface ManageConnectionRequestsToolParams extends ToolParams {
|
|
6
|
+
hcsClient: HCS10Client;
|
|
7
|
+
stateManager: IStateManager;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A tool for managing incoming connection requests in a LangChain-compatible way.
|
|
11
|
+
* This tool allows an agent to list, view details of, and accept/reject incoming connection requests.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ManageConnectionRequestsTool extends StructuredTool {
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
schema: z.ZodObject<{
|
|
17
|
+
action: z.ZodEnum<["list", "view", "reject"]>;
|
|
18
|
+
requestId: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
action: "list" | "view" | "reject";
|
|
21
|
+
requestId?: number | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
action: "list" | "view" | "reject";
|
|
24
|
+
requestId?: number | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
private hcsClient;
|
|
27
|
+
private stateManager;
|
|
28
|
+
private logger;
|
|
29
|
+
private lastRefreshTime;
|
|
30
|
+
private refreshIntervalMs;
|
|
31
|
+
constructor({ hcsClient, stateManager, ...rest }: ManageConnectionRequestsToolParams);
|
|
32
|
+
protected _call({ action, requestId, }: z.infer<this['schema']>): Promise<string>;
|
|
33
|
+
private refreshRequestsIfNeeded;
|
|
34
|
+
refreshRequests(): Promise<void>;
|
|
35
|
+
private listRequests;
|
|
36
|
+
private viewRequest;
|
|
37
|
+
private rejectRequest;
|
|
38
|
+
private extractAccountId;
|
|
39
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { StructuredTool as g } from "../node_modules/@langchain/core/dist/tools.js";
|
|
2
|
+
import { z as l } from "zod";
|
|
3
|
+
import { Logger as h } from "@hashgraphonline/standards-sdk";
|
|
4
|
+
class $ extends g {
|
|
5
|
+
constructor({
|
|
6
|
+
hcsClient: t,
|
|
7
|
+
stateManager: e,
|
|
8
|
+
...r
|
|
9
|
+
}) {
|
|
10
|
+
super(r), this.name = "manage_connection_requests", this.description = 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate "accept_connection_request" tool to accept.', this.schema = l.object({
|
|
11
|
+
action: l.enum(["list", "view", "reject"]).describe(
|
|
12
|
+
"The action to perform: list all requests, view details of a specific request, or reject a request"
|
|
13
|
+
),
|
|
14
|
+
requestId: l.number().optional().describe(
|
|
15
|
+
"The ID of the specific request to view or reject (required for view and reject actions)"
|
|
16
|
+
)
|
|
17
|
+
}), this.lastRefreshTime = 0, this.refreshIntervalMs = 3e4, this.hcsClient = t, this.stateManager = e, this.logger = h.getInstance({
|
|
18
|
+
module: "ManageConnectionRequestsTool",
|
|
19
|
+
level: "debug"
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async _call({
|
|
23
|
+
action: t,
|
|
24
|
+
requestId: e
|
|
25
|
+
}) {
|
|
26
|
+
if (!this.stateManager.getCurrentAgent())
|
|
27
|
+
return "Error: Cannot manage connection requests. No agent is currently active. Please register or select an agent first.";
|
|
28
|
+
if ((t === "view" || t === "reject") && e === void 0)
|
|
29
|
+
return `Error: Request ID is required for the "${t}" action. Use the "list" action first to see available requests.`;
|
|
30
|
+
try {
|
|
31
|
+
switch (await this.refreshRequestsIfNeeded(), t) {
|
|
32
|
+
case "list":
|
|
33
|
+
return this.listRequests();
|
|
34
|
+
case "view":
|
|
35
|
+
return this.viewRequest(e);
|
|
36
|
+
case "reject":
|
|
37
|
+
return this.rejectRequest(e);
|
|
38
|
+
default:
|
|
39
|
+
return `Error: Unsupported action: ${t}`;
|
|
40
|
+
}
|
|
41
|
+
} catch (s) {
|
|
42
|
+
return this.logger.error(`Error in ManageConnectionRequestsTool: ${s}`), `Error managing connection requests: ${s instanceof Error ? s.message : String(s)}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async refreshRequestsIfNeeded() {
|
|
46
|
+
const t = Date.now();
|
|
47
|
+
t - this.lastRefreshTime > this.refreshIntervalMs && (await this.refreshRequests(), this.lastRefreshTime = t);
|
|
48
|
+
}
|
|
49
|
+
async refreshRequests() {
|
|
50
|
+
try {
|
|
51
|
+
const t = await this.hcsClient.getInboundTopicId(), e = await this.hcsClient.getOutboundTopicId();
|
|
52
|
+
if (!t || !e)
|
|
53
|
+
throw new Error(
|
|
54
|
+
"Could not find inbound or outbound topic ID for the current agent"
|
|
55
|
+
);
|
|
56
|
+
const s = (await this.hcsClient.getMessages(
|
|
57
|
+
e
|
|
58
|
+
)).messages.filter(
|
|
59
|
+
(n) => n.op === "connection_created" && n.connection_request_id
|
|
60
|
+
), i = new Set(
|
|
61
|
+
s.map((n) => n.connection_request_id)
|
|
62
|
+
), f = (await this.hcsClient.getMessages(
|
|
63
|
+
t
|
|
64
|
+
)).messages.filter(
|
|
65
|
+
(n) => n.op === "connection_request" && n.sequence_number
|
|
66
|
+
);
|
|
67
|
+
this.stateManager.clearConnectionRequests();
|
|
68
|
+
const d = f.map(async (n) => {
|
|
69
|
+
const u = n.sequence_number;
|
|
70
|
+
if (!u || i.has(u))
|
|
71
|
+
return;
|
|
72
|
+
const a = this.extractAccountId(n);
|
|
73
|
+
if (!a)
|
|
74
|
+
return;
|
|
75
|
+
let c;
|
|
76
|
+
try {
|
|
77
|
+
const o = await this.hcsClient.getAgentProfile(
|
|
78
|
+
a
|
|
79
|
+
);
|
|
80
|
+
o.success && o.profile && (c = {
|
|
81
|
+
name: o.profile.display_name || o.profile.alias,
|
|
82
|
+
bio: o.profile.bio,
|
|
83
|
+
avatar: o.profile.profileImage,
|
|
84
|
+
type: o.profile.type
|
|
85
|
+
});
|
|
86
|
+
} catch (o) {
|
|
87
|
+
this.logger.warn(
|
|
88
|
+
`Could not fetch profile for ${a}: ${o}`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
this.stateManager.addConnectionRequest({
|
|
92
|
+
id: u,
|
|
93
|
+
requestorId: a,
|
|
94
|
+
requestorName: (c == null ? void 0 : c.name) || `Agent ${a}`,
|
|
95
|
+
timestamp: new Date(n.created || Date.now()),
|
|
96
|
+
memo: n.m,
|
|
97
|
+
profile: c
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
await Promise.allSettled(d), this.logger.info(
|
|
101
|
+
`Found ${this.stateManager.listConnectionRequests().length} pending connection requests`
|
|
102
|
+
);
|
|
103
|
+
} catch (t) {
|
|
104
|
+
throw this.logger.error(`Error refreshing connection requests: ${t}`), t;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
listRequests() {
|
|
108
|
+
const t = this.stateManager.listConnectionRequests();
|
|
109
|
+
if (t.length === 0)
|
|
110
|
+
return "No pending connection requests found.";
|
|
111
|
+
let e = `Found ${t.length} pending connection request(s):
|
|
112
|
+
|
|
113
|
+
`;
|
|
114
|
+
return [...t].sort(
|
|
115
|
+
(s, i) => i.timestamp.getTime() - s.timestamp.getTime()
|
|
116
|
+
).forEach((s, i) => {
|
|
117
|
+
e += `${i + 1}. Request ID: ${s.id}
|
|
118
|
+
`, e += ` From: ${s.requestorName} (${s.requestorId})
|
|
119
|
+
`, e += ` Received: ${s.timestamp.toLocaleString()}
|
|
120
|
+
`, s.memo && (e += ` Memo: ${s.memo}
|
|
121
|
+
`), e += `
|
|
122
|
+
`;
|
|
123
|
+
}), e += `To view more details about a request, use action="view" with the specific requestId.
|
|
124
|
+
`, e += 'To reject a request, use action="reject" with the specific requestId.', e;
|
|
125
|
+
}
|
|
126
|
+
viewRequest(t) {
|
|
127
|
+
const e = this.stateManager.getConnectionRequestById(t);
|
|
128
|
+
if (!e)
|
|
129
|
+
return `Error: Request ID ${t} not found or no longer pending.`;
|
|
130
|
+
let r = `Details for connection request #${t}:
|
|
131
|
+
|
|
132
|
+
`;
|
|
133
|
+
return r += `Requestor ID: ${e.requestorId}
|
|
134
|
+
`, r += `Requestor Name: ${e.requestorName}
|
|
135
|
+
`, r += `Received: ${e.timestamp.toLocaleString()}
|
|
136
|
+
`, e.memo && (r += `Memo: ${e.memo}
|
|
137
|
+
`), e.profile && (r += `
|
|
138
|
+
Agent Profile Information:
|
|
139
|
+
`, e.profile.name && (r += `Name: ${e.profile.name}
|
|
140
|
+
`), e.profile.type && (r += `Type: ${e.profile.type}
|
|
141
|
+
`), e.profile.bio && (r += `Bio: ${e.profile.bio}
|
|
142
|
+
`)), r += `
|
|
143
|
+
Actions:
|
|
144
|
+
`, r += `- To reject this request: action="reject", requestId=${t}
|
|
145
|
+
`, r += 'Use the separate "accept_connection_request" tool to accept requests.', r;
|
|
146
|
+
}
|
|
147
|
+
async rejectRequest(t) {
|
|
148
|
+
const e = this.stateManager.getConnectionRequestById(t);
|
|
149
|
+
return e ? (this.stateManager.removeConnectionRequest(t), `Connection request #${t} from ${e.requestorName} was rejected locally (removed from pending list).`) : `Error: Request ID ${t} not found or no longer pending.`;
|
|
150
|
+
}
|
|
151
|
+
extractAccountId(t) {
|
|
152
|
+
if (t.operator_id)
|
|
153
|
+
return this.hcsClient.standardClient.extractAccountFromOperatorId(
|
|
154
|
+
t.operator_id
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
export {
|
|
159
|
+
$ as ManageConnectionRequestsTool
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=ManageConnectionRequestsTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageConnectionRequestsTool.js","sources":["../../src/tools/ManageConnectionRequestsTool.ts"],"sourcesContent":["import { StructuredTool, ToolParams } from '@langchain/core/tools';\nimport { z } from 'zod';\nimport { HCS10Client } from '../hcs10/HCS10Client';\nimport { IStateManager } from '../state/state-types';\nimport { Logger, HCSMessage } from '@hashgraphonline/standards-sdk';\n\nexport interface ManageConnectionRequestsToolParams extends ToolParams {\n hcsClient: HCS10Client;\n stateManager: IStateManager;\n}\n\n/**\n * A tool for managing incoming connection requests in a LangChain-compatible way.\n * This tool allows an agent to list, view details of, and accept/reject incoming connection requests.\n */\nexport class ManageConnectionRequestsTool extends StructuredTool {\n name = 'manage_connection_requests';\n description =\n 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate \"accept_connection_request\" tool to accept.';\n schema = z.object({\n action: z\n .enum(['list', 'view', 'reject'])\n .describe(\n 'The action to perform: list all requests, view details of a specific request, or reject a request'\n ),\n requestId: z\n .number()\n .optional()\n .describe(\n 'The ID of the specific request to view or reject (required for view and reject actions)'\n ),\n });\n\n private hcsClient: HCS10Client;\n private stateManager: IStateManager;\n private logger: Logger;\n private lastRefreshTime: number = 0;\n private refreshIntervalMs = 30000;\n\n constructor({\n hcsClient,\n stateManager,\n ...rest\n }: ManageConnectionRequestsToolParams) {\n super(rest);\n this.hcsClient = hcsClient;\n this.stateManager = stateManager;\n this.logger = Logger.getInstance({\n module: 'ManageConnectionRequestsTool',\n level: 'debug',\n });\n }\n\n protected async _call({\n action,\n requestId,\n }: z.infer<this['schema']>): Promise<string> {\n const currentAgent = this.stateManager.getCurrentAgent();\n if (!currentAgent) {\n return 'Error: Cannot manage connection requests. No agent is currently active. Please register or select an agent first.';\n }\n\n if ((action === 'view' || action === 'reject') && requestId === undefined) {\n return `Error: Request ID is required for the \"${action}\" action. Use the \"list\" action first to see available requests.`;\n }\n\n try {\n await this.refreshRequestsIfNeeded();\n\n switch (action) {\n case 'list':\n return this.listRequests();\n case 'view':\n return this.viewRequest(requestId!);\n case 'reject':\n return this.rejectRequest(requestId!);\n default:\n return `Error: Unsupported action: ${action}`;\n }\n } catch (error) {\n this.logger.error(`Error in ManageConnectionRequestsTool: ${error}`);\n return `Error managing connection requests: ${\n error instanceof Error ? error.message : String(error)\n }`;\n }\n }\n\n private async refreshRequestsIfNeeded(): Promise<void> {\n const now = Date.now();\n if (now - this.lastRefreshTime > this.refreshIntervalMs) {\n await this.refreshRequests();\n this.lastRefreshTime = now;\n }\n }\n\n public async refreshRequests(): Promise<void> {\n try {\n const inboundTopicId = await this.hcsClient.getInboundTopicId();\n const outboundTopicId = await this.hcsClient.getOutboundTopicId();\n if (!inboundTopicId || !outboundTopicId) {\n throw new Error(\n 'Could not find inbound or outbound topic ID for the current agent'\n );\n }\n\n const outboundMessagesResult = await this.hcsClient.getMessages(\n outboundTopicId\n );\n const outboundConfirmations = outboundMessagesResult.messages.filter(\n (msg) => msg.op === 'connection_created' && msg.connection_request_id\n );\n const confirmedRequestIds = new Set(\n outboundConfirmations.map((conf) => conf.connection_request_id)\n );\n\n const inboundMessagesResult = await this.hcsClient.getMessages(\n inboundTopicId\n );\n const incomingRequests = inboundMessagesResult.messages.filter(\n (msg) => msg.op === 'connection_request' && msg.sequence_number\n );\n\n this.stateManager.clearConnectionRequests();\n\n const profilePromises = incomingRequests.map(async (request) => {\n const requestId = request.sequence_number;\n if (!requestId) {\n return;\n }\n\n if (confirmedRequestIds.has(requestId)) {\n return;\n }\n\n const requestorId = this.extractAccountId(request);\n if (!requestorId) {\n return;\n }\n\n let profile = undefined;\n try {\n const profileResult = await this.hcsClient.getAgentProfile(\n requestorId\n );\n if (profileResult.success && profileResult.profile) {\n profile = {\n name:\n profileResult.profile.display_name ||\n profileResult.profile.alias,\n bio: profileResult.profile.bio,\n avatar: profileResult.profile.profileImage,\n type: profileResult.profile.type,\n };\n }\n } catch (profileError) {\n this.logger.warn(\n `Could not fetch profile for ${requestorId}: ${profileError}`\n );\n }\n\n this.stateManager.addConnectionRequest({\n id: requestId,\n requestorId,\n requestorName: profile?.name || `Agent ${requestorId}`,\n timestamp: new Date(request.created || Date.now()),\n memo: request.m,\n profile,\n });\n });\n\n await Promise.allSettled(profilePromises);\n this.logger.info(\n `Found ${\n this.stateManager.listConnectionRequests().length\n } pending connection requests`\n );\n } catch (error) {\n this.logger.error(`Error refreshing connection requests: ${error}`);\n throw error;\n }\n }\n\n private listRequests(): string {\n const requests = this.stateManager.listConnectionRequests();\n if (requests.length === 0) {\n return 'No pending connection requests found.';\n }\n\n let output = `Found ${requests.length} pending connection request(s):\\n\\n`;\n const sortedRequests = [...requests].sort(\n (a, b) => b.timestamp.getTime() - a.timestamp.getTime()\n );\n\n sortedRequests.forEach((request, index) => {\n output += `${index + 1}. Request ID: ${request.id}\\n`;\n output += ` From: ${request.requestorName} (${request.requestorId})\\n`;\n output += ` Received: ${request.timestamp.toLocaleString()}\\n`;\n if (request.memo) {\n output += ` Memo: ${request.memo}\\n`;\n }\n output += '\\n';\n });\n\n output +=\n 'To view more details about a request, use action=\"view\" with the specific requestId.\\n';\n output +=\n 'To reject a request, use action=\"reject\" with the specific requestId.';\n return output;\n }\n\n private viewRequest(requestId: number): string {\n const request = this.stateManager.getConnectionRequestById(requestId);\n if (!request) {\n return `Error: Request ID ${requestId} not found or no longer pending.`;\n }\n\n let output = `Details for connection request #${requestId}:\\n\\n`;\n output += `Requestor ID: ${request.requestorId}\\n`;\n output += `Requestor Name: ${request.requestorName}\\n`;\n output += `Received: ${request.timestamp.toLocaleString()}\\n`;\n\n if (request.memo) {\n output += `Memo: ${request.memo}\\n`;\n }\n\n if (request.profile) {\n output += '\\nAgent Profile Information:\\n';\n\n if (request.profile.name) {\n output += `Name: ${request.profile.name}\\n`;\n }\n\n if (request.profile.type) {\n output += `Type: ${request.profile.type}\\n`;\n }\n\n if (request.profile.bio) {\n output += `Bio: ${request.profile.bio}\\n`;\n }\n }\n\n output += '\\nActions:\\n';\n output += `- To reject this request: action=\"reject\", requestId=${requestId}\\n`;\n output +=\n 'Use the separate \"accept_connection_request\" tool to accept requests.';\n return output;\n }\n\n private async rejectRequest(requestId: number): Promise<string> {\n const request = this.stateManager.getConnectionRequestById(requestId);\n if (!request) {\n return `Error: Request ID ${requestId} not found or no longer pending.`;\n }\n\n this.stateManager.removeConnectionRequest(requestId);\n return `Connection request #${requestId} from ${request.requestorName} was rejected locally (removed from pending list).`;\n }\n\n private extractAccountId(request: HCSMessage): string | undefined {\n if (request.operator_id) {\n return this.hcsClient.standardClient.extractAccountFromOperatorId(\n request.operator_id\n );\n }\n return undefined;\n }\n}\n"],"names":["ManageConnectionRequestsTool","StructuredTool","hcsClient","stateManager","rest","z","Logger","action","requestId","error","now","inboundTopicId","outboundTopicId","outboundConfirmations","msg","confirmedRequestIds","conf","incomingRequests","profilePromises","request","requestorId","profile","profileResult","profileError","requests","output","a","b","index"],"mappings":"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"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
2
|
+
import { StructuredTool } from '@langchain/core/tools';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { IStateManager } from '../state/state-types';
|
|
5
|
+
/**
|
|
6
|
+
* RegisterAgentTool wraps the createAndRegisterAgent() function of HCS10Client.
|
|
7
|
+
* It creates and registers an agent on Hedera using the HCS-10 standard SDK flow.
|
|
8
|
+
* On success, returns a JSON string containing the new agent's details (including private key).
|
|
9
|
+
*/
|
|
10
|
+
export declare class RegisterAgentTool extends StructuredTool {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
private client;
|
|
14
|
+
private stateManager?;
|
|
15
|
+
schema: z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
description: z.ZodOptional<z.ZodString>;
|
|
18
|
+
type: z.ZodOptional<z.ZodEnum<["autonomous", "manual"]>>;
|
|
19
|
+
model: z.ZodOptional<z.ZodString>;
|
|
20
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
21
|
+
profilePicture: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
filename: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
url: string;
|
|
26
|
+
filename: string;
|
|
27
|
+
}, {
|
|
28
|
+
url: string;
|
|
29
|
+
filename: string;
|
|
30
|
+
}>, z.ZodObject<{
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
path: string;
|
|
35
|
+
filename?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
path: string;
|
|
38
|
+
filename?: string | undefined;
|
|
39
|
+
}>]>>;
|
|
40
|
+
feeCollectorAccountId: z.ZodOptional<z.ZodString>;
|
|
41
|
+
hbarFee: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
tokenFee: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
amount: z.ZodNumber;
|
|
44
|
+
tokenId: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
amount: number;
|
|
47
|
+
tokenId: string;
|
|
48
|
+
}, {
|
|
49
|
+
amount: number;
|
|
50
|
+
tokenId: string;
|
|
51
|
+
}>>;
|
|
52
|
+
hbarFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
amount: z.ZodNumber;
|
|
54
|
+
collectorAccount: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
amount: number;
|
|
57
|
+
collectorAccount?: string | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
amount: number;
|
|
60
|
+
collectorAccount?: string | undefined;
|
|
61
|
+
}>, "many">>;
|
|
62
|
+
tokenFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
|
+
amount: z.ZodNumber;
|
|
64
|
+
tokenId: z.ZodString;
|
|
65
|
+
collectorAccount: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
amount: number;
|
|
68
|
+
tokenId: string;
|
|
69
|
+
collectorAccount?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
amount: number;
|
|
72
|
+
tokenId: string;
|
|
73
|
+
collectorAccount?: string | undefined;
|
|
74
|
+
}>, "many">>;
|
|
75
|
+
exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
76
|
+
setAsCurrent: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
persistence: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
prefix?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
prefix?: string | undefined;
|
|
83
|
+
}>>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
name: string;
|
|
86
|
+
capabilities?: number[] | undefined;
|
|
87
|
+
description?: string | undefined;
|
|
88
|
+
type?: "autonomous" | "manual" | undefined;
|
|
89
|
+
model?: string | undefined;
|
|
90
|
+
profilePicture?: string | {
|
|
91
|
+
url: string;
|
|
92
|
+
filename: string;
|
|
93
|
+
} | {
|
|
94
|
+
path: string;
|
|
95
|
+
filename?: string | undefined;
|
|
96
|
+
} | undefined;
|
|
97
|
+
feeCollectorAccountId?: string | undefined;
|
|
98
|
+
hbarFee?: number | undefined;
|
|
99
|
+
tokenFee?: {
|
|
100
|
+
amount: number;
|
|
101
|
+
tokenId: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
hbarFees?: {
|
|
104
|
+
amount: number;
|
|
105
|
+
collectorAccount?: string | undefined;
|
|
106
|
+
}[] | undefined;
|
|
107
|
+
tokenFees?: {
|
|
108
|
+
amount: number;
|
|
109
|
+
tokenId: string;
|
|
110
|
+
collectorAccount?: string | undefined;
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
exemptAccountIds?: string[] | undefined;
|
|
113
|
+
setAsCurrent?: boolean | undefined;
|
|
114
|
+
persistence?: {
|
|
115
|
+
prefix?: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
name: string;
|
|
119
|
+
capabilities?: number[] | undefined;
|
|
120
|
+
description?: string | undefined;
|
|
121
|
+
type?: "autonomous" | "manual" | undefined;
|
|
122
|
+
model?: string | undefined;
|
|
123
|
+
profilePicture?: string | {
|
|
124
|
+
url: string;
|
|
125
|
+
filename: string;
|
|
126
|
+
} | {
|
|
127
|
+
path: string;
|
|
128
|
+
filename?: string | undefined;
|
|
129
|
+
} | undefined;
|
|
130
|
+
feeCollectorAccountId?: string | undefined;
|
|
131
|
+
hbarFee?: number | undefined;
|
|
132
|
+
tokenFee?: {
|
|
133
|
+
amount: number;
|
|
134
|
+
tokenId: string;
|
|
135
|
+
} | undefined;
|
|
136
|
+
hbarFees?: {
|
|
137
|
+
amount: number;
|
|
138
|
+
collectorAccount?: string | undefined;
|
|
139
|
+
}[] | undefined;
|
|
140
|
+
tokenFees?: {
|
|
141
|
+
amount: number;
|
|
142
|
+
tokenId: string;
|
|
143
|
+
collectorAccount?: string | undefined;
|
|
144
|
+
}[] | undefined;
|
|
145
|
+
exemptAccountIds?: string[] | undefined;
|
|
146
|
+
setAsCurrent?: boolean | undefined;
|
|
147
|
+
persistence?: {
|
|
148
|
+
prefix?: string | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* Creates a new RegisterAgentTool instance
|
|
153
|
+
* @param client - Instance of HCS10Client (already configured with operator/network)
|
|
154
|
+
* @param stateManager - Optional state manager to store agent details
|
|
155
|
+
*/
|
|
156
|
+
constructor(client: HCS10Client, stateManager?: IStateManager);
|
|
157
|
+
/**
|
|
158
|
+
* Loads a profile picture from a local file or URL and returns a buffer
|
|
159
|
+
* @param profilePicture - Local file path or URL
|
|
160
|
+
* @returns Object containing buffer and filename
|
|
161
|
+
*/
|
|
162
|
+
private loadProfilePicture;
|
|
163
|
+
/**
|
|
164
|
+
* Calls createAndRegisterAgent() with the provided metadata.
|
|
165
|
+
* Returns a JSON string with agent details on success, or an error string.
|
|
166
|
+
*/
|
|
167
|
+
_call(input: z.infer<typeof this.schema>): Promise<string>;
|
|
168
|
+
/**
|
|
169
|
+
* Checks if the token fee configuration is valid
|
|
170
|
+
*/
|
|
171
|
+
private hasValidTokenFee;
|
|
172
|
+
/**
|
|
173
|
+
* Processes the registration result and returns formatted output
|
|
174
|
+
*/
|
|
175
|
+
private processRegistrationResult;
|
|
176
|
+
/**
|
|
177
|
+
* Ensures the agent has enough HBAR for operations
|
|
178
|
+
*/
|
|
179
|
+
private ensureAgentHasFunds;
|
|
180
|
+
/**
|
|
181
|
+
* Validates that all required fields are present in the registration result
|
|
182
|
+
*/
|
|
183
|
+
private validateRegistrationResult;
|
|
184
|
+
/**
|
|
185
|
+
* Creates a description of the fees configured for the agent
|
|
186
|
+
*/
|
|
187
|
+
private createFeeDescription;
|
|
188
|
+
}
|