@prohost/cli 0.8.0 → 0.8.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/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ Versions follow [semver](https://semver.org/). Publishing is automated: merging
4
4
  a version bump to `main` triggers `.github/workflows/npm-publish-cli.yml`, which
5
5
  builds via `prepack`, runs the suite, publishes, and tags `cli-v<version>`.
6
6
 
7
+ ## 0.8.1
8
+
9
+ A long message no longer reaches a paired agent as a fragment it can't recover.
10
+
11
+ - **Clipped trigger text is called out.** When the server reports that the
12
+ message that woke the agent was clipped (`trigger.text_truncated: true`, new
13
+ in the run event), the prompt says so and, when the agent has ProhostAI tools
14
+ and a conversation, tells it to read the full message with
15
+ `get_conversation_messages` before answering. An agent without tools is told
16
+ to say the message reached it truncated instead of answering the fragment.
17
+ Keyed on the explicit flag, never on a trailing `…` a person could have typed;
18
+ a server that predates the flag reads as "not clipped". Pairs with the server raising the excerpt
19
+ cap from 500 to 16,000 characters and returning full message bodies from
20
+ `get_conversation_messages`, so this path is now rare.
21
+
7
22
  ## 0.8.0
8
23
 
9
24
  A paired agent woken as a bystander can now stay silent.
@@ -235,6 +235,12 @@ export interface AgentRunRequest {
235
235
  trigger_message_id?: string;
236
236
  /** Capped inline excerpt of the message that woke the agent. */
237
237
  trigger_text?: string;
238
+ /**
239
+ * The server clipped `trigger_text` (`trigger.text_truncated`). Explicit
240
+ * metadata rather than a guess from a trailing ellipsis, which a person can
241
+ * also type. Absent on servers that predate it — read as "not clipped".
242
+ */
243
+ trigger_text_truncated?: boolean;
238
244
  /**
239
245
  * Images and files on the message that woke the agent.
240
246
  *
@@ -337,6 +337,8 @@ export function parseRunRequest(data) {
337
337
  trigger_source: str(trigger.source) ?? str(data.trigger_source),
338
338
  trigger_message_id: str(trigger.message_id),
339
339
  trigger_text: str(trigger.text_excerpt),
340
+ // Only an explicit `true` counts: anything else is an unclipped message.
341
+ trigger_text_truncated: trigger.text_truncated === true,
340
342
  trigger_attachments: attachmentList(trigger.attachments ?? data.trigger_attachments),
341
343
  trigger_user_id: str(trigger.user_id),
342
344
  trigger_brief: brief(trigger.brief),
@@ -207,6 +207,23 @@ export function buildPrompt(run, context) {
207
207
  // The server caps this excerpt, so say so rather than let an agent assume
208
208
  // it has the whole message.
209
209
  lines.push('Message that woke you (may be truncated by the server):', run.trigger_text, '');
210
+ // An agent that is only told the text "may be" truncated answers the
211
+ // fragment — or asks the sender to repost — when the whole message is one
212
+ // tool call away. Keyed on the server's explicit flag, never on a trailing
213
+ // ellipsis a person could have typed.
214
+ if (run.trigger_text_truncated) {
215
+ lines.push(...(context.mcpServerName && run.conversation_id
216
+ ? [
217
+ 'ProhostAI cut that message short. Before answering, read it in full with',
218
+ `the ProhostAI get_conversation_messages tool (conversation ${run.conversation_id})`,
219
+ 'and answer the whole message, not the excerpt above.',
220
+ ]
221
+ : [
222
+ 'ProhostAI cut that message short, and you have no tool to read the rest.',
223
+ 'Answer what you can see and say plainly that the message reached you',
224
+ 'truncated.',
225
+ ]), '');
226
+ }
210
227
  }
211
228
  else if (triggerAttachments.length > 0) {
212
229
  // Distinct from "the server didn't send the text": here the message really
package/dist/version.d.ts CHANGED
@@ -7,6 +7,6 @@
7
7
  * `package.json`, so a release bump that forgets this file fails the suite
8
8
  * instead of shipping a `User-Agent` that lies about which build is calling.
9
9
  */
10
- export declare const CLI_VERSION = "0.8.0";
10
+ export declare const CLI_VERSION = "0.8.1";
11
11
  /** Sent on every HTTP request the CLI makes back into ProhostAI. */
12
- export declare const USER_AGENT = "prohost-cli/0.8.0";
12
+ export declare const USER_AGENT = "prohost-cli/0.8.1";
package/dist/version.js CHANGED
@@ -7,6 +7,6 @@
7
7
  * `package.json`, so a release bump that forgets this file fails the suite
8
8
  * instead of shipping a `User-Agent` that lies about which build is calling.
9
9
  */
10
- export const CLI_VERSION = '0.8.0';
10
+ export const CLI_VERSION = '0.8.1';
11
11
  /** Sent on every HTTP request the CLI makes back into ProhostAI. */
12
12
  export const USER_AGENT = `prohost-cli/${CLI_VERSION}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prohost/cli",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Run your own AI agent as a ProhostAI teammate, and stream your account's webhooks to your laptop.",
5
5
  "type": "module",
6
6
  "license": "MIT",