-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0g plugin dev #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor comments
"STORE_FILE_ON_ZG", | ||
"SAVE_FILE_TO_ZG", | ||
"UPLOAD_TO_ZERO_GRAVITY", | ||
"STORE_ON_ZERO_GRAVITY", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZERO_GRAVITY
vs ZG
, let's make it consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various of similes make the agent smarter?
try { | ||
await fs.access(filePath); | ||
} catch (error) { | ||
console.error(`File ${filePath} does not exist or is not accessible:`, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vs ", make it consistent. also a space after
accessible:`
await file.close(); | ||
|
||
} catch (error) { | ||
console.error("Error getting settings for 0G upload:", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after upload:
packages/plugin-0g/src/index.ts
Outdated
import { zgUpload } from "./actions/upload"; | ||
|
||
export const zgPlugin: Plugin = { | ||
name: "ZG", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the name here be ZeroG or 0G
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
const flowAddr = runtime.getSetting("ZEROG_FLOW_ADDRESS"); | ||
const filePath = content.filePath; | ||
if (!filePath) { | ||
console.error("File path is missing"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File path is required
Notes for AI Agent Dev School #1
feat: EVM Pubkey derivation
Introduce sentient AI to DePIN plugin
Orchestrator architecture V1
Risks
Low. This change involves adding a new plugin, which is isolated and should not affect existing functionality.
Background
What does this PR do?
This PR adds a new plugin for 0G, which includes an action that allows users to upload local files to 0G Storage.
What kind of change is this?
Features (non-breaking change which adds functionality).
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
The review can start with the new 0G plugin code, focusing on the action that uploads files to ensure it handles files correctly and integrates well with 0G Storage.
Screenshots
No UI changes.
This change is