tighten adapters barrel surface

This commit is contained in:
Eve
2026-05-08 17:15:28 +08:00
parent 9c6afad864
commit c3b95ba3b7
5 changed files with 6 additions and 9 deletions

View File

@@ -91,6 +91,9 @@ Current **public package surface** is intentionally narrow:
- `@openclaw/plugin-reporting-governance/adapters/sender-binding` - `@openclaw/plugin-reporting-governance/adapters/sender-binding`
- `@openclaw/plugin-reporting-governance/adapters/orchestrator` - `@openclaw/plugin-reporting-governance/adapters/orchestrator`
`@openclaw/plugin-reporting-governance/adapters` 目前只代表 **runtime adapter entrypoints**
`createRuntimeBinding(...)``loadDeploymentProfileArtifact(...)``createDeploymentBindingContract(...)` 不再掛在 `./adapters` barrel前者仍由 root export 提供,後兩者屬於 storage/profile artifact slice。
What is currently exposed from the root export: What is currently exposed from the root export:
- `evaluatePolicyPack(...)` - `evaluatePolicyPack(...)`

View File

@@ -3,6 +3,3 @@ export { runDispatcherAdapter } from './dispatcher.mjs';
export { runBridgeSupervisorAdapter } from './bridge-supervisor.mjs'; export { runBridgeSupervisorAdapter } from './bridge-supervisor.mjs';
export { runSenderBindingAdapter } from './sender-binding.mjs'; export { runSenderBindingAdapter } from './sender-binding.mjs';
export { runOrchestratorAdapter } from './orchestrator.mjs'; export { runOrchestratorAdapter } from './orchestrator.mjs';
export { createRuntimeBinding } from './runtime-binding.mjs';
export { loadDeploymentProfileArtifact, createDeploymentBindingContract } from '../storage/profile-artifact.mjs';

View File

@@ -42,8 +42,8 @@ export {
executeRuntimeIntegratedGovernance, executeRuntimeIntegratedGovernance,
runCompatibilityPreflight, runCompatibilityPreflight,
} from './core/index.mjs'; } from './core/index.mjs';
export { createRuntimeBinding } from './adapters/runtime-binding.mjs';
export { export {
createRuntimeBinding,
runWatchdogAdapter, runWatchdogAdapter,
runDispatcherAdapter, runDispatcherAdapter,
runBridgeSupervisorAdapter, runBridgeSupervisorAdapter,

View File

@@ -92,7 +92,7 @@ test('package root export resolves public package surface only', () => {
} }
}); });
test('adapters subpath export resolves package-owned adapter index plus profile artifact loader helpers', () => { test('adapters subpath export resolves package-owned adapter entrypoints only', () => {
const root = createFixtureRoot(); const root = createFixtureRoot();
try { try {
installPackageAlias(root); installPackageAlias(root);
@@ -104,9 +104,6 @@ test('adapters subpath export resolves package-owned adapter index plus profile
`); `);
assert.deepEqual(result.adapterKeys, [ assert.deepEqual(result.adapterKeys, [
'createDeploymentBindingContract',
'createRuntimeBinding',
'loadDeploymentProfileArtifact',
'runBridgeSupervisorAdapter', 'runBridgeSupervisorAdapter',
'runDispatcherAdapter', 'runDispatcherAdapter',
'runOrchestratorAdapter', 'runOrchestratorAdapter',

View File

@@ -10,7 +10,7 @@ import {
validateDeploymentProfileArtifact, validateDeploymentProfileArtifact,
assertUseTimePathWithinRepoRoot, assertUseTimePathWithinRepoRoot,
} from '../src/storage/profile-artifact.mjs'; } from '../src/storage/profile-artifact.mjs';
import { createRuntimeBinding } from '../src/adapters/index.mjs'; import { createRuntimeBinding } from '../src/adapters/runtime-binding.mjs';
const packageRoot = path.resolve(import.meta.dirname, '..'); const packageRoot = path.resolve(import.meta.dirname, '..');
const repoRoot = path.resolve(packageRoot, '..', '..'); const repoRoot = path.resolve(packageRoot, '..', '..');