@aligndottech/cli 0.32.2 → 0.33.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 (129) hide show
  1. package/dist/commands/decisions/index.d.ts.map +1 -1
  2. package/dist/commands/decisions/index.js +9 -2
  3. package/dist/commands/decisions/index.js.map +1 -1
  4. package/dist/commands/default-action.d.ts.map +1 -1
  5. package/dist/commands/default-action.js +6 -3
  6. package/dist/commands/default-action.js.map +1 -1
  7. package/dist/commands/import/confluence.d.ts.map +1 -1
  8. package/dist/commands/import/confluence.js +7 -2
  9. package/dist/commands/import/confluence.js.map +1 -1
  10. package/dist/commands/import/docs.d.ts.map +1 -1
  11. package/dist/commands/import/docs.js +7 -2
  12. package/dist/commands/import/docs.js.map +1 -1
  13. package/dist/commands/import/git.d.ts.map +1 -1
  14. package/dist/commands/import/git.js +15 -2
  15. package/dist/commands/import/git.js.map +1 -1
  16. package/dist/commands/import/github.d.ts.map +1 -1
  17. package/dist/commands/import/github.js +7 -2
  18. package/dist/commands/import/github.js.map +1 -1
  19. package/dist/commands/import/gitlab.d.ts.map +1 -1
  20. package/dist/commands/import/gitlab.js +7 -2
  21. package/dist/commands/import/gitlab.js.map +1 -1
  22. package/dist/commands/import/jira.d.ts.map +1 -1
  23. package/dist/commands/import/jira.js +7 -2
  24. package/dist/commands/import/jira.js.map +1 -1
  25. package/dist/commands/import/linear.d.ts.map +1 -1
  26. package/dist/commands/import/linear.js +7 -2
  27. package/dist/commands/import/linear.js.map +1 -1
  28. package/dist/commands/import/notion.d.ts.map +1 -1
  29. package/dist/commands/import/notion.js +7 -2
  30. package/dist/commands/import/notion.js.map +1 -1
  31. package/dist/commands/import/slack.d.ts.map +1 -1
  32. package/dist/commands/import/slack.js +8 -3
  33. package/dist/commands/import/slack.js.map +1 -1
  34. package/dist/commands/import/teams.d.ts.map +1 -1
  35. package/dist/commands/import/teams.js +7 -2
  36. package/dist/commands/import/teams.js.map +1 -1
  37. package/dist/commands/import/zoom.d.ts.map +1 -1
  38. package/dist/commands/import/zoom.js +7 -2
  39. package/dist/commands/import/zoom.js.map +1 -1
  40. package/dist/commands/setup.d.ts.map +1 -1
  41. package/dist/commands/setup.js +76 -33
  42. package/dist/commands/setup.js.map +1 -1
  43. package/dist/commands/why.d.ts.map +1 -1
  44. package/dist/commands/why.js +100 -16
  45. package/dist/commands/why.js.map +1 -1
  46. package/dist/lib/capture-report.d.ts +45 -0
  47. package/dist/lib/capture-report.d.ts.map +1 -0
  48. package/dist/lib/capture-report.js +50 -0
  49. package/dist/lib/capture-report.js.map +1 -0
  50. package/dist/lib/capture-sources.d.ts +57 -0
  51. package/dist/lib/capture-sources.d.ts.map +1 -0
  52. package/dist/lib/capture-sources.js +24 -0
  53. package/dist/lib/capture-sources.js.map +1 -0
  54. package/dist/lib/commit-shape.d.ts +18 -0
  55. package/dist/lib/commit-shape.d.ts.map +1 -0
  56. package/dist/lib/commit-shape.js +23 -0
  57. package/dist/lib/commit-shape.js.map +1 -0
  58. package/dist/lib/fetchers/capture.d.ts +60 -0
  59. package/dist/lib/fetchers/capture.d.ts.map +1 -0
  60. package/dist/lib/fetchers/capture.js +27 -0
  61. package/dist/lib/fetchers/capture.js.map +1 -0
  62. package/dist/lib/fetchers/confluence.d.ts +2 -2
  63. package/dist/lib/fetchers/confluence.d.ts.map +1 -1
  64. package/dist/lib/fetchers/confluence.js +2 -1
  65. package/dist/lib/fetchers/confluence.js.map +1 -1
  66. package/dist/lib/fetchers/docs.d.ts +12 -2
  67. package/dist/lib/fetchers/docs.d.ts.map +1 -1
  68. package/dist/lib/fetchers/docs.js +46 -6
  69. package/dist/lib/fetchers/docs.js.map +1 -1
  70. package/dist/lib/fetchers/git.d.ts +28 -2
  71. package/dist/lib/fetchers/git.d.ts.map +1 -1
  72. package/dist/lib/fetchers/git.js +50 -2
  73. package/dist/lib/fetchers/git.js.map +1 -1
  74. package/dist/lib/fetchers/github.d.ts +2 -2
  75. package/dist/lib/fetchers/github.d.ts.map +1 -1
  76. package/dist/lib/fetchers/github.js +2 -1
  77. package/dist/lib/fetchers/github.js.map +1 -1
  78. package/dist/lib/fetchers/gitlab.d.ts +2 -2
  79. package/dist/lib/fetchers/gitlab.d.ts.map +1 -1
  80. package/dist/lib/fetchers/gitlab.js +2 -1
  81. package/dist/lib/fetchers/gitlab.js.map +1 -1
  82. package/dist/lib/fetchers/jira.d.ts +2 -2
  83. package/dist/lib/fetchers/jira.d.ts.map +1 -1
  84. package/dist/lib/fetchers/jira.js +2 -1
  85. package/dist/lib/fetchers/jira.js.map +1 -1
  86. package/dist/lib/fetchers/linear.d.ts +2 -2
  87. package/dist/lib/fetchers/linear.d.ts.map +1 -1
  88. package/dist/lib/fetchers/linear.js +2 -1
  89. package/dist/lib/fetchers/linear.js.map +1 -1
  90. package/dist/lib/fetchers/notion.d.ts +2 -2
  91. package/dist/lib/fetchers/notion.d.ts.map +1 -1
  92. package/dist/lib/fetchers/notion.js +2 -1
  93. package/dist/lib/fetchers/notion.js.map +1 -1
  94. package/dist/lib/fetchers/slack.d.ts +2 -2
  95. package/dist/lib/fetchers/slack.d.ts.map +1 -1
  96. package/dist/lib/fetchers/slack.js +2 -1
  97. package/dist/lib/fetchers/slack.js.map +1 -1
  98. package/dist/lib/fetchers/teams.d.ts +2 -2
  99. package/dist/lib/fetchers/teams.d.ts.map +1 -1
  100. package/dist/lib/fetchers/teams.js +2 -1
  101. package/dist/lib/fetchers/teams.js.map +1 -1
  102. package/dist/lib/fetchers/zoom.d.ts +2 -2
  103. package/dist/lib/fetchers/zoom.d.ts.map +1 -1
  104. package/dist/lib/fetchers/zoom.js +2 -1
  105. package/dist/lib/fetchers/zoom.js.map +1 -1
  106. package/dist/lib/gateway-client.d.ts +8 -0
  107. package/dist/lib/gateway-client.d.ts.map +1 -1
  108. package/dist/lib/gateway-client.js +11 -1
  109. package/dist/lib/gateway-client.js.map +1 -1
  110. package/dist/lib/git.d.ts.map +1 -1
  111. package/dist/lib/git.js +9 -2
  112. package/dist/lib/git.js.map +1 -1
  113. package/dist/lib/import-defaults.d.ts +29 -0
  114. package/dist/lib/import-defaults.d.ts.map +1 -0
  115. package/dist/lib/import-defaults.js +29 -0
  116. package/dist/lib/import-defaults.js.map +1 -0
  117. package/dist/lib/local-db.d.ts +35 -1
  118. package/dist/lib/local-db.d.ts.map +1 -1
  119. package/dist/lib/local-db.js +123 -7
  120. package/dist/lib/local-db.js.map +1 -1
  121. package/dist/lib/local-gateway-client.d.ts +9 -5
  122. package/dist/lib/local-gateway-client.d.ts.map +1 -1
  123. package/dist/lib/local-gateway-client.js +16 -2
  124. package/dist/lib/local-gateway-client.js.map +1 -1
  125. package/dist/lib/local-llm.d.ts +17 -0
  126. package/dist/lib/local-llm.d.ts.map +1 -1
  127. package/dist/lib/local-llm.js +22 -1
  128. package/dist/lib/local-llm.js.map +1 -1
  129. package/package.json +2 -2
