@agent-wechat/agent-wechat 1.4.0 → 1.5.0

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.
Files changed (3) hide show
  1. package/dist/index.js +1520 -267
  2. package/openclaw.plugin.json +184 -26
  3. package/package.json +93 -14
@@ -222,13 +222,13 @@
222
222
  "type": "string",
223
223
  "minLength": 1,
224
224
  "maxLength": 200,
225
- "description": "Use openai. Other providers and continuous-output models fail preflight without fallback."
225
+ "description": "Use openai. Other providers fail preflight without fallback."
226
226
  },
227
227
  "model": {
228
228
  "type": "string",
229
229
  "minLength": 1,
230
230
  "maxLength": 200,
231
- "description": "Realtime speech model; omitted uses the selected provider's default."
231
+ "description": "Speech model, such as gpt-realtime-2.1 or the continuous gpt-live-1-codex; omitted uses the selected provider's default."
232
232
  },
233
233
  "voice": {
234
234
  "type": "string",
@@ -241,6 +241,64 @@
241
241
  "maxLength": 4000,
242
242
  "description": "Additional conversation guidance; does not grant tool or account-owner authority."
243
243
  },
244
+ "agentContext": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "properties": {
248
+ "enabled": {
249
+ "type": "boolean",
250
+ "default": false,
251
+ "description": "Send bounded excerpts of the selected agent's IDENTITY.md and SOUL.md to the Realtime provider. Configured agent identity is used independently."
252
+ }
253
+ }
254
+ },
255
+ "recentContext": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "properties": {
259
+ "enabled": {
260
+ "type": "boolean",
261
+ "default": false,
262
+ "description": "When a call starts, send the Realtime provider the summaries of the last few calls with this contact and the latest messages of your WeChat chat with them, so the voice model knows what you last talked about."
263
+ },
264
+ "maxMessages": {
265
+ "type": "integer",
266
+ "minimum": 1,
267
+ "maximum": 50,
268
+ "default": 10,
269
+ "description": "How many of the latest chat messages to include."
270
+ }
271
+ }
272
+ },
273
+ "consultPolicy": {
274
+ "type": "string",
275
+ "enum": [
276
+ "auto",
277
+ "substantive",
278
+ "always"
279
+ ],
280
+ "default": "auto",
281
+ "description": "Guide when the voice model consults. Always can use a final caller utterance as the consultation question when the voice model does not consult. GPT-Live models do not support always."
282
+ },
283
+ "consultThinkingLevel": {
284
+ "type": "string",
285
+ "enum": [
286
+ "off",
287
+ "minimal",
288
+ "low",
289
+ "medium",
290
+ "high",
291
+ "xhigh",
292
+ "adaptive",
293
+ "max",
294
+ "ultra"
295
+ ],
296
+ "description": "Thinking level for the regular OpenClaw consultation run."
297
+ },
298
+ "consultFastMode": {
299
+ "type": "boolean",
300
+ "description": "Set fast mode for the regular OpenClaw consultation run when its model supports it."
301
+ },
244
302
  "providers": {
245
303
  "type": "object",
246
304
  "additionalProperties": false,
@@ -262,39 +320,60 @@
262
320
  "type": "string",
263
321
  "enum": [
264
322
  "none",
265
- "safe-read-only"
323
+ "safe-read-only",
324
+ "owner"
266
325
  ],
267
- "default": "none"
326
+ "description": "Owner uses the normal agent tool policy only for an exact agent-wechat entry in commands.ownerAllowFrom matching the connected voice peer. Other admitted peers get read-only consultation. Defaults to safe-read-only with session persistence, otherwise none."
268
327
  },
269
328
  "allowConsultSessionPersistence": {
270
329
  "type": "boolean",
271
330
  "default": false,
272
- "description": "Required for safe-read-only consultation: OpenClaw creates a separate per-call agent session which can persist. This adapter does not store transcripts or recordings."
331
+ "description": "Required for consultation. OpenClaw creates separate agent sessions for calls which can persist. This adapter stores no recordings; with consultation.summary it keeps the last few call summaries for each contact."
273
332
  },
