chief-clancy 0.2.0 → 0.3.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.
- package/README.md +13 -24
- package/dist/installer/file-ops/file-ops.d.ts +32 -0
- package/dist/installer/file-ops/file-ops.d.ts.map +1 -0
- package/dist/installer/file-ops/file-ops.js +58 -0
- package/dist/installer/file-ops/file-ops.js.map +1 -0
- package/dist/installer/hook-installer/hook-installer.d.ts +29 -0
- package/dist/installer/hook-installer/hook-installer.d.ts.map +1 -0
- package/dist/installer/hook-installer/hook-installer.js +96 -0
- package/dist/installer/hook-installer/hook-installer.js.map +1 -0
- package/dist/installer/install.d.ts +3 -0
- package/dist/installer/install.d.ts.map +1 -0
- package/dist/installer/install.js +227 -0
- package/dist/installer/install.js.map +1 -0
- package/dist/installer/manifest/manifest.d.ts +41 -0
- package/dist/installer/manifest/manifest.d.ts.map +1 -0
- package/dist/installer/manifest/manifest.js +97 -0
- package/dist/installer/manifest/manifest.js.map +1 -0
- package/dist/installer/prompts/prompts.d.ts +33 -0
- package/dist/installer/prompts/prompts.d.ts.map +1 -0
- package/dist/installer/prompts/prompts.js +55 -0
- package/dist/installer/prompts/prompts.js.map +1 -0
- package/dist/schemas/env.d.ts +75 -0
- package/dist/schemas/env.d.ts.map +1 -0
- package/dist/schemas/env.js +40 -0
- package/dist/schemas/env.js.map +1 -0
- package/dist/schemas/github.d.ts +27 -0
- package/dist/schemas/github.d.ts.map +1 -0
- package/dist/schemas/github.js +17 -0
- package/dist/schemas/github.js.map +1 -0
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +5 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/jira.d.ts +37 -0
- package/dist/schemas/jira.d.ts.map +1 -0
- package/dist/schemas/jira.js +37 -0
- package/dist/schemas/jira.js.map +1 -0
- package/dist/schemas/linear.d.ts +67 -0
- package/dist/schemas/linear.d.ts.map +1 -0
- package/dist/schemas/linear.js +50 -0
- package/dist/schemas/linear.js.map +1 -0
- package/dist/scripts/afk/afk.d.ts +21 -0
- package/dist/scripts/afk/afk.d.ts.map +1 -0
- package/dist/scripts/afk/afk.js +116 -0
- package/dist/scripts/afk/afk.js.map +1 -0
- package/dist/scripts/board/github/github.d.ts +56 -0
- package/dist/scripts/board/github/github.d.ts.map +1 -0
- package/dist/scripts/board/github/github.js +142 -0
- package/dist/scripts/board/github/github.js.map +1 -0
- package/dist/scripts/board/jira/jira.d.ts +90 -0
- package/dist/scripts/board/jira/jira.d.ts.map +1 -0
- package/dist/scripts/board/jira/jira.js +251 -0
- package/dist/scripts/board/jira/jira.js.map +1 -0
- package/dist/scripts/board/linear/linear.d.ts +85 -0
- package/dist/scripts/board/linear/linear.d.ts.map +1 -0
- package/dist/scripts/board/linear/linear.js +209 -0
- package/dist/scripts/board/linear/linear.js.map +1 -0
- package/dist/scripts/once/once.d.ts +12 -0
- package/dist/scripts/once/once.d.ts.map +1 -0
- package/dist/scripts/once/once.js +323 -0
- package/dist/scripts/once/once.js.map +1 -0
- package/dist/scripts/shared/branch/branch.d.ts +50 -0
- package/dist/scripts/shared/branch/branch.d.ts.map +1 -0
- package/dist/scripts/shared/branch/branch.js +61 -0
- package/dist/scripts/shared/branch/branch.js.map +1 -0
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts +17 -0
- package/dist/scripts/shared/claude-cli/claude-cli.d.ts.map +1 -0
- package/dist/scripts/shared/claude-cli/claude-cli.js +35 -0
- package/dist/scripts/shared/claude-cli/claude-cli.js.map +1 -0
- package/dist/scripts/shared/env-parser/env-parser.d.ts +30 -0
- package/dist/scripts/shared/env-parser/env-parser.d.ts.map +1 -0
- package/dist/scripts/shared/env-parser/env-parser.js +64 -0
- package/dist/scripts/shared/env-parser/env-parser.js.map +1 -0
- package/dist/scripts/shared/env-schema/env-schema.d.ts +27 -0
- package/dist/scripts/shared/env-schema/env-schema.d.ts.map +1 -0
- package/dist/scripts/shared/env-schema/env-schema.js +46 -0
- package/dist/scripts/shared/env-schema/env-schema.js.map +1 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts +52 -0
- package/dist/scripts/shared/git-ops/git-ops.d.ts.map +1 -0
- package/dist/scripts/shared/git-ops/git-ops.js +107 -0
- package/dist/scripts/shared/git-ops/git-ops.js.map +1 -0
- package/dist/scripts/shared/http/http.d.ts +52 -0
- package/dist/scripts/shared/http/http.d.ts.map +1 -0
- package/dist/scripts/shared/http/http.js +74 -0
- package/dist/scripts/shared/http/http.js.map +1 -0
- package/dist/scripts/shared/notify/notify.d.ts +46 -0
- package/dist/scripts/shared/notify/notify.d.ts.map +1 -0
- package/dist/scripts/shared/notify/notify.js +88 -0
- package/dist/scripts/shared/notify/notify.js.map +1 -0
- package/dist/scripts/shared/preflight/preflight.d.ts +40 -0
- package/dist/scripts/shared/preflight/preflight.d.ts.map +1 -0
- package/dist/scripts/shared/preflight/preflight.js +84 -0
- package/dist/scripts/shared/preflight/preflight.js.map +1 -0
- package/dist/scripts/shared/progress/progress.d.ts +25 -0
- package/dist/scripts/shared/progress/progress.d.ts.map +1 -0
- package/dist/scripts/shared/progress/progress.js +46 -0
- package/dist/scripts/shared/progress/progress.js.map +1 -0
- package/dist/scripts/shared/prompt/prompt.d.ts +38 -0
- package/dist/scripts/shared/prompt/prompt.d.ts.map +1 -0
- package/dist/scripts/shared/prompt/prompt.js +77 -0
- package/dist/scripts/shared/prompt/prompt.js.map +1 -0
- package/dist/types/board.d.ts +13 -0
- package/dist/types/board.d.ts.map +1 -0
- package/dist/types/board.js +5 -0
- package/dist/types/board.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/ansi/ansi.d.ts +55 -0
- package/dist/utils/ansi/ansi.d.ts.map +1 -0
- package/dist/utils/ansi/ansi.js +55 -0
- package/dist/utils/ansi/ansi.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/parse-json/parse-json.d.ts +20 -0
- package/dist/utils/parse-json/parse-json.d.ts.map +1 -0
- package/dist/utils/parse-json/parse-json.js +27 -0
- package/dist/utils/parse-json/parse-json.js.map +1 -0
- package/hooks/clancy-check-update.js +2 -2
- package/hooks/clancy-credential-guard.js +8 -1
- package/package.json +52 -8
- package/registry/boards.json +3 -6
- package/src/templates/CLAUDE.md +1 -1
- package/src/workflows/doctor.md +32 -23
- package/src/workflows/init.md +88 -19
- package/src/workflows/logs.md +13 -6
- package/src/workflows/map-codebase.md +17 -16
- package/src/workflows/once.md +22 -12
- package/src/workflows/review.md +40 -27
- package/src/workflows/run.md +20 -12
- package/src/workflows/scaffold.md +12 -1023
- package/src/workflows/settings.md +9 -6
- package/src/workflows/status.md +17 -8
- package/src/workflows/uninstall.md +11 -6
- package/src/workflows/update.md +13 -11
- package/bin/install.js +0 -362
- package/src/templates/scripts/clancy-afk.sh +0 -111
- package/src/templates/scripts/clancy-once-github.sh +0 -249
- package/src/templates/scripts/clancy-once-linear.sh +0 -320
- package/src/templates/scripts/clancy-once.sh +0 -322
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest-based change detection for installed files.
|
|
3
|
+
*
|
|
4
|
+
* Tracks SHA-256 hashes of installed files so that user modifications can
|
|
5
|
+
* be detected and backed up before an update overwrites them.
|
|
6
|
+
*/
|
|
7
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync, } from 'node:fs';
|
|
8
|
+
import { dirname, join } from 'node:path';
|
|
9
|
+
import { fileHash } from '../../installer/file-ops/file-ops.js';
|
|
10
|
+
/**
|
|
11
|
+
* Build a manifest of installed files with SHA-256 hashes.
|
|
12
|
+
*
|
|
13
|
+
* Recursively walks a directory and records the hash of every file.
|
|
14
|
+
*
|
|
15
|
+
* @param baseDir - Root directory to scan.
|
|
16
|
+
* @returns A record mapping relative paths to their SHA-256 hashes.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const manifest = buildManifest('/path/to/.claude/commands/clancy');
|
|
21
|
+
* // { "init.md": "abc123...", "run.md": "def456..." }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function buildManifest(baseDir) {
|
|
25
|
+
const manifest = {};
|
|
26
|
+
function walk(dir, prefix) {
|
|
27
|
+
for (const entry of readdirSync(dir, {
|
|
28
|
+
withFileTypes: true,
|
|
29
|
+
})) {
|
|
30
|
+
const full = join(dir, entry.name);
|
|
31
|
+
const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
32
|
+
if (entry.isDirectory()) {
|
|
33
|
+
walk(full, rel);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
manifest[rel] = fileHash(full);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
walk(baseDir, '');
|
|
41
|
+
return manifest;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Detect files modified by the user since last install.
|
|
45
|
+
*
|
|
46
|
+
* Compares current file hashes against the stored manifest to find changes.
|
|
47
|
+
*
|
|
48
|
+
* @param baseDir - The installed directory to check.
|
|
49
|
+
* @param manifestPath - Path to the stored manifest JSON.
|
|
50
|
+
* @returns Array of modified file records with relative and absolute paths.
|
|
51
|
+
*/
|
|
52
|
+
export function detectModifiedFiles(baseDir, manifestPath) {
|
|
53
|
+
if (!existsSync(manifestPath))
|
|
54
|
+
return [];
|
|
55
|
+
let manifest;
|
|
56
|
+
try {
|
|
57
|
+
manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
const modified = [];
|
|
63
|
+
for (const [rel, hash] of Object.entries(manifest)) {
|
|
64
|
+
const absPath = join(baseDir, rel);
|
|
65
|
+
if (!existsSync(absPath))
|
|
66
|
+
continue;
|
|
67
|
+
if (fileHash(absPath) !== hash) {
|
|
68
|
+
modified.push({ rel, absPath });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return modified;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Back up modified files to a patches directory.
|
|
75
|
+
*
|
|
76
|
+
* Copies each modified file and writes a `backup-meta.json` with metadata.
|
|
77
|
+
*
|
|
78
|
+
* @param modified - Array of modified file records.
|
|
79
|
+
* @param patchesDir - Directory to store backups.
|
|
80
|
+
* @returns The patches directory path, or `null` if no files were backed up.
|
|
81
|
+
*/
|
|
82
|
+
export function backupModifiedFiles(modified, patchesDir) {
|
|
83
|
+
if (modified.length === 0)
|
|
84
|
+
return null;
|
|
85
|
+
mkdirSync(patchesDir, { recursive: true });
|
|
86
|
+
for (const { rel, absPath } of modified) {
|
|
87
|
+
const backupPath = join(patchesDir, rel);
|
|
88
|
+
mkdirSync(dirname(backupPath), { recursive: true });
|
|
89
|
+
copyFileSync(absPath, backupPath);
|
|
90
|
+
}
|
|
91
|
+
writeFileSync(join(patchesDir, 'backup-meta.json'), JSON.stringify({
|
|
92
|
+
backed_up: modified.map((m) => m.rel),
|
|
93
|
+
date: new Date().toISOString(),
|
|
94
|
+
}, null, 2));
|
|
95
|
+
return patchesDir;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/installer/manifest/manifest.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt the user for text input.
|
|
3
|
+
*
|
|
4
|
+
* @param label - The prompt text to display.
|
|
5
|
+
* @returns The user's response string.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const name = await ask('Enter your name: ');
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare function ask(label: string): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Present a numbered list of options and return the user's choice.
|
|
15
|
+
*
|
|
16
|
+
* @param question - The question to display above the options.
|
|
17
|
+
* @param options - Array of option labels.
|
|
18
|
+
* @param defaultChoice - The default option number (1-based).
|
|
19
|
+
* @returns The user's choice as a string (e.g., `'1'` or `'2'`).
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const choice = await choose('Pick a colour:', ['Red', 'Blue'], 1);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function choose(question: string, options: string[], defaultChoice?: number): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Close the readline interface.
|
|
29
|
+
*
|
|
30
|
+
* Call this before exiting the process to release stdin.
|
|
31
|
+
*/
|
|
32
|
+
export declare function closePrompts(): void;
|
|
33
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/installer/prompts/prompts.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAElD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,MAAM,CAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,aAAa,SAAI,GAChB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive CLI prompt helpers for the installer.
|
|
3
|
+
*
|
|
4
|
+
* Manages a shared readline interface and provides `ask()` and `choose()`
|
|
5
|
+
* helpers for user interaction.
|
|
6
|
+
*/
|
|
7
|
+
import { createInterface } from 'node:readline';
|
|
8
|
+
import { blue, cyan } from '../../utils/ansi/ansi.js';
|
|
9
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
10
|
+
process.on('exit', () => rl.close());
|
|
11
|
+
/**
|
|
12
|
+
* Prompt the user for text input.
|
|
13
|
+
*
|
|
14
|
+
* @param label - The prompt text to display.
|
|
15
|
+
* @returns The user's response string.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const name = await ask('Enter your name: ');
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export function ask(label) {
|
|
23
|
+
return new Promise((resolve) => rl.question(label, resolve));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Present a numbered list of options and return the user's choice.
|
|
27
|
+
*
|
|
28
|
+
* @param question - The question to display above the options.
|
|
29
|
+
* @param options - Array of option labels.
|
|
30
|
+
* @param defaultChoice - The default option number (1-based).
|
|
31
|
+
* @returns The user's choice as a string (e.g., `'1'` or `'2'`).
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const choice = await choose('Pick a colour:', ['Red', 'Blue'], 1);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export async function choose(question, options, defaultChoice = 1) {
|
|
39
|
+
console.log('');
|
|
40
|
+
console.log(blue(question));
|
|
41
|
+
console.log('');
|
|
42
|
+
options.forEach((opt, i) => console.log(` ${i + 1}) ${opt}`));
|
|
43
|
+
console.log('');
|
|
44
|
+
const raw = await ask(cyan(`Choice [${defaultChoice}]: `));
|
|
45
|
+
return raw.trim() || String(defaultChoice);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Close the readline interface.
|
|
49
|
+
*
|
|
50
|
+
* Call this before exiting the process to release stdin.
|
|
51
|
+
*/
|
|
52
|
+
export function closePrompts() {
|
|
53
|
+
rl.close();
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/installer/prompts/prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAC7E,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAC,KAAa;IAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,QAAgB,EAChB,OAAiB,EACjB,aAAa,GAAG,CAAC;IAEjB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,aAAa,KAAK,CAAC,CAAC,CAAC;IAC3D,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,EAAE,CAAC,KAAK,EAAE,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for `.clancy/.env` configuration variables.
|
|
3
|
+
*
|
|
4
|
+
* Validates board credentials and shared Clancy settings at startup.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from 'zod/mini';
|
|
7
|
+
export declare const sharedEnvSchema: z.ZodMiniObject<{
|
|
8
|
+
CLANCY_BASE_BRANCH: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
9
|
+
CLANCY_LABEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
10
|
+
CLANCY_MODEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
11
|
+
CLANCY_NOTIFY_WEBHOOK: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
CLANCY_STATUS_IN_PROGRESS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
13
|
+
CLANCY_STATUS_DONE: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
MAX_ITERATIONS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
15
|
+
PLAYWRIGHT_ENABLED: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
16
|
+
PLAYWRIGHT_DEV_PORT: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const jiraEnvSchema: z.ZodMiniObject<{
|
|
19
|
+
CLANCY_BASE_BRANCH: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
20
|
+
CLANCY_LABEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
21
|
+
CLANCY_MODEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
CLANCY_NOTIFY_WEBHOOK: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
CLANCY_STATUS_IN_PROGRESS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
CLANCY_STATUS_DONE: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
25
|
+
MAX_ITERATIONS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
PLAYWRIGHT_ENABLED: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
PLAYWRIGHT_DEV_PORT: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
JIRA_BASE_URL: z.ZodMiniString<string>;
|
|
29
|
+
JIRA_USER: z.ZodMiniString<string>;
|
|
30
|
+
JIRA_API_TOKEN: z.ZodMiniString<string>;
|
|
31
|
+
JIRA_PROJECT_KEY: z.ZodMiniString<string>;
|
|
32
|
+
CLANCY_JQL_STATUS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
33
|
+
CLANCY_JQL_SPRINT: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export declare const githubEnvSchema: z.ZodMiniObject<{
|
|
36
|
+
CLANCY_BASE_BRANCH: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
CLANCY_LABEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
|
+
CLANCY_MODEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
39
|
+
CLANCY_NOTIFY_WEBHOOK: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
CLANCY_STATUS_IN_PROGRESS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
41
|
+
CLANCY_STATUS_DONE: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
42
|
+
MAX_ITERATIONS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
43
|
+
PLAYWRIGHT_ENABLED: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
PLAYWRIGHT_DEV_PORT: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
45
|
+
GITHUB_TOKEN: z.ZodMiniString<string>;
|
|
46
|
+
GITHUB_REPO: z.ZodMiniString<string>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export declare const linearEnvSchema: z.ZodMiniObject<{
|
|
49
|
+
CLANCY_BASE_BRANCH: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
50
|
+
CLANCY_LABEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
CLANCY_MODEL: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
52
|
+
CLANCY_NOTIFY_WEBHOOK: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
53
|
+
CLANCY_STATUS_IN_PROGRESS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
54
|
+
CLANCY_STATUS_DONE: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
55
|
+
MAX_ITERATIONS: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
PLAYWRIGHT_ENABLED: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
57
|
+
PLAYWRIGHT_DEV_PORT: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
58
|
+
LINEAR_API_KEY: z.ZodMiniString<string>;
|
|
59
|
+
LINEAR_TEAM_ID: z.ZodMiniString<string>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type SharedEnv = z.infer<typeof sharedEnvSchema>;
|
|
62
|
+
export type JiraEnv = z.infer<typeof jiraEnvSchema>;
|
|
63
|
+
export type GitHubEnv = z.infer<typeof githubEnvSchema>;
|
|
64
|
+
export type LinearEnv = z.infer<typeof linearEnvSchema>;
|
|
65
|
+
export type BoardConfig = {
|
|
66
|
+
provider: 'jira';
|
|
67
|
+
env: JiraEnv;
|
|
68
|
+
} | {
|
|
69
|
+
provider: 'github';
|
|
70
|
+
env: GitHubEnv;
|
|
71
|
+
} | {
|
|
72
|
+
provider: 'linear';
|
|
73
|
+
env: LinearEnv;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/schemas/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAU9B,eAAO,MAAM,eAAe;;;;;;;;;;iBAU1B,CAAC;AAIH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;iBAOxB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;iBAG1B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;iBAG1B,CAAC;AAIH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,GAClC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,GACtC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for `.clancy/.env` configuration variables.
|
|
3
|
+
*
|
|
4
|
+
* Validates board credentials and shared Clancy settings at startup.
|
|
5
|
+
*/
|
|
6
|
+
import * as z from 'zod/mini';
|
|
7
|
+
/** A non-empty string — rejects `""` from the .env file. */
|
|
8
|
+
const nonEmpty = z.string().check(z.minLength(1));
|
|
9
|
+
/** A valid HTTP(S) URL. */
|
|
10
|
+
const httpUrl = z.string().check(z.regex(/^https?:\/\/.+/));
|
|
11
|
+
// ─── Shared optional env vars ────────────────────────────────────────────────
|
|
12
|
+
export const sharedEnvSchema = z.object({
|
|
13
|
+
CLANCY_BASE_BRANCH: z.optional(z.string()),
|
|
14
|
+
CLANCY_LABEL: z.optional(z.string()),
|
|
15
|
+
CLANCY_MODEL: z.optional(z.string()),
|
|
16
|
+
CLANCY_NOTIFY_WEBHOOK: z.optional(z.string()),
|
|
17
|
+
CLANCY_STATUS_IN_PROGRESS: z.optional(z.string()),
|
|
18
|
+
CLANCY_STATUS_DONE: z.optional(z.string()),
|
|
19
|
+
MAX_ITERATIONS: z.optional(z.string()),
|
|
20
|
+
PLAYWRIGHT_ENABLED: z.optional(z.string()),
|
|
21
|
+
PLAYWRIGHT_DEV_PORT: z.optional(z.string()),
|
|
22
|
+
});
|
|
23
|
+
// ─── Board-specific schemas ──────────────────────────────────────────────────
|
|
24
|
+
export const jiraEnvSchema = z.extend(sharedEnvSchema, {
|
|
25
|
+
JIRA_BASE_URL: httpUrl,
|
|
26
|
+
JIRA_USER: nonEmpty,
|
|
27
|
+
JIRA_API_TOKEN: nonEmpty,
|
|
28
|
+
JIRA_PROJECT_KEY: nonEmpty,
|
|
29
|
+
CLANCY_JQL_STATUS: z.optional(z.string()),
|
|
30
|
+
CLANCY_JQL_SPRINT: z.optional(z.string()),
|
|
31
|
+
});
|
|
32
|
+
export const githubEnvSchema = z.extend(sharedEnvSchema, {
|
|
33
|
+
GITHUB_TOKEN: nonEmpty,
|
|
34
|
+
GITHUB_REPO: nonEmpty,
|
|
35
|
+
});
|
|
36
|
+
export const linearEnvSchema = z.extend(sharedEnvSchema, {
|
|
37
|
+
LINEAR_API_KEY: nonEmpty,
|
|
38
|
+
LINEAR_TEAM_ID: nonEmpty,
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/schemas/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,4DAA4D;AAC5D,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD,2BAA2B;AAC3B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE5D,gFAAgF;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,qBAAqB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7C,yBAAyB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjD,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,kBAAkB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC1C,mBAAmB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE;IACrD,aAAa,EAAE,OAAO;IACtB,SAAS,EAAE,QAAQ;IACnB,cAAc,EAAE,QAAQ;IACxB,gBAAgB,EAAE,QAAQ;IAC1B,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE;IACvD,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,QAAQ;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE;IACvD,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for GitHub Issues REST API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** A single GitHub issue from the list endpoint. */
|
|
6
|
+
export declare const githubIssueSchema: z.ZodMiniObject<{
|
|
7
|
+
number: z.ZodMiniNumber<number>;
|
|
8
|
+
title: z.ZodMiniString<string>;
|
|
9
|
+
body: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
10
|
+
pull_request: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
11
|
+
milestone: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
12
|
+
title: z.ZodMiniString<string>;
|
|
13
|
+
}, z.core.$strip>>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Response from `GET /repos/{owner}/{repo}/issues` (array of issues). */
|
|
16
|
+
export declare const githubIssuesResponseSchema: z.ZodMiniArray<z.ZodMiniObject<{
|
|
17
|
+
number: z.ZodMiniNumber<number>;
|
|
18
|
+
title: z.ZodMiniString<string>;
|
|
19
|
+
body: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
20
|
+
pull_request: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
21
|
+
milestone: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
22
|
+
title: z.ZodMiniString<string>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
export type GitHubIssue = z.infer<typeof githubIssueSchema>;
|
|
26
|
+
export type GitHubIssuesResponse = z.infer<typeof githubIssuesResponseSchema>;
|
|
27
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/schemas/github.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,oDAAoD;AACpD,eAAO,MAAM,iBAAiB;;;;;;;;iBAY5B,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B;;;;;;;;kBAA6B,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for GitHub Issues REST API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** A single GitHub issue from the list endpoint. */
|
|
6
|
+
export const githubIssueSchema = z.object({
|
|
7
|
+
number: z.number(),
|
|
8
|
+
title: z.string(),
|
|
9
|
+
body: z.optional(z.nullable(z.string())),
|
|
10
|
+
pull_request: z.optional(z.unknown()),
|
|
11
|
+
milestone: z.optional(z.nullable(z.object({
|
|
12
|
+
title: z.string(),
|
|
13
|
+
}))),
|
|
14
|
+
});
|
|
15
|
+
/** Response from `GET /repos/{owner}/{repo}/issues` (array of issues). */
|
|
16
|
+
export const githubIssuesResponseSchema = z.array(githubIssueSchema);
|
|
17
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/schemas/github.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,oDAAoD;AACpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,QAAQ,CACnB,CAAC,CAAC,QAAQ,CACR,CAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KAClB,CAAC,CACH,CACF;CACF,CAAC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { githubEnvSchema, jiraEnvSchema, linearEnvSchema, sharedEnvSchema, } from './env.js';
|
|
2
|
+
export type { BoardConfig, GitHubEnv, JiraEnv, LinearEnv, SharedEnv, } from './env.js';
|
|
3
|
+
export { githubIssueSchema, githubIssuesResponseSchema } from './github.js';
|
|
4
|
+
export type { GitHubIssue, GitHubIssuesResponse } from './github.js';
|
|
5
|
+
export { jiraSearchResponseSchema, jiraTransitionsResponseSchema, } from './jira.js';
|
|
6
|
+
export type { JiraSearchResponse, JiraTransitionsResponse } from './jira.js';
|
|
7
|
+
export { linearIssueUpdateResponseSchema, linearIssuesResponseSchema, linearViewerResponseSchema, linearWorkflowStatesResponseSchema, } from './linear.js';
|
|
8
|
+
export type { LinearIssueNode, LinearIssueUpdateResponse, LinearIssuesResponse, LinearViewerResponse, LinearWorkflowStatesResponse, } from './linear.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,SAAS,EACT,SAAS,GACV,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC5E,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAE7E,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { githubEnvSchema, jiraEnvSchema, linearEnvSchema, sharedEnvSchema, } from './env.js';
|
|
2
|
+
export { githubIssueSchema, githubIssuesResponseSchema } from './github.js';
|
|
3
|
+
export { jiraSearchResponseSchema, jiraTransitionsResponseSchema, } from './jira.js';
|
|
4
|
+
export { linearIssueUpdateResponseSchema, linearIssuesResponseSchema, linearViewerResponseSchema, linearWorkflowStatesResponseSchema, } from './linear.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AASlB,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG5E,OAAO,EACL,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for Jira Cloud REST API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** Response from `POST /rest/api/3/search/jql`. */
|
|
6
|
+
export declare const jiraSearchResponseSchema: z.ZodMiniObject<{
|
|
7
|
+
total: z.ZodMiniNumber<number>;
|
|
8
|
+
issues: z.ZodMiniArray<z.ZodMiniObject<{
|
|
9
|
+
key: z.ZodMiniString<string>;
|
|
10
|
+
fields: z.ZodMiniObject<{
|
|
11
|
+
summary: z.ZodMiniString<string>;
|
|
12
|
+
description: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
13
|
+
issuelinks: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
14
|
+
type: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
15
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
inwardIssue: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
18
|
+
key: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
21
|
+
parent: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
22
|
+
key: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
customfield_10014: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
/** Response from `GET /rest/api/3/issue/{key}/transitions`. */
|
|
29
|
+
export declare const jiraTransitionsResponseSchema: z.ZodMiniObject<{
|
|
30
|
+
transitions: z.ZodMiniArray<z.ZodMiniObject<{
|
|
31
|
+
id: z.ZodMiniString<string>;
|
|
32
|
+
name: z.ZodMiniString<string>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type JiraSearchResponse = z.infer<typeof jiraSearchResponseSchema>;
|
|
36
|
+
export type JiraTransitionsResponse = z.infer<typeof jiraTransitionsResponseSchema>;
|
|
37
|
+
//# sourceMappingURL=jira.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira.d.ts","sourceRoot":"","sources":["../../src/schemas/jira.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAuB7B,mDAAmD;AACnD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;iBAGnC,CAAC;AAQH,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B;;;;;iBAExC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for Jira Cloud REST API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** A single issue link in a Jira issue. */
|
|
6
|
+
const jiraIssueLinkSchema = z.object({
|
|
7
|
+
type: z.optional(z.object({ name: z.optional(z.string()) })),
|
|
8
|
+
inwardIssue: z.optional(z.object({ key: z.optional(z.string()) })),
|
|
9
|
+
});
|
|
10
|
+
/** The fields returned for a single Jira issue. */
|
|
11
|
+
const jiraIssueFieldsSchema = z.object({
|
|
12
|
+
summary: z.string(),
|
|
13
|
+
description: z.optional(z.unknown()),
|
|
14
|
+
issuelinks: z.optional(z.array(jiraIssueLinkSchema)),
|
|
15
|
+
parent: z.optional(z.object({ key: z.optional(z.string()) })),
|
|
16
|
+
customfield_10014: z.optional(z.nullable(z.string())),
|
|
17
|
+
});
|
|
18
|
+
/** A single Jira issue from the search response. */
|
|
19
|
+
const jiraIssueSchema = z.object({
|
|
20
|
+
key: z.string(),
|
|
21
|
+
fields: jiraIssueFieldsSchema,
|
|
22
|
+
});
|
|
23
|
+
/** Response from `POST /rest/api/3/search/jql`. */
|
|
24
|
+
export const jiraSearchResponseSchema = z.object({
|
|
25
|
+
total: z.number(),
|
|
26
|
+
issues: z.array(jiraIssueSchema),
|
|
27
|
+
});
|
|
28
|
+
/** A single transition from `GET /rest/api/3/issue/{key}/transitions`. */
|
|
29
|
+
const jiraTransitionSchema = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
name: z.string(),
|
|
32
|
+
});
|
|
33
|
+
/** Response from `GET /rest/api/3/issue/{key}/transitions`. */
|
|
34
|
+
export const jiraTransitionsResponseSchema = z.object({
|
|
35
|
+
transitions: z.array(jiraTransitionSchema),
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=jira.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jira.js","sourceRoot":"","sources":["../../src/schemas/jira.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,2CAA2C;AAC3C,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5D,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;CACnE,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7D,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CACtD,CAAC,CAAC;AAEH,oDAAoD;AACpD,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,qBAAqB;CAC9B,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACjC,CAAC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;CAC3C,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for Linear GraphQL API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** A single Linear issue node from the assignedIssues query. */
|
|
6
|
+
declare const linearIssueNodeSchema: z.ZodMiniObject<{
|
|
7
|
+
id: z.ZodMiniString<string>;
|
|
8
|
+
identifier: z.ZodMiniString<string>;
|
|
9
|
+
title: z.ZodMiniString<string>;
|
|
10
|
+
description: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
11
|
+
parent: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
12
|
+
identifier: z.ZodMiniString<string>;
|
|
13
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
14
|
+
}, z.core.$strip>>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** Response from the `viewer.assignedIssues` GraphQL query. */
|
|
17
|
+
export declare const linearIssuesResponseSchema: z.ZodMiniObject<{
|
|
18
|
+
data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
19
|
+
viewer: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
20
|
+
assignedIssues: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
21
|
+
nodes: z.ZodMiniArray<z.ZodMiniObject<{
|
|
22
|
+
id: z.ZodMiniString<string>;
|
|
23
|
+
identifier: z.ZodMiniString<string>;
|
|
24
|
+
title: z.ZodMiniString<string>;
|
|
25
|
+
description: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
26
|
+
parent: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniObject<{
|
|
27
|
+
identifier: z.ZodMiniString<string>;
|
|
28
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
29
|
+
}, z.core.$strip>>>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/** Response from the `viewer` ping query. */
|
|
36
|
+
export declare const linearViewerResponseSchema: z.ZodMiniObject<{
|
|
37
|
+
data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
38
|
+
viewer: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
39
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
/** Response from the `workflowStates` query. */
|
|
44
|
+
export declare const linearWorkflowStatesResponseSchema: z.ZodMiniObject<{
|
|
45
|
+
data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
46
|
+
workflowStates: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
47
|
+
nodes: z.ZodMiniArray<z.ZodMiniObject<{
|
|
48
|
+
id: z.ZodMiniString<string>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/** Response from the `issueUpdate` mutation. */
|
|
54
|
+
export declare const linearIssueUpdateResponseSchema: z.ZodMiniObject<{
|
|
55
|
+
data: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
56
|
+
issueUpdate: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
57
|
+
success: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type LinearIssueNode = z.infer<typeof linearIssueNodeSchema>;
|
|
62
|
+
export type LinearIssuesResponse = z.infer<typeof linearIssuesResponseSchema>;
|
|
63
|
+
export type LinearViewerResponse = z.infer<typeof linearViewerResponseSchema>;
|
|
64
|
+
export type LinearWorkflowStatesResponse = z.infer<typeof linearWorkflowStatesResponseSchema>;
|
|
65
|
+
export type LinearIssueUpdateResponse = z.infer<typeof linearIssueUpdateResponseSchema>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=linear.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/schemas/linear.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,gEAAgE;AAChE,QAAA,MAAM,qBAAqB;;;;;;;;;iBAazB,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAcrC,CAAC;AAEH,6CAA6C;AAC7C,eAAO,MAAM,0BAA0B;;;;;;iBAUrC,CAAC;AAEH,gDAAgD;AAChD,eAAO,MAAM,kCAAkC;;;;;;;;iBAU7C,CAAC;AAEH,gDAAgD;AAChD,eAAO,MAAM,+BAA+B;;;;;;iBAU1C,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for Linear GraphQL API responses.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod/mini';
|
|
5
|
+
/** A single Linear issue node from the assignedIssues query. */
|
|
6
|
+
const linearIssueNodeSchema = z.object({
|
|
7
|
+
id: z.string(),
|
|
8
|
+
identifier: z.string(),
|
|
9
|
+
title: z.string(),
|
|
10
|
+
description: z.optional(z.nullable(z.string())),
|
|
11
|
+
parent: z.optional(z.nullable(z.object({
|
|
12
|
+
identifier: z.string(),
|
|
13
|
+
title: z.optional(z.string()),
|
|
14
|
+
}))),
|
|
15
|
+
});
|
|
16
|
+
/** Response from the `viewer.assignedIssues` GraphQL query. */
|
|
17
|
+
export const linearIssuesResponseSchema = z.object({
|
|
18
|
+
data: z.optional(z.object({
|
|
19
|
+
viewer: z.optional(z.object({
|
|
20
|
+
assignedIssues: z.optional(z.object({
|
|
21
|
+
nodes: z.array(linearIssueNodeSchema),
|
|
22
|
+
})),
|
|
23
|
+
})),
|
|
24
|
+
})),
|
|
25
|
+
});
|
|
26
|
+
/** Response from the `viewer` ping query. */
|
|
27
|
+
export const linearViewerResponseSchema = z.object({
|
|
28
|
+
data: z.optional(z.object({
|
|
29
|
+
viewer: z.optional(z.object({
|
|
30
|
+
id: z.optional(z.string()),
|
|
31
|
+
})),
|
|
32
|
+
})),
|
|
33
|
+
});
|
|
34
|
+
/** Response from the `workflowStates` query. */
|
|
35
|
+
export const linearWorkflowStatesResponseSchema = z.object({
|
|
36
|
+
data: z.optional(z.object({
|
|
37
|
+
workflowStates: z.optional(z.object({
|
|
38
|
+
nodes: z.array(z.object({ id: z.string() })),
|
|
39
|
+
})),
|
|
40
|
+
})),
|
|
41
|
+
});
|
|
42
|
+
/** Response from the `issueUpdate` mutation. */
|
|
43
|
+
export const linearIssueUpdateResponseSchema = z.object({
|
|
44
|
+
data: z.optional(z.object({
|
|
45
|
+
issueUpdate: z.optional(z.object({
|
|
46
|
+
success: z.optional(z.boolean()),
|
|
47
|
+
})),
|
|
48
|
+
})),
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=linear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear.js","sourceRoot":"","sources":["../../src/schemas/linear.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAE7B,gEAAgE;AAChE,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC,CAAC,QAAQ,CACR,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;KAC9B,CAAC,CACH,CACF;CACF,CAAC,CAAC;AAEH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,QAAQ,CACd,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC,CAAC,MAAM,CAAC;YACP,cAAc,EAAE,CAAC,CAAC,QAAQ,CACxB,CAAC,CAAC,MAAM,CAAC;gBACP,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC;aACtC,CAAC,CACH;SACF,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAEH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,CAAC,CAAC,QAAQ,CACd,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,QAAQ,CAChB,CAAC,CAAC,MAAM,CAAC;YACP,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC3B,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAEH,gDAAgD;AAChD,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD,IAAI,EAAE,CAAC,CAAC,QAAQ,CACd,CAAC,CAAC,MAAM,CAAC;QACP,cAAc,EAAE,CAAC,CAAC,QAAQ,CACxB,CAAC,CAAC,MAAM,CAAC;YACP,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SAC7C,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAEH,gDAAgD;AAChD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,CAAC,CAAC,QAAQ,CACd,CAAC,CAAC,MAAM,CAAC;QACP,WAAW,EAAE,CAAC,CAAC,QAAQ,CACrB,CAAC,CAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;SACjC,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether the script output contains a stop condition.
|
|
3
|
+
*
|
|
4
|
+
* @param output - The captured stdout from a `clancy-once` run.
|
|
5
|
+
* @returns An object with `stop` flag and optional `reason`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function checkStopCondition(output: string): {
|
|
8
|
+
stop: boolean;
|
|
9
|
+
reason?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Run the AFK loop.
|
|
13
|
+
*
|
|
14
|
+
* Executes the `clancy-once` script repeatedly up to `maxIterations` times,
|
|
15
|
+
* checking for stop conditions after each run.
|
|
16
|
+
*
|
|
17
|
+
* @param scriptDir - The directory containing `clancy-once.js`.
|
|
18
|
+
* @param maxIterations - Maximum number of iterations (default: 5).
|
|
19
|
+
*/
|
|
20
|
+
export declare function runAfkLoop(scriptDir: string, maxIterations?: number): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=afk.d.ts.map
|