CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
export type Section = 'docs' | 'api' | 'recipes';
export const SECTIONS: Record<Section, {entry: string; activeBaseRegex: string}> = {
docs: {
entry: '',
activeBaseRegex:
'^(?:/zh-Hans)?/docs/(?!(?:(?:\\d+\\.\\d+|next)/)?(?:api|recipes)(?:/|$))',
},
api: {
entry: 'api/',
activeBaseRegex: '^(?:/zh-Hans)?/docs/(?:(?:\\d+\\.\\d+|next)/)?api(?:/|$)',
},
recipes: {
entry: 'recipes/weather-agent',
activeBaseRegex: '^(?:/zh-Hans)?/docs/(?:(?:\\d+\\.\\d+|next)/)?recipes(?:/|$)',
},
};
export function buildVersionAwareDocTo(section: Section, versionPath: string): string {
const base = versionPath.replace(/\/$/, '');
const {entry} = SECTIONS[section];
return entry ? `${base}/${entry}` : base;
}