@lovelybunch/core 1.0.76-alpha.1 → 1.0.76-alpha.3
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mail.d.ts +30 -30
- package/dist/pipeline-builders.d.ts +49 -0
- package/dist/pipeline-builders.d.ts.map +1 -0
- package/dist/pipeline-builders.js +208 -0
- package/dist/pipeline-builders.js.map +1 -0
- package/dist/pipelines.d.ts +4 -0
- package/dist/pipelines.d.ts.map +1 -0
- package/dist/pipelines.js +3 -0
- package/dist/pipelines.js.map +1 -0
- package/dist/skill-instructions.d.ts +3 -3
- package/dist/skill-instructions.d.ts.map +1 -1
- package/dist/skill-instructions.js +81 -49
- package/dist/skill-instructions.js.map +1 -1
- package/dist/tasks.d.ts +76 -76
- package/package.json +6 -2
- package/dist/agent-instructions.d.ts +0 -17
- package/dist/agent-instructions.d.ts.map +0 -1
- package/dist/agent-instructions.js +0 -160
- package/dist/agent-instructions.js.map +0 -1
- package/dist/change-proposal.d.ts +0 -74
- package/dist/change-proposal.d.ts.map +0 -1
- package/dist/change-proposal.js +0 -207
- package/dist/change-proposal.js.map +0 -1
- package/dist/proposals.d.ts +0 -765
- package/dist/proposals.d.ts.map +0 -1
- package/dist/proposals.js +0 -483
- package/dist/proposals.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './context.js';
|
|
|
7
7
|
export * from './knowledge.js';
|
|
8
8
|
export * from './events.js';
|
|
9
9
|
export * from './skill-instructions.js';
|
|
10
|
+
export * from './pipeline-builders.js';
|
|
10
11
|
export * from './slack.js';
|
|
11
12
|
export * from './mail.js';
|
|
12
13
|
export type * from '@lovelybunch/types';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,mBAAmB,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,mBAAmB,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './context.js';
|
|
|
7
7
|
export * from './knowledge.js';
|
|
8
8
|
export * from './events.js';
|
|
9
9
|
export * from './skill-instructions.js';
|
|
10
|
+
export * from './pipeline-builders.js';
|
|
10
11
|
export * from './slack.js';
|
|
11
12
|
export * from './mail.js';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
package/dist/mail.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ export declare const MailAttachmentSchema: z.ZodObject<{
|
|
|
8
8
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
9
9
|
contentId: z.ZodOptional<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
id: string;
|
|
12
11
|
filename: string;
|
|
12
|
+
id: string;
|
|
13
13
|
contentType: string;
|
|
14
14
|
contentDisposition?: string | undefined;
|
|
15
15
|
contentId?: string | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
id: string;
|
|
18
17
|
filename: string;
|
|
18
|
+
id: string;
|
|
19
19
|
contentType: string;
|
|
20
20
|
contentDisposition?: string | undefined;
|
|
21
21
|
contentId?: string | undefined;
|
|
@@ -36,14 +36,14 @@ export declare const MailMessageSchema: z.ZodObject<{
|
|
|
36
36
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
37
37
|
contentId: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
id: string;
|
|
40
39
|
filename: string;
|
|
40
|
+
id: string;
|
|
41
41
|
contentType: string;
|
|
42
42
|
contentDisposition?: string | undefined;
|
|
43
43
|
contentId?: string | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
id: string;
|
|
46
45
|
filename: string;
|
|
46
|
+
id: string;
|
|
47
47
|
contentType: string;
|
|
48
48
|
contentDisposition?: string | undefined;
|
|
49
49
|
contentId?: string | undefined;
|
|
@@ -55,18 +55,18 @@ export declare const MailMessageSchema: z.ZodObject<{
|
|
|
55
55
|
processing: z.ZodOptional<z.ZodBoolean>;
|
|
56
56
|
processingStartedAt: z.ZodOptional<z.ZodString>;
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
|
|
58
|
+
subject: string;
|
|
59
59
|
content: string;
|
|
60
|
+
id: string;
|
|
60
61
|
emailId: string;
|
|
61
62
|
from: string;
|
|
62
63
|
to: string[];
|
|
63
64
|
cc: string[];
|
|
64
65
|
bcc: string[];
|
|
65
|
-
subject: string;
|
|
66
66
|
messageId: string;
|
|
67
67
|
attachments: {
|
|
68
|
-
id: string;
|
|
69
68
|
filename: string;
|
|
69
|
+
id: string;
|
|
70
70
|
contentType: string;
|
|
71
71
|
contentDisposition?: string | undefined;
|
|
72
72
|
contentId?: string | undefined;
|
|
@@ -77,11 +77,11 @@ export declare const MailMessageSchema: z.ZodObject<{
|
|
|
77
77
|
processing?: boolean | undefined;
|
|
78
78
|
processingStartedAt?: string | undefined;
|
|
79
79
|
}, {
|
|
80
|
+
subject: string;
|
|
80
81
|
id: string;
|
|
81
82
|
emailId: string;
|
|
82
83
|
from: string;
|
|
83
84
|
to: string[];
|
|
84
|
-
subject: string;
|
|
85
85
|
messageId: string;
|
|
86
86
|
receivedAt: string;
|
|
87
87
|
folder: "inbox" | "read" | "sent";
|
|
@@ -90,8 +90,8 @@ export declare const MailMessageSchema: z.ZodObject<{
|
|
|
90
90
|
cc?: string[] | undefined;
|
|
91
91
|
bcc?: string[] | undefined;
|
|
92
92
|
attachments?: {
|
|
93
|
-
id: string;
|
|
94
93
|
filename: string;
|
|
94
|
+
id: string;
|
|
95
95
|
contentType: string;
|
|
96
96
|
contentDisposition?: string | undefined;
|
|
97
97
|
contentId?: string | undefined;
|
|
@@ -114,14 +114,14 @@ export declare const SaveMailInputSchema: z.ZodObject<{
|
|
|
114
114
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
115
115
|
contentId: z.ZodOptional<z.ZodString>;
|
|
116
116
|
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
id: string;
|
|
118
117
|
filename: string;
|
|
118
|
+
id: string;
|
|
119
119
|
contentType: string;
|
|
120
120
|
contentDisposition?: string | undefined;
|
|
121
121
|
contentId?: string | undefined;
|
|
122
122
|
}, {
|
|
123
|
-
id: string;
|
|
124
123
|
filename: string;
|
|
124
|
+
id: string;
|
|
125
125
|
contentType: string;
|
|
126
126
|
contentDisposition?: string | undefined;
|
|
127
127
|
contentId?: string | undefined;
|
|
@@ -129,17 +129,17 @@ export declare const SaveMailInputSchema: z.ZodObject<{
|
|
|
129
129
|
receivedAt: z.ZodOptional<z.ZodString>;
|
|
130
130
|
content: z.ZodDefault<z.ZodString>;
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
subject: string;
|
|
132
133
|
content: string;
|
|
133
134
|
emailId: string;
|
|
134
135
|
from: string;
|
|
135
136
|
to: string[];
|
|
136
137
|
cc: string[];
|
|
137
138
|
bcc: string[];
|
|
138
|
-
subject: string;
|
|
139
139
|
messageId: string;
|
|
140
140
|
attachments: {
|
|
141
|
-
id: string;
|
|
142
141
|
filename: string;
|
|
142
|
+
id: string;
|
|
143
143
|
contentType: string;
|
|
144
144
|
contentDisposition?: string | undefined;
|
|
145
145
|
contentId?: string | undefined;
|
|
@@ -149,14 +149,14 @@ export declare const SaveMailInputSchema: z.ZodObject<{
|
|
|
149
149
|
emailId: string;
|
|
150
150
|
from: string;
|
|
151
151
|
to: string[];
|
|
152
|
+
subject?: string | undefined;
|
|
152
153
|
content?: string | undefined;
|
|
153
154
|
cc?: string[] | undefined;
|
|
154
155
|
bcc?: string[] | undefined;
|
|
155
|
-
subject?: string | undefined;
|
|
156
156
|
messageId?: string | undefined;
|
|
157
157
|
attachments?: {
|
|
158
|
-
id: string;
|
|
159
158
|
filename: string;
|
|
159
|
+
id: string;
|
|
160
160
|
contentType: string;
|
|
161
161
|
contentDisposition?: string | undefined;
|
|
162
162
|
contentId?: string | undefined;
|
|
@@ -238,14 +238,14 @@ export declare const mailSchemas: {
|
|
|
238
238
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
239
239
|
contentId: z.ZodOptional<z.ZodString>;
|
|
240
240
|
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
id: string;
|
|
242
241
|
filename: string;
|
|
242
|
+
id: string;
|
|
243
243
|
contentType: string;
|
|
244
244
|
contentDisposition?: string | undefined;
|
|
245
245
|
contentId?: string | undefined;
|
|
246
246
|
}, {
|
|
247
|
-
id: string;
|
|
248
247
|
filename: string;
|
|
248
|
+
id: string;
|
|
249
249
|
contentType: string;
|
|
250
250
|
contentDisposition?: string | undefined;
|
|
251
251
|
contentId?: string | undefined;
|
|
@@ -266,14 +266,14 @@ export declare const mailSchemas: {
|
|
|
266
266
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
267
267
|
contentId: z.ZodOptional<z.ZodString>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
id: string;
|
|
270
269
|
filename: string;
|
|
270
|
+
id: string;
|
|
271
271
|
contentType: string;
|
|
272
272
|
contentDisposition?: string | undefined;
|
|
273
273
|
contentId?: string | undefined;
|
|
274
274
|
}, {
|
|
275
|
-
id: string;
|
|
276
275
|
filename: string;
|
|
276
|
+
id: string;
|
|
277
277
|
contentType: string;
|
|
278
278
|
contentDisposition?: string | undefined;
|
|
279
279
|
contentId?: string | undefined;
|
|
@@ -285,18 +285,18 @@ export declare const mailSchemas: {
|
|
|
285
285
|
processing: z.ZodOptional<z.ZodBoolean>;
|
|
286
286
|
processingStartedAt: z.ZodOptional<z.ZodString>;
|
|
287
287
|
}, "strip", z.ZodTypeAny, {
|
|
288
|
-
|
|
288
|
+
subject: string;
|
|
289
289
|
content: string;
|
|
290
|
+
id: string;
|
|
290
291
|
emailId: string;
|
|
291
292
|
from: string;
|
|
292
293
|
to: string[];
|
|
293
294
|
cc: string[];
|
|
294
295
|
bcc: string[];
|
|
295
|
-
subject: string;
|
|
296
296
|
messageId: string;
|
|
297
297
|
attachments: {
|
|
298
|
-
id: string;
|
|
299
298
|
filename: string;
|
|
299
|
+
id: string;
|
|
300
300
|
contentType: string;
|
|
301
301
|
contentDisposition?: string | undefined;
|
|
302
302
|
contentId?: string | undefined;
|
|
@@ -307,11 +307,11 @@ export declare const mailSchemas: {
|
|
|
307
307
|
processing?: boolean | undefined;
|
|
308
308
|
processingStartedAt?: string | undefined;
|
|
309
309
|
}, {
|
|
310
|
+
subject: string;
|
|
310
311
|
id: string;
|
|
311
312
|
emailId: string;
|
|
312
313
|
from: string;
|
|
313
314
|
to: string[];
|
|
314
|
-
subject: string;
|
|
315
315
|
messageId: string;
|
|
316
316
|
receivedAt: string;
|
|
317
317
|
folder: "inbox" | "read" | "sent";
|
|
@@ -320,8 +320,8 @@ export declare const mailSchemas: {
|
|
|
320
320
|
cc?: string[] | undefined;
|
|
321
321
|
bcc?: string[] | undefined;
|
|
322
322
|
attachments?: {
|
|
323
|
-
id: string;
|
|
324
323
|
filename: string;
|
|
324
|
+
id: string;
|
|
325
325
|
contentType: string;
|
|
326
326
|
contentDisposition?: string | undefined;
|
|
327
327
|
contentId?: string | undefined;
|
|
@@ -344,14 +344,14 @@ export declare const mailSchemas: {
|
|
|
344
344
|
contentDisposition: z.ZodOptional<z.ZodString>;
|
|
345
345
|
contentId: z.ZodOptional<z.ZodString>;
|
|
346
346
|
}, "strip", z.ZodTypeAny, {
|
|
347
|
-
id: string;
|
|
348
347
|
filename: string;
|
|
348
|
+
id: string;
|
|
349
349
|
contentType: string;
|
|
350
350
|
contentDisposition?: string | undefined;
|
|
351
351
|
contentId?: string | undefined;
|
|
352
352
|
}, {
|
|
353
|
-
id: string;
|
|
354
353
|
filename: string;
|
|
354
|
+
id: string;
|
|
355
355
|
contentType: string;
|
|
356
356
|
contentDisposition?: string | undefined;
|
|
357
357
|
contentId?: string | undefined;
|
|
@@ -359,17 +359,17 @@ export declare const mailSchemas: {
|
|
|
359
359
|
receivedAt: z.ZodOptional<z.ZodString>;
|
|
360
360
|
content: z.ZodDefault<z.ZodString>;
|
|
361
361
|
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
subject: string;
|
|
362
363
|
content: string;
|
|
363
364
|
emailId: string;
|
|
364
365
|
from: string;
|
|
365
366
|
to: string[];
|
|
366
367
|
cc: string[];
|
|
367
368
|
bcc: string[];
|
|
368
|
-
subject: string;
|
|
369
369
|
messageId: string;
|
|
370
370
|
attachments: {
|
|
371
|
-
id: string;
|
|
372
371
|
filename: string;
|
|
372
|
+
id: string;
|
|
373
373
|
contentType: string;
|
|
374
374
|
contentDisposition?: string | undefined;
|
|
375
375
|
contentId?: string | undefined;
|
|
@@ -379,14 +379,14 @@ export declare const mailSchemas: {
|
|
|
379
379
|
emailId: string;
|
|
380
380
|
from: string;
|
|
381
381
|
to: string[];
|
|
382
|
+
subject?: string | undefined;
|
|
382
383
|
content?: string | undefined;
|
|
383
384
|
cc?: string[] | undefined;
|
|
384
385
|
bcc?: string[] | undefined;
|
|
385
|
-
subject?: string | undefined;
|
|
386
386
|
messageId?: string | undefined;
|
|
387
387
|
attachments?: {
|
|
388
|
-
id: string;
|
|
389
388
|
filename: string;
|
|
389
|
+
id: string;
|
|
390
390
|
contentType: string;
|
|
391
391
|
contentDisposition?: string | undefined;
|
|
392
392
|
contentId?: string | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type CliAgent = 'claude' | 'gemini' | 'codex' | 'droid' | 'kiro';
|
|
2
|
+
export type PipelineContextType = 'change-task' | 'prepare-task' | 'skill' | 'general';
|
|
3
|
+
export interface PipelineConfig {
|
|
4
|
+
taskId: string;
|
|
5
|
+
contextType: PipelineContextType;
|
|
6
|
+
cliAgent: CliAgent;
|
|
7
|
+
mcpServersMap: Record<string, any>;
|
|
8
|
+
selectedMcpServers: string[];
|
|
9
|
+
skills: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}[];
|
|
13
|
+
selectedSkillIds: string[];
|
|
14
|
+
automationEnabled: boolean;
|
|
15
|
+
customInstruction?: string;
|
|
16
|
+
includeDefaultInstructions?: boolean;
|
|
17
|
+
/** When true the agent stays open after completing; when false it exits on completion. Defaults to true. */
|
|
18
|
+
interactive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type BuildCommand = (config: PipelineConfig) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Sanitize instruction text for safe embedding in shell commands.
|
|
23
|
+
* - Backticks -> single quotes (prevents shell command substitution)
|
|
24
|
+
* - Curly/smart quotes -> straight equivalents
|
|
25
|
+
*/
|
|
26
|
+
export declare function sanitizeInstruction(text: string): string;
|
|
27
|
+
export declare const buildClaudeCommand: BuildCommand;
|
|
28
|
+
export declare const buildGeminiCommand: BuildCommand;
|
|
29
|
+
export declare const buildCodexCommand: BuildCommand;
|
|
30
|
+
export declare const buildDroidCommand: BuildCommand;
|
|
31
|
+
export declare const buildKiroCommand: BuildCommand;
|
|
32
|
+
/**
|
|
33
|
+
* Build a short banner printed in the terminal before the agent launches.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildPipelineBanner(cfg: Pick<PipelineConfig, 'taskId' | 'cliAgent' | 'contextType' | 'interactive'>): string;
|
|
36
|
+
/**
|
|
37
|
+
* Build the shell command for a given pipeline configuration.
|
|
38
|
+
* Returns a heredoc-wrapped command suitable for direct PTY input.
|
|
39
|
+
* Prefer `buildPipelineScript` + temp file for server/CLI callers
|
|
40
|
+
* to avoid PTY echo noise.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildPipelineCommand(cfg: PipelineConfig): string;
|
|
43
|
+
/**
|
|
44
|
+
* Build just the raw Node.js script for a pipeline configuration.
|
|
45
|
+
* Callers should write this to a temp file and execute `node <path>`,
|
|
46
|
+
* which avoids PTY echo noise and input-buffer limits.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildPipelineScript(cfg: PipelineConfig): string;
|
|
49
|
+
//# sourceMappingURL=pipeline-builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-builders.d.ts","sourceRoot":"","sources":["../src/pipeline-builders.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;AAEvE,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,CAAA;AAEtF,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,mBAAmB,CAAA;IAChC,QAAQ,EAAE,QAAQ,CAAA;IAClB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAClC,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,4GAA4G;IAC5G,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,cAAc,KAAK,MAAM,CAAA;AAE7D;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKxD;AAyCD,eAAO,MAAM,kBAAkB,EAAE,YAahC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,YAahC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,YAa/B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,YAY/B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,YAa9B,CAAA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,CAAC,GAAG,MAAM,CAc5H;AAUD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAMhE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CA+C/D"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { getChangeTaskInstructions, getPrepareChangeTaskInstructions, getSkillInstructions, } from './skill-instructions.js';
|
|
2
|
+
/**
|
|
3
|
+
* Sanitize instruction text for safe embedding in shell commands.
|
|
4
|
+
* - Backticks -> single quotes (prevents shell command substitution)
|
|
5
|
+
* - Curly/smart quotes -> straight equivalents
|
|
6
|
+
*/
|
|
7
|
+
export function sanitizeInstruction(text) {
|
|
8
|
+
return text
|
|
9
|
+
.replace(/`/g, "'")
|
|
10
|
+
.replace(/[\u2018\u2019]/g, "'")
|
|
11
|
+
.replace(/[\u201C\u201D]/g, '"');
|
|
12
|
+
}
|
|
13
|
+
function getInstructionParts(cfg) {
|
|
14
|
+
const skillPaths = cfg.selectedSkillIds.map((id) => `.nut/skills/${id}/SKILL.md`);
|
|
15
|
+
const safeCustom = cfg.customInstruction ? sanitizeInstruction(cfg.customInstruction) : cfg.customInstruction;
|
|
16
|
+
const parts = cfg.contextType === 'change-task'
|
|
17
|
+
? getChangeTaskInstructions(cfg.taskId, skillPaths, safeCustom, cfg.includeDefaultInstructions ?? true)
|
|
18
|
+
: cfg.contextType === 'prepare-task'
|
|
19
|
+
? getPrepareChangeTaskInstructions(cfg.taskId, skillPaths, safeCustom)
|
|
20
|
+
: getSkillInstructions(skillPaths, safeCustom);
|
|
21
|
+
return parts.join(' ');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Encode a string as base64 in a way that works in both Node.js and browsers.
|
|
25
|
+
*/
|
|
26
|
+
function toBase64(str) {
|
|
27
|
+
const bytes = new TextEncoder().encode(str);
|
|
28
|
+
let binary = '';
|
|
29
|
+
for (let i = 0; i < bytes.length; i++)
|
|
30
|
+
binary += String.fromCharCode(bytes[i]);
|
|
31
|
+
return btoa(binary);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Wrap a JS script as a shell command that writes a temp file from a base64
|
|
35
|
+
* payload, executes it, then cleans up. This avoids PTY echo noise (the
|
|
36
|
+
* echoed text is an opaque base64 string instead of readable source) and
|
|
37
|
+
* sidesteps shell-escaping and input-buffer issues.
|
|
38
|
+
*/
|
|
39
|
+
function wrapAsBase64TempFile(nodeJs, exitAfter = false) {
|
|
40
|
+
const b64 = toBase64(nodeJs);
|
|
41
|
+
const suffix = exitAfter ? '; exit' : '';
|
|
42
|
+
return `_f=$(mktemp /tmp/.nut-XXXXXX) && echo '${b64}' | base64 -d > "$_f" && node "$_f"; rm -f "$_f"${suffix}`;
|
|
43
|
+
}
|
|
44
|
+
function buildMcpSelSet(selectedMcpServers) {
|
|
45
|
+
return selectedMcpServers.map((n) => `'${n.replace(/'/g, "'\\''")}'`).join(',');
|
|
46
|
+
}
|
|
47
|
+
export const buildClaudeCommand = (cfg) => {
|
|
48
|
+
const interactive = cfg.interactive ?? true;
|
|
49
|
+
const instruction = getInstructionParts(cfg);
|
|
50
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
51
|
+
const args = [];
|
|
52
|
+
if (!interactive)
|
|
53
|
+
args.push(JSON.stringify('-p'));
|
|
54
|
+
args.push(JSON.stringify(instruction));
|
|
55
|
+
if (cfg.automationEnabled)
|
|
56
|
+
args.push(JSON.stringify('--dangerously-skip-permissions'));
|
|
57
|
+
const nodeJs = `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('claude',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
58
|
+
return wrapAsBase64TempFile(nodeJs, !interactive);
|
|
59
|
+
};
|
|
60
|
+
export const buildGeminiCommand = (cfg) => {
|
|
61
|
+
const interactive = cfg.interactive ?? true;
|
|
62
|
+
const instruction = getInstructionParts(cfg);
|
|
63
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
64
|
+
const args = [];
|
|
65
|
+
if (!interactive)
|
|
66
|
+
args.push(`'--non-interactive'`);
|
|
67
|
+
if (cfg.automationEnabled)
|
|
68
|
+
args.push(`'--yolo'`);
|
|
69
|
+
args.push(JSON.stringify(instruction));
|
|
70
|
+
const nodeJs = `const fs=require('fs'),path=require('path'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const geminiPath=path.join(require('os').homedir(),'.gemini','settings.json');let settings={};try{settings=JSON.parse(fs.readFileSync(geminiPath,'utf8'))}catch(e){}settings.mcpServers=Object.fromEntries(Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)));fs.writeFileSync(geminiPath,JSON.stringify(settings,null,2));const p=spawn('gemini',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
71
|
+
return wrapAsBase64TempFile(nodeJs, !interactive);
|
|
72
|
+
};
|
|
73
|
+
export const buildCodexCommand = (cfg) => {
|
|
74
|
+
const interactive = cfg.interactive ?? true;
|
|
75
|
+
const instruction = getInstructionParts(cfg);
|
|
76
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
77
|
+
const args = [];
|
|
78
|
+
if (!interactive)
|
|
79
|
+
args.push(JSON.stringify('exec'));
|
|
80
|
+
args.push(JSON.stringify(instruction));
|
|
81
|
+
if (cfg.automationEnabled)
|
|
82
|
+
args.push(JSON.stringify('--dangerously-bypass-approvals-and-sandbox'));
|
|
83
|
+
const nodeJs = `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('codex',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
84
|
+
return wrapAsBase64TempFile(nodeJs, !interactive);
|
|
85
|
+
};
|
|
86
|
+
export const buildDroidCommand = (cfg) => {
|
|
87
|
+
const interactive = cfg.interactive ?? true;
|
|
88
|
+
const instruction = getInstructionParts(cfg);
|
|
89
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
90
|
+
const args = [];
|
|
91
|
+
if (!interactive)
|
|
92
|
+
args.push(JSON.stringify('exec'));
|
|
93
|
+
args.push(JSON.stringify(instruction));
|
|
94
|
+
const nodeJs = `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('droid',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
95
|
+
return wrapAsBase64TempFile(nodeJs, !interactive);
|
|
96
|
+
};
|
|
97
|
+
export const buildKiroCommand = (cfg) => {
|
|
98
|
+
const interactive = cfg.interactive ?? true;
|
|
99
|
+
const instruction = getInstructionParts(cfg);
|
|
100
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
101
|
+
const args = [`'chat'`];
|
|
102
|
+
if (!interactive || cfg.automationEnabled)
|
|
103
|
+
args.push(`'--no-interactive'`);
|
|
104
|
+
if (cfg.automationEnabled)
|
|
105
|
+
args.push(`'--trust-all-tools'`);
|
|
106
|
+
args.push(JSON.stringify(instruction));
|
|
107
|
+
const nodeJs = `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('kiro-cli',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
108
|
+
return wrapAsBase64TempFile(nodeJs, !interactive);
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Build a short banner printed in the terminal before the agent launches.
|
|
112
|
+
*/
|
|
113
|
+
export function buildPipelineBanner(cfg) {
|
|
114
|
+
const mode = (cfg.interactive ?? true)
|
|
115
|
+
? 'interactive'
|
|
116
|
+
: 'non-interactive (agent will exit on completion)';
|
|
117
|
+
return [
|
|
118
|
+
``,
|
|
119
|
+
`Running ${cfg.cliAgent} 🥥`,
|
|
120
|
+
``,
|
|
121
|
+
`Task: ${cfg.taskId}`,
|
|
122
|
+
`Context: ${cfg.contextType}`,
|
|
123
|
+
`Mode: ${mode}`,
|
|
124
|
+
``,
|
|
125
|
+
``,
|
|
126
|
+
].join('\\n');
|
|
127
|
+
}
|
|
128
|
+
const BUILDERS = {
|
|
129
|
+
claude: buildClaudeCommand,
|
|
130
|
+
gemini: buildGeminiCommand,
|
|
131
|
+
codex: buildCodexCommand,
|
|
132
|
+
droid: buildDroidCommand,
|
|
133
|
+
kiro: buildKiroCommand,
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Build the shell command for a given pipeline configuration.
|
|
137
|
+
* Returns a heredoc-wrapped command suitable for direct PTY input.
|
|
138
|
+
* Prefer `buildPipelineScript` + temp file for server/CLI callers
|
|
139
|
+
* to avoid PTY echo noise.
|
|
140
|
+
*/
|
|
141
|
+
export function buildPipelineCommand(cfg) {
|
|
142
|
+
const builder = BUILDERS[cfg.cliAgent];
|
|
143
|
+
if (!builder) {
|
|
144
|
+
throw new Error(`Unknown CLI agent: ${cfg.cliAgent}`);
|
|
145
|
+
}
|
|
146
|
+
return builder(cfg);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Build just the raw Node.js script for a pipeline configuration.
|
|
150
|
+
* Callers should write this to a temp file and execute `node <path>`,
|
|
151
|
+
* which avoids PTY echo noise and input-buffer limits.
|
|
152
|
+
*/
|
|
153
|
+
export function buildPipelineScript(cfg) {
|
|
154
|
+
const instruction = getInstructionParts(cfg);
|
|
155
|
+
const interactive = cfg.interactive ?? true;
|
|
156
|
+
const selList = buildMcpSelSet(cfg.selectedMcpServers);
|
|
157
|
+
const agentScripts = {
|
|
158
|
+
claude: () => {
|
|
159
|
+
const args = [];
|
|
160
|
+
if (!interactive)
|
|
161
|
+
args.push(JSON.stringify('-p'));
|
|
162
|
+
args.push(JSON.stringify(instruction));
|
|
163
|
+
if (cfg.automationEnabled)
|
|
164
|
+
args.push(JSON.stringify('--dangerously-skip-permissions'));
|
|
165
|
+
return `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('claude',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
166
|
+
},
|
|
167
|
+
gemini: () => {
|
|
168
|
+
const args = [];
|
|
169
|
+
if (!interactive)
|
|
170
|
+
args.push(`'--non-interactive'`);
|
|
171
|
+
if (cfg.automationEnabled)
|
|
172
|
+
args.push(`'--yolo'`);
|
|
173
|
+
args.push(JSON.stringify(instruction));
|
|
174
|
+
return `const fs=require('fs'),path=require('path'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const geminiPath=path.join(require('os').homedir(),'.gemini','settings.json');let settings={};try{settings=JSON.parse(fs.readFileSync(geminiPath,'utf8'))}catch(e){}settings.mcpServers=Object.fromEntries(Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)));fs.writeFileSync(geminiPath,JSON.stringify(settings,null,2));const p=spawn('gemini',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
175
|
+
},
|
|
176
|
+
codex: () => {
|
|
177
|
+
const args = [];
|
|
178
|
+
if (!interactive)
|
|
179
|
+
args.push(JSON.stringify('exec'));
|
|
180
|
+
args.push(JSON.stringify(instruction));
|
|
181
|
+
if (cfg.automationEnabled)
|
|
182
|
+
args.push(JSON.stringify('--dangerously-bypass-approvals-and-sandbox'));
|
|
183
|
+
return `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('codex',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
184
|
+
},
|
|
185
|
+
droid: () => {
|
|
186
|
+
const args = [];
|
|
187
|
+
if (!interactive)
|
|
188
|
+
args.push(JSON.stringify('exec'));
|
|
189
|
+
args.push(JSON.stringify(instruction));
|
|
190
|
+
return `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('droid',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
191
|
+
},
|
|
192
|
+
kiro: () => {
|
|
193
|
+
const args = [`'chat'`];
|
|
194
|
+
if (!interactive || cfg.automationEnabled)
|
|
195
|
+
args.push(`'--no-interactive'`);
|
|
196
|
+
if (cfg.automationEnabled)
|
|
197
|
+
args.push(`'--trust-all-tools'`);
|
|
198
|
+
args.push(JSON.stringify(instruction));
|
|
199
|
+
return `const fs=require('fs'),{spawn}=require('child_process');const s=new Set([${selList}]);const c=JSON.parse(fs.readFileSync('.nut/mcp/config.json','utf8'));const filtered=Object.entries(c.mcpServers||{}).filter(([k])=>s.has(k)).map(([k,v])=>[k,{...v,type:v.type||(v.url?'http':'stdio')}]);const o={mcpServers:Object.fromEntries(filtered)};fs.writeFileSync('.mcp.json',JSON.stringify(o,null,2));const p=spawn('kiro-cli',[${args.join(',')}],{stdio:'inherit'});p.on('exit',code=>process.exit(code));`;
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
const scriptBuilder = agentScripts[cfg.cliAgent];
|
|
203
|
+
if (!scriptBuilder) {
|
|
204
|
+
throw new Error(`Unknown CLI agent: ${cfg.cliAgent}`);
|
|
205
|
+
}
|
|
206
|
+
return scriptBuilder();
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=pipeline-builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-builders.js","sourceRoot":"","sources":["../src/pipeline-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAuBhC;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI;SACR,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;SAClB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC;SAC/B,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAA;AACpC,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAmB;IAC9C,MAAM,UAAU,GAAG,GAAG,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC,CAAA;IACjF,MAAM,UAAU,GAAG,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAA;IAE7G,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,KAAK,aAAa;QAC7C,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,CAAC,0BAA0B,IAAI,IAAI,CAAC;QACvG,CAAC,CAAC,GAAG,CAAC,WAAW,KAAK,cAAc;YACpC,CAAC,CAAC,gCAAgC,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC;YACtE,CAAC,CAAC,oBAAoB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;IAEhD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC;AAED;;GAEG;AACH,SAAS,QAAQ,CA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iBAAiB;gBAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;YAC1E,IAAI,GAAG,CAAC,iBAAiB;gBAAE,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;YAC3D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAA;YACtC,OAAO,4EAA4E,OAAO,iVAAiV,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,6DAA6D,CAAA;QACxf,CAAC;KACF,CAAA;IAED,MAAM,aAAa,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAChD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;IACvD,CAAC;IACD,OAAO,aAAa,EAAE,CAAA;AACxB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SCHEMA_REFERENCE_INSTRUCTION, PROJECT_REFERENCE_INSTRUCTION, getChangeTaskInstructions, getPrepareChangeTaskInstructions, getSkillInstructions, getAgentInstructions, } from './skill-instructions.js';
|
|
2
|
+
export { sanitizeInstruction, buildClaudeCommand, buildGeminiCommand, buildCodexCommand, buildDroidCommand, buildKiroCommand, buildPipelineCommand, buildPipelineScript, buildPipelineBanner, } from './pipeline-builders.js';
|
|
3
|
+
export type { CliAgent, PipelineContextType, PipelineConfig, BuildCommand, } from './pipeline-builders.js';
|
|
4
|
+
//# sourceMappingURL=pipelines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipelines.d.ts","sourceRoot":"","sources":["../src/pipelines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,gCAAgC,EAChC,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA;AAE/B,YAAY,EACV,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,YAAY,GACb,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SCHEMA_REFERENCE_INSTRUCTION, PROJECT_REFERENCE_INSTRUCTION, getChangeTaskInstructions, getPrepareChangeTaskInstructions, getSkillInstructions, getAgentInstructions, } from './skill-instructions.js';
|
|
2
|
+
export { sanitizeInstruction, buildClaudeCommand, buildGeminiCommand, buildCodexCommand, buildDroidCommand, buildKiroCommand, buildPipelineCommand, buildPipelineScript, buildPipelineBanner, } from './pipeline-builders.js';
|
|
3
|
+
//# sourceMappingURL=pipelines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipelines.js","sourceRoot":"","sources":["../src/pipelines.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,gCAAgC,EAChC,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const SCHEMA_REFERENCE_INSTRUCTION = "Consult the schema references in .nut/.schema (task.schema.md, project.schema.md, architecture.schema.md, skill.schema.md, knowledge.schema.md) so any updates you make follow the documented structure and include complete arrays for plan steps, dependencies, tags, labels, and comments.";
|
|
2
2
|
export declare const PROJECT_REFERENCE_INSTRUCTION = "Use .nut/context/project.md and .nut/context/architecture.md for reference.";
|
|
3
3
|
/**
|
|
4
|
-
* Get instructions for change task (
|
|
4
|
+
* Get instructions for change task (task-*) workflows
|
|
5
5
|
*/
|
|
6
|
-
export declare function getChangeTaskInstructions(
|
|
6
|
+
export declare function getChangeTaskInstructions(taskId: string, skillPaths: string[], customInstruction?: string, includeDefaultInstructions?: boolean): string[];
|
|
7
7
|
/**
|
|
8
|
-
* Get instructions for reviewing / preparing a change task (
|
|
8
|
+
* Get instructions for reviewing / preparing a change task (task-*) before implementation.
|
|
9
9
|
* Assesses readiness without starting any actual work.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getPrepareChangeTaskInstructions(taskId: string, skillPaths: string[], customInstruction?: string): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-instructions.d.ts","sourceRoot":"","sources":["../src/skill-instructions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,kSACwP,CAAC;AAClS,eAAO,MAAM,6BAA6B,gFACqC,CAAA;AAE/E;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,
|
|
1
|
+
{"version":3,"file":"skill-instructions.d.ts","sourceRoot":"","sources":["../src/skill-instructions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,kSACwP,CAAC;AAClS,eAAO,MAAM,6BAA6B,gFACqC,CAAA;AAE/E;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAAE,EACpB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,0BAA0B,GAAE,OAAc,GACzC,MAAM,EAAE,CAyFV;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAAE,EACpB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,EAAE,CAqFV;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAAE,EACpB,iBAAiB,CAAC,EAAE,MAAM,GACzB,MAAM,EAAE,CAgBV;AAGD,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,6BAAuB,CAAC"}
|