Implements the Tier-1 pane subsystem from D-006: spawn / list / focus / close / write / resize / tail commands, plus pane.spawned / output / exit / resized / focused / closed events. PaneRegistry owns per-pane PtySession lifecycles and id generation (p_N); a DaemonEventSink seam keeps pane code decoupled from the IPC server package. DaemonServer.broadcast() fans events out to every connected client. Per-client subsystem/id filtering (`tail --filter pane:p_7`) is deferred — Tier 1 broadcasts everything and the subscriber discards. Panes carry a `kind:` field (terminal | claude). Step 7 (builtin.claude) adds the claude-specific pane flow on top of this generic substrate — the subsystem itself stays neutral. 14 new core tests: registry unit coverage (spawn → pane.spawned event, output → base64 events, write/resize/close round-trips, idempotent close, claude kind on the wire) plus dispatcher coverage (argv validation, unknown-id → not-found, text vs bytes_b64, etc). All 37 core tests pass in ~3s under test-core. Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
/// clide — Dart core library.
|
|
///
|
|
/// Shared by `bin/clide.dart` (CLI + daemon) and by the Flutter app
|
|
/// under `app/` (which depends on this package via `path: ../`).
|
|
///
|
|
/// See:
|
|
/// * `decisions/architecture.md` `D-005` — layout + language rationale.
|
|
/// * `decisions/architecture.md` `D-006` — CLI + event contract.
|
|
library;
|
|
|
|
export 'src/daemon/dispatcher.dart';
|
|
export 'src/daemon/pane_commands.dart';
|
|
export 'src/ipc/envelope.dart';
|
|
export 'src/ipc/paths.dart';
|
|
export 'src/ipc/schema_v1.dart';
|
|
export 'src/ipc/server.dart';
|
|
export 'src/panes/event_sink.dart';
|
|
export 'src/panes/pane.dart' show Pane, PaneKind;
|
|
export 'src/panes/registry.dart' show PaneRegistry;
|
|
export 'src/pty/errors.dart' show PtyException;
|
|
export 'src/pty/pty.dart';
|
|
|
|
/// Build-time-stamped version string.
|
|
///
|
|
/// The Makefile's `build` target passes `--define=clideVersion=…` when
|
|
/// invoking `dart compile exe`, stamping `project.yaml`'s `version:`
|
|
/// plus the git short SHA and dirty marker.
|
|
const clideVersion = String.fromEnvironment(
|
|
'clideVersion',
|
|
defaultValue: '2.0.0-dev',
|
|
);
|
|
|
|
const clideCommit = String.fromEnvironment(
|
|
'clideCommit',
|
|
defaultValue: 'unknown',
|
|
);
|
|
|
|
const clideDate = String.fromEnvironment(
|
|
'clideDate',
|
|
defaultValue: 'unknown',
|
|
);
|