@myapihq/cli 2.7.1 → 2.8.0

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.
Files changed (40) hide show
  1. package/dist/commands/account.js +15 -0
  2. package/dist/commands/audience.js +7 -5
  3. package/dist/commands/crm/companies.js +4 -4
  4. package/dist/commands/crm/contacts.js +4 -4
  5. package/dist/commands/crm/index.js +3 -0
  6. package/dist/commands/crm/origin-flag.test.d.ts +1 -0
  7. package/dist/commands/crm/origin-flag.test.js +38 -0
  8. package/dist/commands/crm/pagination.d.ts +2 -0
  9. package/dist/commands/crm/pagination.js +9 -0
  10. package/dist/commands/domain.js +11 -0
  11. package/dist/commands/feedback.d.ts +10 -0
  12. package/dist/commands/feedback.js +173 -0
  13. package/dist/commands/flag-reachability.test.d.ts +1 -0
  14. package/dist/commands/flag-reachability.test.js +274 -0
  15. package/dist/commands/fn.js +7 -2
  16. package/dist/commands/llm.d.ts +1 -0
  17. package/dist/commands/llm.js +25 -9
  18. package/dist/commands/task.js +12 -4
  19. package/dist/completion.js +2 -1
  20. package/dist/exposes.test.js +1 -0
  21. package/dist/index.js +7 -0
  22. package/dist/skills/my-api-hq/SKILL.md +25 -1
  23. package/dist/skills/my-audience-api/SKILL.md +5 -5
  24. package/dist/skills/my-auth-api/SKILL.md +8 -1
  25. package/dist/skills/my-company-api/SKILL.md +3 -3
  26. package/dist/skills/my-container-api/SKILL.md +25 -4
  27. package/dist/skills/my-crm-api/SKILL.md +6 -6
  28. package/dist/skills/my-database-api/SKILL.md +22 -1
  29. package/dist/skills/my-domain-api/SKILL.md +18 -1
  30. package/dist/skills/my-email-api/SKILL.md +36 -1
  31. package/dist/skills/my-function-api/SKILL.md +35 -1
  32. package/dist/skills/my-funnel-api/SKILL.md +6 -3
  33. package/dist/skills/my-git-api/SKILL.md +7 -1
  34. package/dist/skills/my-llm-api/SKILL.md +17 -4
  35. package/dist/skills/my-people-api/SKILL.md +3 -3
  36. package/dist/skills/my-pixel-api/SKILL.md +12 -1
  37. package/dist/skills/my-storage-api/SKILL.md +31 -2
  38. package/dist/skills/my-task-api/SKILL.md +9 -1
  39. package/dist/skills/my-webhook-api/SKILL.md +12 -1
  40. package/package.json +7 -2
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Run containers on demand — long-running services, background workers, and scheduled jobs. The heavier-duty sibling of edge functions, for native deps and long execution.
6
6
  triggers: [container, cloud run, dynamic app, custom domain app, service, worker, scheduled job, deploy container, docker image]
7
- checksum: sha256-3864bbb98fab89ba9e937c38bed072e22f33663ec7cbc23a43f24192275bcffd
7
+ checksum: sha256-47eda6baa9055dadbd3e9d04df9fc425f1a7e96a9cd80c971c4951b97f1e94ff
8
8
  ---
9
9
 
10
10
  # MyContainerAPI
@@ -16,7 +16,11 @@ A container runs a pre-built image on managed cloud infrastructure. Three types:
16
16
  The lifecycle is **create → deploy → (optionally) bind a custom domain**.
17
17
 
18
18
  - `create` registers the container and issues a **scoped API key**, returned once. The running container receives it as the `MYAPI_KEY` env var, so your code calls other MyAPI slots with no token handling. Deploy rotates this key.
19
- - `deploy` ships a pre-built image reference to the runtime and makes the container live at a generated URL.
19
+ - `deploy` takes **either** a pre-built image reference **or** a source
20
+ directory. `--source ./dir` tars the directory, builds it server-side
21
+ (typically ~4 minutes) and deploys the result — **no Docker on your machine,
22
+ no registry account, no image to push**. If you can write a Dockerfile you
23
+ can deploy; you do not need to be able to run one.
20
24
  - `domain` puts the container on a **custom domain** — how you serve a dynamic app at `app.yourbrand.com`.
21
25
 
22
26
  ### Deploying safely — NOT YET POSSIBLE ON THIS PLATFORM
@@ -74,10 +78,16 @@ Get it right:
74
78
  myapi container create --name api --type service --port 8080
75
79
  # → prints a scoped API key ONCE — save it if your code needs it
76
80
 
77
- # 2. Deploy. This takes 100% of traffic immediately there is no staging
78
- # step, so verify on a non-production container FIRST.
81
+ # 2a. Deploy from source MyAPI builds it. No local Docker required.
82
+ # Takes ~4 minutes; the CLI polls until it is live.
83
+ myapi container deploy <id> --source ./my-app
84
+
85
+ # 2b. Or ship an image you already built and pushed.
79
86
  myapi container deploy <id> registry.example.com/my-app:v1
80
87
 
