@uluops/setup 0.9.4 → 0.9.5
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 +7 -3
- package/dist/cli.js +2 -0
- package/dist/commands/helpers.d.ts +1 -0
- package/dist/commands/helpers.js +9 -0
- package/dist/commands/setup.d.ts +6 -0
- package/dist/lib/asset-catalog.d.ts +2 -2
- package/dist/lib/asset-catalog.js +13 -4
- package/dist/steps/signup.d.ts +11 -3
- package/dist/steps/signup.js +26 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,10 +137,14 @@ npx @uluops/setup [options]
|
|
|
137
137
|
--harness <single-name> (fail-fast conflict error).
|
|
138
138
|
--signup Create account from terminal (email + password)
|
|
139
139
|
--scope <mode> MCP config scope: "global" or "local" (default: global)
|
|
140
|
-
--local-defs
|
|
140
|
+
--local-defs Install definitions into ./uluops/ (project-scoped)
|
|
141
|
+
instead of the harness's home directory
|
|
141
142
|
--shell Write API key export to shell profile
|
|
142
143
|
--with-cli Install @uluops/cli globally (skip prompt)
|
|
143
144
|
--no-cli Skip @uluops/cli install (skip prompt)
|
|
145
|
+
--no-metrics Skip the agent-metrics hook install (no hook
|
|
146
|
+
configured, no tool files copied). The downstream
|
|
147
|
+
@uluops/agent-metrics CLI prompt is also suppressed.
|
|
144
148
|
--skip-validation Accept API key without server verification
|
|
145
149
|
--list Show available agents and workflows without installing
|
|
146
150
|
--verify Check installation health: manifest, files, MCP config, API connectivity (no changes)
|
|
@@ -159,7 +163,7 @@ npx @uluops/setup [options]
|
|
|
159
163
|
Displays all agents and workflows included in the current version of the setup tool.
|
|
160
164
|
|
|
161
165
|
```text
|
|
162
|
-
⟨u⟩ ulu·ops v0.
|
|
166
|
+
⟨u⟩ ulu·ops v0.9.5 — available agents and workflows
|
|
163
167
|
|
|
164
168
|
WORKFLOWS
|
|
165
169
|
/workflows:post-implementation Iterative validation after coding
|
|
@@ -178,7 +182,7 @@ Displays all agents and workflows included in the current version of the setup t
|
|
|
178
182
|
Validates your current installation against the local manifest and checks API connectivity.
|
|
179
183
|
|
|
180
184
|
```text
|
|
181
|
-
⟨u⟩ ulu·ops Installation Check v0.
|
|
185
|
+
⟨u⟩ ulu·ops Installation Check v0.9.5
|
|
182
186
|
|
|
183
187
|
✓ Manifest found (~/.uluops/manifest.json)
|
|
184
188
|
✓ All 23 agents present in ~/.claude/agents/
|
package/dist/cli.js
CHANGED
|
@@ -27,6 +27,7 @@ async function main() {
|
|
|
27
27
|
.option("--no-cli", "Skip @uluops/cli install without prompting (takes precedence over --with-cli)")
|
|
28
28
|
.option("--with-agent-metrics-cli", "Install @uluops/agent-metrics globally without prompting")
|
|
29
29
|
.option("--no-agent-metrics-cli", "Skip @uluops/agent-metrics install without prompting (takes precedence over --with-agent-metrics-cli)")
|
|
30
|
+
.option("--no-metrics", "Skip the agent-metrics hook install (no hook configured, no tool files copied)")
|
|
30
31
|
.option("--skip-validation", "Accept API key without verifying", false)
|
|
31
32
|
.option("--list", "Show available agents and workflows without installing")
|
|
32
33
|
.option("--verify", "Check existing installation health")
|
|
@@ -131,6 +132,7 @@ async function main() {
|
|
|
131
132
|
cli: opts.cli,
|
|
132
133
|
withAgentMetricsCli: opts.withAgentMetricsCli,
|
|
133
134
|
agentMetricsCli: opts.agentMetricsCli,
|
|
135
|
+
noMetrics: !opts.metrics,
|
|
134
136
|
skipValidation: opts.skipValidation,
|
|
135
137
|
dryRun: opts.dryRun,
|
|
136
138
|
yes: opts.yes,
|
|
@@ -41,6 +41,7 @@ export declare function installSkillsDefs(profile: HarnessProfile, opts: {
|
|
|
41
41
|
/** Install agent-metrics hook and tool files (Claude Code only). */
|
|
42
42
|
export declare function configureMetricsStep(profile: HarnessProfile, opts: {
|
|
43
43
|
dryRun: boolean;
|
|
44
|
+
noMetrics?: boolean;
|
|
44
45
|
}): Promise<MetricsResult>;
|
|
45
46
|
/**
|
|
46
47
|
* Decide whether to install `@uluops/cli` globally and do it (or not).
|
package/dist/commands/helpers.js
CHANGED
|
@@ -205,6 +205,15 @@ export async function installSkillsDefs(profile, opts, prev) {
|
|
|
205
205
|
}
|
|
206
206
|
/** Install agent-metrics hook and tool files (Claude Code only). */
|
|
207
207
|
export async function configureMetricsStep(profile, opts) {
|
|
208
|
+
if (opts.noMetrics) {
|
|
209
|
+
info(chalk.dim(`Metrics hook skipped (--no-metrics)`));
|
|
210
|
+
return {
|
|
211
|
+
toolFilesCopied: 0,
|
|
212
|
+
hookConfigured: false,
|
|
213
|
+
hooksInstalledVersion: null,
|
|
214
|
+
skippedReason: "no-metrics-flag",
|
|
215
|
+
};
|
|
216
|
+
}
|
|
208
217
|
if (!profile.hooks) {
|
|
209
218
|
info(chalk.dim(`Metrics hooks not supported for ${profile.displayName}`));
|
|
210
219
|
return { toolFilesCopied: 0, hookConfigured: false, hooksInstalledVersion: null };
|
package/dist/commands/setup.d.ts
CHANGED
|
@@ -13,5 +13,11 @@ interface RunSetupOpts {
|
|
|
13
13
|
cli?: boolean;
|
|
14
14
|
withAgentMetricsCli?: boolean;
|
|
15
15
|
agentMetricsCli?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* When true, skip the agent-metrics hook step entirely. configureMetricsStep
|
|
18
|
+
* short-circuits with a "skipped via --no-metrics" status. The agent-metrics
|
|
19
|
+
* CLI prompt is also suppressed downstream (no hook → no CLI gate).
|
|
20
|
+
*/
|
|
21
|
+
noMetrics?: boolean;
|
|
16
22
|
}
|
|
17
23
|
export declare function runSetup(opts: RunSetupOpts): Promise<void>;
|
|
@@ -3,7 +3,7 @@ export interface CommandEntry {
|
|
|
3
3
|
description: string;
|
|
4
4
|
model: string;
|
|
5
5
|
}
|
|
6
|
-
/** Get all agent command entries from
|
|
6
|
+
/** Get all agent command entries from the canonical catalog. */
|
|
7
7
|
export declare function getAgentCommands(): Promise<CommandEntry[]>;
|
|
8
|
-
/** Get all workflow command entries from
|
|
8
|
+
/** Get all workflow command entries from the canonical catalog. */
|
|
9
9
|
export declare function getWorkflowCommands(): Promise<CommandEntry[]>;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { readdir, readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { ASSETS_DIR } from "./paths.js";
|
|
4
|
+
/**
|
|
5
|
+
* Canonical command-catalog source. `assets/claude-code/commands/` is the
|
|
6
|
+
* reference set of markdown command definitions; other harnesses (codex,
|
|
7
|
+
* gemini-cli, opencode) are rendered from this source at install time and
|
|
8
|
+
* do not ship parallel command-markdown trees. `printAgentList` therefore
|
|
9
|
+
* reads from here regardless of which harness the user has installed —
|
|
10
|
+
* the listing is the catalog, not a per-harness manifest.
|
|
11
|
+
*/
|
|
12
|
+
const CATALOG_COMMANDS_DIR = join(ASSETS_DIR, "claude-code", "commands");
|
|
4
13
|
/**
|
|
5
14
|
* Parse YAML-like frontmatter from a markdown file.
|
|
6
15
|
* Returns key-value pairs between the opening and closing `---`.
|
|
@@ -46,11 +55,11 @@ async function scanCommandDir(dir) {
|
|
|
46
55
|
}
|
|
47
56
|
return entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
48
57
|
}
|
|
49
|
-
/** Get all agent command entries from
|
|
58
|
+
/** Get all agent command entries from the canonical catalog. */
|
|
50
59
|
export async function getAgentCommands() {
|
|
51
|
-
return scanCommandDir(join(
|
|
60
|
+
return scanCommandDir(join(CATALOG_COMMANDS_DIR, "agents"));
|
|
52
61
|
}
|
|
53
|
-
/** Get all workflow command entries from
|
|
62
|
+
/** Get all workflow command entries from the canonical catalog. */
|
|
54
63
|
export async function getWorkflowCommands() {
|
|
55
|
-
return scanCommandDir(join(
|
|
64
|
+
return scanCommandDir(join(CATALOG_COMMANDS_DIR, "workflows"));
|
|
56
65
|
}
|
package/dist/steps/signup.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { AuthResult } from "./auth.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Pure advisory check: returns the first hint message that applies to the
|
|
4
|
+
* password, or null if none apply. No I/O. Server validation remains the
|
|
5
|
+
* authority — hints exist only to nudge the user toward likely-acceptable
|
|
6
|
+
* inputs before round-tripping to the server.
|
|
7
|
+
* @internal Exported for testing only — not part of the public API.
|
|
8
|
+
*/
|
|
9
|
+
declare function getPasswordHint(password: string): string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Inquirer validate wrapper. Always returns true (hints are non-blocking)
|
|
12
|
+
* and emits the pure-computed hint via console.warn for display.
|
|
5
13
|
* @internal Exported for testing only — not part of the public API.
|
|
6
14
|
*/
|
|
7
15
|
declare function hintPassword(password: string): true;
|
|
@@ -13,4 +21,4 @@ declare function validateEmail(email: string): string | true;
|
|
|
13
21
|
*/
|
|
14
22
|
export declare function signup(): Promise<AuthResult>;
|
|
15
23
|
/** @internal Exported for testing only — not part of the public API. */
|
|
16
|
-
export { hintPassword, validateEmail };
|
|
24
|
+
export { hintPassword, getPasswordHint, validateEmail };
|
package/dist/steps/signup.js
CHANGED
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
const API_BASE = "https://api.uluops.ai/api/v1";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* Pure advisory check: returns the first hint message that applies to the
|
|
4
|
+
* password, or null if none apply. No I/O. Server validation remains the
|
|
5
|
+
* authority — hints exist only to nudge the user toward likely-acceptable
|
|
6
|
+
* inputs before round-tripping to the server.
|
|
5
7
|
* @internal Exported for testing only — not part of the public API.
|
|
6
8
|
*/
|
|
7
|
-
function
|
|
9
|
+
function getPasswordHint(password) {
|
|
8
10
|
if (password.length < 8)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
return " ⚠ Hint: server may require at least 8 characters";
|
|
12
|
+
if (password.length > 128)
|
|
13
|
+
return " ⚠ Hint: server may reject passwords over 128 characters";
|
|
14
|
+
if (!/[a-z]/.test(password))
|
|
15
|
+
return " ⚠ Hint: server may require a lowercase letter";
|
|
16
|
+
if (!/[A-Z]/.test(password))
|
|
17
|
+
return " ⚠ Hint: server may require an uppercase letter";
|
|
18
|
+
if (!/[0-9]/.test(password))
|
|
19
|
+
return " ⚠ Hint: server may require a number";
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Inquirer validate wrapper. Always returns true (hints are non-blocking)
|
|
24
|
+
* and emits the pure-computed hint via console.warn for display.
|
|
25
|
+
* @internal Exported for testing only — not part of the public API.
|
|
26
|
+
*/
|
|
27
|
+
function hintPassword(password) {
|
|
28
|
+
const hint = getPasswordHint(password);
|
|
29
|
+
if (hint !== null)
|
|
30
|
+
console.warn(hint);
|
|
18
31
|
return true;
|
|
19
32
|
}
|
|
20
33
|
/** @internal Exported for testing only — not part of the public API. */
|
|
@@ -111,4 +124,4 @@ async function callApi(url, method, body, bearerToken, validate) {
|
|
|
111
124
|
throw new Error(`Signup failed (${res.status}): ${message}`);
|
|
112
125
|
}
|
|
113
126
|
/** @internal Exported for testing only — not part of the public API. */
|
|
114
|
-
export { hintPassword, validateEmail };
|
|
127
|
+
export { hintPassword, getPasswordHint, validateEmail };
|