@h-rig/standard-plugin 0.0.6-alpha.16 → 0.0.6-alpha.160
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 +43 -0
- package/dist/src/bundle.js +92 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +88 -654
- package/package.json +40 -5
- package/dist/src/files-source.js +0 -106
- package/dist/src/github-issues-source.js +0 -498
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type DocsDriftPluginOptions } from "@rig/docs-drift-plugin/plugin";
|
|
2
|
+
import { type StandardTaskSourcesPluginOptions } from "@rig/task-sources-plugin/plugin";
|
|
3
|
+
import type { RigPlugin } from "@rig/core/config";
|
|
4
|
+
export type StandardPluginsOptions = {
|
|
5
|
+
readonly taskSources?: StandardTaskSourcesPluginOptions | undefined;
|
|
6
|
+
readonly drift?: DocsDriftPluginOptions | undefined;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Author-facing options for the default `standard()` collection. The GitHub
|
|
10
|
+
* task-source knobs live at the top level (where rig.config authors expect
|
|
11
|
+
* them); `drift` configures the docs-drift plugin. Everything maps down into
|
|
12
|
+
* the discrete-plugin `standardPlugins()` collection below.
|
|
13
|
+
*/
|
|
14
|
+
export interface StandardOptions extends StandardTaskSourcesPluginOptions {
|
|
15
|
+
readonly drift?: DocsDriftPluginOptions | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The default export consumed by generated rig.config files:
|
|
19
|
+
*
|
|
20
|
+
* import standard from "@rig/standard-plugin";
|
|
21
|
+
* export default defineConfig({ plugins: [standard({ githubUserId, ... })] });
|
|
22
|
+
*
|
|
23
|
+
* It returns the discrete-plugin COLLECTION (not a fat aggregate plugin) — the
|
|
24
|
+
* config author drops it into `plugins`, and defineConfig flattens the bundle
|
|
25
|
+
* into the explicit plugin list. This is the single seam that keeps
|
|
26
|
+
* `@rig/standard-plugin` an inert collection rather than a behavioural unit.
|
|
27
|
+
*/
|
|
28
|
+
export default function standard(options?: StandardOptions): readonly RigPlugin[];
|
|
29
|
+
/**
|
|
30
|
+
* Adapt the floor's OPAQUE declarative-config DATA blob into the typed
|
|
31
|
+
* `standardPlugins()` options. The floor (`@rig/core` declarative-config) hands
|
|
32
|
+
* us the raw parsed config and references NO product field names; the standard
|
|
33
|
+
* collection OWNS its `[standard]`/`[taskSource]` section shapes, so this is the
|
|
34
|
+
* single place that knows the github knobs (`githubWorkspaceId`/`githubUserId`,
|
|
35
|
+
* with the workspace id defaulting from `[taskSource] owner/repo`).
|
|
36
|
+
*
|
|
37
|
+
* `githubCredentialProvider` is intentionally omitted: the task-source plugin
|
|
38
|
+
* defaults to the state-backed provider when none is supplied, so a data config
|
|
39
|
+
* never needs to express a function. This is the resolver the seed registers
|
|
40
|
+
* via `registerStandardPluginsResolver`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function standardPluginsFromConfigData(configData?: Record<string, unknown>): readonly RigPlugin[];
|
|
43
|
+
export declare function standardPlugins(options?: StandardPluginsOptions): readonly RigPlugin[];
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/standard-plugin/src/bundle.ts
|
|
3
|
+
import { createBlockerClassifierPlugin } from "@rig/blocker-classifier-plugin/plugin";
|
|
4
|
+
import { createDoctorPlugin } from "@rig/doctor-plugin/plugin";
|
|
5
|
+
import { createGuardPlugin } from "@rig/guard-plugin/plugin";
|
|
6
|
+
import { createDefaultLifecyclePlugin } from "@rig/bundle-default-lifecycle/plugin";
|
|
7
|
+
import { createDependencyGraphPlugin } from "@rig/dependency-graph-plugin/plugin";
|
|
8
|
+
import { createPlanningPlugin } from "@rig/planning-plugin/plugin";
|
|
9
|
+
import { createPromptPlugin } from "@rig/prompt-plugin/plugin";
|
|
10
|
+
import { createSupervisorPlugin } from "@rig/supervisor-plugin/plugin";
|
|
11
|
+
import { createRunWorkerPlugin } from "@rig/run-worker";
|
|
12
|
+
import { createStandardDocsDriftPlugin } from "@rig/docs-drift-plugin/plugin";
|
|
13
|
+
import { createMemoryPlugin } from "@rig/memory-plugin/plugin";
|
|
14
|
+
import { createProviderPlugin } from "@rig/provider-plugin/plugin";
|
|
15
|
+
import { createIsolationPlugin } from "@rig/isolation-plugin/plugin";
|
|
16
|
+
import { createBrowserPlugin } from "@rig/browser-plugin/plugin";
|
|
17
|
+
import { createRigHostPlugin } from "@rig/rig-host/plugin";
|
|
18
|
+
import { createRigExtensionPlugin } from "@rig/rig-extension/plugin";
|
|
19
|
+
import { createReposPlugin } from "@rig/repos-plugin/plugin";
|
|
20
|
+
import { createGitHubProviderPlugin } from "@rig/github-provider-plugin/plugin";
|
|
21
|
+
import { createInitPlugin } from "@rig/init-plugin/plugin";
|
|
22
|
+
import { createPrReviewPlugin } from "@rig/pr-review-plugin/plugin";
|
|
23
|
+
import { createTransportPlugin } from "@rig/transport-plugin/plugin";
|
|
24
|
+
import { createSchedulerPlugin } from "@rig/scheduler-plugin/plugin";
|
|
25
|
+
import { createWorkspacePlugin } from "@rig/workspace-plugin/plugin";
|
|
26
|
+
import { createNotificationsPlugin } from "@rig/notifications-plugin/plugin";
|
|
27
|
+
import { standardCliSurfacePlugin } from "@rig/cli-surface-plugin/plugin";
|
|
28
|
+
import {
|
|
29
|
+
createStandardProductEntrypointPlugin
|
|
30
|
+
} from "@rig/product-entrypoint-plugin/plugin";
|
|
31
|
+
import { createStandardTaskCliPlugin } from "@rig/task-cli-plugin/plugin";
|
|
32
|
+
import {
|
|
33
|
+
createStandardTaskSourcesPlugin
|
|
34
|
+
} from "@rig/task-sources-plugin/plugin";
|
|
35
|
+
function standard(options = {}) {
|
|
36
|
+
const { drift, ...taskSources } = options;
|
|
37
|
+
return standardPlugins({ taskSources, drift });
|
|
38
|
+
}
|
|
39
|
+
function asRecord(value) {
|
|
40
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
41
|
+
}
|
|
42
|
+
function standardPluginsFromConfigData(configData = {}) {
|
|
43
|
+
const standardSection = asRecord(configData.standard);
|
|
44
|
+
const taskSource = asRecord(configData.taskSource);
|
|
45
|
+
const defaultWorkspaceId = typeof taskSource.owner === "string" && typeof taskSource.repo === "string" ? `${taskSource.owner}/${taskSource.repo}` : undefined;
|
|
46
|
+
const githubWorkspaceId = (typeof standardSection.githubWorkspaceId === "string" ? standardSection.githubWorkspaceId : undefined) ?? defaultWorkspaceId;
|
|
47
|
+
const githubUserId = typeof standardSection.githubUserId === "string" ? standardSection.githubUserId : undefined;
|
|
48
|
+
return standardPlugins({
|
|
49
|
+
taskSources: {
|
|
50
|
+
...githubWorkspaceId ? { githubWorkspaceId } : {},
|
|
51
|
+
...githubUserId ? { githubUserId } : {}
|
|
52
|
+
},
|
|
53
|
+
...standardSection.drift ? { drift: standardSection.drift } : {}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function standardPlugins(options = {}) {
|
|
57
|
+
return [
|
|
58
|
+
createDefaultLifecyclePlugin(),
|
|
59
|
+
createDependencyGraphPlugin(),
|
|
60
|
+
createBlockerClassifierPlugin(),
|
|
61
|
+
createDoctorPlugin(),
|
|
62
|
+
createGuardPlugin(),
|
|
63
|
+
createPlanningPlugin(),
|
|
64
|
+
createPromptPlugin(),
|
|
65
|
+
createSupervisorPlugin(),
|
|
66
|
+
createMemoryPlugin(),
|
|
67
|
+
createProviderPlugin(),
|
|
68
|
+
createIsolationPlugin(),
|
|
69
|
+
createBrowserPlugin(),
|
|
70
|
+
createRigHostPlugin(),
|
|
71
|
+
createReposPlugin(),
|
|
72
|
+
createGitHubProviderPlugin(),
|
|
73
|
+
createInitPlugin(),
|
|
74
|
+
createPrReviewPlugin(),
|
|
75
|
+
createTransportPlugin(),
|
|
76
|
+
createSchedulerPlugin(),
|
|
77
|
+
createWorkspacePlugin(),
|
|
78
|
+
createNotificationsPlugin(),
|
|
79
|
+
standardCliSurfacePlugin,
|
|
80
|
+
createRigExtensionPlugin(),
|
|
81
|
+
createRunWorkerPlugin(),
|
|
82
|
+
createStandardTaskSourcesPlugin(options.taskSources),
|
|
83
|
+
createStandardTaskCliPlugin(),
|
|
84
|
+
createStandardDocsDriftPlugin(options.drift),
|
|
85
|
+
createStandardProductEntrypointPlugin()
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
standardPluginsFromConfigData,
|
|
90
|
+
standardPlugins,
|
|
91
|
+
standard as default
|
|
92
|
+
};
|