88
+ # Either way this takes 100% of traffic immediately — there is no staging
89
+ # step, so verify on a non-production container FIRST.
90
+
81
91
  # 3. Check what you actually shipped. Assert on content: a build whose
82
92
  # frontend never bundled still binds its port and returns 200.
83
93
  curl -s https://<your-domain>/ | grep -q 'assets/' || echo "BROKEN BUILD"
@@ -114,6 +124,13 @@ way that looks like an application bug.
114
124
  `create` and cannot be changed by `deploy`.** Passing them to `deploy` does
115
125
  nothing. Recreate the container to change them.
116
126
 
127
+ ### Keeping a service warm
128
+
129
+ `--min-instances 1` at create stops a `service` scaling to zero, which removes
130
+ cold starts at the cost of running continuously. Leave it at the default `0`
131
+ unless latency on the first request actually matters — a scaled-to-zero
132
+ service costs nothing while idle.
133
+
117
134
  ## Notes
118
135
 
119
136
  - The scoped API key is shown **once** at create, and again (rotated) on every deploy. Save it if your code needs it.
@@ -122,6 +139,10 @@ way that looks like an application bug.
122
139
  the same stream and share the `--tail` budget, so raise `--tail` with it.
123
140
  - Custom domains need a deployed container **and** a MyAPI-registered parent domain — see `my-domain-api`.
124
141
  - Containers are for dynamic apps and native deps. For static sites use `my-funnel-api`; for edge functions use `my-function-api`.
142
+ - **`--source` does not honour `.dockerignore`.** It tars the directory as-is,
143
+ so a `node_modules` can push the context past the limit and fail as
144
+ `invalid_json_response`. Build the tarball yourself and pass
145
+ `--source ctx.tar.gz`, or keep the directory clean.
125
146
 
126
147
  Run `myapi container --help` for the full flag reference.
127
148
 
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  The canonical store of engaged contacts + companies for an org. Auto-ingests from inbound webhooks via a configurable dot-path. Fixed lifecycle_stage enum (cold | warm | qualified | customer | churned). Append-only event timeline with reserved kinds. Soft delete + restore. Promote-from-Goldfox closes the discovery → engagement loop.
6
6
  triggers: [crm, contact, company, lead, engagement, pipeline, lifecycle, qualified, customer, webhook ingest, promote]
7
- checksum: sha256-50cbdd28ed2a901b7a75f1a6c1df1c225d256a8d281ad86cf1e3b42511edc2fe
7
+ checksum: sha256-dfadb20670d9d978503549d330c2c9717fbe6d13ac35b53d9e1a8874d2136fde
8
8
  ---
9
9
 
10
10
  # MyCRMAPI
@@ -38,7 +38,7 @@ Move stage with `myapi crm contacts update <id> --stage qualified`. Every stage
38
38
  goldfox | email | pixel | webhook | manual
39
39
  ```
40
40
 
41
- Set automatically from how the contact entered. Filter with `--source manual` (added by hand) vs `--source goldfox` (from outreach).
41
+ Set automatically from how the contact entered. Filter with `--origin manual` (added by hand) vs `--origin goldfox` (from outreach).
42
42
 
43
43
  ### Event timeline — reserved kinds
44
44
 
@@ -75,7 +75,7 @@ A contact promoted from Goldfox carries a `goldfox_person_id`. In v2 the GET res
75
75
 
76
76
  ### Search filter — re-engagement semantics
77
77
 
78
- `--max-last-engagement-days N` returns contacts last engaged *more than* N days ago, and intentionally **includes contacts with no engagement at all** (promoted-but-never-emailed Goldfox leads) — the natural targets of a re-engagement campaign. To separate "never tried" from "tried and went cold," layer `--source goldfox` or post-filter the JSON.
78
+ `--max-last-engagement-days N` returns contacts last engaged *more than* N days ago, and intentionally **includes contacts with no engagement at all** (promoted-but-never-emailed Goldfox leads) — the natural targets of a re-engagement campaign. To separate "never tried" from "tried and went cold," layer `--origin goldfox` or post-filter the JSON.
79
79
 
80
80
  ### Failure modes
81
81
 
@@ -92,7 +92,7 @@ A contact promoted from Goldfox carries a `goldfox_person_id`. In v2 the GET res
92
92
  | Command | What it does |
93
93
  |---|---|
94
94
  | `myapi crm contacts list [--limit N] [--offset N]` | List all contacts (newest engagement first) |
95
- | `myapi crm contacts search [--stage ...] [--source ...] [--email ...] [--min/max-last-engagement-days N]` | Filter contacts |
95
+ | `myapi crm contacts search [--stage ...] [--origin ...] [--email ...] [--min/max-last-engagement-days N]` | Filter contacts |
96
96
  | `myapi crm contacts create <email> [--first-name ...] [--last-name ...] [--stage ...] [--custom-json ...]` | Manually create (source='manual') |
97
97
  | `myapi crm contacts get <id>` | Fetch one contact (with embedded Goldfox enrichment when available) |
98
98
  | `myapi crm contacts update <id> [--stage ...] [...]` | Patch fields. Stage change emits `stage_changed` event |
@@ -138,7 +138,7 @@ myapi crm contacts update <id> --stage customer
138
138
  myapi crm contacts events <id>
139
139
 
140
140
  # What landed in CRM from this Stripe webhook?
141
- myapi crm contacts search --source webhook --json \
141
+ myapi crm contacts search --origin webhook --json \
142
142
  | jq '.contacts[] | {email, last_engagement_at}'
143
143
  ```
