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.
37 lines
1.4 KiB
TypeScript
37 lines
1.4 KiB
TypeScript
import { expect, test } from 'bun:test';
|
|
import { VERSION, versionLine } from '../src/version';
|
|
|
|
test('the version is a valid semver, prerelease allowed', () => {
|
|
expect(VERSION).toMatch(/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/);
|
|
});
|
|
|
|
test('package.json agrees with the compiled constant', async () => {
|
|
const pkg = (await Bun.file('package.json').json()) as { version?: string };
|
|
expect(pkg.version).toBe(VERSION);
|
|
});
|
|
|
|
test('the version line identifies the build', () => {
|
|
const line = versionLine();
|
|
expect(line).toContain('shiro-neko');
|
|
expect(line).toContain(VERSION);
|
|
expect(line).toContain(Bun.version);
|
|
expect(line).toContain(process.platform);
|
|
expect(line).toContain(process.arch);
|
|
});
|
|
|
|
test('running from source is reported as source', () => {
|
|
expect(versionLine()).toContain('source');
|
|
});
|
|
|
|
test('the release targets cover every platform we claim to ship', async () => {
|
|
const { TARGETS } = await import('../scripts/release');
|
|
const names = TARGETS.map((t) => t.name);
|
|
expect(names).toEqual(['linux-x64', 'linux-arm64', 'darwin-x64', 'darwin-arm64', 'windows-x64']);
|
|
expect(TARGETS.filter((t) => t.windows)).toHaveLength(1);
|
|
});
|
|
|
|
test('every release target is a real bun target triple', async () => {
|
|
const { TARGETS } = await import('../scripts/release');
|
|
for (const t of TARGETS) expect(t.target).toMatch(/^bun-(linux|darwin|windows)-(x64|arm64)$/);
|
|
});
|