@relaymessenger/pi 0.1.4-staging.18 → 0.1.4-staging.19
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 +6 -0
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,3 +29,9 @@ Exact legacy comma-joined text remains a server compatibility input. The person
|
|
|
29
29
|
checks any number of options and submits them once; checking sends nothing, and
|
|
30
30
|
a person answers a given selection once. iOS may draw a checkmark in place of
|
|
31
31
|
each bullet and repeat the prompt's title, as presentation only.
|
|
32
|
+
|
|
33
|
+
## Invoice
|
|
34
|
+
|
|
35
|
+
A verified agent ends the final Pi answer with an `invoice` JSON fence holding
|
|
36
|
+
a Stripe checkout link; the words go first and the invoice follows as its own
|
|
37
|
+
Message.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { createInterface } from "node:readline";
|
|
3
|
-
import Relay, { BUTTONS_BLOCK_INSTRUCTION, BUTTONS_GUIDANCE, selectionReply, selectionReplyContext, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, LINK_LINE_INSTRUCTION, answerMessages as splitAnswer, } from "@relaymessenger/sdk";
|
|
3
|
+
import Relay, { BUTTONS_BLOCK_INSTRUCTION, BUTTONS_GUIDANCE, INVOICE_BLOCK_INSTRUCTION, INVOICE_GUIDANCE, selectionReply, selectionReplyContext, SELECTION_GUIDANCE, SELECTION_BLOCK_INSTRUCTION, LINK_LINE_INSTRUCTION, answerMessages as splitAnswer, } from "@relaymessenger/sdk";
|
|
4
4
|
class ChildPiProcess {
|
|
5
5
|
#child;
|
|
6
6
|
constructor(command, args) { this.#child = spawn(command, [...args], { stdio: ["pipe", "pipe", "pipe"] }); this.#child.stderr.resume(); }
|
|
@@ -26,7 +26,7 @@ const textFromEvent = (event) => {
|
|
|
26
26
|
* This process sends pi's final text for it, and the same buttons and link
|
|
27
27
|
* rules every other runtime carries.
|
|
28
28
|
*/
|
|
29
|
-
export const piPrompt = (message) => `${message}\n\nWrite your answer as your final message. Relay sends that answer to the chat for you, so do not send it yourself. Write chat text. Inline Markdown draws: bold, italic, strikethrough, code, links. Headings, lists and code fences show as written.\n\n${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE}`;
|
|
29
|
+
export const piPrompt = (message) => `${message}\n\nWrite your answer as your final message. Relay sends that answer to the chat for you, so do not send it yourself. Write chat text. Inline Markdown draws: bold, italic, strikethrough, code, links. Headings, lists and code fences show as written.\n\n${BUTTONS_BLOCK_INSTRUCTION} ${LINK_LINE_INSTRUCTION} ${BUTTONS_GUIDANCE} ${SELECTION_BLOCK_INSTRUCTION} ${SELECTION_GUIDANCE} ${INVOICE_BLOCK_INSTRUCTION} ${INVOICE_GUIDANCE}`;
|
|
30
30
|
/**
|
|
31
31
|
* The messages an answer becomes: each link written alone on a line as its
|
|
32
32
|
* own message, text in chunks the API takes, and the buttons its fenced block
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relaymessenger/pi",
|
|
3
|
-
"version": "0.1.4-staging.
|
|
3
|
+
"version": "0.1.4-staging.19",
|
|
4
4
|
"description": "Relay Messenger channel for Pi over Relay v1 WebSocket delivery.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test": "vitest run"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@relaymessenger/sdk": "0.3.6-staging.
|
|
37
|
+
"@relaymessenger/sdk": "0.3.6-staging.19"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@earendil-works/pi-coding-agent": "0.86.0",
|