@h-rig/bundle-default-lifecycle 0.0.6-alpha.133
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 +1 -0
- package/dist/src/closeoutEquivalence.d.ts +37 -0
- package/dist/src/closeoutEquivalence.js +78 -0
- package/dist/src/closeoutShadowHarness.d.ts +27 -0
- package/dist/src/closeoutShadowHarness.js +29 -0
- package/dist/src/defaultPipeline.d.ts +32 -0
- package/dist/src/defaultPipeline.js +191 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/index.js +535 -0
- package/dist/src/plugin.d.ts +18 -0
- package/dist/src/plugin.js +132 -0
- package/dist/src/stagedCloseout.d.ts +7 -0
- package/dist/src/stagedCloseout.js +325 -0
- package/dist/src/stages/auto-merge.d.ts +11 -0
- package/dist/src/stages/auto-merge.js +27 -0
- package/dist/src/stages/commit.d.ts +11 -0
- package/dist/src/stages/commit.js +27 -0
- package/dist/src/stages/isolation.d.ts +11 -0
- package/dist/src/stages/isolation.js +28 -0
- package/dist/src/stages/journal-append.d.ts +7 -0
- package/dist/src/stages/journal-append.js +25 -0
- package/dist/src/stages/merge-gate.d.ts +1 -0
- package/dist/src/stages/merge-gate.js +21 -0
- package/dist/src/stages/open-pr.d.ts +9 -0
- package/dist/src/stages/open-pr.js +41 -0
- package/dist/src/stages/push.d.ts +8 -0
- package/dist/src/stages/push.js +27 -0
- package/dist/src/stages/source-closeout.d.ts +18 -0
- package/dist/src/stages/source-closeout.js +36 -0
- package/dist/src/stages/types.d.ts +20 -0
- package/dist/src/stages/types.js +12 -0
- package/dist/src/stages/validate.d.ts +3 -0
- package/dist/src/stages/validate.js +24 -0
- package/dist/src/stages/verify.d.ts +7 -0
- package/dist/src/stages/verify.js +24 -0
- package/package.json +49 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Stage, StageKind } from "@rig/contracts";
|
|
2
|
+
export type DefaultLifecycleStageId = "validate" | "verify" | "commit" | "push" | "open-pr" | "merge-gate" | "auto-merge" | "source-closeout" | "isolation" | "journal-append";
|
|
3
|
+
export type RuntimeCloseoutFunctionName = "taskValidate" | "verifierPreflight" | "commitRunChanges" | "pushBranchSyncedWithOrigin" | "runPrAutomation" | "runStrictPrMergeGate" | "runRepoDefaultMerge" | "closeIssueAfterMergedPr" | "ensureAgentRuntime" | "journalCapability.append";
|
|
4
|
+
export type DefaultLifecycleStageDescriptor = Stage & {
|
|
5
|
+
readonly id: DefaultLifecycleStageId;
|
|
6
|
+
readonly kind: StageKind;
|
|
7
|
+
readonly description: string;
|
|
8
|
+
readonly calls: readonly RuntimeCloseoutFunctionName[];
|
|
9
|
+
readonly protected: boolean;
|
|
10
|
+
readonly priority: number;
|
|
11
|
+
};
|
|
12
|
+
export type DefaultLifecycleStageInput = {
|
|
13
|
+
readonly id: DefaultLifecycleStageId;
|
|
14
|
+
readonly kind: StageKind;
|
|
15
|
+
readonly description: string;
|
|
16
|
+
readonly calls: readonly RuntimeCloseoutFunctionName[];
|
|
17
|
+
readonly protected?: boolean;
|
|
18
|
+
readonly priority?: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function defineDefaultLifecycleStage(input: DefaultLifecycleStageInput): DefaultLifecycleStageDescriptor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/bundle-default-lifecycle/src/stages/types.ts
|
|
3
|
+
function defineDefaultLifecycleStage(input) {
|
|
4
|
+
return {
|
|
5
|
+
...input,
|
|
6
|
+
protected: input.protected ?? false,
|
|
7
|
+
priority: input.priority ?? 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
defineDefaultLifecycleStage
|
|
12
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CloseoutValidationInput, CloseoutValidationRunner } from "@rig/runtime/control-plane/native/in-process-closeout";
|
|
2
|
+
export declare const validateStage: import("./types").DefaultLifecycleStageDescriptor;
|
|
3
|
+
export declare function runValidateStage(input: CloseoutValidationInput, runner: CloseoutValidationRunner): Promise<boolean>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/bundle-default-lifecycle/src/stages/types.ts
|
|
3
|
+
function defineDefaultLifecycleStage(input) {
|
|
4
|
+
return {
|
|
5
|
+
...input,
|
|
6
|
+
protected: input.protected ?? false,
|
|
7
|
+
priority: input.priority ?? 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// packages/bundle-default-lifecycle/src/stages/validate.ts
|
|
12
|
+
var validateStage = defineDefaultLifecycleStage({
|
|
13
|
+
id: "validate",
|
|
14
|
+
kind: "transform",
|
|
15
|
+
description: "Run plugin-host validators against the isolated worktree before closeout side effects.",
|
|
16
|
+
calls: ["taskValidate"]
|
|
17
|
+
});
|
|
18
|
+
async function runValidateStage(input, runner) {
|
|
19
|
+
return await runner(input);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
validateStage,
|
|
23
|
+
runValidateStage
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type VerifyStageInput = {
|
|
2
|
+
readonly verify: () => Promise<boolean> | boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare const verifyStage: import("./types").DefaultLifecycleStageDescriptor;
|
|
5
|
+
export declare function runVerifyStage(input: VerifyStageInput): Promise<{
|
|
6
|
+
readonly allowed: boolean;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/bundle-default-lifecycle/src/stages/types.ts
|
|
3
|
+
function defineDefaultLifecycleStage(input) {
|
|
4
|
+
return {
|
|
5
|
+
...input,
|
|
6
|
+
protected: input.protected ?? false,
|
|
7
|
+
priority: input.priority ?? 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// packages/bundle-default-lifecycle/src/stages/verify.ts
|
|
12
|
+
var verifyStage = defineDefaultLifecycleStage({
|
|
13
|
+
id: "verify",
|
|
14
|
+
kind: "gate",
|
|
15
|
+
description: "Run the local verifier preflight and block closeout when it rejects the worktree.",
|
|
16
|
+
calls: ["verifierPreflight"]
|
|
17
|
+
});
|
|
18
|
+
async function runVerifyStage(input) {
|
|
19
|
+
return { allowed: await input.verify() };
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
verifyStage,
|
|
23
|
+
runVerifyStage
|
|
24
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@h-rig/bundle-default-lifecycle",
|
|
3
|
+
"version": "0.0.6-alpha.133",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Default Rig run lifecycle stage bundle wrapping the existing closeout runtime.",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
|
+
"import": "./dist/src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./closeout-equivalence": {
|
|
17
|
+
"types": "./dist/src/closeoutEquivalence.d.ts",
|
|
18
|
+
"import": "./dist/src/closeoutEquivalence.js"
|
|
19
|
+
},
|
|
20
|
+
"./closeout-shadow-harness": {
|
|
21
|
+
"types": "./dist/src/closeoutShadowHarness.d.ts",
|
|
22
|
+
"import": "./dist/src/closeoutShadowHarness.js"
|
|
23
|
+
},
|
|
24
|
+
"./default-pipeline": {
|
|
25
|
+
"types": "./dist/src/defaultPipeline.d.ts",
|
|
26
|
+
"import": "./dist/src/defaultPipeline.js"
|
|
27
|
+
},
|
|
28
|
+
"./staged-closeout": {
|
|
29
|
+
"types": "./dist/src/stagedCloseout.d.ts",
|
|
30
|
+
"import": "./dist/src/stagedCloseout.js"
|
|
31
|
+
},
|
|
32
|
+
"./plugin": {
|
|
33
|
+
"types": "./dist/src/plugin.d.ts",
|
|
34
|
+
"import": "./dist/src/plugin.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"bun": ">=1.3.11"
|
|
39
|
+
},
|
|
40
|
+
"main": "./dist/src/index.js",
|
|
41
|
+
"module": "./dist/src/index.js",
|
|
42
|
+
"types": "./dist/src/index.d.ts",
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.133",
|
|
45
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.133",
|
|
46
|
+
"@rig/kernel": "npm:@h-rig/kernel@0.0.6-alpha.133",
|
|
47
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.133"
|
|
48
|
+
}
|
|
49
|
+
}
|