@@ -0,0 +1,18 @@
1
+ /**
2
+ * What makes a commit SUBJECT mechanical, in one place. `isDecisionCommit` (git.ts)
3
+ * builds its regex from this, and the capture report (fetchers/git.ts) names the list in
4
+ * the line a user reads - so the two cannot drift, which they had by the time ALI-827's
5
+ * review read them (the report named four prefixes of eight). A leaf module with no
6
+ * imports, so the tests that mock `lib/git.js` still print the real list.
7
+ */
8
+ export declare const MECHANICAL_SUBJECT_PREFIXES: readonly ["chore", "wip", "merge", "revert", "bump", "update deps", "release", "typo"];
9
+ /** Below this many characters a subject is a label, not a decision. */
10
+ export declare const MIN_DECISION_SUBJECT_CHARS = 20;
11
+ /**
12
+ * The predicate's regex, built from the list with every prefix escaped. Eight plain
13
+ * words need no escaping today; a future `c++` interpolated raw would read as "one or
14
+ * more c" and reject `ccc:` while looking exactly like a list entry (Copilot on #240).
15
+ * Anchored and case-insensitive, as the hand-written literal it replaced was.
16
+ */
17
+ export declare function mechanicalSubjectRegex(prefixes: readonly string[]): RegExp;
18
+ //# sourceMappingURL=commit-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-shape.d.ts","sourceRoot":"","sources":["../../src/lib/commit-shape.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,wFAE9B,CAAC;AAEX,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAG1E"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * What makes a commit SUBJECT mechanical, in one place. `isDecisionCommit` (git.ts)
3
+ * builds its regex from this, and the capture report (fetchers/git.ts) names the list in
4
+ * the line a user reads - so the two cannot drift, which they had by the time ALI-827's
5
+ * review read them (the report named four prefixes of eight). A leaf module with no
6
+ * imports, so the tests that mock `lib/git.js` still print the real list.
7
+ */
8
+ export const MECHANICAL_SUBJECT_PREFIXES = [
9
+ 'chore', 'wip', 'merge', 'revert', 'bump', 'update deps', 'release', 'typo',
10
+ ];
11
+ /** Below this many characters a subject is a label, not a decision. */
12
+ export const MIN_DECISION_SUBJECT_CHARS = 20;
13
+ /**
14
+ * The predicate's regex, built from the list with every prefix escaped. Eight plain
15
+ * words need no escaping today; a future `c++` interpolated raw would read as "one or
16
+ * more c" and reject `ccc:` while looking exactly like a list entry (Copilot on #240).
17
+ * Anchored and case-insensitive, as the hand-written literal it replaced was.
18
+ */
19
+ export function mechanicalSubjectRegex(prefixes) {
20
+ const escaped = prefixes.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
21
+ return new RegExp(`^(${escaped.join('|')})`, 'i');
22
+ }
23
+ //# sourceMappingURL=commit-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commit-shape.js","sourceRoot":"","sources":["../../src/lib/commit-shape.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM;CACnE,CAAC;AAEX,uEAAuE;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAA2B;IAChE,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAI,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * ALI-827: one place that turns a fetcher's read into a capture report, so a
3
+ * connector-core that cannot report (0.5.0) and one that can (0.6.0, `fetchWithReport`)
4
+ * differ in exactly one branch rather than in nine wrappers.
5
+ *
6
+ * With no report from the fetcher, the fallback says only what the CALLER can honestly
7
+ * say: how many came back, and how many were asked for. It never guesses a reason -
8
+ * "zoom returns at most 30" is a fact the fetcher owns, and stating it here would be a
9
+ * second writer of it (code-style.md). With a report, the fetcher's own skips are carried
10
+ * through verbatim: they are written for a person and the CLI prints them.
11
+ */
12
+ import type { PersonalImportItem } from '../personal-import.js';
13
+ /** What a read could NOT reach, in the fetcher's own terms: a count and a measured
14
+ * reason, printed verbatim, so `detail` is written for a person. Owned here, by the
15
+ * producer; the renderer consumes it. */
16
+ export interface CaptureSkip {
17
+ /** How many source objects this covers. */
18
+ count: number;
19
+ /** One line printed after the count. */
20
+ detail: string;
21
+ }
22
+ export interface CaptureFetchReport {
23
+ /** Source objects examined before any filter, when the producer measured it (git, docs
24
+ * and every 0.6.0 SDK fetcher do). The fallback below cannot, and sets it to the
25
+ * returned count - so treat it as best-effort, never as a reliable pre-filter figure. */
26
+ scanned: number;
27
+ /** The cap the caller asked for, when it is worth saying: a fetcher that knows its
28
+ * cap did not bound the read leaves it out (git, docs), because "of up to 500" on a
29
+ * 40-commit repo is printed every run and stops being read. */
30
+ requested?: number;
31
+ skips: CaptureSkip[];
32
+ }
33
+ export interface CaptureFetchResult {
34
+ items: PersonalImportItem[];
35
+ report: CaptureFetchReport;
36
+ }
37
+ /**
38
+ * The slice of a connector-core fetcher this wrapper needs, declared structurally so it
39
+ * compiles against 0.5.0 (no `fetchWithReport`) and consumes 0.6.0's report the moment
40
+ * the installed package has one. `kind` and `platform` on the SDK report are accepted and
41
+ * dropped: the CLI prints the detail and branches on nothing else.
42
+ */
43
+ export interface ReportingFetcher<O> {
44
+ fetch(opts: O): Promise<PersonalImportItem[]>;
45
+ fetchWithReport?(opts: O): Promise<{
46
+ items: PersonalImportItem[];
47
+ report: {
48
+ scanned: number;
49
+ requested?: number;
50
+ skips: ReadonlyArray<{
51
+ count: number;
52
+ detail: string;
53
+ }>;
54
+ };
55
+ }>;
56
+ }
57
+ export declare function withCaptureReport<O extends {
58
+ limit?: number;
59
+ }>(opts: O, fetcher: ReportingFetcher<O>): Promise<CaptureFetchResult>;
60
+ //# sourceMappingURL=capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;0CAE0C;AAC1C,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC;;8FAE0F;IAC1F,OAAO,EAAE,MAAM,CAAC;IAChB;;oEAEgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC9C,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC;QACjC,KAAK,EAAE,kBAAkB,EAAE,CAAC;QAC5B,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,aAAa,CAAC;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE,MAAM,CAAA;aAAE,CAAC,CAAA;SAAE,CAAC;KAC1G,CAAC,CAAC;CACJ;AAED,wBAAsB,iBAAiB,CAAC,CAAC,SAAS;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAClE,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAyB7B"}
@@ -0,0 +1,27 @@
1
+ export async function withCaptureReport(opts, fetcher) {
2
+ if (typeof fetcher.fetchWithReport === 'function') {
3
+ // One read, never two: the SDK's `fetch` is defined as `(await fetchWithReport()).items`.
4
+ const { items, report } = await fetcher.fetchWithReport(opts);
5
+ return {
6
+ items,
7
+ report: {
8
+ scanned: report.scanned,
9
+ ...(report.requested !== undefined ? { requested: report.requested } : {}),
10
+ skips: report.skips.map((s) => ({ count: s.count, detail: s.detail })),
11
+ },
12
+ };
13
+ }
14
+ const items = await fetcher.fetch(opts);
15
+ return {
16
+ items,
17
+ report: {
18
+ scanned: items.length,
19
+ // Echoed whenever one was given: with no SDK report this wrapper cannot tell a cap
20
+ // that bound the read from a source that simply had less, so it says the honest,
21
+ // derived thing and leaves the reason to the fetcher.
22
+ ...(opts.limit !== undefined ? { requested: opts.limit } : {}),
23
+ skips: [],
24
+ },
25
+ };
26
+ }
27
+ //# sourceMappingURL=capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/lib/fetchers/capture.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAO,EACP,OAA4B;IAE5B,IAAI,OAAO,OAAO,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;QAClD,0FAA0F;QAC1F,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC9D,OAAO;YACL,KAAK;YACL,MAAM,EAAE;gBACN,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,GAAG,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1E,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;aACvE;SACF,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,OAAO;QACL,KAAK;QACL,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,MAAM;YACrB,mFAAmF;YACnF,iFAAiF;YACjF,sDAAsD;YACtD,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,KAAK,EAAE,EAAE;SACV;KACF,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal Confluence import. Delegates to the canonical fetcher in
3
3
  * @aligndottech/connector-core; maps its auth error to the CLI's reconnect flow. */
