Skip to content

Add peepy extension - #30443

Open
GhostInHex wants to merge 3 commits into
raycast:mainfrom
GhostInHex:ext/peepy
Open

Add peepy extension#30443
GhostInHex wants to merge 3 commits into
raycast:mainfrom
GhostInHex:ext/peepy

Conversation

@GhostInHex

@GhostInHex GhostInHex commented Aug 22, 2026

Copy link
Copy Markdown

Description

Screencast

Checklist

@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Peepy adds a cross-platform Raycast command that keeps macOS and Windows systems awake using detached native helpers. The latest changes add Store metadata and repository-standard configuration while attempting to protect helper termination against PID reuse.

  • Adds timed and indefinite keep-awake controls with live diagnostics.
  • Persists helper state and process identity in Raycast's support directory.
  • Adds extension metadata, changelog, manifest schema, and standard lint/format configuration.

Confidence Score: 4/5

The PR is not yet safe to merge because helper shutdown can still terminate an unrelated process when process identity data is unavailable.

The attempted PID-reuse protection explicitly accepts missing identity timestamps, and the accepted PID is subsequently terminated by stop, reset, and replacement-start paths.

Files Needing Attention: extensions/peepy/src/lib/caffeine.ts

Important Files Changed

Filename Overview
extensions/peepy/src/lib/caffeine.ts Implements cross-platform helper lifecycle and PID identity checks, but unavailable creation-time data still authorizes termination of a potentially unrelated process.
extensions/peepy/src/peepy.tsx Provides the keep-awake controls, timed presets, status refresh, and diagnostics UI that invoke the helper lifecycle.
extensions/peepy/package.json Defines a valid cross-platform view command with Store categories, schema metadata, and standard scripts.
extensions/peepy/CHANGELOG.md Adds the requested Initial Release entry.
extensions/peepy/eslint.config.js Uses defineConfig from eslint/config and composes the recommended TypeScript, Raycast, and Prettier presets.
Prompt To Fix All With AI
### Issue 1
extensions/peepy/src/lib/caffeine.ts:148-156
**Missing Identity Still Authorizes Termination**

When the recorded creation timestamp is absent or the live identity lookup fails, `identityMatches` returns true, so disabling, resetting, or restarting Peepy can terminate an unrelated process that reused the helper PID, including its descendants on Windows.

```suggestion
function identityMatches(state: RunningCaffeineState, identity: ProcessIdentity | null) {
  if (!identity || identity.createdAtMs === null || state.helperCreatedAtMs === undefined) {
    return false;
  }

  return Math.abs(identity.createdAtMs - state.helperCreatedAtMs) <= PROCESS_IDENTITY_TOLERANCE_MS;
}
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2): Last reviewed commit: "Recompose store screenshot with symmetri..." | Re-trigger Greptile

Comment thread extensions/peepy/src/lib/caffeine.ts Outdated
Comment on lines +22 to +27
}
],
"dependencies": {
"@raycast/api": "^1.104.20"
},
"devDependencies": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 View Command Lacks Store Metadata

This view command places its screenshot under assets/ but provides no metadata/ directory. Move the Store screenshot into Raycast metadata so the extension has the required presentation asset for Store review.

Rule Used: What: Extensions with view-type commands must incl... (source)

Knowledge Base Used: Extension Authoring Conventions

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/peepy/package.json
Line: 22-27

Comment:
**View Command Lacks Store Metadata**

This view command places its screenshot under `assets/` but provides no `metadata/` directory. Move the Store screenshot into Raycast metadata so the extension has the required presentation asset for Store review.

**Rule Used:** What: Extensions with view-type commands must incl... ([source](https://app.greptile.com/raycast/-/custom-context?memory=87059ac1-c601-487f-9f1c-bce8a3cb6209))

**Knowledge Base Used:** [Extension Authoring Conventions](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-authoring-conventions.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@@ -0,0 +1,43 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Initial Changelog Is Missing

The new extension does not include a CHANGELOG.md. Add an Initial Release entry so Peepy has the required repository and Store release history.

Rule Used: What: Ensure that CHANGELOG.md is created or updat... (source)

Knowledge Base Used: Extension Authoring Conventions

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/peepy/package.json
Line: 1

Comment:
**Initial Changelog Is Missing**

The new extension does not include a `CHANGELOG.md`. Add an Initial Release entry so Peepy has the required repository and Store release history.

**Rule Used:** What: Ensure that CHANGELOG.md is created or updat... ([source](https://app.greptile.com/raycast/github/raycast/extensions/-/custom-context?memory=97cd51bc-963b-43f5-acc3-9ba85fe7bb2d))

**Knowledge Base Used:** [Extension Authoring Conventions](https://app.greptile.com/raycast/-/custom-context/knowledge-base/raycast/extensions/-/docs/extension-authoring-conventions.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread extensions/peepy/.prettierrc
Comment thread extensions/peepy/eslint.config.js Outdated
Comment thread extensions/peepy/package.json
@GhostInHex
GhostInHex marked this pull request as ready for review August 22, 2026 20:01
Comment on lines +148 to +156
function identityMatches(state: RunningCaffeineState, identity: ProcessIdentity | null) {
if (!identity || identity.createdAtMs === null || state.helperCreatedAtMs === undefined) {
// Without a recorded creation time we cannot prove the PID was reused, so we
// fall back to the previous behavior instead of blocking legitimate stops.
return true;
}

return Math.abs(identity.createdAtMs - state.helperCreatedAtMs) <= PROCESS_IDENTITY_TOLERANCE_MS;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing Identity Still Authorizes Termination

When the recorded creation timestamp is absent or the live identity lookup fails, identityMatches returns true, so disabling, resetting, or restarting Peepy can terminate an unrelated process that reused the helper PID, including its descendants on Windows.

Suggested change
function identityMatches(state: RunningCaffeineState, identity: ProcessIdentity | null) {
if (!identity || identity.createdAtMs === null || state.helperCreatedAtMs === undefined) {
// Without a recorded creation time we cannot prove the PID was reused, so we
// fall back to the previous behavior instead of blocking legitimate stops.
return true;
}
return Math.abs(identity.createdAtMs - state.helperCreatedAtMs) <= PROCESS_IDENTITY_TOLERANCE_MS;
}
function identityMatches(state: RunningCaffeineState, identity: ProcessIdentity | null) {
if (!identity || identity.createdAtMs === null || state.helperCreatedAtMs === undefined) {
return false;
}
return Math.abs(identity.createdAtMs - state.helperCreatedAtMs) <= PROCESS_IDENTITY_TOLERANCE_MS;
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/peepy/src/lib/caffeine.ts
Line: 148-156

Comment:
**Missing Identity Still Authorizes Termination**

When the recorded creation timestamp is absent or the live identity lookup fails, `identityMatches` returns true, so disabling, resetting, or restarting Peepy can terminate an unrelated process that reused the helper PID, including its descendants on Windows.

```suggestion
function identityMatches(state: RunningCaffeineState, identity: ProcessIdentity | null) {
  if (!identity || identity.createdAtMs === null || state.helperCreatedAtMs === undefined) {
    return false;
  }

  return Math.abs(identity.createdAtMs - state.helperCreatedAtMs) <= PROCESS_IDENTITY_TOLERANCE_MS;
}
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@GhostInHex
GhostInHex marked this pull request as draft August 24, 2026 14:03
@GhostInHex
GhostInHex marked this pull request as ready for review August 24, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants