@letra-ai/cli 0.4.1 → 0.6.1

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 (96) hide show
  1. package/dist/chunk-4QDEU6KP.js +2765 -0
  2. package/dist/chunk-6HSUVCTR.js +363 -0
  3. package/dist/chunk-BKAUN5QH.js +300 -0
  4. package/dist/chunk-BTPFUKHG.js +275 -0
  5. package/dist/chunk-EDD55PWL.js +119 -0
  6. package/dist/chunk-ELBTIPYN.js +256 -0
  7. package/dist/chunk-IEFSLCJL.js +837 -0
  8. package/dist/chunk-JMIC5NKB.js +235 -0
  9. package/dist/chunk-KGQLHMGZ.js +4494 -0
  10. package/dist/chunk-MJ2QXNH6.js +130 -0
  11. package/dist/chunk-MSF44WWE.js +443 -0
  12. package/dist/chunk-PDX44BCA.js +11 -0
  13. package/dist/chunk-QIVKP3EY.js +362 -0
  14. package/dist/client/assets/index-BuABgOyz.js +232 -0
  15. package/dist/client/assets/index-CpseCZh9.css +1 -0
  16. package/dist/client/favicon.svg +15 -3
  17. package/dist/client/index.html +10 -5
  18. package/dist/fallback-UXSZ4LNR.js +47 -0
  19. package/dist/flow-serve-MTB6KZMR.js +19 -0
  20. package/dist/focus-sync-3D3XWCTI.js +17 -0
  21. package/dist/generate-N22QOXUF.js +20 -0
  22. package/dist/harness/default/v0.1.0/flows/sdlc.yaml +179 -0
  23. package/dist/harness/default/v0.1.0/gates/all-acs-passing.yaml +8 -0
  24. package/dist/harness/default/v0.1.0/gates/has-spec-file.yaml +7 -0
  25. package/dist/harness/default/v0.1.0/gates/human-approved-code.yaml +8 -0
  26. package/dist/harness/default/v0.1.0/gates/human-approved-spec.yaml +8 -0
  27. package/dist/harness/default/v0.1.0/gates/security-clear.yaml +8 -0
  28. package/dist/harness/default/v0.1.0/policies/sdlc-default.json +20 -0
  29. package/dist/harness/default/v0.1.0/roles/analyst.yaml +9 -0
  30. package/dist/harness/default/v0.1.0/roles/builder.yaml +9 -0
  31. package/dist/harness/default/v0.1.0/roles/pr-bot.yaml +8 -0
  32. package/dist/harness/default/v0.1.0/roles/reviewer.yaml +10 -0
  33. package/dist/harness/default/v0.1.0/roles/security.yaml +8 -0
  34. package/dist/harness/default/v0.1.1/flows/flow-main.yaml +61 -0
  35. package/dist/harness/default/v0.1.1/flows/sdlc.yaml +179 -0
  36. package/dist/harness/default/v0.1.1/gates/all-acs-passing.yaml +8 -0
  37. package/dist/harness/default/v0.1.1/gates/has-spec-file.yaml +7 -0
  38. package/dist/harness/default/v0.1.1/gates/human-approved-code.yaml +8 -0
  39. package/dist/harness/default/v0.1.1/gates/human-approved-spec.yaml +8 -0
  40. package/dist/harness/default/v0.1.1/gates/security-clear.yaml +8 -0
  41. package/dist/harness/default/v0.1.1/policies/sdlc-default.json +20 -0
  42. package/dist/harness/default/v0.1.1/roles/analyst.yaml +9 -0
  43. package/dist/harness/default/v0.1.1/roles/builder.yaml +9 -0
  44. package/dist/harness/default/v0.1.1/roles/pr-bot.yaml +8 -0
  45. package/dist/harness/default/v0.1.1/roles/reviewer.yaml +10 -0
  46. package/dist/harness/default/v0.1.1/roles/security.yaml +8 -0
  47. package/dist/harness/default/v0.1.2/flows/flow-main.yaml +86 -0
  48. package/dist/harness/default/v0.1.2/flows/sdlc.yaml +179 -0
  49. package/dist/harness/default/v0.1.2/gates/all-acs-passing.yaml +8 -0
  50. package/dist/harness/default/v0.1.2/gates/has-spec-file.yaml +7 -0
  51. package/dist/harness/default/v0.1.2/gates/human-approved-code.yaml +8 -0
  52. package/dist/harness/default/v0.1.2/gates/human-approved-spec.yaml +8 -0
  53. package/dist/harness/default/v0.1.2/gates/security-clear.yaml +8 -0
  54. package/dist/harness/default/v0.1.2/policies/sdlc-default.json +20 -0
  55. package/dist/harness/default/v0.1.2/roles/analyst.yaml +9 -0
  56. package/dist/harness/default/v0.1.2/roles/builder.yaml +9 -0
  57. package/dist/harness/default/v0.1.2/roles/pr-bot.yaml +8 -0
  58. package/dist/harness/default/v0.1.2/roles/reviewer.yaml +10 -0
  59. package/dist/harness/default/v0.1.2/roles/security.yaml +8 -0
  60. package/dist/harness/default/v0.1.3/flows/flow-main.yaml +90 -0
  61. package/dist/harness/default/v0.1.3/flows/sdlc.yaml +179 -0
  62. package/dist/harness/default/v0.1.3/gates/all-acs-passing.yaml +8 -0
  63. package/dist/harness/default/v0.1.3/gates/has-spec-file.yaml +7 -0
  64. package/dist/harness/default/v0.1.3/gates/human-approved-code.yaml +9 -0
  65. package/dist/harness/default/v0.1.3/gates/human-approved-spec.yaml +9 -0
  66. package/dist/harness/default/v0.1.3/gates/security-clear.yaml +8 -0
  67. package/dist/harness/default/v0.1.3/policies/sdlc-default.json +20 -0
  68. package/dist/harness/default/v0.1.3/roles/analyst.yaml +9 -0
  69. package/dist/harness/default/v0.1.3/roles/builder.yaml +9 -0
  70. package/dist/harness/default/v0.1.3/roles/pr-bot.yaml +8 -0
  71. package/dist/harness/default/v0.1.3/roles/reviewer.yaml +10 -0
  72. package/dist/harness/default/v0.1.3/roles/security.yaml +8 -0
  73. package/dist/harness/default/v0.2.0/executors/registry.yaml +51 -0
  74. package/dist/harness/default/v0.2.0/flows/flow-main.yaml +247 -0
  75. package/dist/harness/default/v0.2.0/gates/code-reviewed.yaml +7 -0
  76. package/dist/harness/default/v0.2.0/gates/human-approved.yaml +10 -0
  77. package/dist/harness/default/v0.2.0/gates/security-clear.yaml +7 -0
  78. package/dist/harness/default/v0.2.0/gates/spec-approved.yaml +10 -0
  79. package/dist/harness/default/v0.2.0/policies/sdlc-default.json +20 -0
  80. package/dist/harness/default/v0.2.0/roles/analyst.yaml +16 -0
  81. package/dist/harness/default/v0.2.0/roles/implementer.yaml +17 -0
  82. package/dist/harness/default/v0.2.0/roles/reviewer.yaml +17 -0
  83. package/dist/harness/default/v0.2.0/roles/security.yaml +17 -0
  84. package/dist/health-record-YDVXEVLR.js +21 -0
  85. package/dist/index.js +2595 -3046
  86. package/dist/init-wizard-NODBBNKO.js +178 -0
  87. package/dist/push-5JEYSXBY.js +116 -0
  88. package/dist/registry-6VPIA3EG.js +18 -0
  89. package/dist/server-FUP3APZA.js +415 -0
  90. package/dist/service-OGF7BMCQ.js +21 -0
  91. package/dist/session-log-WTQ5JBEN.js +21 -0
  92. package/dist/sitrep-DJXTP3JO.js +16 -0
  93. package/package.json +11 -2
  94. package/dist/client/assets/index-9KbFvLoH.css +0 -1
  95. package/dist/client/assets/index-s9Re0Bnf.js +0 -84
  96. package/tsup.config.ts +0 -11
