@codyswann/lisa 8.3.0 → 8.4.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/cdk/package-lisa/package.lisa.json +1 -1
- package/dist/cli/confined-project-read.d.ts +2 -1
- package/dist/cli/confined-project-read.d.ts.map +1 -1
- package/dist/cli/confined-project-read.js +22 -5
- package/dist/cli/confined-project-read.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -1
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +5 -3
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/github-read-issue-cmd.d.ts +62 -0
- package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
- package/dist/cli/github-read-issue-cmd.js +121 -0
- package/dist/cli/github-read-issue-cmd.js.map +1 -0
- package/dist/cli/github-reader-relationships.d.ts +41 -0
- package/dist/cli/github-reader-relationships.d.ts.map +1 -0
- package/dist/cli/github-reader-relationships.js +218 -0
- package/dist/cli/github-reader-relationships.js.map +1 -0
- package/dist/cli/github-reader-target.d.ts +24 -0
- package/dist/cli/github-reader-target.d.ts.map +1 -0
- package/dist/cli/github-reader-target.js +95 -0
- package/dist/cli/github-reader-target.js.map +1 -0
- package/dist/cli/github-reader-wire.d.ts +72 -0
- package/dist/cli/github-reader-wire.d.ts.map +1 -0
- package/dist/cli/github-reader-wire.js +125 -0
- package/dist/cli/github-reader-wire.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/controls/commands/declaration-check.d.ts.map +1 -1
- package/dist/controls/commands/declaration-check.js +7 -4
- package/dist/controls/commands/declaration-check.js.map +1 -1
- package/dist/controls/commands/seed.d.ts +1 -9
- package/dist/controls/commands/seed.d.ts.map +1 -1
- package/dist/controls/commands/seed.js +72 -65
- package/dist/controls/commands/seed.js.map +1 -1
- package/dist/controls/configure-road.d.ts +2 -0
- package/dist/controls/configure-road.d.ts.map +1 -1
- package/dist/controls/configure-road.js +18 -14
- package/dist/controls/configure-road.js.map +1 -1
- package/dist/controls/register-evidence-rule.d.ts +2 -0
- package/dist/controls/register-evidence-rule.d.ts.map +1 -1
- package/dist/controls/register-evidence-rule.js +8 -7
- package/dist/controls/register-evidence-rule.js.map +1 -1
- package/dist/controls/register-rules.d.ts +2 -0
- package/dist/controls/register-rules.d.ts.map +1 -1
- package/dist/controls/register-rules.js.map +1 -1
- package/dist/controls/register-types.d.ts +2 -4
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/register.d.ts +2 -0
- package/dist/controls/register.d.ts.map +1 -1
- package/dist/controls/register.js +3 -1
- package/dist/controls/register.js.map +1 -1
- package/dist/controls/shipped-parts.d.ts +82 -0
- package/dist/controls/shipped-parts.d.ts.map +1 -0
- package/dist/controls/shipped-parts.js +216 -0
- package/dist/controls/shipped-parts.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.json +6 -0
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +41 -14
- package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
- package/dist/strategies/package-lisa-host-pins.js +29 -30
- package/dist/strategies/package-lisa-host-pins.js.map +1 -1
- package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
- package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
- package/dist/strategies/package-lisa-range-intersection.js +73 -0
- package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
- package/harper-fabric/package-lisa/package.lisa.json +3 -2
- package/package.json +4 -4
- package/phaser/package-lisa/package.lisa.json +3 -2
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-configure/SKILL.md +8 -7
- package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
- package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
- package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
- package/scripts/check-derived-artifacts.mjs +1 -0
- package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
- package/scripts/two-channel-couplings.json +5 -3
- package/typescript/copy-overwrite/.prettierignore +1 -0
- package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
- package/typescript/package-lisa/package.lisa.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"force": {
|
|
3
3
|
"scripts": {
|
|
4
|
-
"build": "node scripts/lib/worktree-dependencies.mjs &&
|
|
4
|
+
"build": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-typecheck.mjs",
|
|
5
5
|
"cdk": "cdk",
|
|
6
6
|
"lint:fix": "node scripts/lib/worktree-dependencies.mjs && oxlint --fix && eslint . --fix",
|
|
7
7
|
"lint:lisa": "node scripts/lib/worktree-dependencies.mjs && oxlint && eslint . --quiet",
|
|
@@ -2,7 +2,8 @@ import { type JsonObject } from "../sync/json-path.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Read committed-plus-local Lisa config without following unsafe files.
|
|
4
4
|
* @param projectRoot - Project root
|
|
5
|
+
* @param strict - Refuse a present configuration with a non-object root.
|
|
5
6
|
* @returns Merged config with the local overlay winning per key
|
|
6
7
|
*/
|
|
7
|
-
export declare function readConfinedMergedConfig(projectRoot: string): Promise<JsonObject>;
|
|
8
|
+
export declare function readConfinedMergedConfig(projectRoot: string, strict?: boolean): Promise<JsonObject>;
|
|
8
9
|
//# sourceMappingURL=confined-project-read.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confined-project-read.d.ts","sourceRoot":"","sources":["../../src/cli/confined-project-read.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"confined-project-read.d.ts","sourceRoot":"","sources":["../../src/cli/confined-project-read.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AA6CrE;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,MAAM,UAAQ,GACb,OAAO,CAAC,UAAU,CAAC,CASrB"}
|
|
@@ -17,21 +17,38 @@ async function readConfinedProjectText(projectRoot, relativePath) {
|
|
|
17
17
|
* Read and parse one confined JSON file.
|
|
18
18
|
* @param projectRoot - Project root
|
|
19
19
|
* @param relativePath - Strict project-relative JSON path
|
|
20
|
+
* @param strict - Require an object without exposing malformed source text.
|
|
20
21
|
* @returns Parsed JSON, or undefined when absent
|
|
21
22
|
*/
|
|
22
|
-
async function readConfinedProjectJson(projectRoot, relativePath) {
|
|
23
|
+
async function readConfinedProjectJson(projectRoot, relativePath, strict) {
|
|
23
24
|
const text = await readConfinedProjectText(projectRoot, relativePath);
|
|
24
|
-
|
|
25
|
+
if (text === undefined)
|
|
26
|
+
return undefined;
|
|
27
|
+
try {
|
|
28
|
+
const value = JSON.parse(text);
|
|
29
|
+
if (strict && !isJsonObject(value)) {
|
|
30
|
+
throw new TypeError(`${relativePath} must contain a JSON object`);
|
|
31
|
+
}
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (!strict || !(error instanceof SyntaxError))
|
|
36
|
+
throw error;
|
|
37
|
+
throw new Error(`Could not parse ${relativePath} as JSON`, {
|
|
38
|
+
cause: error,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
25
41
|
}
|
|
26
42
|
/**
|
|
27
43
|
* Read committed-plus-local Lisa config without following unsafe files.
|
|
28
44
|
* @param projectRoot - Project root
|
|
45
|
+
* @param strict - Refuse a present configuration with a non-object root.
|
|
29
46
|
* @returns Merged config with the local overlay winning per key
|
|
30
47
|
*/
|
|
31
|
-
export async function readConfinedMergedConfig(projectRoot) {
|
|
48
|
+
export async function readConfinedMergedConfig(projectRoot, strict = false) {
|
|
32
49
|
const [committed, local] = await Promise.all([
|
|
33
|
-
readConfinedProjectJson(projectRoot, ".lisa.config.json"),
|
|
34
|
-
readConfinedProjectJson(projectRoot, ".lisa.config.local.json"),
|
|
50
|
+
readConfinedProjectJson(projectRoot, ".lisa.config.json", strict),
|
|
51
|
+
readConfinedProjectJson(projectRoot, ".lisa.config.local.json", strict),
|
|
35
52
|
]);
|
|
36
53
|
return deepMerge(isJsonObject(committed) ? committed : {}, isJsonObject(local) ? local : {});
|
|
37
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confined-project-read.js","sourceRoot":"","sources":["../../src/cli/confined-project-read.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAmB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;GAKG;AACH,KAAK,UAAU,uBAAuB,CACpC,WAAmB,EACnB,YAAoB;IAEpB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,MAAM,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACnD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"confined-project-read.js","sourceRoot":"","sources":["../../src/cli/confined-project-read.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAmB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;GAKG;AACH,KAAK,UAAU,uBAAuB,CACpC,WAAmB,EACnB,YAAoB;IAEpB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,MAAM,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,uBAAuB,CACpC,WAAmB,EACnB,YAAoB,EACpB,MAAe;IAEf,MAAM,IAAI,GAAG,MAAM,uBAAuB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IACtE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,IAAI,CAAC;QACH,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,SAAS,CAAC,GAAG,YAAY,6BAA6B,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;YAAE,MAAM,KAAK,CAAC;QAC5D,MAAM,IAAI,KAAK,CAAC,mBAAmB,YAAY,UAAU,EAAE;YACzD,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,WAAmB,EACnB,MAAM,GAAG,KAAK;IAEd,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3C,uBAAuB,CAAC,WAAW,EAAE,mBAAmB,EAAE,MAAM,CAAC;QACjE,uBAAuB,CAAC,WAAW,EAAE,yBAAyB,EAAE,MAAM,CAAC;KACxE,CAAC,CAAC;IACH,OAAO,SAAS,CACd,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EACxC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CACnB,CAAC;AAClB,CAAC"}
|
package/dist/cli/gh-cli.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* @param cwd - Working directory
|
|
9
9
|
* @param timeoutMs - Child-process timeout
|
|
10
10
|
* @param signal - Probe cancellation signal
|
|
11
|
+
* @param maxBuffer - Optional output bound for paginated reads.
|
|
11
12
|
* @returns Trimmed stdout
|
|
12
13
|
*/
|
|
13
|
-
export declare function runGh(args: readonly string[], cwd: string, timeoutMs: number, signal: AbortSignal): Promise<string>;
|
|
14
|
+
export declare function runGh(args: readonly string[], cwd: string, timeoutMs: number, signal: AbortSignal, maxBuffer?: number): Promise<string>;
|
|
14
15
|
//# sourceMappingURL=gh-cli.d.ts.map
|
package/dist/cli/gh-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gh-cli.d.ts","sourceRoot":"","sources":["../../src/cli/gh-cli.ts"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"gh-cli.d.ts","sourceRoot":"","sources":["../../src/cli/gh-cli.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CACnB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|
package/dist/cli/gh-cli.js
CHANGED
|
@@ -14,9 +14,10 @@ import { spawnTarget } from "../utils/resolve-executable.js";
|
|
|
14
14
|
* @param cwd - Working directory
|
|
15
15
|
* @param timeoutMs - Child-process timeout
|
|
16
16
|
* @param signal - Probe cancellation signal
|
|
17
|
+
* @param maxBuffer - Optional output bound for paginated reads.
|
|
17
18
|
* @returns Trimmed stdout
|
|
18
19
|
*/
|
|
19
|
-
export function runGh(args, cwd, timeoutMs, signal) {
|
|
20
|
+
export function runGh(args, cwd, timeoutMs, signal, maxBuffer) {
|
|
20
21
|
return new Promise((resolve, reject) => {
|
|
21
22
|
// Throws ExecutableNotFoundError (code ENOENT) when gh is not installed;
|
|
22
23
|
// inside the executor that rejects, exactly as execFile's ENOENT did.
|
|
@@ -25,11 +26,12 @@ export function runGh(args, cwd, timeoutMs, signal) {
|
|
|
25
26
|
cwd,
|
|
26
27
|
signal,
|
|
27
28
|
timeout: timeoutMs,
|
|
29
|
+
...(maxBuffer === undefined ? {} : { maxBuffer }),
|
|
28
30
|
encoding: "utf8",
|
|
29
31
|
windowsVerbatimArguments: gh.windowsVerbatimArguments,
|
|
30
|
-
}, (error, stdout) => {
|
|
32
|
+
}, (error, stdout, stderr) => {
|
|
31
33
|
if (error !== null) {
|
|
32
|
-
reject(error);
|
|
34
|
+
reject(Object.assign(error, { stderr }));
|
|
33
35
|
return;
|
|
34
36
|
}
|
|
35
37
|
resolve(stdout.trim());
|
package/dist/cli/gh-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gh-cli.js","sourceRoot":"","sources":["../../src/cli/gh-cli.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"gh-cli.js","sourceRoot":"","sources":["../../src/cli/gh-cli.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,KAAK,CACnB,IAAuB,EACvB,GAAW,EACX,SAAiB,EACjB,MAAmB,EACnB,SAAkB;IAElB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,yEAAyE;QACzE,sEAAsE;QACtE,MAAM,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnC,QAAQ,CACN,EAAE,CAAC,IAAI,EACP,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EACZ;YACE,GAAG;YACH,MAAM;YACN,OAAO,EAAE,SAAS;YAClB,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;YACjD,QAAQ,EAAE,MAAM;YAChB,wBAAwB,EAAE,EAAE,CAAC,wBAAwB;SACtD,EACD,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YACxB,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;gBACzC,OAAO;YACT,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** Read repository context and separately resolve configured GitHub Projects metadata. */
|
|
2
|
+
import type { Command } from "commander";
|
|
3
|
+
import { type GitHubRead } from "./github-reader-wire.js";
|
|
4
|
+
/**
|
|
5
|
+
* Read the issue bundle without requesting any unconfigured services.
|
|
6
|
+
* @param root - Current Lisa checkout.
|
|
7
|
+
* @param input - Issue reference accepted by the GitHub reader.
|
|
8
|
+
* @param read - Native read function, injectable for request-selection tests.
|
|
9
|
+
* @returns Repository-native context and separately qualified Project metadata.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readGitHubIssue(root: string, input: string, read?: GitHubRead): Promise<{
|
|
12
|
+
graph: {
|
|
13
|
+
parent: import("../sync/json-path.js").JsonObject | null;
|
|
14
|
+
children: import("../sync/json-path.js").JsonObject[];
|
|
15
|
+
warning?: never;
|
|
16
|
+
} | {
|
|
17
|
+
warning: string;
|
|
18
|
+
parent?: never;
|
|
19
|
+
children?: never;
|
|
20
|
+
};
|
|
21
|
+
timeline: {
|
|
22
|
+
events: import("../sync/json-path.js").JsonObject[];
|
|
23
|
+
warning?: never;
|
|
24
|
+
} | {
|
|
25
|
+
events: never[];
|
|
26
|
+
warning: string;
|
|
27
|
+
};
|
|
28
|
+
pullRequests: ({
|
|
29
|
+
repo: string;
|
|
30
|
+
metadata: import("../sync/json-path.js").JsonObject;
|
|
31
|
+
reviews: import("../sync/json-path.js").JsonObject[];
|
|
32
|
+
threads: {
|
|
33
|
+
comments: import("../sync/json-path.js").JsonObject[];
|
|
34
|
+
}[];
|
|
35
|
+
} | {
|
|
36
|
+
repo: string;
|
|
37
|
+
number: number;
|
|
38
|
+
warning: string;
|
|
39
|
+
})[];
|
|
40
|
+
ref: string;
|
|
41
|
+
issue: import("../sync/json-path.js").JsonObject;
|
|
42
|
+
comments: import("../sync/json-path.js").JsonObject[];
|
|
43
|
+
project: {
|
|
44
|
+
readonly status: "unconfigured";
|
|
45
|
+
readonly metadata?: never;
|
|
46
|
+
warning?: never;
|
|
47
|
+
} | {
|
|
48
|
+
readonly status: "verified";
|
|
49
|
+
readonly metadata: import("../sync/json-path.js").JsonObject;
|
|
50
|
+
warning?: never;
|
|
51
|
+
} | {
|
|
52
|
+
readonly status: "unverified";
|
|
53
|
+
readonly warning: string;
|
|
54
|
+
readonly metadata?: never;
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Register the exact read-only command used by generated GitHub skills.
|
|
59
|
+
* @param program - The Lisa CLI program.
|
|
60
|
+
*/
|
|
61
|
+
export declare function addGitHubReadIssueCommand(program: Command): void;
|
|
62
|
+
//# sourceMappingURL=github-read-issue-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-read-issue-cmd.d.ts","sourceRoot":"","sources":["../../src/cli/github-read-issue-cmd.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAkGjC;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,UAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkB1C;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAchE"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { readGitHubIssueRelationships } from "./github-reader-relationships.js";
|
|
2
|
+
import { resolveGitHubReaderTarget, } from "./github-reader-target.js";
|
|
3
|
+
import { githubReadError, graphql, nativeGitHubRead, responseObject, restPages, } from "./github-reader-wire.js";
|
|
4
|
+
const ISSUE_FIELDS = "number,title,body,state,stateReason,author,assignees,labels,milestone,createdAt,updatedAt,closedAt,url,reactionGroups";
|
|
5
|
+
/**
|
|
6
|
+
* Query only the configured Project and keep service failures separate.
|
|
7
|
+
* @param read - Native GitHub reader.
|
|
8
|
+
* @param project - Validated effective Project settings.
|
|
9
|
+
* @returns Metadata with an explicit evidence status.
|
|
10
|
+
*/
|
|
11
|
+
async function readProject(read, project) {
|
|
12
|
+
if (project === undefined)
|
|
13
|
+
return { status: "unconfigured" };
|
|
14
|
+
const query = `query($login:String!,$number:Int!) {
|
|
15
|
+
${project.kind}(login:$login) { login projectV2(number:$number) { id title number url } }
|
|
16
|
+
}`;
|
|
17
|
+
try {
|
|
18
|
+
const [page] = await graphql(read, query, {
|
|
19
|
+
login: project.login,
|
|
20
|
+
number: project.number,
|
|
21
|
+
});
|
|
22
|
+
const owner = responseObject(page?.[project.kind], "the configured Project owner");
|
|
23
|
+
const metadata = responseObject(owner.projectV2, "the configured Project metadata");
|
|
24
|
+
if (typeof owner.login !== "string" ||
|
|
25
|
+
owner.login.toLowerCase() !== project.login.toLowerCase() ||
|
|
26
|
+
metadata.number !== project.number ||
|
|
27
|
+
typeof metadata.id !== "string" ||
|
|
28
|
+
!metadata.id ||
|
|
29
|
+
typeof metadata.title !== "string" ||
|
|
30
|
+
typeof metadata.url !== "string") {
|
|
31
|
+
throw new Error("GitHub did not verify the configured Project identity");
|
|
32
|
+
}
|
|
33
|
+
return { status: "verified", metadata };
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const message = githubReadError(error);
|
|
37
|
+
if (project.required)
|
|
38
|
+
throw new Error(`Required GitHub Project could not be read. ${message}`, {
|
|
39
|
+
cause: error,
|
|
40
|
+
});
|
|
41
|
+
return { status: "unverified", warning: message };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read comments through all native pages and prove the number fetched.
|
|
46
|
+
* @param read - Native GitHub reader.
|
|
47
|
+
* @param route - Selected issue REST route.
|
|
48
|
+
* @returns Complete native comments in provider order.
|
|
49
|
+
*/
|
|
50
|
+
async function issueComments(read, route) {
|
|
51
|
+
const comments = await restPages(read, `${route}/comments`);
|
|
52
|
+
const total = await read(["api", route, "--jq", ".comments"]);
|
|
53
|
+
if (total !== comments.length) {
|
|
54
|
+
throw new Error(`GitHub issue comments are incomplete. Read ${comments.length} of ${String(total)}`);
|
|
55
|
+
}
|
|
56
|
+
return comments;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Read core metadata through the same native issue selection on every path.
|
|
60
|
+
* @param read - Native GitHub reader.
|
|
61
|
+
* @param ref - Selected repository and issue number.
|
|
62
|
+
* @returns Native issue metadata.
|
|
63
|
+
*/
|
|
64
|
+
async function readIssue(read, ref) {
|
|
65
|
+
const repo = `${ref.owner}/${ref.repo}`;
|
|
66
|
+
const view = await read([
|
|
67
|
+
"issue",
|
|
68
|
+
"view",
|
|
69
|
+
String(ref.number),
|
|
70
|
+
"--repo",
|
|
71
|
+
repo,
|
|
72
|
+
"--json",
|
|
73
|
+
ISSUE_FIELDS,
|
|
74
|
+
]);
|
|
75
|
+
const issue = responseObject(view, "issue metadata");
|
|
76
|
+
if (issue.number !== ref.number ||
|
|
77
|
+
typeof issue.body !== "string" ||
|
|
78
|
+
typeof issue.title !== "string")
|
|
79
|
+
throw new Error("GitHub did not verify the selected issue identity");
|
|
80
|
+
return issue;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Read the issue bundle without requesting any unconfigured services.
|
|
84
|
+
* @param root - Current Lisa checkout.
|
|
85
|
+
* @param input - Issue reference accepted by the GitHub reader.
|
|
86
|
+
* @param read - Native read function, injectable for request-selection tests.
|
|
87
|
+
* @returns Repository-native context and separately qualified Project metadata.
|
|
88
|
+
*/
|
|
89
|
+
export async function readGitHubIssue(root, input, read = nativeGitHubRead(root)) {
|
|
90
|
+
const target = await resolveGitHubReaderTarget(root, input);
|
|
91
|
+
const { owner, repo, number } = target.issue;
|
|
92
|
+
await read(["auth", "status"]);
|
|
93
|
+
const issue = await readIssue(read, target.issue);
|
|
94
|
+
const project = await readProject(read, target.project);
|
|
95
|
+
const [comments, relationships] = await Promise.all([
|
|
96
|
+
issueComments(read, `repos/${owner}/${repo}/issues/${number}`),
|
|
97
|
+
readGitHubIssueRelationships(read, target.issue),
|
|
98
|
+
]);
|
|
99
|
+
return {
|
|
100
|
+
ref: `${owner}/${repo}#${number}`,
|
|
101
|
+
issue,
|
|
102
|
+
comments,
|
|
103
|
+
project,
|
|
104
|
+
...relationships,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Register the exact read-only command used by generated GitHub skills.
|
|
109
|
+
* @param program - The Lisa CLI program.
|
|
110
|
+
*/
|
|
111
|
+
export function addGitHubReadIssueCommand(program) {
|
|
112
|
+
program
|
|
113
|
+
.command("github-read-issue")
|
|
114
|
+
.description("Read GitHub issue context and any configured Project metadata")
|
|
115
|
+
.argument("<issue>", "Issue number, owner/repo#number, or a GitHub issue URL")
|
|
116
|
+
.action(async (issue) => {
|
|
117
|
+
const result = await readGitHubIssue(process.cwd(), issue);
|
|
118
|
+
console.log(JSON.stringify(result));
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=github-read-issue-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-read-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BAAyB,CAAC,OAAgB;IACxD,OAAO;SACJ,OAAO,CAAC,mBAAmB,CAAC;SAC5B,WAAW,CACV,+DAA+D,CAChE;SACA,QAAQ,CACP,SAAS,EACT,wDAAwD,CACzD;SACA,MAAM,CAAC,KAAK,EAAE,KAAa,EAAE,EAAE;QAC9B,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Repository-native issue relationships, label history, and linked PR reviews. */
|
|
2
|
+
import type { JsonObject } from "../sync/json-path.js";
|
|
3
|
+
import type { GitHubIssueRef } from "./github-reader-target.js";
|
|
4
|
+
import { type GitHubRead } from "./github-reader-wire.js";
|
|
5
|
+
/**
|
|
6
|
+
* Gather native issue relationships, history and linked PR reviews.
|
|
7
|
+
* @param read - Native GitHub reader.
|
|
8
|
+
* @param ref - Repository and issue identity.
|
|
9
|
+
* @returns Repository context independent of Projects service metadata.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readGitHubIssueRelationships(read: GitHubRead, ref: GitHubIssueRef): Promise<{
|
|
12
|
+
graph: {
|
|
13
|
+
parent: JsonObject | null;
|
|
14
|
+
children: JsonObject[];
|
|
15
|
+
warning?: never;
|
|
16
|
+
} | {
|
|
17
|
+
warning: string;
|
|
18
|
+
parent?: never;
|
|
19
|
+
children?: never;
|
|
20
|
+
};
|
|
21
|
+
timeline: {
|
|
22
|
+
events: JsonObject[];
|
|
23
|
+
warning?: never;
|
|
24
|
+
} | {
|
|
25
|
+
events: never[];
|
|
26
|
+
warning: string;
|
|
27
|
+
};
|
|
28
|
+
pullRequests: ({
|
|
29
|
+
repo: string;
|
|
30
|
+
metadata: JsonObject;
|
|
31
|
+
reviews: JsonObject[];
|
|
32
|
+
threads: {
|
|
33
|
+
comments: JsonObject[];
|
|
34
|
+
}[];
|
|
35
|
+
} | {
|
|
36
|
+
repo: string;
|
|
37
|
+
number: number;
|
|
38
|
+
warning: string;
|
|
39
|
+
})[];
|
|
40
|
+
}>;
|
|
41
|
+
//# sourceMappingURL=github-reader-relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-reader-relationships.d.ts","sourceRoot":"","sources":["../../src/cli/github-reader-relationships.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EASL,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAiPjC;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BpB"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { connectionNodes, githubReadError, graphql, itemVariables, repositoryItem, responseObject, responseObjects, restPages, } from "./github-reader-wire.js";
|
|
2
|
+
const REPO_FIELDS = "number title state url repository { nameWithOwner }";
|
|
3
|
+
const PULL_FIELDS = `number title state merged mergedAt url repository { nameWithOwner }`;
|
|
4
|
+
const PAGE = "pageInfo { hasNextPage endCursor }";
|
|
5
|
+
const ISSUE_QUERY = "query($owner:String!,$repo:String!,$number:Int!,$endCursor:String)";
|
|
6
|
+
const ISSUE_ROOT = "repository(owner:$owner,name:$repo) { issue(number:$number)";
|
|
7
|
+
const COMMENTS = "id url body createdAt author { login }";
|
|
8
|
+
const REVIEW_THREAD_COMMENTS = "review thread comments";
|
|
9
|
+
const PULL_METADATA = "number,title,state,mergedAt,url,headRefOid,baseRefName,baseRefOid,reviewDecision,reviewRequests,statusCheckRollup";
|
|
10
|
+
const SUB_ISSUES = `${ISSUE_QUERY} { ${ISSUE_ROOT} {
|
|
11
|
+
parent { ${REPO_FIELDS} }
|
|
12
|
+
subIssues(first:100,after:$endCursor) {
|
|
13
|
+
nodes { ${REPO_FIELDS} labels(first:50) { nodes { name } } assignees(first:5) { nodes { login } } }
|
|
14
|
+
${PAGE}
|
|
15
|
+
}
|
|
16
|
+
} } }`;
|
|
17
|
+
const CLOSING_PULLS = `${ISSUE_QUERY} { ${ISSUE_ROOT} {
|
|
18
|
+
closedByPullRequestsReferences(first:100,after:$endCursor) {
|
|
19
|
+
nodes { ${PULL_FIELDS} } ${PAGE}
|
|
20
|
+
}
|
|
21
|
+
} } }`;
|
|
22
|
+
const TIMELINE = `${ISSUE_QUERY} { ${ISSUE_ROOT} {
|
|
23
|
+
timelineItems(first:100,after:$endCursor,itemTypes:[CROSS_REFERENCED_EVENT,LABELED_EVENT,UNLABELED_EVENT]) {
|
|
24
|
+
nodes {
|
|
25
|
+
__typename
|
|
26
|
+
...on CrossReferencedEvent {
|
|
27
|
+
createdAt actor { login } source { ...on PullRequest { ${PULL_FIELDS} } }
|
|
28
|
+
}
|
|
29
|
+
...on LabeledEvent { createdAt actor { login } label { name } }
|
|
30
|
+
...on UnlabeledEvent { createdAt actor { login } label { name } }
|
|
31
|
+
}
|
|
32
|
+
${PAGE}
|
|
33
|
+
}
|
|
34
|
+
} } }`;
|
|
35
|
+
const THREADS = `${ISSUE_QUERY} { repository(owner:$owner,name:$repo) { pullRequest(number:$number) {
|
|
36
|
+
reviewThreads(first:100,after:$endCursor) {
|
|
37
|
+
nodes { id isResolved isOutdated path line originalLine comments(first:100) { totalCount nodes { ${COMMENTS} } } }
|
|
38
|
+
${PAGE}
|
|
39
|
+
}
|
|
40
|
+
} } }`;
|
|
41
|
+
const THREAD_COMMENTS = `query($id:ID!,$endCursor:String) { node(id:$id) {
|
|
42
|
+
...on PullRequestReviewThread { comments(first:100,after:$endCursor) { nodes { ${COMMENTS} } ${PAGE} } }
|
|
43
|
+
} }`;
|
|
44
|
+
/**
|
|
45
|
+
* Project one named connection from each paginated issue response.
|
|
46
|
+
* @param read - Native GitHub reader.
|
|
47
|
+
* @param ref - Repository and issue identity.
|
|
48
|
+
* @param query - Issue connection query.
|
|
49
|
+
* @param key - Connection field name in that query.
|
|
50
|
+
* @returns Validated native connection nodes.
|
|
51
|
+
*/
|
|
52
|
+
async function issueConnection(read, ref, query, key) {
|
|
53
|
+
const pages = await graphql(read, query, itemVariables(ref), true);
|
|
54
|
+
return connectionNodes(pages.map(page => responseObject(repositoryItem(page, "issue")[key], key)), key);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Preserve native graph coverage and the older GitHub Enterprise fallback.
|
|
58
|
+
* @param read - Native GitHub reader.
|
|
59
|
+
* @param ref - Repository and issue identity.
|
|
60
|
+
* @returns Native parent and children or the exact unsupported-schema warning.
|
|
61
|
+
*/
|
|
62
|
+
async function issueGraph(read, ref) {
|
|
63
|
+
try {
|
|
64
|
+
const pages = await graphql(read, SUB_ISSUES, itemVariables(ref), true);
|
|
65
|
+
const issues = pages.map(page => repositoryItem(page, "issue"));
|
|
66
|
+
const parent = issues[0]?.parent;
|
|
67
|
+
const children = connectionNodes(issues.map(issue => responseObject(issue.subIssues, "sub-issues")), "sub-issues");
|
|
68
|
+
return {
|
|
69
|
+
parent: parent === null ? null : responseObject(parent, "the parent issue"),
|
|
70
|
+
children,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
const message = githubReadError(error);
|
|
75
|
+
if (!/(?:Field ['"](?:parent|subIssues)['"] doesn.t exist|Cannot query field ['"](?:parent|subIssues)['"])/iu.test(message))
|
|
76
|
+
throw error;
|
|
77
|
+
return { warning: message };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Keep native label history and cross-references, with its existing advisory failure behavior.
|
|
82
|
+
* @param read - Native GitHub reader.
|
|
83
|
+
* @param ref - Repository and issue identity.
|
|
84
|
+
* @returns Timeline events or the exact read warning.
|
|
85
|
+
*/
|
|
86
|
+
async function issueTimeline(read, ref) {
|
|
87
|
+
try {
|
|
88
|
+
return {
|
|
89
|
+
events: await issueConnection(read, ref, TIMELINE, "timelineItems"),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return { events: [], warning: githubReadError(error) };
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Match the native repository/number from the PR references and deduplicate them.
|
|
98
|
+
* @param references - GraphQL PR link records.
|
|
99
|
+
* @returns Unique native PR identities in the first seen order.
|
|
100
|
+
*/
|
|
101
|
+
function linkedPulls(references) {
|
|
102
|
+
const pulls = references.map(({ repository, number }) => {
|
|
103
|
+
const name = responseObject(repository, "the linked PR repository").nameWithOwner;
|
|
104
|
+
const pair = typeof name === "string"
|
|
105
|
+
? /^([a-z\d_-]+)\/((?!\.{1,2}$)[a-z\d_.-]+)$/iu.exec(name)
|
|
106
|
+
: null;
|
|
107
|
+
if (!pair?.[1] ||
|
|
108
|
+
!pair[2] ||
|
|
109
|
+
typeof number !== "number" ||
|
|
110
|
+
!Number.isSafeInteger(number) ||
|
|
111
|
+
number <= 0) {
|
|
112
|
+
throw new Error("GitHub did not return the linked PR identity");
|
|
113
|
+
}
|
|
114
|
+
const ref = { owner: pair[1], repo: pair[2], number };
|
|
115
|
+
return [`${ref.owner}/${ref.repo}#${number}`.toLowerCase(), ref];
|
|
116
|
+
});
|
|
117
|
+
return [...new Map(pulls).values()];
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Read every comment when a native review thread spans multiple pages.
|
|
121
|
+
* @param read - Native GitHub reader.
|
|
122
|
+
* @param thread - Review thread returned with its first comment page.
|
|
123
|
+
* @returns The native thread with flattened comments.
|
|
124
|
+
*/
|
|
125
|
+
async function threadComments(read, thread) {
|
|
126
|
+
const first = responseObject(thread.comments, REVIEW_THREAD_COMMENTS);
|
|
127
|
+
const nodes = responseObjects(first.nodes, REVIEW_THREAD_COMMENTS);
|
|
128
|
+
if (first.totalCount === nodes.length)
|
|
129
|
+
return { ...thread, comments: nodes };
|
|
130
|
+
if (typeof first.totalCount !== "number" ||
|
|
131
|
+
first.totalCount < nodes.length ||
|
|
132
|
+
typeof thread.id !== "string")
|
|
133
|
+
throw new Error("GitHub did not return the review thread pagination identity");
|
|
134
|
+
const pages = await graphql(read, THREAD_COMMENTS, { id: thread.id }, true);
|
|
135
|
+
const connections = pages.map(page => responseObject(responseObject(page.node, "a review thread").comments, REVIEW_THREAD_COMMENTS));
|
|
136
|
+
const comments = connectionNodes(connections, REVIEW_THREAD_COMMENTS);
|
|
137
|
+
if (comments.length !== first.totalCount)
|
|
138
|
+
throw new Error("GitHub review thread comments changed during pagination");
|
|
139
|
+
return { ...thread, comments };
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Read linked PR revisions, review records and complete review threads.
|
|
143
|
+
* @param read - Native GitHub reader.
|
|
144
|
+
* @param ref - The linked PR repository and number.
|
|
145
|
+
* @returns The linked PR context.
|
|
146
|
+
*/
|
|
147
|
+
async function pullContext(read, ref) {
|
|
148
|
+
const repo = `${ref.owner}/${ref.repo}`;
|
|
149
|
+
const [view, reviews, pages] = await Promise.all([
|
|
150
|
+
read([
|
|
151
|
+
"pr",
|
|
152
|
+
"view",
|
|
153
|
+
String(ref.number),
|
|
154
|
+
"--repo",
|
|
155
|
+
repo,
|
|
156
|
+
"--json",
|
|
157
|
+
PULL_METADATA,
|
|
158
|
+
]),
|
|
159
|
+
restPages(read, `repos/${repo}/pulls/${ref.number}/reviews`),
|
|
160
|
+
graphql(read, THREADS, itemVariables(ref), true),
|
|
161
|
+
]);
|
|
162
|
+
const threads = connectionNodes(pages.map(page => responseObject(repositoryItem(page, "pullRequest").reviewThreads, "review threads")), "review threads");
|
|
163
|
+
return {
|
|
164
|
+
repo,
|
|
165
|
+
metadata: responseObject(view, "linked PR metadata"),
|
|
166
|
+
reviews,
|
|
167
|
+
threads: await Promise.all(threads.map(async (thread) => await threadComments(read, thread))),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Keep inaccessible additional links visible without masking a primary-repository failure.
|
|
172
|
+
* @param read - Native GitHub reader.
|
|
173
|
+
* @param primary - Primary issue repository.
|
|
174
|
+
* @param pull - Linked pull request identity.
|
|
175
|
+
* @returns Link context or the native diagnostic for an inaccessible cross-repo link.
|
|
176
|
+
*/
|
|
177
|
+
async function linkedPullContext(read, primary, pull) {
|
|
178
|
+
try {
|
|
179
|
+
return await pullContext(read, pull);
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
const repo = `${pull.owner}/${pull.repo}`;
|
|
183
|
+
if (repo.toLowerCase() === `${primary.owner}/${primary.repo}`.toLowerCase())
|
|
184
|
+
throw error;
|
|
185
|
+
return { repo, number: pull.number, warning: githubReadError(error) };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Gather native issue relationships, history and linked PR reviews.
|
|
190
|
+
* @param read - Native GitHub reader.
|
|
191
|
+
* @param ref - Repository and issue identity.
|
|
192
|
+
* @returns Repository context independent of Projects service metadata.
|
|
193
|
+
*/
|
|
194
|
+
export async function readGitHubIssueRelationships(read, ref) {
|
|
195
|
+
const [graph, closing, timeline] = await Promise.all([
|
|
196
|
+
issueGraph(read, ref),
|
|
197
|
+
issueConnection(read, ref, CLOSING_PULLS, "closedByPullRequestsReferences"),
|
|
198
|
+
issueTimeline(read, ref),
|
|
199
|
+
]);
|
|
200
|
+
const crossReferenced = timeline.events
|
|
201
|
+
.filter(event => event.__typename === "CrossReferencedEvent")
|
|
202
|
+
.flatMap(event => {
|
|
203
|
+
const source = event.source;
|
|
204
|
+
return source === null ||
|
|
205
|
+
source === undefined ||
|
|
206
|
+
typeof source !== "object" ||
|
|
207
|
+
!("number" in source)
|
|
208
|
+
? []
|
|
209
|
+
: [responseObject(source, "a cross-referenced PR")];
|
|
210
|
+
});
|
|
211
|
+
const pulls = linkedPulls([...closing, ...crossReferenced]);
|
|
212
|
+
const pullRequests = await pulls.reduce(async (pending, pull) => [
|
|
213
|
+
...(await pending),
|
|
214
|
+
await linkedPullContext(read, ref, pull),
|
|
215
|
+
], Promise.resolve([]));
|
|
216
|
+
return { graph, timeline, pullRequests };
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=github-reader-relationships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-reader-relationships.js","sourceRoot":"","sources":["../../src/cli/github-reader-relationships.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,eAAe,EACf,OAAO,EACP,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,GAEV,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAC1E,MAAM,WAAW,GAAG,qEAAqE,CAAC;AAC1F,MAAM,IAAI,GAAG,oCAAoC,CAAC;AAClD,MAAM,WAAW,GACf,oEAAoE,CAAC;AACvE,MAAM,UAAU,GACd,6DAA6D,CAAC;AAChE,MAAM,QAAQ,GAAG,wCAAwC,CAAC;AAC1D,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AACxD,MAAM,aAAa,GACjB,mHAAmH,CAAC;AAEtH,MAAM,UAAU,GAAG,GAAG,WAAW,MAAM,UAAU;aACpC,WAAW;;cAEV,WAAW;MACnB,IAAI;;MAEJ,CAAC;AACP,MAAM,aAAa,GAAG,GAAG,WAAW,MAAM,UAAU;;cAEtC,WAAW,MAAM,IAAI;;MAE7B,CAAC;AACP,MAAM,QAAQ,GAAG,GAAG,WAAW,MAAM,UAAU;;;;;iEAKkB,WAAW;;;;;MAKtE,IAAI;;MAEJ,CAAC;AACP,MAAM,OAAO,GAAG,GAAG,WAAW;;uGAEyE,QAAQ;MACzG,IAAI;;MAEJ,CAAC;AACP,MAAM,eAAe,GAAG;mFAC2D,QAAQ,MAA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,CAAC,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IACL,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC;IAC5D,MAAM,YAAY,GAAG,MAAM,KAAK,CAAC,MAAM,CAGrC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;QACvB,GAAG,CAAC,MAAM,OAAO,CAAC;QAClB,MAAM,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC;KACzC,EACD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CACpB,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The native repository identity for a read. */
|
|
2
|
+
export interface GitHubIssueRef {
|
|
3
|
+
readonly owner: string;
|
|
4
|
+
readonly repo: string;
|
|
5
|
+
readonly number: number;
|
|
6
|
+
}
|
|
7
|
+
/** A Project reference that has passed local configuration validation. */
|
|
8
|
+
export interface GitHubReaderProject {
|
|
9
|
+
readonly kind: "organization" | "user";
|
|
10
|
+
readonly login: string;
|
|
11
|
+
readonly number: number;
|
|
12
|
+
readonly required: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolve and validate the effective configuration before any provider calls.
|
|
16
|
+
* @param root - Current Lisa checkout.
|
|
17
|
+
* @param input - Issue argument from the caller.
|
|
18
|
+
* @returns Independent repository and optional Project identities.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveGitHubReaderTarget(root: string, input: string): Promise<{
|
|
21
|
+
issue: GitHubIssueRef;
|
|
22
|
+
project: GitHubReaderProject | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=github-reader-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-reader-target.d.ts","sourceRoot":"","sources":["../../src/cli/github-reader-target.ts"],"names":[],"mappings":"AAWA,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AA2FD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;GAI1E"}
|