@vetala/vetala 0.1.0-beta

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 (271) hide show
  1. package/CONTRIBUTING.md +77 -0
  2. package/LICENSE +184 -0
  3. package/README.md +136 -0
  4. package/THIRD_PARTY_LICENSES.md +17 -0
  5. package/dist/src/agent.d.ts +30 -0
  6. package/dist/src/agent.js +216 -0
  7. package/dist/src/agent.js.map +1 -0
  8. package/dist/src/approvals.d.ts +18 -0
  9. package/dist/src/approvals.js +81 -0
  10. package/dist/src/approvals.js.map +1 -0
  11. package/dist/src/cli.d.ts +2 -0
  12. package/dist/src/cli.js +87 -0
  13. package/dist/src/cli.js.map +1 -0
  14. package/dist/src/config.d.ts +12 -0
  15. package/dist/src/config.js +183 -0
  16. package/dist/src/config.js.map +1 -0
  17. package/dist/src/context-memory.d.ts +7 -0
  18. package/dist/src/context-memory.js +96 -0
  19. package/dist/src/context-memory.js.map +1 -0
  20. package/dist/src/ink/command-suggestions.d.ts +7 -0
  21. package/dist/src/ink/command-suggestions.js +179 -0
  22. package/dist/src/ink/command-suggestions.js.map +1 -0
  23. package/dist/src/ink/ink-terminal-ui.d.ts +36 -0
  24. package/dist/src/ink/ink-terminal-ui.js +79 -0
  25. package/dist/src/ink/ink-terminal-ui.js.map +1 -0
  26. package/dist/src/ink/repl-app.d.ts +9 -0
  27. package/dist/src/ink/repl-app.js +789 -0
  28. package/dist/src/ink/repl-app.js.map +1 -0
  29. package/dist/src/ink/transcript-cards.d.ts +6 -0
  30. package/dist/src/ink/transcript-cards.js +24 -0
  31. package/dist/src/ink/transcript-cards.js.map +1 -0
  32. package/dist/src/path-policy.d.ts +11 -0
  33. package/dist/src/path-policy.js +67 -0
  34. package/dist/src/path-policy.js.map +1 -0
  35. package/dist/src/process-utils.d.ts +13 -0
  36. package/dist/src/process-utils.js +52 -0
  37. package/dist/src/process-utils.js.map +1 -0
  38. package/dist/src/repl.d.ts +9 -0
  39. package/dist/src/repl.js +13 -0
  40. package/dist/src/repl.js.map +1 -0
  41. package/dist/src/sarvam/client.d.ts +15 -0
  42. package/dist/src/sarvam/client.js +208 -0
  43. package/dist/src/sarvam/client.js.map +1 -0
  44. package/dist/src/sarvam/models.d.ts +2 -0
  45. package/dist/src/sarvam/models.js +7 -0
  46. package/dist/src/sarvam/models.js.map +1 -0
  47. package/dist/src/search-provider.d.ts +6 -0
  48. package/dist/src/search-provider.js +8 -0
  49. package/dist/src/search-provider.js.map +1 -0
  50. package/dist/src/session-store.d.ts +19 -0
  51. package/dist/src/session-store.js +318 -0
  52. package/dist/src/session-store.js.map +1 -0
  53. package/dist/src/skills/runtime.d.ts +26 -0
  54. package/dist/src/skills/runtime.js +317 -0
  55. package/dist/src/skills/runtime.js.map +1 -0
  56. package/dist/src/skills/types.d.ts +25 -0
  57. package/dist/src/skills/types.js +2 -0
  58. package/dist/src/skills/types.js.map +1 -0
  59. package/dist/src/terminal-ui.d.ts +29 -0
  60. package/dist/src/terminal-ui.js +236 -0
  61. package/dist/src/terminal-ui.js.map +1 -0
  62. package/dist/src/tools/filesystem.d.ts +2 -0
  63. package/dist/src/tools/filesystem.js +622 -0
  64. package/dist/src/tools/filesystem.js.map +1 -0
  65. package/dist/src/tools/git.d.ts +2 -0
  66. package/dist/src/tools/git.js +326 -0
  67. package/dist/src/tools/git.js.map +1 -0
  68. package/dist/src/tools/index.d.ts +6 -0
  69. package/dist/src/tools/index.js +21 -0
  70. package/dist/src/tools/index.js.map +1 -0
  71. package/dist/src/tools/registry.d.ts +15 -0
  72. package/dist/src/tools/registry.js +59 -0
  73. package/dist/src/tools/registry.js.map +1 -0
  74. package/dist/src/tools/shell.d.ts +2 -0
  75. package/dist/src/tools/shell.js +97 -0
  76. package/dist/src/tools/shell.js.map +1 -0
  77. package/dist/src/tools/skill.d.ts +3 -0
  78. package/dist/src/tools/skill.js +130 -0
  79. package/dist/src/tools/skill.js.map +1 -0
  80. package/dist/src/tools/web.d.ts +3 -0
  81. package/dist/src/tools/web.js +144 -0
  82. package/dist/src/tools/web.js.map +1 -0
  83. package/dist/src/types.d.ts +236 -0
  84. package/dist/src/types.js +2 -0
  85. package/dist/src/types.js.map +1 -0
  86. package/dist/src/workspace-trust.d.ts +3 -0
  87. package/dist/src/workspace-trust.js +31 -0
  88. package/dist/src/workspace-trust.js.map +1 -0
  89. package/dist/src/xdg.d.ts +9 -0
  90. package/dist/src/xdg.js +77 -0
  91. package/dist/src/xdg.js.map +1 -0
  92. package/package.json +57 -0
  93. package/skill/agents-md-generator/SKILL.md +75 -0
  94. package/skill/agents-md-generator/references/agents_md_template.md +160 -0
  95. package/skill/agents-md-generator/references/loc_measurement.md +67 -0
  96. package/skill/agents-md-generator/references/monorepo_detection.md +78 -0
  97. package/skill/agents-md-generator/references/monorepo_strategy.md +60 -0
  98. package/skill/agents-md-generator/references/read_only_commands.md +151 -0
  99. package/skill/agents-md-generator/references/update_strategy.md +160 -0
  100. package/skill/agents-md-generator/references/working_agreements.md +53 -0
  101. package/skill/biz-opportunity-scout/SKILL.md +53 -0
  102. package/skill/biz-opportunity-scout/references/competitive_analysis.md +84 -0
  103. package/skill/biz-opportunity-scout/references/market_sizing.md +68 -0
  104. package/skill/biz-opportunity-scout/references/pmf_indicators.md +94 -0
  105. package/skill/biz-opportunity-scout/references/report_template.md +243 -0
  106. package/skill/biz-opportunity-scout/references/unit_economics.md +97 -0
  107. package/skill/code-review/SKILL.md +86 -0
  108. package/skill/code-review/references/change_analysis.md +116 -0
  109. package/skill/code-review/references/git_operations.md +115 -0
  110. package/skill/code-review/references/impact_detection.md +149 -0
  111. package/skill/code-review/references/output_format.md +137 -0
  112. package/skill/code-review/references/severity_criteria.md +100 -0
  113. package/skill/code-security-audit/SKILL.md +123 -0
  114. package/skill/code-security-audit/references/audit_process.md +277 -0
  115. package/skill/code-security-audit/references/remediation_patterns.md +599 -0
  116. package/skill/code-security-audit/references/report_format.md +391 -0
  117. package/skill/code-security-audit/references/security_domains.md +830 -0
  118. package/skill/code-security-audit/references/vulnerability_patterns.md +813 -0
  119. package/skill/composition-patterns/SKILL.md +83 -0
  120. package/skill/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  121. package/skill/composition-patterns/rules/architecture-compound-components.md +112 -0
  122. package/skill/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  123. package/skill/composition-patterns/rules/patterns-explicit-variants.md +100 -0
  124. package/skill/composition-patterns/rules/react19-no-forwardref.md +42 -0
  125. package/skill/composition-patterns/rules/state-context-interface.md +191 -0
  126. package/skill/composition-patterns/rules/state-decouple-implementation.md +113 -0
  127. package/skill/composition-patterns/rules/state-lift-state.md +125 -0
  128. package/skill/deploy-to-vercel/SKILL.md +293 -0
  129. package/skill/deploy-to-vercel/resources/deploy-sandbox.sh +301 -0
  130. package/skill/deploy-to-vercel/resources/deploy.sh +301 -0
  131. package/skill/doc/SKILL_GUIDELINES.md +138 -0
  132. package/skill/git-workflow/SKILL.md +94 -0
  133. package/skill/git-workflow/references/advanced-git.md +632 -0
  134. package/skill/git-workflow/references/branching-strategies.md +344 -0
  135. package/skill/git-workflow/references/ci-cd-integration.md +683 -0
  136. package/skill/git-workflow/references/code-quality-tools.md +351 -0
  137. package/skill/git-workflow/references/commit-conventions.md +439 -0
  138. package/skill/git-workflow/references/github-releases.md +288 -0
  139. package/skill/git-workflow/references/pull-request-workflow.md +773 -0
  140. package/skill/git-workflow/scripts/verify-git-workflow.sh +263 -0
  141. package/skill/jetbrains-vmoptions/SKILL.md +51 -0
  142. package/skill/jetbrains-vmoptions/references/common-options.md +357 -0
  143. package/skill/jetbrains-vmoptions/references/gc-options.md +350 -0
  144. package/skill/jetbrains-vmoptions/references/memory-options.md +339 -0
  145. package/skill/jetbrains-vmoptions/references/prerequisite-check.md +65 -0
  146. package/skill/kysely-converter/SKILL.md +62 -0
  147. package/skill/kysely-converter/references/delete.md +323 -0
  148. package/skill/kysely-converter/references/insert.md +386 -0
  149. package/skill/kysely-converter/references/operators.md +331 -0
  150. package/skill/kysely-converter/references/select.md +1000 -0
  151. package/skill/kysely-converter/references/update.md +349 -0
  152. package/skill/kysely-converter/references/window_function.md +537 -0
  153. package/skill/react-best-practices/SKILL.md +131 -0
  154. package/skill/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  155. package/skill/react-best-practices/rules/advanced-init-once.md +42 -0
  156. package/skill/react-best-practices/rules/advanced-use-latest.md +39 -0
  157. package/skill/react-best-practices/rules/async-api-routes.md +38 -0
  158. package/skill/react-best-practices/rules/async-defer-await.md +80 -0
  159. package/skill/react-best-practices/rules/async-dependencies.md +51 -0
  160. package/skill/react-best-practices/rules/async-parallel.md +28 -0
  161. package/skill/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  162. package/skill/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  163. package/skill/react-best-practices/rules/bundle-conditional.md +31 -0
  164. package/skill/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  165. package/skill/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  166. package/skill/react-best-practices/rules/bundle-preload.md +50 -0
  167. package/skill/react-best-practices/rules/client-event-listeners.md +74 -0
  168. package/skill/react-best-practices/rules/client-localstorage-schema.md +71 -0
  169. package/skill/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  170. package/skill/react-best-practices/rules/client-swr-dedup.md +56 -0
  171. package/skill/react-best-practices/rules/js-batch-dom-css.md +107 -0
  172. package/skill/react-best-practices/rules/js-cache-function-results.md +80 -0
  173. package/skill/react-best-practices/rules/js-cache-property-access.md +28 -0
  174. package/skill/react-best-practices/rules/js-cache-storage.md +70 -0
  175. package/skill/react-best-practices/rules/js-combine-iterations.md +32 -0
  176. package/skill/react-best-practices/rules/js-early-exit.md +50 -0
  177. package/skill/react-best-practices/rules/js-hoist-regexp.md +45 -0
  178. package/skill/react-best-practices/rules/js-index-maps.md +37 -0
  179. package/skill/react-best-practices/rules/js-length-check-first.md +49 -0
  180. package/skill/react-best-practices/rules/js-min-max-loop.md +82 -0
  181. package/skill/react-best-practices/rules/js-set-map-lookups.md +24 -0
  182. package/skill/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  183. package/skill/react-best-practices/rules/rendering-activity.md +26 -0
  184. package/skill/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  185. package/skill/react-best-practices/rules/rendering-conditional-render.md +40 -0
  186. package/skill/react-best-practices/rules/rendering-content-visibility.md +38 -0
  187. package/skill/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  188. package/skill/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  189. package/skill/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  190. package/skill/react-best-practices/rules/rendering-svg-precision.md +28 -0
  191. package/skill/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  192. package/skill/react-best-practices/rules/rerender-defer-reads.md +39 -0
  193. package/skill/react-best-practices/rules/rerender-dependencies.md +45 -0
  194. package/skill/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  195. package/skill/react-best-practices/rules/rerender-derived-state.md +29 -0
  196. package/skill/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  197. package/skill/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  198. package/skill/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  199. package/skill/react-best-practices/rules/rerender-memo.md +44 -0
  200. package/skill/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  201. package/skill/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  202. package/skill/react-best-practices/rules/rerender-transitions.md +40 -0
  203. package/skill/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  204. package/skill/react-best-practices/rules/server-after-nonblocking.md +73 -0
  205. package/skill/react-best-practices/rules/server-auth-actions.md +96 -0
  206. package/skill/react-best-practices/rules/server-cache-lru.md +41 -0
  207. package/skill/react-best-practices/rules/server-cache-react.md +76 -0
  208. package/skill/react-best-practices/rules/server-dedup-props.md +65 -0
  209. package/skill/react-best-practices/rules/server-hoist-static-io.md +142 -0
  210. package/skill/react-best-practices/rules/server-parallel-fetching.md +83 -0
  211. package/skill/react-best-practices/rules/server-serialization.md +38 -0
  212. package/skill/react-native-skills/SKILL.md +115 -0
  213. package/skill/react-native-skills/rules/animation-derived-value.md +53 -0
  214. package/skill/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  215. package/skill/react-native-skills/rules/animation-gpu-properties.md +65 -0
  216. package/skill/react-native-skills/rules/design-system-compound-components.md +66 -0
  217. package/skill/react-native-skills/rules/fonts-config-plugin.md +71 -0
  218. package/skill/react-native-skills/rules/imports-design-system-folder.md +68 -0
  219. package/skill/react-native-skills/rules/js-hoist-intl.md +61 -0
  220. package/skill/react-native-skills/rules/list-performance-callbacks.md +44 -0
  221. package/skill/react-native-skills/rules/list-performance-function-references.md +132 -0
  222. package/skill/react-native-skills/rules/list-performance-images.md +53 -0
  223. package/skill/react-native-skills/rules/list-performance-inline-objects.md +97 -0
  224. package/skill/react-native-skills/rules/list-performance-item-expensive.md +94 -0
  225. package/skill/react-native-skills/rules/list-performance-item-memo.md +82 -0
  226. package/skill/react-native-skills/rules/list-performance-item-types.md +104 -0
  227. package/skill/react-native-skills/rules/list-performance-virtualize.md +67 -0
  228. package/skill/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  229. package/skill/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  230. package/skill/react-native-skills/rules/navigation-native-navigators.md +188 -0
  231. package/skill/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  232. package/skill/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  233. package/skill/react-native-skills/rules/react-state-dispatcher.md +91 -0
  234. package/skill/react-native-skills/rules/react-state-fallback.md +56 -0
  235. package/skill/react-native-skills/rules/react-state-minimize.md +65 -0
  236. package/skill/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  237. package/skill/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  238. package/skill/react-native-skills/rules/scroll-position-no-state.md +82 -0
  239. package/skill/react-native-skills/rules/state-ground-truth.md +80 -0
  240. package/skill/react-native-skills/rules/ui-expo-image.md +66 -0
  241. package/skill/react-native-skills/rules/ui-image-gallery.md +104 -0
  242. package/skill/react-native-skills/rules/ui-measure-views.md +78 -0
  243. package/skill/react-native-skills/rules/ui-menus.md +174 -0
  244. package/skill/react-native-skills/rules/ui-native-modals.md +77 -0
  245. package/skill/react-native-skills/rules/ui-pressable.md +61 -0
  246. package/skill/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  247. package/skill/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  248. package/skill/react-native-skills/rules/ui-styling.md +87 -0
  249. package/skill/react-vite-guide/SKILL.md +101 -0
  250. package/skill/react-vite-guide/references/composition-patterns.md +709 -0
  251. package/skill/react-vite-guide/references/performance-optimization.md +1222 -0
  252. package/skill/react-vite-guide/references/vite-specific.md +385 -0
  253. package/skill/react-vite-guide/references/web-interface.md +146 -0
  254. package/skill/skill-maker/SKILL.md +52 -0
  255. package/skill/skill-maker/references/content_spec.md +67 -0
  256. package/skill/skill-maker/references/frontmatter_spec.md +96 -0
  257. package/skill/skill-maker/references/input_validation.md +90 -0
  258. package/skill/skill-maker/references/skill_structure.md +74 -0
  259. package/skill/system-prompt-creator/SKILL.md +50 -0
  260. package/skill/system-prompt-creator/references/data_format_selection.md +135 -0
  261. package/skill/system-prompt-creator/references/multi_prompt_architecture.md +386 -0
  262. package/skill/system-prompt-creator/references/prompt_structure.md +140 -0
  263. package/skill/system-prompt-creator/references/quality_criteria.md +83 -0
  264. package/skill/typst-creator/SKILL.md +51 -0
  265. package/skill/typst-creator/references/layout.md +401 -0
  266. package/skill/typst-creator/references/math.md +297 -0
  267. package/skill/typst-creator/references/scripting.md +237 -0
  268. package/skill/typst-creator/references/styling.md +217 -0
  269. package/skill/typst-creator/references/syntax.md +234 -0
  270. package/skill/web-design-guidelines/SKILL.md +35 -0
  271. package/terminal.png +0 -0
