Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions CHEATSHEET.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,18 +820,29 @@ When a brand-new wiki is opened with `wikiaccess=rw`, Mini-A bootstraps two star
|-----------|------|---------|-------------|
| `usewiki` | boolean | `false` | Enable the wiki knowledge base |
| `wikiaccess` | string | `ro` | Access mode: `ro` (read-only) or `rw` (read-write) |
| `wikibackend` | string | `fs` | Backend: `fs` (filesystem) or `s3` |
| `wikibackend` | string | `fs` | Backend: `fs` (filesystem), `s3`, `s3fs`, or `es` (Elasticsearch/OpenSearch) |
| `wikiroot` | string | `.` | Root directory for the `fs` backend |
| `wikibucket` | string | - | S3 bucket name (`s3` backend) |
| `wikiprefix` | string | - | S3 key prefix (`s3` backend) |
| `wikiurl` | string | - | S3-compatible endpoint URL (`s3` backend) |
| `wikiaccesskey` | string | - | S3 access key (`s3` backend) |
| `wikisecret` | string | - | S3 secret key (`s3` backend) |
| `wikiregion` | string | - | S3 region (`s3` backend) |
| `wikiuseversion1` | boolean | `false` | Use S3 path-style (v1) signing (`s3` backend) |
| `wikiignorecertcheck` | boolean | `false` | Skip TLS certificate validation (`s3` backend) |
| `wikibucket` | string | - | S3 bucket name (`s3`/`s3fs` backend) |
| `wikiprefix` | string | - | S3 key prefix (`s3`/`s3fs`) or Elasticsearch index name (`es`, defaults to `mini_a_wiki`) |
| `wikiurl` | string | - | S3-compatible endpoint URL (`s3`/`s3fs`) or Elasticsearch/OpenSearch base URL (`es`; this is the CLI-facing `esurl`) |
| `wikiaccesskey` | string | - | S3 access key (`s3`/`s3fs`) or Elasticsearch username (`es`) |
| `wikisecret` | string | - | S3 secret key (`s3`/`s3fs`) or Elasticsearch password (`es`) |
| `wikiregion` | string | - | S3 region (`s3`/`s3fs` backend) |
| `wikiuseversion1` | boolean | `false` | Use S3 path-style (v1) signing (`s3`/`s3fs` backend) |
| `wikiignorecertcheck` | boolean | `false` | Skip TLS certificate validation (`s3`/`s3fs` backend) |
| `wikilintstaleddays` | number | `90` | Days before a page without an `updated` update is marked stale in lint |

Elasticsearch/OpenSearch backend mapping:

| Mini-A parameter | Internal wiki config | Meaning |
|------------------|----------------------|---------|
| `wikiurl` | `esurl` | Elasticsearch/OpenSearch base URL |
| `wikiprefix` | `esindex` | Index name; defaults to `mini_a_wiki` |
| `wikiaccesskey` | `esuser` | Optional basic-auth username |
| `wikisecret` | `espass` | Optional basic-auth password |

If you are looking for `esurl=`, use `wikiurl=` with `wikibackend=es`.

### Wiki Actions (agent)

The agent uses the `wiki` action:
Expand Down Expand Up @@ -874,6 +885,12 @@ mini-a goal="analyze and wiki" \
wikibucket=my-wiki-bucket wikiprefix=knowledge/ \
wikiurl=https://s3.amazonaws.com wikiaccesskey=AKI... wikisecret=xxx wikiregion=us-east-1

# Elasticsearch/OpenSearch-backed wiki
mini-a goal="search and update the team wiki" \
usewiki=true wikiaccess=rw wikibackend=es \
wikiurl=http://localhost:9200 wikiprefix=mini_a_wiki \
wikiaccesskey=elastic wikisecret=xxx

