@oss-autopilot/core 3.42.4 → 3.43.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 (172) hide show
  1. package/dist/cli-pre-action.js +8 -3
  2. package/dist/cli-registry.js +272 -25
  3. package/dist/cli.bundle.cjs +183 -154
  4. package/dist/commands/check-integration.js +1 -0
  5. package/dist/commands/cleanup.d.ts +76 -0
  6. package/dist/commands/cleanup.js +269 -0
  7. package/dist/commands/comments.d.ts +6 -0
  8. package/dist/commands/comments.js +6 -2
  9. package/dist/commands/config.js +37 -5
  10. package/dist/commands/daily-dismiss-filter.d.ts +7 -0
  11. package/dist/commands/daily-dismiss-filter.js +17 -1
  12. package/dist/commands/daily-ledger.d.ts +122 -0
  13. package/dist/commands/daily-ledger.js +225 -0
  14. package/dist/commands/daily-recent-prs.d.ts +26 -0
  15. package/dist/commands/daily-recent-prs.js +55 -0
  16. package/dist/commands/daily.d.ts +2 -1
  17. package/dist/commands/daily.js +59 -89
  18. package/dist/commands/dashboard-cache.d.ts +2 -0
  19. package/dist/commands/dashboard-cache.js +33 -8
  20. package/dist/commands/dashboard-data.js +71 -36
  21. package/dist/commands/dashboard-gist-sync.js +3 -1
  22. package/dist/commands/dashboard-lifecycle.js +1 -1
  23. package/dist/commands/dashboard-process.d.ts +14 -1
  24. package/dist/commands/dashboard-process.js +46 -7
  25. package/dist/commands/dashboard-server.js +89 -23
  26. package/dist/commands/detect-formatters.js +1 -0
  27. package/dist/commands/dismiss.js +5 -2
  28. package/dist/commands/doctor.d.ts +15 -1
  29. package/dist/commands/doctor.js +73 -5
  30. package/dist/commands/draft.d.ts +77 -0
  31. package/dist/commands/draft.js +218 -0
  32. package/dist/commands/eval.js +1 -0
  33. package/dist/commands/guidelines.d.ts +23 -1
  34. package/dist/commands/guidelines.js +49 -4
  35. package/dist/commands/index.d.ts +24 -4
  36. package/dist/commands/index.js +15 -3
  37. package/dist/commands/issue-thread.d.ts +46 -0
  38. package/dist/commands/issue-thread.js +123 -0
  39. package/dist/commands/ledger-backfill.d.ts +9 -0
  40. package/dist/commands/ledger-backfill.js +44 -1
  41. package/dist/commands/list-mark-done.d.ts +2 -1
  42. package/dist/commands/list-mark-done.js +3 -1
  43. package/dist/commands/list-move-tier.d.ts +2 -1
  44. package/dist/commands/list-move-tier.js +3 -1
  45. package/dist/commands/local-repos.js +10 -5
  46. package/dist/commands/locate-issue-list.d.ts +40 -17
  47. package/dist/commands/locate-issue-list.js +148 -88
  48. package/dist/commands/move.js +7 -1
  49. package/dist/commands/overnight-handoff.d.ts +17 -7
  50. package/dist/commands/overnight-handoff.js +36 -14
  51. package/dist/commands/overnight-push-prep.d.ts +13 -8
  52. package/dist/commands/overnight-push-prep.js +106 -34
  53. package/dist/commands/overnight-tool-rules.d.ts +54 -0
  54. package/dist/commands/overnight-tool-rules.js +217 -0
  55. package/dist/commands/overnight.d.ts +5 -6
  56. package/dist/commands/overnight.js +61 -140
  57. package/dist/commands/parse-list.js +7 -1
  58. package/dist/commands/policy.d.ts +86 -0
  59. package/dist/commands/policy.js +263 -0
  60. package/dist/commands/pr-preflight.d.ts +43 -0
  61. package/dist/commands/pr-preflight.js +294 -0
  62. package/dist/commands/repo-vet.d.ts +9 -0
  63. package/dist/commands/repo-vet.js +36 -11
  64. package/dist/commands/scout-bridge.js +18 -8
  65. package/dist/commands/search.js +7 -0
  66. package/dist/commands/setup.d.ts +3 -3
  67. package/dist/commands/setup.js +46 -18
  68. package/dist/commands/skip-add.js +10 -1
  69. package/dist/commands/startup.d.ts +5 -3
  70. package/dist/commands/startup.js +65 -49
  71. package/dist/commands/state-cmd.d.ts +2 -0
  72. package/dist/commands/state-cmd.js +5 -1
  73. package/dist/commands/stats.js +1 -0
  74. package/dist/commands/status.js +1 -0
  75. package/dist/commands/strategy.js +1 -0
  76. package/dist/commands/vet-list.d.ts +6 -0
  77. package/dist/commands/vet-list.js +25 -0
  78. package/dist/commands/vet.d.ts +12 -0
  79. package/dist/commands/vet.js +118 -1
  80. package/dist/core/__fixtures__/prompt-injection-payloads.js +31 -0
  81. package/dist/core/anti-llm-policy.d.ts +3 -0
  82. package/dist/core/anti-llm-policy.js +3 -0
  83. package/dist/core/auth.js +2 -0
  84. package/dist/core/checklist-analysis.js +50 -12
  85. package/dist/core/ci-analysis.d.ts +7 -2
  86. package/dist/core/ci-analysis.js +76 -21
  87. package/dist/core/comment-utils.d.ts +1 -1
  88. package/dist/core/comment-utils.js +7 -1
  89. package/dist/core/commit-date.d.ts +19 -0
  90. package/dist/core/commit-date.js +17 -0
  91. package/dist/core/compliance-score.js +11 -7
  92. package/dist/core/config-registry.js +11 -5
  93. package/dist/core/contributing.d.ts +2 -3
  94. package/dist/core/contributing.js +2 -3
  95. package/dist/core/daily-logic.d.ts +27 -5
  96. package/dist/core/daily-logic.js +57 -19
  97. package/dist/core/errors.d.ts +37 -3
  98. package/dist/core/errors.js +54 -5
  99. package/dist/core/gist-health.d.ts +15 -3
  100. package/dist/core/gist-health.js +8 -0
  101. package/dist/core/gist-state-store.d.ts +24 -4
  102. package/dist/core/gist-state-store.js +97 -46
  103. package/dist/core/github-stats.d.ts +104 -16
  104. package/dist/core/github-stats.js +282 -97
  105. package/dist/core/http-cache.d.ts +0 -10
  106. package/dist/core/http-cache.js +0 -19
  107. package/dist/core/index.d.ts +12 -5
  108. package/dist/core/index.js +15 -5
  109. package/dist/core/issue-conversation.d.ts +8 -2
  110. package/dist/core/issue-conversation.js +31 -12
  111. package/dist/core/local-config.d.ts +95 -0
  112. package/dist/core/local-config.js +271 -0
  113. package/dist/core/merged-pr-notes.d.ts +2 -2
  114. package/dist/core/pagination.d.ts +55 -0
  115. package/dist/core/pagination.js +59 -0
  116. package/dist/core/paths.d.ts +7 -0
  117. package/dist/core/paths.js +9 -0
  118. package/dist/core/pr-assembly.js +6 -2
  119. package/dist/core/pr-graphql.d.ts +37 -3
  120. package/dist/core/pr-graphql.js +73 -12
  121. package/dist/core/pr-monitor.d.ts +29 -12
  122. package/dist/core/pr-monitor.js +71 -23
  123. package/dist/core/pr-preflight.d.ts +113 -0
  124. package/dist/core/pr-preflight.js +364 -0
  125. package/dist/core/pr-quality-rubric.d.ts +0 -6
  126. package/dist/core/pr-quality-rubric.js +0 -8
  127. package/dist/core/pr-template.d.ts +2 -0
  128. package/dist/core/pr-template.js +5 -1
  129. package/dist/core/repo-policy.d.ts +105 -0
  130. package/dist/core/repo-policy.js +400 -0
  131. package/dist/core/repo-score-manager.d.ts +48 -0
  132. package/dist/core/repo-score-manager.js +111 -1
  133. package/dist/core/review-analysis.d.ts +34 -19
  134. package/dist/core/review-analysis.js +74 -19
  135. package/dist/core/reviewed-prs-fetch.js +11 -29
  136. package/dist/core/reviewed-prs.js +8 -15
  137. package/dist/core/stale-data.d.ts +41 -0
  138. package/dist/core/stale-data.js +115 -0
  139. package/dist/core/state-persistence.d.ts +62 -27
  140. package/dist/core/state-persistence.js +338 -117
  141. package/dist/core/state-schema.d.ts +113 -210
  142. package/dist/core/state-schema.js +165 -80
  143. package/dist/core/state.d.ts +60 -8
  144. package/dist/core/state.js +192 -46
  145. package/dist/core/status-determination.js +26 -8
  146. package/dist/core/strategy.js +3 -1
  147. package/dist/core/types.d.ts +22 -1
  148. package/dist/core/types.js +1 -0
  149. package/dist/core/untrusted-content.d.ts +30 -11
  150. package/dist/core/untrusted-content.js +77 -42
  151. package/dist/core/urls.d.ts +9 -0
  152. package/dist/core/urls.js +18 -0
  153. package/dist/dashboard/assets/{chart-panel-DPKNBUts.js → chart-panel-C_C1lFTI.js} +1 -1
  154. package/dist/dashboard/assets/{index-B25bZOYX.js → index-B--H66Jk.js} +1 -1
  155. package/dist/dashboard/index.html +1 -1
  156. package/dist/formatters/json.d.ts +262 -6
  157. package/dist/formatters/json.js +77 -1
  158. package/package.json +1 -1
  159. package/dist/core/ci-enforced-tools.d.ts +0 -35
  160. package/dist/core/ci-enforced-tools.js +0 -109
  161. package/dist/core/comment-decision.d.ts +0 -79
  162. package/dist/core/comment-decision.js +0 -82
  163. package/dist/core/extraction-categories.d.ts +0 -55
  164. package/dist/core/extraction-categories.js +0 -108
  165. package/dist/core/follow-up-history.d.ts +0 -40
  166. package/dist/core/follow-up-history.js +0 -71
  167. package/dist/core/issue-effort.d.ts +0 -29
  168. package/dist/core/issue-effort.js +0 -47
  169. package/dist/core/maintainer-hints.d.ts +0 -23
  170. package/dist/core/maintainer-hints.js +0 -36
  171. package/dist/core/workflow-state.d.ts +0 -56
  172. package/dist/core/workflow-state.js +0 -101
