reply-cli 0.17.2 → 0.19.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.
- package/README.md +102 -56
- package/dist/commands/skills.js +13 -14
- package/dist/commands/skills.js.map +1 -1
- package/dist/operations/commands.js +76 -37
- package/dist/operations/commands.js.map +1 -1
- package/dist/operations/direct-send.d.ts +6 -1
- package/dist/operations/direct-send.js +47 -2
- package/dist/operations/direct-send.js.map +1 -1
- package/dist/operations/direct-sends.js +6 -5
- package/dist/operations/direct-sends.js.map +1 -1
- package/dist/skills/adapter-flat.d.ts +7 -18
- package/dist/skills/adapter-flat.js +69 -165
- package/dist/skills/adapter-flat.js.map +1 -1
- package/dist/skills/detect.js +2 -3
- package/dist/skills/detect.js.map +1 -1
- package/dist/skills/hosts.js +16 -16
- package/dist/skills/hosts.js.map +1 -1
- package/dist/skills/journal.d.ts +1 -1
- package/dist/skills/journal.js.map +1 -1
- package/dist/skills/orchestrate.d.ts +3 -8
- package/dist/skills/orchestrate.js +80 -73
- package/dist/skills/orchestrate.js.map +1 -1
- package/dist/skills/packs.d.ts +11 -15
- package/dist/skills/packs.js +66 -138
- package/dist/skills/packs.js.map +1 -1
- package/dist/skills/plugins.d.ts +19 -0
- package/dist/skills/plugins.js +67 -0
- package/dist/skills/plugins.js.map +1 -0
- package/dist/skills/report.d.ts +1 -2
- package/dist/skills/report.js +75 -20
- package/dist/skills/report.js.map +1 -1
- package/dist/skills/types.d.ts +18 -22
- package/package.json +2 -1
- package/skills/reply-adapter/reply-api/SKILL.md +231 -0
- package/skills/reply-adapter/reply-auth/SKILL.md +111 -0
- package/skills/reply-adapter/reply-cli/SKILL.md +178 -0
- package/skills/reply-adapter/reply-mcp/SKILL.md +115 -0
- package/skills/reply-adapter/reply-operations-mapping/SKILL.md +469 -0
- package/skills/reply-adapter/reply-operations-mapping/fulfilment.yaml +2986 -0
- package/skills/reply-adapter/reply-operations-mapping/references/fulfilment.md +872 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-01-discovery.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-02-contacts.md +46 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-03-audiences.md +39 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-04-import.md +28 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-05-campaigns.md +49 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-06-steps.md +41 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-07-messages.md +28 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-08-enrollment.md +30 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-09-conversations.md +32 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-10-tasks.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-11-meetings.md +40 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-12-signals.md +33 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-13-inbound.md +34 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-14-privacy.md +46 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-15-sending.md +57 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-16-social.md +36 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-17-oversight.md +55 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-18-team.md +38 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-19-accounts.md +35 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-20-measurement.md +33 -0
- package/skills/reply-adapter/reply-operations-mapping/references/mapping-21-introspection.md +38 -0
- package/dist/skills/adapter-native.d.ts +0 -22
- package/dist/skills/adapter-native.js +0 -335
- package/dist/skills/adapter-native.js.map +0 -1
package/README.md
CHANGED
|
@@ -57,16 +57,19 @@ with `REPLY_NO_UPDATE_CHECK=1` set.
|
|
|
57
57
|
|
|
58
58
|
## Where this fits
|
|
59
59
|
|
|
60
|
-
Reply's agentic toolkit is
|
|
60
|
+
Reply's agentic toolkit is two pieces, with the skills that teach an agent to use them
|
|
61
|
+
carried in this package. They are complementary, not alternatives:
|
|
61
62
|
|
|
62
63
|
| | What it is | When you want it |
|
|
63
64
|
|---|---|---|
|
|
64
|
-
| **reply CLI** (this repo) | `npm i -g reply-cli` — authenticated access to *every* v3 endpoint via `reply api` | Your agent has a shell. This is the complete surface. |
|
|
65
|
+
| **reply CLI** (this repo) | `npm i -g reply-cli` — authenticated access to *every* v3 endpoint via `reply api`, and the Reply skills (`reply skills install`) | Your agent has a shell. This is the complete surface. |
|
|
65
66
|
| **[Reply MCP](https://github.com/reply-team/reply-mcp)** | A curated tool catalog over `mcp.reply.io` | Your client speaks MCP and has no shell — desktop apps, hosted assistants. |
|
|
66
|
-
| **[reply-skills](https://github.com/reply-team/reply-skills)** | Outbound expertise as markdown skills: what to do, in what order, with what guardrails | Your agent knows *how* to call things but not *what* to run. |
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
The skills teach an agent how to perform an SDR operation against Reply: which endpoint, which
|
|
69
|
+
scope, in what order, and what Reply's errors mean. The vendor-neutral SDR expertise — the
|
|
70
|
+
operation catalogue, playbooks and guardrails those skills map onto — and the runtime skills ship
|
|
71
|
+
with [Jason](https://github.com/reply-team/jason-ai), the catalogue under its `skills/business`.
|
|
72
|
+
A shell-capable agent can do everything through the CLI alone.
|
|
70
73
|
|
|
71
74
|
The shortest path that works: install the CLI, `reply auth login`, `reply skills install`, then
|
|
72
75
|
talk to your agent in plain words. MCP is optional — add it when your client has no shell.
|
|
@@ -202,6 +205,8 @@ prints JSON (indented; compact with `--json`) and says what happened in a stable
|
|
|
202
205
|
| `reply contact linkedin-connect <contact> --linkedin-account-id N [--message -]` | a LinkedIn invitation, with or without a note → `sent` / `already_connected` |
|
|
203
206
|
| `reply contact linkedin-message …` · `linkedin-inmail …` · `linkedin-voice …` | a LinkedIn message, an InMail, or an AI voice message spoken from a script → `sent` |
|
|
204
207
|
| any direct send `… [--send-after <moment>] [--schedule-id N] [--idempotency-key K]` | the send held until a moment, timed by a schedule, under a key of yours → `sent`, with its `reference` and `state` |
|
|
208
|
+
| any direct send `… [--use-contact-time-zone \| --no-use-contact-time-zone]` | with `--schedule-id`, the schedule read in the contact's time zone or its own |
|
|
209
|
+
| a LinkedIn send `… [--retry-window-minutes N]` | how long Reply keeps trying once the send is due |
|
|
205
210
|
| `reply direct-send get <reference>` | a send as Reply holds it: whether it has gone out, when, and why it failed |
|
|
206
211
|
| `reply direct-send cancel <reference>` | stop a send that has not gone out yet → `state` `cancelled` |
|
|
207
212
|
| `reply inbox list (--contact-id \| --sequence-id) [--source] [--channel] [--category-id] [--since]` | one page of threads |
|
|
@@ -319,18 +324,49 @@ Reply cannot fill is `contact.missing_variables`, with the names under the error
|
|
|
319
324
|
# {"error":{"code":"contact.missing_variables",…,"details":{"missing_variables":["FirstName","Company"]}}}
|
|
320
325
|
```
|
|
321
326
|
|
|
322
|
-
Every direct send also takes `--send-after <moment>`, `--schedule-id <id>` and
|
|
323
|
-
<key>`. Reply holds the send until the moment, given with its offset
|
|
324
|
-
`2026-11-03T16:00:00+02:00`) and sent to Reply in UTC; a moment without an
|
|
325
|
-
(`usage.date`). `--schedule-id` names the sending schedule Reply times the send by
|
|
326
|
-
schedule list`). The answer then adds Reply's `reference`, `send_after` and `state`,
|
|
327
|
-
Reply gives it. `status: "sent"` means Reply took the send, and `state`, when
|
|
328
|
-
it has gone out: `queued` or `sending` is not yet, then
|
|
329
|
-
direct-send get <reference>` reads the send later, and
|
|
330
|
-
one that has not gone out. The reference is Reply's,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
Every direct send also takes `--send-after <moment>`, `--schedule-id <id>` and
|
|
328
|
+
`--idempotency-key <key>`. Reply holds the send until the moment, given with its offset
|
|
329
|
+
(`2026-11-03T14:00:00Z`, `2026-11-03T16:00:00+02:00`) and sent to Reply in UTC; a moment without an
|
|
330
|
+
offset is refused (`usage.date`). `--schedule-id` names the sending schedule Reply times the send by
|
|
331
|
+
(see `reply schedule list`). The answer then adds Reply's `reference`, `send_after` and `state`,
|
|
332
|
+
each only when Reply gives it. `status: "sent"` means Reply took the send, and `state`, when
|
|
333
|
+
present, says whether it has gone out: `queued`, `waitingForSchedule` or `sending` is not yet, then
|
|
334
|
+
`sent`, `failed` or `cancelled`. `reply direct-send get <reference>` reads the send later, and
|
|
335
|
+
`reply direct-send cancel <reference>` stops one that has not gone out. The reference is Reply's,
|
|
336
|
+
`email-<n>`, `linkedin-<n>` or `linkedin-scheduled-<n>` (a LinkedIn send held for later keeps that
|
|
337
|
+
one for its whole life), the form Reply's route takes: a reference of any other form is refused
|
|
338
|
+
before any call (`usage.reference`, exit 2), and nothing else is read from it. An answer without
|
|
339
|
+
`state` comes from a Reply that does not know these flags yet: it sent at once, as without them.
|
|
340
|
+
|
|
341
|
+
A send timed by `--schedule-id` may answer `state` `waitingForSchedule`: Reply holds it for the
|
|
342
|
+
schedule's next opening, so `send_after` is left out, and `estimated_send_at` is when Reply expects
|
|
343
|
+
to send it, an ISO-8601 UTC moment; Reply sends it within about 10 minutes of that moment. Reply
|
|
344
|
+
sets `estimated_send_at` in `waitingForSchedule` only and gives it null in every other state; it is
|
|
345
|
+
null in `waitingForSchedule` too when the schedule does not open within 30 days of the moment the
|
|
346
|
+
send waits from: its `--send-after`, or when Reply took it. It is added only when Reply gives it.
|
|
347
|
+
|
|
348
|
+
Every direct send also takes `--use-contact-time-zone` / `--no-use-contact-time-zone`, and the four
|
|
349
|
+
LinkedIn sends take `--retry-window-minutes <n>` as well; `contact send-email` does not take the
|
|
350
|
+
retry window. `--use-contact-time-zone` reads the schedule's windows in the contact's time zone and
|
|
351
|
+
`--no-use-contact-time-zone` in the schedule's own; with neither, the schedule's own setting holds.
|
|
352
|
+
`--retry-window-minutes` is how long Reply keeps trying to send once the send is due, 1 to 4320
|
|
353
|
+
minutes (Reply's default is 90); a number outside that is refused before any call (`usage.range`).
|
|
354
|
+
Reply takes the time zone only with `--schedule-id` and the retry window only for a send made
|
|
355
|
+
later, and answers them otherwise with `reply.invalid_request`. A Reply that knows direct sends but
|
|
356
|
+
not yet the LinkedIn scheduler answers `--schedule-id` or `--use-contact-time-zone` on a LinkedIn
|
|
357
|
+
send with `errors[]` naming the field (`reply.invalid_request`), and one that knows neither sends at
|
|
358
|
+
once, as without them.
|
|
359
|
+
|
|
360
|
+
Reply refuses a send it cannot time when it takes it, and nothing is sent. A `--schedule-id`
|
|
361
|
+
naming no schedule this account can read is `schedule.not_found`, a schedule with no active day
|
|
362
|
+
that has a time range, so it never opens, is `schedule.no_slot`, and a contact without the time
|
|
363
|
+
zone `--use-contact-time-zone` reads the schedule in is `contact.time_zone_missing`. The codes are
|
|
364
|
+
the same on an email and on a LinkedIn send; `reply_code` keeps the one Reply gave.
|
|
365
|
+
|
|
366
|
+
```sh
|
|
367
|
+
echo '{"body":"Following up on my note."}' | reply contact linkedin-message --contact-id 456 --linkedin-account-id 34 --message - --schedule-id 41 --use-contact-time-zone --retry-window-minutes 120
|
|
368
|
+
# {"status":"sent",…,"activity_id":null,"sent_at":null,"reference":"linkedin-scheduled-77","state":"waitingForSchedule","estimated_send_at":"2026-11-04T09:00:00Z"}
|
|
369
|
+
```
|
|
334
370
|
|
|
335
371
|
`--idempotency-key` goes to Reply as the `Idempotency-Key` header, never in the body. A Reply that
|
|
336
372
|
knows the header answers a repeat with the same key with the send the key first made; while that
|
|
@@ -352,13 +388,25 @@ reply direct-send get linkedin-1042
|
|
|
352
388
|
reply direct-send cancel linkedin-1042
|
|
353
389
|
```
|
|
354
390
|
|
|
355
|
-
Both answer the send under the CLI's names, each null when Reply gives none: `reference`,
|
|
356
|
-
`
|
|
357
|
-
`
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
`
|
|
391
|
+
Both answer the send under the CLI's names, each null when Reply gives none: `reference`, `channel`,
|
|
392
|
+
`contact_id`, `state`, `send_after`, `sent_at`, `message_id`, `failure_reason` and `cancelled_at`.
|
|
393
|
+
`failure_code`, `missing_variables`, `rendered_subject` and `rendered_body` are added only when
|
|
394
|
+
Reply gives them, and so is `estimated_send_at`, read the same way as on the send but as of the
|
|
395
|
+
read: set in `waitingForSchedule` only and null in every other state, and null there too when the
|
|
396
|
+
schedule does not open within 30 days counted from `--send-after`, or from now once that has passed.
|
|
397
|
+
`failure_reason` is a sentence for a person and never parsed; `failure_code` is Reply's code for the
|
|
398
|
+
failure, the one to branch on. A failed send may carry no `failure_code`: it is then null, and
|
|
399
|
+
`failure_reason` is all Reply says of it. `direct-send cancel` of a send already cancelled answers
|
|
400
|
+
it again. A send already gone out, failed or going out is `direct_send.already_sent`,
|
|
401
|
+
`direct_send.already_failed` or `direct_send.already_sending`; the last is a LinkedIn send made for
|
|
402
|
+
later that Reply is handing to the account's queue or that waits or runs there, even while
|
|
403
|
+
`direct-send get` still reads it `queued`. A reference Reply has no send for, a send of another team
|
|
404
|
+
included, is `direct_send.not_found`, and an email send made by a teammate this user may not act for
|
|
405
|
+
is `direct_send.not_owned`, to a read and a cancel alike. A `503` that Reply answers with
|
|
406
|
+
`directSend.cancelNotConfirmed` is `direct_send.cancel_not_confirmed` (exit 1): Reply could not
|
|
407
|
+
confirm the cancel, and says the send is still queued or waiting for its schedule, so run the cancel
|
|
408
|
+
again, as Reply asks; `retry_after` carries Reply's `Retry-After` when it sends one. Any other `5xx`
|
|
409
|
+
to a cancel stays `outcome.unknown` (exit 3).
|
|
362
410
|
|
|
363
411
|
`reply inbox changes` reads the inbox feed forward. Each page holds the threads whose latest message,
|
|
364
412
|
inbound or outbound, changed, oldest first and as Reply gives them, with `has_more` and a `cursor`.
|
|
@@ -480,9 +528,10 @@ exist. PowerShell, cmd, macOS and Linux are unaffected.
|
|
|
480
528
|
|
|
481
529
|
## Skills
|
|
482
530
|
|
|
483
|
-
Reply
|
|
484
|
-
|
|
485
|
-
|
|
531
|
+
The Reply skills ship inside this package as one pack, `reply-adapter` (alias
|
|
532
|
+
`adapter`), at the CLI's own version: `reply-api`, `reply-auth`, `reply-cli`,
|
|
533
|
+
`reply-mcp` and `reply-operations-mapping`. One command copies them into every
|
|
534
|
+
AI assistant on your machine, from the installed package, with no download:
|
|
486
535
|
|
|
487
536
|
```sh
|
|
488
537
|
reply skills install
|
|
@@ -490,23 +539,12 @@ reply skills install
|
|
|
490
539
|
|
|
491
540
|
```
|
|
492
541
|
✓ detected Claude Code, Codex
|
|
493
|
-
✓ Claude Code ·
|
|
494
|
-
✓ Codex ·
|
|
542
|
+
✓ Claude Code · reply-adapter installed
|
|
543
|
+
✓ Codex · reply-adapter installed
|
|
495
544
|
Start a new session in each assistant so the skills load.
|
|
496
545
|
```
|
|
497
546
|
|
|
498
|
-
| Pack | Alias | What it gives your agent |
|
|
499
|
-
|---|---|---|
|
|
500
|
-
| `ai-sdr-core` | `core` | Vendor-neutral SDR operations, playbooks and guardrails |
|
|
501
|
-
| `reply-adapter` | `adapter` | Executing those operations against Reply.io |
|
|
502
|
-
| `agentic-runtime` | `runtime` | Durable multi-session work: plans, checkpoints, reports |
|
|
503
|
-
|
|
504
|
-
Install a subset — dependencies come along automatically, so `adapter` pulls
|
|
505
|
-
`core`:
|
|
506
|
-
|
|
507
547
|
```sh
|
|
508
|
-
reply skills install core
|
|
509
|
-
reply skills install adapter runtime
|
|
510
548
|
reply skills install --agent codex # only this assistant
|
|
511
549
|
reply skills install --project # into this repository, not your home
|
|
512
550
|
```
|
|
@@ -514,21 +552,29 @@ reply skills install --project # into this repository, not your home
|
|
|
514
552
|
Then manage them:
|
|
515
553
|
|
|
516
554
|
```sh
|
|
517
|
-
reply skills list # what's installed where
|
|
518
|
-
reply skills update # bring installed
|
|
519
|
-
reply skills remove
|
|
520
|
-
reply skills remove # remove all of them
|
|
555
|
+
reply skills list # what's installed where, and at which version
|
|
556
|
+
reply skills update # bring the installed skills to the version of this CLI
|
|
557
|
+
reply skills remove # remove everything this CLI installed
|
|
521
558
|
```
|
|
522
559
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
560
|
+
The skills move with the CLI: after `reply install` brings a newer CLI,
|
|
561
|
+
`reply skills update` copies its skills over the old ones. Every assistant
|
|
562
|
+
receives the skills as files. Add `--json` for a machine-readable report, and
|
|
526
563
|
`--dry-run` to see the plan without changing anything.
|
|
527
564
|
|
|
528
|
-
|
|
565
|
+
An earlier version of this CLI installed three packs, and installed them on
|
|
566
|
+
Claude Code and Codex through the assistant's own plugin CLI. `install` and
|
|
567
|
+
`update` now replace the old `reply-adapter` plugin with the copied
|
|
568
|
+
files, removing that plugin through the assistant's own CLI, and say so; the
|
|
569
|
+
two other plugins, and copies of the two other packs, stay installed, and the
|
|
570
|
+
report names them. `list` and
|
|
571
|
+
`remove` still find what an earlier version installed, under the old pack
|
|
572
|
+
names too.
|
|
573
|
+
|
|
574
|
+
| Assistant | How it receives the skills | Skills path | Paths verified | To take effect |
|
|
529
575
|
|---|---|---|---|---|
|
|
530
|
-
| Claude Code |
|
|
531
|
-
| Codex |
|
|
576
|
+
| Claude Code | copied files | `~/.claude/skills`, or `.claude/skills` with `--project` | yes | start a new session |
|
|
577
|
+
| Codex | copied files | `~/.agents/skills`, or `.agents/skills` with `--project` | yes | start a new session |
|
|
532
578
|
| Cursor | copied files | `~/.cursor/skills`, or `.agents/skills` with `--project` | Cursor 3.14.27, cursor-agent 2026.08.04-aaa8809 | a new session (a new chat) |
|
|
533
579
|
| Windsurf (ships as Devin) | copied files | `~/.codeium/windsurf/skills`, or `.windsurf/skills` with `--project` | Devin 3.6.27, devin CLI 3000.3.27 | a new session (the next `devin` run) |
|
|
534
580
|
| Antigravity | copied files | `~/.gemini/config/skills`, or `.agents/skills` with `--project` | Antigravity 2.0.1 | nothing — it re-reads its skills every turn, including in a conversation already open |
|
|
@@ -540,10 +586,9 @@ Codex, Antigravity and GitHub Copilot. A project-scope install aimed at one of
|
|
|
540
586
|
them therefore makes those skills visible in the others, and removing them for
|
|
541
587
|
one changes what the others see. Use user scope when you want a host's skills to
|
|
542
588
|
itself. GitHub Copilot reads two further repository directories, `.claude/skills`
|
|
543
|
-
and `.github/skills
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
channel, which writes `.claude/skills` for a project-scoped Claude Code install.
|
|
589
|
+
and `.github/skills`; `--project` for Claude Code writes `.claude/skills`, so a
|
|
590
|
+
project-scope install for Claude Code is visible to GitHub Copilot in that
|
|
591
|
+
repository too.
|
|
547
592
|
|
|
548
593
|
Every assistant in the table has been verified against the version named. A host
|
|
549
594
|
added later may arrive with its skills directory taken from the vendor's
|
|
@@ -555,8 +600,9 @@ Antigravity and GitHub Copilot with the release that adds them.
|
|
|
555
600
|
GitHub Copilot is two products over one directory: the `copilot` CLI and the
|
|
556
601
|
VS Code agent host, which ships `~/.copilot/skills` among the defaults of its
|
|
557
602
|
`chat.agentSkillsLocations` setting — alongside `~/.claude/skills` and
|
|
558
|
-
`~/.agents/skills`, user directories the CLI itself does not read
|
|
559
|
-
|
|
603
|
+
`~/.agents/skills`, user directories the CLI itself does not read and where this
|
|
604
|
+
command puts the skills for Claude Code and Codex, so VS Code sees those too.
|
|
605
|
+
The CLI is what the row above was verified against. VS Code scans those directories once per window and does not watch them,
|
|
560
606
|
so an install made while it is open needs `Developer: Reload Window` rather than
|
|
561
607
|
just a new chat.
|
|
562
608
|
|
package/dist/commands/skills.js
CHANGED
|
@@ -74,25 +74,24 @@ const handle_skills = async (operation, packs, opts) => {
|
|
|
74
74
|
};
|
|
75
75
|
exports.handle_skills = handle_skills;
|
|
76
76
|
const skills_command = new commander_1.Command('skills')
|
|
77
|
-
.description('Install and manage Reply
|
|
77
|
+
.description('Install and manage the Reply skills in your AI assistants');
|
|
78
78
|
exports.skills_command = skills_command;
|
|
79
79
|
const with_flags = (cmd) => cmd
|
|
80
80
|
.option('-a, --agent <id...>', 'Target these assistants instead of auto-detecting')
|
|
81
81
|
.option('--project', 'Install into the current repository instead of your user directory')
|
|
82
82
|
.option('--dry-run', 'Show what would happen and change nothing');
|
|
83
83
|
const packs_help = `
|
|
84
|
-
|
|
85
|
-
No pack means
|
|
84
|
+
Pack: reply-adapter (alias adapter), the skills this CLI ships, at its own version.
|
|
85
|
+
No pack means it.`;
|
|
86
86
|
with_flags(skills_command
|
|
87
87
|
.command('install')
|
|
88
|
-
.argument('[packs...]', '
|
|
89
|
-
.description('
|
|
88
|
+
.argument('[packs...]', 'Pack to install (default: reply-adapter)')
|
|
89
|
+
.description('Copy the Reply skills from this package into every detected assistant'))
|
|
90
90
|
.addHelpText('after', `${packs_help}
|
|
91
91
|
|
|
92
92
|
Examples:
|
|
93
93
|
${config_1.PROGRAM_NAME} skills install
|
|
94
|
-
${config_1.PROGRAM_NAME} skills install
|
|
95
|
-
${config_1.PROGRAM_NAME} skills install adapter runtime
|
|
94
|
+
${config_1.PROGRAM_NAME} skills install --project
|
|
96
95
|
${config_1.PROGRAM_NAME} skills install --agent codex --json`)
|
|
97
96
|
.action(async function (packs) {
|
|
98
97
|
await handle_skills('install', packs, read_globals(this));
|
|
@@ -111,8 +110,8 @@ Examples:
|
|
|
111
110
|
});
|
|
112
111
|
with_flags(skills_command
|
|
113
112
|
.command('update')
|
|
114
|
-
.argument('[packs...]', '
|
|
115
|
-
.description('
|
|
113
|
+
.argument('[packs...]', 'Pack to update (default: reply-adapter, where installed)')
|
|
114
|
+
.description('Bring the installed skills to the version of this CLI'))
|
|
116
115
|
.addHelpText('after', `${packs_help}
|
|
117
116
|
|
|
118
117
|
Examples:
|
|
@@ -123,15 +122,15 @@ Examples:
|
|
|
123
122
|
});
|
|
124
123
|
with_flags(skills_command
|
|
125
124
|
.command('remove')
|
|
126
|
-
.argument('[packs...]', 'Packs to remove (default:
|
|
127
|
-
.description('Remove Reply
|
|
125
|
+
.argument('[packs...]', 'Packs to remove (default: everything this CLI installed)')
|
|
126
|
+
.description('Remove the Reply skills from your assistants'))
|
|
128
127
|
.addHelpText('after', `${packs_help}
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
Remove also takes the names of packs an earlier version installed, and with no
|
|
129
|
+
pack removes everything this CLI ever installed.
|
|
131
130
|
|
|
132
131
|
Examples:
|
|
133
132
|
${config_1.PROGRAM_NAME} skills remove
|
|
134
|
-
${config_1.PROGRAM_NAME} skills remove
|
|
133
|
+
${config_1.PROGRAM_NAME} skills remove adapter --project`)
|
|
135
134
|
.action(async function (packs) {
|
|
136
135
|
await handle_skills('remove', packs, read_globals(this));
|
|
137
136
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":";;;AAAA,yCAAkC;AAClC,sCAAuC;AACvC,uDAAiD;AACjD,6CAA4D;AAC5D,4CAA6C;AAC7C,4CAAuD;AAWvD,MAAM,YAAY,GAAG,CAAC,GAAY,EAAkB,EAAE;IAClD,MAAM,CAAC,GAAG,GAAG,CAAC,eAAe,EAAE,CAAC;IAChC,OAAO,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAC,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,CAAkB,EAAU,EAAE,CAAA,OAAO,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,UAAU,GAAG,CAAC,CAAkB,EAAa,EAAE,CAAA,CAAC,EAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAC,CAAC,CAAC;AAExF,+EAA+E;AAC/E,4EAA4E;AAC5E,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,MAAM,gBAAgB,GAAoE;IACtF,OAAO,EAAE;QACL,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AAG,UAAU;;;IAGnC,qBAAY;IACZ,qBAAY,qBAAqB,CAAC;KACjC,MAAM,CAAC,KAAK,WAAyB,KAAe;IACjD,MAAM,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEP,UAAU,CAAC,cAAc;KACpB,OAAO,CAAC,QAAQ,CAAC;KACjB,QAAQ,CAAC,YAAY,EAAE,0DAA0D,CAAC;KAClF,WAAW,CAAC,uDAAuD,CAAC,CAAC;KACrE,WAAW,CAAC,OAAO,EAAE,GAAG,UAAU;;;IAGnC,qBAAY;IACZ,qBAAY,0BAA0B,CAAC;KACtC,MAAM,CAAC,KAAK,WAAyB,KAAe;IACjD,MAAM,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEP,UAAU,CAAC,cAAc;KACpB,OAAO,CAAC,QAAQ,CAAC;KACjB,QAAQ,CAAC,YAAY,EAAE,0DAA0D,CAAC;KAClF,WAAW,CAAC,8CAA8C,CAAC,CAAC;KAC5D,WAAW,CAAC,OAAO,EAAE,GAAG,UAAU;;;;;IAKnC,qBAAY;IACZ,qBAAY,kCAAkC,CAAC;KAC9C,MAAM,CAAC,KAAK,WAAyB,KAAe;IACjD,MAAM,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC"}
|
|
@@ -238,37 +238,65 @@ const later_options = (c) => c
|
|
|
238
238
|
.option('--schedule-id <id>', 'The sending schedule Reply times the send by (see `schedule list`)')
|
|
239
239
|
.option('--idempotency-key <key>', 'Your own key for this send, sent as the Idempotency-Key header');
|
|
240
240
|
const LATER = 'With --send-after Reply holds the send until that moment, given with its offset and sent to Reply in UTC; a moment\n'
|
|
241
|
-
+ 'without an offset is refused (usage.date). --schedule-id names the sending schedule Reply times the send by. The
|
|
242
|
-
+ 'then adds Reply\'s reference, send_after and state, each only when Reply gives it: status "sent" means Reply
|
|
243
|
-
+ 'send; state, when Reply gives it, says whether it has gone out: queued or sending is not
|
|
244
|
-
+ 'cancelled. direct-send get <reference> reads it later, and direct-send cancel <reference
|
|
245
|
-
+ 'answer without state comes from a Reply that does not know --send-after and --schedule-id
|
|
246
|
-
+ 'without them. --idempotency-key goes as the Idempotency-Key header, never in the body. A Reply
|
|
247
|
-
+ 'answers a repeat with the same key with the send the key first made; while that one is still
|
|
248
|
-
+ 'is idempotency_key.in_use, and the same key on a different send is idempotency_key.reused
|
|
249
|
-
+ 'A repeat of a send given a person\'s fields answers contact.already_held first, since the first
|
|
250
|
-
+ 'contact: that is safe too, as nothing is sent twice. idempotency_key.reused names the send the key was
|
|
251
|
-
+ 'for in details: reference, state and send_after, each only when Reply gives it. Any other refusal of a
|
|
252
|
-
+ 'already holds names that send the same way, beside the refusal\'s own details; its code is the refusal\'s
|
|
253
|
-
+ 'A 400 to the send with neither a code nor errors[] is Reply failing while it made the send: like a 5xx or a lost\n'
|
|
254
|
-
+ 'answer, it is outcome.unknown (exit 3). So is a 400 directLinkedIn.unknown to a LinkedIn send, Reply\'s answer when\n'
|
|
255
|
-
+ '
|
|
256
|
-
+ '
|
|
241
|
+
+ 'without an offset is refused (usage.date). --schedule-id names the sending schedule Reply times the send by. The\n'
|
|
242
|
+
+ 'answer then adds Reply\'s reference, send_after and state, each only when Reply gives it: status "sent" means Reply\n'
|
|
243
|
+
+ 'took the send; state, when Reply gives it, says whether it has gone out: queued, waitingForSchedule or sending is not\n'
|
|
244
|
+
+ 'yet, then sent, failed or cancelled. direct-send get <reference> reads it later, and direct-send cancel <reference>\n'
|
|
245
|
+
+ 'stops one not yet sent. An answer without state comes from a Reply that does not know --send-after and --schedule-id:\n'
|
|
246
|
+
+ 'it sent at once, as without them. --idempotency-key goes as the Idempotency-Key header, never in the body. A Reply\n'
|
|
247
|
+
+ 'that knows the header answers a repeat with the same key with the send the key first made; while that one is still\n'
|
|
248
|
+
+ 'being made the answer is idempotency_key.in_use, and the same key on a different send is idempotency_key.reused.\n'
|
|
249
|
+
+ 'Neither sends anything. A repeat of a send given a person\'s fields answers contact.already_held first, since the first\n'
|
|
250
|
+
+ 'one created the contact: that is safe too, as nothing is sent twice. idempotency_key.reused names the send the key was\n'
|
|
251
|
+
+ 'first taken for in details: reference, state and send_after, each only when Reply gives it. Any other refusal of a\n'
|
|
252
|
+
+ 'send Reply already holds names that send the same way, beside the refusal\'s own details; its code is the refusal\'s\n'
|
|
253
|
+
+ 'own. A 400 to the send with neither a code nor errors[] is Reply failing while it made the send: like a 5xx or a lost\n'
|
|
254
|
+
+ 'answer, it is outcome.unknown (exit 3). So is a 400 directLinkedIn.unknown to a LinkedIn send, Reply\'s answer when it\n'
|
|
255
|
+
+ 'failed while making the send or could not map the provider\'s answer; Reply\'s code is kept in reply_code. A 400 with\n'
|
|
256
|
+
+ 'errors[] is reply.invalid_request, and nothing was sent.\n';
|
|
257
257
|
// The refusals of a send's key, the same on every direct send, after each send's own.
|
|
258
258
|
const KEY_CODES = ['idempotency_key.in_use', 'idempotency_key.reused'];
|
|
259
259
|
// One send's example with the person and the text both on stdin.
|
|
260
260
|
const piped_send = (command, contact, message, flags) => `echo '{"contact":${contact},"message":${message}}' | ${P} contact ${command} --contact - ${flags} --message -`;
|
|
261
261
|
const ANN_EMAIL = '{"email":"ann@example.com","first_name":"Ann"}';
|
|
262
262
|
const ANN_PROFILE = '{"linkedin_url":"https://www.linkedin.com/in/ann-example","first_name":"Ann"}';
|
|
263
|
-
|
|
263
|
+
// The time zone a send timed by a schedule is read in, which every send takes. Without either flag nothing is sent, so
|
|
264
|
+
// the schedule's own setting holds.
|
|
265
|
+
const time_zone_options = (c) => c
|
|
266
|
+
.option('--use-contact-time-zone', 'Read the schedule\'s windows in the contact\'s time zone (with --schedule-id)')
|
|
267
|
+
.option('--no-use-contact-time-zone', 'Read the schedule\'s windows in the schedule\'s own time zone (with --schedule-id)');
|
|
268
|
+
// The flags Reply's LinkedIn sends take for a send made later: the time zone, and the retry window only they take.
|
|
269
|
+
const scheduler_options = (c) => time_zone_options(c)
|
|
270
|
+
.option('--retry-window-minutes <n>', 'How long Reply keeps trying once the send is due, 1 to 4320 (Reply\'s default: 90)');
|
|
271
|
+
// What a send timed by a schedule answers while it waits for the schedule's next opening, the time zone it is read in, and
|
|
272
|
+
// the refusals of one Reply cannot time.
|
|
273
|
+
const SCHEDULED = 'A send timed by --schedule-id may answer state waitingForSchedule, held for the schedule\'s next opening: send_after is\n'
|
|
274
|
+
+ 'then left out, and estimated_send_at is when Reply expects to send it. Reply sets estimated_send_at in\n'
|
|
275
|
+
+ 'waitingForSchedule only and gives it null in every other state; it is null in waitingForSchedule too when the schedule\n'
|
|
276
|
+
+ 'does not open within 30 days of the moment the send waits from: its --send-after, or when Reply took it. It is added\n'
|
|
277
|
+
+ 'only when Reply gives it. --use-contact-time-zone sends useContactTimeZone true: the schedule\'s windows are read in\n'
|
|
278
|
+
+ 'the contact\'s time zone; --no-use-contact-time-zone sends false, the schedule\'s own zone; with neither, the schedule\'s\n'
|
|
279
|
+
+ 'own setting holds. Reply takes it only with --schedule-id, and answers it otherwise with errors[]\n'
|
|
280
|
+
+ '(reply.invalid_request). schedule.not_found is a --schedule-id naming no schedule this account can read,\n'
|
|
281
|
+
+ 'schedule.no_slot a schedule with no active day that has a time range, so it never opens, and contact.time_zone_missing\n'
|
|
282
|
+
+ 'a contact without the time zone --use-contact-time-zone reads it in; none sends anything.\n';
|
|
283
|
+
// The codes of a send Reply cannot time, the same on every route.
|
|
284
|
+
const SCHEDULE_CODES = ['schedule.not_found', 'schedule.no_slot', 'contact.time_zone_missing'];
|
|
285
|
+
// The retry window only a LinkedIn send takes, and what a Reply before the LinkedIn scheduler does with the schedule.
|
|
286
|
+
const LINKEDIN_SCHEDULED = '--retry-window-minutes <n> is how long Reply keeps trying to send it once it is due, 1 to 4320\n'
|
|
287
|
+
+ 'minutes (Reply\'s default is 90); one outside that is refused before any call (usage.range). Reply takes it only with\n'
|
|
288
|
+
+ '--schedule-id or --send-after, and answers it otherwise with errors[] (reply.invalid_request). A Reply that knows\n'
|
|
289
|
+
+ 'direct sends but not yet the LinkedIn scheduler answers --schedule-id or --use-contact-time-zone on a LinkedIn send\n'
|
|
290
|
+
+ 'with errors[] naming the field (reply.invalid_request), and one that knows neither sends at once, as without them.\n';
|
|
291
|
+
time_zone_options(later_options((0, contact_input_1.add_contact_options)(contact_command.command('send-email'), true)
|
|
264
292
|
.option('--email-account-id <id>', 'The mailbox to send from (see `account list`)')
|
|
265
293
|
.option('--message <stdin>', 'Only -: the email {subject, body} as JSON on stdin')
|
|
266
294
|
.option('--track-links', 'Track the links in the email (off unless given)')
|
|
267
|
-
.option('--track-opens', 'Track the opens of the email (off unless given)'))
|
|
295
|
+
.option('--track-opens', 'Track the opens of the email (off unless given)')))
|
|
268
296
|
.description('Send one email to a contact now, outside any sequence, from the mailbox you name')
|
|
269
297
|
.addHelpText('after', help([`echo '{"subject":"Quick question","body":"<p>Hi Ann, does Tuesday work?</p>"}' | ${P} contact send-email --contact-id 456 --email-account-id 12 --message -`,
|
|
270
298
|
piped_send('send-email', ANN_EMAIL, '{"subject":"Quick question","body":"<p>Hi Ann</p>"}', '--email-account-id 12')], ['contact.not_found', ...IMPORT_CODES, 'contact.already_held', 'email_account.not_found', 'contact.blacklisted',
|
|
271
|
-
'contact.missing_variables', 'contact.rendering_failed', ...KEY_CODES], true, 'Result: {"status":"sent","contact_id","contact_created","message_id","sent_at","reply_status"}: sent means Reply\n'
|
|
299
|
+
'contact.missing_variables', 'contact.rendering_failed', ...SCHEDULE_CODES, ...KEY_CODES], true, 'Result: {"status":"sent","contact_id","contact_created","message_id","sent_at","reply_status"}: sent means Reply\n'
|
|
272
300
|
+ 'accepted the email, and reply_status is Reply\'s own word for it (new or sent). message_id is Reply\'s messageId,\n'
|
|
273
301
|
+ 'null when it gives none. Reply\'s answer carries no time, so sent_at is always null; the CLI adds none of its own.\n'
|
|
274
302
|
+ 'The email is read from stdin only, so its text never sits in the argument list. The body is HTML. Without\n'
|
|
@@ -278,7 +306,7 @@ later_options((0, contact_input_1.add_contact_options)(contact_command.command('
|
|
|
278
306
|
+ 'them; a send held for later has neither. contact.missing_variables names the variables Reply could not fill in\n'
|
|
279
307
|
+ 'details.missing_variables when Reply lists them, and contact.rendering_failed is a template Reply could not\n'
|
|
280
308
|
+ 'render, its message in detail. Neither sends anything.\n'
|
|
281
|
-
+ LATER + SENT_TO('email', 'email'), SEND_TWICE('email')))
|
|
309
|
+
+ LATER + SCHEDULED + SENT_TO('email', 'email'), SEND_TWICE('email')))
|
|
282
310
|
.action(run(async (cmd) => {
|
|
283
311
|
const { g, ctx } = ctx_of(cmd);
|
|
284
312
|
await (0, direct_send_1.handle_direct_send)('send-email', cmd.opts(), ctx, g);
|
|
@@ -286,7 +314,7 @@ later_options((0, contact_input_1.add_contact_options)(contact_command.command('
|
|
|
286
314
|
// The four LinkedIn sends share their flags, their first codes and the shape of their result.
|
|
287
315
|
const LINKEDIN_SEND_CODES = [
|
|
288
316
|
'contact.not_found', ...IMPORT_CODES, 'contact.already_held', 'contact.no_linkedin_profile', 'linkedin.account_not_found',
|
|
289
|
-
'linkedin.feature_disabled', 'linkedin.account_inactive', 'linkedin.invalid_cookie',
|
|
317
|
+
'linkedin.feature_disabled', 'linkedin.account_inactive', 'linkedin.invalid_cookie', ...SCHEDULE_CODES,
|
|
290
318
|
];
|
|
291
319
|
const LINKEDIN_SENT = '"contact_id","contact_created","activity_id","sent_at"}:\n'
|
|
292
320
|
+ 'activity_id and sent_at are Reply\'s linkedInActivityId and sentAtUtc as Reply gives them, each null when it gives\n'
|
|
@@ -294,11 +322,11 @@ const LINKEDIN_SENT = '"contact_id","contact_created","activity_id","sent_at"}:\
|
|
|
294
322
|
const VARIABLES = (where) => `Reply reads {{…}} in the ${where} as its template variables; one it cannot fill is linkedin.missing_variables.\n`;
|
|
295
323
|
const LINKEDIN_EXAMPLE = '--contact-id 456 --linkedin-account-id 34';
|
|
296
324
|
const linkedin_send = (name, description, message, examples, codes, extra, what) => {
|
|
297
|
-
later_options((0, contact_input_1.add_contact_options)(contact_command.command(name), true)
|
|
325
|
+
scheduler_options(later_options((0, contact_input_1.add_contact_options)(contact_command.command(name), true)
|
|
298
326
|
.option('--linkedin-account-id <id>', 'The LinkedIn account to send from (see `account list`)')
|
|
299
|
-
.option('--message <stdin>', `Only -: the ${message} as JSON on stdin`))
|
|
327
|
+
.option('--message <stdin>', `Only -: the ${message} as JSON on stdin`)))
|
|
300
328
|
.description(description)
|
|
301
|
-
.addHelpText('after', help(examples, [...LINKEDIN_SEND_CODES, ...codes, ...KEY_CODES], true, extra + LATER + SENT_TO('linkedin', what), SEND_TWICE(what)))
|
|
329
|
+
.addHelpText('after', help(examples, [...LINKEDIN_SEND_CODES, ...codes, ...KEY_CODES], true, extra + LATER + SCHEDULED + LINKEDIN_SCHEDULED + SENT_TO('linkedin', what), SEND_TWICE(what)))
|
|
302
330
|
.action(run(async (cmd) => {
|
|
303
331
|
const { g, ctx } = ctx_of(cmd);
|
|
304
332
|
await (0, direct_send_1.handle_direct_send)(name, cmd.opts(), ctx, g);
|
|
@@ -462,17 +490,23 @@ const direct_send_command = new commander_1.Command('direct-send').description('
|
|
|
462
490
|
exports.direct_send_command = direct_send_command;
|
|
463
491
|
const DIRECT_SEND = 'Result: {"reference","channel","contact_id","state","send_after","sent_at","message_id","failure_reason",\n'
|
|
464
492
|
+ '"cancelled_at"}, Reply\'s fields under these names, each null when Reply gives none. The reference is Reply\'s, from the\n'
|
|
465
|
-
+ 'answer of a send made with --send-after: email-<n> or linkedin-<n>, the form Reply\'s route
|
|
466
|
-
+ 'any other form is refused before any call (usage.reference, exit 2), and nothing else is read
|
|
467
|
-
+ 'Reply\'s own word: queued or sending is not yet sent, then sent, failed or
|
|
468
|
-
+ 'missing_variables, rendered_subject and rendered_body are added only when Reply gives them
|
|
469
|
-
+ 'sentence for a person, never parsed; failure_code is Reply\'s code for the failure, the one to
|
|
493
|
+
+ 'answer of a send made with --send-after: email-<n>, linkedin-<n> or linkedin-scheduled-<n>, the form Reply\'s route\n'
|
|
494
|
+
+ 'takes. A reference of any other form is refused before any call (usage.reference, exit 2), and nothing else is read\n'
|
|
495
|
+
+ 'from it. state is Reply\'s own word: queued, waitingForSchedule or sending is not yet sent, then sent, failed or\n'
|
|
496
|
+
+ 'cancelled. failure_code, missing_variables, rendered_subject and rendered_body are added only when Reply gives them:\n'
|
|
497
|
+
+ 'failure_reason is a sentence for a person, never parsed; failure_code is Reply\'s code for the failure, the one to\n'
|
|
498
|
+
+ 'branch on. A failed send may carry no failure_code: it is then null, and failure_reason is all Reply says of it.\n'
|
|
470
499
|
+ 'missing_variables lists the template variables Reply could not fill, and rendered_subject and rendered_body are the\n'
|
|
471
|
-
+ 'text as Reply filled it in.
|
|
472
|
-
+ '
|
|
473
|
-
+ '
|
|
500
|
+
+ 'text as Reply filled it in. estimated_send_at is added only when Reply gives it, and is when Reply expects a send\n'
|
|
501
|
+
+ 'waiting for its schedule\'s next opening to go out. Reply sets estimated_send_at in waitingForSchedule only and gives\n'
|
|
502
|
+
+ 'it null in every other state; it is null in waitingForSchedule too when the schedule does not open within 30 days of\n'
|
|
503
|
+
+ 'the moment the send waits from: its --send-after, or now once that has passed. A Reply without this route answers\n'
|
|
504
|
+
+ 'reply.refused with status 404 and no reply_code; a reference of any other form never leaves the CLI, so that 404 means\n'
|
|
505
|
+
+ 'this Reply has no such route.\n'
|
|
506
|
+
+ 'direct_send.not_found is a reference that Reply has no send for, a send of another team included.\n'
|
|
507
|
+
+ 'direct_send.not_owned is an email send made by a teammate this user may not act for.\n';
|
|
474
508
|
direct_send_command.command('get')
|
|
475
|
-
.argument('<reference>', 'The send\'s reference, email-<n> or linkedin-<n>, as a send made with --send-after answered it')
|
|
509
|
+
.argument('<reference>', 'The send\'s reference, email-<n>, linkedin-<n> or linkedin-scheduled-<n>, as a send made with --send-after answered it')
|
|
476
510
|
.description('One direct send as Reply holds it: whether it has gone out, when, and why it failed')
|
|
477
511
|
.addHelpText('after', help([ex('direct-send get email-1001')], ['direct_send.not_found', 'direct_send.not_owned'], false, DIRECT_SEND))
|
|
478
512
|
.action(run(async (cmd) => {
|
|
@@ -480,11 +514,16 @@ direct_send_command.command('get')
|
|
|
480
514
|
await (0, direct_sends_1.handle_direct_send_get)(cmd.args[0], ctx, g);
|
|
481
515
|
}));
|
|
482
516
|
direct_send_command.command('cancel')
|
|
483
|
-
.argument('<reference>', 'The send\'s reference, email-<n> or linkedin-<n>, as a send made with --send-after answered it')
|
|
517
|
+
.argument('<reference>', 'The send\'s reference, email-<n>, linkedin-<n> or linkedin-scheduled-<n>, as a send made with --send-after answered it')
|
|
484
518
|
.description('Stop a direct send that has not gone out yet')
|
|
485
|
-
.addHelpText('after', help([ex('direct-send cancel email-1001')], ['direct_send.not_found', 'direct_send.not_owned', 'direct_send.already_sent', 'direct_send.already_failed'
|
|
486
|
-
|
|
487
|
-
+ '
|
|
519
|
+
.addHelpText('after', help([ex('direct-send cancel email-1001')], ['direct_send.not_found', 'direct_send.not_owned', 'direct_send.already_sent', 'direct_send.already_failed',
|
|
520
|
+
'direct_send.already_sending', 'direct_send.cancel_not_confirmed'], true, DIRECT_SEND + 'The answer is the send as Reply now holds it, state cancelled. Cancelling a send already cancelled answers it again,\n'
|
|
521
|
+
+ 'so running it again is safe. direct_send.already_sent, direct_send.already_failed and direct_send.already_sending mean\n'
|
|
522
|
+
+ 'the send was past cancelling; nothing changed. direct_send.already_sending is a LinkedIn send made for later that\n'
|
|
523
|
+
+ 'Reply is handing to the account\'s queue or that waits or runs there, even while direct-send get still reads it queued.\n'
|
|
524
|
+
+ 'direct_send.cancel_not_confirmed is a 503 from Reply that could not confirm the cancel: the send is still queued or\n'
|
|
525
|
+
+ 'waiting for its schedule, so run the cancel again, as Reply asks; retry_after carries Reply\'s Retry-After when it\n'
|
|
526
|
+
+ 'sends one. Any other 5xx is outcome.unknown (exit 3).\n'))
|
|
488
527
|
.action(run(async (cmd) => {
|
|
489
528
|
const { g, ctx } = ctx_of(cmd);
|
|
490
529
|
await (0, direct_sends_1.handle_direct_send_cancel)(cmd.args[0], ctx, g);
|