Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Bibit Memory Plugin

The control panel for what your agent remembers.

English | 简体中文

Hi, this is the Memory plugin for BiBit. It adds one page under Settings → Memory, and that page is where a person turns memory on, decides how long to keep it, clears a conversation, wipes everything, and moves their data in or out as JSON.

It doubles as a working reference for BiBit plugin development: one settings contribution, two host capabilities (service:memory and file:transfer), and no changes to the host.

What the page can do

In the UI What the plugin calls
Memory on/off privacy.settings.update
How long to keep memory privacy.settings.update
Clear conversation history privacy.clear_history
Clear all memory privacy.clear_all
Export to JSON privacy.export_data
Import from JSON privacy.import_data

Every change is saved immediately: the page sends it through service:memory and the Memory service writes it down. No Runtime hop, no hand-edited JSON.

Deletion requires two steps: the page asks for confirmation, then the host or adapter issues a one-time confirmation token. The operation runs only with that token. The page cannot issue the token itself.

How it fits

BiBit Settings
  └─ Memory page  (this plugin)
       └─ service:memory  (host capability, granted at install)
            └─ bianbu-agent-memoryd  (stores and guards the actual memory)

The plugin never talks to a backend URL. It asks the host for the service:memory capability and calls operations on it. That keeps the page portable and the credentials out of the front end.

Quick start

npm ci
npm run typecheck
npm test
npm run dev

Then open the Vite URL (default http://127.0.0.1:5169/). The dev host renders the settings shell and wires service:memory to a Memory Adapter at http://<host>:5168/invoke. If no adapter is running, the page says so instead of pretending.

The adapter listens on loopback only. For a remote device, use your own SSH port forwarding; keep real host names, users, and passwords out of config files and docs. http://127.0.0.1:5168/health tells you whether the adapter is up.

Build the plugin bundle

npm run build:dev      # plain dev bundle
npm run build:plugin   # plugin bundle

The artifact lands in artifacts/ as memory-<version>.bibit-plugin.tgz. build:plugin currently still requires the existing development key file .bibit-keys/memory-development-private.pem: plugin signing is deprecated, the build rules have not been migrated, and a bundle built this way may be rejected by a host that still enforces verification. Do not generate or register new keys, and keep .bibit-keys/ out of git.

What is in the box

├── bibit.feature.json        # manifest: one settings contribution
├── package.json
├── dev/main.tsx              # Feature Dev Host + real service connection
├── src/
│   ├── feature.tsx           # FeatureModuleV1 wiring
│   ├── plugin.tsx            # registerFeaturePlugin entry
│   ├── MemorySettingsPage.tsx
│   ├── memory-contracts.ts   # operations and DTOs
│   └── memory.css            # .memory-* namespace
├── tests/                    # focused regression tests
└── docs/                     # dev/deploy guide and a worked case

More reading

Where the line is

  • The front end only calls useFeatureCapability('service:memory'). It never holds a backend URL or a credential.
  • Loading the plugin is not the same as a working backend. A real acceptance run needs the registry, the adapter, and the operations to line up.
  • Memory logic, persistence, permissions, and confirmation live in bianbu-agent-memory. This repo owns the UI and the DTO contract.

Before you publish

Run git ls-files and make sure there is no .env, private key, database, exported memory, build artifact, or device log. Replace internal repository addresses, private IPs, absolute paths, and real credentials with placeholders. Then run npm ci && npm run typecheck && npm test && npm run build:dev before cutting a release.

Contributing

Contributing guide | Version correspondence

License

The original code developed for this project is licensed under the Apache License 2.0. See LICENSE for the full terms.

Third-party components, dependencies, and bundled code remain subject to their respective licenses. This project's license does not relicense those components. Preserve applicable upstream copyright notices, license texts, and NOTICE files when redistributing.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages