@balchemyai/agent-sdk 0.8.1 → 0.9.0

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 (74) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +20 -284
  3. package/dist/agent-loop/llm-adapters/openai.js +1 -1
  4. package/dist/agent-loop/llm-adapters/openai.js.map +1 -1
  5. package/dist/agent-loop/types.d.ts +1 -138
  6. package/dist/agent-loop/types.d.ts.map +1 -1
  7. package/dist/index.d.ts +1 -33
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +5 -72
  10. package/dist/index.js.map +1 -1
  11. package/docs/error-retry-strategy.md +4 -4
  12. package/docs/release-policy.md +1 -1
  13. package/package.json +2 -6
  14. package/dist/agent-loop/agent-loop.d.ts +0 -77
  15. package/dist/agent-loop/agent-loop.d.ts.map +0 -1
  16. package/dist/agent-loop/agent-loop.js +0 -1270
  17. package/dist/agent-loop/agent-loop.js.map +0 -1
  18. package/dist/agent-loop/decision-handler.d.ts +0 -38
  19. package/dist/agent-loop/decision-handler.d.ts.map +0 -1
  20. package/dist/agent-loop/decision-handler.js +0 -231
  21. package/dist/agent-loop/decision-handler.js.map +0 -1
  22. package/dist/agent-loop/llm-cost-tracker.d.ts +0 -27
  23. package/dist/agent-loop/llm-cost-tracker.d.ts.map +0 -1
  24. package/dist/agent-loop/llm-cost-tracker.js +0 -102
  25. package/dist/agent-loop/llm-cost-tracker.js.map +0 -1
  26. package/dist/agent-loop/model-router.d.ts +0 -35
  27. package/dist/agent-loop/model-router.d.ts.map +0 -1
  28. package/dist/agent-loop/model-router.js +0 -55
  29. package/dist/agent-loop/model-router.js.map +0 -1
  30. package/dist/agent-loop/rule-checker.d.ts +0 -26
  31. package/dist/agent-loop/rule-checker.d.ts.map +0 -1
  32. package/dist/agent-loop/rule-checker.js +0 -70
  33. package/dist/agent-loop/rule-checker.js.map +0 -1
  34. package/dist/agent-loop/telemetry-reporter.d.ts +0 -70
  35. package/dist/agent-loop/telemetry-reporter.d.ts.map +0 -1
  36. package/dist/agent-loop/telemetry-reporter.js +0 -221
  37. package/dist/agent-loop/telemetry-reporter.js.map +0 -1
  38. package/dist/agent-loop/webhook-receiver.d.ts +0 -41
  39. package/dist/agent-loop/webhook-receiver.d.ts.map +0 -1
  40. package/dist/agent-loop/webhook-receiver.js +0 -308
  41. package/dist/agent-loop/webhook-receiver.js.map +0 -1
  42. package/dist/auth/onboarding.d.ts +0 -12
  43. package/dist/auth/onboarding.d.ts.map +0 -1
  44. package/dist/auth/onboarding.js +0 -70
  45. package/dist/auth/onboarding.js.map +0 -1
  46. package/dist/auth/token-store.d.ts +0 -44
  47. package/dist/auth/token-store.d.ts.map +0 -1
  48. package/dist/auth/token-store.js +0 -67
  49. package/dist/auth/token-store.js.map +0 -1
  50. package/dist/mcp/mcp-client.d.ts +0 -174
  51. package/dist/mcp/mcp-client.d.ts.map +0 -1
  52. package/dist/mcp/mcp-client.js +0 -845
  53. package/dist/mcp/mcp-client.js.map +0 -1
  54. package/dist/streaming/sse-event-stream.d.ts +0 -72
  55. package/dist/streaming/sse-event-stream.d.ts.map +0 -1
  56. package/dist/streaming/sse-event-stream.js +0 -403
  57. package/dist/streaming/sse-event-stream.js.map +0 -1
  58. package/dist/types.d.ts +0 -162
  59. package/dist/types.d.ts.map +0 -1
  60. package/dist/types.js +0 -3
  61. package/dist/types.js.map +0 -1
  62. package/dist/utils/package-version.d.ts +0 -2
  63. package/dist/utils/package-version.d.ts.map +0 -1
  64. package/dist/utils/package-version.js +0 -54
  65. package/dist/utils/package-version.js.map +0 -1
  66. package/docs/BEHAVIOR_RULES.md +0 -184
  67. package/docs/DEPLOYMENT.md +0 -197
  68. package/docs/QUICKSTART.md +0 -139
  69. package/docs/examples/custom-strategy.yaml +0 -73
  70. package/docs/examples/dca-accumulator.yaml +0 -41
  71. package/docs/examples/memecoin-sniper.yaml +0 -47
  72. package/docs/examples/swing-trader.yaml +0 -50
  73. package/docs/partner-integration-checklist.md +0 -47
  74. package/docs/python-parity-backlog.md +0 -20
