ralphctl 0.4.2 → 0.4.4

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 (31) hide show
  1. package/README.md +13 -11
  2. package/dist/{add-CIM72NE3.mjs → add-DVPVHENV.mjs} +7 -7
  3. package/dist/{add-GX7P7XTT.mjs → add-YVXM34RP.mjs} +6 -5
  4. package/dist/{chunk-GL7MKLLS.mjs → chunk-ACRMBVEE.mjs} +458 -181
  5. package/dist/{chunk-NUYQK5MN.mjs → chunk-BSB4EDGR.mjs} +2 -2
  6. package/dist/{chunk-YCDUVPRT.mjs → chunk-CBMFRQ4Y.mjs} +5 -73
  7. package/dist/{chunk-3QBEBKMZ.mjs → chunk-FNAAA32W.mjs} +7 -7
  8. package/dist/{chunk-JOQO4HMM.mjs → chunk-GQ2WFKBN.mjs} +11 -11
  9. package/dist/{chunk-TKPTT2UG.mjs → chunk-OFILN7QL.mjs} +798 -1023
  10. package/dist/{chunk-7JLZQICD.mjs → chunk-OGEXYSFS.mjs} +7 -7
  11. package/dist/{chunk-D2YGPLIV.mjs → chunk-PYZEQ2VK.mjs} +214 -9
  12. package/dist/{chunk-57UWLHRH.mjs → chunk-VAZ3LJBI.mjs} +12 -1
  13. package/dist/{chunk-CTP2A436.mjs → chunk-WDMLPXOD.mjs} +11 -4
  14. package/dist/{chunk-FKMKOWLA.mjs → chunk-XN2UIHBY.mjs} +84 -3
  15. package/dist/chunk-ZLWSPLWI.mjs +1117 -0
  16. package/dist/cli.mjs +72 -21
  17. package/dist/create-Z635FQKO.mjs +15 -0
  18. package/dist/{handle-BBAZJ44Y.mjs → handle-23EFF3BE.mjs} +1 -1
  19. package/dist/{mount-ISHZM36X.mjs → mount-VEV3TESX.mjs} +1702 -1202
  20. package/dist/{project-2IE7VWDB.mjs → project-DQHF4ISP.mjs} +3 -3
  21. package/dist/prompts/check-script-discover.md +69 -0
  22. package/dist/prompts/repo-onboard.md +111 -0
  23. package/dist/prompts/sprint-feedback.md +4 -0
  24. package/dist/prompts/task-evaluation.md +44 -2
  25. package/dist/prompts/task-execution.md +5 -0
  26. package/dist/{resolver-EOE5WUMV.mjs → resolver-OVPYVW6Q.mjs} +4 -4
  27. package/dist/{sprint-OGOFEJJH.mjs → sprint-4E26AB5F.mjs} +4 -4
  28. package/dist/start-2WH4BTDB.mjs +19 -0
  29. package/package.json +6 -6
  30. package/dist/create-7WFSCMP4.mjs +0 -15
  31. package/dist/start-76JKJQIH.mjs +0 -17
@@ -8,13 +8,13 @@ import {
8
8
  readValidatedJson,
9
9
  validateProjectPath,
10
10
  writeValidatedJson
11
- } from "./chunk-CTP2A436.mjs";
11
+ } from "./chunk-WDMLPXOD.mjs";
12
12
  import {
13
13
  ParseError,
14
14
  ProjectExistsError,
15
15
  ProjectNotFoundError,
16
16
  ValidationError
17
- } from "./chunk-57UWLHRH.mjs";
17
+ } from "./chunk-VAZ3LJBI.mjs";
18
18
 
19
19
  // src/integration/persistence/project.ts
20
20
  import { basename, resolve } from "path";
@@ -1,12 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ getCurrentSprint,
3
4
  log