274
333
  "consultation": {
275
334
  "type": "object",
276
335
  "additionalProperties": false,
277
336
  "properties": {
278
- "model": {
279
- "type": "string",
280
- "minLength": 1,
281
- "maxLength": 200,
282
- "pattern": "^[^/]+/.+$",
283
- "description": "Agent-consult provider/model override; omitted uses the selected agent's model."
284
- },
285
337
  "timeoutMs": {
286
338
  "type": "integer",
287
339
  "minimum": 1000,
288
340
  "maximum": 120000,
289
341
  "default": 30000
342
+ },
343
+ "inboundSessionKey": {
344
+ "type": "string",
345
+ "pattern": "^agent:[a-z0-9][a-z0-9_-]{0,63}:[^:\\s][^\\s]*$",
346
+ "maxLength": 1024,
347
+ "description": "Optional existing session of the selected agent to fork into a call's session when that session is first created by an admitted incoming call."
348
+ },
349
+ "summary": {
350
+ "type": "boolean",
351
+ "default": true,
352
+ "description": "After an answered call, give the call's transcript to the agent in the call's session and keep its short summary. The summary is also left as a note in your WeChat chat with the caller, and calls placed with the wechat_call tool report it to the session that placed them."
353
+ },
354
+ "recentMessages": {
355
+ "type": "integer",
356
+ "minimum": 0,
357
+ "maximum": 50,
358
+ "default": 10,
359
+ "description": "How many of the latest messages of your WeChat chat with the caller the call's first consultation gets as context; 0 turns this off."
290
360
  }
291
361
  }
292
362
  },
363
+ "sessionScope": {
364
+ "type": "string",
365
+ "enum": [
366
+ "per-contact",
367
+ "per-call"
368
+ ],
369
+ "default": "per-contact",
370
+ "description": "per-contact keeps one session for each contact, so the agent remembers earlier calls with them; per-call starts every call in a new session."
371
+ },
293
372
  "maxDurationSeconds": {
294
373
  "type": "integer",
295
374
  "minimum": 30,
296
375
  "maximum": 3600,
297
- "default": 300
376
+ "default": 3600
298
377
  }
299
378
  }
300
379
  },
@@ -559,13 +638,13 @@
559
638
  "type": "string",
560
639
  "minLength": 1,
561
640
  "maxLength": 200,
562
- "description": "Use openai. Other providers and continuous-output models fail preflight without fallback."
641
+ "description": "Use openai. Other providers fail preflight without fallback."
563
642
  },
564
643
  "model": {
565
644
  "type": "string",
566
645
  "minLength": 1,
567
646
  "maxLength": 200,
568
- "description": "Realtime speech model; omitted uses the selected provider's default."
647
+ "description": "Speech model, such as gpt-realtime-2.1 or the continuous gpt-live-1-codex; omitted uses the selected provider's default."
569
648
  },
570
649
  "voice": {
571
650
  "type": "string",
@@ -578,6 +657,64 @@
578
657
  "maxLength": 4000,
579
658
  "description": "Additional conversation guidance; does not grant tool or account-owner authority."
580
659
  },
660
+ "agentContext": {
661
+ "type": "object",
662
+ "additionalProperties": false,
663
+ "properties": {
664
+ "enabled": {
665
+ "type": "boolean",
666
+ "default": false,
667
+ "description": "Send bounded excerpts of the selected agent's IDENTITY.md and SOUL.md to the Realtime provider. Configured agent identity is used independently."
668
+ }
669
+ }
670
+ },
671
+ "recentContext": {
672
+ "type": "object",
673
+ "additionalProperties": false,
674
+ "properties": {
675
+ "enabled": {
676
+ "type": "boolean",
677
+ "default": false,
678
+ "description": "When a call starts, send the Realtime provider the summaries of the last few calls with this contact and the latest messages of your WeChat chat with them, so the voice model knows what you last talked about."
679
+ },
680
+ "maxMessages": {
681
+ "type": "integer",
682
+ "minimum": 1,
683
+ "maximum": 50,
684
+ "default": 10,
685
+ "description": "How many of the latest chat messages to include."
686
+ }
687
+ }
688
+ },
689
+ "consultPolicy": {
690
+ "type": "string",
691
+ "enum": [
692
+ "auto",
693
+ "substantive",
694
+ "always"
695
+ ],
696
+ "default": "auto",
697
+ "description": "Guide when the voice model consults. Always can use a final caller utterance as the consultation question when the voice model does not consult. GPT-Live models do not support always."
698
+ },
699
+ "consultThinkingLevel": {
700
+ "type": "string",
701
+ "enum": [
702
+ "off",
703
+ "minimal",
704
+ "low",
705
+ "medium",
706
+ "high",
707
+ "xhigh",
708
+ "adaptive",
709
+ "max",
710
+ "ultra"
711
+ ],
712
+ "description": "Thinking level for the regular OpenClaw consultation run."
713
+ },
714
+ "consultFastMode": {
715
+ "type": "boolean",
716
+ "description": "Set fast mode for the regular OpenClaw consultation run when its model supports it."
717
+ },
581
718
  "providers": {
582
719
  "type": "object",
583
720
  "additionalProperties": false,
@@ -599,39 +736,60 @@
599
736
  "type": "string",
600
737
  "enum": [
601
738
  "none",
602
- "safe-read-only"
739
+ "safe-read-only",
740
+ "owner"
603
741
  ],
604
- "default": "none"
742
+ "description": "Owner uses the normal agent tool policy only for an exact agent-wechat entry in commands.ownerAllowFrom matching the connected voice peer. Other admitted peers get read-only consultation. Defaults to safe-read-only with session persistence, otherwise none."
605
743
  },