package/dist/index.js CHANGED
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.runnerTradingWalletRequestDigest = exports.RunnerTradingWalletClient = exports.validateRunnerAssessmentResponse = exports.validateRunnerAssessmentNonce = exports.runnerAssessmentNonceMessage = exports.runnerAssessmentRequestDigest = exports.RunnerAssessmentClient = exports.validateRunnerResearchResponse = exports.validateRunnerResearchNonce = exports.runnerResearchNonceMessage = exports.runnerResearchRequestDigest = exports.RunnerResearchClient = exports.RUNNER_RUNTIME_ENTRIES = exports.RUNNER_RUNTIME_MODES = exports.runnerRuntimeStateTuple = exports.parseRunnerRuntimeState = exports.isRunnerRuntimeEntriesState = exports.isRunnerRuntimeModeState = exports.RUNNER_EXIT_CAPABILITIES = exports.RUNNER_KEYSTORE_LOCKS = exports.validateRunnerKeystoreObservation = exports.validateRunnerBrainObservation = exports.validateRunnerRuntimeLeaseReceipt = exports.validateRunnerRuntimeNonce = exports.runnerRuntimeNonceMessage = exports.runnerRuntimeBodyDigest = exports.RunnerRuntimeClient = exports.validateRunnerControlAckResponse = exports.validateRunnerControlPollResponse = exports.validateRunnerControlNonce = exports.validateRunnerControlCommand = exports.runnerControlNonceMessage = exports.runnerControlBodyDigest = exports.runnerControlLocalReceiptId = exports.runnerControlCommandDigest = exports.RunnerControlClient = exports.validateRunnerPairingResponse = exports.validateRunnerPairingReadNonce = exports.validateRunnerPairingBinding = exports.runnerPairingReadMessage = exports.pairingBindingDigest = exports.RunnerPairingClient = exports.TokenStore = exports.SseEventStream = exports.isToolError = exports.parseToolJson = exports.getToolText = exports.connectMcp = exports.BalchemyMcpClient = exports.AgentSdkError = void 0;
4
- exports.RUNNER_CEILING_PROPOSAL_TTL_MS = exports.RUNNER_CEILING_DAILY_MAX_LAMPORTS = exports.RUNNER_CEILING_PER_TRADE_MAX_LAMPORTS = exports.RunnerFirstEnableCeilingClient = exports.validateRunnerFirstEnableReadResponse = exports.validateRunnerFirstEnableChallenge = exports.validateRunnerFirstEnableReadNonce = exports.validateRunnerFirstEnableNonce = exports.runnerFirstEnableReadNonceMessage = exports.runnerFirstEnableNonceMessage = exports.runnerFirstEnableReadRequestDigest = exports.runnerFirstEnableRequestDigest = exports.runnerFirstEnableChallengeCheckCode = exports.RunnerOwnerApprovalClient = exports.runnerFirstEnableApprovalMessage = exports.runnerFirstEnableApprovalStatement = exports.runnerFirstEnableLocalCheckCode = exports.runnerFirstEnableCheckCode = exports.runnerFirstEnableApprovalDigest = exports.runnerFirstEnableFields = exports.RUNNER_OWNER_APPROVAL_CHAIN_IDS = exports.RUNNER_OWNER_APPROVAL_URI_PATH = exports.RUNNER_OWNER_APPROVAL_TTL_MS = exports.RUNNER_OWNER_APPROVAL_PURPOSE = exports.validateRunnerSellAssessmentResponse = exports.validateRunnerSolanaSellAssessment = exports.validateRunnerSellAssessmentNonce = exports.runnerSolanaSellAssessmentDigest = exports.runnerSellAssessmentNonceMessage = exports.runnerSellAssessmentRequestDigest = exports.RUNNER_SELL_MINT_REASONS = exports.RunnerSellAssessmentClient = exports.runnerMinOutAfterPlatformFee = exports.runnerPlatformWsolAccount = exports.validateRunnerExecutionResponse = exports.validateRunnerExecutionNonce = exports.runnerExecutionBuildDigest = exports.runnerExecutionNonceMessage = exports.runnerExecutionRequestDigest = exports.isRunnerDcaRequest = exports.RUNNER_EXIT_MAX_ENTRY_BUILDS = exports.RUNNER_EXIT_TRIGGERS = exports.RUNNER_EXECUTION_REFUSALS = exports.RunnerExecutionBuildClient = exports.validateRunnerTradingWalletBindResponse = exports.validateRunnerTradingWalletBinding = exports.validateRunnerTradingWalletNonce = exports.runnerTradingWalletBindingDigest = exports.runnerTradingWalletPossessionMessage = exports.runnerTradingWalletNonceMessage = void 0;
5
- exports.RUNNER_DECISION_HOLD_REASONS = exports.RUNNER_DECISION_ACTIONS = exports.RunnerDecisionReportClient = exports.validateRunnerSignal = exports.validateRunnerSignalsResponse = exports.validateRunnerSignalsNonce = exports.runnerSignalsNonceMessage = exports.runnerSignalEventDigest = exports.runnerSignalsRequestDigest = exports.RunnerSignalsClient = exports.RUNNER_LAUNCHPAD_ID = exports.RUNNER_LAUNCHPAD_MAX_SUBSCRIPTIONS = exports.RUNNER_LAUNCHPAD_REFUSALS = exports.RUNNER_LAUNCHPAD_STATUSES = exports.validateRunnerLaunchpadSubscriptionsResponse = exports.validateRunnerLaunchpadSubscriptionsNonce = exports.runnerLaunchpadSubscriptionsNonceMessage = exports.runnerLaunchpadSubscriptionsRequestDigest = exports.RunnerLaunchpadSubscriptionsClient = exports.canonicalRunnerLaunchpadIds = exports.validateRunnerLaunchpadCatalog = exports.fetchRunnerLaunchpadCatalog = exports.RUNNER_SIGNAL_PLATFORMS = exports.validateRunnerExecutionStatusResponse = exports.validateRunnerExecutionSubmitResponse = exports.validateRunnerExecutionStatusNonce = exports.validateRunnerExecutionSubmitNonce = exports.runnerExecutionStatusNonceMessage = exports.runnerExecutionSubmitNonceMessage = exports.runnerExecutionStatusRequestDigest = exports.runnerExecutionSubmitRequestDigest = exports.runnerSignedTransactionSignature = exports.runnerReservationSettlement = exports.RUNNER_LOCAL_SWAP_REASONS = exports.RUNNER_LOCAL_SWAP_OBSERVED_STATES = exports.RUNNER_LOCAL_SWAP_ORDER_STATUS = exports.RUNNER_LOCAL_SWAP_UNJOURNALED_STATES = exports.RUNNER_LOCAL_SWAP_STATES = exports.RUNNER_EXECUTION_STATUS_REFUSALS = exports.RUNNER_EXECUTION_SUBMIT_REFUSALS = exports.RunnerExecutionSubmitClient = exports.validateRunnerOwnerPositionsResponse = exports.RUNNER_OWNER_POSITIONS_MAX = exports.RUNNER_POSITION_NOTICES = exports.RUNNER_POSITION_HELD_REASONS = exports.validateRunnerCeilingReadResponse = exports.validateRunnerCeilingProposal = exports.validateRunnerCeilingReadNonce = exports.runnerCeilingReadNonceMessage = exports.runnerCeilingReadRequestDigest = void 0;
6
- exports.BalchemyClient = exports.BalchemyAgentSdk = exports.AgentLoop = exports.isLlmModelId = exports.createLocalLlmAdapter = exports.validateRunnerRpcAccessGrant = exports.validateRunnerRpcAccessNonce = exports.runnerRpcAccessNonceMessage = exports.runnerRpcAccessRequestDigest = exports.RUNNER_RPC_ACCESS_UNAVAILABLE = exports.RUNNER_RPC_ACCESS_PROVIDERS = exports.RunnerRpcAccessClient = exports.validateRunnerDecisionReportReceipt = exports.validateRunnerDecisionReportNonce = exports.validateRunnerDecisionReport = exports.runnerDecisionReportNonceMessage = exports.runnerDecisionReportRequestDigest = exports.RUNNER_DECISION_REPORT_RECEIPT_SKEW_MS = exports.RUNNER_DECISION_REPORT_LEASE_CONFLICT = exports.RUNNER_DECISION_REPORT_CONFLICT = void 0;
7
- exports.agentReadinessReport = agentReadinessReport;
8
- exports.agentContextSnapshot = agentContextSnapshot;
9
- exports.agentMarketBrief = agentMarketBrief;
10
- exports.agentCandidateReport = agentCandidateReport;
11
- exports.agentRiskReport = agentRiskReport;
12
- const http_client_1 = require("./client/http-client");
13
- const onboarding_1 = require("./auth/onboarding");
14
- const mcp_client_1 = require("./mcp/mcp-client");
3
+ exports.RunnerExecutionBuildClient = exports.validateRunnerTradingWalletBindResponse = exports.validateRunnerTradingWalletBinding = exports.validateRunnerTradingWalletNonce = exports.runnerTradingWalletBindingDigest = exports.runnerTradingWalletPossessionMessage = exports.runnerTradingWalletNonceMessage = exports.runnerTradingWalletRequestDigest = exports.RunnerTradingWalletClient = exports.validateRunnerAssessmentResponse = exports.validateRunnerAssessmentNonce = exports.runnerAssessmentNonceMessage = exports.runnerAssessmentRequestDigest = exports.RunnerAssessmentClient = exports.validateRunnerResearchResponse = exports.validateRunnerResearchNonce = exports.runnerResearchNonceMessage = exports.runnerResearchRequestDigest = exports.RunnerResearchClient = exports.RUNNER_RUNTIME_ENTRIES = exports.RUNNER_RUNTIME_MODES = exports.runnerRuntimeStateTuple = exports.parseRunnerRuntimeState = exports.isRunnerRuntimeEntriesState = exports.isRunnerRuntimeModeState = exports.RUNNER_EXIT_CAPABILITIES = exports.RUNNER_KEYSTORE_LOCKS = exports.validateRunnerKeystoreObservation = exports.validateRunnerBrainObservation = exports.validateRunnerRuntimeLeaseReceipt = exports.validateRunnerRuntimeNonce = exports.runnerRuntimeNonceMessage = exports.runnerRuntimeBodyDigest = exports.RunnerRuntimeClient = exports.validateRunnerControlAckResponse = exports.validateRunnerControlPollResponse = exports.validateRunnerControlNonce = exports.validateRunnerControlCommand = exports.runnerControlNonceMessage = exports.runnerControlBodyDigest = exports.runnerControlLocalReceiptId = exports.runnerControlCommandDigest = exports.RunnerControlClient = exports.validateRunnerPairingResponse = exports.validateRunnerPairingReadNonce = exports.validateRunnerPairingBinding = exports.runnerPairingReadMessage = exports.pairingBindingDigest = exports.RunnerPairingClient = exports.AgentSdkError = void 0;
4
+ exports.RUNNER_POSITION_NOTICES = exports.RUNNER_POSITION_HELD_REASONS = exports.validateRunnerCeilingReadResponse = exports.validateRunnerCeilingProposal = exports.validateRunnerCeilingReadNonce = exports.runnerCeilingReadNonceMessage = exports.runnerCeilingReadRequestDigest = exports.RUNNER_CEILING_PROPOSAL_TTL_MS = exports.RUNNER_CEILING_DAILY_MAX_LAMPORTS = exports.RUNNER_CEILING_PER_TRADE_MAX_LAMPORTS = exports.RunnerFirstEnableCeilingClient = exports.validateRunnerFirstEnableReadResponse = exports.validateRunnerFirstEnableChallenge = exports.validateRunnerFirstEnableReadNonce = exports.validateRunnerFirstEnableNonce = exports.runnerFirstEnableReadNonceMessage = exports.runnerFirstEnableNonceMessage = exports.runnerFirstEnableReadRequestDigest = exports.runnerFirstEnableRequestDigest = exports.runnerFirstEnableChallengeCheckCode = exports.RunnerOwnerApprovalClient = exports.runnerFirstEnableApprovalMessage = exports.runnerFirstEnableApprovalStatement = exports.runnerFirstEnableLocalCheckCode = exports.runnerFirstEnableCheckCode = exports.runnerFirstEnableApprovalDigest = exports.runnerFirstEnableFields = exports.RUNNER_OWNER_APPROVAL_CHAIN_IDS = exports.RUNNER_OWNER_APPROVAL_URI_PATH = exports.RUNNER_OWNER_APPROVAL_TTL_MS = exports.RUNNER_OWNER_APPROVAL_PURPOSE = exports.validateRunnerSellAssessmentResponse = exports.validateRunnerSolanaSellAssessment = exports.validateRunnerSellAssessmentNonce = exports.runnerSolanaSellAssessmentDigest = exports.runnerSellAssessmentNonceMessage = exports.runnerSellAssessmentRequestDigest = exports.RUNNER_SELL_MINT_REASONS = exports.RunnerSellAssessmentClient = exports.runnerMinOutAfterPlatformFee = exports.runnerPlatformWsolAccount = exports.validateRunnerExecutionResponse = exports.validateRunnerExecutionNonce = exports.runnerExecutionBuildDigest = exports.runnerExecutionNonceMessage = exports.runnerExecutionRequestDigest = exports.isRunnerDcaRequest = exports.RUNNER_EXIT_MAX_ENTRY_BUILDS = exports.RUNNER_EXIT_TRIGGERS = exports.RUNNER_EXECUTION_REFUSALS = void 0;
5
+ exports.validateRunnerDecisionReportNonce = exports.validateRunnerDecisionReport = exports.runnerDecisionReportNonceMessage = exports.runnerDecisionReportRequestDigest = exports.RUNNER_DECISION_REPORT_RECEIPT_SKEW_MS = exports.RUNNER_DECISION_REPORT_LEASE_CONFLICT = exports.RUNNER_DECISION_REPORT_CONFLICT = exports.RUNNER_DECISION_HOLD_REASONS = exports.RUNNER_DECISION_ACTIONS = exports.RunnerDecisionReportClient = exports.validateRunnerSignal = exports.validateRunnerSignalsResponse = exports.validateRunnerSignalsNonce = exports.runnerSignalsNonceMessage = exports.runnerSignalEventDigest = exports.runnerSignalsRequestDigest = exports.RunnerSignalsClient = exports.RUNNER_LAUNCHPAD_ID = exports.RUNNER_LAUNCHPAD_MAX_SUBSCRIPTIONS = exports.RUNNER_LAUNCHPAD_REFUSALS = exports.RUNNER_LAUNCHPAD_STATUSES = exports.validateRunnerLaunchpadSubscriptionsResponse = exports.validateRunnerLaunchpadSubscriptionsNonce = exports.runnerLaunchpadSubscriptionsNonceMessage = exports.runnerLaunchpadSubscriptionsRequestDigest = exports.RunnerLaunchpadSubscriptionsClient = exports.canonicalRunnerLaunchpadIds = exports.validateRunnerLaunchpadCatalog = exports.fetchRunnerLaunchpadCatalog = exports.RUNNER_SIGNAL_PLATFORMS = exports.validateRunnerExecutionStatusResponse = exports.validateRunnerExecutionSubmitResponse = exports.validateRunnerExecutionStatusNonce = exports.validateRunnerExecutionSubmitNonce = exports.runnerExecutionStatusNonceMessage = exports.runnerExecutionSubmitNonceMessage = exports.runnerExecutionStatusRequestDigest = exports.runnerExecutionSubmitRequestDigest = exports.runnerSignedTransactionSignature = exports.runnerReservationSettlement = exports.RUNNER_LOCAL_SWAP_REASONS = exports.RUNNER_LOCAL_SWAP_OBSERVED_STATES = exports.RUNNER_LOCAL_SWAP_ORDER_STATUS = exports.RUNNER_LOCAL_SWAP_UNJOURNALED_STATES = exports.RUNNER_LOCAL_SWAP_STATES = exports.RUNNER_EXECUTION_STATUS_REFUSALS = exports.RUNNER_EXECUTION_SUBMIT_REFUSALS = exports.RunnerExecutionSubmitClient = exports.validateRunnerOwnerPositionsResponse = exports.RUNNER_OWNER_POSITIONS_MAX = void 0;
6
+ exports.isLlmModelId = exports.createLocalLlmAdapter = exports.validateRunnerRpcAccessGrant = exports.validateRunnerRpcAccessNonce = exports.runnerRpcAccessNonceMessage = exports.runnerRpcAccessRequestDigest = exports.RUNNER_RPC_ACCESS_UNAVAILABLE = exports.RUNNER_RPC_ACCESS_PROVIDERS = exports.RunnerRpcAccessClient = exports.validateRunnerDecisionReportReceipt = void 0;
15
7
  var agent_sdk_error_1 = require("./errors/agent-sdk-error");
