ruvnet/ruflo · warning · Error
"@agntcy/slim-bindings" is installed but does not export pub
Error message
"@agntcy/slim-bindings" is installed but does not export publishAgentRecord()
What it means
Thrown by the 'ruflo agent publish' command (ADR-380 §2). When detectAgntcyRuntime() reports the optional @agntcy/slim-bindings package as installed and an endpoint configured, the command dynamic-imports it and requires a publishAgentRecord() export. If the module loads but lacks that function (wrong, placeholder, or squatted package under the same name), this error is thrown, immediately caught, and surfaced as 'Directory publish failed: ...'. The command still returns success:true with data { published:false, error } — a degraded, non-fatal outcome.
Source
Thrown at v3/@claude-flow/cli/src/commands/agntcy/publish.ts:144
// Directory publish call.
const status = await detectAgntcyRuntime();
if (!status.configured) {
output.printInfo(AGNTCY_NOT_CONFIGURED_MESSAGE);
output.printInfo(
`Validated OASF record at "${manifestPath}" locally (name=${(parsed as OasfAgentRecordShape).name}, ` +
`version=${(parsed as OasfAgentRecordShape).version}); publish to the Directory was skipped.`,
);
return {
success: true,
data: { published: false, manifestPath, configured: false, reason: status.reason },
};
}
try {
const mod = (await import(AGNTCY_PACKAGE_NAME)) as AgntcyDirectoryModule;
if (typeof mod.publishAgentRecord !== 'function') {
throw new Error(`"${AGNTCY_PACKAGE_NAME}" is installed but does not export publishAgentRecord()`);
}
const result = await mod.publishAgentRecord({
endpoint: status.endpoint as string,
record: parsed as OasfAgentRecordShape,
});
output.printSuccess(`Published agent record${result?.uri ? ` to ${result.uri}` : ''}.`);
return { success: true, data: { published: true, manifestPath, uri: result?.uri } };
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
output.printError(`Directory publish failed: ${message}`);
return { success: true, data: { published: false, manifestPath, error: message } };
}
},
};
export { publishCommand as agentPublishCommand };
export default publishCommand;
View on GitHub (pinned to fa13ee4ad6)
Solutions
- Uninstall/remove @agntcy/slim-bindings — the command then takes its 'not configured' path and still validates the manifest locally (the supported behavior today)
- If a real runtime is intended, pin the exact version whose exports include publishAgentRecord() and verify with a probe import before publishing
- Inspect CommandResult.data.error rather than exit code — the command reports this as published:false with success:true
Example fix
// before: stub package shadows nothing, publish probe fails npm install @agntcy/slim-bindings # squatted/placeholder ruflo agent publish // after: remove it; command validates locally and skips Directory publish npm uninstall @agntcy/slim-bindings ruflo agent publish # -> 'Validated OASF record ... publish skipped'
Defensive patterns
Strategy: fallback
Validate before calling
// probe before relying on the publish path
let canPublish = false;
try {
const mod = (await import('@agntcy/slim-bindings')) as { publishAgentRecord?: unknown };
canPublish = typeof mod.publishAgentRecord === 'function';
} catch { canPublish = false; }
if (!canPublish) skipDirectoryPublish(); Type guard
function exportsPublishAgentRecord(m: unknown): m is { publishAgentRecord: (o: { endpoint: string; record: unknown }) => Promise<{ uri?: string }> } {
return typeof (m as { publishAgentRecord?: unknown })?.publishAgentRecord === 'function';
} Try / catch
// The command already swallows this; handle the degraded result:
const res = await runCommand('agent', ['publish']);
if (res.success && res.data?.published === false && res.data?.error) {
log.warn('directory publish skipped:', res.data.error);
} Prevention
- Do not install @agntcy/slim-bindings until the real runtime ships — the not-configured path validates manifests locally
- Pin exact versions and probe optional-peer exports at startup
- Treat published:false + error in CommandResult.data as the signal, not the exit code
When it happens
Trigger: Running `ruflo agent publish` (with a valid OASF manifest) in an environment where some @agntcy/slim-bindings package resolves AND the AGNTCY endpoint is configured, but the resolved module has no publishAgentRecord export. Per the file header, the real package was never published to npm (404 on every plausible name), so any resolvable version is likely a stub or name-squat.
Common situations: A private registry or vendored node_modules contains a placeholder package under @agntcy/slim-bindings; a future real version renames its API; a dependency survey installed an unrelated squatted package.
Related errors
- "@agntcy/slim-bindings" is installed but does not export joi
- "@agntcy/slim-bindings" is installed but does not export cre
- Failed to import OpenAI
- ruflo auth needs the '@claude-flow/security' package, which
- AIDefence failed to load: ${error.message}
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/4578d8067935d0fd.
Report an issue: GitHub.