@clipboard-health/groundcrew 4.2.0 → 4.2.1
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.
- package/dist/commands/cleaner.d.ts +1 -1
- package/dist/commands/cleaner.d.ts.map +1 -1
- package/dist/commands/cleaner.js +4 -2
- package/dist/commands/dispatcher.d.ts +6 -6
- package/dist/commands/dispatcher.d.ts.map +1 -1
- package/dist/commands/dispatcher.js +43 -27
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +18 -22
- package/dist/commands/eligibility.d.ts +1 -1
- package/dist/commands/eligibility.d.ts.map +1 -1
- package/dist/commands/eligibility.js +7 -6
- package/dist/commands/orchestrator.d.ts.map +1 -1
- package/dist/commands/orchestrator.js +18 -14
- package/dist/commands/resumeWorkspace.d.ts.map +1 -1
- package/dist/commands/resumeWorkspace.js +3 -2
- package/dist/commands/setupWorkspace.d.ts +2 -4
- package/dist/commands/setupWorkspace.d.ts.map +1 -1
- package/dist/commands/setupWorkspace.js +27 -27
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +6 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/adapters/linear/client.d.ts +22 -0
- package/dist/lib/adapters/linear/client.d.ts.map +1 -0
- package/dist/lib/adapters/linear/client.js +36 -0
- package/dist/lib/adapters/linear/factory.d.ts +24 -14
- package/dist/lib/adapters/linear/factory.d.ts.map +1 -1
- package/dist/lib/adapters/linear/factory.js +113 -46
- package/dist/lib/{boardSource.d.ts → adapters/linear/fetch.d.ts} +19 -71
- package/dist/lib/adapters/linear/fetch.d.ts.map +1 -0
- package/dist/lib/{boardSource.js → adapters/linear/fetch.js} +21 -133
- package/dist/lib/adapters/linear/index.d.ts +1 -0
- package/dist/lib/adapters/linear/index.d.ts.map +1 -1
- package/dist/lib/adapters/linear/parsing.d.ts +44 -0
- package/dist/lib/adapters/linear/parsing.d.ts.map +1 -0
- package/dist/lib/adapters/linear/parsing.js +144 -0
- package/dist/lib/{linearIssueStatus.d.ts → adapters/linear/writeback.d.ts} +1 -2
- package/dist/lib/adapters/linear/writeback.d.ts.map +1 -0
- package/dist/lib/{linearIssueStatus.js → adapters/linear/writeback.js} +16 -17
- package/dist/lib/adapters/shell/factory.d.ts +1 -1
- package/dist/lib/adapters/shell/factory.d.ts.map +1 -1
- package/dist/lib/adapters/shell/factory.js +8 -4
- package/dist/lib/adapters/shell/invoke.d.ts +4 -7
- package/dist/lib/adapters/shell/invoke.d.ts.map +1 -1
- package/dist/lib/adapters/shell/invoke.js +46 -75
- package/dist/lib/adapters/shell/schema.d.ts +10 -0
- package/dist/lib/adapters/shell/schema.d.ts.map +1 -1
- package/dist/lib/adapters/shell/schema.js +9 -5
- package/dist/lib/board.d.ts.map +1 -1
- package/dist/lib/board.js +43 -4
- package/dist/lib/buildSources.d.ts +11 -0
- package/dist/lib/buildSources.d.ts.map +1 -1
- package/dist/lib/buildSources.js +41 -0
- package/dist/lib/repositoryValidation.d.ts +13 -0
- package/dist/lib/repositoryValidation.d.ts.map +1 -0
- package/dist/lib/repositoryValidation.js +20 -0
- package/dist/lib/testing/canonicalFixtures.d.ts +19 -0
- package/dist/lib/testing/canonicalFixtures.d.ts.map +1 -0
- package/dist/lib/testing/canonicalFixtures.js +62 -0
- package/dist/lib/ticketSource.d.ts +71 -1
- package/dist/lib/ticketSource.d.ts.map +1 -1
- package/dist/lib/ticketSource.js +31 -0
- package/dist/lib/util.d.ts +0 -20
- package/dist/lib/util.d.ts.map +1 -1
- package/dist/lib/util.js +0 -35
- package/package.json +1 -1
- package/dist/lib/boardSource.d.ts.map +0 -1
- package/dist/lib/linearIssueStatus.d.ts.map +0 -1
package/dist/commands/status.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
-
import {
|
|
2
|
+
import { getLinearClient } from "../lib/adapters/linear/client.js";
|
|
3
|
+
import { fetchRawLinearIssue } from "../lib/adapters/linear/fetch.js";
|
|
3
4
|
import { loadConfig } from "../lib/config.js";
|
|
4
5
|
import { readRunState } from "../lib/runState.js";
|
|
5
|
-
import { errorMessage,
|
|
6
|
+
import { errorMessage, withLogOutputSuppressed, writeOutput } from "../lib/util.js";
|
|
6
7
|
import { workspaces } from "../lib/workspaces.js";
|
|
7
8
|
import { worktrees } from "../lib/worktrees.js";
|
|
8
9
|
const RECENT_LOG_LINE_COUNT = 10;
|
|
@@ -95,7 +96,9 @@ function recentTicketLogLines(config, ticket) {
|
|
|
95
96
|
async function linearStatus(ticket) {
|
|
96
97
|
try {
|
|
97
98
|
const issue = await fetchRawLinearIssue({ client: getLinearClient(), ticket });
|
|
98
|
-
|
|
99
|
+
// `stateType` is "" when Linear returned a stateless ticket; surface that
|
|
100
|
+
// as "unknown" rather than an empty token.
|
|
101
|
+
return `${issue.stateName} (state.type=${issue.stateType || "unknown"}) — ${issue.title}`;
|
|
99
102
|
}
|
|
100
103
|
catch (error) {
|
|
101
104
|
return `unavailable: ${errorMessage(error)}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,12 @@ export { status, type StatusOptions } from "./commands/status.ts";
|
|
|
9
9
|
export type { Config, ModelDefinition, ResolvedConfig, SourceConfig } from "./lib/config.ts";
|
|
10
10
|
export { loadConfig } from "./lib/config.ts";
|
|
11
11
|
export { readRunState, recordRunState, removeRunState, runStateDirectory, runStatePath, updateRunState, type RunLifecycleState, type RunState, } from "./lib/runState.ts";
|
|
12
|
-
export { fetchBlockersForTicket, fetchInProgressIssueCount, fetchRawLinearIssue, fetchResolvedIssue, isIssueInProgress, isIssueTodo, isTerminalStateType, isTerminalStatusForBlocker, isTerminalStatusForIssue,
|
|
12
|
+
export { fetchBlockersForTicket, fetchInProgressIssueCount, fetchRawLinearIssue, fetchResolvedIssue, isIssueInProgress, isIssueTodo, isTerminalStateType, isTerminalStatusForBlocker, isTerminalStatusForIssue, type RawLinearIssue, } from "./lib/adapters/linear/fetch.ts";
|
|
13
|
+
export { resolveModelFor, resolveRepositoryFor, type ModelResolution, type RepositoryResolution, } from "./lib/adapters/linear/parsing.ts";
|
|
13
14
|
export { getUsageByModel, type UsageByModel } from "./lib/usage.ts";
|
|
14
15
|
export { type Board, createBoard } from "./lib/board.ts";
|
|
15
16
|
export { buildSources, buildSourcesWith } from "./lib/buildSources.ts";
|
|
16
17
|
export type { AdapterContext, AdapterDefinition } from "./lib/adapterDefinition.ts";
|
|
17
18
|
export { adapterRegistry, type AdapterLoader, buildRegistry, buildSourceConfigSchema, listAdapterDirectories, } from "./lib/adapters/registry.ts";
|
|
18
|
-
export { AmbiguousTicketError, type Blocker as CanonicalBlocker, type BoardState as CanonicalBoardState, type CanonicalStatus, type GroundcrewIssue as CanonicalGroundcrewIssue, type Issue as CanonicalIssue, isGroundcrewIssue as isCanonicalGroundcrewIssue, type TicketSource, } from "./lib/ticketSource.ts";
|
|
19
|
+
export { AmbiguousTicketError, type Blocker as CanonicalBlocker, type BoardState as CanonicalBoardState, type CanonicalStatus, type GroundcrewIssue as CanonicalGroundcrewIssue, type Issue as CanonicalIssue, isGroundcrewIssue as isCanonicalGroundcrewIssue, type ParentSkip as CanonicalParentSkip, type TicketSource, } from "./lib/ticketSource.ts";
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,KA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iBAAiB,IAAI,0BAA0B,EAC/C,KAAK,UAAU,IAAI,mBAAmB,EACtC,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,10 @@ export { setupWorkspace } from "./commands/setupWorkspace.js";
|
|
|
8
8
|
export { status } from "./commands/status.js";
|
|
9
9
|
export { loadConfig } from "./lib/config.js";
|
|
10
10
|
export { readRunState, recordRunState, removeRunState, runStateDirectory, runStatePath, updateRunState, } from "./lib/runState.js";
|
|
11
|
-
export { fetchBlockersForTicket, fetchInProgressIssueCount, fetchRawLinearIssue, fetchResolvedIssue, isIssueInProgress, isIssueTodo, isTerminalStateType, isTerminalStatusForBlocker, isTerminalStatusForIssue,
|
|
11
|
+
export { fetchBlockersForTicket, fetchInProgressIssueCount, fetchRawLinearIssue, fetchResolvedIssue, isIssueInProgress, isIssueTodo, isTerminalStateType, isTerminalStatusForBlocker, isTerminalStatusForIssue, } from "./lib/adapters/linear/fetch.js";
|
|
12
|
+
export { resolveModelFor, resolveRepositoryFor, } from "./lib/adapters/linear/parsing.js";
|
|
12
13
|
export { getUsageByModel } from "./lib/usage.js";
|
|
13
14
|
export { createBoard } from "./lib/board.js";
|
|
14
15
|
export { buildSources, buildSourcesWith } from "./lib/buildSources.js";
|
|
15
16
|
export { adapterRegistry, buildRegistry, buildSourceConfigSchema, listAdapterDirectories, } from "./lib/adapters/registry.js";
|
|
16
17
|
export { AmbiguousTicketError, isGroundcrewIssue as isCanonicalGroundcrewIssue, } from "./lib/ticketSource.js";
|
|
17
|
-
// RepositoryResolutionError is exported via boardSource.ts above (single canonical location).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LinearClient } from "@linear/sdk";
|
|
2
|
+
declare const LINEAR_API_KEY_SOURCES: readonly ["GROUNDCREW_LINEAR_API_KEY", "LINEAR_API_KEY"];
|
|
3
|
+
export type LinearApiKeySource = (typeof LINEAR_API_KEY_SOURCES)[number];
|
|
4
|
+
export interface ResolvedLinearApiKey {
|
|
5
|
+
value: string;
|
|
6
|
+
source: LinearApiKeySource;
|
|
7
|
+
}
|
|
8
|
+
export declare function resolveLinearApiKey(): ResolvedLinearApiKey | undefined;
|
|
9
|
+
export declare function getLinearClient(): LinearClient;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a zero-arg getter that lazily constructs (and caches) a Linear
|
|
12
|
+
* client on first call. Used by CLI entry points that may not need the
|
|
13
|
+
* client at all (e.g. `--no-linear`), so we avoid blowing up on a missing
|
|
14
|
+
* API key when no Linear call is actually made. The factory is taken as a
|
|
15
|
+
* parameter (rather than calling `getLinearClient` directly) so callers can
|
|
16
|
+
* pass their own module-level import of `getLinearClient` — that binding
|
|
17
|
+
* respects `vi.mock` intercepts, whereas an intra-module reference would
|
|
18
|
+
* not.
|
|
19
|
+
*/
|
|
20
|
+
export declare function lazyLinearClient(factory: () => LinearClient): () => LinearClient;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,QAAA,MAAM,sBAAsB,YAAI,2BAA2B,EAAE,gBAAgB,CAAU,CAAC;AAExF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,mBAAmB,IAAI,oBAAoB,GAAG,SAAS,CAQtE;AAED,wBAAgB,eAAe,IAAI,YAAY,CAQ9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,YAAY,GAAG,MAAM,YAAY,CAMhF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LinearClient } from "@linear/sdk";
|
|
2
|
+
import { readEnvironmentVariable } from "../../util.js";
|
|
3
|
+
const LINEAR_API_KEY_SOURCES = ["GROUNDCREW_LINEAR_API_KEY", "LINEAR_API_KEY"];
|
|
4
|
+
export function resolveLinearApiKey() {
|
|
5
|
+
for (const source of LINEAR_API_KEY_SOURCES) {
|
|
6
|
+
const value = readEnvironmentVariable(source);
|
|
7
|
+
if (value !== undefined && value.length > 0) {
|
|
8
|
+
return { value, source };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
export function getLinearClient() {
|
|
14
|
+
const resolved = resolveLinearApiKey();
|
|
15
|
+
if (resolved === undefined) {
|
|
16
|
+
throw new Error("Linear API key not set. Set GROUNDCREW_LINEAR_API_KEY or LINEAR_API_KEY in your environment.");
|
|
17
|
+
}
|
|
18
|
+
return new LinearClient({ apiKey: resolved.value });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns a zero-arg getter that lazily constructs (and caches) a Linear
|
|
22
|
+
* client on first call. Used by CLI entry points that may not need the
|
|
23
|
+
* client at all (e.g. `--no-linear`), so we avoid blowing up on a missing
|
|
24
|
+
* API key when no Linear call is actually made. The factory is taken as a
|
|
25
|
+
* parameter (rather than calling `getLinearClient` directly) so callers can
|
|
26
|
+
* pass their own module-level import of `getLinearClient` — that binding
|
|
27
|
+
* respects `vi.mock` intercepts, whereas an intra-module reference would
|
|
28
|
+
* not.
|
|
29
|
+
*/
|
|
30
|
+
export function lazyLinearClient(factory) {
|
|
31
|
+
let client;
|
|
32
|
+
return () => {
|
|
33
|
+
client ??= factory();
|
|
34
|
+
return client;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear `TicketSource` factory.
|
|
3
|
-
* (createBoardSource
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Linear `TicketSource` factory. Assembles the adapter from sibling modules
|
|
3
|
+
* (createBoardSource + fetchResolvedIssue from ./fetch.ts;
|
|
4
|
+
* createLinearIssueStatusUpdater from ./writeback.ts; getLinearClient from
|
|
5
|
+
* ./client.ts) and converts Linear-specific shapes into the canonical
|
|
6
|
+
* Issue/Blocker types consumers (via Board) speak.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* correctly without any per-team config.
|
|
8
|
+
* State classification is driven by Linear's workflow `state.type` — never
|
|
9
|
+
* by status name — so workspaces with renamed columns Just Work without
|
|
10
|
+
* per-team config.
|
|
11
11
|
*
|
|
12
|
-
* Description is
|
|
13
|
-
* doesn't include it); `resolveOne()` Issues carry the full description
|
|
14
|
-
* because `fetchResolvedIssue` fetches it explicitly.
|
|
12
|
+
* Description is populated on both `fetch()` Issues and `resolveOne()` Issues.
|
|
15
13
|
*/
|
|
16
14
|
import type { AdapterContext } from "../../adapterDefinition.ts";
|
|
17
|
-
import { type Issue as
|
|
18
|
-
import type { CanonicalStatus, Issue as CanonicalIssue, TicketSource } from "../../ticketSource.ts";
|
|
15
|
+
import { type Issue as CanonicalIssue, type TicketSource } from "../../ticketSource.ts";
|
|
19
16
|
import type { LinearAdapterConfig } from "./schema.ts";
|
|
20
|
-
|
|
17
|
+
import { type Issue as LinearIssue } from "./fetch.ts";
|
|
18
|
+
/**
|
|
19
|
+
* Adapter-private payload threaded through `Issue.sourceRef`. Consumers
|
|
20
|
+
* MUST NOT inspect; only the Linear adapter reads it.
|
|
21
|
+
*/
|
|
22
|
+
export interface LinearSourceRef {
|
|
23
|
+
uuid: string;
|
|
24
|
+
statusId: string;
|
|
25
|
+
teamId: string;
|
|
26
|
+
/** Linear workflow `state.type` for the issue at fetch time. */
|
|
27
|
+
stateType: string;
|
|
28
|
+
/** Human-readable native status name, e.g. "In Progress", "Shipped". Diagnostic display only. */
|
|
29
|
+
nativeStatus: string;
|
|
30
|
+
}
|
|
21
31
|
export declare function toCanonicalIssue(linearIssue: LinearIssue, sourceName: string): CanonicalIssue;
|
|
22
32
|
export declare function createLinearTicketSource(config: LinearAdapterConfig, context: AdapterContext): TicketSource;
|
|
23
33
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,KAAK,IAAI,cAAc,EAE5B,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAKL,KAAK,KAAK,IAAI,WAAW,EAE1B,MAAM,YAAY,CAAC;AAGpB;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;CACtB;AAkFD,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAsB7F;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,cAAc,GACtB,YAAY,CA+Ed"}
|
|
@@ -1,38 +1,90 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear `TicketSource` factory.
|
|
3
|
-
* (createBoardSource
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Linear `TicketSource` factory. Assembles the adapter from sibling modules
|
|
3
|
+
* (createBoardSource + fetchResolvedIssue from ./fetch.ts;
|
|
4
|
+
* createLinearIssueStatusUpdater from ./writeback.ts; getLinearClient from
|
|
5
|
+
* ./client.ts) and converts Linear-specific shapes into the canonical
|
|
6
|
+
* Issue/Blocker types consumers (via Board) speak.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* correctly without any per-team config.
|
|
8
|
+
* State classification is driven by Linear's workflow `state.type` — never
|
|
9
|
+
* by status name — so workspaces with renamed columns Just Work without
|
|
10
|
+
* per-team config.
|
|
11
11
|
*
|
|
12
|
-
* Description is
|
|
13
|
-
* doesn't include it); `resolveOne()` Issues carry the full description
|
|
14
|
-
* because `fetchResolvedIssue` fetches it explicitly.
|
|
12
|
+
* Description is populated on both `fetch()` Issues and `resolveOne()` Issues.
|
|
15
13
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
import { toCanonicalId, } from "../../ticketSource.js";
|
|
15
|
+
import { getLinearClient, lazyLinearClient } from "./client.js";
|
|
16
|
+
import { createBoardSource, fetchResolvedIssue, isTerminalStateType, } from "./fetch.js";
|
|
17
|
+
import { createLinearIssueStatusUpdater } from "./writeback.js";
|
|
18
|
+
function canonicalStatusFromStateType(stateType) {
|
|
19
|
+
/* v8 ignore next 3 @preserve -- LinearIssue.stateType is non-optional; this guard is defensive for the resolveOne path */
|
|
20
|
+
if (stateType === undefined) {
|
|
21
|
+
return "other";
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
switch (stateType) {
|
|
24
|
+
case "unstarted": {
|
|
25
|
+
return "todo";
|
|
26
|
+
}
|
|
27
|
+
case "started": {
|
|
28
|
+
return "in-progress";
|
|
29
|
+
}
|
|
30
|
+
case "completed":
|
|
31
|
+
case "canceled":
|
|
32
|
+
case "duplicate": {
|
|
33
|
+
return "done";
|
|
34
|
+
}
|
|
35
|
+
default: {
|
|
36
|
+
return "other";
|
|
37
|
+
}
|
|
25
38
|
}
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
}
|
|
40
|
+
function canonicalBlockerStatus(blocker) {
|
|
41
|
+
if (blocker.stateType === undefined) {
|
|
42
|
+
return {
|
|
43
|
+
status: "other",
|
|
44
|
+
statusReason: "missing",
|
|
45
|
+
...(blocker.status !== undefined && { nativeStatus: blocker.status }),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (isTerminalStateType(blocker.stateType)) {
|
|
49
|
+
return {
|
|
50
|
+
status: "done",
|
|
51
|
+
...(blocker.status !== undefined && { nativeStatus: blocker.status }),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (blocker.stateType === "started") {
|
|
55
|
+
return {
|
|
56
|
+
status: "in-progress",
|
|
57
|
+
...(blocker.status !== undefined && { nativeStatus: blocker.status }),
|
|
58
|
+
};
|
|
28
59
|
}
|
|
29
|
-
|
|
60
|
+
if (blocker.stateType === "unstarted") {
|
|
61
|
+
return {
|
|
62
|
+
status: "todo",
|
|
63
|
+
...(blocker.status !== undefined && { nativeStatus: blocker.status }),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
// backlog / triage / anything else falls through as "other"
|
|
67
|
+
return {
|
|
68
|
+
status: "other",
|
|
69
|
+
statusReason: "unmapped",
|
|
70
|
+
...(blocker.status !== undefined && { nativeStatus: blocker.status }),
|
|
71
|
+
};
|
|
30
72
|
}
|
|
31
73
|
function toCanonicalBlocker(blocker, sourceName) {
|
|
74
|
+
const { status, statusReason, nativeStatus } = canonicalBlockerStatus(blocker);
|
|
32
75
|
return {
|
|
33
|
-
id:
|
|
76
|
+
id: toCanonicalId(sourceName, blocker.id),
|
|
34
77
|
title: blocker.title,
|
|
35
|
-
status
|
|
78
|
+
status,
|
|
79
|
+
...(statusReason !== undefined && { statusReason }),
|
|
80
|
+
...(nativeStatus !== undefined && { nativeStatus }),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function toCanonicalParentSkip(skip, sourceName) {
|
|
84
|
+
return {
|
|
85
|
+
id: toCanonicalId(sourceName, skip.id),
|
|
86
|
+
title: skip.title,
|
|
87
|
+
childCount: skip.childCount,
|
|
36
88
|
};
|
|
37
89
|
}
|
|
38
90
|
export function toCanonicalIssue(linearIssue, sourceName) {
|
|
@@ -40,14 +92,14 @@ export function toCanonicalIssue(linearIssue, sourceName) {
|
|
|
40
92
|
uuid: linearIssue.uuid,
|
|
41
93
|
statusId: linearIssue.statusId,
|
|
42
94
|
teamId: linearIssue.teamId,
|
|
95
|
+
stateType: linearIssue.stateType,
|
|
43
96
|
nativeStatus: linearIssue.status,
|
|
44
97
|
};
|
|
45
98
|
return {
|
|
46
|
-
id:
|
|
99
|
+
id: toCanonicalId(sourceName, linearIssue.id),
|
|
47
100
|
source: sourceName,
|
|
48
101
|
title: linearIssue.title,
|
|
49
|
-
|
|
50
|
-
description: "",
|
|
102
|
+
description: linearIssue.description,
|
|
51
103
|
status: canonicalStatusFromStateType(linearIssue.stateType),
|
|
52
104
|
repository: linearIssue.repository,
|
|
53
105
|
model: linearIssue.model,
|
|
@@ -61,44 +113,59 @@ export function toCanonicalIssue(linearIssue, sourceName) {
|
|
|
61
113
|
export function createLinearTicketSource(config, context) {
|
|
62
114
|
const sourceName = config.name ?? "linear";
|
|
63
115
|
const { globalConfig } = context;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
116
|
+
// Lazy: deferring `getLinearClient()` (and the sub-modules that depend on
|
|
117
|
+
// it) until first method use means `createLinearTicketSource` can be
|
|
118
|
+
// constructed without a Linear API key in env. Callers that only ever
|
|
119
|
+
// touch a sibling source — `crew doctor --ticket <shell-id>`,
|
|
120
|
+
// `crew run` with the multi-source Board's `Promise.allSettled` fan-out
|
|
121
|
+
// tolerating a Linear-side rejection — no longer crash at config-load
|
|
122
|
+
// time on a missing key.
|
|
123
|
+
const getClient = lazyLinearClient(getLinearClient);
|
|
124
|
+
let cachedBoardSource;
|
|
125
|
+
function getBoardSource() {
|
|
126
|
+
cachedBoardSource ??= createBoardSource({ config: globalConfig, client: getClient() });
|
|
127
|
+
return cachedBoardSource;
|
|
128
|
+
}
|
|
129
|
+
let cachedIssueStatusUpdater;
|
|
130
|
+
function getIssueStatusUpdater() {
|
|
131
|
+
cachedIssueStatusUpdater ??= createLinearIssueStatusUpdater({
|
|
132
|
+
client: getClient(),
|
|
133
|
+
});
|
|
134
|
+
return cachedIssueStatusUpdater;
|
|
135
|
+
}
|
|
136
|
+
let lastParentSkips = [];
|
|
67
137
|
return {
|
|
68
138
|
name: sourceName,
|
|
69
139
|
async verify() {
|
|
70
|
-
await
|
|
140
|
+
await getBoardSource().verify();
|
|
71
141
|
},
|
|
72
142
|
async fetch() {
|
|
73
|
-
const state = await
|
|
143
|
+
const state = await getBoardSource().fetch();
|
|
144
|
+
lastParentSkips = state.parentSkips.map((skip) => toCanonicalParentSkip(skip, sourceName));
|
|
74
145
|
return state.issues.map((linearIssue) => toCanonicalIssue(linearIssue, sourceName));
|
|
75
146
|
},
|
|
147
|
+
async fetchParentSkips() {
|
|
148
|
+
return lastParentSkips;
|
|
149
|
+
},
|
|
76
150
|
async resolveOne(naturalId) {
|
|
77
|
-
// fetchResolvedIssue throws on missing repo; we let those propagate.
|
|
78
|
-
// Returning `undefined` is reserved for "ticket genuinely doesn't
|
|
79
|
-
// exist," which fetchResolvedIssue surfaces as an Error too — for now
|
|
80
|
-
// we let any error bubble up rather than swallow.
|
|
81
151
|
const resolved = await fetchResolvedIssue({
|
|
82
|
-
client,
|
|
152
|
+
client: getClient(),
|
|
83
153
|
config: globalConfig,
|
|
84
154
|
ticket: naturalId,
|
|
85
155
|
});
|
|
86
|
-
// fetchResolvedIssue doesn't return the native status name (it's
|
|
87
|
-
// already been resolved through workflow state lookup). We surface
|
|
88
|
-
// "other" until the consumer needs the canonical status, which is fine
|
|
89
|
-
// because `crew setup` doesn't branch on it.
|
|
90
156
|
const sourceRef = {
|
|
91
157
|
uuid: resolved.uuid,
|
|
92
|
-
statusId:
|
|
158
|
+
statusId: resolved.statusId,
|
|
93
159
|
teamId: resolved.teamId,
|
|
94
|
-
|
|
160
|
+
stateType: resolved.stateType,
|
|
161
|
+
nativeStatus: resolved.status,
|
|
95
162
|
};
|
|
96
163
|
return {
|
|
97
|
-
id:
|
|
164
|
+
id: toCanonicalId(sourceName, naturalId),
|
|
98
165
|
source: sourceName,
|
|
99
166
|
title: resolved.title,
|
|
100
167
|
description: resolved.description,
|
|
101
|
-
status:
|
|
168
|
+
status: canonicalStatusFromStateType(resolved.stateType),
|
|
102
169
|
repository: resolved.repository,
|
|
103
170
|
model: resolved.model,
|
|
104
171
|
assignee: "Unassigned",
|
|
@@ -111,7 +178,7 @@ export function createLinearTicketSource(config, context) {
|
|
|
111
178
|
async markInProgress(issue) {
|
|
112
179
|
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- by the Linear adapter's contract, every Issue it produces carries a LinearSourceRef in sourceRef
|
|
113
180
|
const ref = issue.sourceRef;
|
|
114
|
-
await
|
|
181
|
+
await getIssueStatusUpdater().markInProgress({
|
|
115
182
|
id: issue.id,
|
|
116
183
|
uuid: ref.uuid,
|
|
117
184
|
teamId: ref.teamId,
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Linear adapter —
|
|
3
|
-
* snapshot. Owns the GraphQL queries and shape parsing so callers consume a
|
|
4
|
-
* typed `BoardState` instead of raw nodes.
|
|
2
|
+
* Linear adapter — GraphQL fetch helpers for board/issue data.
|
|
5
3
|
*
|
|
6
|
-
* There is no project / view / status configuration: the only
|
|
7
|
-
* "assigned to the API key's viewer AND carries an `agent-*`
|
|
8
|
-
* State classification is driven by Linear's workflow `state.type`
|
|
4
|
+
* There is no project / view / status configuration: the only server-side
|
|
5
|
+
* filter is "assigned to the API key's viewer AND carries an `agent-*`
|
|
6
|
+
* label." State classification is driven by Linear's workflow `state.type`
|
|
9
7
|
* (`unstarted` | `started` | `completed` | `canceled` | `duplicate`) —
|
|
10
|
-
* never by status name — so workspaces with renamed columns (Todo
|
|
11
|
-
* Done
|
|
8
|
+
* never by status name — so workspaces with renamed columns (Todo -> To Do,
|
|
9
|
+
* Done -> Shipped, etc.) Just Work without per-team config.
|
|
12
10
|
*/
|
|
13
11
|
import type { LinearClient } from "@linear/sdk";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
export declare const AGENT_LABEL_PREFIX = "agent-";
|
|
12
|
+
import type { ResolvedConfig } from "../../config.ts";
|
|
13
|
+
import { type ModelResolution } from "./parsing.ts";
|
|
17
14
|
export declare const ISSUES_PAGE_SIZE = 250;
|
|
18
15
|
export interface Blocker {
|
|
19
16
|
id: string;
|
|
@@ -30,6 +27,7 @@ export interface Issue {
|
|
|
30
27
|
id: string;
|
|
31
28
|
uuid: string;
|
|
32
29
|
title: string;
|
|
30
|
+
description: string;
|
|
33
31
|
status: string;
|
|
34
32
|
statusId: string;
|
|
35
33
|
/** Linear workflow `state.type` — the source of truth for canonical classification. */
|
|
@@ -50,22 +48,17 @@ export interface Issue {
|
|
|
50
48
|
hasMoreBlockers: boolean;
|
|
51
49
|
}
|
|
52
50
|
/**
|
|
53
|
-
* `Issue` narrowed to "this ticket is for groundcrew"
|
|
54
|
-
*
|
|
55
|
-
*
|
|
51
|
+
* `Issue` narrowed to "this ticket is for groundcrew". Consumers operate on
|
|
52
|
+
* the canonical `GroundcrewIssue` from `ticketSource.ts`; this internal
|
|
53
|
+
* variant just shapes the adapter's local Linear type.
|
|
56
54
|
*/
|
|
57
55
|
export type GroundcrewIssue = Issue & {
|
|
58
56
|
model: string;
|
|
59
57
|
repository: string;
|
|
60
58
|
};
|
|
61
|
-
export declare function isGroundcrewIssue(issue: Issue): issue is GroundcrewIssue;
|
|
62
59
|
/**
|
|
63
60
|
* Linear ticket that was silently dropped from `issues` because it has at
|
|
64
61
|
* least one sub-issue and groundcrew works sub-issues rather than parents.
|
|
65
|
-
* The dispatcher logs each one per tick so operators see WHY a Todo ticket
|
|
66
|
-
* isn't being picked up instead of just "No Todo tickets to pick up." Only
|
|
67
|
-
* Todo+agent-labelled parents qualify — non-actionable parents (e.g. Done
|
|
68
|
-
* epics) would be noise.
|
|
69
62
|
*/
|
|
70
63
|
export interface ParentSkip {
|
|
71
64
|
id: string;
|
|
@@ -77,14 +70,8 @@ export interface BoardState {
|
|
|
77
70
|
issues: Issue[];
|
|
78
71
|
parentSkips: ParentSkip[];
|
|
79
72
|
}
|
|
80
|
-
export { RepositoryResolutionError };
|
|
81
73
|
export interface BoardSource {
|
|
82
|
-
/**
|
|
83
|
-
* Verify the Linear API key resolves to a viewer. Run once at startup so
|
|
84
|
-
* misconfiguration surfaces before the first tick.
|
|
85
|
-
*/
|
|
86
74
|
verify(): Promise<void>;
|
|
87
|
-
/** Fetch the current board snapshot. Paginates internally. */
|
|
88
75
|
fetch(): Promise<BoardState>;
|
|
89
76
|
}
|
|
90
77
|
interface BoardSourceDeps {
|
|
@@ -116,16 +103,6 @@ export interface IssueRelationNode {
|
|
|
116
103
|
export declare function modelForResolution(resolution: Exclude<ModelResolution, {
|
|
117
104
|
kind: "no-label";
|
|
118
105
|
}>): string;
|
|
119
|
-
export declare function resolveTodoAgentMetadata(arguments_: {
|
|
120
|
-
ticket: string;
|
|
121
|
-
description: string | undefined;
|
|
122
|
-
modelResolution: ModelResolution;
|
|
123
|
-
config: ResolvedConfig;
|
|
124
|
-
isTodo: boolean;
|
|
125
|
-
}): {
|
|
126
|
-
repository: string | undefined;
|
|
127
|
-
model: string | undefined;
|
|
128
|
-
};
|
|
129
106
|
interface ResolvedIssue {
|
|
130
107
|
uuid: string;
|
|
131
108
|
title: string;
|
|
@@ -133,6 +110,9 @@ interface ResolvedIssue {
|
|
|
133
110
|
repository: string;
|
|
134
111
|
model: string;
|
|
135
112
|
teamId: string;
|
|
113
|
+
stateType: string;
|
|
114
|
+
status: string;
|
|
115
|
+
statusId: string;
|
|
136
116
|
}
|
|
137
117
|
export interface RawLinearIssue {
|
|
138
118
|
uuid: string;
|
|
@@ -144,7 +124,8 @@ export interface RawLinearIssue {
|
|
|
144
124
|
}[];
|
|
145
125
|
/** Linear workflow state name, e.g. "Todo", "In Review". May be "" if state was null. */
|
|
146
126
|
stateName: string;
|
|
147
|
-
stateType
|
|
127
|
+
stateType: string;
|
|
128
|
+
stateId: string;
|
|
148
129
|
blockers: Blocker[];
|
|
149
130
|
hasMoreBlockers: boolean;
|
|
150
131
|
/**
|
|
@@ -167,40 +148,6 @@ export declare function fetchRawLinearIssue(arguments_: {
|
|
|
167
148
|
export declare function fetchInProgressIssueCount(arguments_: {
|
|
168
149
|
client: LinearClient;
|
|
169
150
|
}): Promise<number>;
|
|
170
|
-
export type RepositoryResolution = {
|
|
171
|
-
kind: "ok";
|
|
172
|
-
repository: string;
|
|
173
|
-
} | {
|
|
174
|
-
kind: "missing";
|
|
175
|
-
};
|
|
176
|
-
export declare function resolveRepositoryFor(arguments_: {
|
|
177
|
-
description: string | undefined;
|
|
178
|
-
config: ResolvedConfig;
|
|
179
|
-
ticket: string;
|
|
180
|
-
}): RepositoryResolution;
|
|
181
|
-
export type ModelResolution = {
|
|
182
|
-
kind: "matched";
|
|
183
|
-
model: string;
|
|
184
|
-
} | {
|
|
185
|
-
kind: "no-label";
|
|
186
|
-
} | {
|
|
187
|
-
kind: "agent-any";
|
|
188
|
-
} | {
|
|
189
|
-
kind: "disabled-fallback";
|
|
190
|
-
requestedModel: string;
|
|
191
|
-
fallbackModel: string;
|
|
192
|
-
};
|
|
193
|
-
export declare function resolveModelFor(arguments_: {
|
|
194
|
-
labels: {
|
|
195
|
-
name: string;
|
|
196
|
-
}[];
|
|
197
|
-
config: ResolvedConfig;
|
|
198
|
-
}): ModelResolution;
|
|
199
|
-
/**
|
|
200
|
-
* `agent-any` collapses to `models.default` here — manual setup doesn't run
|
|
201
|
-
* the usage-gated `any` resolver, so the caller gets a concrete model name
|
|
202
|
-
* instead of a sentinel that downstream code can't interpret.
|
|
203
|
-
*/
|
|
204
151
|
export declare function fetchResolvedIssue(arguments_: {
|
|
205
152
|
client: LinearClient;
|
|
206
153
|
config: ResolvedConfig;
|
|
@@ -208,4 +155,5 @@ export declare function fetchResolvedIssue(arguments_: {
|
|
|
208
155
|
}): Promise<ResolvedIssue>;
|
|
209
156
|
export declare function warnIfDisabledFallback(ticket: string, modelResolution: ModelResolution, config: ResolvedConfig): void;
|
|
210
157
|
export declare function blockersFromRelations(relations: IssueRelationNode[]): Blocker[];
|
|
211
|
-
|
|
158
|
+
export {};
|
|
159
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAYpC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAA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