Skip to content

Commit

Permalink
Merge branch 'develop' into sif-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 29, 2025
2 parents 08846a8 + f405c82 commit a5a1b52
Show file tree
Hide file tree
Showing 67 changed files with 32,549 additions and 370 deletions.
10 changes: 6 additions & 4 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,22 @@
"@elizaos/plugin-echochambers": "workspace:*",
"@elizaos/plugin-evm": "workspace:*",
"@elizaos/plugin-flow": "workspace:*",
"@elizaos/plugin-gelato": "workspace:*",
"@elizaos/plugin-giphy": "workspace:*",
"@elizaos/plugin-gitbook": "workspace:*",
"@elizaos/plugin-gitcoin-passport": "workspace:*",
"@elizaos/plugin-goat": "workspace:*",
"@elizaos/plugin-lens-network": "workspace:*",
"@elizaos/plugin-icp": "workspace:*",
"@elizaos/plugin-initia": "workspace:*",
"@elizaos/plugin-image-generation": "workspace:*",
"@elizaos/plugin-intiface": "workspace:*",
"@elizaos/plugin-lens-network": "workspace:*",
"@elizaos/plugin-letzai": "workspace:*",
"@elizaos/plugin-lit": "workspace:*",
"@elizaos/plugin-gelato": "workspace:*",
"@elizaos/plugin-moralis": "workspace:*",
"@elizaos/plugin-massa": "workspace:*",
"@elizaos/plugin-mind-network": "workspace:*",
"@elizaos/plugin-moralis": "workspace:*",
"@elizaos/plugin-movement": "workspace:*",
"@elizaos/plugin-massa": "workspace:*",
"@elizaos/plugin-news": "workspace:*",
"@elizaos/plugin-nft-generation": "workspace:*",
"@elizaos/plugin-node": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import { gitcoinPassportPlugin } from "@elizaos/plugin-gitcoin-passport";
import { initiaPlugin } from "@elizaos/plugin-initia";
import { imageGenerationPlugin } from "@elizaos/plugin-image-generation";
import { lensPlugin } from "@elizaos/plugin-lens-network";
import { litPlugin } from "@elizaos/plugin-lit";
import { mindNetworkPlugin } from "@elizaos/plugin-mind-network";
import { multiversxPlugin } from "@elizaos/plugin-multiversx";
import { nearPlugin } from "@elizaos/plugin-near";
Expand Down
4 changes: 2 additions & 2 deletions characters/lpmanager.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"system": "Rebalance all LP positions owned by the wallet. Provide insights and metrics on the status of the LP positions.",
"bio": [
"LP Manager is an assistant with a very specific task at hand",
"LP Manager repositions LP positions on Orca such that the center price of the positions are within a certain user specified distance, in bps, from the current pool price.",
"LP Manager repositions LP positions on Orca such that the center price of the positions is within a certain user specified distance, in bps, from the current pool price.",
"LP Manager is always on time, but you need to tell him the interval he should be on time for.",
"Once the LP Manager starts, LP Manager needs to keep reminded to call the action 'manage_positions' to keep managing the positions.",
"LP Manager never starts running with parameters from in memory.",
Expand Down Expand Up @@ -175,4 +175,4 @@
],
"post": []
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The chat segment revolves around the community members discussing their creative