# Wiki + memory for maximum knowledge retention
mini-a goal="deep research with persistent knowledge" \
usewiki=true wikiaccess=rw wikiroot=/shared/wiki \
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,19 @@ Mini-A ships with complementary components:
| `memorymaxentries` | Total memory-entry cap across all sections | `500` |
| `memorycompactevery` | Run compaction/summarization every N memory mutations | `8` |
| `memorydedup` | Deduplicate near-identical memory entries before append | `true` |
| `usewiki` | Enable persistent Markdown wiki knowledge base (`wiki` action and `/wiki` console commands) | `false` |
| `wikiaccess` | Wiki access mode (`ro` or `rw`) | `ro` |
| `wikibackend` | Wiki backend: `fs`, `s3`, `s3fs`, or `es` (Elasticsearch/OpenSearch) | `fs` |
| `wikiroot` | Filesystem wiki root when `wikibackend=fs` | `.` |
| `wikibucket` | S3 bucket for `s3`/`s3fs` wiki backends | - |
| `wikiprefix` | S3 key prefix for `s3`/`s3fs`, or Elasticsearch index name for `es` | - |
| `wikiurl` | S3 endpoint URL, or Elasticsearch/OpenSearch base URL when `wikibackend=es` (internal `esurl`) | - |
| `wikiaccesskey` | S3 access key, or Elasticsearch username when `wikibackend=es` | - |
| `wikisecret` | S3 secret key, or Elasticsearch password when `wikibackend=es` | - |
| `wikiregion` | S3 region for `s3`/`s3fs` wiki backends | - |
| `wikiuseversion1` | Use S3 signature v1/path-style compatibility for wiki access | `false` |
| `wikiignorecertcheck` | Disable TLS certificate checks for wiki S3 access | `false` |
| `wikilintstaleddays` | Stale-page age threshold used by wiki lint | `90` |
| `useascii` | Encourage ASCII sketch outputs in agent responses | `false` |
| `usemaps` | Encourage Leaflet-based interactive map outputs for geographic data | `false` |
| `usemath` | Encourage LaTeX-style math formulas (`$...$`, `$$...$$`) for KaTeX rendering in the web UI | `false` |
Expand Down
15 changes: 15 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,21 @@ The `start()` method accepts various configuration options:
- **`memorypromote`** (string, default: `""`): Comma-separated list of memory sections to auto-promote from the session store to the global store at session end. Uses a refresh-or-append strategy: near-duplicate global entries have their `confirmedAt` and `confirmCount` updated rather than duplicated; entirely new entries are appended. `memoryuser=true` sets this to `facts,decisions,summaries`. Set to `""` to disable promotion.
- **`memorystaledays`** (number, default: `0`): Number of days after which a global memory entry that has not been re-confirmed by any session is marked `stale=true`. The sweep runs automatically after each auto-promotion pass. Stale entries are not deleted immediately — they are evicted by compaction when a section overflows `memorymaxpersection`, giving recently confirmed entries priority. Set to `0` to disable staleness tracking. `memoryuser=true` sets this to `30`.
- **`memoryinject`** (string, one of `"summary"` or `"full"`, default: `"summary"`): Controls how working memory is embedded in the step context. `summary` (default) injects only section entry counts (e.g. `{facts:12,decisions:3}`) and enables the `memory_search` action for on-demand retrieval — reducing per-step memory token cost by ~95%. `full` restores the previous behaviour of embedding all compact entries in every step prompt.
- **`usewiki`** (boolean, default: `false`): Enable the persistent Markdown wiki knowledge base.
- **`wikiaccess`** (string, default: `ro`): Wiki access mode, `ro` or `rw`.
- **`wikibackend`** (string, default: `fs`): Wiki backend, one of `fs`, `s3`, `s3fs`, or `es` (Elasticsearch/OpenSearch).
- **`wikiroot`** (string, default: `.`): Filesystem root for `wikibackend=fs`.
- **`wikibucket`** (string, optional): S3 bucket for `wikibackend=s3` or `wikibackend=s3fs`.
- **`wikiprefix`** (string, optional): S3 key prefix for `s3`/`s3fs`; Elasticsearch index name for `es` (defaults to `mini_a_wiki`).
- **`wikiurl`** (string, optional): S3-compatible endpoint URL for `s3`/`s3fs`; Elasticsearch/OpenSearch base URL for `es` (this is the CLI-facing equivalent of the internal `esurl`).
- **`wikiaccesskey`** (string, optional): S3 access key for `s3`/`s3fs`; Elasticsearch username for `es`.
- **`wikisecret`** (string, optional): S3 secret key for `s3`/`s3fs`; Elasticsearch password for `es`.
- **`wikiregion`** (string, optional): S3 region for `s3`/`s3fs`.
- **`wikiuseversion1`** (boolean, default: `false`): Use S3 path-style/signature-v1 compatibility for `s3`/`s3fs`.
- **`wikiignorecertcheck`** (boolean, default: `false`): Disable TLS certificate checks for the S3 endpoint.
- **`wikilintstaleddays`** (number, default: `90`): Age threshold used by wiki lint stale-page checks.