144
144
 
@@ -151,7 +151,7 @@ URL=$(echo "$WH" | jq -r .url)
151
151
  echo "Point Stripe at: $URL"
152
152
 
153
153
  # Later, after Stripe fires...
154
- myapi crm contacts search --source webhook --email "$STRIPE_CUSTOMER_EMAIL"
154
+ myapi crm contacts search --origin webhook --email "$STRIPE_CUSTOMER_EMAIL"
155
155
  myapi crm contacts events <id> --kind webhook_received
156
156
  ```
157
157
  <!-- llm:end -->
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Per-org KV store with named namespaces, JSON values up to 256 KB, prefix-scan listing, and compare-and-swap via etag. The substrate for any stateful agent-built app on MyAPI — user tables, session stores, idempotency keys, per-user lookup maps.
6
6
  triggers: [database, kv, key value, namespace, store, state, etag, cas, session, idempotency]
7
- checksum: sha256-f098cb574a1773135b09cbe79bb75eb33e34b1dc90737aa80da2452bb53e972e
7
+ checksum: sha256-924071245c33bf3e43f085fbd756af003e19c990f4522f658de33f42504452d7
8
8
  ---
9
9
 
10
10
  # MyDatabaseAPI
@@ -104,6 +104,27 @@ myapi database get "by-email:$EMAIL" --ns users --json | jq -r .value
104
104
  - **Eventual `key_count`.** The `keys` field on a namespace is approximate; don't use it for strict pagination math.
105
105
  - **Free in v1.** Metered later if usage shows a need. Cost discipline still applies — store data, not blobs.
106
106
 
107
+
108
+ ## Calling this from deployed code (HTTP)
109
+
110
+ The CLI is not what runs in production — a deployed function or container calls
111
+ the HTTP API directly. That surface was previously only discoverable by
112
+ grepping the CLI bundle, which cost one team an hour per slot.
113
+
114
+ ```
115
+ base https://api.myapihq.com
116
+ path /database/orgs/{org_id}/namespaces/{ns}/keys/{key}
117
+ auth Authorization: Bearer <api key>
118
+ (inside a function: env.__MYAPI_KEY · inside a container: env.MYAPI_KEY)
119
+ body writes take {"value": <json>} — the value is WRAPPED
120
+ reply { "success": true, "data": …, "error": null, "meta": {…} }
121
+ Unwrap `data`. On failure `success` is false and `error` is
122
+ { code, message }.
123
+ ```
124
+
125
+ **The org id goes in the PATH, not a header.** There is no `X-Org-Id`.
126
+ **Base URLs differ per slot** — do not assume one host for everything.
127
+
107
128
  Run `myapi database --help` for inline reference.
108
129
 
109
130
  **End-to-end example:** `examples/authenticated-app/` walks the full seam — hosted login → token verification → per-user KV record → deployed container — including the parts that cost real users hours (KV writes must be wrapped as `{"value": …}`).
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Register new domains and manage edge settings. Required before a funnel can go live on a custom URL.
6
6
  triggers: [domain, register domain, dns, custom domain, edge, cdn, security level, browser check, renew, namecheap]
7
- checksum: sha256-8f96d19c11c3591af71e9d73b2cea6d83f40abbfa1c58c5674dbe15db02efa3c
7
+ checksum: sha256-6a686b453528c69dcc791db409c04a514422951abf333c8feed7c614311815cb
8
8
  ---
9
9
 
10
10
  # MyDomainAPI
@@ -116,4 +116,21 @@ Set `essentially_off` + `browser-check=off` to allow AI crawlers and training bo
116
116
  - All commands default to `--org` from your saved config (set with `myapi config set-org <id>`).
117
117
  - `402 INSUFFICIENT_FUNDS` = empty wallet → `myapi billing topup <amount>` (or keep it funded automatically: `myapi billing auto-recharge set`). `402 SPEND_CAP_EXCEEDED` = you hit your account spend ceiling → raise it with `myapi billing spend-cap`.
118
118
 
119
+ ## DNS record flags
120
+
121
+ ```bash
122
+ myapi domain records create <domain> --type A --name @ --content 1.2.3.4 --ttl 300
123
+ myapi domain records create <domain> --type MX --name @ --content mx.x.com --priority 10
124
+ myapi domain records create <domain> --type CNAME --name app --content x.com --proxied
125
+ ```
126
+
127
+ - `--ttl <n>` — seconds; default `1` meaning "automatic". Explicit range 60–86400.
128
+ - `--priority <n>` — MX only, and required for it (typical `10`).
129
+ - `--proxied` — route through the edge proxy (A/AAAA/CNAME only). Off means
130
+ the record resolves straight to your origin, exposing its address.
131
+ - `myapi domain assign <domain> --no-www` skips the `www` → apex redirect.
132
+ - `--force` on assign re-points a domain already bound elsewhere. It is the
133
+ reassign path, so pass `--org` explicitly and check `domain list --filter all`
134
+ first.
135
+
119
136
  Run `myapi domain --help` or `myapi domain <subcommand> --help` for full flag reference.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Send transactional and bulk email from your own domain. Create mailboxes, send/receive messages, generate AI templates, and manage warmup.
6
6
  triggers: [email, mailbox, send email, transactional email, template, warmup, inbox, outbox, ses, sender reputation]
7
- checksum: sha256-fa1eb6ee9e24935266643ceeecf7a748747b23377a0bfe256f76b71b62bd6349
7
+ checksum: sha256-aa22381613affcff041a8d51d2acb2ba657fecefc97f4feba45958bcc11b2e06
8
8
  ---
9
9
 
10
10
  # MyEmailAPI
@@ -66,4 +66,39 @@ myapi email warmup stats --address hello@yourdomain.com
66
66
  - Sending is opt-in per mailbox. Newly-created mailboxes can receive but not send until `activate-sending` runs.
67
67
  - Templates are org-scoped. Set a default org once: `myapi config set-org <id>`.
68
68
 
69
+
70
+ ## Which name mail actually lives on
71
+
72
+ Two things that read as contradictory and are not:
73
+
74
+ - **Mailbox addresses are on the APEX** — `contact@yourdomain.com`, never
75
+ `contact@mail.yourdomain.com`. `mail.<domain>` is the *sending identity* that
76
+ `myapi domain email-setup` provisions, not a mailbox namespace. Creating a
77
+ mailbox on the subdomain fails with `DOMAIN_NOT_OWNED`.
78
+ - **Registration and assign put `MX`, `SPF` and `DMARC` on the apex** whether or
79
+ not you run `email-setup`. So "apex is never touched" — which describes
80
+ `email-setup` specifically — is not true of the domain as a whole. If you plan
81
+ to run Google Workspace or another provider on the apex, check the existing
82
+ records first with `myapi domain records <domain>`.
83
+
84
+ ## Calling this from deployed code (HTTP)
85
+
86
+ The CLI is not what runs in production — a deployed function or container calls
87
+ the HTTP API directly. That surface was previously only discoverable by
88
+ grepping the CLI bundle, which cost one team an hour per slot.
89
+
90
+ ```
91
+ base https://api.myemailapi.com ← not the gateway
92
+ path /email/mailboxes · /email/orgs/{org_id}/messages/send
93
+ auth Authorization: Bearer <api key>
94
+ (inside a function: env.__MYAPI_KEY · inside a container: env.MYAPI_KEY)
95
+ body application/json
96
+ reply { "success": true, "data": …, "error": null, "meta": {…} }
97
+ Unwrap `data`. On failure `success` is false and `error` is
98
+ { code, message }.
99
+ ```
100
+
101
+ **The org id goes in the PATH, not a header.** There is no `X-Org-Id`.
102
+ **Base URLs differ per slot** — do not assume one host for everything.
103
+
69
104
  Run `myapi email --help` or `myapi email <namespace> --help` for full flag reference.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Deploy JavaScript functions to the MyAPI edge runtime. Register a function, upload a single-file JS bundle, get a live HTTP invocation URL or run it on a cron schedule. Each function gets a scoped capability key for cross-slot calls.
6
6
  triggers: [function, deploy function, edge function, serverless, cloudflare worker, cron, scoped api key, capability key, invocation url, bundle]
7
- checksum: sha256-08524ea08e91dcb6c8b68b64a7b4034d24a98a18968acd4ba80e45dbd6f85d09
7
+ checksum: sha256-a29b3c96645c59317c0896c9a886d9904bdb2ebde9eb8582d0cb7071d0b9ac2c
8
8
  ---
9
9
 
10
10
  # MyFunctionAPI
@@ -78,9 +78,36 @@ myapi fn get fn_abc123
78
78
  myapi fn delete fn_abc123
79
79
  ```
