Commit 2a548e7
authored
* test: add mode-contract tests for tool separation verification
* refactor: extract Skyfire augmentation and add unit tests (PR #10) (#482)
* refactor: extract Skyfire augmentation into pure function and add unit tests
- Extract applySkyfireAugmentation() from upsertTools() inline logic into src/utils/tools.ts
- Simplify upsertTools() to a 4-line loop delegating to the pure function
- Remove unused SKYFIRE_* imports from server.ts
- Add 35 unit tests covering eligibility, idempotency, frozen originals, and function preservation
* refactor: rename all files from kebab-case to snake_case (#489)
* refactor: rename all files from kebab-case to snake_case
Use git mv to rename all source files (src/, tests/, evals/, res/, scripts/)
from kebab-case to snake_case naming convention. Import paths are not yet
updated and will be fixed in the next commit.
* refactor: update all imports and references to use snake_case filenames
Fix all import paths, package.json exports/scripts, and documentation
references to match the renamed snake_case files. Add explicit NEVER
use kebab-case rule to AGENTS.md naming conventions.
* refactor: enforce one-file-per-tool in common/ directory (#491)
* refactor: split common/ multi-tool files into one file per tool
- dataset.ts → get_dataset.ts, get_dataset_items.ts, get_dataset_schema.ts
- key_value_store.ts → get_key_value_store.ts, get_key_value_store_keys.ts, get_key_value_store_record.ts
- run.ts → get_actor_run_log.ts, abort_actor_run.ts
- helpers.ts → add_actor.ts (renamed to match tool name)
* refactor: replace duplicated tool categories with unified mode-aware resolver (#494)
Replace buildCategories() + static toolCategories duplication with a single
unified category definition using mode-aware entries (ModeMap) and a generic
getCategoryTools(mode) resolver.
Key changes:
- Add ServerMode type ('default' | 'openai') as string union, normalize once
at server construction via options.uiMode ?? 'default'
- Replace ternary mode dispatch with Record<ServerMode, ...> map lookups
(actorExecutorsByMode, instructionsByMode)
- Add parseUiMode() boundary validator for untrusted input (URL params, env vars)
- Make mode required in all tool-resolving functions to prevent wrong-mode bugs
- Keep mode out of invariant functions (getExpectedToolNamesByCategories,
getUnauthEnabledToolCategories, isApiTokenRequired) that never branch on mode
- Add contract test enforcing tool name invariance across modes
1 parent 614f9d9 commit 2a548e7
File tree
121 files changed
+1600
-931
lines changed- evals
- workflows
- res
- scripts
- src
- actor
- mcp
- prompts
- resources
- tools
- common
- core
- default
- openai
- utils
- server-instructions
- tests
- integration
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
121 files changed
+1600
-931
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
File renamed without changes.
File renamed without changes.
0 commit comments