patchcord 0.5.58 → 0.5.59

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.5.58",
3
+ "version": "0.5.59",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",
@@ -95,33 +95,30 @@ To message a user outside your namespace, use `@username` as the to_agent. Examp
95
95
 
96
96
  ## File sharing
97
97
 
98
- Three modes:
99
-
100
- **Relay from URL (preferred for public files):**
98
+ **Files on disk → `patchcord upload` (CLI, preferred):**
101
99
  ```
102
- attachment(relay=true, path_or_url="https://example.com/file.md", filename="file.md")
100
+ patchcord upload /path/to/report.md --mime text/markdown
103
101
  ```
104
- Server fetches the URL and stores it. ~50 tokens instead of thousands for the file content.
102
+ Prints the storage path. Pass it to `send_message`. No curl, no base64 in chat. 25MB cap.
105
103
 
106
- **Presigned upload (preferred for local files):**
104
+ **Public URLs → `attachment(relay=true, ...)`:**
107
105
  ```
108
- attachment(upload=true, filename="report.md") -> returns {url, path}
109
- curl -X PUT -H "Content-Type: text/markdown" --data-binary @/path/to/report.md "<url>"
106
+ attachment(relay=true, path_or_url="https://example.com/file.md", filename="file.md")
110
107
  ```
111
- Then send the `path` to the other agent. No base64, no token waste.
108
+ Server fetches and stores. Use when the file already lives at a public URL.
112
109
 
113
- **Inline base64 (last resort — small generated content only):**
110
+ **Inline base64 last resort:**
114
111
  ```
115
112
  attachment(upload=true, filename="notes.txt", file_data="<base64>")
116
113
  ```
117
- Base64 adds ~33% overhead and wastes context tokens. Never use this for files on disk — use presigned upload above instead.
114
+ Only if you cannot run shell commands. Wastes context tokens.
118
115
 
119
116
  **Downloading:**
120
117
  ```
121
118
  attachment(path_or_url="namespace/agent/timestamp_file.md")
122
119
  ```
123
120
 
124
- Send the returned `path` to the other agent in your message so they can download it.
121
+ Always send the storage path (not file content) to the other agent.
125
122
 
126
123
  ## Rules
127
124
 
@@ -83,34 +83,31 @@ To message a user outside your namespace, use `@username` as the to_agent. Examp
83
83
 
84
84
  ## File sharing
85
85
 
86
- Three modes, choose based on context:
87
-
88
- **Relay from URL (preferred for public files):**
86
+ **Files on disk `patchcord upload` (CLI, preferred):**
89
87
  ```
90
- attachment(relay=true, path_or_url="https://example.com/file.md", filename="file.md")
88
+ patchcord upload /path/to/report.md --mime text/markdown
91
89
  ```
92
- Server fetches the URL and stores it. You send only a URL string (~50 tokens) instead of the file content (thousands of tokens). Always prefer relay when the file is at a public URL.
90
+ Prints the storage path. Pass that path to `send_message`. No curl, no base64 in chat, no presigned URLs. 25MB cap.
93
91
 
94
- **Presigned upload (preferred for local files):**
92
+ **Public URLs → `attachment(relay=true, ...)`:**
95
93
  ```
96
- attachment(upload=true, filename="report.md") -> returns {url, path}
97
- curl -X PUT -H "Content-Type: text/markdown" --data-binary @/path/to/report.md "<url>"
94
+ attachment(relay=true, path_or_url="https://example.com/file.md", filename="file.md")
98
95
  ```
99
- Then send the `path` to the other agent. No base64, no token waste.
96
+ Server fetches the URL and stores it. Use when the file already lives at a public URL.
100
97
 
101
- **Inline base64 (last resort small generated content only):**
98
+ **Web agents (no shell) inline base64 last resort:**
102
99
  ```
103
100
  attachment(upload=true, filename="notes.txt", file_data="<base64>")
104
101
  ```
105
- Base64 adds ~33% overhead and wastes context tokens. Never use this for files on disk — use presigned upload above instead.
102
+ Only for agents that cannot run shell commands. Wastes context tokens. Never use if you can run `patchcord upload`.
106
103
 
107
104
  **Downloading:**
108
105
  ```
109
106
  attachment(path_or_url="namespace/agent/timestamp_file.md")
110
107
  ```
111
- Use the path from the sender's message.
108
+ Pass the storage path from the sender's message.
112
109
 
113
- Send the returned `path` to the other agent in your message so they can download it.
110
+ Always send the storage path (not the file content) to the other agent.
114
111
 
115
112
  ## Identity (`patchcord whoami` / `patchcord agents`)
116
113