santree 0.7.0 → 0.7.2

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.
@@ -9,6 +9,18 @@ export interface State {
9
9
  name: string;
10
10
  type: string;
11
11
  }
12
+ /** Readiness of an issue given its blocking dependencies:
13
+ * "ready" — no unresolved blockers (or none at all)
14
+ * "blocked" — at least one blocker isn't done yet
15
+ * "unknown" — the tracker doesn't expose dependency data */
16
+ export type Readiness = "ready" | "blocked" | "unknown";
17
+ export declare function issueReadiness(blockedBy: IssueRef[] | undefined): Readiness;
18
+ /** A lightweight reference to a related issue, with whether it's resolved
19
+ * (state.type is completed/canceled). Used for dependency (blocks) relations. */
20
+ export interface IssueRef {
21
+ identifier: string;
22
+ done: boolean;
23
+ }
12
24
  export interface AssignedIssue {
13
25
  identifier: string;
14
26
  title: string;
@@ -20,10 +32,45 @@ export interface AssignedIssue {
20
32
  labels: string[];
21
33
  projectId: string | null;
22
34
  projectName: string | null;
35
+ /** Issues that block this one ("blocked by"). An issue is ready to start when
36
+ * every blocker is `done`. `undefined` when the tracker doesn't expose
37
+ * dependency relations (only Linear does); `[]` means no blockers. */
38
+ blockedBy?: IssueRef[];
39
+ /** Issues this one blocks (downstream dependents). */
40
+ blocking?: IssueRef[];
41
+ /** Due date as an ISO `YYYY-MM-DD` string, or null when none is set.
42
+ * Only trackers with a native due-date concept populate it (Linear today);
43
+ * others leave it undefined. Surfaced on the Triage tab as a colored,
44
+ * urgency-coded badge. */
45
+ dueDate?: string | null;
23
46
  }
24
47
  export interface Issue extends AssignedIssue {
25
48
  comments: Comment[];
26
49
  }
50
+ /** One slot in a triage on-call rotation. */
51
+ export interface TriageShift {
52
+ startsAt: string;
53
+ endsAt: string;
54
+ /** Resolved display name (falls back to email, then "Unknown"). */
55
+ name: string;
56
+ /** True when this shift covers the current moment. */
57
+ isCurrent: boolean;
58
+ /** True when this shift belongs to the authenticated viewer. */
59
+ isMe: boolean;
60
+ }
61
+ /** A team's triage responsibility rotation (Linear "Triage responsibility"
62
+ * backed by a time schedule). */
63
+ export interface TriageSchedule {
64
+ teamKey: string;
65
+ teamName: string;
66
+ scheduleName: string;
67
+ /** Display name of whoever is on call right now, if known. */
68
+ currentName: string | null;
69
+ /** Whether the viewer is the one currently on call. */
70
+ currentIsMe: boolean;
71
+ /** Chronological list of shifts. */
72
+ shifts: TriageShift[];
73
+ }
27
74
  export interface AuthStatus {
28
75
  authenticated: boolean;
29
76
  accountLabel?: string;
@@ -65,6 +112,17 @@ export interface IssueTracker {
65
112
  cleanupCache(identifier: string): void;
66
113
  listAssigned(repoRoot: string): Promise<IssueTrackerResult<AssignedIssue[]>>;
67
114
  getIssue(identifier: string, repoRoot: string): Promise<IssueTrackerResult<Issue>>;
115
+ /** When true, this tracker has a native triage concept (incoming issues in
116
+ * a `state.type === "triage"` inbox). The dashboard surfaces a dedicated
117
+ * Triage tab only when the active tracker sets this — feature detection,
118
+ * never a `kind === "linear"` string check, per the
119
+ * no-tracker-conditionals-outside-the-factory policy. Linear sets it;
120
+ * GitHub/Local leave it undefined. */
121
+ readonly supportsTriage?: boolean;
122
+ /** Triage on-call rotations for the viewer's teams. Optional — implemented
123
+ * only by trackers with a triage scheduling concept (Linear). Returns an
124
+ * empty array on failure or when no schedules exist; never throws. */
125
+ getTriageSchedules?(repoRoot: string): Promise<TriageSchedule[]>;
68
126
  /** When true, the tracker implements createIssue/updateIssue/deleteIssue.
69
127
  * Read-only trackers (Linear, GitHub) leave this undefined; UI surfaces
70
128
  * gate every mutation path on `tracker.canMutate === true` (feature
@@ -1 +1,5 @@
1
- export {};
1
+ export function issueReadiness(blockedBy) {
2
+ if (blockedBy === undefined)
3
+ return "unknown";
4
+ return blockedBy.some((b) => !b.done) ? "blocked" : "ready";
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "santree",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Git worktree manager",
5
5
  "license": "MIT",
6
6
  "author": "Santiago Toscanini",
@@ -0,0 +1,10 @@
1
+ You are helping triage an incoming issue. Below is the full issue with all of its comments. Answer the question that follows concisely and directly, grounded in what the issue and its discussion actually say.
2
+
3
+ When the question is about whether or how the issue can be fixed, you may inspect the codebase read-only (Read/Grep/Glob) to ground your answer in the real code — name the relevant files. Do not make any changes, and do not ask the user to run commands.
4
+
5
+ Keep the answer short and skimmable: a few sentences or a short bullet list. If the issue lacks the information needed to answer, say what's missing.
6
+
7
+ {{ ticket_content }}
8
+
9
+ ## Question
10
+ {{ user_question }}