nfo-cli 0.0.3 → 0.0.4-improve-prompting
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +64 -54
- package/dist/cli.js.map +1 -1
- package/dist/commands/restore.js +0 -1
- package/dist/commands/restore.js.map +1 -1
- package/dist/commands/tui.js +6 -4
- package/dist/commands/tui.js.map +1 -1
- package/dist/permission.js +8 -8
- package/dist/permission.js.map +1 -1
- package/dist/prompts/orchestrator-role.js +29 -7
- package/dist/prompts/orchestrator-role.js.map +1 -1
- package/dist/prompts/tool-discipline.js +6 -0
- package/dist/prompts/tool-discipline.js.map +1 -1
- package/dist/tui/App.js +5 -5
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/AppView.js +1 -1
- package/dist/tui/AppView.js.map +1 -1
- package/dist/tui/SidebarHeader.js +1 -1
- package/dist/tui/SidebarHeader.js.map +1 -1
- package/dist/tui/StatusBar.js +1 -1
- package/dist/tui/StatusBar.js.map +1 -1
- package/dist/tui/components/App.js +428 -0
- package/dist/tui/components/App.js.map +1 -0
- package/dist/tui/components/AppView.js +13 -0
- package/dist/tui/components/AppView.js.map +1 -0
- package/dist/tui/components/Auditorium.js +17 -0
- package/dist/tui/components/Auditorium.js.map +1 -0
- package/dist/tui/components/ConcertHall.js +11 -0
- package/dist/tui/components/ConcertHall.js.map +1 -0
- package/dist/tui/components/Help.js +41 -0
- package/dist/tui/components/Help.js.map +1 -0
- package/dist/tui/components/OrchestratorPane.js +34 -0
- package/dist/tui/components/OrchestratorPane.js.map +1 -0
- package/dist/tui/components/SidebarHeader.js +6 -0
- package/dist/tui/components/SidebarHeader.js.map +1 -0
- package/dist/tui/components/StatusBar.js +6 -0
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/package.json +1 -1
- package/plan-explorer-musician-hardening.md +56 -0
- package/src/cli.ts +119 -86
- package/src/commands/tui.tsx +10 -4
- package/src/permission.ts +8 -8
- package/src/prompts/orchestrator-role.ts +26 -2
- package/src/prompts/tool-discipline.ts +6 -0
- package/src/tui/{App.tsx → components/App.tsx} +22 -20
- package/src/tui/{AppView.tsx → components/AppView.tsx} +5 -3
- package/src/tui/{Auditorium.tsx → components/Auditorium.tsx} +3 -3
- package/src/tui/{ConcertHall.tsx → components/ConcertHall.tsx} +1 -1
- package/src/tui/{Help.tsx → components/Help.tsx} +0 -9
- package/src/tui/{OrchestratorPane.tsx → components/OrchestratorPane.tsx} +1 -1
- package/src/tui/{SidebarHeader.tsx → components/SidebarHeader.tsx} +3 -1
- package/src/tui/{StatusBar.tsx → components/StatusBar.tsx} +1 -3
- package/tests/permission.test.ts +15 -5
- package/tests/tui/AppView.test.tsx +2 -2
- package/tests/tui/Auditorium.test.tsx +1 -1
- package/tests/tui/ConcertHall.test.tsx +1 -1
- package/tests/tui/Help.test.tsx +1 -1
- package/tests/tui/OrchestratorPane.test.ts +1 -1
- package/tests/tui/SidebarHeader.test.tsx +1 -1
- package/tests/tui/StatusBar.test.tsx +1 -1
|
@@ -5,17 +5,19 @@ export interface SidebarHeaderProps {
|
|
|
5
5
|
orchestraId: string;
|
|
6
6
|
musicianCount: number;
|
|
7
7
|
pendingCount: number;
|
|
8
|
+
version: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export function SidebarHeader(props: SidebarHeaderProps): ReactElement {
|
|
11
12
|
return (
|
|
12
13
|
<Box
|
|
13
14
|
flexDirection="column"
|
|
14
|
-
borderStyle="
|
|
15
|
+
borderStyle="round"
|
|
15
16
|
borderBottom={true}
|
|
16
17
|
paddingX={1}
|
|
17
18
|
>
|
|
18
19
|
<Text bold={true}>No Fluff Orchestra · {props.orchestraId}</Text>
|
|
20
|
+
<Text bold={true}>v.{props.version}</Text>
|
|
19
21
|
{props.pendingCount > 0 ? (
|
|
20
22
|
<Text color="yellow">
|
|
21
23
|
{props.musicianCount} musicians · {props.pendingCount} awaiting
|
|
@@ -36,9 +36,7 @@ export function StatusBar(props: StatusBarProps): ReactElement {
|
|
|
36
36
|
terminal
|
|
37
37
|
</Text>
|
|
38
38
|
)}
|
|
39
|
-
<Text dimColor={true}>
|
|
40
|
-
[q] detach [F6] dashboard [F7] orchestrator [?] help
|
|
41
|
-
</Text>
|
|
39
|
+
<Text dimColor={true}>[q] detach [?] help</Text>
|
|
42
40
|
</Box>
|
|
43
41
|
);
|
|
44
42
|
}
|
package/tests/permission.test.ts
CHANGED
|
@@ -7,13 +7,20 @@ import {
|
|
|
7
7
|
} from '../src/permission.js';
|
|
8
8
|
|
|
9
9
|
describe('permission levels', () => {
|
|
10
|
-
it('lists all
|
|
11
|
-
expect(PERMISSION_LEVELS).toEqual([
|
|
10
|
+
it('lists all five levels in order from most to least permissive', () => {
|
|
11
|
+
expect(PERMISSION_LEVELS).toEqual([
|
|
12
|
+
'dangerouslySkipPermissions',
|
|
13
|
+
'auto',
|
|
14
|
+
'acceptEdits',
|
|
15
|
+
'supervised',
|
|
16
|
+
'strict',
|
|
17
|
+
]);
|
|
12
18
|
});
|
|
13
19
|
|
|
14
20
|
it('isPermissionLevel rejects unknown strings', () => {
|
|
21
|
+
expect(isPermissionLevel('dangerouslySkipPermissions')).toBe(true);
|
|
15
22
|
expect(isPermissionLevel('auto')).toBe(true);
|
|
16
|
-
expect(isPermissionLevel('
|
|
23
|
+
expect(isPermissionLevel('acceptEdits')).toBe(true);
|
|
17
24
|
expect(isPermissionLevel('supervised')).toBe(true);
|
|
18
25
|
expect(isPermissionLevel('strict')).toBe(true);
|
|
19
26
|
expect(isPermissionLevel('YOLO')).toBe(false);
|
|
@@ -21,8 +28,11 @@ describe('permission levels', () => {
|
|
|
21
28
|
});
|
|
22
29
|
|
|
23
30
|
it('claudeFlagsForLevel returns the right flag list per level', () => {
|
|
24
|
-
expect(claudeFlagsForLevel('
|
|
25
|
-
|
|
31
|
+
expect(claudeFlagsForLevel('dangerouslySkipPermissions')).toEqual([
|
|
32
|
+
'--dangerously-skip-permissions',
|
|
33
|
+
]);
|
|
34
|
+
expect(claudeFlagsForLevel('auto')).toEqual(['--permission-mode', 'auto']);
|
|
35
|
+
expect(claudeFlagsForLevel('acceptEdits')).toEqual(['--permission-mode', 'acceptEdits']);
|
|
26
36
|
expect(claudeFlagsForLevel('supervised')).toEqual(['--permission-mode', 'default']);
|
|
27
37
|
expect(claudeFlagsForLevel('strict')).toEqual(['--permission-mode', 'plan']);
|
|
28
38
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { AppView } from '../../src/tui/AppView.js';
|
|
4
|
-
import { OrchestratorPane } from '../../src/tui/OrchestratorPane.js';
|
|
3
|
+
import { AppView } from '../../src/tui/components/AppView.js';
|
|
4
|
+
import { OrchestratorPane } from '../../src/tui/components/OrchestratorPane.js';
|
|
5
5
|
import type { Musician } from '../../src/state.types.js';
|
|
6
6
|
import type { OrchestraSummary } from '../../src/commands/list.js';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { Auditorium } from '../../src/tui/Auditorium.js';
|
|
3
|
+
import { Auditorium } from '../../src/tui/components/Auditorium.js';
|
|
4
4
|
import type { Musician } from '../../src/state.types.js';
|
|
5
5
|
|
|
6
6
|
function mus(over: Partial<Musician>): Musician {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { ConcertHall } from '../../src/tui/ConcertHall.js';
|
|
3
|
+
import { ConcertHall } from '../../src/tui/components/ConcertHall.js';
|
|
4
4
|
import type { OrchestraSummary } from '../../src/commands/list.js';
|
|
5
5
|
|
|
6
6
|
function orch(over: Partial<OrchestraSummary>): OrchestraSummary {
|
package/tests/tui/Help.test.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { Help } from '../../src/tui/Help.js';
|
|
3
|
+
import { Help } from '../../src/tui/components/Help.js';
|
|
4
4
|
|
|
5
5
|
describe('Help', () => {
|
|
6
6
|
it('lists the core keybindings', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import { resolveSpanStyle } from '../../src/tui/OrchestratorPane.js';
|
|
2
|
+
import { resolveSpanStyle } from '../../src/tui/components/OrchestratorPane.js';
|
|
3
3
|
|
|
4
4
|
describe('resolveSpanStyle', () => {
|
|
5
5
|
it('renders a visible block cursor when the terminal is focused', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { SidebarHeader } from '../../src/tui/SidebarHeader.js';
|
|
3
|
+
import { SidebarHeader } from '../../src/tui/components/SidebarHeader.js';
|
|
4
4
|
|
|
5
5
|
describe('SidebarHeader', () => {
|
|
6
6
|
it('renders orchestra id and musician counts', () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect } from 'vitest';
|
|
2
2
|
import { render } from 'ink-testing-library';
|
|
3
|
-
import { StatusBar } from '../../src/tui/StatusBar.js';
|
|
3
|
+
import { StatusBar } from '../../src/tui/components/StatusBar.js';
|
|
4
4
|
|
|
5
5
|
describe('StatusBar', () => {
|
|
6
6
|
it('shows permission level and the token placeholder', () => {
|