Add peepy extension - #30443
Conversation
|
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 SummaryPeepy 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.
Confidence Score: 4/5The 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
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 |
| } | ||
| ], | ||
| "dependencies": { | ||
| "@raycast/api": "^1.104.20" | ||
| }, | ||
| "devDependencies": { |
There was a problem hiding this 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)
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 @@ | |||
| { | |||
There was a problem hiding this comment.
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!
| 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; | ||
| } |
There was a problem hiding this 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.
| 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.
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder