@mindfoldhq/trellis 0.1.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 (122) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +149 -0
  3. package/bin/trellis.js +3 -0
  4. package/dist/cli/index.d.ts +2 -0
  5. package/dist/cli/index.d.ts.map +1 -0
  6. package/dist/cli/index.js +42 -0
  7. package/dist/cli/index.js.map +1 -0
  8. package/dist/commands/init.d.ts +11 -0
  9. package/dist/commands/init.d.ts.map +1 -0
  10. package/dist/commands/init.js +236 -0
  11. package/dist/commands/init.js.map +1 -0
  12. package/dist/configurators/claude.d.ts +35 -0
  13. package/dist/configurators/claude.d.ts.map +1 -0
  14. package/dist/configurators/claude.js +83 -0
  15. package/dist/configurators/claude.js.map +1 -0
  16. package/dist/configurators/cursor.d.ts +8 -0
  17. package/dist/configurators/cursor.d.ts.map +1 -0
  18. package/dist/configurators/cursor.js +22 -0
  19. package/dist/configurators/cursor.js.map +1 -0
  20. package/dist/configurators/templates.d.ts +40 -0
  21. package/dist/configurators/templates.d.ts.map +1 -0
  22. package/dist/configurators/templates.js +67 -0
  23. package/dist/configurators/templates.js.map +1 -0
  24. package/dist/configurators/workflow.d.ts +16 -0
  25. package/dist/configurators/workflow.d.ts.map +1 -0
  26. package/dist/configurators/workflow.js +169 -0
  27. package/dist/configurators/workflow.js.map +1 -0
  28. package/dist/constants/paths.d.ts +69 -0
  29. package/dist/constants/paths.d.ts.map +1 -0
  30. package/dist/constants/paths.js +80 -0
  31. package/dist/constants/paths.js.map +1 -0
  32. package/dist/index.d.ts +9 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +9 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/templates/agents/check.txt +120 -0
  37. package/dist/templates/agents/debug.txt +121 -0
  38. package/dist/templates/agents/dispatch.txt +201 -0
  39. package/dist/templates/agents/implement.txt +114 -0
  40. package/dist/templates/agents/index.d.ts +35 -0
  41. package/dist/templates/agents/index.d.ts.map +1 -0
  42. package/dist/templates/agents/index.js +71 -0
  43. package/dist/templates/agents/index.js.map +1 -0
  44. package/dist/templates/agents/research.txt +258 -0
  45. package/dist/templates/commands/claude/start.md.txt +127 -0
  46. package/dist/templates/commands/common/before-backend-dev.txt +13 -0
  47. package/dist/templates/commands/common/before-frontend-dev.txt +13 -0
  48. package/dist/templates/commands/common/break-loop.txt +107 -0
  49. package/dist/templates/commands/common/check-backend.txt +13 -0
  50. package/dist/templates/commands/common/check-cross-layer.txt +153 -0
  51. package/dist/templates/commands/common/check-frontend.txt +13 -0
  52. package/dist/templates/commands/common/create-command.txt +154 -0
  53. package/dist/templates/commands/common/finish-work.txt +129 -0
  54. package/dist/templates/commands/common/integrate-skill.txt +219 -0
  55. package/dist/templates/commands/common/onboard-developer.txt +355 -0
  56. package/dist/templates/commands/common/record-agent-flow.txt +62 -0
  57. package/dist/templates/commands/cursor/start.md.txt +94 -0
  58. package/dist/templates/commands/index.d.ts +46 -0
  59. package/dist/templates/commands/index.d.ts.map +1 -0
  60. package/dist/templates/commands/index.js +151 -0
  61. package/dist/templates/commands/index.js.map +1 -0
  62. package/dist/templates/extract.d.ts +22 -0
  63. package/dist/templates/extract.d.ts.map +1 -0
  64. package/dist/templates/extract.js +34 -0
  65. package/dist/templates/extract.js.map +1 -0
  66. package/dist/templates/hooks/index.d.ts +33 -0
  67. package/dist/templates/hooks/index.d.ts.map +1 -0
  68. package/dist/templates/hooks/index.js +53 -0
  69. package/dist/templates/hooks/index.js.map +1 -0
  70. package/dist/templates/hooks/inject-subagent-context.py +620 -0
  71. package/dist/templates/hooks/settings.json +16 -0
  72. package/dist/templates/markdown/agent-traces-index.md.txt +124 -0
  73. package/dist/templates/markdown/agents.md.txt +18 -0
  74. package/dist/templates/markdown/gitignore.txt +3 -0
  75. package/dist/templates/markdown/index.d.ts +26 -0
  76. package/dist/templates/markdown/index.d.ts.map +1 -0
  77. package/dist/templates/markdown/index.js +33 -0
  78. package/dist/templates/markdown/index.js.map +1 -0
  79. package/dist/templates/markdown/init-agent.md.txt +315 -0
  80. package/dist/templates/markdown/structure/backend/database-guidelines.md.txt +51 -0
  81. package/dist/templates/markdown/structure/backend/directory-structure.md.txt +54 -0
  82. package/dist/templates/markdown/structure/backend/error-handling.md.txt +51 -0
  83. package/dist/templates/markdown/structure/backend/index.md.txt +38 -0
  84. package/dist/templates/markdown/structure/backend/logging-guidelines.md.txt +51 -0
  85. package/dist/templates/markdown/structure/backend/quality-guidelines.md.txt +51 -0
  86. package/dist/templates/markdown/structure/frontend/component-guidelines.md.txt +59 -0
  87. package/dist/templates/markdown/structure/frontend/directory-structure.md.txt +54 -0
  88. package/dist/templates/markdown/structure/frontend/hook-guidelines.md.txt +51 -0
  89. package/dist/templates/markdown/structure/frontend/index.md.txt +39 -0
  90. package/dist/templates/markdown/structure/frontend/quality-guidelines.md.txt +51 -0
  91. package/dist/templates/markdown/structure/frontend/state-management.md.txt +51 -0
  92. package/dist/templates/markdown/structure/frontend/type-safety.md.txt +51 -0
  93. package/dist/templates/markdown/structure/guides/code-reuse-thinking-guide.md.txt +92 -0
  94. package/dist/templates/markdown/structure/guides/cross-layer-thinking-guide.md.txt +94 -0
  95. package/dist/templates/markdown/structure/guides/index.md.txt +79 -0
  96. package/dist/templates/markdown/workflow.md.txt +335 -0
  97. package/dist/templates/scripts/add-session.sh.txt +384 -0
  98. package/dist/templates/scripts/common/developer.sh.txt +130 -0
  99. package/dist/templates/scripts/common/git-context.sh.txt +237 -0
  100. package/dist/templates/scripts/common/paths.sh.txt +201 -0
  101. package/dist/templates/scripts/create-bootstrap.sh.txt +298 -0
  102. package/dist/templates/scripts/feature.sh.txt +700 -0
  103. package/dist/templates/scripts/get-context.sh.txt +7 -0
  104. package/dist/templates/scripts/get-developer.sh.txt +15 -0
  105. package/dist/templates/scripts/index.d.ts +25 -0
  106. package/dist/templates/scripts/index.d.ts.map +1 -0
  107. package/dist/templates/scripts/index.js +28 -0
  108. package/dist/templates/scripts/index.js.map +1 -0
  109. package/dist/templates/scripts/init-developer.sh.txt +34 -0
  110. package/dist/types/ai-tools.d.ts +35 -0
  111. package/dist/types/ai-tools.d.ts.map +1 -0
  112. package/dist/types/ai-tools.js +31 -0
  113. package/dist/types/ai-tools.js.map +1 -0
  114. package/dist/utils/file-writer.d.ts +23 -0
  115. package/dist/utils/file-writer.d.ts.map +1 -0
  116. package/dist/utils/file-writer.js +140 -0
  117. package/dist/utils/file-writer.js.map +1 -0
  118. package/dist/utils/project-detector.d.ts +16 -0
  119. package/dist/utils/project-detector.d.ts.map +1 -0
  120. package/dist/utils/project-detector.js +186 -0
  121. package/dist/utils/project-detector.js.map +1 -0
  122. package/package.json +71 -0
