@kubbisec/ai-linux-x64 0.1.22 → 0.1.23
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/bin/kubbisec +0 -0
- package/bundled/components/kubbisec-model-selector.d.ts +47 -34
- package/bundled/components/kubbisec-model-selector.js +187 -177
- package/bundled/config/config.d.ts +6 -6
- package/bundled/config/config.js +54 -52
- package/bundled/config/detect-local-llm-providers.d.ts +26 -16
- package/bundled/config/detect-local-llm-providers.js +130 -142
- package/bundled/config/ensure-kbs-project-settings.d.ts +8 -8
- package/bundled/config/ensure-kbs-project-settings.js +27 -28
- package/bundled/config/ensure-kubbisec-project-settings.d.ts +9 -9
- package/bundled/config/ensure-kubbisec-project-settings.js +62 -67
- package/bundled/config/extended-context.d.ts +5 -6
- package/bundled/config/extended-context.js +23 -22
- package/bundled/config/feature-flags.d.ts +10 -2
- package/bundled/config/feature-flags.js +8 -2
- package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
- package/bundled/config/format-kubbisec-footer-status.js +26 -31
- package/bundled/config/kubbisec-extension-manifest.d.ts +21 -2
- package/bundled/config/kubbisec-extension-manifest.js +19 -19
- package/bundled/config/llm-config-mutations.d.ts +51 -25
- package/bundled/config/llm-config-mutations.js +173 -182
- package/bundled/config/llm-config.d.ts +54 -41
- package/bundled/config/llm-config.js +199 -199
- package/bundled/config/llm-provider-catalog.d.ts +18 -15
- package/bundled/config/llm-provider-catalog.js +45 -46
- package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
- package/bundled/config/materialize-kubbisec-pi-resources.js +173 -182
- package/bundled/config/register-custom-llm-providers.d.ts +11 -5
- package/bundled/config/register-custom-llm-providers.js +17 -15
- package/bundled/config/register-kubbisec-llm-provider.d.ts +14 -10
- package/bundled/config/register-kubbisec-llm-provider.js +50 -42
- package/bundled/config/resolve-agents-context-file.d.ts +1 -1
- package/bundled/config/resolve-agents-context-file.js +33 -34
- package/bundled/config/resource-budget.d.ts +12 -12
- package/bundled/config/resource-budget.js +28 -28
- package/bundled/config/sync-kubbisec-pi-models.d.ts +6 -3
- package/bundled/config/sync-kubbisec-pi-models.js +58 -58
- package/bundled/copy/cli-reference-index.d.ts +1 -1
- package/bundled/copy/cli-reference-index.js +1 -1
- package/bundled/copy/kubbisec-shell-copy.d.ts +11 -6
- package/bundled/copy/kubbisec-shell-copy.js +1 -1
- package/bundled/extensions/cli-local-shared.d.ts +56 -32
- package/bundled/extensions/cli-local-shared.js +135 -125
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
- package/bundled/extensions/kubbisec-aspm-local.extension.js +109 -106
- package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-brand.extension.js +25 -25
- package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
- package/bundled/extensions/kubbisec-clarify.extension.d.ts +64 -35
- package/bundled/extensions/kubbisec-clarify.extension.js +323 -305
- package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-exit.extension.js +29 -32
- package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-extended-context.extension.js +56 -43
- package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
- package/bundled/extensions/kubbisec-footer.extension.js +205 -215
- package/bundled/extensions/kubbisec-github-local.extension.d.ts +26 -18
- package/bundled/extensions/kubbisec-github-local.extension.js +430 -417
- package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-llm-config.extension.js +200 -181
- package/bundled/extensions/kubbisec-memory.extension.d.ts +9 -7
- package/bundled/extensions/kubbisec-memory.extension.js +88 -95
- package/bundled/extensions/kubbisec-naus-local.extension.d.ts +18 -15
- package/bundled/extensions/kubbisec-naus-local.extension.js +123 -103
- package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +31 -21
- package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
- package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +10 -8
- package/bundled/extensions/kubbisec-runtime-status.extension.js +15 -13
- package/bundled/extensions/kubbisec-scope.extension.d.ts +12 -7
- package/bundled/extensions/kubbisec-scope.extension.js +13 -13
- package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +27 -16
- package/bundled/extensions/kubbisec-skill-mentions.extension.js +74 -64
- package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +2 -3
- package/bundled/extensions/kubbisec-skill-telemetry.extension.js +59 -64
- package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-theme-lock.extension.js +33 -34
- package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
- package/bundled/extensions/kubbisec-ui.extension.js +90 -92
- package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
- package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
- package/bundled/resolve-bundled-dist-root.js +121 -130
- package/bundled/skills/at-path-mentions.d.ts +1 -1
- package/bundled/skills/at-path-mentions.js +146 -153
- package/bundled/skills/chat-mention-render.d.ts +2 -2
- package/bundled/skills/chat-mention-render.js +121 -126
- package/bundled/skills/chat-mentions.d.ts +17 -8
- package/bundled/skills/chat-mentions.js +76 -76
- package/bundled/skills/list-bundled-skills.d.ts +3 -3
- package/bundled/skills/list-bundled-skills.js +33 -35
- package/bundled/skills/skill-mention.d.ts +10 -2
- package/bundled/skills/skill-mention.js +10 -2
- package/bundled/theme/clear-terminal.d.ts +1 -1
- package/bundled/theme/clear-terminal.js +3 -4
- package/bundled/theme/footer-render-hook.d.ts +1 -1
- package/bundled/theme/footer-render-hook.js +3 -3
- package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
- package/bundled/theme/kubbisec-brand-fg.js +2 -2
- package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
- package/bundled/theme/kubbisec-menu-themes.js +30 -31
- package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
- package/bundled/theme/kubbisec-theme-name.js +1 -1
- package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
- package/bundled/theme/patch-pi-settings-theme.runtime.js +11 -10
- package/bundled/theme/render-compact-header.d.ts +13 -5
- package/bundled/theme/render-compact-header.js +126 -128
- package/bundled/workflow/session-workflow-mode.d.ts +1 -1
- package/bundled/workflow/session-workflow-mode.js +33 -33
- package/package.json +1 -1
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
|
+
|
|
4
5
|
const CONTEXT_FILENAMES = ["AGENTS.md", "CLAUDE.md"];
|
|
5
6
|
export function findAgentsContextFile(startDir) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
const parent = path.dirname(dir);
|
|
15
|
-
if (parent === dir)
|
|
16
|
-
return undefined;
|
|
17
|
-
dir = parent;
|
|
7
|
+
let dir = path.resolve(startDir);
|
|
8
|
+
while (true) {
|
|
9
|
+
for (const name of CONTEXT_FILENAMES) {
|
|
10
|
+
const candidate = path.join(dir, name);
|
|
11
|
+
if (fs.existsSync(candidate) && fs.statSync(candidate).isFile()) {
|
|
12
|
+
return candidate;
|
|
13
|
+
}
|
|
18
14
|
}
|
|
15
|
+
const parent = path.dirname(dir);
|
|
16
|
+
if (parent === dir) return undefined;
|
|
17
|
+
dir = parent;
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
export function formatAgentsContextLabel(filePath, home) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
const base = path.basename(filePath);
|
|
22
|
+
const homeDir = home?.trim();
|
|
23
|
+
if (!homeDir) return base;
|
|
24
|
+
const resolved = resolve(filePath);
|
|
25
|
+
const resolvedHome = resolve(homeDir);
|
|
26
|
+
const rel = relative(resolvedHome, resolved);
|
|
27
|
+
const insideHome =
|
|
28
|
+
rel === "" || (rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));
|
|
29
|
+
if (!insideHome) {
|
|
30
|
+
return `${base} (${truncatePathMiddle(resolved, 48)})`;
|
|
31
|
+
}
|
|
32
|
+
const short = rel === "" ? `~/${base}` : `~${sep}${rel}`;
|
|
33
|
+
return truncatePathMiddle(short, 56);
|
|
34
34
|
}
|
|
35
35
|
function truncatePathMiddle(text, maxLen) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return text.slice(0, head) + ellipsis + text.slice(-tail);
|
|
36
|
+
if (text.length <= maxLen) return text;
|
|
37
|
+
const ellipsis = "…";
|
|
38
|
+
const room = Math.max(4, maxLen - ellipsis.length);
|
|
39
|
+
const head = Math.max(2, Math.ceil(room * 0.45));
|
|
40
|
+
const tail = Math.max(2, room - head);
|
|
41
|
+
return text.slice(0, head) + ellipsis + text.slice(-tail);
|
|
43
42
|
}
|
|
44
43
|
export function formatKubbisecContextStatus(filePath, home) {
|
|
45
|
-
|
|
44
|
+
return `ctx ${formatAgentsContextLabel(filePath, home)}`;
|
|
46
45
|
}
|
|
47
|
-
//# sourceMappingURL=resolve-agents-context-file.js.map
|
|
46
|
+
//# sourceMappingURL=resolve-agents-context-file.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export type ResourceBudget = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
lowResource: boolean;
|
|
3
|
+
maxActiveSkills: number;
|
|
4
|
+
maxSkillsArgv: number;
|
|
5
|
+
routerTopK: number;
|
|
6
|
+
gateSampleSize: number;
|
|
7
|
+
orchestratorParallel: number;
|
|
8
|
+
onlineTrainerConcurrency: number;
|
|
9
|
+
telemetryMaxStepsPerFlush: number;
|
|
10
|
+
mem0AutoCapture: boolean;
|
|
11
|
+
clarifyMaxRounds: number;
|
|
12
|
+
editBudgetMaxOps: number;
|
|
13
13
|
};
|
|
14
14
|
export declare const LOW_RESOURCE_DEFAULTS: Omit<ResourceBudget, "lowResource">;
|
|
15
15
|
export declare const NORMAL_RESOURCE_DEFAULTS: Omit<ResourceBudget, "lowResource">;
|
|
16
16
|
export declare function resolveResourceBudget(env?: NodeJS.ProcessEnv): ResourceBudget;
|
|
17
|
-
//# sourceMappingURL=resource-budget.d.ts.map
|
|
17
|
+
//# sourceMappingURL=resource-budget.d.ts.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { envFlagOn, isMemoryEnabled } from "./feature-flags.js";
|
|
2
2
|
export const LOW_RESOURCE_DEFAULTS = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
maxActiveSkills: 2,
|
|
4
|
+
maxSkillsArgv: 2,
|
|
5
|
+
routerTopK: 2,
|
|
6
|
+
gateSampleSize: 2,
|
|
7
|
+
orchestratorParallel: 1,
|
|
8
|
+
onlineTrainerConcurrency: 1,
|
|
9
|
+
telemetryMaxStepsPerFlush: 20,
|
|
10
|
+
mem0AutoCapture: false,
|
|
11
|
+
clarifyMaxRounds: 1,
|
|
12
|
+
editBudgetMaxOps: 6,
|
|
13
13
|
};
|
|
14
14
|
export const NORMAL_RESOURCE_DEFAULTS = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
maxActiveSkills: 3,
|
|
16
|
+
maxSkillsArgv: 3,
|
|
17
|
+
routerTopK: 3,
|
|
18
|
+
gateSampleSize: 8,
|
|
19
|
+
orchestratorParallel: 3,
|
|
20
|
+
onlineTrainerConcurrency: 2,
|
|
21
|
+
telemetryMaxStepsPerFlush: 50,
|
|
22
|
+
mem0AutoCapture: true,
|
|
23
|
+
clarifyMaxRounds: 2,
|
|
24
|
+
editBudgetMaxOps: 12,
|
|
25
25
|
};
|
|
26
26
|
export function resolveResourceBudget(env = process.env) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const lowResource = envFlagOn(env, "KUBBISEC_LOW_RESOURCE");
|
|
28
|
+
const defaults = lowResource ? LOW_RESOURCE_DEFAULTS : NORMAL_RESOURCE_DEFAULTS;
|
|
29
|
+
return {
|
|
30
|
+
lowResource,
|
|
31
|
+
...defaults,
|
|
32
|
+
mem0AutoCapture: lowResource ? false : isMemoryEnabled(env),
|
|
33
|
+
};
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=resource-budget.js.map
|
|
35
|
+
//# sourceMappingURL=resource-budget.js.map
|
|
@@ -6,7 +6,10 @@ export declare function resolvePiAgentModelsJsonPath(): string;
|
|
|
6
6
|
* Materialize KubbiSec (and custom BYOK/local) providers into `~/.kubbisec/agent/models.json`
|
|
7
7
|
* so chat bootstrap can use `defaultProvider` from `.kubbisec/llm.json`.
|
|
8
8
|
*/
|
|
9
|
-
export declare function syncKubbisecProvidersToPiModelsJson(
|
|
9
|
+
export declare function syncKubbisecProvidersToPiModelsJson(
|
|
10
|
+
cwd?: string,
|
|
11
|
+
options?: {
|
|
10
12
|
modelsJsonPath?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
+
},
|
|
14
|
+
): boolean;
|
|
15
|
+
//# sourceMappingURL=sync-kubbisec-pi-models.d.ts.map
|
|
@@ -3,51 +3,51 @@ import * as os from "node:os";
|
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { readLlmConfig, resolveApiKeyValue } from "./llm-config.js";
|
|
5
5
|
import { KUBBISEC_LLM_PROVIDER_ID, toProviderModelConfig } from "./llm-provider-catalog.js";
|
|
6
|
-
import { buildKubbisecLlmProviderConfig
|
|
6
|
+
import { buildKubbisecLlmProviderConfig } from "./register-kubbisec-llm-provider.js";
|
|
7
7
|
/** Matches Pi `getAgentDir()` when runtime is branded (`piConfig.configDir: ".kubbisec"`). */
|
|
8
8
|
export const KUBBISEC_PI_AGENT_CONFIG_DIR = ".kubbisec";
|
|
9
9
|
function expandTildePath(filePath) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return path.join(os.homedir(), filePath.slice(2));
|
|
14
|
-
return filePath;
|
|
10
|
+
if (filePath === "~") return os.homedir();
|
|
11
|
+
if (filePath.startsWith("~/")) return path.join(os.homedir(), filePath.slice(2));
|
|
12
|
+
return filePath;
|
|
15
13
|
}
|
|
16
14
|
export function resolvePiAgentModelsJsonPath() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
const envDir = process.env.KUBBISEC_CODING_AGENT_DIR?.trim();
|
|
16
|
+
if (envDir) {
|
|
17
|
+
return path.join(expandTildePath(envDir), "models.json");
|
|
18
|
+
}
|
|
19
|
+
return path.join(os.homedir(), KUBBISEC_PI_AGENT_CONFIG_DIR, "agent", "models.json");
|
|
22
20
|
}
|
|
23
21
|
function readPiModelsJson(filePath) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
catch {
|
|
35
|
-
/* missing or invalid */
|
|
22
|
+
try {
|
|
23
|
+
const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
|
24
|
+
if (
|
|
25
|
+
parsed &&
|
|
26
|
+
typeof parsed === "object" &&
|
|
27
|
+
!Array.isArray(parsed) &&
|
|
28
|
+
typeof parsed.providers === "object" &&
|
|
29
|
+
parsed.providers !== null
|
|
30
|
+
) {
|
|
31
|
+
return parsed;
|
|
36
32
|
}
|
|
37
|
-
|
|
33
|
+
} catch {
|
|
34
|
+
/* missing or invalid */
|
|
35
|
+
}
|
|
36
|
+
return { providers: {} };
|
|
38
37
|
}
|
|
39
38
|
function buildCustomProviderPiEntry(provider) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
const apiKey =
|
|
40
|
+
resolveApiKeyValue(provider.apiKey) ?? (provider.autodetected ? provider.apiKey : undefined);
|
|
41
|
+
return {
|
|
42
|
+
name: provider.name?.trim() || provider.id,
|
|
43
|
+
baseUrl: provider.baseUrl,
|
|
44
|
+
...(apiKey ? { apiKey } : {}),
|
|
45
|
+
api: provider.api ?? "openai-completions",
|
|
46
|
+
...(provider.headers && Object.keys(provider.headers).length > 0
|
|
47
|
+
? { headers: provider.headers }
|
|
48
|
+
: {}),
|
|
49
|
+
models: provider.models.map(toProviderModelConfig),
|
|
50
|
+
};
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Pi resolves `--provider` from models.json before extensions load.
|
|
@@ -55,27 +55,27 @@ function buildCustomProviderPiEntry(provider) {
|
|
|
55
55
|
* so chat bootstrap can use `defaultProvider` from `.kubbisec/llm.json`.
|
|
56
56
|
*/
|
|
57
57
|
export function syncKubbisecProvidersToPiModelsJson(cwd = process.cwd(), options) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
const kubbisec = buildKubbisecLlmProviderConfig(cwd);
|
|
59
|
+
const customProviders = readLlmConfig(cwd).providers ?? [];
|
|
60
|
+
if (!kubbisec && customProviders.length === 0) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const filePath = options?.modelsJsonPath ?? resolvePiAgentModelsJsonPath();
|
|
64
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true, mode: 0o755 });
|
|
65
|
+
const existing = readPiModelsJson(filePath);
|
|
66
|
+
const providers = {
|
|
67
|
+
...existing.providers,
|
|
68
|
+
};
|
|
69
|
+
if (kubbisec) {
|
|
70
|
+
providers[KUBBISEC_LLM_PROVIDER_ID] = kubbisec;
|
|
71
|
+
}
|
|
72
|
+
for (const provider of customProviders) {
|
|
73
|
+
providers[provider.id] = buildCustomProviderPiEntry(provider);
|
|
74
|
+
}
|
|
75
|
+
fs.writeFileSync(filePath, `${JSON.stringify({ providers }, null, 2)}\n`, {
|
|
76
|
+
encoding: "utf8",
|
|
77
|
+
mode: 0o600,
|
|
78
|
+
});
|
|
79
|
+
return Boolean(kubbisec);
|
|
80
80
|
}
|
|
81
|
-
//# sourceMappingURL=sync-kubbisec-pi-models.js.map
|
|
81
|
+
//# sourceMappingURL=sync-kubbisec-pi-models.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { KUBBISEC_CLI_REFERENCE_INDEX } from "@aspm/shared";
|
|
2
|
-
//# sourceMappingURL=cli-reference-index.d.ts.map
|
|
2
|
+
//# sourceMappingURL=cli-reference-index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { KUBBISEC_CLI_REFERENCE_INDEX } from "@aspm/shared";
|
|
2
|
-
//# sourceMappingURL=cli-reference-index.js.map
|
|
2
|
+
//# sourceMappingURL=cli-reference-index.js.map
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
/** Shared KubbiSec AI TUI copy (CLI extensions). */
|
|
2
2
|
export declare const KUBBISEC_PRODUCT_NAME = "KubbiSec Assistant";
|
|
3
|
-
export declare const KUBBISEC_SUBTITLE_LINE =
|
|
4
|
-
|
|
3
|
+
export declare const KUBBISEC_SUBTITLE_LINE =
|
|
4
|
+
"Assistant \u00B7 ASPM Remediation \u00B7 Naus CI \u00B7 Coding";
|
|
5
|
+
export declare const KUBBISEC_COMPACT_HEADER_TAGLINE =
|
|
6
|
+
"Assistant \u00B7 ASPM Remediation \u00B7 Naus CI \u00B7 Coding";
|
|
5
7
|
export declare const KUBBISEC_WORDMARK = "KUBBISEC";
|
|
6
8
|
export declare const KUBBISEC_EDITOR_LABEL = "Coding";
|
|
7
9
|
export declare const KUBBISEC_EDITOR_PLACEHOLDER = "Ask anything...";
|
|
8
10
|
/** Skill invoke pattern shown in the chat header hints row. */
|
|
9
11
|
export declare const KUBBISEC_HEADER_HINTS_SKILL = "@skill name";
|
|
10
12
|
export declare const KUBBISEC_EXIT_SLASH_COMMAND = "/exit";
|
|
11
|
-
export declare const KUBBISEC_HEADER_HINTS_COMMANDS =
|
|
13
|
+
export declare const KUBBISEC_HEADER_HINTS_COMMANDS =
|
|
14
|
+
"kubbisec fix \u00B7 kubbisec watch \u00B7 kubbisec ls \u00B7 /help \u00B7 /exit";
|
|
12
15
|
/** @deprecated Use KUBBISEC_HEADER_HINTS_SKILL + KUBBISEC_HEADER_HINTS_COMMANDS */
|
|
13
|
-
export declare const KUBBISEC_HEADER_HINTS =
|
|
16
|
+
export declare const KUBBISEC_HEADER_HINTS =
|
|
17
|
+
"@skill name \u00B7 kubbisec fix \u00B7 kubbisec watch \u00B7 kubbisec ls \u00B7 /help \u00B7 /exit";
|
|
14
18
|
/** @deprecated Verbose TUI only (KUBBISEC_TUI_VERBOSE=1) */
|
|
15
19
|
export declare const KUBBISEC_RAIL_HINT = "chat \u00B7 org BYOK";
|
|
16
20
|
export declare const KUBBISEC_PROVIDER_LABEL = "kubbisec";
|
|
17
21
|
/** @deprecated Verbose TUI only */
|
|
18
22
|
export declare const KUBBISEC_RAIL_LINE = "KubbiSec Assistant \u00B7 chat \u00B7 org BYOK";
|
|
19
23
|
/** @deprecated Verbose TUI only */
|
|
20
|
-
export declare const KUBBISEC_HEADER_TAGLINE =
|
|
21
|
-
|
|
24
|
+
export declare const KUBBISEC_HEADER_TAGLINE =
|
|
25
|
+
"Assistant \u00B7 ASPM Remediation \u00B7 Naus CI \u00B7 Coding";
|
|
26
|
+
//# sourceMappingURL=kubbisec-shell-copy.d.ts.map
|
|
@@ -18,4 +18,4 @@ export const KUBBISEC_PROVIDER_LABEL = "kubbisec";
|
|
|
18
18
|
export const KUBBISEC_RAIL_LINE = `${KUBBISEC_PRODUCT_NAME} · ${KUBBISEC_RAIL_HINT}`;
|
|
19
19
|
/** @deprecated Verbose TUI only */
|
|
20
20
|
export const KUBBISEC_HEADER_TAGLINE = KUBBISEC_SUBTITLE_LINE;
|
|
21
|
-
//# sourceMappingURL=kubbisec-shell-copy.js.map
|
|
21
|
+
//# sourceMappingURL=kubbisec-shell-copy.js.map
|
|
@@ -1,56 +1,80 @@
|
|
|
1
1
|
import { type DelegatedCliName, type EnsureDelegatedCliResult } from "@kubbisec/remediation";
|
|
2
|
+
|
|
2
3
|
export { extendedContextEnabled } from "../config/extended-context.js";
|
|
3
4
|
export declare const CLI_LOCAL_MAX_OUTPUT_CHARS = 12000;
|
|
4
5
|
export declare const NAUS_LOCAL_RUN_TIMEOUT_MS: number;
|
|
5
6
|
export type ExecCaptureResult = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
code: number;
|
|
8
|
+
stdout: string;
|
|
9
|
+
stderr: string;
|
|
9
10
|
};
|
|
10
11
|
export type CliToolDetails = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
ok: boolean;
|
|
13
|
+
exitCode: number;
|
|
14
|
+
userMessage: string;
|
|
14
15
|
};
|
|
15
16
|
export type CliToolFailureResult = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
content: Array<{
|
|
18
|
+
type: "text";
|
|
19
|
+
text: string;
|
|
20
|
+
}>;
|
|
21
|
+
details: CliToolDetails;
|
|
21
22
|
};
|
|
22
23
|
export declare function resolveWorkspace(): string;
|
|
23
24
|
export declare function truncateCliOutput(text: string, max?: number): string;
|
|
24
25
|
export declare function denyExtendedContextMessage(): {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
content: Array<{
|
|
27
|
+
type: "text";
|
|
28
|
+
text: string;
|
|
29
|
+
}>;
|
|
29
30
|
};
|
|
30
31
|
export declare function ensureLocalCliOrInstall(name: DelegatedCliName): EnsureDelegatedCliResult;
|
|
31
|
-
export declare function buildCliEnsureFailureResult(
|
|
32
|
+
export declare function buildCliEnsureFailureResult(
|
|
33
|
+
bin: DelegatedCliName,
|
|
34
|
+
cwd: string,
|
|
35
|
+
message: string,
|
|
36
|
+
): CliToolFailureResult;
|
|
32
37
|
/** Full subprocess output for model debug (extended context + debug flag). */
|
|
33
|
-
export declare function formatExecResultForModel(
|
|
38
|
+
export declare function formatExecResultForModel(
|
|
39
|
+
bin: string,
|
|
40
|
+
args: string[],
|
|
41
|
+
cwd: string,
|
|
42
|
+
result: ExecCaptureResult,
|
|
43
|
+
): string;
|
|
34
44
|
/** @deprecated use formatExecResultForModel */
|
|
35
45
|
export declare const formatExecResult: typeof formatExecResultForModel;
|
|
36
|
-
export declare function formatExecResultForUser(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
export declare function formatExecResultForUser(
|
|
47
|
+
bin: string,
|
|
48
|
+
result: ExecCaptureResult,
|
|
49
|
+
): CliToolDetails;
|
|
50
|
+
export declare function buildCliToolResult(
|
|
51
|
+
bin: string,
|
|
52
|
+
args: string[],
|
|
53
|
+
cwd: string,
|
|
54
|
+
result: ExecCaptureResult,
|
|
55
|
+
suffix?: string,
|
|
56
|
+
): {
|
|
57
|
+
content: Array<{
|
|
58
|
+
type: "text";
|
|
59
|
+
text: string;
|
|
60
|
+
}>;
|
|
61
|
+
details: CliToolDetails;
|
|
43
62
|
};
|
|
44
63
|
export declare function cliToolErrorContent(error: unknown): {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
64
|
+
content: Array<{
|
|
65
|
+
type: "text";
|
|
66
|
+
text: string;
|
|
67
|
+
}>;
|
|
68
|
+
details: CliToolDetails;
|
|
50
69
|
};
|
|
51
|
-
export declare function execCapture(
|
|
70
|
+
export declare function execCapture(
|
|
71
|
+
bin: string,
|
|
72
|
+
args: string[],
|
|
73
|
+
cwd: string,
|
|
74
|
+
options?: {
|
|
52
75
|
signal?: AbortSignal;
|
|
53
76
|
timeoutMs?: number;
|
|
54
|
-
}
|
|
77
|
+
},
|
|
78
|
+
): Promise<ExecCaptureResult>;
|
|
55
79
|
export declare function resolvePathInWorkspace(relativePath: string, workspace: string): string;
|
|
56
|
-
//# sourceMappingURL=cli-local-shared.d.ts.map
|
|
80
|
+
//# sourceMappingURL=cli-local-shared.d.ts.map
|