@kubbisec/ai-linux-arm64 0.1.21 → 0.1.22
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/bundled/clarify/clarify-gate-state.d.ts +1 -1
- package/bundled/clarify/clarify-gate-state.js +3 -3
- package/bundled/clarify/clarify-gate.d.ts +21 -14
- package/bundled/clarify/clarify-gate.js +118 -111
- package/bundled/clarify/clarify-select-panel.d.ts +16 -9
- package/bundled/clarify/clarify-select-panel.js +65 -67
- package/bundled/clarify/clarify-ui-state.d.ts +12 -10
- package/bundled/clarify/clarify-ui-state.js +26 -26
- package/bundled/clarify/parse-clarify-answer.d.ts +29 -18
- package/bundled/clarify/parse-clarify-answer.js +39 -45
- package/bundled/clarify/question-format.d.ts +34 -23
- package/bundled/clarify/question-format.js +112 -119
- package/bundled/clarify/questionnaire-tool.d.ts +28 -17
- package/bundled/clarify/questionnaire-tool.js +180 -144
- package/bundled/clarify/scope-discovery.d.ts +8 -5
- package/bundled/clarify/scope-discovery.js +102 -110
- package/bundled/clarify/session-questionnaire.d.ts +48 -13
- package/bundled/clarify/session-questionnaire.js +304 -312
- package/bundled/clarify/session-questionnaire.types.d.ts +29 -27
- package/bundled/clarify/session-questionnaire.types.js +10 -10
- 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 +55 -55
- 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-kubbisec-project-settings.d.ts +9 -9
- package/bundled/config/ensure-kubbisec-project-settings.js +44 -48
- 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 +22 -2
- package/bundled/config/kubbisec-extension-manifest.js +20 -20
- 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 +174 -183
- 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 +3 -2
- 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 +45 -26
- package/bundled/extensions/cli-local-shared.js +128 -118
- package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
- package/bundled/extensions/kubbisec-aspm-local.extension.js +118 -114
- 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 +123 -116
- 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 +132 -111
- 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 +73 -63
- 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 +114 -109
- package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
- package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts +2 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts.map +1 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.js +626 -0
- package/bundled/node_modules/@aspm/shared/dist/redaction.test.js.map +1 -0
- package/bundled/resolve-bundled-dist-root.js +122 -131
- 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 +127 -129
- package/bundled/workflow/session-workflow-mode.d.ts +1 -1
- package/bundled/workflow/session-workflow-mode.js +33 -33
- package/package.json +1 -1
|
@@ -6,130 +6,137 @@ import * as fs from "node:fs";
|
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import { summarizeSubprocessFailure, toUserError } from "@aspm/shared/cli-user-error";
|
|
8
8
|
import { Type } from "@earendil-works/pi-ai";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
EXTENDED_CONTEXT_DENY_MESSAGE,
|
|
11
|
+
extendedContextEnabled,
|
|
12
|
+
resolveExtendedWorkspace,
|
|
13
|
+
} from "../config/extended-context.js";
|
|
14
|
+
|
|
10
15
|
function resolveWorkspace() {
|
|
11
|
-
|
|
16
|
+
return resolveExtendedWorkspace();
|
|
12
17
|
}
|
|
13
18
|
function execCapture(bin, args, cwd) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
let stdout = "";
|
|
25
|
-
let stderr = "";
|
|
26
|
-
child.stdout?.on("data", (c) => {
|
|
27
|
-
stdout += String(c);
|
|
28
|
-
});
|
|
29
|
-
child.stderr?.on("data", (c) => {
|
|
30
|
-
stderr += String(c);
|
|
31
|
-
});
|
|
32
|
-
child.on("error", (err) => {
|
|
33
|
-
resolve({ code: 127, stdout: "", stderr: toUserError(err).detail });
|
|
34
|
-
});
|
|
35
|
-
child.on("close", (code) => resolve({ code: code ?? 1, stdout, stderr }));
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
const child = spawn(bin, args, {
|
|
21
|
+
cwd,
|
|
22
|
+
env: {
|
|
23
|
+
...process.env,
|
|
24
|
+
GIT_TERMINAL_PROMPT: "0",
|
|
25
|
+
GH_PROMPT_DISABLED: "1",
|
|
26
|
+
},
|
|
27
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
36
28
|
});
|
|
29
|
+
let stdout = "";
|
|
30
|
+
let stderr = "";
|
|
31
|
+
child.stdout?.on("data", (c) => {
|
|
32
|
+
stdout += String(c);
|
|
33
|
+
});
|
|
34
|
+
child.stderr?.on("data", (c) => {
|
|
35
|
+
stderr += String(c);
|
|
36
|
+
});
|
|
37
|
+
child.on("error", (err) => {
|
|
38
|
+
resolve({ code: 127, stdout: "", stderr: toUserError(err).detail });
|
|
39
|
+
});
|
|
40
|
+
child.on("close", (code) => resolve({ code: code ?? 1, stdout, stderr }));
|
|
41
|
+
});
|
|
37
42
|
}
|
|
38
43
|
function formatGitSummary(bin, label, result) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
if (result.code === 0 && result.stdout.trim()) {
|
|
45
|
+
return `${label}:\n${result.stdout.trim()}`;
|
|
46
|
+
}
|
|
47
|
+
if (result.code === 0) {
|
|
48
|
+
return `${label}: (sem saída)`;
|
|
49
|
+
}
|
|
50
|
+
return summarizeSubprocessFailure({
|
|
51
|
+
bin,
|
|
52
|
+
code: result.code,
|
|
53
|
+
stderr: result.stderr,
|
|
54
|
+
stdout: result.stdout,
|
|
55
|
+
});
|
|
51
56
|
}
|
|
52
57
|
function denyExtended() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
return {
|
|
59
|
+
content: [{ type: "text", text: EXTENDED_CONTEXT_DENY_MESSAGE }],
|
|
60
|
+
};
|
|
56
61
|
}
|
|
57
62
|
export default function kubbisecGithubLocal(api) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
63
|
+
api.registerTool({
|
|
64
|
+
name: "github_local_status",
|
|
65
|
+
label: "GitHub local status",
|
|
66
|
+
description:
|
|
67
|
+
"Reports gh auth and git remote on this machine (requires kubbisec chat --extended-context).",
|
|
68
|
+
parameters: Type.Object({}),
|
|
69
|
+
async execute() {
|
|
70
|
+
if (!extendedContextEnabled()) return denyExtended();
|
|
71
|
+
const cwd = resolveWorkspace();
|
|
72
|
+
const parts = [`workspace: ${cwd}`];
|
|
73
|
+
const gh = await execCapture("gh", ["auth", "status"], cwd);
|
|
74
|
+
if (gh.code === 0) {
|
|
75
|
+
parts.push("GitHub CLI autenticado nesta máquina.");
|
|
76
|
+
} else if (gh.code === 127) {
|
|
77
|
+
parts.push("gh: not installed or not on PATH");
|
|
78
|
+
} else {
|
|
79
|
+
parts.push(
|
|
80
|
+
summarizeSubprocessFailure({
|
|
81
|
+
bin: "gh",
|
|
82
|
+
code: gh.code,
|
|
83
|
+
stderr: gh.stderr,
|
|
84
|
+
stdout: gh.stdout,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
if (fs.existsSync(path.join(cwd, ".git"))) {
|
|
89
|
+
const remote = await execCapture("git", ["remote", "-v"], cwd);
|
|
90
|
+
const branch = await execCapture("git", ["branch", "--show-current"], cwd);
|
|
91
|
+
parts.push(formatGitSummary("git", "git remote", remote));
|
|
92
|
+
const branchName = branch.stdout.trim();
|
|
93
|
+
parts.push(
|
|
94
|
+
`git branch: ${branchName || (branch.code === 0 ? "(detached)" : "indisponível")}`,
|
|
95
|
+
);
|
|
96
|
+
} else {
|
|
97
|
+
parts.push(
|
|
98
|
+
"git: no .git in workspace (clone via kubsec_github_repository + remediation flow)",
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
return { content: [{ type: "text", text: parts.join("\n\n") }] };
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
api.registerTool({
|
|
105
|
+
name: "github_local_repo_summary",
|
|
106
|
+
label: "GitHub local repo summary",
|
|
107
|
+
description:
|
|
108
|
+
"Lists top-level files and recent git log in workspace (requires --extended-context).",
|
|
109
|
+
parameters: Type.Object({}),
|
|
110
|
+
async execute() {
|
|
111
|
+
if (!extendedContextEnabled()) return denyExtended();
|
|
112
|
+
const cwd = resolveWorkspace();
|
|
113
|
+
const entries = fs.existsSync(cwd)
|
|
114
|
+
? fs
|
|
115
|
+
.readdirSync(cwd, { withFileTypes: true })
|
|
116
|
+
.slice(0, 40)
|
|
117
|
+
.map((e) => (e.isDirectory() ? `${e.name}/` : e.name))
|
|
118
|
+
: [];
|
|
119
|
+
let logOut = "";
|
|
120
|
+
if (fs.existsSync(path.join(cwd, ".git"))) {
|
|
121
|
+
const log = await execCapture("git", ["log", "-5", "--oneline"], cwd);
|
|
122
|
+
if (log.code === 0 && log.stdout.trim()) {
|
|
123
|
+
logOut = log.stdout.trim();
|
|
124
|
+
} else if (log.code !== 0) {
|
|
125
|
+
logOut = summarizeSubprocessFailure({
|
|
126
|
+
bin: "git",
|
|
127
|
+
code: log.code,
|
|
128
|
+
stderr: log.stderr,
|
|
129
|
+
stdout: log.stdout,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const text = [
|
|
134
|
+
`workspace: ${cwd}`,
|
|
135
|
+
`entries: ${entries.join(", ") || "(empty)"}`,
|
|
136
|
+
logOut ? `recent commits:\n${logOut}` : "no git history",
|
|
137
|
+
].join("\n\n");
|
|
138
|
+
return { content: [{ type: "text", text }] };
|
|
139
|
+
},
|
|
140
|
+
});
|
|
134
141
|
}
|
|
135
|
-
//# sourceMappingURL=kubbisec-github-local.extension.js.map
|
|
142
|
+
//# sourceMappingURL=kubbisec-github-local.extension.js.map
|