Design app/package running condition #40

Open
opened 2026-06-17 15:11:08 +02:00 by yorunikakeru · 0 comments
Owner

Goal

Let users describe application liveness by stable package/app identity instead of knowing OS process invariants.

Example desired DSL shape:

when (appRunning "steam")

or, if naming settles differently:

when (packageRunning "steam")

This must not mean raw comm == "steam". It means the FrogOS metadata/runtime layer resolves the package/app name into concrete process matchers.

Required actions

  • Decide public DSL name: prefer appRunning; consider packageRunning only if the FrogOS package identity is the true user-facing concept.
  • Keep low-level process matching out of the normal user path.
  • Add or update DSL constructors in DSL.Condition once IR exposes the corresponding condition/reference type.
  • Update README examples to use the new user-facing condition instead of raw process-name matching.
  • Add construction, validation, compile, serialization, and golden tests.
  • Add a CHANGELOG.md entry because this changes public DSL API.

Contract expectations

  • DSL accepts a user-facing app/package name.
  • DSL does not require users to provide executable names, argv patterns, Nix wrapper names, Flatpak command details, helper process names, or /proc semantics.
  • Invalid names fail through existing domain validation, not late runtime string errors.

Dependencies

  • Needs IR support for an app/package process reference or equivalent condition.
  • Needs Toad/runtime support for resolving metadata into concrete process observations.

Acceptance criteria

  • A DSL example can express appRunning "steam" and compile to versioned IR.
  • Existing processRunning semantics are either deprecated, renamed to an explicit low-level escape hatch, or documented as raw process matching.
  • Tests prove the compiled IR preserves app/package identity rather than lowering it to a single process name in the DSL layer.
## Goal Let users describe application liveness by stable package/app identity instead of knowing OS process invariants. Example desired DSL shape: ```haskell when (appRunning "steam") ``` or, if naming settles differently: ```haskell when (packageRunning "steam") ``` This must not mean raw `comm == "steam"`. It means the FrogOS metadata/runtime layer resolves the package/app name into concrete process matchers. ## Required actions - Decide public DSL name: prefer `appRunning`; consider `packageRunning` only if the FrogOS package identity is the true user-facing concept. - Keep low-level process matching out of the normal user path. - Add or update DSL constructors in `DSL.Condition` once IR exposes the corresponding condition/reference type. - Update README examples to use the new user-facing condition instead of raw process-name matching. - Add construction, validation, compile, serialization, and golden tests. - Add a `CHANGELOG.md` entry because this changes public DSL API. ## Contract expectations - DSL accepts a user-facing app/package name. - DSL does not require users to provide executable names, argv patterns, Nix wrapper names, Flatpak command details, helper process names, or `/proc` semantics. - Invalid names fail through existing domain validation, not late runtime string errors. ## Dependencies - Needs IR support for an app/package process reference or equivalent condition. - Needs Toad/runtime support for resolving metadata into concrete process observations. ## Acceptance criteria - A DSL example can express `appRunning "steam"` and compile to versioned IR. - Existing `processRunning` semantics are either deprecated, renamed to an explicit low-level escape hatch, or documented as raw process matching. - Tests prove the compiled IR preserves app/package identity rather than lowering it to a single process name in the DSL layer.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FrogOS/DSL#40
No description provided.