typeclaw 0.1.4 → 0.1.6

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 (134) hide show
  1. package/README.md +15 -13
  2. package/auth.schema.json +41 -0
  3. package/cron.schema.json +8 -0
  4. package/package.json +1 -1
  5. package/secrets.schema.json +41 -0
  6. package/src/agent/auth.ts +45 -22
  7. package/src/agent/index.ts +189 -19
  8. package/src/agent/multimodal/index.ts +12 -0
  9. package/src/agent/multimodal/look-at.ts +185 -0
  10. package/src/agent/multimodal/looker.ts +145 -0
  11. package/src/agent/plugin-tools.ts +30 -1
  12. package/src/agent/session-origin.ts +194 -46
  13. package/src/agent/subagents.ts +57 -1
  14. package/src/agent/system-prompt.ts +1 -1
  15. package/src/agent/tool-result-budget.ts +121 -0
  16. package/src/bundled-plugins/backup/index.ts +23 -8
  17. package/src/bundled-plugins/backup/runner.ts +22 -0
  18. package/src/bundled-plugins/memory/README.md +13 -10
  19. package/src/bundled-plugins/memory/append-tool.ts +87 -61
  20. package/src/bundled-plugins/memory/dreaming.ts +137 -7
  21. package/src/bundled-plugins/memory/find-entry-tool.ts +62 -0
  22. package/src/bundled-plugins/memory/fragment-parser.ts +19 -44
  23. package/src/bundled-plugins/memory/index.ts +91 -8
  24. package/src/bundled-plugins/memory/load-memory.ts +74 -34
  25. package/src/bundled-plugins/memory/memory-logger.ts +72 -29
  26. package/src/bundled-plugins/memory/migration.ts +276 -0
  27. package/src/bundled-plugins/memory/stream-events.ts +55 -0
  28. package/src/bundled-plugins/memory/stream-io.ts +63 -0
  29. package/src/bundled-plugins/memory/watermark.ts +48 -8
  30. package/src/bundled-plugins/security/index.ts +103 -10
  31. package/src/bundled-plugins/security/permissions.ts +12 -0
  32. package/src/bundled-plugins/security/policies/git-exfil.ts +51 -18
  33. package/src/bundled-plugins/tool-result-cap/README.md +9 -4
  34. package/src/bundled-plugins/tool-result-cap/cap-jsonl.ts +115 -0
  35. package/src/bundled-plugins/tool-result-cap/cap-result.ts +25 -13
  36. package/src/bundled-plugins/tool-result-cap/index.ts +16 -2
  37. package/src/channels/adapters/discord-bot-classify.ts +2 -6
  38. package/src/channels/adapters/discord-bot.ts +4 -45
  39. package/src/channels/adapters/kakaotalk-classify.ts +3 -7
  40. package/src/channels/adapters/kakaotalk.ts +28 -47
  41. package/src/channels/adapters/slack-bot-classify.ts +2 -6
  42. package/src/channels/adapters/slack-bot.ts +4 -50
  43. package/src/channels/adapters/telegram-bot-classify.ts +8 -10
  44. package/src/channels/adapters/telegram-bot.ts +3 -16
  45. package/src/channels/index.ts +3 -2
  46. package/src/channels/manager.ts +15 -1
  47. package/src/channels/persistence.ts +44 -10
  48. package/src/channels/router.ts +228 -19
  49. package/src/channels/schema.ts +6 -156
  50. package/src/cli/channel.ts +200 -4
  51. package/src/cli/compose-usage.ts +182 -0
  52. package/src/cli/compose.ts +33 -0
  53. package/src/cli/hostd.ts +49 -1
  54. package/src/cli/index.ts +4 -0
  55. package/src/cli/init.ts +809 -300
  56. package/src/cli/model.ts +244 -0
  57. package/src/cli/provider.ts +404 -0
  58. package/src/cli/reload.ts +11 -3
  59. package/src/cli/role.ts +156 -0
  60. package/src/cli/run.ts +3 -1
  61. package/src/cli/tui.ts +13 -3
  62. package/src/cli/usage-args.ts +47 -0
  63. package/src/cli/usage.ts +97 -0
  64. package/src/compose/index.ts +1 -0
  65. package/src/compose/usage.ts +65 -0
  66. package/src/config/config.ts +491 -19
  67. package/src/config/index.ts +15 -1
  68. package/src/config/models-mutation.ts +200 -0
  69. package/src/config/providers-mutation.ts +250 -0
  70. package/src/config/providers.ts +141 -2
  71. package/src/config/reloadable.ts +15 -4
  72. package/src/container/index.ts +6 -1
  73. package/src/container/port.ts +10 -0
  74. package/src/container/require-running.ts +33 -0
  75. package/src/container/start.ts +81 -63
  76. package/src/cron/consumer.ts +22 -2
  77. package/src/cron/index.ts +45 -4
  78. package/src/cron/schema.ts +104 -0
  79. package/src/doctor/checks.ts +51 -34
  80. package/src/doctor/plugin-bridge.ts +28 -4
  81. package/src/git/system-commit.ts +103 -0
  82. package/src/hostd/daemon.ts +16 -0
  83. package/src/hostd/kakao-renewal-manager.ts +223 -0
  84. package/src/hostd/paths.ts +7 -0
  85. package/src/init/dockerfile.ts +36 -10
  86. package/src/init/gitignore.ts +1 -1
  87. package/src/init/index.ts +213 -85
  88. package/src/init/kakaotalk-auth.ts +18 -1
  89. package/src/init/models-dev.ts +26 -1
  90. package/src/init/run-owner-claim.ts +77 -0
  91. package/src/permissions/builtins.ts +70 -0
  92. package/src/permissions/grant.ts +99 -0
  93. package/src/permissions/index.ts +29 -0
  94. package/src/permissions/match-rule.ts +305 -0
  95. package/src/permissions/permissions.ts +196 -0
  96. package/src/permissions/resolve.ts +80 -0
  97. package/src/permissions/schema.ts +79 -0
  98. package/src/plugin/context.ts +8 -4
  99. package/src/plugin/define.ts +2 -0
  100. package/src/plugin/index.ts +2 -0
  101. package/src/plugin/manager.ts +41 -0
  102. package/src/plugin/registry.ts +9 -0
  103. package/src/plugin/types.ts +35 -1
  104. package/src/reload/client.ts +25 -1
  105. package/src/role-claim/client.ts +182 -0
  106. package/src/role-claim/code.ts +53 -0
  107. package/src/role-claim/controller.ts +194 -0
  108. package/src/role-claim/index.ts +19 -0
  109. package/src/role-claim/match-rule.ts +43 -0
  110. package/src/role-claim/pending.ts +100 -0
  111. package/src/run/channel-session-factory.ts +76 -5
  112. package/src/run/index.ts +68 -7
  113. package/src/secrets/encryption.ts +116 -0
  114. package/src/secrets/kakao-renewal.ts +248 -0
  115. package/src/secrets/kakao-store.ts +66 -7
  116. package/src/secrets/keys.ts +173 -0
  117. package/src/secrets/schema.ts +23 -0
  118. package/src/secrets/storage.ts +83 -0
  119. package/src/server/index.ts +198 -71
  120. package/src/shared/index.ts +4 -0
  121. package/src/shared/protocol.ts +27 -0
  122. package/src/skills/typeclaw-channel-kakaotalk/SKILL.md +3 -3
  123. package/src/skills/typeclaw-config/SKILL.md +104 -112
  124. package/src/skills/typeclaw-memory/SKILL.md +9 -9
  125. package/src/skills/typeclaw-permissions/SKILL.md +166 -0
  126. package/src/stream/types.ts +7 -1
  127. package/src/tui/client.ts +66 -5
  128. package/src/tui/index.ts +61 -9
  129. package/src/usage/aggregate.ts +117 -0
  130. package/src/usage/format.ts +30 -0
  131. package/src/usage/index.ts +68 -0
  132. package/src/usage/report.ts +354 -0
  133. package/src/usage/scan.ts +186 -0
  134. package/typeclaw.schema.json +134 -98
