squadrant 0.9.1 → 0.9.2
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 +22 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1499,7 +1499,8 @@ function buildCompletionProtocol(taskId, project) {
|
|
|
1499
1499
|
"COMPLETION PROTOCOL (required): When this task is fully complete, your FINAL action MUST be to run exactly:",
|
|
1500
1500
|
` squadrant crew signal done --task-id ${taskId} --project ${project} --message "<one-line summary>"`,
|
|
1501
1501
|
"Run it as a discrete final step AFTER you report your results. If you are blocked or need a decision, instead run:",
|
|
1502
|
-
` squadrant crew signal blocked --task-id ${taskId} --project ${project} --question "<your question>"
|
|
1502
|
+
` squadrant crew signal blocked --task-id ${taskId} --project ${project} --question "<your question>"`,
|
|
1503
|
+
"If this task failed because of a defect in squadrant itself (not an API/infra blip, a config/user error, or an expected failure), say so in your signal done/blocked message so the captain can check tu11aa/squadrant and file it. Don't file issues from the crew."
|
|
1503
1504
|
].join("\n");
|
|
1504
1505
|
}
|
|
1505
1506
|
function shellQuote(p) {
|
|
@@ -4482,7 +4483,7 @@ init_dist();
|
|
|
4482
4483
|
init_dist2();
|
|
4483
4484
|
import { Command as Command27 } from "commander";
|
|
4484
4485
|
import { readFileSync as readFileSync11, existsSync as existsSync10, writeFileSync as writeFileSync9 } from "fs";
|
|
4485
|
-
import { fileURLToPath as
|
|
4486
|
+
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
4486
4487
|
import { dirname as dirname6, join as join21 } from "path";
|
|
4487
4488
|
import { homedir as homedir14 } from "os";
|
|
4488
4489
|
|
|
@@ -7835,9 +7836,18 @@ import { Command as Command14 } from "commander";
|
|
|
7835
7836
|
import fs17 from "fs";
|
|
7836
7837
|
import os11 from "os";
|
|
7837
7838
|
import path21 from "path";
|
|
7839
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
7838
7840
|
import { execSync as execSync12 } from "child_process";
|
|
7839
7841
|
import chalk15 from "chalk";
|
|
7840
7842
|
var REPO_URL = "https://github.com/tu11aa/squadrant";
|
|
7843
|
+
function readPkgVersion() {
|
|
7844
|
+
try {
|
|
7845
|
+
const pkgPath = path21.join(path21.dirname(fileURLToPath3(import.meta.url)), "..", "package.json");
|
|
7846
|
+
return JSON.parse(fs17.readFileSync(pkgPath, "utf-8")).version ?? "unknown";
|
|
7847
|
+
} catch {
|
|
7848
|
+
return "unknown";
|
|
7849
|
+
}
|
|
7850
|
+
}
|
|
7841
7851
|
function readMetrics(metricsPath) {
|
|
7842
7852
|
try {
|
|
7843
7853
|
return JSON.parse(fs17.readFileSync(metricsPath, "utf-8"));
|
|
@@ -7845,10 +7855,9 @@ function readMetrics(metricsPath) {
|
|
|
7845
7855
|
return {};
|
|
7846
7856
|
}
|
|
7847
7857
|
}
|
|
7848
|
-
function buildIssueUrl(metrics) {
|
|
7858
|
+
function buildIssueUrl(metrics, squadrantVersion) {
|
|
7849
7859
|
const nodeVersion = process.versions.node;
|
|
7850
7860
|
const platform = process.platform;
|
|
7851
|
-
const squadrantVersion = "0.1.0";
|
|
7852
7861
|
const body = [
|
|
7853
7862
|
"## Feedback / Bug Report",
|
|
7854
7863
|
"",
|
|
@@ -7881,7 +7890,8 @@ var feedbackCommand = new Command14("feedback").description("Open a pre-filled G
|
|
|
7881
7890
|
const config = loadConfig();
|
|
7882
7891
|
const metricsPath = config.metrics?.path || path21.join(os11.homedir(), ".config", "squadrant", "metrics.json");
|
|
7883
7892
|
const metrics = readMetrics(metricsPath);
|
|
7884
|
-
const
|
|
7893
|
+
const version = readStamp(config) ?? readPkgVersion();
|
|
7894
|
+
const issueUrl = buildIssueUrl(metrics, version);
|
|
7885
7895
|
console.log(chalk15.bold("\nOpening feedback issue in browser...\n"));
|
|
7886
7896
|
console.log(chalk15.dim(` URL: ${issueUrl.substring(0, 80)}...
|
|
7887
7897
|
`));
|
|
@@ -8462,7 +8472,7 @@ import { Command as Command20 } from "commander";
|
|
|
8462
8472
|
import chalk21 from "chalk";
|
|
8463
8473
|
import fs20 from "fs";
|
|
8464
8474
|
import path24 from "path";
|
|
8465
|
-
import { fileURLToPath as
|
|
8475
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
8466
8476
|
function parseScope(v) {
|
|
8467
8477
|
if (v !== "user" && v !== "project") {
|
|
8468
8478
|
throw new Error("--scope must be 'user' or 'project'");
|
|
@@ -8470,7 +8480,7 @@ function parseScope(v) {
|
|
|
8470
8480
|
return v;
|
|
8471
8481
|
}
|
|
8472
8482
|
function findPackageRoot3() {
|
|
8473
|
-
let dir = path24.dirname(
|
|
8483
|
+
let dir = path24.dirname(fileURLToPath4(import.meta.url));
|
|
8474
8484
|
while (dir !== "/" && dir !== "") {
|
|
8475
8485
|
if (fs20.existsSync(path24.join(dir, "package.json"))) return dir;
|
|
8476
8486
|
dir = path24.dirname(dir);
|
|
@@ -8668,7 +8678,7 @@ init_dist();
|
|
|
8668
8678
|
init_dist();
|
|
8669
8679
|
import { Command as Command22 } from "commander";
|
|
8670
8680
|
import fs21 from "fs";
|
|
8671
|
-
import { fileURLToPath as
|
|
8681
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
8672
8682
|
import { dirname as dirname5, join as join19 } from "path";
|
|
8673
8683
|
import chalk22 from "chalk";
|
|
8674
8684
|
function runConfigCheck(opts) {
|
|
@@ -8713,7 +8723,7 @@ function printItems(items) {
|
|
|
8713
8723
|
}
|
|
8714
8724
|
var configCommand = new Command22("config").description("Inspect and reconcile squadrant config");
|
|
8715
8725
|
configCommand.command("check").description("Detect config drift vs the current default schema").option("--fix", "Apply the safe tier (add missing, remove deprecated)", false).option("--accept", "Stamp the current version without changing config (dismiss advisories)", false).option("--json", "Output drift items as JSON", false).action((opts) => {
|
|
8716
|
-
const pkgVersion =
|
|
8726
|
+
const pkgVersion = readPkgVersion2();
|
|
8717
8727
|
if (!fs21.existsSync(DEFAULT_CONFIG_PATH)) {
|
|
8718
8728
|
console.log(chalk22.yellow("No config found \u2014 run `squadrant init` first."));
|
|
8719
8729
|
return;
|
|
@@ -8741,8 +8751,8 @@ ${judgment.length} item(s) need review \u2014 run the config-doctor skill, or \`
|
|
|
8741
8751
|
console.log(chalk22.green("\n\u2714 Config reconciled and stamped."));
|
|
8742
8752
|
}
|
|
8743
8753
|
});
|
|
8744
|
-
function
|
|
8745
|
-
const pkgPath = join19(dirname5(
|
|
8754
|
+
function readPkgVersion2() {
|
|
8755
|
+
const pkgPath = join19(dirname5(fileURLToPath5(import.meta.url)), "..", "package.json");
|
|
8746
8756
|
return JSON.parse(fs21.readFileSync(pkgPath, "utf-8")).version;
|
|
8747
8757
|
}
|
|
8748
8758
|
|
|
@@ -9087,7 +9097,7 @@ var effortCommand = new Command26("effort").description("Get or set the global c
|
|
|
9087
9097
|
init_dist();
|
|
9088
9098
|
init_dist();
|
|
9089
9099
|
init_dist();
|
|
9090
|
-
var __dirname = dirname6(
|
|
9100
|
+
var __dirname = dirname6(fileURLToPath6(import.meta.url));
|
|
9091
9101
|
var pkg = JSON.parse(readFileSync11(join21(__dirname, "..", "package.json"), "utf-8"));
|
|
9092
9102
|
ensureRuntimeSynced({
|
|
9093
9103
|
sourceRoot: join21(__dirname, ".."),
|