606
744
  "allowConsultSessionPersistence": {
607
745
  "type": "boolean",
608
746
  "default": false,
609
- "description": "Required for safe-read-only consultation: OpenClaw creates a separate per-call agent session which can persist. This adapter does not store transcripts or recordings."
747
+ "description": "Required for consultation. OpenClaw creates separate agent sessions for calls which can persist. This adapter stores no recordings; with consultation.summary it keeps the last few call summaries for each contact."
610
748
  },
611
749
  "consultation": {
612
750
  "type": "object",
613
751
  "additionalProperties": false,
614
752
  "properties": {
615
- "model": {
616
- "type": "string",
617
- "minLength": 1,
618
- "maxLength": 200,
619
- "pattern": "^[^/]+/.+$",
620
- "description": "Agent-consult provider/model override; omitted uses the selected agent's model."
621
- },
622
753
  "timeoutMs": {
623
754
  "type": "integer",
624
755
  "minimum": 1000,
625
756
  "maximum": 120000,
626
757
  "default": 30000
758
+ },
759
+ "inboundSessionKey": {
760
+ "type": "string",
761
+ "pattern": "^agent:[a-z0-9][a-z0-9_-]{0,63}:[^:\\s][^\\s]*$",
762
+ "maxLength": 1024,
763
+ "description": "Optional existing session of the selected agent to fork into a call's session when that session is first created by an admitted incoming call."
764
+ },
765
+ "summary": {
766
+ "type": "boolean",
767
+ "default": true,
768
+ "description": "After an answered call, give the call's transcript to the agent in the call's session and keep its short summary. The summary is also left as a note in your WeChat chat with the caller, and calls placed with the wechat_call tool report it to the session that placed them."
769
+ },
770
+ "recentMessages": {
771
+ "type": "integer",
772
+ "minimum": 0,
773
+ "maximum": 50,
774
+ "default": 10,
775
+ "description": "How many of the latest messages of your WeChat chat with the caller the call's first consultation gets as context; 0 turns this off."
627
776
  }
628
777
  }
629
778
  },
779
+ "sessionScope": {
780
+ "type": "string",
781
+ "enum": [
782
+ "per-contact",
783
+ "per-call"
784
+ ],
785
+ "default": "per-contact",
786
+ "description": "per-contact keeps one session for each contact, so the agent remembers earlier calls with them; per-call starts every call in a new session."
787
+ },
630
788
  "maxDurationSeconds": {
631
789
  "type": "integer",
632
790
  "minimum": 30,
633
791
  "maximum": 3600,
634
- "default": 300
792
+ "default": 3600
635
793
  }
636
794
  }
637
795
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-wechat/agent-wechat",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -274,13 +274,13 @@
274
274
  "type": "string",
275
275
  "minLength": 1,
276
276
  "maxLength": 200,
277
- "description": "Use openai. Other providers and continuous-output models fail preflight without fallback."
277
+ "description": "Use openai. Other providers fail preflight without fallback."
278
278
  },
279
279
  "model": {
280
280
  "type": "string",
281
281
  "minLength": 1,
282
282
  "maxLength": 200,
283
- "description": "Realtime speech model; omitted uses the selected provider's default."
283
+ "description": "Speech model, such as gpt-realtime-2.1 or the continuous gpt-live-1-codex; omitted uses the selected provider's default."
284
284
  },
285
285
  "voice": {
286
286
  "type": "string",
@@ -293,6 +293,64 @@
293
293
  "maxLength": 4000,
294
294
  "description": "Additional conversation guidance; does not grant tool or account-owner authority."
295
295
  },
