agentic-workflow-manager 9.19.0 → 9.20.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.
Files changed (59) hide show
  1. package/dist/src/commands/change/index.js +492 -0
  2. package/dist/src/commands/changes/index.js +84 -0
  3. package/dist/src/commands/sensors/index.js +9 -0
  4. package/dist/src/commands/sensors/run.js +1 -0
  5. package/dist/src/core/changes/command.js +38 -0
  6. package/dist/src/core/changes/derive.js +120 -0
  7. package/dist/src/core/changes/fs-safe.js +47 -0
  8. package/dist/src/core/changes/git-env.js +68 -0
  9. package/dist/src/core/changes/git.js +216 -0
  10. package/dist/src/core/changes/list-parse.js +67 -0
  11. package/dist/src/core/changes/list.js +408 -0
  12. package/dist/src/core/changes/parse.js +72 -0
  13. package/dist/src/core/changes/range.js +53 -0
  14. package/dist/src/core/changes/receipt.js +274 -0
  15. package/dist/src/core/changes/record-io.js +149 -0
  16. package/dist/src/core/changes/render-list.js +109 -0
  17. package/dist/src/core/changes/render.js +178 -0
  18. package/dist/src/core/changes/text-safety.js +116 -0
  19. package/dist/src/core/changes/trailers.js +76 -0
  20. package/dist/src/core/changes/types.js +26 -0
  21. package/dist/src/core/changes/validate-shape.js +219 -0
  22. package/dist/src/core/changes/worktree.js +53 -0
  23. package/dist/src/index.js +4 -0
  24. package/dist/src/release/orchestrator.js +3 -1
  25. package/dist/tests/commands/change/new.test.js +1126 -0
  26. package/dist/tests/commands/change/validate.test.js +1145 -0
  27. package/dist/tests/commands/changes/list.test.js +423 -0
  28. package/dist/tests/commands/sensors/index.test.js +1 -1
  29. package/dist/tests/core/changes/derive.test.js +455 -0
  30. package/dist/tests/core/changes/fs-safe.test.js +82 -0
  31. package/dist/tests/core/changes/git-env.test.js +143 -0
  32. package/dist/tests/core/changes/git.test.js +442 -0
  33. package/dist/tests/core/changes/helpers.js +269 -0
  34. package/dist/tests/core/changes/list-fixtures.js +122 -0
  35. package/dist/tests/core/changes/list-long-history.test.js +52 -0
  36. package/dist/tests/core/changes/list-paging.test.js +511 -0
  37. package/dist/tests/core/changes/list-parse.test.js +120 -0
  38. package/dist/tests/core/changes/list-tree.test.js +44 -0
  39. package/dist/tests/core/changes/list.test.js +821 -0
  40. package/dist/tests/core/changes/parse.test.js +142 -0
  41. package/dist/tests/core/changes/predicates.test.js +83 -0
  42. package/dist/tests/core/changes/range.test.js +92 -0
  43. package/dist/tests/core/changes/receipt.test.js +947 -0
  44. package/dist/tests/core/changes/record-io.test.js +307 -0
  45. package/dist/tests/core/changes/record.test.js +549 -0
  46. package/dist/tests/core/changes/render-list.test.js +212 -0
  47. package/dist/tests/core/changes/render.test.js +202 -0
  48. package/dist/tests/core/changes/text-safety.test.js +226 -0
  49. package/dist/tests/core/changes/trailers.test.js +181 -0
  50. package/dist/tests/core/changes/worktree.test.js +259 -0
  51. package/dist/tests/release/orchestrator-trailer.test.js +72 -0
  52. package/dist/tests/release/orchestrator.test.js +1 -0
  53. package/dist/tests/structural/change-commands-are-registered.test.js +29 -0
  54. package/dist/tests/structural/change-record-git-and-platform-conventions.test.js +77 -0
  55. package/package.json +1 -1
  56. package/prebuilds/darwin-arm64/secure_fs.node +0 -0
  57. package/prebuilds/darwin-x64/secure_fs.node +0 -0
  58. package/prebuilds/win32-arm64/secure_fs.node +0 -0
  59. package/prebuilds/win32-x64/secure_fs.node +0 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // The pure parser of `git ls-tree -l -z` used by `changes list` (R5.1, R5.7). No repository: the output of git is a string.
