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
7 changes: 2 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
OPENAI_API_KEY=
OPENAI_MODEL=
OPENAI_RESPONSES_BASE_URL=https://api.openai.com/v1
OPENAI_REASONING_EFFORT=
OPENAI_MAX_OUTPUT_TOKENS=
SANTI_CONFIG=
SANTI_PROVIDER=
7 changes: 4 additions & 3 deletions .github/workflows/guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ jobs:

- name: Start API
env:
OPENAI_API_KEY: ci-placeholder
OPENAI_MODEL: ci-placeholder
OPENAI_RESPONSES_BASE_URL: https://api.openai.com/v1
SANTI_CONFIG: santi.example.toml
SANTI_PROVIDERS_OPENAI_API_KEY: ci-placeholder
SANTI_PROVIDERS_OPENAI_MODEL: ci-placeholder
SANTI_PROVIDERS_OPENAI_BASE_URL: https://api.openai.com/v1
SANTI_HOST: 127.0.0.1
SANTI_DB: .tmp/ci.sqlite
SANTI_PORT: 43307
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.env
.env.local
santi.toml
.local/
.task/
.playwright-cli/
Expand Down
41 changes: 31 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Keep directory ownership strict while keeping the product semantics small.

- single-person conversations with one configured AI assistant
- normalized message and response-run persistence
- provider-abstracted model streaming with an OpenAI Responses implementation
- provider-abstracted model streaming with OpenAI Responses and DeepSeek Chat
Completions implementations
- a Rust server with OpenAPI-exported contracts
- a web client generated against those contracts

Expand All @@ -35,7 +36,7 @@ Keep directory ownership strict while keeping the product semantics small.
- delivery targets, delivery workers, or retry leases
- product-specific sidecar semantics beyond the local cell/soma dev runtime
- Tauri, native macOS projections, or packaged platform launchers
- legacy OpenAI completions or chat completions compatibility
- legacy OpenAI completions compatibility

## Repository Structure

Expand Down Expand Up @@ -98,6 +99,15 @@ plane and must stay limited to cell lifecycle facts.
diagnostic, log, database, and temp paths must come from store.
- Inspect socket paths are transport addresses, not persistent app paths. They
may use OS IPC locations but must not become storage roots.
- Workspace context uses core-owned URI schemes as the only semantic truth
source:
- `soul://` is the current soul workspace.
- `session://` is the current session workspace.
- `soul://MEMORY.md` and `session://MEMORY.md` are the canonical memory
resources rendered into the system prompt.
- Tool inputs, system prompt material, and UI/material source labels must use
these URI schemes through core constants/helpers, not hand-written strings.
- Do not use or accept old `@` workspace aliases.

## Execution Rules

Expand All @@ -113,8 +123,8 @@ plane and must stay limited to cell lifecycle facts.
`mini-stim-server-soma` bin.
- `packages/contracts` must be generated from the Rust OpenAPI source of truth.
- Do not hand-maintain divergent client/server DTOs.
- Use the provider boundary even when only OpenAI is configured. Do not add
legacy completions paths.
- Use the provider boundary even when only one concrete provider is configured.
Do not add legacy OpenAI completions paths.
- If the expected local environment or command is unavailable, report the
missing prerequisite directly and stop that path. Do not spend time inventing
fallbacks or exploring unrelated environment workarounds unless the user asks.
Expand Down Expand Up @@ -388,14 +398,25 @@ surface before considering any alternate browser layer.

## Environment

`.env` is local and ignored by git. Required OpenAI settings:
Local app config defaults to `<cwd>/santi.toml`, created from the committed
`santi.example.toml`. `santi.toml` is ignored by git and owns local API keys,
model parameters, and the default active provider.

```text
OPENAI_API_KEY=
OPENAI_MODEL=
OPENAI_RESPONSES_BASE_URL=https://api.openai.com/v1
OPENAI_REASONING_EFFORT=
OPENAI_MAX_OUTPUT_TOKENS=
cp santi.example.toml santi.toml
```

Config resolution is modeled by `mini-stim-server-soma`'s `ConfigService`.
Config path resolves as:

```text
--config > SANTI_CONFIG > ./santi.toml
```

Provider selection resolves as:

```text
--provider > config.provider > SANTI_PROVIDER > openai
```

Server soma settings:
Expand Down
176 changes: 176 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async-stream = "0.3.6"
async-trait = "0.1.89"
axum = { version = "0.8.9", features = ["macros"] }
bytes = "1.11.1"
clap = { version = "4.6.1", features = ["derive"] }
dotenvy = "0.15.7"
futures-core = "0.3.32"
futures-util = "0.3.32"
Expand All @@ -37,6 +38,7 @@ serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.150"
tokio = { version = "1.52.3", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
tokio-stream = "0.1.18"
toml = "1.1.2"
tower-http = { version = "0.6.11", features = ["cors", "trace"] }
utoipa = { version = "5.5.0", features = ["axum_extras"] }
uuid = { version = "1.23.3", features = ["v4"] }
Loading
Loading