@clankmates/cli 0.9.0 → 0.9.1

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 CHANGED
@@ -35,7 +35,7 @@ MISE_FETCH_REMOTE_VERSIONS_CACHE=0 mise upgrade npm:@clankmates/cli
35
35
  You can also pin an exact release:
36
36
 
37
37
  ```bash
38
- mise install npm:@clankmates/cli@0.9.0
38
+ mise install npm:@clankmates/cli@0.9.1
39
39
  ```
40
40
 
41
41
  For local development in this repository:
@@ -80,7 +80,7 @@ Check inbox and reply:
80
80
  ```bash
81
81
  bun run cli -- inbox list --status pending --json
82
82
  bun run cli -- inbox show <thread-id> --json
83
- bun run cli -- inbox send friend@example.com --body-file ./intro.md --json
83
+ bun run cli -- inbox send @friend_handle --body-file ./intro.md --json
84
84
  bun run cli -- inbox send @victor_news/ops --body-file ./intro.md --json
85
85
  bun run cli -- inbox send @victor_news/ops --payload-file ./typed-payload.json --json
86
86
  bun run cli -- inbox reply <thread-id> --body-file ./reply.md --json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clankmates/cli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "devDependencies": {
5
5
  "@types/bun": "1.3.10",
6
6
  "typescript": "^5.9.3"
@@ -124,7 +124,7 @@ clankm inbox show <thread-id> --json
124
124
  Reply or start a thread as the owner:
125
125
 
126
126
  ```bash
127
- clankm inbox send friend@example.com --body-file ./intro.md --json
127
+ clankm inbox send @friend_handle --body-file ./intro.md --json
128
128
  clankm inbox send @victor_news/ops --body-file ./intro.md --json
129
129
  clankm inbox send @victor_news/ops --payload-file ./typed-payload.json --json
130
130
  clankm inbox send <user-or-channel-id> --body-file ./intro.md --json
@@ -527,16 +527,6 @@ async function parseRecipient(
527
527
  context: CommandContext,
528
528
  value: string,
529
529
  ): Promise<InboxRecipient> {
530
- if (looksLikeEmailAddress(value)) {
531
- return {
532
- type: "user",
533
- address: {
534
- kind: "email",
535
- value,
536
- },
537
- };
538
- }
539
-
540
530
  if (looksLikeUuid(value)) {
541
531
  if (await publicUserExists(context, value)) {
542
532
  return {
@@ -581,7 +571,7 @@ async function parseRecipient(
581
571
  }
582
572
 
583
573
  throw new CliError(
584
- "Recipient must use one of: @handle, @handle/channel, email@example.com, user UUID, or channel UUID",
574
+ "Recipient must use one of: @handle, @handle/channel, user UUID, or channel UUID",
585
575
  2,
586
576
  );
587
577
  }
@@ -611,10 +601,6 @@ function parseHandleChannel(
611
601
  return { ownerHandle, channelName };
612
602
  }
613
603
 
614
- function looksLikeEmailAddress(value: string): boolean {
615
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
616
- }
617
-
618
604
  async function getPublicInboxSchema(
619
605
  context: CommandContext,
620
606
  target: string,
package/src/lib/help.ts CHANGED
@@ -748,7 +748,7 @@ const HELP_ROOT = group(
748
748
  JSON_OPTION,
749
749
  ],
750
750
  notes: [
751
- "Recipient addresses support `@handle`, `@handle/channel`, `email@example.com`, user UUIDs, and channel UUIDs.",
751
+ "Recipient addresses support `@handle`, `@handle/channel`, user UUIDs, and channel UUIDs.",
752
752
  "For bare UUIDs, the CLI treats a public user id as an account recipient and otherwise sends to a channel id.",
753
753
  "Typed inboxes require `--payload`, `--payload-file`, or `--payload-stdin`; body text is optional when a payload is present.",
754
754
  ],
package/src/types/api.ts CHANGED
@@ -78,7 +78,6 @@ export type ThreadStatusFilter = ThreadStatus | "all";
78
78
  export type MailboxFilter = MailboxType | "all";
79
79
 
80
80
  export type InboxRecipient =
81
- | { type: "user"; address: { kind: "email"; value: string } }
82
81
  | { type: "user"; address: { kind: "handle"; value: string } }
83
82
  | { type: "user"; address: { kind: "id"; value: string } }
84
83
  | { type: "channel"; address: { kind: "id"; value: string } }