Skip to content

daemon: add identity metadata to health response#7

Open
MKV21 wants to merge 2 commits into
open-vide:mainfrom
MKV21:codex-ask-health-diagnostics
Open

daemon: add identity metadata to health response#7
MKV21 wants to merge 2 commits into
open-vide:mainfrom
MKV21:codex-ask-health-diagnostics

Conversation

@MKV21
Copy link
Copy Markdown

@MKV21 MKV21 commented Apr 19, 2026

Summary

Extends openvide-daemon health with identity metadata so the app/CLI can detect when it's talking to an older globally-installed daemon than the one it was built against. openvide-daemon version behavior is unchanged.

New fields on the health IPC response:

  • version — daemon package version (sourced from buildInfo.ts)
  • daemonPath — absolute path of the running daemon entry (process.argv[1])
  • nodeVersionprocess.version
  • capabilities — static feature flags (codexAppServer, codexAskMode)

Existing fields (pid, name, activeSessions, totalSessions, tools) are preserved. All new fields are optional on IpcResponse, so existing clients are unaffected.

Changes

  • apps/daemon/src/buildInfo.ts — new module exporting DAEMON_VERSION and DAEMON_CAPABILITIES. DAEMON_VERSION is commented to stay in sync with package.json.
  • apps/daemon/src/cli.ts — imports DAEMON_VERSION from buildInfo.ts instead of a local constant.
  • apps/daemon/src/ipc.ts — extends the health handler with the four new fields.
  • apps/daemon/src/types.ts — adds optional fields to IpcResponse.
  • apps/daemon/test/health.test.mjs — new node --test case covering the health shape.
  • apps/daemon/package.json — adds test script (npm run build && node --test test/*.test.mjs).

Test plan

  • npm test --workspace @openvide/daemon
  • ./node_modules/.bin/tsc -p apps/daemon/tsconfig.json
  • Manual: run the daemon from this branch, call openvide-daemon health, confirm new fields are present and daemonPath points at the freshly built binary.
  • Manual: confirm openvide-daemon version still prints the package version only.

Notes

  • DAEMON_VERSION is still a string literal — keep it in sync with package.json until we add a build-time codegen step.
  • capabilities are intentionally static booleans. New capabilities are added by new keys; CLI clients can feature-detect by key presence.

AI disclosure

Parts of this change were drafted by Codex (AI coder) and reviewed by Claude Code (AI reviewer). A human (@MKV21) reviewed, tested, and approved the final result before submission.

@MKV21 MKV21 force-pushed the codex-ask-health-diagnostics branch 3 times, most recently from ce8af38 to dca4c45 Compare April 19, 2026 17:10
@MKV21 MKV21 force-pushed the codex-ask-health-diagnostics branch from dca4c45 to fa5e037 Compare April 19, 2026 17:11
@MKV21 MKV21 marked this pull request as ready for review April 19, 2026 22:20
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