80
80
 
81
+ ### The scoped API key is already in your function — as `__MYAPI_KEY`
82
+
83
+ **Two leading underscores, and it is injected for you.** Verified by probing a
84
+ deployed function: `Object.keys(env)` returns exactly `["__MYAPI_KEY"]`, and
85
+ `MYAPI_KEY` (no underscores) is NOT present.
86
+
87
+ ```js
88
+ export default {
89
+ async fetch(request, env) {
90
+ const r = await fetch('https://api.myapihq.com/database/orgs/<org>/namespaces/app/keys/x', {
91
+ headers: { Authorization: `Bearer ${env.__MYAPI_KEY}` },
92
+ });
93
+ return new Response(await r.text());
94
+ },
95
+ };
96
+ ```
97
+
98
+ **Do not capture the key printed at `fn create` and set it yourself.** Every
99
+ `fn deploy` rotates it, so a manually-set copy goes stale on the next deploy
100
+ and the function starts returning 502 with nothing in the deploy output to
101
+ explain it. The injected `__MYAPI_KEY` is always current.
102
+
103
+ Note the name differs from containers, which receive `MYAPI_KEY` without the
104
+ underscores. Both verified 2026-07-28.
105
+
81
106
  ### Using the scoped API key
82
107
 
83
108
  ```bash
109
+ # You do NOT need this — env.__MYAPI_KEY is injected and always current.
110
+ # Shown only for calling the function's slots from OUTSIDE the function.
84
111
  # Save the API key returned at create/deploy time
85
112
  SCOPED_KEY="hq_live_..."
86
113
 
@@ -100,5 +127,12 @@ curl -H "Authorization: Bearer $SCOPED_KEY" \
100
127
  - The bundle is a **single JavaScript file** (≤4MB). Bundle your dependencies before deploy (esbuild/rollup/etc.).
101
128
  - `--cron` is set at create time; the trigger type is fixed for the function's lifetime.
102
129
  - Deploy rotates the scoped API key on every call — re-capture the printed value if other systems use it.
130
+ - `myapi fn env <id> --set KEY=VALUE,OTHER=VALUE` sets several secrets in one call instead of one command each.
131
+
132
+ **`--scope` is create-only, so treat it as permanent.** There is no
133
+ `fn scope --add`. Adding a slot later means delete + recreate, which mints a
134
+ **new function id and a new invocation URL**, breaking every reference already
135
+ handed out — docs, front-end config, webhooks, anything given to a third
136
+ party. Decide the full slot list before you publish the URL.
103
137
 
104
138
  Run `myapi fn --help` or `myapi fn <subcommand> --help` for full flag reference.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Create and publish websites (funnels) to the edge. Push raw HTML to any slug and it goes live instantly on your org's domain or preview subdomain.
6
6
  triggers: [funnel, landing page, website, page, publish, push, slug, html, edge, preview subdomain, makeautonomous]
7
- checksum: sha256-3b463d6ac52fba7d44f89195b5704b02903ffdd9a677655f9c1bff0f13b25ab4
7
+ checksum: sha256-849afbb7c2c60ea88c3476d50bf51289b77cedc819a0c2b69787075ff9c23b4b
8
8
  ---
9
9
 
10
10
  # MyFunnelAPI
@@ -33,7 +33,7 @@ Every funnel auto-provisions a **webhook** at creation (`org_webhook_id`), and e
33
33
  | `myapi funnel push [slug]` | Push HTML from stdin to a slug (default: `/`). **Overwrites** an existing page — refused without `--force`. `--json` prints `{slug, subdomain_url, overwritten, org_id, funnel_id}` |
34
34
  | `myapi funnel publish <dir>` | Upload a whole directory as the funnel's site (`--env dev\|prod`, default prod; `--api-fn <id>`; `--json`). Prod refuses to replace a live site without `--force` |
35
35
  | `myapi funnel pages [funnel_id]` | List the pages currently published to a funnel |
36
- | `myapi funnel form [funnel_id]` | Emit canonical form HTML (and register a binding with `--capture-to`) |
36
+ | `myapi funnel form [funnel_id]` | Emit canonical form HTML (`--capture-to`, `--cta`, `--success`, `--honeypot`) |
37
37
  | `myapi funnel verify [slug]` | Verify a published page is reachable + check links/webhooks |
38
38
  <!-- generated:end -->
39
39
 
@@ -83,7 +83,10 @@ Zero-config form (the happy path most agents want) — still pin the org + funne
83
83
 
84
84
  ```bash
