typeclaw 0.39.2 → 0.39.4

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 (102) hide show
  1. package/auth.schema.json +110 -0
  2. package/package.json +2 -2
  3. package/secrets.schema.json +110 -0
  4. package/src/agent/index.ts +39 -18
  5. package/src/agent/model-fallback.ts +13 -4
  6. package/src/agent/plugin-tools.ts +12 -12
  7. package/src/agent/provider-error.ts +36 -1
  8. package/src/agent/session-origin.ts +2 -0
  9. package/src/agent/subagents.ts +29 -2
  10. package/src/agent/throttle-circuit.ts +50 -0
  11. package/src/agent/todo/store.ts +21 -1
  12. package/src/agent/tools/channel-reply.ts +18 -5
  13. package/src/agent/tools/channel-send.ts +13 -2
  14. package/src/agent/turn-runner.ts +162 -0
  15. package/src/bundled-plugins/doc-render/render.ts +2 -2
  16. package/src/bundled-plugins/github-cli-auth/approve-idempotency.ts +40 -18
  17. package/src/bundled-plugins/memory/README.md +12 -12
  18. package/src/bundled-plugins/memory/append-tool.ts +58 -6
  19. package/src/bundled-plugins/memory/dreaming.ts +1 -1
  20. package/src/bundled-plugins/memory/fragment-parser.ts +10 -3
  21. package/src/bundled-plugins/memory/load-memory.ts +28 -2
  22. package/src/bundled-plugins/memory/memory-logger.ts +14 -2
  23. package/src/bundled-plugins/memory/search-tool.ts +50 -7
  24. package/src/bundled-plugins/memory/stream-events.ts +23 -0
  25. package/src/bundled-plugins/memory/vector/hybrid.ts +9 -2
  26. package/src/bundled-plugins/security/index.ts +24 -1
  27. package/src/bundled-plugins/security/policies/cron-promotion.ts +94 -62
  28. package/src/bundled-plugins/security/policies/plugin-addition.ts +2 -4
  29. package/src/bundled-plugins/security/policies/role-promotion.ts +2 -4
  30. package/src/channels/adapters/discord-author-resolver.ts +52 -0
  31. package/src/channels/adapters/discord-bot.ts +1 -1
  32. package/src/channels/adapters/discord-channel-resolver.ts +44 -0
  33. package/src/channels/adapters/discord-classify.ts +121 -0
  34. package/src/channels/adapters/discord-reactions.ts +138 -0
  35. package/src/channels/adapters/discord.ts +416 -0
  36. package/src/channels/adapters/github/outbound.ts +23 -4
  37. package/src/channels/adapters/kakaotalk.ts +8 -1
  38. package/src/channels/adapters/line.ts +1 -1
  39. package/src/channels/adapters/slack-author-resolver.ts +54 -0
  40. package/src/channels/adapters/slack-bot.ts +3 -1
  41. package/src/channels/adapters/slack-channel-resolver.ts +49 -0
  42. package/src/channels/adapters/slack-classify.ts +83 -0
  43. package/src/channels/adapters/slack-reactions.ts +126 -0
  44. package/src/channels/adapters/slack.ts +416 -0
  45. package/src/channels/adapters/telegram-bot.ts +2 -1
  46. package/src/channels/adapters/webex-bot.ts +31 -27
  47. package/src/channels/adapters/webex-prefetch-limiter.ts +120 -0
  48. package/src/channels/adapters/webex.ts +81 -31
  49. package/src/channels/github-review-turn-ledger.ts +32 -0
  50. package/src/channels/github-verdict-activity.ts +60 -0
  51. package/src/channels/index.ts +6 -0
  52. package/src/channels/manager.ts +168 -37
  53. package/src/channels/pr-verdict-activity-bridge.ts +43 -0
  54. package/src/channels/router.ts +295 -13
  55. package/src/channels/schema.ts +4 -0
  56. package/src/channels/types.ts +25 -2
  57. package/src/cli/builtins.ts +6 -31
  58. package/src/cli/channel.ts +170 -18
  59. package/src/cli/command-meta.ts +93 -0
  60. package/src/cli/help.ts +24 -0
  61. package/src/cli/index.ts +45 -10
  62. package/src/cli/init.ts +2 -0
  63. package/src/cli/update-check.ts +14 -0
  64. package/src/cli/update-notify.ts +91 -0
  65. package/src/cli/update-suppression.ts +19 -0
  66. package/src/config/channels-mutation.ts +3 -1
  67. package/src/config/config.ts +78 -1
  68. package/src/config/index.ts +1 -0
  69. package/src/container/start.ts +52 -8
  70. package/src/doctor/channel-checks.ts +57 -3
  71. package/src/hostd/daemon.ts +77 -31
  72. package/src/hostd/index.ts +11 -1
  73. package/src/hostd/paths.ts +4 -0
  74. package/src/hostd/protocol.ts +15 -2
  75. package/src/hostd/spawn.ts +53 -19
  76. package/src/init/cli-version.ts +1 -1
  77. package/src/init/discord-auth.ts +50 -0
  78. package/src/init/index.ts +94 -4
  79. package/src/init/reconcile-plugin-deps.ts +30 -5
  80. package/src/init/run-owner-claim.ts +2 -0
  81. package/src/init/slack-auth.ts +51 -0
  82. package/src/mcp/manager.ts +94 -7
  83. package/src/mcp/tools.ts +7 -4
  84. package/src/permissions/permissions.ts +12 -0
  85. package/src/permissions/resolve.ts +2 -0
  86. package/src/role-claim/match-rule.ts +2 -0
  87. package/src/run/codex-fetch-observer.ts +11 -6
  88. package/src/run/index.ts +74 -29
  89. package/src/secrets/discord-store.ts +96 -0
  90. package/src/secrets/oauth-xai.ts +2 -2
  91. package/src/secrets/schema.ts +34 -0
  92. package/src/secrets/slack-store.ts +96 -0
  93. package/src/server/command-runner.ts +21 -0
  94. package/src/server/index.ts +27 -2
  95. package/src/skills/typeclaw-channels/SKILL.md +1 -1
  96. package/src/skills/typeclaw-config/SKILL.md +1 -0
  97. package/src/skills/typeclaw-cron/SKILL.md +20 -4
  98. package/src/skills/typeclaw-permissions/SKILL.md +18 -6
  99. package/src/tui/format.ts +0 -19
  100. package/src/tui/index.ts +2 -8
  101. package/src/update/check.ts +192 -0
  102. package/typeclaw.schema.json +332 -0
