Skip to content

Commit 6c78ec0

Browse files
AlexMikhalevforge-adminAlex
authored
Release v1.19.2 (#883)
* fix(security): char-safe truncation in sanitize_system_prompt Fixes #1721 Replace byte-slice truncation prompt[..MAX_PROMPT_LENGTH] with prompt.chars().take(MAX_PROMPT_LENGTH).collect() to prevent panic when MAX_PROMPT_LENGTH falls inside a multi-byte UTF-8 character. Adds test_sanitize_multibyte_boundary to verify correct behaviour. * trigger: rebuild after repo cleanup * fix(clippy): remaining field-reassign-with-default and unnecessary cast Refs #1721 * trigger: rebuild with clean repo * trigger: rebuild webhook test * trigger: full-clone pipeline test Refs #1721 * trigger: pipeline test with full clone Refs #1721 * trigger: depth=1 fetch pipeline test Refs #1721 * ci: e2e pipeline test from local Refs #1721 * ci: selective refspec pipeline test Refs #1721 * ci: final pipeline test with webhook ready Refs #1721 * style: cargo fmt for role_llm_api_key test Refs #1721 * fix: remove accidentally committed project.rs Refs #1721 * ci: fresh clone pipeline test Refs #1721 * fix(build-runner): tee output to file and fix BUILD.md parsing - Redirect all command output through tee to build-output.log - ADF agent runner truncates stderr at ~8KB, hiding clippy/build/test results - Fix parse_build_md: was concatenating lines without newlines - BUILD_LOG set to $ADF_WORKING_DIR/build-output.log per run Refs #1721 * feat(config): implement project-level config discovery for .terraphim/ - Add project.rs with discover() function that walks up from cwd to find .terraphim/ - Change global_shortcut from String to Option<String> in Config - Add merge_with() and with_project() methods to ConfigBuilder - Update TuiService::new to accept no_project_config parameter - Add merge_project_config() helper that discovers and merges project config - Update all call sites and tests to use new signatures Refs #1674 * feat(config): implement project-level config discovery for .terraphim/ - Add project.rs with discover() function that walks up from cwd to find .terraphim/ - Change global_shortcut from String to Option<String> in Config - Add merge_with() and with_project() methods to ConfigBuilder - Update TuiService::new to accept no_project_config parameter - Add merge_project_config() helper that discovers and merges project config - Update all call sites and tests to use new signatures Refs #1674 * fix(config): remove needless borrows in project.rs clippy warnings - cargo clippy -D warnings caught &real.join() where real.join() works - Affects create_dir_all and canonicalize calls in test Refs #1721 * docs: update project-level config discovery documentation - Add project-level config discovery section to terraphim_config summary - Update main summary.md with new ProjectConfig type and discovery feature - Add release announcement to .docs/releases/v2026.05.19.md Refs: project config discovery feature (commits 59cd233, 26f5b87) * fix(security): char-safe truncation in sanitize_system_prompt and build-runner fixes - Replace byte-indexed prompt truncation with .chars().take() to prevent UTF-8 byte-boundary panic in sanitize_system_prompt (Fixes #1721) - Add test_sanitize_multibyte_boundary test for char-safe truncation - Implement project-level config discovery for .terraphim/ directories - Fix build-runner-llm.sh: pipefail for correct exit codes, tee output to build-output.log (ADF truncates stderr), fix parse_build_md command extraction - Fix clippy warnings: needless_borrows_for_generic_args in project.rs, unnecessary_cast in llm_bridge.rs, field-reassign-with-default in config - Revert incorrect TuiService::new(None, false) to TuiService::new(None) - Fix global_shortcut Option<String> consistency across test files - Mark LLM bridge integration tests as #[ignore] (require live client) Refs #1721 * docs: add release announcement for v2026.05.19 Refs: release v2026.05.19 * chore: bump version to 1.19.1 for release * chore: bump version to 1.19.2 --------- Co-authored-by: forge-admin <admin@terraphim-forge.local> Co-authored-by: Alex <alex@example.com>
1 parent d44e8cf commit 6c78ec0

47 files changed

Lines changed: 475 additions & 137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.docs/releases/v2026.05.19.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Release v2026.05.19
2+
3+
**Date:** 2026-05-19
4+
**Author:** Alex
5+
6+
## Highlights
7+
8+
### Project-Level Config Discovery for terraphim-agent
9+
10+
This release introduces project-level configuration support for `terraphim-agent`, enabling developers to define project-specific roles, global shortcuts, and configuration overrides in a `.terraphim/config.json` file within their project directories.
11+
12+
**Key Features:**
13+
- **Automatic Discovery**: Searches parent directories for `.terraphim/` directory starting from current working directory
14+
- **Role Merging**: Project-specific roles override global roles by `RoleName` (full replacement, not deep merge)
15+
- **Global Shortcut**: Optional `global_shortcut` field allows project configs to omit it
16+
- **Non-Invasive**: Global config remains unchanged; project config is optional
17+
18+
**Usage:**
19+
```json
20+
{
21+
"global_shortcut": "Cmd+K",
22+
"roles": {
23+
"MyProjectRole": {
24+
"haystacks": ["/path/to/project/docs"],
25+
...
26+
}
27+
}
28+
}
29+
```
30+
31+
### Security Fix
32+
33+
- **fix(security): char-safe truncation in sanitize_system_prompt** (Fixes #1721)
34+
35+
### Build Improvements
36+
37+
- **fix(build-runner): tee output to file and fix BUILD.md parsing**
38+
39+
## Full Changelog
40+
41+
| Commit | Description |
42+
|--------|-------------|
43+
| `59cd233b7` | feat(config): implement project-level config discovery for .terraphim/ |
44+
| `26f5b8728` | feat(config): implement project-level config discovery for .terraphim/ |
45+
| `82c746757` | fix(config): remove needless borrows in project.rs clippy warnings |
46+
| `511813479` | fix(security): char-safe truncation in sanitize_system_prompt Fixes #1721 |
47+
| `0b1ebf9d2` | fix(build-runner): tee output to file and fix BUILD.md parsing |
48+
49+
## Upgrade Notes
50+
51+
No breaking changes. Project-level config is entirely optional and backward-compatible with existing global configurations.
52+
53+
## Related Issues
54+
55+
- #1721 - Security: UTF-8 boundary panic in sanitize_system_prompt

‎.docs/summary-crates-terraphim_config-src-lib.rs.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
2. Saved config retrieved from persistence layer
88
3. Hard-coded defaults in `terraphim_server/default/`
99

10+
**Project-Level Config Discovery:**
11+
- Searches parent directories for `.terraphim/` directory starting from current working directory
12+
- Enables project-specific roles, global shortcuts, and configuration overrides
13+
- Merged with global config via `Config::with_project()` and `Config::merge_with()`
14+
- Roles merged by `RoleName`: project role fully replaces global role (no deep merge)
15+
- `global_shortcut` field is optional in project configs
16+
1017
**Key Types:**
1118
- **`Config`**: Top-level configuration holding all roles, global shortcut, default/selected role
1219
- **`Role`**: User profile with haystacks, relevance function, theme, LLM settings

‎.docs/summary.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ User Query
9797
- `Role`: User profile with haystacks, relevance function, theme, LLM settings
9898
- `Haystack`: Data source descriptor with service type
9999
- `KnowledgeGraph`: Automata path and/or local KG files
100+
- `ProjectConfig`: Project-level overrides in `.terraphim/config.json`
101+
102+
**Project-Level Config Discovery:**
103+
- Searches parent directories for `.terraphim/` directory starting from CWD
104+
- Enables project-specific roles, global shortcuts, and configuration overrides
105+
- Merged with global config via `Config::with_project()` and `Config::merge_with()`
106+
- Roles merged by `RoleName`: project role fully replaces global role
107+
- Optional `global_shortcut` field allows project configs to omit it
100108

101109
**Service Types Supported:**
102110
- Ripgrep, Atomic Server, QueryRs, ClickUp, MCP, Perplexity, GrepApp, AiAssistant, Quickwit, JMAP

‎Cargo.lock‎

Lines changed: 26 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ exclude = [
4444
default-members = ["terraphim_server"]
4545

4646
[workspace.package]
47-
version = "1.17.1"
47+
version = "1.19.2"
4848
edition = "2024"
4949

5050
[workspace.dependencies]

‎crates/haystack_grepapp/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT"
88
repository = "https://github.com/terraphim/terraphim-ai"
99

1010
[dependencies]
11-
haystack_core = { path = "../haystack_core", version = "1.0.0" }
11+
haystack_core = { path = "../haystack_core", version = "1.19.2" }
1212
terraphim_types = { path = "../terraphim_types", version = "1.0.0" }
1313
reqwest = { workspace = true, features = ["json", "rustls-tls"] }
1414

‎crates/haystack_jmap/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "haystack_jmap"
3-
version = "1.0.0"
3+
version = "1.19.2"
44
edition.workspace = true
55
license = "MIT"
66

‎crates/terraphim-markdown-parser/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "terraphim-markdown-parser"
3-
version = "1.0.0"
3+
version = "1.19.2"
44
edition.workspace = true
55
authors = ["Terraphim Contributors"]
66
description = "Terraphim Markdown Parser"

‎crates/terraphim-session-analyzer/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ tracing = { workspace = true }
7878
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
7979

8080
# Feature-gated Terraphim dependencies (sibling crates in workspace)
81-
terraphim_automata = { path = "../terraphim_automata", version = "1.0.0", optional = true }
81+
terraphim_automata = { path = "../terraphim_automata", version = "1.19.2", optional = true }
8282
terraphim_types = { path = "../terraphim_types", version = "1.0.0", optional = true }
8383
terraphim_config = { path = "../terraphim_config", version = "1.0.0", optional = true }
8484

‎crates/terraphim_agent/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ terraphim_types = { path = "../terraphim_types", version = "1.0.0" }
7272
terraphim_settings = { path = "../terraphim_settings", version = "1.0.0" }
7373
terraphim_persistence = { path = "../terraphim_persistence", version = "1.0.0" }
7474
terraphim_config = { path = "../terraphim_config", version = "1.0.0" }
75-
terraphim_automata = { path = "../terraphim_automata", version = "1.0.0" }
75+
terraphim_automata = { path = "../terraphim_automata", version = "1.19.2" }
7676
terraphim_service = { path = "../terraphim_service", version = "1.0.0", default-features = false }
7777
terraphim_middleware = { path = "../terraphim_middleware", version = "1.0.0" }
7878
terraphim_rolegraph = { path = "../terraphim_rolegraph", version = "1.0.0" }

0 commit comments

Comments
 (0)