@@ -0,0 +1,83 @@
1
+ import path from "node:path";
2
+ import { getCommandTemplates } from "./templates.js";
3
+ import { writeFile, ensureDir } from "../utils/file-writer.js";
4
+ import { getAllAgents } from "../templates/agents/index.js";
5
+ import { getAllHooks, getSettingsTemplate } from "../templates/hooks/index.js";
6
+ /**
7
+ * Configure Claude Code with slash commands
8
+ *
9
+ * Claude Code gets the full set of commands including Claude-specific
10
+ * features like skill integration.
11
+ */
12
+ export async function configureClaude(cwd) {
13
+ const claudeDir = path.join(cwd, ".claude");
14
+ const commandsDir = path.join(claudeDir, "commands");
15
+ // Create directory
16
+ ensureDir(commandsDir);
17
+ // Get command templates for Claude Code (full feature set)
18
+ const templates = getCommandTemplates("claude-code");
19
+ // Write each command file
20
+ for (const [name, content] of Object.entries(templates)) {
21
+ const filePath = path.join(commandsDir, `${name}.md`);
22
+ await writeFile(filePath, content);
23
+ }
24
+ }
25
+ /**
26
+ * Configure Claude Code agents for Multi-Agent Pipeline
27
+ *
28
+ * Agents are specialized subagents that work together:
29
+ * - implement: Code implementation expert
30
+ * - check: Code and cross-layer check expert
31
+ * - debug: Issue fixing expert
32
+ * - research: Search expert
33
+ * - dispatch: Pipeline dispatcher
34
+ */
35
+ export async function configureClaudeAgents(cwd) {
36
+ const agentsDir = path.join(cwd, ".claude", "agents");
37
+ // Create directory
38
+ ensureDir(agentsDir);
39
+ // Get all agent templates
40
+ const agents = getAllAgents();
41
+ // Write each agent file
42
+ for (const agent of agents) {
43
+ const filePath = path.join(agentsDir, `${agent.name}.md`);
44
+ await writeFile(filePath, agent.content);
45
+ }
46
+ }
47
+ /**
48
+ * Configure Claude Code hooks for context injection
49
+ *
50
+ * Hooks automatically inject context into subagent prompts
51
+ * based on the current feature configuration.
52
+ */
53
+ export async function configureClaudeHooks(cwd) {
54
+ const hooksDir = path.join(cwd, ".claude", "hooks");
55
+ const claudeDir = path.join(cwd, ".claude");
56
+ // Create hooks directory
57
+ ensureDir(hooksDir);
58
+ // Get all hook templates
59
+ const hooks = getAllHooks();
60
+ // Write each hook file
61
+ for (const hook of hooks) {
62
+ const filePath = path.join(claudeDir, hook.targetPath);
63
+ await writeFile(filePath, hook.content);
64
+ }
65
+ // Write settings.json with hook configuration
66
+ const settingsTemplate = getSettingsTemplate();
67
+ const settingsPath = path.join(claudeDir, settingsTemplate.targetPath);
68
+ await writeFile(settingsPath, settingsTemplate.content);
69
+ }
70
+ /**
71
+ * Configure Claude Code with full Multi-Agent Pipeline support
72
+ *
73
+ * This includes:
74
+ * - Slash commands
75
+ * - Agent configurations
76
+ * - Hook configurations
77
+ */
78
+ export async function configureClaudeFull(cwd) {
79
+ await configureClaude(cwd);
80
+ await configureClaudeAgents(cwd);
81
+ await configureClaudeHooks(cwd);
82
+ }
83
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/configurators/claude.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC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;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,GAAW;IACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE5C,yBAAyB;IACzB,SAAS,CAAC,QAAQ,CAAC,CAAC;IAEpB,yBAAyB;IACzB,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAE5B,uBAAuB;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,8CAA8C;IAC9C,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvE,MAAM,SAAS,CAAC,YAAY,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAW;IACnD,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,oBAAoB,CAAC,GAAG,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Configure Cursor with slash commands
3
+ *
4
+ * Cursor gets only the common commands that don't require
5
+ * Claude-specific features like openskills.
6
+ */
7
+ export declare function configureCursor(cwd: string): Promise<void>;
8
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/configurators/cursor.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAchE"}
@@ -0,0 +1,22 @@
1
+ import path from "node:path";
2
+ import { getCommandTemplates } from "./templates.js";
3
+ import { writeFile, ensureDir } from "../utils/file-writer.js";
4
+ /**
5
+ * Configure Cursor with slash commands
6
+ *
7
+ * Cursor gets only the common commands that don't require
8
+ * Claude-specific features like openskills.
9
+ */
10
+ export async function configureCursor(cwd) {
11
+ const commandsDir = path.join(cwd, ".cursor", "commands");
12
+ // Create directory
13
+ ensureDir(commandsDir);
14
+ // Get command templates for Cursor (common features only)
15
+ const templates = getCommandTemplates("cursor");
16
+ // Write each command file
17
+ for (const [name, content] of Object.entries(templates)) {
18
+ const filePath = path.join(commandsDir, `${name}.md`);
19
+ await writeFile(filePath, content);
20
+ }
21
+ }
22
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/configurators/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAE1D,mBAAmB;IACnB,SAAS,CAAC,WAAW,CAAC,CAAC;IAEvB,0DAA0D;IAC1D,MAAM,SAAS,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAEhD,0BAA0B;IAC1B,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,KAAK,CAAC,CAAC;QACtD,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Command template configurator
3
+ *
4
+ * Provides command templates based on the target AI tool's capabilities.
5
+ * Different AI tools support different features, so we generate
6
+ * appropriate command sets for each.
7
+ */
8
+ import type { AITool } from "../types/ai-tools.js";
9
+ export type CommandTemplates = Record<string, string>;
10
+ /**
11
+ * Get command templates for a specific AI tool
12
+ *
13
+ * @param tool - The AI tool to get templates for (defaults to claude-code for full support)
14
+ * @returns A record of command name to template content
15
+ */
16
+ export declare function getCommandTemplates(tool?: AITool): CommandTemplates;
17
+ /**
18
+ * Get all command templates regardless of AI tool
19
+ * Useful for tools that support all features
20
+ *
21
+ * @returns A record of all command names to template content
22
+ */
23
+ export declare function getAllCommandTemplates(): CommandTemplates;
24
+ /**
25
+ * Get command templates for Claude Code (full feature set)
26
+ */
27
+ export declare function getClaudeCodeTemplates(): CommandTemplates;
28
+ /**
29
+ * Get command templates for Cursor (common features only)
30
+ */
31
+ export declare function getCursorTemplates(): CommandTemplates;
32
+ /**
33
+ * Get the list of available command names for a tool
34
+ */
35
+ export declare function getAvailableCommands(tool?: AITool): string[];
36
+ /**
37
+ * Get command descriptions for a tool (useful for help text)
38
+ */
39
+ export declare function getCommandDescriptions(tool?: AITool): Record<string, string>;
40
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOnD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,GAAE,MAAsB,GAC3B,gBAAgB,CAGlB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAEzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAErD;AAaD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,MAAsB,GAAG,MAAM,EAAE,CAE3E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,GAAE,MAAsB,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Command template configurator
3
+ *
4
+ * Provides command templates based on the target AI tool's capabilities.
5
+ * Different AI tools support different features, so we generate
6
+ * appropriate command sets for each.
7
+ */
8
+ import { getTemplatesForTool, getAllTemplates, } from "../templates/commands/index.js";
9
+ /**
10
+ * Get command templates for a specific AI tool
11
+ *
12
+ * @param tool - The AI tool to get templates for (defaults to claude-code for full support)
13
+ * @returns A record of command name to template content
14
+ */
15
+ export function getCommandTemplates(tool = "claude-code") {
16
+ const templates = getTemplatesForTool(tool);
17
+ return templatesToRecord(templates);
18
+ }
19
+ /**
20
+ * Get all command templates regardless of AI tool
21
+ * Useful for tools that support all features
22
+ *
23
+ * @returns A record of all command names to template content
24
+ */
25
+ export function getAllCommandTemplates() {
26
+ return templatesToRecord(getAllTemplates());
27
+ }
28
+ /**
29
+ * Get command templates for Claude Code (full feature set)
30
+ */
31
+ export function getClaudeCodeTemplates() {
32
+ return getCommandTemplates("claude-code");
33
+ }
34
+ /**
35
+ * Get command templates for Cursor (common features only)
36
+ */
37
+ export function getCursorTemplates() {
38
+ return getCommandTemplates("cursor");
39
+ }
40
+ /**
41
+ * Convert CommandTemplate array to CommandTemplates record
42
+ */
43
+ function templatesToRecord(templates) {
44
+ const result = {};
45
+ for (const template of templates) {
46
+ result[template.name] = template.content;
47
+ }
48
+ return result;
49
+ }
50
+ /**
51
+ * Get the list of available command names for a tool
52
+ */
53
+ export function getAvailableCommands(tool = "claude-code") {
54
+ return getTemplatesForTool(tool).map((t) => t.name);
55
+ }
56
+ /**
57
+ * Get command descriptions for a tool (useful for help text)
58
+ */
59
+ export function getCommandDescriptions(tool = "claude-code") {
60
+ const templates = getTemplatesForTool(tool);
61
+ const result = {};
62
+ for (const template of templates) {
63
+ result[template.name] = template.description;
64
+ }
65
+ return result;
66
+ }
67
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,mBAAmB,EACnB,eAAe,GAEhB,MAAM,gCAAgC,CAAC;AAIxC;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAe,aAAa;IAE5B,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5C,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC;AACtC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,iBAAiB,CAAC,eAAe,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,mBAAmB,CAAC,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,SAA4B;IACrD,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,aAAa;IAC/D,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAe,aAAa;IAE5B,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC;IAC/C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ProjectType } from "../utils/project-detector.js";
2
+ /**
3
+ * Options for creating workflow structure
4
+ */
5
+ export interface WorkflowOptions {
6
+ /** Detected or specified project type */
7
+ projectType: ProjectType;
8
+ }
9
+ /**
10
+ * Create workflow structure based on project type
11
+ *
12
+ * @param cwd - Current working directory
13
+ * @param options - Workflow options including project type
14
+ */
15
+ export declare function createWorkflowStructure(cwd: string, options?: WorkflowOptions): Promise<void>;
16
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAYhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
@@ -0,0 +1,169 @@
1
+ import path from "node:path";
2
+ import { DIR_NAMES, PATHS } from "../constants/paths.js";
3
+ // Import script templates
4
+ import {
5
+ // Common utilities
6
+ commonPathsScript, commonDeveloperScript, commonGitContextScript,
7
+ // Main scripts
8
+ initDeveloperScript, getDeveloperScript, featureScript, getContextScript, addSessionScript, createBootstrapScript, } from "../templates/scripts/index.js";
9
+ // Import markdown templates
10
+ import { agentProgressIndexContent, workflowMdContent, workflowGitignoreContent,
11
+ // Backend structure (multi-doc)
12
+ backendIndexContent, backendDirectoryStructureContent, backendDatabaseGuidelinesContent, backendLoggingGuidelinesContent, backendQualityGuidelinesContent, backendErrorHandlingContent,
13
+ // Frontend structure (multi-doc)
14
+ frontendIndexContent, frontendDirectoryStructureContent, frontendTypeSafetyContent, frontendHookGuidelinesContent, frontendComponentGuidelinesContent, frontendQualityGuidelinesContent, frontendStateManagementContent,
15
+ // Guides structure
16
+ guidesIndexContent, guidesCrossLayerThinkingGuideContent, guidesCodeReuseThinkingGuideContent, } from "../templates/markdown/index.js";
17
+ import { writeFile, ensureDir } from "../utils/file-writer.js";
18
+ /**
19
+ * Create workflow structure based on project type
20
+ *
21
+ * @param cwd - Current working directory
22
+ * @param options - Workflow options including project type
23
+ */
24
+ export async function createWorkflowStructure(cwd, options) {
25
+ const projectType = options?.projectType ?? "fullstack";
26
+ // Create base directories (always created)
27
+ const baseDirs = [
28
+ DIR_NAMES.WORKFLOW,
29
+ PATHS.SCRIPTS,
30
+ `${PATHS.SCRIPTS}/common`,
31
+ PATHS.PROGRESS,
32
+ PATHS.STRUCTURE,
33
+ `${PATHS.STRUCTURE}/guides`, // Always created
34
+ ];
35
+ // Add type-specific directories
36
+ if (projectType === "frontend" || projectType === "fullstack") {
37
+ baseDirs.push(`${PATHS.STRUCTURE}/frontend`);
38
+ }
39
+ if (projectType === "backend" || projectType === "fullstack") {
40
+ baseDirs.push(`${PATHS.STRUCTURE}/backend`);
41
+ }
42
+ // For unknown, create both but let user decide
43
+ if (projectType === "unknown") {
44
+ baseDirs.push(`${PATHS.STRUCTURE}/frontend`);
45
+ baseDirs.push(`${PATHS.STRUCTURE}/backend`);
46
+ }
47
+ for (const dir of baseDirs) {
48
+ ensureDir(path.join(cwd, dir));
49
+ }
50
+ // Create scripts
51
+ await createScripts(cwd);
52
+ // Create agent-traces index
53
+ await createAgentProgressIndex(cwd);
54
+ // Create structure templates based on project type
55
+ await createStructureTemplates(cwd, projectType);
56
+ // Create workflow.md
57
+ await createWorkflowMd(cwd);
58
+ // Create .gitignore for workflow
59
+ await createWorkflowGitignore(cwd);
60
+ }
61
+ async function createScripts(cwd) {
62
+ // Common utilities (to be sourced by other scripts)
63
+ const commonScripts = [
64
+ { name: "common/paths.sh", content: commonPathsScript },
65
+ { name: "common/developer.sh", content: commonDeveloperScript },
66
+ { name: "common/git-context.sh", content: commonGitContextScript },
67
+ ];
68
+ for (const script of commonScripts) {
69
+ const scriptPath = path.join(cwd, PATHS.SCRIPTS, script.name);
70
+ await writeFile(scriptPath, script.content, { executable: true });
71
+ }
72
+ // Main scripts
73
+ const mainScripts = [
74
+ { name: "init-developer.sh", content: initDeveloperScript },
75
+ { name: "get-developer.sh", content: getDeveloperScript },
76
+ { name: "feature.sh", content: featureScript },
77
+ { name: "get-context.sh", content: getContextScript },
78
+ { name: "add-session.sh", content: addSessionScript },
79
+ { name: "create-bootstrap.sh", content: createBootstrapScript },
80
+ ];
81
+ for (const script of mainScripts) {
82
+ const scriptPath = path.join(cwd, PATHS.SCRIPTS, script.name);
83
+ await writeFile(scriptPath, script.content, { executable: true });
84
+ }
85
+ }
86
+ async function createAgentProgressIndex(cwd) {
87
+ await writeFile(path.join(cwd, PATHS.PROGRESS, "index.md"), agentProgressIndexContent);
88
+ }
89
+ async function createStructureTemplates(cwd, projectType) {
90
+ // Guides structure - always created
91
+ const guidesDocs = [
92
+ { name: "index.md", content: guidesIndexContent },
93
+ {
94
+ name: "cross-layer-thinking-guide.md",
95
+ content: guidesCrossLayerThinkingGuideContent,
96
+ },
97
+ {
98
+ name: "code-reuse-thinking-guide.md",
99
+ content: guidesCodeReuseThinkingGuideContent,
100
+ },
101
+ ];
102
+ for (const doc of guidesDocs) {
103
+ await writeFile(path.join(cwd, `${PATHS.STRUCTURE}/guides`, doc.name), doc.content);
104
+ }
105
+ // Backend structure - for backend/fullstack/unknown
106
+ if (projectType === "backend" ||
107
+ projectType === "fullstack" ||
108
+ projectType === "unknown") {
109
+ const backendDocs = [
110
+ { name: "index.md", content: backendIndexContent },
111
+ {
112
+ name: "directory-structure.md",
113
+ content: backendDirectoryStructureContent,
114
+ },
115
+ {
116
+ name: "database-guidelines.md",
117
+ content: backendDatabaseGuidelinesContent,
118
+ },
119
+ {
120
+ name: "logging-guidelines.md",
121
+ content: backendLoggingGuidelinesContent,
122
+ },
123
+ {
124
+ name: "quality-guidelines.md",
125
+ content: backendQualityGuidelinesContent,
126
+ },
127
+ { name: "error-handling.md", content: backendErrorHandlingContent },
128
+ ];
129
+ for (const doc of backendDocs) {
130
+ await writeFile(path.join(cwd, `${PATHS.STRUCTURE}/backend`, doc.name), doc.content);
131
+ }
132
+ }
133
+ // Frontend structure - for frontend/fullstack/unknown
134
+ if (projectType === "frontend" ||
135
+ projectType === "fullstack" ||
136
+ projectType === "unknown") {
137
+ const frontendDocs = [
138
+ { name: "index.md", content: frontendIndexContent },
139
+ {
140
+ name: "directory-structure.md",
141
+ content: frontendDirectoryStructureContent,
142
+ },
143
+ { name: "type-safety.md", content: frontendTypeSafetyContent },
144
+ { name: "hook-guidelines.md", content: frontendHookGuidelinesContent },
145
+ {
146
+ name: "component-guidelines.md",
147
+ content: frontendComponentGuidelinesContent,
148
+ },
149
+ {
150
+ name: "quality-guidelines.md",
151
+ content: frontendQualityGuidelinesContent,
152
+ },
153
+ {
154
+ name: "state-management.md",
155
+ content: frontendStateManagementContent,
156
+ },
157
+ ];
158
+ for (const doc of frontendDocs) {
159
+ await writeFile(path.join(cwd, `${PATHS.STRUCTURE}/frontend`, doc.name), doc.content);
160
+ }
161
+ }
162
+ }
163
+ async function createWorkflowMd(cwd) {
164
+ await writeFile(path.join(cwd, PATHS.WORKFLOW_GUIDE_FILE), workflowMdContent);
165
+ }
166
+ async function createWorkflowGitignore(cwd) {
167
+ await writeFile(path.join(cwd, DIR_NAMES.WORKFLOW, ".gitignore"), workflowGitignoreContent);
168
+ }
169
+ //# sourceMappingURL=workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEzD,0BAA0B;AAC1B,OAAO;AACL,mBAAmB;AACnB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB;AACtB,eAAe;AACf,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB;AACxB,gCAAgC;AAChC,mBAAmB,EACnB,gCAAgC,EAChC,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B;AAC3B,iCAAiC;AACjC,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,EACzB,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B;AAC9B,mBAAmB;AACnB,kBAAkB,EAClB,oCAAoC,EACpC,mCAAmC,GACpC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAqB/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,GAAW,EACX,OAAyB;IAE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,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAChF,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW;IAChD,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC,EAChD,wBAAwB,CACzB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Path constants for Trellis workflow structure
3
+ *
4
+ * Change these values to rename directories across the entire project.
5
+ * All paths should be relative to the project root.
6
+ */
7
+ export declare const DIR_NAMES: {
8
+ /** Root workflow directory */
9
+ readonly WORKFLOW: ".trellis";
10
+ /** Progress tracking directory (under .trellis/) */
11
+ readonly PROGRESS: "agent-traces";
12
+ /** Features directory (under progress/{developer}/) */
13
+ readonly FEATURES: "features";
14
+ /** Archive directory (under features/) */
15
+ readonly ARCHIVE: "archive";
16
+ /** Structure/guidelines directory (under .trellis/) */
17
+ readonly STRUCTURE: "structure";
18
+ /** Scripts directory (under .trellis/) */
19
+ readonly SCRIPTS: "scripts";
20
+ };
21
+ export declare const FILE_NAMES: {
22
+ /** Developer identity file */
23
+ readonly DEVELOPER: ".developer";
24
+ /** Current feature pointer */
25
+ readonly CURRENT_FEATURE: ".current-feature";
26
+ /** Feature metadata */
27
+ readonly FEATURE_JSON: "feature.json";
28
+ /** Requirements document */
29
+ readonly PRD: "prd.md";
30
+ /** Workflow guide */
31
+ readonly WORKFLOW_GUIDE: "workflow.md";
32
+ };
33
+ export declare const PATHS: {
34
+ /** .trellis/ */
35
+ readonly WORKFLOW: ".trellis";
36
+ /** .trellis/agent-traces/ */
37
+ readonly PROGRESS: ".trellis/agent-traces";
38
+ /** .trellis/structure/ */
39
+ readonly STRUCTURE: ".trellis/structure";
40
+ /** .trellis/scripts/ */
41
+ readonly SCRIPTS: ".trellis/scripts";
42
+ /** .trellis/.developer */
43
+ readonly DEVELOPER_FILE: ".trellis/.developer";
44
+ /** .trellis/.current-feature */
45
+ readonly CURRENT_FEATURE_FILE: ".trellis/.current-feature";
46
+ /** .trellis/workflow.md */
47
+ readonly WORKFLOW_GUIDE_FILE: ".trellis/workflow.md";
48
+ };
49
+ /**
50
+ * Get developer's progress directory path
51
+ * @example getProgressDir("john") => ".trellis/agent-traces/john"
52
+ */
53
+ export declare function getProgressDir(developer: string): string;
54
+ /**
55
+ * Get developer's features directory path
56
+ * @example getFeaturesDir("john") => ".trellis/agent-traces/john/features"
57
+ */
58
+ export declare function getFeaturesDir(developer: string): string;
59
+ /**
60
+ * Get feature directory path
61
+ * @example getFeatureDir("john", "my-feature") => ".trellis/agent-traces/john/features/my-feature"
62
+ */
63
+ export declare function getFeatureDir(developer: string, featureName: string): string;
64
+ /**
65
+ * Get archive directory path
66
+ * @example getArchiveDir("john") => ".trellis/agent-traces/john/features/archive"
67
+ */
68
+ export declare function getArchiveDir(developer: string): string;
69
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,oDAAoD;;IAEpD,uDAAuD;;IAEvD,0CAA0C;;IAE1C,uDAAuD;;IAEvD,0CAA0C;;CAElC,CAAC;AAGX,eAAO,MAAM,UAAU;IACrB,8BAA8B;;IAE9B,8BAA8B;;IAE9B,uBAAuB;;IAEvB,4BAA4B;;IAE5B,qBAAqB;;CAEb,CAAC;AAGX,eAAO,MAAM,KAAK;IAChB,gBAAgB;;IAEhB,6BAA6B;;IAE7B,0BAA0B;;IAE1B,wBAAwB;;IAExB,0BAA0B;;IAE1B,gCAAgC;;IAEhC,2BAA2B;;CAEnB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEvD"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Path constants for Trellis workflow structure
3
+ *
4
+ * Change these values to rename directories across the entire project.
5
+ * All paths should be relative to the project root.
6
+ */
7
+ // Directory names (can be renamed)
8
+ export const DIR_NAMES = {
9
+ /** Root workflow directory */
10
+ WORKFLOW: ".trellis",
11
+ /** Progress tracking directory (under .trellis/) */
12
+ PROGRESS: "agent-traces",
13
+ /** Features directory (under progress/{developer}/) */
14
+ FEATURES: "features",
15
+ /** Archive directory (under features/) */
16
+ ARCHIVE: "archive",
17
+ /** Structure/guidelines directory (under .trellis/) */
18
+ STRUCTURE: "structure",
19
+ /** Scripts directory (under .trellis/) */
20
+ SCRIPTS: "scripts",
21
+ };
22
+ // File names
23
+ export const FILE_NAMES = {
24
+ /** Developer identity file */
25
+ DEVELOPER: ".developer",
26
+ /** Current feature pointer */
27
+ CURRENT_FEATURE: ".current-feature",
28
+ /** Feature metadata */
29
+ FEATURE_JSON: "feature.json",
30
+ /** Requirements document */
31
+ PRD: "prd.md",
32
+ /** Workflow guide */
33
+ WORKFLOW_GUIDE: "workflow.md",
34
+ };
35
+ // Constructed paths (relative to project root)
36
+ export const PATHS = {
37
+ /** .trellis/ */
38
+ WORKFLOW: DIR_NAMES.WORKFLOW,
39
+ /** .trellis/agent-traces/ */
40
+ PROGRESS: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.PROGRESS}`,
41
+ /** .trellis/structure/ */
42
+ STRUCTURE: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.STRUCTURE}`,
43
+ /** .trellis/scripts/ */
44
+ SCRIPTS: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.SCRIPTS}`,
45
+ /** .trellis/.developer */
46
+ DEVELOPER_FILE: `${DIR_NAMES.WORKFLOW}/${FILE_NAMES.DEVELOPER}`,
47
+ /** .trellis/.current-feature */
48
+ CURRENT_FEATURE_FILE: `${DIR_NAMES.WORKFLOW}/${FILE_NAMES.CURRENT_FEATURE}`,
49
+ /** .trellis/workflow.md */
50
+ WORKFLOW_GUIDE_FILE: `${DIR_NAMES.WORKFLOW}/${FILE_NAMES.WORKFLOW_GUIDE}`,
51
+ };
52
+ /**
53
+ * Get developer's progress directory path
54
+ * @example getProgressDir("john") => ".trellis/agent-traces/john"
55
+ */
56
+ export function getProgressDir(developer) {
57
+ return `${PATHS.PROGRESS}/${developer}`;
58
+ }
59
+ /**
60
+ * Get developer's features directory path
61
+ * @example getFeaturesDir("john") => ".trellis/agent-traces/john/features"
62
+ */
63
+ export function getFeaturesDir(developer) {
64
+ return `${getProgressDir(developer)}/${DIR_NAMES.FEATURES}`;
65
+ }
66
+ /**
67
+ * Get feature directory path
68
+ * @example getFeatureDir("john", "my-feature") => ".trellis/agent-traces/john/features/my-feature"
69
+ */
70
+ export function getFeatureDir(developer, featureName) {
71
+ return `${getFeaturesDir(developer)}/${featureName}`;
72
+ }
73
+ /**
74
+ * Get archive directory path
75
+ * @example getArchiveDir("john") => ".trellis/agent-traces/john/features/archive"
76
+ */
77
+ export function getArchiveDir(developer) {
78
+ return `${getFeaturesDir(developer)}/${DIR_NAMES.ARCHIVE}`;
79
+ }
80
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,UAAU;IACpB,oDAAoD;IACpD,QAAQ,EAAE,cAAc;IACxB,uDAAuD;IACvD,QAAQ,EAAE,U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C,OAAO,GAAG,cAAc,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,WAAmB;IAClE,OAAO,GAAG,cAAc,CAAC,SAAS,CAAC,IAAI,WAAW,EAAE,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,OAAO,GAAG,cAAc,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Trellis - AI-assisted development workflow framework
3
+ *
4
+ * Based on Anthropic's "Effective Harnesses for Long-Running Agents"
5
+ * https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
6
+ */
7
+ export { VERSION } from "./cli/index.js";
8
+ export { init } from "./commands/init.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Trellis - AI-assisted development workflow framework
3
+ *
4
+ * Based on Anthropic's "Effective Harnesses for Long-Running Agents"
5
+ * https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents
6
+ */
7
+ export { VERSION } from "./cli/index.js";
8
+ export { init } from "./commands/init.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}