@h-rig/core 0.0.6-alpha.18 → 0.0.6-alpha.181
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/agent-role-registry.d.ts +4 -0
- package/dist/src/agent-role-registry.js +27 -0
- package/dist/src/authority-paths.d.ts +15 -0
- package/dist/src/authority-paths.js +80 -0
- package/dist/src/baked-secrets.d.ts +3 -0
- package/dist/src/baked-secrets.js +63 -0
- package/dist/src/build-time-config.d.ts +12 -0
- package/dist/src/build-time-config.js +25 -0
- package/dist/src/build-time-config.macro.d.ts +1 -0
- package/dist/src/capability-loaders.d.ts +51 -0
- package/dist/src/capability-loaders.js +870 -0
- package/dist/src/capability.d.ts +79 -0
- package/dist/src/capability.js +63 -0
- package/dist/src/checkout-root.d.ts +1 -0
- package/dist/src/checkout-root.js +30 -0
- package/dist/src/config-env.d.ts +4 -0
- package/dist/src/config-env.js +23 -0
- package/dist/src/config.d.ts +3 -0
- package/dist/src/config.js +44 -0
- package/dist/src/declarative-config.d.ts +14 -0
- package/dist/src/declarative-config.js +85 -0
- package/dist/src/default-kernel.d.ts +1 -0
- package/dist/src/default-kernel.js +12 -0
- package/dist/src/define-config.d.ts +20 -0
- package/dist/src/define-config.js +28 -15
- package/dist/src/define-plugin.d.ts +13 -0
- package/dist/src/define-plugin.js +4 -43
- package/dist/src/embedded-plugins.d.ts +59 -0
- package/dist/src/embedded-plugins.js +22 -0
- package/dist/src/exec.d.ts +13 -0
- package/dist/src/exec.js +101 -0
- package/dist/src/harness-paths.d.ts +9 -0
- package/dist/src/harness-paths.js +126 -0
- package/dist/src/hook-materializer.d.ts +21 -0
- package/dist/src/hook-materializer.js +152 -0
- package/dist/src/hook-protocol.d.ts +2 -0
- package/dist/src/hook-protocol.js +432 -0
- package/dist/src/hook-runner.d.ts +48 -0
- package/dist/src/hook-runner.js +868 -0
- package/dist/src/hook-runtime.d.ts +52 -0
- package/dist/src/hook-runtime.js +432 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.js +210 -2499
- package/dist/src/json-files.d.ts +9 -0
- package/dist/src/json-files.js +124 -0
- package/dist/src/kernel-boot.d.ts +2 -0
- package/dist/src/kernel-boot.js +10 -0
- package/dist/src/kernel-entrypoint.d.ts +22 -0
- package/dist/src/kernel-entrypoint.js +660 -0
- package/dist/src/kernel-plugin-abi.d.ts +1 -0
- package/dist/src/kernel-plugin-abi.js +1 -0
- package/dist/src/kernel-resolver.d.ts +2 -0
- package/dist/src/kernel-resolver.js +6 -0
- package/dist/src/layout.d.ts +10 -0
- package/dist/src/layout.js +138 -0
- package/dist/src/load-config.d.ts +2 -0
- package/dist/src/load-config.js +535 -30
- package/dist/src/placement.d.ts +58 -0
- package/dist/src/placement.js +53 -0
- package/dist/src/plugin-host-context.d.ts +65 -0
- package/dist/src/plugin-host-context.js +1171 -0
- package/dist/src/plugin-host-registries.d.ts +31 -0
- package/dist/src/plugin-host-registries.js +79 -0
- package/dist/src/plugin-host.d.ts +77 -0
- package/dist/src/plugin-host.js +127 -63
- package/dist/src/plugin-runtime.d.ts +173 -0
- package/dist/src/project-plugins.d.ts +63 -0
- package/dist/src/project-plugins.js +905 -0
- package/dist/src/remote-config.d.ts +125 -0
- package/dist/src/remote-config.js +85 -0
- package/dist/src/root-resolver.d.ts +5 -0
- package/dist/src/root-resolver.js +68 -0
- package/dist/src/run-provisioning.d.ts +37 -0
- package/dist/src/run-provisioning.js +35 -0
- package/dist/src/runtime-context.d.ts +20 -0
- package/dist/src/runtime-context.js +257 -0
- package/dist/src/runtime-events.d.ts +44 -0
- package/dist/src/runtime-events.js +208 -0
- package/dist/src/runtime-overlay.d.ts +11 -0
- package/dist/src/runtime-overlay.js +69 -0
- package/dist/src/runtime-paths.d.ts +21 -0
- package/dist/src/runtime-paths.js +181 -0
- package/dist/src/runtime-provisioning-env.d.ts +5 -0
- package/dist/src/runtime-provisioning-env.js +217 -0
- package/dist/src/runtime-runner-context.d.ts +12 -0
- package/dist/src/runtime-runner-context.js +1 -0
- package/dist/src/safe-identifiers.d.ts +44 -0
- package/dist/src/safe-identifiers.js +96 -0
- package/dist/src/scope-rules.d.ts +4 -0
- package/dist/src/scope-rules.js +21 -0
- package/dist/src/server-paths.d.ts +22 -0
- package/dist/src/server-paths.js +219 -0
- package/dist/src/setup-version.d.ts +3 -0
- package/dist/src/setup-version.js +14 -0
- package/dist/src/task-record-reader.d.ts +3 -0
- package/dist/src/task-record-reader.js +9 -0
- package/dist/src/validator-registry.d.ts +27 -0
- package/dist/src/validator-registry.js +64 -0
- package/package.json +162 -10
- package/dist/src/engineReadModelReducer.js +0 -1780
- package/dist/src/rig-init-builder.js +0 -57
- package/dist/src/rigSelectors.js +0 -293
- package/dist/src/taskGraph.js +0 -64
- package/dist/src/taskGraphCodes.js +0 -26
- package/dist/src/taskGraphLayout.js +0 -374
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plugin-host-context.ts
|
|
3
|
+
*
|
|
4
|
+
* Wires the new declarative plugin API into runtime startup.
|
|
5
|
+
*
|
|
6
|
+
* Calling flow:
|
|
7
|
+
* buildPluginHostContext(projectRoot)
|
|
8
|
+
* → loadConfig(projectRoot) (from @rig/core)
|
|
9
|
+
* → createPluginHost(cfg.plugins) (from @rig/core)
|
|
10
|
+
* → createValidatorRegistry() + register plugin validators
|
|
11
|
+
* → buildTaskSourceRegistry(config)
|
|
12
|
+
* → createRepoRegistry(...)
|
|
13
|
+
* → createAgentRoleRegistry(...)
|
|
14
|
+
* → createTaskFieldRegistry(...)
|
|
15
|
+
*
|
|
16
|
+
* The function is intentionally non-throwing for the "no rig.config found" case
|
|
17
|
+
* so harness boot can choose between explicit legacy compatibility mode and a
|
|
18
|
+
* no-plugin mode without masking found-but-broken configs.
|
|
19
|
+
*
|
|
20
|
+
* NOTE: registries are instantiated here. The validatorRegistry is consumed
|
|
21
|
+
* by CLI/harness validation and completion verification. Task dispatch and
|
|
22
|
+
* closeout read/update the configured plugin task source directly, with
|
|
23
|
+
* materialized compatibility data kept behind plugin-owned seams.
|
|
24
|
+
*/
|
|
25
|
+
import type { AgentRoleRegistry, RepoRegistry, RigConfig } from "@rig/contracts";
|
|
26
|
+
import type { PluginHost } from "./plugin-host";
|
|
27
|
+
import { type TaskFieldRegistry, type TaskSourceRegistry } from "./plugin-host-registries";
|
|
28
|
+
import { type ValidatorRegistry } from "./validator-registry";
|
|
29
|
+
/** All registries populated from the declarative RigPlugin contributions. */
|
|
30
|
+
export interface PluginHostContext {
|
|
31
|
+
/** The loaded rig.config — available for further config-driven decisions. */
|
|
32
|
+
config: RigConfig;
|
|
33
|
+
/** Flattened read-only index of all plugin contributions. */
|
|
34
|
+
pluginHost: PluginHost;
|
|
35
|
+
/** Validators contributed by plugins, ready for dispatch. */
|
|
36
|
+
validatorRegistry: ValidatorRegistry;
|
|
37
|
+
/** Task source adapter(s) configured in rig.config.taskSource. */
|
|
38
|
+
taskSourceRegistry: TaskSourceRegistry;
|
|
39
|
+
/** Repo source registrations contributed by plugins. */
|
|
40
|
+
repoRegistry: RepoRegistry;
|
|
41
|
+
/**
|
|
42
|
+
* Agent role registrations contributed by plugins, merged with
|
|
43
|
+
* config.runtime.agentRoles model overrides.
|
|
44
|
+
*
|
|
45
|
+
* NOTE: createAgentRoleRegistry throws when a role has no model. If any
|
|
46
|
+
* plugin-contributed role lacks defaultModel and is not covered by a config
|
|
47
|
+
* override, registry construction fails. The outer try/catch in
|
|
48
|
+
* buildPluginHostContext propagates this as-is so the operator sees the error
|
|
49
|
+
* rather than silently losing roles.
|
|
50
|
+
*/
|
|
51
|
+
agentRoleRegistry: AgentRoleRegistry;
|
|
52
|
+
/** Task field schema extensions contributed by plugins. */
|
|
53
|
+
taskFieldRegistry: TaskFieldRegistry;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Load the project's rig.config, build a plugin host from its declared plugins,
|
|
57
|
+
* and instantiate all runtime registries from the plugin contributions.
|
|
58
|
+
*
|
|
59
|
+
* @returns The populated context, or `null` if no rig.config was found.
|
|
60
|
+
*
|
|
61
|
+
* @throws If a rig.config IS found but is invalid (schema error, duplicate
|
|
62
|
+
* plugin ids, missing model on an agent role, etc.). A found-but-broken
|
|
63
|
+
* config should surface immediately rather than falling back silently.
|
|
64
|
+
*/
|
|
65
|
+
export declare function buildPluginHostContext(projectRoot: string): Promise<PluginHostContext | null>;
|