@arcadeai/hypotenuse 0.14.0 → 0.14.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/hypotenuse.js +16 -5
- package/package.json +1 -1
- package/skills/hypotenuse.md +1 -1
package/dist/hypotenuse.js
CHANGED
|
@@ -343,7 +343,7 @@ import { Command } from "commander";
|
|
|
343
343
|
// package.json
|
|
344
344
|
var package_default = {
|
|
345
345
|
name: "@arcadeai/hypotenuse",
|
|
346
|
-
version: "0.14.
|
|
346
|
+
version: "0.14.1",
|
|
347
347
|
description: "Hypotenuse \u2014 run coding agents on your machine for Linear agent sessions",
|
|
348
348
|
type: "module",
|
|
349
349
|
license: "Apache-2.0",
|
|
@@ -3598,6 +3598,13 @@ async function resolveProjectId(client, selector) {
|
|
|
3598
3598
|
}
|
|
3599
3599
|
}
|
|
3600
3600
|
}
|
|
3601
|
+
async function onlyProject(client) {
|
|
3602
|
+
const { projects, pagination } = await client.request("GET", "/projects", { query: { page: 1, limit: 2 } });
|
|
3603
|
+
return {
|
|
3604
|
+
project: pagination.total === 1 ? projects[0] ?? null : null,
|
|
3605
|
+
total: pagination.total
|
|
3606
|
+
};
|
|
3607
|
+
}
|
|
3601
3608
|
|
|
3602
3609
|
// src/api/url.ts
|
|
3603
3610
|
import { existsSync as existsSync4, readFileSync as readFileSync4 } from "fs";
|
|
@@ -3752,10 +3759,14 @@ class CliContext {
|
|
|
3752
3759
|
}
|
|
3753
3760
|
async projectId() {
|
|
3754
3761
|
const selector = this.options.project ?? this.env.HYPOTENUSE_PROJECT ?? (this.credentials.servers[this.server.origin]?.project != null ? String(this.credentials.servers[this.server.origin]?.project) : undefined);
|
|
3755
|
-
if (
|
|
3756
|
-
|
|
3757
|
-
}
|
|
3758
|
-
|
|
3762
|
+
if (selector)
|
|
3763
|
+
return resolveProjectId(this.signedInClient(), selector);
|
|
3764
|
+
const { project, total } = await onlyProject(this.signedInClient());
|
|
3765
|
+
if (project) {
|
|
3766
|
+
logger.info(`Using project ${project.slug}, the only one you are in.`);
|
|
3767
|
+
return project.id;
|
|
3768
|
+
}
|
|
3769
|
+
throw new Error(total === 0 ? "You are not in any project yet. Create one in the dashboard, or accept an invite." : "No project selected, and you are in several. Pass --project <id|slug> or run `hypotenuse project use <id|slug>`.");
|
|
3759
3770
|
}
|
|
3760
3771
|
}
|
|
3761
3772
|
function contextFor(command) {
|
package/package.json
CHANGED
package/skills/hypotenuse.md
CHANGED
|
@@ -17,7 +17,7 @@ server. It calls the same HTTP actions the dashboard does, as the person who sig
|
|
|
17
17
|
- Lists take `--page` and `--limit` (default 25) and answer a
|
|
18
18
|
`pagination: { page, limit, total, pages }` envelope.
|
|
19
19
|
- Project-scoped commands act on `--project <id|slug>`, else `HYPOTENUSE_PROJECT`, else the project
|
|
20
|
-
chosen with `hypotenuse project use
|
|
20
|
+
chosen with `hypotenuse project use`, else the person's only project when they are in just one.
|
|
21
21
|
- The server is `--url`, else `HYPOTENUSE_URL`, else wherever `login` last signed in.
|
|
22
22
|
- `HYPOTENUSE_NO_UPDATE_CHECK=1` turns off the background update notice.
|
|
23
23
|
|