Context
Currently, the Auto-Wakeup Substrate (resumeHarness.mjs) relies on an unvalidated free-text appName inside harnessTargetMetadata, and hardcodes an identity map targeting only Antigravity via osascript. If an agent is sunsetted, the shell script should be capable of starting any agent app (Antigravity, Claude Desktop, Codex). Furthermore, waking an agent isn't just about bringing the app to the foreground; it requires booting a true fresh session by injecting a first prompt via the terminal.
The Problem
- Free-Text Vulnerability:
harnessTargetMetadata.appName is free text, making it fragile across different OS configurations or naming conventions.
- Hardcoded Scope:
resumeHarness.mjs only knows how to wake Antigravity.
- Missing Fresh Session Boot: The current wakeup substrate brings the window forward but doesn't explicitly start a fresh terminal session with a context-primed prompt for the other agent types.
The Architectural Reality
The wakeup substrate needs to evolve from a hardcoded map in ai/scripts/resumeHarness.mjs to a formal "Harness Registry". This registry must define how to start different agents (e.g., antigravity, claude-desktop, codex-desktop) using precise enums rather than free-text names, and execute the specific terminal commands or AppleScript sequences to deliver the initial payload.
The Fix
- Define Harness Registry Enum: Standardize harness targets into an enum (e.g.,
antigravity-ide, claude-desktop, codex-desktop) replacing the free-text appName.
- Update Schema & Memory Core: Enforce this enum in the Memory Core
manage_wake_subscription tool parameter schema.
- Refactor
resumeHarness.mjs: Implement the Harness Registry logic to resolve the enum to specific executable paths/scripts.
- Implement Fresh Session Booting: Extend the execution logic for each registry entry to not only open the app but also inject the initial payload via terminal commands to guarantee a fresh session.
Acceptance Criteria
Out of Scope
- Modifying the SQLite GraphLog schemas beyond the
appName enum validation.
- Rewriting the core heartbeat timer logic in
swarm-heartbeat.sh.
Origin Session ID
Origin Session ID: 68862ab8-619c-496e-8ba2-8a75ddd73059
Context
Currently, the Auto-Wakeup Substrate (
resumeHarness.mjs) relies on an unvalidated free-textappNameinsideharnessTargetMetadata, and hardcodes an identity map targeting onlyAntigravityviaosascript. If an agent is sunsetted, the shell script should be capable of starting any agent app (Antigravity, Claude Desktop, Codex). Furthermore, waking an agent isn't just about bringing the app to the foreground; it requires booting a true fresh session by injecting a first prompt via the terminal.The Problem
harnessTargetMetadata.appNameis free text, making it fragile across different OS configurations or naming conventions.resumeHarness.mjsonly knows how to wake Antigravity.The Architectural Reality
The wakeup substrate needs to evolve from a hardcoded map in
ai/scripts/resumeHarness.mjsto a formal "Harness Registry". This registry must define how to start different agents (e.g.,antigravity,claude-desktop,codex-desktop) using precise enums rather than free-text names, and execute the specific terminal commands or AppleScript sequences to deliver the initial payload.The Fix
antigravity-ide,claude-desktop,codex-desktop) replacing the free-textappName.manage_wake_subscriptiontool parameter schema.resumeHarness.mjs: Implement the Harness Registry logic to resolve the enum to specific executable paths/scripts.Acceptance Criteria
appNameinharnessTargetMetadatais replaced by an enumeratedappIdentifier.resumeHarness.mjsdynamically resolves execution strategies based on the registry.Out of Scope
appNameenum validation.swarm-heartbeat.sh.Origin Session ID
Origin Session ID: 68862ab8-619c-496e-8ba2-8a75ddd73059