@schnick371/devsteps-shared 1.1.0-next.1 → 1.1.0-next.3

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 (38) hide show
  1. package/dist/core/add.d.ts.map +1 -1
  2. package/dist/core/add.js +4 -3
  3. package/dist/core/add.js.map +1 -1
  4. package/dist/core/context.d.ts +44 -0
  5. package/dist/core/context.d.ts.map +1 -1
  6. package/dist/core/context.js +326 -1
  7. package/dist/core/context.js.map +1 -1
  8. package/dist/core/context.test.d.ts +10 -0
  9. package/dist/core/context.test.d.ts.map +1 -0
  10. package/dist/core/context.test.js +239 -0
  11. package/dist/core/context.test.js.map +1 -0
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js +1 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/core/update.js +4 -4
  17. package/dist/core/update.js.map +1 -1
  18. package/dist/utils/backup-github-files.d.ts +34 -0
  19. package/dist/utils/backup-github-files.d.ts.map +1 -0
  20. package/dist/utils/backup-github-files.js +137 -0
  21. package/dist/utils/backup-github-files.js.map +1 -0
  22. package/dist/utils/index.d.ts +25 -1
  23. package/dist/utils/index.d.ts.map +1 -1
  24. package/dist/utils/index.js +36 -1
  25. package/dist/utils/index.js.map +1 -1
  26. package/dist/utils/init-helpers.d.ts +14 -1
  27. package/dist/utils/init-helpers.d.ts.map +1 -1
  28. package/dist/utils/init-helpers.js +37 -2
  29. package/dist/utils/init-helpers.js.map +1 -1
  30. package/dist/utils/normalize.test.d.ts +15 -0
  31. package/dist/utils/normalize.test.d.ts.map +1 -0
  32. package/dist/utils/normalize.test.js +101 -0
  33. package/dist/utils/normalize.test.js.map +1 -0
  34. package/dist/utils/update-copilot-files.d.ts +59 -0
  35. package/dist/utils/update-copilot-files.d.ts.map +1 -0
  36. package/dist/utils/update-copilot-files.js +183 -0
  37. package/dist/utils/update-copilot-files.js.map +1 -0
  38. package/package.json +1 -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
@@ -5,6 +5,17 @@
5
5
  * Project initialization helpers
6
6
  * Creates default .devsteps structure, copies GitHub Copilot templates.
7
7
  */
