@nookplot/runtime 0.5.131 → 0.5.132
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/dist/__tests__/apiMarketplace.test.d.ts +2 -0
- package/dist/__tests__/apiMarketplace.test.d.ts.map +1 -0
- package/dist/__tests__/apiMarketplace.test.js +102 -0
- package/dist/__tests__/apiMarketplace.test.js.map +1 -0
- package/dist/__tests__/autonomous.actionDispatch.test.d.ts +2 -0
- package/dist/__tests__/autonomous.actionDispatch.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.actionDispatch.test.js +287 -0
- package/dist/__tests__/autonomous.actionDispatch.test.js.map +1 -0
- package/dist/__tests__/autonomous.dedup.test.d.ts +2 -0
- package/dist/__tests__/autonomous.dedup.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.dedup.test.js +125 -0
- package/dist/__tests__/autonomous.dedup.test.js.map +1 -0
- package/dist/__tests__/autonomous.doomLoop.test.d.ts +2 -0
- package/dist/__tests__/autonomous.doomLoop.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.doomLoop.test.js +126 -0
- package/dist/__tests__/autonomous.doomLoop.test.js.map +1 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.d.ts +2 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.js +233 -0
- package/dist/__tests__/autonomous.getAvailableActions.test.js.map +1 -0
- package/dist/__tests__/autonomous.guardrails.test.d.ts +2 -0
- package/dist/__tests__/autonomous.guardrails.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.guardrails.test.js +215 -0
- package/dist/__tests__/autonomous.guardrails.test.js.map +1 -0
- package/dist/__tests__/autonomous.hooks.test.d.ts +2 -0
- package/dist/__tests__/autonomous.hooks.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.hooks.test.js +107 -0
- package/dist/__tests__/autonomous.hooks.test.js.map +1 -0
- package/dist/__tests__/autonomous.latentSpace.test.d.ts +2 -0
- package/dist/__tests__/autonomous.latentSpace.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.latentSpace.test.js +224 -0
- package/dist/__tests__/autonomous.latentSpace.test.js.map +1 -0
- package/dist/__tests__/autonomous.lifecycle.test.d.ts +2 -0
- package/dist/__tests__/autonomous.lifecycle.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.lifecycle.test.js +147 -0
- package/dist/__tests__/autonomous.lifecycle.test.js.map +1 -0
- package/dist/__tests__/autonomous.loadedSkillRefs.test.d.ts +2 -0
- package/dist/__tests__/autonomous.loadedSkillRefs.test.d.ts.map +1 -0
- package/dist/__tests__/autonomous.loadedSkillRefs.test.js +150 -0
- package/dist/__tests__/autonomous.loadedSkillRefs.test.js.map +1 -0
- package/dist/__tests__/chatEngine.episodicHook.test.d.ts +2 -0
- package/dist/__tests__/chatEngine.episodicHook.test.d.ts.map +1 -0
- package/dist/__tests__/chatEngine.episodicHook.test.js +160 -0
- package/dist/__tests__/chatEngine.episodicHook.test.js.map +1 -0
- package/dist/__tests__/chatEngine.test.d.ts +2 -0
- package/dist/__tests__/chatEngine.test.d.ts.map +1 -0
- package/dist/__tests__/chatEngine.test.js +482 -0
- package/dist/__tests__/chatEngine.test.js.map +1 -0
- package/dist/__tests__/codegen-drift.test.d.ts +23 -0
- package/dist/__tests__/codegen-drift.test.d.ts.map +1 -0
- package/dist/__tests__/codegen-drift.test.js +185 -0
- package/dist/__tests__/codegen-drift.test.js.map +1 -0
- package/dist/__tests__/contentSafety.test.d.ts +2 -0
- package/dist/__tests__/contentSafety.test.d.ts.map +1 -0
- package/dist/__tests__/contentSafety.test.js +90 -0
- package/dist/__tests__/contentSafety.test.js.map +1 -0
- package/dist/__tests__/conversation/compactionMemory.test.d.ts +2 -0
- package/dist/__tests__/conversation/compactionMemory.test.d.ts.map +1 -0
- package/dist/__tests__/conversation/compactionMemory.test.js +447 -0
- package/dist/__tests__/conversation/compactionMemory.test.js.map +1 -0
- package/dist/__tests__/conversation/modelThresholdsParity.test.d.ts +2 -0
- package/dist/__tests__/conversation/modelThresholdsParity.test.d.ts.map +1 -0
- package/dist/__tests__/conversation/modelThresholdsParity.test.js +79 -0
- package/dist/__tests__/conversation/modelThresholdsParity.test.js.map +1 -0
- package/dist/__tests__/doomLoop.test.d.ts +6 -0
- package/dist/__tests__/doomLoop.test.d.ts.map +1 -0
- package/dist/__tests__/doomLoop.test.js +144 -0
- package/dist/__tests__/doomLoop.test.js.map +1 -0
- package/dist/__tests__/guardrails.test.d.ts +2 -0
- package/dist/__tests__/guardrails.test.d.ts.map +1 -0
- package/dist/__tests__/guardrails.test.js +236 -0
- package/dist/__tests__/guardrails.test.js.map +1 -0
- package/dist/__tests__/helpers/mockRuntime.d.ts +11 -0
- package/dist/__tests__/helpers/mockRuntime.d.ts.map +1 -0
- package/dist/__tests__/helpers/mockRuntime.js +146 -0
- package/dist/__tests__/helpers/mockRuntime.js.map +1 -0
- package/dist/__tests__/hooks.test.d.ts +9 -0
- package/dist/__tests__/hooks.test.d.ts.map +1 -0
- package/dist/__tests__/hooks.test.js +192 -0
- package/dist/__tests__/hooks.test.js.map +1 -0
- package/dist/__tests__/manifestActivationHook.test.d.ts +2 -0
- package/dist/__tests__/manifestActivationHook.test.d.ts.map +1 -0
- package/dist/__tests__/manifestActivationHook.test.js +312 -0
- package/dist/__tests__/manifestActivationHook.test.js.map +1 -0
- package/dist/__tests__/memory.test.d.ts +2 -0
- package/dist/__tests__/memory.test.d.ts.map +1 -0
- package/dist/__tests__/memory.test.js +192 -0
- package/dist/__tests__/memory.test.js.map +1 -0
- package/dist/__tests__/onChainActions.parity.test.d.ts +12 -0
- package/dist/__tests__/onChainActions.parity.test.d.ts.map +1 -0
- package/dist/__tests__/onChainActions.parity.test.js +104 -0
- package/dist/__tests__/onChainActions.parity.test.js.map +1 -0
- package/dist/__tests__/querySegmentation.test.d.ts +2 -0
- package/dist/__tests__/querySegmentation.test.d.ts.map +1 -0
- package/dist/__tests__/querySegmentation.test.js +187 -0
- package/dist/__tests__/querySegmentation.test.js.map +1 -0
- package/dist/__tests__/sandbox.test.d.ts +13 -0
- package/dist/__tests__/sandbox.test.d.ts.map +1 -0
- package/dist/__tests__/sandbox.test.js +413 -0
- package/dist/__tests__/sandbox.test.js.map +1 -0
- package/dist/__tests__/signing.test.d.ts +2 -0
- package/dist/__tests__/signing.test.d.ts.map +1 -0
- package/dist/__tests__/signing.test.js +260 -0
- package/dist/__tests__/signing.test.js.map +1 -0
- package/dist/__tests__/wakeUpStack.test.d.ts +2 -0
- package/dist/__tests__/wakeUpStack.test.d.ts.map +1 -0
- package/dist/__tests__/wakeUpStack.test.js +239 -0
- package/dist/__tests__/wakeUpStack.test.js.map +1 -0
- package/dist/actionCatalog.d.ts +57 -0
- package/dist/actionCatalog.d.ts.map +1 -0
- package/dist/actionCatalog.generated.d.ts +4 -0
- package/dist/actionCatalog.generated.d.ts.map +1 -0
- package/dist/actionCatalog.generated.js +2194 -0
- package/dist/actionCatalog.generated.js.map +1 -0
- package/dist/actionCatalog.js +214 -0
- package/dist/actionCatalog.js.map +1 -0
- package/dist/api-marketplace.d.ts +111 -0
- package/dist/api-marketplace.d.ts.map +1 -0
- package/dist/api-marketplace.js +154 -0
- package/dist/api-marketplace.js.map +1 -0
- package/dist/artifactEmbeddings.d.ts +69 -0
- package/dist/artifactEmbeddings.d.ts.map +1 -0
- package/dist/artifactEmbeddings.js +52 -0
- package/dist/artifactEmbeddings.js.map +1 -0
- package/dist/autonomous.d.ts +271 -0
- package/dist/autonomous.d.ts.map +1 -0
- package/dist/autonomous.js +3517 -0
- package/dist/autonomous.js.map +1 -0
- package/dist/bounties.d.ts +112 -0
- package/dist/bounties.d.ts.map +1 -0
- package/dist/bounties.js +140 -0
- package/dist/bounties.js.map +1 -0
- package/dist/bundles.d.ts +174 -0
- package/dist/bundles.d.ts.map +1 -0
- package/dist/bundles.js +208 -0
- package/dist/bundles.js.map +1 -0
- package/dist/channels.d.ts +131 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +227 -0
- package/dist/channels.js.map +1 -0
- package/dist/chat/chatEngine.d.ts +138 -0
- package/dist/chat/chatEngine.d.ts.map +1 -0
- package/dist/chat/chatEngine.js +613 -0
- package/dist/chat/chatEngine.js.map +1 -0
- package/dist/chat/index.d.ts +30 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +29 -0
- package/dist/chat/index.js.map +1 -0
- package/dist/chat/terminal.d.ts +19 -0
- package/dist/chat/terminal.d.ts.map +1 -0
- package/dist/chat/terminal.js +17 -0
- package/dist/chat/terminal.js.map +1 -0
- package/dist/chat/terminals/discordTerminal.d.ts +22 -0
- package/dist/chat/terminals/discordTerminal.d.ts.map +1 -0
- package/dist/chat/terminals/discordTerminal.js +132 -0
- package/dist/chat/terminals/discordTerminal.js.map +1 -0
- package/dist/chat/terminals/openclawTerminal.d.ts +43 -0
- package/dist/chat/terminals/openclawTerminal.d.ts.map +1 -0
- package/dist/chat/terminals/openclawTerminal.js +186 -0
- package/dist/chat/terminals/openclawTerminal.js.map +1 -0
- package/dist/chat/terminals/stdinTerminal.d.ts +18 -0
- package/dist/chat/terminals/stdinTerminal.d.ts.map +1 -0
- package/dist/chat/terminals/stdinTerminal.js +58 -0
- package/dist/chat/terminals/stdinTerminal.js.map +1 -0
- package/dist/chat/terminals/telegramTerminal.d.ts +27 -0
- package/dist/chat/terminals/telegramTerminal.d.ts.map +1 -0
- package/dist/chat/terminals/telegramTerminal.js +123 -0
- package/dist/chat/terminals/telegramTerminal.js.map +1 -0
- package/dist/cognitiveWorkspace.d.ts +107 -0
- package/dist/cognitiveWorkspace.d.ts.map +1 -0
- package/dist/cognitiveWorkspace.js +94 -0
- package/dist/cognitiveWorkspace.js.map +1 -0
- package/dist/communities.d.ts +40 -0
- package/dist/communities.d.ts.map +1 -0
- package/dist/communities.js +53 -0
- package/dist/communities.js.map +1 -0
- package/dist/connection.d.ts +90 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +429 -0
- package/dist/connection.js.map +1 -0
- package/dist/contentSafety.d.ts +64 -0
- package/dist/contentSafety.d.ts.map +1 -0
- package/dist/contentSafety.js +119 -0
- package/dist/contentSafety.js.map +1 -0
- package/dist/conversation/compactionMemory.d.ts +124 -0
- package/dist/conversation/compactionMemory.d.ts.map +1 -0
- package/dist/conversation/compactionMemory.js +379 -0
- package/dist/conversation/compactionMemory.js.map +1 -0
- package/dist/conversation/conversationLogStore.d.ts +111 -0
- package/dist/conversation/conversationLogStore.d.ts.map +1 -0
- package/dist/conversation/conversationLogStore.js +248 -0
- package/dist/conversation/conversationLogStore.js.map +1 -0
- package/dist/conversation/conversationMemory.d.ts +59 -0
- package/dist/conversation/conversationMemory.d.ts.map +1 -0
- package/dist/conversation/conversationMemory.js +32 -0
- package/dist/conversation/conversationMemory.js.map +1 -0
- package/dist/conversation/index.d.ts +16 -0
- package/dist/conversation/index.d.ts.map +1 -0
- package/dist/conversation/index.js +5 -0
- package/dist/conversation/index.js.map +1 -0
- package/dist/conversation/modelLimits.d.ts +43 -0
- package/dist/conversation/modelLimits.d.ts.map +1 -0
- package/dist/conversation/modelLimits.js +67 -0
- package/dist/conversation/modelLimits.js.map +1 -0
- package/dist/cro.d.ts +243 -0
- package/dist/cro.d.ts.map +1 -0
- package/dist/cro.js +263 -0
- package/dist/cro.js.map +1 -0
- package/dist/defaultGuardrails.d.ts +21 -0
- package/dist/defaultGuardrails.d.ts.map +1 -0
- package/dist/defaultGuardrails.js +90 -0
- package/dist/defaultGuardrails.js.map +1 -0
- package/dist/delegations.d.ts +63 -0
- package/dist/delegations.d.ts.map +1 -0
- package/dist/delegations.js +41 -0
- package/dist/delegations.js.map +1 -0
- package/dist/discovery.d.ts +172 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +300 -0
- package/dist/discovery.js.map +1 -0
- package/dist/doomLoop.d.ts +52 -0
- package/dist/doomLoop.d.ts.map +1 -0
- package/dist/doomLoop.js +173 -0
- package/dist/doomLoop.js.map +1 -0
- package/dist/economy.d.ts +244 -0
- package/dist/economy.d.ts.map +1 -0
- package/dist/economy.js +263 -0
- package/dist/economy.js.map +1 -0
- package/dist/email.d.ts +125 -0
- package/dist/email.d.ts.map +1 -0
- package/dist/email.js +91 -0
- package/dist/email.js.map +1 -0
- package/dist/embeddingExchange.d.ts +141 -0
- package/dist/embeddingExchange.d.ts.map +1 -0
- package/dist/embeddingExchange.js +95 -0
- package/dist/embeddingExchange.js.map +1 -0
- package/dist/episodicMemoryHook.d.ts +39 -0
- package/dist/episodicMemoryHook.d.ts.map +1 -0
- package/dist/episodicMemoryHook.js +58 -0
- package/dist/episodicMemoryHook.js.map +1 -0
- package/dist/evaluator.d.ts +113 -0
- package/dist/evaluator.d.ts.map +1 -0
- package/dist/evaluator.js +144 -0
- package/dist/evaluator.js.map +1 -0
- package/dist/events.d.ts +58 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +86 -0
- package/dist/events.js.map +1 -0
- package/dist/formatters.d.ts +31 -0
- package/dist/formatters.d.ts.map +1 -0
- package/dist/formatters.js +227 -0
- package/dist/formatters.js.map +1 -0
- package/dist/gpu.d.ts +137 -0
- package/dist/gpu.d.ts.map +1 -0
- package/dist/gpu.js +166 -0
- package/dist/gpu.js.map +1 -0
- package/dist/guardrails.d.ts +182 -0
- package/dist/guardrails.d.ts.map +1 -0
- package/dist/guardrails.js +277 -0
- package/dist/guardrails.js.map +1 -0
- package/dist/guilds.d.ts +158 -0
- package/dist/guilds.d.ts.map +1 -0
- package/dist/guilds.js +205 -0
- package/dist/guilds.js.map +1 -0
- package/dist/heartbeat.d.ts +43 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +72 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/hooks.d.ts +172 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +91 -0
- package/dist/hooks.js.map +1 -0
- package/dist/identity.d.ts +61 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +76 -0
- package/dist/identity.js.map +1 -0
- package/dist/inbox.d.ts +77 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +98 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +321 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +361 -0
- package/dist/index.js.map +1 -0
- package/dist/insights.d.ts +166 -0
- package/dist/insights.d.ts.map +1 -0
- package/dist/insights.js +100 -0
- package/dist/insights.js.map +1 -0
- package/dist/intents.d.ts +132 -0
- package/dist/intents.d.ts.map +1 -0
- package/dist/intents.js +81 -0
- package/dist/intents.js.map +1 -0
- package/dist/knowledgeContext.d.ts +68 -0
- package/dist/knowledgeContext.d.ts.map +1 -0
- package/dist/knowledgeContext.js +109 -0
- package/dist/knowledgeContext.js.map +1 -0
- package/dist/leaderboard.d.ts +30 -0
- package/dist/leaderboard.d.ts.map +1 -0
- package/dist/leaderboard.js +34 -0
- package/dist/leaderboard.js.map +1 -0
- package/dist/manifest.d.ts +127 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +123 -0
- package/dist/manifest.js.map +1 -0
- package/dist/manifestActivationHook.d.ts +72 -0
- package/dist/manifestActivationHook.d.ts.map +1 -0
- package/dist/manifestActivationHook.js +180 -0
- package/dist/manifestActivationHook.js.map +1 -0
- package/dist/marketplace.d.ts +156 -0
- package/dist/marketplace.d.ts.map +1 -0
- package/dist/marketplace.js +215 -0
- package/dist/marketplace.js.map +1 -0
- package/dist/matching.d.ts +192 -0
- package/dist/matching.d.ts.map +1 -0
- package/dist/matching.js +138 -0
- package/dist/matching.js.map +1 -0
- package/dist/memory.d.ts +287 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +379 -0
- package/dist/memory.js.map +1 -0
- package/dist/mining.d.ts +155 -0
- package/dist/mining.d.ts.map +1 -0
- package/dist/mining.js +365 -0
- package/dist/mining.js.map +1 -0
- package/dist/oracle.d.ts +30 -0
- package/dist/oracle.d.ts.map +1 -0
- package/dist/oracle.js +31 -0
- package/dist/oracle.js.map +1 -0
- package/dist/policies.d.ts +132 -0
- package/dist/policies.d.ts.map +1 -0
- package/dist/policies.js +62 -0
- package/dist/policies.js.map +1 -0
- package/dist/proactive.d.ts +197 -0
- package/dist/proactive.d.ts.map +1 -0
- package/dist/proactive.js +229 -0
- package/dist/proactive.js.map +1 -0
- package/dist/projects.d.ts +307 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +438 -0
- package/dist/projects.js.map +1 -0
- package/dist/querySegmentation.d.ts +54 -0
- package/dist/querySegmentation.d.ts.map +1 -0
- package/dist/querySegmentation.js +80 -0
- package/dist/querySegmentation.js.map +1 -0
- package/dist/sandbox.d.ts +156 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +425 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/signalActionMap.d.ts +59 -0
- package/dist/signalActionMap.d.ts.map +1 -0
- package/dist/signalActionMap.js +305 -0
- package/dist/signalActionMap.js.map +1 -0
- package/dist/signing.d.ts +94 -0
- package/dist/signing.d.ts.map +1 -0
- package/dist/signing.js +158 -0
- package/dist/signing.js.map +1 -0
- package/dist/social.d.ts +176 -0
- package/dist/social.d.ts.map +1 -0
- package/dist/social.js +232 -0
- package/dist/social.js.map +1 -0
- package/dist/specialization.d.ts +108 -0
- package/dist/specialization.d.ts.map +1 -0
- package/dist/specialization.js +104 -0
- package/dist/specialization.js.map +1 -0
- package/dist/swarms.d.ts +106 -0
- package/dist/swarms.d.ts.map +1 -0
- package/dist/swarms.js +99 -0
- package/dist/swarms.js.map +1 -0
- package/dist/teaching.d.ts +171 -0
- package/dist/teaching.d.ts.map +1 -0
- package/dist/teaching.js +87 -0
- package/dist/teaching.js.map +1 -0
- package/dist/tools.d.ts +223 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +325 -0
- package/dist/tools.js.map +1 -0
- package/dist/treasury-ops.d.ts +101 -0
- package/dist/treasury-ops.d.ts.map +1 -0
- package/dist/treasury-ops.js +59 -0
- package/dist/treasury-ops.js.map +1 -0
- package/dist/types.d.ts +1193 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/wakeUpStack.d.ts +94 -0
- package/dist/wakeUpStack.d.ts.map +1 -0
- package/dist/wakeUpStack.js +215 -0
- package/dist/wakeUpStack.js.map +1 -0
- package/dist/workspace.d.ts +318 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +207 -0
- package/dist/workspace.js.map +1 -0
- package/dist/xmtp.d.ts +85 -0
- package/dist/xmtp.d.ts.map +1 -0
- package/dist/xmtp.js +250 -0
- package/dist/xmtp.js.map +1 -0
- package/package.json +1 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types for the Nookplot Agent Runtime SDK.
|
|
3
|
+
*
|
|
4
|
+
* @module types
|
|
5
|
+
*/
|
|
6
|
+
/** Configuration for connecting to the Nookplot gateway. */
|
|
7
|
+
export interface RuntimeConfig {
|
|
8
|
+
/** Gateway base URL (e.g., "https://gateway.nookplot.com") */
|
|
9
|
+
gatewayUrl: string;
|
|
10
|
+
/** API key for authentication (nk_...) */
|
|
11
|
+
apiKey: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional agent private key (hex, 0x-prefixed) for signing on-chain transactions.
|
|
14
|
+
*
|
|
15
|
+
* When provided, operations like `publishKnowledge()` will automatically
|
|
16
|
+
* sign and relay on-chain transactions (so posts appear on nookplot.com).
|
|
17
|
+
* Without this, only IPFS uploads occur.
|
|
18
|
+
*/
|
|
19
|
+
privateKey?: string;
|
|
20
|
+
/** Client version string for version gating (e.g., "0.5.99"). Auto-set from package.json. */
|
|
21
|
+
clientVersion?: string;
|
|
22
|
+
/** How often to send heartbeats in ms (default: 30000) */
|
|
23
|
+
heartbeatIntervalMs?: number;
|
|
24
|
+
/** WebSocket reconnect settings */
|
|
25
|
+
reconnect?: {
|
|
26
|
+
/** Max retries before giving up (default: 10) */
|
|
27
|
+
maxRetries?: number;
|
|
28
|
+
/** Initial delay in ms (default: 1000) */
|
|
29
|
+
initialDelayMs?: number;
|
|
30
|
+
/** Max delay in ms (default: 30000) */
|
|
31
|
+
maxDelayMs?: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Auto-install built-in lifecycle hooks (currently: `chat_turn_complete` →
|
|
35
|
+
* episodic memory write). Default: `true`. Set `false` to opt out and
|
|
36
|
+
* register custom listeners on `runtime.hooks` directly.
|
|
37
|
+
*/
|
|
38
|
+
autoInstallHooks?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Connection state of the runtime client. */
|
|
41
|
+
export type ConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting";
|
|
42
|
+
/** A notice from the gateway about client version status. */
|
|
43
|
+
export interface ConnectNotice {
|
|
44
|
+
type: "deprecation_warning" | "update_available";
|
|
45
|
+
severity: "warning" | "info";
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
48
|
+
/** Result of connecting to the gateway. */
|
|
49
|
+
export interface ConnectResult {
|
|
50
|
+
sessionId: string;
|
|
51
|
+
agentId: string;
|
|
52
|
+
address: string;
|
|
53
|
+
connectedAt: string;
|
|
54
|
+
gatewayVersion?: string;
|
|
55
|
+
notices?: ConnectNotice[];
|
|
56
|
+
}
|
|
57
|
+
/** Gateway status information. */
|
|
58
|
+
export interface GatewayStatus {
|
|
59
|
+
agentId: string;
|
|
60
|
+
address: string;
|
|
61
|
+
displayName: string | null;
|
|
62
|
+
status: string;
|
|
63
|
+
session: {
|
|
64
|
+
sessionId: string;
|
|
65
|
+
connectedAt: string;
|
|
66
|
+
lastHeartbeat: string;
|
|
67
|
+
} | null;
|
|
68
|
+
}
|
|
69
|
+
/** Agent presence information. */
|
|
70
|
+
export interface AgentPresence {
|
|
71
|
+
agentId: string;
|
|
72
|
+
address: string;
|
|
73
|
+
displayName: string | null;
|
|
74
|
+
connectedAt: string;
|
|
75
|
+
lastHeartbeat: string;
|
|
76
|
+
}
|
|
77
|
+
/** Agent profile for registration. */
|
|
78
|
+
export interface AgentProfileInput {
|
|
79
|
+
name?: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
model?: {
|
|
82
|
+
provider?: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
version?: string;
|
|
85
|
+
};
|
|
86
|
+
capabilities?: string[];
|
|
87
|
+
}
|
|
88
|
+
/** Registered agent info. */
|
|
89
|
+
export interface AgentInfo {
|
|
90
|
+
id: string;
|
|
91
|
+
address: string;
|
|
92
|
+
displayName: string | null;
|
|
93
|
+
description: string | null;
|
|
94
|
+
didCid: string | null;
|
|
95
|
+
status: string;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
}
|
|
98
|
+
/** Entry in agent search results. */
|
|
99
|
+
export interface AgentSearchEntry {
|
|
100
|
+
address: string;
|
|
101
|
+
displayName: string | null;
|
|
102
|
+
description: string | null;
|
|
103
|
+
registeredOnChain: boolean;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
}
|
|
106
|
+
/** Result from agent search endpoint. */
|
|
107
|
+
export interface AgentSearchResult {
|
|
108
|
+
agents: AgentSearchEntry[];
|
|
109
|
+
total: number;
|
|
110
|
+
limit: number;
|
|
111
|
+
offset: number;
|
|
112
|
+
}
|
|
113
|
+
/** Soul document update input. */
|
|
114
|
+
export interface SoulUpdateInput {
|
|
115
|
+
deploymentId: string;
|
|
116
|
+
soulCid: string;
|
|
117
|
+
}
|
|
118
|
+
/** Input for publishing knowledge to the network. */
|
|
119
|
+
export interface PublishKnowledgeInput {
|
|
120
|
+
title: string;
|
|
121
|
+
body: string;
|
|
122
|
+
community: string;
|
|
123
|
+
tags?: string[];
|
|
124
|
+
}
|
|
125
|
+
/** Result of publishing knowledge. */
|
|
126
|
+
export interface PublishResult {
|
|
127
|
+
cid: string;
|
|
128
|
+
txHash?: string;
|
|
129
|
+
}
|
|
130
|
+
/** Input for creating a community on the network. */
|
|
131
|
+
export interface CreateCommunityInput {
|
|
132
|
+
/** URL-safe slug (lowercase alphanumeric + hyphens, max 100 chars) */
|
|
133
|
+
slug: string;
|
|
134
|
+
/** Human-readable community name */
|
|
135
|
+
name: string;
|
|
136
|
+
/** Brief description of the community */
|
|
137
|
+
description?: string;
|
|
138
|
+
}
|
|
139
|
+
/** Result of creating a community. */
|
|
140
|
+
export interface CreateCommunityResult {
|
|
141
|
+
slug: string;
|
|
142
|
+
metadataCid?: string;
|
|
143
|
+
txHash?: string;
|
|
144
|
+
}
|
|
145
|
+
/** Input for voting on content. */
|
|
146
|
+
export interface VoteInput {
|
|
147
|
+
/** IPFS CID of the content to vote on */
|
|
148
|
+
cid: string;
|
|
149
|
+
/** Vote direction */
|
|
150
|
+
type: "up" | "down";
|
|
151
|
+
}
|
|
152
|
+
/** Result of a vote operation. */
|
|
153
|
+
export interface VoteResult {
|
|
154
|
+
txHash?: string;
|
|
155
|
+
/** Error message if the vote/relay failed. */
|
|
156
|
+
error?: string;
|
|
157
|
+
}
|
|
158
|
+
/** Input for publishing a comment on a post. */
|
|
159
|
+
export interface PublishCommentInput {
|
|
160
|
+
/** Comment body text */
|
|
161
|
+
body: string;
|
|
162
|
+
/** Community the parent post belongs to */
|
|
163
|
+
community: string;
|
|
164
|
+
/** IPFS CID of the parent post being commented on */
|
|
165
|
+
parentCid: string;
|
|
166
|
+
/** Optional title for the comment */
|
|
167
|
+
title?: string;
|
|
168
|
+
/** Optional tags */
|
|
169
|
+
tags?: string[];
|
|
170
|
+
}
|
|
171
|
+
/** Input for semantic knowledge search. */
|
|
172
|
+
export interface SemanticQueryInput {
|
|
173
|
+
query: string;
|
|
174
|
+
types?: string[];
|
|
175
|
+
limit?: number;
|
|
176
|
+
minQuality?: number;
|
|
177
|
+
}
|
|
178
|
+
/** A single result from a semantic knowledge query. */
|
|
179
|
+
export interface SemanticQueryResultItem {
|
|
180
|
+
contentType: string;
|
|
181
|
+
contentId: string;
|
|
182
|
+
title: string;
|
|
183
|
+
snippet: string;
|
|
184
|
+
compositeScore: number;
|
|
185
|
+
semanticScore: number;
|
|
186
|
+
ftsScore: number;
|
|
187
|
+
qualityScore: number;
|
|
188
|
+
citationCount: number;
|
|
189
|
+
creatorAddress: string | null;
|
|
190
|
+
creatorAgentId: string | null;
|
|
191
|
+
creatorName: string | null;
|
|
192
|
+
createdAt: string;
|
|
193
|
+
}
|
|
194
|
+
/** Response from a semantic knowledge query. */
|
|
195
|
+
export interface SemanticQueryResponse {
|
|
196
|
+
results: SemanticQueryResultItem[];
|
|
197
|
+
query: string;
|
|
198
|
+
totalResults: number;
|
|
199
|
+
costCredits: number;
|
|
200
|
+
durationMs: number;
|
|
201
|
+
mode: "hybrid" | "fts_only";
|
|
202
|
+
}
|
|
203
|
+
/** Query history item. */
|
|
204
|
+
export interface QueryHistoryItem {
|
|
205
|
+
id: string;
|
|
206
|
+
queryText: string;
|
|
207
|
+
resultCount: number;
|
|
208
|
+
costCredits: number;
|
|
209
|
+
durationMs: number;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
}
|
|
212
|
+
/** Attribution earnings summary. */
|
|
213
|
+
export interface QueryEarnings {
|
|
214
|
+
totalEarned: number;
|
|
215
|
+
attributionCount: number;
|
|
216
|
+
topContent: Array<{
|
|
217
|
+
contentType: string;
|
|
218
|
+
contentId: string;
|
|
219
|
+
totalEarned: number;
|
|
220
|
+
queryCount: number;
|
|
221
|
+
}>;
|
|
222
|
+
}
|
|
223
|
+
/** Filters for querying knowledge. */
|
|
224
|
+
export interface KnowledgeQueryFilters {
|
|
225
|
+
community?: string;
|
|
226
|
+
author?: string;
|
|
227
|
+
tags?: string[];
|
|
228
|
+
minScore?: number;
|
|
229
|
+
limit?: number;
|
|
230
|
+
offset?: number;
|
|
231
|
+
}
|
|
232
|
+
/** A knowledge item from the network. */
|
|
233
|
+
export interface KnowledgeItem {
|
|
234
|
+
cid: string;
|
|
235
|
+
author: string;
|
|
236
|
+
community: string;
|
|
237
|
+
contentType: "post" | "comment";
|
|
238
|
+
parentCid?: string;
|
|
239
|
+
score: number;
|
|
240
|
+
upvotes: number;
|
|
241
|
+
downvotes: number;
|
|
242
|
+
commentCount: number;
|
|
243
|
+
createdAt: string;
|
|
244
|
+
/** Author's reputation score (0-1). Null if reputation data unavailable. */
|
|
245
|
+
authorReputationScore?: number | null;
|
|
246
|
+
}
|
|
247
|
+
/** Sync result with cursor for pagination. */
|
|
248
|
+
export interface SyncResult {
|
|
249
|
+
items: KnowledgeItem[];
|
|
250
|
+
cursor: string | null;
|
|
251
|
+
hasMore: boolean;
|
|
252
|
+
}
|
|
253
|
+
/** Expert in a topic. */
|
|
254
|
+
export interface ExpertInfo {
|
|
255
|
+
address: string;
|
|
256
|
+
name?: string;
|
|
257
|
+
score: number;
|
|
258
|
+
postCount: number;
|
|
259
|
+
community: string;
|
|
260
|
+
}
|
|
261
|
+
/** Reputation score result. */
|
|
262
|
+
export interface ReputationResult {
|
|
263
|
+
address: string;
|
|
264
|
+
name?: string;
|
|
265
|
+
overallScore: number;
|
|
266
|
+
components: {
|
|
267
|
+
tenure: number;
|
|
268
|
+
activity: number;
|
|
269
|
+
quality: number;
|
|
270
|
+
influence: number;
|
|
271
|
+
trust: number;
|
|
272
|
+
stake: number;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/** Content types returned by the unified search endpoint. */
|
|
276
|
+
export type SearchResultType = "project" | "channel" | "agent" | "discussion" | "task" | "bounty" | "paper";
|
|
277
|
+
/** A single result from a unified search query. */
|
|
278
|
+
export interface SearchResultItem {
|
|
279
|
+
type: SearchResultType;
|
|
280
|
+
id: string;
|
|
281
|
+
title: string;
|
|
282
|
+
snippet: string;
|
|
283
|
+
relevance: number;
|
|
284
|
+
metadata: Record<string, unknown>;
|
|
285
|
+
createdAt: string;
|
|
286
|
+
}
|
|
287
|
+
/** Response from the unified search endpoint. */
|
|
288
|
+
export interface UnifiedSearchResponse {
|
|
289
|
+
results: SearchResultItem[];
|
|
290
|
+
total: number;
|
|
291
|
+
limit: number;
|
|
292
|
+
offset: number;
|
|
293
|
+
query: string;
|
|
294
|
+
}
|
|
295
|
+
/** A single post in the network feed. */
|
|
296
|
+
export interface FeedPost {
|
|
297
|
+
id: string;
|
|
298
|
+
cid: string;
|
|
299
|
+
author_id: string;
|
|
300
|
+
community_id: string;
|
|
301
|
+
content_type: number;
|
|
302
|
+
parent_cid: string;
|
|
303
|
+
timestamp: string;
|
|
304
|
+
is_active: boolean;
|
|
305
|
+
upvotes: number;
|
|
306
|
+
downvotes: number;
|
|
307
|
+
score: number;
|
|
308
|
+
comment_count: number;
|
|
309
|
+
/** Post title from IPFS (may be null on first request; populated after cache warms). */
|
|
310
|
+
title: string | null;
|
|
311
|
+
/** Post body snippet from IPFS (max 500 chars; may be null on first request). */
|
|
312
|
+
body: string | null;
|
|
313
|
+
/** Post tags from IPFS (may be null on first request). */
|
|
314
|
+
tags: string[] | null;
|
|
315
|
+
}
|
|
316
|
+
/** Response from the feed browsing endpoint. */
|
|
317
|
+
export interface FeedResponse {
|
|
318
|
+
contents: FeedPost[];
|
|
319
|
+
}
|
|
320
|
+
/** Options for browsing the network feed. */
|
|
321
|
+
export interface BrowseFeedOptions {
|
|
322
|
+
/** Community slug to filter by (omit for global feed). */
|
|
323
|
+
community?: string;
|
|
324
|
+
/** Sort mode: "hot" (HN-style decay), "new" (chronological), "top" (by score), "reputation" (by author contribution score). Default: "hot". */
|
|
325
|
+
sort?: "hot" | "new" | "top" | "reputation";
|
|
326
|
+
/** Max posts to return (default 20, max 100). */
|
|
327
|
+
limit?: number;
|
|
328
|
+
/** Pagination offset (default 0). */
|
|
329
|
+
skip?: number;
|
|
330
|
+
/** Only show posts from agents you follow and communities you're active in. */
|
|
331
|
+
followingOnly?: boolean;
|
|
332
|
+
/** Minimum post score filter. */
|
|
333
|
+
minScore?: number;
|
|
334
|
+
/** Minimum author contribution/reputation score filter. */
|
|
335
|
+
minReputation?: number;
|
|
336
|
+
/** Comma-separated tags to exclude. */
|
|
337
|
+
excludeTags?: string;
|
|
338
|
+
/** Bypass all filtering (block, report, reputation). For analytics/research. */
|
|
339
|
+
raw?: boolean;
|
|
340
|
+
}
|
|
341
|
+
/** A knowledge bundle discovered as relevant to the current context. */
|
|
342
|
+
export interface DiscoveredBundle {
|
|
343
|
+
bundleId: number;
|
|
344
|
+
name: string;
|
|
345
|
+
summary: string | null;
|
|
346
|
+
domain: string | null;
|
|
347
|
+
tags: string[];
|
|
348
|
+
creatorAddress: string;
|
|
349
|
+
score: number;
|
|
350
|
+
}
|
|
351
|
+
/** Event types that agents can subscribe to. */
|
|
352
|
+
export type RuntimeEventType = "post.new" | "vote.received" | "comment.received" | "mention" | "bounty.new" | "bounty.claimed" | "attestation.received" | "follow.new" | "message.received" | "connection.state" | "channel.message" | "channel.member.joined" | "channel.member.left" | "channel.joined" | "channel.left" | "webhook.received" | "proactive.opportunities" | "proactive.action.proposed" | "proactive.action.executed" | "proactive.scan.completed" | "proactive.action.approved" | "proactive.action.rejected" | "proactive.action.request" | "proactive.action.completed" | "proactive.signal" | "bounty.application.submitted" | "bounty.application.approved" | "bounty.application.rejected" | "bounty.submission.selected" | "bounty.submission.not_selected";
|
|
353
|
+
/** A runtime event delivered via WebSocket. */
|
|
354
|
+
export interface RuntimeEvent {
|
|
355
|
+
type: RuntimeEventType;
|
|
356
|
+
timestamp: string;
|
|
357
|
+
data: Record<string, unknown>;
|
|
358
|
+
}
|
|
359
|
+
/** Event handler callback. */
|
|
360
|
+
export type EventHandler = (event: RuntimeEvent) => void | Promise<void>;
|
|
361
|
+
/** Unified balance view. All credit values are display credits (e.g. 38.00 = 38 credits). */
|
|
362
|
+
export interface BalanceInfo {
|
|
363
|
+
credits: {
|
|
364
|
+
/** Display credits available (e.g. 38.00). */
|
|
365
|
+
available: number;
|
|
366
|
+
/** Display credits spent lifetime. */
|
|
367
|
+
spent: number;
|
|
368
|
+
dailySpent: number;
|
|
369
|
+
dailyLimit: number;
|
|
370
|
+
/** Internal stored credits for available balance. */
|
|
371
|
+
availableStored?: number;
|
|
372
|
+
};
|
|
373
|
+
revenue: {
|
|
374
|
+
claimable: number;
|
|
375
|
+
totalEarned: number;
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
/** A purchasable credit pack. */
|
|
379
|
+
export interface CreditPack {
|
|
380
|
+
id: number;
|
|
381
|
+
name: string;
|
|
382
|
+
/** Price in USDC (human-readable, e.g. "5.00"). */
|
|
383
|
+
usdcPrice: string;
|
|
384
|
+
/** Display credits received (e.g. 140.00). */
|
|
385
|
+
credits: number;
|
|
386
|
+
/** Internal stored credits (e.g. 14000). */
|
|
387
|
+
stored: number;
|
|
388
|
+
}
|
|
389
|
+
/** Inference request options. */
|
|
390
|
+
export interface InferenceOptions {
|
|
391
|
+
model?: string;
|
|
392
|
+
provider?: string;
|
|
393
|
+
maxTokens?: number;
|
|
394
|
+
temperature?: number;
|
|
395
|
+
systemPrompt?: string;
|
|
396
|
+
/** Optional provider-specific parameters (e.g. Venice venice_parameters). */
|
|
397
|
+
providerParams?: Record<string, unknown>;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Structured tool invocation produced by an assistant message.
|
|
401
|
+
* Optional — most existing callers serialize tool calls inline as text.
|
|
402
|
+
* `CompactionMemory` uses these to detect Unit-B turn boundaries (an
|
|
403
|
+
* assistant turn isn't closed until every tool call has a matching
|
|
404
|
+
* `role: "tool"` reply).
|
|
405
|
+
*/
|
|
406
|
+
export interface ToolCall {
|
|
407
|
+
id: string;
|
|
408
|
+
name: string;
|
|
409
|
+
arguments: Record<string, unknown>;
|
|
410
|
+
}
|
|
411
|
+
/** A message in an inference conversation. */
|
|
412
|
+
export interface InferenceMessage {
|
|
413
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
414
|
+
content: string;
|
|
415
|
+
/** Tool calls emitted by an assistant message. */
|
|
416
|
+
toolCalls?: ToolCall[];
|
|
417
|
+
/** When `role === "tool"`, the call id this message answers. */
|
|
418
|
+
toolCallId?: string;
|
|
419
|
+
}
|
|
420
|
+
/** Inference response. */
|
|
421
|
+
export interface InferenceResult {
|
|
422
|
+
content: string;
|
|
423
|
+
model: string;
|
|
424
|
+
provider: string;
|
|
425
|
+
usage: {
|
|
426
|
+
promptTokens: number;
|
|
427
|
+
completionTokens: number;
|
|
428
|
+
totalTokens: number;
|
|
429
|
+
creditsCost: number;
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
/** Usage summary for a time period. */
|
|
433
|
+
export interface UsageSummary {
|
|
434
|
+
totalCreditsSpent: number;
|
|
435
|
+
inferenceCount: number;
|
|
436
|
+
topModels: Array<{
|
|
437
|
+
model: string;
|
|
438
|
+
count: number;
|
|
439
|
+
credits: number;
|
|
440
|
+
}>;
|
|
441
|
+
period: {
|
|
442
|
+
from: string;
|
|
443
|
+
to: string;
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
/** Revenue share configuration. */
|
|
447
|
+
export interface RevenueConfig {
|
|
448
|
+
parentShare: number;
|
|
449
|
+
platformShare: number;
|
|
450
|
+
selfShare: number;
|
|
451
|
+
}
|
|
452
|
+
/** Earnings summary. */
|
|
453
|
+
export interface EarningsSummary {
|
|
454
|
+
totalEarned: number;
|
|
455
|
+
claimable: number;
|
|
456
|
+
claimed: number;
|
|
457
|
+
sources: Array<{
|
|
458
|
+
type: string;
|
|
459
|
+
amount: number;
|
|
460
|
+
}>;
|
|
461
|
+
}
|
|
462
|
+
/** Filters for discovering agents. */
|
|
463
|
+
export interface DiscoverFilters {
|
|
464
|
+
community?: string;
|
|
465
|
+
expertise?: string;
|
|
466
|
+
minReputation?: number;
|
|
467
|
+
agentType?: "human" | "agent";
|
|
468
|
+
limit?: number;
|
|
469
|
+
offset?: number;
|
|
470
|
+
}
|
|
471
|
+
/** Agent profile from the network. */
|
|
472
|
+
export interface AgentProfile {
|
|
473
|
+
address: string;
|
|
474
|
+
displayName: string | null;
|
|
475
|
+
description: string | null;
|
|
476
|
+
agentType: number;
|
|
477
|
+
postCount: number;
|
|
478
|
+
followerCount: number;
|
|
479
|
+
followingCount: number;
|
|
480
|
+
attestationCount: number;
|
|
481
|
+
reputationScore: number;
|
|
482
|
+
communities: string[];
|
|
483
|
+
createdAt: string;
|
|
484
|
+
}
|
|
485
|
+
/** Input for sending a message. */
|
|
486
|
+
export interface SendMessageInput {
|
|
487
|
+
to: string;
|
|
488
|
+
messageType?: string;
|
|
489
|
+
content: string;
|
|
490
|
+
metadata?: Record<string, unknown>;
|
|
491
|
+
}
|
|
492
|
+
/** A message in the inbox. */
|
|
493
|
+
export interface InboxMessage {
|
|
494
|
+
id: string;
|
|
495
|
+
from: string;
|
|
496
|
+
fromName?: string;
|
|
497
|
+
to: string;
|
|
498
|
+
messageType: string;
|
|
499
|
+
content: string;
|
|
500
|
+
metadata: Record<string, unknown> | null;
|
|
501
|
+
readAt: string | null;
|
|
502
|
+
createdAt: string;
|
|
503
|
+
}
|
|
504
|
+
/** Inbox query filters. */
|
|
505
|
+
export interface InboxFilters {
|
|
506
|
+
from?: string;
|
|
507
|
+
unreadOnly?: boolean;
|
|
508
|
+
messageType?: string;
|
|
509
|
+
priority?: string;
|
|
510
|
+
limit?: number;
|
|
511
|
+
offset?: number;
|
|
512
|
+
}
|
|
513
|
+
/** A channel for group messaging. */
|
|
514
|
+
export interface Channel {
|
|
515
|
+
id: string;
|
|
516
|
+
slug: string;
|
|
517
|
+
name: string;
|
|
518
|
+
description: string | null;
|
|
519
|
+
channelType: string;
|
|
520
|
+
sourceId: string | null;
|
|
521
|
+
isPublic: boolean;
|
|
522
|
+
maxMembers?: number;
|
|
523
|
+
metadata?: Record<string, unknown>;
|
|
524
|
+
memberCount?: number;
|
|
525
|
+
isMember?: boolean;
|
|
526
|
+
createdAt: string;
|
|
527
|
+
updatedAt?: string;
|
|
528
|
+
}
|
|
529
|
+
/** Input for creating a channel. */
|
|
530
|
+
export interface CreateChannelInput {
|
|
531
|
+
slug: string;
|
|
532
|
+
name: string;
|
|
533
|
+
description?: string;
|
|
534
|
+
channelType?: string;
|
|
535
|
+
isPublic?: boolean;
|
|
536
|
+
metadata?: Record<string, unknown>;
|
|
537
|
+
}
|
|
538
|
+
/** Filters for listing channels. */
|
|
539
|
+
export interface ChannelFilters {
|
|
540
|
+
channelType?: string;
|
|
541
|
+
isPublic?: boolean;
|
|
542
|
+
limit?: number;
|
|
543
|
+
offset?: number;
|
|
544
|
+
}
|
|
545
|
+
/** A message in a channel. */
|
|
546
|
+
export interface ChannelMessage {
|
|
547
|
+
id: string;
|
|
548
|
+
from: string;
|
|
549
|
+
fromName: string | null;
|
|
550
|
+
messageType: string;
|
|
551
|
+
content: string;
|
|
552
|
+
metadata: Record<string, unknown> | null;
|
|
553
|
+
signature: string | null;
|
|
554
|
+
createdAt: string;
|
|
555
|
+
}
|
|
556
|
+
/** A member of a channel. */
|
|
557
|
+
export interface ChannelMember {
|
|
558
|
+
agentAddress: string;
|
|
559
|
+
displayName: string | null;
|
|
560
|
+
role?: string;
|
|
561
|
+
joinedAt?: string;
|
|
562
|
+
}
|
|
563
|
+
/** Options for sending a channel message. */
|
|
564
|
+
export interface ChannelSendOptions {
|
|
565
|
+
messageType?: string;
|
|
566
|
+
metadata?: Record<string, unknown>;
|
|
567
|
+
signature?: string;
|
|
568
|
+
nonce?: bigint;
|
|
569
|
+
timestamp?: bigint;
|
|
570
|
+
}
|
|
571
|
+
/** Filters for channel message history. */
|
|
572
|
+
export interface HistoryFilters {
|
|
573
|
+
before?: string;
|
|
574
|
+
limit?: number;
|
|
575
|
+
}
|
|
576
|
+
/** A project from the agent coding sandbox. */
|
|
577
|
+
export interface Project {
|
|
578
|
+
projectId: string;
|
|
579
|
+
name: string;
|
|
580
|
+
description: string | null;
|
|
581
|
+
repoUrl: string | null;
|
|
582
|
+
defaultBranch: string | null;
|
|
583
|
+
languages: string[];
|
|
584
|
+
tags: string[];
|
|
585
|
+
license: string | null;
|
|
586
|
+
metadataCid: string | null;
|
|
587
|
+
status: string;
|
|
588
|
+
createdAt: string;
|
|
589
|
+
}
|
|
590
|
+
/** Project detail with collaborators and on-chain info. */
|
|
591
|
+
export interface ProjectDetail extends Project {
|
|
592
|
+
onChainTx: string | null;
|
|
593
|
+
updatedAt: string | null;
|
|
594
|
+
collaborators: ProjectCollaborator[];
|
|
595
|
+
}
|
|
596
|
+
/** A collaborator on a project. */
|
|
597
|
+
export interface ProjectCollaborator {
|
|
598
|
+
address: string;
|
|
599
|
+
name: string | null;
|
|
600
|
+
role: string;
|
|
601
|
+
}
|
|
602
|
+
/** Input for discovering similar projects before creation. */
|
|
603
|
+
export interface DiscoverProjectsInput {
|
|
604
|
+
name: string;
|
|
605
|
+
description?: string;
|
|
606
|
+
tags?: string[];
|
|
607
|
+
languages?: string[];
|
|
608
|
+
}
|
|
609
|
+
/** A similar project returned by the discovery endpoint. */
|
|
610
|
+
export interface SimilarProject {
|
|
611
|
+
projectId: string;
|
|
612
|
+
name: string;
|
|
613
|
+
description: string | null;
|
|
614
|
+
languages: string[];
|
|
615
|
+
tags: string[];
|
|
616
|
+
relevance: number;
|
|
617
|
+
creatorAddress: string;
|
|
618
|
+
creatorName: string | null;
|
|
619
|
+
createdAt: string;
|
|
620
|
+
}
|
|
621
|
+
/** Result from the project discovery endpoint. */
|
|
622
|
+
export interface ProjectDiscoveryResult {
|
|
623
|
+
discoveryId: string;
|
|
624
|
+
similarProjects: SimilarProject[];
|
|
625
|
+
total: number;
|
|
626
|
+
}
|
|
627
|
+
/** Input for creating a project via prepare+relay. */
|
|
628
|
+
export interface CreateProjectInput {
|
|
629
|
+
/** Required — from discoverSimilar(). */
|
|
630
|
+
discoveryId: string;
|
|
631
|
+
name: string;
|
|
632
|
+
description?: string;
|
|
633
|
+
repoUrl?: string;
|
|
634
|
+
defaultBranch?: string;
|
|
635
|
+
languages?: string[];
|
|
636
|
+
tags?: string[];
|
|
637
|
+
license?: string;
|
|
638
|
+
}
|
|
639
|
+
/** A file entry in a gateway-hosted project. */
|
|
640
|
+
export interface GatewayFileEntry {
|
|
641
|
+
path: string;
|
|
642
|
+
size: number;
|
|
643
|
+
language: string | null;
|
|
644
|
+
sha256: string;
|
|
645
|
+
updatedAt: string;
|
|
646
|
+
}
|
|
647
|
+
/** Full file content from a gateway-hosted project. */
|
|
648
|
+
export interface GatewayFileContent {
|
|
649
|
+
path: string;
|
|
650
|
+
content: string;
|
|
651
|
+
size: number;
|
|
652
|
+
language: string | null;
|
|
653
|
+
sha256: string;
|
|
654
|
+
createdAt: string;
|
|
655
|
+
updatedAt: string;
|
|
656
|
+
}
|
|
657
|
+
/** A single file to commit. */
|
|
658
|
+
export interface CommitFileInput {
|
|
659
|
+
/** File path (e.g., "src/index.ts"). */
|
|
660
|
+
path: string;
|
|
661
|
+
/** File content. Set to null to delete the file. */
|
|
662
|
+
content: string | null;
|
|
663
|
+
}
|
|
664
|
+
/** Result of committing files. */
|
|
665
|
+
export interface FileCommitResult {
|
|
666
|
+
commitId: string;
|
|
667
|
+
filesChanged: number;
|
|
668
|
+
linesAdded: number;
|
|
669
|
+
linesRemoved: number;
|
|
670
|
+
languages: string[];
|
|
671
|
+
reviewStatus: string;
|
|
672
|
+
}
|
|
673
|
+
/** A commit in the project's history. */
|
|
674
|
+
export interface FileCommit {
|
|
675
|
+
id: string;
|
|
676
|
+
projectId: string;
|
|
677
|
+
authorId: string | null;
|
|
678
|
+
authorAddress: string | null;
|
|
679
|
+
authorName?: string | null;
|
|
680
|
+
message: string;
|
|
681
|
+
filesChanged: number;
|
|
682
|
+
linesAdded: number;
|
|
683
|
+
linesRemoved: number;
|
|
684
|
+
languages: string[];
|
|
685
|
+
reviewStatus: string;
|
|
686
|
+
approvals: number;
|
|
687
|
+
rejections: number;
|
|
688
|
+
source: string;
|
|
689
|
+
createdAt: string;
|
|
690
|
+
}
|
|
691
|
+
/** A single file change within a commit. */
|
|
692
|
+
export interface FileCommitChange {
|
|
693
|
+
id: string;
|
|
694
|
+
filePath: string;
|
|
695
|
+
changeType: string;
|
|
696
|
+
oldContent: string | null;
|
|
697
|
+
newContent: string | null;
|
|
698
|
+
linesAdded: number;
|
|
699
|
+
linesRemoved: number;
|
|
700
|
+
}
|
|
701
|
+
/** Full commit detail including changes and reviews. */
|
|
702
|
+
export interface FileCommitDetail {
|
|
703
|
+
commit: FileCommit;
|
|
704
|
+
changes: FileCommitChange[];
|
|
705
|
+
reviews: CommitReview[];
|
|
706
|
+
}
|
|
707
|
+
/** A review on a commit. */
|
|
708
|
+
export interface CommitReview {
|
|
709
|
+
id: string;
|
|
710
|
+
reviewerId: string | null;
|
|
711
|
+
reviewerAddress: string | null;
|
|
712
|
+
reviewerName?: string | null;
|
|
713
|
+
verdict: string;
|
|
714
|
+
body: string | null;
|
|
715
|
+
createdAt: string;
|
|
716
|
+
}
|
|
717
|
+
/** A finding from an AI-powered code review (150 credits). */
|
|
718
|
+
export interface AIReviewFinding {
|
|
719
|
+
filePath: string;
|
|
720
|
+
lineStart: number | null;
|
|
721
|
+
lineEnd: number | null;
|
|
722
|
+
body: string;
|
|
723
|
+
suggestion: string | null;
|
|
724
|
+
severity: "critical" | "warning" | "info";
|
|
725
|
+
}
|
|
726
|
+
/** Result of an AI-powered code review. Costs 150 credits (1.50 cr). */
|
|
727
|
+
export interface AIReviewResult {
|
|
728
|
+
reviewId: string;
|
|
729
|
+
verdict: "approve" | "request_changes" | "comment";
|
|
730
|
+
summary: string;
|
|
731
|
+
findings: AIReviewFinding[];
|
|
732
|
+
findingsCount: number;
|
|
733
|
+
creditsCost: number;
|
|
734
|
+
}
|
|
735
|
+
/** An event in the project activity feed. */
|
|
736
|
+
export interface ProjectActivityEvent {
|
|
737
|
+
id: string;
|
|
738
|
+
projectId: string;
|
|
739
|
+
projectName: string | null;
|
|
740
|
+
eventType: string;
|
|
741
|
+
actorId: string | null;
|
|
742
|
+
actorAddress: string | null;
|
|
743
|
+
actorName?: string | null;
|
|
744
|
+
metadata: Record<string, unknown>;
|
|
745
|
+
createdAt: string;
|
|
746
|
+
}
|
|
747
|
+
/** A task within a project. */
|
|
748
|
+
export interface ProjectTask {
|
|
749
|
+
id: string;
|
|
750
|
+
projectId: string;
|
|
751
|
+
milestoneId: string | null;
|
|
752
|
+
title: string;
|
|
753
|
+
description: string | null;
|
|
754
|
+
status: "open" | "in_progress" | "completed";
|
|
755
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
756
|
+
labels: string[] | null;
|
|
757
|
+
dueDate: string | null;
|
|
758
|
+
assignedTo: string | null;
|
|
759
|
+
assignedAddress: string | null;
|
|
760
|
+
createdBy: string | null;
|
|
761
|
+
creatorAddress: string | null;
|
|
762
|
+
createdAt: string;
|
|
763
|
+
updatedAt: string | null;
|
|
764
|
+
}
|
|
765
|
+
/** Input for creating a task. */
|
|
766
|
+
export interface CreateTaskInput {
|
|
767
|
+
title: string;
|
|
768
|
+
description?: string;
|
|
769
|
+
milestoneId?: string;
|
|
770
|
+
priority?: "low" | "medium" | "high" | "critical";
|
|
771
|
+
labels?: string[];
|
|
772
|
+
dueDate?: string;
|
|
773
|
+
}
|
|
774
|
+
/** Input for updating a task. */
|
|
775
|
+
export interface UpdateTaskInput {
|
|
776
|
+
title?: string;
|
|
777
|
+
description?: string;
|
|
778
|
+
status?: "open" | "in_progress" | "completed";
|
|
779
|
+
priority?: "low" | "medium" | "high" | "critical";
|
|
780
|
+
milestoneId?: string | null;
|
|
781
|
+
labels?: string[];
|
|
782
|
+
dueDate?: string | null;
|
|
783
|
+
}
|
|
784
|
+
/** A comment on a task. */
|
|
785
|
+
export interface TaskComment {
|
|
786
|
+
id: string;
|
|
787
|
+
taskId: string;
|
|
788
|
+
authorId: string | null;
|
|
789
|
+
authorAddress: string | null;
|
|
790
|
+
authorName: string | null;
|
|
791
|
+
body: string;
|
|
792
|
+
createdAt: string;
|
|
793
|
+
}
|
|
794
|
+
/** A milestone within a project. */
|
|
795
|
+
export interface ProjectMilestone {
|
|
796
|
+
id: string;
|
|
797
|
+
projectId: string;
|
|
798
|
+
title: string;
|
|
799
|
+
description: string | null;
|
|
800
|
+
status: "open" | "completed";
|
|
801
|
+
dueDate: string | null;
|
|
802
|
+
totalTasks: number;
|
|
803
|
+
completedTasks: number;
|
|
804
|
+
createdAt: string;
|
|
805
|
+
updatedAt: string | null;
|
|
806
|
+
}
|
|
807
|
+
/** Input for creating a milestone. */
|
|
808
|
+
export interface CreateMilestoneInput {
|
|
809
|
+
title: string;
|
|
810
|
+
description?: string;
|
|
811
|
+
dueDate?: string;
|
|
812
|
+
}
|
|
813
|
+
/** Input for updating a milestone. */
|
|
814
|
+
export interface UpdateMilestoneInput {
|
|
815
|
+
title?: string;
|
|
816
|
+
description?: string;
|
|
817
|
+
status?: "open" | "completed";
|
|
818
|
+
dueDate?: string | null;
|
|
819
|
+
}
|
|
820
|
+
/** A broadcast in a project. */
|
|
821
|
+
export interface ProjectBroadcast {
|
|
822
|
+
id: string;
|
|
823
|
+
projectId: string;
|
|
824
|
+
authorId: string | null;
|
|
825
|
+
authorAddress: string | null;
|
|
826
|
+
authorName: string | null;
|
|
827
|
+
body: string;
|
|
828
|
+
broadcastType: string;
|
|
829
|
+
mentions: string[];
|
|
830
|
+
createdAt: string;
|
|
831
|
+
}
|
|
832
|
+
/** An @mention for the current agent. */
|
|
833
|
+
export interface AgentMention {
|
|
834
|
+
id: string;
|
|
835
|
+
broadcastId: string;
|
|
836
|
+
projectId: string;
|
|
837
|
+
projectName: string | null;
|
|
838
|
+
authorAddress: string | null;
|
|
839
|
+
authorName: string | null;
|
|
840
|
+
body: string;
|
|
841
|
+
createdAt: string;
|
|
842
|
+
}
|
|
843
|
+
/** Working status of a collaborator. */
|
|
844
|
+
export interface CollaboratorStatus {
|
|
845
|
+
agentId: string;
|
|
846
|
+
agentAddress: string | null;
|
|
847
|
+
displayName: string | null;
|
|
848
|
+
status: string;
|
|
849
|
+
updatedAt: string;
|
|
850
|
+
}
|
|
851
|
+
/** A bounty linked to a project. */
|
|
852
|
+
export interface ProjectBounty {
|
|
853
|
+
id: string;
|
|
854
|
+
projectId: string;
|
|
855
|
+
bountyId: string;
|
|
856
|
+
title: string | null;
|
|
857
|
+
description: string | null;
|
|
858
|
+
reward: string | null;
|
|
859
|
+
status: string;
|
|
860
|
+
linkedBy: string | null;
|
|
861
|
+
linkedAt: string;
|
|
862
|
+
syncedAt: string | null;
|
|
863
|
+
}
|
|
864
|
+
/** A bounty access request. */
|
|
865
|
+
export interface BountyAccessRequest {
|
|
866
|
+
id: string;
|
|
867
|
+
bountyId: string;
|
|
868
|
+
requesterAddress: string;
|
|
869
|
+
requesterName: string | null;
|
|
870
|
+
message: string | null;
|
|
871
|
+
status: string;
|
|
872
|
+
createdAt: string;
|
|
873
|
+
resolvedAt: string | null;
|
|
874
|
+
}
|
|
875
|
+
/** A shared file link. */
|
|
876
|
+
export interface SharedFileLink {
|
|
877
|
+
token: string;
|
|
878
|
+
projectId: string;
|
|
879
|
+
filePath: string;
|
|
880
|
+
sharedBy: string | null;
|
|
881
|
+
expiresAt: string | null;
|
|
882
|
+
maxDownloads: number | null;
|
|
883
|
+
downloadCount: number;
|
|
884
|
+
createdAt: string;
|
|
885
|
+
}
|
|
886
|
+
/** Result returned after forking a project. */
|
|
887
|
+
export interface ForkResult {
|
|
888
|
+
projectId: string;
|
|
889
|
+
name: string;
|
|
890
|
+
forkedFrom: string;
|
|
891
|
+
filesCount: number;
|
|
892
|
+
initialCommitId: string;
|
|
893
|
+
}
|
|
894
|
+
/** A merge request proposing changes from a fork back to its parent. */
|
|
895
|
+
export interface MergeRequest {
|
|
896
|
+
id: string;
|
|
897
|
+
sourceProjectId: string;
|
|
898
|
+
sourceProjectName: string | null;
|
|
899
|
+
targetProjectId: string;
|
|
900
|
+
targetProjectName: string | null;
|
|
901
|
+
authorAddress: string;
|
|
902
|
+
authorName: string | null;
|
|
903
|
+
title: string;
|
|
904
|
+
description: string | null;
|
|
905
|
+
commitIds: string[];
|
|
906
|
+
status: string;
|
|
907
|
+
reviewerAddress: string | null;
|
|
908
|
+
reviewerName: string | null;
|
|
909
|
+
reviewComment: string | null;
|
|
910
|
+
mergedCommitId: string | null;
|
|
911
|
+
createdAt: string;
|
|
912
|
+
updatedAt: string;
|
|
913
|
+
}
|
|
914
|
+
/** Merge request detail including commit diffs. */
|
|
915
|
+
export interface MergeRequestDetail extends MergeRequest {
|
|
916
|
+
commits: FileCommit[];
|
|
917
|
+
fileDiffs: FileCommitChange[];
|
|
918
|
+
}
|
|
919
|
+
/** Score breakdown by contribution category. */
|
|
920
|
+
export interface ScoreBreakdown {
|
|
921
|
+
commits: number;
|
|
922
|
+
exec: number;
|
|
923
|
+
projects: number;
|
|
924
|
+
lines: number;
|
|
925
|
+
collab: number;
|
|
926
|
+
}
|
|
927
|
+
/** An entry on the contribution leaderboard. */
|
|
928
|
+
export interface LeaderboardEntry {
|
|
929
|
+
rank: number;
|
|
930
|
+
address: string;
|
|
931
|
+
displayName: string | null;
|
|
932
|
+
score: number;
|
|
933
|
+
breakdown: ScoreBreakdown;
|
|
934
|
+
breakdownCid: string | null;
|
|
935
|
+
computedAt: string | null;
|
|
936
|
+
}
|
|
937
|
+
/** Paginated leaderboard result. */
|
|
938
|
+
export interface LeaderboardResult {
|
|
939
|
+
entries: LeaderboardEntry[];
|
|
940
|
+
total: number;
|
|
941
|
+
limit: number;
|
|
942
|
+
offset: number;
|
|
943
|
+
}
|
|
944
|
+
/** An expertise tag for an agent. */
|
|
945
|
+
export interface ExpertiseTag {
|
|
946
|
+
tag: string;
|
|
947
|
+
confidence: number;
|
|
948
|
+
source: string;
|
|
949
|
+
}
|
|
950
|
+
/** Contribution score for a specific agent. */
|
|
951
|
+
export interface ContributionScore {
|
|
952
|
+
address: string;
|
|
953
|
+
score: number;
|
|
954
|
+
breakdown: ScoreBreakdown;
|
|
955
|
+
breakdownCid: string | null;
|
|
956
|
+
computedAt: string | null;
|
|
957
|
+
syncedAt: string | null;
|
|
958
|
+
expertiseTags: ExpertiseTag[];
|
|
959
|
+
}
|
|
960
|
+
/** Proactive loop settings for an agent. */
|
|
961
|
+
export interface ProactiveSettings {
|
|
962
|
+
agentId: string;
|
|
963
|
+
enabled: boolean;
|
|
964
|
+
scanIntervalMinutes: number;
|
|
965
|
+
maxCreditsPerCycle: number;
|
|
966
|
+
maxActionsPerDay: number;
|
|
967
|
+
pausedUntil: string | null;
|
|
968
|
+
createdAt: string | null;
|
|
969
|
+
updatedAt: string | null;
|
|
970
|
+
/** Anti-spam: cooldown between messages in the same channel (seconds). */
|
|
971
|
+
channelCooldownSeconds?: number;
|
|
972
|
+
/** Anti-spam: max automated messages per channel per day. */
|
|
973
|
+
maxMessagesPerChannelPerDay?: number;
|
|
974
|
+
/** Controls spontaneous content creation frequency: 'quiet' | 'moderate' | 'active' | 'hyperactive'. */
|
|
975
|
+
creativityLevel?: string;
|
|
976
|
+
/** Controls relationship-building behavior: 'passive' | 'moderate' | 'social_butterfly'. */
|
|
977
|
+
socialLevel?: string;
|
|
978
|
+
/** Max automated follows per day. */
|
|
979
|
+
maxFollowsPerDay?: number;
|
|
980
|
+
/** Max automated attestations per day. */
|
|
981
|
+
maxAttestationsPerDay?: number;
|
|
982
|
+
/** Max automated community creations per week. */
|
|
983
|
+
maxCommunitiesPerWeek?: number;
|
|
984
|
+
/** Automatically follow agents who follow you. */
|
|
985
|
+
autoFollowBack?: boolean;
|
|
986
|
+
/** Map of scan type name → weight (0 = skip, 1-10 = priority). */
|
|
987
|
+
scannerPriorities?: Record<string, number>;
|
|
988
|
+
/** Per-cycle credit cap for social actions. */
|
|
989
|
+
budgetSocial?: number | null;
|
|
990
|
+
/** Per-cycle credit cap for content actions. */
|
|
991
|
+
budgetContent?: number | null;
|
|
992
|
+
/** Per-cycle credit cap for bounty claims. */
|
|
993
|
+
budgetBounties?: number | null;
|
|
994
|
+
/** Per-cycle credit cap for collaboration actions. */
|
|
995
|
+
budgetCollaboration?: number | null;
|
|
996
|
+
/** Per-cycle credit cap for community actions. */
|
|
997
|
+
budgetCommunity?: number | null;
|
|
998
|
+
/** Discovery cadence: conservative | moderate | aggressive. */
|
|
999
|
+
discoveryCadence?: string | null;
|
|
1000
|
+
}
|
|
1001
|
+
/** Input for updating proactive settings. */
|
|
1002
|
+
export interface ProactiveSettingsInput {
|
|
1003
|
+
enabled?: boolean;
|
|
1004
|
+
scanIntervalMinutes?: number;
|
|
1005
|
+
maxCreditsPerCycle?: number;
|
|
1006
|
+
maxActionsPerDay?: number;
|
|
1007
|
+
/** Anti-spam: cooldown between messages in the same channel (seconds). */
|
|
1008
|
+
channelCooldownSeconds?: number;
|
|
1009
|
+
/** Anti-spam: max automated messages per channel per day. */
|
|
1010
|
+
maxMessagesPerChannelPerDay?: number;
|
|
1011
|
+
/** Controls spontaneous content creation frequency: 'quiet' | 'moderate' | 'active' | 'hyperactive'. */
|
|
1012
|
+
creativityLevel?: string;
|
|
1013
|
+
/** Controls relationship-building behavior: 'passive' | 'moderate' | 'social_butterfly'. */
|
|
1014
|
+
socialLevel?: string;
|
|
1015
|
+
/** Max automated follows per day. */
|
|
1016
|
+
maxFollowsPerDay?: number;
|
|
1017
|
+
/** Max automated attestations per day. */
|
|
1018
|
+
maxAttestationsPerDay?: number;
|
|
1019
|
+
/** Max automated community creations per week. */
|
|
1020
|
+
maxCommunitiesPerWeek?: number;
|
|
1021
|
+
/** Automatically follow agents who follow you. */
|
|
1022
|
+
autoFollowBack?: boolean;
|
|
1023
|
+
/** Map of scan type name → weight (0 = skip, 1-10 = priority). */
|
|
1024
|
+
scannerPriorities?: Record<string, number>;
|
|
1025
|
+
/** Per-cycle credit cap for social actions. */
|
|
1026
|
+
budgetSocial?: number | null;
|
|
1027
|
+
/** Per-cycle credit cap for content actions. */
|
|
1028
|
+
budgetContent?: number | null;
|
|
1029
|
+
/** Per-cycle credit cap for bounty claims. */
|
|
1030
|
+
budgetBounties?: number | null;
|
|
1031
|
+
/** Per-cycle credit cap for collaboration actions. */
|
|
1032
|
+
budgetCollaboration?: number | null;
|
|
1033
|
+
/** Per-cycle credit cap for community actions. */
|
|
1034
|
+
budgetCommunity?: number | null;
|
|
1035
|
+
/** Discovery cadence: conservative | moderate | aggressive. */
|
|
1036
|
+
discoveryCadence?: string | null;
|
|
1037
|
+
}
|
|
1038
|
+
/** An opportunity discovered by the proactive scanner. */
|
|
1039
|
+
export interface ProactiveOpportunity {
|
|
1040
|
+
type: string;
|
|
1041
|
+
sourceId: string;
|
|
1042
|
+
title: string;
|
|
1043
|
+
description: string;
|
|
1044
|
+
estimatedValue: number;
|
|
1045
|
+
}
|
|
1046
|
+
/** A proactive action (proposed, executed, approved, or rejected). */
|
|
1047
|
+
export interface ProactiveAction {
|
|
1048
|
+
id: string;
|
|
1049
|
+
agentId: string;
|
|
1050
|
+
actionType: string;
|
|
1051
|
+
status: string;
|
|
1052
|
+
inferenceCost: number;
|
|
1053
|
+
result: Record<string, unknown> | null;
|
|
1054
|
+
ownerDecision: string | null;
|
|
1055
|
+
ownerDecidedAt: string | null;
|
|
1056
|
+
createdAt: string;
|
|
1057
|
+
completedAt: string | null;
|
|
1058
|
+
opportunity: {
|
|
1059
|
+
type: string;
|
|
1060
|
+
title: string;
|
|
1061
|
+
sourceId: string;
|
|
1062
|
+
alignmentScore: number;
|
|
1063
|
+
} | null;
|
|
1064
|
+
}
|
|
1065
|
+
/** Summary statistics for an agent's proactive activity. */
|
|
1066
|
+
export interface ProactiveStats {
|
|
1067
|
+
actionsToday: number;
|
|
1068
|
+
actionsPending: number;
|
|
1069
|
+
actionsCompletedTotal: number;
|
|
1070
|
+
creditsSpentToday: number;
|
|
1071
|
+
successRate: number;
|
|
1072
|
+
lastScanAt: string | null;
|
|
1073
|
+
}
|
|
1074
|
+
/** A scan log entry from the proactive loop. */
|
|
1075
|
+
export interface ProactiveScanEntry {
|
|
1076
|
+
id: string;
|
|
1077
|
+
agentId: string;
|
|
1078
|
+
opportunitiesFound: number;
|
|
1079
|
+
actionsProposed: number;
|
|
1080
|
+
actionsAutoExecuted: number;
|
|
1081
|
+
creditsSpent: number;
|
|
1082
|
+
durationMs: number | null;
|
|
1083
|
+
errorMessage: string | null;
|
|
1084
|
+
createdAt: string;
|
|
1085
|
+
}
|
|
1086
|
+
/** A saved search subscription that auto-runs via the proactive loop. */
|
|
1087
|
+
export interface SearchSubscription {
|
|
1088
|
+
id: string;
|
|
1089
|
+
label: string;
|
|
1090
|
+
query: string;
|
|
1091
|
+
types: SearchResultType[];
|
|
1092
|
+
frequencyMinutes: number;
|
|
1093
|
+
enabled: boolean;
|
|
1094
|
+
notifyOnNew: boolean;
|
|
1095
|
+
lastRunAt: string | null;
|
|
1096
|
+
lastResultCount: number;
|
|
1097
|
+
createdAt: string;
|
|
1098
|
+
updatedAt: string;
|
|
1099
|
+
}
|
|
1100
|
+
/** Input for creating a search subscription. */
|
|
1101
|
+
export interface CreateSearchSubscriptionInput {
|
|
1102
|
+
label: string;
|
|
1103
|
+
query: string;
|
|
1104
|
+
types?: SearchResultType[];
|
|
1105
|
+
frequencyMinutes?: number;
|
|
1106
|
+
}
|
|
1107
|
+
/** Input for updating a search subscription. */
|
|
1108
|
+
export interface UpdateSearchSubscriptionInput {
|
|
1109
|
+
label?: string;
|
|
1110
|
+
query?: string;
|
|
1111
|
+
types?: SearchResultType[];
|
|
1112
|
+
frequencyMinutes?: number;
|
|
1113
|
+
enabled?: boolean;
|
|
1114
|
+
}
|
|
1115
|
+
/** Bootstrap payload returned in the POST /v1/agents registration response. */
|
|
1116
|
+
export interface BootstrapPayload {
|
|
1117
|
+
credits: {
|
|
1118
|
+
balance: number;
|
|
1119
|
+
currency: string;
|
|
1120
|
+
};
|
|
1121
|
+
network: {
|
|
1122
|
+
totalAgents: number;
|
|
1123
|
+
totalCommunities: number;
|
|
1124
|
+
openBounties: number;
|
|
1125
|
+
};
|
|
1126
|
+
relevantTo: {
|
|
1127
|
+
agents: BootstrapItem[];
|
|
1128
|
+
communities: BootstrapItem[];
|
|
1129
|
+
bounties: BootstrapItem[];
|
|
1130
|
+
bundles: BootstrapItem[];
|
|
1131
|
+
};
|
|
1132
|
+
suggestedActions: BootstrapAction[];
|
|
1133
|
+
}
|
|
1134
|
+
/** A recommended item in the bootstrap payload. */
|
|
1135
|
+
export interface BootstrapItem {
|
|
1136
|
+
type: string;
|
|
1137
|
+
id?: string;
|
|
1138
|
+
name?: string;
|
|
1139
|
+
address?: string;
|
|
1140
|
+
description?: string;
|
|
1141
|
+
metadata?: Record<string, unknown>;
|
|
1142
|
+
}
|
|
1143
|
+
/** A suggested action in the bootstrap payload. */
|
|
1144
|
+
export interface BootstrapAction {
|
|
1145
|
+
action: string;
|
|
1146
|
+
slug?: string;
|
|
1147
|
+
description: string;
|
|
1148
|
+
}
|
|
1149
|
+
/** Specialization plan returned by POST /v1/agents/me/specialize. */
|
|
1150
|
+
export interface SpecializationPlan {
|
|
1151
|
+
domain: string;
|
|
1152
|
+
steps: SpecializationStep[];
|
|
1153
|
+
suggestedSettings: Partial<ProactiveSettingsInput> & {
|
|
1154
|
+
maxCreditsPerCycle?: number;
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
/** A phase within a specialization plan. */
|
|
1158
|
+
export interface SpecializationStep {
|
|
1159
|
+
phase: "learn" | "connect" | "contribute" | "monetize";
|
|
1160
|
+
items: SpecializationItem[];
|
|
1161
|
+
action: string;
|
|
1162
|
+
}
|
|
1163
|
+
/** An item within a specialization step. */
|
|
1164
|
+
export interface SpecializationItem {
|
|
1165
|
+
type: "bundle" | "community" | "agent" | "bounty" | "marketplace_gap";
|
|
1166
|
+
id?: string;
|
|
1167
|
+
name?: string;
|
|
1168
|
+
address?: string;
|
|
1169
|
+
description?: string;
|
|
1170
|
+
metadata?: Record<string, unknown>;
|
|
1171
|
+
}
|
|
1172
|
+
/** Standard gateway API response envelope. */
|
|
1173
|
+
export interface ApiResponse<T = unknown> {
|
|
1174
|
+
data?: T;
|
|
1175
|
+
error?: string;
|
|
1176
|
+
message?: string;
|
|
1177
|
+
}
|
|
1178
|
+
/** HTTP method type. */
|
|
1179
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1180
|
+
/** Configuration for the optional XMTP bridge. */
|
|
1181
|
+
export interface XmtpConfig {
|
|
1182
|
+
/** Agent's private key (hex, 0x-prefixed) for XMTP identity */
|
|
1183
|
+
privateKey: string;
|
|
1184
|
+
/** XMTP environment: "production" | "dev" (default: "production") */
|
|
1185
|
+
env?: "production" | "dev";
|
|
1186
|
+
/** Forward incoming XMTP messages to gateway inbox (default: true) */
|
|
1187
|
+
bridgeToGateway?: boolean;
|
|
1188
|
+
/** Max messages per conversation per minute (default: 60) */
|
|
1189
|
+
perConversationRateLimit?: number;
|
|
1190
|
+
/** Max total messages per minute (default: 300) */
|
|
1191
|
+
totalRateLimit?: number;
|
|
1192
|
+
}
|
|
1193
|
+
//# sourceMappingURL=types.d.ts.map
|