@supaku/agentfactory-linear 0.4.1 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +91 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # @supaku/agentfactory-linear
2
+
3
+ Linear issue tracker integration for [AgentFactory](https://github.com/supaku/agentfactory). Provides the Linear API client, agent sessions, status transitions, activity streaming, and work type routing.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @supaku/agentfactory-linear
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ### Linear Client
14
+
15
+ ```typescript
16
+ import { createLinearAgentClient } from '@supaku/agentfactory-linear'
17
+
18
+ const client = createLinearAgentClient({ apiKey: process.env.LINEAR_API_KEY! })
19
+
20
+ const issue = await client.getIssue('PROJ-123')
21
+ await client.updateIssueStatus('PROJ-123', 'Started')
22
+ await client.createComment(issue.id, 'Work in progress...')
23
+ ```
24
+
25
+ ### Agent Sessions
26
+
27
+ Manage the lifecycle of an agent working on an issue:
28
+
29
+ ```typescript
30
+ import { createAgentSession } from '@supaku/agentfactory-linear'
31
+
32
+ const session = createAgentSession({
33
+ client: linearClient.linearClient,
34
+ issueId: 'issue-uuid',
35
+ autoTransition: true,
36
+ workType: 'development',
37
+ })
38
+
39
+ await session.start() // Status -> Started
40
+ await session.emitThought('Analyzing requirements...')
41
+ await session.updatePlan([
42
+ { title: 'Read code', state: 'completed' },
43
+ { title: 'Implement feature', state: 'inProgress' },
44
+ { title: 'Write tests', state: 'pending' },
45
+ ])
46
+ await session.complete('Feature implemented') // Status -> Finished
47
+ ```
48
+
49
+ ### Work Type Routing
50
+
51
+ Issues are automatically routed to work types based on their Linear status:
52
+
53
+ | Status | Work Type | Agent Role |
54
+ |--------|-----------|------------|
55
+ | Backlog | `development` | Implement the feature/fix |
56
+ | Started | `inflight` | Continue in-progress work |
57
+ | Finished | `qa` | Validate implementation |
58
+ | Delivered | `acceptance` | Final acceptance testing |
59
+ | Rejected | `refinement` | Address feedback |
60
+
61
+ ### Default Prompt Templates
62
+
63
+ Sensible defaults for new projects — override per work type as needed:
64
+
65
+ ```typescript
66
+ import {
67
+ defaultGeneratePrompt,
68
+ defaultDetectWorkTypeFromPrompt,
69
+ defaultGetPriority,
70
+ } from '@supaku/agentfactory-linear'
71
+ ```
72
+
73
+ ## Key Exports
74
+
75
+ - `LinearAgentClient` / `createLinearAgentClient` — Linear API client with retry logic
76
+ - `AgentSession` / `createAgentSession` — agent lifecycle management
77
+ - `defaultGeneratePrompt` — default prompt generation
78
+ - `defaultDetectWorkTypeFromPrompt` — work type detection from free text
79
+ - `defaultGetPriority` — priority mapping for work types
80
+ - Work type constants, error types, webhook event types
81
+
82
+ ## Related Packages
83
+
84
+ | Package | Description |
85
+ |---------|-------------|
86
+ | [@supaku/agentfactory](https://www.npmjs.com/package/@supaku/agentfactory) | Core orchestrator |
87
+ | [@supaku/agentfactory-nextjs](https://www.npmjs.com/package/@supaku/agentfactory-nextjs) | Next.js webhook server |
88
+
89
+ ## License
90
+
91
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supaku/agentfactory-linear",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "description": "Linear issue tracker integration for AgentFactory — status transitions, agent sessions, work routing",
6
6
  "author": "Supaku (https://supaku.com)",