@uniswap/ai-toolkit-linear-task-utils 0.0.1 → 0.0.2-next.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import type { LinearClient } from '@linear/sdk';
2
+ import type { EnsureLabelConfig } from './types.js';
3
+ /**
4
+ * Ensure a label exists in the specified Linear team.
5
+ * Creates the label if it doesn't exist.
6
+ *
7
+ * @returns The label ID (either existing or newly created)
8
+ */
9
+ export declare function ensureLabel(client: LinearClient, config: EnsureLabelConfig): Promise<{
10
+ labelId: string;
11
+ created: boolean;
12
+ }>;
13
+ /**
14
+ * Parse ensure-label configuration from CLI arguments
15
+ */
16
+ export declare function parseEnsureLabelConfig(args: {
17
+ team?: string;
18
+ label?: string;
19
+ color?: string;
20
+ }): EnsureLabelConfig;
21
+ //# sourceMappingURL=ensure-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-label.d.ts","sourceRoot":"","sources":["../../../../src/ensure-label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAyDhD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,iBAAiB,CAMpB"}
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export * from './query-issues.js';
3
+ export * from './ensure-label.js';
4
+ export * from './update-issue.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { LinearClient } from '@linear/sdk';
2
+ import type { QueryConfig, MatrixOutput } from './types.js';
3
+ /**
4
+ * Query Linear for issues matching the specified criteria
5
+ */
6
+ export declare function queryIssues(client: LinearClient, config: QueryConfig): Promise<MatrixOutput>;
7
+ /**
8
+ * Create a Linear client from environment or provided API key
9
+ */
10
+ export declare function createLinearClient(apiKey?: string): LinearClient;
11
+ /**
12
+ * Parse query configuration from CLI arguments
13
+ */
14
+ export declare function parseQueryConfig(args: {
15
+ team?: string;
16
+ label?: string;
17
+ statuses?: string;
18
+ max?: string;
19
+ }): QueryConfig;
20
+ //# sourceMappingURL=query-issues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-issues.d.ts","sourceRoot":"","sources":["../../../../src/query-issues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAkB,YAAY,EAAE,MAAM,YAAY,CAAC;AAyB5E;;GAEG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,YAAY,CAAC,CA4DvB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAMhE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,WAAW,CA6Bd"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Configuration for querying Linear issues
3
+ */
4
+ export interface QueryConfig {
5
+ /** Linear team name to query */
6
+ team: string;
7
+ /** Label name to filter by */
8
+ label: string;
9
+ /** Workflow state names to filter by (e.g., ["Backlog", "Todo"]) */
10
+ statuses: string[];
11
+ /** Maximum number of issues to return */
12
+ max: number;
13
+ }
14
+ /**
15
+ * Configuration for ensuring a label exists
16
+ */
17
+ export interface EnsureLabelConfig {
18
+ /** Linear team name */
19
+ team: string;
20
+ /** Label name to ensure exists */
21
+ label: string;
22
+ /** Optional color for the label (hex code) */
23
+ color?: string;
24
+ }
25
+ /**
26
+ * Configuration for updating an issue after task completion
27
+ */
28
+ export interface UpdateIssueConfig {
29
+ /** Linear issue ID */
30
+ issueId: string;
31
+ /** New status name (e.g., "In Review") */
32
+ status: string;
33
+ /** PR URL to attach to the issue */
34
+ prUrl?: string;
35
+ /** Optional comment to add to the issue */
36
+ comment?: string;
37
+ }
38
+ /**
39
+ * Processed issue ready for GitHub Actions matrix
40
+ */
41
+ export interface ProcessedIssue {
42
+ /** Linear issue ID (UUID) */
43
+ issue_id: string;
44
+ /** Linear issue identifier (e.g., "DAI-123") */
45
+ issue_identifier: string;
46
+ /** Issue title */
47
+ issue_title: string;
48
+ /** Full issue description (markdown) */
49
+ issue_description: string;
50
+ /** Linear issue URL */
51
+ issue_url: string;
52
+ /** Generated branch name (e.g., "claude/DAI-123-fix-bug") */
53
+ branch_name: string;
54
+ /** Priority number (1=Urgent, 2=High, 3=Normal, 4=Low, 0=No Priority) */
55
+ priority: number;
56
+ /** Human-readable priority label */
57
+ priority_label: string;
58
+ }
59
+ /**
60
+ * Output format for GitHub Actions matrix strategy
61
+ */
62
+ export interface MatrixOutput {
63
+ /** Array of issues to include in the matrix */
64
+ include: ProcessedIssue[];
65
+ /** Total count of issues */
66
+ count: number;
67
+ }
68
+ /**
69
+ * Priority mapping from Linear's numeric values to labels
70
+ */
71
+ export declare const PRIORITY_MAP: Record<number, string>;
72
+ /**
73
+ * Priority sort order (lower index = higher priority)
74
+ * Urgent (1) > High (2) > Normal (3) > Low (4) > No Priority (0)
75
+ */
76
+ export declare const PRIORITY_SORT_ORDER: number[];
77
+ /**
78
+ * Default configuration values
79
+ */
80
+ export declare const DEFAULTS: {
81
+ readonly team: "Developer AI";
82
+ readonly label: "claude";
83
+ readonly statuses: readonly ["Backlog", "Todo"];
84
+ readonly max: 3;
85
+ readonly labelColor: "#6366f1";
86
+ };
87
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sBAAsB;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAAoB,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;CAMX,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { LinearClient } from '@linear/sdk';
2
+ import type { UpdateIssueConfig } from './types.js';
3
+ /**
4
+ * Update a Linear issue after task completion.
5
+ * - Updates the issue status
6
+ * - Attaches the PR URL as an attachment
7
+ * - Optionally adds a comment
8
+ */
9
+ export declare function updateIssue(client: LinearClient, config: UpdateIssueConfig): Promise<{
10
+ success: boolean;
11
+ statusUpdated: boolean;
12
+ attachmentAdded: boolean;
13
+ }>;
14
+ /**
15
+ * Parse update-issue configuration from CLI arguments
16
+ */
17
+ export declare function parseUpdateIssueConfig(args: {
18
+ issueId?: string;
19
+ 'issue-id'?: string;
20
+ status?: string;
21
+ prUrl?: string;
22
+ 'pr-url'?: string;
23
+ comment?: string;
24
+ }): UpdateIssueConfig;
25
+ //# sourceMappingURL=update-issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../../src/update-issue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAAC,CA8EjF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,iBAAiB,CAkBpB"}
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "0.0.1";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,49 @@
1
1
  {
2
2
  "name": "@uniswap/ai-toolkit-linear-task-utils",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @uniswap/ai-toolkit-linear-task-utils",
3
+ "version": "0.0.2-next.0",
4
+ "private": false,
5
+ "type": "commonjs",
6
+ "description": "CLI tool to query Linear issues for autonomous Claude Code task processing",
7
+ "main": "./dist/index.cjs",
8
+ "types": "./dist/index.d.ts",
9
+ "bin": {
10
+ "linear-task-utils": "./dist/cli.cjs"
11
+ },
12
+ "exports": {
13
+ "./package.json": "./package.json",
14
+ ".": {
15
+ "@ai-toolkit/source": "./src/index.ts",
16
+ "types": "./dist/index.d.ts",
17
+ "require": "./dist/index.cjs",
18
+ "default": "./dist/index.cjs"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "!**/*.tsbuildinfo"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "restricted"
27
+ },
28
+ "dependencies": {
29
+ "@linear/sdk": "^33.0.0",
30
+ "minimist": "^1.2.8",
31
+ "tslib": "^2.8.1"
32
+ },
33
+ "devDependencies": {
34
+ "@types/minimist": "^1.2.5"
35
+ },
5
36
  "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
37
+ "linear",
38
+ "claude",
39
+ "ai-toolkit",
40
+ "github-actions",
41
+ "automation"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/Uniswap/ai-toolkit.git",
46
+ "directory": "packages/linear-task-utils"
47
+ },
48
+ "license": "MIT"
10
49
  }