@betterness/cli 1.3.0 → 1.3.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/dist/index.js +10 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -408,7 +408,7 @@ var ApiClient = class {
|
|
|
408
408
|
headers: {
|
|
409
409
|
"Authorization": `Bearer ${this.apiKey}`,
|
|
410
410
|
"Content-Type": "application/json",
|
|
411
|
-
"User-Agent": `betterness-cli/${"1.3.
|
|
411
|
+
"User-Agent": `betterness-cli/${"1.3.1"}`,
|
|
412
412
|
"Accept": "application/json"
|
|
413
413
|
},
|
|
414
414
|
body: body ? JSON.stringify(body) : void 0,
|
|
@@ -472,7 +472,7 @@ var ApiClient = class {
|
|
|
472
472
|
method: "POST",
|
|
473
473
|
headers: {
|
|
474
474
|
"Authorization": `Bearer ${this.apiKey}`,
|
|
475
|
-
"User-Agent": `betterness-cli/${"1.3.
|
|
475
|
+
"User-Agent": `betterness-cli/${"1.3.1"}`,
|
|
476
476
|
"Accept": "application/json"
|
|
477
477
|
},
|
|
478
478
|
body: formData,
|
|
@@ -2141,7 +2141,7 @@ function registerDebugCommands(program2) {
|
|
|
2141
2141
|
const parentOpts = cmd.optsWithGlobals();
|
|
2142
2142
|
const authSource = parentOpts.apiKey ? "--api-key flag" : envKey ? "BETTERNESS_API_KEY env" : tokens && !isTokenExpired(tokens) ? "OAuth tokens (~/.betterness/tokens.json)" : stored ? "API key (~/.betterness/credentials.json)" : "none";
|
|
2143
2143
|
const config = {
|
|
2144
|
-
version: "1.3.
|
|
2144
|
+
version: "1.3.1",
|
|
2145
2145
|
apiUrl: "https://api.betterness.ai",
|
|
2146
2146
|
auth0Domain: "betterness.us.auth0.com",
|
|
2147
2147
|
auth0ClientId: "g4lqYHRQb2QMgdRKIlKwoTJl6eu41pWn",
|
|
@@ -2193,7 +2193,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2193
2193
|
hp.command("schema").description("List all sections and question IDs available in the health profile").option("--section <acronym>", "Show questions for a specific section only").action(async (opts, cmd) => {
|
|
2194
2194
|
try {
|
|
2195
2195
|
const globalOpts = cmd.optsWithGlobals();
|
|
2196
|
-
const client =
|
|
2196
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2197
2197
|
const schema = await client.get(
|
|
2198
2198
|
"/api/v1/copilot-config/schema",
|
|
2199
2199
|
void 0,
|
|
@@ -2230,7 +2230,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2230
2230
|
hp.command("get").description("Retrieve the full health profile (all answered questions as a flat map)").action(async (_, cmd) => {
|
|
2231
2231
|
try {
|
|
2232
2232
|
const globalOpts = cmd.optsWithGlobals();
|
|
2233
|
-
const client =
|
|
2233
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2234
2234
|
const user = await client.get(
|
|
2235
2235
|
"/api/betterness-user/detail"
|
|
2236
2236
|
);
|
|
@@ -2247,7 +2247,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2247
2247
|
hp.command("get-section").description("Retrieve health profile answers for a specific section").requiredOption("--section <acronym>", "Section acronym (e.g. HWP, DMH, DA)").action(async (opts, cmd) => {
|
|
2248
2248
|
try {
|
|
2249
2249
|
const globalOpts = cmd.optsWithGlobals();
|
|
2250
|
-
const client =
|
|
2250
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2251
2251
|
const user = await client.get(
|
|
2252
2252
|
"/api/betterness-user/detail"
|
|
2253
2253
|
);
|
|
@@ -2294,7 +2294,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2294
2294
|
return;
|
|
2295
2295
|
}
|
|
2296
2296
|
const globalOpts = cmd.optsWithGlobals();
|
|
2297
|
-
const client =
|
|
2297
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2298
2298
|
const user = await client.get(
|
|
2299
2299
|
"/api/betterness-user/detail"
|
|
2300
2300
|
);
|
|
@@ -2334,7 +2334,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2334
2334
|
return;
|
|
2335
2335
|
}
|
|
2336
2336
|
const globalOpts = cmd.optsWithGlobals();
|
|
2337
|
-
const client =
|
|
2337
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2338
2338
|
const user = await client.get(
|
|
2339
2339
|
"/api/betterness-user/detail"
|
|
2340
2340
|
);
|
|
@@ -2349,7 +2349,7 @@ function registerHealthProfileCommands(program2) {
|
|
|
2349
2349
|
hp.command("summary").description("Human-readable summary of answered health profile questions").option("--section <acronym>", "Summarize a specific section only").action(async (opts, cmd) => {
|
|
2350
2350
|
try {
|
|
2351
2351
|
const globalOpts = cmd.optsWithGlobals();
|
|
2352
|
-
const client =
|
|
2352
|
+
const client = await createApiClient({ apiKey: globalOpts.apiKey });
|
|
2353
2353
|
const [schema, user] = await Promise.all([
|
|
2354
2354
|
client.get("/api/v1/copilot-config/schema", void 0, healthProfileSchemaSchema),
|
|
2355
2355
|
client.get("/api/betterness-user/detail")
|
|
@@ -2670,7 +2670,7 @@ Restart ${client.name} to activate. Then try asking:
|
|
|
2670
2670
|
// src/program.ts
|
|
2671
2671
|
function createProgram() {
|
|
2672
2672
|
const program2 = new Command();
|
|
2673
|
-
program2.name("betterness").description("Betterness CLI - Agent-first terminal interface for the Betterness platform").version("1.3.
|
|
2673
|
+
program2.name("betterness").description("Betterness CLI - Agent-first terminal interface for the Betterness platform").version("1.3.1").option("--api-key <key>", "API key (overrides env and stored credentials)").option("--json", "Output as JSON").option("--markdown", "Output as Markdown").option("--quiet", "Suppress output (exit code only)");
|
|
2674
2674
|
registerAuthCommands(program2);
|
|
2675
2675
|
registerProfileCommands(program2);
|
|
2676
2676
|
registerBiomarkersCommands(program2);
|