@numa-tech/numa 1.12.10 → 1.13.0
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 +96 -14
- package/dist/ai-registry/commands.js +33 -33
- package/dist/ai-registry/commands.js.map +1 -1
- package/dist/app-config.d.ts +0 -1
- package/dist/app-config.js +4 -2
- package/dist/app-config.js.map +1 -1
- 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 +66 -4
- 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 +18 -0
- package/dist/application-onboarding/tui-model.js +215 -3
- package/dist/application-onboarding/tui-model.js.map +1 -1
- package/dist/application-onboarding/tui.d.ts +1 -1
- package/dist/application-onboarding/tui.js +20 -6
- package/dist/application-onboarding/tui.js.map +1 -1
- package/dist/authorization/access-request-client.d.ts +45 -0
- package/dist/authorization/access-request-client.js +93 -0
- package/dist/authorization/access-request-client.js.map +1 -0
- package/dist/authorization/access-request-commands.d.ts +25 -0
- package/dist/authorization/access-request-commands.js +196 -0
- package/dist/authorization/access-request-commands.js.map +1 -0
- package/dist/authorization/access-request-schemas.d.ts +123 -0
- package/dist/authorization/access-request-schemas.js +67 -0
- package/dist/authorization/access-request-schemas.js.map +1 -0
- package/dist/authorization/client.d.ts +50 -0
- package/dist/authorization/client.js +113 -0
- package/dist/authorization/client.js.map +1 -0
- package/dist/authorization/commands.d.ts +40 -0
- package/dist/authorization/commands.js +296 -0
- package/dist/authorization/commands.js.map +1 -0
- package/dist/authorization/errors.d.ts +13 -0
- package/dist/authorization/errors.js +70 -0
- package/dist/authorization/errors.js.map +1 -0
- package/dist/authorization/schemas.d.ts +187 -0
- package/dist/authorization/schemas.js +101 -0
- package/dist/authorization/schemas.js.map +1 -0
- package/dist/cli.js +73 -9
- 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 +490 -26
- 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 +540 -0
- package/dist/repositories/client.js +215 -0
- package/dist/repositories/client.js.map +1 -0
- package/dist/repositories/commands.d.ts +10 -0
- package/dist/repositories/commands.js +347 -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 +1692 -0
- package/dist/repositories/schemas.js +255 -0
- package/dist/repositories/schemas.js.map +1 -0
- package/dist/web-console-page.d.ts +1 -1
- package/dist/web-console-page.js +1 -1
- package/dist/web-console.js +2 -2
- package/dist/web-console.js.map +1 -1
- package/examples/ai-registry/README.md +18 -0
- package/examples/ai-registry/nacos-instance.username-password.example.json +25 -0
- package/package.json +4 -4
- package/skills/numa-ai-registry/SKILL.md +5 -5
- package/skills/numa-ai-registry/evals/evals.json +1 -1
- package/skills/numa-ai-registry/references/command-contract.md +22 -22
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function redactRepositoryText(value: string): string;
|
|
2
|
+
export declare function sanitizeRepositoryOutput(value: unknown, key?: string): unknown;
|
|
3
|
+
export declare class RepositoryError extends Error {
|
|
4
|
+
readonly code: string;
|
|
5
|
+
readonly status?: number | undefined;
|
|
6
|
+
readonly requestId?: string | undefined;
|
|
7
|
+
readonly details?: unknown;
|
|
8
|
+
constructor(message: string, code: string, status?: number | undefined, requestId?: string | undefined, details?: unknown);
|
|
9
|
+
}
|
|
10
|
+
export declare function repositoryExitCode(error: RepositoryError): number;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const SENSITIVE_KEY_PARTS = [
|
|
2
|
+
"secret", "password", "passphrase", "credential", "token", "privatekey",
|
|
3
|
+
"signingkey", "encryptionkey", "apikey", "accesskey", "baseurl", "cloneurl"
|
|
4
|
+
];
|
|
5
|
+
function sensitiveKey(key) {
|
|
6
|
+
const normalized = key.replace(/[^A-Za-z0-9]/gu, "").toLowerCase();
|
|
7
|
+
return SENSITIVE_KEY_PARTS.some((part) => normalized.includes(part));
|
|
8
|
+
}
|
|
9
|
+
export function redactRepositoryText(value) {
|
|
10
|
+
return value
|
|
11
|
+
.replace(/\b(Bearer|Basic)\s+[^\s,;]+/giu, "$1 [REDACTED]")
|
|
12
|
+
.replace(/([?&](?:access_token|refresh_token|token|signature|credential|api[_-]?key)=)[^&#\s]+/giu, "$1[REDACTED]")
|
|
13
|
+
.replace(/\b((?:password|passwd|token|api[_-]?key|access[_-]?token|refresh[_-]?token|secret|credential)\s*[=:]\s*)[^\s,;]+/giu, "$1[REDACTED]")
|
|
14
|
+
.replace(/(https?:\/\/)[^\s/@:]+:[^\s/@]+@/giu, "$1[REDACTED]@")
|
|
15
|
+
.replace(/("(?:accessToken|refreshToken|apiToken|clientSecret|password|secret|token|credential)"\s*:\s*")[^"]*(")/giu, "$1[REDACTED]$2")
|
|
16
|
+
.replace(/(?<![A-Za-z0-9_-])eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?![A-Za-z0-9_-])/gu, "[REDACTED_JWT]");
|
|
17
|
+
}
|
|
18
|
+
export function sanitizeRepositoryOutput(value, key = "") {
|
|
19
|
+
if (/configured$/iu.test(key) && typeof value === "boolean")
|
|
20
|
+
return value;
|
|
21
|
+
if (sensitiveKey(key))
|
|
22
|
+
return "[REDACTED]";
|
|
23
|
+
if (typeof value === "string")
|
|
24
|
+
return redactRepositoryText(value);
|
|
25
|
+
if (Array.isArray(value))
|
|
26
|
+
return value.map((item) => sanitizeRepositoryOutput(item));
|
|
27
|
+
if (value && typeof value === "object") {
|
|
28
|
+
return Object.fromEntries(Object.entries(value)
|
|
29
|
+
.map(([name, item]) => [name, sanitizeRepositoryOutput(item, name)]));
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
export class RepositoryError extends Error {
|
|
34
|
+
code;
|
|
35
|
+
status;
|
|
36
|
+
requestId;
|
|
37
|
+
details;
|
|
38
|
+
constructor(message, code, status, requestId, details) {
|
|
39
|
+
super(redactRepositoryText(message));
|
|
40
|
+
this.code = code;
|
|
41
|
+
this.status = status;
|
|
42
|
+
this.requestId = requestId;
|
|
43
|
+
this.name = "RepositoryError";
|
|
44
|
+
this.details = details == null ? undefined : sanitizeRepositoryOutput(details);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function repositoryExitCode(error) {
|
|
48
|
+
if (error.status === 401)
|
|
49
|
+
return 3;
|
|
50
|
+
if (error.status === 403 || /(?:FORBIDDEN|GOVERNANCE_REQUIRED)/u.test(error.code))
|
|
51
|
+
return 4;
|
|
52
|
+
if (error.status === 409 || /(?:STALE|CONFLICT|PLAN_HASH)/u.test(error.code))
|
|
53
|
+
return 5;
|
|
54
|
+
if ((error.status ?? 0) >= 500 || /(?:UNAVAILABLE|RECONCILE_FAILED|RESULT_UNKNOWN)/u.test(error.code))
|
|
55
|
+
return 6;
|
|
56
|
+
if (/(?:CLI_INPUT|IDEMPOTENCY|PLAN_REQUIRED|PLAN_OPERATION)/u.test(error.code))
|
|
57
|
+
return 2;
|
|
58
|
+
return 1;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/repositories/errors.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAG;IAC1B,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY;IACvE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU;CACnE,CAAC;AAEX,SAAS,YAAY,CAAC,GAAW;IAC/B,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACnE,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK;SACT,OAAO,CAAC,gCAAgC,EAAE,eAAe,CAAC;SAC1D,OAAO,CAAC,yFAAyF,EAAE,cAAc,CAAC;SAClH,OAAO,CAAC,qHAAqH,EAAE,cAAc,CAAC;SAC9I,OAAO,CAAC,qCAAqC,EAAE,eAAe,CAAC;SAC/D,OAAO,CAAC,4GAA4G,EAAE,gBAAgB,CAAC;SACvI,OAAO,CAAC,iGAAiG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