chore: import upstream snapshot with attribution
Docs Tests / Check for file changes (push) Has been cancelled
Docs Tests / Test Documentation (push) Has been cancelled
Docs Tests / Documentation Linting Checks (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.9) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.9) (push) Has been cancelled
Continuous Integration / Check for file changes (push) Has been cancelled
Continuous Integration / Wait for docs tests (push) Has been cancelled
Continuous Integration / Code Quality (push) Has been cancelled
Continuous Integration / Check for changelog (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Upload coverage reports to codeclimate (push) Has been cancelled
Continuous Integration / Run Non-Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Run Broker Integration Tests (push) Has been cancelled
Continuous Integration / Run Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Build Docker base images and setup environment (push) Has been cancelled
Continuous Integration / Build Docker (default) (push) Has been cancelled
Continuous Integration / Build Docker (full) (push) Has been cancelled
Continuous Integration / Build Docker (mitie-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-de) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-it) (push) Has been cancelled
Continuous Integration / Deploy to PyPI (push) Has been cancelled
Continuous Integration / Notify Slack & Publish Release Notes (push) Has been cancelled
Publish Documentation / Evaluate release tag (push) Has been cancelled
Publish Documentation / Prebuild Docs (push) Has been cancelled
Publish Documentation / Preview Docs (push) Has been cancelled
Publish Documentation / Check for file changes (push) Has been cancelled
Publish Documentation / Publish Docs (push) Has been cancelled
Automatic PR Merger / mergepal (push) Has been cancelled
CI Github Actions / Run Tests (push) Has been cancelled
Semgrep / Semgrep Workflow Security Scan (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:24:47 +08:00
commit dc6079821b
1384 changed files with 261110 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
const getIncludedSources = require('../plugins/included_source.js');
console.info('Computing included sources');
getIncludedSources({
docsDir: './docs',
include: ['**.mdx', '**.md'],
});
+8
View File
@@ -0,0 +1,8 @@
const getProgramOutputs = require('../plugins/program_output.js');
console.info('Computing program outputs');
getProgramOutputs({
docsDir: './docs',
include: ['**.mdx', '**.md'],
commandPrefix: 'RASA_TELEMETRY_ENABLED=false poetry run',
});
@@ -0,0 +1,88 @@
const fs = require('fs');
const config = require("../package.json").telemetryReference;
const eventsSchema = require("../docs/telemetry/events.json");
const { writeFile } = fs.promises;
const isFrontendEvent = (event) => event.indexOf(" ") === -1 && event.indexOf(":") !== -1;
const MDX_HEADER = `---
id: reference
sidebar_label: Telemetry Event Reference
title: Telemetry Event Reference
abstract: |
Event descriptions of telemetry data we report in order to improve our products.
---
Telemetry events are only reported if telemetry is enabled. A detailed explanation
on the reasoning behind collecting optional telemetry events can be found in our
[telemetry documentation](./telemetry.mdx).
`;
const renderEventBadge = (event) => {
const kind = isFrontendEvent(event) ? 'frontend' : 'backend';
return `<span class="badge badge--primary">${kind}</span>`;
};
const renderTelemetryEventDetails = (type, properties) => {
const renderEnum = (_enum) => _enum.length ? ` Can be one of: ${_enum.map(e => `\`"${e}"\``).join(', ')}.` : '';
switch (type) {
case 'object':
return `Event properties:\n
${Object.entries(properties)
.map(([property, { type, description, enum: _enum = [] }]) => `- \`${property}\` *(${type})*: ${description}${renderEnum(_enum)}`)
.join('\n')
}
`;
case 'null':
return '';
case undefined:
return '';
default:
throw new Error(`Unexpected event type: "${type}".`);
}
};
const renderTelemetryEventDescription = (event, schema) => {
if (schema.description) {
return schema.description;
}
throw new Error(`Missing description for event ${event}`);
};
const renderTelemetryEvent = (event, schema) => (`
### ${event}
${renderEventBadge(event)} ${renderTelemetryEventDescription(event, schema)}
${renderTelemetryEventDetails(schema.type, schema.properties)}
`);
const renderTelemetrySection = (section, events) => (`
## ${section}
${Object.entries(events).map(([event, schema]) => renderTelemetryEvent(event, schema)).join('\n')}
`);
/**
This function is used to write the reference of our telemetry events
inside the docs. It's run as part of the pre-build step.
Options:
- outputPath: where to output the telemetry reference (mdx file)
*/
async function writeTelemetryReference({ outputPath }) {
const sections = Object.fromEntries(eventsSchema.sections.map((section) => [section, {}]));
Object.entries(eventsSchema.events).forEach(([event, schema]) => {
const section = schema.section || eventsSchema.defaultSection;
if (sections[section] === undefined) {
throw new Error(`Unknown section ${section}, please add it to the "sections" array.`);
}
sections[section][event] = schema;
});
// const content = Object.entries(eventsSchema.events).map(([event, schema]) => renderTelemetryEvent(event, schema)).join('\n');
const content = Object.entries(sections).map(([section, events]) => renderTelemetrySection(section, events)).join('\n');
await writeFile(outputPath, `${MDX_HEADER}\n\n${content}`);
};
console.info('Compiling telemetry reference');
writeTelemetryReference(config);
+33
View File
@@ -0,0 +1,33 @@
const { readFileSync, writeFileSync } = require('fs');
const { execSync } = require('child_process');
const toml = require('toml');
const VARIABLES_FILE_PATH = './docs/variables.json';
const PYPROJECT_FILE_PATH = '../pyproject.toml';
const COMMAND_RASA_SDK_VERSION =
'python -c "from rasa_sdk import __version__ as rasa_sdk_version; print(rasa_sdk_version)"';
const DISCLAIMER = 'this file is automatically generated, please do not update it manually';
const JSON_SPACE_INDENT = 4;
const getRasaVersion = () => {
const pyproject = readFileSync(PYPROJECT_FILE_PATH).toString();
return toml.parse(pyproject).tool.poetry.version;
};
const getRasaSdkVersion = () => execSync(COMMAND_RASA_SDK_VERSION).toString().trim();
const writeVariablesFile = () => {
const variables = JSON.stringify(
{
release: getRasaVersion(),
rasa_sdk_version: getRasaSdkVersion(),
},
null,
JSON_SPACE_INDENT,
);
writeFileSync(VARIABLES_FILE_PATH, variables);
};
console.info(`Computing docs variables and writing to ${VARIABLES_FILE_PATH}`);
writeVariablesFile();
+33
View File
@@ -0,0 +1,33 @@
const fs = require('fs');
const { copyFile } = fs.promises;
const defaultOptions = {
files: {},
docsDir: './docs',
};
/**
This function is used to copy markdown files from a source
outside the `docs/` folder to a destination inside the `docs/` folder.
Options:
- files: a mapping of source: destination
- docsDir: the docs folder
*/
async function copyMarkdownFiles(options) {
options = { ...defaultOptions, ...options };
const { docsDir, files } = options;
for (const [source, destination] of Object.entries(files)) {
await copyFile(source, `${docsDir}/${destination}`);
}
}
console.info('Copying markdown files');
copyMarkdownFiles({
docsDir: './docs',
files: {
'../CHANGELOG.mdx': 'changelog.mdx',
},
});
+16
View File
@@ -0,0 +1,16 @@
const fs = require("fs");
const includedSources = require('../plugins/included_source.js');
const version = process.argv[2];
if (!version) {;
throw new Error("Missing version argument.");
}
const docsDir = `./versioned_docs/version-${version}`;
if (!fs.existsSync(docsDir)) {
throw new Error(`Documentation for version ${version} doesn't exist.`);
}
console.info(`Updating sources in ${version} documentation`);
includedSources.updateVersionedSources({ docsDir });