feat(ql3): expose worker observations in console

This commit is contained in:
whyour
2026-08-20 14:02:01 +08:00
parent af5d5bfc0b
commit 344680d64a
25 changed files with 840 additions and 49 deletions
@@ -23,6 +23,7 @@ const REQUIRED_FILES = Object.freeze([
DEPLOYMENT_ROOT + '/README.md',
DEPLOYMENT_ROOT + '/client-config.example.json',
DEPLOYMENT_ROOT + '/run-management-client-config.example.json',
DEPLOYMENT_ROOT + '/worker-management-client-config.example.json',
'deploy/containers/ql3-cluster-admin/Dockerfile',
'scripts/ql3-cluster-admin-product-live-contract.cjs',
]);
@@ -108,6 +109,8 @@ function auditClusterCopilotConsole(options = {}) {
"'run_cancellation_status'",
"'run_cancellation_blocked_list'",
"'run_cancellation_inspect'",
"'worker_list'",
"'worker_inspect'",
"'task_read'",
"'workflow_step_list'",
]);
@@ -136,6 +139,7 @@ function auditClusterCopilotConsole(options = {}) {
'maximumConcurrentRequests: 2',
"'/api/v1/copilot/inspect': 'inspect'",
"'/api/v1/run-management/cancellation-status': 'run_cancellation_status'",
"'/api/v1/worker-management/workers': 'worker_list'",
"'/api/v1/observe/run-list': 'run_list'",
"'/api/v1/observe/task-list': 'task_list'",
"'/api/v1/observe/workflow-list': 'workflow_list'",
@@ -159,6 +163,8 @@ function auditClusterCopilotConsole(options = {}) {
'--session /absolute/session',
'--run-management-config /absolute/run-client.json',
'--run-management-assertion /absolute/assertion.jwt',
'--worker-management-config /absolute/worker-client.json',
'--worker-management-assertion /absolute/assertion.jwt',
'readCanonicalFile(',
"'private'",
'validateClusterCopilotClientCredentialFile',
@@ -166,6 +172,7 @@ function auditClusterCopilotConsole(options = {}) {
'networkBoundary: parsed.networkBoundary',
"publishedHostAddress: '127.0.0.1'",
'runManagementAuthority: runManagementAuthority',
'workerManagementAuthority: workerManagementAuthority',
'mutation: false',
]);
rejectFragments(CONSOLE_ROOT + '/cli.ts', [
@@ -224,6 +231,8 @@ function auditClusterCopilotConsole(options = {}) {
'显式读取诊断内容',
'读取取消可用性',
'读取首屏 Blocked Runs',
'读取首屏 Workers',
'读取 Worker 详情',
'该只读面没有 rearm',
'模型文本是不可信内容',
'导出脱敏包',
@@ -293,6 +302,7 @@ function auditClusterCopilotConsole(options = {}) {
'thirteen exact operations',
'available vocabulary to sixteen',
'QL3_COPILOT_CONSOLE_RUN_MANAGEMENT=enabled',
'QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT=enabled',
'--port=0',
'TLS 1.3 `GET /readyz`',
'excluded from small router Edge/Standalone artifacts',
@@ -439,6 +449,8 @@ function auditClusterCopilotConsole(options = {}) {
'run_cancellation_status',
'run_cancellation_blocked_list',
'run_cancellation_inspect',
'worker_list',
'worker_inspect',
'run_list',
'run_read',
'run_event_list',
@@ -13,6 +13,8 @@ const FILES = Object.freeze({
'deploy/console/ql3-cluster-copilot/host-environment.example.json',
runManagementExample:
'deploy/console/ql3-cluster-copilot/run-management-client-config.example.json',
workerManagementExample:
'deploy/console/ql3-cluster-copilot/worker-management-client-config.example.json',
image: 'deploy/containers/ql3-cluster-admin/Dockerfile',
workflow: '.github/workflows/ql3-image-release.yml',
candidate: 'scripts/ql3-release-candidate-contract.cjs',
@@ -87,9 +89,22 @@ function auditClusterCopilotConsoleDistribution(options = {}) {
'QL3_COPILOT_CONSOLE_RUN_MANAGEMENT-disabled',
'--run-management-config /var/run/secrets/qinglong3/copilot-console/run-management-client.json',
'--run-management-assertion /var/run/secrets/qinglong3/copilot-console/run-management-assertion.jwt',
'QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT-disabled',
'--worker-management-config /var/run/secrets/qinglong3/copilot-console/worker-management-client.json',
'--worker-management-assertion /var/run/secrets/qinglong3/copilot-console/worker-management-assertion.jwt',
],
'QL3_COPILOT_CONSOLE_LAUNCHER_CONTRACT_DRIFT',
);
requireFragments(
'workerManagementExample',
[
'"schemaVersion": 1',
'/api/v3/workers/management',
'worker-management-client.crt',
'worker-management-client.key',
],
'QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT_EXAMPLE_DRIFT',
);
rejectFragments(
'launcher',
['--privileged', '--network host', '/var/run/docker.sock', '--pull always'],
@@ -206,6 +221,7 @@ function auditClusterCopilotConsoleDistribution(options = {}) {
QL3_COPILOT_CONSOLE_PORT: '5701',
QL3_COPILOT_CONSOLE_RESOURCE_CLASS: 'compact',
QL3_COPILOT_CONSOLE_RUN_MANAGEMENT: 'disabled',
QL3_COPILOT_CONSOLE_WORKER_MANAGEMENT: 'disabled',
};
if (
environment &&
@@ -231,6 +247,8 @@ function auditClusterCopilotConsoleDistribution(options = {}) {
'share/ql3-copilot-console/host-environment.example.json',
'COPY --chmod=0444 deploy/console/ql3-cluster-copilot/run-management-client-config.example.json',
'share/ql3-copilot-console/run-management-client-config.example.json',
'COPY --chmod=0444 deploy/console/ql3-cluster-copilot/worker-management-client-config.example.json',
'share/ql3-copilot-console/worker-management-client-config.example.json',
],
'QL3_COPILOT_CONSOLE_IMAGE_DISTRIBUTION_DRIFT',
);
@@ -324,6 +342,7 @@ function auditClusterCopilotConsoleDistribution(options = {}) {
kubernetesResident: false,
additionalWorkspacePackages: 0,
runManagementAuthorityDefault: 'disabled',
workerManagementAuthorityDefault: 'disabled',
externalWorkstationCeremony: 'source-tag-private-report',
ceremonyStatus: 'implementation-ready-public-release-pending',
findings: Object.freeze(findings),