@@ -0,0 +1,77 @@
1
+ # Contributing
2
+
3
+ Thank you for contributing to Vetala.
4
+
5
+ ## Development Setup
6
+
7
+ Requirements:
8
+
9
+ - Node.js 24 or newer
10
+ - npm
11
+
12
+ Install dependencies:
13
+
14
+ ```bash
15
+ npm install
16
+ ```
17
+
18
+ Run Vetala locally:
19
+
20
+ ```bash
21
+ npm run dev
22
+ ```
23
+
24
+ Optional local CLI install:
25
+
26
+ ```bash
27
+ npm link
28
+ vetala
29
+ ```
30
+
31
+ ## Validation
32
+
33
+ Run these before opening a pull request:
34
+
35
+ ```bash
36
+ npm run check
37
+ npm test
38
+ npm run build
39
+ ```
40
+
41
+ ## Project Notes
42
+
43
+ - The interactive terminal UI is built with Ink.
44
+ - Local skills live under `skill/<name>/SKILL.md`.
45
+ - The agent is expected to prefer search-first, scoped-read workflows before edits.
46
+ - Existing files should not be edited unless they have been read first through the tool layer.
47
+ - Linux is the validated platform today. Windows and macOS support should be treated as unverified until tested.
48
+
49
+ ## Change Guidelines
50
+
51
+ - Keep changes focused and reviewable.
52
+ - Preserve the existing CLI interaction model unless the change intentionally revises it.
53
+ - Add or update tests when changing tool behavior, session persistence, approvals, prompts, or UI flows.
54
+ - Include screenshots when changing TUI layout or interaction behavior.
55
+ - Document any new commands, environment variables, or config behavior.
56
+
57
+ ## Pull Requests
58
+
59
+ A good pull request should include:
60
+
61
+ - a short explanation of the problem being solved
62
+ - a summary of the behavior change
63
+ - any platform assumptions or gaps
64
+ - screenshots for visible UI changes when relevant
65
+ - notes on new risks, migrations, or follow-up work
66
+
67
+ ## Issues
68
+
69
+ Use the issue templates when possible.
70
+
71
+ Good bug reports include:
72
+
73
+ - the command or prompt that triggered the issue
74
+ - what you expected
75
+ - what happened instead
76
+ - logs, stack traces, or screenshots
77
+ - OS, Node version, installation method, and configuration context
package/LICENSE ADDED
@@ -0,0 +1,184 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work (an example is provided in the Appendix
36
+ below).
37
+
38
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
39
+ is based on (or derived from) the Work and for which the editorial revisions,
40
+ annotations, elaborations, or other modifications represent, as a whole, an
41
+ original work of authorship. For the purposes of this License, Derivative Works
42
+ shall not include works that remain separable from, or merely link (or bind by
43
+ name) to the interfaces of, the Work and Derivative Works thereof.
44
+
45
+ "Contribution" shall mean any work of authorship, including the original
46
+ version of the Work and any modifications or additions to that Work or
47
+ Derivative Works thereof, that is intentionally submitted to Licensor for
48
+ inclusion in the Work by the copyright owner or by an individual or Legal
49
+ Entity authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal, or
51
+ written communication sent to the Licensor or its representatives, including
52
+ but not limited to communication on electronic mailing lists, source code
53
+ control systems, and issue tracking systems that are managed by, or on behalf
54
+ of, the Licensor for the purpose of discussing and improving the Work, but
55
+ excluding communication that is conspicuously marked or otherwise designated in
56
+ writing by the copyright owner as "Not a Contribution."
57
+
58
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
59
+ of whom a Contribution has been received by Licensor and subsequently
60
+ incorporated within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
63
+ License, each Contributor hereby grants to You a perpetual, worldwide,
64
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
65
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
66
+ sublicense, and distribute the Work and such Derivative Works in Source or
67
+ Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of this
70
+ License, each Contributor hereby grants to You a perpetual, worldwide,
71
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
72
+ section) patent license to make, have made, use, offer to sell, sell, import,
73
+ and otherwise transfer the Work, where such license applies only to those
74
+ patent claims licensable by such Contributor that are necessarily infringed by
75
+ their Contribution(s) alone or by combination of their Contribution(s) with the
76
+ Work to which such Contribution(s) was submitted. If You institute patent
77
+ litigation against any entity (including a cross-claim or counterclaim in a
78
+ lawsuit) alleging that the Work or a Contribution incorporated within the Work
79
+ constitutes direct or contributory patent infringement, then any patent
80
+ licenses granted to You under this License for that Work shall terminate as of
81
+ the date such litigation is filed.
82
+
83
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
84
+ Derivative Works thereof in any medium, with or without modifications, and in
85
+ Source or Object form, provided that You meet the following conditions:
86
+
87
+ (a) You must give any other recipients of the Work or Derivative Works a copy
88
+ of this License; and
89
+
90
+ (b) You must cause any modified files to carry prominent notices stating that
91
+ You changed the files; and
92
+
93
+ (c) You must retain, in the Source form of any Derivative Works that You
94
+ distribute, all copyright, patent, trademark, and attribution notices from the
95
+ Source form of the Work, excluding those notices that do not pertain to any
96
+ part of the Derivative Works; and
97
+
98
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
99
+ any Derivative Works that You distribute must include a readable copy of the
100
+ attribution notices contained within such NOTICE file, excluding those notices
101
+ that do not pertain to any part of the Derivative Works, in at least one of the
102
+ following places: within a NOTICE text file distributed as part of the
103
+ Derivative Works; within the Source form or documentation, if provided along
104
+ with the Derivative Works; or, within a display generated by the Derivative
105
+ Works, if and wherever such third-party notices normally appear. The contents
106
+ of the NOTICE file are for informational purposes only and do not modify the
107
+ License. You may add Your own attribution notices within Derivative Works that
108
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
109
+ provided that such additional attribution notices cannot be construed as
110
+ modifying the License.
111
+
112
+ You may add Your own copyright statement to Your modifications and may provide
113
+ additional or different license terms and conditions for use, reproduction, or
114
+ distribution of Your modifications, or for any such Derivative Works as a
115
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
116
+ complies with the conditions stated in this License.
117
+
118
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
119
+ Contribution intentionally submitted for inclusion in the Work by You to the
120
+ Licensor shall be under the terms and conditions of this License, without any
121
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
122
+ supersede or modify the terms of any separate license agreement you may have
123
+ executed with Licensor regarding such Contributions.
124
+
125
+ 6. Trademarks. This License does not grant permission to use the trade names,
126
+ trademarks, service marks, or product names of the Licensor, except as required
127
+ for reasonable and customary use in describing the origin of the Work and
128
+ reproducing the content of the NOTICE file.
129
+
130
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
131
+ writing, Licensor provides the Work (and each Contributor provides its
132
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
133
+ KIND, either express or implied, including, without limitation, any warranties
134
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
135
+ PARTICULAR PURPOSE. You are solely responsible for determining the
136
+ appropriateness of using or redistributing the Work and assume any risks
137
+ associated with Your exercise of permissions under this License.
138
+
139
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
140
+ tort (including negligence), contract, or otherwise, unless required by
141
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
142
+ writing, shall any Contributor be liable to You for damages, including any
143
+ direct, indirect, special, incidental, or consequential damages of any
144
+ character arising as a result of this License or out of the use or inability to
145
+ use the Work (including but not limited to damages for loss of goodwill, work
146
+ stoppage, computer failure or malfunction, or any and all other commercial
147
+ damages or losses), even if such Contributor has been advised of the
148
+ possibility of such damages.
149
+
150
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
151
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
152
+ acceptance of support, warranty, indemnity, or other liability obligations
153
+ and/or rights consistent with this License. However, in accepting such
154
+ obligations, You may act only on Your own behalf and on Your sole
155
+ responsibility, not on behalf of any other Contributor, and only if You agree
156
+ to indemnify, defend, and hold each Contributor harmless for any liability
157
+ incurred by, or claims asserted against, such Contributor by reason of your
158
+ accepting any such warranty or additional liability.
159
+
160
+ END OF TERMS AND CONDITIONS
161
+
162
+ APPENDIX: How to apply the Apache License to your work.
163
+
164
+ To apply the Apache License to your work, attach the following boilerplate
165
+ notice, with the fields enclosed by brackets "[]" replaced with your own
166
+ identifying information. (Don't include the brackets.) The text should be
167
+ enclosed in the appropriate comment syntax for the file format. We also
168
+ recommend that a file or class name and description of purpose be included on
169
+ the same "printed page" as the copyright notice for easier identification
170
+ within third-party archives.
171
+
172
+ Copyright 2026 Vetala contributors
173
+
174
+ Licensed under the Apache License, Version 2.0 (the "License");
175
+ you may not use this file except in compliance with the License.
176
+ You may obtain a copy of the License at
177
+
178
+ http://www.apache.org/licenses/LICENSE-2.0
179
+
180
+ Unless required by applicable law or agreed to in writing, software
181
+ distributed under the License is distributed on an "AS IS" BASIS,
182
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183
+ See the License for the specific language governing permissions and
184
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # Vetala
2
+
3
+ Vetala is a terminal-first coding assistant with an interactive TUI, local tools, approval gates, session memory, and a skill system for reusable workflows.
4
+
5
+ ![Vetala terminal UI](./terminal.png)
6
+
7
+ ## Overview
8
+
9
+ Vetala is designed for code-focused terminal work:
10
+
11
+ - interactive CLI built with Ink
12
+ - multi-turn sessions with persisted state
13
+ - local file, shell, git, and web-capable tool execution
14
+ - approval-aware operations for safer workspace access
15
+ - local `skill/` runtime for reusable instructions and references
16
+ - prompt compaction to preserve continuity across longer sessions
17
+
18
+ Current provider support is limited to Sarvam AI.
19
+
20
+ ## Compatibility
21
+
22
+ Vetala is currently tested on Linux.
23
+
24
+ Windows and macOS have not been validated yet.
25
+
26
+ ## Installation
27
+
28
+ ### Global install
29
+
30
+ ```bash
31
+ npm install -g @vetala/vetala
32
+ vetala
33
+ ```
34
+
35
+ ### Local development install
36
+
37
+ ```bash
38
+ npm install
39
+ npm link
40
+ vetala
41
+ ```
42
+
43
+ The package is published as `@vetala/vetala` and exposes a global `vetala` binary through `package.json`.
44
+
45
+ ## Getting Started
46
+
47
+ Run Vetala in a project directory:
48
+
49
+ ```bash
50
+ vetala
51
+ ```
52
+
53
+ Or run from source during development:
54
+
55
+ ```bash
56
+ npm run dev
57
+ ```
58
+
59
+ On startup, Vetala opens an interactive terminal UI and asks you to confirm trust for the current workspace before enabling tool access.
60
+
61
+ ## Configuration
62
+
63
+ Model selection and credential setup are available from inside the TUI through:
64
+
65
+ ```text
66
+ /model
67
+ ```
68
+
69
+ Configuration and session data are stored in the user application directory for the current platform.
70
+
71
+ ## Core Commands
72
+
73
+ - `/help` shows available commands
74
+ - `/model` updates model and auth settings
75
+ - `/skill` lists and manages local skills
76
+ - `/tools` shows available tools
77
+ - `/history` shows recent session messages
78
+ - `/resume <session-id>` reopens a saved session
79
+ - `/new` starts a fresh session
80
+ - `/approve` shows active approvals
81
+ - `/config` prints runtime configuration
82
+ - `/logout` clears locally saved auth state
83
+ - `/clear` clears the visible transcript
84
+ - `/exit` exits the application
85
+
86
+ ## Skills
87
+
88
+ Vetala loads local skills from:
89
+
90
+ ```text
91
+ skill/<name>/SKILL.md
92
+ ```
93
+
94
+ Skills are indexed locally and exposed through the `skill` tool so the assistant can:
95
+
96
+ - list available skills
97
+ - load a skill overview
98
+ - read referenced files inside a skill
99
+ - pin and unpin skills across turns
100
+
101
+ This keeps the default prompt smaller while still allowing deeper workflow guidance when needed.
102
+
103
+ ## Development
104
+
105
+ ```bash
106
+ npm run check
107
+ npm test
108
+ npm run build
109
+ ```
110
+
111
+ ## Publishing
112
+
113
+ Before publishing:
114
+
115
+ ```bash
116
+ npm run check
117
+ npm test
118
+ npm run build
119
+ npm pack
120
+ ```
121
+
122
+ To publish under the `@vetala` npm scope, make sure your npm account has publish access to that scope, then run:
123
+
124
+ ```bash
125
+ npm publish --access public
126
+ ```
127
+
128
+ ## Contributing
129
+
130
+ See [CONTRIBUTING.md](./CONTRIBUTING.md).
131
+
132
+ ## License
133
+
134
+ Licensed under Apache-2.0. See [LICENSE](./LICENSE).
135
+
136
+ Modified third-party material is documented in [THIRD_PARTY_LICENSES.md](./THIRD_PARTY_LICENSES.md).
@@ -0,0 +1,17 @@
1
+ This project includes modified code and documentation from:
2
+
3
+ - `vercel-labs/agent-skills`
4
+ https://github.com/vercel-labs/agent-skills
5
+
6
+ - `buYoung/skills`
7
+ https://github.com/buYoung/skills
8
+
9
+ - `jMerta/codex-skills`
10
+ https://github.com/jMerta/codex-skills
11
+
12
+ - `netresearch/git-workflow-skill`
13
+ https://github.com/netresearch/git-workflow-skill
14
+
15
+ All included upstream material is licensed under MIT.
16
+
17
+ The copies in this repository have been modified, including Markdown-based skill files and related support content.
@@ -0,0 +1,30 @@
1
+ import { ApprovalManager } from "./approvals.js";
2
+ import { PathPolicy } from "./path-policy.js";
3
+ import { SessionStore } from "./session-store.js";
4
+ import { TerminalUI } from "./terminal-ui.js";
5
+ import { ToolRegistry } from "./tools/registry.js";
6
+ import type { SkillRuntime } from "./skills/runtime.js";
7
+ import type { EffectiveConfig, SessionState } from "./types.js";
8
+ export interface AgentOptions {
9
+ config: EffectiveConfig;
10
+ session: SessionState;
11
+ sessionStore: SessionStore;
12
+ approvals: ApprovalManager;
13
+ pathPolicy: PathPolicy;
14
+ skills: SkillRuntime;
15
+ tools: ToolRegistry;
16
+ ui: TerminalUI;
17
+ }
18
+ export declare class Agent {
19
+ private readonly options;
20
+ private readonly client;
21
+ constructor(options: AgentOptions);
22
+ get session(): SessionState;
23
+ runTurn(userInput: string, streaming: boolean): Promise<void>;
24
+ private completeTurn;
25
+ private chatRequest;
26
+ private toolContext;
27
+ private appendAndRenderAssistantMessage;
28
+ private persistedMessage;
29
+ private systemPrompt;
30
+ }
@@ -0,0 +1,216 @@
1
+ import { compactConversation } from "./context-memory.js";
2
+ import { DisabledSearchProvider } from "./search-provider.js";
3
+ import { SarvamClient, withSystemMessage } from "./sarvam/client.js";
4
+ export class Agent {
5
+ options;
6
+ client;
7
+ constructor(options) {
8
+ this.options = options;
9
+ this.client = new SarvamClient(options.config);
10
+ }
11
+ get session() {
12
+ return this.options.session;
13
+ }
14
+ async runTurn(userInput, streaming) {
15
+ const userMessage = this.persistedMessage({
16
+ role: "user",
17
+ content: userInput
18
+ });
19
+ await this.options.sessionStore.appendMessage(this.options.session, userMessage);
20
+ const localGreeting = maybeLocalGreeting(userInput);
21
+ if (localGreeting) {
22
+ await this.appendAndRenderAssistantMessage(localGreeting, false);
23
+ return;
24
+ }
25
+ if (!this.options.config.authValue) {
26
+ const missingAuthMessage = this.options.config.authSource === "stored_hash"
27
+ ? "A stored SHA-256 fingerprint exists, but the raw Sarvam key is not available in this process. Use /model to enter the key again or set SARVAM_API_KEY, SARVAM_SUBSCRIPTION_KEY, or SARVAM_TOKEN."
28
+ : "Sarvam credentials are missing. Set SARVAM_API_KEY, SARVAM_SUBSCRIPTION_KEY, or SARVAM_TOKEN and try again.";
29
+ await this.appendAndRenderAssistantMessage(missingAuthMessage, false);
30
+ return;
31
+ }
32
+ const seenToolCalls = new Set();
33
+ for (let turnIndex = 0; turnIndex < 8; turnIndex += 1) {
34
+ const conversation = compactConversation(this.options.session.messages, this.options.session.referencedFiles);
35
+ this.options.ui.activity(conversation.compactedCount > 0
36
+ ? `Using 12 recent messages and ${conversation.compactedCount} compacted earlier messages.`
37
+ : "Using the live conversation context.");
38
+ const systemPrompt = await this.systemPrompt(conversation.memory, conversation.compactedCount);
39
+ const requestMessages = withSystemMessage(systemPrompt, conversation.recentMessages);
40
+ let turn;
41
+ try {
42
+ turn = await this.completeTurn(requestMessages, streaming);
43
+ }
44
+ catch (error) {
45
+ await this.appendAndRenderAssistantMessage(error instanceof Error ? error.message : String(error), true);
46
+ return;
47
+ }
48
+ const assistantMessage = this.persistedMessage({
49
+ role: "assistant",
50
+ content: turn.content || null,
51
+ tool_calls: turn.toolCalls.length > 0 ? turn.toolCalls : null
52
+ });
53
+ await this.options.sessionStore.appendMessage(this.options.session, assistantMessage);
54
+ if (turn.toolCalls.length === 0) {
55
+ this.options.ui.endAssistantTurn();
56
+ return;
57
+ }
58
+ for (const toolCall of turn.toolCalls) {
59
+ this.options.ui.printToolCall(toolCall);
60
+ const signature = toolCallSignature(toolCall);
61
+ let result;
62
+ if (seenToolCalls.has(signature)) {
63
+ this.options.ui.activity(`Skipping repeated ${toolCall.function.name} call.`);
64
+ result = {
65
+ summary: "Repeated tool call suppressed",
66
+ content: "This exact tool call already ran earlier in this turn. Reuse the earlier result instead of calling it again.",
67
+ isError: true
68
+ };
69
+ }
70
+ else {
71
+ seenToolCalls.add(signature);
72
+ this.options.ui.activity(`Running ${toolCall.function.name}.`);
73
+ result = await this.options.tools.execute(toolCall, this.toolContext());
74
+ }
75
+ this.options.ui.printToolResult(result.summary, result.isError);
76
+ await this.options.sessionStore.appendMessage(this.options.session, this.persistedMessage({
77
+ role: "tool",
78
+ content: result.content,
79
+ tool_call_id: toolCall.id
80
+ }));
81
+ }
82
+ }
83
+ throw new Error("Agent reached the maximum tool loop depth.");
84
+ }
85
+ async completeTurn(messages, streaming) {
86
+ this.options.ui.activity(`Thinking with ${this.options.session.model}.`);
87
+ if (!streaming) {
88
+ const spinner = this.options.ui.startSpinner("Thinking");
89
+ try {
90
+ const turn = await this.client.complete(this.chatRequest(messages));
91
+ spinner.stop();
92
+ if (turn.content) {
93
+ this.options.ui.printAssistantMessage(turn.content);
94
+ }
95
+ return turn;
96
+ }
97
+ finally {
98
+ if (spinner.isSpinning) {
99
+ spinner.stop();
100
+ }
101
+ }
102
+ }
103
+ try {
104
+ const turn = await this.client.stream(this.chatRequest(messages), {
105
+ onText: (chunk) => this.options.ui.appendAssistantText(chunk)
106
+ });
107
+ return turn;
108
+ }
109
+ catch (error) {
110
+ this.options.ui.endAssistantTurn();
111
+ this.options.ui.activity("Streaming failed. Retrying with buffered completion.");
112
+ this.options.ui.warn(`Streaming failed, falling back to buffered completion: ${error instanceof Error ? error.message : String(error)}`);
113
+ return this.completeTurn(messages, false);
114
+ }
115
+ }
116
+ chatRequest(messages) {
117
+ return {
118
+ messages,
119
+ model: this.options.session.model,
120
+ temperature: 0.2,
121
+ reasoning_effort: this.options.config.reasoningEffort,
122
+ tools: this.options.tools.toSarvamTools(),
123
+ tool_choice: "auto"
124
+ };
125
+ }
126
+ toolContext() {
127
+ return {
128
+ cwd: process.cwd(),
129
+ workspaceRoot: this.options.session.workspaceRoot,
130
+ approvals: {
131
+ requestApproval: (request) => this.options.approvals.requestApproval(request),
132
+ hasSessionGrant: (key) => this.options.approvals.hasSessionGrant(key),
133
+ registerReference: (targetPath) => this.options.approvals.registerReference(targetPath),
134
+ ensureWebAccess: () => this.options.approvals.ensureWebAccess()
135
+ },
136
+ reads: {
137
+ hasRead: (targetPath) => this.options.session.readFiles.includes(targetPath),
138
+ registerRead: (targetPath) => this.options.sessionStore.appendReadFile(this.options.session, targetPath)
139
+ },
140
+ paths: {
141
+ resolve: (inputPath) => this.options.pathPolicy.resolve(inputPath),
142
+ ensureReadable: (inputPath) => this.options.pathPolicy.ensureReadable(inputPath),
143
+ ensureWritable: (inputPath) => this.options.pathPolicy.ensureWritable(inputPath),
144
+ allowedRoots: () => this.options.pathPolicy.allowedRoots()
145
+ },
146
+ searchProvider: new DisabledSearchProvider()
147
+ };
148
+ }
149
+ async appendAndRenderAssistantMessage(message, isError) {
150
+ if (isError) {
151
+ this.options.ui.error(message);
152
+ }
153
+ else {
154
+ this.options.ui.printAssistantMessage(message);
155
+ }
156
+ await this.options.sessionStore.appendMessage(this.options.session, this.persistedMessage({
157
+ role: "assistant",
158
+ content: message
159
+ }));
160
+ }
161
+ persistedMessage(message) {
162
+ return {
163
+ ...message,
164
+ timestamp: new Date().toISOString()
165
+ };
166
+ }
167
+ async systemPrompt(memory, compactedCount) {
168
+ const skillInventory = await this.options.skills.inventoryPrompt();
169
+ const pinnedSkillContext = await this.options.skills.pinnedPrompt();
170
+ const lines = [
171
+ "You are Vetala, a concise coding CLI assistant operating inside a developer terminal.",
172
+ "When greeting or introducing yourself, explicitly call yourself Vetala.",
173
+ "When referring to yourself in any response, use the name Vetala.",
174
+ `Host platform: ${process.platform}`,
175
+ "Account for the host platform when suggesting or running shell commands.",
176
+ `Workspace root: ${this.options.session.workspaceRoot}`,
177
+ `Allowed roots right now: ${this.options.pathPolicy.allowedRoots().join(", ")}`,
178
+ compactedCount > 0
179
+ ? `Only the most recent messages are attached verbatim. ${compactedCount} earlier messages were compacted into working memory.`
180
+ : "The full conversation is attached because the session is still short.",
181
+ "Use tools whenever you need file contents, shell output, git state, or web data.",
182
+ "Only call declared tools by their exact names.",
183
+ "Preferred repo workflow: search_repo, then read_file/read_file_chunk/read_symbol, then apply_patch or write_file.",
184
+ "Do not edit an existing file until you have read it in this session.",
185
+ "Use the skill tool whenever a task may match a local skill or when you need a skill-specific file.",
186
+ "When reading files inside the local skill catalog, prefer the skill tool over read_file.",
187
+ "The skill tool supports list, load, read, pin, unpin, and clear.",
188
+ "Do not repeat identical tool calls within the same turn. Reuse earlier tool results instead.",
189
+ "Treat follow-up requests as continuing the current task unless the user clearly changes direction.",
190
+ "Never claim to have inspected or changed files unless you actually used a tool.",
191
+ "Prefer read-only tools before mutating tools or shell commands.",
192
+ "If a tool is denied or errors, do not pretend it succeeded; adapt to the result.",
193
+ "Keep responses short and focused on what changed, what you found, or what blocks progress.",
194
+ "",
195
+ skillInventory
196
+ ];
197
+ if (pinnedSkillContext) {
198
+ lines.push("", pinnedSkillContext);
199
+ }
200
+ if (memory) {
201
+ lines.push("", memory);
202
+ }
203
+ return lines.join("\n");
204
+ }
205
+ }
206
+ function toolCallSignature(toolCall) {
207
+ return `${toolCall.function.name}:${toolCall.function.arguments.trim()}`;
208
+ }
209
+ function maybeLocalGreeting(userInput) {
210
+ const normalized = userInput.trim().toLowerCase();
211
+ if (normalized === "hi" || normalized === "hello" || normalized === "hey") {
212
+ return "Vetala here. How can I help?";
213
+ }
214
+ return null;
215
+ }
216
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAwBrE,MAAM,OAAO,KAAK;IAGa;IAFZ,MAAM,CAAe;IAEtC,YAA6B,OAAqB;QAArB,YAAO,GAAP,OAAO,CAAc;QAChD,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,SAAiB,EAAE,SAAkB;QACjD,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC;YACxC,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;SACnB,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CA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