85
85
  myapi funnel create --name acme-demo --org <org_id>
86
- myapi funnel form --slug join --fields email:required,name --funnel <funnel_id> > snippet.html
86
+ myapi funnel form --slug join --fields email:required,name --funnel <funnel_id> \
87
+ --cta "Join" --success "Thanks — check your inbox." --honeypot company_url > snippet.html
88
+ # --honeypot names a hidden field: bots fill it, humans never do, so a
89
+ # submission carrying it is dropped.
87
90
  # paste snippet.html into your page (or pipe through funnel push):
88
91
  cat page-with-snippet.html | myapi funnel push / --funnel <funnel_id>
89
92
  # Submissions land in the funnel's auto-provisioned webhook → CRM upsert on `email` → any bound workflow fires.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Hosted git repositories over HTTP. Create repos, read history (log/show/tree/blob/diff), and write atomically (commit/branch/tag/merge) — no clone needed. Real `git clone`/`push` also work over HTTPS with your API key as the password.
6
6
  triggers: [git, repo, repository, clone, push, commit, branch, tag, merge, diff, version control, source control, vcs]
7
- checksum: sha256-921cedea836edac33fefabfb46102e241d2618529db2e307cc73f4d910e7fee3
7
+ checksum: sha256-417bafc3e56707f637937f98341d6200c8a9bb6ad5d0b13f84f7b6810e0340f5
8
8
  ---
9
9
 
10
10
  # MyGitAPI
@@ -119,4 +119,10 @@ surface never leaks which repos exist).
119
119
  - **Limits.** A push body is capped at 100 MiB; per-repo size limits apply (a push past the cap is reported as a receive-pack failure).
120
120
  - **Auth field.** git may put the API key in the username or password slot — both work. Embedding it in the URL (`https://x:$KEY@…`) avoids the interactive prompt but writes the API key into `.git/config`; use a credential helper for anything persistent.
121
121
 