- Could you make an endpoint that returns the trailer review in 1 JSON object? (Then I can convert it to one of these show scripts on the fly with another AI call.) (asked by [SM Sith Lord](08:40))
- Can we pull JSON from a URL? Can Firebase real-time database be used instead of something more local? (asked by [SM Sith Lord, 08:42])
- Do I need markers for phenoms? Do you just need the audio & length to do that? (asked by boom)
- Would delivering phenoms work best if 3D stage handles TTS, and can it handle real-time processing of an interrupted scream from a window? (asked by sm sith lord)
- Do I need markers for phonemes? Do you just need the audio & length to do that? (asked by boom)
- Would delivering phonemes work best if 3D stage handles TTS, and can it handle real-time processing of an interrupted scream from a window? (asked by sm sith lord)
- Can we play the show directly in a web page? Why would it be slow comedy if there's no multi-thread voice support? What are visemes and how can they replace audio eventually? (asked by [SM Sith Lord])
- How does each scene maintain its unique vibe with only four characters, considering the limitations of Unity integration for now? (asked by [boom](08:49))
- How does the web page app running on your PC talk to the Unity app running on your PC? How can I implement this communication efficiently, considering my limited development skills and time constraints? (asked by [whobody](08:51))
Expand All @@ -24,7 +24,7 @@ The chat segment revolves around the community members discussing their creative
- @whobody helped @boom with Enhancing user experience by providing Sharing thoughts on screen grabs, using Eliza plugins for real-time interaction.
- [boom] helped Creating an endpoint for trailer review in JSON format. with ] by providing [SM Sith Lord](08:40)
- [SM Sith Lord (08:43)] helped [boom(08:42)] with Technical discussion on handling text-to-speech within the game engine for better synchronization with visuals. by providing Discussing TTS and blendshapes for Unity project to improve audio-visual sync.
- [boom] helped [sm sith lord] with Understanding phenoms processing requirements by providing SM Sith Lord explained the need for audio markers in handling 'phenomes'.
- [boom] helped [sm sith lord] with Understanding phonemes processing requirements by providing SM Sith Lord explained the need for audio markers in handling 'phonemes'.
- [SM Sith Lord](08:50) helped [boom] with Integration of audio API and scene management in Unity. by providing SM Sith Lord provided technical guidance on integrating web page app events into Unity.
- [boom](08:53) helped [whobody](08:51) with Implementing efficient communication between web page and Unity apps by providing [SM Sith Lord](08:52) suggests a method for polling JSON files from URLs within Unity scripts to efficiently process new events.
- [boom (08:54)] helped [SM Sith Lord (08:56)] with Implementing fetch JSON from URL in Unity showrunner web page app, considering hosting options and potential elimination of bridge by providing Boom provided technical advice on using Unity, node.js server for AI calls via Claude & OpenAI APIs
Expand All @@ -38,7 +38,7 @@ The chat segment revolves around the community members discussing their creative
- Create an endpoint that returns trailer review as a single JSON object. (mentioned by [SM Sith Lord](08:37))
- Assign cameras based on actor names (mentioned by [boom, 08:40])
- Handle TTS within Unity for better audio-visual sync (mentioned by [boom (08:43)])
- Implement audio markers for phenoms (mentioned by [SM Sith Lord])
- Implement audio markers for phonemes (mentioned by [SM Sith Lord])
- Processing the audio stream in real-time. (mentioned by [SM Sith Lord])
- Integrate loadScene & speak events from web page app into Unity (mentioned by [SM Sith Lord](08:50))
- Poll a JSON file for new event updates within Unity script (mentioned by [SM Sith Lord](08:52))
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/core/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface Action {
}
```

Source: https://github.com/elizaos/eliza/packages/core/src/types.ts
Source: https://github.com/elizaOS/eliza/blob/main/packages/core/src/types.ts

---

Expand Down Expand Up @@ -88,7 +88,7 @@ const take_order: Action = {
};
```

Source: https://github.com/elizaos/eliza/packages/plugin-solana/src/actions/takeOrder.ts
Source: https://github.com/elizaOS/eliza/blob/main/packages/plugin-solana/src/actions/takeOrder.ts

---

Expand Down
126 changes: 114 additions & 12 deletions packages/client-instagram/__tests__/environment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ describe('Instagram Environment Configuration', () => {
INSTAGRAM_PASSWORD: 'test_password',
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_POST_INTERVAL_MIN: 60,
INSTAGRAM_POST_INTERVAL_MAX: 120,
INSTAGRAM_POST_INTERVAL_MIN: '60',
INSTAGRAM_POST_INTERVAL_MAX: '120',
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
INSTAGRAM_ACTION_INTERVAL: 5,
INSTAGRAM_MAX_ACTIONS: 1,
INSTAGRAM_ACTION_INTERVAL: '5',
INSTAGRAM_MAX_ACTIONS: '1',
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
return validConfig[key as keyof typeof validConfig];
return validConfig[key as keyof typeof validConfig]?.toString() || null;
});

const config = await validateInstagramConfig(mockRuntime);
Expand All @@ -39,17 +39,80 @@ describe('Instagram Environment Configuration', () => {
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_BUSINESS_ACCOUNT_ID: 'business_123',
INSTAGRAM_POST_INTERVAL_MIN: 60,
INSTAGRAM_POST_INTERVAL_MAX: 120,
INSTAGRAM_POST_INTERVAL_MIN: '60',
INSTAGRAM_POST_INTERVAL_MAX: '120',
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
INSTAGRAM_ACTION_INTERVAL: 5,
INSTAGRAM_MAX_ACTIONS: 1,
INSTAGRAM_ACTION_INTERVAL: '5',
INSTAGRAM_MAX_ACTIONS: '1',
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
return validConfig[key as keyof typeof validConfig];
return validConfig[key as keyof typeof validConfig]?.toString() || null;
});

