Commit Graph

7 Commits

  • refactor: rename custom provider examples
    - custom-provider -> custom-provider-anthropic
    - gitlab-duo -> custom-provider-gitlab-duo
    - Update READMEs with custom provider section
  • docs: update extension examples READMEs and fix plan-mode references
    - Add missing extensions to examples/extensions/README.md:
      questionnaire.ts, truncated-tool.ts, model-status.ts, rainbow-editor.ts,
      custom-footer.ts, custom-header.ts, overlay-test.ts, shutdown-command.ts,
      interactive-shell.ts, claude-rules.ts, mac-system-theme.ts
    - Update plan-mode.ts -> plan-mode/ (now a directory)
    - Add new System Integration section
    - Update docs/extensions.md plan-mode.ts -> plan-mode/index.ts (17 refs)
    - Add questionnaire.ts to registerTool and ctx.ui.select() examples
    - Expand examples/README.md description
  • Merge hooks and custom-tools into unified extensions system (#454)
    Breaking changes:
    - Settings: 'hooks' and 'customTools' arrays replaced with 'extensions'
    - CLI: '--hook' and '--tool' flags replaced with '--extension' / '-e'
    - API: HookMessage renamed to CustomMessage, role 'hookMessage' to 'custom'
    - API: FileSlashCommand renamed to PromptTemplate
    - API: discoverSlashCommands() renamed to discoverPromptTemplates()
    - Directories: commands/ renamed to prompts/ for prompt templates
    
    Migration:
    - Session version bumped to 3 (auto-migrates v2 sessions)
    - Old 'hookMessage' role entries converted to 'custom'
    
    Structural changes:
    - src/core/hooks/ and src/core/custom-tools/ merged into src/core/extensions/
    - src/core/slash-commands.ts renamed to src/core/prompt-templates.ts
    - examples/hooks/ and examples/custom-tools/ merged into examples/extensions/
    - docs/hooks.md and docs/custom-tools.md merged into docs/extensions.md
    
    New test coverage:
    - test/extensions-runner.test.ts (10 tests)
    - test/extensions-discovery.test.ts (26 tests)
    - test/prompt-templates.test.ts
  • Add todo hook companion to todo custom tool
    - /todos command displays all todos on current branch with custom UI
    - Update hooks.md to clarify components must not be wrapped in Box/Container
    - Cross-reference tool and hook in example READMEs
  • Update docs for ctx.ui.editor() and handoff example
    - Added ctx.ui.editor() to hooks.md and custom-tools.md
    - Added ctx.ui.editor() to CHANGELOG.md
    - Added handoff.ts to examples/hooks/README.md
  • Add SDK usage examples
    12 examples showing increasing levels of customization:
    - 01-minimal: all defaults
    - 02-custom-model: model and thinking level
    - 03-custom-prompt: replace or modify prompt
    - 04-skills: discover, filter, merge skills
    - 05-tools: built-in tools, custom tools
    - 06-hooks: logging, blocking, result modification
    - 07-context-files: AGENTS.md files
    - 08-slash-commands: file-based commands
    - 09-api-keys-and-oauth: API key resolution, OAuth config
    - 10-settings: compaction, retry, terminal settings
    - 11-sessions: persistence options
    - 12-full-control: replace everything
    
    Also exports FileSlashCommand type from index.ts