296
+ "agentContext": {
297
+ "type": "object",
298
+ "additionalProperties": false,
299
+ "properties": {
300
+ "enabled": {
301
+ "type": "boolean",
302
+ "default": false,
303
+ "description": "Send bounded excerpts of the selected agent's IDENTITY.md and SOUL.md to the Realtime provider. Configured agent identity is used independently."
304
+ }
305
+ }
306
+ },
307
+ "recentContext": {
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "properties": {
311
+ "enabled": {
312
+ "type": "boolean",
313
+ "default": false,
314
+ "description": "When a call starts, send the Realtime provider the summaries of the last few calls with this contact and the latest messages of your WeChat chat with them, so the voice model knows what you last talked about."
315
+ },
316
+ "maxMessages": {
317
+ "type": "integer",
318
+ "minimum": 1,
319
+ "maximum": 50,
320
+ "default": 10,
321
+ "description": "How many of the latest chat messages to include."
322
+ }
323
+ }
324
+ },
325
+ "consultPolicy": {
326
+ "type": "string",
327
+ "enum": [
328
+ "auto",
329
+ "substantive",
330
+ "always"
331
+ ],
332
+ "default": "auto",
333
+ "description": "Guide when the voice model consults. Always can use a final caller utterance as the consultation question when the voice model does not consult. GPT-Live models do not support always."
334
+ },
335
+ "consultThinkingLevel": {
336
+ "type": "string",
337
+ "enum": [
338
+ "off",
339
+ "minimal",
340
+ "low",
341
+ "medium",
342
+ "high",
343
+ "xhigh",
344
+ "adaptive",
345
+ "max",
346
+ "ultra"
347
+ ],
348
+ "description": "Thinking level for the regular OpenClaw consultation run."
349
+ },
350
+ "consultFastMode": {
351
+ "type": "boolean",
352
+ "description": "Set fast mode for the regular OpenClaw consultation run when its model supports it."
353
+ },
296
354
  "providers": {
297
355
  "type": "object",
298
356
  "additionalProperties": false,
@@ -314,39 +372,60 @@
314
372
  "type": "string",
315
373
  "enum": [
316
374
  "none",
317
- "safe-read-only"
375
+ "safe-read-only",
376
+ "owner"
318
377
  ],
319
- "default": "none"
378
+ "description": "Owner uses the normal agent tool policy only for an exact agent-wechat entry in commands.ownerAllowFrom matching the connected voice peer. Other admitted peers get read-only consultation. Defaults to safe-read-only with session persistence, otherwise none."
320
379
  },
321
380
  "allowConsultSessionPersistence": {
322
381
  "type": "boolean",
323
382
  "default": false,
324
- "description": "Required for safe-read-only consultation: OpenClaw creates a separate per-call agent session which can persist. This adapter does not store transcripts or recordings."
383
+ "description": "Required for consultation. OpenClaw creates separate agent sessions for calls which can persist. This adapter stores no recordings; with consultation.summary it keeps the last few call summaries for each contact."
325
384
  },
326
385
  "consultation": {
327
386
  "type": "object",
328
387
  "additionalProperties": false,
329
388
  "properties": {
330
- "model": {
331
- "type": "string",
332
- "minLength": 1,
333
- "maxLength": 200,
334
- "pattern": "^[^/]+/.+$",
335
- "description": "Agent-consult provider/model override; omitted uses the selected agent's model."
336
- },
337
389
  "timeoutMs": {
338
390
  "type": "integer",
339
391
  "minimum": 1000,
340
392
  "maximum": 120000,
341
393
  "default": 30000
394
+ },
395
+ "inboundSessionKey": {
396
+ "type": "string",
397
+ "pattern": "^agent:[a-z0-9][a-z0-9_-]{0,63}:[^:\\s][^\\s]*$",
398
+ "maxLength": 1024,
399
+ "description": "Optional existing session of the selected agent to fork into a call's session when that session is first created by an admitted incoming call."
400
+ },
401
+ "summary": {
402
+ "type": "boolean",
403
+ "default": true,
404
+ "description": "After an answered call, give the call's transcript to the agent in the call's session and keep its short summary. The summary is also left as a note in your WeChat chat with the caller, and calls placed with the wechat_call tool report it to the session that placed them."
405
+ },
406
+ "recentMessages": {
407
+ "type": "integer",
408
+ "minimum": 0,
409
+ "maximum": 50,
410
+ "default": 10,
411
+ "description": "How many of the latest messages of your WeChat chat with the caller the call's first consultation gets as context; 0 turns this off."
342
412
  }
343
413
  }
344
414
  },
415
+ "sessionScope": {
416
+ "type": "string",
417
+ "enum": [
418
+ "per-contact",
419
+ "per-call"
420
+ ],
421
+ "default": "per-contact",
422
+ "description": "per-contact keeps one session for each contact, so the agent remembers earlier calls with them; per-call starts every call in a new session."
423
+ },
345
424
  "maxDurationSeconds": {
346
425
  "type": "integer",
347
426
  "minimum": 30,
348
427
  "maximum": 3600,
349
- "default": 300
428
+ "default": 3600
350
429
  }
351
430
  }
352
431
  },