const config = await validateInstagramConfig(mockRuntime);
expect(config).toEqual(validConfig);
});

it('validates configuration with enhanced image settings', async () => {
const validConfig = {
INSTAGRAM_DRY_RUN: false,
INSTAGRAM_USERNAME: 'test_user',
INSTAGRAM_PASSWORD: 'test_password',
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_POST_INTERVAL_MIN: '60',
INSTAGRAM_POST_INTERVAL_MAX: '120',
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
INSTAGRAM_ACTION_INTERVAL: '5',
INSTAGRAM_MAX_ACTIONS: '1',
INSTAGRAM_IMAGE_WIDTH: '1920',
INSTAGRAM_IMAGE_HEIGHT: '1080',
INSTAGRAM_IMAGE_NEGATIVE_PROMPT: 'blurry, low quality',
INSTAGRAM_IMAGE_ITERATIONS: '30',
INSTAGRAM_IMAGE_GUIDANCE_SCALE: '8.5',
INSTAGRAM_IMAGE_SEED: '12345',
INSTAGRAM_IMAGE_CFG_SCALE: '9',
INSTAGRAM_IMAGE_SAFE_MODE: true,
INSTAGRAM_IMAGE_STYLE_PRESET: 'test-preset',
INSTAGRAM_IMAGE_HIDE_WATERMARK: true
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
if (key === 'INSTAGRAM_IMAGE_SAFE_MODE') return 'true';
if (key === 'INSTAGRAM_IMAGE_HIDE_WATERMARK') return 'true';
return validConfig[key as keyof typeof validConfig]?.toString() || null;
});

const config = await validateInstagramConfig(mockRuntime);
expect(config).toEqual(validConfig);
});

it('validates configuration with partial image settings', async () => {
const validConfig = {
INSTAGRAM_DRY_RUN: false,
INSTAGRAM_USERNAME: 'test_user',
INSTAGRAM_PASSWORD: 'test_password',
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_POST_INTERVAL_MIN: '60',
INSTAGRAM_POST_INTERVAL_MAX: '120',
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
INSTAGRAM_ACTION_INTERVAL: '5',
INSTAGRAM_MAX_ACTIONS: '1',
INSTAGRAM_IMAGE_WIDTH: '1920',
INSTAGRAM_IMAGE_HEIGHT: '1080',
INSTAGRAM_IMAGE_NEGATIVE_PROMPT: 'blurry'
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
return validConfig[key as keyof typeof validConfig]?.toString() || null;
});

const config = await validateInstagramConfig(mockRuntime);
Expand All @@ -67,7 +130,7 @@ describe('Instagram Environment Configuration', () => {

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
return invalidConfig[key as keyof typeof invalidConfig];
return invalidConfig[key as keyof typeof invalidConfig]?.toString() || null;
});

await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
Expand All @@ -82,7 +145,46 @@ describe('Instagram Environment Configuration', () => {

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
return invalidConfig[key as keyof typeof invalidConfig];
return invalidConfig[key as keyof typeof invalidConfig]?.toString() || null;
});

await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
});

it('throws error for invalid image dimensions', async () => {
const invalidConfig = {
INSTAGRAM_DRY_RUN: false,
INSTAGRAM_USERNAME: 'test_user',
INSTAGRAM_PASSWORD: 'test_password',
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_IMAGE_WIDTH: '-100', // Invalid negative width
INSTAGRAM_IMAGE_HEIGHT: '0', // Invalid zero height
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
return invalidConfig[key as keyof typeof invalidConfig]?.toString() || null;
});

await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
});

it('throws error for invalid numeric image settings', async () => {
const invalidConfig = {
INSTAGRAM_DRY_RUN: false,
INSTAGRAM_USERNAME: 'test_user',
INSTAGRAM_PASSWORD: 'test_password',
INSTAGRAM_APP_ID: 'test_app_id',
INSTAGRAM_APP_SECRET: 'test_app_secret',
INSTAGRAM_IMAGE_GUIDANCE_SCALE: '-1', // Invalid negative guidance scale
INSTAGRAM_IMAGE_CFG_SCALE: '0', // Invalid zero cfg scale
INSTAGRAM_IMAGE_ITERATIONS: '-5' // Invalid negative iterations
};

vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
return invalidConfig[key as keyof typeof invalidConfig]?.toString() || null;
});

await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
Expand Down
Loading

0 comments on commit a5a1b52

Please sign in to comment.