@@ -469,10 +469,182 @@
469
469
  }
470
470
  }
471
471
  },
472
+ "updateCheck": {
473
+ "default": {
474
+ "enabled": true
475
+ },
476
+ "type": "object",
477
+ "properties": {
478
+ "enabled": {
479
+ "default": true,
480
+ "type": "boolean"
481
+ }
482
+ }
483
+ },
472
484
  "channels": {
473
485
  "default": {},
474
486
  "type": "object",
475
487
  "properties": {
488
+ "discord": {
489
+ "type": "object",
490
+ "properties": {
491
+ "engagement": {
492
+ "default": {
493
+ "trigger": [
494
+ "mention",
495
+ "reply",
496
+ "dm"
497
+ ],
498
+ "stickiness": {
499
+ "perReply": {
500
+ "window": 900000
501
+ }
502
+ }
503
+ },
504
+ "type": "object",
505
+ "properties": {
506
+ "trigger": {
507
+ "default": [
508
+ "mention",
509
+ "reply",
510
+ "dm"
511
+ ],
512
+ "type": "array",
513
+ "items": {
514
+ "type": "string",
515
+ "enum": [
516
+ "mention",
517
+ "reply",
518
+ "dm"
519
+ ]
520
+ }
521
+ },
522
+ "stickiness": {
523
+ "default": {
524
+ "perReply": {
525
+ "window": 900000
526
+ }
527
+ },
528
+ "anyOf": [
529
+ {
530
+ "type": "string",
531
+ "const": "off"
532
+ },
533
+ {
534
+ "type": "object",
535
+ "properties": {
536
+ "perReply": {
537
+ "type": "object",
538
+ "properties": {
539
+ "window": {
540
+ "type": "integer",
541
+ "minimum": 1,
542
+ "maximum": 86400000
543
+ }
544
+ },
545
+ "required": [
546
+ "window"
547
+ ]
548
+ }
549
+ },
550
+ "required": [
551
+ "perReply"
552
+ ]
553
+ }
554
+ ]
555
+ }
556
+ }
557
+ },
558
+ "history": {
559
+ "default": {
560
+ "prefetch": {
561
+ "thread": {
562
+ "head": 3,
563
+ "tail": 10
564
+ },
565
+ "channel": {
566
+ "tail": 10
567
+ }
568
+ }
569
+ },
570
+ "type": "object",
571
+ "properties": {
572
+ "prefetch": {
573
+ "default": {
574
+ "thread": {
575
+ "head": 3,
576
+ "tail": 10
577
+ },
578
+ "channel": {
579
+ "tail": 10
580
+ }
581
+ },
582
+ "type": "object",
583
+ "properties": {
584
+ "thread": {
585
+ "default": {
586
+ "head": 3,
587
+ "tail": 10
588
+ },
589
+ "type": "object",
590
+ "properties": {
591
+ "head": {
592
+ "default": 3,
593
+ "type": "integer",
594
+ "minimum": 0,
595
+ "maximum": 200
596
+ },
597
+ "tail": {
598
+ "default": 10,
599
+ "type": "integer",
600
+ "minimum": 0,
601
+ "maximum": 200
602
+ }
603
+ }
604
+ },
605
+ "channel": {
606
+ "default": {
607
+ "tail": 10
608
+ },
609
+ "type": "object",
610
+ "properties": {
611
+ "tail": {
612
+ "default": 10,
613
+ "type": "integer",
614
+ "minimum": 0,
615
+ "maximum": 200
616
+ }
617
+ }
618
+ }
619
+ }
620
+ }
621
+ }
622
+ },
623
+ "enabled": {
624
+ "default": true,
625
+ "type": "boolean"
626
+ },
627
+ "quotedReply": {
628
+ "default": {
629
+ "enabled": true,
630
+ "queueDelayMs": 10000
631
+ },
632
+ "type": "object",
633
+ "properties": {
634
+ "enabled": {
635
+ "default": true,
636
+ "type": "boolean"
637
+ },
638
+ "queueDelayMs": {
639
+ "default": 10000,
640
+ "type": "integer",
641
+ "minimum": 0,
642
+ "maximum": 9007199254740991
643
+ }
644
+ }
645
+ }
646
+ }
647
+ },
476
648
  "discord-bot": {
477
649
  "type": "object",
478
650
  "properties": {
@@ -1171,6 +1343,166 @@
1171
1343
  }
1172
1344
  }
1173
1345
  },
1346
+ "slack": {
1347
+ "type": "object",
1348
+ "properties": {
1349
+ "engagement": {
1350
+ "default": {
1351
+ "trigger": [
1352
+ "mention",
1353
+ "reply",
1354
+ "dm"
1355
+ ],
1356
+ "stickiness": {
1357
+ "perReply": {
1358
+ "window": 900000
1359
+ }
1360
+ }
1361
+ },
1362
+ "type": "object",
1363
+ "properties": {
1364
+ "trigger": {
1365
+ "default": [
1366
+ "mention",
1367
+ "reply",
1368
+ "dm"
1369
+ ],
1370
+ "type": "array",
1371
+ "items": {
1372
+ "type": "string",
1373
+ "enum": [
1374
+ "mention",
1375
+ "reply",
1376
+ "dm"
1377
+ ]
1378
+ }
1379
+ },
1380
+ "stickiness": {
1381
+ "default": {
1382
+ "perReply": {
1383
+ "window": 900000
1384
+ }
1385
+ },
1386
+ "anyOf": [
1387
+ {
1388
+ "type": "string",
1389
+ "const": "off"
1390
+ },
1391
+ {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "perReply": {
1395
+ "type": "object",
1396
+ "properties": {
1397
+ "window": {
1398
+ "type": "integer",
1399
+ "minimum": 1,
1400
+ "maximum": 86400000
1401
+ }
1402
+ },
1403
+ "required": [
1404
+ "window"
1405
+ ]
1406
+ }
1407
+ },
1408
+ "required": [
1409
+ "perReply"
1410
+ ]
1411
+ }
1412
+ ]
1413
+ }
1414
+ }
1415
+ },
1416
+ "history": {
1417
+ "default": {
1418
+ "prefetch": {
1419
+ "thread": {
1420
+ "head": 3,
1421
+ "tail": 10
1422
+ },
1423
+ "channel": {
1424
+ "tail": 10
1425
+ }
1426
+ }
1427
+ },
1428
+ "type": "object",
1429
+ "properties": {
1430
+ "prefetch": {
1431
+ "default": {
1432
+ "thread": {
1433
+ "head": 3,
1434
+ "tail": 10
1435
+ },
1436
+ "channel": {
1437
+ "tail": 10
1438
+ }
1439
+ },
1440
+ "type": "object",
1441
+ "properties": {
1442
+ "thread": {
1443
+ "default": {
1444
+ "head": 3,
1445
+ "tail": 10
1446
+ },
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "head": {
1450
+ "default": 3,
1451
+ "type": "integer",
1452
+ "minimum": 0,
1453
+ "maximum": 200
1454
+ },
1455
+ "tail": {
1456
+ "default": 10,
1457
+ "type": "integer",
1458
+ "minimum": 0,
1459
+ "maximum": 200
1460
+ }
1461
+ }
1462
+ },
1463
+ "channel": {
1464
+ "default": {
1465
+ "tail": 10
1466
+ },
1467
+ "type": "object",
1468
+ "properties": {
1469
+ "tail": {
1470
+ "default": 10,
1471
+ "type": "integer",
1472
+ "minimum": 0,
1473
+ "maximum": 200
1474
+ }
1475
+ }
1476
+ }
1477
+ }
1478
+ }
1479
+ }
1480
+ },
1481
+ "enabled": {
1482
+ "default": true,
1483
+ "type": "boolean"
1484
+ },
1485
+ "quotedReply": {
1486
+ "default": {
1487
+ "enabled": true,
1488
+ "queueDelayMs": 10000
1489
+ },
1490
+ "type": "object",
1491
+ "properties": {
1492
+ "enabled": {
1493
+ "default": true,
1494
+ "type": "boolean"
1495
+ },
1496
+ "queueDelayMs": {
1497
+ "default": 10000,
1498
+ "type": "integer",
1499
+ "minimum": 0,
1500
+ "maximum": 9007199254740991
1501
+ }
1502
+ }
1503
+ }
1504
+ }
1505
+ },
1174
1506
  "slack-bot": {
1175
1507
  "type": "object",
1176
1508
  "properties": {