feat(runtime): forward Flynn prompt to pi and harden backend mode commands
This commit is contained in:
@@ -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.');
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user