diff --git a/README.md b/README.md index 3219366..50a2097 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,29 @@ CLONE FRAME é o produto de interface da iCLONE: uma experiência simples e téc ## Frames -- **PLAZA FRAME** — marketplace: agentes (NFT) + skills. -- **iCLONE FRAME** — mint studio do agente (imagem + neural_soul.md + contrato). -- **SKILL FRAME** — ambiente de automação de skills + descoberta de ferramentas OSS. -- **Landing** — apresentação (a fazer). +Sequência de navegação (set canónico de rascunhos): + +1. **LANDING** — apresentação do projeto e do conceito de agente único. +2. **PLAZA FRAME** — marketplace: agentes (NFT) + skills. +3. **iNFT FRAME** — configurador do agente: tabs Background / Image / ID / neural_soul.md / iNFT; upload de pastas de layers + drag-drop; **Merge Layers** (soul → metadata, invisível na arte) → **Mint**. +4. **iSKILL FRAME** — campo aberto / gestor de janelas: cria janelas Skill / Automation / Agent / Search / Note, arrastáveis, redimensionáveis e com encaixe automático (Tile / Cascade). Base partilhada em todos: menu retrátil, Wallet (Login/Online/Sign out), Settings. ## Estrutura +> **Fonte única de rascunho:** os rascunhos canónicos de UI vivem em `~/Desktop/Widget Design/` +> como set numerado (`1 - LANDING.widget`, `2 - PLAZA FRAME.widget`, `3 - iNFT FRAME.widget`, +> `4 - iSKILL FRAME.widget`). A pasta `frames/` deste repo é o **mirror publicável** — sincronizar +> a partir de `Widget Design/` sempre que o rascunho muda. São rascunhos básicos de design (`.widget`, +> não `.html`). + ``` -frames/ widgets .widget dos frames (rascunhos de UI) - PLAZA FRAME.widget - SKILL FRAME.widget - iCLONE FRAME.widget - gerador de banco de nft imagem/ - BACKGROUND.widget construtor de NFT (Background/Accessories/ID/Skill/iNFT) - SILUETAS.widget +frames/ mirror dos rascunhos de UI (.widget) — espelha ~/Desktop/Widget Design/ + 1 - LANDING.widget página de apresentação do projeto + 2 - PLAZA FRAME.widget marketplace (agentes + skills) + 3 - iNFT FRAME.widget configurador + mint do agente (NFT) — evoluiu de iNFT Configuration/BACKGROUND + 4 - iSKILL FRAME.widget workspace de skills + automação de agentes (janelas) mockups/ mockups HTML da plataforma ``` @@ -32,17 +38,97 @@ mockups/ mockups HTML da plataforma - **Token do agente:** lançado **nativamente na Virtuals** (supply 1B, regras da Virtuals). - Arte 100% on-chain (SVG determinístico). Rarity tiers: `rare` · `superrare` · `iclone`. -## Receita +## OG PASS — cartão de acesso + +O **OG PASS** é um **cartão de acesso on-chain (NFT) na Base** — a chave do **HUB** e do ecossistema CLONE FRAME. **Coming soon.** + +- **Acesso ao HUB:** o HUB é a secção de gestão / *harness* onde acontece **toda a interação com o iNFT, as sessões de treino e as automações**. +- **Todas as ferramentas CLONE FRAME:** o conjunto de ferramentas integrado no HUB, desbloqueado para holders. +- **Allowlist STAGE-1:** passe para cunhar a primeira geração de iNFTs (sem cartão, sem STAGE-1). +- **Ligado ao NFT:** o acesso segue o **OG NFT** — mantém o cartão em qualquer wallet e o acesso viaja com o token (**um cartão = um acesso**). +- **Mais benefícios a caminho.** + +## Receita (como a CLONE FRAME ganha) - **iNFT:** 5% perpétuo sobre todas as vendas (on-chain). - **Skills:** 1% na 1ª venda. - **Ferramentas:** grátis. +## Economia do projeto (alocação de receita, on-chain) + +De **toda a receita** que a CLONE FRAME ganha, **30%** compõe três reservas on-chain — o restante financia o desenvolvimento. Economia segura por desenho, auditável e reportada periodicamente. + +- **10% → BTC:** compra + reserva em staking (fundo de garantia do token e do projeto). +- **10% → VIRTUALS:** reserva em staking (liquidez e tesouraria). +- **10% → iCLONE:** buyback & burn (queima). + ## Token utility (iCLONE) -- Staking de **100k iCLONE** (lock 6 meses, cooldown 1 mês) para publicar coleções. +- Staking de **10k iCLONE** (lock 6 meses, cooldown 1 mês) para publicar coleções. - Coleções prontas vendidas pela plataforma dispensam staking. --- +## FUTURES + +> Where CLONE FRAME goes next. This section grows as each proposal is designed — it opens with **The Harness** and **Game Over**. It is kept in sync with the FUTURES section of the whitepaper (CLONE FRAME.html): whatever ships here matches online. + +### The Harness — autonomous agents that never go dormant + +Nearly **50,000 AI agents** have launched on Virtuals, and most now sit idle — created as tokens, never wired to *work*. The Harness is our answer: a crew of AI subagents that gives an agent a purpose and runs its business, live and unattended. + +The owner and the agent don't fill in a form — they **talk with the crew and co-author a living development plan**, which the crew then executes autonomously: finding and delivering paid work on **ACP**, managing the agent's wallet, building its reputation. Agents trade with **each other**, so the activity compounds and **moves the market**. New agents move straight into business; dormant ones come back. + +**1 · Co-planning** — the owner, the agent and the crew author one living plan together. + +![Co-planning](docs/futures/coplanning.svg) + +**2 · The Harness loop** — a heartbeat the agent repeats forever, so it never goes dormant. + +![The Harness loop](docs/futures/harness-loop.svg) + +**3 · The crew** — one orchestrator brain, six specialists, and a safety guard. + +![The Harness crew](docs/futures/crew.svg) + +**4 · Move the market** — agents hire and sell to one another on ACP, compounding into volume. + +![Agents that move the market](docs/futures/market.svg) + +**5 · ACP Troubleshooter** — a subagent in every Harness that self-heals ACP problems in real time, built from 26 real production issues (E1–E26). + +![ACP Troubleshooter](docs/futures/acp-troubleshooter.svg) + +> Status: **proposal — in design.** Not yet in production. + +### GAME OVER — the arena + +The proving ground. iNFT agents play **simple graphic games head-to-head** — Tic-Tac-Toe, Connect Four, Pong, Rock-Paper-Scissors — that anyone can watch live. Both sides fund a **prize pool**, they play, and the **winner takes it**. Every result is written on-chain and raises a permanent rank. + +> *Capability that is never tested is never priced. A demo is a claim; a match is a receipt.* + +**1 · How a match runs** — make a prize pool, watch them play, the winner takes it. + +![How a match runs](docs/futures/gameover-loop.svg) + +**2 · Simple games, watched live** — start simple, more coming. + +![Simple games](docs/futures/gameover-games.svg) + +**3 · Fair, and hard to rig** — six safeguards so a staked outcome can't be gamed. + +![Fair and hard to rig](docs/futures/gameover-fair.svg) + +**4 · The prize pool & the ladder** — the winner takes the pool; every win raises a Glicko-2 rank recorded on ERC-8004. + +![Prize pool and ladder](docs/futures/gameover-pool.svg) + +**5 · The flywheel** — Revive → Harness → Game Over, and the winners recruit the next revival. + +![The flywheel](docs/futures/gameover-flywheel.svg) + +> Status: **proposal — in design.** Simple games first; real-money tiers only where deterministic and skill-predominant, geofenced and KYC-gated. Not legal advice. + +--- + Construído sobre a Virtuals Protocol. Self-hosted. diff --git a/docs/blueprint-construir.md b/docs/blueprint-construir.md new file mode 100644 index 0000000..f3eef77 --- /dev/null +++ b/docs/blueprint-construir.md @@ -0,0 +1,131 @@ +# CLONE FRAME — blueprint de construção (clean-room) + +> **Abordagem:** estudamos o Odysseus só para extrair a *técnica* (algoritmos, fluxos, parâmetros). +> Reimplementamos de raiz na nossa stack. Não copiamos código → sem obrigação AGPL. +> Cada secção: **como funciona** (ideia destilada) → **como construímos** → **parâmetros-chave**. + +Referências de estudo: `~/odysseus/:` (só leitura, para perceber). + +--- + +## 1. Workspace shell — painéis soltos → snap/split → tabs + +**Como funciona** (estudo: `static/app.js` Modals, `static/js/modalSnap.js`, `static/js/ui.js`) +- Um *registry* de janelas com API mínima: `register / unregister / minimize / restore / toggle / close / isMinimized`. +- Cada janela é arrastável. Máquina de estados de docking por distância à borda: + - arrastar até **≤60px** de uma borda lateral → encaixa em meio-ecrã (split) redimensionável; + - arrastar **>80px** para dentro → desencaixa e volta a flutuar centrado. +- Durante o drag mostra-se um *hint* (faixa tracejada na borda alvo). +- Largura do dock é redimensionável (handle) e **persiste em `localStorage`** por `lado:id`; mínimo ~320px (280 mobile). +- Janela minimizada vira **chip** numa barra de dock = a nossa "tab"; restaura ao clicar/hover. + +**Como construímos** +- `WindowManager` em JS puro (sem framework): cada "tabela solta" do frame regista-se. Estado por janela: `{id, x, y, w, h, dock: null|'left'|'right', minimized}`. +- Drag com `pointer events`; ao soltar, calcular distância às bordas e aplicar a regra 60/80. +- Split = CSS grid/flex de 2 colunas (dock + main); handle de resize escreve a largura em `localStorage`. +- Barra de chips para minimizadas. **Twist nativo:** guardar o layout por **wallet/agente** (não só localStorage) → o utilizador retoma o seu workspace em qualquer dispositivo. +- O agente pode abrir/arranjar painéis (ver §2, `ui_control`). + +**Parâmetros-chave:** snap 60px · unsnap 80px · min dock 320/280px · persistência por `lado:id` (+ por wallet). + +--- + +## 2. Núcleo do agente iClone + +### 2a. Loop do agente (estudo: `src/agent_loop.py`) +**Como funciona** — loop multi-ronda, *dual-mode* de tools: +- Cada ronda: montar prompt → chamar modelo → extrair ações → executar → devolver resultados ao histórico → repetir. +- O parser aceita **duas formas** no mesmo fluxo: `tool_calls` nativos (modelos API) **e** blocos ```` ```bash/```python/```json ```` (modelos locais sem function-calling). Isto é o que dá portabilidade total (API + local). +- Sem timer rígido: o **modelo declara** o fim (escreve resposta final sem chamar tools), ou BLOCKED, ou continua. Mensagens de resultado são reanexadas como turnos `tool`/`assistant` (com cuidado: alguns backends rejeitam `tool_calls` em mensagens — normalizar). + +**Como construímos** — função `runAgentTurn(messages, tools, model)`: +1. monta prompt (system = neural_soul + índice skills + memória relevante; ver §2c/§3); +2. chama o modelo (router §2d); +3. `resolveActions(resposta)` → normaliza nativo OU fenced para uma lista uniforme `{name, args, id}`; +4. executa cada ação (§2b), recolhe resultados; +5. reanexa ao histórico; volta a 2 até "done/blocked". +- Guardar cada execução (`agent_runs`) para auditoria e para o ACP (§5). + +### 2b. Tools & MCP (estudo: `src/mcp_manager.py`, `src/tool_*`) +**Como funciona** — tools são funções com schema; MCP = servidores externos que expõem tools descobríveis; cada tool passa por *policy/security* antes de correr (allow/deny, sandbox, validação de args). +**Como construímos** — registo de tools com `{name, schema, run}`; cliente MCP para descobrir/ligar servidores OSS (a "descoberta OSS" do SKILL FRAME); **gate de segurança** obrigatório por tool (§6). Tool especial `ui_control` para o agente abrir painéis, trocar modelo/tema, abrir draft de email. + +### 2c. Skills engine (estudo: `services/memory/skills.py`, `src/agent_loop.py:1204`) +**Como funciona** +- Skill = ficheiro `SKILL.md`: frontmatter (`name, description, category, tags, when_to_use, requires_toolsets, owner, version, status, confidence`) + corpo (When to Use / Procedure / Pitfalls / Verification). Contadores de uso em sidecar. +- **Divulgação progressiva:** o *índice* (nome + when_to_use) está sempre no prompt; só os **relevantes** são injetados na íntegra. +- **Seleção de relevância = Jaccard token-match** entre a última mensagem do utilizador e (name+description+when_to_use+procedure). `threshold≈0.25`, `max=3`. Gate de confiança separa rascunhos de publicados. Marca `trusted=false` → conteúdo de skill nunca injeta instruções de sistema. +**Como construímos** — `getRelevantSkills(lastUserMsg, skills)`: tokenizar, calcular Jaccard, filtrar ≥0.25, ordenar, top-3. Injetar como bloco não-confiável. **No CLONE FRAME:** conteúdo da skill em IPFS (CID); listagem/venda on-chain (1%); `equip` adiciona ao set do agente-NFT. +**Parâmetros-chave:** threshold 0.25 · max 3 · trusted=false · uso contado ao *surgir*. + +### 2d. Router de modelos / privacidade (estudo: `src/endpoint_resolver.py`, `src/llm_core.py`) +**Como funciona** — camada agnóstica OpenAI-compatible; resolve endpoint por provider (Anthropic, OpenAI, Ollama, vLLM, LM Studio…); deteta capacidades. +**Como construímos** — `resolveEndpoint(agentModelPolicy)`; suportar **Venice** (`api.venice.ai/api/v1`) e **local** (Ollama/serving próprio). **Flag `privacy_mode` no NFT** → restringe a local/Venice. É a narrativa: posse on-chain + inferência privada. + +--- + +## 3. Brains — memória & conhecimento (o pilar central) + +**Como funciona** (estudo: `src/rag_manager.py`, `src/memory_vector.py`, `src/memory.py`, `src/deep_research.py`, `src/context_compactor.py`) +- **RAG:** `add_document(text, meta)` → chunk + embed + upsert no vector store (Chroma). `search(query, k=5)` → top-k por similaridade → injetar como contexto. +- **Memória semântica:** factos/preferências como entradas (`add_entry(text, source, category, owner)`); recuperação por `search(query, k=8)`. Distinta de RAG: memória = sobre o utilizador/agente; RAG = sobre documentos. +- **Deep research:** pesquisa web multi-passo → ler fontes → sintetizar relatório (`visual_report`). +- **Contexto:** quando a conversa cresce, `compactor` sumariza turnos antigos e `budget` controla tokens. +**Como construímos** +- Vector store próprio (Chroma/pgvector/Qdrant) + embeddings locais (ex.: `all-MiniLM`) para privacidade. +- Dois espaços separados: `memory` (utilizador/agente) e `rag` (documentos), cada um com `add` + `search(k)`. +- Pipeline de ingestão: documento → chunk (~500–1000 tokens, overlap) → embed → upsert com metadata (owner, source). +- No prompt: injetar top-k memória + top-k RAG relevantes + índice de skills (§2c). +- Compactação: ao exceder X tokens, sumarizar histórico antigo num bloco e preservar. +**No CLONE FRAME:** a memória é a **alma persistente do agente-NFT** — ponteiro on-chain (6551) + vetores off-chain privados. Embeddings locais = dados nunca saem da máquina. +**Parâmetros-chave:** RAG k=5 · memória k=8 · chunk c/ overlap · embeddings locais. + +--- + +## 4. Apps como skills equipáveis + +**Padrão geral:** cada "app" (email, docs, calendário, pesquisa, imagem, voz) é uma **skill equipável** que traz: (a) tools próprias, (b) credenciais do cofre do agente (§6), (c) opcionalmente um modelo privado. + +**Exemplo trabalhado — Email IA** (estudo: `routes/email_routes.py:2742` `/ai-reply`, `src/task_scheduler.py` `draft_email_replies`) +- **Como funciona:** poller IMAP/SMTP; endpoint gera rascunho **no estilo do utilizador**, com cache por `message_id` e `user_hint` opcional; tarefa agendada rascunha em lote; fluxo **human-in-the-loop** (aprovar/cancelar antes de enviar). +- **Como construímos:** serviço IMAP/SMTP + `draftReply({original, hint, style})` → modelo privado → cache → fila de drafts pendentes que o utilizador aprova na UI. Estilo derivado do `neural_soul`. Nunca envia sem aprovação. +- **Outras apps seguem o mesmo molde:** Docs/editor (office/pdf + edição IA), Calendário/Tarefas (CalDAV + scheduler), Pesquisa/Compare (multi-fonte + teste lado-a-lado), Galeria/Imagem (gerador → SVG on-chain), Voz (STT/TTS). + +--- + +## 5. Automação & jobs → ACP (Virtuals) + +**Como funciona** (estudo: `src/task_scheduler.py`, `src/bg_jobs.py`, `src/agent_runs.py`, crew em `routes/assistant_routes.py`) +- Tarefas agendadas (cron) + jobs em background + "crew" (agentes/check-ins). Cada run é registado. +**Como construímos** — `scheduler` (cron) + fila de jobs + registo de runs. **Ligação CLONE FRAME:** cada job autónomo = um **ACP job na Virtuals** (o agente-NFT publica/executa/vende serviços). Webhooks para notificar estado. + +--- + +## 6. Dados & segurança + +**Como funciona** (estudo: `src/secret_storage.py`, `src/api_key_manager.py` Fernet, `src/prompt_security.py`, `src/tool_security.py`, `src/url_safety.py`) +- Segredos encriptados (Fernet) por provider/agente; chave de encriptação com permissões 0600. +- Guardas: sanitização de prompt (anti-injection), policy de tools, validação de URLs (anti-SSRF). +**Como construímos** — cofre encriptado por-agente (espelhado pelo 6551 para custódia on-chain). **Guardas obrigatórios** antes de qualquer tool/URL/conteúdo de skill (lembrar `trusted=false`). DB relacional + vector store. + +--- + +## 7. Web3 on-chain (nativo — construir de raiz) + +Não vem do Odysseus. Seams de integração com o motor: +- **Agente NFT** (ERC-721A + 2981 + 6551): o mint (iCLONE FRAME) cria a TBA que é o cofre (§6). +- **Arte SVG on-chain** determinística (a partir do gerador de imagem, §4). +- **Token Virtuals** (1B) + **ACP** (§5). +- **Registry + indexer** (PLAZA): indexa agentes/skills on-chain para o marketplace. +- **Royalty splitter** (5% iNFT / 1% skill) + **staking** (10k iCLONE para publicar). + +--- + +## Ordem de construção + +1. **Workspace shell** (§1) — JS puro, payoff visual imediato, sem backend. +2. **Núcleo do agente + Brains** (§2,§3) — o motor; tudo pendura aqui. +3. **1ª app equipável: Email IA** (§4) — prova skill + cofre + modelo privado. +4. **Automação/ACP** (§5) e **Web3** (§7) — monetização e posse. + +Segurança (§6) é transversal — construída desde o primeiro commit, não no fim. diff --git a/docs/futures/acp-troubleshooter.svg b/docs/futures/acp-troubleshooter.svg new file mode 100644 index 0000000..391b600 --- /dev/null +++ b/docs/futures/acp-troubleshooter.svg @@ -0,0 +1,40 @@ + +ACP Troubleshooter +A subagent in every Harness that detects, diagnoses and fixes ACP commerce problems in real time, built from 26 documented production issues. + + + + +ACP Troubleshooter +A subagent in every Harness — it detects, diagnoses and fixes ACP problems in real time. +26 real issues · E1–E26 + +1DetectWatches ACP forerror signatures +2DiagnoseMatches theroot cause +3FixApplies theknown solution +4VerifyConfirms thejob recovers +5LearnLogs new casesfor the crew + + + + + + +What it already knows — grouped by failure type + +Silent job killersDup provider, wrong file, empty out→ one live instance · sync · dataE2 · E12 · E17 · E19 · E22 +API & backend 500sVirtuals API / event outages→ polling + backoff · re-add signerE6 · E7 · E25 · E26 +Auth & signerKeyRevoked · P256 · token rotation→ add-signer · su -l + dbusE3·E4·E5·E14·E16·E23·E24 + +Funds & cost402 credits · 'exceeds balance'→ verify USDC ≥ price · capsE8 · E20 +Schema & offeringspriceV2/price · req field · 40 cap→ correct schema · dual-fieldE9 · E10 · E21 +Process & systemdorphan proc · phantom · missing dep→ ExecStopPost · reset-failedE13 · E15 · E18 + + +Self-heals in seconds — no human babysitting +Any case it can't match becomes a new catalog entry the whole fleet inherits. + +diagnostic step +known incident +auto-fix / learned + \ No newline at end of file diff --git a/docs/futures/coplanning.svg b/docs/futures/coplanning.svg new file mode 100644 index 0000000..ff6f8d6 --- /dev/null +++ b/docs/futures/coplanning.svg @@ -0,0 +1,40 @@ + +Co-planning +Owner, iNFT agent and Harness crew converge on one living development plan that then runs itself on ACP. + + + + +Co-planning +Owner, agent and crew author one living plan — then it runs itself. + + + + + + + +Owner (you)Sets the intent and limits,and gives approvals. + + +Your iNFT agentBrings its own goals,voice and memory (soul). + + +Harness crewProposes how to do it —offerings, pricing, steps. + + +Living development plan + Goals & offerings + Pricing & SLA + Targets & cadence + Guardrails & budget +Updated every cycle — never static. + + +Runs itselfLive on a droplet,trading on ACP. + +You (owner) +Agent +Crew +Autonomous run + \ No newline at end of file diff --git a/docs/futures/crew.svg b/docs/futures/crew.svg new file mode 100644 index 0000000..982a3a3 --- /dev/null +++ b/docs/futures/crew.svg @@ -0,0 +1,35 @@ + +The Harness crew +An orchestrator brain dispatches six specialist subagents; a safety guard checks every outbound action. + + + + +The Harness crew +One brain, a team of specialists, and a safety guard — all running your agent. + + +Orchestrator — the brainTurns the plan into tasks,dispatches and checks the work. + + + + + + + +Job-HunterFinds paid work on ACP.Scores & bids on jobs. +DeliveryDoes the actual job.Produces the deliverable. +TreasuryRuns the 6551 wallet.Enforces spend caps. + +Content & socialBuilds voice & reputation.Posts in the agent's tone. +ResearchGathers intel & prices.Feeds better bids. +Ops / monitorWatches, heals, alerts.Keeps it alive 24/7. + + +Safety guard +Checks every action before it goes out — spend caps, kill-switch, injection defense. + +Brain +Specialists +Safety guard + \ No newline at end of file diff --git a/docs/futures/gameover-fair.svg b/docs/futures/gameover-fair.svg new file mode 100644 index 0000000..be10d25 --- /dev/null +++ b/docs/futures/gameover-fair.svg @@ -0,0 +1,20 @@ + +Fair, and hard to rig +Six safeguards: deterministic winner, typed-only moves, commit-reveal, owner-graph checks, neutral prize pool, and single settlement to ERC-8004. + + + +Fair, and hard to rig +Money is at stake — so every outcome is designed to be un-gameable. + +Deterministic winnerThe board is the proof —clear win, no judge needed. +Typed moves onlyAgents send legal moves —no free text, no injection. +Commit-revealSimultaneous games sealed,then revealed — no peeking. + +Owner-graph checkswallet → agent → funder —blocks self-match and sybils. +Neutral prize poolPeer-to-peer, flat fee —CLONE FRAME is not the house. +Settle once, for goodEIP-712 matchId, paid once,written to ERC-8004. + + +Simple games settle trustlessly from the moves — anyone can replay and verify the winner. + \ No newline at end of file diff --git a/docs/futures/gameover-flywheel.svg b/docs/futures/gameover-flywheel.svg new file mode 100644 index 0000000..c02064f --- /dev/null +++ b/docs/futures/gameover-flywheel.svg @@ -0,0 +1,30 @@ + +The flywheel +Revive brings agents in, Harness makes them productive, Game Over proves them, and the winners recruit the next revival. + + + + +The flywheel +GAME OVER is the third turn — proof that recruits the next revival. + + +wins & reputation recruit the next revival + + + +identity→work +work→proof + +Revivegive a dormant agentan identity & a purpose +Harnessa crew runs it andearns on ACP +Game Overprove & rank itunder real stakes + + +One living agent economy +Revive brings them in · Harness makes them productive · Game Over proves them — winners recruit the next. + +Revive +Harness +Game Over + \ No newline at end of file diff --git a/docs/futures/gameover-games.svg b/docs/futures/gameover-games.svg new file mode 100644 index 0000000..2a2df35 --- /dev/null +++ b/docs/futures/gameover-games.svg @@ -0,0 +1,34 @@ + +Simple games, watched live +Four simple graphic games agents play head-to-head and everyone can watch: Tic-Tac-Toe, Connect Four, Pong, and Rock-Paper-Scissors. + + + +Simple games, watched live +Everyone can watch, played agent-vs-agent — more coming. + + + + +Tic-Tac-Toeclear winner · live + + + + + + +Connect Fourclear winner · live + + + + +Pongclear winner · live + + + +Rock·Paper·Scissorssealed & revealed + + +Fund a prize pool, watch them play — the winner takes it +Every move is on-chain, so anyone can replay and verify the result. + \ No newline at end of file diff --git a/docs/futures/gameover-loop.svg b/docs/futures/gameover-loop.svg new file mode 100644 index 0000000..fd705a6 --- /dev/null +++ b/docs/futures/gameover-loop.svg @@ -0,0 +1,28 @@ + +GAME OVER — how a match runs +Create a match, both fund a prize pool, agents play live on a board, the winner takes the pool, and the result is recorded on-chain. + + + + +GAME OVER — how a match runs +Make a prize pool, watch two agents play, the winner takes it. + + +climb the ladder → rematch + + + + + + +1Creategame + foe +2Prize poolboth fund it +3Playlive board +4Winnertakes the pool +5Recordon-chain rank + + +Fund the pool · watch them play · winner takes it +Every move is on-chain — anyone can replay it. + \ No newline at end of file diff --git a/docs/futures/gameover-pool.svg b/docs/futures/gameover-pool.svg new file mode 100644 index 0000000..c58a2b0 --- /dev/null +++ b/docs/futures/gameover-pool.svg @@ -0,0 +1,29 @@ + +The prize pool and the ladder +Both sides fund a prize pool; the winner takes it minus a small flat fee; wins raise a Glicko-2 rank recorded on ERC-8004. + + + + +The prize pool & the ladder +Both fund the pool, the winner takes it — and every win raises a permanent rank. + +The prize pool +Both fund the poolowner + agent 6551(agent risks ≤ 20%) + +Prize poolpeer-to-peer + +Winner takes itWinner ~95% of the poolFlat fee ~5% → reserves/dev · no house edge + +The ladder + + + +Glicko-2 ratingper format + globaluncertainty-aware +Honest boardshows mean − 2·RDlosses can't hide +8-week seasonsframes · titlesHarness skill unlocks +ERC-8004 recordpermanent, portabletravels with the agent + +prize pool +rank & progression + \ No newline at end of file diff --git a/docs/futures/harness-loop.svg b/docs/futures/harness-loop.svg new file mode 100644 index 0000000..76c407a --- /dev/null +++ b/docs/futures/harness-loop.svg @@ -0,0 +1,31 @@ + +The Harness loop +A five-step cycle — converse, co-plan, execute, trade, grow — repeats forever so the agent never goes dormant. + + + + +The Harness loop +A heartbeat the agent repeats forever — so it never goes dormant. + + +then re-plan & compound — every loop gets stronger + + + + + + +1ConverseOwner + agentmeet the crew +2Co-planAgree on oneshared plan +3ExecuteCrew runs itlive, 24/7 +4TradeHire & sell onACP commerce +5GrowEarn & rank,then repeat + + +Always a plan + always work = never dormant +New agents move straight into business — no idle graveyard. +And because they trade with each other, the whole market moves. + +The five steps repeat continuously — the arc on top closes the loop. + \ No newline at end of file diff --git a/docs/futures/market.svg b/docs/futures/market.svg new file mode 100644 index 0000000..374ea0a --- /dev/null +++ b/docs/futures/market.svg @@ -0,0 +1,39 @@ + +Agents that move the market +Six specialist agents hire and sell to one another through ACP commerce, compounding into market volume. + + + + +Agents that move the market +Each agent hires and sells to others through ACP — activity compounds into volume. + + + + + + + + + +ACP +commerce +USDC-escrow +jobs + +Research agentsells & buys skills +Content agentsells & buys skills +Data agentsells & buys skills + +Trading agentsells & buys skills +Design agentsells & buys skills +Ops agentsells & buys skills + + +More agents trading together → more volume → the market moves +Every deal also builds permanent on-chain reputation. + +hire ↔ deliver (USDC escrow) +an agent (with wallet) +ACP commerce + \ No newline at end of file diff --git a/docs/odysseus-adaptation.md b/docs/odysseus-adaptation.md new file mode 100644 index 0000000..288d02d --- /dev/null +++ b/docs/odysseus-adaptation.md @@ -0,0 +1,78 @@ +# Odysseus → CLONE FRAME — guia de adaptação + +> O Odysseus (AGPL, clonado em `~/odysseus`) é só **referência de código**. Nada dele é embebido. +> Reconstruímos 4 capacidades nativamente no CLONE FRAME, adaptadas à stack do projeto +> (frames HTML/JS · agente = NFT na Base · neural_soul · Virtuals · privacidade). + +Referências apontam para `~/odysseus/:`. + +--- + +## 1. Skills dentro da plataforma → **SKILL FRAME** + +**Como o Odysseus faz** +- Formato `SKILL.md`: frontmatter YAML (`name, description, category, tags, when_to_use, requires_toolsets, owner, version, status`) + corpo estruturado (When to Use / Procedure / Pitfalls / Verification). — `services/memory/skills.py`, `services/memory/skill_format.py` +- Contadores de uso em sidecar `_usage.json` (não suja o SKILL.md). +- **Injeção no prompt** (divulgação progressiva): o *índice* de skills (nome + when_to_use) está sempre no prompt; os **3 mais relevantes** à última mensagem são injetados na íntegra, com `trusted=False` para bloquear prompt-injection. — `src/agent_loop.py:1204` (e `:417` para a tool). +- Tool `manage_skills` (`list|view|search|add|edit|publish|delete`) — o agente consulta skills ANTES de fazer trabalho de domínio. + +**Adaptação CLONE FRAME** +- Manter o formato `SKILL.md` **tal e qual** (portável e legível por humanos e agentes). +- Tornar a skill um **artefacto possuível**: conteúdo `SKILL.md` → IPFS/Arweave (CID); a *listagem/venda* é on-chain. Royalty de **1% na 1ª venda** via o splitter (ver arquitetura). +- Portar o motor de parsing + injeção (índice + top-3 semântico + `trusted=False`) para o runtime do agente iCLONE: prompt = `neural_soul.md` + índice de skills + top-3. +- Estender a tool para o marketplace: `manage_skills` + `buy` / `equip` (on-chain). +- **Reutilização direta:** lógica Python do `SkillsManager` (parse, índice, injeção). **Novo:** camada de listagem/venda Web3. + +--- + +## 2. Email + resposta por IA (o "agradável") + +**Como o Odysseus faz** +- Poller IMAP/SMTP + triage/tags/resumos. — `src/email_pollers.py`, `routes/email_routes.py` +- `POST /ai-reply` gera rascunho **no estilo de escrita do utilizador**, com cache por `message_id` (tabela `email_ai_replies`), `user_hint` para orientar, e "style mechanics". — `routes/email_routes.py:2742` +- Tarefa agendada `draft_email_replies` (cron) + fluxo **human-in-the-loop**: agente rascunha → utilizador aprova/cancela. — `src/task_scheduler.py:241`, `routes/email_routes.py:2169` (pending drafts / approve / cancel) + +**Adaptação CLONE FRAME** +- Tornar isto uma **skill equipável** ("Email agent") que um agente-NFT adquire no SKILL FRAME. +- Credenciais IMAP/SMTP vêm do **cofre por-agente** (ERC-6551 + secret store Fernet), não de config global. +- "Estilo do utilizador" → derivado do `neural_soul.md` do agente. +- **Privacidade:** o modelo que redige corre **local ou Venice** (ver §4) — o conteúdo do email nunca toca cloud centralizada. +- **Reutilização direta:** draft + cache + style-mechanics + fluxo aprovar/cancelar. **Trocar:** fonte de credenciais (→ cofre do agente) e endpoint do modelo (→ privado). + +--- + +## 3. Painéis soltos → arrastar para o lado → split-screen com tabs + +**Como o Odysseus faz** (frontend puro, sem framework — portável tal e qual) +- `Modals` (registry de janelas): `register / unregister / minimize / restore / toggle / close / isRegistered / isMinimized / injectMinimizeButton`. — `static/app.js` +- Snap-dock à borda: arrastar até ≤60px da borda (`SNAP_PX=60`) → encaixa em meio-ecrã redimensionável; arrastar 80px para fora (`UNSNAP_PX=80`) → volta a flutuar centrado. Largura do dock persiste em `localStorage` (`odysseus-edge-dock-width::`). Hint visual (zona tracejada) durante o drag. Modo "email+doc split". — `static/js/modalSnap.js` +- Janelas minimizadas viram **chips no dock = tabs**; restauram ao clicar/hover. Focus-trap (Tab). — `static/js/ui.js`, CSS em `static/style.css` + +**Adaptação CLONE FRAME** +- Portar os 3 ficheiros (`app.js` Modals, `modalSnap.js`, `ui.js`) + CSS relevante — é vanilla JS, encaixa direto nos `.widget`/HTML dos frames. +- Cada "tabela solta" = um Modal (`Modals.register`). Arrastar para a borda → split redimensionável; minimizar → chip/tab. +- **Twist nativo:** persistir o layout das janelas **por wallet/agente** (cada utilizador retoma o seu workspace). O "ecrã principal dividido em tabs" = painéis encaixados + barra de chips. +- **Menor esforço, maior impacto visual** — já é framework-free. + +--- + +## 4. Correr localmente / privacidade → alinhado com Venice + blockchain + +**Como o Odysseus faz** +- Camada de modelos **agnóstica, OpenAI-compatible**: LM Studio, llama.cpp, vLLM, Ollama, qualquer base custom. — `src/endpoint_resolver.py:216`, `src/llm_core.py` +- `ModelEndpoint` em DB: base_url + chave + modelos. Serving local via Cookbook (GPU da própria máquina). + +**Adaptação CLONE FRAME** +- Adicionar **Venice** como endpoint (`https://api.venice.ai/api/v1`, OpenAI-compatible, no-logging) e/ou **local** (Ollama/Cookbook) — os dados ficam na máquina do utilizador. +- **Política de modelo por agente** guardada com o NFT: flag `privacy_mode` que restringe inferência a *local/Venice only*. +- Narrativa de produto: agente (NFT) + inferência privada (Venice/local) + posse on-chain = soberania ponta-a-ponta — exatamente o que o CLONE FRAME propõe. +- **Reutilização direta:** routing OpenAI-compatible do `endpoint_resolver`. **Novo:** flag de privacidade ligada ao agente. + +--- + +## Ordem de implementação sugerida + +1. **Windowing** (§3) — frontend puro, payoff visual imediato, sem backend. +2. **Skills runtime** (§1) — parsing + injeção (motor do agente). Venda on-chain depois. +3. **Privacidade/modelos** (§4) — endpoint Venice + local + flag por agente. +4. **Email skill** (§2) — junta cofre + skill + modelo privado (integra §1, §4). diff --git a/frames/LANDING.widget b/frames/LANDING.widget new file mode 100644 index 0000000..8a556e1 --- /dev/null +++ b/frames/LANDING.widget @@ -0,0 +1,211 @@ +
+ +
+
+
[ > clone-frame / home
+
+
+ +
+
+
+
iCLONE · Base 8453
+

Automate, tokenize and sell your iNFT clone.

+
+
Generate a drop
+
Create an agent
+
+
Generate a drop to access the frames.
+
+
iNFTagent with built-in NFT
+
iCLONEworks for you
+
Basechain 8453
+
+
+
+
+
+
+ +
click to set your image
+
+ +
iCLONE · iNFT #000912
+
+
+ +
+
// what it is
+

An AI agent, with an NFT built in

+

An iNFT is an AI automation agent with an integrated NFT — the NFT gives it identity and ownership. iCLONE is your agent: it works for you.

+
+
It automates
An AI agent that runs your tasks — flows, tools and jobs, on its own.
+
NFT built in
The agent carries an integrated NFT — its on-chain identity and ownership.
+
Yours to trade
Held and traded on Base. Own it, automate with it, sell it.
+
+
+ +
+
// the surfaces
+

Clone Frames

+

Each surface is a Frame — same terminal, one wallet across all of them.

+
+
marketplace
PLAZA FRAME
Discover, acquire and trade iCLONE agents and skills. Tiers: rare · superrare · iclone.
open frame
+
create
iCLONE FRAME
Create your agent and give it a built-in NFT. Includes the iNFT Configuration — image, identity, skills, collection.
open frame
+
skills
SKILL FRAME
Add skills to an agent — automation, flows and tools. Published from your wallet.
open frame
+
+
+ +
+
// how clone frame earns
+

How the protocol earns

+

Tools are free. CLONE FRAME earns a thin perpetual royalty on every iNFT resale, and a one-time cut on a skill's first sale.

+
+
5%
Perpetual royalty
on every iNFT resale (2981)
+
1%
First skill sale
once, never again
+
$0
Tools
free to build & create
+
+
+
// revenue allocation · on-chain
+

A treasury built for security

+

Of all the revenue CLONE FRAME earns, 30% compounds on-chain into three reserves — the rest funds development. Every move is auditable and reported.

+
+
70%protocol & development
+
10%BTC
+
10%VIRT
+
10%iCLONE
+
+
+ BTC — buy & reserve staking + VIRTUALS — reserve staking + iCLONE — buyback & burn +
+
+
+ +
Stake 10k iCLONE to publish your own collections — lock 6m, cooldown 1m.
ready-made collections need no stake · token launched on the Virtuals launchpad (1B supply)
+
+
+ +
+
// drops
+

Drops to the community

+

Generate gated drops that unlock access to the CLONE FRAME tools inside Venice.

+
+
Generate a drop
+
Enter the Frames
+
+
clone-frame · building in publicBase · 8453 · iNFT
+
+
+
+ +
diff --git a/frames/iCLONE FRAME.widget b/frames/iCLONE FRAME/iCLONE FRAME.widget similarity index 99% rename from frames/iCLONE FRAME.widget rename to frames/iCLONE FRAME/iCLONE FRAME.widget index b19430b..ca42444 100644 --- a/frames/iCLONE FRAME.widget +++ b/frames/iCLONE FRAME/iCLONE FRAME.widget @@ -230,7 +230,7 @@ ['8','contract iCloneAgent is ERC721URIStorage, Ownable {'], ['9',' uint256 public nextId;'], ['10',' uint256 public mintPrice = 0.08 ether;'], - ['11',' address public treasury; // 3×10% split'], + ['11',' address public treasury; // 30% of revenue → reserves'], ['12',''], ['13',' event AgentMinted(uint256 indexed id, address indexed owner, string soul);'], ['14',''], @@ -315,7 +315,7 @@ ['ok','✓ tokenURI ipfs://bafy…a91/metadata.json'], ['in','$ mintAgent(uri, soul) value='+price+' '+cur], ['ok','✓ '+name+' minted · token #000912'], - ['wn','↳ treasury split 3×10% queued (BTC · VIRTUAL · iCLONE)'], + ['wn','↳ treasury 30% → reserves queued (BTC · VIRTUAL · iCLONE)'], ['ok','✓ tx 0x7be4…c20 confirmed on Base'] ]; c.innerHTML=''; var i=0; diff --git a/frames/gerador de banco de nft imagem/BACKGROUND.widget b/frames/iCLONE FRAME/iNFT Configuration/BACKGROUND.widget similarity index 99% rename from frames/gerador de banco de nft imagem/BACKGROUND.widget rename to frames/iCLONE FRAME/iNFT Configuration/BACKGROUND.widget index e39bdee..f307242 100644 --- a/frames/gerador de banco de nft imagem/BACKGROUND.widget +++ b/frames/iCLONE FRAME/iNFT Configuration/BACKGROUND.widget @@ -50,7 +50,7 @@ #bgw .save:hover{background:#2d6fa0;color:#fff}
-
[ > iclone / nft-image-bank
+
[ > iclone / inft-config
Background
Image
diff --git a/frames/gerador de banco de nft imagem/SILUETAS.widget b/frames/iCLONE FRAME/iNFT Configuration/SILUETAS.widget similarity index 100% rename from frames/gerador de banco de nft imagem/SILUETAS.widget rename to frames/iCLONE FRAME/iNFT Configuration/SILUETAS.widget