primcli 3.0.0-preview.25 → 3.0.0-preview.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-command-DhY2wrh5.js → api-command-B-nuABGm.js} +105 -46
- package/dist/{cli-command-names-DiNDwwDX.js → cli-command-names-no0f7d7s.js} +6 -0
- package/dist/{cli-config-D2MU7PiU.js → cli-config-CwZJQIcn.js} +283 -23
- package/dist/{machine-session-BTJXO0vi.js → machine-session-1utuweTi.js} +3 -3
- package/dist/{notify-session-DrgOcIT6.js → notify-session-CM4_ZYe9.js} +1 -1
- package/dist/oclif/auto-signal-worker.js +2 -2
- package/dist/oclif/command-not-found.js +1 -1
- package/dist/oclif/index.js +463 -119
- package/dist/oclif/receiver-heal.js +2 -2
- package/dist/oclif/root-signup-hint.js +1 -1
- package/dist/{signal-command-BmxZqCot.js → signal-command-D4ZIidPX.js} +2 -2
- package/dist/skills/primitive-connect/SKILL.md +5 -6
- package/dist/skills/primitive-connect/references/access-passes.md +32 -0
- package/dist/skills/primitive-connect.json +4 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as agentProfileDirectory, G as loadConnectedAgentProfile, R as AGENT_PROFILE_ENV, V as agentProfileName, dt as detectAgentRuntime } from "../cli-config-CwZJQIcn.js";
|
|
2
2
|
import { a as backgroundListenStatus, i as backgroundListenRestartable, s as claimBackgroundListenRestart, t as BACKGROUND_LISTEN_RELAUNCH_ENV } from "../listen-background-DyBYca28.js";
|
|
3
|
-
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
3
|
+
import { d as SESSION_UUID, t as notificationScope } from "../notify-session-CM4_ZYe9.js";
|
|
4
4
|
import { d as readMailJson } from "../shared-mail-files-BAQSGxxz.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as normalizeApiBaseUrl, i as loadCliConfig, l as resolveConfigEnvironment } from "../cli-config-CwZJQIcn.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Gn as sendEmail, S as describeApiFailure, h as sendPreparedSignal, ht as createEndpoint, p as prepareSignalEmail, wn as listSentEmails, zt as getEmail } from "./repeats-Dj_o6c-X-CK1wU9lP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as bareAddress, Dt as successfulSendOutcome, c as extractErrorPayload, ut as classifySendError } from "./api-command-B-nuABGm.js";
|
|
3
3
|
import { recordSentSignal } from "./oclif/auto-signals.js";
|
|
4
4
|
import { _ as acquireListenLock, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, l as privateMailDirectory, m as withMailLock, n as invalidSharedMail, o as mailObject, p as syncMailDirectory, r as mailAddress, s as mailString, t as SharedMailStateError, v as compareListenProcessIdentity, x as listenProcessIdentity, y as listenIdentity } from "./shared-mail-files-BAQSGxxz.js";
|
|
5
5
|
import { i as readApiBeforeDeadline, n as isPlainChatReply, o as scopedChatSenderTrust } from "./scoped-chat-DN0qj4AY.js";
|
|
@@ -9,7 +9,7 @@ import { opendirSync } from "node:fs";
|
|
|
9
9
|
import { createHash, randomUUID, scryptSync } from "node:crypto";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
12
|
-
// ../sdk-node/dist/api-
|
|
12
|
+
// ../sdk-node/dist/api-DIBTC4OT.js
|
|
13
13
|
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
14
14
|
function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
15
15
|
let lastEventId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: primitive-connect
|
|
3
|
-
description: Load before any primitive command or Primitive mail work, including in a session that is already connected
|
|
3
|
+
description: Load before any primitive command or Primitive mail work, including in a session that is already connected or using a temporary Access Pass. Covers your agent email address (sending, replying, waiting for answers or sign-up verification codes/links, reading and searching mail, --fyi acknowledgements, automatic signals, work claims, thread muting and peer agents), claiming temporary Access Passes (primitive connect), respecting global credential locks (primitive lock), pulling your live permission- and entitlement-scoped skill (primitive skill), and connecting an agent from a setup instruction (npx -y primitive@latest agent connect) or over the HTTP API without a terminal.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Your email address
|
|
@@ -26,6 +26,7 @@ session](#connect-this-session). Never send as your owner's own login instead.
|
|
|
26
26
|
| To | Run |
|
|
27
27
|
| --- | --- |
|
|
28
28
|
| Know who you are | `primitive whoami` |
|
|
29
|
+
| Load your live scoped skill | `primitive skill` (or `primitive skill install`) |
|
|
29
30
|
| Write to someone | `primitive send --to <address> --subject "<subject>" --body-stdin` |
|
|
30
31
|
| Answer an email | `primitive reply --id <email-id> --body-stdin` |
|
|
31
32
|
| Ask and use the exact answer | `primitive chat <address>`, question on stdin |
|
|
@@ -159,10 +160,8 @@ Details: [Trust rules in detail](references/collaboration.md#trust-rules-in-deta
|
|
|
159
160
|
|
|
160
161
|
## Connect this session
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
pastes a setup instruction from the Primitive app, that request authorizes the
|
|
164
|
-
connection; do not ask again. Run this in your own non-interactive tool shell,
|
|
165
|
-
with the setup URL on stdin through a quoted heredoc, never as an argument:
|
|
163
|
+
For a temporary Access Pass (`pit_v1_...`), pipe it into `primitive connect` (it dominates global auth automatically; never run `primitive unlock` if locked) and run `primitive skill` ([Access Passes and live skill](references/access-passes.md)).
|
|
164
|
+
Skip agent setup in a hook-registered Claude Code session: it is already connected. When the owner pastes a setup instruction from the Primitive app, that request authorizes the connection; do not ask again. Run this in your own non-interactive tool shell, with the setup URL on stdin through a quoted heredoc, never as an argument:
|
|
166
165
|
|
|
167
166
|
```sh
|
|
168
167
|
npx -y primitive@latest agent connect --session "$CLAUDE_CODE_SESSION_ID" --json <<'INVITATION'
|
|
@@ -181,7 +180,7 @@ Without Node.js 22 or a terminal: [HTTP API path](references/manual-setup.md#con
|
|
|
181
180
|
Read the one a task needs. Their commands assume this session acts as its
|
|
182
181
|
agent; without the hook, see [Sessions without the hook](references/connect.md#sessions-without-the-hook).
|
|
183
182
|
|
|
184
|
-
- Identity: [connect and manage](references/connect.md), [external services](references/external-services.md)
|
|
183
|
+
- Identity: [connect and manage](references/connect.md), [access passes and live skill](references/access-passes.md), [external services](references/external-services.md)
|
|
185
184
|
- Mail: [conversations](references/conversations.md), [collaboration](references/collaboration.md), [contacts](references/contacts.md), [first contact](references/contact-requests.md)
|
|
186
185
|
- Receiving: [presence](references/presence-and-receiving.md), [native sessions](references/native-session.md)
|
|
187
186
|
- Without the CLI: [manual and HTTP setup](references/manual-setup.md), [HTTP helper](references/private-api-fallback.md), [mail helpers](references/communication.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Temporary Access Passes and Live Scoped Skill
|
|
2
|
+
|
|
3
|
+
## Claiming a temporary Access Pass
|
|
4
|
+
|
|
5
|
+
When a user shares a temporary Access Pass URL (`https://api.primitive.dev/v1/access/pit_v1_...`) or `pit_v1_...` token, claim it through stdin so the secret stays out of process listings:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
printf '%s' '<pass-url-or-token>' | primitive connect
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- An active Access Pass binds to this agent session (auto-detecting `PRIMITIVE_SESSION_ID`, Claude Code, Codex, Antigravity, Cursor, Windsurf, Gemini CLI, OpenCode, and similar harnesses, or `--profile <name>`) and automatically dominates any global CLI login (`credentials.json`) or ambient `PRIMITIVE_API_KEY`.
|
|
12
|
+
- Never bypass an active Access Pass to use the user's global login instead, never print the returned API key, and do not auto-revoke the pass after answering unless the user explicitly asks to end access (it expires automatically).
|
|
13
|
+
- If you need more time, wider scope, or a production API key, send the user the management link returned by `primitive connect` or `primitive whoami` (`?action=extend&add=4h`, `?action=expand`, or `?action=promote`).
|
|
14
|
+
|
|
15
|
+
## Respecting global credential locks (`primitive lock`)
|
|
16
|
+
|
|
17
|
+
Users can lock their global CLI credentials (`credentials.json` and `PRIMITIVE_API_KEY`) with `primitive lock` so local agent sessions cannot accidentally use admin credentials.
|
|
18
|
+
|
|
19
|
+
- Active Access Passes (`primitive connect <url>`) and connected agent profiles (`PRIMITIVE_AGENT_PROFILE`) continue to work normally while locked.
|
|
20
|
+
- If a command fails because global credentials are locked, never run `primitive unlock` or try to work around the lock. Ask the user to share a scoped Access Pass (`primitive connect`) or to unlock manually in their own interactive terminal.
|
|
21
|
+
|
|
22
|
+
## Loading your live permission- and entitlement-scoped skill
|
|
23
|
+
|
|
24
|
+
After connecting (with an Access Pass, connected agent profile, or API key), pull the live skill document tailored to your exact active permissions and organization entitlements:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
primitive skill # print live scoped SKILL.md to stdout
|
|
28
|
+
primitive skill install # write into local agent skill directories
|
|
29
|
+
primitive skill --check # exits 0 if fresh, 2 if stale
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The live skill only includes capabilities both your credential and the organization permit (such as staged reply and standalone drafts, email rules, mail activity coordination, or semantic search). Re-run `primitive skill` or `primitive skill --check` if the user expands your pass or changes org entitlements.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primitive-connect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "c1133484268300c5",
|
|
4
4
|
"source": {
|
|
5
5
|
"repository": "https://github.com/primitivedotdev/skills",
|
|
6
6
|
"path": "skills/primitive-connect",
|
|
7
|
-
"commit": "
|
|
7
|
+
"commit": "03032d11695af6642d7cb1e0ddd7ae4d954c3ca0"
|
|
8
8
|
},
|
|
9
9
|
"files": {
|
|
10
|
-
"SKILL.md": "
|
|
10
|
+
"SKILL.md": "4508383562a1ead54a1cb62a6cd0c99661e614ccc14cdda7bcc285c66de3b9fa",
|
|
11
11
|
"package-lock.json": "5edf89546abae8a22d9cf67d1a0966f1df682e23c341a09a51c2ebdc95866ba9",
|
|
12
12
|
"package.json": "3ea7cf130139b3106b3e4909032bc53571e6e4cdbde48ab572262e3b4a250ca4",
|
|
13
|
+
"references/access-passes.md": "f8f4d3aa4ae5053effb26e92c5817123f0b6ca1cdc95936fe429857f5350da16",
|
|
13
14
|
"references/collaboration.md": "b9c599bf66ae58ea8c779cdceddb11882cc9f0da2fba0e4ca363ad8d01d64d5b",
|
|
14
15
|
"references/communication.md": "d9599e3c563a4cd1c7dd658f730306b669f7ad6522b3632dc55fd5feee60cd30",
|
|
15
16
|
"references/connect.md": "46d3e62e6b021100a0ddf84269bcb59a1725a3da4e360c797f378ce13cf5c4ec",
|