8
+ /**
9
+ * Inject (or replace) the devsteps management comment directly after the YAML
10
+ * frontmatter closing `---` line. The marker is placed in an HTML comment so
11
+ * it is invisible in rendered Markdown and does NOT affect YAML parsing.
12
+ *
13
+ * Format:
14
+ * <!-- devsteps-managed: true | version: <ver> | hash: sha256:<hex> -->
15
+ *
16
+ * If the file has no frontmatter the comment is prepended to the top.
17
+ */
18
+ export declare function injectDevstepsComment(rawContent: string, hash: string, version: string): string;
8
19
  export interface CopiedGithubFiles {
9
20
  agents: string[];
10
21
  instructions: string[];
@@ -14,9 +25,11 @@ export interface CopiedGithubFiles {
14
25
  * Dynamically copy all devsteps-prefixed agent/instruction/prompt files
15
26
  * from a source .github directory into target directories.
16
27
  * Creates target directories if they don't exist.
28
+ * Injects a `<!-- devsteps-managed -->` HTML comment after the YAML frontmatter
29
+ * so that the canonical content hash is stored without touching the YAML block.
17
30
  * Returns lists of copied filenames for output/reporting.
18
31
  */
19
- export declare function copyGithubFiles(sourceGithubDir: string, githubAgentsDir: string, githubInstructionsDir: string, githubPromptsDir: string): CopiedGithubFiles;
32
+ export declare function copyGithubFiles(sourceGithubDir: string, githubAgentsDir: string, githubInstructionsDir: string, githubPromptsDir: string, packageVersion?: string): CopiedGithubFiles;
20
33
  /**
21
34
  * Copy HIERARCHY.md and AI-GUIDE.md from the package root .devsteps/ dir
22
35
  * into the target project's .devsteps/ directory.
@@ -1 +1 @@
1
- {"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/init-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,qBAAqB,EAAE,MAAM,EAC7B,gBAAgB,EAAE,MAAM,GACvB,iBAAiB,CAmCnB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAO/E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAkF3E"}
1
+ {"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/init-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAc/F;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,qBAAqB,EAAE,MAAM,EAC7B,gBAAgB,EAAE,MAAM,EACxB,cAAc,SAAY,GACzB,iBAAiB,CAsCnB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAO/E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAkF3E"}
@@ -5,15 +5,47 @@
5
5
  * Project initialization helpers
6
6
  * Creates default .devsteps structure, copies GitHub Copilot templates.
7
7
  */
8
+ import { createHash } from 'node:crypto';
8
9
  import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
9
10
  import { join } from 'node:path';
11
+ /**
12
+ * Compute sha256 hex digest of content (UTF-8).
13
+ */
14
+ function sha256(content) {
15
+ return createHash('sha256').update(content, 'utf8').digest('hex');
16
+ }
17
+ /**
18
+ * Inject (or replace) the devsteps management comment directly after the YAML
19
+ * frontmatter closing `---` line. The marker is placed in an HTML comment so
20
+ * it is invisible in rendered Markdown and does NOT affect YAML parsing.
21
+ *
22
+ * Format:
23
+ * <!-- devsteps-managed: true | version: <ver> | hash: sha256:<hex> -->
24
+ *
25
+ * If the file has no frontmatter the comment is prepended to the top.
26
+ */
27
+ export function injectDevstepsComment(rawContent, hash, version) {
28
+ const marker = `<!-- devsteps-managed: true | version: ${version} | hash: sha256:${hash} -->`;
29
+ // Remove old marker if present
30
+ const withoutOld = rawContent.replace(/<!--\s*devsteps-managed:.*?-->\n?/g, '');
31
+ // Find YAML frontmatter (starts and ends with ---)
32
+ const frontmatterEnd = withoutOld.match(/^---\n[\s\S]*?\n---\n/);
33
+ if (frontmatterEnd) {
34
+ const endIdx = (frontmatterEnd.index ?? 0) + frontmatterEnd[0].length;
35
+ return withoutOld.slice(0, endIdx) + marker + '\n' + withoutOld.slice(endIdx);
36
+ }
37
+ // No frontmatter — prepend
38
+ return marker + '\n' + withoutOld;
39
+ }
10
40
  /**
11
41
  * Dynamically copy all devsteps-prefixed agent/instruction/prompt files
12
42
  * from a source .github directory into target directories.
13
43
  * Creates target directories if they don't exist.
44
+ * Injects a `<!-- devsteps-managed -->` HTML comment after the YAML frontmatter
45
+ * so that the canonical content hash is stored without touching the YAML block.
14
46
  * Returns lists of copied filenames for output/reporting.
15
47
  */
16
- export function copyGithubFiles(sourceGithubDir, githubAgentsDir, githubInstructionsDir, githubPromptsDir) {
48
+ export function copyGithubFiles(sourceGithubDir, githubAgentsDir, githubInstructionsDir, githubPromptsDir, packageVersion = 'unknown') {
17
49
  mkdirSync(githubAgentsDir, { recursive: true });
18
50
  mkdirSync(githubInstructionsDir, { recursive: true });
19
51
  mkdirSync(githubPromptsDir, { recursive: true });
@@ -22,7 +54,10 @@ export function copyGithubFiles(sourceGithubDir, githubAgentsDir, githubInstruct
22
54
  return [];
23
55
  const files = readdirSync(sourceDir).filter(filter);
24
56
  for (const file of files) {
25
- writeFileSync(join(targetDir, file), readFileSync(join(sourceDir, file), 'utf8'));
57
+ const rawContent = readFileSync(join(sourceDir, file), 'utf8');
58
+ const hash = sha256(rawContent);
59
+ const annotated = injectDevstepsComment(rawContent, hash, packageVersion);
60
+ writeFileSync(join(targetDir, file), annotated);
26
61
  }
27
62
  return files;
28
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"init-helpers.js","sourceRoot":"","sources":["../../src/utils/init-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,eAAuB,EACvB,eAAuB,EACvB,qBAA6B,EAC7B,gBAAwB;IAExB,SAAS,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,SAAS,CAAC,qBAAqB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtD,SAAS,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEjD,MAAM,OAAO,GAAG,CACd,SAAiB,EACjB,SAAiB,EACjB,MAA8B,EACpB,EAAE;QACZ,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;YAAE,OAAO,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,aA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,CAAC;IACA,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright © 2025 Thomas Hertel (the@devsteps.dev)
3
+ * Licensed under the Apache License, Version 2.0
4
+ *
5
+ * Unit Tests for normalizeMarkdown utility
6
+ *
7
+ * Context: MCP clients (GitHub Copilot ≥ v1.0.0, Claude Code, etc.) transmit
8
+ * multiline strings as literal escape sequences rather than real Unicode control
9
+ * characters. normalizeMarkdown converts these safely at the ingestion boundary.
10
+ *
11
+ * @see BUG-056
12
+ * @see TASK-270
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=normalize.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.test.d.ts","sourceRoot":"","sources":["../../src/utils/normalize.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Copyright © 2025 Thomas Hertel (the@devsteps.dev)
3
+ * Licensed under the Apache License, Version 2.0
4
+ *
5
+ * Unit Tests for normalizeMarkdown utility
6
+ *
7
+ * Context: MCP clients (GitHub Copilot ≥ v1.0.0, Claude Code, etc.) transmit
8
+ * multiline strings as literal escape sequences rather than real Unicode control
9
+ * characters. normalizeMarkdown converts these safely at the ingestion boundary.
10
+ *
11
+ * @see BUG-056
12
+ * @see TASK-270
13
+ */
14
+ import { describe, expect, it } from 'vitest';
15
+ import { normalizeMarkdown } from './index.js';
16
+ describe('normalizeMarkdown', () => {
17
+ // ── Core conversion ─────────────────────────────────────────────────────────
18
+ it('converts literal \\n sequences to real newlines', () => {
19
+ const input = 'line one\\nline two\\nline three';
20
+ const result = normalizeMarkdown(input);
21
+ expect(result).toBe('line one\nline two\nline three');
22
+ expect(result).toContain('\n');
23
+ expect(result).not.toContain('\\n');
24
+ });
25
+ it('converts literal \\t sequences to real tabs', () => {
26
+ const input = 'column1\\tcolumn2\\tcolumn3';
27
+ const result = normalizeMarkdown(input);
28
+ expect(result).toBe('column1\tcolumn2\tcolumn3');
29
+ expect(result).toContain('\t');
30
+ expect(result).not.toContain('\\t');
31
+ });
32
+ it('removes literal \\r sequences (stray CR from Windows \\r\\n literals)', () => {
33
+ const input = 'line one\\r\\nline two';
34
+ const result = normalizeMarkdown(input);
35
+ expect(result).toBe('line one\nline two');
36
+ expect(result).not.toContain('\\r');
37
+ expect(result).not.toContain('\r');
38
+ });
39
+ it('handles all escape sequences together', () => {
40
+ const input = 'Title\\n\\nParagraph one.\\n\\n- Item 1\\n- Item 2\\n\\n\\tIndented';
41
+ const result = normalizeMarkdown(input);
42
+ expect(result).toBe('Title\n\nParagraph one.\n\n- Item 1\n- Item 2\n\n\tIndented');
43
+ });
44
+ // ── Idempotency (fast path) ──────────────────────────────────────────────────
45
+ it('leaves strings with real newlines unchanged (fast path)', () => {
46
+ const input = 'line one\nline two\nline three';
47
+ const result = normalizeMarkdown(input);
48
+ expect(result).toBe(input);
49
+ });
50
+ it('is idempotent: calling twice on already-converted string returns same result', () => {
51
+ const original = 'line one\\nline two';
52
+ const once = normalizeMarkdown(original);
53
+ const twice = normalizeMarkdown(once);
54
+ expect(twice).toBe(once);
55
+ });
56
+ it('leaves strings with mixed real newlines and literal \\t unchanged (fast path)', () => {
57
+ const input = 'line one\nline two\\t still here';
58
+ const result = normalizeMarkdown(input);
59
+ // Real newline present → fast path, backslash-t preserved
60
+ expect(result).toBe(input);
61
+ });
62
+ // ── Edge cases ───────────────────────────────────────────────────────────────
63
+ it('returns empty string unchanged', () => {
64
+ expect(normalizeMarkdown('')).toBe('');
65
+ });
66
+ it('returns plain single-line string unchanged', () => {
67
+ const input = 'No escape sequences here.';
68
+ expect(normalizeMarkdown(input)).toBe(input);
69
+ });
70
+ it('handles markdown description with heading and list (typical MCP input)', () => {
71
+ // This is the real-world input that triggered BUG-056
72
+ const mcpInput = '## Implemented\\n\\n### Show-ServerLayoutEditor\\n- Build `nameToRoles` map before rendering table\\n- Rows with shared hostname → ForegroundColor Yellow + ⚠️ indicator\\n\\n### environment.ps1\\n- After saving: rebuild `$env.Nodes` PSCustomObject';
73
+ const result = normalizeMarkdown(mcpInput);
74
+ expect(result).toContain('## Implemented\n');
75
+ expect(result).toContain('### Show-ServerLayoutEditor\n');
76
+ expect(result).toContain('- Build `nameToRoles`');
77
+ expect(result).not.toContain('\\n');
78
+ });
79
+ it('handles default description template with real newlines (CLI usage)', () => {
80
+ // CLI users provide real newlines — must NOT be double-converted
81
+ const cliInput = '# My Story\n\n<!-- Add detailed description here -->\n';
82
+ const result = normalizeMarkdown(cliInput);
83
+ expect(result).toBe(cliInput);
84
+ });
85
+ it('handles string with only whitespace', () => {
86
+ expect(normalizeMarkdown(' ')).toBe(' ');
87
+ expect(normalizeMarkdown('\n')).toBe('\n'); // real newline → fast path
88
+ });
89
+ it('preserves Unicode characters correctly', () => {
90
+ const input = 'Emoji: ⚠️\\nArrow: →\\nUmlaut: äöü';
91
+ const result = normalizeMarkdown(input);
92
+ expect(result).toBe('Emoji: ⚠️\nArrow: →\nUmlaut: äöü');
93
+ });
94
+ // ── append_description use case ──────────────────────────────────────────────
95
+ it('normalizes text intended for append_description correctly', () => {
96
+ const appendContent = '\\n\\n## Added in v2\\n- New feature X\\n- Fixed issue Y';
97
+ const result = normalizeMarkdown(appendContent);
98
+ expect(result).toBe('\n\n## Added in v2\n- New feature X\n- Fixed issue Y');
99
+ });
100
+ });
101
+ //# sourceMappingURL=normalize.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.test.js","sourceRoot":"","sources":["../../src/utils/normalize.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC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C,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,gFAAgF;IAEhF,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,aAAa,GAAG,0DAA0D,CAAC;QACjF,MAAM,MAAM,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;QAChD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Copyright © 2025 Thomas Hertel (the@devsteps.dev)
3
+ * Licensed under the Apache License, Version 2.0
4
+ *
5
+ * GitHub Copilot files update utilities
6
+ * Compares installed devsteps-managed .github files against the package source
7
+ * using SHA-256 hashes stored in HTML comments, then selectively updates changed
8
+ * files after creating a timestamped backup.
9
+ */
10
+ export interface FileUpdateStatus {
11
+ file: string;
12
+ status: 'updated' | 'skipped' | 'added';
13
+ reason?: string;
14
+ }
15
+ export interface UpdateCopilotFilesResult {
16
+ success: boolean;
17
+ updatedCount: number;
18
+ skippedCount: number;
19
+ addedCount: number;
20
+ backupDir: string;
21
+ files: FileUpdateStatus[];
22
+ message: string;
23
+ error?: string;
24
+ }
25
+ export interface UpdateCopilotFilesOptions {
26
+ /** DevSteps package version (for comment annotation) */
27
+ packageVersion?: string;
28
+ /** Maximum backup rotations to keep (default: 5) */
29
+ maxBackups?: number;
30
+ /**
31
+ * If true, report what would change but do not write anything.
32
+ * No backup is created in dry-run mode.
33
+ */
34
+ dryRun?: boolean;
35
+ /** If true, overwrite even when hashes match (force reinstall) */
36
+ force?: boolean;
37
+ }
38
+ /**
39
+ * Update all devsteps-managed .github Copilot files in a target project.
40
+ *
41
+ * Algorithm per source file:
42
+ * 1. Compute sha256 of raw source content (before annotation).
43
+ * 2. If a corresponding file exists in the target:
44
+ * a. Extract the stored hash from its devsteps HTML comment.
45
+ * b. If hashes match (and `force` is not set): skip — no change needed.
46
+ * c. If hashes differ: mark as "update" candidate.
47
+ * 3. If no corresponding file exists: mark as "add" candidate.
48
+ * After collecting candidates:
49
+ * 4. If there are changes and not dryRun: create a backup first.
50
+ * Abort on backup failure (prevents partial states).
51
+ * 5. Write each candidate with a fresh `injectDevstepsComment`.
52
+ *
53
+ * @param sourceGithubDir Path to the package's bundled `.github` directory.
54
+ * @param targetGithubDir Path to the target project's `.github` directory.
55
+ * @param devstepsDir Path to the target project's `.devsteps` directory (for backups).
56
+ * @param options Optional settings.
57
+ */
58
+ export declare function updateCopilotFiles(sourceGithubDir: string, targetGithubDir: string, devstepsDir: string, options?: UpdateCopilotFilesOptions): UpdateCopilotFilesResult;
59
+ //# sourceMappingURL=update-copilot-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-copilot-files.d.ts","sourceRoot":"","sources":["../../src/utils/update-copilot-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2BH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACxC,wDAAwD;IACxD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAaD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,yBAAyB,GAClC,wBAAwB,CAqJ1B"}
@@ -0,0 +1,183 @@
1
+ /**
2
+ * Copyright © 2025 Thomas Hertel (the@devsteps.dev)
3
+ * Licensed under the Apache License, Version 2.0
4
+ *
5
+ * GitHub Copilot files update utilities
6
+ * Compares installed devsteps-managed .github files against the package source
7
+ * using SHA-256 hashes stored in HTML comments, then selectively updates changed
8
+ * files after creating a timestamped backup.
9
+ */
10
+ import { createHash } from 'node:crypto';
11
+ import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
12
+ import { join } from 'node:path';
13
+ import { backupGithubFiles } from './backup-github-files.js';
14
+ import { injectDevstepsComment } from './init-helpers.js';
15
+ /** Regex that matches `<!-- devsteps-managed: ... | hash: sha256:<hex> ... -->` */
16
+ const MANAGED_COMMENT_RE = /<!--\s*devsteps-managed:.*?hash:\s*sha256:([0-9a-f]{64}).*?-->/;
17
+ /**
18
+ * Extract the sha256 hash embedded in a devsteps-managed HTML comment.
19
+ * Returns null if the file is not managed or has no hash.
20
+ */
21
+ function extractManagedHash(content) {
22
+ const match = content.match(MANAGED_COMMENT_RE);
23
+ return match ? match[1] : null;
24
+ }
25
+ /**
26
+ * Compute sha256 of content (UTF-8) — same function used by injectDevstepsComment.
27
+ */
28
+ function sha256(content) {
29
+ return createHash('sha256').update(content, 'utf8').digest('hex');
30
+ }
31
+ const SUBDIRS = [
32
+ { sub: 'agents', suffix: '.agent.md' },
33
+ { sub: 'instructions', suffix: '.instructions.md' },
34
+ { sub: 'prompts', suffix: '.prompt.md' },
35
+ ];
36
+ /**
37
+ * Update all devsteps-managed .github Copilot files in a target project.
38
+ *
39
+ * Algorithm per source file:
40
+ * 1. Compute sha256 of raw source content (before annotation).
41
+ * 2. If a corresponding file exists in the target:
42
+ * a. Extract the stored hash from its devsteps HTML comment.
43
+ * b. If hashes match (and `force` is not set): skip — no change needed.
44
+ * c. If hashes differ: mark as "update" candidate.
45
+ * 3. If no corresponding file exists: mark as "add" candidate.
46
+ * After collecting candidates:
47
+ * 4. If there are changes and not dryRun: create a backup first.
48
+ * Abort on backup failure (prevents partial states).
49
+ * 5. Write each candidate with a fresh `injectDevstepsComment`.
50
+ *
51
+ * @param sourceGithubDir Path to the package's bundled `.github` directory.
52
+ * @param targetGithubDir Path to the target project's `.github` directory.
53
+ * @param devstepsDir Path to the target project's `.devsteps` directory (for backups).
54
+ * @param options Optional settings.
55
+ */
56
+ export function updateCopilotFiles(sourceGithubDir, targetGithubDir, devstepsDir, options) {
57
+ const packageVersion = options?.packageVersion ?? 'unknown';
58
+ const dryRun = options?.dryRun ?? false;
59
+ const force = options?.force ?? false;
60
+ const maxBackups = options?.maxBackups ?? 5;
61
+ const fileStatuses = [];
62
+ const updateCandidates = [];
63
+ // ── Phase 1: Diff source vs. target ─────────────────────────────────────────
64
+ for (const { sub, suffix } of SUBDIRS) {
65
+ const sourceSubDir = join(sourceGithubDir, sub);
66
+ const targetSubDir = join(targetGithubDir, sub);
67
+ if (!existsSync(sourceSubDir))
68
+ continue;
69
+ const sourceFiles = readdirSync(sourceSubDir).filter((f) => f.startsWith('devsteps') && f.endsWith(suffix));
70
+ for (const file of sourceFiles) {
71
+ const sourceFile = join(sourceSubDir, file);
72
+ const targetFile = join(targetSubDir, file);
73
+ const rawContent = readFileSync(sourceFile, 'utf8');
74
+ const sourceHash = sha256(rawContent);
75
+ const rel = `${sub}/${file}`;
76
+ if (existsSync(targetFile)) {
77
+ const installed = readFileSync(targetFile, 'utf8');
78
+ const installedHash = extractManagedHash(installed);
79
+ if (!force && installedHash === sourceHash) {
80
+ fileStatuses.push({ file: rel, status: 'skipped', reason: 'hash-match' });
81
+ continue;
82
+ }
83
+ const reasonSuffix = installedHash === null
84
+ ? 'no-marker'
85
+ : force
86
+ ? 'force'
87
+ : 'hash-mismatch';
88
+ updateCandidates.push({ sourceFile, targetFile, rawContent, hash: sourceHash, rel, status: 'updated' });
89
+ fileStatuses.push({ file: rel, status: 'updated', reason: reasonSuffix });
90
+ }
91
+ else {
92
+ updateCandidates.push({ sourceFile, targetFile, rawContent, hash: sourceHash, rel, status: 'added' });
93
+ fileStatuses.push({ file: rel, status: 'added' });
94
+ }
95
+ }
96
+ }
97
+ const updatedCount = fileStatuses.filter((f) => f.status === 'updated').length;
98
+ const skippedCount = fileStatuses.filter((f) => f.status === 'skipped').length;
99
+ const addedCount = fileStatuses.filter((f) => f.status === 'added').length;
100
+ // ── Phase 2: If nothing to do, return early ──────────────────────────────────
101
+ if (updateCandidates.length === 0) {
102
+ return {
103
+ success: true,
104
+ updatedCount: 0,
105
+ skippedCount,
106
+ addedCount: 0,
107
+ backupDir: '',
108
+ files: fileStatuses,
109
+ message: `All ${skippedCount} files are up-to-date. No changes needed.`,
110
+ };
111
+ }
112
+ if (dryRun) {
113
+ const summary = [
114
+ updatedCount > 0 ? `${updatedCount} to update` : '',
115
+ addedCount > 0 ? `${addedCount} to add` : '',
116
+ skippedCount > 0 ? `${skippedCount} unchanged` : '',
117
+ ]
118
+ .filter(Boolean)
119
+ .join(', ');
120
+ return {
121
+ success: true,
122
+ updatedCount,
123
+ skippedCount,
124
+ addedCount,
125
+ backupDir: '',
126
+ files: fileStatuses,
127
+ message: `[dry-run] Would apply: ${summary}`,
128
+ };
129
+ }
130
+ // ── Phase 3: Backup before writing ───────────────────────────────────────────
131
+ const backupResult = backupGithubFiles(targetGithubDir, devstepsDir, {
132
+ maxBackups,
133
+ packageVersion,
134
+ });
135
+ if (!backupResult.success) {
136
+ return {
137
+ success: false,
138
+ updatedCount: 0,
139
+ skippedCount,
140
+ addedCount: 0,
141
+ backupDir: backupResult.backupDir,
142
+ files: fileStatuses,
143
+ message: 'Backup failed — update aborted to prevent partial state.',
144
+ error: backupResult.error?.message ?? 'Unknown backup error',
145
+ };
146
+ }
147
+ // ── Phase 4: Write updated files ─────────────────────────────────────────────
148
+ try {
149
+ for (const candidate of updateCandidates) {
150
+ const annotated = injectDevstepsComment(candidate.rawContent, candidate.hash, packageVersion);
151
+ writeFileSync(candidate.targetFile, annotated, 'utf8');
152
+ }
153
+ }
154
+ catch (writeError) {
155
+ return {
156
+ success: false,
157
+ updatedCount,
158
+ skippedCount,
159
+ addedCount,
160
+ backupDir: backupResult.backupDir,
161
+ files: fileStatuses,
162
+ message: `Write error after backup. Backup preserved at: ${backupResult.backupDir}`,
163
+ error: writeError instanceof Error ? writeError.message : String(writeError),
164
+ };
165
+ }
166
+ const summary = [
167
+ updatedCount > 0 ? `${updatedCount} updated` : '',
168
+ addedCount > 0 ? `${addedCount} added` : '',
169
+ skippedCount > 0 ? `${skippedCount} unchanged` : '',
170
+ ]
171
+ .filter(Boolean)
172
+ .join(', ');
173
+ return {
174
+ success: true,
175
+ updatedCount,
176
+ skippedCount,
177
+ addedCount,
178
+ backupDir: backupResult.backupDir,
179
+ files: fileStatuses,
180
+ message: `Copilot files updated (${summary}).${backupResult.fileCount > 0 ? ` Backup: ${backupResult.backupDir}` : ''}`,
181
+ };
182
+ }
183
+ //# sourceMappingURL=update-copilot-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-copilot-files.js","sourceRoot":"","sources":["../../src/utils/update-copilot-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,mFAAmF;AAC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AAC;QACzD,CAAC;IACH,CAAC;IAAC,OAAO,UAAU,EAAE,CAAC;QACpB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,YAAY;YACZ,YAAY;YACZ,UAAU;YACV,SAAS,EAAE,YAAY,CAAC,SAAS;YACjC,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,kDAAkD,YAAY,CAAC,SAAS,EAAE;YACnF,KAAK,EAAE,UAAU,YAAY,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;SAC7E,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG;QACd,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,UAAU,CAAC,CAAC,CAAC,EAAE;QACjD,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,QAAQ,CAAC,CAAC,CAAC,EAAE;QAC3C,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,YAAY,YAAY,CAAC,CAAC,CAAC,EAAE;KACpD;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO;QACL,OAAO,EAAE,IAAI;QACb,YAAY;QACZ,YAAY;QACZ,UAAU;QACV,SAAS,EAAE,YAAY,CAAC,SAAS;QACjC,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,0BAA0B,OAAO,KAAK,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KACxH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schnick371/devsteps-shared",
3
- "version": "1.1.0-next.1",
3
+ "version": "1.1.0-next.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Never Code Alone. Shared types, schemas, and utilities for DevSteps task tracking.",
6
6
  "author": "Thomas Hertel <thomas.hertel@devsteps.dev>",