@numa-tech/numa 1.12.11 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -4
- package/dist/application-onboarding/client.d.ts +83 -8
- package/dist/application-onboarding/client.js +23 -1
- package/dist/application-onboarding/client.js.map +1 -1
- package/dist/application-onboarding/commands.js +72 -6
- package/dist/application-onboarding/commands.js.map +1 -1
- package/dist/application-onboarding/schemas.d.ts +301 -58
- package/dist/application-onboarding/schemas.js +134 -8
- package/dist/application-onboarding/schemas.js.map +1 -1
- package/dist/application-onboarding/tui-model.d.ts +20 -0
- package/dist/application-onboarding/tui-model.js +362 -20
- package/dist/application-onboarding/tui-model.js.map +1 -1
- package/dist/application-onboarding/tui.d.ts +6 -1
- package/dist/application-onboarding/tui.js +104 -7
- package/dist/application-onboarding/tui.js.map +1 -1
- package/dist/cli.js +50 -8
- package/dist/cli.js.map +1 -1
- package/dist/clusters/client.d.ts +436 -0
- package/dist/clusters/client.js +207 -0
- package/dist/clusters/client.js.map +1 -0
- package/dist/clusters/commands.d.ts +11 -0
- package/dist/clusters/commands.js +373 -0
- package/dist/clusters/commands.js.map +1 -0
- package/dist/clusters/errors.d.ts +10 -0
- package/dist/clusters/errors.js +61 -0
- package/dist/clusters/errors.js.map +1 -0
- package/dist/clusters/kubeconfig-discovery.d.ts +48 -0
- package/dist/clusters/kubeconfig-discovery.js +280 -0
- package/dist/clusters/kubeconfig-discovery.js.map +1 -0
- package/dist/clusters/schemas.d.ts +510 -0
- package/dist/clusters/schemas.js +201 -0
- package/dist/clusters/schemas.js.map +1 -0
- package/dist/command-catalog.js +370 -1
- package/dist/command-catalog.js.map +1 -1
- package/dist/gitops/client.d.ts +499 -0
- package/dist/gitops/client.js +163 -0
- package/dist/gitops/client.js.map +1 -0
- package/dist/gitops/commands.d.ts +11 -0
- package/dist/gitops/commands.js +367 -0
- package/dist/gitops/commands.js.map +1 -0
- package/dist/gitops/errors.d.ts +10 -0
- package/dist/gitops/errors.js +59 -0
- package/dist/gitops/errors.js.map +1 -0
- package/dist/gitops/schemas.d.ts +1712 -0
- package/dist/gitops/schemas.js +360 -0
- package/dist/gitops/schemas.js.map +1 -0
- package/dist/repositories/client.d.ts +558 -0
- package/dist/repositories/client.js +215 -0
- package/dist/repositories/client.js.map +1 -0
- package/dist/repositories/commands.d.ts +13 -0
- package/dist/repositories/commands.js +368 -0
- package/dist/repositories/commands.js.map +1 -0
- package/dist/repositories/errors.d.ts +10 -0
- package/dist/repositories/errors.js +60 -0
- package/dist/repositories/errors.js.map +1 -0
- package/dist/repositories/schemas.d.ts +1724 -0
- package/dist/repositories/schemas.js +261 -0
- package/dist/repositories/schemas.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const NonEmptyString = z.string().trim().min(1);
|
|
3
|
+
const OptionalString = NonEmptyString.nullable().optional();
|
|
4
|
+
const PositiveId = z.union([
|
|
5
|
+
z.string().trim().regex(/^[1-9]\d*$/u),
|
|
6
|
+
z.number().int().positive()
|
|
7
|
+
]).transform(String);
|
|
8
|
+
const Sha256 = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
9
|
+
export const ClusterSourceTypeSchema = z.enum(["KUBECONFIG_CLI", "ALIYUN_ACK_ASSUME_ROLE"]);
|
|
10
|
+
export const ClusterSourceStatusSchema = z.enum(["ACTIVE", "DISABLED", "ERROR"]);
|
|
11
|
+
export const ClusterCandidateStatusSchema = z.enum(["PENDING", "MATCHED", "AMBIGUOUS", "ADOPTED", "LINKED", "IGNORED"]);
|
|
12
|
+
export const ClusterGovernanceActionSchema = z.enum(["ADOPT", "LINK", "IGNORE"]);
|
|
13
|
+
export const ClusterSummarySchema = z.object({
|
|
14
|
+
id: PositiveId.optional(),
|
|
15
|
+
clusterKey: NonEmptyString,
|
|
16
|
+
code: NonEmptyString,
|
|
17
|
+
name: NonEmptyString,
|
|
18
|
+
provider: NonEmptyString,
|
|
19
|
+
providerClusterId: OptionalString,
|
|
20
|
+
region: OptionalString,
|
|
21
|
+
status: NonEmptyString,
|
|
22
|
+
identityStatus: NonEmptyString,
|
|
23
|
+
endpointFingerprintPrefix: OptionalString,
|
|
24
|
+
lastObservedAt: OptionalString,
|
|
25
|
+
version: z.number().int().nonnegative()
|
|
26
|
+
});
|
|
27
|
+
export const ClusterDetailSchema = z.object({
|
|
28
|
+
cluster: ClusterSummarySchema,
|
|
29
|
+
description: OptionalString,
|
|
30
|
+
fingerprintKinds: z.array(NonEmptyString).default([]),
|
|
31
|
+
linkedCandidateKeys: z.array(NonEmptyString).default([])
|
|
32
|
+
});
|
|
33
|
+
export const ClusterSourceViewSchema = z.object({
|
|
34
|
+
id: PositiveId.optional(),
|
|
35
|
+
sourceKey: NonEmptyString,
|
|
36
|
+
sourceType: ClusterSourceTypeSchema,
|
|
37
|
+
displayName: NonEmptyString,
|
|
38
|
+
aliyunAccountId: PositiveId.nullable().optional(),
|
|
39
|
+
aliyunAssumeRoleId: PositiveId.nullable().optional(),
|
|
40
|
+
regions: z.array(NonEmptyString).default([]),
|
|
41
|
+
enabled: z.boolean(),
|
|
42
|
+
status: ClusterSourceStatusSchema,
|
|
43
|
+
lastObservedAt: OptionalString,
|
|
44
|
+
observationCount: z.number().int().nonnegative(),
|
|
45
|
+
lastErrorCode: OptionalString,
|
|
46
|
+
lastErrorMessage: OptionalString,
|
|
47
|
+
version: z.number().int().nonnegative()
|
|
48
|
+
});
|
|
49
|
+
export const FingerprintEvidenceSchema = z.object({
|
|
50
|
+
kind: NonEmptyString,
|
|
51
|
+
fingerprintPrefix: NonEmptyString,
|
|
52
|
+
strength: NonEmptyString,
|
|
53
|
+
matched: z.boolean()
|
|
54
|
+
});
|
|
55
|
+
export const ClusterObservationViewSchema = z.object({
|
|
56
|
+
observationKey: NonEmptyString,
|
|
57
|
+
sourceKey: NonEmptyString,
|
|
58
|
+
candidateKey: NonEmptyString,
|
|
59
|
+
observedName: OptionalString,
|
|
60
|
+
provider: NonEmptyString,
|
|
61
|
+
providerClusterId: OptionalString,
|
|
62
|
+
region: OptionalString,
|
|
63
|
+
kubernetesVersion: OptionalString,
|
|
64
|
+
evidence: z.array(FingerprintEvidenceSchema).default([]),
|
|
65
|
+
evidenceSource: z.enum(["KUBECONFIG_CLI", "ACK_API"]),
|
|
66
|
+
observedAt: OptionalString,
|
|
67
|
+
receivedAt: OptionalString,
|
|
68
|
+
disposition: OptionalString
|
|
69
|
+
});
|
|
70
|
+
export const ClusterCandidateViewSchema = z.object({
|
|
71
|
+
candidateKey: NonEmptyString,
|
|
72
|
+
sourceKey: NonEmptyString,
|
|
73
|
+
status: ClusterCandidateStatusSchema,
|
|
74
|
+
matchKind: NonEmptyString,
|
|
75
|
+
matchedClusterKey: OptionalString,
|
|
76
|
+
observedName: OptionalString,
|
|
77
|
+
provider: NonEmptyString,
|
|
78
|
+
providerClusterId: OptionalString,
|
|
79
|
+
region: OptionalString,
|
|
80
|
+
kubernetesVersion: OptionalString,
|
|
81
|
+
evidence: z.array(FingerprintEvidenceSchema).default([]),
|
|
82
|
+
firstObservedAt: OptionalString,
|
|
83
|
+
lastObservedAt: OptionalString,
|
|
84
|
+
observationCount: z.number().int().nonnegative(),
|
|
85
|
+
resolutionReason: OptionalString,
|
|
86
|
+
reviewedBy: OptionalString,
|
|
87
|
+
reviewedAt: OptionalString,
|
|
88
|
+
version: z.number().int().nonnegative()
|
|
89
|
+
});
|
|
90
|
+
export const ClusterSourceCreateSchema = z.object({
|
|
91
|
+
sourceKey: z.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,119}$/u),
|
|
92
|
+
sourceType: ClusterSourceTypeSchema,
|
|
93
|
+
displayName: z.string().trim().min(1).max(200),
|
|
94
|
+
aliyunAccountId: PositiveId.nullable().optional(),
|
|
95
|
+
aliyunAssumeRoleId: PositiveId.nullable().optional(),
|
|
96
|
+
regions: z.array(z.string().regex(/^[a-z0-9-]{1,80}$/u)).max(100),
|
|
97
|
+
enabled: z.boolean().optional()
|
|
98
|
+
}).strict().superRefine((value, context) => {
|
|
99
|
+
if (value.sourceType === "KUBECONFIG_CLI") {
|
|
100
|
+
if (value.aliyunAccountId != null || value.aliyunAssumeRoleId != null || value.regions.length) {
|
|
101
|
+
context.addIssue({ code: "custom", message: "KUBECONFIG_CLI cannot reference Alibaba Cloud identity or regions" });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else if (value.aliyunAccountId == null || value.aliyunAssumeRoleId == null || !value.regions.length) {
|
|
105
|
+
context.addIssue({ code: "custom", message: "ALIYUN_ACK_ASSUME_ROLE requires accountId, assumeRoleId, and at least one region" });
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
export const ClusterSourceUpdateSchema = z.object({
|
|
109
|
+
displayName: z.string().trim().min(1).max(200),
|
|
110
|
+
aliyunAccountId: PositiveId.nullable(),
|
|
111
|
+
aliyunAssumeRoleId: PositiveId.nullable(),
|
|
112
|
+
regions: z.array(z.string().regex(/^[a-z0-9-]{1,80}$/u)).max(100),
|
|
113
|
+
enabled: z.boolean(),
|
|
114
|
+
expectedVersion: z.number().int().nonnegative()
|
|
115
|
+
}).strict();
|
|
116
|
+
export const ClusterObservationInputSchema = z.object({
|
|
117
|
+
observationKey: z.string().regex(/^obs_[0-9a-f]{64}$/u),
|
|
118
|
+
observedAt: z.string().datetime({ offset: true }).optional(),
|
|
119
|
+
observedName: z.string().trim().min(1).max(200).optional(),
|
|
120
|
+
provider: z.string().regex(/^[A-Za-z0-9._-]{1,40}$/u),
|
|
121
|
+
region: z.string().trim().min(1).max(80).optional(),
|
|
122
|
+
kubernetesVersion: z.string().trim().min(1).max(80).optional(),
|
|
123
|
+
providerClusterId: z.string().trim().min(1).max(320).optional(),
|
|
124
|
+
providerClusterIdSha256: Sha256.optional(),
|
|
125
|
+
kubeSystemUidSha256: Sha256.optional(),
|
|
126
|
+
endpointSha256: Sha256.optional(),
|
|
127
|
+
certificateAuthoritySha256: Sha256.optional()
|
|
128
|
+
}).strict().superRefine((value, context) => {
|
|
129
|
+
if (value.providerClusterId != null && value.providerClusterIdSha256 == null) {
|
|
130
|
+
context.addIssue({ code: "custom", path: ["providerClusterIdSha256"], message: "providerClusterIdSha256 is required with providerClusterId" });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
export const ClusterObservationBatchRequestSchema = z.object({
|
|
134
|
+
observations: z.array(ClusterObservationInputSchema).min(1).max(100)
|
|
135
|
+
}).strict();
|
|
136
|
+
export const ClusterAdoptRequestSchema = z.object({
|
|
137
|
+
code: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$/u),
|
|
138
|
+
name: z.string().trim().min(1).max(120),
|
|
139
|
+
description: z.string().trim().max(2000).optional(),
|
|
140
|
+
expectedVersion: z.number().int().nonnegative(),
|
|
141
|
+
reason: z.string().trim().min(5).max(1000)
|
|
142
|
+
}).strict();
|
|
143
|
+
export const ClusterLinkRequestSchema = z.object({
|
|
144
|
+
clusterKey: z.string().regex(/^clu_[0-9a-f]{32}$/u),
|
|
145
|
+
expectedCandidateVersion: z.number().int().nonnegative(),
|
|
146
|
+
expectedClusterVersion: z.number().int().nonnegative(),
|
|
147
|
+
reason: z.string().trim().min(5).max(1000)
|
|
148
|
+
}).strict();
|
|
149
|
+
export const ClusterIgnoreRequestSchema = z.object({
|
|
150
|
+
expectedVersion: z.number().int().nonnegative(),
|
|
151
|
+
reason: z.string().trim().min(5).max(1000)
|
|
152
|
+
}).strict();
|
|
153
|
+
export const ClusterObservationReceiptSchema = z.object({
|
|
154
|
+
observation: ClusterObservationViewSchema,
|
|
155
|
+
candidate: ClusterCandidateViewSchema,
|
|
156
|
+
replayed: z.boolean()
|
|
157
|
+
});
|
|
158
|
+
export const ClusterObservationBatchReceiptSchema = z.object({
|
|
159
|
+
items: z.array(ClusterObservationReceiptSchema),
|
|
160
|
+
observationCount: z.number().int().nonnegative(),
|
|
161
|
+
candidateCount: z.number().int().nonnegative(),
|
|
162
|
+
replayed: z.boolean()
|
|
163
|
+
});
|
|
164
|
+
export const ClusterCandidateDecisionViewSchema = z.object({
|
|
165
|
+
action: ClusterGovernanceActionSchema,
|
|
166
|
+
candidate: ClusterCandidateViewSchema,
|
|
167
|
+
cluster: ClusterSummarySchema.nullable().optional(),
|
|
168
|
+
replayed: z.boolean(),
|
|
169
|
+
decidedAt: NonEmptyString
|
|
170
|
+
});
|
|
171
|
+
export const ClusterDiscoveryRunViewSchema = z.object({
|
|
172
|
+
runNo: NonEmptyString,
|
|
173
|
+
sourceKey: NonEmptyString,
|
|
174
|
+
state: NonEmptyString,
|
|
175
|
+
discoveredCount: z.number().int().nonnegative(),
|
|
176
|
+
candidateCount: z.number().int().nonnegative(),
|
|
177
|
+
errorCode: OptionalString,
|
|
178
|
+
errorMessage: OptionalString,
|
|
179
|
+
startedAt: OptionalString,
|
|
180
|
+
completedAt: OptionalString
|
|
181
|
+
});
|
|
182
|
+
function pageSchema(item) {
|
|
183
|
+
return z.object({
|
|
184
|
+
items: z.array(item),
|
|
185
|
+
total: z.number().int().nonnegative(),
|
|
186
|
+
page: z.number().int().positive(),
|
|
187
|
+
size: z.number().int().positive(),
|
|
188
|
+
totalPages: z.number().int().nonnegative()
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
export const ClusterSummaryListSchema = z.array(ClusterSummarySchema);
|
|
192
|
+
export const ClusterSourceListSchema = z.array(ClusterSourceViewSchema);
|
|
193
|
+
export const ClusterCandidatePageSchema = pageSchema(ClusterCandidateViewSchema);
|
|
194
|
+
export const ClusterObservationPageSchema = pageSchema(ClusterObservationViewSchema);
|
|
195
|
+
export const ClusterApiErrorSchema = z.object({
|
|
196
|
+
code: z.string().optional(),
|
|
197
|
+
message: z.string().optional(),
|
|
198
|
+
requestId: z.string().optional(),
|
|
199
|
+
details: z.unknown().optional()
|
|
200
|
+
});
|
|
201
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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AS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC"}
|
package/dist/command-catalog.js
CHANGED
|
@@ -375,6 +375,126 @@ export const COMMAND_CATALOG = [
|
|
|
375
375
|
access: "authenticated",
|
|
376
376
|
examples: ["numa media capabilities --json"]
|
|
377
377
|
},
|
|
378
|
+
{
|
|
379
|
+
command: "repository connection list",
|
|
380
|
+
summary: "列出当前用户可用的安全 SCM connection inventory",
|
|
381
|
+
access: "authenticated",
|
|
382
|
+
operationalNotes: ["仅返回 code、name、provider、status 和 capabilities;不读取 admin 配置或凭据。"],
|
|
383
|
+
examples: ["numa repository connection list --json"]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
command: "repository list [--status <state>] [--connection <code>] [--namespace <external-id>] [--owner-team-id <id>] [--management-mode <mode>] [--page <number>] [--size <number>]",
|
|
387
|
+
summary: "列出独立 Source Repository catalog",
|
|
388
|
+
access: "authenticated",
|
|
389
|
+
operationalNotes: ["使用平台 repositoryKey;不接受或输出 provider credential。"],
|
|
390
|
+
examples: ["numa repository list --connection codeup-main --json"]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
command: "repository get <repository-key>",
|
|
394
|
+
summary: "查看一个独立 Source Repository catalog 项",
|
|
395
|
+
access: "authenticated",
|
|
396
|
+
examples: ["numa repository get repo_01 --json"]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
command: "repository namespace list --connection <code> [--search <text>]",
|
|
400
|
+
summary: "发现指定 SCM connection 可用的 provider namespace",
|
|
401
|
+
access: "authenticated",
|
|
402
|
+
operationalNotes: ["只接受 connection code;不接受 provider URL、token、credential 或本地路径。"],
|
|
403
|
+
examples: ["numa repository namespace list --connection codeup-main --json"]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
command: "repository remote list --connection <code> [--search <text>]",
|
|
407
|
+
summary: "分页发现 provider 中的远端仓库",
|
|
408
|
+
access: "authenticated",
|
|
409
|
+
examples: ["numa repository remote list --connection codeup-main --search order --json"]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
command: "repository remote get <external-id> --connection <code>",
|
|
413
|
+
summary: "按 provider externalId 查看一个远端仓库",
|
|
414
|
+
access: "authenticated",
|
|
415
|
+
examples: ["numa repository remote get 123456 --connection codeup-main --json"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
command: "repository capabilities --connection <code> [--consumer <type>]",
|
|
419
|
+
summary: "查看 Source Repository 操作能力和服务端约束",
|
|
420
|
+
access: "authenticated",
|
|
421
|
+
examples: ["numa repository capabilities --connection codeup-main --consumer gitops --json"]
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
command: "repository status [run-no] [--client-request-id <id>]",
|
|
425
|
+
summary: "查询或恢复 Source Repository run;无目标时列出 runs",
|
|
426
|
+
access: "authenticated",
|
|
427
|
+
operationalNotes: ["结果未知时按原 clientRequestId 恢复;不能换一个幂等键重新提交。"],
|
|
428
|
+
examples: ["numa repository status --client-request-id create-order-20260822 --json"]
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
command: "repository events <run-no> [--after-sequence <number>]",
|
|
432
|
+
summary: "按单调 sequence 读取 Source Repository run 事件",
|
|
433
|
+
access: "authenticated",
|
|
434
|
+
examples: ["numa repository events run_01 --after-sequence 42 --json"]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
command: "repository plan get <plan-no>",
|
|
438
|
+
summary: "读取并审阅不可变的服务端仓库计划",
|
|
439
|
+
access: "authenticated",
|
|
440
|
+
operationalNotes: ["返回服务端 planHash、blockers、warnings 和 sideEffects;不产生副作用。"],
|
|
441
|
+
examples: ["numa repository plan get RP-1 --json"]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
command: "repository plan create --connection <code> --namespace <external-id> --name <name> [--initialization <empty|readme>]",
|
|
445
|
+
summary: "生成创建仓库的不可变服务端计划",
|
|
446
|
+
access: "role",
|
|
447
|
+
roles: ["mci-devops-platform-repository-planner", "mci-devops-platform-repository-operator"],
|
|
448
|
+
operationalNotes: ["先审阅 blockers、sideEffects 与 planHash;本命令不写 Provider。"],
|
|
449
|
+
examples: ["numa repository plan create --connection codeup-main --namespace 123 --name order-api --json"]
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
command: "repository plan register --connection <code> --external-id <id>",
|
|
453
|
+
summary: "生成接入既有远端仓库的不可变计划",
|
|
454
|
+
access: "role",
|
|
455
|
+
roles: ["mci-devops-platform-repository-planner", "mci-devops-platform-repository-operator"],
|
|
456
|
+
examples: ["numa repository plan register --connection codeup-main --external-id 456 --json"]
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
command: "repository plan use-existing --repository-key <key>",
|
|
460
|
+
summary: "生成复用受管仓库的不可变计划",
|
|
461
|
+
access: "role",
|
|
462
|
+
roles: ["mci-devops-platform-repository-planner", "mci-devops-platform-repository-operator"],
|
|
463
|
+
examples: ["numa repository plan use-existing --repository-key repo_01 --json"]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
command: "repository plan disable --repository-key <key>",
|
|
467
|
+
summary: "生成停用受管仓库的不可变计划",
|
|
468
|
+
access: "role",
|
|
469
|
+
roles: ["mci-devops-platform-repository-planner", "mci-devops-platform-repository-operator"],
|
|
470
|
+
examples: ["numa repository plan disable --repository-key repo_01 --json"]
|
|
471
|
+
},
|
|
472
|
+
...["create", "register", "disable"].map((action) => ({
|
|
473
|
+
command: `repository ${action} --plan-no <number> --plan-hash <hash> --client-request-id <id> --idempotency-key <key> --yes`,
|
|
474
|
+
summary: `按已审阅 plan 执行仓库${action === "create" ? "创建" : action === "register" ? "接入" : "停用"}`,
|
|
475
|
+
access: "role",
|
|
476
|
+
roles: ["mci-devops-platform-repository-operator"],
|
|
477
|
+
operationalNotes: ["client-request-id 与 idempotency-key 必须相同;结果未知时复用原值查询或重试。"],
|
|
478
|
+
examples: [`numa repository ${action} --plan-no RP-1 --plan-hash <64-hex> --client-request-id request-01 --idempotency-key request-01 --yes --json`]
|
|
479
|
+
})),
|
|
480
|
+
{
|
|
481
|
+
command: "repository retry <run-no> --yes",
|
|
482
|
+
summary: "重试服务端判定可恢复的仓库运行",
|
|
483
|
+
access: "role",
|
|
484
|
+
roles: ["mci-devops-platform-repository-operator"],
|
|
485
|
+
examples: ["numa repository retry RR-1 --yes --json"]
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
command: "repository reconcile <identifier> [--repository --idempotency-key <key>] --yes",
|
|
489
|
+
summary: "恢复仓库运行或重新观察受管仓库",
|
|
490
|
+
access: "role",
|
|
491
|
+
roles: ["mci-devops-platform-repository-operator"],
|
|
492
|
+
operationalNotes: [
|
|
493
|
+
"--repository 时必须提供并复用 idempotency-key。",
|
|
494
|
+
"legacy catalog 若缺 connectionCode、externalId 或 fullName,CLI 会标记 MIGRATION_REQUIRED 并拒绝不安全 reconcile。"
|
|
495
|
+
],
|
|
496
|
+
examples: ["numa repository reconcile repo_01 --repository --idempotency-key observe-repo-01 --yes --json"]
|
|
497
|
+
},
|
|
378
498
|
{
|
|
379
499
|
command: "app scm list [--provider <github|codeup>] [--search <text>]",
|
|
380
500
|
summary: "列出安全的 SCM 连接、缓存健康状态和能力",
|
|
@@ -388,6 +508,31 @@ export const COMMAND_CATALOG = [
|
|
|
388
508
|
operationalNotes: ["仓库结果固定返回 externalId、defaultBranch 和 headRevision;选择后 headRevision 成为 expectedHead。"],
|
|
389
509
|
examples: ["numa app scm inspect codeup-main --repositories --search order --limit 50 --json"]
|
|
390
510
|
},
|
|
511
|
+
{
|
|
512
|
+
command: "app scm namespace list <code> [--search <text>] [--cursor <cursor>] [--limit <number>]",
|
|
513
|
+
summary: "分页查询 SCM provider 中可创建仓库的 namespace",
|
|
514
|
+
access: "role",
|
|
515
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
516
|
+
operationalNotes: [
|
|
517
|
+
"Codeup 仓库创建必须使用返回的数字 externalId,而不是 namespace 显示路径。",
|
|
518
|
+
"JWT 由网关强制,最终 ops-admin Client Role 由 DevOps Controller 校验。"
|
|
519
|
+
],
|
|
520
|
+
examples: ["numa app scm namespace list codeup-main --search platform --json"]
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
command: "app scm repository list <code> [--search <text>] [--cursor <cursor>] [--limit <number>]",
|
|
524
|
+
summary: "通过独立 SCM 生命周期 API 分页查询仓库",
|
|
525
|
+
access: "role",
|
|
526
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
527
|
+
examples: ["numa app scm repository list codeup-main --search code-index --json"]
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
command: "app scm repository inspect <code> <external-id>",
|
|
531
|
+
summary: "通过 provider externalId 查询一个仓库",
|
|
532
|
+
access: "role",
|
|
533
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
534
|
+
examples: ["numa app scm repository inspect codeup-main 123456 --json"]
|
|
535
|
+
},
|
|
391
536
|
{
|
|
392
537
|
command: "app scm probe <code> [--live --revision <number>]",
|
|
393
538
|
summary: "查看缓存健康诊断,或由服务端授权执行 live probe",
|
|
@@ -426,6 +571,8 @@ export const COMMAND_CATALOG = [
|
|
|
426
571
|
operationalNotes: [
|
|
427
572
|
"非 TTY 必须提供 --spec,否则稳定返回 onboarding_input_required。",
|
|
428
573
|
"--plan 只保存草稿并执行预检;--apply 使用服务端 planHash 提交异步任务。",
|
|
574
|
+
"schemaVersion=2 只引用 Repository Control Plane 的 repositoryPlanRef 或 repositoryRef。",
|
|
575
|
+
"交互 TUI 新会话固定使用 schemaVersion=2;legacy v1 会话只能恢复查看,不能由 TUI preflight/apply。",
|
|
429
576
|
"结果不明时复用同一 idempotency-key,并用 inspect/resume 恢复,不能由客户端标记完成。"
|
|
430
577
|
],
|
|
431
578
|
examples: ["numa app onboard --spec onboarding.json --apply --idempotency-key app-order-20260819 --json"]
|
|
@@ -458,8 +605,12 @@ export const COMMAND_CATALOG = [
|
|
|
458
605
|
},
|
|
459
606
|
{
|
|
460
607
|
command: "app tui [--session <session-no>]",
|
|
461
|
-
summary: "
|
|
608
|
+
summary: "打开 v2 Repository Control Plane 入驻向导,或只读恢复 legacy v1 会话",
|
|
462
609
|
access: "authenticated",
|
|
610
|
+
operationalNotes: [
|
|
611
|
+
"新草稿固定为 schemaVersion=2;CREATE_NEW 输入 planNo/planHash,ATTACH_EXISTING 选择或输入 repositoryKey/expectedHead。",
|
|
612
|
+
"legacy schemaVersion=1 会话不会被注入或伪装成 v2,TUI preflight/apply 固定 fail-closed。"
|
|
613
|
+
],
|
|
463
614
|
examples: ["numa app tui --session 8d15ee89-43f0-4378-a7aa-51f09c5b42fc"]
|
|
464
615
|
},
|
|
465
616
|
...["retry", "reassess", "cancel"].map((action) => ({
|
|
@@ -509,6 +660,149 @@ export const COMMAND_CATALOG = [
|
|
|
509
660
|
],
|
|
510
661
|
examples: ["numa app candidate adopt 123 --yes --json"]
|
|
511
662
|
},
|
|
663
|
+
{
|
|
664
|
+
command: "gitops repository list [--status <status>] [--search <text>] [--cursor <cursor>] [--limit <number>]",
|
|
665
|
+
summary: "列出平台登记的 GitOps 仓库及健康状态",
|
|
666
|
+
access: "authenticated",
|
|
667
|
+
operationalNotes: ["仅使用平台 stable key;不接受任意仓库 URL、分支或本地 clone 路径。"],
|
|
668
|
+
examples: ["numa gitops repository list --json"]
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
command: "gitops repository get <repository-key>",
|
|
672
|
+
summary: "查看 GitOps 仓库登记、写入策略和最近探测信息",
|
|
673
|
+
access: "authenticated",
|
|
674
|
+
examples: ["numa gitops repository get mci-flux --json"]
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
command: "gitops repository probe <repository-key>",
|
|
678
|
+
summary: "由平台使用已登记 SCM 连接探测 GitOps 仓库",
|
|
679
|
+
access: "authenticated",
|
|
680
|
+
operationalNotes: ["CLI 不发送仓库 URL 或 Git 凭据。"],
|
|
681
|
+
examples: ["numa gitops repository probe mci-flux --json"]
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
command: "gitops target list [--status <status>] [--environment-id <id>] [--cursor <cursor>] [--limit <number>]",
|
|
685
|
+
summary: "列出多集群 GitOps Deployment targets",
|
|
686
|
+
access: "authenticated",
|
|
687
|
+
operationalNotes: ["Phase 1 服务端仅支持 status 和 environmentId 过滤。"],
|
|
688
|
+
examples: ["numa gitops target list --environment-id 12 --status active --json"]
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
command: "gitops target get <target-key>",
|
|
692
|
+
summary: "查看环境、集群、namespace、Flux installation 和仓库绑定",
|
|
693
|
+
access: "authenticated",
|
|
694
|
+
examples: ["numa gitops target get mci-dev-primary --json"]
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
command: "gitops target validate <target-key>",
|
|
698
|
+
summary: "执行 Phase 1 target topology-only 拓扑关系检查",
|
|
699
|
+
access: "authenticated",
|
|
700
|
+
operationalNotes: ["当前不宣称已校验 SCM 内容、overlay 文件、Flux 运行状态或 Jenkins image writer。"],
|
|
701
|
+
examples: ["numa gitops target validate mci-dev-primary --json"]
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
command: "gitops profile list [--status <status>] [--search <text>] [--cursor <cursor>] [--limit <number>]",
|
|
705
|
+
summary: "列出可复用的 GitOps layout profile 版本",
|
|
706
|
+
access: "authenticated",
|
|
707
|
+
examples: ["numa gitops profile list --status active --json"]
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
command: "gitops profile get <profile-code>",
|
|
711
|
+
summary: "查看 layout profile 及服务端返回的版本列表",
|
|
712
|
+
access: "authenticated",
|
|
713
|
+
examples: ["numa gitops profile get MCI_FLUX_V1 --json"]
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
command: "gitops service import --application <code> --target <target-key> [--profile <code>] [--profile-version <version>] --idempotency-key <key>",
|
|
717
|
+
summary: "从受管 target 的锁定 SCM revision 导入 MCI_FLUX_V1 服务绑定",
|
|
718
|
+
access: "role",
|
|
719
|
+
roles: [
|
|
720
|
+
"mci-devops-platform-gitops-planner",
|
|
721
|
+
"mci-devops-platform-gitops-operator",
|
|
722
|
+
"mci-devops-platform-ops-admin"
|
|
723
|
+
],
|
|
724
|
+
operationalNotes: [
|
|
725
|
+
"非 ops-admin 调用者还必须是应用 governing team 的 MEMBER;平台 ops-admin 可执行应急管理操作。",
|
|
726
|
+
"Idempotency-Key 对同一应用唯一;结果不明时必须复用原值,不能用新键重试。",
|
|
727
|
+
"导入只读取受管 SCM 并持久化 binding/snapshot,不写 SCM、不改变 image tag。"
|
|
728
|
+
],
|
|
729
|
+
examples: ["numa gitops service import --application code-index --target mci-dev-primary --idempotency-key code-index-dev-import-1 --json"]
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
command: "gitops service plan --application <code> --target <target-key> [--profile <code>] [--profile-version <version>] [--service-id <id>] --spec <file>",
|
|
733
|
+
summary: "使用唯一受管 MCI_FLUX_V1 renderer 生成并持久化结构变更计划",
|
|
734
|
+
access: "role",
|
|
735
|
+
roles: [
|
|
736
|
+
"mci-devops-platform-gitops-planner",
|
|
737
|
+
"mci-devops-platform-gitops-operator",
|
|
738
|
+
"mci-devops-platform-ops-admin"
|
|
739
|
+
],
|
|
740
|
+
operationalNotes: [
|
|
741
|
+
"非 ops-admin 调用者还必须是应用 governing team 的 MEMBER;service-id 是已有 binding 的字符串标识。",
|
|
742
|
+
"spec 禁止整个 image 及应用、环境、namespace、release、仓库、分支和 Flux 路径等平台受管字段。",
|
|
743
|
+
"计划锁定 target/profile version/base revision/canonicalSpecHash/planHash,只持久化 plan/snapshot,不写 SCM。",
|
|
744
|
+
"执行必须另行调用 apply;当前 CLI 仍不开放 observe。"
|
|
745
|
+
],
|
|
746
|
+
examples: ["numa gitops service plan --application code-index --target mci-dev-primary --spec gitops-service.json --json"]
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
command: "gitops service apply <plan-number> --plan-hash <64-hex> --idempotency-key <key> --yes",
|
|
750
|
+
summary: "按不可变服务端计划执行受管 GitOps 结构变更",
|
|
751
|
+
access: "role",
|
|
752
|
+
roles: ["mci-devops-platform-gitops-operator", "mci-devops-platform-ops-admin"],
|
|
753
|
+
operationalNotes: [
|
|
754
|
+
"必须原样提交 planNumber 和 64 位 lower-case planHash;CLI 不接受仓库、路径、分支或镜像参数。",
|
|
755
|
+
"未知结果必须使用同一 plan 和 Idempotency-Key 重试,不能换键重新提交。",
|
|
756
|
+
"生产 target 由服务端强制 ops-admin;非生产要求 gitops-operator 和应用团队 MAINTAINER。",
|
|
757
|
+
"DIRECT_BRANCH 可直接完成;REVIEWED_CHANGE 可进入 WAITING_REVIEW 并返回 reviewUrl。"
|
|
758
|
+
],
|
|
759
|
+
examples: ["numa gitops service apply gplan_01 --plan-hash <64-hex> --idempotency-key code-index-dev-apply-1 --yes --json"]
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
command: "gitops service status <run-number>",
|
|
763
|
+
summary: "按 stable runNo 或数字 ID 查询 GitOps change run",
|
|
764
|
+
access: "role",
|
|
765
|
+
roles: [
|
|
766
|
+
"mci-devops-platform-gitops-reader",
|
|
767
|
+
"mci-devops-platform-gitops-planner",
|
|
768
|
+
"mci-devops-platform-gitops-operator",
|
|
769
|
+
"mci-devops-platform-ops-admin"
|
|
770
|
+
],
|
|
771
|
+
operationalNotes: ["非 ops-admin 调用者还必须是关联应用 governing team 的 VIEWER。"],
|
|
772
|
+
examples: ["numa gitops service status gplan_01 --json", "numa gitops service status 42 --json"]
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
command: "gitops service events <run-number>",
|
|
776
|
+
summary: "按 stable runNo 或数字 ID 读取 GitOps change run 事件",
|
|
777
|
+
access: "role",
|
|
778
|
+
roles: [
|
|
779
|
+
"mci-devops-platform-gitops-reader",
|
|
780
|
+
"mci-devops-platform-gitops-planner",
|
|
781
|
+
"mci-devops-platform-gitops-operator",
|
|
782
|
+
"mci-devops-platform-ops-admin"
|
|
783
|
+
],
|
|
784
|
+
operationalNotes: [
|
|
785
|
+
"非 ops-admin 调用者还必须是关联应用 governing team 的 VIEWER。",
|
|
786
|
+
"事件按 sequence 升序返回,type/createdAt/details 是 eventType/occurredAt/output 的稳定别名。"
|
|
787
|
+
],
|
|
788
|
+
examples: ["numa gitops service events gplan_01 --json", "numa gitops service events 42 --json"]
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
command: "gitops service evidence <service-binding-id>",
|
|
792
|
+
summary: "查看 Jenkins 镜像更新与独立 Flux runtime observation 证据",
|
|
793
|
+
access: "role",
|
|
794
|
+
roles: [
|
|
795
|
+
"mci-devops-platform-gitops-reader",
|
|
796
|
+
"mci-devops-platform-gitops-planner",
|
|
797
|
+
"mci-devops-platform-gitops-operator",
|
|
798
|
+
"mci-devops-platform-ops-admin"
|
|
799
|
+
],
|
|
800
|
+
operationalNotes: [
|
|
801
|
+
"非 ops-admin 调用者还必须是关联 service binding governing team 的 VIEWER。",
|
|
802
|
+
"CLI 仅查询证据,不开放内部 observe 写接口;JENKINS_ATTESTED 不能单独把 target 标记为 ACTIVE。"
|
|
803
|
+
],
|
|
804
|
+
examples: ["numa gitops service evidence 77 --json"]
|
|
805
|
+
},
|
|
512
806
|
{
|
|
513
807
|
command: "pipeline list [--app <code>] [--tier <tier>] [--branch <name>]",
|
|
514
808
|
summary: "列出当前用户可见的 Jenkins 应用流水线",
|
|
@@ -632,6 +926,81 @@ export const COMMAND_CATALOG = [
|
|
|
632
926
|
access: "authenticated",
|
|
633
927
|
examples: ["numa media library publish --manifest library-entry.json --json"]
|
|
634
928
|
},
|
|
929
|
+
{
|
|
930
|
+
command: "cluster list",
|
|
931
|
+
summary: "列出 Cluster Control Plane 中已治理的跨集群 inventory",
|
|
932
|
+
access: "role",
|
|
933
|
+
roles: ["mci-devops-platform-cluster-reader", "mci-devops-platform-ops-admin"],
|
|
934
|
+
examples: ["numa cluster list --json"]
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
command: "cluster read <cluster-key>",
|
|
938
|
+
summary: "按 stable clusterKey 查看脱敏集群详情和身份指纹类型",
|
|
939
|
+
access: "role",
|
|
940
|
+
roles: ["mci-devops-platform-cluster-reader", "mci-devops-platform-ops-admin"],
|
|
941
|
+
examples: ["numa cluster read clu_0123456789abcdef0123456789abcdef --json"]
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
command: "cluster run <run-no>",
|
|
945
|
+
summary: "查询 ACK discovery 异步运行状态",
|
|
946
|
+
access: "role",
|
|
947
|
+
roles: ["mci-devops-platform-cluster-reader", "mci-devops-platform-ops-admin"],
|
|
948
|
+
examples: ["numa cluster run cdr_01 --json"]
|
|
949
|
+
},
|
|
950
|
+
...["sources [source-key]", "candidates [candidate-key]", "observations [observation-key]"].map((command) => ({
|
|
951
|
+
command: `cluster ${command}`,
|
|
952
|
+
summary: `读取脱敏 cluster ${command.split(" ")[0]} inventory`,
|
|
953
|
+
access: "role",
|
|
954
|
+
roles: ["mci-devops-platform-cluster-reader", "mci-devops-platform-ops-admin"],
|
|
955
|
+
examples: [`numa cluster ${command.split(" ")[0]} --json`]
|
|
956
|
+
})),
|
|
957
|
+
{
|
|
958
|
+
command: "cluster source create --source-key <key> --type <kubeconfig|ack> --display-name <name> [--aliyun-account-id <id> --aliyun-assume-role-id <id> --region <region>...] --idempotency-key <key> --yes",
|
|
959
|
+
summary: "登记 kubeconfig CLI 或 ACK assume-role discovery source",
|
|
960
|
+
access: "role",
|
|
961
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
962
|
+
operationalNotes: ["ACK 只引用平台 accountId 和必选 ACTIVE assumeRoleId;CLI/浏览器不接触 AK/SK。"],
|
|
963
|
+
examples: ["numa cluster source create --source-key ack-prod --type ack --display-name 'ACK production' --aliyun-account-id 7 --aliyun-assume-role-id 12 --region cn-shenzhen --idempotency-key source-ack-prod-1 --yes --json"]
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
command: "cluster source update <source-key> --expected-version <number> --idempotency-key <key> --yes",
|
|
967
|
+
summary: "用乐观锁和幂等键更新 discovery source",
|
|
968
|
+
access: "role",
|
|
969
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
970
|
+
examples: ["numa cluster source update ack-prod --expected-version 2 --enable --idempotency-key source-ack-prod-v2 --yes --json"]
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
command: "cluster source discover <source-key> --idempotency-key <key> --yes",
|
|
974
|
+
summary: "启动 ACK assume-role source 的服务端只读发现",
|
|
975
|
+
access: "role",
|
|
976
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
977
|
+
examples: ["numa cluster source discover ack-prod --idempotency-key discover-ack-prod-20260822 --yes --json"]
|
|
978
|
+
},
|
|
979
|
+
...["adopt", "link", "ignore"].map((action) => ({
|
|
980
|
+
command: `cluster candidate ${action} <candidate-key> --idempotency-key <key> --yes`,
|
|
981
|
+
summary: `${action} cluster discovery candidate,并持久化审计原因和乐观锁版本`,
|
|
982
|
+
access: "role",
|
|
983
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
984
|
+
examples: [`numa cluster candidate ${action} cand_01 --help`]
|
|
985
|
+
})),
|
|
986
|
+
{
|
|
987
|
+
command: "cluster discover kubeconfig [--context <name>] [--kubeconfig <file>] [--timeout <seconds>]",
|
|
988
|
+
summary: "本地只读调用 kubectl 并输出可审阅的严格脱敏 JSON plan",
|
|
989
|
+
access: "public",
|
|
990
|
+
operationalNotes: [
|
|
991
|
+
"使用 execFile 参数数组和短超时;不会输出或上传 endpoint、kube-system UID、CA、user、token、cert、exec、auth-provider 或 kubectl stderr。",
|
|
992
|
+
"只输出 raw ACK providerClusterId;endpoint、UID、CA 仅输出服务端可校验 SHA-256。"
|
|
993
|
+
],
|
|
994
|
+
examples: ["numa cluster discover kubeconfig --json > cluster-discovery.json"]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
command: "cluster discover submit --file <plan.json> --source <source-key> --idempotency-key <key> --yes",
|
|
998
|
+
summary: "把已审阅的本地 kubeconfig discovery plan 原子批量提交",
|
|
999
|
+
access: "role",
|
|
1000
|
+
roles: ["mci-devops-platform-ops-admin"],
|
|
1001
|
+
operationalNotes: ["discover 与 submit 分离;未知结果必须用同一 source、plan 和 Idempotency-Key 重放,禁止逐 context 循环提交。"],
|
|
1002
|
+
examples: ["numa cluster discover submit --file cluster-discovery.json --source local-kubeconfig --idempotency-key kube-observe-20260822-01 --yes --json"]
|
|
1003
|
+
},
|
|
635
1004
|
{
|
|
636
1005
|
command: "serve",
|
|
637
1006
|
summary: "运行兼容的 stdio MCP 服务",
|