Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions cli/docs/recordings/demo-approvals.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Approval flow β€” list β†’ detail β†’ approve/deny
# Run: vhs demo-approvals.tape

Output demo-approvals.gif
Set FontSize 14
Set Width 1200
Set Height 700
Set Padding 20

Type "npm run tui"
Enter
Sleep 3s
Type " "
Sleep 1s

# Go to Approvals
Type "3"
Sleep 1.5s

# Browse approvals
Down
Sleep 0.5s
Up
Sleep 1s

# Drill into detail
Enter
Sleep 3s

# Deny with confirmation
Type "d"
Sleep 1s
# See the confirm dialog
Sleep 1.5s
# Cancel
Type "n"
Sleep 1s

# Approve instead
Type "a"
Sleep 1.5s

# Back to list
Escape
Sleep 1s

Type "q"
Binary file added cli/docs/recordings/demo-full.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions cli/docs/recordings/demo-full.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Full TUI Demo β€” splash β†’ all panels
# Run: vhs demo-full.tape

Output demo-full.gif
Set FontSize 14
Set Width 1200
Set Height 700
Set Padding 20

# Start the TUI
Type "npm run tui"
Enter
Sleep 3s

# Splash screen visible β€” press key to dismiss
Type " "
Sleep 1.5s

# Tasks panel β€” navigate list
Sleep 1s
Down
Sleep 0.5s
Down
Sleep 0.5s
Up
Sleep 1s

# Select first task β†’ Watch
Enter
Sleep 3s

# Watch events streaming in...
Sleep 3s

# Scroll up through events
Up
Up
Up
Sleep 1s
# Scroll back down
Down
Down
Down
Sleep 1s

# Nudge the agent
Type "n"
Sleep 0.5s
Type "focus on the unit tests first"
Sleep 0.5s
Enter
Sleep 1.5s

# Switch to Approvals
Type "3"
Sleep 1.5s

# Drill into detail
Enter
Sleep 2s

# Approve
Type "a"
Sleep 1s

# Back to list
Escape
Sleep 1s

# Switch to Policies
Type "4"
Sleep 1s

# View a policy detail
Down
Down
Enter
Sleep 2s

# Navigate while detail stays open
Down
Sleep 1s
Down
Sleep 1s

# Close detail
Escape
Sleep 1s

# Switch to Submit (New Task)
Type "5"
Sleep 1s

# Select repo
Down
Sleep 0.5s
Enter
Sleep 0.5s

# Type instructions
Enter
Type "Add integration tests for the payment service"
Enter
Sleep 1s

# Submit
Down
Down
Down
Enter
Sleep 2s

# Quit
Type "q"
Sleep 0.5s
20 changes: 20 additions & 0 deletions cli/docs/recordings/demo-splash.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Splash screen β€” just the Peccy animation
# Run: vhs demo-splash.tape

Output demo-splash.gif
Set FontSize 16
Set Width 800
Set Height 500
Set Padding 20

Type "npm run tui"
Enter

# Let the splash play for the full Peccy animation cycle
Sleep 5s

# Dismiss
Type " "
Sleep 2s

Type "q"
Binary file added cli/docs/recordings/demo-watch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions cli/docs/recordings/demo-watch.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Watch panel β€” event streaming + inline approval + nudge
# Run: vhs demo-watch.tape

Output demo-watch.gif
Set FontSize 14
Set Width 1200
Set Height 700
Set Padding 20

Type "npm run tui"
Enter
Sleep 3s
Type " "
Sleep 1s

# Select a task
Enter
Sleep 5s

# Events streaming in...
Sleep 5s

# Scroll up through history
Up
Up
Up
Up
Sleep 2s

# Back to live
Down
Down
Down
Down
Sleep 2s

# Approve inline
Type "a"
Sleep 1.5s

# Nudge
Type "n"
Sleep 0.5s
Type "please add error handling"
Enter
Sleep 2s

# Back to tasks
Escape
Sleep 1s

Type "q"
10 changes: 9 additions & 1 deletion cli/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions cli/src/mock/data.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* Mock data for the TUI prototype.
* Simulates the DynamoDB data shapes from TaskTable, TaskEventsTable,
* and TaskApprovalsTable without any real API calls.
*/
export interface RegisteredRepo {
repo: string;
status: 'active' | 'removed';
default_branch: string;
}
export declare const MOCK_REPOS: RegisteredRepo[];
export interface TaskSummary {
task_id: string;
status: string;
repo: string;
created_at: string;
task_description: string;
task_type: string;
pr_number: number | null;
issue_number: number | null;
branch_name: string;
cost_usd: number | null;
duration_s: number | null;
turn: number;
max_turns: number | null;
}
export interface TaskEvent {
event_id: string;
task_id: string;
event_type: string;
timestamp: string;
metadata: Record<string, any>;
}
export interface PendingApproval {
task_id: string;
request_id: string;
tool_name: string;
tool_input_preview: string;
reason: string;
severity: 'HIGH' | 'MEDIUM' | 'LOW';
matching_rule_ids: string[];
status: 'PENDING';
created_at: string;
timeout_s: number;
repo: string;
task_description: string;
}
export interface CedarPolicy {
rule_id: string;
tier: 'hard-deny' | 'hard-gate';
description: string;
action: string;
condition_summary: string;
severity?: string;
category?: string;
approval_timeout_s?: number;
cedar_source: string;
}
export declare const MOCK_TASKS: TaskSummary[];
export declare const MOCK_EVENTS: TaskEvent[];
export declare const MOCK_PENDING_APPROVALS: PendingApproval[];
/**
* Returns events one at a time to simulate a live watch stream.
* Each call returns the next event or null if exhausted.
*/
export declare class MockEventStream {
private queue;
private index;
constructor(taskId: string);
/** Get next batch of events (simulates polling) */
poll(afterIndex: number): TaskEvent[];
get totalEvents(): number;
}
export declare function fetchTasks(): Promise<TaskSummary[]>;
export declare function fetchTask(taskId: string): Promise<TaskSummary | undefined>;
export declare function fetchPendingApprovals(): Promise<PendingApproval[]>;
export declare function approveRequest(taskId: string, requestId: string, scope?: string): Promise<{
success: boolean;
message: string;
}>;
export declare function denyRequest(taskId: string, requestId: string, reason: string): Promise<{
success: boolean;
message: string;
}>;
export declare const MOCK_POLICIES: CedarPolicy[];
export declare function submitTask(repo: string, description: string): TaskSummary;
Loading
Loading