{"_id":"@akimaliiiev/plugin-offchain","name":"@akimaliiiev/plugin-offchain","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@akimaliiiev/plugin-offchain","description":"${PLUGINDESCRIPTION}","version":"1.0.0","type":"module","main":"dist/plugin.js","module":"dist/index.js","types":"dist/plugin.d.ts","packageType":"plugin","platform":"node","license":"UNLICENSED","author":{"name":"${GITHUB_USERNAME}"},"keywords":["plugin","elizaos"],"repository":{"type":"git","url":""},"homepage":"https://elizaos.ai","bugs":{"url":"https://github.com/${GITHUB_USERNAME}/${PLUGINNAME}/issues"},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"dependencies":{"@elizaos/core":"latest","@tanstack/react-query":"^5.80.7","clsx":"^2.1.1","openai":"^5.10.1","snoowrap":"^1.23.0","tailwind-merge":"^3.3.1","tailwindcss":"^4.1.10","zod":"3.24.2"},"devDependencies":{"@elizaos/cli":"latest","@tailwindcss/vite":"^4.1.10","@vitejs/plugin-react-swc":"^3.10.2","dotenv":"16.4.5","prettier":"3.5.3","tailwindcss-animate":"^1.0.7","typescript":"^5.8.3"},"scripts":{"start":"elizaos start","dev":"elizaos dev","build":"tsc","publish:npm":"npm publish --access public","lint":"prettier --write ./src","test:component":"bun run test:install && bun test","test:e2e":"bun run test:install && bun test","test:e2e:manual":"bun run test:install && node scripts/test-e2e-manual.js","test:cypress":"bun run test:install && cypress run --component","test":"bun run test:install && bun run test:component && bun run test:e2e","test:install":"node scripts/install-test-deps.js","format":"prettier --write ./src","format:check":"prettier --check ./src"},"publishConfig":{"access":"public"},"resolutions":{"zod":"3.24.2"},"agentConfig":{"pluginType":"elizaos:plugin:1.0.0","pluginParameters":{"API_KEY":{"type":"string","description":"API key for the service"}}},"gitHead":"d5bd5c43bfebeb7ac02f9e029f924cb6cd5c2ec7","_id":"@akimaliiiev/plugin-offchain@1.0.0","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-Yic9KICU4Rq8ZG+rzgF3ttLlyJU6GJv2OhofxFDPlm233hZy10nSHRs0e+9tQjE32EGY+4cU6WBJcnDeldI4oQ==","shasum":"7f3358b778b4eda84f43dabc2dea622f78da87f2","tarball":"https://registry.npmjs.org/@akimaliiiev/plugin-offchain/-/plugin-offchain-1.0.0.tgz","fileCount":45,"unpackedSize":350508,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZJQ6omGhwb5B7BWJbYbJGsH+mOADEc8yloCD+1AKncAIgBSWdD5UW8KeWQEG5ZyHC21tSkgUhpgTs80zVV9E8aXE="}]},"_npmUser":{"name":"akimaliiev","email":"sakimaliev1@gmail.com"},"directories":{},"maintainers":[{"name":"akimaliiev","email":"sakimaliev1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-offchain_1.0.0_1753034033023_0.9571801064000869"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-20T17:53:52.940Z","1.0.0":"2025-07-20T17:53:53.243Z","modified":"2025-07-20T17:53:53.509Z"},"maintainers":[{"name":"akimaliiev","email":"sakimaliev1@gmail.com"}],"description":"${PLUGINDESCRIPTION}","homepage":"https://elizaos.ai","keywords":["plugin","elizaos"],"repository":{"type":"git","url":""},"author":{"name":"${GITHUB_USERNAME}"},"bugs":{"url":"https://github.com/${GITHUB_USERNAME}/${PLUGINNAME}/issues"},"license":"UNLICENSED","readme":"# ElizaOS Plugin\n\nThis is an ElizaOS plugin built with the official plugin starter template.\n\n## Getting Started\n\n```bash\n# Create a new plugin (automatically adds \"plugin-\" prefix)\nelizaos create -t plugin solana\n# This creates: plugin-solana\n# Dependencies are automatically installed and built\n\n# Navigate to the plugin directory\ncd plugin-solana\n\n# Start development immediately\nelizaos dev\n```\n\n## Development\n\n```bash\n# Start development with hot-reloading (recommended)\nelizaos dev\n\n# OR start without hot-reloading\nelizaos start\n# Note: When using 'start', you need to rebuild after changes:\n# bun run build\n\n# Test the plugin\nelizaos test\n```\n\n## Testing\n\nElizaOS provides a comprehensive testing structure for plugins:\n\n### Test Structure\n\n- **Component Tests** (`__tests__/` directory):\n\n  - **Unit Tests**: Test individual functions/classes in isolation\n  - **Integration Tests**: Test how components work together\n  - Run with: `elizaos test component`\n\n- **End-to-End Tests** (`__tests__/e2e/` directory):\n\n  - Test the plugin within a full ElizaOS runtime\n  - Validate complete user scenarios with a real agent\n  - Run with: `elizaos test e2e`\n\n- **Running All Tests**:\n  - `elizaos test` runs both component and e2e tests\n\n### Writing Tests\n\nComponent tests use Vitest:\n\n```typescript\n// Unit test example (__tests__/plugin.test.ts)\ndescribe('Plugin Configuration', () => {\n  it('should have correct plugin metadata', () => {\n    expect(starterPlugin.name).toBe('plugin-offchain');\n  });\n});\n\n// Integration test example (__tests__/integration.test.ts)\ndescribe('Integration: HelloWorld Action with StarterService', () => {\n  it('should handle HelloWorld action with StarterService', async () => {\n    // Test interactions between components\n  });\n});\n```\n\nE2E tests run in a real ElizaOS runtime:\n\n```typescript\n// E2E test example (__tests__/e2e/starter-plugin.ts)\nexport const StarterPluginTestSuite: TestSuite = {\n  name: 'plugin_starter_test_suite',\n  description: 'E2E tests for the starter plugin',\n  tests: [\n    {\n      name: 'hello_world_action_test',\n      fn: async (runtime) => {\n        // Simulate user asking agent to say hello\n        const testMessage = {\n          content: { text: 'Can you say hello?' }\n        };\n\n        // Execute action and capture response\n        const response = await helloWorldAction.handler(runtime, testMessage, ...);\n\n        // Verify agent responds with \"hello world\"\n        if (!response.text.includes('hello world')) {\n          throw new Error('Expected \"hello world\" in response');\n        }\n      },\n    },\n  ],\n};\n```\n\n#### Key E2E Testing Features:\n\n- **Real Runtime Environment**: Tests run with a fully initialized ElizaOS runtime\n- **Plugin Interaction**: Test how your plugin behaves with the actual agent\n- **Scenario Testing**: Validate complete user interactions, not just individual functions\n- **No Mock Required**: Access real services, actions, and providers\n\n#### Writing New E2E Tests:\n\n1. Add a new test object to the `tests` array in your test suite\n2. Each test receives the runtime instance as a parameter\n3. Throw errors to indicate test failures (no assertion library needed)\n4. See the comprehensive documentation in `__tests__/e2e/starter-plugin.ts` for detailed examples\n\nThe test utilities in `__tests__/test-utils.ts` provide mock objects and setup functions to simplify writing component tests.\n\n## Publishing & Continuous Development\n\n### Initial Setup\n\nBefore publishing your plugin, ensure you meet these requirements:\n\n1. **npm Authentication**\n\n   ```bash\n   npm login\n   ```\n\n2. **GitHub Repository**\n\n   - Create a public GitHub repository for this plugin\n   - Add the 'elizaos-plugins' topic to the repository\n   - Use 'main' as the default branch\n\n3. **Required Assets**\n   - Add images to the `images/` directory:\n     - `logo.jpg` (400x400px square, <500KB)\n     - `banner.jpg` (1280x640px, <1MB)\n\n### Initial Publishing\n\n```bash\n# Test your plugin meets all requirements\nelizaos publish --test\n\n# Publish to npm + GitHub + registry (recommended)\nelizaos publish\n```\n\nThis command will:\n\n- Publish your plugin to npm for easy installation\n- Create/update your GitHub repository\n- Submit your plugin to the ElizaOS registry for discoverability\n\n### Continuous Development & Updates\n\n**Important**: After your initial publish with `elizaos publish`, all future updates should be done using standard npm and git workflows, not the ElizaOS CLI.\n\n#### Standard Update Workflow\n\n1. **Make Changes**\n\n   ```bash\n   # Edit your plugin code\n   elizaos dev  # Test locally with hot-reload\n   ```\n\n2. **Test Your Changes**\n\n   ```bash\n   # Run all tests\n   elizaos test\n\n   # Run specific test types if needed\n   elizaos test component  # Component tests only\n   elizaos test e2e       # E2E tests only\n   ```\n\n3. **Update Version**\n\n   ```bash\n   # Patch version (bug fixes): 1.0.0 → 1.0.1\n   npm version patch\n\n   # Minor version (new features): 1.0.1 → 1.1.0\n   npm version minor\n\n   # Major version (breaking changes): 1.1.0 → 2.0.0\n   npm version major\n   ```\n\n4. **Publish to npm**\n\n   ```bash\n   npm publish\n   ```\n\n5. **Push to GitHub**\n   ```bash\n   git push origin main\n   git push --tags  # Push version tags\n   ```\n\n#### Why Use Standard Workflows?\n\n- **npm publish**: Directly updates your package on npm registry\n- **git push**: Updates your GitHub repository with latest code\n- **Automatic registry updates**: The ElizaOS registry automatically syncs with npm, so no manual registry updates needed\n- **Standard tooling**: Uses familiar npm/git commands that work with all development tools\n\n### Alternative Publishing Options (Initial Only)\n\n```bash\n# Publish to npm only (skip GitHub and registry)\nelizaos publish --npm\n\n# Publish but skip registry submission\nelizaos publish --skip-registry\n\n# Generate registry files locally without publishing\nelizaos publish --dry-run\n```\n\n## Configuration\n\nThe `agentConfig` section in `package.json` defines the parameters your plugin requires:\n\n```json\n\"agentConfig\": {\n  \"pluginType\": \"elizaos:plugin:1.0.0\",\n  \"pluginParameters\": {\n    \"API_KEY\": {\n      \"type\": \"string\",\n      \"description\": \"API key for the service\"\n    }\n  }\n}\n```\n\nCustomize this section to match your plugin's requirements.\n\n## Documentation\n\nProvide clear documentation about:\n\n- What your plugin does\n- How to use it\n- Required API keys or credentials\n- Example usage\n- Version history and changelog\n","readmeFilename":"README.md","_rev":"1-eb6ad71bf1390edaeda91b3208415b32"}