4
- } from "./chunk-FKMKOWLA.mjs";
5
- import {
6
- unwrapOrThrow
7
- } from "./chunk-IWXBJD2D.mjs";
5
+ } from "./chunk-XN2UIHBY.mjs";
8
6
  import {
9
- ConfigSchema,
10
7
  SprintSchema,
11
8
  TasksSchema,
12
9
  appendToFile,
@@ -14,7 +11,6 @@ import {
14
11
  ensureDir,
15
12
  fileExists,
16
13
  generateSprintId,
17
- getConfigPath,
18
14
  getProgressFilePath,
19
15
  getSprintDir,
20
16
  getSprintFilePath,
@@ -25,68 +21,14 @@ import {
25
21
  readValidatedJson,
26
22
  removeDir,
27
23
  writeValidatedJson
28
- } from "./chunk-CTP2A436.mjs";
24
+ } from "./chunk-WDMLPXOD.mjs";
29
25
  import {
30
26
  LockError,
31
27
  NoCurrentSprintError,
32
28
  SprintNotFoundError,
33
29
  SprintStatusError,
34
30
  StorageError
35
- } from "./chunk-57UWLHRH.mjs";
36
-
37
- // src/integration/persistence/config.ts
38
- var DEFAULT_EVALUATION_ITERATIONS = 1;
39
- var DEFAULT_CONFIG = {
40
- currentSprint: null,
41
- aiProvider: null,
42
- editor: null
43
- };
44
- async function getConfig() {
45
- const configPath = getConfigPath();
46
- if (!await fileExists(configPath)) {
47
- return DEFAULT_CONFIG;
48
- }
49
- return unwrapOrThrow(await readValidatedJson(configPath, ConfigSchema));
50
- }
51
- async function saveConfig(config) {
52
- unwrapOrThrow(await writeValidatedJson(getConfigPath(), config, ConfigSchema));
53
- }
54
- async function getCurrentSprint() {
55
- const config = await getConfig();
56
- return config.currentSprint;
57
- }
58
- async function setCurrentSprint(sprintId) {
59
- const config = await getConfig();
60
- config.currentSprint = sprintId;
61
- await saveConfig(config);
62
- }
63
- async function getAiProvider() {
64
- const config = await getConfig();
65
- return config.aiProvider ?? null;
66
- }
67
- async function setAiProvider(provider) {
68
- const config = await getConfig();
69
- config.aiProvider = provider;
70
- await saveConfig(config);
71
- }
72
- async function getEditor() {
73
- const config = await getConfig();
74
- return config.editor ?? null;
75
- }
76
- async function setEditor(editor) {
77
- const config = await getConfig();
78
- config.editor = editor;
79
- await saveConfig(config);
80
- }
81
- async function getEvaluationIterations() {
82
- const config = await getConfig();
83
- return config.evaluationIterations ?? DEFAULT_EVALUATION_ITERATIONS;
84
- }
85
- async function setEvaluationIterations(iterations) {
86
- const config = await getConfig();
87
- config.evaluationIterations = iterations;
88
- await saveConfig(config);
89
- }
31
+ } from "./chunk-VAZ3LJBI.mjs";
90
32
 
91
33
  // src/integration/persistence/progress.ts
92
34
  import { execSync } from "child_process";