16
8
  Object.defineProperty(exports, "AgentSdkError", { enumerable: true, get: function () { return agent_sdk_error_1.AgentSdkError; } });
17
- var mcp_client_2 = require("./mcp/mcp-client");
18
- Object.defineProperty(exports, "BalchemyMcpClient", { enumerable: true, get: function () { return mcp_client_2.BalchemyMcpClient; } });
19
- Object.defineProperty(exports, "connectMcp", { enumerable: true, get: function () { return mcp_client_2.connectMcp; } });
20
- Object.defineProperty(exports, "getToolText", { enumerable: true, get: function () { return mcp_client_2.getToolText; } });
21
- Object.defineProperty(exports, "parseToolJson", { enumerable: true, get: function () { return mcp_client_2.parseToolJson; } });
22
- Object.defineProperty(exports, "isToolError", { enumerable: true, get: function () { return mcp_client_2.isToolError; } });
23
- var sse_event_stream_1 = require("./streaming/sse-event-stream");
24
- Object.defineProperty(exports, "SseEventStream", { enumerable: true, get: function () { return sse_event_stream_1.SseEventStream; } });
25
- var token_store_1 = require("./auth/token-store");
26
- Object.defineProperty(exports, "TokenStore", { enumerable: true, get: function () { return token_store_1.TokenStore; } });
27
9
  var pairing_client_1 = require("./local-runner/pairing-client");
