@zerox1/sdk 0.2.8 → 0.2.9
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/dist/index.js +3 -0
- package/package.json +5 -5
- package/packages/darwin-arm64/bin/zerox1-node +0 -0
- package/packages/darwin-arm64/package.json +1 -1
- package/packages/darwin-x64/bin/zerox1-node +0 -0
- package/packages/darwin-x64/package.json +1 -1
- package/packages/linux-x64/bin/zerox1-node +0 -0
- package/packages/linux-x64/package.json +1 -1
- package/packages/win32-x64/bin/zerox1-node.exe +0 -0
- package/packages/win32-x64/package.json +1 -1
- package/src/index.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -354,6 +354,9 @@ class Zerox1Agent {
|
|
|
354
354
|
* Returns the assigned nonce and payload hash for tracking.
|
|
355
355
|
*/
|
|
356
356
|
async send(params) {
|
|
357
|
+
if (!params.conversationId) {
|
|
358
|
+
throw new Error('conversationId is required. Generate one with agent.newConversationId().');
|
|
359
|
+
}
|
|
357
360
|
const body = {
|
|
358
361
|
msg_type: params.msgType,
|
|
359
362
|
recipient: params.recipient ?? null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerox1/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "0x01 mesh agent SDK — zero-config, binary bundled, works on every platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"ws": "^8.18.0"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@zerox1/sdk-darwin-arm64": "0.2.
|
|
18
|
-
"@zerox1/sdk-darwin-x64": "0.2.
|
|
19
|
-
"@zerox1/sdk-linux-x64": "0.2.
|
|
20
|
-
"@zerox1/sdk-win32-x64": "0.2.
|
|
17
|
+
"@zerox1/sdk-darwin-arm64": "0.2.9",
|
|
18
|
+
"@zerox1/sdk-darwin-x64": "0.2.9",
|
|
19
|
+
"@zerox1/sdk-linux-x64": "0.2.9",
|
|
20
|
+
"@zerox1/sdk-win32-x64": "0.2.9"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^22.0.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/index.ts
CHANGED
|
@@ -499,6 +499,11 @@ export class Zerox1Agent {
|
|
|
499
499
|
* Returns the assigned nonce and payload hash for tracking.
|
|
500
500
|
*/
|
|
501
501
|
async send(params: SendParams): Promise<SentConfirmation> {
|
|
502
|
+
if (!params.conversationId) {
|
|
503
|
+
throw new Error(
|
|
504
|
+
'conversationId is required. Generate one with agent.newConversationId().'
|
|
505
|
+
)
|
|
506
|
+
}
|
|
502
507
|
const body = {
|
|
503
508
|
msg_type: params.msgType,
|
|
504
509
|
recipient: params.recipient ?? null,
|