@@ -11,19 +11,36 @@
11
11
  "minimum": 1,
12
12
  "maximum": 65535
13
13
  },
14
- "model": {
15
- "default": "openai/gpt-5.4-nano",
16
- "type": "string",
17
- "enum": [
18
- "openai/gpt-5.4-nano",
19
- "openai/gpt-5.4-mini",
20
- "openai/gpt-5.4",
21
- "openai/gpt-5.5",
22
- "openai-codex/gpt-5.4-mini",
23
- "openai-codex/gpt-5.4",
24
- "openai-codex/gpt-5.5",
25
- "fireworks/accounts/fireworks/routers/kimi-k2p6-turbo"
26
- ]
14
+ "models": {
15
+ "default": {
16
+ "default": "openai/gpt-5.4-nano"
17
+ },
18
+ "type": "object",
19
+ "propertyNames": {
20
+ "type": "string",
21
+ "minLength": 1
22
+ },
23
+ "additionalProperties": {
24
+ "type": "string",
25
+ "enum": [
26
+ "openai/gpt-5.4-nano",
27
+ "openai/gpt-5.4-mini",
28
+ "openai/gpt-5.4",
29
+ "openai/gpt-5.5",
30
+ "openai-codex/gpt-5.4-mini",
31
+ "openai-codex/gpt-5.4",
32
+ "openai-codex/gpt-5.5",
33
+ "fireworks/accounts/fireworks/routers/kimi-k2p6-turbo",
34
+ "zai/glm-4.5-air",
35
+ "zai/glm-4.6",
36
+ "zai/glm-4.7",
37
+ "zai-coding/glm-4.5-air",
38
+ "zai-coding/glm-4.7",
39
+ "zai-coding/glm-5",
40
+ "zai-coding/glm-5-turbo",
41
+ "zai-coding/glm-5.1"
42
+ ]
43
+ }
27
44
  },
28
45
  "mounts": {
29
46
  "default": [],
@@ -76,14 +93,6 @@
76
93
  "discord-bot": {
77
94
  "type": "object",
78
95
  "properties": {
79
- "allow": {
80
- "default": [],
81
- "type": "array",
82
- "items": {
83
- "type": "string",
84
- "minLength": 1
85
- }
86
- },
87
96
  "engagement": {
88
97
  "default": {
89
98
  "trigger": [
@@ -225,14 +234,6 @@
225
234
  "kakaotalk": {
226
235
  "type": "object",
227
236
  "properties": {
228
- "allow": {
229
- "default": [],
230
- "type": "array",
231
- "items": {
232
- "type": "string",
233
- "minLength": 1
234
- }
235
- },
236
237
  "engagement": {
237
238
  "default": {
238
239
  "trigger": [
@@ -374,14 +375,6 @@
374
375
  "slack-bot": {
375
376
  "type": "object",
376
377
  "properties": {
377
- "allow": {
378
- "default": [],
379
- "type": "array",
380
- "items": {
381
- "type": "string",
382
- "minLength": 1
383
- }
384
- },
385
378
  "engagement": {
386
379
  "default": {
387
380
  "trigger": [
@@ -523,14 +516,6 @@
523
516
  "telegram-bot": {
524
517
  "type": "object",
525
518
  "properties": {
526
- "allow": {
527
- "default": [],
528
- "type": "array",
529
- "items": {
530
- "type": "string",
531
- "minLength": 1
532
- }
533
- },
534
519
  "engagement": {
535
520
  "default": {
536
521
  "trigger": [
@@ -731,80 +716,131 @@
731
716
  }
732
717
  }
733
718
  },
734
- "dockerfile": {
719
+ "docker": {
735
720
  "default": {
736
- "ffmpeg": false,
737
- "gh": true,
738
- "python": true,
739
- "tmux": true,
740
- "append": []
721
+ "file": {
722
+ "ffmpeg": false,
723
+ "gh": true,
724
+ "python": true,
725
+ "tmux": true,
726
+ "append": []
727
+ }
741
728
  },
742
729
  "type": "object",
743
730
  "properties": {
744
- "ffmpeg": {
745
- "default": false,
746
- "anyOf": [
747
- {
748
- "type": "boolean"
731
+ "file": {
732
+ "default": {
733
+ "ffmpeg": false,
734
+ "gh": true,
735
+ "python": true,
736
+ "tmux": true,
737
+ "append": []
738
+ },
739
+ "type": "object",
740
+ "properties": {
741
+ "ffmpeg": {
742
+ "default": false,
743
+ "anyOf": [
744
+ {
745
+ "type": "boolean"
746
+ },
747
+ {
748
+ "type": "string",
749
+ "minLength": 1
750
+ }
751
+ ]
749
752
  },
750
- {
751
- "type": "string",
752
- "minLength": 1
753
- }
754
- ]
755
- },
756
- "gh": {
757
- "default": true,
758
- "anyOf": [
759
- {
760
- "type": "boolean"
753
+ "gh": {
754
+ "default": true,
755
+ "anyOf": [
756
+ {
757
+ "type": "boolean"
758
+ },
759
+ {
760
+ "type": "string",
761
+ "minLength": 1
762
+ }
763
+ ]
761
764
  },
762
- {
763
- "type": "string",
764
- "minLength": 1
765
- }
766
- ]
767
- },
768
- "python": {
769
- "default": true,
770
- "type": "boolean"
771
- },
772
- "tmux": {
773
- "default": true,
774
- "anyOf": [
775
- {
765
+ "python": {
766
+ "default": true,
776
767
  "type": "boolean"
777
768
  },
778
- {
779
- "type": "string",
780
- "minLength": 1
769
+ "tmux": {
770
+ "default": true,
771
+ "anyOf": [
772
+ {
773
+ "type": "boolean"
774
+ },
775
+ {
776
+ "type": "string",
777
+ "minLength": 1
778
+ }
779
+ ]
780
+ },
781
+ "append": {
782
+ "default": [],
783
+ "type": "array",
784
+ "items": {
785
+ "type": "string"
786
+ }
781
787
  }
782
- ]
783
- },
784
- "append": {
785
- "default": [],
786
- "type": "array",
787
- "items": {
788
- "type": "string"
789
788
  }
790
789
  }
791
790
  }
792
791
  },
793
- "gitignore": {
792
+ "git": {
794
793
  "default": {
795
- "append": []
794
+ "ignore": {
795
+ "append": []
796
+ }
796
797
  },
797
798
  "type": "object",
798
799
  "properties": {
799
- "append": {
800
- "default": [],
801
- "type": "array",
802
- "items": {
803
- "type": "string"
800
+ "ignore": {
801
+ "default": {
802
+ "append": []
803
+ },
804
+ "type": "object",
805
+ "properties": {
806
+ "append": {
807
+ "default": [],
808
+ "type": "array",
809
+ "items": {
810
+ "type": "string"
811
+ }
812
+ }
804
813
  }
805
814
  }
806
815
  }
807
816
  },
817
+ "roles": {
818
+ "type": "object",
819
+ "propertyNames": {
820
+ "type": "string"
821
+ },
822
+ "additionalProperties": {
823
+ "type": "object",
824
+ "properties": {
825
+ "match": {
826
+ "type": "array",
827
+ "items": {
828
+ "type": "string",
829
+ "pattern": "^(tui|cron|subagent(:[a-z][a-z0-9-]*)?|\\*|(slack|discord|telegram|kakao):[^\\s]+)(\\s+[a-zA-Z][a-zA-Z0-9_]*:[^\\s]+)*$"
830
+ }
831
+ },
832
+ "permissions": {
833
+ "type": "array",
834
+ "items": {
835
+ "type": "string",
836
+ "minLength": 1,
837
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-zA-Z0-9]*)+$"
838
+ }
839
+ }
840
+ },
841
+ "additionalProperties": false
842
+ }
843
+ },
808
844
  "tool-result-cap": {
809
845
  "default": {
810
846
  "enabled": true,