@@ -267,7 +209,7 @@ async function getProgress(sprintId) {
267
209
  const id = await resolveSprintId(sprintId);
268
210
  const result = await readTextFile(getProgressFilePath(id));
269
211
  if (!result.ok) {
270
- if (result.error instanceof StorageError && result.error.cause?.code === "ENOENT") {
212
+ if (result.error instanceof StorageError && result.error.cause && "code" in result.error.cause && result.error.cause.code === "ENOENT") {
271
213
  return "";
272
214
  }
273
215
  throw result.error;
@@ -481,16 +423,6 @@ async function resolveSprintId(sprintId) {
481
423
  }
482
424
 
483
425
  export {
484
- getConfig,
485
- saveConfig,
486
- getCurrentSprint,
487
- setCurrentSprint,
488
- getAiProvider,
489
- setAiProvider,
490
- getEditor,
491
- setEditor,
492
- getEvaluationIterations,
493
- setEvaluationIterations,
494
426
  withFileLock,
495
427
  logProgress,
496
428
  getProgress,
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- listProjects
4
- } from "./chunk-NUYQK5MN.mjs";
5
2
  import {
6
3
  EXIT_ERROR,
7
4
  exitWithCode
@@ -10,19 +7,22 @@ import {
10
7
  getPrompt
11
8
  } from "./chunk-747KW2RW.mjs";
12
9
  import {
13
- createSprint,
14
- setCurrentSprint
15
- } from "./chunk-YCDUVPRT.mjs";
10
+ listProjects
11
+ } from "./chunk-BSB4EDGR.mjs";
12
+ import {
13
+ createSprint
14
+ } from "./chunk-CBMFRQ4Y.mjs";
16
15
  import {
17
16
  emoji,
18
17
  field,
19
18
  formatSprintStatus,
20
19
  icons,
20
+ setCurrentSprint,
21
21
  showError,
22
22
  showNextStep,
23
23
  showRandomQuote,
24
24
  showSuccess
25
- } from "./chunk-FKMKOWLA.mjs";
25
+ } from "./chunk-XN2UIHBY.mjs";
26
26
 
27
27
  // src/integration/cli/commands/sprint/create.ts
28
28
  async function sprintCreateCommand(options = {}) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  assertSprintStatus,
4
4
  resolveSprintId
5
- } from "./chunk-YCDUVPRT.mjs";
5
+ } from "./chunk-CBMFRQ4Y.mjs";
6
6
  import {
7
7
  unwrapOrThrow
8
8
  } from "./chunk-IWXBJD2D.mjs";
@@ -12,11 +12,18 @@ import {
12
12
  getSprintFilePath,
13
13
  readValidatedJson,
14
14
  writeValidatedJson
15
- } from "./chunk-CTP2A436.mjs";
15
+ } from "./chunk-WDMLPXOD.mjs";
16
16
  import {
17
17
  IssueFetchError,
18
18
  TicketNotFoundError
19
- } from "./chunk-57UWLHRH.mjs";
19
+ } from "./chunk-VAZ3LJBI.mjs";
20
+
21
+ // src/domain/strings.ts
22
+ function truncate(str, max) {
23
+ if (str.length <= max) return str;
24
+ if (max <= 1) return "\u2026".slice(0, Math.max(0, max));
25
+ return str.slice(0, max - 1) + "\u2026";
26
+ }
20
27
 
21
28
  // src/integration/persistence/ticket.ts
22
29
  async function getSprintData(sprintId) {
@@ -99,13 +106,6 @@ function formatTicketDisplay(ticket) {
99
106
  return `[${ticket.id}] ${ticket.title}`;
100
107
  }
101
108
 
102
- // src/domain/strings.ts
103
- function truncate(str, max) {
104
- if (str.length <= max) return str;
105
- if (max <= 1) return "\u2026".slice(0, Math.max(0, max));
106
- return str.slice(0, max - 1) + "\u2026";
107
- }
108
-
109
109
  // src/integration/external/issue-fetch.ts
110
110
  import { spawnSync } from "child_process";
111
111
  import { Result } from "typescript-result";
@@ -255,6 +255,7 @@ function formatIssueContext(data) {
255
255
  }
256
256
 
257
257
  export {
258
+ truncate,
258
259
  addTicket,
259
260
  updateTicket,
260
261
  removeTicket,
@@ -263,7 +264,6 @@ export {
263
264
  allRequirementsApproved,
264
265
  getPendingRequirements,
265
266
  formatTicketDisplay,
266
- truncate,
267
267
  fetchIssueFromUrl,
268
268
  formatIssueContext
269
269
  };