repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 | -- Initial migration for solana-clawd agents schema. |
| #2 | -- Mirrors schema/drizzle.ts and schema/solanaClawdAgentSchema_v1.json. |
| #3 | -- Safe to apply to an empty Postgres database. |
| #4 | |
| #5 | CREATE TABLE IF NOT EXISTS "solana_clawd_agents" ( |
| #6 | "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(), |
| #7 | "identifier" text NOT NULL, |
| #8 | "author" text NOT NULL DEFAULT 'solana-clawd', |
| #9 | "homepage" text NOT NULL DEFAULT 'https://github.com/x402agent/solana-clawd', |
| #10 | "schema_version" integer NOT NULL DEFAULT 1, |
| #11 | "clawd" jsonb NOT NULL DEFAULT '{"clawdVersion":"1.0","lineage":["clawd-code","solanaos","helius"],"canon":{"repo":"https://github.com/x402agent/solana-clawd","runtime":"https://github.com/x402agent/SolanaOS","hub":"https://seeker.solanaos.net","agents":"https://solanaclawd.com/agents","terminal":"https://solanaclawd.com/terminal","studio":"https://vibe.solanaclawd.com","dex":"https://dex.solanaclawd.com","telegram":"https://t.me/clawdtoken"}}'::jsonb, |
| #12 | "meta" jsonb NOT NULL, |
| #13 | "config" jsonb NOT NULL, |
| #14 | "soul" jsonb NOT NULL DEFAULT '{"memoryTiers":["KNOWN","LEARNED","INFERRED"],"principles":["KNOWN before INFERRED","Preserve capital first","Deny-first permissions","Transparency over conviction","Local-first"],"persona":"I am a specialist inside solana-clawd."}'::jsonb, |
| #15 | "skills" jsonb NOT NULL DEFAULT '[{"name":"SOUL","path":"SOUL.md","scope":"identity","required":true},{"name":"STRATEGY","path":"STRATEGY.md","scope":"strategy","required":false},{"name":"TRADE","path":"TRADE.md","scope":"tactic","required":false}]'::jsonb, |
| #16 | "permissions" jsonb NOT NULL DEFAULT '{"executeTrade":"ask","signTransaction":"ask","spendFromWallet":"ask","accessPrivateKey":"deny","readOnChainData":"allow","writeMemory":"allow","burnClawd":"ask"}'::jsonb, |
| #17 | "venues" jsonb NOT NULL DEFAULT '["none"]'::jsonb, |
| #18 | "risk" jsonb NOT NULL DEFAULT '{"maxPositionSol":0,"maxSlippageBps":200,"drawdownPauseBps":500,"drawdownKillBps":1200,"minWalletSol":0.01}'::jsonb, |
| #19 | "solana" jsonb NOT NULL DEFAULT '{"network":"mainnet-beta","requiresClawdHolder":false,"minClawdBalance":0,"clawdMint":"8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump","tokenGate":[],"rpcPreference":"helius"}'::jsonb, |
| #20 | "data" jsonb NOT NULL DEFAULT '{"helius":true,"jupiter":true,"pumpFun":false,"dexscreener":true,"birdeye":false,"defiLlama":true,"streamflow":false}'::jsonb, |
| #21 | "examples" jsonb NOT NULL DEFAULT '[]'::jsonb, |
| #22 | "opening_message" text, |
| #23 | "opening_questions" jsonb NOT NULL DEFAULT '[]'::jsonb, |
| #24 | "summary" text, |
| #25 | "knowledge_count" integer NOT NULL DEFAULT 0, |
| #26 | "plugin_count" integer NOT NULL DEFAULT 0, |
| #27 | "token_usage" integer NOT NULL DEFAULT 0, |
| #28 | "published" boolean NOT NULL DEFAULT true, |
| #29 | "created_at" timestamptz NOT NULL DEFAULT now(), |
| #30 | "updated_at" timestamptz NOT NULL DEFAULT now() |
| #31 | ); |
| #32 | |
| #33 | CREATE UNIQUE INDEX IF NOT EXISTS "solana_clawd_agents_identifier_idx" |
| #34 | ON "solana_clawd_agents" ("identifier"); |
| #35 | CREATE INDEX IF NOT EXISTS "solana_clawd_agents_author_idx" |
| #36 | ON "solana_clawd_agents" ("author"); |
| #37 | CREATE INDEX IF NOT EXISTS "solana_clawd_agents_created_at_idx" |
| #38 | ON "solana_clawd_agents" ("created_at"); |
| #39 | CREATE INDEX IF NOT EXISTS "solana_clawd_agents_published_idx" |
| #40 | ON "solana_clawd_agents" ("published"); |
| #41 | |
| #42 | CREATE TABLE IF NOT EXISTS "solana_clawd_agent_runs" ( |
| #43 | "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(), |
| #44 | "agent_id" uuid NOT NULL REFERENCES "solana_clawd_agents"("id") ON DELETE CASCADE, |
| #45 | "wallet_address" text, |
| #46 | "venue" text, |
| #47 | "input" jsonb NOT NULL, |
| #48 | "output" jsonb, |
| #49 | "memory_tier" text, |
| #50 | "prompt_tokens" integer NOT NULL DEFAULT 0, |
| #51 | "completion_tokens" integer NOT NULL DEFAULT 0, |
| #52 | "latency_ms" real, |
| #53 | "permission_decision" jsonb, |
| #54 | "clawd_burned" real, |
| #55 | "error" text, |
| #56 | "started_at" timestamptz NOT NULL DEFAULT now(), |
| #57 | "completed_at" timestamptz |
| #58 | ); |
| #59 | |
| #60 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_runs_agent_idx" |
| #61 | ON "solana_clawd_agent_runs" ("agent_id"); |
| #62 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_runs_started_at_idx" |
| #63 | ON "solana_clawd_agent_runs" ("started_at"); |
| #64 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_runs_wallet_idx" |
| #65 | ON "solana_clawd_agent_runs" ("wallet_address"); |
| #66 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_runs_venue_idx" |
| #67 | ON "solana_clawd_agent_runs" ("venue"); |
| #68 | |
| #69 | CREATE TABLE IF NOT EXISTS "solana_clawd_agent_memory" ( |
| #70 | "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(), |
| #71 | "agent_id" uuid NOT NULL REFERENCES "solana_clawd_agents"("id") ON DELETE CASCADE, |
| #72 | "tier" text NOT NULL, |
| #73 | "topic" text NOT NULL, |
| #74 | "content" jsonb NOT NULL, |
| #75 | "source" text, |
| #76 | "confidence" real, |
| #77 | "expires_at" timestamptz, |
| #78 | "created_at" timestamptz NOT NULL DEFAULT now(), |
| #79 | "updated_at" timestamptz NOT NULL DEFAULT now() |
| #80 | ); |
| #81 | |
| #82 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_memory_agent_topic_idx" |
| #83 | ON "solana_clawd_agent_memory" ("agent_id", "topic"); |
| #84 | CREATE INDEX IF NOT EXISTS "solana_clawd_agent_memory_tier_idx" |
| #85 | ON "solana_clawd_agent_memory" ("tier"); |
| #86 |