@jentrix/cli 0.5.3 → 0.5.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/dist/main.js +31 -7
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -20959,7 +20959,7 @@ function refreshAccessToken(input) {
|
|
|
20959
20959
|
|
|
20960
20960
|
// src/client.ts
|
|
20961
20961
|
var CLI_NAME = "stacks-cli";
|
|
20962
|
-
var CLI_VERSION = "0.5.
|
|
20962
|
+
var CLI_VERSION = "0.5.5";
|
|
20963
20963
|
var DEAD_TOKEN_MESSAGE = "authentication failed (HTTP 401): the token is dead or expired \u2014 mint a new PAT at /account/tokens on your Jentrix server and update STACKS_TOKEN (or --token / the config file).";
|
|
20964
20964
|
var RELOGIN_MESSAGE = "OAuth session expired and could not be refreshed \u2014 run `jentrix login` to sign in again.";
|
|
20965
20965
|
function originOf2(url2) {
|
|
@@ -23541,10 +23541,20 @@ var MAX_WORK_ITEMS = 15;
|
|
|
23541
23541
|
async function projectBoards(caller, projectId) {
|
|
23542
23542
|
const project = await callStructured(caller, "get_project", { projectId });
|
|
23543
23543
|
const links = project.links ?? [];
|
|
23544
|
+
const workspaceId = String(project.workspaceId);
|
|
23545
|
+
const linkedBoardIds = links.filter((link) => link.targetType === "BOARD").map((link) => link.targetId);
|
|
23546
|
+
let liveBoardIds = new Set(linkedBoardIds);
|
|
23547
|
+
if (linkedBoardIds.length > 0) {
|
|
23548
|
+
const boards = (await callStructured(caller, "list_boards", { workspaceId })).boards ?? [];
|
|
23549
|
+
liveBoardIds = new Set(
|
|
23550
|
+
boards.filter((b) => !b.archivedAt).map((b) => String(b.id))
|
|
23551
|
+
);
|
|
23552
|
+
}
|
|
23544
23553
|
return {
|
|
23545
|
-
workspaceId
|
|
23554
|
+
workspaceId,
|
|
23546
23555
|
name: String(project.name),
|
|
23547
|
-
boardIds:
|
|
23556
|
+
boardIds: linkedBoardIds.filter((id) => liveBoardIds.has(id)),
|
|
23557
|
+
staleBoardIds: linkedBoardIds.filter((id) => !liveBoardIds.has(id)),
|
|
23548
23558
|
repoOwners: links.filter((link) => link.targetType === "REPO").map((link) => link.targetId.trim().toLowerCase())
|
|
23549
23559
|
};
|
|
23550
23560
|
}
|
|
@@ -24025,7 +24035,7 @@ ${JSON.stringify(session.alignment, null, 2)}`
|
|
|
24025
24035
|
targetId: boardId
|
|
24026
24036
|
});
|
|
24027
24037
|
deps2.writeOut(
|
|
24028
|
-
`Project "${project.name}" linked no board \u2014 created board "${project.name}" and linked it.`
|
|
24038
|
+
project.staleBoardIds.length > 0 ? `Project "${project.name}" linked ${project.staleBoardIds.length === 1 ? "a board that no longer exists" : "only boards that no longer exist"} (${project.staleBoardIds.join(", ")}) \u2014 created board "${project.name}" and linked it.` : `Project "${project.name}" linked no board \u2014 created board "${project.name}" and linked it.`
|
|
24029
24039
|
);
|
|
24030
24040
|
}
|
|
24031
24041
|
const columns = await callStructured(caller, "list_columns", { boardId });
|
|
@@ -27152,10 +27162,24 @@ import { existsSync as existsSync4 } from "node:fs";
|
|
|
27152
27162
|
import { join as join4, resolve as resolve2 } from "node:path";
|
|
27153
27163
|
var MARKETPLACE_NAME = "jentrix";
|
|
27154
27164
|
var PLUGIN_REF = "jentrix@jentrix";
|
|
27165
|
+
var LEGACY_MARKETPLACE = "stacks";
|
|
27155
27166
|
var LEGACY_PLUGIN_REF = "stacks@stacks";
|
|
27156
|
-
var LEGACY_PLUGIN_NOTICE = `If you installed the pre-rename plugin (\`${LEGACY_PLUGIN_REF}\`), remove it \u2014 otherwise both plugins register commands and you will see duplicates.`;
|
|
27157
27167
|
var RUNNER_SPEC = `@jentrix/runner@${CLI_VERSION}`;
|
|
27158
27168
|
var NPM_INSTALL_TIMEOUT_MS = 3e5;
|
|
27169
|
+
async function removeLegacyPlugin(deps2, executable2, provider) {
|
|
27170
|
+
await deps2.invoke(executable2, [
|
|
27171
|
+
"plugin",
|
|
27172
|
+
provider === "codex" ? "remove" : "uninstall",
|
|
27173
|
+
LEGACY_PLUGIN_REF
|
|
27174
|
+
]);
|
|
27175
|
+
const dropped = await deps2.invoke(executable2, [
|
|
27176
|
+
"plugin",
|
|
27177
|
+
"marketplace",
|
|
27178
|
+
"remove",
|
|
27179
|
+
LEGACY_MARKETPLACE
|
|
27180
|
+
]);
|
|
27181
|
+
return dropped.code === 0 ? ` Removed the pre-rename plugin (\`${LEGACY_PLUGIN_REF}\`) \u2014 it registered these same commands.` : "";
|
|
27182
|
+
}
|
|
27159
27183
|
function alreadyExists(result) {
|
|
27160
27184
|
return /already/i.test(`${result.stdout}
|
|
27161
27185
|
${result.stderr}`);
|
|
@@ -27261,7 +27285,7 @@ async function installCodexPlugin(deps2, codex, pluginDir) {
|
|
|
27261
27285
|
}
|
|
27262
27286
|
return finishInstall(
|
|
27263
27287
|
deps2,
|
|
27264
|
-
"Jentrix Codex plugin ready: $jentrix-connect, $jentrix-align, $jentrix-plan, $jentrix-checkpoint, $jentrix-status, and $jentrix-end are available in NEW Codex tasks. Open `/hooks` and trust the Jentrix hooks before use.
|
|
27288
|
+
"Jentrix Codex plugin ready: $jentrix-connect, $jentrix-align, $jentrix-plan, $jentrix-checkpoint, $jentrix-status, and $jentrix-end are available in NEW Codex tasks. Open `/hooks` and trust the Jentrix hooks before use." + await removeLegacyPlugin(deps2, codex, "codex")
|
|
27265
27289
|
);
|
|
27266
27290
|
}
|
|
27267
27291
|
async function runPluginInstall(deps2, provider = "claude") {
|
|
@@ -27352,7 +27376,7 @@ ${update.stderr}`.match(
|
|
|
27352
27376
|
);
|
|
27353
27377
|
return finishInstall(
|
|
27354
27378
|
deps2,
|
|
27355
|
-
`Jentrix plugin ready: /jentrix-connect, /jentrix-align, /jentrix-plan, /jentrix-checkpoint, /jentrix-status, /jentrix-end are available in NEW Claude Code sessions (running sessions pick it up on restart)
|
|
27379
|
+
`Jentrix plugin ready: /jentrix-connect, /jentrix-align, /jentrix-plan, /jentrix-checkpoint, /jentrix-status, /jentrix-end are available in NEW Claude Code sessions (running sessions pick it up on restart).${await removeLegacyPlugin(deps2, claude, "claude")}`
|
|
27356
27380
|
);
|
|
27357
27381
|
}
|
|
27358
27382
|
function registerPluginCommand(program3, deps2, onExit2) {
|