For the Elasticsearch/OpenSearch wiki backend, there is no separate top-level `esurl=` runtime argument; use `wikiurl=` with `wikibackend=es`.
- **`mode`** (string): Apply a preset from [`mini-a-modes.yaml`](mini-a-modes.yaml), `~/.openaf-mini-a_modes.yaml`, or `~/.openaf-mini-a/modes.yaml` to prefill a bundle of related flags
- **`agent`** (string): Path to a markdown agent profile (or inline markdown text) with YAML frontmatter metadata. Supported keys include `model`, `capabilities` (`useshell`, `readwrite`, `useutils`, `usetools`), `tools` (MCP entries such as `type: ojob`, `type: stdio` + `cmd`, `type: remote`, or `type: sse`), `constraints` (appended to `rules`), `knowledge`, `youare`, and `mini-a` (map of direct Mini-A arg overrides). When the profile uses Markdown front matter, any text after the closing `---` is used as the default `goal=` input unless you pass `goal=` explicitly. (`agentfile` remains a backward-compatible alias.)

Expand Down
12 changes: 6 additions & 6 deletions docs/WHATS-NEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ See [docs/DELEGATION.md](DELEGATION.md) for full documentation including example
|-----------|---------|-------------|
| `usewiki` | `false` | Enable wiki knowledge base |
| `wikiaccess` | `ro` | `ro` or `rw` |
| `wikibackend` | `fs` | `fs` or `s3` |
| `wikibackend` | `fs` | `fs`, `s3`, `s3fs`, or `es` |
| `wikiroot` | `.` | Root directory (FS backend) |
| `wikibucket` | — | S3 bucket |
| `wikiprefix` | — | S3 key prefix |
| `wikiurl` | — | S3 endpoint URL |
| `wikiaccesskey` | — | S3 access key |
| `wikisecret` | — | S3 secret key |
| `wikibucket` | — | S3 bucket (`s3`/`s3fs`) |
| `wikiprefix` | — | S3 key prefix (`s3`/`s3fs`) or Elasticsearch index (`es`) |
| `wikiurl` | — | S3 endpoint URL or Elasticsearch/OpenSearch base URL (`esurl` internally) |
| `wikiaccesskey` | — | S3 access key or Elasticsearch username |
| `wikisecret` | — | S3 secret key or Elasticsearch password |
| `wikiregion` | — | S3 region |
| `wikiuseversion1` | `false` | S3 path-style signing |
| `wikiignorecertcheck` | `false` | Skip TLS cert check |
Expand Down
20 changes: 13 additions & 7 deletions mcps/mcp-wiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ help:
example : "8888"
mandatory: false
- name : wikibackend
desc : Wiki backend type (fs or s3)
desc : Wiki backend type (fs, s3, s3fs or es)
example : "fs"
mandatory: false
- name : wikiaccess
Expand All @@ -23,18 +23,18 @@ help:
example : "my-wiki-bucket"
mandatory: false
- name : wikiprefix
desc : S3 key prefix for s3 backend
desc : S3 key prefix for s3/s3fs backend, or Elasticsearch index for es backend
example : "wiki/"
mandatory: false
- name : wikiurl
desc : S3 endpoint/base URL
desc : S3 endpoint/base URL for s3/s3fs, or Elasticsearch/OpenSearch base URL for es (internal esurl)
example : "https://s3.amazonaws.com"
mandatory: false
- name : wikiaccesskey
desc : S3 access key
desc : S3 access key, or Elasticsearch username for es backend
mandatory: false
- name : wikisecret
desc : S3 secret key
desc : S3 secret key, or Elasticsearch password for es backend
mandatory: false
- name : wikiregion
desc : S3 region
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
loadLib("mini-a-wiki.js")

