chief-helm 0.1.1
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 +220 -0
- package/dist/commands/config.d.ts +26 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +111 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/inputs.d.ts +21 -0
- package/dist/commands/inputs.d.ts.map +1 -0
- package/dist/commands/inputs.js +158 -0
- package/dist/commands/inputs.js.map +1 -0
- package/dist/commands/push.d.ts +21 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +51 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/secrets.d.ts +21 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +110 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/setup.d.ts +24 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +421 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/status.d.ts +20 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +184 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +19 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +47 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/core/config.d.ts +74 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +182 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/git.d.ts +73 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +188 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/inputs.d.ts +40 -0
- package/dist/core/inputs.d.ts.map +1 -0
- package/dist/core/inputs.js +360 -0
- package/dist/core/inputs.js.map +1 -0
- package/dist/core/repo.d.ts +71 -0
- package/dist/core/repo.d.ts.map +1 -0
- package/dist/core/repo.js +152 -0
- package/dist/core/repo.js.map +1 -0
- package/dist/core/secrets.d.ts +79 -0
- package/dist/core/secrets.d.ts.map +1 -0
- package/dist/core/secrets.js +168 -0
- package/dist/core/secrets.js.map +1 -0
- package/dist/core/state.d.ts +46 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +119 -0
- package/dist/core/state.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +210 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/components/Header.d.ts +32 -0
- package/dist/ui/components/Header.d.ts.map +1 -0
- package/dist/ui/components/Header.js +15 -0
- package/dist/ui/components/Header.js.map +1 -0
- package/dist/ui/components/Panel.d.ts +30 -0
- package/dist/ui/components/Panel.d.ts.map +1 -0
- package/dist/ui/components/Panel.js +15 -0
- package/dist/ui/components/Panel.js.map +1 -0
- package/dist/ui/components/StatusRow.d.ts +39 -0
- package/dist/ui/components/StatusRow.d.ts.map +1 -0
- package/dist/ui/components/StatusRow.js +27 -0
- package/dist/ui/components/StatusRow.js.map +1 -0
- package/dist/ui/theme.d.ts +60 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +60 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/utils/errors.d.ts +50 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +63 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/format.d.ts +66 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +107 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/logger.d.ts +35 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +71 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file helm secrets — OS keychain credential management.
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* helm secrets set <key> Masked input → stored in OS keychain
|
|
6
|
+
* helm secrets list Key names only, never values
|
|
7
|
+
* helm secrets verify <key> Confirm key exists in keychain
|
|
8
|
+
* helm secrets delete <key> Remove with confirmation prompt
|
|
9
|
+
*
|
|
10
|
+
* Secret values are never printed, logged, or included in error messages.
|
|
11
|
+
* The only moment a value appears on-screen is during `helm secrets set`
|
|
12
|
+
* where inquirer masks the input with asterisks.
|
|
13
|
+
*/
|
|
14
|
+
import type { Command } from "commander";
|
|
15
|
+
/**
|
|
16
|
+
* Registers the `helm secrets` subcommand group on the given Commander program.
|
|
17
|
+
*
|
|
18
|
+
* @param program - The root Commander Command instance.
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerSecretsCommand(program: Command): void;
|
|
21
|
+
//# sourceMappingURL=secrets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../src/commands/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAazC;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0H7D"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file helm secrets — OS keychain credential management.
|
|
3
|
+
*
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* helm secrets set <key> Masked input → stored in OS keychain
|
|
6
|
+
* helm secrets list Key names only, never values
|
|
7
|
+
* helm secrets verify <key> Confirm key exists in keychain
|
|
8
|
+
* helm secrets delete <key> Remove with confirmation prompt
|
|
9
|
+
*
|
|
10
|
+
* Secret values are never printed, logged, or included in error messages.
|
|
11
|
+
* The only moment a value appears on-screen is during `helm secrets set`
|
|
12
|
+
* where inquirer masks the input with asterisks.
|
|
13
|
+
*/
|
|
14
|
+
import chalk from "chalk";
|
|
15
|
+
import inquirer from "inquirer";
|
|
16
|
+
import { requireSetup, getLocalConfig } from "../core/repo.js";
|
|
17
|
+
import { setSecret, listSecretKeys, verifySecret, deleteSecret, } from "../core/secrets.js";
|
|
18
|
+
import { HelmError } from "../utils/errors.js";
|
|
19
|
+
import { theme, symbol } from "../ui/theme.js";
|
|
20
|
+
// ─── Command Registration ─────────────────────────────────────────────────────
|
|
21
|
+
/**
|
|
22
|
+
* Registers the `helm secrets` subcommand group on the given Commander program.
|
|
23
|
+
*
|
|
24
|
+
* @param program - The root Commander Command instance.
|
|
25
|
+
*/
|
|
26
|
+
export function registerSecretsCommand(program) {
|
|
27
|
+
const secrets = program
|
|
28
|
+
.command("secrets")
|
|
29
|
+
.description("Manage OS keychain credentials");
|
|
30
|
+
// ── set ────────────────────────────────────────────────────────────────────
|
|
31
|
+
secrets
|
|
32
|
+
.command("set <key>")
|
|
33
|
+
.description("Store a secret in the OS keychain (masked input)")
|
|
34
|
+
.action(async (key) => {
|
|
35
|
+
requireSetup();
|
|
36
|
+
const { active_user: username } = getLocalConfig();
|
|
37
|
+
const { value } = await inquirer.prompt([
|
|
38
|
+
{
|
|
39
|
+
type: "password",
|
|
40
|
+
name: "value",
|
|
41
|
+
message: ` ${key}:`,
|
|
42
|
+
mask: "*",
|
|
43
|
+
validate: (v) => v.trim().length > 0 || "Value cannot be empty.",
|
|
44
|
+
},
|
|
45
|
+
]);
|
|
46
|
+
await setSecret(username, key, value);
|
|
47
|
+
console.log(` ${chalk.hex(theme.success)(symbol.success)} Secret "${key}" stored in OS keychain.`);
|
|
48
|
+
});
|
|
49
|
+
// ── list ───────────────────────────────────────────────────────────────────
|
|
50
|
+
secrets
|
|
51
|
+
.command("list")
|
|
52
|
+
.description("List stored secret key names (values are never shown)")
|
|
53
|
+
.action(() => {
|
|
54
|
+
requireSetup();
|
|
55
|
+
const { active_user: username } = getLocalConfig();
|
|
56
|
+
const keys = listSecretKeys(username);
|
|
57
|
+
if (keys.length === 0) {
|
|
58
|
+
console.log(chalk.hex(theme.muted)(` No secrets stored for ${username}.\n Run: helm secrets set <KEY_NAME>`));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
console.log(`\n ${chalk.hex(theme.text).bold("Stored secret keys")} ${chalk.hex(theme.muted)(`(${keys.length} total — values not shown)`)}`);
|
|
62
|
+
for (const key of keys) {
|
|
63
|
+
console.log(` ${chalk.hex(theme.muted)(symbol.bullet)} ${chalk.hex(theme.text)(key)}`);
|
|
64
|
+
}
|
|
65
|
+
console.log();
|
|
66
|
+
});
|
|
67
|
+
// ── verify ─────────────────────────────────────────────────────────────────
|
|
68
|
+
secrets
|
|
69
|
+
.command("verify <key>")
|
|
70
|
+
.description("Confirm a secret key exists in the OS keychain")
|
|
71
|
+
.action(async (key) => {
|
|
72
|
+
requireSetup();
|
|
73
|
+
const { active_user: username } = getLocalConfig();
|
|
74
|
+
const exists = await verifySecret(username, key);
|
|
75
|
+
if (exists) {
|
|
76
|
+
console.log(` ${chalk.hex(theme.success)(symbol.success)} "${key}" exists in the OS keychain.`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
throw new HelmError(`Secret "${key}" was not found in the OS keychain.`, `Run: helm secrets set ${key}`);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
// ── delete ─────────────────────────────────────────────────────────────────
|
|
83
|
+
secrets
|
|
84
|
+
.command("delete <key>")
|
|
85
|
+
.description("Remove a secret from the OS keychain")
|
|
86
|
+
.action(async (key) => {
|
|
87
|
+
requireSetup();
|
|
88
|
+
const { active_user: username } = getLocalConfig();
|
|
89
|
+
const { confirmed } = await inquirer.prompt([
|
|
90
|
+
{
|
|
91
|
+
type: "confirm",
|
|
92
|
+
name: "confirmed",
|
|
93
|
+
message: ` Delete secret "${key}" from the OS keychain?`,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
]);
|
|
97
|
+
if (!confirmed) {
|
|
98
|
+
console.log(chalk.hex(theme.muted)(" Cancelled."));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const deleted = await deleteSecret(username, key);
|
|
102
|
+
if (deleted) {
|
|
103
|
+
console.log(` ${chalk.hex(theme.success)(symbol.success)} Secret "${key}" deleted from OS keychain.`);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
throw new HelmError(`Secret "${key}" was not found in the OS keychain.`, `Run: helm secrets list to see what keys are stored.`);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secrets.js","sourceRoot":"","sources":["../../src/commands/secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,SAAS,EACT,cAAc,EACd,YAAY,EACZ,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE/C,iFAAiF;AAEjF;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAEjD,8EAA8E;IAE9E,OAAO;SACJ,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CAAC,kDAAkD,CAAC;SAC/D,MAAM,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;QAC5B,YAAY,EAAE,CAAC;QAEf,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;QAEnD,MAAM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G,MAAM,QAAQ,CAAC,MAAM,CAAyB;YAClE;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,oBAAoB,GAAG,yBAAyB;gBACzD,OAAO,EAAE,KAAK;aACf;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;YACpD,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAElD,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,GAAG,CACT,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,6BAA6B,CAC3F,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,SAAS,CACjB,WAAW,GAAG,qCAAqC,EACnD,qDAAqD,CACtD,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file helm setup — guided first-time setup wizard.
|
|
3
|
+
*
|
|
4
|
+
* Walks the user through six sequential steps to configure HELM against
|
|
5
|
+
* their personal CHIEF instance repo. setup_complete is only set to true
|
|
6
|
+
* after Step 6 (git push) succeeds. If the wizard is interrupted or push
|
|
7
|
+
* fails, re-running helm setup is safe — existing config and credentials
|
|
8
|
+
* are preserved and steps that have already completed are idempotent.
|
|
9
|
+
*
|
|
10
|
+
* Step 1: Locate and validate the instance repo.
|
|
11
|
+
* Step 2: Create user identity and initialise /users/[username]/.
|
|
12
|
+
* Step 3: Connect inputs — collect credentials, test each connection.
|
|
13
|
+
* Step 4: Review agents and flows, optionally disable any.
|
|
14
|
+
* Step 5: Remind about key documents, offer to open in editor.
|
|
15
|
+
* Step 6: Commit and push all setup changes.
|
|
16
|
+
*/
|
|
17
|
+
import type { Command } from "commander";
|
|
18
|
+
/**
|
|
19
|
+
* Registers the `helm setup` command on the given Commander program.
|
|
20
|
+
*
|
|
21
|
+
* @param program - The root Commander Command instance.
|
|
22
|
+
*/
|
|
23
|
+
export declare function registerSetupCommand(program: Command): void;
|
|
24
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAggBzC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6B3D"}
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file helm setup — guided first-time setup wizard.
|
|
3
|
+
*
|
|
4
|
+
* Walks the user through six sequential steps to configure HELM against
|
|
5
|
+
* their personal CHIEF instance repo. setup_complete is only set to true
|
|
6
|
+
* after Step 6 (git push) succeeds. If the wizard is interrupted or push
|
|
7
|
+
* fails, re-running helm setup is safe — existing config and credentials
|
|
8
|
+
* are preserved and steps that have already completed are idempotent.
|
|
9
|
+
*
|
|
10
|
+
* Step 1: Locate and validate the instance repo.
|
|
11
|
+
* Step 2: Create user identity and initialise /users/[username]/.
|
|
12
|
+
* Step 3: Connect inputs — collect credentials, test each connection.
|
|
13
|
+
* Step 4: Review agents and flows, optionally disable any.
|
|
14
|
+
* Step 5: Remind about key documents, offer to open in editor.
|
|
15
|
+
* Step 6: Commit and push all setup changes.
|
|
16
|
+
*/
|
|
17
|
+
import fs from "fs";
|
|
18
|
+
import path from "path";
|
|
19
|
+
import chalk from "chalk";
|
|
20
|
+
import inquirer from "inquirer";
|
|
21
|
+
import { isValidRepoStructure, expandHomePath, updateLocalConfig, localStore, } from "../core/repo.js";
|
|
22
|
+
import { readInputsConfig, writeInputsConfig, readAgentsConfig, writeAgentsConfig, readFlowsConfig, writeFlowsConfig, } from "../core/config.js";
|
|
23
|
+
import { setSecret } from "../core/secrets.js";
|
|
24
|
+
import { INPUT_CREDENTIAL_KEYS, testInput } from "../core/inputs.js";
|
|
25
|
+
import { commitAndPush } from "../core/git.js";
|
|
26
|
+
import { ensureStateDir } from "../core/state.js";
|
|
27
|
+
import { theme, symbol } from "../ui/theme.js";
|
|
28
|
+
import { execa } from "execa";
|
|
29
|
+
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
30
|
+
/**
|
|
31
|
+
* User profile documents that must exist under /users/[username]/.
|
|
32
|
+
* Created as blank placeholders if /users/_template/ is absent.
|
|
33
|
+
*/
|
|
34
|
+
const USER_DOCS = [
|
|
35
|
+
"USER.md",
|
|
36
|
+
"VOICE.md",
|
|
37
|
+
"CLIENTS.md",
|
|
38
|
+
"SCHEDULING.md",
|
|
39
|
+
"CLASSIFY.md",
|
|
40
|
+
];
|
|
41
|
+
/** Commit message used at the end of helm setup. */
|
|
42
|
+
const SETUP_COMMIT_PREFIX = "[manual] setup: initialized user";
|
|
43
|
+
// ─── Print Helpers ────────────────────────────────────────────────────────────
|
|
44
|
+
/** Prints a step header to visually separate wizard phases. */
|
|
45
|
+
function printStep(n, title) {
|
|
46
|
+
console.log(`\n${chalk.hex(theme.accent).bold(` Step ${n}`)} ${chalk.hex(theme.text)(title)}`);
|
|
47
|
+
console.log(chalk.hex(theme.border)(` ${"─".repeat(50)}`));
|
|
48
|
+
}
|
|
49
|
+
/** Prints a success line. */
|
|
50
|
+
function ok(msg) {
|
|
51
|
+
console.log(` ${chalk.hex(theme.success)(symbol.success)} ${msg}`);
|
|
52
|
+
}
|
|
53
|
+
/** Prints a warning line. */
|
|
54
|
+
function warn(msg) {
|
|
55
|
+
console.log(` ${chalk.hex(theme.warning)(symbol.warning)} ${msg}`);
|
|
56
|
+
}
|
|
57
|
+
// ─── Step 1: Locate Instance Repo ────────────────────────────────────────────
|
|
58
|
+
/**
|
|
59
|
+
* Prompts the user for their instance repo path, validates the CHIEF
|
|
60
|
+
* directory structure, and persists the path to local config.
|
|
61
|
+
*
|
|
62
|
+
* Fails fast if the directory does not contain a valid CHIEF structure,
|
|
63
|
+
* directing the user to finish setting up CHIEF before running helm setup.
|
|
64
|
+
*
|
|
65
|
+
* @returns The validated absolute repo path.
|
|
66
|
+
*/
|
|
67
|
+
async function step1LocateRepo() {
|
|
68
|
+
printStep(1, "Locate instance repo");
|
|
69
|
+
const { rawPath } = await inquirer.prompt([
|
|
70
|
+
{
|
|
71
|
+
type: "input",
|
|
72
|
+
name: "rawPath",
|
|
73
|
+
message: " Path to your personal CHIEF instance repo:",
|
|
74
|
+
validate: (input) => {
|
|
75
|
+
if (!input.trim())
|
|
76
|
+
return "Path cannot be empty.";
|
|
77
|
+
const expanded = expandHomePath(input.trim());
|
|
78
|
+
if (!fs.existsSync(expanded))
|
|
79
|
+
return `Directory not found: ${expanded}`;
|
|
80
|
+
if (!isValidRepoStructure(expanded)) {
|
|
81
|
+
return ("This does not look like a fully initialised CHIEF instance repo.\n" +
|
|
82
|
+
" Ensure /config/inputs.yaml, agents.yaml, flows.yaml, and triggers.yaml exist before running helm setup.");
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
]);
|
|
88
|
+
const repoRoot = expandHomePath(rawPath.trim());
|
|
89
|
+
updateLocalConfig({ instance_repo_path: repoRoot });
|
|
90
|
+
ok(`Repo found: ${repoRoot}`);
|
|
91
|
+
return repoRoot;
|
|
92
|
+
}
|
|
93
|
+
// ─── Step 2: Create User Identity ────────────────────────────────────────────
|
|
94
|
+
/**
|
|
95
|
+
* Collects username, full name, timezone, language, and preferred
|
|
96
|
+
* editor. Creates /users/[username]/ by copying _template/ if present,
|
|
97
|
+
* or by writing blank placeholder files. Pre-populates USER.md with
|
|
98
|
+
* the collected identity fields.
|
|
99
|
+
*
|
|
100
|
+
* @param repoRoot - Validated absolute path to the instance repo.
|
|
101
|
+
* @returns The username entered by the user.
|
|
102
|
+
*/
|
|
103
|
+
async function step2CreateUserIdentity(repoRoot) {
|
|
104
|
+
printStep(2, "Create user identity");
|
|
105
|
+
const { username, fullName, timezone, language, editor } = await inquirer.prompt([
|
|
106
|
+
{
|
|
107
|
+
type: "input",
|
|
108
|
+
name: "username",
|
|
109
|
+
message: " Username (letters, numbers, hyphens only):",
|
|
110
|
+
validate: (v) => /^[a-z0-9-]+$/.test(v) ||
|
|
111
|
+
"Use only lowercase letters, numbers, and hyphens.",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
type: "input",
|
|
115
|
+
name: "fullName",
|
|
116
|
+
message: " Full name:",
|
|
117
|
+
validate: (v) => v.trim().length > 0 || "Full name cannot be empty.",
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "input",
|
|
121
|
+
name: "timezone",
|
|
122
|
+
message: " Timezone (e.g. America/New_York):",
|
|
123
|
+
default: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: "input",
|
|
127
|
+
name: "language",
|
|
128
|
+
message: " Language code (e.g. en):",
|
|
129
|
+
default: "en",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: "input",
|
|
133
|
+
name: "editor",
|
|
134
|
+
message: " Editor command (e.g. code, vim, nano):",
|
|
135
|
+
default: process.env["EDITOR"] ?? "code",
|
|
136
|
+
},
|
|
137
|
+
]);
|
|
138
|
+
const userDir = path.join(repoRoot, "users", username);
|
|
139
|
+
const templateDir = path.join(repoRoot, "users", "_template");
|
|
140
|
+
const templateExists = fs.existsSync(templateDir);
|
|
141
|
+
if (!fs.existsSync(userDir)) {
|
|
142
|
+
if (templateExists) {
|
|
143
|
+
fs.cpSync(templateDir, userDir, { recursive: true });
|
|
144
|
+
ok(`Copied template to users/${username}/`);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
fs.mkdirSync(userDir, { recursive: true });
|
|
148
|
+
for (const doc of USER_DOCS) {
|
|
149
|
+
const docPath = path.join(userDir, doc);
|
|
150
|
+
fs.writeFileSync(docPath, `# ${doc.replace(".md", "")} — ${fullName}\n\n<!-- Fill in this document. See SETUP.md for guidance. -->\n`, "utf-8");
|
|
151
|
+
}
|
|
152
|
+
warn(`users/_template/ not found — blank placeholder files created in users/${username}/. Fill them in before running flows.`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
ok(`users/${username}/ already exists — skipping creation.`);
|
|
157
|
+
}
|
|
158
|
+
// Pre-populate USER.md with identity fields regardless of source.
|
|
159
|
+
const userMdPath = path.join(userDir, "USER.md");
|
|
160
|
+
const existing = fs.existsSync(userMdPath)
|
|
161
|
+
? fs.readFileSync(userMdPath, "utf-8")
|
|
162
|
+
: "";
|
|
163
|
+
const identityBlock = [
|
|
164
|
+
`<!-- HELM setup — do not remove this block -->`,
|
|
165
|
+
`**Username:** ${username}`,
|
|
166
|
+
`**Full Name:** ${fullName}`,
|
|
167
|
+
`**Timezone:** ${timezone}`,
|
|
168
|
+
`**Language:** ${language}`,
|
|
169
|
+
`<!-- end HELM setup block -->`,
|
|
170
|
+
].join("\n");
|
|
171
|
+
if (!existing.includes("<!-- HELM setup")) {
|
|
172
|
+
fs.writeFileSync(userMdPath, `${identityBlock}\n\n${existing}`, "utf-8");
|
|
173
|
+
}
|
|
174
|
+
// Ensure runtime support directories exist.
|
|
175
|
+
ensureStateDir(repoRoot, username);
|
|
176
|
+
for (const dir of ["outputs", "logs", "context", "knowledge"]) {
|
|
177
|
+
const userSubDir = path.join(repoRoot, dir, username);
|
|
178
|
+
if (!fs.existsSync(userSubDir)) {
|
|
179
|
+
fs.mkdirSync(userSubDir, { recursive: true });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
updateLocalConfig({ active_user: username, editor });
|
|
183
|
+
ok(`User identity saved: ${fullName} (${username})`);
|
|
184
|
+
return username;
|
|
185
|
+
}
|
|
186
|
+
// ─── Step 3: Connect Inputs ───────────────────────────────────────────────────
|
|
187
|
+
/**
|
|
188
|
+
* For each input in inputs.yaml, asks whether to enable it. For enabled
|
|
189
|
+
* inputs, collects all required credentials via masked prompts, stores
|
|
190
|
+
* them in the OS keychain, and runs a connectivity test.
|
|
191
|
+
*
|
|
192
|
+
* Updates the `enabled` and `configured` fields in inputs.yaml after
|
|
193
|
+
* each input is processed. This ensures partial progress is persisted
|
|
194
|
+
* even if the wizard is interrupted.
|
|
195
|
+
*
|
|
196
|
+
* @param repoRoot - Absolute path to the instance repo.
|
|
197
|
+
* @param username - Active username for keychain scoping.
|
|
198
|
+
*/
|
|
199
|
+
async function step3ConnectInputs(repoRoot, username) {
|
|
200
|
+
printStep(3, "Connect inputs");
|
|
201
|
+
const inputs = readInputsConfig(repoRoot);
|
|
202
|
+
for (const input of inputs) {
|
|
203
|
+
console.log(`\n ${chalk.hex(theme.text).bold(input.label)}`);
|
|
204
|
+
if (input.setup_guide) {
|
|
205
|
+
console.log(chalk.hex(theme.muted)(` ${input.setup_guide}`));
|
|
206
|
+
}
|
|
207
|
+
const { enable } = await inquirer.prompt([
|
|
208
|
+
{
|
|
209
|
+
type: "confirm",
|
|
210
|
+
name: "enable",
|
|
211
|
+
message: ` Enable ${input.label}?`,
|
|
212
|
+
default: input.enabled,
|
|
213
|
+
},
|
|
214
|
+
]);
|
|
215
|
+
input.enabled = enable;
|
|
216
|
+
if (!enable) {
|
|
217
|
+
input.configured = false;
|
|
218
|
+
console.log(chalk.hex(theme.skip)(` ${symbol.disabled} Skipped`));
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
const credentialKeys = INPUT_CREDENTIAL_KEYS[input.id] ??
|
|
222
|
+
(input.credentials_ref ? [input.credentials_ref] : []);
|
|
223
|
+
if (credentialKeys.length === 0) {
|
|
224
|
+
warn(`No credential keys defined for ${input.id} — skipping.`);
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
for (const key of credentialKeys) {
|
|
228
|
+
const { value } = await inquirer.prompt([
|
|
229
|
+
{
|
|
230
|
+
type: "password",
|
|
231
|
+
name: "value",
|
|
232
|
+
message: ` ${key}:`,
|
|
233
|
+
mask: "*",
|
|
234
|
+
validate: (v) => v.trim().length > 0 || `${key} cannot be empty.`,
|
|
235
|
+
},
|
|
236
|
+
]);
|
|
237
|
+
await setSecret(username, key, value);
|
|
238
|
+
}
|
|
239
|
+
process.stdout.write(` ${chalk.hex(theme.muted)("Testing connection…")} `);
|
|
240
|
+
const result = await testInput(input.id, username);
|
|
241
|
+
if (result.ok) {
|
|
242
|
+
input.configured = true;
|
|
243
|
+
ok(`Connected${result.detail ? ` — ${result.detail}` : ""}`);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
input.configured = false;
|
|
247
|
+
console.log(`\n ${chalk.hex(theme.error)(symbol.error)} ${result.error ?? "Connection failed."}`);
|
|
248
|
+
if (result.fix) {
|
|
249
|
+
console.log(chalk.hex(theme.muted)(` ${symbol.arrow} ${result.fix}`));
|
|
250
|
+
}
|
|
251
|
+
warn("You can fix this later with: helm inputs test " + input.id);
|
|
252
|
+
}
|
|
253
|
+
// Persist after each input so partial progress survives interruptions.
|
|
254
|
+
writeInputsConfig(repoRoot, inputs);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// ─── Step 4: Confirm Agents and Flows ────────────────────────────────────────
|
|
258
|
+
/**
|
|
259
|
+
* Displays all agents and flows from config (all enabled by default).
|
|
260
|
+
* Asks which, if any, should be disabled. Writes updated config files.
|
|
261
|
+
*
|
|
262
|
+
* @param repoRoot - Absolute path to the instance repo.
|
|
263
|
+
*/
|
|
264
|
+
async function step4ConfirmAgentsFlows(repoRoot) {
|
|
265
|
+
printStep(4, "Confirm agents and flows");
|
|
266
|
+
const agents = readAgentsConfig(repoRoot);
|
|
267
|
+
const flows = readFlowsConfig(repoRoot);
|
|
268
|
+
// Agents
|
|
269
|
+
console.log(`\n ${chalk.hex(theme.text)("Agents:")}`);
|
|
270
|
+
for (const agent of agents) {
|
|
271
|
+
console.log(` ${agent.enabled ? chalk.hex(theme.success)(symbol.success) : chalk.hex(theme.skip)(symbol.disabled)} ${agent.label} (${agent.id})`);
|
|
272
|
+
}
|
|
273
|
+
const agentChoices = agents.map((a) => ({
|
|
274
|
+
name: `${a.label} (${a.id})`,
|
|
275
|
+
value: a.id,
|
|
276
|
+
checked: a.enabled,
|
|
277
|
+
}));
|
|
278
|
+
const { enabledAgentIds } = await inquirer.prompt([
|
|
279
|
+
{
|
|
280
|
+
type: "checkbox",
|
|
281
|
+
name: "enabledAgentIds",
|
|
282
|
+
message: " Select agents to keep enabled:",
|
|
283
|
+
choices: agentChoices,
|
|
284
|
+
},
|
|
285
|
+
]);
|
|
286
|
+
for (const agent of agents) {
|
|
287
|
+
agent.enabled = enabledAgentIds.includes(agent.id);
|
|
288
|
+
}
|
|
289
|
+
writeAgentsConfig(repoRoot, agents);
|
|
290
|
+
// Flows
|
|
291
|
+
console.log(`\n ${chalk.hex(theme.text)("Flows:")}`);
|
|
292
|
+
for (const flow of flows) {
|
|
293
|
+
console.log(` ${flow.enabled ? chalk.hex(theme.success)(symbol.success) : chalk.hex(theme.skip)(symbol.disabled)} ${flow.label} (${flow.id})`);
|
|
294
|
+
}
|
|
295
|
+
const flowChoices = flows.map((f) => ({
|
|
296
|
+
name: `${f.label} (${f.id})`,
|
|
297
|
+
value: f.id,
|
|
298
|
+
checked: f.enabled,
|
|
299
|
+
}));
|
|
300
|
+
const { enabledFlowIds } = await inquirer.prompt([
|
|
301
|
+
{
|
|
302
|
+
type: "checkbox",
|
|
303
|
+
name: "enabledFlowIds",
|
|
304
|
+
message: " Select flows to keep enabled:",
|
|
305
|
+
choices: flowChoices,
|
|
306
|
+
},
|
|
307
|
+
]);
|
|
308
|
+
for (const flow of flows) {
|
|
309
|
+
flow.enabled = enabledFlowIds.includes(flow.id);
|
|
310
|
+
}
|
|
311
|
+
writeFlowsConfig(repoRoot, flows);
|
|
312
|
+
ok("Agent and flow configuration saved.");
|
|
313
|
+
}
|
|
314
|
+
// ─── Step 5: Key Documents ────────────────────────────────────────────────────
|
|
315
|
+
/**
|
|
316
|
+
* Lists the five key profile documents the user must fill in before
|
|
317
|
+
* running flows. Offers to open each in the configured editor.
|
|
318
|
+
*
|
|
319
|
+
* @param repoRoot - Absolute path to the instance repo.
|
|
320
|
+
* @param username - Active username.
|
|
321
|
+
* @param editor - Editor command (e.g. "code").
|
|
322
|
+
*/
|
|
323
|
+
async function step5KeyDocuments(repoRoot, username, editor) {
|
|
324
|
+
printStep(5, "Key documents");
|
|
325
|
+
console.log(chalk.hex(theme.muted)("\n These documents define how agents understand you and your work.\n" +
|
|
326
|
+
" Fill them in thoroughly — document quality directly affects output quality.\n"));
|
|
327
|
+
for (const doc of USER_DOCS) {
|
|
328
|
+
const docPath = path.join(repoRoot, "users", username, doc);
|
|
329
|
+
console.log(` ${chalk.hex(theme.text)(doc)} ${chalk.hex(theme.muted)(docPath)}`);
|
|
330
|
+
}
|
|
331
|
+
const { openDocs } = await inquirer.prompt([
|
|
332
|
+
{
|
|
333
|
+
type: "confirm",
|
|
334
|
+
name: "openDocs",
|
|
335
|
+
message: "\n Open all key documents in your editor now?",
|
|
336
|
+
default: false,
|
|
337
|
+
},
|
|
338
|
+
]);
|
|
339
|
+
if (openDocs) {
|
|
340
|
+
const editorParts = editor.split(" ");
|
|
341
|
+
const editorCmd = editorParts[0];
|
|
342
|
+
const editorArgs = editorParts.slice(1);
|
|
343
|
+
for (const doc of USER_DOCS) {
|
|
344
|
+
const docPath = path.join(repoRoot, "users", username, doc);
|
|
345
|
+
try {
|
|
346
|
+
await execa(editorCmd, [...editorArgs, docPath], {
|
|
347
|
+
stdio: "inherit",
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
catch {
|
|
351
|
+
warn(`Could not open ${doc} with "${editor}". Open it manually: ${docPath}`);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
console.log(chalk.hex(theme.muted)(`\n Open them later with: helm docs edit <name>, or directly in your editor.`));
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
// ─── Step 6: Commit and Push ──────────────────────────────────────────────────
|
|
360
|
+
/**
|
|
361
|
+
* Commits all setup-generated files and pushes to origin.
|
|
362
|
+
*
|
|
363
|
+
* setup_complete is only set to true after a successful push. If push
|
|
364
|
+
* fails, setup_complete remains false and the user is shown a clear
|
|
365
|
+
* recovery message. Re-running helm setup will skip already-completed
|
|
366
|
+
* steps (idempotent) and retry the push.
|
|
367
|
+
*
|
|
368
|
+
* @param repoRoot - Absolute path to the instance repo.
|
|
369
|
+
* @param username - Active username for the commit message.
|
|
370
|
+
*/
|
|
371
|
+
async function step6CommitAndPush(repoRoot, username) {
|
|
372
|
+
printStep(6, "Commit and push");
|
|
373
|
+
const filesToCommit = [
|
|
374
|
+
path.join("config", "inputs.yaml"),
|
|
375
|
+
path.join("config", "agents.yaml"),
|
|
376
|
+
path.join("config", "flows.yaml"),
|
|
377
|
+
path.join("users", username),
|
|
378
|
+
path.join("state", username),
|
|
379
|
+
path.join("outputs", username),
|
|
380
|
+
path.join("logs", username),
|
|
381
|
+
path.join("context", username),
|
|
382
|
+
path.join("knowledge", username),
|
|
383
|
+
];
|
|
384
|
+
const pushed = await commitAndPush(repoRoot, filesToCommit, `${SETUP_COMMIT_PREFIX} ${username}`);
|
|
385
|
+
if (pushed) {
|
|
386
|
+
updateLocalConfig({ setup_complete: true });
|
|
387
|
+
ok("Committed and pushed to origin.");
|
|
388
|
+
ok("Setup complete. Run: helm status");
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
updateLocalConfig({ setup_complete: false });
|
|
392
|
+
console.log(`\n ${chalk.hex(theme.error)(symbol.error)} Setup could not complete: git push failed.`);
|
|
393
|
+
console.log(chalk.hex(theme.muted)(` ${symbol.arrow} Fix your git remote auth, then push manually:\n` +
|
|
394
|
+
` cd ${repoRoot} && git push\n` +
|
|
395
|
+
` ${symbol.arrow} Then run: helm setup (it will resume safely from where it left off)`));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// ─── Command Registration ─────────────────────────────────────────────────────
|
|
399
|
+
/**
|
|
400
|
+
* Registers the `helm setup` command on the given Commander program.
|
|
401
|
+
*
|
|
402
|
+
* @param program - The root Commander Command instance.
|
|
403
|
+
*/
|
|
404
|
+
export function registerSetupCommand(program) {
|
|
405
|
+
program
|
|
406
|
+
.command("setup")
|
|
407
|
+
.description("Guided first-time setup wizard")
|
|
408
|
+
.action(async () => {
|
|
409
|
+
console.log(`\n${chalk.hex(theme.accent).bold(" ╔══════════════════════════════════════╗")}`);
|
|
410
|
+
console.log(chalk.hex(theme.accent).bold(" ║ CHIEF · HELM SETUP ║"));
|
|
411
|
+
console.log(chalk.hex(theme.accent).bold(" ╚══════════════════════════════════════╝\n"));
|
|
412
|
+
const repoRoot = await step1LocateRepo();
|
|
413
|
+
const username = await step2CreateUserIdentity(repoRoot);
|
|
414
|
+
await step3ConnectInputs(repoRoot, username);
|
|
415
|
+
await step4ConfirmAgentsFlows(repoRoot);
|
|
416
|
+
const editor = localStore.get("editor") ?? "code";
|
|
417
|
+
await step5KeyDocuments(repoRoot, username, editor);
|
|
418
|
+
await step6CommitAndPush(repoRoot, username);
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;A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,CAAC,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAC3E,CAAC;QACF,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAC7E,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,eAAe,EAAE,CAAC;QAEzC,MAAM,QAAQ,GAAG,MAAM,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAEzD,MAAM,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAE7C,MAAM,uBAAuB,CAAC,QAAQ,CAAC,CAAC;QAExC,MAAM,MAAM,GACT,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAwB,IAAI,MAAM,CAAC;QAC7D,MAAM,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEpD,MAAM,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file helm status — system health overview panel.
|
|
3
|
+
*
|
|
4
|
+
* Renders a static bordered status panel in the CHIEF visual design
|
|
5
|
+
* showing: repo path and git cleanliness, all configured inputs with
|
|
6
|
+
* connection state, last run timestamps per flow, and engine availability.
|
|
7
|
+
*
|
|
8
|
+
* This command is read-only — it makes no writes and issues no git
|
|
9
|
+
* operations. Input "connection state" is derived from the `configured`
|
|
10
|
+
* flag in inputs.yaml (set by helm setup and helm inputs test) rather
|
|
11
|
+
* than making live API calls on every status invocation.
|
|
12
|
+
*/
|
|
13
|
+
import type { Command } from "commander";
|
|
14
|
+
/**
|
|
15
|
+
* Registers the `helm status` command on the given Commander program.
|
|
16
|
+
*
|
|
17
|
+
* @param program - The root Commander Command instance.
|
|
18
|
+
*/
|
|
19
|
+
export declare function registerStatusCommand(program: Command): void;
|
|
20
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkMzC;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+C5D"}
|