feat(runtime): forward Flynn prompt to pi and harden backend mode commands

This commit is contained in:
William Valentin
2026-02-24 10:41:27 -08:00
parent 4188c68130
commit 2e192ef407
9 changed files with 305 additions and 6 deletions
+5
View File
@@ -343,6 +343,11 @@ describe('builtin /skill command', () => {
});
describe('builtin /backend command', () => {
it('registers /runtime as an alias', () => {
const cmd = createBackendCommand();
expect(cmd.aliases).toContain('runtime');
});
it('passes subcommand input to backendCommand service', async () => {
const cmd = createBackendCommand();
const backendCommand = vi.fn(() => 'Pi backend deactivated.');
+2 -1
View File
@@ -359,7 +359,8 @@ export function createSkillCommand(): CommandDefinition {
export function createBackendCommand(): CommandDefinition {
return {
name: 'backend',
description: 'Inspect or control runtime backend mode (status, activate pi, deactivate pi)',
aliases: ['runtime'],
description: 'Inspect or control runtime backend mode (status, activate pi, deactivate pi, use config)',
execute: async (args, ctx) => {
if (!ctx.services?.backendCommand) {
return notAvailable('Backend command');