Initial commit: shiro-neko 0.1.0-beta.1
Agentic coding CLI on Bun, Ink, and the AI SDK. Core: streamText loop with SDK-level tool approval so a denied call provably never executes; endpoint fallback for OpenAI reasoning models; retry with backoff. Tools: read/write/edit/glob/grep/bash, path-jailed, gitignore-aware, ripgrep with a JS fallback, binary rejection, live bash streaming. Agents: five variants crossing thinking level with tool restriction; plan and review withhold mutating tools from the model. Extensibility: frontmatter skills with on-demand bodies, plugin host with blocking hooks, MCP stdio and HTTP, read-only subagents. State: durable per-project memory, session task lists, session persistence, compaction that repairs provider-item dependencies. Distribution: five-platform cross-compiled binaries with checksums, install scripts, CI on three operating systems. 404 tests, typecheck clean.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import type { AppHooks } from '../src/ui/App';
|
||||
|
||||
/** Default AppHooks for UI tests; override only what a test cares about. */
|
||||
export function testHooks(over: Partial<AppHooks> = {}): AppHooks {
|
||||
return {
|
||||
sessionId: 'test1234',
|
||||
config: () => ({ provider: 'openai', model: 'gpt-5' }),
|
||||
switchModel: (id) => `model is now ${id}`,
|
||||
switchAgent: (name) => `agent is now ${name}`,
|
||||
switchThinking: (level) => `thinking is now ${level}`,
|
||||
agentName: () => 'default',
|
||||
thinkingLevel: () => 'medium',
|
||||
applyProvider: async () => 'configured',
|
||||
listModels: async () => ({ models: [] }),
|
||||
listSessions: async () => 'no saved sessions',
|
||||
listSkills: () => 'no skills loaded',
|
||||
listPlugins: () => 'no plugins active',
|
||||
listMemory: async () => 'nothing remembered yet',
|
||||
summarizeMemory: async () => 'nothing to compact',
|
||||
resumeSession: async () => 'resumed',
|
||||
saveSession: async () => 'saved',
|
||||
instructionFiles: () => [],
|
||||
initPrompt: 'write AGENTS.md',
|
||||
history: [],
|
||||
recordPrompt: () => {},
|
||||
...over,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user