args.wikibackend = String(args.wikibackend).toLowerCase().trim()
if (["fs", "s3"].indexOf(args.wikibackend) < 0) args.wikibackend = "fs"
if (["fs", "s3", "es", "s3fs"].indexOf(args.wikibackend) < 0) args.wikibackend = "fs"

args.wikiaccess = String(args.wikiaccess).toLowerCase().trim()
if (["ro", "rw"].indexOf(args.wikiaccess) < 0) args.wikiaccess = "ro"
Expand All @@ -255,7 +255,7 @@ jobs:
backend: args.wikibackend
}

if (args.wikibackend === "s3") {
if (args.wikibackend === "s3" || args.wikibackend === "s3fs") {
cfg.bucket = args.wikibucket
cfg.prefix = args.wikiprefix
cfg.url = args.wikiurl
Expand All @@ -264,6 +264,12 @@ jobs:
cfg.region = args.wikiregion
cfg.useVersion1 = args.wikiuseversion1
cfg.ignoreCertCheck = args.wikiignorecertcheck
Comment thread
nmaguiar marked this conversation as resolved.
if (args.wikibackend === "s3fs") cfg.root = isString(args.wikiroot) && args.wikiroot.trim().length > 0 ? args.wikiroot.trim() : "."
} else if (args.wikibackend === "es") {
cfg.esurl = args.wikiurl
cfg.esindex = isString(args.wikiprefix) && args.wikiprefix.trim().length > 0 ? args.wikiprefix.trim() : "mini_a_wiki"
cfg.esuser = args.wikiaccesskey
cfg.espass = args.wikisecret
} else {
cfg.root = isString(args.wikiroot) && args.wikiroot.trim().length > 0 ? args.wikiroot.trim() : "."
}
Expand Down
10 changes: 5 additions & 5 deletions mini-a-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ help:
example : "rw"
mandatory: false
- name : wikibackend
desc : Wiki backend (fs or s3)
desc : Wiki backend (fs, s3, s3fs or es)
example : "fs"
mandatory: false
- name : wikiroot
Expand All @@ -660,19 +660,19 @@ help:
example : "mini-a-wiki"
mandatory: false
- name : wikiprefix
desc : Prefix path for the S3 wiki backend
desc : Prefix path for S3/s3fs wiki backends, or index name for the es backend
example : "wiki/"
mandatory: false
- name : wikiurl
desc : S3 endpoint URL for the wiki backend
desc : S3 endpoint URL for s3/s3fs, or Elasticsearch/OpenSearch base URL for es (internal esurl)
example : "https://s3.amazonaws.com"
mandatory: false
- name : wikiaccesskey
desc : S3 access key for the wiki backend
desc : S3 access key for s3/s3fs, or Elasticsearch username for es
example : "AKIA..."
mandatory: false
- name : wikisecret
desc : S3 secret key for the wiki backend
desc : S3 secret key for s3/s3fs, or Elasticsearch password for es
example : "secret"
mandatory: false
- name : wikiregion
Expand Down
Loading