Skip to content

WIP feat(supervisor): add service management primitives and macOS launchd support#159

Draft
aryasaatvik wants to merge 13 commits intoRhysSullivan:mainfrom
aryasaatvik:supervisor
Draft

WIP feat(supervisor): add service management primitives and macOS launchd support#159
aryasaatvik wants to merge 13 commits intoRhysSullivan:mainfrom
aryasaatvik:supervisor

Conversation

@aryasaatvik
Copy link
Copy Markdown
Contributor

supervisor

  • launchd plugin for mac
  • systemd plugin for linux

Add @executor/supervisor package with graceful signal-based process
termination (gracefulStopPid, isPidAlive) and HTTP readiness polling
(pollReadiness, isReachable). Consumed by apps/desktop and the launchd
plugin.

Add @executor/supervisor package with graceful signal-based process
termination (gracefulStopPid, isPidAlive) and HTTP readiness polling
(pollReadiness, isReachable). Consumed by apps/desktop and the launchd
plugin.
Add @executor/plugin-launchd package exposing launchd.install, launchd.uninstall,
launchd.start, launchd.stop, and launchd.status tools via the SDK plugin
interface. Uses @executor/supervisor for graceful pid shutdown and readiness
polling.
…tionId

Replace unsafe `any` casts with proper `unknown` + type assertions,
add type-safe executionId extraction, and normalize formatting.
- Normalize package.json field ordering across workspace
- Collapse multi-line declarations, imports, and function calls
- Standardize quotes and trailing punctuation throughout
- Apply Prettier formatting to all plugin SDK packages
- Reformat generated routeTree files with consistent style
# Conflicts:
#	.oxlintrc.jsonc
#	apps/cli/package.json
#	apps/cli/src/build.ts
#	apps/cli/src/main.ts
#	apps/cloud/package.json
#	apps/cloud/src/api.ts
#	apps/cloud/src/env.ts
#	apps/cloud/src/routeTree.gen.ts
#	apps/cloud/src/web/shell.tsx
#	apps/cloud/wrangler.jsonc
#	apps/local/package.json
#	package.json
#	packages/core/api/package.json
#	packages/core/api/src/handlers/secrets.ts
#	packages/core/api/src/handlers/sources.ts
#	packages/core/api/src/handlers/tools.ts
#	packages/core/config/src/config-store.ts
#	packages/core/execution/src/engine.ts
#	packages/core/sdk/src/promise-executor.ts
#	packages/core/storage-file/package.json
#	packages/core/storage-postgres/package.json
#	packages/plugins/file-secrets/package.json
#	packages/plugins/google-discovery/package.json
#	packages/plugins/google-discovery/src/api/group.ts
#	packages/plugins/google-discovery/src/react/EditGoogleDiscoverySource.tsx
#	packages/plugins/google-discovery/src/sdk/plugin.ts
#	packages/plugins/graphql/package.json
#	packages/plugins/keychain/package.json
#	packages/plugins/mcp/src/react/AddMcpSource.tsx
#	packages/plugins/onepassword/package.json
#	packages/plugins/openapi/package.json
#	packages/plugins/openapi/src/react/AddOpenApiSource.tsx
#	packages/react/package.json
#	packages/react/src/components/combobox.tsx
#	packages/react/src/components/sonner.tsx
#	packages/react/src/components/table.tsx
#	packages/react/src/components/tool-detail.tsx
#	packages/react/src/pages/source-detail.tsx
#	tests/presets-reachable.test.ts
Add the four underlying error variants (UnsupportedPlatform, BootstrapFailed,
TeardownFailed, ServiceReadinessTimeout) folded into a SupervisorError union
so the CLI and tools surface a single consistent error taxonomy regardless of
OS. Add ServiceSpec, InstallResult, and ServiceStatus shared types exported
from the index.
…llback

Add the PlatformSupervisor Effect Context tag as the central abstraction for
platform-specific service management backends. The unsupported-platform
fallback layer raises UnsupportedPlatform on all methods so the CLI and MCP
surface a consistent error regardless of active OS.
Add makeServiceCommand for the install/uninstall/start/stop/status subcommands
built on Effect CLI. Add makeServiceToolsPlugin that exposes the five service
lifecycle operations as runtime tools via the ExecutorPlugin interface.
Install and start carry approval annotations.
Delete launchdPlugin(), makeServiceCommand, and ./promise subpath export.
The plugin now only exports the backend implementation. Service commands and
platform supervision logic are centralized in @executor/supervisor.
Inject BUILD_PLATFORM at build time via Bun.define to enable DCE folding
of the platform switch in main.ts and server/executor.ts. The ternary
must use BUILD_PLATFORM directly (not through an intermediate const) so
Bun's DCE can eliminate the unused branch. Also add build-globals.d.ts
as the TypeScript declaration file for the injected define.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant