@proletariat/cli 0.3.96 → 0.3.97
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/gc.d.ts +1 -0
- package/dist/commands/gc.js +31 -1
- package/dist/commands/gc.js.map +1 -1
- package/dist/commands/linear/connect.d.ts +5 -0
- package/dist/commands/linear/connect.js +84 -0
- package/dist/commands/linear/connect.js.map +1 -1
- package/dist/commands/session/watch.d.ts +1 -0
- package/dist/commands/session/watch.js +46 -2
- package/dist/commands/session/watch.js.map +1 -1
- package/dist/commands/work/complete.d.ts +1 -0
- package/dist/commands/work/complete.js +27 -25
- package/dist/commands/work/complete.js.map +1 -1
- package/dist/commands/work/drop.d.ts +14 -0
- package/dist/commands/work/drop.js +215 -0
- package/dist/commands/work/drop.js.map +1 -0
- package/dist/commands/work/ready.d.ts +1 -0
- package/dist/commands/work/ready.js +26 -25
- package/dist/commands/work/ready.js.map +1 -1
- package/dist/commands/work/ship.d.ts +1 -0
- package/dist/commands/work/ship.js +33 -32
- package/dist/commands/work/ship.js.map +1 -1
- package/dist/commands/work/start.d.ts +2 -0
- package/dist/commands/work/start.js +160 -42
- package/dist/commands/work/start.js.map +1 -1
- package/dist/commands/work/stop.d.ts +1 -0
- package/dist/commands/work/stop.js +40 -0
- package/dist/commands/work/stop.js.map +1 -1
- package/dist/lib/agents/commands.js +7 -5
- package/dist/lib/agents/commands.js.map +1 -1
- package/dist/lib/database/drizzle-schema.d.ts +17 -0
- package/dist/lib/database/drizzle-schema.js +1 -0
- package/dist/lib/database/drizzle-schema.js.map +1 -1
- package/dist/lib/database/migrations/0019_gc_artifact_cleanup.d.ts +9 -0
- package/dist/lib/database/migrations/0019_gc_artifact_cleanup.js +23 -0
- package/dist/lib/database/migrations/0019_gc_artifact_cleanup.js.map +1 -0
- package/dist/lib/database/migrations/0020_transition_map.d.ts +2 -0
- package/dist/lib/database/migrations/0020_transition_map.js +27 -0
- package/dist/lib/database/migrations/0020_transition_map.js.map +1 -0
- package/dist/lib/database/migrations/index.js +4 -0
- package/dist/lib/database/migrations/index.js.map +1 -1
- package/dist/lib/execution/config.d.ts +10 -0
- package/dist/lib/execution/config.js +24 -0
- package/dist/lib/execution/config.js.map +1 -1
- package/dist/lib/execution/preflight.d.ts +51 -0
- package/dist/lib/execution/preflight.js +278 -0
- package/dist/lib/execution/preflight.js.map +1 -0
- package/dist/lib/execution/runners/prompt-builder.d.ts +6 -0
- package/dist/lib/execution/runners/prompt-builder.js +38 -7
- package/dist/lib/execution/runners/prompt-builder.js.map +1 -1
- package/dist/lib/execution/session-utils.d.ts +23 -0
- package/dist/lib/execution/session-utils.js +69 -0
- package/dist/lib/execution/session-utils.js.map +1 -1
- package/dist/lib/execution/spawner.d.ts +11 -1
- package/dist/lib/execution/spawner.js +44 -16
- package/dist/lib/execution/spawner.js.map +1 -1
- package/dist/lib/execution/ticket-refs.d.ts +71 -0
- package/dist/lib/execution/ticket-refs.js +125 -0
- package/dist/lib/execution/ticket-refs.js.map +1 -0
- package/dist/lib/execution/types.d.ts +7 -2
- package/dist/lib/execution/types.js +5 -3
- package/dist/lib/execution/types.js.map +1 -1
- package/dist/lib/gc/index.d.ts +59 -6
- package/dist/lib/gc/index.js +258 -13
- package/dist/lib/gc/index.js.map +1 -1
- package/dist/lib/prompt-json.d.ts +31 -0
- package/dist/lib/prompt-json.js.map +1 -1
- package/dist/lib/providers/auto-mapper.d.ts +45 -0
- package/dist/lib/providers/auto-mapper.js +115 -0
- package/dist/lib/providers/auto-mapper.js.map +1 -0
- package/dist/lib/providers/state-intents.d.ts +20 -0
- package/dist/lib/providers/state-intents.js +61 -7
- package/dist/lib/providers/state-intents.js.map +1 -1
- package/dist/lib/providers/state-resolution.d.ts +15 -11
- package/dist/lib/providers/state-resolution.js +54 -48
- package/dist/lib/providers/state-resolution.js.map +1 -1
- package/dist/lib/providers/transition-map.d.ts +59 -0
- package/dist/lib/providers/transition-map.js +113 -0
- package/dist/lib/providers/transition-map.js.map +1 -0
- package/dist/lib/session/index.d.ts +3 -1
- package/dist/lib/session/index.js +3 -1
- package/dist/lib/session/index.js.map +1 -1
- package/dist/lib/session/tmux-watchdog.d.ts +157 -0
- package/dist/lib/session/tmux-watchdog.js +424 -0
- package/dist/lib/session/tmux-watchdog.js.map +1 -0
- package/dist/lib/session/watcher.d.ts +22 -4
- package/dist/lib/session/watcher.js +66 -8
- package/dist/lib/session/watcher.js.map +1 -1
- package/dist/lib/work-lifecycle/transition.d.ts +73 -0
- package/dist/lib/work-lifecycle/transition.js +124 -0
- package/dist/lib/work-lifecycle/transition.js.map +1 -0
- package/oclif.manifest.json +438 -332
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-Mapper for Transition Intents
|
|
3
|
+
*
|
|
4
|
+
* Auto-guesses intent-to-state mappings when connecting a board.
|
|
5
|
+
* Uses provider state types first, then name heuristics.
|
|
6
|
+
*
|
|
7
|
+
* Each provider can have different state type vocabularies:
|
|
8
|
+
* - Linear: triage, backlog, unstarted, started, completed, canceled
|
|
9
|
+
* - Jira: new, indeterminate, done, category-based
|
|
10
|
+
* - Trello: no types (name heuristics only)
|
|
11
|
+
*/
|
|
12
|
+
import type { TransitionIntent } from './state-intents.js';
|
|
13
|
+
export interface BoardState {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
position?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IntentMapping {
|
|
20
|
+
intent: TransitionIntent;
|
|
21
|
+
stateName: string;
|
|
22
|
+
stateId: string;
|
|
23
|
+
confidence: 'type' | 'name' | 'none';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Auto-guess transition intent mappings from a list of board states.
|
|
27
|
+
*
|
|
28
|
+
* Strategy:
|
|
29
|
+
* 1. For each intent, check if any state has a matching type (provider-specific)
|
|
30
|
+
* 2. If no type match, fall back to name heuristics from DEFAULT_INTENTS aliases
|
|
31
|
+
* 3. States can only be mapped to one intent (first match wins by intent priority)
|
|
32
|
+
*
|
|
33
|
+
* @param states - Available board states from the provider
|
|
34
|
+
* @param providerType - Provider type for type-based mapping ('linear', 'jira', etc.)
|
|
35
|
+
* @returns Array of intent mappings, one per matched intent
|
|
36
|
+
*/
|
|
37
|
+
export declare function autoMapIntents(states: BoardState[], providerType?: 'linear' | 'jira' | 'trello' | 'asana' | 'shortcut' | 'clickup' | 'pmo'): IntentMapping[];
|
|
38
|
+
/**
|
|
39
|
+
* Format intent mappings for display to the user.
|
|
40
|
+
*
|
|
41
|
+
* @param mappings - The auto-guessed mappings
|
|
42
|
+
* @param allStates - All available board states
|
|
43
|
+
* @returns Array of display lines
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatMappingTable(mappings: IntentMapping[], allStates: BoardState[]): string[];
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-Mapper for Transition Intents
|
|
3
|
+
*
|
|
4
|
+
* Auto-guesses intent-to-state mappings when connecting a board.
|
|
5
|
+
* Uses provider state types first, then name heuristics.
|
|
6
|
+
*
|
|
7
|
+
* Each provider can have different state type vocabularies:
|
|
8
|
+
* - Linear: triage, backlog, unstarted, started, completed, canceled
|
|
9
|
+
* - Jira: new, indeterminate, done, category-based
|
|
10
|
+
* - Trello: no types (name heuristics only)
|
|
11
|
+
*/
|
|
12
|
+
import { matchIntentByAliases, getDefaultIntent } from './state-intents.js';
|
|
13
|
+
/**
|
|
14
|
+
* Map from Linear state types to transition intents.
|
|
15
|
+
* Linear has no native "review" type, so that's always resolved by name heuristics.
|
|
16
|
+
*/
|
|
17
|
+
const LINEAR_TYPE_TO_INTENT = {
|
|
18
|
+
started: 'started',
|
|
19
|
+
completed: 'completed',
|
|
20
|
+
canceled: 'dropped',
|
|
21
|
+
cancelled: 'dropped',
|
|
22
|
+
backlog: 'paused',
|
|
23
|
+
unstarted: 'ready',
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Auto-guess transition intent mappings from a list of board states.
|
|
27
|
+
*
|
|
28
|
+
* Strategy:
|
|
29
|
+
* 1. For each intent, check if any state has a matching type (provider-specific)
|
|
30
|
+
* 2. If no type match, fall back to name heuristics from DEFAULT_INTENTS aliases
|
|
31
|
+
* 3. States can only be mapped to one intent (first match wins by intent priority)
|
|
32
|
+
*
|
|
33
|
+
* @param states - Available board states from the provider
|
|
34
|
+
* @param providerType - Provider type for type-based mapping ('linear', 'jira', etc.)
|
|
35
|
+
* @returns Array of intent mappings, one per matched intent
|
|
36
|
+
*/
|
|
37
|
+
export function autoMapIntents(states, providerType = 'pmo') {
|
|
38
|
+
const mappings = [];
|
|
39
|
+
const usedStateIds = new Set();
|
|
40
|
+
// Priority order for intent resolution
|
|
41
|
+
const intentOrder = [
|
|
42
|
+
'started',
|
|
43
|
+
'needs_review',
|
|
44
|
+
'completed',
|
|
45
|
+
'paused',
|
|
46
|
+
'ready',
|
|
47
|
+
'dropped',
|
|
48
|
+
];
|
|
49
|
+
for (const intent of intentOrder) {
|
|
50
|
+
// 1. Try type-based mapping (provider-specific)
|
|
51
|
+
if (providerType === 'linear') {
|
|
52
|
+
const typeMatch = states.find(s => s.type && LINEAR_TYPE_TO_INTENT[s.type] === intent && !usedStateIds.has(s.id));
|
|
53
|
+
if (typeMatch) {
|
|
54
|
+
mappings.push({
|
|
55
|
+
intent,
|
|
56
|
+
stateName: typeMatch.name,
|
|
57
|
+
stateId: typeMatch.id,
|
|
58
|
+
confidence: 'type',
|
|
59
|
+
});
|
|
60
|
+
usedStateIds.add(typeMatch.id);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// 2. Fall back to name heuristics from DEFAULT_INTENTS
|
|
65
|
+
const intentDef = getDefaultIntent(intent);
|
|
66
|
+
if (intentDef) {
|
|
67
|
+
const availableStates = states.filter(s => !usedStateIds.has(s.id));
|
|
68
|
+
const nameMatch = matchIntentByAliases(availableStates.map(s => ({ id: s.id, name: s.name })), intentDef);
|
|
69
|
+
if (nameMatch) {
|
|
70
|
+
mappings.push({
|
|
71
|
+
intent,
|
|
72
|
+
stateName: nameMatch.name,
|
|
73
|
+
stateId: nameMatch.id,
|
|
74
|
+
confidence: 'name',
|
|
75
|
+
});
|
|
76
|
+
usedStateIds.add(nameMatch.id);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return mappings;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Format intent mappings for display to the user.
|
|
85
|
+
*
|
|
86
|
+
* @param mappings - The auto-guessed mappings
|
|
87
|
+
* @param allStates - All available board states
|
|
88
|
+
* @returns Array of display lines
|
|
89
|
+
*/
|
|
90
|
+
export function formatMappingTable(mappings, allStates) {
|
|
91
|
+
const lines = [];
|
|
92
|
+
const maxStateLen = Math.max(...allStates.map(s => s.name.length), 10);
|
|
93
|
+
const maxIntentLen = Math.max(...mappings.map(m => m.intent.length), 10);
|
|
94
|
+
// Header
|
|
95
|
+
lines.push(`${'Board State'.padEnd(maxStateLen + 2)}${'Intent'.padEnd(maxIntentLen + 2)}Work Command`);
|
|
96
|
+
lines.push(`${'─'.repeat(maxStateLen + 2)}${'─'.repeat(maxIntentLen + 2)}${'─'.repeat(20)}`);
|
|
97
|
+
const intentToCommand = {
|
|
98
|
+
started: 'work start',
|
|
99
|
+
needs_review: 'work ready',
|
|
100
|
+
completed: 'work ship',
|
|
101
|
+
paused: 'work stop',
|
|
102
|
+
ready: 'work groom',
|
|
103
|
+
dropped: 'work drop',
|
|
104
|
+
};
|
|
105
|
+
// Map states to their intents
|
|
106
|
+
const stateToMapping = new Map(mappings.map(m => [m.stateId, m]));
|
|
107
|
+
for (const state of allStates) {
|
|
108
|
+
const mapping = stateToMapping.get(state.id);
|
|
109
|
+
const intentStr = mapping ? mapping.intent : '(unmapped)';
|
|
110
|
+
const commandStr = mapping ? intentToCommand[mapping.intent] || '' : '';
|
|
111
|
+
lines.push(`${state.name.padEnd(maxStateLen + 2)}${intentStr.padEnd(maxIntentLen + 2)}${commandStr}`);
|
|
112
|
+
}
|
|
113
|
+
return lines;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=auto-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-mapper.js","sourceRoot":"","sources":["../../../src/lib/providers/auto-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAgB5F;;;GAGG;AACH,MAAM,qBAAqB,GAAqC;IAC9D,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,OAAO;CACnB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAoB,EACpB,eAAwF,KAAK;IAE7F,MAAM,QAAQ,GAAoB,EAAE,CAAA;IACpC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAA;IAEtC,uCAAuC;IACvC,MAAM,WAAW,GAAuB;QACtC,SAAS;QACT,cAAc;QACd,WAAW;QACX,QAAQ;QACR,OAAO;QACP,SAAS;KACV,CAAA;IAED,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE,CAAC;QACjC,gDAAgD;QAChD,IAAI,YAAY,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAChC,CAAC,CAAC,IAAI,IAAI,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAC9E,CAAA;YACD,IAAI,SAAS,EAAE,CAAC;gBACd,QAAQ,CAAC,I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AAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACvE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,UAAU,EAAE,CAAC,CAAA;IACvG,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -20,15 +20,35 @@ export interface SemanticIntent {
|
|
|
20
20
|
/** Common state names that match this intent (case-insensitive) */
|
|
21
21
|
aliases: string[];
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Transition intents — the canonical set of intents used by work commands.
|
|
25
|
+
*
|
|
26
|
+
* Each work primitive maps to exactly one transition intent:
|
|
27
|
+
* work start → started
|
|
28
|
+
* work ready → needs_review
|
|
29
|
+
* work ship → completed
|
|
30
|
+
* work stop → paused
|
|
31
|
+
* work groom → ready
|
|
32
|
+
* work drop → dropped
|
|
33
|
+
*
|
|
34
|
+
* These are the intents stored in the pmo_transition_map table.
|
|
35
|
+
*/
|
|
36
|
+
export type TransitionIntent = 'started' | 'needs_review' | 'completed' | 'paused' | 'ready' | 'dropped';
|
|
37
|
+
export declare const TRANSITION_INTENTS: TransitionIntent[];
|
|
23
38
|
/**
|
|
24
39
|
* Default semantic intents shipped with the CLI.
|
|
25
40
|
*
|
|
26
41
|
* Order matters: when matching, the first alias match wins.
|
|
27
42
|
* Aliases are matched case-insensitively.
|
|
43
|
+
*
|
|
44
|
+
* The `name` field uses the canonical transition intent names where applicable.
|
|
45
|
+
* Legacy names ('active', 'review', 'done', 'blocked') are kept as aliases
|
|
46
|
+
* within the new intents for backward compatibility.
|
|
28
47
|
*/
|
|
29
48
|
export declare const DEFAULT_INTENTS: SemanticIntent[];
|
|
30
49
|
/**
|
|
31
50
|
* Get a default intent by name.
|
|
51
|
+
* Also resolves legacy intent names (active → started, review → needs_review, etc.)
|
|
32
52
|
*/
|
|
33
53
|
export declare function getDefaultIntent(name: string): SemanticIntent | undefined;
|
|
34
54
|
/**
|
|
@@ -8,16 +8,28 @@
|
|
|
8
8
|
* These cover the most common workflow states across Linear, Trello,
|
|
9
9
|
* ClickUp, Jira, Shortcut, Asana, and custom PMO boards.
|
|
10
10
|
*/
|
|
11
|
+
export const TRANSITION_INTENTS = [
|
|
12
|
+
'started',
|
|
13
|
+
'needs_review',
|
|
14
|
+
'completed',
|
|
15
|
+
'paused',
|
|
16
|
+
'ready',
|
|
17
|
+
'dropped',
|
|
18
|
+
];
|
|
11
19
|
/**
|
|
12
20
|
* Default semantic intents shipped with the CLI.
|
|
13
21
|
*
|
|
14
22
|
* Order matters: when matching, the first alias match wins.
|
|
15
23
|
* Aliases are matched case-insensitively.
|
|
24
|
+
*
|
|
25
|
+
* The `name` field uses the canonical transition intent names where applicable.
|
|
26
|
+
* Legacy names ('active', 'review', 'done', 'blocked') are kept as aliases
|
|
27
|
+
* within the new intents for backward compatibility.
|
|
16
28
|
*/
|
|
17
29
|
export const DEFAULT_INTENTS = [
|
|
18
30
|
{
|
|
19
|
-
name: '
|
|
20
|
-
description: 'Work has
|
|
31
|
+
name: 'started',
|
|
32
|
+
description: 'Work has begun',
|
|
21
33
|
aliases: [
|
|
22
34
|
'In Progress',
|
|
23
35
|
'Working On',
|
|
@@ -30,7 +42,7 @@ export const DEFAULT_INTENTS = [
|
|
|
30
42
|
],
|
|
31
43
|
},
|
|
32
44
|
{
|
|
33
|
-
name: '
|
|
45
|
+
name: 'needs_review',
|
|
34
46
|
description: 'Work is done, awaiting review',
|
|
35
47
|
aliases: [
|
|
36
48
|
'Review',
|
|
@@ -45,7 +57,7 @@ export const DEFAULT_INTENTS = [
|
|
|
45
57
|
],
|
|
46
58
|
},
|
|
47
59
|
{
|
|
48
|
-
name: '
|
|
60
|
+
name: 'completed',
|
|
49
61
|
description: 'Work is complete',
|
|
50
62
|
aliases: [
|
|
51
63
|
'Done',
|
|
@@ -59,24 +71,66 @@ export const DEFAULT_INTENTS = [
|
|
|
59
71
|
],
|
|
60
72
|
},
|
|
61
73
|
{
|
|
62
|
-
name: '
|
|
63
|
-
description: 'Work is
|
|
74
|
+
name: 'paused',
|
|
75
|
+
description: 'Work is stopped temporarily',
|
|
64
76
|
aliases: [
|
|
65
77
|
'Blocked',
|
|
66
78
|
'On Hold',
|
|
67
79
|
'Stuck',
|
|
68
80
|
'Waiting',
|
|
69
81
|
'Paused',
|
|
82
|
+
'Not Working On',
|
|
70
83
|
'Impediment',
|
|
71
84
|
'Pending',
|
|
72
85
|
],
|
|
73
86
|
},
|
|
87
|
+
{
|
|
88
|
+
name: 'ready',
|
|
89
|
+
description: 'Groomed and ready to start',
|
|
90
|
+
aliases: [
|
|
91
|
+
'Ready',
|
|
92
|
+
'Ready for Development',
|
|
93
|
+
'Development Ready',
|
|
94
|
+
'Planned',
|
|
95
|
+
'Groomed',
|
|
96
|
+
'To Do',
|
|
97
|
+
'Todo',
|
|
98
|
+
'Selected for Development',
|
|
99
|
+
'Up Next',
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'dropped',
|
|
104
|
+
description: 'Removed from active work entirely',
|
|
105
|
+
aliases: [
|
|
106
|
+
'Canceled',
|
|
107
|
+
'Cancelled',
|
|
108
|
+
'Won\'t Do',
|
|
109
|
+
'Won\'t Fix',
|
|
110
|
+
'Archived',
|
|
111
|
+
'Removed',
|
|
112
|
+
'Dropped',
|
|
113
|
+
'Discarded',
|
|
114
|
+
],
|
|
115
|
+
},
|
|
74
116
|
];
|
|
117
|
+
/**
|
|
118
|
+
* Map from legacy intent names to the new canonical transition intent names.
|
|
119
|
+
* Used for backward compatibility with existing state-map config overrides.
|
|
120
|
+
*/
|
|
121
|
+
const LEGACY_INTENT_MAP = {
|
|
122
|
+
active: 'started',
|
|
123
|
+
review: 'needs_review',
|
|
124
|
+
done: 'completed',
|
|
125
|
+
blocked: 'paused',
|
|
126
|
+
};
|
|
75
127
|
/**
|
|
76
128
|
* Get a default intent by name.
|
|
129
|
+
* Also resolves legacy intent names (active → started, review → needs_review, etc.)
|
|
77
130
|
*/
|
|
78
131
|
export function getDefaultIntent(name) {
|
|
79
|
-
|
|
132
|
+
const resolved = LEGACY_INTENT_MAP[name] ?? name;
|
|
133
|
+
return DEFAULT_INTENTS.find(i => i.name === resolved);
|
|
80
134
|
}
|
|
81
135
|
/**
|
|
82
136
|
* Try to match a state name against intent aliases (case-insensitive).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-intents.js","sourceRoot":"","sources":["../../../src/lib/providers/state-intents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"state-intents.js","sourceRoot":"","sources":["../../../src/lib/providers/state-intents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA8BH,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,SAAS;IACT,cAAc;IACd,WAAW;IACX,QAAQ;IACR,OAAO;IACP,SAAS;CACV,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAqB;IAC/C;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE;YACP,aAAa;YACb,YAAY;YACZ,OAAO;YACP,gBAAgB;YAChB,SAAS;YACT,QAAQ;YACR,YAAY;YACZ,SAAS;SACV;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE;YACP,QAAQ;YACR,WAAW;YACX,cAAc;YACd,iBAAiB;YACjB,mBAAmB;YACnB,aAAa;YACb,IAAI;YACJ,kBAAkB;YAClB,gBAAgB;SACjB;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE;YACP,MAAM;YACN,UAAU;YACV,QAAQ;YACR,SAAS;YACT,QAAQ;YACR,UAA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CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,CAAA;QACvE,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;IACzB,CAAC;IAED,yEAAyE;IACzE,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CACrC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YACpC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CACrC,CAAA;QACD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;IACzB,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State Resolution Engine
|
|
3
3
|
*
|
|
4
|
-
* Resolves semantic intents (e.g., '
|
|
4
|
+
* Resolves semantic intents (e.g., 'started', 'needs_review', 'completed') to actual
|
|
5
5
|
* PM tool states at runtime. Never caches state IDs across calls.
|
|
6
6
|
*
|
|
7
7
|
* Resolution flow:
|
|
8
8
|
* 1. Always fetch fresh states from the PM provider
|
|
9
|
-
* 2. Check
|
|
10
|
-
* 3.
|
|
11
|
-
* 4.
|
|
12
|
-
* 5. No match →
|
|
9
|
+
* 2. Check pmo_transition_map — explicit user-confirmed mappings from `prlt connect`
|
|
10
|
+
* 3. Check user config — `state-map.{intent}` overrides exact-match against fetched states
|
|
11
|
+
* 4. Match against built-in semantic intent aliases
|
|
12
|
+
* 5. No config + no alias match → LLM resolves (pass available states to LLM)
|
|
13
|
+
* 6. No match → skip (don't move, log warning)
|
|
13
14
|
*
|
|
14
15
|
* The same move() function works across Linear, Trello, ClickUp, Jira, etc. —
|
|
15
16
|
* each provider implements fetchStates() differently but returns the same shape.
|
|
@@ -47,7 +48,7 @@ export interface StateResolutionResult {
|
|
|
47
48
|
/** Whether the move succeeded */
|
|
48
49
|
success: boolean;
|
|
49
50
|
/** How the state was resolved */
|
|
50
|
-
resolvedVia?: 'config' | 'alias' | 'llm' | 'skipped';
|
|
51
|
+
resolvedVia?: 'transition_map' | 'config' | 'alias' | 'llm' | 'skipped';
|
|
51
52
|
/** The resolved state name */
|
|
52
53
|
stateName?: string;
|
|
53
54
|
/** The resolved state ID */
|
|
@@ -109,20 +110,23 @@ export interface MoveOptions {
|
|
|
109
110
|
db?: Database.Database;
|
|
110
111
|
/** Current state name — if provided, skip move when already in the resolved state */
|
|
111
112
|
currentState?: string;
|
|
113
|
+
/** Provider name for transition map lookups (e.g., 'linear', 'pmo') */
|
|
114
|
+
providerName?: string;
|
|
112
115
|
}
|
|
113
116
|
/**
|
|
114
117
|
* Move a ticket to a state matching a semantic intent.
|
|
115
118
|
*
|
|
116
119
|
* Resolution order:
|
|
117
120
|
* 1. Fetch fresh states from the provider (never cache)
|
|
118
|
-
* 2. Check
|
|
119
|
-
* 3.
|
|
120
|
-
* 4.
|
|
121
|
-
* 5.
|
|
121
|
+
* 2. Check pmo_transition_map for explicit mapping (from `prlt connect`)
|
|
122
|
+
* 3. Check user config for `state-map.{intent}` override → exact match
|
|
123
|
+
* 4. Match against built-in semantic intent aliases
|
|
124
|
+
* 5. LLM fallback — ask Claude which state matches the intent
|
|
125
|
+
* 6. No match → skip, return warning
|
|
122
126
|
*
|
|
123
127
|
* @param pmProvider - The PM provider to fetch states from and move tickets in
|
|
124
128
|
* @param ticketId - The ticket to move
|
|
125
|
-
* @param intent - The semantic intent (e.g., '
|
|
129
|
+
* @param intent - The semantic intent (e.g., 'started', 'needs_review', 'completed')
|
|
126
130
|
* @param dbOrOptions - Database instance or options object
|
|
127
131
|
* @returns Resolution result with success/failure and metadata
|
|
128
132
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State Resolution Engine
|
|
3
3
|
*
|
|
4
|
-
* Resolves semantic intents (e.g., '
|
|
4
|
+
* Resolves semantic intents (e.g., 'started', 'needs_review', 'completed') to actual
|
|
5
5
|
* PM tool states at runtime. Never caches state IDs across calls.
|
|
6
6
|
*
|
|
7
7
|
* Resolution flow:
|
|
8
8
|
* 1. Always fetch fresh states from the PM provider
|
|
9
|
-
* 2. Check
|
|
10
|
-
* 3.
|
|
11
|
-
* 4.
|
|
12
|
-
* 5. No match →
|
|
9
|
+
* 2. Check pmo_transition_map — explicit user-confirmed mappings from `prlt connect`
|
|
10
|
+
* 3. Check user config — `state-map.{intent}` overrides exact-match against fetched states
|
|
11
|
+
* 4. Match against built-in semantic intent aliases
|
|
12
|
+
* 5. No config + no alias match → LLM resolves (pass available states to LLM)
|
|
13
|
+
* 6. No match → skip (don't move, log warning)
|
|
13
14
|
*
|
|
14
15
|
* The same move() function works across Linear, Trello, ClickUp, Jira, etc. —
|
|
15
16
|
* each provider implements fetchStates() differently but returns the same shape.
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
*/
|
|
18
19
|
import { SettingsStore } from '../database/settings-store.js';
|
|
19
20
|
import { matchIntentByAliases, getDefaultIntent } from './state-intents.js';
|
|
21
|
+
import { TransitionMapStore } from './transition-map.js';
|
|
20
22
|
/**
|
|
21
23
|
* Config key prefix for state-map overrides.
|
|
22
24
|
* e.g., `state-map.review` → "Awaiting Client Feedback"
|
|
@@ -175,14 +177,15 @@ export function createPMProviderAdapter(provider, storage, projectId) {
|
|
|
175
177
|
*
|
|
176
178
|
* Resolution order:
|
|
177
179
|
* 1. Fetch fresh states from the provider (never cache)
|
|
178
|
-
* 2. Check
|
|
179
|
-
* 3.
|
|
180
|
-
* 4.
|
|
181
|
-
* 5.
|
|
180
|
+
* 2. Check pmo_transition_map for explicit mapping (from `prlt connect`)
|
|
181
|
+
* 3. Check user config for `state-map.{intent}` override → exact match
|
|
182
|
+
* 4. Match against built-in semantic intent aliases
|
|
183
|
+
* 5. LLM fallback — ask Claude which state matches the intent
|
|
184
|
+
* 6. No match → skip, return warning
|
|
182
185
|
*
|
|
183
186
|
* @param pmProvider - The PM provider to fetch states from and move tickets in
|
|
184
187
|
* @param ticketId - The ticket to move
|
|
185
|
-
* @param intent - The semantic intent (e.g., '
|
|
188
|
+
* @param intent - The semantic intent (e.g., 'started', 'needs_review', 'completed')
|
|
186
189
|
* @param dbOrOptions - Database instance or options object
|
|
187
190
|
* @returns Resolution result with success/failure and metadata
|
|
188
191
|
*/
|
|
@@ -190,6 +193,7 @@ export async function move(pmProvider, ticketId, intent, dbOrOptions) {
|
|
|
190
193
|
// Normalize arguments: support both `move(p, id, intent, db)` and `move(p, id, intent, { db, currentState })`
|
|
191
194
|
let db;
|
|
192
195
|
let currentState;
|
|
196
|
+
let providerName;
|
|
193
197
|
if (dbOrOptions && typeof dbOrOptions === 'object' && 'prepare' in dbOrOptions) {
|
|
194
198
|
// It's a Database instance (has .prepare method)
|
|
195
199
|
db = dbOrOptions;
|
|
@@ -198,6 +202,7 @@ export async function move(pmProvider, ticketId, intent, dbOrOptions) {
|
|
|
198
202
|
const opts = dbOrOptions;
|
|
199
203
|
db = opts.db;
|
|
200
204
|
currentState = opts.currentState;
|
|
205
|
+
providerName = opts.providerName;
|
|
201
206
|
}
|
|
202
207
|
// 1. Always fetch fresh states
|
|
203
208
|
let states;
|
|
@@ -222,61 +227,62 @@ export async function move(pmProvider, ticketId, intent, dbOrOptions) {
|
|
|
222
227
|
return false;
|
|
223
228
|
return currentState.toLowerCase() === stateName.toLowerCase();
|
|
224
229
|
};
|
|
225
|
-
//
|
|
230
|
+
// Helper: attempt to move ticket to a matched state
|
|
231
|
+
const tryMove = async (match, resolvedVia) => {
|
|
232
|
+
if (isAlreadyInState(match.name)) {
|
|
233
|
+
return { success: false, resolvedVia, stateName: match.name, stateId: match.id };
|
|
234
|
+
}
|
|
235
|
+
const result = await pmProvider.moveTicket(ticketId, match.id);
|
|
236
|
+
return {
|
|
237
|
+
success: result.success,
|
|
238
|
+
resolvedVia,
|
|
239
|
+
stateName: match.name,
|
|
240
|
+
stateId: match.id,
|
|
241
|
+
error: result.error,
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
// 2. Check pmo_transition_map for explicit mapping
|
|
245
|
+
if (db && providerName) {
|
|
246
|
+
try {
|
|
247
|
+
const store = new TransitionMapStore(db);
|
|
248
|
+
const mappedStateName = store.resolveIntent(providerName, intent);
|
|
249
|
+
if (mappedStateName) {
|
|
250
|
+
const match = states.find(s => s.name.toLowerCase() === mappedStateName.toLowerCase());
|
|
251
|
+
if (match) {
|
|
252
|
+
return tryMove(match, 'transition_map');
|
|
253
|
+
}
|
|
254
|
+
// Mapped state name doesn't match available states — fall through
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
// Table may not exist yet (pre-migration) — fall through
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
// 3. Check user config override
|
|
226
262
|
if (db) {
|
|
227
263
|
const configOverride = getStateMapConfig(db, intent);
|
|
228
264
|
if (configOverride) {
|
|
229
265
|
const match = states.find(s => s.name.toLowerCase() === configOverride.toLowerCase());
|
|
230
266
|
if (match) {
|
|
231
|
-
|
|
232
|
-
return { success: false, resolvedVia: 'config', stateName: match.name, stateId: match.id };
|
|
233
|
-
}
|
|
234
|
-
const result = await pmProvider.moveTicket(ticketId, match.id);
|
|
235
|
-
return {
|
|
236
|
-
success: result.success,
|
|
237
|
-
resolvedVia: 'config',
|
|
238
|
-
stateName: match.name,
|
|
239
|
-
stateId: match.id,
|
|
240
|
-
error: result.error,
|
|
241
|
-
};
|
|
267
|
+
return tryMove(match, 'config');
|
|
242
268
|
}
|
|
243
269
|
// Config is set but no matching state — fall through to alias/LLM
|
|
244
270
|
}
|
|
245
271
|
}
|
|
246
|
-
//
|
|
272
|
+
// 4. Match against built-in semantic intent aliases
|
|
247
273
|
const intentDef = getDefaultIntent(intent);
|
|
248
274
|
if (intentDef) {
|
|
249
275
|
const aliasMatch = matchIntentByAliases(states, intentDef);
|
|
250
276
|
if (aliasMatch) {
|
|
251
|
-
|
|
252
|
-
return { success: false, resolvedVia: 'alias', stateName: aliasMatch.name, stateId: aliasMatch.id };
|
|
253
|
-
}
|
|
254
|
-
const result = await pmProvider.moveTicket(ticketId, aliasMatch.id);
|
|
255
|
-
return {
|
|
256
|
-
success: result.success,
|
|
257
|
-
resolvedVia: 'alias',
|
|
258
|
-
stateName: aliasMatch.name,
|
|
259
|
-
stateId: aliasMatch.id,
|
|
260
|
-
error: result.error,
|
|
261
|
-
};
|
|
277
|
+
return tryMove(aliasMatch, 'alias');
|
|
262
278
|
}
|
|
263
279
|
}
|
|
264
|
-
//
|
|
280
|
+
// 5. LLM fallback
|
|
265
281
|
const llmMatch = await llmResolveState(states, intent);
|
|
266
282
|
if (llmMatch) {
|
|
267
|
-
|
|
268
|
-
return { success: false, resolvedVia: 'llm', stateName: llmMatch.name, stateId: llmMatch.id };
|
|
269
|
-
}
|
|
270
|
-
const result = await pmProvider.moveTicket(ticketId, llmMatch.id);
|
|
271
|
-
return {
|
|
272
|
-
success: result.success,
|
|
273
|
-
resolvedVia: 'llm',
|
|
274
|
-
stateName: llmMatch.name,
|
|
275
|
-
stateId: llmMatch.id,
|
|
276
|
-
error: result.error,
|
|
277
|
-
};
|
|
283
|
+
return tryMove(llmMatch, 'llm');
|
|
278
284
|
}
|
|
279
|
-
//
|
|
285
|
+
// 6. No match — skip
|
|
280
286
|
const warning = `No state match for intent '${intent}', skipping move`;
|
|
281
287
|
console.warn(warning);
|
|
282
288
|
return {
|
|
@@ -297,6 +303,6 @@ export async function move(pmProvider, ticketId, intent, dbOrOptions) {
|
|
|
297
303
|
*/
|
|
298
304
|
export async function moveWithProvider(provider, storage, projectId, ticketId, intent, db, currentState) {
|
|
299
305
|
const pmProvider = createPMProviderAdapter(provider, storage, projectId);
|
|
300
|
-
return move(pmProvider, ticketId, intent, { db, currentState });
|
|
306
|
+
return move(pmProvider, ticketId, intent, { db, currentState, providerName: provider.name });
|
|
301
307
|
}
|
|
302
308
|
//# sourceMappingURL=state-resolution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-resolution.js","sourceRoot":"","sources":["../../../src/lib/providers/state-resolution.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"state-resolution.js","sourceRoot":"","sources":["../../../src/lib/providers/state-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AA8CxD;;;GAGG;AACH,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAErC,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAiB,EACjB,MAAc;IAEd,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;IAC5C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAE3E,MAAM,MAAM,GAAG;;;EAGf,SAAS;;oBAES,MAAM;EACxB,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,uBAAuB,gBAAgB,CAAC,MAAM,CAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;;8GAEc,CAAA;IAE5G,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,uCAAuC,EAAE;YACpE,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