0
Fork 0
mirror of https://github.com/TanStack/ai.git synced 2026-11-18 19:34:58 +00:00
Commit graph

6 commits

Author SHA1 Message Date
github-actions[bot]
1999af2267
docs: regenerate API documentation (#1260)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-28 11:42:19 +02:00
github-actions[bot]
f4f32bdcc2
docs: regenerate API documentation (#1195)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-22 08:16:20 +00:00
github-actions[bot]
b98aa8b429
docs: regenerate API documentation (#1188)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-21 21:20:02 +00:00
github-actions[bot]
0c0c54b92a
docs: regenerate API documentation (#1155)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-19 19:30:00 +02:00
github-actions[bot]
5701bf5184
docs: regenerate API documentation (#1141)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 19:53:35 +02:00
Jack Herrington
0fb826321c
refactor(code-mode)!: rename Code Mode "skills" to "snippets" (#1114)
* refactor(code-mode)!: rename Code Mode "skills" to "snippets"

Disambiguates Code Mode's runtime code library from the agent/provider
"skills" systems (the SKILL.md packaging feature). Breaking rename of the
package, its public API, and the Code Mode wire contract.

- Package: `@tanstack/ai-code-mode-skills` -> `@tanstack/ai-code-mode-snippets`
  (dir `packages/ai-code-mode-skills` -> `packages/ai-code-mode-snippets`)
- API: `codeModeWithSkills`->`codeModeWithSnippets`, `snippetsToTools`,
  `snippetsToBindings`, `selectRelevantSnippets`, `createSnippetManagementTools`,
  `createSnippetsSystemPrompt`, `generateSnippetTypes`,
  `createFile/MemorySnippetStorage`, all `Snippet*` types/options
- Runtime tools: `search_snippets`/`get_snippet`/`register_snippet`; sandbox
  binding prefix `snippet_`
- Wire contract (`@tanstack/ai`): events `code_mode:snippet_*`,
  `snippet:registered`; types `CodeModeSnippet*Event`/`SnippetRegisteredEvent`
- Sandbox hook (`@tanstack/ai-code-mode`): `createCodeModeTool` option
  `getSkillBindings` -> `getSnippetBindings`
- Updated example `ts-code-mode-web`, docs, and reference docs

Agent/provider skills (packages/*/skills, SKILL.md, provider skills-wire)
are intentionally untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: apply automated fixes

* docs/test: address CodeRabbit review (rename-related fixes)

- Rename leftover test-cli id `SKL` -> `SNP` (skill abbreviation)
- Fix inaccurate "client-side" execution claim in provider-skills.md and
  ai-core/tool-calling SKILL.md (snippets run in a local isolate, not
  necessarily client-side)
- Package README: correct `registry` -> `toolsRegistry` return field; add
  `text` language to bare fence
- code-mode-with-snippets.md: add `text` language to two bare fences (MD040)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(code-mode-snippets): reject path traversal in snippet names

`createFileSnippetStorage` used the LLM-supplied snippet name directly as an
on-disk path segment (`join(directory, name)`) in get/save/delete, so a name
like `../../x` could read, write, or delete files outside the storage
directory. Snippet names are already identifier-shaped (they double as
`snippet_<name>` sandbox tool names), so names are now validated against
`/^[A-Za-z0-9_-]+$/`: save/delete throw and get returns null for unsafe names.

Addresses a CodeRabbit finding (pre-existing under the old skills storage).
Adds regression tests covering traversal attempts and ordinary names.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: apply automated fixes

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-15 15:57:37 -07:00
Renamed from docs/reference/interfaces/CodeModeSkillErrorEvent.md (Browse further)