28
10
  Object.defineProperty(exports, "RunnerPairingClient", { enumerable: true, get: function () { return pairing_client_1.RunnerPairingClient; } });
29
11
  Object.defineProperty(exports, "pairingBindingDigest", { enumerable: true, get: function () { return pairing_client_1.pairingBindingDigest; } });
@@ -200,58 +182,9 @@ Object.defineProperty(exports, "runnerRpcAccessRequestDigest", { enumerable: tru
200
182
  Object.defineProperty(exports, "runnerRpcAccessNonceMessage", { enumerable: true, get: function () { return rpc_access_client_1.runnerRpcAccessNonceMessage; } });
201
183
  Object.defineProperty(exports, "validateRunnerRpcAccessNonce", { enumerable: true, get: function () { return rpc_access_client_1.validateRunnerRpcAccessNonce; } });
202
184
  Object.defineProperty(exports, "validateRunnerRpcAccessGrant", { enumerable: true, get: function () { return rpc_access_client_1.validateRunnerRpcAccessGrant; } });
203
- // Agent Loop
185
+ // Local LLM adapters
204
186
  var llm_client_1 = require("./local-runner/llm-client");
205
187
  Object.defineProperty(exports, "createLocalLlmAdapter", { enumerable: true, get: function () { return llm_client_1.createLocalLlmAdapter; } });
206
188
  var model_id_1 = require("./agent-loop/llm-adapters/model-id");
207
189
  Object.defineProperty(exports, "isLlmModelId", { enumerable: true, get: function () { return model_id_1.isLlmModelId; } });
208
- var agent_loop_1 = require("./agent-loop/agent-loop");
209
- Object.defineProperty(exports, "AgentLoop", { enumerable: true, get: function () { return agent_loop_1.AgentLoop; } });
210
- function agentReadinessReport(client, args = {}) {
211
- return client.agentReadinessReport(args);
212
- }
213
- function agentContextSnapshot(client, args = {}) {
214
- return client.agentContextSnapshot(args);
215
- }
216
- function agentMarketBrief(client, args = {}) {
217
- return client.agentMarketBrief(args);
218
- }
219
- function agentCandidateReport(client, args) {
220
- return client.agentCandidateReport(args);
221
- }
222
- function agentRiskReport(client, args) {
223
- return client.agentRiskReport(args);
224
- }
225
- class BalchemyAgentSdk {
226
- onboarding;
227
- constructor(config) {
228
- const timeoutMs = config.timeoutMs ?? 15_000;
229
- const http = new http_client_1.HttpClient({
230
- baseUrl: config.apiBaseUrl,
231
- timeoutMs,
232
- fetchFn: config.fetchFn,
233
- });
234
- this.onboarding = new onboarding_1.AgentOnboardingClient(http);
235
- }
236
- async requestSiweNonce(input) {
237
- return this.onboarding.requestSiweNonce(input);
238
- }
239
- async onboardWithSiwe(input) {
240
- return this.onboarding.onboardWithSiwe(input);
241
- }
242
- async onboardWithIdentity(input) {
243
- return this.onboarding.onboardWithIdentity(input);
244
- }
245
- async revokeIdentityToken(input) {
246
- return this.onboarding.revokeIdentityToken(input);
247
- }
248
- async getIdentityTokenRevokeStatus(input) {
249
- return this.onboarding.getIdentityTokenRevokeStatus(input);
250
- }
251
- connectMcp(params) {
252
- return (0, mcp_client_1.connectMcp)(params);
253
- }
254
- }
255
- exports.BalchemyAgentSdk = BalchemyAgentSdk;
256
- exports.BalchemyClient = BalchemyAgentSdk;
257
190
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAiIA,oDAKC;AAED,oDAKC;AAED,4CAKC;AAED,oDAKC;AAED,0CAKC;AAlKD,sDAAkD;AAClD,kDAA0D;AAC1D,iDAAiE;AAyCjE,4DAAyD;AAAhD,gHAAA,aAAa,OAAA;AACtB,+CAA0G;AAAjG,+GAAA,iBA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sC,OAAA;AAAE,2IAAA,iCAAiC,OAAA;AAAE,0IAAA,gCAAgC,OAAA;AAAE,sIAAA,4BAA4B,OAAA;AAAE,2IAAA,iCAAiC,OAAA;AAAE,6IAAA,mCAAmC,OAAA;AAErX,sEAA4P;AAAnP,0HAAA,qBAAqB,OAAA;AAAE,gIAAA,2BAA2B,OAAA;AAAE,kIAAA,6BAA6B,OAAA;AAAE,iIAAA,4BAA4B,OAAA;AAAE,gIAAA,2BAA2B,OAAA;AAAE,iIAAA,4BAA4B,OAAA;AAAE,iIAAA,4BAA4B,OAAA;AAGjN,qBAAqB;AACrB,wDAAkE;AAAzD,mHAAA,qBAAqB,OAAA;AAE9B,+DAAkE;AAAzD,wGAAA,YAAY,OAAA"}
@@ -2,12 +2,12 @@
2
2
 
3
3
  ## Error Classes
4
4
 
5
- - `auth_error`: JWT/identity mismatch, unauthorized onboarding.
5
+ - `auth_error`: signature or proof mismatch, unauthorized runner request.
6
6
  - `policy_error`: guardrail rejection, invalid payload, unsupported mode/provider.
7
7
  - `rate_limit_error`: endpoint throttling.
8
8
  - `provider_auth_error`: upstream provider verify authorization failure.
9
9
  - `network_error`: timeout, DNS, transport errors.
10
- - `execution_error`: MCP call returned JSON-RPC error.
10
+ - `execution_error`: the service returned a structured execution error.
11
11
  - `invalid_response`: malformed payload.
12
12
  - `unknown_error`: fallback.
13
13
 
@@ -16,9 +16,9 @@
16
16
  Classified read operations use at most three attempts within a total deadline
17
17
  (15 seconds by default). Backoff starts at 200 ms with jitter, respects
18
18
  `Retry-After`, and must fit within the remaining deadline. The SDK validates
19
- runtime tool metadata before treating a tool call as read-only.
19
+ operation classification before treating a call as read-only.
20
20
 
21
- Protected tool calls and onboarding mutations always use one attempt. An
21
+ Protected calls and mutations always use one attempt. An
22
22
  idempotency key does not authorize automatic replay. A network error, timeout,
23
23
  malformed response, or unavailable terminal evidence after a mutation can mean
24
24
  the outcome is unknown. Preserve the operation's idempotency key and reconcile
@@ -14,7 +14,7 @@
14
14
  ## Publish Gates
15
15
 
16
16
  1. Typecheck passes.
17
- 2. Onboarding smoke examples updated.
17
+ 2. Runner client examples and README updated.
18
18
  3. Changelog entry added.
19
19
  4. Backward compatibility review complete for public exports.
20
20
  5. Package build output resolves every exported path and CLI bin.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@balchemyai/agent-sdk",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
- "description": "Balchemy external AI agent onboarding and MCP client SDK",
6
+ "description": "Balchemy local runner SDK: signed runner clients and local LLM adapters",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
9
  "exports": {
@@ -22,16 +22,12 @@
22
22
  ],
23
23
  "keywords": [
24
24
  "balchemy",
25
- "mcp",
26
- "model-context-protocol",
27
25
  "ai-agent",
28
- "erc8004",
29
26
  "solana",
30
27
  "evm",
31
28
  "base",
32
29
  "crypto",
33
30
  "trading",
34
- "onboarding",
35
31
  "defi",
36
32
  "wallet",
37
33
  "typescript"
@@ -1,77 +0,0 @@
1
- import type { AgentLoopConfig, AgentStatus } from './types';
2
- export declare class AgentLoop {
3
- private readonly config;
4
- private readonly sseEndpoint;
5
- private readonly costTracker;
6
- private readonly llm;
7
- private readonly decisionHandler;
8
- private readonly mcp;
9
- private readonly modelRouter;
10
- private readonly telemetry;
11
- private webhookReceiver;
12
- private sseStream;
13
- private unsubscribeSse;
14
- private status;
15
- private startedAt;
16
- private eventsReceived;
17
- private eventsDropped;
18
- private decisionsExecuted;
19
- private tradesExecuted;
20
- private lastEventAt;
21
- private lastTradeAt;
22
- private readonly seenTraceIds;
23
- private readonly pendingEvents;
24
- private drainPromise;
25
- private processingHalted;
26
- private lifecycleGeneration;
27
- private portfolioCache;
28
- private rulesCache;
29
- /** Client-side behavior rule limits for pre-check enforcement. */
30
- /** Trades executed in the current clock-hour (reset each hour). */
31
- private tradesThisHour;
32
- /** Timestamp (ms) of the hour boundary when tradesThisHour was last reset. */
33
- private currentHourStart;
34
- /** publicId extracted from the MCP endpoint path (last path segment). */
35
- private readonly publicId;
36
- private readonly sessionId;
37
- private readonly userMessageIdempotencyNamespace;
38
- private userMessageSequence;
39
- private readonly maxPendingEvents;
40
- private readonly maxEventAgeMs;
41
- private readonly maxEvidenceAgeMs;
42
- constructor(config: AgentLoopConfig);
43
- start(): Promise<void>;
44
- stop(): Promise<void>;
45
- getStatus(): AgentStatus;
46
- /**
47
- * Send a user message to the bot via the ask_bot MCP tool.
48
- * Parses the JSON envelope returned by the server and extracts the `reply`
49
- * field if present; otherwise returns the raw text.
50
- * On network / tool error, calls `config.onError` and returns an error string.
51
- */
52
- sendMessage(message: string): Promise<string>;
53
- private handleEvent;
54
- private processEvent;
55
- /**
56
- * Fetch exposed runtime status via `agent_status`.
57
- * Result is cached for 30 seconds. On failure, returns an empty snapshot
58
- * so the decision loop continues with degraded context.
59
- */
60
- private fetchPortfolio;
61
- /** Fetch an exact immutable behavior-rule revision binding. Failures are cached
62
- * briefly and return null so neither decisions nor submissions proceed unbound. */
63
- private fetchBehaviorRules;
64
- /**
65
- * Reset the hourly trade counter when the clock rolls to a new hour.
66
- * Uses truncated-hour comparison so the counter resets on exact hour boundaries.
67
- */
68
- private resetHourlyCounterIfNeeded;
69
- private createLlmAdapter;
70
- private startDrain;
71
- private drainEvents;
72
- private isGenerationCurrent;
73
- private awaitCurrentDrain;
74
- private notifyError;
75
- private notifyStatus;
76
- }
77
- //# sourceMappingURL=agent-loop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-loop.d.ts","sourceRoot":"","sources":["../../src/agent-loop/agent-loop.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAMZ,MAAM,SAAS,CAAC;AAkoBjB,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CA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