From 3b16a4c63d1e68255b36dbf6e1bc723485bc87aa Mon Sep 17 00:00:00 2001 From: WuEcho Date: Mon, 6 Jan 2025 12:20:36 +0800 Subject: [PATCH 01/24] add primus plugin --- agent/package.json | 1 + agent/src/index.ts | 13 ++ packages/plugin-primus/README.md | 101 +++++++++++++ packages/plugin-primus/package.json | 22 +++ packages/plugin-primus/src/index.ts | 208 +++++++++++++++++++++++++++ packages/plugin-primus/tsconfig.json | 10 ++ 6 files changed, 355 insertions(+) create mode 100644 packages/plugin-primus/README.md create mode 100644 packages/plugin-primus/package.json create mode 100644 packages/plugin-primus/src/index.ts create mode 100644 packages/plugin-primus/tsconfig.json diff --git a/agent/package.json b/agent/package.json index 7020df2de6..12e7fdc5d1 100644 --- a/agent/package.json +++ b/agent/package.json @@ -59,6 +59,7 @@ "@elizaos/plugin-multiversx": "workspace:*", "@elizaos/plugin-near": "workspace:*", "@elizaos/plugin-reclaim": "workspace:*", + "@elizaos/plugin-primus": "workspace:*", "@elizaos/plugin-zksync-era": "workspace:*", "@elizaos/plugin-twitter": "workspace:*", "@elizaos/plugin-cronoszkevm": "workspace:*", diff --git a/agent/src/index.ts b/agent/src/index.ts index b4e993f377..bba791e67c 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -9,6 +9,8 @@ import { SlackClientInterface } from "@elizaos/client-slack"; import { TelegramClientInterface } from "@elizaos/client-telegram"; import { TwitterClientInterface } from "@elizaos/client-twitter"; import { ReclaimAdapter } from "@elizaos/plugin-reclaim"; +import { PrimusAdapter } from "@elizaos/plugin-primus"; + import { AgentRuntime, CacheManager, @@ -540,6 +542,17 @@ export async function createAgent( token, }); elizaLogger.log("Verifiable inference adapter initialized"); + }else if ( + process.env.PRIMUS_APP_ID && + process.env.PRIMUS_APP_SECRET && + process.env.VERIFIABLE_INFERENCE_ENABLED === "true"){ + verifiableInferenceAdapter = new PrimusAdapter({ + appId: process.env.PRIMUS_APP_ID, + appSecret: process.env.PRIMUS_APP_SECRET, + modelProvider: character.modelProvider, + token, + }); + elizaLogger.log("Verifiable inference primus adapter initialized"); } return new AgentRuntime({ diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md new file mode 100644 index 0000000000..11e263695e --- /dev/null +++ b/packages/plugin-primus/README.md @@ -0,0 +1,101 @@ +# @elizaos/plugin-primus + +This adapter integrates Primus Protocol into ElizaOS, enabling verifiable inference results from various AI model providers. It implements the `IVerifiableInferenceAdapter` interface, making it compatible with other verifiable inference solutions. + +## Installation + +```bash +pnpm add @elizaos/plugin-primus +``` + +## Configuration + +Add the following environment variables to your `.env` file: + +```env +PRIMUS_APP_ID=your_app_id +PRIMUS_APP_SECRET=your_app_secret +``` + +## Usage + +```typescript +import { PrimusAdapter } from "@elizaos/plugin-primus"; +import { VerifiableInferenceOptions } from "@elizaos/core"; + +// Initialize the adapter +const primusAdapter = new PrimusAdapter(runtime, { + appId: process.env.PRIMUS_APP_ID, + appSecret: process.env.PRIMUS_APP_SECRET, +}); + +// Generate text with verifiable results +const options: VerifiableInferenceOptions = { + // Optional: Override the default endpoint + endpoint: "https://custom-api.example.com", + // Optional: Add custom headers + headers: { + "X-Custom-Header": "value", + }, + // Optional: Provider-specific options + providerOptions: { + temperature: 0.7, + }, +}; + +const result = await primusAdapter.generateText( + "What is Node.js?", + "gpt-4", + options +); + +console.log("Response:", result.text); +console.log("Proof:", result.proof); + +// Verify the proof +const isValid = await primusAdapter.verifyProof(result); +console.log("Proof is valid:", isValid); +``` + +## Features + +- Implements `IVerifiableInferenceAdapter` interface for standardized verifiable inference +- Zero-knowledge proofs for AI model responses +- Support for multiple AI model providers: + - OpenAI + - Anthropic + - Google + - More coming soon +- Customizable options for each request +- Built-in proof verification + +## Response Format + +The adapter returns a `VerifiableInferenceResult` object containing: + +```typescript +{ + text: string; // The generated text response + proof: unknown; // The proof data + provider: string; // The provider name (e.g., "reclaim") + timestamp: number; // Generation timestamp + metadata?: { // Optional metadata + modelProvider: string; + modelClass: string; + endpoint: string; + } +} +``` + +## How it Works + +The Primus adapter wraps AI model API calls with zero-knowledge proofs using the `@primusprotocol/zk-fetch` library. This allows you to: + +1. Make verifiable API calls to AI model providers +2. Generate proofs of the responses +3. Verify the authenticity of the responses +4. Ensure the responses haven't been tampered with + +## License + +MIT \ No newline at end of file diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json new file mode 100644 index 0000000000..1b96517a40 --- /dev/null +++ b/packages/plugin-primus/package.json @@ -0,0 +1,22 @@ +{ + "name": "@elizaos/plugin-primus", + "version": "0.1.7-alpha.2", + "description": "Primus Protocol plugin for ElizaOS", + "main": "dist/index.js", + "type": "module", + "types": "dist/index.d.ts", + "scripts": { + "build": "tsup src/index.ts --format esm --dts", + "lint": "eslint --fix --cache .", + "watch": "tsc --watch", + "dev": "tsup src/index.ts --format esm --dts --watch" + }, + "dependencies": { + "@elizaos/core": "workspace:*", + "@primuslabs/zktls-core-sdk": "^0.1.0", + "dotenv": "^16.4.5" + }, + "devDependencies": { + "tsup": "^8.3.5" + } +} \ No newline at end of file diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts new file mode 100644 index 0000000000..3d86702a63 --- /dev/null +++ b/packages/plugin-primus/src/index.ts @@ -0,0 +1,208 @@ +import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; +import { + IVerifiableInferenceAdapter, + VerifiableInferenceOptions, + VerifiableInferenceResult, + VerifiableInferenceProvider, + ModelProviderName, + models, +} from "@elizaos/core"; +import { PrimusZKTLS } from "@primuslabs/zktls-js-sdk"; + +interface PrimusOptions { + appId: string; + appSecret: string; + modelProvider?: ModelProviderName; + token?: string; +} + +export class PrimusAdapter implements IVerifiableInferenceAdapter { + private client: PrimusCoreTLS; + private options: PrimusOptions; + + constructor(options: PrimusOptions) { + this.options = options; + const zkTLS = new PrimusCoreTLS(); + zkTLS.init(this.options.appId, this.options.appSecret); + this.client = zkTLS; + } + + async generateText( + context: string, + modelClass: string, + options?: VerifiableInferenceOptions + ): Promise { + const provider = this.options.modelProvider || ModelProviderName.OPENAI; + const baseEndpoint = options?.endpoint || models[provider].endpoint; + const model = models[provider].model[modelClass]; + const apiKey = this.options.token; + + if (!apiKey) { + throw new Error( + `API key (token) is required for provider: ${provider}` + ); + } + + // Get provider-specific endpoint + let endpoint; + let authHeader; + let responseRegex; + + switch (provider) { + case ModelProviderName.OPENAI: + case ModelProviderName.ETERNALAI: + case ModelProviderName.REDPILL: + case ModelProviderName.NANOGPT: + case ModelProviderName.HYPERBOLIC: + endpoint = `${baseEndpoint}/chat/completions`; + authHeader = `Bearer ${apiKey}`; + responseRegex = + "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + break; + case ModelProviderName.ANTHROPIC: + case ModelProviderName.CLAUDE_VERTEX: + endpoint = `${baseEndpoint}/messages`; + authHeader = `Bearer ${apiKey}`; + responseRegex = + "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + break; + case ModelProviderName.GOOGLE: + endpoint = `${baseEndpoint}/models/${model}:generateContent`; + authHeader = `Bearer ${apiKey}`; + responseRegex = "(?\\{.*\\})"; + break; + case ModelProviderName.ALI_BAILIAN: + endpoint = `${baseEndpoint}/chat/completions`; + authHeader = `Bearer ${apiKey}`; + responseRegex = "(?\\{.*\\})"; + break; + case ModelProviderName.VOLENGINE: + endpoint = `${baseEndpoint}/text/generation`; + authHeader = `Bearer ${apiKey}`; + responseRegex = "(?\\{.*\\})"; + break; + case ModelProviderName.LLAMACLOUD: + case ModelProviderName.TOGETHER: + case ModelProviderName.AKASH_CHAT_API: + endpoint = `${baseEndpoint}/chat/completions`; + authHeader = `Bearer ${apiKey}`; + responseRegex = + "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + break; + default: + throw new Error(`Unsupported model provider: ${provider}`); + } + + const headers = { + "Content-Type": "application/json", + ...options?.headers, + }; + + try { + let body; + // Handle different API formats + switch (provider) { + case ModelProviderName.OPENAI: + case ModelProviderName.ETERNALAI: + case ModelProviderName.ALI_BAILIAN: + case ModelProviderName.VOLENGINE: + case ModelProviderName.LLAMACLOUD: + case ModelProviderName.NANOGPT: + case ModelProviderName.HYPERBOLIC: + case ModelProviderName.TOGETHER: + case ModelProviderName.AKASH_CHAT_API: + body = { + model, + messages: [{ role: "user", content: context }], + temperature: + options?.providerOptions?.temperature || + models[provider].settings.temperature, + }; + break; + case ModelProviderName.ANTHROPIC: + case ModelProviderName.CLAUDE_VERTEX: + body = { + model, + messages: [{ role: "user", content: context }], + max_tokens: models[provider].settings.maxOutputTokens, + temperature: + options?.providerOptions?.temperature || + models[provider].settings.temperature, + }; + break; + case ModelProviderName.GOOGLE: + body = { + model, + contents: [ + { role: "user", parts: [{ text: context }] }, + ], + generationConfig: { + temperature: + options?.providerOptions?.temperature || + models[provider].settings.temperature, + }, + }; + break; + default: + throw new Error(`Unsupported model provider: ${provider}`); + } + + // modify by echo wu this place need to be check again + this.client.setAdditionParams({ + agentName: "eliza-agent", + }) + const attestation = await this.client.startAttestation(this.client.generateRequestParams( + { + url: endpoint, + method: "POST", + headers, + body: JSON.stringify(body), + }, + [ + { + keyName: 'code', + parsePath: '$.code', + parseType: 'string' + } + ] + )) + + // Extract text based on provider format + // const response = JSON.parse(proof.extractedParameterValues.response); + const response = JSON.parse(attestation.reponseResolve); + let text = ""; + switch (provider) { + case ModelProviderName.GOOGLE: + text = + response.candidates?.[0]?.content?.parts?.[0]?.text || + ""; + break; + case ModelProviderName.ANTHROPIC: + case ModelProviderName.CLAUDE_VERTEX: + text = response.content?.[0]?.text || ""; + break; + default: + text = response.choices?.[0]?.message?.content || ""; + } + + return { + text, + proof: attestation, + provider: VerifiableInferenceProvider.PRIMUS, + timestamp: Date.now(), + }; + } catch (error) { + console.error("Error in Primus generateText:", error); + throw error; + } + } + + async verifyProof(result: VerifiableInferenceResult): Promise { + // Primus response is self-verifying + const isValid = await PrimusCoreTLS.verifyAttestation(result.proof as attestation); + console.log("Proof is valid:", isValid); + return isValid; + } +} + +export default PrimusAdapter; \ No newline at end of file diff --git a/packages/plugin-primus/tsconfig.json b/packages/plugin-primus/tsconfig.json new file mode 100644 index 0000000000..73993deaaf --- /dev/null +++ b/packages/plugin-primus/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../core/tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**/*.ts" + ] +} \ No newline at end of file From b6eae8d5d37c7a163d303ac9e1c7e010b88887a9 Mon Sep 17 00:00:00 2001 From: fksyuan Date: Mon, 6 Jan 2025 18:03:32 +0800 Subject: [PATCH 02/24] update primus zktls core sdk invoke --- packages/core/src/types.ts | 1 + packages/plugin-primus/package.json | 2 +- packages/plugin-primus/src/index.ts | 69 ++++++++++++----------------- 3 files changed, 30 insertions(+), 42 deletions(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index c510ba7778..8fb83f6c25 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1338,6 +1338,7 @@ export interface ISlackService extends Service { */ export enum VerifiableInferenceProvider { RECLAIM = "reclaim", + PRIMUS = "primus", } /** diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json index 1b96517a40..ede49d246f 100644 --- a/packages/plugin-primus/package.json +++ b/packages/plugin-primus/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@elizaos/core": "workspace:*", - "@primuslabs/zktls-core-sdk": "^0.1.0", + "@fksyuan/zktls-core-sdk": "^0.1.1", "dotenv": "^16.4.5" }, "devDependencies": { diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 3d86702a63..deb00151fa 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -1,4 +1,4 @@ -import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; +import { PrimusCoreTLS, Attestation } from "@fksyuan/zktls-core-sdk"; import { IVerifiableInferenceAdapter, VerifiableInferenceOptions, @@ -7,7 +7,6 @@ import { ModelProviderName, models, } from "@elizaos/core"; -import { PrimusZKTLS } from "@primuslabs/zktls-js-sdk"; interface PrimusOptions { appId: string; @@ -46,7 +45,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { // Get provider-specific endpoint let endpoint; let authHeader; - let responseRegex; + let responseParsePath; switch (provider) { case ModelProviderName.OPENAI: @@ -56,38 +55,38 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { case ModelProviderName.HYPERBOLIC: endpoint = `${baseEndpoint}/chat/completions`; authHeader = `Bearer ${apiKey}`; - responseRegex = - "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + responseParsePath = + "$.choices[0].message.content"; break; case ModelProviderName.ANTHROPIC: case ModelProviderName.CLAUDE_VERTEX: endpoint = `${baseEndpoint}/messages`; authHeader = `Bearer ${apiKey}`; - responseRegex = - "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + responseParsePath = + "$.content[0].text"; break; case ModelProviderName.GOOGLE: endpoint = `${baseEndpoint}/models/${model}:generateContent`; authHeader = `Bearer ${apiKey}`; - responseRegex = "(?\\{.*\\})"; + responseParsePath = "$.candidates[0].content.parts[0].text"; break; case ModelProviderName.ALI_BAILIAN: endpoint = `${baseEndpoint}/chat/completions`; authHeader = `Bearer ${apiKey}`; - responseRegex = "(?\\{.*\\})"; + responseParsePath = "$.choices[0].message.content"; break; case ModelProviderName.VOLENGINE: endpoint = `${baseEndpoint}/text/generation`; authHeader = `Bearer ${apiKey}`; - responseRegex = "(?\\{.*\\})"; + responseParsePath = "$.choices[0].message.content"; break; case ModelProviderName.LLAMACLOUD: case ModelProviderName.TOGETHER: case ModelProviderName.AKASH_CHAT_API: endpoint = `${baseEndpoint}/chat/completions`; authHeader = `Bearer ${apiKey}`; - responseRegex = - "\\r\\n\\r\\n[a-f0-9]+\\r\\n(?\\{.*\\})"; + responseParsePath = + "$.choices[0].message.content"; break; default: throw new Error(`Unsupported model provider: ${provider}`); @@ -96,6 +95,12 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { const headers = { "Content-Type": "application/json", ...options?.headers, + ...(provider === ModelProviderName.ANTHROPIC || provider === ModelProviderName.CLAUDE_VERTEX + ? { + "anthropic-version": "2023-06-01", + "x-api-key": apiKey + } + : { "Authorization": authHeader }), }; try { @@ -116,7 +121,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { messages: [{ role: "user", content: context }], temperature: options?.providerOptions?.temperature || - models[provider].settings.temperature, + models[provider].model[modelClass].temperature, }; break; case ModelProviderName.ANTHROPIC: @@ -124,10 +129,10 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { body = { model, messages: [{ role: "user", content: context }], - max_tokens: models[provider].settings.maxOutputTokens, + max_tokens: models[provider].model[modelClass].maxOutputTokens, temperature: options?.providerOptions?.temperature || - models[provider].settings.temperature, + models[provider].model[modelClass].temperature, }; break; case ModelProviderName.GOOGLE: @@ -139,7 +144,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { generationConfig: { temperature: options?.providerOptions?.temperature || - models[provider].settings.temperature, + models[provider].model[modelClass].temperature, }, }; break; @@ -147,44 +152,26 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { throw new Error(`Unsupported model provider: ${provider}`); } - // modify by echo wu this place need to be check again - this.client.setAdditionParams({ - agentName: "eliza-agent", - }) const attestation = await this.client.startAttestation(this.client.generateRequestParams( { url: endpoint, method: "POST", - headers, + header: headers, body: JSON.stringify(body), }, - [ + [ { - keyName: 'code', - parsePath: '$.code', + keyName: 'content', + parsePath: responseParsePath, parseType: 'string' } ] - )) + )); // Extract text based on provider format // const response = JSON.parse(proof.extractedParameterValues.response); const response = JSON.parse(attestation.reponseResolve); - let text = ""; - switch (provider) { - case ModelProviderName.GOOGLE: - text = - response.candidates?.[0]?.content?.parts?.[0]?.text || - ""; - break; - case ModelProviderName.ANTHROPIC: - case ModelProviderName.CLAUDE_VERTEX: - text = response.content?.[0]?.text || ""; - break; - default: - text = response.choices?.[0]?.message?.content || ""; - } - + let text = JSON.parse(response.data).content; return { text, proof: attestation, @@ -199,7 +186,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { async verifyProof(result: VerifiableInferenceResult): Promise { // Primus response is self-verifying - const isValid = await PrimusCoreTLS.verifyAttestation(result.proof as attestation); + const isValid = await this.client.verifyAttestation(result.proof as Attestation); console.log("Proof is valid:", isValid); return isValid; } From de6b98257b9550632da5ea66aac7aae237777ecd Mon Sep 17 00:00:00 2001 From: fksyuan Date: Mon, 6 Jan 2025 20:39:56 +0800 Subject: [PATCH 03/24] fix model name bug and update primus attestation decode --- packages/plugin-primus/package.json | 2 +- packages/plugin-primus/src/index.ts | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json index ede49d246f..96250b88a4 100644 --- a/packages/plugin-primus/package.json +++ b/packages/plugin-primus/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@elizaos/core": "workspace:*", - "@fksyuan/zktls-core-sdk": "^0.1.1", + "@fksyuan/zktls-core-sdk": "^0.1.3", "dotenv": "^16.4.5" }, "devDependencies": { diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index deb00151fa..9b120729a8 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -117,7 +117,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { case ModelProviderName.TOGETHER: case ModelProviderName.AKASH_CHAT_API: body = { - model, + model: model.name, messages: [{ role: "user", content: context }], temperature: options?.providerOptions?.temperature || @@ -127,7 +127,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { case ModelProviderName.ANTHROPIC: case ModelProviderName.CLAUDE_VERTEX: body = { - model, + model: model.name, messages: [{ role: "user", content: context }], max_tokens: models[provider].model[modelClass].maxOutputTokens, temperature: @@ -137,7 +137,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { break; case ModelProviderName.GOOGLE: body = { - model, + model: model.name, contents: [ { role: "user", parts: [{ text: context }] }, ], @@ -168,10 +168,8 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { ] )); - // Extract text based on provider format - // const response = JSON.parse(proof.extractedParameterValues.response); - const response = JSON.parse(attestation.reponseResolve); - let text = JSON.parse(response.data).content; + const responseData = JSON.parse(attestation.data); + let text = JSON.parse(responseData.content); return { text, proof: attestation, From 1a098b449d05e3f1f7dcee466987c621a650d0a4 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Tue, 7 Jan 2025 15:18:28 +0800 Subject: [PATCH 04/24] Proof provider and action for twitter-plugin --- .env.example | 3 + agent/package.json | 1 + packages/plugin-primus/package.json | 4 +- packages/plugin-primus/src/index.ts | 11 +- packages/plugin-twitter-primus/.npmignore | 6 + packages/plugin-twitter-primus/README.md | 282 ++++ packages/plugin-twitter-primus/package.json | 32 + .../plugin-twitter-primus/src/actions/post.ts | 208 +++ packages/plugin-twitter-primus/src/index.ts | 13 + .../src/provider/tweetProvider.ts | 28 + .../plugin-twitter-primus/src/templates.ts | 22 + packages/plugin-twitter-primus/src/types.ts | 13 + .../src/util/ScraperWithPrimus.ts | 268 +++ packages/plugin-twitter-primus/tsconfig.json | 9 + packages/plugin-twitter-primus/tsup.config.ts | 10 + pnpm-lock.yaml | 1482 ++++++++--------- 16 files changed, 1639 insertions(+), 753 deletions(-) create mode 100644 packages/plugin-twitter-primus/.npmignore create mode 100644 packages/plugin-twitter-primus/README.md create mode 100644 packages/plugin-twitter-primus/package.json create mode 100644 packages/plugin-twitter-primus/src/actions/post.ts create mode 100644 packages/plugin-twitter-primus/src/index.ts create mode 100644 packages/plugin-twitter-primus/src/provider/tweetProvider.ts create mode 100644 packages/plugin-twitter-primus/src/templates.ts create mode 100644 packages/plugin-twitter-primus/src/types.ts create mode 100644 packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts create mode 100644 packages/plugin-twitter-primus/tsconfig.json create mode 100644 packages/plugin-twitter-primus/tsup.config.ts diff --git a/.env.example b/.env.example index 4b3bc9eb44..f8e262def5 100644 --- a/.env.example +++ b/.env.example @@ -79,6 +79,9 @@ TWITTER_PASSWORD= # Account password TWITTER_EMAIL= # Account email TWITTER_2FA_SECRET= +# For @eliza/plugin-twitter-primus +TWITTER_USER_ID_WANT_TO_GET_TWEET= #The user who you want to fetch the latest posts. Please use user-id + TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with diff --git a/agent/package.json b/agent/package.json index 12e7fdc5d1..cb6ea761aa 100644 --- a/agent/package.json +++ b/agent/package.json @@ -62,6 +62,7 @@ "@elizaos/plugin-primus": "workspace:*", "@elizaos/plugin-zksync-era": "workspace:*", "@elizaos/plugin-twitter": "workspace:*", + "@elizaos/plugin-twitter-primus": "workspace:*", "@elizaos/plugin-cronoszkevm": "workspace:*", "@elizaos/plugin-3d-generation": "workspace:*", "@elizaos/plugin-fuel": "workspace:*", diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json index 96250b88a4..c0dd270bf6 100644 --- a/packages/plugin-primus/package.json +++ b/packages/plugin-primus/package.json @@ -13,10 +13,10 @@ }, "dependencies": { "@elizaos/core": "workspace:*", - "@fksyuan/zktls-core-sdk": "^0.1.3", + "@fksyuan/zktls-core-sdk": "^0.1.4", "dotenv": "^16.4.5" }, "devDependencies": { "tsup": "^8.3.5" } -} \ No newline at end of file +} diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 9b120729a8..6dfa84cf66 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -5,7 +5,7 @@ import { VerifiableInferenceResult, VerifiableInferenceProvider, ModelProviderName, - models, + models, elizaLogger, } from "@elizaos/core"; interface PrimusOptions { @@ -151,7 +151,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { default: throw new Error(`Unsupported model provider: ${provider}`); } - + const start = new Date(); const attestation = await this.client.startAttestation(this.client.generateRequestParams( { url: endpoint, @@ -167,6 +167,11 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { } ] )); + const end = new Date(); + + elizaLogger.info( + `request openAI cost:${end.getTime() - start.getTime()}ms` + ); const responseData = JSON.parse(attestation.data); let text = JSON.parse(responseData.content); @@ -190,4 +195,4 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { } } -export default PrimusAdapter; \ No newline at end of file +export default PrimusAdapter; diff --git a/packages/plugin-twitter-primus/.npmignore b/packages/plugin-twitter-primus/.npmignore new file mode 100644 index 0000000000..0468b4b364 --- /dev/null +++ b/packages/plugin-twitter-primus/.npmignore @@ -0,0 +1,6 @@ +* + +!dist/** +!package.json +!readme.md +!tsup.config.ts diff --git a/packages/plugin-twitter-primus/README.md b/packages/plugin-twitter-primus/README.md new file mode 100644 index 0000000000..f6b5fa2795 --- /dev/null +++ b/packages/plugin-twitter-primus/README.md @@ -0,0 +1,282 @@ +# @elizaos/plugin-twitter-primus + +A plugin for Twitter/X integration, providing automated tweet posting capabilities with character-aware content generation. + +## Overview + +This plugin provides functionality to: + +- Compose context-aware tweets +- Post tweets to Twitter/X platform +- Handle authentication and session management +- Support premium Twitter features +- Manage tweet length restrictions + +## Installation + +```bash +npm install @elizaos/plugin-twitter-primus +``` + +## Configuration + +The plugin requires the following environment variables: + +```env +TWITTER_USERNAME=your_username +TWITTER_PASSWORD=your_password +TWITTER_EMAIL=your_email # Optional: for 2FA +TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA +TWITTER_PREMIUM=false # Optional: enables premium features +TWITTER_DRY_RUN=false # Optional: test without posting + +TWITTER_USER_ID_WANT_TO_GET_TWEET=123456677 # Must: Which user the tweet came from +``` + +## Usage + +Import and register the plugin in your Eliza configuration: + +```typescript +import { twitterPlugin } from "@elizaos/plugin-twitter-primus"; + +export default { + plugins: [twitterPlugin], + // ... other configuration +}; +``` + +## Features + +### Tweet Getting + +The plugin uses context-aware templates to generate appropriate tweets: + +```typescript +import { postAction } from "@elizaos/plugin-twitter-primus"; + +// Tweet will be composed based on context and character limits +const result = await postAction.handler(runtime, message, state); +``` + +### Tweet Summary + + +### Tweet Posting + +```typescript +// Post with automatic content generation +await postAction.handler(runtime, message, state); + +// Dry run mode (for testing) +process.env.TWITTER_DRY_RUN = "true"; +await postAction.handler(runtime, message, state); +``` + +## Development + +### Building + +```bash +npm run build +``` + +### Testing + +```bash +npm run test +``` + +### Development Mode + +```bash +npm run dev +``` + +## Dependencies + +- `@elizaos/core`: Core Eliza functionality +- `agent-twitter-client`: Twitter API client +- `@primuslabs/zktls-core-sdk`: ZK-TLS SDK provided by Primus Labs +- `tsup`: Build tool +- Other standard dependencies listed in package.json + +## API Reference + +### Core Interfaces + +```typescript +interface TweetContent { + text: string; +} + +// Tweet Schema +const TweetSchema = z.object({ + text: z.string().describe("The text of the tweet"), +}); + +// Action Interface +interface Action { + name: "POST_TWEET"; + similes: string[]; + description: string; + validate: ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ) => Promise; + handler: ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ) => Promise; + examples: Array>; +} +``` + +### Plugin Methods + +- `postAction.handler`: Main method for posting tweets +- `postAction.validate`: Validates Twitter credentials +- `composeTweet`: Internal method for tweet generation +- `postTweet`: Internal method for tweet posting + +## Common Issues/Troubleshooting + +### Issue: Authentication Failures + +- **Cause**: Invalid credentials or 2FA configuration +- **Solution**: Verify credentials and 2FA setup + +### Issue: Tweet Length Errors + +- **Cause**: Content exceeds Twitter's character limit +- **Solution**: Enable TWITTER_PREMIUM for extended tweets or ensure content is within limits + +### Issue: Rate Limiting + +- **Cause**: Too many requests in short time +- **Solution**: Implement proper request throttling + +## Security Best Practices + +- Store credentials securely using environment variables +- Use 2FA when possible +- Implement proper error handling +- Keep dependencies updated +- Use dry run mode for testing +- Monitor Twitter API usage + +## Template System + +The plug-in uses a complex template system to generate a summary of tweets: + +```typescript +export const summarizeTweetTemplate = ` +# Context +{{twitterContent}} + +# Topics +{{topics}} + +# Post Directions +{{postDirections}} + +# Recent interactions between {{agentName}} and other users: +{{recentPostInteractions}} + +# Task +Generate a tweet that: +1. Summarize the input +2. The content does not contain emoji +3. Must be less than 200 characters (this is a strict requirement) +4. The key information should be retained +5. Is concise and engaging + +Generate only the tweet text, no other commentary.`; +``` + +## Future Enhancements + +1. **Content Generation** + + - Advanced context awareness + - Multi-language support + - Style customization + - Hashtag optimization + - Media generation + - Thread composition + +2. **Engagement Features** + + - Auto-reply system + - Engagement analytics + - Follower management + - Interaction scheduling + - Sentiment analysis + - Community management + +3. **Tweet Management** + + - Thread management + - Tweet scheduling + - Content moderation + - Archive management + - Delete automation + - Edit optimization + +4. **Analytics Integration** + + - Performance tracking + - Engagement metrics + - Audience insights + - Trend analysis + - ROI measurement + - Custom reporting + +5. **Authentication** + + - OAuth improvements + - Multi-account support + - Session management + - Rate limit handling + - Security enhancements + - Backup mechanisms + +6. **Developer Tools** + - Enhanced debugging + - Testing framework + - Documentation generator + - Integration templates + - Error handling + - Logging system + +We welcome community feedback and contributions to help prioritize these enhancements. + +## Contributing + +Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information. + +## Credits + +This plugin integrates with and builds upon several key technologies: + +- [Twitter/X API](https://developer.twitter.com/en/docs): Official Twitter platform API +- [agent-twitter-client](https://www.npmjs.com/package/agent-twitter-client): Twitter API client library +- [Zod](https://github.com/colinhacks/zod): TypeScript-first schema validation + +Special thanks to: + +- The Twitter/X Developer Platform team +- The agent-twitter-client maintainers for API integration tools +- The Eliza community for their contributions and feedback + +For more information about Twitter/X integration capabilities: + +- [Twitter API Documentation](https://developer.twitter.com/en/docs) +- [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard) +- [Twitter API Best Practices](https://developer.twitter.com/en/docs/twitter-api/rate-limits) + +## License + +This plugin is part of the Eliza project. See the main project repository for license information. diff --git a/packages/plugin-twitter-primus/package.json b/packages/plugin-twitter-primus/package.json new file mode 100644 index 0000000000..80a3bf273c --- /dev/null +++ b/packages/plugin-twitter-primus/package.json @@ -0,0 +1,32 @@ +{ + "name": "@elizaos/plugin-twitter-primus", + "version": "0.1.7", + "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], + "dependencies": { + "@elizaos/core": "workspace:*", + "agent-twitter-client": "0.0.18", + "@fksyuan/zktls-core-sdk": "^0.1.4", + "tsup": "8.3.5" + }, + "scripts": { + "build": "tsup --format esm --dts", + "dev": "tsup --format esm --dts --watch", + "test": "vitest run" + } +} diff --git a/packages/plugin-twitter-primus/src/actions/post.ts b/packages/plugin-twitter-primus/src/actions/post.ts new file mode 100644 index 0000000000..5971642fca --- /dev/null +++ b/packages/plugin-twitter-primus/src/actions/post.ts @@ -0,0 +1,208 @@ +import { + Action, composeContext, + elizaLogger, generateMessageResponse, generateObject, + IAgentRuntime, + Memory, ModelClass, + State, +} from "@elizaos/core"; +import { ScraperWithPrimus } from "../util/ScraperWithPrimus.ts"; +import { tweetProvider } from "../provider/tweetProvider.ts"; +import {isTweetContent, TweetSchema} from "../types.ts"; +import {summarizeTweetTemplate} from "../templates.ts"; + + +async function summaryTweetContent( + runtime: IAgentRuntime, + _message: Memory, + state?: State +): Promise { + try { + const context = composeContext({ + state, + template: summarizeTweetTemplate, + }); + + const tweetContentObject = await generateObject({ + runtime, + context, + modelClass: ModelClass.SMALL, + schema: TweetSchema, + stop: ["\n"], + }); + + if (!isTweetContent(tweetContentObject.object)) { + elizaLogger.error( + "Invalid tweet content:", + tweetContentObject.object + ); + return; + } + + const trimmedContent = tweetContentObject.object.text.trim(); + + // Skip truncation if TWITTER_PREMIUM is true + if ( + process.env.TWITTER_PREMIUM?.toLowerCase() !== "true" && + trimmedContent.length > 200 + ) { + elizaLogger.warn( + `Tweet too long (${trimmedContent.length} chars), truncating...` + ); + return trimmedContent.substring(0, 199) + "..."; + } + + return trimmedContent; + } catch (error) { + elizaLogger.error("Error composing tweet:", error); + throw error; + } +} + + +async function postTweet(content: string): Promise { + try { + const scraperWithPrimus = new ScraperWithPrimus(); + await scraperWithPrimus.login(); + if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { + elizaLogger.error("Failed to login to Twitter"); + return false; + } + + // Send the tweet + elizaLogger.log("Attempting to send tweet:", content); + const result = await scraperWithPrimus.sendTweet(content); + + elizaLogger.log("Tweet response:", result); + + // Check for Twitter API errors + if (!result) { + elizaLogger.error( + `Twitter API error ${result}` + ); + return false; + } + return true; + } catch (error) { + // Log the full error details + elizaLogger.error("Error posting tweet:", { + message: error.message, + stack: error.stack, + name: error.name, + cause: error.cause, + }); + return false; + } +} + +export const postAction: Action = { + description: "Post a tweet on Twitter and be verified by Primus", + examples: [ + [ + { + user: "{{user1}}", + content: { + text: "Get the latest tweet and post it on my twitter.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "The latest tweet has posted.", + action: "POST_TWEET", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { + text: "Help post a tweet which content from other tweet.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "Completed!", + action: "POST_TWEET", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { + text: "Post a tweet on twitter for me.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "I'll post the latest tweet to your Twitter account now!", + action: "POST_TWEET", + }, + }, + ], + ], + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ): Promise => { + //check VERIFIABLE_INFERENCE_ENABLED + if(!((process.env.VERIFIABLE_INFERENCE_ENABLED === "true")&&process.env.PRIMUS_APP_ID&&process.env.PRIMUS_APP_SECRET)){ + elizaLogger.error(`Parameter 'VERIFIABLE_INFERENCE_ENABLED' not set, Eliza will run this action!`); + return false; + } + + try { + elizaLogger.log(`Eliza will run with plugin-twitter-primus!`); + // Generate tweet content using context + const twitterContent = await tweetProvider.get( + runtime, + message, + state + ); + + if (!twitterContent) { + elizaLogger.error("No content get from twitter"); + return false; + } + + elizaLogger.log(`Content from twitter: ${twitterContent}`); + + //Summary the content + state['twitterContent'] = twitterContent; + const contentSummaryByAI = await summaryTweetContent(runtime, message, state); + //log + elizaLogger.log(`Summary content from twitter: ${contentSummaryByAI}`); + // Check for dry run mode - explicitly check for string "true" + if ( + process.env.TWITTER_DRY_RUN && + process.env.TWITTER_DRY_RUN.toLowerCase() === "true" + ) { + elizaLogger.info( + `Dry run: would have posted tweet: ${contentSummaryByAI}` + ); + return true; + } + + return await postTweet(contentSummaryByAI); + } catch (error) { + elizaLogger.error("Error in post action:", error); + return false; + } + }, + name: "POST_TWEET", + similes: ["TWEET", "POST", "SEND_TWEET"], + validate: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ) => { + const hasCredentials = + !!process.env.TWITTER_USERNAME && !!process.env.TWITTER_PASSWORD; + elizaLogger.log(`Has credentials: ${hasCredentials}`); + + return hasCredentials; + }, +}; diff --git a/packages/plugin-twitter-primus/src/index.ts b/packages/plugin-twitter-primus/src/index.ts new file mode 100644 index 0000000000..4c5e198319 --- /dev/null +++ b/packages/plugin-twitter-primus/src/index.ts @@ -0,0 +1,13 @@ +import { Plugin } from "@elizaos/core"; +import { postAction } from "./actions/post"; +import {tweetProvider} from "./provider/tweetProvider.ts"; + +export const twitterPlugin: Plugin = { + name: "twitter", + description: "Twitter integration plugin for posting tweets with proof generated by primus", + actions: [postAction], + evaluators: [], + providers: [], +}; + +export default twitterPlugin; diff --git a/packages/plugin-twitter-primus/src/provider/tweetProvider.ts b/packages/plugin-twitter-primus/src/provider/tweetProvider.ts new file mode 100644 index 0000000000..29d72c32ed --- /dev/null +++ b/packages/plugin-twitter-primus/src/provider/tweetProvider.ts @@ -0,0 +1,28 @@ +import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; +import {ScraperWithPrimus} from "../util/ScraperWithPrimus.ts"; + +const tweetProvider: Provider = { + get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { + const scraperWithPrimus = new ScraperWithPrimus(); + elizaLogger.info("Login to Twitter") + await scraperWithPrimus.login() + elizaLogger.info("Login to Twitter success") + + if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { + elizaLogger.error("Failed to login to Twitter"); + return false; + } + const userId = process.env.TWITTER_USER_ID_WANT_TO_GET_TWEET; + if(!userId){ + elizaLogger.error("TWITTER_USER_ID_WANT_TO_GET_TWEET is not set"); + return false; + } + + const result = await scraperWithPrimus.getUserLatestTweet(userId); + //log + elizaLogger.log("Tweet response:", result); + return result; + }, +}; + +export { tweetProvider }; diff --git a/packages/plugin-twitter-primus/src/templates.ts b/packages/plugin-twitter-primus/src/templates.ts new file mode 100644 index 0000000000..15313d0566 --- /dev/null +++ b/packages/plugin-twitter-primus/src/templates.ts @@ -0,0 +1,22 @@ +export const summarizeTweetTemplate = ` +# Context +{{twitterContent}} + +# Topics +{{topics}} + +# Post Directions +{{postDirections}} + +# Recent interactions between {{agentName}} and other users: +{{recentPostInteractions}} + +# Task +Generate a tweet that: +1. Summarize the input +2. The content does not contain emoji +3. Must be less than 200 characters (this is a strict requirement) +4. The key information should be retained +5. Is concise and engaging + +Generate only the tweet text, no other commentary.`; diff --git a/packages/plugin-twitter-primus/src/types.ts b/packages/plugin-twitter-primus/src/types.ts new file mode 100644 index 0000000000..1f4537b0ac --- /dev/null +++ b/packages/plugin-twitter-primus/src/types.ts @@ -0,0 +1,13 @@ +import { z } from "zod"; + +export interface TweetContent { + text: string; +} + +export const TweetSchema = z.object({ + text: z.string().describe("The text of the tweet"), +}); + +export const isTweetContent = (obj: any): obj is TweetContent => { + return TweetSchema.safeParse(obj).success; +}; diff --git a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts new file mode 100644 index 0000000000..8591a937c8 --- /dev/null +++ b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts @@ -0,0 +1,268 @@ +import { Scraper } from "agent-twitter-client"; +import { elizaLogger } from "@elizaos/core"; +import { PrimusCoreTLS } from "@fksyuan/zktls-core-sdk"; + +const expectedEntryTypes = ["tweet", "profile-conversation"]; + +export class ScraperWithPrimus { + private scraper: Scraper; + + constructor() {} + + public getScraper(): Scraper { + return this.scraper; + } + + public async login() { + this.scraper = new Scraper(); + const username = process.env.TWITTER_USERNAME; + const password = process.env.TWITTER_PASSWORD; + const email = process.env.TWITTER_EMAIL; + const twitter2faSecret = process.env.TWITTER_2FA_SECRET; + if (!username || !password) { + elizaLogger.error( + "Twitter credentials not configured in environment" + ); + return; + } + + // Login with credentials + await this.scraper.login(username, password, email, twitter2faSecret); + if (!(await this.scraper.isLoggedIn())) { + elizaLogger.error("Failed to login to Twitter"); + return false; + } + } + + public async getUserLatestTweet(userId: string) { + const onboardingTaskUrl = + "https://api.twitter.com/1.1/onboarding/task.json"; + const cookies = await (this.scraper as any).auth + .cookieJar() + .getCookies(onboardingTaskUrl); + const xCsrfToken = cookies.find((cookie) => cookie.key === "ct0"); + + //@ ts-expect-error - This is a private API. + const headers = { + authorization: `Bearer ${(this.scraper as any).auth.bearerToken}`, + cookie: await (this.scraper as any).auth + .cookieJar() + .getCookieString(onboardingTaskUrl), + "content-type": "application/json", + "User-Agent": + "Mozilla/5.0 (Linux; Android 11; Nokia G20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36", + "x-guest-token": (this.scraper as any).guestToken, + "x-twitter-auth-type": "OAuth2Client", + "x-twitter-active-user": "yes", + "x-twitter-client-language": "en", + "x-csrf-token": xCsrfToken?.value, + }; + + const variables = { + userId: userId, + count: 1, + includePromotedContent: true, + withQuickPromoteEligibilityTweetFields: true, + withVoice: true, + withV2Timeline: true, + }; + const features = { + profile_label_improvements_pcf_label_in_post_enabled: false, + rweb_tipjar_consumption_enabled: true, + tweetypie_unmention_optimization_enabled: false, + responsive_web_graphql_exclude_directive_enabled: true, + verified_phone_label_enabled: false, + creator_subscriptions_tweet_preview_api_enabled: true, + responsive_web_graphql_timeline_navigation_enabled: true, + responsive_web_graphql_skip_user_profile_image_extensions_enabled: + false, + premium_content_api_read_enabled: false, + communities_web_enable_tweet_community_results_fetch: true, + c9s_tweet_anatomy_moderator_badge_enabled: true, + responsive_web_grok_analyze_button_fetch_trends_enabled: false, + responsive_web_grok_analyze_post_followups_enabled: true, + responsive_web_grok_share_attachment_enabled: true, + articles_preview_enabled: true, + responsive_web_edit_tweet_api_enabled: true, + graphql_is_translatable_rweb_tweet_is_translatable_enabled: true, + view_counts_everywhere_api_enabled: true, + longform_notetweets_consumption_enabled: true, + responsive_web_twitter_article_tweet_consumption_enabled: true, + tweet_awards_web_tipping_enabled: false, + creator_subscriptions_quote_tweet_preview_enabled: false, + freedom_of_speech_not_reach_fetch_enabled: true, + standardized_nudges_misinfo: true, + tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: + true, + rweb_video_timestamps_enabled: true, + longform_notetweets_rich_text_read_enabled: true, + longform_notetweets_inline_media_enabled: true, + responsive_web_enhance_cards_enabled: false, + }; + const fieldToggles = { + withArticlePlainText: false, + }; + const variablesUrlEncoded = encodeURIComponent( + JSON.stringify(variables) + ); + const featureUrlEncoded = encodeURIComponent(JSON.stringify(features)); + const fieldTogglesUrlEncoded = encodeURIComponent( + JSON.stringify(fieldToggles) + ); + + const zkTLS = new PrimusCoreTLS(); + const appId = process.env.PRIMUS_APP_ID; + const appSecret = process.env.PRIMUS_APP_SECRET; + await zkTLS.init(appId, appSecret); + + const start = new Date(); + const attestation = await zkTLS.startAttestation( + zkTLS.generateRequestParams( + { + url: `https://twitter.com/i/api/graphql/V7H0Ap3_Hh2FyS75OCDO3Q/UserTweets?variables=${variablesUrlEncoded}&features=${featureUrlEncoded}&fieldToggles=${fieldTogglesUrlEncoded}`, + method: "GET", + header: headers, + }, + [ + { + keyName: "content", + parsePath: + "$.data.user.result.timeline_v2.timeline.instructions[1].entry.content.itemContent.tweet_results.result.legacy.full_text", + parseType: "string", + }, + ] + ) + ); + const end = new Date(); + //log cost + elizaLogger.info( + `request primus cost:${end.getTime() - start.getTime()}ms` + ); + + + + elizaLogger.info(`Tweet getting proof generated successfully!`); + const verifyResult = zkTLS.verifyAttestation(attestation); + if(!verifyResult){ + throw new Error("Verify attestation failed,data from source is illegality"); + } + const responseData = JSON.parse(attestation.data); + //log + elizaLogger.info(`get tweet content success:${responseData.content}`); + return responseData.content; + } + + public async sendTweet(content: string) { + const onboardingTaskUrl = + "https://api.twitter.com/1.1/onboarding/task.json"; + + const cookies = await (this.scraper as any).auth + .cookieJar() + .getCookies(onboardingTaskUrl); + const xCsrfToken = cookies.find((cookie) => cookie.key === "ct0"); + + //@ ts-expect-error - This is a private API. + const headers = { + authorization: `Bearer ${(this.scraper as any).auth.bearerToken}`, + cookie: await (this.scraper as any).auth + .cookieJar() + .getCookieString(onboardingTaskUrl), + "content-type": "application/json", + "User-Agent": + "Mozilla/5.0 (Linux; Android 11; Nokia G20) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36", + "x-guest-token": (this.scraper as any).guestToken, + "x-twitter-auth-type": "OAuth2Client", + "x-twitter-active-user": "yes", + "x-twitter-client-language": "en", + "x-csrf-token": xCsrfToken?.value, + }; + + const variables = { + tweet_text: content, + dark_request: false, + media: { + media_entities: [], + possibly_sensitive: false, + }, + semantic_annotation_ids: [], + }; + const bodyStr = JSON.stringify({ + variables, + features: { + interactive_text_enabled: true, + longform_notetweets_inline_media_enabled: false, + responsive_web_text_conversations_enabled: false, + tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: + false, + vibe_api_enabled: false, + rweb_lists_timeline_redesign_enabled: true, + responsive_web_graphql_exclude_directive_enabled: true, + verified_phone_label_enabled: false, + creator_subscriptions_tweet_preview_api_enabled: true, + responsive_web_graphql_timeline_navigation_enabled: true, + responsive_web_graphql_skip_user_profile_image_extensions_enabled: + false, + tweetypie_unmention_optimization_enabled: true, + responsive_web_edit_tweet_api_enabled: true, + graphql_is_translatable_rweb_tweet_is_translatable_enabled: + true, + view_counts_everywhere_api_enabled: true, + longform_notetweets_consumption_enabled: true, + tweet_awards_web_tipping_enabled: false, + freedom_of_speech_not_reach_fetch_enabled: true, + standardized_nudges_misinfo: true, + longform_notetweets_rich_text_read_enabled: true, + responsive_web_enhance_cards_enabled: false, + subscriptions_verification_info_enabled: true, + subscriptions_verification_info_reason_enabled: true, + subscriptions_verification_info_verified_since_enabled: true, + super_follow_badge_privacy_enabled: false, + super_follow_exclusive_tweet_notifications_enabled: false, + super_follow_tweet_api_enabled: false, + super_follow_user_api_enabled: false, + android_graphql_skip_api_media_color_palette: false, + creator_subscriptions_subscription_count_enabled: false, + blue_business_profile_image_shape_enabled: false, + unified_cards_ad_metadata_container_dynamic_card_content_query_enabled: + false, + rweb_video_timestamps_enabled: false, + c9s_tweet_anatomy_moderator_badge_enabled: false, + responsive_web_twitter_article_tweet_consumption_enabled: false, + }, + fieldToggles: {}, + }); + + const zkTLS = new PrimusCoreTLS(); + const appId = process.env.PRIMUS_APP_ID; + const appSecret = process.env.PRIMUS_APP_SECRET; + await zkTLS.init(appId, appSecret); + const attestation = await zkTLS.startAttestation( + zkTLS.generateRequestParams( + { + url: `https://twitter.com/i/api/graphql/a1p9RWpkYKBjWv_I3WzS-A/CreateTweet`, + method: "POST", + body: bodyStr, + header: headers, + }, + [ + { + keyName: "tweetId", + parsePath: + "$.data.create_tweet.tweet_results.result.rest_id", + parseType: "string", + }, + ] + ) + ); + elizaLogger.info(`Tweet sending proof generated successfully!`); + + const verifyResult = zkTLS.verifyAttestation(attestation); + if(!verifyResult){ + throw new Error("Verify attestation failed,data from source is illegality"); + } + const responseData = JSON.parse(attestation.data); + elizaLogger.info(`send tweet success,tweetId:${responseData.tweetId}`); + + return responseData.tweetId; + } +} diff --git a/packages/plugin-twitter-primus/tsconfig.json b/packages/plugin-twitter-primus/tsconfig.json new file mode 100644 index 0000000000..e9c2e9f852 --- /dev/null +++ b/packages/plugin-twitter-primus/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../core/tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src", + "types": ["node"] + }, + "include": ["src/**/*.ts"] +} diff --git a/packages/plugin-twitter-primus/tsup.config.ts b/packages/plugin-twitter-primus/tsup.config.ts new file mode 100644 index 0000000000..430573c247 --- /dev/null +++ b/packages/plugin-twitter-primus/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + outDir: "dist", + sourcemap: true, + clean: true, + format: ["esm"], + external: ["dotenv", "fs", "path", "https", "http", "agentkeepalive"], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83da628765..9fa33cf91b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,7 +23,7 @@ importers: version: 3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@vitest/eslint-plugin': specifier: 1.0.1 - version: 1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + version: 1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) amqplib: specifier: 0.10.5 version: 0.10.5 @@ -48,7 +48,7 @@ importers: devDependencies: '@commitlint/cli': specifier: 18.6.1 - version: 18.6.1(@types/node@22.10.4)(typescript@5.6.3) + version: 18.6.1(@types/node@22.10.5)(typescript@5.6.3) '@commitlint/config-conventional': specifier: 18.6.3 version: 18.6.3 @@ -78,7 +78,7 @@ importers: version: 9.1.7 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.10.4) + version: 29.7.0(@types/node@22.10.5) lerna: specifier: 8.1.5 version: 8.1.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(encoding@0.1.13) @@ -90,7 +90,7 @@ importers: version: 3.4.1 ts-jest: specifier: ^29.1.1 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.4))(typescript@5.6.3) + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.5))(typescript@5.6.3) turbo: specifier: 2.3.3 version: 2.3.3 @@ -105,10 +105,10 @@ importers: version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) vite: specifier: 5.4.11 - version: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + version: 5.4.11(@types/node@22.10.5)(terser@5.37.0) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) agent: dependencies: @@ -226,6 +226,9 @@ importers: '@elizaos/plugin-open-weather': specifier: workspace:* version: link:../packages/plugin-open-weather + '@elizaos/plugin-primus': + specifier: workspace:* + version: link:../packages/plugin-primus '@elizaos/plugin-reclaim': specifier: workspace:* version: link:../packages/plugin-reclaim @@ -256,6 +259,9 @@ importers: '@elizaos/plugin-twitter': specifier: workspace:* version: link:../packages/plugin-twitter + '@elizaos/plugin-twitter-primus': + specifier: workspace:* + version: link:../packages/plugin-twitter-primus '@elizaos/plugin-web-search': specifier: workspace:* version: link:../packages/plugin-web-search @@ -286,7 +292,7 @@ importers: version: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) client: dependencies: @@ -334,7 +340,7 @@ importers: version: 1.0.7(tailwindcss@3.4.15(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3))) vite-plugin-top-level-await: specifier: 1.4.4 - version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.29.1)(vite@client+@tanstack+router-plugin+vite) + version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.29.2)(vite@client+@tanstack+router-plugin+vite) vite-plugin-wasm: specifier: 3.3.0 version: 3.3.0(vite@client+@tanstack+router-plugin+vite) @@ -463,7 +469,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/adapter-redis: dependencies: @@ -482,7 +488,7 @@ importers: version: 5.0.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/adapter-sqlite: dependencies: @@ -504,7 +510,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/adapter-sqljs: dependencies: @@ -526,7 +532,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/adapter-supabase: dependencies: @@ -542,7 +548,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-auto: dependencies: @@ -573,7 +579,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-direct: dependencies: @@ -616,7 +622,7 @@ importers: version: 1.4.12 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-discord: dependencies: @@ -653,7 +659,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-farcaster: dependencies: @@ -666,7 +672,7 @@ importers: devDependencies: tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-github: dependencies: @@ -691,7 +697,7 @@ importers: version: 8.1.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-lens: dependencies: @@ -710,7 +716,7 @@ importers: devDependencies: tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/client-slack: dependencies: @@ -768,7 +774,7 @@ importers: version: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@18.19.69)(typescript@5.6.3) tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) typescript: specifier: ^5.0.0 version: 5.6.3 @@ -790,7 +796,10 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) + vitest: + specifier: 1.2.1 + version: 1.2.1(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) packages/client-twitter: dependencies: @@ -812,7 +821,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/core: dependencies: @@ -842,7 +851,7 @@ importers: version: 10.0.0 ai: specifier: 3.4.33 - version: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) + version: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) anthropic-vertex-ai: specifier: 1.0.2 version: 1.0.2(encoding@0.1.13)(zod@3.23.8) @@ -981,7 +990,7 @@ importers: version: 2.8.1 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) typescript: specifier: 5.6.3 version: 5.6.3 @@ -1018,7 +1027,7 @@ importers: version: 6.13.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-3d-generation: dependencies: @@ -1027,7 +1036,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1039,7 +1048,7 @@ importers: version: link:../core tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) web3: specifier: ^4.15.0 version: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -1066,10 +1075,10 @@ importers: version: 5.1.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1091,7 +1100,7 @@ importers: version: 20.17.9 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-avalanche: dependencies: @@ -1104,7 +1113,7 @@ importers: devDependencies: tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-bootstrap: dependencies: @@ -1113,7 +1122,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1144,7 +1153,7 @@ importers: version: 20.17.9 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-conflux: dependencies: @@ -1180,7 +1189,7 @@ importers: version: 1.69.85 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) zod: specifier: 3.23.8 version: 3.23.8 @@ -1192,13 +1201,13 @@ importers: version: link:../core tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) web3: specifier: ^4.15.0 version: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) web3-plugin-zksync: specifier: ^1.0.8 - version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1231,7 +1240,7 @@ importers: version: 16.3.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1246,7 +1255,7 @@ importers: version: 1.5.1 '@onflow/fcl': specifier: 1.13.1 - version: 1.13.1(@types/react@18.3.12)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(tsx@4.19.2)(utf-8-validate@5.0.10) + version: 1.13.1(@types/react@18.3.12)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(utf-8-validate@5.0.10) '@onflow/typedefs': specifier: 1.4.0 version: 1.4.0 @@ -1283,10 +1292,10 @@ importers: version: 10.0.0 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) packages/plugin-fuel: dependencies: @@ -1298,13 +1307,13 @@ importers: version: 4.0.1 fuels: specifier: 0.97.2 - version: 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + version: 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1319,7 +1328,7 @@ importers: version: 0.4.7(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(bufferutil@4.0.9)(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-gitbook: dependencies: @@ -1328,7 +1337,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-goat: dependencies: @@ -1337,7 +1346,7 @@ importers: version: link:../core '@goat-sdk/adapter-vercel-ai': specifier: 0.2.0 - version: 0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8)) + version: 0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.3(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8)) '@goat-sdk/core': specifier: 0.4.0 version: 0.4.0 @@ -1355,7 +1364,7 @@ importers: version: 0.2.0(@goat-sdk/wallet-evm@0.2.0(@goat-sdk/core@0.4.0)(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) viem: specifier: 2.21.58 version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -1386,10 +1395,10 @@ importers: version: 29.5.14 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.4) + version: 29.7.0(@types/node@22.10.5) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) typescript: specifier: 5.6.3 version: 5.6.3 @@ -1401,7 +1410,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1419,7 +1428,7 @@ importers: version: 1.0.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1446,10 +1455,10 @@ importers: version: 2.1.1 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1476,7 +1485,7 @@ importers: version: 5.1.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1521,7 +1530,7 @@ importers: version: 5.1.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1530,10 +1539,10 @@ importers: dependencies: '@aws-sdk/client-s3': specifier: ^3.705.0 - version: 3.721.0 + version: 3.722.0 '@aws-sdk/s3-request-presigner': specifier: ^3.705.0 - version: 3.721.0 + version: 3.722.0 '@cliqz/adblocker-playwright': specifier: 1.34.0 version: 1.34.0(playwright@1.48.2) @@ -1699,7 +1708,7 @@ importers: version: 22.8.4 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-open-weather: dependencies: @@ -1708,7 +1717,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1716,6 +1725,22 @@ importers: specifier: ^3.22.4 version: 3.23.8 + packages/plugin-primus: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@fksyuan/zktls-core-sdk': + specifier: ^0.1.4 + version: 0.1.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + dotenv: + specifier: ^16.4.5 + version: 16.4.7 + devDependencies: + tsup: + specifier: ^8.3.5 + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) + packages/plugin-reclaim: dependencies: '@elizaos/core': @@ -1733,7 +1758,7 @@ importers: devDependencies: tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-solana: dependencies: @@ -1772,13 +1797,13 @@ importers: version: 5.1.2 pumpdotfun-sdk: specifier: 1.3.2 - version: 1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.1)(typescript@5.6.3)(utf-8-validate@5.0.10) + version: 1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.2)(typescript@5.6.3)(utf-8-validate@5.0.10) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1793,7 +1818,7 @@ importers: version: 1.7.9(debug@4.4.0) tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) zod: specifier: ^3.22.4 version: 3.23.8 @@ -1817,13 +1842,13 @@ importers: version: 6.18.0(encoding@0.1.13) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) unruggable-sdk: specifier: 1.4.0 version: 1.4.0(starknet@6.18.0(encoding@0.1.13)) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1841,7 +1866,7 @@ importers: version: 1.2.0-rc.3(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) viem: specifier: 2.21.58 version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) @@ -1851,7 +1876,7 @@ importers: devDependencies: '@types/node': specifier: ^22.10.1 - version: 22.10.4 + version: 22.10.5 packages/plugin-sui: dependencies: @@ -1872,10 +1897,10 @@ importers: version: 5.1.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1905,10 +1930,10 @@ importers: version: 5.1.2 pumpdotfun-sdk: specifier: 1.3.2 - version: 1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.1)(typescript@5.6.3)(utf-8-validate@5.0.10) + version: 1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.2)(typescript@5.6.3)(utf-8-validate@5.0.10) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1920,7 +1945,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1944,7 +1969,7 @@ importers: version: 5.1.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1959,13 +1984,13 @@ importers: version: 3.2.2 tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) uuid: specifier: 11.0.3 version: 11.0.3 vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1984,7 +2009,22 @@ importers: version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) + + packages/plugin-twitter-primus: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@fksyuan/zktls-core-sdk': + specifier: ^0.1.4 + version: 0.1.4(bufferutil@4.0.9)(utf-8-validate@5.0.10) + agent-twitter-client: + specifier: 0.0.18 + version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) packages/plugin-video-generation: dependencies: @@ -1993,7 +2033,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -2005,7 +2045,7 @@ importers: version: link:../core tsup: specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -2048,13 +2088,13 @@ importers: version: link:../core tsup: specifier: ^8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0) web3: specifier: ^4.15.0 version: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) web3-plugin-zksync: specifier: ^1.0.8 - version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -2413,8 +2453,8 @@ packages: resolution: {integrity: sha512-SCTx9DKOnfEKyWb6bx5J7aeowBig8QmiqOJlE0sMM/pbpF70YGC/ugk1/yFJAJlAkoDadtRvseFpwLvrg7N73Q==} engines: {node: '>=16.0.0'} - '@aws-sdk/client-s3@3.721.0': - resolution: {integrity: sha512-uCZC8elYhUFF21yq1yB5TrE/VYz8A4/VnttUHc65/jqnHReTDvEC0XAc756tJnjfrReyM1ws12FzBLHoW/NDjg==} + '@aws-sdk/client-s3@3.722.0': + resolution: {integrity: sha512-FttdkB39TKjqEITfZJcs6Ihh6alICsNEne0ouLvh8re+gAuTK96zWcfX22mP5ap1QEsATaOGRNsMnyfsDSM0zw==} engines: {node: '>=16.0.0'} '@aws-sdk/client-sso-oidc@3.721.0': @@ -2531,8 +2571,8 @@ packages: resolution: {integrity: sha512-HJzsQxgMOAzZrbf/YIqEx30or4tZK1oNAk6Wm6xecUQx+23JXIaePRu1YFUOLBBERQ4QBPpISFurZWBMZ5ibAw==} engines: {node: '>=16.0.0'} - '@aws-sdk/s3-request-presigner@3.721.0': - resolution: {integrity: sha512-2ibKGssj2TAQyfthNihhBqWdwowlol9bDpKybIi2T6D8l2L9g0ENGLNE50MYzSFAQ3LcjzcvLQ/GByRPiuK+pQ==} + '@aws-sdk/s3-request-presigner@3.722.0': + resolution: {integrity: sha512-dh4yYywf3tHCUwIU8eAQdoFXsjWcssoQXTKoqaqwqRh4WxwuaiRiw6dmD0Q5m6sPsLiHrTPemmDXsF4mLdjmsQ==} engines: {node: '>=16.0.0'} '@aws-sdk/signature-v4-multi-region@3.716.0': @@ -4128,12 +4168,6 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.23.1': - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.24.2': resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} engines: {node: '>=18'} @@ -4152,12 +4186,6 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.23.1': - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.24.2': resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} engines: {node: '>=18'} @@ -4176,12 +4204,6 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.23.1': - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.24.2': resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} engines: {node: '>=18'} @@ -4200,12 +4222,6 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.23.1': - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.24.2': resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} engines: {node: '>=18'} @@ -4224,12 +4240,6 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.23.1': - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.24.2': resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} engines: {node: '>=18'} @@ -4248,12 +4258,6 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.23.1': - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.24.2': resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} engines: {node: '>=18'} @@ -4272,12 +4276,6 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.23.1': - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.24.2': resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} engines: {node: '>=18'} @@ -4296,12 +4294,6 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.23.1': - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.24.2': resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} engines: {node: '>=18'} @@ -4320,12 +4312,6 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.23.1': - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.24.2': resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} engines: {node: '>=18'} @@ -4344,12 +4330,6 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.23.1': - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.24.2': resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} engines: {node: '>=18'} @@ -4368,12 +4348,6 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.23.1': - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.24.2': resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} engines: {node: '>=18'} @@ -4392,12 +4366,6 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.23.1': - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.24.2': resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} engines: {node: '>=18'} @@ -4416,12 +4384,6 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.23.1': - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.24.2': resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} engines: {node: '>=18'} @@ -4440,12 +4402,6 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.23.1': - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.24.2': resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} engines: {node: '>=18'} @@ -4464,12 +4420,6 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.23.1': - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.24.2': resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} engines: {node: '>=18'} @@ -4488,12 +4438,6 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.23.1': - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.24.2': resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} engines: {node: '>=18'} @@ -4512,12 +4456,6 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.23.1': - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.24.2': resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} engines: {node: '>=18'} @@ -4542,24 +4480,12 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.23.1': - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.24.2': resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.23.1': - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-arm64@0.24.2': resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} engines: {node: '>=18'} @@ -4578,12 +4504,6 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.23.1': - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.24.2': resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} engines: {node: '>=18'} @@ -4602,12 +4522,6 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.23.1': - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.24.2': resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} engines: {node: '>=18'} @@ -4626,12 +4540,6 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.23.1': - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.24.2': resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} engines: {node: '>=18'} @@ -4650,12 +4558,6 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.23.1': - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.24.2': resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} engines: {node: '>=18'} @@ -4674,12 +4576,6 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.23.1': - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.24.2': resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} engines: {node: '>=18'} @@ -4879,6 +4775,9 @@ packages: cpu: [x64] os: [win32] + '@fksyuan/zktls-core-sdk@0.1.4': + resolution: {integrity: sha512-LOB1W8hJwzpKRJ7hOek0FiuvWIWBL3iHQvj25jZXW4y/F3fB2/l1habqcoyfHjZT0LCIT4HxnmoBGUVxvhzaxg==} + '@floating-ui/core@1.6.8': resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} @@ -6100,8 +5999,8 @@ packages: resolution: {integrity: sha512-5UtmxXAvU2wfcHIPPDWzVSAWXVJzG3NWsxb7zCFplCWEmMCArSZV0UQu5jw5goLQXbFyOr5onzEH37UJB3zQQg==} engines: {node: '>= 18'} - '@octokit/auth-oauth-device@7.1.1': - resolution: {integrity: sha512-HWl8lYueHonuyjrKKIup/1tiy0xcmQCdq5ikvMO1YwkNNkxb6DXfrPjrMYItNLyCP/o2H87WuijuE+SlBTT8eg==} + '@octokit/auth-oauth-device@7.1.2': + resolution: {integrity: sha512-gTOIzDeV36OhVfxCl69FmvJix7tJIiU6dlxuzLVAzle7fYfO8UDyddr9B+o4CFQVaMBLMGZ9ak2CWMYcGeZnPw==} engines: {node: '>= 18'} '@octokit/auth-oauth-user@5.1.1': @@ -6132,8 +6031,8 @@ packages: resolution: {integrity: sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==} engines: {node: '>= 18'} - '@octokit/core@6.1.2': - resolution: {integrity: sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==} + '@octokit/core@6.1.3': + resolution: {integrity: sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==} engines: {node: '>= 18'} '@octokit/endpoint@10.1.2': @@ -7255,98 +7154,98 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.29.1': - resolution: {integrity: sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==} + '@rollup/rollup-android-arm-eabi@4.29.2': + resolution: {integrity: sha512-s/8RiF4bdmGnc/J0N7lHAr5ZFJj+NdJqJ/Hj29K+c4lEdoVlukzvWXB9XpWZCdakVT0YAw8iyIqUP2iFRz5/jA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.29.1': - resolution: {integrity: sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==} + '@rollup/rollup-android-arm64@4.29.2': + resolution: {integrity: sha512-mKRlVj1KsKWyEOwR6nwpmzakq6SgZXW4NUHNWlYSiyncJpuXk7wdLzuKdWsRoR1WLbWsZBKvsUCdCTIAqRn9cA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.29.1': - resolution: {integrity: sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==} + '@rollup/rollup-darwin-arm64@4.29.2': + resolution: {integrity: sha512-vJX+vennGwygmutk7N333lvQ/yKVAHnGoBS2xMRQgXWW8tvn46YWuTDOpKroSPR9BEW0Gqdga2DHqz8Pwk6X5w==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.29.1': - resolution: {integrity: sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==} + '@rollup/rollup-darwin-x64@4.29.2': + resolution: {integrity: sha512-e2rW9ng5O6+Mt3ht8fH0ljfjgSCC6ffmOipiLUgAnlK86CHIaiCdHCzHzmTkMj6vEkqAiRJ7ss6Ibn56B+RE5w==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.29.1': - resolution: {integrity: sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==} + '@rollup/rollup-freebsd-arm64@4.29.2': + resolution: {integrity: sha512-/xdNwZe+KesG6XJCK043EjEDZTacCtL4yurMZRLESIgHQdvtNyul3iz2Ab03ZJG0pQKbFTu681i+4ETMF9uE/Q==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.29.1': - resolution: {integrity: sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==} + '@rollup/rollup-freebsd-x64@4.29.2': + resolution: {integrity: sha512-eXKvpThGzREuAbc6qxnArHh8l8W4AyTcL8IfEnmx+bcnmaSGgjyAHbzZvHZI2csJ+e0MYddl7DX0X7g3sAuXDQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.29.1': - resolution: {integrity: sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==} + '@rollup/rollup-linux-arm-gnueabihf@4.29.2': + resolution: {integrity: sha512-h4VgxxmzmtXLLYNDaUcQevCmPYX6zSj4SwKuzY7SR5YlnCBYsmvfYORXgiU8axhkFCDtQF3RW5LIXT8B14Qykg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.29.1': - resolution: {integrity: sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==} + '@rollup/rollup-linux-arm-musleabihf@4.29.2': + resolution: {integrity: sha512-EObwZ45eMmWZQ1w4N7qy4+G1lKHm6mcOwDa+P2+61qxWu1PtQJ/lz2CNJ7W3CkfgN0FQ7cBUy2tk6D5yR4KeXw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.29.1': - resolution: {integrity: sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==} + '@rollup/rollup-linux-arm64-gnu@4.29.2': + resolution: {integrity: sha512-Z7zXVHEXg1elbbYiP/29pPwlJtLeXzjrj4241/kCcECds8Zg9fDfURWbZHRIKrEriAPS8wnVtdl4ZJBvZr325w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.29.1': - resolution: {integrity: sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==} + '@rollup/rollup-linux-arm64-musl@4.29.2': + resolution: {integrity: sha512-TF4kxkPq+SudS/r4zGPf0G08Bl7+NZcFrUSR3484WwsHgGgJyPQRLCNrQ/R5J6VzxfEeQR9XRpc8m2t7lD6SEQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.29.1': - resolution: {integrity: sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==} + '@rollup/rollup-linux-loongarch64-gnu@4.29.2': + resolution: {integrity: sha512-kO9Fv5zZuyj2zB2af4KA29QF6t7YSxKrY7sxZXfw8koDQj9bx5Tk5RjH+kWKFKok0wLGTi4bG117h31N+TIBEg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.29.1': - resolution: {integrity: sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==} + '@rollup/rollup-linux-powerpc64le-gnu@4.29.2': + resolution: {integrity: sha512-gIh776X7UCBaetVJGdjXPFurGsdWwHHinwRnC5JlLADU8Yk0EdS/Y+dMO264OjJFo7MXQ5PX4xVFbxrwK8zLqA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.29.1': - resolution: {integrity: sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==} + '@rollup/rollup-linux-riscv64-gnu@4.29.2': + resolution: {integrity: sha512-YgikssQ5UNq1GoFKZydMEkhKbjlUq7G3h8j6yWXLBF24KyoA5BcMtaOUAXq5sydPmOPEqB6kCyJpyifSpCfQ0w==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.29.1': - resolution: {integrity: sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==} + '@rollup/rollup-linux-s390x-gnu@4.29.2': + resolution: {integrity: sha512-9ouIR2vFWCyL0Z50dfnon5nOrpDdkTG9lNDs7MRaienQKlTyHcDxplmk3IbhFlutpifBSBr2H4rVILwmMLcaMA==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.29.1': - resolution: {integrity: sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==} + '@rollup/rollup-linux-x64-gnu@4.29.2': + resolution: {integrity: sha512-ckBBNRN/F+NoSUDENDIJ2U9UWmIODgwDB/vEXCPOMcsco1niTkxTXa6D2Y/pvCnpzaidvY2qVxGzLilNs9BSzw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.29.1': - resolution: {integrity: sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==} + '@rollup/rollup-linux-x64-musl@4.29.2': + resolution: {integrity: sha512-jycl1wL4AgM2aBFJFlpll/kGvAjhK8GSbEmFT5v3KC3rP/b5xZ1KQmv0vQQ8Bzb2ieFQ0kZFPRMbre/l3Bu9JA==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.29.1': - resolution: {integrity: sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==} + '@rollup/rollup-win32-arm64-msvc@4.29.2': + resolution: {integrity: sha512-S2V0LlcOiYkNGlRAWZwwUdNgdZBfvsDHW0wYosYFV3c7aKgEVcbonetZXsHv7jRTTX+oY5nDYT4W6B1oUpMNOg==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.29.1': - resolution: {integrity: sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==} + '@rollup/rollup-win32-ia32-msvc@4.29.2': + resolution: {integrity: sha512-pW8kioj9H5f/UujdoX2atFlXNQ9aCfAxFRaa+mhczwcsusm6gGrSo4z0SLvqLF5LwFqFTjiLCCzGkNK/LE0utQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.29.1': - resolution: {integrity: sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==} + '@rollup/rollup-win32-x64-msvc@4.29.2': + resolution: {integrity: sha512-p6fTArexECPf6KnOHvJXRpAEq0ON1CBtzG/EY4zw08kCHk/kivBc5vUEtnCFNCHOpJZ2ne77fxwRLIKD4wuW2Q==} cpu: [x64] os: [win32] @@ -7433,26 +7332,26 @@ packages: resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} engines: {node: '>=6'} - '@shikijs/core@1.25.1': - resolution: {integrity: sha512-0j5k3ZkLTQViOuNzPVyWGoW1zgH3kiFdUT/JOCkTm7TU74mz+dF+NID+YoiCBzHQxgsDpcGYPjKDJRcuVLSt4A==} + '@shikijs/core@1.26.1': + resolution: {integrity: sha512-yeo7sG+WZQblKPclUOKRPwkv1PyoHYkJ4gP9DzhFJbTdueKR7wYTI1vfF/bFi1NTgc545yG/DzvVhZgueVOXMA==} - '@shikijs/engine-javascript@1.25.1': - resolution: {integrity: sha512-zQ7UWKnRCfD/Q1M+XOSyjsbhpE0qv8LUnmn82HYCeOsgAHgUZGEDIQ63bbuK3kU5sQg+2CtI+dPfOqD/mjSY9w==} + '@shikijs/engine-javascript@1.26.1': + resolution: {integrity: sha512-CRhA0b8CaSLxS0E9A4Bzcb3LKBNpykfo9F85ozlNyArxjo2NkijtiwrJZ6eHa+NT5I9Kox2IXVdjUsP4dilsmw==} - '@shikijs/engine-oniguruma@1.25.1': - resolution: {integrity: sha512-iKPMh3H+0USHtWfZ1irfMTH6tGmIUFSnqt3E2K8BgI1VEsqiPh0RYkG2WTwzNiM1/WHN4FzYx/nrKR7PDHiRyw==} + '@shikijs/engine-oniguruma@1.26.1': + resolution: {integrity: sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==} - '@shikijs/langs@1.25.1': - resolution: {integrity: sha512-hdYjq9aRJplAzGe2qF51PR9IDgEoyGb4IkXvr3Ts6lEdg4Z8M/kdknKRo2EIuv3IR/aKkJXTlBQRM+wr3t20Ew==} + '@shikijs/langs@1.26.1': + resolution: {integrity: sha512-oz/TQiIqZejEIZbGtn68hbJijAOTtYH4TMMSWkWYozwqdpKR3EXgILneQy26WItmJjp3xVspHdiUxUCws4gtuw==} - '@shikijs/themes@1.25.1': - resolution: {integrity: sha512-JO0lDn4LgGqg5QKvgich5ScUmC2okK+LxM9a3iLUH7YMeI2c8UGXThuJv6sZduS7pdJbYQHPrvWq9t/V4GhpbQ==} + '@shikijs/themes@1.26.1': + resolution: {integrity: sha512-JDxVn+z+wgLCiUhBGx2OQrLCkKZQGzNH3nAxFir4PjUcYiyD8Jdms9izyxIogYmSwmoPTatFTdzyrRKbKlSfPA==} - '@shikijs/types@1.25.1': - resolution: {integrity: sha512-dceqFUoO95eY4tpOj3OGq8wE8EgJ4ey6Me1HQEu5UbwIYszFndEll/bjlB8Kp9wl4fx3uM7n4+y9XCYuDBmcXA==} + '@shikijs/types@1.26.1': + resolution: {integrity: sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==} - '@shikijs/vscode-textmate@9.3.1': - resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==} + '@shikijs/vscode-textmate@10.0.1': + resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==} '@sideway/address@4.1.5': resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} @@ -8330,8 +8229,8 @@ packages: '@types/d3-selection@3.0.11': resolution: {integrity: sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==} - '@types/d3-shape@3.1.6': - resolution: {integrity: sha512-5KKk5aKGu2I+O6SONMYSNflgiP0WfZIQvVUMan50wHsLG1G94JlxEVnCpQARfTtzytuY0p/9PXXZb3I7giofIA==} + '@types/d3-shape@3.1.7': + resolution: {integrity: sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==} '@types/d3-time-format@4.0.3': resolution: {integrity: sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==} @@ -8473,8 +8372,8 @@ packages: '@types/lodash.isstring@4.0.9': resolution: {integrity: sha512-sjGPpa15VBpMns/4s6Blm567JgxLVVu/eCYCe7h/TdQyPCz9lIhaLSISjN7ZC9cDXmUT2IM/4mNRw8OtYirziw==} - '@types/lodash@4.17.13': - resolution: {integrity: sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg==} + '@types/lodash@4.17.14': + resolution: {integrity: sha512-jsxagdikDiDBeIRaPYtArcT8my4tN1og7MtMRquFT3XNA6axxyHDRUemqDz/taRDdOUn0GnGHRCuff4q48sW9A==} '@types/long@4.0.2': resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} @@ -8536,8 +8435,8 @@ packages: '@types/node@20.5.1': resolution: {integrity: sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==} - '@types/node@22.10.4': - resolution: {integrity: sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug==} + '@types/node@22.10.5': + resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==} '@types/node@22.7.5': resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} @@ -8837,6 +8736,9 @@ packages: vitest: optional: true + '@vitest/expect@1.2.1': + resolution: {integrity: sha512-/bqGXcHfyKgFWYwIgFr1QYDaR9e64pRKxgBNWNXPefPFRhgm+K3+a/dS0cUGEreWngets3dlr8w8SBRw2fCfFQ==} + '@vitest/expect@2.1.4': resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} @@ -8874,24 +8776,36 @@ packages: '@vitest/pretty-format@2.1.8': resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} + '@vitest/runner@1.2.1': + resolution: {integrity: sha512-zc2dP5LQpzNzbpaBt7OeYAvmIsRS1KpZQw4G3WM/yqSV1cQKNKwLGmnm79GyZZjMhQGlRcSFMImLjZaUQvNVZQ==} + '@vitest/runner@2.1.4': resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} '@vitest/runner@2.1.5': resolution: {integrity: sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==} + '@vitest/snapshot@1.2.1': + resolution: {integrity: sha512-Tmp/IcYEemKaqAYCS08sh0vORLJkMr0NRV76Gl8sHGxXT5151cITJCET20063wk0Yr/1koQ6dnmP6eEqezmd/Q==} + '@vitest/snapshot@2.1.4': resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} '@vitest/snapshot@2.1.5': resolution: {integrity: sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==} + '@vitest/spy@1.2.1': + resolution: {integrity: sha512-vG3a/b7INKH7L49Lbp0IWrG6sw9j4waWAucwnksPB1r1FTJgV7nkBByd9ufzu6VWya/QTvQW4V9FShZbZIB2UQ==} + '@vitest/spy@2.1.4': resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} '@vitest/spy@2.1.5': resolution: {integrity: sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==} + '@vitest/utils@1.2.1': + resolution: {integrity: sha512-bsH6WVZYe/J2v3+81M5LDU8kW76xWObKIURpPrOXm2pjBniBu2MERI/XP60GpS4PHU3jyK50LUutOwrx4CyHUg==} + '@vitest/utils@2.1.4': resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} @@ -9478,6 +9392,9 @@ packages: assert@1.5.1: resolution: {integrity: sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==} + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -9665,8 +9582,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - bare-events@2.5.0: - resolution: {integrity: sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==} + bare-events@2.5.1: + resolution: {integrity: sha512-Bw2PgKSrZ3uCuSV9WQ998c/GTJTd+9bWj97n7aDQMP8dP/exAZQlJeswPty0ISy+HZD+9Ex+C7CCnc9Q5QJFmQ==} bare-fs@2.3.5: resolution: {integrity: sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==} @@ -10135,6 +10052,10 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + engines: {node: '>=4'} + chai@5.1.2: resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} engines: {node: '>=12'} @@ -10188,6 +10109,9 @@ packages: charm@0.1.2: resolution: {integrity: sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ==} + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -10671,6 +10595,10 @@ packages: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + copy-text-to-clipboard@3.2.0: resolution: {integrity: sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==} engines: {node: '>=12'} @@ -11273,6 +11201,10 @@ packages: babel-plugin-macros: optional: true + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -11809,11 +11741,6 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} - engines: {node: '>=18'} - hasBin: true - esbuild@0.24.2: resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} engines: {node: '>=18'} @@ -12185,8 +12112,8 @@ packages: resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} engines: {node: '> 0.1.90'} - fast-content-type-parse@2.0.0: - resolution: {integrity: sha512-fCqg/6Sps8tqk8p+kqyKqYfOF0VjPNYrqpLiqNl0RBKmD80B080AJWVV6EkSkscjToNExcXg1+Mfzftrx6+iSA==} + fast-content-type-parse@2.0.1: + resolution: {integrity: sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==} fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -12194,8 +12121,8 @@ packages: fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} fast-json-patch@3.1.1: @@ -12220,8 +12147,8 @@ packages: fast-stream-to-buffer@1.0.0: resolution: {integrity: sha512-bI/544WUQlD2iXBibQbOMSmG07Hay7YrpXlKaeGTPT7H7pC0eitt3usak5vUwEvCGK/O7rUAM3iyQValGU22TQ==} - fast-uri@3.0.3: - resolution: {integrity: sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==} + fast-uri@3.0.4: + resolution: {integrity: sha512-G3iTQw1DizJQ5eEqj1CbFCWhq+pzum7qepkxU7rS1FGZDqjYKcrguo9XDRbV7EgPnn8CgaPigTq+NEjyioeYZQ==} fast-xml-parser@4.4.1: resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} @@ -12596,6 +12523,9 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-intrinsic@1.2.7: resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} engines: {node: '>= 0.4'} @@ -12651,9 +12581,6 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} - get-uri@6.0.4: resolution: {integrity: sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==} engines: {node: '>= 14'} @@ -12990,8 +12917,8 @@ packages: hast-util-select@4.0.2: resolution: {integrity: sha512-8EEG2//bN5rrzboPWD2HdS3ugLijNioS1pqOTIolXNf67xxShYw4SQEmVXd3imiBG+U2bC2nVTySr/iRAA7Cjg==} - hast-util-to-estree@3.1.0: - resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} + hast-util-to-estree@3.1.1: + resolution: {integrity: sha512-IWtwwmPskfSmma9RpzCappDUitC8t5jhAynHhc1m2+5trOgsrp7txscUSavc5Ic8PATyAjfrCK1wgtxh2cICVQ==} hast-util-to-html@9.0.4: resolution: {integrity: sha512-wxQzXtdbhiwGAUKrnQJXlOPmHnEehzphwkK7aluUPQ+lEc1xefC8pblMgpp2w5ldBTEfveRIrADcrhGIWrlTDA==} @@ -13330,9 +13257,6 @@ packages: inline-source-map@0.6.3: resolution: {integrity: sha512-1aVsPEsJWMJq/pdMU61CDlm1URcW702MTB4w9/zUjMus6H/Py8o7g68Pr9D4I6QluWGt/KdmswuRhaA05xVR1w==} - inline-style-parser@0.1.1: - resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} - inline-style-parser@0.2.4: resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} @@ -14594,6 +14518,9 @@ packages: lossless-json@4.0.2: resolution: {integrity: sha512-+z0EaLi2UcWi8MZRxA5iTb6m4Ys4E80uftGY+yG5KNFJb5EceQXOhdW/pWJZ8m97s26u7yZZAYMcKWNztSZssA==} + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@3.1.2: resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} @@ -14739,8 +14666,8 @@ packages: mdast-util-directive@3.0.0: resolution: {integrity: sha512-JUpYOqKI4mM3sZcNxmF/ox04XYFFkNwr0CFlrQIkCwbvH0xzMCqkMqAde9wRd80VAhaUrwFwKm2nxretdT1h7Q==} - mdast-util-find-and-replace@3.0.1: - resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + mdast-util-find-and-replace@3.0.2: + resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} mdast-util-from-markdown@2.0.2: resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} @@ -15779,8 +15706,8 @@ packages: zod: optional: true - openai@4.77.0: - resolution: {integrity: sha512-WWacavtns/7pCUkOWvQIjyOfcdr9X+9n9Vvb0zFeKVDAqwCMDHB+iSr24SVaBAhplvSG6JrRXFpcNM9gWhOGIw==} + openai@4.77.3: + resolution: {integrity: sha512-wLDy4+KWHz31HRFMW2+9KQuVuT2QWhs0z94w1Gm1h2Ut9vIHr9/rHZggbykZEfyiaJRVgw8ZS9K6AylDWzvPYw==} hasBin: true peerDependencies: zod: ^3.23.8 @@ -15874,6 +15801,10 @@ packages: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -16140,6 +16071,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -17799,9 +17733,6 @@ packages: resolve-pathname@3.0.0: resolution: {integrity: sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==} - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - resolve.exports@2.0.3: resolution: {integrity: sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==} engines: {node: '>=10'} @@ -17893,8 +17824,8 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true - rollup@4.29.1: - resolution: {integrity: sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==} + rollup@4.29.2: + resolution: {integrity: sha512-tJXpsEkzsEzyAKIaB3qv3IuvTVcTN7qBw1jL4SPPXM3vzDrJgiLGFY6+HodgFaUHAJ2RYJ94zV5MKRJCoQzQeA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -18175,8 +18106,8 @@ packages: engines: {node: '>=4'} hasBin: true - shiki@1.25.1: - resolution: {integrity: sha512-/1boRvNYwRW3GLG9Y6dXdnZ/Ha+J5T/5y3hV7TGQUcDSBM185D3FCbXlz2eTGNKG2iWCbWqo+P0yhGKZ4/CUrw==} + shiki@1.26.1: + resolution: {integrity: sha512-Gqg6DSTk3wYqaZ5OaYtzjcdxcBvX5kCy24yvRJEgjT5U+WHlmqCThLuBUx0juyxQBi+6ug53IGeuQS07DWwpcw==} shimmer@1.2.1: resolution: {integrity: sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==} @@ -18632,6 +18563,9 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} @@ -18640,9 +18574,6 @@ packages: engines: {node: '>=4'} hasBin: true - style-to-object@0.4.4: - resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} - style-to-object@1.0.8: resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} @@ -18703,8 +18634,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte@5.16.1: - resolution: {integrity: sha512-FsA1OjAKMAFSDob6j/Tv2ZV9rY4SeqPd1WXQlQkFkePAozSHLp6tbkU9qa1xJ+uTRzMSM2Vx3USdsYZBXd3H3g==} + svelte@5.16.2: + resolution: {integrity: sha512-S4mKWbjv53ik1NtGuO95TC7kBA8GYBIeT9fM6y2wHdLNqdCmPXJSWLVuO7vlJZ7TUksp+6qnvqCCtWnVXeTCyw==} engines: {node: '>=18'} svg-parser@2.0.4: @@ -18924,6 +18855,10 @@ packages: engines: {node: '>= 12.10.0', npm: '>= 6.12.0', yarn: '>= 1.20.0'} hasBin: true + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -18936,6 +18871,10 @@ packages: resolution: {integrity: sha512-CvvMFgecnQMyg59nOnAD5O4lV83cVj2ooDniJ3j2bYvMajqlK4wQ13k6OUHfA+J5nkInTxbSGJv2olUJIiAtJg==} engines: {node: '>= 18'} + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + tinyspy@3.0.2: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} @@ -19161,11 +19100,6 @@ packages: typescript: optional: true - tsx@4.19.2: - resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} - engines: {node: '>=18.0.0'} - hasBin: true - tsyringe@4.8.0: resolution: {integrity: sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA==} engines: {node: '>= 6.0.0'} @@ -19248,6 +19182,10 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + type-fest@0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} @@ -19735,6 +19673,10 @@ packages: resolution: {integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==} hasBin: true + uuid@11.0.4: + resolution: {integrity: sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==} + hasBin: true + uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -19831,6 +19773,11 @@ packages: typescript: optional: true + vite-node@1.2.1: + resolution: {integrity: sha512-fNzHmQUSOY+y30naohBvSW7pPn/xn3Ib/uqm+5wAJQJiqQsU0NBR78XdRJb04l4bOFKjpTWld0XAfkKlrDbySg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + vite-node@2.1.4: resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} engines: {node: ^18.0.0 || >=20.0.0} @@ -19882,6 +19829,31 @@ packages: terser: optional: true + vitest@1.2.1: + resolution: {integrity: sha512-TRph8N8rnSDa5M2wKWJCMnztCZS9cDcgVTQ6tsTFTG/odHJ4l5yNVqvbeDJYJRZ6is3uxaEpFs8LL6QM+YFSdA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': ^1.0.0 + '@vitest/ui': ^1.0.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vitest@2.1.4: resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -20642,13 +20614,13 @@ snapshots: transitivePeerDependencies: - zod - '@ai-sdk/svelte@0.0.57(svelte@5.16.1)(zod@3.23.8)': + '@ai-sdk/svelte@0.0.57(svelte@5.16.2)(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - sswr: 2.1.0(svelte@5.16.1) + sswr: 2.1.0(svelte@5.16.2) optionalDependencies: - svelte: 5.16.1 + svelte: 5.16.2 transitivePeerDependencies: - zod @@ -21023,7 +20995,7 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-s3@3.721.0': + '@aws-sdk/client-s3@3.722.0': dependencies: '@aws-crypto/sha1-browser': 5.2.0 '@aws-crypto/sha256-browser': 5.2.0 @@ -21516,7 +21488,7 @@ snapshots: '@smithy/util-middleware': 3.0.11 tslib: 2.8.1 - '@aws-sdk/s3-request-presigner@3.721.0': + '@aws-sdk/s3-request-presigner@3.722.0': dependencies: '@aws-sdk/signature-v4-multi-region': 3.716.0 '@aws-sdk/types': 3.714.0 @@ -22526,11 +22498,11 @@ snapshots: - '@swc/core' - '@swc/wasm' - '@commitlint/cli@18.6.1(@types/node@22.10.4)(typescript@5.6.3)': + '@commitlint/cli@18.6.1(@types/node@22.10.5)(typescript@5.6.3)': dependencies: '@commitlint/format': 18.6.1 '@commitlint/lint': 18.6.1 - '@commitlint/load': 18.6.1(@types/node@22.10.4)(typescript@5.6.3) + '@commitlint/load': 18.6.1(@types/node@22.10.5)(typescript@5.6.3) '@commitlint/read': 18.6.1 '@commitlint/types': 18.6.1 execa: 5.1.1 @@ -22637,7 +22609,7 @@ snapshots: - '@swc/core' - '@swc/wasm' - '@commitlint/load@18.6.1(@types/node@22.10.4)(typescript@5.6.3)': + '@commitlint/load@18.6.1(@types/node@22.10.5)(typescript@5.6.3)': dependencies: '@commitlint/config-validator': 18.6.1 '@commitlint/execute-rule': 18.6.1 @@ -22645,7 +22617,7 @@ snapshots: '@commitlint/types': 18.6.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.6.3) - cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.4)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) + cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.5)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -24215,9 +24187,6 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.23.1': - optional: true - '@esbuild/aix-ppc64@0.24.2': optional: true @@ -24227,9 +24196,6 @@ snapshots: '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.23.1': - optional: true - '@esbuild/android-arm64@0.24.2': optional: true @@ -24239,9 +24205,6 @@ snapshots: '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.23.1': - optional: true - '@esbuild/android-arm@0.24.2': optional: true @@ -24251,9 +24214,6 @@ snapshots: '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.23.1': - optional: true - '@esbuild/android-x64@0.24.2': optional: true @@ -24263,9 +24223,6 @@ snapshots: '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.23.1': - optional: true - '@esbuild/darwin-arm64@0.24.2': optional: true @@ -24275,9 +24232,6 @@ snapshots: '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.23.1': - optional: true - '@esbuild/darwin-x64@0.24.2': optional: true @@ -24287,9 +24241,6 @@ snapshots: '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.23.1': - optional: true - '@esbuild/freebsd-arm64@0.24.2': optional: true @@ -24299,9 +24250,6 @@ snapshots: '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.23.1': - optional: true - '@esbuild/freebsd-x64@0.24.2': optional: true @@ -24311,9 +24259,6 @@ snapshots: '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.23.1': - optional: true - '@esbuild/linux-arm64@0.24.2': optional: true @@ -24323,9 +24268,6 @@ snapshots: '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.23.1': - optional: true - '@esbuild/linux-arm@0.24.2': optional: true @@ -24335,9 +24277,6 @@ snapshots: '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.23.1': - optional: true - '@esbuild/linux-ia32@0.24.2': optional: true @@ -24347,9 +24286,6 @@ snapshots: '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.23.1': - optional: true - '@esbuild/linux-loong64@0.24.2': optional: true @@ -24359,9 +24295,6 @@ snapshots: '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.23.1': - optional: true - '@esbuild/linux-mips64el@0.24.2': optional: true @@ -24371,9 +24304,6 @@ snapshots: '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.23.1': - optional: true - '@esbuild/linux-ppc64@0.24.2': optional: true @@ -24383,9 +24313,6 @@ snapshots: '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.23.1': - optional: true - '@esbuild/linux-riscv64@0.24.2': optional: true @@ -24395,9 +24322,6 @@ snapshots: '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.23.1': - optional: true - '@esbuild/linux-s390x@0.24.2': optional: true @@ -24407,9 +24331,6 @@ snapshots: '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.23.1': - optional: true - '@esbuild/linux-x64@0.24.2': optional: true @@ -24422,15 +24343,9 @@ snapshots: '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.23.1': - optional: true - '@esbuild/netbsd-x64@0.24.2': optional: true - '@esbuild/openbsd-arm64@0.23.1': - optional: true - '@esbuild/openbsd-arm64@0.24.2': optional: true @@ -24440,9 +24355,6 @@ snapshots: '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.23.1': - optional: true - '@esbuild/openbsd-x64@0.24.2': optional: true @@ -24452,9 +24364,6 @@ snapshots: '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.23.1': - optional: true - '@esbuild/sunos-x64@0.24.2': optional: true @@ -24464,9 +24373,6 @@ snapshots: '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.23.1': - optional: true - '@esbuild/win32-arm64@0.24.2': optional: true @@ -24476,9 +24382,6 @@ snapshots: '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.23.1': - optional: true - '@esbuild/win32-ia32@0.24.2': optional: true @@ -24488,9 +24391,6 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.23.1': - optional: true - '@esbuild/win32-x64@0.24.2': optional: true @@ -24858,6 +24758,15 @@ snapshots: '@ffmpeg-installer/win32-x64@4.1.0': optional: true + '@fksyuan/zktls-core-sdk@0.1.4(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + ethers: 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + uuid: 11.0.4 + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@floating-ui/core@1.6.8': dependencies: '@floating-ui/utils': 0.2.8 @@ -24875,23 +24784,23 @@ snapshots: '@floating-ui/utils@0.2.8': {} - '@fuel-ts/abi-coder@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/abi-coder@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) type-fest: 4.31.0 transitivePeerDependencies: - vitest - '@fuel-ts/abi-typegen@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/abi-typegen@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 commander: 12.1.0 glob: 10.4.5 @@ -24902,18 +24811,18 @@ snapshots: transitivePeerDependencies: - vitest - '@fuel-ts/account@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/account@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 '@fuels/vm-asm': 0.58.2 '@noble/curves': 1.8.0 @@ -24926,30 +24835,30 @@ snapshots: - encoding - vitest - '@fuel-ts/address@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/address@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@noble/hashes': 1.7.0 bech32: 2.0.0 transitivePeerDependencies: - vitest - '@fuel-ts/contract@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/contract@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 '@fuels/vm-asm': 0.58.2 ramda: 0.30.1 @@ -24957,12 +24866,12 @@ snapshots: - encoding - vitest - '@fuel-ts/crypto@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/crypto@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@noble/hashes': 1.7.0 transitivePeerDependencies: - vitest @@ -24971,11 +24880,11 @@ snapshots: dependencies: '@fuel-ts/versions': 0.97.2 - '@fuel-ts/hasher@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/hasher@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@noble/hashes': 1.7.0 transitivePeerDependencies: - vitest @@ -24988,78 +24897,78 @@ snapshots: '@types/bn.js': 5.1.6 bn.js: 5.2.1 - '@fuel-ts/merkle@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/merkle@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/math': 0.97.2 transitivePeerDependencies: - vitest - '@fuel-ts/program@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/program@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuels/vm-asm': 0.58.2 ramda: 0.30.1 transitivePeerDependencies: - encoding - vitest - '@fuel-ts/recipes@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/recipes@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - encoding - vitest - '@fuel-ts/script@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/script@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - encoding - vitest - '@fuel-ts/transactions@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/transactions@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - vitest - '@fuel-ts/utils@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/utils@0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 '@fuel-ts/versions': 0.97.2 fflate: 0.8.2 - vitest: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + vitest: 2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) '@fuel-ts/versions@0.97.2': dependencies: @@ -25068,10 +24977,10 @@ snapshots: '@fuels/vm-asm@0.58.2': {} - '@goat-sdk/adapter-vercel-ai@0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8))': + '@goat-sdk/adapter-vercel-ai@0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.3(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8))': dependencies: '@goat-sdk/core': 0.4.0 - ai: 3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) + ai: 3.4.33(openai@4.77.3(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) zod: 3.23.8 '@goat-sdk/core@0.4.0': @@ -25614,7 +25523,7 @@ snapshots: dependencies: '@langchain/core': 0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)) js-tiktoken: 1.0.15 - openai: 4.77.0(encoding@0.1.13)(zod@3.23.8) + openai: 4.77.3(encoding@0.1.13)(zod@3.23.8) zod: 3.23.8 zod-to-json-schema: 3.24.1(zod@3.23.8) transitivePeerDependencies: @@ -26844,9 +26753,9 @@ snapshots: dependencies: '@octokit/auth-app': 7.1.3 '@octokit/auth-unauthenticated': 6.1.0 - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/oauth-app': 7.1.4 - '@octokit/plugin-paginate-rest': 11.3.6(@octokit/core@6.1.2) + '@octokit/plugin-paginate-rest': 11.3.6(@octokit/core@6.1.3) '@octokit/types': 13.6.2 '@octokit/webhooks': 13.4.1 @@ -26863,13 +26772,13 @@ snapshots: '@octokit/auth-oauth-app@8.1.1': dependencies: - '@octokit/auth-oauth-device': 7.1.1 + '@octokit/auth-oauth-device': 7.1.2 '@octokit/auth-oauth-user': 5.1.1 '@octokit/request': 9.1.4 '@octokit/types': 13.6.2 universal-user-agent: 7.0.2 - '@octokit/auth-oauth-device@7.1.1': + '@octokit/auth-oauth-device@7.1.2': dependencies: '@octokit/oauth-methods': 5.1.3 '@octokit/request': 9.1.4 @@ -26878,7 +26787,7 @@ snapshots: '@octokit/auth-oauth-user@5.1.1': dependencies: - '@octokit/auth-oauth-device': 7.1.1 + '@octokit/auth-oauth-device': 7.1.2 '@octokit/oauth-methods': 5.1.3 '@octokit/request': 9.1.4 '@octokit/types': 13.6.2 @@ -26917,7 +26826,7 @@ snapshots: before-after-hook: 2.2.3 universal-user-agent: 6.0.1 - '@octokit/core@6.1.2': + '@octokit/core@6.1.3': dependencies: '@octokit/auth-token': 5.1.1 '@octokit/graphql': 8.1.2 @@ -26968,7 +26877,7 @@ snapshots: '@octokit/auth-oauth-app': 8.1.1 '@octokit/auth-oauth-user': 5.1.1 '@octokit/auth-unauthenticated': 6.1.0 - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/oauth-authorization-url': 7.1.1 '@octokit/oauth-methods': 5.1.3 '@types/aws-lambda': 8.10.147 @@ -26993,18 +26902,18 @@ snapshots: '@octokit/plugin-enterprise-rest@6.0.1': {} - '@octokit/plugin-paginate-graphql@5.2.4(@octokit/core@6.1.2)': + '@octokit/plugin-paginate-graphql@5.2.4(@octokit/core@6.1.3)': dependencies: - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/plugin-paginate-rest@11.3.1(@octokit/core@5.2.0)': dependencies: '@octokit/core': 5.2.0 '@octokit/types': 13.6.2 - '@octokit/plugin-paginate-rest@11.3.6(@octokit/core@6.1.2)': + '@octokit/plugin-paginate-rest@11.3.6(@octokit/core@6.1.3)': dependencies: - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/types': 13.6.2 '@octokit/plugin-paginate-rest@6.1.2(@octokit/core@4.2.4(encoding@0.1.13))': @@ -27026,9 +26935,9 @@ snapshots: '@octokit/core': 5.2.0 '@octokit/types': 13.6.2 - '@octokit/plugin-rest-endpoint-methods@13.2.6(@octokit/core@6.1.2)': + '@octokit/plugin-rest-endpoint-methods@13.2.6(@octokit/core@6.1.3)': dependencies: - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/types': 13.6.2 '@octokit/plugin-rest-endpoint-methods@7.2.3(@octokit/core@4.2.4(encoding@0.1.13))': @@ -27036,16 +26945,16 @@ snapshots: '@octokit/core': 4.2.4(encoding@0.1.13) '@octokit/types': 10.0.0 - '@octokit/plugin-retry@7.1.2(@octokit/core@6.1.2)': + '@octokit/plugin-retry@7.1.2(@octokit/core@6.1.3)': dependencies: - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/request-error': 6.1.6 '@octokit/types': 13.6.2 bottleneck: 2.19.5 - '@octokit/plugin-throttling@9.3.2(@octokit/core@6.1.2)': + '@octokit/plugin-throttling@9.3.2(@octokit/core@6.1.3)': dependencies: - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/types': 13.6.2 bottleneck: 2.19.5 @@ -27088,7 +26997,7 @@ snapshots: '@octokit/endpoint': 10.1.2 '@octokit/request-error': 6.1.6 '@octokit/types': 13.6.2 - fast-content-type-parse: 2.0.0 + fast-content-type-parse: 2.0.1 universal-user-agent: 7.0.2 '@octokit/rest@19.0.11(encoding@0.1.13)': @@ -27172,7 +27081,7 @@ snapshots: - supports-color - utf-8-validate - '@onflow/fcl-wc@5.5.1(@onflow/fcl-core@1.13.1(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bufferutil@4.0.9)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(tsx@4.19.2)(utf-8-validate@5.0.10)': + '@onflow/fcl-wc@5.5.1(@onflow/fcl-core@1.13.1(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bufferutil@4.0.9)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@onflow/config': 1.5.1 @@ -27184,7 +27093,7 @@ snapshots: '@walletconnect/sign-client': 2.17.3(bufferutil@4.0.9)(ioredis@5.4.2)(utf-8-validate@5.0.10) '@walletconnect/types': 2.17.3(ioredis@5.4.2) '@walletconnect/utils': 2.17.3(ioredis@5.4.2) - postcss-cli: 11.0.0(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2) + postcss-cli: 11.0.0(jiti@2.4.2)(postcss@8.4.49) preact: 10.25.4 tailwindcss: 3.4.15(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) transitivePeerDependencies: @@ -27217,12 +27126,12 @@ snapshots: - uploadthing - utf-8-validate - '@onflow/fcl@1.13.1(@types/react@18.3.12)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(tsx@4.19.2)(utf-8-validate@5.0.10)': + '@onflow/fcl@1.13.1(@types/react@18.3.12)(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 '@onflow/config': 1.5.1 '@onflow/fcl-core': 1.13.1(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(utf-8-validate@5.0.10) - '@onflow/fcl-wc': 5.5.1(@onflow/fcl-core@1.13.1(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bufferutil@4.0.9)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(tsx@4.19.2)(utf-8-validate@5.0.10) + '@onflow/fcl-wc': 5.5.1(@onflow/fcl-core@1.13.1(bufferutil@4.0.9)(encoding@0.1.13)(google-protobuf@3.21.4)(utf-8-validate@5.0.10))(@types/react@18.3.12)(bufferutil@4.0.9)(ioredis@5.4.2)(jiti@2.4.2)(postcss@8.4.49)(react@18.3.1)(utf-8-validate@5.0.10) '@onflow/interaction': 0.0.11 '@onflow/rlp': 1.2.3 '@onflow/sdk': 1.5.5(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) @@ -28351,7 +28260,7 @@ snapshots: '@react-icons/all-files': 4.1.0(react@18.3.1) '@types/big.js': 6.2.2 '@types/bn.js': 5.1.6 - '@types/lodash': 4.17.13 + '@types/lodash': 4.17.14 big.js: 6.2.2 bn.js: 5.2.1 lodash: 4.17.21 @@ -28479,11 +28388,11 @@ snapshots: optionalDependencies: rollup: 3.29.5 - '@rollup/plugin-json@6.1.0(rollup@4.29.1)': + '@rollup/plugin-json@6.1.0(rollup@4.29.2)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.29.1) + '@rollup/pluginutils': 5.1.4(rollup@4.29.2) optionalDependencies: - rollup: 4.29.1 + rollup: 4.29.2 '@rollup/plugin-node-resolve@15.3.0(rollup@2.79.2)': dependencies: @@ -28534,9 +28443,9 @@ snapshots: rollup: 2.79.2 tslib: 2.8.1 - '@rollup/plugin-virtual@3.0.2(rollup@4.29.1)': + '@rollup/plugin-virtual@3.0.2(rollup@4.29.2)': optionalDependencies: - rollup: 4.29.1 + rollup: 4.29.2 '@rollup/pluginutils@5.1.4(rollup@2.79.2)': dependencies: @@ -28554,69 +28463,69 @@ snapshots: optionalDependencies: rollup: 3.29.5 - '@rollup/pluginutils@5.1.4(rollup@4.29.1)': + '@rollup/pluginutils@5.1.4(rollup@4.29.2)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.29.1 + rollup: 4.29.2 - '@rollup/rollup-android-arm-eabi@4.29.1': + '@rollup/rollup-android-arm-eabi@4.29.2': optional: true - '@rollup/rollup-android-arm64@4.29.1': + '@rollup/rollup-android-arm64@4.29.2': optional: true - '@rollup/rollup-darwin-arm64@4.29.1': + '@rollup/rollup-darwin-arm64@4.29.2': optional: true - '@rollup/rollup-darwin-x64@4.29.1': + '@rollup/rollup-darwin-x64@4.29.2': optional: true - '@rollup/rollup-freebsd-arm64@4.29.1': + '@rollup/rollup-freebsd-arm64@4.29.2': optional: true - '@rollup/rollup-freebsd-x64@4.29.1': + '@rollup/rollup-freebsd-x64@4.29.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.29.1': + '@rollup/rollup-linux-arm-gnueabihf@4.29.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.29.1': + '@rollup/rollup-linux-arm-musleabihf@4.29.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.29.1': + '@rollup/rollup-linux-arm64-gnu@4.29.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.29.1': + '@rollup/rollup-linux-arm64-musl@4.29.2': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.29.1': + '@rollup/rollup-linux-loongarch64-gnu@4.29.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.29.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.29.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.29.1': + '@rollup/rollup-linux-riscv64-gnu@4.29.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.29.1': + '@rollup/rollup-linux-s390x-gnu@4.29.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.29.1': + '@rollup/rollup-linux-x64-gnu@4.29.2': optional: true - '@rollup/rollup-linux-x64-musl@4.29.1': + '@rollup/rollup-linux-x64-musl@4.29.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.29.1': + '@rollup/rollup-win32-arm64-msvc@4.29.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.29.1': + '@rollup/rollup-win32-ia32-msvc@4.29.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.29.1': + '@rollup/rollup-win32-x64-msvc@4.29.2': optional: true '@rtsao/scc@1.1.0': {} @@ -28739,40 +28648,40 @@ snapshots: '@sentry/types': 5.30.0 tslib: 1.14.1 - '@shikijs/core@1.25.1': + '@shikijs/core@1.26.1': dependencies: - '@shikijs/engine-javascript': 1.25.1 - '@shikijs/engine-oniguruma': 1.25.1 - '@shikijs/types': 1.25.1 - '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/engine-javascript': 1.26.1 + '@shikijs/engine-oniguruma': 1.26.1 + '@shikijs/types': 1.26.1 + '@shikijs/vscode-textmate': 10.0.1 '@types/hast': 3.0.4 hast-util-to-html: 9.0.4 - '@shikijs/engine-javascript@1.25.1': + '@shikijs/engine-javascript@1.26.1': dependencies: - '@shikijs/types': 1.25.1 - '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/types': 1.26.1 + '@shikijs/vscode-textmate': 10.0.1 oniguruma-to-es: 0.10.0 - '@shikijs/engine-oniguruma@1.25.1': + '@shikijs/engine-oniguruma@1.26.1': dependencies: - '@shikijs/types': 1.25.1 - '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/types': 1.26.1 + '@shikijs/vscode-textmate': 10.0.1 - '@shikijs/langs@1.25.1': + '@shikijs/langs@1.26.1': dependencies: - '@shikijs/types': 1.25.1 + '@shikijs/types': 1.26.1 - '@shikijs/themes@1.25.1': + '@shikijs/themes@1.26.1': dependencies: - '@shikijs/types': 1.25.1 + '@shikijs/types': 1.26.1 - '@shikijs/types@1.25.1': + '@shikijs/types@1.26.1': dependencies: - '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/vscode-textmate': 10.0.1 '@types/hast': 3.0.4 - '@shikijs/vscode-textmate@9.3.1': {} + '@shikijs/vscode-textmate@10.0.1': {} '@sideway/address@4.1.5': dependencies: @@ -30005,7 +29914,7 @@ snapshots: '@types/d3-selection@3.0.11': {} - '@types/d3-shape@3.1.6': + '@types/d3-shape@3.1.7': dependencies: '@types/d3-path': 3.1.0 @@ -30050,7 +29959,7 @@ snapshots: '@types/d3-scale': 4.0.8 '@types/d3-scale-chromatic': 3.1.0 '@types/d3-selection': 3.0.11 - '@types/d3-shape': 3.1.6 + '@types/d3-shape': 3.1.7 '@types/d3-time': 3.0.4 '@types/d3-time-format': 4.0.3 '@types/d3-timer': 3.0.2 @@ -30203,9 +30112,9 @@ snapshots: '@types/lodash.isstring@4.0.9': dependencies: - '@types/lodash': 4.17.13 + '@types/lodash': 4.17.14 - '@types/lodash@4.17.13': {} + '@types/lodash@4.17.14': {} '@types/long@4.0.2': {} @@ -30260,7 +30169,7 @@ snapshots: '@types/node@20.5.1': {} - '@types/node@22.10.4': + '@types/node@22.10.5': dependencies: undici-types: 6.20.0 @@ -30524,7 +30433,7 @@ snapshots: '@typescript-eslint/types': 8.11.0 '@typescript-eslint/visitor-keys': 8.11.0 debug: 4.4.0(supports-color@8.1.1) - fast-glob: 3.3.2 + fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 @@ -30539,7 +30448,7 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.4.0(supports-color@8.1.1) - fast-glob: 3.3.2 + fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 @@ -30640,13 +30549,19 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: eslint: 9.16.0(jiti@2.4.2) optionalDependencies: '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) typescript: 5.6.3 - vitest: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + vitest: 2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + + '@vitest/expect@1.2.1': + dependencies: + '@vitest/spy': 1.2.1 + '@vitest/utils': 1.2.1 + chai: 4.5.0 '@vitest/expect@2.1.4': dependencies: @@ -30662,21 +30577,21 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.4(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0))': + '@vitest/mocker@2.1.4(vite@5.4.11(@types/node@22.10.5)(terser@5.37.0))': dependencies: '@vitest/spy': 2.1.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) - '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0))': + '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.10.5)(terser@5.37.0))': dependencies: '@vitest/spy': 2.1.5 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) '@vitest/pretty-format@2.1.4': dependencies: @@ -30690,6 +30605,12 @@ snapshots: dependencies: tinyrainbow: 1.2.0 + '@vitest/runner@1.2.1': + dependencies: + '@vitest/utils': 1.2.1 + p-limit: 5.0.0 + pathe: 1.1.2 + '@vitest/runner@2.1.4': dependencies: '@vitest/utils': 2.1.4 @@ -30700,6 +30621,12 @@ snapshots: '@vitest/utils': 2.1.5 pathe: 1.1.2 + '@vitest/snapshot@1.2.1': + dependencies: + magic-string: 0.30.17 + pathe: 1.1.2 + pretty-format: 29.7.0 + '@vitest/snapshot@2.1.4': dependencies: '@vitest/pretty-format': 2.1.4 @@ -30712,6 +30639,10 @@ snapshots: magic-string: 0.30.17 pathe: 1.1.2 + '@vitest/spy@1.2.1': + dependencies: + tinyspy: 2.2.1 + '@vitest/spy@2.1.4': dependencies: tinyspy: 3.0.2 @@ -30720,6 +30651,13 @@ snapshots: dependencies: tinyspy: 3.0.2 + '@vitest/utils@1.2.1': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + '@vitest/utils@2.1.4': dependencies: '@vitest/pretty-format': 2.1.4 @@ -31362,13 +31300,13 @@ snapshots: clean-stack: 2.2.0 indent-string: 4.0.0 - ai@3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): + ai@3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) - '@ai-sdk/svelte': 0.0.57(svelte@5.16.1)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.57(svelte@5.16.2)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) '@opentelemetry/api': 1.9.0 @@ -31380,20 +31318,20 @@ snapshots: optionalDependencies: openai: 4.73.0(encoding@0.1.13)(zod@3.23.8) react: 18.3.1 - sswr: 2.1.0(svelte@5.16.1) - svelte: 5.16.1 + sswr: 2.1.0(svelte@5.16.2) + svelte: 5.16.2 zod: 3.23.8 transitivePeerDependencies: - solid-js - vue - ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): + ai@3.4.33(openai@4.77.3(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.2))(svelte@5.16.2)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) - '@ai-sdk/svelte': 0.0.57(svelte@5.16.1)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.57(svelte@5.16.2)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) '@opentelemetry/api': 1.9.0 @@ -31403,10 +31341,10 @@ snapshots: secure-json-parse: 2.7.0 zod-to-json-schema: 3.24.1(zod@3.23.8) optionalDependencies: - openai: 4.77.0(encoding@0.1.13)(zod@3.23.8) + openai: 4.77.3(encoding@0.1.13)(zod@3.23.8) react: 18.3.1 - sswr: 2.1.0(svelte@5.16.1) - svelte: 5.16.1 + sswr: 2.1.0(svelte@5.16.2) + svelte: 5.16.2 zod: 3.23.8 transitivePeerDependencies: - solid-js @@ -31435,7 +31373,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.3 + fast-uri: 3.0.4 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -31667,6 +31605,8 @@ snapshots: object.assign: 4.1.7 util: 0.10.4 + assertion-error@1.1.0: {} + assertion-error@2.0.1: {} ast-types@0.13.4: @@ -31963,12 +31903,12 @@ snapshots: balanced-match@1.0.2: {} - bare-events@2.5.0: + bare-events@2.5.1: optional: true bare-fs@2.3.5: dependencies: - bare-events: 2.5.0 + bare-events: 2.5.1 bare-path: 2.1.3 bare-stream: 2.6.1 optional: true @@ -32100,7 +32040,7 @@ snapshots: bip39@3.1.0: dependencies: - '@noble/hashes': 1.7.0 + '@noble/hashes': 1.3.0 bitcoinjs-lib@7.0.0-rc.0(typescript@5.6.3): dependencies: @@ -32618,6 +32558,16 @@ snapshots: ccount@2.0.1: {} + chai@4.5.0: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.1.0 + chai@5.1.2: dependencies: assertion-error: 2.0.1 @@ -32671,6 +32621,10 @@ snapshots: charm@0.1.2: {} + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + check-error@2.1.1: {} check-types@11.2.3: {} @@ -33200,11 +33154,13 @@ snapshots: cookie@0.7.1: {} + cookie@0.7.2: {} + copy-text-to-clipboard@3.2.0: {} copy-webpack-plugin@11.0.0(webpack@5.97.1(@swc/core@1.10.4(@swc/helpers@0.5.15))): dependencies: - fast-glob: 3.3.2 + fast-glob: 3.3.3 glob-parent: 6.0.2 globby: 13.2.2 normalize-path: 3.0.0 @@ -33246,9 +33202,9 @@ snapshots: ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.5.1)(typescript@5.6.3) typescript: 5.6.3 - cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.4)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): + cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.5)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): dependencies: - '@types/node': 22.10.4 + '@types/node': 22.10.5 cosmiconfig: 8.3.6(typescript@5.6.3) jiti: 1.21.7 typescript: 5.6.3 @@ -33333,13 +33289,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.10.4): + create-jest@29.7.0(@types/node@22.10.5): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.4) + jest-config: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -33934,6 +33890,10 @@ snapshots: dedent@1.5.3: {} + deep-eql@4.1.4: + dependencies: + type-detect: 4.1.0 + deep-eql@5.0.2: {} deep-extend@0.6.0: {} @@ -34348,7 +34308,7 @@ snapshots: async-value-promise: 1.1.1 basic-auth: 2.0.1 breadth-filter: 2.0.0 - cookie: 0.7.1 + cookie: 0.7.2 core-util-is: 1.0.3 end-of-stream: 1.4.4 error-callsites: 2.0.4 @@ -34662,34 +34622,6 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.23.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 - optional: true - esbuild@0.24.2: optionalDependencies: '@esbuild/aix-ppc64': 0.24.2 @@ -35295,13 +35227,13 @@ snapshots: eyes@0.1.8: {} - fast-content-type-parse@2.0.0: {} + fast-content-type-parse@2.0.1: {} fast-deep-equal@3.1.3: {} fast-fifo@1.3.2: {} - fast-glob@3.3.2: + fast-glob@3.3.3: dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 @@ -35325,7 +35257,7 @@ snapshots: dependencies: end-of-stream: 1.4.4 - fast-uri@3.0.3: {} + fast-uri@3.0.4: {} fast-xml-parser@4.4.1: dependencies: @@ -35670,24 +35602,24 @@ snapshots: fsevents@2.3.3: optional: true - fuels@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)): + fuels@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)): dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/recipes': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/script': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/recipes': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/script': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 bundle-require: 5.1.0(esbuild@0.24.2) chalk: 4.1.2 @@ -35796,6 +35728,8 @@ snapshots: get-east-asian-width@1.3.0: {} + get-func-name@2.0.2: {} + get-intrinsic@1.2.7: dependencies: call-bind-apply-helpers: 1.0.1 @@ -35861,11 +35795,6 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.2.7 - get-tsconfig@4.8.1: - dependencies: - resolve-pkg-maps: 1.0.0 - optional: true - get-uri@6.0.4: dependencies: basic-ftp: 5.0.5 @@ -36039,7 +35968,7 @@ snapshots: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.2 + fast-glob: 3.3.3 ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -36047,7 +35976,7 @@ snapshots: globby@13.2.2: dependencies: dir-glob: 3.0.1 - fast-glob: 3.3.2 + fast-glob: 3.3.3 ignore: 5.3.2 merge2: 1.4.1 slash: 4.0.0 @@ -36055,7 +35984,7 @@ snapshots: globby@14.0.2: dependencies: '@sindresorhus/merge-streams': 2.3.0 - fast-glob: 3.3.2 + fast-glob: 3.3.3 ignore: 5.3.2 path-type: 5.0.0 slash: 5.1.0 @@ -36196,7 +36125,7 @@ snapshots: hard-rejection@2.1.0: {} - hardhat@2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): + hardhat@2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -36243,7 +36172,7 @@ snapshots: uuid: 8.3.2 ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3) + ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3) typescript: 5.6.3 transitivePeerDependencies: - bufferutil @@ -36362,7 +36291,7 @@ snapshots: unist-util-visit: 2.0.3 zwitch: 1.0.5 - hast-util-to-estree@3.1.0: + hast-util-to-estree@3.1.1: dependencies: '@types/estree': 1.0.6 '@types/estree-jsx': 1.0.5 @@ -36377,7 +36306,7 @@ snapshots: mdast-util-mdxjs-esm: 2.0.1 property-information: 6.5.0 space-separated-tokens: 2.0.2 - style-to-object: 0.4.4 + style-to-object: 1.0.8 unist-util-position: 5.0.0 zwitch: 2.0.4 transitivePeerDependencies: @@ -36800,8 +36729,6 @@ snapshots: dependencies: source-map: 0.5.7 - inline-style-parser@0.1.1: {} - inline-style-parser@0.2.4: {} inquirer@8.2.6: @@ -37392,16 +37319,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.10.4): + jest-cli@29.7.0(@types/node@22.10.5): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.4) + create-jest: 29.7.0(@types/node@22.10.5) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.4) + jest-config: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -37554,7 +37481,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.10.4): + jest-config@29.7.0(@types/node@22.10.5): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -37579,7 +37506,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.4 + '@types/node': 22.10.5 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -37860,12 +37787,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@22.10.4): + jest@29.7.0(@types/node@22.10.5): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.4) + jest-cli: 29.7.0(@types/node@22.10.5) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -38619,6 +38546,10 @@ snapshots: lossless-json@4.0.2: {} + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + loupe@3.1.2: {} lowdb@7.0.1: @@ -38779,7 +38710,7 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-find-and-replace@3.0.1: + mdast-util-find-and-replace@3.0.2: dependencies: '@types/mdast': 4.0.4 escape-string-regexp: 5.0.0 @@ -38819,7 +38750,7 @@ snapshots: '@types/mdast': 4.0.4 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-find-and-replace: 3.0.1 + mdast-util-find-and-replace: 3.0.2 micromark-util-character: 2.1.1 mdast-util-gfm-footnote@2.0.0: @@ -40231,13 +40162,13 @@ snapshots: octokit@4.0.3: dependencies: '@octokit/app': 15.1.1 - '@octokit/core': 6.1.2 + '@octokit/core': 6.1.3 '@octokit/oauth-app': 7.1.4 - '@octokit/plugin-paginate-graphql': 5.2.4(@octokit/core@6.1.2) - '@octokit/plugin-paginate-rest': 11.3.6(@octokit/core@6.1.2) - '@octokit/plugin-rest-endpoint-methods': 13.2.6(@octokit/core@6.1.2) - '@octokit/plugin-retry': 7.1.2(@octokit/core@6.1.2) - '@octokit/plugin-throttling': 9.3.2(@octokit/core@6.1.2) + '@octokit/plugin-paginate-graphql': 5.2.4(@octokit/core@6.1.3) + '@octokit/plugin-paginate-rest': 11.3.6(@octokit/core@6.1.3) + '@octokit/plugin-rest-endpoint-methods': 13.2.6(@octokit/core@6.1.3) + '@octokit/plugin-retry': 7.1.2(@octokit/core@6.1.3) + '@octokit/plugin-throttling': 9.3.2(@octokit/core@6.1.3) '@octokit/request-error': 6.1.6 '@octokit/types': 13.6.2 @@ -40345,7 +40276,7 @@ snapshots: transitivePeerDependencies: - encoding - openai@4.77.0(encoding@0.1.13)(zod@3.23.8): + openai@4.77.3(encoding@0.1.13)(zod@3.23.8): dependencies: '@types/node': 18.19.69 '@types/node-fetch': 2.6.12 @@ -40441,11 +40372,11 @@ snapshots: ox@0.4.4(typescript@5.6.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.11.0 - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 - '@scure/bip32': 1.6.1 - '@scure/bip39': 1.5.1 - abitype: 1.0.8(typescript@5.6.3)(zod@3.23.8) + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 + '@scure/bip32': 1.6.0 + '@scure/bip39': 1.5.0 + abitype: 1.0.7(typescript@5.6.3)(zod@3.23.8) eventemitter3: 5.0.1 optionalDependencies: typescript: 5.6.3 @@ -40474,6 +40405,10 @@ snapshots: dependencies: yocto-queue: 1.1.1 + p-limit@5.0.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@2.0.0: dependencies: p-limit: 1.3.0 @@ -40753,6 +40688,8 @@ snapshots: pathe@1.1.2: {} + pathval@1.1.1: {} + pathval@2.0.0: {} pbkdf2@3.1.2: @@ -41065,7 +41002,7 @@ snapshots: postcss: 8.4.49 postcss-value-parser: 4.2.0 - postcss-cli@11.0.0(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2): + postcss-cli@11.0.0(jiti@2.4.2)(postcss@8.4.49): dependencies: chokidar: 3.6.0 dependency-graph: 0.11.0 @@ -41074,7 +41011,7 @@ snapshots: globby: 14.0.2 picocolors: 1.1.1 postcss: 8.4.49 - postcss-load-config: 5.1.0(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2) + postcss-load-config: 5.1.0(jiti@2.4.2)(postcss@8.4.49) postcss-reporter: 7.1.0(postcss@8.4.49) pretty-hrtime: 1.0.3 read-cache: 1.0.0 @@ -41261,22 +41198,20 @@ snapshots: postcss: 8.4.49 ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3) - postcss-load-config@5.1.0(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2): + postcss-load-config@5.1.0(jiti@2.4.2)(postcss@8.4.49): dependencies: lilconfig: 3.1.3 yaml: 2.7.0 optionalDependencies: jiti: 2.4.2 postcss: 8.4.49 - tsx: 4.19.2 - postcss-load-config@6.0.1(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.7.0): + postcss-load-config@6.0.1(jiti@2.4.2)(postcss@8.4.49)(yaml@2.7.0): dependencies: lilconfig: 3.1.3 optionalDependencies: jiti: 2.4.2 postcss: 8.4.49 - tsx: 4.19.2 yaml: 2.7.0 postcss-loader@7.3.4(postcss@8.4.49)(typescript@5.6.3)(webpack@5.97.1(@swc/core@1.10.4(@swc/helpers@0.5.15))): @@ -41932,10 +41867,10 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 - pumpdotfun-sdk@1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.1)(typescript@5.6.3)(utf-8-validate@5.0.10): + pumpdotfun-sdk@1.3.2(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(rollup@4.29.2)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@coral-xyz/anchor': 0.30.1(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) - '@rollup/plugin-json': 6.1.0(rollup@4.29.1) + '@rollup/plugin-json': 6.1.0(rollup@4.29.2) '@solana/spl-token': 0.4.6(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10) '@solana/web3.js': 1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -42553,7 +42488,7 @@ snapshots: dependencies: '@types/estree': 1.0.6 '@types/hast': 3.0.4 - hast-util-to-estree: 3.1.0 + hast-util-to-estree: 3.1.1 transitivePeerDependencies: - supports-color @@ -42574,7 +42509,7 @@ snapshots: dependencies: '@types/mdast': 4.0.4 emoticon: 4.1.0 - mdast-util-find-and-replace: 3.0.1 + mdast-util-find-and-replace: 3.0.2 node-emoji: 2.2.0 unified: 11.0.5 @@ -42703,9 +42638,6 @@ snapshots: resolve-pathname@3.0.0: {} - resolve-pkg-maps@1.0.0: - optional: true - resolve.exports@2.0.3: {} resolve@1.17.0: @@ -42790,29 +42722,29 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - rollup@4.29.1: + rollup@4.29.2: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.29.1 - '@rollup/rollup-android-arm64': 4.29.1 - '@rollup/rollup-darwin-arm64': 4.29.1 - '@rollup/rollup-darwin-x64': 4.29.1 - '@rollup/rollup-freebsd-arm64': 4.29.1 - '@rollup/rollup-freebsd-x64': 4.29.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.29.1 - '@rollup/rollup-linux-arm-musleabihf': 4.29.1 - '@rollup/rollup-linux-arm64-gnu': 4.29.1 - '@rollup/rollup-linux-arm64-musl': 4.29.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.29.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.29.1 - '@rollup/rollup-linux-riscv64-gnu': 4.29.1 - '@rollup/rollup-linux-s390x-gnu': 4.29.1 - '@rollup/rollup-linux-x64-gnu': 4.29.1 - '@rollup/rollup-linux-x64-musl': 4.29.1 - '@rollup/rollup-win32-arm64-msvc': 4.29.1 - '@rollup/rollup-win32-ia32-msvc': 4.29.1 - '@rollup/rollup-win32-x64-msvc': 4.29.1 + '@rollup/rollup-android-arm-eabi': 4.29.2 + '@rollup/rollup-android-arm64': 4.29.2 + '@rollup/rollup-darwin-arm64': 4.29.2 + '@rollup/rollup-darwin-x64': 4.29.2 + '@rollup/rollup-freebsd-arm64': 4.29.2 + '@rollup/rollup-freebsd-x64': 4.29.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.29.2 + '@rollup/rollup-linux-arm-musleabihf': 4.29.2 + '@rollup/rollup-linux-arm64-gnu': 4.29.2 + '@rollup/rollup-linux-arm64-musl': 4.29.2 + '@rollup/rollup-linux-loongarch64-gnu': 4.29.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.29.2 + '@rollup/rollup-linux-riscv64-gnu': 4.29.2 + '@rollup/rollup-linux-s390x-gnu': 4.29.2 + '@rollup/rollup-linux-x64-gnu': 4.29.2 + '@rollup/rollup-linux-x64-musl': 4.29.2 + '@rollup/rollup-win32-arm64-msvc': 4.29.2 + '@rollup/rollup-win32-ia32-msvc': 4.29.2 + '@rollup/rollup-win32-x64-msvc': 4.29.2 fsevents: 2.3.3 roughjs@4.6.6: @@ -43177,15 +43109,15 @@ snapshots: interpret: 1.4.0 rechoir: 0.6.2 - shiki@1.25.1: + shiki@1.26.1: dependencies: - '@shikijs/core': 1.25.1 - '@shikijs/engine-javascript': 1.25.1 - '@shikijs/engine-oniguruma': 1.25.1 - '@shikijs/langs': 1.25.1 - '@shikijs/themes': 1.25.1 - '@shikijs/types': 1.25.1 - '@shikijs/vscode-textmate': 9.3.1 + '@shikijs/core': 1.26.1 + '@shikijs/engine-javascript': 1.26.1 + '@shikijs/engine-oniguruma': 1.26.1 + '@shikijs/langs': 1.26.1 + '@shikijs/themes': 1.26.1 + '@shikijs/types': 1.26.1 + '@shikijs/vscode-textmate': 10.0.1 '@types/hast': 3.0.4 shimmer@1.2.1: {} @@ -43521,9 +43453,9 @@ snapshots: dependencies: minipass: 7.1.2 - sswr@2.1.0(svelte@5.16.1): + sswr@2.1.0(svelte@5.16.2): dependencies: - svelte: 5.16.1 + svelte: 5.16.2 swrev: 4.0.0 stack-utils@2.0.6: @@ -43619,7 +43551,7 @@ snapshots: queue-tick: 1.0.1 text-decoder: 1.2.3 optionalDependencies: - bare-events: 2.5.0 + bare-events: 2.5.1 strict-uri-encode@2.0.0: {} @@ -43730,6 +43662,10 @@ snapshots: strip-json-comments@3.1.1: {} + strip-literal@1.3.0: + dependencies: + acorn: 8.14.0 + strnum@1.0.5: {} strong-log-transformer@2.1.0: @@ -43738,10 +43674,6 @@ snapshots: minimist: 1.2.8 through: 2.3.8 - style-to-object@0.4.4: - dependencies: - inline-style-parser: 0.1.1 - style-to-object@1.0.8: dependencies: inline-style-parser: 0.2.4 @@ -43801,7 +43733,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.16.1: + svelte@5.16.2: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 @@ -43867,7 +43799,7 @@ snapshots: chokidar: 3.6.0 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.3.2 + fast-glob: 3.3.3 glob-parent: 6.0.2 is-glob: 4.0.3 jiti: 1.21.7 @@ -44069,12 +44001,16 @@ snapshots: tinyld@1.3.4: {} + tinypool@0.8.4: {} + tinypool@1.0.2: {} tinyrainbow@1.2.0: {} tinyspawn@1.3.3: {} + tinyspy@2.2.1: {} + tinyspy@3.0.2: {} tldts-core@6.1.70: {} @@ -44229,12 +44165,12 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.26.0) - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.4))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.5))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.10.4) + jest: 29.7.0(@types/node@22.10.5) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -44329,14 +44265,14 @@ snapshots: optionalDependencies: '@swc/core': 1.10.4(@swc/helpers@0.5.15) - ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3): + ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.4 + '@types/node': 22.10.5 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -44397,7 +44333,7 @@ snapshots: tsscmp@1.0.6: {} - tsup@8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0): + tsup@8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(typescript@5.6.3)(yaml@2.7.0): dependencies: bundle-require: 5.1.0(esbuild@0.24.2) cac: 6.7.14 @@ -44407,9 +44343,9 @@ snapshots: esbuild: 0.24.2 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(yaml@2.7.0) + postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.4.49)(yaml@2.7.0) resolve-from: 5.0.0 - rollup: 4.29.1 + rollup: 4.29.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tinyexec: 0.3.2 @@ -44425,14 +44361,6 @@ snapshots: - tsx - yaml - tsx@4.19.2: - dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.8.1 - optionalDependencies: - fsevents: 2.3.3 - optional: true - tsyringe@4.8.0: dependencies: tslib: 1.14.1 @@ -44505,6 +44433,8 @@ snapshots: type-detect@4.0.8: {} + type-detect@4.1.0: {} + type-fest@0.18.1: {} type-fest@0.20.2: {} @@ -44593,7 +44523,7 @@ snapshots: lunr: 2.3.9 markdown-it: 14.1.0 minimatch: 9.0.5 - shiki: 1.25.1 + shiki: 1.26.1 typescript: 5.6.3 yaml: 2.7.0 @@ -44982,6 +44912,8 @@ snapshots: uuid@11.0.3: {} + uuid@11.0.4: {} + uuid@3.4.0: {} uuid@8.3.2: {} @@ -45082,12 +45014,13 @@ snapshots: - utf-8-validate - zod - vite-node@2.1.4(@types/node@22.10.4)(terser@5.37.0): + vite-node@1.2.1(@types/node@22.10.5)(terser@5.37.0): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + picocolors: 1.1.1 + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) transitivePeerDependencies: - '@types/node' - less @@ -45099,13 +45032,30 @@ snapshots: - supports-color - terser - vite-node@2.1.5(@types/node@22.10.4)(terser@5.37.0): + vite-node@2.1.4(@types/node@22.10.5)(terser@5.37.0): + dependencies: + cac: 6.7.14 + debug: 4.4.0(supports-color@8.1.1) + pathe: 1.1.2 + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite-node@2.1.5(@types/node@22.10.5)(terser@5.37.0): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) transitivePeerDependencies: - '@types/node' - less @@ -45135,9 +45085,9 @@ snapshots: - supports-color - terser - vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.15)(rollup@4.29.1)(vite@client+@tanstack+router-plugin+vite): + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.15)(rollup@4.29.2)(vite@client+@tanstack+router-plugin+vite): dependencies: - '@rollup/plugin-virtual': 3.0.2(rollup@4.29.1) + '@rollup/plugin-virtual': 3.0.2(rollup@4.29.2) '@swc/core': 1.10.4(@swc/helpers@0.5.15) uuid: 10.0.0 vite: link:client/@tanstack/router-plugin/vite @@ -45149,13 +45099,13 @@ snapshots: dependencies: vite: link:client/@tanstack/router-plugin/vite - vite@5.4.11(@types/node@22.10.4)(terser@5.37.0): + vite@5.4.11(@types/node@22.10.5)(terser@5.37.0): dependencies: esbuild: 0.21.5 postcss: 8.4.49 - rollup: 4.29.1 + rollup: 4.29.2 optionalDependencies: - '@types/node': 22.10.4 + '@types/node': 22.10.5 fsevents: 2.3.3 terser: 5.37.0 @@ -45163,16 +45113,52 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.49 - rollup: 4.29.1 + rollup: 4.29.2 optionalDependencies: '@types/node': 22.8.4 fsevents: 2.3.3 terser: 5.37.0 - vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + vitest@1.2.1(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + dependencies: + '@vitest/expect': 1.2.1 + '@vitest/runner': 1.2.1 + '@vitest/snapshot': 1.2.1 + '@vitest/spy': 1.2.1 + '@vitest/utils': 1.2.1 + acorn-walk: 8.3.4 + cac: 6.7.14 + chai: 4.5.0 + debug: 4.4.0(supports-color@8.1.1) + execa: 8.0.1 + local-pkg: 0.5.1 + magic-string: 0.30.17 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.8.0 + strip-literal: 1.3.0 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) + vite-node: 1.2.1(@types/node@22.10.5)(terser@5.37.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.10.5 + jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vitest@2.1.4(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.4 - '@vitest/mocker': 2.1.4(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) + '@vitest/mocker': 2.1.4(vite@5.4.11(@types/node@22.10.5)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.4 '@vitest/snapshot': 2.1.4 @@ -45188,11 +45174,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) - vite-node: 2.1.4(@types/node@22.10.4)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) + vite-node: 2.1.4(@types/node@22.10.5)(terser@5.37.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.4 + '@types/node': 22.10.5 jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -45205,10 +45191,10 @@ snapshots: - supports-color - terser - vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + vitest@2.1.5(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) + '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.5)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.5 '@vitest/snapshot': 2.1.5 @@ -45224,11 +45210,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) - vite-node: 2.1.5(@types/node@22.10.4)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.5)(terser@5.37.0) + vite-node: 2.1.5(@types/node@22.10.5)(terser@5.37.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.4 + '@types/node': 22.10.5 jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -45244,7 +45230,7 @@ snapshots: vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) + '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.5)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.5 '@vitest/snapshot': 2.1.5 @@ -45500,10 +45486,10 @@ snapshots: - encoding - utf-8-validate - web3-plugin-zksync@1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)): + web3-plugin-zksync@1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)): dependencies: ethereum-cryptography: 2.2.1 - hardhat: 2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) + hardhat: 2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.5)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) web3: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) transitivePeerDependencies: - bufferutil @@ -45610,8 +45596,8 @@ snapshots: webauthn-p256@0.0.10: dependencies: - '@noble/curves': 1.8.0 - '@noble/hashes': 1.7.0 + '@noble/curves': 1.7.0 + '@noble/hashes': 1.6.1 webcrypto-core@1.8.1: dependencies: From b750bfb619d924750eb6b9907499688f4944f554 Mon Sep 17 00:00:00 2001 From: fksyuan Date: Tue, 7 Jan 2025 17:44:49 +0800 Subject: [PATCH 05/24] update readme log --- packages/plugin-primus/README.md | 7 +++++-- packages/plugin-primus/src/index.ts | 27 ++++++++------------------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 11e263695e..89dc198227 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -15,6 +15,9 @@ Add the following environment variables to your `.env` file: ```env PRIMUS_APP_ID=your_app_id PRIMUS_APP_SECRET=your_app_secret + +VERIFIABLE_INFERENCE_ENABLED=true # Set to true to enable verifiable inference +VERIFIABLE_INFERENCE_PROVIDER=primus # Options: primus, reclaim, opacity ``` ## Usage @@ -77,7 +80,7 @@ The adapter returns a `VerifiableInferenceResult` object containing: { text: string; // The generated text response proof: unknown; // The proof data - provider: string; // The provider name (e.g., "reclaim") + provider: string; // The provider name (e.g., "primus") timestamp: number; // Generation timestamp metadata?: { // Optional metadata modelProvider: string; @@ -89,7 +92,7 @@ The adapter returns a `VerifiableInferenceResult` object containing: ## How it Works -The Primus adapter wraps AI model API calls with zero-knowledge proofs using the `@primusprotocol/zk-fetch` library. This allows you to: +The Primus adapter wraps AI model API calls with zkTLS proofs using the `@primuslabs/zktls-core-sdk` library. This allows you to: 1. Make verifiable API calls to AI model providers 2. Generate proofs of the responses diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 6dfa84cf66..2ea009fdaf 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -42,7 +42,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { ); } - // Get provider-specific endpoint + // Get provider-specific endpoint, auth header and response json path let endpoint; let authHeader; let responseParsePath; @@ -53,41 +53,30 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { case ModelProviderName.REDPILL: case ModelProviderName.NANOGPT: case ModelProviderName.HYPERBOLIC: + case ModelProviderName.ALI_BAILIAN: + case ModelProviderName.LLAMACLOUD: + case ModelProviderName.TOGETHER: + case ModelProviderName.AKASH_CHAT_API: endpoint = `${baseEndpoint}/chat/completions`; authHeader = `Bearer ${apiKey}`; - responseParsePath = - "$.choices[0].message.content"; + responseParsePath = "$.choices[0].message.content"; break; case ModelProviderName.ANTHROPIC: case ModelProviderName.CLAUDE_VERTEX: endpoint = `${baseEndpoint}/messages`; authHeader = `Bearer ${apiKey}`; - responseParsePath = - "$.content[0].text"; + responseParsePath = "$.content[0].text"; break; case ModelProviderName.GOOGLE: endpoint = `${baseEndpoint}/models/${model}:generateContent`; authHeader = `Bearer ${apiKey}`; responseParsePath = "$.candidates[0].content.parts[0].text"; break; - case ModelProviderName.ALI_BAILIAN: - endpoint = `${baseEndpoint}/chat/completions`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = "$.choices[0].message.content"; - break; case ModelProviderName.VOLENGINE: endpoint = `${baseEndpoint}/text/generation`; authHeader = `Bearer ${apiKey}`; responseParsePath = "$.choices[0].message.content"; break; - case ModelProviderName.LLAMACLOUD: - case ModelProviderName.TOGETHER: - case ModelProviderName.AKASH_CHAT_API: - endpoint = `${baseEndpoint}/chat/completions`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = - "$.choices[0].message.content"; - break; default: throw new Error(`Unsupported model provider: ${provider}`); } @@ -168,6 +157,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { ] )); const end = new Date(); + console.log(`attestation:`, attestation); elizaLogger.info( `request openAI cost:${end.getTime() - start.getTime()}ms` @@ -188,7 +178,6 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { } async verifyProof(result: VerifiableInferenceResult): Promise { - // Primus response is self-verifying const isValid = await this.client.verifyAttestation(result.proof as Attestation); console.log("Proof is valid:", isValid); return isValid; From d8df61259cc8d73854b027f0755887ef02cfad44 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Tue, 7 Jan 2025 18:00:09 +0800 Subject: [PATCH 06/24] update README in plugin-twitter-primus --- packages/plugin-twitter-primus/README.md | 273 ++--------------------- 1 file changed, 20 insertions(+), 253 deletions(-) diff --git a/packages/plugin-twitter-primus/README.md b/packages/plugin-twitter-primus/README.md index f6b5fa2795..f83e271209 100644 --- a/packages/plugin-twitter-primus/README.md +++ b/packages/plugin-twitter-primus/README.md @@ -1,27 +1,28 @@ # @elizaos/plugin-twitter-primus -A plugin for Twitter/X integration, providing automated tweet posting capabilities with character-aware content generation. - +A plugin for Twitter/X integration that ensures the verifiability of information throughout the process, including the source of information, summary, usage, and more, across the stages of 'model -> provider -> action'. ## Overview -This plugin provides functionality to: +This plugin offers the following functionalities: -- Compose context-aware tweets -- Post tweets to Twitter/X platform -- Handle authentication and session management -- Support premium Twitter features -- Manage tweet length restrictions +- Verifying that the information originated from Twitter/X +- Confirming that the information summary was generated by a large model +- Ensuring that the summary message was successfully sent to Twitter/X ## Installation +> Before using the plugins, make sure to install [plugin-primus](../plugin-primus) and complete the configuration. + ```bash -npm install @elizaos/plugin-twitter-primus +pnpm add @elizaos/plugin-twitter-primus ``` ## Configuration The plugin requires the following environment variables: +- .env file + ```env TWITTER_USERNAME=your_username TWITTER_PASSWORD=your_password @@ -34,249 +35,15 @@ TWITTER_USER_ID_WANT_TO_GET_TWEET=123456677 # Must: Which user the tweet came fr ``` ## Usage - -Import and register the plugin in your Eliza configuration: - -```typescript -import { twitterPlugin } from "@elizaos/plugin-twitter-primus"; - -export default { - plugins: [twitterPlugin], - // ... other configuration -}; -``` - -## Features - -### Tweet Getting - -The plugin uses context-aware templates to generate appropriate tweets: - -```typescript -import { postAction } from "@elizaos/plugin-twitter-primus"; - -// Tweet will be composed based on context and character limits -const result = await postAction.handler(runtime, message, state); -``` - -### Tweet Summary - - -### Tweet Posting - -```typescript -// Post with automatic content generation -await postAction.handler(runtime, message, state); - -// Dry run mode (for testing) -process.env.TWITTER_DRY_RUN = "true"; -await postAction.handler(runtime, message, state); -``` - -## Development - -### Building - -```bash -npm run build -``` - -### Testing - -```bash -npm run test -``` - -### Development Mode - -```bash -npm run dev -``` - -## Dependencies - -- `@elizaos/core`: Core Eliza functionality -- `agent-twitter-client`: Twitter API client -- `@primuslabs/zktls-core-sdk`: ZK-TLS SDK provided by Primus Labs -- `tsup`: Build tool -- Other standard dependencies listed in package.json - -## API Reference - -### Core Interfaces - -```typescript -interface TweetContent { - text: string; +To use the plugin, add `@elizaos/plugin-twitter-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: + +```json +{ + "name": "trump", + "plugins": [ + "@elizaos/plugin-twitter-primus" + ], + //other fields + ..... } - -// Tweet Schema -const TweetSchema = z.object({ - text: z.string().describe("The text of the tweet"), -}); - -// Action Interface -interface Action { - name: "POST_TWEET"; - similes: string[]; - description: string; - validate: ( - runtime: IAgentRuntime, - message: Memory, - state?: State - ) => Promise; - handler: ( - runtime: IAgentRuntime, - message: Memory, - state?: State - ) => Promise; - examples: Array>; -} -``` - -### Plugin Methods - -- `postAction.handler`: Main method for posting tweets -- `postAction.validate`: Validates Twitter credentials -- `composeTweet`: Internal method for tweet generation -- `postTweet`: Internal method for tweet posting - -## Common Issues/Troubleshooting - -### Issue: Authentication Failures - -- **Cause**: Invalid credentials or 2FA configuration -- **Solution**: Verify credentials and 2FA setup - -### Issue: Tweet Length Errors - -- **Cause**: Content exceeds Twitter's character limit -- **Solution**: Enable TWITTER_PREMIUM for extended tweets or ensure content is within limits - -### Issue: Rate Limiting - -- **Cause**: Too many requests in short time -- **Solution**: Implement proper request throttling - -## Security Best Practices - -- Store credentials securely using environment variables -- Use 2FA when possible -- Implement proper error handling -- Keep dependencies updated -- Use dry run mode for testing -- Monitor Twitter API usage - -## Template System - -The plug-in uses a complex template system to generate a summary of tweets: - -```typescript -export const summarizeTweetTemplate = ` -# Context -{{twitterContent}} - -# Topics -{{topics}} - -# Post Directions -{{postDirections}} - -# Recent interactions between {{agentName}} and other users: -{{recentPostInteractions}} - -# Task -Generate a tweet that: -1. Summarize the input -2. The content does not contain emoji -3. Must be less than 200 characters (this is a strict requirement) -4. The key information should be retained -5. Is concise and engaging - -Generate only the tweet text, no other commentary.`; ``` - -## Future Enhancements - -1. **Content Generation** - - - Advanced context awareness - - Multi-language support - - Style customization - - Hashtag optimization - - Media generation - - Thread composition - -2. **Engagement Features** - - - Auto-reply system - - Engagement analytics - - Follower management - - Interaction scheduling - - Sentiment analysis - - Community management - -3. **Tweet Management** - - - Thread management - - Tweet scheduling - - Content moderation - - Archive management - - Delete automation - - Edit optimization - -4. **Analytics Integration** - - - Performance tracking - - Engagement metrics - - Audience insights - - Trend analysis - - ROI measurement - - Custom reporting - -5. **Authentication** - - - OAuth improvements - - Multi-account support - - Session management - - Rate limit handling - - Security enhancements - - Backup mechanisms - -6. **Developer Tools** - - Enhanced debugging - - Testing framework - - Documentation generator - - Integration templates - - Error handling - - Logging system - -We welcome community feedback and contributions to help prioritize these enhancements. - -## Contributing - -Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information. - -## Credits - -This plugin integrates with and builds upon several key technologies: - -- [Twitter/X API](https://developer.twitter.com/en/docs): Official Twitter platform API -- [agent-twitter-client](https://www.npmjs.com/package/agent-twitter-client): Twitter API client library -- [Zod](https://github.com/colinhacks/zod): TypeScript-first schema validation - -Special thanks to: - -- The Twitter/X Developer Platform team -- The agent-twitter-client maintainers for API integration tools -- The Eliza community for their contributions and feedback - -For more information about Twitter/X integration capabilities: - -- [Twitter API Documentation](https://developer.twitter.com/en/docs) -- [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard) -- [Twitter API Best Practices](https://developer.twitter.com/en/docs/twitter-api/rate-limits) - -## License - -This plugin is part of the Eliza project. See the main project repository for license information. From e2e9063cb24704b5a080c43a6d78bf7cda366797 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Wed, 8 Jan 2025 11:55:58 +0800 Subject: [PATCH 07/24] update npm package 'zktls-core-sdk' --- agent/src/index.ts | 14 +---- packages/plugin-primus/package.json | 2 +- packages/plugin-primus/src/index.ts | 2 +- packages/plugin-twitter-primus/package.json | 2 +- .../src/util/ScraperWithPrimus.ts | 2 +- pnpm-lock.yaml | 55 +++++++++++++++++++ 6 files changed, 60 insertions(+), 17 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index d1c1d493cb..f82bd67255 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -558,18 +558,6 @@ export async function createAgent( // } let verifiableInferenceAdapter; if ( - process.env.RECLAIM_APP_ID && - process.env.RECLAIM_APP_SECRET && - process.env.VERIFIABLE_INFERENCE_ENABLED === "true" - ) { - verifiableInferenceAdapter = new ReclaimAdapter({ - appId: process.env.RECLAIM_APP_ID, - appSecret: process.env.RECLAIM_APP_SECRET, - modelProvider: character.modelProvider, - token, - }); - elizaLogger.log("Verifiable inference adapter initialized"); - }else if ( process.env.PRIMUS_APP_ID && process.env.PRIMUS_APP_SECRET && process.env.VERIFIABLE_INFERENCE_ENABLED === "true"){ @@ -709,7 +697,7 @@ export async function createAgent( managers: [], cacheManager: cache, fetch: logFetch, - // verifiableInferenceAdapter, + verifiableInferenceAdapter, }); } diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json index c0dd270bf6..3bed294989 100644 --- a/packages/plugin-primus/package.json +++ b/packages/plugin-primus/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@elizaos/core": "workspace:*", - "@fksyuan/zktls-core-sdk": "^0.1.4", + "@primuslabs/zktls-core-sdk": "^0.1.0", "dotenv": "^16.4.5" }, "devDependencies": { diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 2ea009fdaf..7684a83843 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -1,4 +1,4 @@ -import { PrimusCoreTLS, Attestation } from "@fksyuan/zktls-core-sdk"; +import { PrimusCoreTLS, Attestation } from "@primuslabs/zktls-core-sdk"; import { IVerifiableInferenceAdapter, VerifiableInferenceOptions, diff --git a/packages/plugin-twitter-primus/package.json b/packages/plugin-twitter-primus/package.json index 80a3bf273c..3bf7a323f2 100644 --- a/packages/plugin-twitter-primus/package.json +++ b/packages/plugin-twitter-primus/package.json @@ -21,7 +21,7 @@ "dependencies": { "@elizaos/core": "workspace:*", "agent-twitter-client": "0.0.18", - "@fksyuan/zktls-core-sdk": "^0.1.4", + "@primuslabs/zktls-core-sdk": "^0.1.0", "tsup": "8.3.5" }, "scripts": { diff --git a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts index 8591a937c8..152368abad 100644 --- a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts +++ b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts @@ -1,6 +1,6 @@ import { Scraper } from "agent-twitter-client"; import { elizaLogger } from "@elizaos/core"; -import { PrimusCoreTLS } from "@fksyuan/zktls-core-sdk"; +import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; const expectedEntryTypes = ["tweet", "profile-conversation"]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15fa040efa..3407a7a85f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -244,6 +244,9 @@ importers: '@elizaos/plugin-open-weather': specifier: workspace:* version: link:../packages/plugin-open-weather + '@elizaos/plugin-primus': + specifier: workspace:* + version: link:../packages/plugin-primus '@elizaos/plugin-solana': specifier: workspace:* version: link:../packages/plugin-solana @@ -277,6 +280,9 @@ importers: '@elizaos/plugin-twitter': specifier: workspace:* version: link:../packages/plugin-twitter + '@elizaos/plugin-twitter-primus': + specifier: workspace:* + version: link:../packages/plugin-twitter-primus '@elizaos/plugin-web-search': specifier: workspace:* version: link:../packages/plugin-web-search @@ -1896,6 +1902,22 @@ importers: specifier: ^3.22.4 version: 3.23.8 + packages/plugin-primus: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@primuslabs/zktls-core-sdk': + specifier: ^0.1.0 + version: 0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + dotenv: + specifier: ^16.4.5 + version: 16.4.7 + devDependencies: + tsup: + specifier: ^8.3.5 + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0) + packages/plugin-solana: dependencies: '@coral-xyz/anchor': @@ -2236,6 +2258,21 @@ importers: specifier: ^1.0.0 version: 1.2.1(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + packages/plugin-twitter-primus: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@primuslabs/zktls-core-sdk': + specifier: ^0.1.0 + version: 0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + agent-twitter-client: + specifier: 0.0.18 + version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0) + packages/plugin-video-generation: dependencies: '@elizaos/core': @@ -7126,6 +7163,9 @@ packages: resolution: {integrity: sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==} engines: {node: '>=18'} + '@primuslabs/zktls-core-sdk@0.1.0': + resolution: {integrity: sha512-Jnboy9xr7NPMewPZkky7J2bCOzw0t8X1r072VlbTyR8yc+88/uFhx/LvBgIYiajiGO12DY3o1SlV4SSYZOyFOg==} + '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -20558,6 +20598,10 @@ packages: resolution: {integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==} hasBin: true + uuid@11.0.4: + resolution: {integrity: sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==} + hasBin: true + uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -29385,6 +29429,15 @@ snapshots: - bufferutil - utf-8-validate + '@primuslabs/zktls-core-sdk@0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + ethers: 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + uuid: 11.0.4 + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@protobufjs/aspromise@1.1.2': {} '@protobufjs/base64@1.1.2': {} @@ -47359,6 +47412,8 @@ snapshots: uuid@11.0.3: {} + uuid@11.0.4: {} + uuid@3.4.0: {} uuid@8.3.2: {} From 0563ed599a792a46655737ddffa8eb74350bce76 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Wed, 8 Jan 2025 16:54:25 +0800 Subject: [PATCH 08/24] update README in plugin-primus and plugin-twitter-plugin --- packages/plugin-primus/README.md | 96 +++--------------------- packages/plugin-twitter-primus/README.md | 22 +++++- 2 files changed, 30 insertions(+), 88 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 89dc198227..0cfb304555 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -11,94 +11,18 @@ pnpm add @elizaos/plugin-primus ## Configuration Add the following environment variables to your `.env` file: - ```env PRIMUS_APP_ID=your_app_id PRIMUS_APP_SECRET=your_app_secret - -VERIFIABLE_INFERENCE_ENABLED=true # Set to true to enable verifiable inference -VERIFIABLE_INFERENCE_PROVIDER=primus # Options: primus, reclaim, opacity -``` - -## Usage - -```typescript -import { PrimusAdapter } from "@elizaos/plugin-primus"; -import { VerifiableInferenceOptions } from "@elizaos/core"; - -// Initialize the adapter -const primusAdapter = new PrimusAdapter(runtime, { - appId: process.env.PRIMUS_APP_ID, - appSecret: process.env.PRIMUS_APP_SECRET, -}); - -// Generate text with verifiable results -const options: VerifiableInferenceOptions = { - // Optional: Override the default endpoint - endpoint: "https://custom-api.example.com", - // Optional: Add custom headers - headers: { - "X-Custom-Header": "value", - }, - // Optional: Provider-specific options - providerOptions: { - temperature: 0.7, - }, -}; - -const result = await primusAdapter.generateText( - "What is Node.js?", - "gpt-4", - options -); - -console.log("Response:", result.text); -console.log("Proof:", result.proof); - -// Verify the proof -const isValid = await primusAdapter.verifyProof(result); -console.log("Proof is valid:", isValid); +# Set to true to enable verifiable inference +VERIFIABLE_INFERENCE_ENABLED=true +# Options: primus, reclaim, opacity, use primus for this plugin +VERIFIABLE_INFERENCE_PROVIDER=primus ``` +***How to get PRIMUS_APP_ID and PRIMUS_APP_SECRET*** +1. Visit https://dev.primuslabs.xyz/ +2. Login +3. Create a new project +4. Save your 'Application ID(PRIMUS_APP_ID)' and 'Secret Key(PRIMUS_APP_SECRET)' -## Features - -- Implements `IVerifiableInferenceAdapter` interface for standardized verifiable inference -- Zero-knowledge proofs for AI model responses -- Support for multiple AI model providers: - - OpenAI - - Anthropic - - Google - - More coming soon -- Customizable options for each request -- Built-in proof verification - -## Response Format - -The adapter returns a `VerifiableInferenceResult` object containing: - -```typescript -{ - text: string; // The generated text response - proof: unknown; // The proof data - provider: string; // The provider name (e.g., "primus") - timestamp: number; // Generation timestamp - metadata?: { // Optional metadata - modelProvider: string; - modelClass: string; - endpoint: string; - } -} -``` - -## How it Works - -The Primus adapter wraps AI model API calls with zkTLS proofs using the `@primuslabs/zktls-core-sdk` library. This allows you to: - -1. Make verifiable API calls to AI model providers -2. Generate proofs of the responses -3. Verify the authenticity of the responses -4. Ensure the responses haven't been tampered with - -## License - -MIT \ No newline at end of file +After completing the above steps, you can start the agent. diff --git a/packages/plugin-twitter-primus/README.md b/packages/plugin-twitter-primus/README.md index f83e271209..85a8737aa6 100644 --- a/packages/plugin-twitter-primus/README.md +++ b/packages/plugin-twitter-primus/README.md @@ -21,12 +21,12 @@ pnpm add @elizaos/plugin-twitter-primus The plugin requires the following environment variables: -- .env file +.env file ```env TWITTER_USERNAME=your_username TWITTER_PASSWORD=your_password -TWITTER_EMAIL=your_email # Optional: for 2FA +TWITTER_EMAIL=your_email # Recommand: for 2FA TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA TWITTER_PREMIUM=false # Optional: enables premium features TWITTER_DRY_RUN=false # Optional: test without posting @@ -47,3 +47,21 @@ To use the plugin, add `@elizaos/plugin-twitter-primus` to the plugins field in ..... } ``` + +## Run +```bash +# Run with your character file +pnpm start --characters="characters/xxx.character.json" +``` + +## Chat with Your Agent +``` +You: Get the latest tweet and post it on my twitter. +Agent: The latest tweet has posted! +``` + +``` +You: Post a tweet on twitter for me. +Agent: The tweet has posted! +``` +Other questions with the same semantic meaning can also be asked From e33ceadcc7db6a77f7d4ce2fe998adfe62005944 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Thu, 9 Jan 2025 10:44:50 +0800 Subject: [PATCH 09/24] get tweet by UserScreenName --- .env.example | 5 +- packages/plugin-primus/src/index.ts | 17 ++--- .../plugin-twitter-primus/src/actions/post.ts | 64 ++++++++++--------- .../src/provider/tweetProvider.ts | 9 +-- .../plugin-twitter-primus/src/templates.ts | 36 +++++------ .../src/util/ScraperWithPrimus.ts | 56 +++++++++++----- 6 files changed, 103 insertions(+), 84 deletions(-) diff --git a/.env.example b/.env.example index 998895f830..bb5ccebdbf 100644 --- a/.env.example +++ b/.env.example @@ -82,9 +82,6 @@ TWITTER_PASSWORD= # Account password TWITTER_EMAIL= # Account email TWITTER_2FA_SECRET= -# For @eliza/plugin-twitter-primus -TWITTER_USER_ID_WANT_TO_GET_TWEET= #The user who you want to fetch the latest posts. Please use user-id - TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with @@ -433,4 +430,4 @@ OPEN_WEATHER_API_KEY= # OpenWeather API key # Allora ALLORA_API_KEY=UP-f8db7d6558ab432ca0d92716 # Allora API key -ALLORA_CHAIN_SLUG=testnet # must be one of mainnet, testnet. If not specified, it will use testnet by default \ No newline at end of file +ALLORA_CHAIN_SLUG=testnet # must be one of mainnet, testnet. If not specified, it will use testnet by default diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 7684a83843..a3a2ddf202 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -21,9 +21,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { constructor(options: PrimusOptions) { this.options = options; - const zkTLS = new PrimusCoreTLS(); - zkTLS.init(this.options.appId, this.options.appSecret); - this.client = zkTLS; + } async generateText( @@ -140,8 +138,10 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { default: throw new Error(`Unsupported model provider: ${provider}`); } - const start = new Date(); - const attestation = await this.client.startAttestation(this.client.generateRequestParams( + const zkTLS = new PrimusCoreTLS(); + await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); + this.client = zkTLS; + const attestation = await zkTLS.startAttestation(zkTLS.generateRequestParams( { url: endpoint, method: "POST", @@ -156,12 +156,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { } ] )); - const end = new Date(); - console.log(`attestation:`, attestation); - - elizaLogger.info( - `request openAI cost:${end.getTime() - start.getTime()}ms` - ); + console.log(`model attestation:`, attestation); const responseData = JSON.parse(attestation.data); let text = JSON.parse(responseData.content); diff --git a/packages/plugin-twitter-primus/src/actions/post.ts b/packages/plugin-twitter-primus/src/actions/post.ts index 5971642fca..6c6e168287 100644 --- a/packages/plugin-twitter-primus/src/actions/post.ts +++ b/packages/plugin-twitter-primus/src/actions/post.ts @@ -1,44 +1,37 @@ import { - Action, composeContext, - elizaLogger, generateMessageResponse, generateObject, + Action, + composeContext, + elizaLogger, + generateText, IAgentRuntime, - Memory, ModelClass, + Memory, + ModelClass, State, } from "@elizaos/core"; import { ScraperWithPrimus } from "../util/ScraperWithPrimus.ts"; import { tweetProvider } from "../provider/tweetProvider.ts"; -import {isTweetContent, TweetSchema} from "../types.ts"; -import {summarizeTweetTemplate} from "../templates.ts"; - +import { summarizeTweetTemplate } from "../templates.ts"; async function summaryTweetContent( runtime: IAgentRuntime, _message: Memory, + twitterContent: string, state?: State ): Promise { try { - const context = composeContext({ - state, - template: summarizeTweetTemplate, - }); + const context = summarizeTweetTemplate(twitterContent) - const tweetContentObject = await generateObject({ + const tweetContentStr = await generateText({ runtime, context, - modelClass: ModelClass.SMALL, - schema: TweetSchema, - stop: ["\n"], + modelClass: ModelClass.LARGE, }); - - if (!isTweetContent(tweetContentObject.object)) { - elizaLogger.error( - "Invalid tweet content:", - tweetContentObject.object - ); + if (!tweetContentStr) { + elizaLogger.error("Invalid tweet content:", tweetContentStr); return; } - const trimmedContent = tweetContentObject.object.text.trim(); + const trimmedContent = JSON.parse(tweetContentStr).text; // Skip truncation if TWITTER_PREMIUM is true if ( @@ -58,7 +51,6 @@ async function summaryTweetContent( } } - async function postTweet(content: string): Promise { try { const scraperWithPrimus = new ScraperWithPrimus(); @@ -76,9 +68,7 @@ async function postTweet(content: string): Promise { // Check for Twitter API errors if (!result) { - elizaLogger.error( - `Twitter API error ${result}` - ); + elizaLogger.error(`Twitter API error ${result}`); return false; } return true; @@ -149,8 +139,16 @@ export const postAction: Action = { state?: State ): Promise => { //check VERIFIABLE_INFERENCE_ENABLED - if(!((process.env.VERIFIABLE_INFERENCE_ENABLED === "true")&&process.env.PRIMUS_APP_ID&&process.env.PRIMUS_APP_SECRET)){ - elizaLogger.error(`Parameter 'VERIFIABLE_INFERENCE_ENABLED' not set, Eliza will run this action!`); + if ( + !( + process.env.VERIFIABLE_INFERENCE_ENABLED === "true" && + process.env.PRIMUS_APP_ID && + process.env.PRIMUS_APP_SECRET + ) + ) { + elizaLogger.error( + `Parameter 'VERIFIABLE_INFERENCE_ENABLED' not set, Eliza will run this action!` + ); return false; } @@ -171,10 +169,16 @@ export const postAction: Action = { elizaLogger.log(`Content from twitter: ${twitterContent}`); //Summary the content - state['twitterContent'] = twitterContent; - const contentSummaryByAI = await summaryTweetContent(runtime, message, state); + const contentSummaryByAI = await summaryTweetContent( + runtime, + message, + twitterContent, + state + ); //log - elizaLogger.log(`Summary content from twitter: ${contentSummaryByAI}`); + elizaLogger.log( + `Summary content from twitter: ${contentSummaryByAI}` + ); // Check for dry run mode - explicitly check for string "true" if ( process.env.TWITTER_DRY_RUN && diff --git a/packages/plugin-twitter-primus/src/provider/tweetProvider.ts b/packages/plugin-twitter-primus/src/provider/tweetProvider.ts index 29d72c32ed..c981495828 100644 --- a/packages/plugin-twitter-primus/src/provider/tweetProvider.ts +++ b/packages/plugin-twitter-primus/src/provider/tweetProvider.ts @@ -12,12 +12,13 @@ const tweetProvider: Provider = { elizaLogger.error("Failed to login to Twitter"); return false; } - const userId = process.env.TWITTER_USER_ID_WANT_TO_GET_TWEET; - if(!userId){ - elizaLogger.error("TWITTER_USER_ID_WANT_TO_GET_TWEET is not set"); + const userName = process.env.TWITTER_USERNAME_WANT_TO_GET_TWEET; + if(!userName){ + elizaLogger.error("TWITTER_USERNAME_WANT_TO_GET_TWEET is not set"); return false; } - + const userId = await scraperWithPrimus.getUserIdByScreenName(userName); + elizaLogger.log(`userName is:${userName}, userId:${userId}`); const result = await scraperWithPrimus.getUserLatestTweet(userId); //log elizaLogger.log("Tweet response:", result); diff --git a/packages/plugin-twitter-primus/src/templates.ts b/packages/plugin-twitter-primus/src/templates.ts index 15313d0566..9c77cbe830 100644 --- a/packages/plugin-twitter-primus/src/templates.ts +++ b/packages/plugin-twitter-primus/src/templates.ts @@ -1,22 +1,18 @@ -export const summarizeTweetTemplate = ` -# Context -{{twitterContent}} +export const summarizeTweetTemplate = (twitterContent:string) => { + return ` + # Context + ${twitterContent} -# Topics -{{topics}} + # Task + Generate a tweet that: + 1. Summarize the input + 2. The content does not contain emoji + 3. Must be less than 200 characters (this is a strict requirement) + 4. The key information should be retained + 5. Is concise and engaging -# Post Directions -{{postDirections}} - -# Recent interactions between {{agentName}} and other users: -{{recentPostInteractions}} - -# Task -Generate a tweet that: -1. Summarize the input -2. The content does not contain emoji -3. Must be less than 200 characters (this is a strict requirement) -4. The key information should be retained -5. Is concise and engaging - -Generate only the tweet text, no other commentary.`; + Generate only the tweet text, no other commentary. + Response format should be formatted in a JSON block like this: + {"text": "string"} + `; +}; diff --git a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts index 152368abad..92f90a49c5 100644 --- a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts +++ b/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts @@ -13,6 +13,10 @@ export class ScraperWithPrimus { return this.scraper; } + public async getUserIdByScreenName(screenName: string) { + return await this.scraper.getUserIdByScreenName(screenName); + } + public async login() { this.scraper = new Scraper(); const username = process.env.TWITTER_USERNAME; @@ -115,7 +119,6 @@ export class ScraperWithPrimus { const appSecret = process.env.PRIMUS_APP_SECRET; await zkTLS.init(appId, appSecret); - const start = new Date(); const attestation = await zkTLS.startAttestation( zkTLS.generateRequestParams( { @@ -133,23 +136,41 @@ export class ScraperWithPrimus { ] ) ); - const end = new Date(); - //log cost + //log attestation elizaLogger.info( - `request primus cost:${end.getTime() - start.getTime()}ms` + "Tweet getting proof generated successfully:", + attestation ); - - - - elizaLogger.info(`Tweet getting proof generated successfully!`); const verifyResult = zkTLS.verifyAttestation(attestation); - if(!verifyResult){ - throw new Error("Verify attestation failed,data from source is illegality"); + if (!verifyResult) { + throw new Error( + "Verify attestation failed,data from source is illegality" + ); } const responseData = JSON.parse(attestation.data); + const content = responseData.content; //log - elizaLogger.info(`get tweet content success:${responseData.content}`); - return responseData.content; + elizaLogger.info(`get tweet content success:${content}`); + return this.removeEmojis(content); + } + + private isEmoji(char: string) { + const codePoint = char.codePointAt(0); + return ( + (codePoint >= 0x1f600 && codePoint <= 0x1f64f) || + (codePoint >= 0x1f300 && codePoint <= 0x1f5ff) || + (codePoint >= 0x1f680 && codePoint <= 0x1f6ff) || + (codePoint >= 0x2600 && codePoint <= 0x26ff) || + (codePoint >= 0x2700 && codePoint <= 0x27bf) || + (codePoint >= 0x1f900 && codePoint <= 0x1f9ff) || + (codePoint >= 0x1f1e6 && codePoint <= 0x1f1ff) + ); + } + + private removeEmojis(input: string) { + return Array.from(input) + .filter((char) => !this.isEmoji(char)) + .join(""); } public async sendTweet(content: string) { @@ -254,11 +275,16 @@ export class ScraperWithPrimus { ] ) ); - elizaLogger.info(`Tweet sending proof generated successfully!`); + elizaLogger.info( + "Tweet posting proof generated successfully:", + attestation + ); const verifyResult = zkTLS.verifyAttestation(attestation); - if(!verifyResult){ - throw new Error("Verify attestation failed,data from source is illegality"); + if (!verifyResult) { + throw new Error( + "Verify attestation failed,data from source is illegality" + ); } const responseData = JSON.parse(attestation.data); elizaLogger.info(`send tweet success,tweetId:${responseData.tweetId}`); From 02ef838de4afb2d8d82bd61abbf3bbe143fe5d44 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Thu, 9 Jan 2025 17:30:43 +0800 Subject: [PATCH 10/24] refactor plugin-primus --- agent/package.json | 3 +- .../.npmignore | 0 packages/plugin-primus/README.md | 107 +++++++-- packages/plugin-primus/package.json | 32 ++- .../src/actions/postTweetAction.ts | 128 +++++++++++ .../src/adapter/primusAdapter.ts | 109 +++++++++ packages/plugin-primus/src/index.ts | 196 ++-------------- .../src/provider/tokenPriceProvider.ts | 30 +++ .../src/provider/tweetProvider.ts | 10 +- .../src/templates.ts | 0 packages/plugin-primus/src/util/primusUtil.ts | 42 ++++ .../src/util/twitterScraper.ts} | 70 ++---- packages/plugin-primus/tsconfig.json | 9 +- .../tsup.config.ts | 0 packages/plugin-twitter-primus/README.md | 67 ------ packages/plugin-twitter-primus/package.json | 32 --- .../plugin-twitter-primus/src/actions/post.ts | 212 ------------------ packages/plugin-twitter-primus/src/index.ts | 13 -- packages/plugin-twitter-primus/src/types.ts | 13 -- packages/plugin-twitter-primus/tsconfig.json | 9 - pnpm-lock.yaml | 27 +-- 21 files changed, 465 insertions(+), 644 deletions(-) rename packages/{plugin-twitter-primus => plugin-primus}/.npmignore (100%) create mode 100644 packages/plugin-primus/src/actions/postTweetAction.ts create mode 100644 packages/plugin-primus/src/adapter/primusAdapter.ts create mode 100644 packages/plugin-primus/src/provider/tokenPriceProvider.ts rename packages/{plugin-twitter-primus => plugin-primus}/src/provider/tweetProvider.ts (77%) rename packages/{plugin-twitter-primus => plugin-primus}/src/templates.ts (100%) create mode 100644 packages/plugin-primus/src/util/primusUtil.ts rename packages/{plugin-twitter-primus/src/util/ScraperWithPrimus.ts => plugin-primus/src/util/twitterScraper.ts} (83%) rename packages/{plugin-twitter-primus => plugin-primus}/tsup.config.ts (100%) delete mode 100644 packages/plugin-twitter-primus/README.md delete mode 100644 packages/plugin-twitter-primus/package.json delete mode 100644 packages/plugin-twitter-primus/src/actions/post.ts delete mode 100644 packages/plugin-twitter-primus/src/index.ts delete mode 100644 packages/plugin-twitter-primus/src/types.ts delete mode 100644 packages/plugin-twitter-primus/tsconfig.json diff --git a/agent/package.json b/agent/package.json index ca80a45eec..4f33e9a3a6 100644 --- a/agent/package.json +++ b/agent/package.json @@ -62,10 +62,9 @@ "@elizaos/plugin-tee-marlin": "workspace:*", "@elizaos/plugin-multiversx": "workspace:*", "@elizaos/plugin-near": "workspace:*", - "@elizaos/plugin-primus": "workspace:*", "@elizaos/plugin-zksync-era": "workspace:*", "@elizaos/plugin-twitter": "workspace:*", - "@elizaos/plugin-twitter-primus": "workspace:*", + "@elizaos/plugin-primus": "workspace:*", "@elizaos/plugin-cronoszkevm": "workspace:*", "@elizaos/plugin-3d-generation": "workspace:*", "@elizaos/plugin-fuel": "workspace:*", diff --git a/packages/plugin-twitter-primus/.npmignore b/packages/plugin-primus/.npmignore similarity index 100% rename from packages/plugin-twitter-primus/.npmignore rename to packages/plugin-primus/.npmignore diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 0cfb304555..c414592c52 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -1,28 +1,99 @@ -# @elizaos/plugin-primus +# @elizaos/plugin-twitter-primus + + +A plugin for Twitter/X integration that ensures the verifiability of information throughout the process, including the source of information, summary, usage, and more, across the stages of 'model -> provider -> action'. +## Overview + +This plugin offers the following functionalities: + +- Verifying that the information originated from Twitter/X +- Confirming that the information summary was generated by a large model +- Ensuring that the summary message was successfully sent to Twitter/X + + + + + +## What we do +in general + +### model: +expample + +### Provider +exampe + +### actions +example.. + + +... + +... +## + + + + + + + + -This adapter integrates Primus Protocol into ElizaOS, enabling verifiable inference results from various AI model providers. It implements the `IVerifiableInferenceAdapter` interface, making it compatible with other verifiable inference solutions. ## Installation +> Before using the plugins, make sure to install [plugin-primus](../plugin-primus) and complete the configuration. + ```bash -pnpm add @elizaos/plugin-primus +pnpm add @elizaos/plugin-twitter-primus ``` ## Configuration -Add the following environment variables to your `.env` file: +The plugin requires the following environment variables: + +.env file + ```env -PRIMUS_APP_ID=your_app_id -PRIMUS_APP_SECRET=your_app_secret -# Set to true to enable verifiable inference -VERIFIABLE_INFERENCE_ENABLED=true -# Options: primus, reclaim, opacity, use primus for this plugin -VERIFIABLE_INFERENCE_PROVIDER=primus -``` -***How to get PRIMUS_APP_ID and PRIMUS_APP_SECRET*** -1. Visit https://dev.primuslabs.xyz/ -2. Login -3. Create a new project -4. Save your 'Application ID(PRIMUS_APP_ID)' and 'Secret Key(PRIMUS_APP_SECRET)' - -After completing the above steps, you can start the agent. +TWITTER_USERNAME=your_username +TWITTER_PASSWORD=your_password +TWITTER_EMAIL=your_email # Recommand: for 2FA +TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA +TWITTER_PREMIUM=false # Optional: enables premium features +TWITTER_DRY_RUN=false # Optional: test without posting + +TWITTER_USER_ID_WANT_TO_GET_TWEET=123456677 # Must: Which user the tweet came from +``` + +## Usage +To use the plugin, add `@elizaos/plugin-twitter-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: + +```json +{ + "name": "trump", + "plugins": [ + "@elizaos/plugin-twitter-primus" + ], + //other fields + ..... +} +``` + +## Run +```bash +# Run with your character file +pnpm start --characters="characters/xxx.character.json" +``` + +## Chat with Your Agent +``` +You: Get the latest tweet and post it on my twitter. +Agent: The latest tweet has posted! +``` + +``` +You: Post a tweet on twitter for me. +Agent: The tweet has posted! +``` +Other questions with the same semantic meaning can also be asked diff --git a/packages/plugin-primus/package.json b/packages/plugin-primus/package.json index 3bed294989..edc570c11e 100644 --- a/packages/plugin-primus/package.json +++ b/packages/plugin-primus/package.json @@ -1,22 +1,32 @@ { "name": "@elizaos/plugin-primus", - "version": "0.1.7-alpha.2", - "description": "Primus Protocol plugin for ElizaOS", - "main": "dist/index.js", + "version": "0.1.7", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", - "scripts": { - "build": "tsup src/index.ts --format esm --dts", - "lint": "eslint --fix --cache .", - "watch": "tsc --watch", - "dev": "tsup src/index.ts --format esm --dts --watch" + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", + "agent-twitter-client": "0.0.18", "@primuslabs/zktls-core-sdk": "^0.1.0", - "dotenv": "^16.4.5" + "tsup": "8.3.5" }, - "devDependencies": { - "tsup": "^8.3.5" + "scripts": { + "build": "tsup --format esm --dts", + "dev": "tsup --format esm --dts --watch", + "test": "vitest run" } } diff --git a/packages/plugin-primus/src/actions/postTweetAction.ts b/packages/plugin-primus/src/actions/postTweetAction.ts new file mode 100644 index 0000000000..042c17f428 --- /dev/null +++ b/packages/plugin-primus/src/actions/postTweetAction.ts @@ -0,0 +1,128 @@ +import { + Action, + elizaLogger, + IAgentRuntime, + Memory, + State, +} from "@elizaos/core"; +import { TwitterScraper } from "../util/TwitterScraper.ts"; +import { tweetProvider } from "../provider/tweetProvider.ts"; +import {tokenPriceProvider} from "../provider/tokenPriceProvider.ts"; + +export const postTweetAction: Action = { + description: "Post a tweet on Twitter and be verified by Primus", + examples: [ + [ + { + user: "{{user1}}", + content: { + text: "Get the latest BTC price and post it on my twitter.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "The latest tweet has posted.", + action: "POST_TWEET", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { + text: "Help post a tweet which content is BTC price.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "Completed!", + action: "POST_TWEET", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { + text: "Post a tweet on twitter for me.", + }, + }, + { + user: "{{agentName}}", + content: { + text: "I'll post the latest tweet to your Twitter account now!", + action: "POST_TWEET", + }, + }, + ], + ], + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ): Promise => { + const contentYouWantToPost = await tokenPriceProvider.get(runtime, message, state); + //check VERIFIABLE_INFERENCE_ENABLED + if ( + !( + process.env.VERIFIABLE_INFERENCE_ENABLED === "true" && + process.env.PRIMUS_APP_ID && + process.env.PRIMUS_APP_SECRET + ) + ) { + elizaLogger.error( + `Parameter 'VERIFIABLE_INFERENCE_ENABLED' not set, Eliza will run this action!` + ); + return false; + } + + try { + if ( + process.env.TWITTER_DRY_RUN && + process.env.TWITTER_DRY_RUN.toLowerCase() === "true" + ) { + elizaLogger.info( + `Dry run: would have posted tweet: ${contentYouWantToPost}` + ); + return true; + } + + const scraperWithPrimus = new TwitterScraper(); + await scraperWithPrimus.login(); + if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { + elizaLogger.error("Failed to login to Twitter"); + return false; + } + // post the tweet + elizaLogger.log("Attempting to send tweet:", contentYouWantToPost); + const result = await scraperWithPrimus.sendTweet(contentYouWantToPost); + + elizaLogger.log("Tweet response:", result); + + // Check for Twitter API errors + if (!result) { + elizaLogger.error(`Twitter API error ${result}`); + return false; + } + return true; + } catch (error) { + elizaLogger.error("Error in post action:", error); + return false; + } + }, + name: "POST_TWEET", + similes: ["TWEET", "POST", "SEND_TWEET"], + validate: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ) => { + const hasCredentials = + !!process.env.TWITTER_USERNAME && !!process.env.TWITTER_PASSWORD; + elizaLogger.log(`Has credentials: ${hasCredentials}`); + + return hasCredentials; + }, +}; diff --git a/packages/plugin-primus/src/adapter/primusAdapter.ts b/packages/plugin-primus/src/adapter/primusAdapter.ts new file mode 100644 index 0000000000..ba6f299f48 --- /dev/null +++ b/packages/plugin-primus/src/adapter/primusAdapter.ts @@ -0,0 +1,109 @@ +import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; +import { + IVerifiableInferenceAdapter, + VerifiableInferenceOptions, + VerifiableInferenceResult, + VerifiableInferenceProvider, + ModelProviderName, + models, + elizaLogger, +} from "@elizaos/core"; +import {generateProof, verifyProof} from "../util/primusUtil.ts"; + +interface PrimusOptions { + appId: string; + appSecret: string; + modelProvider?: ModelProviderName; + token?: string; +} + +export class PrimusAdapter implements IVerifiableInferenceAdapter { + private client: PrimusCoreTLS; + private options: PrimusOptions; + + constructor(options: PrimusOptions) { + this.options = options; + } + + async generateText( + context: string, + modelClass: string, + options?: VerifiableInferenceOptions + ): Promise { + const provider = this.options.modelProvider || ModelProviderName.OPENAI; + const baseEndpoint = options?.endpoint || models[provider].endpoint; + const model = models[provider].model[modelClass]; + const apiKey = this.options.token; + + if (!apiKey) { + throw new Error( + `API key (token) is required for provider: ${provider}` + ); + } + + // Get provider-specific endpoint, auth header and response json path + let endpoint; + let authHeader; + let responseParsePath; + + switch (provider) { + case ModelProviderName.OPENAI: + endpoint = `${baseEndpoint}/chat/completions`; + authHeader = `Bearer ${apiKey}`; + responseParsePath = "$.choices[0].message.content"; + break; + case ModelProviderName.ETERNALAI: + case ModelProviderName.REDPILL: + case ModelProviderName.NANOGPT: + case ModelProviderName.HYPERBOLIC: + case ModelProviderName.ALI_BAILIAN: + case ModelProviderName.LLAMACLOUD: + case ModelProviderName.TOGETHER: + case ModelProviderName.AKASH_CHAT_API: + case ModelProviderName.ANTHROPIC: + case ModelProviderName.CLAUDE_VERTEX: + case ModelProviderName.GOOGLE: + case ModelProviderName.VOLENGINE: + default: + throw new Error(`Unsupported model provider: ${provider}`); + } + + + const headers = { + "Content-Type": "application/json", + "Authorization": authHeader, + }; + + try { + let body = { + model: model.name, + messages: [{ role: "user", content: context }], + temperature: + options?.providerOptions?.temperature || + models[provider].model[modelClass].temperature, + }; + const attestation = await generateProof(endpoint,"POST",headers,JSON.stringify(body),responseParsePath); + elizaLogger.log(`model attestation:`, attestation); + + const responseData = JSON.parse(attestation.data); + let text = JSON.parse(responseData.content); + return { + text, + proof: attestation, + provider: VerifiableInferenceProvider.PRIMUS, + timestamp: Date.now(), + }; + } catch (error) { + console.error("Error in Primus generateText:", error); + throw error; + } + } + + async verifyProof(result: VerifiableInferenceResult): Promise { + const isValid = verifyProof(result.proof) + elizaLogger.log("Proof is valid:", isValid); + return isValid; + } +} + +export default PrimusAdapter; diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index a3a2ddf202..4793e5a9ed 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -1,182 +1,14 @@ -import { PrimusCoreTLS, Attestation } from "@primuslabs/zktls-core-sdk"; -import { - IVerifiableInferenceAdapter, - VerifiableInferenceOptions, - VerifiableInferenceResult, - VerifiableInferenceProvider, - ModelProviderName, - models, elizaLogger, -} from "@elizaos/core"; - -interface PrimusOptions { - appId: string; - appSecret: string; - modelProvider?: ModelProviderName; - token?: string; -} - -export class PrimusAdapter implements IVerifiableInferenceAdapter { - private client: PrimusCoreTLS; - private options: PrimusOptions; - - constructor(options: PrimusOptions) { - this.options = options; - - } - - async generateText( - context: string, - modelClass: string, - options?: VerifiableInferenceOptions - ): Promise { - const provider = this.options.modelProvider || ModelProviderName.OPENAI; - const baseEndpoint = options?.endpoint || models[provider].endpoint; - const model = models[provider].model[modelClass]; - const apiKey = this.options.token; - - if (!apiKey) { - throw new Error( - `API key (token) is required for provider: ${provider}` - ); - } - - // Get provider-specific endpoint, auth header and response json path - let endpoint; - let authHeader; - let responseParsePath; - - switch (provider) { - case ModelProviderName.OPENAI: - case ModelProviderName.ETERNALAI: - case ModelProviderName.REDPILL: - case ModelProviderName.NANOGPT: - case ModelProviderName.HYPERBOLIC: - case ModelProviderName.ALI_BAILIAN: - case ModelProviderName.LLAMACLOUD: - case ModelProviderName.TOGETHER: - case ModelProviderName.AKASH_CHAT_API: - endpoint = `${baseEndpoint}/chat/completions`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = "$.choices[0].message.content"; - break; - case ModelProviderName.ANTHROPIC: - case ModelProviderName.CLAUDE_VERTEX: - endpoint = `${baseEndpoint}/messages`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = "$.content[0].text"; - break; - case ModelProviderName.GOOGLE: - endpoint = `${baseEndpoint}/models/${model}:generateContent`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = "$.candidates[0].content.parts[0].text"; - break; - case ModelProviderName.VOLENGINE: - endpoint = `${baseEndpoint}/text/generation`; - authHeader = `Bearer ${apiKey}`; - responseParsePath = "$.choices[0].message.content"; - break; - default: - throw new Error(`Unsupported model provider: ${provider}`); - } - - const headers = { - "Content-Type": "application/json", - ...options?.headers, - ...(provider === ModelProviderName.ANTHROPIC || provider === ModelProviderName.CLAUDE_VERTEX - ? { - "anthropic-version": "2023-06-01", - "x-api-key": apiKey - } - : { "Authorization": authHeader }), - }; - - try { - let body; - // Handle different API formats - switch (provider) { - case ModelProviderName.OPENAI: - case ModelProviderName.ETERNALAI: - case ModelProviderName.ALI_BAILIAN: - case ModelProviderName.VOLENGINE: - case ModelProviderName.LLAMACLOUD: - case ModelProviderName.NANOGPT: - case ModelProviderName.HYPERBOLIC: - case ModelProviderName.TOGETHER: - case ModelProviderName.AKASH_CHAT_API: - body = { - model: model.name, - messages: [{ role: "user", content: context }], - temperature: - options?.providerOptions?.temperature || - models[provider].model[modelClass].temperature, - }; - break; - case ModelProviderName.ANTHROPIC: - case ModelProviderName.CLAUDE_VERTEX: - body = { - model: model.name, - messages: [{ role: "user", content: context }], - max_tokens: models[provider].model[modelClass].maxOutputTokens, - temperature: - options?.providerOptions?.temperature || - models[provider].model[modelClass].temperature, - }; - break; - case ModelProviderName.GOOGLE: - body = { - model: model.name, - contents: [ - { role: "user", parts: [{ text: context }] }, - ], - generationConfig: { - temperature: - options?.providerOptions?.temperature || - models[provider].model[modelClass].temperature, - }, - }; - break; - default: - throw new Error(`Unsupported model provider: ${provider}`); - } - const zkTLS = new PrimusCoreTLS(); - await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); - this.client = zkTLS; - const attestation = await zkTLS.startAttestation(zkTLS.generateRequestParams( - { - url: endpoint, - method: "POST", - header: headers, - body: JSON.stringify(body), - }, - [ - { - keyName: 'content', - parsePath: responseParsePath, - parseType: 'string' - } - ] - )); - console.log(`model attestation:`, attestation); - - const responseData = JSON.parse(attestation.data); - let text = JSON.parse(responseData.content); - return { - text, - proof: attestation, - provider: VerifiableInferenceProvider.PRIMUS, - timestamp: Date.now(), - }; - } catch (error) { - console.error("Error in Primus generateText:", error); - throw error; - } - } - - async verifyProof(result: VerifiableInferenceResult): Promise { - const isValid = await this.client.verifyAttestation(result.proof as Attestation); - console.log("Proof is valid:", isValid); - return isValid; - } -} - -export default PrimusAdapter; +import { Plugin } from "@elizaos/core"; +import { postTweetAction } from "./actions/postTweetAction.ts"; +import {PrimusAdapter} from "./adapter/PrimusAdapter.ts"; + +export const twitterPlugin: Plugin = { + name: "twitter", + description: "Twitter integration plugin for posting tweets with proof generated by primus", + actions: [postTweetAction], + evaluators: [], + providers: [], +}; + +export default twitterPlugin; +export {PrimusAdapter}; diff --git a/packages/plugin-primus/src/provider/tokenPriceProvider.ts b/packages/plugin-primus/src/provider/tokenPriceProvider.ts new file mode 100644 index 0000000000..7a7c8d3faa --- /dev/null +++ b/packages/plugin-primus/src/provider/tokenPriceProvider.ts @@ -0,0 +1,30 @@ +import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; +import {generateProof, verifyProof} from "../util/primusUtil.ts"; + +const tokenPriceProvider: Provider = { + get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { + //get btc price + const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"; + const method = 'GET'; + const headers = { + 'Accept ': '*/*', + }; + const attestation = await generateProof(url, method, headers, "", "$.price"); + const valid = await verifyProof(attestation); + if(!valid){ + throw new Error("Invalid price attestation"); + } + elizaLogger.info('price attestation:',attestation); + const responseData = JSON.parse((attestation as any).data); + const price = responseData.content; + return ` + Get BTC price from Binance: + BTC: ${price} USDT + Time: ${new Date().toUTCString()} + POST by eliza #zilia + Attested by Primus #primus #zktls + ` + }, +}; + +export { tokenPriceProvider }; diff --git a/packages/plugin-twitter-primus/src/provider/tweetProvider.ts b/packages/plugin-primus/src/provider/tweetProvider.ts similarity index 77% rename from packages/plugin-twitter-primus/src/provider/tweetProvider.ts rename to packages/plugin-primus/src/provider/tweetProvider.ts index c981495828..74c3672de0 100644 --- a/packages/plugin-twitter-primus/src/provider/tweetProvider.ts +++ b/packages/plugin-primus/src/provider/tweetProvider.ts @@ -1,12 +1,12 @@ import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; -import {ScraperWithPrimus} from "../util/ScraperWithPrimus.ts"; +import {TwitterScraper} from "../util/TwitterScraper.ts"; const tweetProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { - const scraperWithPrimus = new ScraperWithPrimus(); - elizaLogger.info("Login to Twitter") - await scraperWithPrimus.login() - elizaLogger.info("Login to Twitter success") + const scraperWithPrimus = new TwitterScraper(); + elizaLogger.info("Login to Twitter"); + await scraperWithPrimus.login(); + elizaLogger.info("Login to Twitter success"); if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { elizaLogger.error("Failed to login to Twitter"); diff --git a/packages/plugin-twitter-primus/src/templates.ts b/packages/plugin-primus/src/templates.ts similarity index 100% rename from packages/plugin-twitter-primus/src/templates.ts rename to packages/plugin-primus/src/templates.ts diff --git a/packages/plugin-primus/src/util/primusUtil.ts b/packages/plugin-primus/src/util/primusUtil.ts new file mode 100644 index 0000000000..cbbd1e391d --- /dev/null +++ b/packages/plugin-primus/src/util/primusUtil.ts @@ -0,0 +1,42 @@ +import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; + +export const generateProof = async ( + endpoint: string, + method: string, + headers: Record, + body: string, + responseParsePath: string +): Promise => { + const zkTLS = new PrimusCoreTLS(); + await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); + const requestParam = body + ? { + url: endpoint, + method: method, + header: headers, + body: body, + } + : { + url: endpoint, + method: method, + header: headers, + }; + // console.log('requestParam:',requestParam) + const attestationParams = zkTLS.generateRequestParams(requestParam, [ + { + keyName: "content", + parsePath: responseParsePath, + parseType: "string", + }, + ]) + // console.log('attestationParams:',attestationParams) + return await zkTLS.startAttestation( + attestationParams + ); +}; + +export const verifyProof = async (attestation: any): Promise => { + const zkTLS = new PrimusCoreTLS(); + await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); + return zkTLS.verifyAttestation(attestation); +}; diff --git a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts b/packages/plugin-primus/src/util/twitterScraper.ts similarity index 83% rename from packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts rename to packages/plugin-primus/src/util/twitterScraper.ts index 92f90a49c5..43c25cd8a9 100644 --- a/packages/plugin-twitter-primus/src/util/ScraperWithPrimus.ts +++ b/packages/plugin-primus/src/util/twitterScraper.ts @@ -1,10 +1,8 @@ import { Scraper } from "agent-twitter-client"; import { elizaLogger } from "@elizaos/core"; -import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; +import { verifyProof, generateProof } from "./primusUtil.ts"; -const expectedEntryTypes = ["tweet", "profile-conversation"]; - -export class ScraperWithPrimus { +export class TwitterScraper { private scraper: Scraper; constructor() {} @@ -113,35 +111,22 @@ export class ScraperWithPrimus { const fieldTogglesUrlEncoded = encodeURIComponent( JSON.stringify(fieldToggles) ); - - const zkTLS = new PrimusCoreTLS(); - const appId = process.env.PRIMUS_APP_ID; - const appSecret = process.env.PRIMUS_APP_SECRET; - await zkTLS.init(appId, appSecret); - - const attestation = await zkTLS.startAttestation( - zkTLS.generateRequestParams( - { - url: `https://twitter.com/i/api/graphql/V7H0Ap3_Hh2FyS75OCDO3Q/UserTweets?variables=${variablesUrlEncoded}&features=${featureUrlEncoded}&fieldToggles=${fieldTogglesUrlEncoded}`, - method: "GET", - header: headers, - }, - [ - { - keyName: "content", - parsePath: - "$.data.user.result.timeline_v2.timeline.instructions[1].entry.content.itemContent.tweet_results.result.legacy.full_text", - parseType: "string", - }, - ] - ) + const endpoint = `https://twitter.com/i/api/graphql/V7H0Ap3_Hh2FyS75OCDO3Q/UserTweets?variables=${variablesUrlEncoded}&features=${featureUrlEncoded}&fieldToggles=${fieldTogglesUrlEncoded}`; + const responseParsePath = + "$.data.user.result.timeline_v2.timeline.instructions[1].entry.content.itemContent.tweet_results.result.legacy.full_text"; + const attestation = await generateProof( + endpoint, + "GET", + headers, + undefined, + responseParsePath ); //log attestation elizaLogger.info( "Tweet getting proof generated successfully:", attestation ); - const verifyResult = zkTLS.verifyAttestation(attestation); + const verifyResult = verifyProof(attestation); if (!verifyResult) { throw new Error( "Verify attestation failed,data from source is illegality" @@ -252,43 +237,24 @@ export class ScraperWithPrimus { }, fieldToggles: {}, }); + const endpoint = 'https://twitter.com/i/api/graphql/a1p9RWpkYKBjWv_I3WzS-A/CreateTweet'; + const method = 'POST'; + const attestation = await generateProof(endpoint,method,headers,bodyStr,"$.data.create_tweet.tweet_results.result.rest_id"); - const zkTLS = new PrimusCoreTLS(); - const appId = process.env.PRIMUS_APP_ID; - const appSecret = process.env.PRIMUS_APP_SECRET; - await zkTLS.init(appId, appSecret); - const attestation = await zkTLS.startAttestation( - zkTLS.generateRequestParams( - { - url: `https://twitter.com/i/api/graphql/a1p9RWpkYKBjWv_I3WzS-A/CreateTweet`, - method: "POST", - body: bodyStr, - header: headers, - }, - [ - { - keyName: "tweetId", - parsePath: - "$.data.create_tweet.tweet_results.result.rest_id", - parseType: "string", - }, - ] - ) - ); elizaLogger.info( "Tweet posting proof generated successfully:", attestation ); - const verifyResult = zkTLS.verifyAttestation(attestation); + const verifyResult = verifyProof(attestation); if (!verifyResult) { throw new Error( "Verify attestation failed,data from source is illegality" ); } const responseData = JSON.parse(attestation.data); - elizaLogger.info(`send tweet success,tweetId:${responseData.tweetId}`); + elizaLogger.info(`send tweet success,tweetId:${responseData.content}`); - return responseData.tweetId; + return responseData.content; } } diff --git a/packages/plugin-primus/tsconfig.json b/packages/plugin-primus/tsconfig.json index 73993deaaf..e9c2e9f852 100644 --- a/packages/plugin-primus/tsconfig.json +++ b/packages/plugin-primus/tsconfig.json @@ -2,9 +2,8 @@ "extends": "../core/tsconfig.json", "compilerOptions": { "outDir": "dist", - "rootDir": "src" + "rootDir": "src", + "types": ["node"] }, - "include": [ - "src/**/*.ts" - ] -} \ No newline at end of file + "include": ["src/**/*.ts"] +} diff --git a/packages/plugin-twitter-primus/tsup.config.ts b/packages/plugin-primus/tsup.config.ts similarity index 100% rename from packages/plugin-twitter-primus/tsup.config.ts rename to packages/plugin-primus/tsup.config.ts diff --git a/packages/plugin-twitter-primus/README.md b/packages/plugin-twitter-primus/README.md deleted file mode 100644 index 85a8737aa6..0000000000 --- a/packages/plugin-twitter-primus/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# @elizaos/plugin-twitter-primus - -A plugin for Twitter/X integration that ensures the verifiability of information throughout the process, including the source of information, summary, usage, and more, across the stages of 'model -> provider -> action'. -## Overview - -This plugin offers the following functionalities: - -- Verifying that the information originated from Twitter/X -- Confirming that the information summary was generated by a large model -- Ensuring that the summary message was successfully sent to Twitter/X - -## Installation - -> Before using the plugins, make sure to install [plugin-primus](../plugin-primus) and complete the configuration. - -```bash -pnpm add @elizaos/plugin-twitter-primus -``` - -## Configuration - -The plugin requires the following environment variables: - -.env file - -```env -TWITTER_USERNAME=your_username -TWITTER_PASSWORD=your_password -TWITTER_EMAIL=your_email # Recommand: for 2FA -TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA -TWITTER_PREMIUM=false # Optional: enables premium features -TWITTER_DRY_RUN=false # Optional: test without posting - -TWITTER_USER_ID_WANT_TO_GET_TWEET=123456677 # Must: Which user the tweet came from -``` - -## Usage -To use the plugin, add `@elizaos/plugin-twitter-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: - -```json -{ - "name": "trump", - "plugins": [ - "@elizaos/plugin-twitter-primus" - ], - //other fields - ..... -} -``` - -## Run -```bash -# Run with your character file -pnpm start --characters="characters/xxx.character.json" -``` - -## Chat with Your Agent -``` -You: Get the latest tweet and post it on my twitter. -Agent: The latest tweet has posted! -``` - -``` -You: Post a tweet on twitter for me. -Agent: The tweet has posted! -``` -Other questions with the same semantic meaning can also be asked diff --git a/packages/plugin-twitter-primus/package.json b/packages/plugin-twitter-primus/package.json deleted file mode 100644 index 3bf7a323f2..0000000000 --- a/packages/plugin-twitter-primus/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@elizaos/plugin-twitter-primus", - "version": "0.1.7", - "type": "module", - "main": "dist/index.js", - "module": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "@elizaos/source": "./src/index.ts", - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - } - } - }, - "files": [ - "dist" - ], - "dependencies": { - "@elizaos/core": "workspace:*", - "agent-twitter-client": "0.0.18", - "@primuslabs/zktls-core-sdk": "^0.1.0", - "tsup": "8.3.5" - }, - "scripts": { - "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "test": "vitest run" - } -} diff --git a/packages/plugin-twitter-primus/src/actions/post.ts b/packages/plugin-twitter-primus/src/actions/post.ts deleted file mode 100644 index 6c6e168287..0000000000 --- a/packages/plugin-twitter-primus/src/actions/post.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { - Action, - composeContext, - elizaLogger, - generateText, - IAgentRuntime, - Memory, - ModelClass, - State, -} from "@elizaos/core"; -import { ScraperWithPrimus } from "../util/ScraperWithPrimus.ts"; -import { tweetProvider } from "../provider/tweetProvider.ts"; -import { summarizeTweetTemplate } from "../templates.ts"; - -async function summaryTweetContent( - runtime: IAgentRuntime, - _message: Memory, - twitterContent: string, - state?: State -): Promise { - try { - const context = summarizeTweetTemplate(twitterContent) - - const tweetContentStr = await generateText({ - runtime, - context, - modelClass: ModelClass.LARGE, - }); - if (!tweetContentStr) { - elizaLogger.error("Invalid tweet content:", tweetContentStr); - return; - } - - const trimmedContent = JSON.parse(tweetContentStr).text; - - // Skip truncation if TWITTER_PREMIUM is true - if ( - process.env.TWITTER_PREMIUM?.toLowerCase() !== "true" && - trimmedContent.length > 200 - ) { - elizaLogger.warn( - `Tweet too long (${trimmedContent.length} chars), truncating...` - ); - return trimmedContent.substring(0, 199) + "..."; - } - - return trimmedContent; - } catch (error) { - elizaLogger.error("Error composing tweet:", error); - throw error; - } -} - -async function postTweet(content: string): Promise { - try { - const scraperWithPrimus = new ScraperWithPrimus(); - await scraperWithPrimus.login(); - if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { - elizaLogger.error("Failed to login to Twitter"); - return false; - } - - // Send the tweet - elizaLogger.log("Attempting to send tweet:", content); - const result = await scraperWithPrimus.sendTweet(content); - - elizaLogger.log("Tweet response:", result); - - // Check for Twitter API errors - if (!result) { - elizaLogger.error(`Twitter API error ${result}`); - return false; - } - return true; - } catch (error) { - // Log the full error details - elizaLogger.error("Error posting tweet:", { - message: error.message, - stack: error.stack, - name: error.name, - cause: error.cause, - }); - return false; - } -} - -export const postAction: Action = { - description: "Post a tweet on Twitter and be verified by Primus", - examples: [ - [ - { - user: "{{user1}}", - content: { - text: "Get the latest tweet and post it on my twitter.", - }, - }, - { - user: "{{agentName}}", - content: { - text: "The latest tweet has posted.", - action: "POST_TWEET", - }, - }, - ], - [ - { - user: "{{user1}}", - content: { - text: "Help post a tweet which content from other tweet.", - }, - }, - { - user: "{{agentName}}", - content: { - text: "Completed!", - action: "POST_TWEET", - }, - }, - ], - [ - { - user: "{{user1}}", - content: { - text: "Post a tweet on twitter for me.", - }, - }, - { - user: "{{agentName}}", - content: { - text: "I'll post the latest tweet to your Twitter account now!", - action: "POST_TWEET", - }, - }, - ], - ], - handler: async ( - runtime: IAgentRuntime, - message: Memory, - state?: State - ): Promise => { - //check VERIFIABLE_INFERENCE_ENABLED - if ( - !( - process.env.VERIFIABLE_INFERENCE_ENABLED === "true" && - process.env.PRIMUS_APP_ID && - process.env.PRIMUS_APP_SECRET - ) - ) { - elizaLogger.error( - `Parameter 'VERIFIABLE_INFERENCE_ENABLED' not set, Eliza will run this action!` - ); - return false; - } - - try { - elizaLogger.log(`Eliza will run with plugin-twitter-primus!`); - // Generate tweet content using context - const twitterContent = await tweetProvider.get( - runtime, - message, - state - ); - - if (!twitterContent) { - elizaLogger.error("No content get from twitter"); - return false; - } - - elizaLogger.log(`Content from twitter: ${twitterContent}`); - - //Summary the content - const contentSummaryByAI = await summaryTweetContent( - runtime, - message, - twitterContent, - state - ); - //log - elizaLogger.log( - `Summary content from twitter: ${contentSummaryByAI}` - ); - // Check for dry run mode - explicitly check for string "true" - if ( - process.env.TWITTER_DRY_RUN && - process.env.TWITTER_DRY_RUN.toLowerCase() === "true" - ) { - elizaLogger.info( - `Dry run: would have posted tweet: ${contentSummaryByAI}` - ); - return true; - } - - return await postTweet(contentSummaryByAI); - } catch (error) { - elizaLogger.error("Error in post action:", error); - return false; - } - }, - name: "POST_TWEET", - similes: ["TWEET", "POST", "SEND_TWEET"], - validate: async ( - runtime: IAgentRuntime, - message: Memory, - state?: State - ) => { - const hasCredentials = - !!process.env.TWITTER_USERNAME && !!process.env.TWITTER_PASSWORD; - elizaLogger.log(`Has credentials: ${hasCredentials}`); - - return hasCredentials; - }, -}; diff --git a/packages/plugin-twitter-primus/src/index.ts b/packages/plugin-twitter-primus/src/index.ts deleted file mode 100644 index 4c5e198319..0000000000 --- a/packages/plugin-twitter-primus/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Plugin } from "@elizaos/core"; -import { postAction } from "./actions/post"; -import {tweetProvider} from "./provider/tweetProvider.ts"; - -export const twitterPlugin: Plugin = { - name: "twitter", - description: "Twitter integration plugin for posting tweets with proof generated by primus", - actions: [postAction], - evaluators: [], - providers: [], -}; - -export default twitterPlugin; diff --git a/packages/plugin-twitter-primus/src/types.ts b/packages/plugin-twitter-primus/src/types.ts deleted file mode 100644 index 1f4537b0ac..0000000000 --- a/packages/plugin-twitter-primus/src/types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { z } from "zod"; - -export interface TweetContent { - text: string; -} - -export const TweetSchema = z.object({ - text: z.string().describe("The text of the tweet"), -}); - -export const isTweetContent = (obj: any): obj is TweetContent => { - return TweetSchema.safeParse(obj).success; -}; diff --git a/packages/plugin-twitter-primus/tsconfig.json b/packages/plugin-twitter-primus/tsconfig.json deleted file mode 100644 index e9c2e9f852..0000000000 --- a/packages/plugin-twitter-primus/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../core/tsconfig.json", - "compilerOptions": { - "outDir": "dist", - "rootDir": "src", - "types": ["node"] - }, - "include": ["src/**/*.ts"] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3407a7a85f..8181d85a20 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,9 +280,6 @@ importers: '@elizaos/plugin-twitter': specifier: workspace:* version: link:../packages/plugin-twitter - '@elizaos/plugin-twitter-primus': - specifier: workspace:* - version: link:../packages/plugin-twitter-primus '@elizaos/plugin-web-search': specifier: workspace:* version: link:../packages/plugin-web-search @@ -1910,12 +1907,11 @@ importers: '@primuslabs/zktls-core-sdk': specifier: ^0.1.0 version: 0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - dotenv: - specifier: ^16.4.5 - version: 16.4.7 - devDependencies: + agent-twitter-client: + specifier: 0.0.18 + version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) tsup: - specifier: ^8.3.5 + specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0) packages/plugin-solana: @@ -2258,21 +2254,6 @@ importers: specifier: ^1.0.0 version: 1.2.1(@types/node@22.10.5)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) - packages/plugin-twitter-primus: - dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core - '@primuslabs/zktls-core-sdk': - specifier: ^0.1.0 - version: 0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) - agent-twitter-client: - specifier: 0.0.18 - version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) - tsup: - specifier: 8.3.5 - version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.2)(yaml@2.7.0) - packages/plugin-video-generation: dependencies: '@elizaos/core': From 82660437c7746f922b17dec466f297b6da6d8f62 Mon Sep 17 00:00:00 2001 From: Xiang Xie Date: Thu, 9 Jan 2025 21:59:09 +0800 Subject: [PATCH 11/24] refine readme in plugin-primus --- packages/plugin-primus/README.md | 17 +++++++++-------- .../src/actions/postTweetAction.ts | 4 ++-- .../tokenPriceProvider.ts | 0 .../{provider => providers}/tweetProvider.ts | 0 .../plugin-primus/src/util/twitterScraper.ts | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) rename packages/plugin-primus/src/{provider => providers}/tokenPriceProvider.ts (100%) rename packages/plugin-primus/src/{provider => providers}/tweetProvider.ts (100%) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index c414592c52..12e142348e 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -1,17 +1,18 @@ -# @elizaos/plugin-twitter-primus +# @elizaos/plugin-primus +A plugin to fully verify agent activities, including LLM access, actions, and interactions with external providers, powered by Primus' zkTLS protocol. -A plugin for Twitter/X integration that ensures the verifiability of information throughout the process, including the source of information, summary, usage, and more, across the stages of 'model -> provider -> action'. ## Overview -This plugin offers the following functionalities: - -- Verifying that the information originated from Twitter/X -- Confirming that the information summary was generated by a large model -- Ensuring that the summary message was successfully sent to Twitter/X +Here's a refined version of your text: +In the Eliza framework, an agent consists of three key components: a brain (accessing an LLM), actions (the tasks the agent performs), and perception (gathering external information from providers). To fully verify agent activities, it's essential to ensure that the agent's thoughts, actions, and external information requests are all verifiable. This plugin enables full verification of these activities. +The current plugin includes: +Verification of inference from OpenAI's LLM. +An example for verifying actions, such as posting a tweet (this can be extended to any other actions). +An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). ## What we do @@ -30,7 +31,7 @@ example.. ... ... -## +## diff --git a/packages/plugin-primus/src/actions/postTweetAction.ts b/packages/plugin-primus/src/actions/postTweetAction.ts index 042c17f428..0884e044eb 100644 --- a/packages/plugin-primus/src/actions/postTweetAction.ts +++ b/packages/plugin-primus/src/actions/postTweetAction.ts @@ -6,8 +6,8 @@ import { State, } from "@elizaos/core"; import { TwitterScraper } from "../util/TwitterScraper.ts"; -import { tweetProvider } from "../provider/tweetProvider.ts"; -import {tokenPriceProvider} from "../provider/tokenPriceProvider.ts"; +import { tweetProvider } from "../providers/tweetProvider.ts"; +import {tokenPriceProvider} from "../providers/tokenPriceProvider.ts"; export const postTweetAction: Action = { description: "Post a tweet on Twitter and be verified by Primus", diff --git a/packages/plugin-primus/src/provider/tokenPriceProvider.ts b/packages/plugin-primus/src/providers/tokenPriceProvider.ts similarity index 100% rename from packages/plugin-primus/src/provider/tokenPriceProvider.ts rename to packages/plugin-primus/src/providers/tokenPriceProvider.ts diff --git a/packages/plugin-primus/src/provider/tweetProvider.ts b/packages/plugin-primus/src/providers/tweetProvider.ts similarity index 100% rename from packages/plugin-primus/src/provider/tweetProvider.ts rename to packages/plugin-primus/src/providers/tweetProvider.ts diff --git a/packages/plugin-primus/src/util/twitterScraper.ts b/packages/plugin-primus/src/util/twitterScraper.ts index 43c25cd8a9..f524fe474a 100644 --- a/packages/plugin-primus/src/util/twitterScraper.ts +++ b/packages/plugin-primus/src/util/twitterScraper.ts @@ -249,7 +249,7 @@ export class TwitterScraper { const verifyResult = verifyProof(attestation); if (!verifyResult) { throw new Error( - "Verify attestation failed,data from source is illegality" + "Verify attestation failed, data from source is illegality" ); } const responseData = JSON.parse(attestation.data); From d05c974e3e990e63e53d419360297e498ee5d694 Mon Sep 17 00:00:00 2001 From: Xiang Xie Date: Thu, 9 Jan 2025 22:00:19 +0800 Subject: [PATCH 12/24] fix format --- packages/plugin-primus/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 12e142348e..a784a5b845 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -10,9 +10,9 @@ In the Eliza framework, an agent consists of three key components: a brain (acce The current plugin includes: -Verification of inference from OpenAI's LLM. -An example for verifying actions, such as posting a tweet (this can be extended to any other actions). -An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). +- Verification of inference from OpenAI's LLM. +- An example for verifying actions, such as posting a tweet (this can be extended to any other actions). +- An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). ## What we do From d8d3ce7ce105bc8f376e824ce55278da6728c28d Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Thu, 9 Jan 2025 22:57:16 +0800 Subject: [PATCH 13/24] update readme in plugin-primus --- packages/plugin-primus/README.md | 295 +++++++++++++++--- .../src/adapter/primusAdapter.ts | 13 - packages/plugin-primus/src/util/primusUtil.ts | 10 +- .../plugin-primus/src/util/twitterScraper.ts | 2 +- 4 files changed, 252 insertions(+), 68 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 12e142348e..8d5eaf4b69 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -15,86 +15,283 @@ An example for verifying actions, such as posting a tweet (this can be extended An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). -## What we do -in general +## What we do? +This plugin provides the following features: +- Generate an attestation of a network request +- Verify the attestation is valid + +You can find detail at [primusUtil.ts](./src/util/primusUtil.ts) +### generateProof +```typescript +generateProof = async ( + endpoint: string, + method: string, + headers: Record, + body: string, + responseParsePath: string +): Promise +``` +***parameters*** +- ***endpoint***: The target endpoint of the network request. +- ***method***: The HTTP method of the request, such as 'GET', 'POST', etc. +- ***headers***: A record containing the headers of the request. +- ***body*** : The body of the request. It should be a string. +- ***responseParsePath***: A JSONPath expression to locate the specific field in the response you want to attest. Currently, only JSONPath expressions are supported ([ What is JSONPath](https://datatracker.ietf.org/doc/rfc9535/)) + +***returns*** +When a successful data verification process is completed, you will receive a standard verification structure with the following details: +```json + { + "recipient": "YOUR_USER_ADDRESS", // user's wallet address, default is 0x0000000000000000000000000000000000000000 + "request": { // request of data verification + "url": "REQUEST_URL", // request url for verification + "header": "REQUEST_HEADER", // request header + "method": "REQUEST_METHOD", // request method + "body": "REQUEST_BODY" // request body + }, + "reponseResolve": [ // data verification response items + { + "keyName": "VERIFY_DATA_ITEMS", // the "verify data items" you set in the template + "parseType": "", + "parsePath": "DARA_ITEM_PATH" // json path of the data for verification + } + ], + "data": "{ACTUAL_DATA}", // actual data items in the request, stringified JSON object + "attConditions": "[RESPONSE_CONDITIONS]", // verification response conditions, stringified JSON object + "timestamp": TIMESTAMP_OF_VERIFICATION_EXECUTION, // timestamp of verification execution + "additionParams": "", // additionParams from zkTLS sdk + "attestors": [ // information of the attestors + { + "attestorAddr": "ATTESTOR_ADDRESS", // the address of the attestor + "url": "https://primuslabs.org" // the attestor's url + } + ], + "signatures": [ + "SIGNATURE_OF_THIS_VERIFICATION" // attestor's signature for this verification + ] +} +``` +### verifyProof +Verify the attestation is valid. +```typescript + verifyProof = async (attestation: any): Promise +``` +***parameters*** + +- ***attestation***: The attestation is generated during a network request. + +***returns*** +- true : The attestation is valid. +- false : The attestation is invalid. + +***Below are examples illustrating how to use these functions.*** + +### model +Developers can use the zktls module provided by Primus to attest OpenAI requests. Below is the detailed example code: +```typescript + +export class PrimusAdapter implements IVerifiableInferenceAdapter { + /** + * Generate proof of communication with OpenAI + */ + async generateText( + context: string, + modelClass: string, + options?: VerifiableInferenceOptions + ): Promise { + //other code is hidden + ...... + // Get provider-specific endpoint, auth header and response json path + let endpoint; + let authHeader; + let responseParsePath; + + switch (provider) { + case ModelProviderName.OPENAI: + //The endpoint of the request + endpoint = `${baseEndpoint}/chat/completions`; + authHeader = `Bearer ${apiKey}`; + //The JSONPath to extract the content field from OpenAI's response. + responseParsePath = "$.choices[0].message.content"; + break; + default: + throw new Error(`Unsupported model provider: ${provider}`); + } + //The headers of the request + const headers = { + "Content-Type": "application/json", + "Authorization": authHeader, + }; + + try { + //The body of the request + let body = { + model: model.name, + messages: [{ role: "user", content: context }], + temperature: + options?.providerOptions?.temperature || + models[provider].model[modelClass].temperature, + }; + //generate proof + const attestation = await generateProof(endpoint,"POST",headers,JSON.stringify(body),responseParsePath); + elizaLogger.log(`model attestation:`, attestation); + + const responseData = JSON.parse(attestation.data); + let text = JSON.parse(responseData.content); + return { + text, + proof: attestation, + provider: VerifiableInferenceProvider.PRIMUS, + timestamp: Date.now(), + }; + } catch (error) { + console.error("Error in Primus generateText:", error); + throw error; + } + } + //verify the proof + async verifyProof(result: VerifiableInferenceResult): Promise { + const isValid = verifyProof(result.proof) + elizaLogger.log("Proof is valid:", isValid); + return isValid; + } +} -### model: -expample +``` +You can see full code at [primusAdapter.ts](./src/adapter/primusAdapter.ts) ### Provider -exampe +Developers can use the zktls module provided by Primus to attest providers. Providers are core modules responsible for injecting dynamic context and real-time information into agent interactions. Therefore, it is crucial for agents to validate that the information received from providers is authentic. + +Below is an example demonstrating how to verify that the BTC price from Binance is valid: +```typescript + +const tokenPriceProvider: Provider = { + get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { + //get btc price + const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"; + const method = 'GET'; + const headers = { + 'Accept ': '*/*', + }; + //generate proof + const attestation = await generateProof(url, method, headers, "", "$.price"); + //you can verify the proof is valid + const valid = await verifyProof(attestation); + if(!valid){ + throw new Error("Invalid price attestation"); + } + elizaLogger.info('price attestation:',attestation); + const responseData = JSON.parse((attestation as any).data); + const price = responseData.content; + return ` + Get BTC price from Binance: + BTC: ${price} USDT + Time: ${new Date().toUTCString()} + POST by eliza #zilia + Attested by Primus #primus #zktls + ` + }, +}; +``` +You can see more examples at [providers](./src/providers/tokenPriceProvider.ts) ### actions -example.. - - -... - -... -## - - - - - - - - - +Primus ensures the reliability of both the provider's data source and the operations performed by actions. Below is an example demonstrating how to post price information from the [tokenPriceProvider](./src/providers/tokenPriceProvider.ts) to Twitter: +```typescript +const contentYouWantToPost = await tokenPriceProvider.get(runtime, message, state); +//other code is hidden +try { + //login + const scraperWithPrimus = new TwitterScraper(); + await scraperWithPrimus.login(); + if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { + elizaLogger.error("Failed to login to Twitter"); + return false; + } + // post the tweet + elizaLogger.log("Attempting to send tweet:", contentYouWantToPost); + const endpoint = 'https://twitter.com/i/api/graphql/a1p9RWpkYKBjWv_I3WzS-A/CreateTweet'; + const method = 'POST'; + //generate proof + const attestation = await generateProof(endpoint,method,headers,bodyStr,"$.data.create_tweet.tweet_results.result.rest_id"); + + elizaLogger.info( + "Tweet posting proof generated successfully:", + attestation + ); + + const verifyResult = verifyProof(attestation); + if (!verifyResult) { + throw new Error( + "Verify attestation failed, data from source is illegality" + ); + } + return true; +} catch (error) { + elizaLogger.error("Error in post action:", error); + return false; +} +``` +For more details, refer to [postTweetAction.ts](./src/actions/postTweetAction.ts) ## Installation -> Before using the plugins, make sure to install [plugin-primus](../plugin-primus) and complete the configuration. - ```bash -pnpm add @elizaos/plugin-twitter-primus +pnpm add @elizaos/plugin-primus ``` ## Configuration +Add the following environment variables to your .env file: + +``` +PRIMUS_APP_ID=your_app_id +PRIMUS_APP_SECRET=your_app_secret +VERIFIABLE_INFERENCE_ENABLED=true +VERIFIABLE_INFERENCE_PROVIDER=primus +``` + +***How to get PRIMUS_APP_ID and PRIMUS_APP_SECRET*** -The plugin requires the following environment variables: +1. Visit https://dev.primuslabs.xyz/ +2. Create a new project +3. Save your 'Application ID(PRIMUS_APP_ID)' and 'Secret Key(PRIMUS_APP_SECRET)' -.env file +If you want to run [postTweetAction](./src/actions/postTweetAction.ts), please add these variables to your `.env` file: -```env +```dotenv TWITTER_USERNAME=your_username TWITTER_PASSWORD=your_password -TWITTER_EMAIL=your_email # Recommand: for 2FA -TWITTER_2FA_SECRET=your_2fa_secret # Optional: for 2FA -TWITTER_PREMIUM=false # Optional: enables premium features -TWITTER_DRY_RUN=false # Optional: test without posting - -TWITTER_USER_ID_WANT_TO_GET_TWEET=123456677 # Must: Which user the tweet came from +TWITTER_EMAIL=your_email# Recommand: for 2FA +TWITTER_2FA_SECRET=your_2fa_secret# Optional: for 2FA +TWITTER_PREMIUM=false# Optional: enables premium features +TWITTER_DRY_RUN=false# Optional: test without posting ``` ## Usage -To use the plugin, add `@elizaos/plugin-twitter-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: + +To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: ```json { - "name": "trump", - "plugins": [ - "@elizaos/plugin-twitter-primus" - ], - //other fields - ..... + "name": "trump", + "modelProvider": "openai",//just support openai now + "plugins": [ + "@elizaos/plugin-primus" + ], + //other fields + ..... } ``` ## Run + ```bash # Run with your character file pnpm start --characters="characters/xxx.character.json" ``` ## Chat with Your Agent -``` -You: Get the latest tweet and post it on my twitter. -Agent: The latest tweet has posted! -``` -``` -You: Post a tweet on twitter for me. -Agent: The tweet has posted! -``` -Other questions with the same semantic meaning can also be asked +[Here are examples show how to chat with agent](./src/actions/postTweetAction.ts). + diff --git a/packages/plugin-primus/src/adapter/primusAdapter.ts b/packages/plugin-primus/src/adapter/primusAdapter.ts index ba6f299f48..b1535acab7 100644 --- a/packages/plugin-primus/src/adapter/primusAdapter.ts +++ b/packages/plugin-primus/src/adapter/primusAdapter.ts @@ -18,7 +18,6 @@ interface PrimusOptions { } export class PrimusAdapter implements IVerifiableInferenceAdapter { - private client: PrimusCoreTLS; private options: PrimusOptions; constructor(options: PrimusOptions) { @@ -52,18 +51,6 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { authHeader = `Bearer ${apiKey}`; responseParsePath = "$.choices[0].message.content"; break; - case ModelProviderName.ETERNALAI: - case ModelProviderName.REDPILL: - case ModelProviderName.NANOGPT: - case ModelProviderName.HYPERBOLIC: - case ModelProviderName.ALI_BAILIAN: - case ModelProviderName.LLAMACLOUD: - case ModelProviderName.TOGETHER: - case ModelProviderName.AKASH_CHAT_API: - case ModelProviderName.ANTHROPIC: - case ModelProviderName.CLAUDE_VERTEX: - case ModelProviderName.GOOGLE: - case ModelProviderName.VOLENGINE: default: throw new Error(`Unsupported model provider: ${provider}`); } diff --git a/packages/plugin-primus/src/util/primusUtil.ts b/packages/plugin-primus/src/util/primusUtil.ts index cbbd1e391d..5c490c7c03 100644 --- a/packages/plugin-primus/src/util/primusUtil.ts +++ b/packages/plugin-primus/src/util/primusUtil.ts @@ -28,11 +28,11 @@ export const generateProof = async ( parsePath: responseParsePath, parseType: "string", }, - ]) - // console.log('attestationParams:',attestationParams) - return await zkTLS.startAttestation( - attestationParams - ); + ]); + attestationParams.setAttMode({ + algorithmType: "proxytls", + }); + return await zkTLS.startAttestation(attestationParams); }; export const verifyProof = async (attestation: any): Promise => { diff --git a/packages/plugin-primus/src/util/twitterScraper.ts b/packages/plugin-primus/src/util/twitterScraper.ts index f524fe474a..81b488d2c1 100644 --- a/packages/plugin-primus/src/util/twitterScraper.ts +++ b/packages/plugin-primus/src/util/twitterScraper.ts @@ -129,7 +129,7 @@ export class TwitterScraper { const verifyResult = verifyProof(attestation); if (!verifyResult) { throw new Error( - "Verify attestation failed,data from source is illegality" + "Verify attestation failed,data from source is illegality" ); } const responseData = JSON.parse(attestation.data); From 8122abcbb205fee17b7a1464c8618d4c178bffb1 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Thu, 9 Jan 2025 23:04:48 +0800 Subject: [PATCH 14/24] fix readme format --- packages/plugin-primus/README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 9c145f5d69..9d0e320e9c 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -16,11 +16,13 @@ The current plugin includes: ## What we do? -This plugin provides the following features: -- Generate an attestation of a network request -- Verify the attestation is valid +This plugin offers the following features: + +- Generate an attestation for a network request. +- Verify the validity of the attestation. + +You can find detail code at [primusUtil.ts](./src/util/primusUtil.ts) -You can find detail at [primusUtil.ts](./src/util/primusUtil.ts) ### generateProof ```typescript generateProof = async ( @@ -87,7 +89,7 @@ Verify the attestation is valid. ***Below are examples illustrating how to use these functions.*** ### model -Developers can use the zktls module provided by Primus to attest OpenAI requests. Below is the detailed example code: +Developers can leverage the zktls module provided by Primus to attest OpenAI requests. The following is a detailed example: ```typescript export class PrimusAdapter implements IVerifiableInferenceAdapter { From c8500cdd7b6a457df1860f6851de31ad1c6dea05 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Thu, 9 Jan 2025 23:26:03 +0800 Subject: [PATCH 15/24] fix code error --- agent/src/index.ts | 1 + .../src/adapter/primusAdapter.ts | 2 +- pnpm-lock.yaml | 60 +++++++++++++++---- 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index e0c3ed5cfc..c44438e15b 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -92,6 +92,7 @@ import net from "net"; import path from "path"; import { fileURLToPath } from "url"; import yargs from "yargs"; +import {dominosPlugin} from "@elizaos/plugin-dominos"; const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file const __dirname = path.dirname(__filename); // get the name of the directory diff --git a/packages/plugin-primus/src/adapter/primusAdapter.ts b/packages/plugin-primus/src/adapter/primusAdapter.ts index b1535acab7..053c073d5b 100644 --- a/packages/plugin-primus/src/adapter/primusAdapter.ts +++ b/packages/plugin-primus/src/adapter/primusAdapter.ts @@ -18,7 +18,7 @@ interface PrimusOptions { } export class PrimusAdapter implements IVerifiableInferenceAdapter { - private options: PrimusOptions; + public options: PrimusOptions; constructor(options: PrimusOptions) { this.options = options; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 653e2165b2..cf00b3f737 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -265,6 +265,9 @@ importers: '@elizaos/plugin-open-weather': specifier: workspace:* version: link:../packages/plugin-open-weather + '@elizaos/plugin-primus': + specifier: workspace:* + version: link:../packages/plugin-primus '@elizaos/plugin-solana': specifier: workspace:* version: link:../packages/plugin-solana @@ -1868,7 +1871,7 @@ importers: version: 0.9.2(@metaplex-foundation/umi@0.9.2)(@solana/web3.js@1.95.5(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(encoding@0.1.13) '@openzeppelin/contracts': specifier: ^5.1.0 - version: 5.1.0 + version: 5.2.0 '@solana-developers/helpers': specifier: ^2.5.6 version: 2.5.6(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.3)(utf-8-validate@5.0.10) @@ -2121,6 +2124,21 @@ importers: specifier: ^3.22.4 version: 3.23.8 + packages/plugin-primus: + dependencies: + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@primuslabs/zktls-core-sdk': + specifier: ^0.1.0 + version: 0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + agent-twitter-client: + specifier: 0.0.18 + version: 0.0.18(bufferutil@4.0.9)(utf-8-validate@5.0.10) + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) + packages/plugin-rabbi-trader: dependencies: '@elizaos/client-twitter': @@ -6990,8 +7008,8 @@ packages: resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} - '@openzeppelin/contracts@5.1.0': - resolution: {integrity: sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==} + '@openzeppelin/contracts@5.2.0': + resolution: {integrity: sha512-bxjNie5z89W1Ea0NZLZluFh8PrFNn9DH8DQlujEok2yjsOlraUPKID5p1Wk3qdNbf6XkQ1Os2RvfiHrrXLHWKA==} '@orca-so/common-sdk@0.6.4': resolution: {integrity: sha512-iOiC6exTA9t2CEOaUPoWlNP3soN/1yZFjoz1mSf7NvOqo/PJZeIdWpB7BRXwU0mGGatjxU4SFgMGQ8NrSx+ONw==} @@ -7312,6 +7330,9 @@ packages: resolution: {integrity: sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw==} engines: {node: '>=18'} + '@primuslabs/zktls-core-sdk@0.1.0': + resolution: {integrity: sha512-Jnboy9xr7NPMewPZkky7J2bCOzw0t8X1r072VlbTyR8yc+88/uFhx/LvBgIYiajiGO12DY3o1SlV4SSYZOyFOg==} + '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -12853,8 +12874,8 @@ packages: resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} - esrap@1.3.2: - resolution: {integrity: sha512-C4PXusxYhFT98GjLSmb20k9PREuUdporer50dhzGuJu9IJXktbMddVCMLAERl5dAHyAi73GWWCE4FVHGP1794g==} + esrap@1.3.3: + resolution: {integrity: sha512-zO/nCAXn5Bzl5xaqoCuvsJdUgYSawQ1FWN5OZrvFy9DYtVa8EKiyOBmGibnf3dAHr/m5aeD76bPIB72CKH1YvQ==} esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} @@ -20405,8 +20426,8 @@ packages: resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} engines: {node: '>=18.17'} - undici@7.2.0: - resolution: {integrity: sha512-klt+0S55GBViA9nsq48/NSCo4YX5mjydjypxD7UmHh/brMu8h/Mhd/F7qAeoH2NOO8SDTk6kjnTFc4WpzmfYpQ==} + undici@7.2.1: + resolution: {integrity: sha512-U2k0XHLJfaciARRxDcqTk2AZQsGXerHzdvfCZcy1hNhSf5KCAF4jIQQxL+apQviOekhRFPqED6Of5/+LcUSLzQ==} engines: {node: '>=20.18.1'} unenv@1.10.0: @@ -20709,6 +20730,10 @@ packages: resolution: {integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==} hasBin: true + uuid@11.0.4: + resolution: {integrity: sha512-IzL6VtTTYcAhA/oghbFJ1Dkmqev+FpQWnCBaKq/gUluLxliWvO8DPFWfIviRmYbtaavtSQe4WBL++rFjdcGWEg==} + hasBin: true + uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -28941,7 +28966,7 @@ snapshots: '@opentelemetry/api@1.9.0': {} - '@openzeppelin/contracts@5.1.0': {} + '@openzeppelin/contracts@5.2.0': {} '@orca-so/common-sdk@0.6.4(@solana/spl-token@0.4.9(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.7.3)(utf-8-validate@5.0.10))(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10))(decimal.js@10.4.3)': dependencies: @@ -29437,6 +29462,15 @@ snapshots: - bufferutil - utf-8-validate + '@primuslabs/zktls-core-sdk@0.1.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)': + dependencies: + ethers: 5.7.2(bufferutil@4.0.9)(utf-8-validate@5.0.10) + uuid: 11.0.4 + ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + '@protobufjs/aspromise@1.1.2': {} '@protobufjs/base64@1.1.2': {} @@ -33467,7 +33501,7 @@ snapshots: tough-cookie: 4.1.4 tslib: 2.8.1 twitter-api-v2: 1.19.0 - undici: 7.2.0 + undici: 7.2.1 ws: 8.18.0(bufferutil@4.0.9)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -37236,7 +37270,7 @@ snapshots: dependencies: estraverse: 5.3.0 - esrap@1.3.2: + esrap@1.3.3: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -46122,7 +46156,7 @@ snapshots: axobject-query: 4.1.0 clsx: 2.1.1 esm-env: 1.2.2 - esrap: 1.3.2 + esrap: 1.3.3 is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.17 @@ -47141,7 +47175,7 @@ snapshots: undici@6.19.8: {} - undici@7.2.0: {} + undici@7.2.1: {} unenv@1.10.0: dependencies: @@ -47426,6 +47460,8 @@ snapshots: uuid@11.0.3: {} + uuid@11.0.4: {} + uuid@3.4.0: {} uuid@8.3.2: {} From 4f080945b739bfca17817751ce95fae7a9b0994a Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Fri, 10 Jan 2025 00:57:32 +0800 Subject: [PATCH 16/24] update readme in plugin-primus --- agent/src/index.ts | 1 + packages/plugin-primus/README.md | 287 +++++++----------- .../src/actions/postTweetAction.ts | 3 +- .../src/adapter/primusAdapter.ts | 1 + 4 files changed, 117 insertions(+), 175 deletions(-) diff --git a/agent/src/index.ts b/agent/src/index.ts index c44438e15b..6630b81c54 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -600,6 +600,7 @@ export async function createAgent( verifiableInferenceAdapter = new PrimusAdapter({ appId: process.env.PRIMUS_APP_ID, appSecret: process.env.PRIMUS_APP_SECRET, + attMode: "proxytls", modelProvider: character.modelProvider, token, }); diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 9d0e320e9c..14d282f18a 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -1,240 +1,178 @@ # @elizaos/plugin-primus -A plugin to fully verify agent activities, including LLM access, actions, and interactions with external providers, powered by Primus' zkTLS protocol. +A plugin to fully verify agent activities, including LLM access, actions, and interactions with external providers, +powered by Primus' zkTLS protocol. ## Overview Here's a refined version of your text: -In the Eliza framework, an agent consists of three key components: a brain (accessing an LLM), actions (the tasks the agent performs), and perception (gathering external information from providers). To fully verify agent activities, it's essential to ensure that the agent's thoughts, actions, and external information requests are all verifiable. This plugin enables full verification of these activities. +In the Eliza framework, an agent consists of three key components: a brain (accessing an LLM), actions (the tasks the +agent performs), and perception (gathering external information from providers). To fully verify agent activities, it's +essential to ensure that the agent's thoughts, actions, and external information requests are all verifiable. This +plugin enables full verification of these activities. The current plugin includes: - Verification of inference from OpenAI's LLM. - An example for verifying actions, such as posting a tweet (this can be extended to any other actions). -- An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). +- An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data + providers). +## Primus Adapter +### LLM inference Usage (PrimusAdapter) +```typescript +import {PrimusAdapter} from "@elizaos/plugin-primus"; +import {VerifiableInferenceOptions} from '@elizaos/core'; + +// Initialize primus adapter +const primusAdatper = new PrimusAdapter({ + appId: process.env.PRIMUS_APP_ID, + appSecret: process.env.PRIMUS_APP_SECRET, + attMode: "proxytls", + modelProvider: character.modelProvider, + token, +}); + +interface PrimusOptions { + appId: string; + appSecret: string; + attMode: string; + modelProvider?: ModelProviderName; + token?: string; +} + +// The options for generating an attestation +const options: VerifiableInferenceOptions = { + // Optional: Override the default endpoint + endpoint: "https://api.openapi.com/chat/completions", + // Optional: Add custom headers + headers: { + "Content-Type": "application/json", + "Authorization": "bearer Token", + }, + // Optional: Provider-specific options + providerOptions: { + temperature: 0.7, + }, +}; + +// Generate an attestation for a network request. +const result = await primusAdapter.generateText(context, "gpt-4o", options); +// Verify the validity of the attestation. +const isValid = await primusAdapter.verifyProof(result.proof); +``` -## What we do? This plugin offers the following features: - Generate an attestation for a network request. - Verify the validity of the attestation. You can find detail code at [primusUtil.ts](./src/util/primusUtil.ts) - -### generateProof +#### generateProof ```typescript generateProof = async ( + // The target endpoint of the network request. endpoint: string, + // The HTTP method of the request, such as 'GET', 'POST', etc. method: string, + // A record containing the headers of the request. headers: Record, + // The body of the request. It should be a string. body: string, + //A [JSONPath](https://datatracker.ietf.org/doc/rfc9535/) expression to locate the specific field in the response you want to attest. responseParsePath: string ): Promise ``` -***parameters*** -- ***endpoint***: The target endpoint of the network request. -- ***method***: The HTTP method of the request, such as 'GET', 'POST', etc. -- ***headers***: A record containing the headers of the request. -- ***body*** : The body of the request. It should be a string. -- ***responseParsePath***: A JSONPath expression to locate the specific field in the response you want to attest. Currently, only JSONPath expressions are supported ([ What is JSONPath](https://datatracker.ietf.org/doc/rfc9535/)) - -***returns*** -When a successful data verification process is completed, you will receive a standard verification structure with the following details: -```json - { - "recipient": "YOUR_USER_ADDRESS", // user's wallet address, default is 0x0000000000000000000000000000000000000000 - "request": { // request of data verification - "url": "REQUEST_URL", // request url for verification - "header": "REQUEST_HEADER", // request header - "method": "REQUEST_METHOD", // request method - "body": "REQUEST_BODY" // request body - }, - "reponseResolve": [ // data verification response items - { - "keyName": "VERIFY_DATA_ITEMS", // the "verify data items" you set in the template - "parseType": "", - "parsePath": "DARA_ITEM_PATH" // json path of the data for verification - } - ], - "data": "{ACTUAL_DATA}", // actual data items in the request, stringified JSON object - "attConditions": "[RESPONSE_CONDITIONS]", // verification response conditions, stringified JSON object - "timestamp": TIMESTAMP_OF_VERIFICATION_EXECUTION, // timestamp of verification execution - "additionParams": "", // additionParams from zkTLS sdk - "attestors": [ // information of the attestors - { - "attestorAddr": "ATTESTOR_ADDRESS", // the address of the attestor - "url": "https://primuslabs.org" // the attestor's url - } - ], - "signatures": [ - "SIGNATURE_OF_THIS_VERIFICATION" // attestor's signature for this verification - ] -} -``` -### verifyProof +***returns*** +When a successful data verification process is completed, you will receive a standard [attestation](https://docs.primuslabs.xyz/data-verification/zk-tls-sdk/production#understanding-the-data-verification-structure) + +#### verifyProof + Verify the attestation is valid. + ```typescript + // The attestation is generated during a network request. + // Returns true: The attestation is valid. false : The attestation is invalid. verifyProof = async (attestation: any): Promise ``` -***parameters*** - -- ***attestation***: The attestation is generated during a network request. - -***returns*** -- true : The attestation is valid. -- false : The attestation is invalid. - ***Below are examples illustrating how to use these functions.*** -### model -Developers can leverage the zktls module provided by Primus to attest OpenAI requests. The following is a detailed example: -```typescript - -export class PrimusAdapter implements IVerifiableInferenceAdapter { - /** - * Generate proof of communication with OpenAI - */ - async generateText( - context: string, - modelClass: string, - options?: VerifiableInferenceOptions - ): Promise { - //other code is hidden - ...... - // Get provider-specific endpoint, auth header and response json path - let endpoint; - let authHeader; - let responseParsePath; - - switch (provider) { - case ModelProviderName.OPENAI: - //The endpoint of the request - endpoint = `${baseEndpoint}/chat/completions`; - authHeader = `Bearer ${apiKey}`; - //The JSONPath to extract the content field from OpenAI's response. - responseParsePath = "$.choices[0].message.content"; - break; - default: - throw new Error(`Unsupported model provider: ${provider}`); - } - //The headers of the request - const headers = { - "Content-Type": "application/json", - "Authorization": authHeader, - }; - - try { - //The body of the request - let body = { - model: model.name, - messages: [{ role: "user", content: context }], - temperature: - options?.providerOptions?.temperature || - models[provider].model[modelClass].temperature, - }; - //generate proof - const attestation = await generateProof(endpoint,"POST",headers,JSON.stringify(body),responseParsePath); - elizaLogger.log(`model attestation:`, attestation); - - const responseData = JSON.parse(attestation.data); - let text = JSON.parse(responseData.content); - return { - text, - proof: attestation, - provider: VerifiableInferenceProvider.PRIMUS, - timestamp: Date.now(), - }; - } catch (error) { - console.error("Error in Primus generateText:", error); - throw error; - } - } - //verify the proof - async verifyProof(result: VerifiableInferenceResult): Promise { - const isValid = verifyProof(result.proof) - elizaLogger.log("Proof is valid:", isValid); - return isValid; - } -} -``` -You can see full code at [primusAdapter.ts](./src/adapter/primusAdapter.ts) +### Providers -### Provider -Developers can use the zktls module provided by Primus to attest providers. Providers are core modules responsible for injecting dynamic context and real-time information into agent interactions. Therefore, it is crucial for agents to validate that the information received from providers is authentic. +Developers can use the zktls module provided by Primus to attest providers. Providers are core modules responsible for +injecting dynamic context and real-time information into agent interactions. Therefore, it is crucial for agents to +validate that the information received from providers is authentic. Below is an example demonstrating how to verify that the BTC price from Binance is valid: + ```typescript const tokenPriceProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { - //get btc price + // get btc price const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"; const method = 'GET'; const headers = { 'Accept ': '*/*', }; - //generate proof + // generate proof const attestation = await generateProof(url, method, headers, "", "$.price"); - //you can verify the proof is valid + // you can verify the proof is valid const valid = await verifyProof(attestation); - if(!valid){ + if (!valid) { throw new Error("Invalid price attestation"); } - elizaLogger.info('price attestation:',attestation); - const responseData = JSON.parse((attestation as any).data); - const price = responseData.content; - return ` - Get BTC price from Binance: - BTC: ${price} USDT - Time: ${new Date().toUTCString()} - POST by eliza #zilia - Attested by Primus #primus #zktls - ` + ...... }, }; ``` + You can see more examples at [providers](./src/providers/tokenPriceProvider.ts) -### actions -Primus ensures the reliability of both the provider's data source and the operations performed by actions. Below is an example demonstrating how to post price information from the [tokenPriceProvider](./src/providers/tokenPriceProvider.ts) to Twitter: +### Actions + +Primus ensures the reliability of both the provider's data source and the operations performed by actions. Below is an +example demonstrating how to post price information from the [tokenPriceProvider](./src/providers/tokenPriceProvider.ts) +to Twitter: + ```typescript -const contentYouWantToPost = await tokenPriceProvider.get(runtime, message, state); -//other code is hidden -try { - //login - const scraperWithPrimus = new TwitterScraper(); - await scraperWithPrimus.login(); - if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { - elizaLogger.error("Failed to login to Twitter"); - return false; - } - // post the tweet - elizaLogger.log("Attempting to send tweet:", contentYouWantToPost); + +export const postTweetAction: Action = { + description: "", + examples: [], + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ): Promise => { + const contentYouWantToPost = await tokenPriceProvider.get(runtime, message, state); const endpoint = 'https://twitter.com/i/api/graphql/a1p9RWpkYKBjWv_I3WzS-A/CreateTweet'; const method = 'POST'; - //generate proof const attestation = await generateProof(endpoint,method,headers,bodyStr,"$.data.create_tweet.tweet_results.result.rest_id"); - elizaLogger.info( - "Tweet posting proof generated successfully:", - attestation + "Tweet posting proof generated successfully:", + attestation ); - const verifyResult = verifyProof(attestation); if (!verifyResult) { - throw new Error( - "Verify attestation failed, data from source is illegality" - ); + throw new Error( + "Attestation verify failed, data from source is illegality" + ); } - return true; -} catch (error) { - elizaLogger.error("Error in post action:", error); - return false; -} + + }, + name: "", + similes: [], + validate: async ( + runtime: IAgentRuntime, + message: Memory, + state?: State + ) => {}, +}; ``` + For more details, refer to [postTweetAction.ts](./src/actions/postTweetAction.ts) ## Installation @@ -244,6 +182,7 @@ pnpm add @elizaos/plugin-primus ``` ## Configuration + Add the following environment variables to your .env file: ``` @@ -272,16 +211,18 @@ TWITTER_DRY_RUN=false# Optional: test without posting ## Usage -To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: +To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your character file. Here's an example of how +your character file might look after the update: ```json { "name": "trump", - "modelProvider": "openai",//just support openai now + "modelProvider": "openai", + // just support openai now "plugins": [ "@elizaos/plugin-primus" ], - //other fields + // other fields ..... } ``` diff --git a/packages/plugin-primus/src/actions/postTweetAction.ts b/packages/plugin-primus/src/actions/postTweetAction.ts index 0884e044eb..a186eda4c6 100644 --- a/packages/plugin-primus/src/actions/postTweetAction.ts +++ b/packages/plugin-primus/src/actions/postTweetAction.ts @@ -5,8 +5,7 @@ import { Memory, State, } from "@elizaos/core"; -import { TwitterScraper } from "../util/TwitterScraper.ts"; -import { tweetProvider } from "../providers/tweetProvider.ts"; +import { TwitterScraper } from "../util/twitterScraper.ts"; import {tokenPriceProvider} from "../providers/tokenPriceProvider.ts"; export const postTweetAction: Action = { diff --git a/packages/plugin-primus/src/adapter/primusAdapter.ts b/packages/plugin-primus/src/adapter/primusAdapter.ts index 053c073d5b..6c54ffbc2d 100644 --- a/packages/plugin-primus/src/adapter/primusAdapter.ts +++ b/packages/plugin-primus/src/adapter/primusAdapter.ts @@ -13,6 +13,7 @@ import {generateProof, verifyProof} from "../util/primusUtil.ts"; interface PrimusOptions { appId: string; appSecret: string; + attMode: string; modelProvider?: ModelProviderName; token?: string; } From 14fe671b5eb57123951022d4c0391c0c61f86434 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Fri, 10 Jan 2025 01:07:23 +0800 Subject: [PATCH 17/24] update import --- packages/plugin-primus/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 4793e5a9ed..8b9d13b1c0 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -1,6 +1,6 @@ import { Plugin } from "@elizaos/core"; import { postTweetAction } from "./actions/postTweetAction.ts"; -import {PrimusAdapter} from "./adapter/PrimusAdapter.ts"; +import {PrimusAdapter} from "./adapter/primusAdapter.ts"; export const twitterPlugin: Plugin = { name: "twitter", From ff931a92fce9f96bfaef66e09502cc4fd03e7ada Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Fri, 10 Jan 2025 01:10:01 +0800 Subject: [PATCH 18/24] update import --- packages/plugin-primus/src/providers/tweetProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-primus/src/providers/tweetProvider.ts b/packages/plugin-primus/src/providers/tweetProvider.ts index 74c3672de0..3efe12c4a2 100644 --- a/packages/plugin-primus/src/providers/tweetProvider.ts +++ b/packages/plugin-primus/src/providers/tweetProvider.ts @@ -1,5 +1,5 @@ import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; -import {TwitterScraper} from "../util/TwitterScraper.ts"; +import {TwitterScraper} from "../util/twitterScraper.ts"; const tweetProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { From 730b929b6a71aa8b9e993665f12b3a01d2841d46 Mon Sep 17 00:00:00 2001 From: Xiang Xie Date: Fri, 10 Jan 2025 01:36:15 +0800 Subject: [PATCH 19/24] refine readme --- packages/plugin-primus/README.md | 84 ++++++++------------------------ 1 file changed, 20 insertions(+), 64 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 14d282f18a..3edac47370 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -5,8 +5,6 @@ powered by Primus' zkTLS protocol. ## Overview -Here's a refined version of your text: - In the Eliza framework, an agent consists of three key components: a brain (accessing an LLM), actions (the tasks the agent performs), and perception (gathering external information from providers). To fully verify agent activities, it's essential to ensure that the agent's thoughts, actions, and external information requests are all verifiable. This @@ -19,8 +17,9 @@ The current plugin includes: - An example to verify that the Bitcoin price is accurately fetched from Binance (this can be extended to any other data providers). -## Primus Adapter -### LLM inference Usage (PrimusAdapter) +## Usage +### LLM inference verification (PrimusAdapter) +`PrimusAdapter` implements `IVerifiableInferenceAdapter` and can be used as follows. ```typescript import {PrimusAdapter} from "@elizaos/plugin-primus"; import {VerifiableInferenceOptions} from '@elizaos/core'; @@ -29,6 +28,7 @@ import {VerifiableInferenceOptions} from '@elizaos/core'; const primusAdatper = new PrimusAdapter({ appId: process.env.PRIMUS_APP_ID, appSecret: process.env.PRIMUS_APP_SECRET, + // Choose MPC-TLS or Proxy-TLS attMode: "proxytls", modelProvider: character.modelProvider, token, @@ -63,14 +63,9 @@ const result = await primusAdapter.generateText(context, "gpt-4o", options); const isValid = await primusAdapter.verifyProof(result.proof); ``` -This plugin offers the following features: - -- Generate an attestation for a network request. -- Verify the validity of the attestation. - -You can find detail code at [primusUtil.ts](./src/util/primusUtil.ts) -#### generateProof +The core functions in `PrimusAdatper` are the following, which are also used in Actions and Providers. ```typescript +// Generate a zkTLS proof. generateProof = async ( // The target endpoint of the network request. endpoint: string, @@ -83,43 +78,28 @@ generateProof = async ( //A [JSONPath](https://datatracker.ietf.org/doc/rfc9535/) expression to locate the specific field in the response you want to attest. responseParsePath: string ): Promise -``` -***returns*** -When a successful data verification process is completed, you will receive a standard [attestation](https://docs.primuslabs.xyz/data-verification/zk-tls-sdk/production#understanding-the-data-verification-structure) - -#### verifyProof -Verify the attestation is valid. +// Verify the proof. +verifyProof = async (attestation: any): Promise -```typescript - // The attestation is generated during a network request. - // Returns true: The attestation is valid. false : The attestation is invalid. - verifyProof = async (attestation: any): Promise ``` -***Below are examples illustrating how to use these functions.*** - - -### Providers -Developers can use the zktls module provided by Primus to attest providers. Providers are core modules responsible for -injecting dynamic context and real-time information into agent interactions. Therefore, it is crucial for agents to -validate that the information received from providers is authentic. +### Verify the interaction with Providers -Below is an example demonstrating how to verify that the BTC price from Binance is valid: +Here’s an example showcasing how to verify the validity of the BTC price retrieved from Binance. Developers can easily customize this process for other providers. ```typescript - const tokenPriceProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { - // get btc price + // Set the URL const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"; const method = 'GET'; const headers = { 'Accept ': '*/*', }; - // generate proof + // Generate the proof const attestation = await generateProof(url, method, headers, "", "$.price"); - // you can verify the proof is valid + // Verify the proof. const valid = await verifyProof(attestation); if (!valid) { throw new Error("Invalid price attestation"); @@ -129,16 +109,11 @@ const tokenPriceProvider: Provider = { }; ``` -You can see more examples at [providers](./src/providers/tokenPriceProvider.ts) - -### Actions - -Primus ensures the reliability of both the provider's data source and the operations performed by actions. Below is an -example demonstrating how to post price information from the [tokenPriceProvider](./src/providers/tokenPriceProvider.ts) -to Twitter: +### Verify the Actions +Below is an example showcasing how to post price information from the [tokenPriceProvider](./src/providers/tokenPriceProvider.ts) to Twitter. Developers can easily adapt this process for other providers. +Note that you need to configure the `.env` file correctly to post tweets. ```typescript - export const postTweetAction: Action = { description: "", examples: [], @@ -173,8 +148,6 @@ export const postTweetAction: Action = { }; ``` -For more details, refer to [postTweetAction.ts](./src/actions/postTweetAction.ts) - ## Installation ```bash @@ -188,31 +161,17 @@ Add the following environment variables to your .env file: ``` PRIMUS_APP_ID=your_app_id PRIMUS_APP_SECRET=your_app_secret -VERIFIABLE_INFERENCE_ENABLED=true +VERIFIABLE_INFERENCE_ENABLED=true VERIFIABLE_INFERENCE_PROVIDER=primus ``` ***How to get PRIMUS_APP_ID and PRIMUS_APP_SECRET*** -1. Visit https://dev.primuslabs.xyz/ +1. Visit the [Primus Developer Hub](https://dev.primuslabs.xyz/). 2. Create a new project 3. Save your 'Application ID(PRIMUS_APP_ID)' and 'Secret Key(PRIMUS_APP_SECRET)' -If you want to run [postTweetAction](./src/actions/postTweetAction.ts), please add these variables to your `.env` file: - -```dotenv -TWITTER_USERNAME=your_username -TWITTER_PASSWORD=your_password -TWITTER_EMAIL=your_email# Recommand: for 2FA -TWITTER_2FA_SECRET=your_2fa_secret# Optional: for 2FA -TWITTER_PREMIUM=false# Optional: enables premium features -TWITTER_DRY_RUN=false# Optional: test without posting -``` - -## Usage - -To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your character file. Here's an example of how -your character file might look after the update: +To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your character file. Here's an example of how your character file might look after the update: ```json { @@ -233,8 +192,5 @@ your character file might look after the update: # Run with your character file pnpm start --characters="characters/xxx.character.json" ``` - -## Chat with Your Agent - -[Here are examples show how to chat with agent](./src/actions/postTweetAction.ts). +You can ask the agent: "Get the BTC price and tweet." From b6818ec6c9723b4b539af8c079cbdc120aff7883 Mon Sep 17 00:00:00 2001 From: Xiang Xie Date: Fri, 10 Jan 2025 10:35:06 +0800 Subject: [PATCH 20/24] chore: refine readme --- packages/plugin-primus/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index 3edac47370..dfbe810ddf 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -189,8 +189,14 @@ To use the plugin, add `@elizaos/plugin-primus` to the plugins field in your cha ## Run ```bash -# Run with your character file +# Start the server pnpm start --characters="characters/xxx.character.json" ``` + +```bash +# Start the client +pnpm start:client +``` + You can ask the agent: "Get the BTC price and tweet." From d90f83827240bcf2846e8f0203801c5423feca26 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Sat, 11 Jan 2025 21:58:45 +0800 Subject: [PATCH 21/24] resolve conversions problems --- packages/plugin-primus/README.md | 12 ++++++--- .../src/providers/tokenPriceProvider.ts | 25 +++++++++++------- .../src/providers/tweetProvider.ts | 26 +++++++++++++------ packages/plugin-primus/src/templates.ts | 7 +++-- packages/plugin-primus/src/util/primusUtil.ts | 6 ++--- 5 files changed, 50 insertions(+), 26 deletions(-) diff --git a/packages/plugin-primus/README.md b/packages/plugin-primus/README.md index dfbe810ddf..fa570a11ee 100644 --- a/packages/plugin-primus/README.md +++ b/packages/plugin-primus/README.md @@ -115,7 +115,7 @@ Below is an example showcasing how to post price information from the [tokenPric Note that you need to configure the `.env` file correctly to post tweets. ```typescript export const postTweetAction: Action = { - description: "", + description: "Post a tweet on Twitter and be verified by Primus", examples: [], handler: async ( runtime: IAgentRuntime, @@ -138,13 +138,19 @@ export const postTweetAction: Action = { } }, - name: "", + name: "POST_TWEET", similes: [], validate: async ( runtime: IAgentRuntime, message: Memory, state?: State - ) => {}, + ) => { + const hasCredentials = + !!process.env.TWITTER_USERNAME && !!process.env.TWITTER_PASSWORD; + elizaLogger.log(`Has credentials: ${hasCredentials}`); + + return hasCredentials; + }, }; ``` diff --git a/packages/plugin-primus/src/providers/tokenPriceProvider.ts b/packages/plugin-primus/src/providers/tokenPriceProvider.ts index 7a7c8d3faa..0dedddbc47 100644 --- a/packages/plugin-primus/src/providers/tokenPriceProvider.ts +++ b/packages/plugin-primus/src/providers/tokenPriceProvider.ts @@ -4,7 +4,7 @@ import {generateProof, verifyProof} from "../util/primusUtil.ts"; const tokenPriceProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { //get btc price - const url = "https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT"; + const url = `${process.env.BINANCE_API_URL||'https://api.binance.com'}/api/v3/ticker/price?symbol=${process.env.BINANCE_SYMBOL || 'BTCUSDT'}`; const method = 'GET'; const headers = { 'Accept ': '*/*', @@ -15,15 +15,20 @@ const tokenPriceProvider: Provider = { throw new Error("Invalid price attestation"); } elizaLogger.info('price attestation:',attestation); - const responseData = JSON.parse((attestation as any).data); - const price = responseData.content; - return ` - Get BTC price from Binance: - BTC: ${price} USDT - Time: ${new Date().toUTCString()} - POST by eliza #zilia - Attested by Primus #primus #zktls - ` + try{ + const responseData = JSON.parse((attestation as any).data); + const price = responseData.content; + return ` + Get BTC price from Binance: + BTC: ${price} USDT + Time: ${new Date().toUTCString()} + POST by eliza #eliza + Attested by Primus #primus #zktls + ` + }catch (error){ + elizaLogger.error('Failed to parse price data:', error); + throw new Error('Failed to parse price data'); + } }, }; diff --git a/packages/plugin-primus/src/providers/tweetProvider.ts b/packages/plugin-primus/src/providers/tweetProvider.ts index 3efe12c4a2..299ac89be5 100644 --- a/packages/plugin-primus/src/providers/tweetProvider.ts +++ b/packages/plugin-primus/src/providers/tweetProvider.ts @@ -4,9 +4,14 @@ import {TwitterScraper} from "../util/twitterScraper.ts"; const tweetProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, _state?: State) => { const scraperWithPrimus = new TwitterScraper(); - elizaLogger.info("Login to Twitter"); - await scraperWithPrimus.login(); - elizaLogger.info("Login to Twitter success"); + try { + elizaLogger.info("Attempting Twitter login"); + await scraperWithPrimus.login(); + elizaLogger.info("Twitter login successful"); + }catch (error){ + elizaLogger.error("Twitter login failed:", error); + return false; + } if (!(await scraperWithPrimus.getScraper().isLoggedIn())) { elizaLogger.error("Failed to login to Twitter"); @@ -17,12 +22,17 @@ const tweetProvider: Provider = { elizaLogger.error("TWITTER_USERNAME_WANT_TO_GET_TWEET is not set"); return false; } + elizaLogger.debug(`Fetching tweets for user: ${userName}`); const userId = await scraperWithPrimus.getUserIdByScreenName(userName); - elizaLogger.log(`userName is:${userName}, userId:${userId}`); - const result = await scraperWithPrimus.getUserLatestTweet(userId); - //log - elizaLogger.log("Tweet response:", result); - return result; + elizaLogger.debug(`Fetching tweets for user: ${userName}`); + try { + const result = await scraperWithPrimus.getUserLatestTweet(userId); + elizaLogger.debug("Tweet retrieved successfully"); + return result; + } catch (error) { + elizaLogger.error("Failed to fetch tweet:", error); + return false; + } }, }; diff --git a/packages/plugin-primus/src/templates.ts b/packages/plugin-primus/src/templates.ts index 9c77cbe830..5746acaeb2 100644 --- a/packages/plugin-primus/src/templates.ts +++ b/packages/plugin-primus/src/templates.ts @@ -1,4 +1,7 @@ export const summarizeTweetTemplate = (twitterContent:string) => { + if (!twitterContent?.trim()) { + throw new Error('Twitter content cannot be empty'); + } return ` # Context ${twitterContent} @@ -7,12 +10,12 @@ export const summarizeTweetTemplate = (twitterContent:string) => { Generate a tweet that: 1. Summarize the input 2. The content does not contain emoji - 3. Must be less than 200 characters (this is a strict requirement) + 3. Must be less than 280 characters (Twitter's limit) 4. The key information should be retained 5. Is concise and engaging Generate only the tweet text, no other commentary. Response format should be formatted in a JSON block like this: - {"text": "string"} + {"text": "string", "characterCount": number} `; }; diff --git a/packages/plugin-primus/src/util/primusUtil.ts b/packages/plugin-primus/src/util/primusUtil.ts index 5c490c7c03..30ccfce7a2 100644 --- a/packages/plugin-primus/src/util/primusUtil.ts +++ b/packages/plugin-primus/src/util/primusUtil.ts @@ -1,4 +1,4 @@ -import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; +import { PrimusCoreTLS,Attestation } from "@primuslabs/zktls-core-sdk"; export const generateProof = async ( endpoint: string, @@ -6,7 +6,7 @@ export const generateProof = async ( headers: Record, body: string, responseParsePath: string -): Promise => { +): Promise => { const zkTLS = new PrimusCoreTLS(); await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); const requestParam = body @@ -35,7 +35,7 @@ export const generateProof = async ( return await zkTLS.startAttestation(attestationParams); }; -export const verifyProof = async (attestation: any): Promise => { +export const verifyProof = async (attestation: Attestation): Promise => { const zkTLS = new PrimusCoreTLS(); await zkTLS.init(process.env.PRIMUS_APP_ID, process.env.PRIMUS_APP_SECRET); return zkTLS.verifyAttestation(attestation); From c3b44e94dd412f94aa15584c89a0c6102c9b18c5 Mon Sep 17 00:00:00 2001 From: AnonJon Date: Sat, 11 Jan 2025 10:30:13 -0600 Subject: [PATCH 22/24] add github to client enumerations --- packages/core/src/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 556746ed62..9690c1a0d4 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -647,6 +647,7 @@ export enum Clients { LENS = "lens", AUTO = "auto", SLACK = "slack", + GITHUB = "github", } export interface IAgentConfig { From 94127a0af22077b4675b30cebd4d99f2f3410290 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Sat, 11 Jan 2025 14:12:54 -0500 Subject: [PATCH 23/24] fix join voice channel --- .../client-discord/src/actions/joinvoice.ts | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/packages/client-discord/src/actions/joinvoice.ts b/packages/client-discord/src/actions/joinvoice.ts index dbfa556482..8e4813e948 100644 --- a/packages/client-discord/src/actions/joinvoice.ts +++ b/packages/client-discord/src/actions/joinvoice.ts @@ -17,6 +17,7 @@ import { Guild, GuildMember, } from "discord.js"; +import { joinVoiceChannel } from "@discordjs/voice"; export default { name: "JOIN_VOICE", @@ -66,12 +67,7 @@ export default { return false; } - const client = state.discordClient as Client; - - // Check if the client is connected to any voice channel - const isConnectedToVoice = client.voice.adapters.size === 0; - - return isConnectedToVoice; + return true; }, description: "Join a voice channel to participate in voice chat.", handler: async ( @@ -115,15 +111,8 @@ export default { ); }); - if (!state.voiceManager) { - state.voiceManager = new VoiceManager({ - client: state.discordClient, - runtime: runtime, - }); - } - if (targetChannel) { - state.voiceManager.joinVoiceChannel({ + joinVoiceChannel({ channelId: targetChannel.id, guildId: (discordMessage as DiscordMessage).guild?.id as string, adapterCreator: (client.guilds.cache.get(id) as Guild) @@ -134,7 +123,7 @@ export default { const member = (discordMessage as DiscordMessage) .member as GuildMember; if (member?.voice?.channel) { - state.voiceManager.joinVoiceChannel({ + joinVoiceChannel({ channelId: member.voice.channel.id, guildId: (discordMessage as DiscordMessage).guild ?.id as string, @@ -204,7 +193,7 @@ You should only respond with the name of the voice channel or none, no commentar }); if (targetChannel) { - state.voiceManager.joinVoiceChannel({ + joinVoiceChannel({ channelId: targetChannel.id, guildId: (discordMessage as DiscordMessage).guild ?.id as string, From 4a267eb83075fcec726a49c2478c66d956f22d17 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Sat, 11 Jan 2025 15:30:29 -0500 Subject: [PATCH 24/24] add missing function and parameters --- packages/client-discord/src/actions/joinvoice.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/client-discord/src/actions/joinvoice.ts b/packages/client-discord/src/actions/joinvoice.ts index 8e4813e948..71c879712a 100644 --- a/packages/client-discord/src/actions/joinvoice.ts +++ b/packages/client-discord/src/actions/joinvoice.ts @@ -8,6 +8,8 @@ import { IAgentRuntime, Memory, State, + generateText, + ModelClass, } from "@elizaos/core"; import { Channel, @@ -117,6 +119,9 @@ export default { guildId: (discordMessage as DiscordMessage).guild?.id as string, adapterCreator: (client.guilds.cache.get(id) as Guild) .voiceAdapterCreator, + selfDeaf: false, + selfMute: false, + group: client.user.id, }); return true; } else { @@ -129,6 +134,9 @@ export default { ?.id as string, adapterCreator: (client.guilds.cache.get(id) as Guild) .voiceAdapterCreator, + selfDeaf: false, + selfMute: false, + group: client.user.id, }); return true; } @@ -199,6 +207,9 @@ You should only respond with the name of the voice channel or none, no commentar ?.id as string, adapterCreator: (client.guilds.cache.get(id) as Guild) .voiceAdapterCreator, + selfDeaf: false, + selfMute: false, + group: client.user.id, }); return true; }