biaws 0.1.0 → 0.2.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 +165 -194
- package/docs/command-taxonomy.md +66 -26
- package/docs/instance-lifecycle.md +14 -14
- package/docs/releasing.md +4 -4
- package/package.json +53 -4
- package/src/admin/commands.js +214 -0
- package/src/admin/monitoringCommands.js +88 -0
- package/src/apiClient.js +18 -18
- package/src/baseCommands.js +5 -1
- package/src/cli/admin/config.js +1 -0
- package/src/cli/admin/doctor.js +1 -0
- package/src/cli/admin/install.js +1 -0
- package/src/cli/admin/instance/backup.js +1 -0
- package/src/cli/admin/instance/list.js +1 -0
- package/src/cli/admin/instance/remove.js +1 -0
- package/src/cli/admin/instance/restore.js +1 -0
- package/src/cli/admin/instance/setup.js +1 -0
- package/src/cli/admin/instance/show.js +1 -0
- package/src/cli/admin/instance/start.js +1 -0
- package/src/cli/admin/instance/status.js +1 -0
- package/src/cli/admin/instance/stop.js +1 -0
- package/src/cli/admin/monitoring/build.js +3 -0
- package/src/cli/admin/monitoring/logs.js +3 -0
- package/src/cli/admin/monitoring/provision.js +1 -0
- package/src/cli/admin/monitoring/start.js +3 -0
- package/src/cli/admin/monitoring/status.js +3 -0
- package/src/cli/admin/monitoring/stop.js +3 -0
- package/src/cli/admin/monitoring/validate.js +3 -0
- package/src/cli/config/doctor.js +1 -0
- package/src/cli/config/init.js +1 -0
- package/src/cli/config/login.js +1 -0
- package/src/cli/config/profiles/list.js +1 -0
- package/src/cli/config/profiles/use.js +1 -0
- package/src/cli/config/set.js +1 -0
- package/src/cli/config/show.js +1 -0
- package/src/cli/config/unset.js +1 -0
- package/src/cli/help.js +46 -0
- package/src/cli/workspace/agent/configure/claude.js +1 -0
- package/src/cli/workspace/agent/configure/codex.js +1 -0
- package/src/cli/workspace/agent/doctor.js +1 -0
- package/src/cli/workspace/api.js +1 -0
- package/src/cli/workspace/applications/get.js +1 -0
- package/src/cli/workspace/applications/list.js +1 -0
- package/src/cli/workspace/current.js +1 -0
- package/src/cli/workspace/demands/complete-task.js +1 -0
- package/src/cli/workspace/demands/get.js +1 -0
- package/src/cli/workspace/demands/list.js +1 -0
- package/src/cli/workspace/demands/task-status.js +1 -0
- package/src/cli/workspace/demands/tasks.js +1 -0
- package/src/cli/workspace/get.js +1 -0
- package/src/cli/workspace/init.js +1 -0
- package/src/cli/workspace/issues/get.js +1 -0
- package/src/cli/workspace/issues/list.js +1 -0
- package/src/cli/workspace/issues/transition.js +1 -0
- package/src/cli/workspace/list.js +1 -0
- package/src/cli/workspace/monitoring/describe.js +1 -0
- package/src/cli/workspace/monitoring/signal.js +1 -0
- package/src/cli/workspace/monitoring/signals.js +1 -0
- package/src/cli/workspace/monitoring/validate.js +1 -0
- package/src/cli/workspace/skills/install-all.js +1 -0
- package/src/cli/workspace/skills/install.js +1 -0
- package/src/cli/workspace/skills/list.js +1 -0
- package/src/cli/workspace/skills/publish-all.js +1 -0
- package/src/cli/workspace/skills/publish.js +1 -0
- package/src/cli/workspace/skills/status.js +1 -0
- package/src/cli/workspace/skills/update.js +1 -0
- package/src/cli/workspace/unlink.js +1 -0
- package/src/cli/workspace/use.js +1 -0
- package/src/{compatibilityCommands.js → commandFactories.js} +6 -2
- package/src/commands/agent/configure.js +1 -1
- package/src/commands/agent/doctor.js +1 -1
- package/src/commands/agent.js +8 -5
- package/src/commands/applications/get.js +1 -1
- package/src/commands/applications/list.js +1 -1
- package/src/commands/applications.js +3 -2
- package/src/commands/configure/skills.js +3 -1
- package/src/commands/demands/complete-task.js +1 -1
- package/src/commands/demands/get.js +1 -1
- package/src/commands/demands/list.js +1 -1
- package/src/commands/demands/task-status.js +1 -1
- package/src/commands/demands/tasks.js +1 -1
- package/src/commands/demands.js +3 -2
- package/src/commands/instance/setup.js +4 -4
- package/src/commands/issues/get.js +1 -1
- package/src/commands/issues/list.js +1 -1
- package/src/commands/issues/transition.js +1 -1
- package/src/commands/issues.js +3 -2
- package/src/commands/monitoring/describe.js +1 -1
- package/src/commands/monitoring/signal.js +1 -1
- package/src/commands/monitoring/signals.js +1 -1
- package/src/commands/monitoring/validate.js +1 -1
- package/src/commands/monitoring.js +1 -1
- package/src/commands/skills/install-all.js +1 -1
- package/src/commands/skills/install.js +1 -1
- package/src/commands/skills/list.js +1 -1
- package/src/commands/skills/publish-all.js +1 -1
- package/src/commands/skills/publish.js +1 -1
- package/src/commands/skills/status.js +1 -1
- package/src/commands/skills/update.js +1 -1
- package/src/commands/skills.js +4 -2
- package/src/commands/workspaces/get.js +1 -1
- package/src/commands/workspaces/list.js +1 -1
- package/src/commands/workspaces.js +3 -2
- package/src/configuration/commands.js +373 -0
- package/src/configure/command.js +3 -1
- package/src/core/configuration.js +152 -0
- package/src/core/context.js +45 -15
- package/src/core/wizard.js +53 -34
- package/src/domain/readCommand.js +2 -0
- package/src/domain/writeService.js +19 -20
- package/src/index.js +6 -1
- package/src/instance/service.js +5 -5
- package/src/workspace/apiCommand.js +58 -0
- package/src/workspace/commands.js +191 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
import { Flags } from "@oclif/core";
|
|
6
|
+
|
|
7
|
+
import { BaseCommand, LocalInstanceCommand } from "../baseCommands.js";
|
|
8
|
+
import { CliError } from "../core/errors.js";
|
|
9
|
+
|
|
10
|
+
function emit(command, json, value, human) {
|
|
11
|
+
command.output({ json }).result(json ? value : human);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class AdminConfigCommand extends LocalInstanceCommand {
|
|
15
|
+
static description = "exibe os caminhos da instalação administrativa";
|
|
16
|
+
static flags = {
|
|
17
|
+
root: Flags.string({ description: "raiz da instalação" }),
|
|
18
|
+
json: Flags.boolean({ description: "emite somente JSON em stdout" }),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
async run() {
|
|
22
|
+
const { flags } = await this.parse(this.constructor);
|
|
23
|
+
const context = await this.localContext({ root: flags.root });
|
|
24
|
+
const result = {
|
|
25
|
+
instancesDirectory: context.instancesDirectory,
|
|
26
|
+
repositoryRoot: context.repositoryRoot,
|
|
27
|
+
toolDirectory: context.toolDirectory,
|
|
28
|
+
};
|
|
29
|
+
emit(
|
|
30
|
+
this,
|
|
31
|
+
flags.json,
|
|
32
|
+
result,
|
|
33
|
+
[
|
|
34
|
+
`Raiz da instalação: ${result.repositoryRoot}`,
|
|
35
|
+
`Diretório de instâncias: ${result.instancesDirectory}`,
|
|
36
|
+
`Diretório do CLI: ${result.toolDirectory}`,
|
|
37
|
+
].join("\n"),
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class AdminDoctorCommand extends BaseCommand {
|
|
43
|
+
static description = "diagnostica os pré-requisitos administrativos";
|
|
44
|
+
static flags = {
|
|
45
|
+
json: Flags.boolean({ description: "emite somente JSON em stdout" }),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
async run() {
|
|
49
|
+
const { flags } = await this.parse(this.constructor);
|
|
50
|
+
const checks = [
|
|
51
|
+
{ name: "Node.js", command: "node", args: ["--version"] },
|
|
52
|
+
{ name: "Git", command: "git", args: ["--version"] },
|
|
53
|
+
{ name: "Docker", command: "docker", args: ["--version"] },
|
|
54
|
+
{
|
|
55
|
+
name: "Docker Compose",
|
|
56
|
+
command: "docker",
|
|
57
|
+
args: ["compose", "version"],
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
const items = [];
|
|
61
|
+
for (const check of checks) {
|
|
62
|
+
try {
|
|
63
|
+
const result = await this.adapters.processRunner.run(
|
|
64
|
+
check.command,
|
|
65
|
+
check.args,
|
|
66
|
+
{ silent: true },
|
|
67
|
+
);
|
|
68
|
+
items.push({
|
|
69
|
+
name: check.name,
|
|
70
|
+
status: "disponível",
|
|
71
|
+
version: result.stdout.trim(),
|
|
72
|
+
});
|
|
73
|
+
} catch (error) {
|
|
74
|
+
items.push({
|
|
75
|
+
name: check.name,
|
|
76
|
+
status: "ausente",
|
|
77
|
+
error: error.message,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const healthy = items.every((item) => item.status === "disponível");
|
|
82
|
+
if (!healthy) process.exitCode = 1;
|
|
83
|
+
emit(
|
|
84
|
+
this,
|
|
85
|
+
flags.json,
|
|
86
|
+
{ healthy, items },
|
|
87
|
+
items
|
|
88
|
+
.map(
|
|
89
|
+
(item) =>
|
|
90
|
+
`${item.name}: ${item.status}${item.version ? ` (${item.version})` : ""}`,
|
|
91
|
+
)
|
|
92
|
+
.join("\n"),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function githubArchive(repository, version) {
|
|
98
|
+
const base = String(repository).replace(/\/+$/u, "");
|
|
99
|
+
return `${base}/releases/download/v${version}/biaws-${version}.tar.gz`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function ensureEmptyDirectory(filesystem, directory) {
|
|
103
|
+
try {
|
|
104
|
+
const entries = await filesystem.readdir(directory);
|
|
105
|
+
if (entries.length) {
|
|
106
|
+
throw new CliError(
|
|
107
|
+
`O diretório de destino não está vazio: ${directory}.`,
|
|
108
|
+
{
|
|
109
|
+
code: "INSTALL_DIRECTORY_NOT_EMPTY",
|
|
110
|
+
exitCode: 2,
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
} catch (error) {
|
|
115
|
+
if (error.code !== "ENOENT") throw error;
|
|
116
|
+
await filesystem.mkdir(directory, { recursive: true });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function fetchBuffer(url) {
|
|
121
|
+
const response = await fetch(url);
|
|
122
|
+
if (!response.ok) {
|
|
123
|
+
throw new CliError(`Falha ao baixar ${url}: HTTP ${response.status}.`, {
|
|
124
|
+
code: "INSTALL_DOWNLOAD_FAILED",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
return Buffer.from(await response.arrayBuffer());
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function expectedChecksum(url, explicit) {
|
|
131
|
+
if (explicit) return explicit.toLocaleLowerCase("en-US");
|
|
132
|
+
const response = await fetch(`${url}.sha256`);
|
|
133
|
+
if (!response.ok) {
|
|
134
|
+
throw new CliError(
|
|
135
|
+
"A release não possui checksum publicado. Informe --checksum somente após verificar a origem do arquivo.",
|
|
136
|
+
{ code: "INSTALL_CHECKSUM_REQUIRED" },
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return (await response.text())
|
|
140
|
+
.trim()
|
|
141
|
+
.split(/\s+/u)[0]
|
|
142
|
+
.toLocaleLowerCase("en-US");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export class AdminInstallCommand extends BaseCommand {
|
|
146
|
+
static description = "baixa uma release verificada da plataforma BIAWS";
|
|
147
|
+
static flags = {
|
|
148
|
+
version: Flags.string({ description: "versão da release" }),
|
|
149
|
+
repository: Flags.string({
|
|
150
|
+
description: "repositório de origem",
|
|
151
|
+
default: "https://github.com/fbondia/biaws",
|
|
152
|
+
}),
|
|
153
|
+
directory: Flags.string({ char: "d", description: "diretório de destino" }),
|
|
154
|
+
checksum: Flags.string({ description: "SHA-256 verificado da release" }),
|
|
155
|
+
"dry-run": Flags.boolean({
|
|
156
|
+
description: "exibe o plano sem baixar arquivos",
|
|
157
|
+
}),
|
|
158
|
+
json: Flags.boolean({ description: "emite somente JSON em stdout" }),
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
async run() {
|
|
162
|
+
const { flags } = await this.parse(this.constructor);
|
|
163
|
+
const version = flags.version || this.config.version;
|
|
164
|
+
const directory = path.resolve(
|
|
165
|
+
flags.directory || path.join(this.adapters.cwd(), `biaws-${version}`),
|
|
166
|
+
);
|
|
167
|
+
const url = githubArchive(flags.repository, version);
|
|
168
|
+
const plan = { directory, source: url, version };
|
|
169
|
+
if (flags["dry-run"]) {
|
|
170
|
+
emit(
|
|
171
|
+
this,
|
|
172
|
+
flags.json,
|
|
173
|
+
{ ...plan, dryRun: true },
|
|
174
|
+
`Release v${version}\nOrigem: ${url}\nDestino: ${directory}`,
|
|
175
|
+
);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
await ensureEmptyDirectory(this.adapters.filesystem, directory);
|
|
179
|
+
const archive = await fetchBuffer(url);
|
|
180
|
+
const checksum = await expectedChecksum(url, flags.checksum);
|
|
181
|
+
const actual = createHash("sha256").update(archive).digest("hex");
|
|
182
|
+
if (actual !== checksum) {
|
|
183
|
+
throw new CliError(
|
|
184
|
+
`Checksum inválido: esperado ${checksum}, obtido ${actual}.`,
|
|
185
|
+
{ code: "INSTALL_CHECKSUM_MISMATCH" },
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
const temporary = await this.adapters.filesystem.mkdtemp(
|
|
189
|
+
path.join(tmpdir(), "biaws-install-"),
|
|
190
|
+
);
|
|
191
|
+
const archivePath = path.join(temporary, "biaws.tar.gz");
|
|
192
|
+
try {
|
|
193
|
+
await this.adapters.filesystem.writeFile(archivePath, archive);
|
|
194
|
+
await this.adapters.processRunner.run("tar", [
|
|
195
|
+
"-xzf",
|
|
196
|
+
archivePath,
|
|
197
|
+
"--strip-components=1",
|
|
198
|
+
"-C",
|
|
199
|
+
directory,
|
|
200
|
+
]);
|
|
201
|
+
} finally {
|
|
202
|
+
await this.adapters.filesystem.rm(temporary, {
|
|
203
|
+
recursive: true,
|
|
204
|
+
force: true,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
emit(
|
|
208
|
+
this,
|
|
209
|
+
flags.json,
|
|
210
|
+
{ ...plan, checksum, installed: true },
|
|
211
|
+
`BIAWS v${version} instalado em ${directory}.\nPróximo passo: biaws admin instance setup --root ${directory}`,
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
import { Args, Flags } from "@oclif/core";
|
|
4
|
+
|
|
5
|
+
import { LocalInstanceCommand } from "../baseCommands.js";
|
|
6
|
+
|
|
7
|
+
const contextFlags = {
|
|
8
|
+
instance: Flags.string({
|
|
9
|
+
char: "i",
|
|
10
|
+
description: "nome da instância",
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
root: Flags.string({ description: "raiz da instalação" }),
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const descriptions = {
|
|
17
|
+
build: "constrói a imagem dos executores de monitoramento",
|
|
18
|
+
logs: "acompanha os logs dos executores de monitoramento",
|
|
19
|
+
start: "inicia os executores de monitoramento",
|
|
20
|
+
status: "exibe o estado dos executores de monitoramento",
|
|
21
|
+
stop: "interrompe os executores de monitoramento",
|
|
22
|
+
validate: "valida arquivos, segredos e a configuração dos executores",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function createAdminMonitoringCommand(action) {
|
|
26
|
+
return class AdminMonitoringAction extends LocalInstanceCommand {
|
|
27
|
+
static description = descriptions[action];
|
|
28
|
+
static args = {
|
|
29
|
+
workspace: Args.string({
|
|
30
|
+
description: "identificadores locais dos workspaces",
|
|
31
|
+
multiple: true,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
static flags = contextFlags;
|
|
35
|
+
|
|
36
|
+
async run() {
|
|
37
|
+
const { args, flags } = await this.parse(this.constructor);
|
|
38
|
+
const context = await this.localContext({
|
|
39
|
+
instance: flags.instance,
|
|
40
|
+
root: flags.root,
|
|
41
|
+
});
|
|
42
|
+
const script = path.join(
|
|
43
|
+
context.repositoryRoot,
|
|
44
|
+
"scripts",
|
|
45
|
+
"manage-monitoring-workspaces.sh",
|
|
46
|
+
);
|
|
47
|
+
await this.adapters.processRunner.run("bash", [
|
|
48
|
+
script,
|
|
49
|
+
"--instance",
|
|
50
|
+
flags.instance,
|
|
51
|
+
action,
|
|
52
|
+
...(args.workspace || []),
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export class AdminMonitoringProvisionCommand extends LocalInstanceCommand {
|
|
59
|
+
static description =
|
|
60
|
+
"provisiona a identidade técnica de monitoramento de um workspace";
|
|
61
|
+
static args = {
|
|
62
|
+
workspace: Args.string({
|
|
63
|
+
description: "identificador local do workspace",
|
|
64
|
+
required: true,
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
static flags = contextFlags;
|
|
68
|
+
|
|
69
|
+
async run() {
|
|
70
|
+
const { args, flags } = await this.parse(this.constructor);
|
|
71
|
+
const context = await this.localContext({
|
|
72
|
+
instance: flags.instance,
|
|
73
|
+
root: flags.root,
|
|
74
|
+
});
|
|
75
|
+
const script = path.join(
|
|
76
|
+
context.repositoryRoot,
|
|
77
|
+
"scripts",
|
|
78
|
+
"provision-monitoring-workspace.mjs",
|
|
79
|
+
);
|
|
80
|
+
await this.adapters.processRunner.run("node", [
|
|
81
|
+
script,
|
|
82
|
+
"--instance",
|
|
83
|
+
flags.instance,
|
|
84
|
+
"--workspace",
|
|
85
|
+
args.workspace,
|
|
86
|
+
]);
|
|
87
|
+
}
|
|
88
|
+
}
|
package/src/apiClient.js
CHANGED
|
@@ -2,6 +2,23 @@ function trimTrailingSlash(value) {
|
|
|
2
2
|
return String(value || "").replace(/\/+$/u, "");
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
function errorCodeForStatus(status) {
|
|
6
|
+
const codes = {
|
|
7
|
+
401: "UNAUTHENTICATED",
|
|
8
|
+
403: "FORBIDDEN",
|
|
9
|
+
404: "NOT_FOUND",
|
|
10
|
+
409: "CONFLICT",
|
|
11
|
+
};
|
|
12
|
+
return codes[status] || "ISSUE_API_ERROR";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function apiError(response, data) {
|
|
16
|
+
const error = new Error(data?.error?.message || `HTTP ${response.status}`);
|
|
17
|
+
error.statusCode = response.status;
|
|
18
|
+
error.code = data?.error?.code || errorCodeForStatus(response.status);
|
|
19
|
+
return error;
|
|
20
|
+
}
|
|
21
|
+
|
|
5
22
|
export function createApiClient(baseUrl, apiKey, workspaceId = "") {
|
|
6
23
|
const apiRoot = `${trimTrailingSlash(baseUrl)}/api`;
|
|
7
24
|
const root = `${apiRoot}/skills`;
|
|
@@ -18,24 +35,7 @@ export function createApiClient(baseUrl, apiKey, workspaceId = "") {
|
|
|
18
35
|
},
|
|
19
36
|
});
|
|
20
37
|
const data = await response.json().catch(() => null);
|
|
21
|
-
if (!response.ok)
|
|
22
|
-
const error = new Error(
|
|
23
|
-
data?.error?.message || `HTTP ${response.status}`,
|
|
24
|
-
);
|
|
25
|
-
error.statusCode = response.status;
|
|
26
|
-
error.code =
|
|
27
|
-
data?.error?.code ||
|
|
28
|
-
(response.status === 401
|
|
29
|
-
? "UNAUTHENTICATED"
|
|
30
|
-
: response.status === 403
|
|
31
|
-
? "FORBIDDEN"
|
|
32
|
-
: response.status === 404
|
|
33
|
-
? "NOT_FOUND"
|
|
34
|
-
: response.status === 409
|
|
35
|
-
? "CONFLICT"
|
|
36
|
-
: "ISSUE_API_ERROR");
|
|
37
|
-
throw error;
|
|
38
|
-
}
|
|
38
|
+
if (!response.ok) throw apiError(response, data);
|
|
39
39
|
return data;
|
|
40
40
|
}
|
|
41
41
|
|
package/src/baseCommands.js
CHANGED
|
@@ -90,11 +90,15 @@ export class BaseCommand extends Command {
|
|
|
90
90
|
toolDirectory: TOOL_DIRECTORY,
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
commandContext(input = {}) {
|
|
95
|
+
return resolveCommandContext(this.contextOptions(input));
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
export class LocalInstanceCommand extends BaseCommand {
|
|
96
100
|
localContext(input = {}) {
|
|
97
|
-
return
|
|
101
|
+
return this.commandContext(input);
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdminConfigCommand as default } from "../../admin/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdminDoctorCommand as default } from "../../admin/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdminInstallCommand as default } from "../../admin/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/backup.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/remove.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/restore.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/setup.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/show.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/start.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/status.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/instance/stop.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdminMonitoringProvisionCommand as default } from "../../../admin/monitoringCommands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigDoctorCommand as default } from "../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigInitCommand as default } from "../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigLoginCommand as default } from "../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigProfilesListCommand as default } from "../../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigProfilesUseCommand as default } from "../../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigSetCommand as default } from "../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigShowCommand as default } from "../../configuration/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfigUnsetCommand as default } from "../../configuration/commands.js";
|
package/src/cli/help.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Args, Command, Help } from "@oclif/core";
|
|
2
|
+
|
|
3
|
+
const OVERVIEW = `Bondia Workspaces (BIAWS)
|
|
4
|
+
|
|
5
|
+
O BIAWS organiza o contexto operacional de aplicações, melhorias, issues,
|
|
6
|
+
conhecimento e agentes. Este CLI permite administrar uma instalação, configurar
|
|
7
|
+
o acesso global e trabalhar com o workspace associado à pasta atual.
|
|
8
|
+
|
|
9
|
+
NÍVEIS
|
|
10
|
+
admin instala, diagnostica e opera instâncias da plataforma
|
|
11
|
+
config gerencia URLs, perfis e credenciais globais
|
|
12
|
+
workspace associa a pasta e acessa os recursos do workspace
|
|
13
|
+
|
|
14
|
+
PRIMEIROS PASSOS
|
|
15
|
+
biaws config init
|
|
16
|
+
biaws workspace init
|
|
17
|
+
biaws workspace applications list
|
|
18
|
+
|
|
19
|
+
AJUDA
|
|
20
|
+
biaws help admin
|
|
21
|
+
biaws help config
|
|
22
|
+
biaws help workspace issues
|
|
23
|
+
|
|
24
|
+
PROJETO
|
|
25
|
+
https://github.com/fbondia/biaws`;
|
|
26
|
+
|
|
27
|
+
export default class HelpCommand extends Command {
|
|
28
|
+
static description = "explica o BIAWS ou exibe a ajuda de um comando";
|
|
29
|
+
static strict = false;
|
|
30
|
+
static args = {
|
|
31
|
+
command: Args.string({
|
|
32
|
+
description: "caminho do comando",
|
|
33
|
+
multiple: true,
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
async run() {
|
|
38
|
+
const { args } = await this.parse(this.constructor);
|
|
39
|
+
const subject = args.command || [];
|
|
40
|
+
if (!subject.length) {
|
|
41
|
+
this.log(OVERVIEW);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
await new Help(this.config).showHelp(subject);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../../commands/configure/claude.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../../commands/configure/codex.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/configure/doctor.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../workspace/apiCommand.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/applications/get.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/applications/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceCurrentCommand as default } from "../../workspace/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/demands/complete-task.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/demands/get.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/demands/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/demands/task-status.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/demands/tasks.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../commands/workspaces/get.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceInitCommand as default } from "../../workspace/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/issues/get.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/issues/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/issues/transition.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../commands/workspaces/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/monitoring/describe.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/monitoring/signal.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/monitoring/signals.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/monitoring/validate.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/install-all.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/install.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/list.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/publish-all.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/publish.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/status.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "../../../commands/skills/update.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceUnlinkCommand as default } from "../../workspace/commands.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WorkspaceUseCommand as default } from "../../workspace/commands.js";
|