122
+ ## Commit authorship
123
+
124
+ `myapi git commit … --author-name "<n>" --author-email "<e>"` sets the commit
125
+ author. Without them the commit is attributed to the API key's account, which
126
+ makes every agent-written commit look like the same person.
127
+
122
128
  Run `myapi git --help` for the full flag reference.
@@ -7,7 +7,7 @@ description: >
7
7
  (classify / extract / summarize / draft) that hide the model behind a
8
8
  task. Pricing in cents per 1M tokens; charged from your MyAPI balance.
9
9
  triggers: [llm, completion, chat, embed, embedding, inference, classify, extract, summarize, draft, qwen]
10
- checksum: sha256-6c399da099802637c68eda61ba85a23286ff3dca8f50c391e80ab442777c17c4
10
+ checksum: sha256-2a9070e118134aea98a1be986d29f9c4e3a969aa960e7dfc87137bbc490ac04e
11
11
  ---
12
12
 
13
13
  # MyLLMAPI
@@ -21,9 +21,9 @@ Pricing is cents per 1M tokens at the actual upstream rate, debited from your My
21
21
 
22
22
  ## Capabilities
23
23
  <!-- llm:start -->
24
- Use this for workflow tasks — summarize a doc, classify an inbound email, extract structured data, draft a reply. The reply goes to stdout; a one-line usage footer (tokens + cost + finish reason) goes to stderr, so `myapi llm complete ... | jq` and similar pipelines work as expected.
24
+ For workflow tasks — summarize, classify, extract, draft. The reply goes to stdout and the usage footer (tokens, cost, finish reason) to stderr, so `myapi llm complete ... | jq` works.
25
25
 
26
- **Don't use this as your own model.** If you're an agent reading this, you already have a more capable model than what's exposed here. Reach for the LLM verbs when you're scripting a recurring step where a small/cheap model is the right tool — not for one-shot reasoning you can just do yourself.
26
+ **Don't use this as your own model.** If you are an agent reading this, you already have a more capable model. Reach for the LLM verbs when scripting a recurring step where a small, cheap model is the right tool — not for one-shot reasoning you can do yourself.
27
27
 
28
28
  Reach for raw `complete` when shape matters (you build the `messages` array and set `max_tokens`/`temperature`/`stop`); reach for a verb when you want a *result* and don't care which model produced it.
29
29
 
@@ -88,7 +88,7 @@ The model/provider is **never** named in the verb response — the verb is the c
88
88
 
89
89
  ### OpenAI-compatible drop-in
90
90
 
91
- `POST /llm/orgs/{org_id}/chat/completions` (and `/v1/chat/completions` alias) accepts the OpenAI request shape and returns the OpenAI response shape — **no envelope**. Same catalog and pricing as raw `complete`. Use it when existing OpenAI SDK / LangChain / any `base_url`-configurable tooling should point at MyAPI without rewriting.
91
+ `POST /llm/orgs/{org_id}/chat/completions` (alias `/v1/chat/completions`) takes and returns the OpenAI shape — **no envelope**. Same catalog and pricing as `complete`. Use it when an existing OpenAI SDK or LangChain integration should point at MyAPI unchanged.
92
92
 
93
93
  ```python
94
94
  from openai import OpenAI
@@ -160,3 +160,16 @@ INTENT=$(printf '%s' "$BODY" | myapi llm classify - \
160
160
  - **Self-hosted raw, server-picked verbs.** Raw runs on MyAPI's TPU; verbs route wherever the server picks.
161
161
  - **Cost + latency.** `usage.cost_cents` is authoritative — no markup. Varies by tier: 200–600 ms to first token, 1–3 s end-to-end.
162
162
  - **Live catalog, no streaming, no BYOK.** Don't hard-code ids — `models` is truth (CLI auto-picks if `--model` omitted). Full reply only.
163
+
164
+ ## `--facts` vs `--directives` on draft
165
+
166
+ `--facts '<json>'` is referent data, quoted as reference and never as
167
+ instructions (recipient, dates, amounts). `--directives '<json>'` is writer
168
+ controls only: tone, max_words, format, style. They are trusted differently.
169
+
170
+ ```bash
171
+ myapi llm draft --kind email --prompt "the invoice is due" \
172
+ --facts '{"to":"Ada"}' --directives '{"tone":"warm"}'
173
+ ```
174
+
175
+ `--context` is the old name for `--facts`; accepted, deprecated upstream.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Contact database backed by the Goldfox crawl. Filter people by Goldfox confidence tier, seniority, email type, country, link confidence, plus rich behavioral company signals (has_c_level, has_careers_page, has_decision_maker, etc.). The targeting layer for outbound campaigns.
6
6
  triggers: [people, contacts, leads, prospects, search, filter, goldfox, decision-makers, c-level, b2b targeting, corporate email]
7
- checksum: sha256-a4b594a30cc06d2f40fe26c594c1cb6962d91c4dbcc0625210d45a3faa27336e
7
+ checksum: sha256-1eb93087638966eee65fb7a88fe37baaa27a01dd5d97c1ef17387b1a36300c0e
8
8
  ---
9
9
 
10
10
  # MyPeopleAPI
@@ -88,7 +88,7 @@ myapi people get p_MTdlc2llY2xlLmZy.0
88
88
  ```bash