4
4
  export declare function fetchConfluenceItems(opts: {
@@ -8,5 +8,5 @@ export declare function fetchConfluenceItems(opts: {
8
8
  email?: string;
9
9
  domain?: string;
10
10
  limit?: number;
11
- }): Promise<PersonalImportItem[]>;
11
+ }): Promise<CaptureFetchResult>;
12
12
  //# sourceMappingURL=confluence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confluence.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/confluence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;qFACqF;AACrF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAOhC"}
1
+ {"version":3,"file":"confluence.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/confluence.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E;qFACqF;AACrF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAO9B"}
@@ -1,10 +1,11 @@
1
1
  import { ConfluenceFetcher, FetcherAuthError } from '@aligndottech/connector-core';
2
2
  import { AuthExpiredError } from '../errors.js';
3
+ import { withCaptureReport } from './capture.js';
3
4
  /** Read-only personal Confluence import. Delegates to the canonical fetcher in
4
5
  * @aligndottech/connector-core; maps its auth error to the CLI's reconnect flow. */
5
6
  export async function fetchConfluenceItems(opts) {
6
7
  try {
7
- return await new ConfluenceFetcher().fetch(opts);
8
+ return await withCaptureReport(opts, new ConfluenceFetcher());
8
9
  }
9
10
  catch (e) {
10
11
  if (e instanceof FetcherAuthError)
@@ -1 +1 @@
1
- {"version":3,"file":"confluence.js","sourceRoot":"","sources":["../../../src/lib/fetchers/confluence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD;qFACqF;AACrF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAO1C;IACC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,iBAAiB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,gBAAgB;YAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"confluence.js","sourceRoot":"","sources":["../../../src/lib/fetchers/confluence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAA2B,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE1E;qFACqF;AACrF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAO1C;IACC,IAAI,CAAC;QACH,OAAO,MAAM,iBAAiB,CAAC,IAAI,EAAE,IAAI,iBAAiB,EAAE,CAAC,CAAC;IAChE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,gBAAgB;YAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
@@ -1,6 +1,16 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import type { CaptureFetchResult } from './capture.js';
2
+ /**
3
+ * ALI-827: the same read, plus its capture report. A local read has no page size to fall
4
+ * off and no access to lack, so the one thing it drops is a headed section under the
5
+ * length floor, and that is the one skip it reports. `scanned` is every ADR file and
6
+ * headed section seen; the cap is echoed only when it bounded the read - "8 ADRs and
7
+ * sections of up to 500 requested" on every run says nothing (the same rule as
8
+ * gitCaptureReport). When it did bind, fetched equals the cap and the renderer prints no
9
+ * clause: the user got what they asked for, and how many more exist is unknown when the
10
+ * ADRs alone fill the limit, so no count is invented for it.
11
+ */
2
12
  export declare function fetchDocsItems(opts: {
3
13
  limit: number;
4
14
  cwd?: string;
5
- }): Promise<PersonalImportItem[]>;
15
+ }): Promise<CaptureFetchResult>;
6
16
  //# sourceMappingURL=docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/docs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAuKhE,wBAAsB,cAAc,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoBzG"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/docs.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAqNvD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAYvG"}
@@ -123,6 +123,10 @@ function splitIntoSections(content) {
123
123
  }
124
124
  async function readAgentRulesItems(repoRoot, remoteUrl, branch) {
125
125
  const items = [];
126
+ // ALI-827: headed sections the length floor dropped, so the capture report can name
127
+ // them. The headingless preamble (an H1 line, an intro sentence) is not counted when it
128
+ // is dropped: nobody wrote it as a section, so nobody will look for it in the graph.
129
+ let droppedShort = 0;
126
130
  for (const file of AGENT_RULES_FILES) {
127
131
  let raw;
128
132
  try {
@@ -138,8 +142,11 @@ async function readAgentRulesItems(repoRoot, remoteUrl, branch) {
138
142
  // silently dropped rather than imported.
139
143
  const seenSlugs = new Map();
140
144
  for (const section of splitIntoSections(stripped)) {
141
- if (section.body.length < MIN_CHUNK_CHARS)
145
+ if (section.body.length < MIN_CHUNK_CHARS) {
146
+ if (section.heading)
147
+ droppedShort++;
142
148
  continue;
149
+ }
143
150
  const title = section.heading ?? firstHeading(section.body) ?? humanizeFilename(file);
144
151
  let anchor = '';
145
152
  if (section.heading) {
@@ -156,9 +163,9 @@ async function readAgentRulesItems(repoRoot, remoteUrl, branch) {
156
163
  });
157
164
  }
158
165
  }
159
- return items;
166
+ return { items, droppedShort };
160
167
  }
161
- export async function fetchDocsItems(opts) {
168
+ async function readDocsItems(opts) {
162
169
  const repoRoot = opts.cwd ?? process.cwd();
163
170
  const gitOpts = opts.cwd ? { cwd: opts.cwd } : undefined;
164
171
  const [remoteUrl, branch, adrFiles] = await Promise.all([
@@ -172,9 +179,42 @@ export async function fetchDocsItems(opts) {
172
179
  // ADRs alone already fill the limit: reading and stripping CLAUDE.md/AGENTS.md would be
173
180
  // work whose result gets sliced away, so skip it rather than doing it and throwing it out.
174
181
  const remaining = opts.limit - adrItems.length;
182
+ // Capped even at exact equality: the agent-rules files were never opened BECAUSE the
183
+ // limit was already full, so something may have been left out and nobody counted it.
175
184
  if (remaining <= 0)
176
- return adrItems;
177
- const agentRulesItems = await readAgentRulesItems(repoRoot, remoteUrl, branch);
178
- return [...adrItems, ...agentRulesItems].slice(0, opts.limit);
185
+ return { items: adrItems, scanned: adrFiles.length, capped: true, droppedShort: 0 };
186
+ const { items: agentRulesItems, droppedShort } = await readAgentRulesItems(repoRoot, remoteUrl, branch);
187
+ const candidates = adrFiles.length + agentRulesItems.length;
188
+ return {
189
+ items: [...adrItems, ...agentRulesItems].slice(0, opts.limit),
190
+ scanned: candidates + droppedShort,
191
+ // Strictly more than the limit: everything was read, so the cap bound the read only
192
+ // if the slice actually cut something.
193
+ capped: candidates > opts.limit,
194
+ droppedShort,
195
+ };
196
+ }
197
+ /**
198
+ * ALI-827: the same read, plus its capture report. A local read has no page size to fall
199
+ * off and no access to lack, so the one thing it drops is a headed section under the
200
+ * length floor, and that is the one skip it reports. `scanned` is every ADR file and
201
+ * headed section seen; the cap is echoed only when it bounded the read - "8 ADRs and
202
+ * sections of up to 500 requested" on every run says nothing (the same rule as
203
+ * gitCaptureReport). When it did bind, fetched equals the cap and the renderer prints no
204
+ * clause: the user got what they asked for, and how many more exist is unknown when the
205
+ * ADRs alone fill the limit, so no count is invented for it.
206
+ */
207
+ export async function fetchDocsItems(opts) {
208
+ const { items, scanned, capped, droppedShort } = await readDocsItems(opts);
209
+ return {
210
+ items,
211
+ report: {
212
+ scanned,
213
+ ...(capped ? { requested: opts.limit } : {}),
214
+ skips: droppedShort > 0
215
+ ? [{ count: droppedShort, detail: `sections under ${MIN_CHUNK_CHARS} characters (a bare heading or a one-line pointer)` }]
216
+ : [],
217
+ },
218
+ };
179
219
  }
180
220
  //# sourceMappingURL=docs.js.map
@@ -1 +1 @@
1
- {"version":3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C3E,OAAO;QACL,KAAK;QACL,MAAM,EAAE;YACN,OAAO;YACP,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5C,KAAK,EAAE,YAAY,GAAG,CAAC;gBACrB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,kBAAkB,eAAe,oDAAoD,EAAE,CAAC;gBAC1H,CAAC,CAAC,EAAE;SACP;KACF,CAAC;AACJ,CAAC"}
@@ -1,7 +1,33 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import type { CaptureFetchReport, CaptureFetchResult, CaptureSkip } from './capture.js';
2
+ /**
3
+ * ALI-827: git's two drop reasons, kept apart. A commit whose SUBJECT is mechanical
4
+ * (isDecisionCommit: a prefix from MECHANICAL_SUBJECT_PREFIXES, or too short) never
5
+ * reaches the rationale gate at all, so folding it into "stated no reason" overstates
6
+ * what that gate did (Copilot review, PR #223). `scanned - kept - rejectedByRationale`
7
+ * is exactly the subject-shape count, because getCommitHistoryDetailed counts every
8
+ * scanned commit into one of those three buckets and nothing else.
9
+ */
10
+ export declare function gitCaptureSkips(counts: {
11
+ scanned: number;
12
+ kept: number;
13
+ rejectedByRationale: number;
14
+ }): CaptureSkip[];
15
+ /**
16
+ * The whole git report, one writer for `align setup` and `align import git`. `--limit`
17
+ * bounds what `git log` SCANS, not what comes back, so the cap is echoed only when the
18
+ * scan reached it: on a 40-commit repo "12 commits of up to 500 requested" would be
19
+ * printed on every run and says nothing, while on a 2,000-commit repo it is the one
20
+ * line that tells the user a bigger --limit reaches further back.
21
+ */
22
+ export declare function gitCaptureReport(counts: {
23
+ scanned: number;
24
+ kept: number;
25
+ rejectedByRationale: number;
26
+ limit: number;
27
+ }): CaptureFetchReport;
2
28
  /** Read-only local-git import. The canonical GitFetcher in connector-core is
3
29
  * pure; the CLI injects the actual git I/O (log/remote) here. */
4
30
  export declare function fetchGitItems(opts: {
5
31
  limit: number;
6
- }): Promise<PersonalImportItem[]>;
32
+ }): Promise<CaptureFetchResult>;
7
33
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/git.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;kEACkE;AAClE,wBAAsB,aAAa,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE1F"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/git.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAExF;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,EAAE,CAerH;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,mBAAmB,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAC3E,GAAG,kBAAkB,CAMrB;AAED;kEACkE;AAClE,wBAAsB,aAAa,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAWxF"}
@@ -1,8 +1,56 @@
1
1
  import { GitFetcher } from '@aligndottech/connector-core';
2
- import { getCommitHistory, getRemoteUrl } from '../git.js';
2
+ import { getCommitHistoryDetailed, getRemoteUrl } from '../git.js';
3
+ import { MECHANICAL_SUBJECT_PREFIXES } from '../commit-shape.js';
4
+ /**
5
+ * ALI-827: git's two drop reasons, kept apart. A commit whose SUBJECT is mechanical
6
+ * (isDecisionCommit: a prefix from MECHANICAL_SUBJECT_PREFIXES, or too short) never
7
+ * reaches the rationale gate at all, so folding it into "stated no reason" overstates
8
+ * what that gate did (Copilot review, PR #223). `scanned - kept - rejectedByRationale`
9
+ * is exactly the subject-shape count, because getCommitHistoryDetailed counts every
10
+ * scanned commit into one of those three buckets and nothing else.
11
+ */
12
+ export function gitCaptureSkips(counts) {
13
+ const mechanical = counts.scanned - counts.kept - counts.rejectedByRationale;
14
+ return [
15
+ ...(counts.rejectedByRationale > 0
16
+ ? [{ count: counts.rejectedByRationale, detail: 'commits stated no reason beyond the subject' }]
17
+ : []),
18
+ ...(mechanical > 0
19
+ ? [{
20
+ count: mechanical,
21
+ // The list is the one the predicate is built from, so the line cannot name a
22
+ // different set than the one that did the rejecting.
23
+ detail: `commits with a mechanical or too-short subject (${MECHANICAL_SUBJECT_PREFIXES.join(', ')})`,
24
+ }]
25
+ : []),
26
+ ];
27
+ }
28
+ /**
29
+ * The whole git report, one writer for `align setup` and `align import git`. `--limit`
30
+ * bounds what `git log` SCANS, not what comes back, so the cap is echoed only when the
31
+ * scan reached it: on a 40-commit repo "12 commits of up to 500 requested" would be
32
+ * printed on every run and says nothing, while on a 2,000-commit repo it is the one
33
+ * line that tells the user a bigger --limit reaches further back.
34
+ */
35
+ export function gitCaptureReport(counts) {
36
+ return {
37
+ scanned: counts.scanned,
38
+ ...(counts.scanned >= counts.limit ? { requested: counts.limit } : {}),
39
+ skips: gitCaptureSkips(counts),
40
+ };
41
+ }
3
42
  /** Read-only local-git import. The canonical GitFetcher in connector-core is
4
43
  * pure; the CLI injects the actual git I/O (log/remote) here. */
5
44
  export async function fetchGitItems(opts) {
6
- return new GitFetcher({ getCommitHistory, getRemoteUrl }).fetch({ token: '', limit: opts.limit });
45
+ // Read ONCE and hand the commits to the pure GitFetcher, rather than letting it call
46
+ // git again: two reads of a moving history are two different answers, and the scanned
47
+ // and rejected counts have to describe the same read the items came from.
48
+ const { commits, scanned, rejectedByRationale } = await getCommitHistoryDetailed({ limit: opts.limit });
49
+ const items = await new GitFetcher({ getCommitHistory: async () => commits, getRemoteUrl })
50
+ .fetch({ token: '', limit: opts.limit });
51
+ return {
52
+ items,
53
+ report: gitCaptureReport({ scanned, kept: commits.length, rejectedByRationale, limit: opts.limit }),
54
+ };
7
55
  }
8
56
  //# sourceMappingURL=git.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/lib/fetchers/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG3D;kEACkE;AAClE,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAuB;IACzD,OAAO,IAAI,UAAU,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;AACpG,CAAC"}
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/lib/fetchers/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAGjE;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,MAAsE;IACpG,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAC7E,OAAO;QACL,GAAG,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC;YAChC,CAA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AI,EAAE,OAAO,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;KACpG,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal GitHub import (canonical fetcher in connector-core). */
3
3
  export declare function fetchGitHubItems(opts: {
4
4
  token: string;
5
5
  limit?: number;
6
- }): Promise<PersonalImportItem[]>;
6
+ }): Promise<CaptureFetchResult>;
7
7
  //# sourceMappingURL=github.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/github.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE7G"}
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/github.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE3G"}
@@ -1,6 +1,7 @@
1
1
  import { GitHubFetcher } from '@aligndottech/connector-core';
2
+ import { withCaptureReport } from './capture.js';
2
3
  /** Read-only personal GitHub import (canonical fetcher in connector-core). */
3
4
  export async function fetchGitHubItems(opts) {
4
- return new GitHubFetcher().fetch(opts);
5
+ return withCaptureReport(opts, new GitHubFetcher());
5
6
  }
6
7
  //# sourceMappingURL=github.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.js","sourceRoot":"","sources":["../../../src/lib/fetchers/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAuC;IAC5E,OAAO,IAAI,aAAa,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"github.js","sourceRoot":"","sources":["../../../src/lib/fetchers/github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAA2B,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAuC;IAC5E,OAAO,iBAAiB,CAAC,IAAI,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;AACtD,CAAC"}
@@ -1,8 +1,8 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal GitLab import (canonical fetcher in connector-core). */
3
3
  export declare function fetchGitLabItems(opts: {
4
4
  token: string;
5
5
  domain?: string;
6
6
  limit?: number;
7
- }): Promise<PersonalImportItem[]>;
7
+ }): Promise<CaptureFetchResult>;
8
8
  //# sourceMappingURL=gitlab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/gitlab.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE9H"}
1
+ {"version":3,"file":"gitlab.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/gitlab.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE5H"}
@@ -1,6 +1,7 @@
1
1
  import { GitLabFetcher } from '@aligndottech/connector-core';
2
+ import { withCaptureReport } from './capture.js';
2
3
  /** Read-only personal GitLab import (canonical fetcher in connector-core). */
3
4
  export async function fetchGitLabItems(opts) {
4
- return new GitLabFetcher().fetch(opts);
5
+ return withCaptureReport(opts, new GitLabFetcher());
5
6
  }
6
7
  //# sourceMappingURL=gitlab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../src/lib/fetchers/gitlab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAwD;IAC7F,OAAO,IAAI,aAAa,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"gitlab.js","sourceRoot":"","sources":["../../../src/lib/fetchers/gitlab.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAA2B,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAwD;IAC7F,OAAO,iBAAiB,CAAC,IAAI,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;AACtD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal Jira import. Delegates to the canonical fetcher in
3
3
  * @aligndottech/connector-core; maps its auth error to the CLI's reconnect flow. */
4
4
  export declare function fetchJiraItems(opts: {
@@ -8,5 +8,5 @@ export declare function fetchJiraItems(opts: {
8
8
  email?: string;
9
9
  domain?: string;
10
10
  limit?: number;
11
- }): Promise<PersonalImportItem[]>;
11
+ }): Promise<CaptureFetchResult>;
12
12
  //# sourceMappingURL=jira.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jira.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/jira.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;qFACqF;AACrF,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAOhC"}
1
+ {"version":3,"file":"jira.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/jira.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E;qFACqF;AACrF,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAO9B"}
@@ -1,10 +1,11 @@
1
1
  import { FetcherAuthError, JiraFetcher } from '@aligndottech/connector-core';
2
2
  import { AuthExpiredError } from '../errors.js';
3
+ import { withCaptureReport } from './capture.js';
3
4
  /** Read-only personal Jira import. Delegates to the canonical fetcher in
4
5
  * @aligndottech/connector-core; maps its auth error to the CLI's reconnect flow. */
5
6
  export async function fetchJiraItems(opts) {
6
7
  try {
7
- return await new JiraFetcher().fetch(opts);
8
+ return await withCaptureReport(opts, new JiraFetcher());
8
9
  }
9
10
  catch (e) {
10
11
  if (e instanceof FetcherAuthError)
@@ -1 +1 @@
1
- {"version":3,"file":"jira.js","sourceRoot":"","sources":["../../../src/lib/fetchers/jira.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhD;qFACqF;AACrF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAOpC;IACC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,WAAW,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,gBAAgB;YAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"jira.js","sourceRoot":"","sources":["../../../src/lib/fetchers/jira.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAA2B,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE1E;qFACqF;AACrF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAOpC;IACC,IAAI,CAAC;QACH,OAAO,MAAM,iBAAiB,CAAC,IAAI,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,gBAAgB;YAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal Linear import (canonical fetcher in connector-core). */
3
3
  export declare function fetchLinearItems(opts: {
4
4
  token: string;
5
5
  limit?: number;
6
- }): Promise<PersonalImportItem[]>;
6
+ }): Promise<CaptureFetchResult>;
7
7
  //# sourceMappingURL=linear.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/linear.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE7G"}
1
+ {"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/linear.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE3G"}
@@ -1,6 +1,7 @@
1
1
  import { LinearFetcher } from '@aligndottech/connector-core';
2
+ import { withCaptureReport } from './capture.js';
2
3
  /** Read-only personal Linear import (canonical fetcher in connector-core). */
3
4
  export async function fetchLinearItems(opts) {
4
- return new LinearFetcher().fetch(opts);
5
+ return withCaptureReport(opts, new LinearFetcher());
5
6
  }
6
7
  //# sourceMappingURL=linear.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"linear.js","sourceRoot":"","sources":["../../../src/lib/fetchers/linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAuC;IAC5E,OAAO,IAAI,aAAa,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"linear.js","sourceRoot":"","sources":["../../../src/lib/fetchers/linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAA2B,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAuC;IAC5E,OAAO,iBAAiB,CAAC,IAAI,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;AACtD,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { PersonalImportItem } from '../personal-import.js';
1
+ import { type CaptureFetchResult } from './capture.js';
2
2
  /** Read-only personal Notion import (canonical fetcher in connector-core). */
3
3
  export declare function fetchNotionItems(opts: {
4
4
  token: string;
5
5
  limit?: number;
6
- }): Promise<PersonalImportItem[]>;
6
+ }): Promise<CaptureFetchResult>;
7
7
  //# sourceMappingURL=notion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notion.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/notion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE7G"}
1
+ {"version":3,"file":"notion.d.ts","sourceRoot":"","sources":["../../../src/lib/fetchers/notion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AAE1E,8EAA8E;AAC9E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE3G"}
@@ -1,6 +1,7 @@
1
1
  import { NotionFetcher } from '@aligndottech/connector-core';
2
+ import { withCaptureReport } from './capture.js';
2
3
  /** Read-only personal Notion import (canonical fetcher in connector-core). */
3
4
  export async function fetchNotionItems(opts) {
4
- return new NotionFetcher().fetch(opts);
5
+ return withCaptureReport(opts, new NotionFetcher());
5
6
  }
6
7
  //# sourceMappingURL=notion.js.map