@@ -1,36 +0,0 @@
1
- /**
2
- * Maintainer-hint label constants (#1264).
3
- *
4
- * Extracted from `workflows/action-menu.md`'s in-prompt mapping so the
5
- * label strings live in typed code instead of markdown. Adding a new
6
- * hint type becomes a single-file change in core; the workflow gets
7
- * the new label for free instead of requiring a parallel markdown
8
- * edit. Same pattern as #1252.
9
- */
10
- /**
11
- * Display labels the action-menu workflow renders for each hint type.
12
- * Source of truth — both `data.daily.actionableIssues[*].maintainerHintsLabel`
13
- * (computed by the CLI) and the workflow's prose docs reference this map.
14
- */
15
- export const MAINTAINER_HINT_LABELS = {
16
- demo_requested: 'demo/screenshot requested',
17
- tests_requested: 'tests requested',
18
- changes_requested: 'code changes requested',
19
- docs_requested: 'documentation requested',
20
- rebase_requested: 'rebase requested',
21
- };
22
- /**
23
- * Format an array of hints as a comma-joined human label, in the same
24
- * order the caller passed them. Unknown hint values are dropped silently —
25
- * a future CLI version might emit a hint type the workflow doesn't yet
26
- * know about; rendering "undefined" would be worse than omitting it.
27
- */
28
- export function formatMaintainerHints(hints) {
29
- const labels = [];
30
- for (const h of hints) {
31
- const label = MAINTAINER_HINT_LABELS[h];
32
- if (label)
33
- labels.push(label);
34
- }
35
- return labels.join(', ');
36
- }
@@ -1,56 +0,0 @@
1
- /**
2
- * Workflow-state helpers (#1280).
3
- *
4
- * Centralizes the read/write logic for `state.workflowState`. Used
5
- * by `draft-first-workflow.md`, `work-through-issues.md`, and
6
- * `pre-commit-review.md` to record pause points and offer
7
- * Resume / Restart / Discard at the next `/oss` invocation.
8
- *
9
- * Pure functions — callers manage state I/O. Same architectural
10
- * shape as the recent #1277 (follow-up-history) helpers.
11
- */
12
- import type { AgentState, WorkflowState } from './state-schema.js';
13
- export type WorkflowName = WorkflowState['workflowName'];
14
- /**
15
- * Snapshot the user's current workflow position. Returns the
16
- * patched state; callers persist via `StateManager.save()` (or the
17
- * gist `checkpoint()` path).
18
- */
19
- export declare function recordWorkflowPause(state: AgentState, next: Omit<WorkflowState, 'lastUpdatedAt'>, now?: Date): AgentState;
20
- /**
21
- * Read the current workflow snapshot, or null when no pause is
22
- * recorded.
23
- */
24
- export declare function getWorkflowState(state: AgentState): WorkflowState | null;
25
- /**
26
- * Discard the current pause snapshot. Used by:
27
- * - the workflow completing normally,
28
- * - the user picking "Discard and start fresh" at the resume
29
- * prompt,
30
- * - any consumer that detects the snapshot has gone stale (branch
31
- * deleted, repo no longer reachable).
32
- */
33
- export declare function clearWorkflowState(state: AgentState): AgentState;
34
- /**
35
- * Append a step name to `completedSteps` and update `currentStep`
36
- * to the supplied next step. Convenience wrapper around the immer-
37
- * style read/replace pattern. Returns the patched state.
38
- */
39
- export declare function advanceWorkflowStep(state: AgentState, nextStep: string, now?: Date): AgentState;
40
- /**
41
- * Merge per-step data into `stepData` without overwriting other
42
- * keys. Useful when a workflow's resume needs to restore non-trivial
43
- * context (skipped compliance items, last review pass count, etc.).
44
- */
45
- export declare function setStepData(state: AgentState, step: string, data: unknown, now?: Date): AgentState;
46
- /**
47
- * Read step data for a specific step, or undefined when none was
48
- * stored. Callers typically narrow the unknown via a type guard.
49
- */
50
- export declare function getStepData(state: AgentState, step: string): unknown;
51
- /**
52
- * Whether the recorded pause is on the supplied workflow. Useful
53
- * for the router to decide whether to offer Resume vs ignore the
54
- * snapshot when the current `/oss` invocation is unrelated.
55
- */
56
- export declare function isPausedIn(state: AgentState, workflowName: WorkflowName): boolean;
@@ -1,101 +0,0 @@
1
- /**
2
- * Workflow-state helpers (#1280).
3
- *
4
- * Centralizes the read/write logic for `state.workflowState`. Used
5
- * by `draft-first-workflow.md`, `work-through-issues.md`, and
6
- * `pre-commit-review.md` to record pause points and offer
7
- * Resume / Restart / Discard at the next `/oss` invocation.
8
- *
9
- * Pure functions — callers manage state I/O. Same architectural
10
- * shape as the recent #1277 (follow-up-history) helpers.
11
- */
12
- /**
13
- * Snapshot the user's current workflow position. Returns the
14
- * patched state; callers persist via `StateManager.save()` (or the
15
- * gist `checkpoint()` path).
16
- */
17
- export function recordWorkflowPause(state, next, now = new Date()) {
18
- const incoming = {
19
- ...next,
20
- lastUpdatedAt: now.toISOString(),
21
- };
22
- return { ...state, workflowState: incoming };
23
- }
24
- /**
25
- * Read the current workflow snapshot, or null when no pause is
26
- * recorded.
27
- */
28
- export function getWorkflowState(state) {
29
- return state.workflowState ?? null;
30
- }
31
- /**
32
- * Discard the current pause snapshot. Used by:
33
- * - the workflow completing normally,
34
- * - the user picking "Discard and start fresh" at the resume
35
- * prompt,
36
- * - any consumer that detects the snapshot has gone stale (branch
37
- * deleted, repo no longer reachable).
38
- */
39
- export function clearWorkflowState(state) {
40
- if (!state.workflowState)
41
- return state;
42
- const { workflowState: _drop, ...rest } = state;
43
- return rest;
44
- }
45
- /**
46
- * Append a step name to `completedSteps` and update `currentStep`
47
- * to the supplied next step. Convenience wrapper around the immer-
48
- * style read/replace pattern. Returns the patched state.
49
- */
50
- export function advanceWorkflowStep(state, nextStep, now = new Date()) {
51
- const ws = state.workflowState;
52
- if (!ws)
53
- return state;
54
- if (ws.currentStep === nextStep)
55
- return state;
56
- const completed = [...ws.completedSteps];
57
- if (!completed.includes(ws.currentStep))
58
- completed.push(ws.currentStep);
59
- return {
60
- ...state,
61
- workflowState: {
62
- ...ws,
63
- currentStep: nextStep,
64
- completedSteps: completed,
65
- lastUpdatedAt: now.toISOString(),
66
- },
67
- };
68
- }
69
- /**
70
- * Merge per-step data into `stepData` without overwriting other
71
- * keys. Useful when a workflow's resume needs to restore non-trivial
72
- * context (skipped compliance items, last review pass count, etc.).
73
- */
74
- export function setStepData(state, step, data, now = new Date()) {
75
- const ws = state.workflowState;
76
- if (!ws)
77
- return state;
78
- return {
79
- ...state,
80
- workflowState: {
81
- ...ws,
82
- stepData: { ...ws.stepData, [step]: data },
83
- lastUpdatedAt: now.toISOString(),
84
- },
85
- };
86
- }
87
- /**
88
- * Read step data for a specific step, or undefined when none was
89
- * stored. Callers typically narrow the unknown via a type guard.
90
- */
91
- export function getStepData(state, step) {
92
- return state.workflowState?.stepData[step];
93
- }
94
- /**
95
- * Whether the recorded pause is on the supplied workflow. Useful
96
- * for the router to decide whether to offer Resume vs ignore the
97
- * snapshot when the current `/oss` invocation is unrelated.
98
- */
99
- export function isPausedIn(state, workflowName) {
100
- return state.workflowState?.workflowName === workflowName;
101
- }