89
89
  # Build the target audience (saved filter)
90
90
  AID=$(myapi audience create "EU decision makers w/ careers signal" \
91
- --source people \
91
+ --from people \
92
92
  --filter '{"seniority":["c_level","vp_director"],"country":["DE","FR","GB"],"email_type":["corporate"],"has_careers_page":true}' \
93
93
  --json | jq -r .id)
94
94
 
@@ -100,7 +100,7 @@ myapi audience members $AID --limit 100 --json > targets.json
100
100
  ## Notes
101
101
 
102
102
  - The dataset is the Goldfox crawl — multi-million-row corporate contact data with provenance signals. Filter quality matters: defaults to `confidence=high` gives 96.4% of rows by count, but it's the curated tier; widening with `confidence=low` brings UGC rows that need spot-checking.
103
- - `seniority`, `email_type`, and `min_link_confidence` are people-only — silently ignored on `my-company-api` and on audiences with `--source company`.
103
+ - `seniority`, `email_type`, and `min_link_confidence` are people-only — silently ignored on `my-company-api` and on audiences with `--from company`.
104
104
  - `keyword` matches the row's **domain**, not name/title. Use `--keyword acme` to find people whose domain contains "acme".
105
105
  - For a persistent target list, use `my-audience-api` (snapshot the filter; re-evaluate on `audience refresh`).
106
106
 
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Tracking pixel + identity resolution for MyAPI funnels and email. Capture visits and events, resolve known users to anonymous sessions, stream interaction events for analytics. Pairs with mycrmapi for auto-ingest of pixel_visit events on known contacts.
6
6
  triggers: [pixel, analytics, tracking, visit, event, identity, session, attribution, geo, open pixel]
7
- checksum: sha256-1e8284fbf546ad1bdff32790f56f8c524a19e0b80b92cc6d612ce15295632c9f
7
+ checksum: sha256-562f081ef28c0dae01045a4135f9d073d69c50899145e75c6c97fe75b974cb15
8
8
  ---
9
9
 
10
10
  # MyPixelAPI
@@ -83,6 +83,17 @@ myapi pixel audience
83
83
  - **No write API for synthetic events** — the pixel records what the embedded JS/email-pixel observes. To inject custom timeline entries, use `myapi crm contacts/{id}/events` instead (when reserved-kind allows; today event writes are platform-only).
84
84
  - **`my-crm-api` is the durable record.** Pixel data ages out at ~90 days; CRM events are permanent. If a behavioral signal matters for long-term targeting, promote it into the CRM.
85
85
 
86
+ ## Linking a known identity
87
+
88
+ `myapi pixel identify <pixel_id>` attaches a known identity to an anonymous
89
+ visitor:
90
+
91
+ - `--email <addr>` — the address to link.
92
+ - `--external-id <id>` — your own user id, for joining back to your database.
93
+
94
+ Pass either or both. After this, `pixel identity <pixel_id>` resolves the
95
+ graph across the visitor's sessions.
96
+
86
97
  Run `myapi pixel --help` for inline reference.
87
98
 
88
99
  ## Status
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Edge-hosted asset storage. Upload a local file of any content type directly, or have the server fetch from a public URL. Each asset gets a stable public CDN URL.
6
6
  triggers: [storage, upload, ingest, asset, cdn, image hosting, file upload, get-url, download, public url]
7
- checksum: sha256-b55e3f0aa592330cadfdc2b87e730333300bfffb08866b3bc59cb0ce15d2f953
7
+ checksum: sha256-9172b0d8590a3102ce35b94ef48015ec36c624ab9bcc37fe0f7efa15bc54cf62
8
8
  ---
9
9
 
10
10
  # MyStorageAPI
@@ -89,8 +89,37 @@ Both produce identical asset records — `list` doesn't distinguish.
89
89
 
90
90
  ## Notes
91
91
 
92
- - Assets are public by default don't store sensitive files.
92
+ - **Assets are public, permanently, with no auth.** Anyone with the URL can
93
+ fetch it; there is no private mode, no signed URL, and no revocation. The id
94
+ being long and random is **not** access control — treat the URL as public the
95
+ moment it exists.
96
+ - **For personal or regulated data, encrypt before upload.** Storage only ever
97
+ sees ciphertext. A team shipping Swiss lease documents (names, dates of
98
+ birth, permit type, IBAN) used AES-256-GCM envelope encryption with a
99
+ per-document data key wrapped under a master key held in function secrets.
100
+ That is the pattern to copy until private assets exist.
93
101
  - Delete is immediate and unrecoverable — run `myapi storage list` first to confirm the asset, pass `--org` explicitly, and pass `--yes` in non-interactive runs.
94
102
  - The URL is permanent until you `myapi storage delete <id>` — embed it freely.
95
103
 
