Skip to content

Commit 79d4839

Browse files
authored
Merge branch 'main' into fix/issue-1221-ask-max-tokens
2 parents 92120f6 + 93d10f1 commit 79d4839

4 files changed

Lines changed: 53 additions & 14 deletions

File tree

.claude/skills/process-discussions/SKILL.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ and reply is approved by him before posting. You prepare; he decides.
1414

1515
This process was calibrated by hand on 2026-08-16 across 10 Ideas
1616
(#1210#1265) and re-run on 2026-09-02 (6 follow-ups + 3 new ideas), which
17-
added the `incubating` status and the pull rule. The patterns below are
18-
ratified practice, not theory.
17+
added the `incubating` status and the pull rule, and again on 2026-09-05
18+
(4 follow-ups), which added the one-decision-at-a-time format and the
19+
close-when-graduated-work-lands rule. The patterns below are ratified
20+
practice, not theory.
1921

2022
**Ground rules:**
2123

@@ -123,6 +125,16 @@ and close the Discussion as resolved (`closeDiscussion(reason: RESOLVED)`);
123125
an open thread with a final answer clutters the queue. Anyone can reopen
124126
with a new argument.
125127

128+
**Close when graduated work lands** (ratified 2026-09-05). A thread whose
129+
needs have all either shipped or been routed elsewhere is done the moment
130+
the last fix is merged to `main` — do not wait for a versioned release.
131+
Post a closing reply that names the merged PR(s), says the change ships
132+
with the next release, and points testers at the `v1-dev` Docker image
133+
(rebuilt on every push to `main`), then close as resolved. Precedents:
134+
#1236 (editor bugs), #1243 (Crawl4AI token). Detecting this state is part
135+
of Phase 0: for every graduated Issue linked from an open thread, check
136+
whether it closed since the last run.
137+
126138
**Graduation rules** (for `accepted → graduated` and `bug`):
127139
- Issue gets: Context (with Discussion origin link), Expected outcome,
128140
Out of scope, Acceptance criteria, References. Label `ready` (+ `bug` when
@@ -178,8 +190,23 @@ compliments about the question itself.
178190

179191
## Phase 4 — Approval gate, then post
180192

181-
Present to the owner: ficha (compact), proposed outcome, full draft reply,
182-
and any issues/renames/closures the package includes. After approval:
193+
**One decision at a time** (owner preference, 2026-09-05). After the
194+
Phase 0 ledger, present decisions sequentially — never a batch. Each one
195+
uses this fixed format, in the owner's language:
196+
197+
1. **ID + title**
198+
2. **Resumo** — what the thread is, how it was decomposed, current status
199+
3. **Último movimento** — who did what, when; what changed since the last run
200+
(a graduated Issue closing, an upstream release, a user answering)
201+
4. **Sugestão ou dúvida** — the proposed outcome, the full draft reply,
202+
and every side action the package includes (Issues to open, renames,
203+
closures); or the concrete question when the call is the owner's. When
204+
offering options, label them (a)/(b)/(c) and say which one you recommend
205+
206+
On approval, execute the whole package in the order below (side actions
207+
first, reply last), report the URLs, then present the next decision.
208+
Number them ("Decisão 2 de 4") so the owner knows the size of the session.
209+
After approval:
183210

184211
- Write bodies to scratchpad files; post via GraphQL (`addDiscussionComment`,
185212
`updateDiscussion` for renames) with `-F body=@file` — avoids shell

.env.example

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ SURREAL_NAMESPACE=open_notebook
2323
SURREAL_DATABASE=open_notebook
2424

2525
# =============================================================================
26-
# OPTIONAL: AI Provider API Keys
26+
# DEPRECATED: AI Provider API Keys (environment-variable fallback)
2727
# =============================================================================
28-
# You can configure these via the UI (Settings → API Keys) or set them here
29-
# UI configuration is recommended for better security and flexibility
28+
# Configure AI providers via the UI: Settings → API Keys. Credentials are
29+
# stored encrypted, can be rotated without restarts, and support multiple
30+
# credentials per provider.
31+
#
32+
# The environment variables below are a DEPRECATED fallback. They still work
33+
# today, but there is no guarantee they keep working in future releases, and
34+
# new automation should not be built on them. A declarative provisioning
35+
# contract for headless/CI/Docker setups is being designed in
36+
# https://github.com/lfnovo/open-notebook/discussions/765
3037

3138
# OpenAI
3239
# OPENAI_API_KEY=sk-...
@@ -47,10 +54,11 @@ SURREAL_DATABASE=open_notebook
4754
# External API URL (for webhooks, callbacks, etc.)
4855
# API_URL=http://localhost:5055
4956

50-
# Ollama endpoint (if running locally)
57+
# Ollama endpoint — DEPRECATED fallback, configure via Settings → API Keys instead
5158
# OLLAMA_API_BASE=http://localhost:11434
5259

53-
# oMLX (Apple Silicon) — prefer Settings → API Keys; port 11435 avoids SurrealDB on 8000
60+
# oMLX (Apple Silicon) — DEPRECATED fallback, configure via Settings → API Keys instead
61+
# Port 11435 avoids clashing with SurrealDB on 8000
5462
# OMLX_API_BASE=http://localhost:11435/v1
5563
# OMLX_API_KEY= # optional; only if oMLX was started with --api-key
5664

docs/5-CONFIGURATION/environment-reference.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ env | grep -E "^[A-Z_]+=" | sort
259259
- **Quote values:** Use quotes for values with spaces: `API_URL="http://my server:5055"`
260260
- **Restart required:** Changes take effect after restarting services
261261
- **Secrets:** Don't commit encryption keys or passwords to git
262-
- **AI Providers:** Configure via **Settings → API Keys** in the browser (not via env vars)
262+
- **AI Providers:** Configure via **Settings → API Keys** in the browser. The provider env vars listed under [Legacy](#legacy-ai-provider-environment-variables-deprecated) are a deprecated fallback
263263
- **Migration:** Use Settings UI to migrate existing env vars to the credential system. See [API Configuration](../3-USER-GUIDE/api-configuration.md#migrating-from-environment-variables)
264264

265265
---
@@ -283,7 +283,11 @@ Done!
283283

284284
## Legacy: AI Provider Environment Variables (Deprecated)
285285

286-
> **Deprecated**: The following AI provider API key environment variables are deprecated. Configure providers via the Settings UI instead. These variables may still work as a fallback but are no longer recommended.
286+
> **Deprecated**: The following AI provider environment variables are a deprecated fallback. They still work today (the runtime reads the database first and falls back to the environment), but there is no guarantee they keep working in future releases, and new automation should not be built on them. Configure providers via **Settings → API Keys** instead.
287+
288+
Why the UI is the source of truth: credentials in the database are encrypted at rest (via `OPEN_NOTEBOOK_ENCRYPTION_KEY`), can be added or rotated at runtime without restarts, and support multiple credentials per provider — none of which a single env var can express.
289+
290+
**Headless, CI/CD and Docker deployments:** a declarative provisioning contract over the credentials API (a file describing providers and credentials, with `${VAR}`-style references resolved from the environment) is being designed in [Discussion #765](https://github.com/lfnovo/open-notebook/discussions/765). Until it ships, the env fallback is the only unattended path — use it knowing it is deprecated.
287291

288292
If you have these variables configured from a previous installation, click the **Migrate to Database** button in **Settings → API Keys** to import them into the credential system, then remove them from your configuration.
289293

docs/5-CONFIGURATION/ollama.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ ollama pull mxbai-embed-large # Best embedding model for Ollama
4545
4. Click **Save**, then **Test Connection**
4646
5. Click **Discover Models****Register Models**
4747

48-
**Legacy (Deprecated) — Environment variables:**
48+
**Environment variable fallback (Deprecated):**
4949
```bash
5050
# For local installation:
5151
export OLLAMA_API_BASE=http://localhost:11434
5252
# For Docker installation:
5353
export OLLAMA_API_BASE=http://host.docker.internal:11434
5454
```
5555

56-
> **Note**: The `OLLAMA_API_BASE` environment variable is deprecated. Configure Ollama via Settings → API Keys instead.
56+
> **Deprecated**: `OLLAMA_API_BASE` is a deprecated fallback. It still works today, but there is no guarantee it keeps working in future releases, and new automation should not be built on it. Configure Ollama via **Settings → API Keys** instead. For headless/CI/Docker setups, see the [environment reference](environment-reference.md#legacy-ai-provider-environment-variables-deprecated) and the provisioning discussion in [#765](https://github.com/lfnovo/open-notebook/discussions/765).
5757
5858
## Network Configuration Guide
5959

@@ -543,7 +543,7 @@ export OLLAMA_NUM_PARALLEL=4 # Parallel request handling
543543
export OLLAMA_FLASH_ATTENTION=1 # Enable flash attention (if supported)
544544
545545
# Open Notebook configuration (configure via Settings → API Keys instead)
546-
# OLLAMA_API_BASE=http://localhost:11434 # Deprecated — use Settings UI
546+
# OLLAMA_API_BASE=http://localhost:11434 # Deprecated fallback — works today, no guarantee
547547
```
548548

549549
### SSL Configuration (Self-Signed Certificates)

0 commit comments

Comments
 (0)