typeclaw 0.1.5 → 0.2.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 (128) hide show
  1. package/README.md +14 -12
  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 +7 -4
  19. package/src/bundled-plugins/memory/append-tool.ts +87 -61
  20. package/src/bundled-plugins/memory/dreaming.ts +23 -9
  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 +799 -319
  56. package/src/cli/model.ts +244 -0
  57. package/src/cli/provider.ts +404 -0
  58. package/src/cli/reload.ts +6 -1
  59. package/src/cli/role.ts +156 -0
  60. package/src/cli/run.ts +3 -1
  61. package/src/cli/tui.ts +8 -1
  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 +385 -12
  67. package/src/config/index.ts +7 -0
  68. package/src/config/models-mutation.ts +209 -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 +5 -0
  73. package/src/container/require-running.ts +33 -0
  74. package/src/container/start.ts +39 -58
  75. package/src/cron/consumer.ts +22 -2
  76. package/src/cron/index.ts +45 -4
  77. package/src/cron/schema.ts +104 -0
  78. package/src/doctor/checks.ts +50 -33
  79. package/src/git/system-commit.ts +103 -0
  80. package/src/hostd/daemon.ts +16 -0
  81. package/src/hostd/kakao-renewal-manager.ts +223 -0
  82. package/src/hostd/paths.ts +7 -0
  83. package/src/init/dockerfile.ts +32 -6
  84. package/src/init/index.ts +190 -61
  85. package/src/init/kakaotalk-auth.ts +18 -1
  86. package/src/init/models-dev.ts +26 -1
  87. package/src/init/run-owner-claim.ts +77 -0
  88. package/src/permissions/builtins.ts +70 -0
  89. package/src/permissions/grant.ts +99 -0
  90. package/src/permissions/index.ts +29 -0
  91. package/src/permissions/match-rule.ts +305 -0
  92. package/src/permissions/permissions.ts +196 -0
  93. package/src/permissions/resolve.ts +80 -0
  94. package/src/permissions/schema.ts +79 -0
  95. package/src/plugin/context.ts +8 -4
  96. package/src/plugin/define.ts +2 -0
  97. package/src/plugin/index.ts +2 -0
  98. package/src/plugin/manager.ts +41 -0
  99. package/src/plugin/registry.ts +9 -0
  100. package/src/plugin/types.ts +35 -1
  101. package/src/role-claim/client.ts +182 -0
  102. package/src/role-claim/code.ts +53 -0
  103. package/src/role-claim/controller.ts +194 -0
  104. package/src/role-claim/index.ts +19 -0
  105. package/src/role-claim/match-rule.ts +43 -0
  106. package/src/role-claim/pending.ts +100 -0
  107. package/src/run/channel-session-factory.ts +76 -5
  108. package/src/run/index.ts +55 -6
  109. package/src/secrets/encryption.ts +116 -0
  110. package/src/secrets/kakao-renewal.ts +248 -0
  111. package/src/secrets/kakao-store.ts +66 -7
  112. package/src/secrets/keys.ts +173 -0
  113. package/src/secrets/schema.ts +23 -0
  114. package/src/secrets/storage.ts +68 -0
  115. package/src/server/index.ts +122 -11
  116. package/src/shared/index.ts +4 -0
  117. package/src/shared/protocol.ts +27 -0
  118. package/src/skills/typeclaw-channel-kakaotalk/SKILL.md +3 -3
  119. package/src/skills/typeclaw-config/SKILL.md +38 -64
  120. package/src/skills/typeclaw-memory/SKILL.md +1 -1
  121. package/src/skills/typeclaw-permissions/SKILL.md +166 -0
  122. package/src/stream/types.ts +7 -1
  123. package/src/usage/aggregate.ts +117 -0
  124. package/src/usage/format.ts +30 -0
  125. package/src/usage/index.ts +68 -0
  126. package/src/usage/report.ts +354 -0
  127. package/src/usage/scan.ts +186 -0
  128. package/typeclaw.schema.json +57 -45
@@ -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": [
@@ -829,6 +814,33 @@
829
814
  }
830
815
  }
831
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
+ },
832
844
  "tool-result-cap": {
833
845
  "default": {
834
846
  "enabled": true,