@h-rig/standard-plugin 0.0.6-alpha.154 → 0.0.6-alpha.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/bundle.d.ts +4 -3
- package/dist/src/bundle.js +45 -1823
- package/dist/src/default-lifecycle.d.ts +0 -1
- package/dist/src/index.d.ts +1 -3
- package/dist/src/index.js +51 -1843
- package/dist/src/plugin.d.ts +4 -22
- package/dist/src/plugin.js +20 -1792
- package/package.json +25 -27
- package/dist/src/drift/__fixtures__/temp-repo.d.ts +0 -9
- package/dist/src/drift/__fixtures__/temp-repo.js +0 -41
- package/dist/src/drift/detect.d.ts +0 -11
- package/dist/src/drift/detect.js +0 -299
- package/dist/src/drift/extract-refs.d.ts +0 -7
- package/dist/src/drift/extract-refs.js +0 -60
- package/dist/src/drift/git-adapter.d.ts +0 -7
- package/dist/src/drift/git-adapter.js +0 -63
- package/dist/src/drift/judge.d.ts +0 -19
- package/dist/src/drift/judge.js +0 -16
- package/dist/src/drift/metadata.d.ts +0 -13
- package/dist/src/drift/metadata.js +0 -35
- package/dist/src/drift/plugin.d.ts +0 -53
- package/dist/src/drift/plugin.js +0 -509
- package/dist/src/files-source.d.ts +0 -18
- package/dist/src/files-source.js +0 -107
- package/dist/src/github-issues-source.d.ts +0 -80
- package/dist/src/github-issues-source.js +0 -927
- package/dist/src/lifecycle-closeout.d.ts +0 -2
- package/dist/src/lifecycle-closeout.js +0 -6
- package/dist/src/run-worker-panels.d.ts +0 -15
- package/dist/src/run-worker-panels.js +0 -51
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from "node:child_process";
|
|
2
|
-
import type { RegisteredTaskSource, TaskRecord } from "@rig/contracts";
|
|
3
|
-
export type GitHubCredentialPurpose = "selected-repo" | "admin-fallback";
|
|
4
|
-
export type GitHubIssueUpdatesMode = "lifecycle" | "minimal" | "off";
|
|
5
|
-
export interface GitHubCredentialProvider {
|
|
6
|
-
resolveGitHubToken(input: {
|
|
7
|
-
owner: string;
|
|
8
|
-
repo: string;
|
|
9
|
-
workspaceId: string;
|
|
10
|
-
userId?: string;
|
|
11
|
-
purpose: GitHubCredentialPurpose;
|
|
12
|
-
}): Promise<{
|
|
13
|
-
token: string;
|
|
14
|
-
source: "signed-in-user" | "host-admin-fallback";
|
|
15
|
-
}>;
|
|
16
|
-
}
|
|
17
|
-
export type GitHubProjectLifecycleStatus = "todo" | "running" | "prOpen" | "ciFixing" | "merging" | "done" | "needsAttention";
|
|
18
|
-
export interface GitHubProjectsOptions {
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
projectId?: string;
|
|
21
|
-
statusFieldId?: string;
|
|
22
|
-
statuses?: Partial<Record<GitHubProjectLifecycleStatus, string>>;
|
|
23
|
-
}
|
|
24
|
-
export interface GitHubIssuesOptions {
|
|
25
|
-
owner: string;
|
|
26
|
-
repo: string;
|
|
27
|
-
labels?: readonly string[];
|
|
28
|
-
state?: "open" | "closed" | "all";
|
|
29
|
-
assignee?: string;
|
|
30
|
-
ghBinary?: string;
|
|
31
|
-
workspaceId?: string;
|
|
32
|
-
userId?: string;
|
|
33
|
-
credentialProvider?: GitHubCredentialProvider;
|
|
34
|
-
issueUpdates?: GitHubIssueUpdatesMode;
|
|
35
|
-
/** Timeout for every gh CLI call. Defaults to 15 seconds. */
|
|
36
|
-
timeoutMs?: number;
|
|
37
|
-
/** Maximum issue-list rows before Rig fails loudly instead of silently truncating. Defaults to 1,000. */
|
|
38
|
-
listLimit?: number;
|
|
39
|
-
/** @internal — for testing. Override the spawnSync used by the adapter. */
|
|
40
|
-
spawn?: typeof spawnSync;
|
|
41
|
-
/** Notify the host that issue-backed task state changed and snapshots should refresh. */
|
|
42
|
-
onTaskChanged?: (event: {
|
|
43
|
-
repo: string;
|
|
44
|
-
id: string;
|
|
45
|
-
status?: string;
|
|
46
|
-
reason: "github-issue-updated";
|
|
47
|
-
}) => void;
|
|
48
|
-
/** Optional GitHub Projects (v2) status-field sync mapped from Rig task status. */
|
|
49
|
-
projects?: GitHubProjectsOptions;
|
|
50
|
-
/** Opt into GitHub-native issue dependency reads; body parsing remains the fallback. */
|
|
51
|
-
useNativeDependencies?: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface GitHubIssueCreateInput {
|
|
54
|
-
title: string;
|
|
55
|
-
body?: string;
|
|
56
|
-
labels?: readonly string[];
|
|
57
|
-
}
|
|
58
|
-
export interface GitHubIssuesTaskSource extends RegisteredTaskSource {
|
|
59
|
-
addLabels(id: string, labels: readonly string[]): Promise<void>;
|
|
60
|
-
removeLabels(id: string, labels: readonly string[]): Promise<void>;
|
|
61
|
-
createIssue(input: GitHubIssueCreateInput): Promise<TaskRecord>;
|
|
62
|
-
getIssueBody(id: string): Promise<string | undefined>;
|
|
63
|
-
}
|
|
64
|
-
export declare function createEnvGitHubCredentialProvider(): GitHubCredentialProvider;
|
|
65
|
-
export declare function createStateGitHubCredentialProvider(options?: {
|
|
66
|
-
stateFile?: string;
|
|
67
|
-
stateDir?: string;
|
|
68
|
-
}): GitHubCredentialProvider;
|
|
69
|
-
export declare const RIG_STATUS_COMMENT_MARKER = "<!-- rig:status-comment -->";
|
|
70
|
-
export declare const RIG_METADATA_START = "<!-- rig:metadata:start -->";
|
|
71
|
-
export declare const RIG_METADATA_END = "<!-- rig:metadata:end -->";
|
|
72
|
-
export declare function updateRigOwnedMetadataBlock(body: string, metadata: Record<string, unknown>): string;
|
|
73
|
-
export declare function buildRigStickyStatusComment(input: {
|
|
74
|
-
status: "running" | "prOpen" | "ciFixing" | "done" | "needsAttention" | string;
|
|
75
|
-
summary: string;
|
|
76
|
-
runId?: string;
|
|
77
|
-
prUrl?: string;
|
|
78
|
-
details?: readonly string[];
|
|
79
|
-
}): string;
|
|
80
|
-
export declare function createGitHubIssuesTaskSource(opts: GitHubIssuesOptions): GitHubIssuesTaskSource;
|