Repository navigation
Lead primitive-connect with the agent's email address as its identity - #51
Merged
Merged
Conversation
SKILL.md now opens with the agent's address and the handful of commands that cover everyday use: whoami, send, reply, chat, wait (with --code and --link for sign-up verification), emails get --context, emails search and check-mail, plus task recipes. Hook-registered sessions act as the agent automatically, so the main flow no longer prefixes commands with PRIMITIVE_AGENT_PROFILE. Connection setup, result handling, one address per session, poll mode, explicit profiles, member-only commands and disconnecting move to references/connect.md. New references/external-services.md covers sign-ups, verification codes and links, and handing the address to other tools. The full trust rules move to references/collaboration.md; SKILL.md keeps a short form with new rules for external services and secrets in mail. The CLI preflight reports whether `primitive wait` is available as an advisory line and never fails an older CLI for lacking it.
…ty behaviour `primitive emails wait` has no --json flag, and for a connected agent it only waits for a reply to one of its own sends, so it cannot catch a service's verification email. The fallback for CLIs without `primitive wait` is now to run `primitive agent check-mail` until the email is listed and read it with `primitive emails get --id <id> --context`, in SKILL.md, the external services reference and the preflight's advisory line. A test keeps the broken form out. Also matches the CLI changes: `primitive wait` sees only mail that arrives after it starts (--include-existing adds the newest 50), exits 5 on timeout and 6 when no code or link is found, and accepts 90s/5m/1h durations. The session environment export is Claude Code only, so Codex sessions select their profile explicitly; whoami --json reports address, profile and source; send and reply refuse a foreign --from; `env -u PRIMITIVE_AGENT_PROFILE` also runs a command as the member.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rewrites
skills/primitive-connectso an agent's email address is simply its identity.SKILL.md(380 to 176 lines) opens with "You have an email address. It is who you are to people, services and other agents." followed by the everyday commands (whoami,send,reply,chat,wait --code/--link,emails get --context,emails search,agent check-mail) and task recipes: ask a person and use the answer, sign up for a service and verify, reply in a thread, hand the address to another tool.PRIMITIVE_AGENT_PROFILEandPRIMITIVE_AGENT_ADDRESSare already in the environment, so the main flow drops thePRIMITIVE_AGENT_PROFILE=<profile>prefixes. The explicit-profile path is documented inreferences/connect.md#sessions-without-the-hook.--no-signal,--fyi,--all, answering the latest message, pausing, work claims, muting, repeating messages, keep receiving while busy, who you report to, trust rules. New rules: sign up for or log in to external services only when the owner's task calls for it; never put credentials, tokens, setup URLs or verification codes in mail.references/connect.md: the one-command connect, result handling, the one-time naming offer, one address per session (already_connectedchoices), sessions without the hook, more than one address, member-only commands (PRIMITIVE_AGENT_PROFILE= primitive <command>), poll-mode checking, hook repair and disconnect.references/external-services.md: verification codes and links, link safety, credentials, giving the address to tools, older-CLI fallback.references/collaboration.md#trust-rules-in-detail.scripts/check-cli-capabilities.mjsreportsprimitive waitavailability as an advisory line after a passing preflight; older CLIs still pass and are told to pollprimitive agent check-mailand read withprimitive emails get --id <id> --context(emails waithas no--jsonand, for a connected agent, only waits on replies to its own sends).Testing
npm test --prefix skills/primitive-connect: 83 pass, including the link and anchor checker across SKILL.md and references.node scripts/check-plugin-manifests.mjspasses.wait: passes and prints the fallback line.