Skip to content

Commit 4081743

Browse files
committed
fix(architecture): split cyclic runtime contracts
1 parent aeeacd9 commit 4081743

22 files changed

Lines changed: 134 additions & 126 deletions

‎src/agents/tools/skill-workshop-tool-collection.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import { sha256Hex } from "../../infra/crypto-digest.js";
66
import {
77
MAX_RECONCILED_SKILLS,
88
MAX_RECONCILED_SKILL_BYTES,
9-
reconcileSkillCollection,
10-
restoreLatestSkillCollectionBackup,
119
type SkillCollectionPlanEntry,
1210
type SkillCollectionReconcileContext,
1311
type SkillCollectionReconcileResult,
12+
} from "../../skills/workshop/collection-contracts.js";
13+
import {
14+
reconcileSkillCollection,
15+
restoreLatestSkillCollectionBackup,
1416
} from "../../skills/workshop/collection-reconcile.js";
1517
import { readSkillProposalTargetTreeSha256 } from "../../skills/workshop/proposal-bundle.js";
1618
import { stringEnum } from "../schema/typebox.js";

‎src/agents/tools/skill-workshop-tool.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { hasRunWorkspaceSkillUsage } from "../../skills/runtime/run-usage.js";
1111
import {
1212
MAX_RECONCILED_SKILL_BYTES,
1313
type SkillCollectionReconcileContext,
14-
} from "../../skills/workshop/collection-reconcile.js";
14+
} from "../../skills/workshop/collection-contracts.js";
1515
import { resolveSkillWorkshopConfig } from "../../skills/workshop/config.js";
1616
import { stripProposalFrontmatterForSkill } from "../../skills/workshop/frontmatter.js";
1717
import {

‎src/config/plugin-auto-enable.shared.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ import { isOfficialExternalPluginId } from "../plugins/official-external-plugin-
3131
import { loadPluginMetadataSnapshot } from "../plugins/plugin-metadata-snapshot.js";
3232
import { resolveOwningPluginIdsForModelRef } from "../plugins/providers.js";
3333
import { resolvePluginSetupAutoEnableReasons } from "../plugins/setup-registry.js";
34-
import {
35-
collectConfiguredWorkerProviderIds,
36-
listBundledWorkerProviderOwners,
37-
} from "../plugins/worker-provider-registry.js";
34+
import { collectConfiguredWorkerProviderIds } from "../plugins/worker-provider-config.js";
35+
import { listBundledWorkerProviderOwners } from "../plugins/worker-provider-manifest.js";
3836
import { isChannelConfigured } from "./channel-configured.js";
3937
import { shouldSkipPreferredPluginAutoEnable } from "./plugin-auto-enable.prefer-over.js";
4038
import type {

‎src/gateway/server-plugin-bootstrap.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
findActiveDegradedPlugin,
1313
formatPluginVerificationDiagnostic,
1414
} from "../plugins/runtime-degraded-state.js";
15-
import { resolveDurableWorkerProviderAutoEnabledReasons } from "../plugins/worker-provider-registry.js";
15+
import { resolveDurableWorkerProviderAutoEnabledReasons } from "../plugins/worker-provider-manifest.js";
1616
import { mergeActivationSectionsIntoRuntimeConfig } from "./plugin-activation-runtime-config.js";
1717
import type { GatewayRequestHandler } from "./server-methods/types.js";
1818
import { loadGatewayPlugins, setPluginSubagentOverridePolicies } from "./server-plugins.js";

‎src/infra/approval-native-route-coordinator.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ import {
1414
resolveApprovalRoutedElsewhereNoticeText,
1515
} from "./approval-native-route-notice.js";
1616
import { buildChannelApprovalNativeTargetKey } from "./approval-native-target-key.js";
17-
import type { ApprovalRequestChannelRouteClass } from "./approval-request-account-binding.js";
18-
import type { ChannelApprovalKind } from "./approval-types.js";
17+
import type { ApprovalRequestChannelRouteClass, ChannelApprovalKind } from "./approval-types.js";
1918
import type { ExecApprovalRequest } from "./exec-approvals.js";
2019
import type { PluginApprovalRequest } from "./plugin-approvals.js";
2120

‎src/infra/approval-request-account-binding.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from "../utils/delivery-context.shared.js";
1313
import { normalizeMessageChannel } from "../utils/message-channel.js";
1414
import { matchesApprovalRequestFilters } from "./approval-request-filters.js";
15+
import type { ApprovalRequestChannelRouteClass } from "./approval-types.js";
1516
import type { ExecApprovalRequest } from "./exec-approvals.js";
1617
import type { PluginApprovalRequest } from "./plugin-approvals.js";
1718

@@ -77,8 +78,6 @@ function hasApprovalForwardTarget(params: {
7778
);
7879
}
7980

80-
export type ApprovalRequestChannelRouteClass = "bound-or-explicit" | "unbound";
81-
8281
/** Classifies whether native delivery has named channel-account owners. */
8382
export function classifyApprovalRequestChannelRoute(params: {
8483
cfg: OpenClawConfig;

‎src/infra/approval-types.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Approval kind is shared by exec and plugin approval routing surfaces.
22
export type ChannelApprovalKind = "exec" | "plugin";
3+
export type ApprovalRequestChannelRouteClass = "bound-or-explicit" | "unbound";
34

45
/** Resolve approval ownership from the typed request payload, never from id spelling. */
56
export function resolveApprovalRequestKind(request: { request: object }): ChannelApprovalKind {

‎src/plugins/gateway-startup-plugin-activation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
} from "./gateway-startup-plugin-providers.js";
2424
import type { InstalledPluginIndex, InstalledPluginIndexRecord } from "./installed-plugin-index.js";
2525
import type { PluginManifestRecord } from "./manifest-registry.js";
26-
import { manifestOwnsWorkerProvider } from "./worker-provider-registry.js";
26+
import { manifestOwnsWorkerProvider } from "./worker-provider-manifest.js";
2727

2828
type PluginStartupActivationParams = {
2929
plugin: InstalledPluginIndexRecord;

‎src/plugins/gateway-startup-plugin-metadata.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ import type { InstalledPluginIndex } from "./installed-plugin-index.js";
2424
import type { PluginMetadataSnapshot } from "./plugin-metadata-snapshot.js";
2525
import type { PluginMetadataSnapshotPluginIdScope } from "./plugin-metadata-snapshot.types.js";
2626
import { normalizePluginIdScope } from "./plugin-scope.js";
27-
import {
28-
collectConfiguredWorkerProviderIds,
29-
normalizeWorkerProviderIds,
30-
} from "./worker-provider-registry.js";
27+
import { collectConfiguredWorkerProviderIds } from "./worker-provider-config.js";
28+
import { normalizeWorkerProviderIds } from "./worker-provider-id.js";
3129

3230
export function resolveGatewayStartupMetadataPluginIds(params: {
3331
config: OpenClawConfig;

‎src/plugins/gateway-startup-plugin-plan.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ import {
3737
normalizePluginsConfigWithRegistry,
3838
} from "./plugin-registry-contributions.js";
3939
import type { PluginRegistrySnapshot } from "./plugin-registry-snapshot.js";
40-
import {
41-
collectConfiguredWorkerProviderIds,
42-
normalizeWorkerProviderIds,
43-
} from "./worker-provider-registry.js";
40+
import { collectConfiguredWorkerProviderIds } from "./worker-provider-config.js";
41+
import { normalizeWorkerProviderIds } from "./worker-provider-id.js";
4442

4543
export function resolveChannelPluginIdsFromRegistry(params: {
4644
manifestRegistry: PluginManifestRegistry;

0 commit comments

Comments
 (0)