omp packages

@henryqw/pi-1password0.6.1

Route 1Password lists and approved actions to the Mac where you can approve them.

GitHub Actions Published 2 days ago MIT ~1K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@henryqw/pi-1password

Approve 1Password requests on the Mac in front of you while Pi runs on another computer. Pi can list vault and item metadata and run previously authorized named actions.

Install

pi install npm:@henryqw/pi-1password

Use Node.js 22.19.0 or later. For remote approval, install Herdr on the Pi host. On the Approval Mac, enable 1Password desktop integration and install the signed 1Password command line interface (op) in /opt/homebrew/bin or /usr/local/bin.

The Pi host runs Pi. The Approval Mac shows the 1Password prompt. Save the Approval Mac in Herdr with a Secure Shell (SSH) login to its desktop account. The login must work without a password prompt. Enable SSH access on the Approval Mac.

Trust the Pi host with the Approval Mac's desktop account. The saved SSH login can run commands as that account.

Use

Ask Pi for a vault or item list. With no Approval Mac selected, Pi uses the signed op command on the macOS Pi host when available. Approve the 1Password prompt on that Mac.

For remote approval, run /1password and select the Approval Mac in each Pi process. Pi opens or reuses a normal SSH pseudo-terminal on that Mac. To switch back to the macOS Pi host, run /1password local.

Surface Type Purpose
/1password [select] Pi command Open the picker for saved Herdr Macs with signed op. Include the Pi host when local approval is available.
/1password <machine> Pi command Select a saved Herdr machine by label or profile ID. Use /1password local for the macOS Pi host.
/1password select <machine> Pi command Select a saved Herdr machine whose label matches a command word.
/1password status Pi command Check the approval route and signed op. Show if the remote terminal is busy.
onepassword_list Pi tool List vaults or items. Set account to select an account and vault to limit an item list.
onepassword_actions Pi tool Discover the names of action grants on the selected remote Mac.
onepassword_action Pi tool Run a previously authorized named action on the selected remote Mac. Return its status.
op Pi skill Select an account and handle 1Password data safely.

Status does not discover action names or request account approval. Ask Pi which actions are available to discover grant names separately. Discovery also needs no 1Password approval. A missing grant file gives an empty action inventory and does not prevent lists.

If you use more than one account, give Pi the account sign-in address when you request a list. Pi includes vault and item names in its context. Use a specific vault to limit item names.

Verify a fresh approval

  1. Lock 1Password on the selected Approval Mac to end its existing approvals.
  2. In Pi, ask for a vault list for one account. Check the account in the prompt on the Approval Mac and approve it.
  3. Ask for a second list for the same account within 10 minutes. Both lists must succeed. The second request should reuse the approval if the app stayed unlocked.

Approve an action

An action makes a Hypertext Transfer Protocol Secure (HTTPS) GET request from a remote Approval Mac. It sends one credential to one configured URL. Pi receives completion status for a 2xx response. Redirects fail, and the response body stays on the Approval Mac.

Remote action flow. Pi sends an action name over SSH. The Approval Mac uses its protected grant to send the credential to the configured service and returns only status.

An action grant is Mac-local policy. An administrator must protect /Library/Application Support/pi-1password/actions.json and every parent directory. Each must be owned by root, without group or other write access or access control list entries. The SSH desktop login must be able to read the file. Do not grant agents administrator access.

The file is optional for lists and is not Pi-host synced routing configuration. Existing user-owned files passed with --actions-file are not automatically trusted.

Ask the administrator to add each grant to the protected file. Use vault and item identifiers in reference when possible. Store the reference only.

{
  "check-service": {
    "account": "example.1password.com",
    "reference": "op://vault-id/item-id/credential",
    "url": "https://api.example.com/status",
    "header": "bearer"
  }
}
Field Value
Action name Start with a lowercase letter. Use up to 64 lowercase letters, digits, or hyphens.
account 1Password sign-in address or account identifier on the Approval Mac.
reference Exact 1Password field reference.
url Exact HTTPS destination. Use a service you trust with this credential.
header bearer sends Authorization: Bearer <value>. x-api-key sends X-API-Key: <value>.

Ask Pi to discover the grant name and then run the action. A grant is not created automatically. The Mac supplies the configured credential and destination.

End approval

Lock 1Password to end its approvals. Exit Pi to close its SSH terminal.

Flow

Remote approval flow. Pi opens or reuses an SSH pseudo-terminal on the selected Mac, checks its identity and console login, and runs signed native op.

For remote requests, Pi checks the selected Mac's hardware identity and console login. It uses platform commands and signed native op on the desktop Mac. The same SSH pseudo-terminal supports metadata lists and previously authorized actions. Pi closes the terminal after 10 minutes without a request or when Pi exits.

1Password authorizes each account in the approval terminal separately. Authorization expires after 10 minutes of inactivity. It also expires 12 hours after the initial approval. Lock 1Password to revoke its approvals. 1Password approval rules

Limits and recovery

What you see What to check
Mac missing from the picker Enable its Herdr profile. Check SSH access, macOS, and the signed op installation. Discovery needs no account access.
Wrong Mac or desktop login Check the saved Herdr profile and the Mac's console login. Select the Mac again with /1password.
Approval did not complete Check the 1Password prompt and desktop integration on the selected Mac. Use Touch ID when the prompt offers it.
Approval Mac busy Wait for the current request to finish.
No action names Ask the Mac administrator to check the protected grant file and its read access. Lists do not need that file.
Action discovery failed Ask the Mac administrator to fix the reported file access, JSON format, or grant field in actions.json.
Approved action failed Check the account, field reference, and destination in the protected Mac-local grant. Check that the service returns a 2xx response.

Run other op commands directly on the Mac with desktop integration. If Pi already loads a skill named op, keep one copy active to avoid a name conflict.