@lumenflow/initiatives 1.0.0 → 1.3.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.
@@ -29,6 +29,7 @@ import { WU_PATHS } from '@lumenflow/core/lib/wu-paths.js';
29
29
  import { parseYAML } from '@lumenflow/core/lib/wu-yaml.js';
30
30
  // WU-2027: Import spawn generation for embedding in orchestration output
31
31
  import { generateTaskInvocation } from '@lumenflow/core/lib/wu-spawn.js';
32
+ import { SpawnStrategyFactory } from '@lumenflow/core/lib/spawn-strategy.js';
32
33
  /**
33
34
  * Wave manifest directory path (gitignored).
34
35
  */
@@ -940,7 +941,7 @@ export function generateEmbeddedSpawnPrompt(wuId) {
940
941
  const doc = parseYAML(text);
941
942
  // Generate the full Task invocation (includes XML wrapper)
942
943
  // The prompt is already XML-escaped in generateTaskInvocation
943
- return generateTaskInvocation(doc, wuId, {});
944
+ return generateTaskInvocation(doc, wuId, SpawnStrategyFactory.create('claude-code'));
944
945
  }
945
946
  /**
946
947
  * WU-2027: Format a Task invocation with embedded spawn content for a WU.
@@ -953,7 +954,7 @@ export function generateEmbeddedSpawnPrompt(wuId) {
953
954
  */
954
955
  export function formatTaskInvocationWithEmbeddedSpawn(wu) {
955
956
  // Generate the full Task invocation for this WU
956
- return generateTaskInvocation(wu.doc, wu.id, {});
957
+ return generateTaskInvocation(wu.doc, wu.id, SpawnStrategyFactory.create('claude-code'));
957
958
  }
958
959
  /**
959
960
  * WU-2027: Format execution plan with embedded spawns (no meta-prompts).
@@ -992,7 +993,7 @@ export function formatExecutionPlanWithEmbeddedSpawns(plan) {
992
993
  const closeTag = '</' + 'antml:function_calls>';
993
994
  xmlLines.push(openTag);
994
995
  for (const wu of wave) {
995
- const fullInvocation = generateTaskInvocation(wu.doc, wu.id, {});
996
+ const fullInvocation = generateTaskInvocation(wu.doc, wu.id, SpawnStrategyFactory.create('claude-code'));
996
997
  // Extract just the inner invoke block (remove outer function_calls wrapper)
997
998
  // Use indexOf for reliable extraction (regex can have escaping issues)
998
999
  const startPattern = '<' + 'antml:invoke';
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable security/detect-non-literal-fs-filename */
2
2
  import { existsSync, readFileSync, writeFileSync, readdirSync } from 'node:fs';
3
3
  import path from 'node:path';
4
- import yaml from 'js-yaml';
4
+ import { parseYAML, stringifyYAML } from '@lumenflow/core/dist/wu-yaml.js';
5
5
  import { createError, ErrorCodes } from '@lumenflow/core/dist/error-handler.js';
6
6
  import { validateInitiative } from './initiative-schema.js';
7
7
  import { INIT_PATHS } from './initiative-paths.js';
@@ -50,7 +50,7 @@ export function readInitiative(initPath, expectedId) {
50
50
  const text = readFileSync(initPath, { encoding: 'utf-8' });
51
51
  let rawDoc;
52
52
  try {
53
- rawDoc = yaml.load(text);
53
+ rawDoc = parseYAML(text);
54
54
  }
55
55
  catch (e) {
56
56
  const errorMessage = e instanceof Error ? e.message : String(e);
@@ -86,7 +86,7 @@ export function readInitiative(initPath, expectedId) {
86
86
  * @param {object} doc - YAML document to write
87
87
  */
88
88
  export function writeInitiative(initPath, doc) {
89
- const out = yaml.dump(doc, { lineWidth: 100 });
89
+ const out = stringifyYAML(doc);
90
90
  writeFileSync(initPath, out, { encoding: 'utf-8' });
91
91
  }
92
92
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumenflow/initiatives",
3
- "version": "1.0.0",
3
+ "version": "1.3.0",
4
4
  "description": "Initiative tracking for LumenFlow workflow framework - multi-phase project coordination",
5
5
  "keywords": [
6
6
  "lumenflow",
@@ -39,14 +39,14 @@
39
39
  "README.md"
40
40
  ],
41
41
  "dependencies": {
42
- "js-yaml": "^4.1.0",
43
- "yaml": "^2.8.0",
42
+ "yaml": "^2.8.2",
44
43
  "zod": "^4.3.5",
45
- "@lumenflow/core": "1.0.0"
44
+ "@lumenflow/core": "1.3.0"
46
45
  },
47
46
  "devDependencies": {
48
- "typescript": "^5.8.3",
49
- "vitest": "^2.1.0"
47
+ "@vitest/coverage-v8": "^4.0.17",
48
+ "typescript": "^5.9.3",
49
+ "vitest": "^4.0.17"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=22"