104
+
105
+ ## Calling this from deployed code (HTTP)
106
+
107
+ The CLI is not what runs in production — a deployed function or container calls
108
+ the HTTP API directly. That surface was previously only discoverable by
109
+ grepping the CLI bundle, which cost one team an hour per slot.
110
+
111
+ ```
112
+ base https://api.mystorageapi.com ← not the gateway
113
+ path /storage/orgs/{org_id}/assets/upload (multipart, field: file)
114
+ auth Authorization: Bearer <api key>
115
+ (inside a function: env.__MYAPI_KEY · inside a container: env.MYAPI_KEY)
116
+ body multipart/form-data
117
+ reply { "success": true, "data": …, "error": null, "meta": {…} }
118
+ Unwrap `data`. On failure `success` is false and `error` is
119
+ { code, message }.
120
+ ```
121
+
122
+ **The org id goes in the PATH, not a header.** There is no `X-Org-Id`.
123
+ **Base URLs differ per slot** — do not assume one host for everything.
124
+
96
125
  Run `myapi storage --help` for full flag reference.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Agent-task queue — file units of work, rank them, claim under a lease, then resolve, fail, or cancel. The agent-loop hot path.
6
6
  triggers: [task, task queue, agent loop, work queue, claim task, resolve task, lease, backlog, to-do, assignee]
7
- checksum: sha256-ead9513eafbdd4d384a3cb297facf934f786f7067028c75cc08ef2ba1ac61cf7
7
+ checksum: sha256-ceb6cdfffe465d8b0cd232eaa16868c1b8c8b10288f1cf9b4174fdd48a8d2c18
8
8
  ---
9
9
 
10
10
  # MyTaskAPI
@@ -71,4 +71,12 @@ myapi task create "Ship once payment clears" \
71
71
  - `resolve` unblocks dependents; `fail` cascades to dependents that can never proceed.
72
72
  - `resolve_on` matches platform events. Today few event kinds are emitted in production — verify the kind exists before relying on it.
73
73
 
74
+ ## Idempotency and provenance
75
+
76
+ - `--dedup-key <k>` — creating a task with a key that already exists returns
77
+ the existing task instead of a duplicate. Use it whenever a task is created
78
+ from a retryable event, which for an agent is nearly always.
79
+ - `--origin <s>` — records what created the task, and filters `task list`.
80
+ (Formerly `--source`, which still works and is undocumented.)
81
+
74
82
  Run `myapi task --help` for the full flag reference.
@@ -4,7 +4,7 @@ version: 1.0.0
4
4
  description: >
5
5
  Inbound webhook endpoints for non-funnel sources — Stripe, GitHub, custom services. Funnel forms use the my-funnel-api proxy.
6
6
  triggers: [webhook, inbound, receiver, stripe events, github webhook, slack notification, delivery, payload, event ingest]
7
- checksum: sha256-82666c883230a775b07c8e1ec6243e812e58f246dd9a7cf1659aee77b877ee73
7
+ checksum: sha256-17b358d780333cabe76cb01df3be3c3f11db10a2b068449bcf9e10e2ed89393d
8
8
  ---
9
9
 
10
10
  # MyWebhookAPI
@@ -97,4 +97,15 @@ The form sends `{name, email, message}` → webhook stores it → workflow runs
97
97
  - Failed workflow runs don't affect the delivery record — the inbound POST is always saved.
98
98
  - Inbound responses: `200` on success, `4xx` if the endpoint is missing or body isn't valid JSON.
99
99
 
100
+ ## Auto-ingest and forwarding
101
+
102
+ - `--crm-email-path <dot-path>` — where to find the email in an incoming
103
+ payload, so submissions become CRM contacts automatically. Default `email`
104
+ (top level). Stripe: `data.object.customer_email`. GitHub: `sender.email`.
105
+ An empty string disables ingest for that endpoint.
106
+ - `--forward-url <url>` — POST a copy of every delivery onward. The forward
107
+ status is recorded on the delivery, so a failing forward is visible in
108
+ `webhook deliveries` rather than silent.
109
+ - `--description <text>` — free text, shown in `webhook list`.
110
+
100
111
  Run `myapi webhook --help` for full flag reference.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
3
  "license": "Apache-2.0",
4
- "version": "2.7.1",
4
+ "version": "2.8.0",
5
5
  "description": "MyAPI command-line interface",
6
6
  "repository": {
7
7
  "type": "git",
@@ -37,11 +37,16 @@
37
37
  "lint:request-fields": "node scripts/lint-request-fields.js",
38
38
  "audit:doctor": "npm run build && node scripts/audit-doctor.js",
39
39
  "lint:docs": "node scripts/lint-docs.js",
40
+ "lint:skill-coverage": "node scripts/lint-skill-coverage.js",
41
+ "bench:discoverability": "node scripts/bench-discoverability.js",
42
+ "lint:claims": "node scripts/verify-claims.js --lint",
43
+ "verify:claims": "npm run build && node scripts/verify-claims.js",
44
+ "audit:fields": "npm run build && node scripts/audit-field-honoured.js",
40
45
  "lint:skills": "node scripts/copy-skills.js && node scripts/lint-skills.js",
41
46
  "lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
42
47
  },
43
48
  "dependencies": {
44
- "@myapihq/sdk": "^2.7.1"
49
+ "@myapihq/sdk": "^2.8.0"
45
50
  },
46
51
  "devDependencies": {
47
52
  "@types/node": "^25.6.0",