spets 0.1.98 → 0.1.99

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.
@@ -96,6 +96,24 @@ function clearConfigCache() {
96
96
  configCachePath = null;
97
97
  stepDefinitionCache.clear();
98
98
  }
99
+ function loadStepDefinition(stepName, cwd = process.cwd()) {
100
+ const cacheKey = `${cwd}:${stepName}`;
101
+ if (stepDefinitionCache.has(cacheKey)) {
102
+ return stepDefinitionCache.get(cacheKey);
103
+ }
104
+ const stepDir = join(getStepsDir(cwd), stepName);
105
+ const templatePath = join(stepDir, "template.md");
106
+ const template = existsSync(templatePath) ? readFileSync(templatePath, "utf-8") : void 0;
107
+ const stepDef = {
108
+ name: stepName,
109
+ template
110
+ };
111
+ stepDefinitionCache.set(cacheKey, stepDef);
112
+ return stepDef;
113
+ }
114
+ function loadAllSteps(config, cwd = process.cwd()) {
115
+ return config.steps.map((stepName) => loadStepDefinition(stepName, cwd));
116
+ }
99
117
  function getGitHubConfig(cwd = process.cwd()) {
100
118
  const config = loadConfig(cwd);
101
119
  return config.github;
@@ -109,5 +127,6 @@ export {
109
127
  spetsExists,
110
128
  loadConfig,
111
129
  clearConfigCache,
130
+ loadAllSteps,
112
131
  getGitHubConfig
113
132
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getSpetsDir,
3
3
  getStepsDir
4
- } from "./chunk-BQWHTHA3.js";
4
+ } from "./chunk-2MUV3F53.js";
5
5
 
6
6
  // src/ui/sections/docs.ts
7
7
  import { readFileSync, existsSync, readdirSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getSpetsDir
3
- } from "./chunk-BQWHTHA3.js";
3
+ } from "./chunk-2MUV3F53.js";
4
4
 
5
5
  // src/ui/sections/knowledge.ts
6
6
  import { spawnSync } from "child_process";
@@ -204,6 +204,9 @@ async function runKnowledgeInteractive(cwd = process.cwd()) {
204
204
  }
205
205
 
206
206
  export {
207
+ getKnowledgeDir,
208
+ listKnowledgeFiles,
209
+ loadKnowledgeFile,
207
210
  loadKnowledgeFiles,
208
211
  saveKnowledge,
209
212
  loadGuide,
@@ -2,7 +2,7 @@ import {
2
2
  clearConfigCache,
3
3
  getConfigPath,
4
4
  loadConfig
5
- } from "./chunk-BQWHTHA3.js";
5
+ } from "./chunk-2MUV3F53.js";
6
6
 
7
7
  // src/ui/sections/config.ts
8
8
  import { writeFileSync } from "fs";
@@ -2,7 +2,7 @@ import {
2
2
  getOutputsDir,
3
3
  loadConfig,
4
4
  spetsExists
5
- } from "./chunk-BQWHTHA3.js";
5
+ } from "./chunk-2MUV3F53.js";
6
6
 
7
7
  // src/ui/sections/tasks.ts
8
8
  import { select as select2 } from "@inquirer/prompts";
@@ -530,6 +530,7 @@ To resume this task, run:`);
530
530
 
531
531
  export {
532
532
  generateTaskId,
533
+ loadDocument,
533
534
  listTasks,
534
535
  getWorkflowState,
535
536
  loadTaskMetadata,
@@ -3,8 +3,8 @@ import {
3
3
  renderConfigJSON,
4
4
  runConfigInteractive,
5
5
  setConfigField
6
- } from "./chunk-HXNXQAVN.js";
7
- import "./chunk-BQWHTHA3.js";
6
+ } from "./chunk-BCOGSLCX.js";
7
+ import "./chunk-2MUV3F53.js";
8
8
  export {
9
9
  openConfigInEditor,
10
10
  renderConfigJSON,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  renderDocsJSON,
3
3
  runDocsInteractive
4
- } from "./chunk-3OOPOFUK.js";
5
- import "./chunk-BQWHTHA3.js";
4
+ } from "./chunk-3JIHGW47.js";
5
+ import "./chunk-2MUV3F53.js";
6
6
  export {
7
7
  renderDocsJSON,
8
8
  runDocsInteractive