@nio-cli/cli 0.6.0 → 0.7.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/.env.example +2 -0
- package/dist/lib/skills/skill-serve.js +46 -13
- package/dist/lib/skills/skill-serve.js.map +1 -1
- package/dist/profiles/bi.js +2 -1
- package/dist/profiles/bi.js.map +1 -1
- package/dist/profiles/dba.js +2 -11
- package/dist/profiles/dba.js.map +1 -1
- package/dist/profiles/toolchains.js +49 -2
- package/dist/profiles/toolchains.js.map +1 -1
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -99,6 +99,8 @@ JWT_SECRET=
|
|
|
99
99
|
# NIO_AI_CONTEXT=65536 # janela de contexto (tokens) declarada p/ o model; 0 = usa catálogo
|
|
100
100
|
# NIO_AI_OUTPUT=2048 # teto de tokens de saída reservados dentro da janela
|
|
101
101
|
# NIO_AI_MAX_INPUT=32000 # hard cap de input por prompt (0 = desativa a trava)
|
|
102
|
+
# NIO_SKILLS_DESC_CHARS=200 # teto das descrições em prompts/list e resources/list (0 = sem corte)
|
|
103
|
+
# NIO_SKILLS_PROMPT_CHARS=12000 # orçamento do texto montado por get_prompt (apoio excedente vira resource sob demanda; 0 = sem teto)
|
|
102
104
|
# ^ NIO_AI_* NÃO valem no .env do projeto (cwd é allowlist) — ponha em ~/.nio/config.env ou no shell.
|
|
103
105
|
#
|
|
104
106
|
# Headroom — proxy de compressão em container (ADR 0007), DORMENTE (ADR 0010).
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { readSkillFiles, toSkillDocs } from './skills.js';
|
|
2
|
-
import { brand } from '../../brand.js';
|
|
2
|
+
import { brand, env } from '../../brand.js';
|
|
3
3
|
export const SKILLS_URI_PREFIX = `${brand.name}://skills/`;
|
|
4
|
+
function envNum(name, dflt) {
|
|
5
|
+
const raw = env(name)?.trim();
|
|
6
|
+
if (!raw)
|
|
7
|
+
return dflt;
|
|
8
|
+
const n = Number(raw);
|
|
9
|
+
return Number.isFinite(n) ? n : dflt;
|
|
10
|
+
}
|
|
11
|
+
export const NIO_SKILLS_DESC_CHARS = envNum('SKILLS_DESC_CHARS', 200);
|
|
12
|
+
export const NIO_SKILLS_PROMPT_CHARS = envNum('SKILLS_PROMPT_CHARS', 12000);
|
|
13
|
+
function cap(s, max) {
|
|
14
|
+
return max > 0 ? s.slice(0, max) : s;
|
|
15
|
+
}
|
|
4
16
|
let cache = null;
|
|
5
17
|
export function loadSkills(dir) {
|
|
6
18
|
if (cache && !dir)
|
|
@@ -45,7 +57,7 @@ export function skillResourceDescriptors(docs) {
|
|
|
45
57
|
.map((d) => ({
|
|
46
58
|
uri: `${SKILLS_URI_PREFIX}${d.path}`,
|
|
47
59
|
name: resourceName(d, skillFolders),
|
|
48
|
-
description: d.description || d.title,
|
|
60
|
+
description: cap(d.description || d.title, NIO_SKILLS_DESC_CHARS),
|
|
49
61
|
mimeType: 'text/markdown',
|
|
50
62
|
}))
|
|
51
63
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -67,7 +79,7 @@ export function skillPromptDescriptors(docs) {
|
|
|
67
79
|
.filter((d) => isPromptable(d.type))
|
|
68
80
|
.map((d) => ({
|
|
69
81
|
name: d.id,
|
|
70
|
-
description: `[${d.type}] ${d.description || d.title}
|
|
82
|
+
description: cap(`[${d.type}] ${d.description || d.title}`, NIO_SKILLS_DESC_CHARS),
|
|
71
83
|
arguments: [
|
|
72
84
|
{
|
|
73
85
|
name: 'args',
|
|
@@ -77,7 +89,7 @@ export function skillPromptDescriptors(docs) {
|
|
|
77
89
|
],
|
|
78
90
|
}));
|
|
79
91
|
}
|
|
80
|
-
export function buildSkillPrompt(name, args, docs) {
|
|
92
|
+
export function buildSkillPrompt(name, args, docs, budget = NIO_SKILLS_PROMPT_CHARS) {
|
|
81
93
|
const doc = docs.find((d) => d.id === name && isPromptable(d.type));
|
|
82
94
|
if (!doc)
|
|
83
95
|
throw new Error(`Prompt desconhecido: ${name}`);
|
|
@@ -88,17 +100,38 @@ export function buildSkillPrompt(name, args, docs) {
|
|
|
88
100
|
.filter((d) => d.type === 'doc' && d.path.startsWith(`${folder}/`))
|
|
89
101
|
.sort((a, b) => a.path.localeCompare(b.path));
|
|
90
102
|
if (companions.length > 0) {
|
|
91
|
-
const
|
|
92
|
-
|
|
103
|
+
const included = [];
|
|
104
|
+
const skipped = [];
|
|
105
|
+
for (const comp of companions) {
|
|
93
106
|
const rel = comp.path.slice(folder.length + 1);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
const block = `\n\n---\n\n### Arquivo de apoio da skill: \`${rel}\`\n\n${comp.content.trim()}`;
|
|
108
|
+
if (budget > 0 && text.length + block.length > budget) {
|
|
109
|
+
skipped.push(rel);
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
text += block;
|
|
113
|
+
included.push(rel);
|
|
114
|
+
}
|
|
115
|
+
if (included.length > 0) {
|
|
116
|
+
text +=
|
|
117
|
+
`\n\n<!-- Arquivos de apoio inline: o Cowork/Codex não têm o filesystem da ` +
|
|
118
|
+
`skill; use estes no lugar das referências por path relativo acima. -->`;
|
|
119
|
+
}
|
|
120
|
+
if (skipped.length > 0) {
|
|
121
|
+
text +=
|
|
122
|
+
`\n\n<!-- Condensado pra caber na janela: ${skipped.length} arquivo(s) de apoio ` +
|
|
123
|
+
`omitidos — leia sob demanda via resources: ` +
|
|
124
|
+
skipped.map((rel) => `${SKILLS_URI_PREFIX}${folder}/${rel}`).join(', ') +
|
|
125
|
+
` -->`;
|
|
126
|
+
}
|
|
100
127
|
}
|
|
101
128
|
}
|
|
102
|
-
|
|
129
|
+
if (budget > 0 && text.length > budget) {
|
|
130
|
+
text =
|
|
131
|
+
text.slice(0, budget) +
|
|
132
|
+
`\n\n<!-- Resposta truncada no teto de ${budget} chars (NIO_SKILLS_PROMPT_CHARS); ` +
|
|
133
|
+
`o restante está nos resources da skill. -->`;
|
|
134
|
+
}
|
|
135
|
+
return { description: cap(doc.description || doc.title, NIO_SKILLS_DESC_CHARS), text };
|
|
103
136
|
}
|
|
104
137
|
//# sourceMappingURL=skill-serve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-serve.js","sourceRoot":"","sources":["../../../src/lib/skills/skill-serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAoC,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-serve.js","sourceRoot":"","sources":["../../../src/lib/skills/skill-serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAoC,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAQ5C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,KAAK,CAAC,IAAI,YAAY,CAAC;AAG3D,SAAS,MAAM,CAAC,IAAY,EAAE,IAAY;IACxC,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC;AAOD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;AAQtE,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;AAG5E,SAAS,GAAG,CAAC,CAAS,EAAE,GAAW;IACjC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,C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I,EAAE,CAAC;AACzF,CAAC"}
|
package/dist/profiles/bi.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { powerbiMcp } from './mcps.js';
|
|
2
|
+
import { postgresqlClientToolchain, powerbiDesktopToolchain } from './toolchains.js';
|
|
2
3
|
export const biProfile = {
|
|
3
4
|
profile: 'bi',
|
|
4
5
|
languages: ['sql', 'dax'],
|
|
5
|
-
toolchains: [],
|
|
6
|
+
toolchains: [postgresqlClientToolchain, powerbiDesktopToolchain],
|
|
6
7
|
frameworks: ['powerbi'],
|
|
7
8
|
mcps: [powerbiMcp],
|
|
8
9
|
};
|
package/dist/profiles/bi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bi.js","sourceRoot":"","sources":["../../src/profiles/bi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"bi.js","sourceRoot":"","sources":["../../src/profiles/bi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAQrF,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACzB,UAAU,EAAE,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;IAChE,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC"}
|
package/dist/profiles/dba.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { postgresMcp } from './mcps.js';
|
|
2
|
+
import { postgresqlClientToolchain } from './toolchains.js';
|
|
2
3
|
export const dbaProfile = {
|
|
3
4
|
profile: 'dba',
|
|
4
5
|
languages: ['sql'],
|
|
5
|
-
toolchains: [
|
|
6
|
-
{
|
|
7
|
-
id: 'postgresql-client',
|
|
8
|
-
detect: [
|
|
9
|
-
'/usr/bin/psql',
|
|
10
|
-
'/usr/local/bin/psql',
|
|
11
|
-
'/opt/homebrew/bin/psql',
|
|
12
|
-
'C:/Program Files/PostgreSQL/**/bin/psql.exe',
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
],
|
|
6
|
+
toolchains: [postgresqlClientToolchain],
|
|
16
7
|
frameworks: [],
|
|
17
8
|
mcps: [postgresMcp],
|
|
18
9
|
envVars: { PGCLIENTENCODING: 'UTF8' },
|
package/dist/profiles/dba.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dba.js","sourceRoot":"","sources":["../../src/profiles/dba.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"dba.js","sourceRoot":"","sources":["../../src/profiles/dba.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAa5D,MAAM,CAAC,MAAM,UAAU,GAAsB;IAC3C,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,CAAC,KAAK,CAAC;IAClB,UAAU,EAAE,CAAC,yBAAyB,CAAC;IACvC,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,OAAO,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE;IACrC,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;CACxB,CAAC"}
|
|
@@ -1,9 +1,56 @@
|
|
|
1
|
+
function wingetInstall(id) {
|
|
2
|
+
if (process.platform !== 'win32')
|
|
3
|
+
return undefined;
|
|
4
|
+
return {
|
|
5
|
+
program: 'winget',
|
|
6
|
+
args: [
|
|
7
|
+
'install',
|
|
8
|
+
'-e',
|
|
9
|
+
'--id',
|
|
10
|
+
id,
|
|
11
|
+
'--silent',
|
|
12
|
+
'--accept-package-agreements',
|
|
13
|
+
'--accept-source-agreements',
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
1
17
|
export const nodeToolchain = {
|
|
2
18
|
id: 'node',
|
|
3
|
-
detect: [
|
|
19
|
+
detect: [
|
|
20
|
+
'/usr/bin/node',
|
|
21
|
+
'/usr/local/bin/node',
|
|
22
|
+
'/opt/homebrew/bin/node',
|
|
23
|
+
'C:/Program Files/nodejs/node.exe',
|
|
24
|
+
'C:/Program Files (x86)/nodejs/node.exe',
|
|
25
|
+
],
|
|
4
26
|
};
|
|
5
27
|
export const pythonToolchain = {
|
|
6
28
|
id: 'python',
|
|
7
|
-
detect: [
|
|
29
|
+
detect: [
|
|
30
|
+
'/usr/bin/python3',
|
|
31
|
+
'/usr/local/bin/python3',
|
|
32
|
+
'/opt/homebrew/bin/python3',
|
|
33
|
+
'C:/Python3*/python.exe',
|
|
34
|
+
'C:/Program Files/Python*/python.exe',
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
export const postgresqlClientToolchain = {
|
|
38
|
+
id: 'postgresql-client',
|
|
39
|
+
detect: [
|
|
40
|
+
'/usr/bin/psql',
|
|
41
|
+
'/usr/local/bin/psql',
|
|
42
|
+
'/opt/homebrew/bin/psql',
|
|
43
|
+
'C:/Program Files/PostgreSQL/**/bin/psql.exe',
|
|
44
|
+
'C:/Program Files (x86)/PostgreSQL/**/bin/psql.exe',
|
|
45
|
+
],
|
|
46
|
+
install: wingetInstall('PostgreSQL.PostgreSQL'),
|
|
47
|
+
};
|
|
48
|
+
export const powerbiDesktopToolchain = {
|
|
49
|
+
id: 'powerbi-desktop',
|
|
50
|
+
detect: [
|
|
51
|
+
'C:/Program Files/Microsoft Power BI Desktop/**/PBIDesktop.exe',
|
|
52
|
+
'C:/Program Files/Microsoft Power BI Desktop RS/**/PBIDesktop.exe',
|
|
53
|
+
],
|
|
54
|
+
install: wingetInstall('Microsoft.PowerBIDesktop'),
|
|
8
55
|
};
|
|
9
56
|
//# sourceMappingURL=toolchains.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolchains.js","sourceRoot":"","sources":["../../src/profiles/toolchains.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toolchains.js","sourceRoot":"","sources":["../../src/profiles/toolchains.ts"],"names":[],"mappings":"AAcA,SAAS,aAAa,CAAC,EAAU;IAC/B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IACnD,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE;YACJ,SAAS;YACT,IAAI;YACJ,MAAM;YACN,EAAE;YACF,UAAU;YACV,6BAA6B;YAC7B,4BAA4B;SAC7B;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,EAAE,EAAE,MAAM;IACV,MAAM,EAAE;QACN,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,kCAAkC;QAClC,wCAAwC;KACzC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAkB;IAC5C,EAAE,EAAE,QAAQ;IACZ,MAAM,EAAE;QACN,kBAAkB;QAClB,wBAAwB;QACxB,2BAA2B;QAC3B,wBAAwB;QACxB,qCAAqC;KACtC;CACF,CAAC;AAGF,MAAM,CAAC,MAAM,yBAAyB,GAAkB;IACtD,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE;QACN,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,6CAA6C;QAC7C,mDAAmD;KACpD;IACD,OAAO,EAAE,aAAa,CAAC,uBAAuB,CAAC;CAChD,CAAC;AAOF,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,EAAE,EAAE,iBAAiB;IACrB,MAAM,EAAE;QACN,+DAA+D;QAC/D,kEAAkE;KACnE;IACD,OAAO,EAAE,aAAa,CAAC,0BAA0B,CAAC;CACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nio-cli/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Orquestrador de ambientes de desenvolvimento: escolhe um perfil, responde um wizard e a CLI (com auxílio de IA via MCP) materializa toolchains, linguagens, frameworks, dotfiles e IDE.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|