4
+ const list_1 = require("../../../src/core/changes/list");
5
+ const OID = 'a'.repeat(40);
6
+ const OID256 = 'b'.repeat(64);
7
+ const row = (mode, type, oid, size, name) => `${mode} ${type} ${oid} ${size.padStart(7)}\t${name}`;
8
+ const parse = (...rows) => (0, list_1.parseTreeEntries)(rows.join('\0') + '\0');
9
+ describe('parseTreeEntries (R5.7)', () => {
10
+ test('a regular blob keeps its mode, object id and numeric size', () => {
11
+ expect(parse(row('100644', 'blob', OID, '123', 'docs/changes/a.md')).get('docs/changes/a.md')).toEqual({ mode: '100644', type: 'blob', oid: OID, size: 123 });
12
+ });
13
+ test('a 64-hex (SHA-256) object id is accepted', () => {
14
+ expect(parse(row('100755', 'blob', OID256, '5', 'x')).get('x')).toEqual({ mode: '100755', type: 'blob', oid: OID256, size: 5 });
15
+ });
16
+ test('a blob whose size is "BAD" (the object is not there: a partial clone with lazy fetch off, git 2.55) is unreadable: negative size, still a blob', () => {
17
+ expect(parse(row('100644', 'blob', OID, 'BAD', 'docs/changes/a.md')).get('docs/changes/a.md')).toEqual({ mode: '100644', type: 'blob', oid: OID, size: -1 });
18
+ });
19
+ test('a blob whose size is "-" is unreadable as well (no valid blob shows it)', () => {
20
+ expect(parse(row('100644', 'blob', OID, '-', 'x')).get('x')).toEqual({ mode: '100644', type: 'blob', oid: OID, size: -1 });
21
+ });
22
+ test('"BAD" on something that is not a blob stays "unknown" (it is not a missing record)', () => {
23
+ expect(parse(row('040000', 'tree', OID, 'BAD', 'x')).get('x')).toMatchObject({ type: 'unknown', size: 0 });
24
+ });
25
+ test('a gitlink (submodule) shows "-" too, but it is not a blob: it stays "unknown", never unreadable', () => {
26
+ expect(parse(row('160000', 'commit', OID, '-', 'docs/changes/a.md')).get('docs/changes/a.md')).toEqual({ mode: '160000', type: 'unknown', oid: OID, size: 0 });
27
+ });
28
+ test('a blob with an unreadable size and an object id that is not an id is "unknown" (nothing about it is trusted)', () => {
29
+ expect(parse(row('100644', 'blob', 'zz', 'BAD', 'x')).get('x')).toEqual({ mode: '100644', type: 'unknown', oid: 'zz', size: 0 });
30
+ });
31
+ test.each(['abc', '1e3', '-5', '99999999999999999'])('a size of %j that is not 1 to 15 digits is "unknown"', (size) => {
32
+ expect(parse(row('100644', 'blob', OID, size, 'x')).get('x')).toMatchObject({ type: 'unknown', size: 0 });
33
+ });
34
+ test('rows without a tab or with missing columns are skipped', () => {
35
+ expect((0, list_1.parseTreeEntries)('100644 blob\0no tab here\0').size).toBe(0);
36
+ });
37
+ test('a name that contains a tab or a newline is kept whole', () => {
38
+ const name = 'a\tb\nc.md';
39
+ expect(parse(row('100644', 'blob', OID, '1', name)).get(name)).toMatchObject({ size: 1 });
40
+ });
41
+ test.each([undefined, null, 5, {}])('non-string input %j gives an empty map and never throws', (input) => {
42
+ expect((0, list_1.parseTreeEntries)(input).size).toBe(0);
43
+ });
44
+ });