feat: add Smart Fridge shell and per-credential shell routing
Implement Samsung FridgeOS-themed shell (PLAN.md §3.3) with inventory management, temperature controls, diagnostics, alerts, and other appliance commands. Add per-credential shell routing so static credentials can specify which shell to use via the `shell` config field, passed through ssh.Permissions.Extensions. Also extract shared ReadLine helper from bash to the shell package so both shells can reuse terminal input handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ func TestReadLineEnter(t *testing.T) {
|
||||
}{input, &output}
|
||||
|
||||
ctx := context.Background()
|
||||
line, err := readLine(ctx, rw)
|
||||
line, err := shell.ReadLine(ctx, rw)
|
||||
if err != nil {
|
||||
t.Fatalf("readLine: %v", err)
|
||||
}
|
||||
@@ -72,7 +72,7 @@ func TestReadLineBackspace(t *testing.T) {
|
||||
}{input, &output}
|
||||
|
||||
ctx := context.Background()
|
||||
line, err := readLine(ctx, rw)
|
||||
line, err := shell.ReadLine(ctx, rw)
|
||||
if err != nil {
|
||||
t.Fatalf("readLine: %v", err)
|
||||
}
|
||||
@@ -90,7 +90,7 @@ func TestReadLineCtrlC(t *testing.T) {
|
||||
}{input, &output}
|
||||
|
||||
ctx := context.Background()
|
||||
line, err := readLine(ctx, rw)
|
||||
line, err := shell.ReadLine(ctx, rw)
|
||||
if err != nil {
|
||||
t.Fatalf("readLine: %v", err)
|
||||
}
|
||||
@@ -108,7 +108,7 @@ func TestReadLineCtrlD(t *testing.T) {
|
||||
}{input, &output}
|
||||
|
||||
ctx := context.Background()
|
||||
_, err := readLine(ctx, rw)
|
||||
_, err := shell.ReadLine(ctx, rw)
|
||||
if !errors.Is(err, io.EOF) {
|
||||
t.Fatalf("expected io.EOF, got %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user