@@ -0,0 +1,235 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/adapters/registry.ts
4
+ var ADAPTER_ARTIFACTS = {
5
+ "cursor-rules": {
6
+ id: "cursor-rules",
7
+ path: ".cursorrules",
8
+ format: "at",
9
+ kind: "instructions",
10
+ consumers: ["cursor"],
11
+ ownership: "letra-owned"
12
+ },
13
+ "claude-instructions": {
14
+ id: "claude-instructions",
15
+ path: "CLAUDE.md",
16
+ format: "text",
17
+ kind: "instructions",
18
+ consumers: ["claude-code"],
19
+ ownership: "letra-owned"
20
+ },
21
+ "windsurf-rules": {
22
+ id: "windsurf-rules",
23
+ path: ".windsurfrules",
24
+ format: "at",
25
+ kind: "instructions",
26
+ consumers: ["windsurf"],
27
+ ownership: "letra-owned"
28
+ },
29
+ "vscode-instructions": {
30
+ id: "vscode-instructions",
31
+ path: ".github/copilot-instructions.md",
32
+ format: "text",
33
+ kind: "instructions",
34
+ consumers: ["vscode"],
35
+ ownership: "letra-owned"
36
+ },
37
+ "opencode-instructions": {
38
+ id: "opencode-instructions",
39
+ path: ".opencode/instructions.md",
40
+ format: "text",
41
+ kind: "instructions",
42
+ consumers: ["opencode"],
43
+ ownership: "letra-owned"
44
+ },
45
+ "agents-md-shared": {
46
+ id: "agents-md-shared",
47
+ path: "AGENTS.md",
48
+ format: "text",
49
+ kind: "instructions",
50
+ consumers: ["opencode", "codex"],
51
+ ownership: "letra-owned"
52
+ },
53
+ "codex-project-config": {
54
+ id: "codex-project-config",
55
+ path: ".codex/config.toml",
56
+ format: "toml",
57
+ kind: "config",
58
+ consumers: ["codex"],
59
+ ownership: "managed-section"
60
+ },
61
+ "letra-harness-skill": {
62
+ id: "letra-harness-skill",
63
+ path: ".agents/skills/letra-harness/SKILL.md",
64
+ format: "skill",
65
+ kind: "skill",
66
+ consumers: ["codex"],
67
+ ownership: "letra-owned"
68
+ },
69
+ "hermes-instructions": {
70
+ id: "hermes-instructions",
71
+ path: ".hermes/instructions.md",
72
+ format: "text",
73
+ kind: "instructions",
74
+ consumers: ["hermes"],
75
+ ownership: "letra-owned"
76
+ }
77
+ };
78
+ var staticCapabilities = {
79
+ instructions: true,
80
+ nestedInstructions: false,
81
+ skills: false,
82
+ mcp: false,
83
+ hooks: false,
84
+ liveContext: "none",
85
+ refreshMode: "session-start"
86
+ };
87
+ var ADAPTER_REGISTRY = {
88
+ cursor: {
89
+ id: "cursor",
90
+ displayName: "Cursor",
91
+ capabilities: staticCapabilities,
92
+ artifactIds: ["cursor-rules"],
93
+ detectionPaths: [".cursorrules"],
94
+ fallbackTransport: "cli-json"
95
+ },
96
+ "claude-code": {
97
+ id: "claude-code",
98
+ displayName: "Claude Code",
99
+ capabilities: staticCapabilities,
100
+ artifactIds: ["claude-instructions"],
101
+ detectionPaths: ["CLAUDE.md"],
102
+ fallbackTransport: "cli-json"
103
+ },
104
+ windsurf: {
105
+ id: "windsurf",
106
+ displayName: "Windsurf",
107
+ capabilities: staticCapabilities,
108
+ artifactIds: ["windsurf-rules"],
109
+ detectionPaths: [".windsurfrules"],
110
+ fallbackTransport: "cli-json"
111
+ },
112
+ vscode: {
113
+ id: "vscode",
114
+ displayName: "VSCode Copilot",
115
+ capabilities: staticCapabilities,
116
+ artifactIds: ["vscode-instructions"],
117
+ detectionPaths: [".github/copilot-instructions.md"],
118
+ fallbackTransport: "cli-json"
119
+ },
120
+ opencode: {
121
+ id: "opencode",
122
+ displayName: "OpenCode",
123
+ capabilities: {
124
+ ...staticCapabilities,
125
+ skills: true
126
+ },
127
+ artifactIds: ["opencode-instructions", "agents-md-shared"],
128
+ detectionPaths: [".opencode/instructions.md", "AGENTS.md"],
129
+ fallbackTransport: "cli-json"
130
+ },
131
+ codex: {
132
+ id: "codex",
133
+ displayName: "Codex",
134
+ capabilities: {
135
+ instructions: true,
136
+ nestedInstructions: true,
137
+ skills: true,
138
+ mcp: true,
139
+ hooks: true,
140
+ liveContext: "mcp",
141
+ refreshMode: "on-demand"
142
+ },
143
+ artifactIds: ["agents-md-shared", "codex-project-config", "letra-harness-skill"],
144
+ detectionPaths: [".codex/config.toml"],
145
+ fallbackTransport: "cli-json"
146
+ },
147
+ hermes: {
148
+ id: "hermes",
149
+ displayName: "Hermes Agent",
150
+ capabilities: staticCapabilities,
151
+ artifactIds: ["hermes-instructions"],
152
+ detectionPaths: [".hermes/instructions.md"],
153
+ fallbackTransport: "cli-json"
154
+ }
155
+ };
156
+ function adapterInstructionTargets() {
157
+ return Object.fromEntries(
158
+ Object.values(ADAPTER_REGISTRY).map((adapter) => {
159
+ const artifacts = adapter.artifactIds.map((id) => ADAPTER_ARTIFACTS[id]).filter((artifact) => artifact.kind === "instructions");
160
+ const format = artifacts[0]?.format;
161
+ if (format !== "at" && format !== "text") {
162
+ throw new Error(`Adapter "${adapter.id}" has no instruction artifact.`);
163
+ }
164
+ if (artifacts.some((artifact) => artifact.format !== format)) {
165
+ throw new Error(`Adapter "${adapter.id}" mixes instruction formats.`);
166
+ }
167
+ return [
168
+ adapter.id,
169
+ {
170
+ paths: artifacts.map((artifact) => artifact.path),
171
+ format,
172
+ displayName: adapter.displayName
173
+ }
174
+ ];
175
+ })
176
+ );
177
+ }
178
+ function adapterDiagnosticFiles() {
179
+ const instructionTargets = adapterInstructionTargets();
180
+ return Object.fromEntries(
181
+ Object.values(ADAPTER_REGISTRY).map((adapter) => {
182
+ const target = instructionTargets[adapter.id];
183
+ const sharedAgentsPath = target.paths.includes("AGENTS.md") ? "AGENTS.md" : null;
184
+ return [
185
+ adapter.id,
186
+ {
187
+ path: sharedAgentsPath ?? target.paths[0],
188
+ format: target.format
189
+ }
190
+ ];
191
+ })
192
+ );
193
+ }
194
+ function instructionArtifactsForAdapters(adapterIds) {
195
+ const selected = new Set(adapterIds.filter((id) => id in ADAPTER_REGISTRY));
196
+ return Object.values(ADAPTER_ARTIFACTS).filter(
197
+ (artifact) => artifact.kind === "instructions" && artifact.consumers.some((consumer) => selected.has(consumer))
198
+ ).map((artifact) => {
199
+ if (artifact.format !== "at" && artifact.format !== "text") {
200
+ throw new Error(`Artifact "${artifact.id}" is not an instruction format.`);
201
+ }
202
+ const selectedConsumers = artifact.consumers.filter(
203
+ (consumer) => selected.has(consumer)
204
+ );
205
+ const displayName = artifact.id === "agents-md-shared" ? "OpenCode + Codex" : ADAPTER_REGISTRY[selectedConsumers[0]].displayName;
206
+ return {
207
+ id: artifact.id,
208
+ path: artifact.path,
209
+ paths: [artifact.path],
210
+ format: artifact.format,
211
+ displayName,
212
+ tool: selectedConsumers.join(",")
213
+ };
214
+ });
215
+ }
216
+ function supportedAdapterTools() {
217
+ const targets = adapterInstructionTargets();
218
+ return Object.values(ADAPTER_REGISTRY).map((adapter) => ({
219
+ ...adapter,
220
+ label: adapter.displayName,
221
+ paths: [...targets[adapter.id].paths],
222
+ detectionPaths: [...adapter.detectionPaths],
223
+ artifactIds: [...adapter.artifactIds],
224
+ capabilities: { ...adapter.capabilities }
225
+ }));
226
+ }
227
+
228
+ export {
229
+ ADAPTER_ARTIFACTS,
230
+ ADAPTER_REGISTRY,
231
+ adapterInstructionTargets,
232
+ adapterDiagnosticFiles,
233
+ instructionArtifactsForAdapters,
234
+ supportedAdapterTools
235
+ };