Charliehub · by A.N.D.Why

Example · ships with Charlie

Finder

Finder is a file browser for your hub, in its own tab at the top of Charlie. It comes with the hub storage extension, hub-persistence, which is also where Charlie and other extensions keep things.

What's in the folder

hub-persistence/ ├── manifest.json ├── GUIDE.md the longer guide Charlie reads when needed ├── handlers/ │ ├── document*.js data*.js blob*.js 15 storage tools │ ├── finder*.js 4 Finder tools, plus the Finder chat's instructions │ ├── persistence.js the storage other extensions use │ ├── channels.js what the Finder calls back into │ └── lib/ ├── src/ the Finder's source, before it's built └── build/ ├── Finder.js the Finder tab └── Settings.js

The manifest

hub-persistence / manifest.json (shortened)
{
  "name": "hub-persistence",
  "description": "role: 'remotePersistence' backed by andwhy-hub's own Postgres...",
  "version": "0.8.5",
  "developer": {
    "name": "Andy Dale",
    "contact": "(hidden on this page)"
  },
  "tier": "core",
  "role": "remotePersistence",
  "connections": [
    {
      "name": "hub",
      "authType": "oauth2-discovery",
      "transport": "rest-client"
    }
  ],
  "persistence": {
    "module": "./handlers/persistence.js"
  },
  "channels": {
    "module": "./handlers/channels.js"
  },
  "settings": {
    "component": "./build/Settings.js"
  },
  "topBar": {
    "label": "Finder",
    "icon": "folders",
    "component": "./build/Finder.js",
    "keepAlive": true,
    "thread": {
      "instructions": {
        "module": "./handlers/finderInstructions.js"
      }
    },
    "tools": [
      "show_document",
      "read_open_document",
      "edit_open_document"
    ]
  },
  "guide": "GUIDE.md",
  "instructions": "Pick storage by content type: document__* markdown/text, data...",
  "tools": [
    {
      "name": "remote_storage__document__create",
      "description": "Create a new document. Fails if one already exists at this ro...",
      "input_schema": { ... },
      "handler": "./handlers/documentCreate.js",
      "delivery": "narrated",
      "roleScoped": true
    },
    { "name": "remote_storage__document__read" },
    { "name": "remote_storage__document__update" },
    { "name": "remote_storage__document__delete" },
    ... 15 more tools
  ]
}
LineWhat it plugs into
"tools"1 · Tools. Fifteen storage tools for documents, data and files, and four for the Finder.
"connections"2 · Connections. The sign-in to your hub.
"instructions", "guide"3 · Instructions. Short filing rules Charlie always reads, and a longer guide it opens when needed.
"settings"4 · Settings. The hub connection panel.
"topBar"5 · Surfaces. The Finder tab. It has its own chat thread, with its own instructions.
"role": "remotePersistence"6 · Roles. Charlie's storage job.
"channels"7 · Live state. Every click in the Finder goes through it, with no AI turn.
"persistence"9 · Data & storage. Where other extensions' saved data goes.

Ideas to borrow