squad-kit 0.7.1 → 0.7.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/CHANGELOG.md +15 -0
- package/dist/cli.js +69 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.2] — 2026-04-28
|
|
11
|
+
|
|
12
|
+
### Bug fixes
|
|
13
|
+
|
|
14
|
+
- The console sidebar and dashboard still reported `v0.6.0` after 0.7.1
|
|
15
|
+
because `/api/meta` and `/api/dashboard` had the version hardcoded.
|
|
16
|
+
Both now read from `package.json` (matching the CLI and `/healthz`
|
|
17
|
+
fix in 0.7.1).
|
|
18
|
+
- `squad config set tracker --type github` was a no-op stub: it set
|
|
19
|
+
`tracker.type = github` without prompting for owner/repo or PAT and
|
|
20
|
+
skipped the connectivity probe. It now matches the Jira and Azure
|
|
21
|
+
flows — interactive credential prompt, secrets written to
|
|
22
|
+
`.squad/secrets.yaml`, post-config GitHub probe, and an updated
|
|
23
|
+
next-steps hint with `--id <github-issue-number>`.
|
|
24
|
+
|
|
10
25
|
## [0.7.1] — 2026-04-28
|
|
11
26
|
|
|
12
27
|
### Bug fixes
|
package/dist/cli.js
CHANGED
|
@@ -926,6 +926,27 @@ async function promptAzureCredentials(defaults = {}) {
|
|
|
926
926
|
});
|
|
927
927
|
return { organization: organization.trim(), project: project.trim(), pat };
|
|
928
928
|
}
|
|
929
|
+
async function promptGitHubCredentials(defaults = {}) {
|
|
930
|
+
const owner = await input({
|
|
931
|
+
message: "GitHub repo owner (user or org, e.g. octocat):",
|
|
932
|
+
default: defaults.owner ?? "",
|
|
933
|
+
validate: notEmpty
|
|
934
|
+
});
|
|
935
|
+
const repo = await input({
|
|
936
|
+
message: "GitHub repo name (e.g. hello-world):",
|
|
937
|
+
default: defaults.repo ?? "",
|
|
938
|
+
validate: notEmpty
|
|
939
|
+
});
|
|
940
|
+
const host = await input({
|
|
941
|
+
message: "GitHub host (leave blank for github.com; for GHES use ghes.example.com):",
|
|
942
|
+
default: defaults.host ?? ""
|
|
943
|
+
});
|
|
944
|
+
const pat = await password({
|
|
945
|
+
message: 'Personal Access Token (needs "repo" scope, or fine-grained "Issues: read"; input hidden):',
|
|
946
|
+
validate: (v) => v.length >= 20 ? true : "PAT seems too short"
|
|
947
|
+
});
|
|
948
|
+
return { owner: owner.trim(), repo: repo.trim(), host: host.trim(), pat };
|
|
949
|
+
}
|
|
929
950
|
function newPlannerBlock(provider) {
|
|
930
951
|
return {
|
|
931
952
|
enabled: true,
|
|
@@ -1808,6 +1829,11 @@ function azureError() {
|
|
|
1808
1829
|
`Azure DevOps configuration is incomplete. Set AZURE_DEVOPS_ORG, AZURE_DEVOPS_PROJECT, AZURE_DEVOPS_PAT (or run \`squad config set tracker\` without --yes to enter credentials interactively).`
|
|
1809
1830
|
);
|
|
1810
1831
|
}
|
|
1832
|
+
function githubError() {
|
|
1833
|
+
return new Error(
|
|
1834
|
+
`GitHub configuration is incomplete. Set tracker.workspace (owner) and tracker.project (repo) in .squad/config.yaml plus GITHUB_TOKEN (or run \`squad config set tracker\` without --yes to enter credentials interactively).`
|
|
1835
|
+
);
|
|
1836
|
+
}
|
|
1811
1837
|
async function runConfigSetTracker(opts = {}) {
|
|
1812
1838
|
const root = requireSquadRoot();
|
|
1813
1839
|
const paths = buildPaths(root);
|
|
@@ -1836,7 +1862,36 @@ async function runConfigSetTracker(opts = {}) {
|
|
|
1836
1862
|
if (type === "none") {
|
|
1837
1863
|
nextTracker = { type: "none" };
|
|
1838
1864
|
} else if (type === "github") {
|
|
1839
|
-
|
|
1865
|
+
if (interactive) {
|
|
1866
|
+
step("GitHub credentials (stored in .squad/secrets.yaml \u2014 always git-ignored)");
|
|
1867
|
+
const g = await promptGitHubCredentials({
|
|
1868
|
+
owner: config2.tracker.type === "github" ? config2.tracker.workspace : void 0,
|
|
1869
|
+
repo: config2.tracker.type === "github" ? config2.tracker.project : void 0,
|
|
1870
|
+
host: baseSecrets.tracker?.github?.host
|
|
1871
|
+
});
|
|
1872
|
+
const merged = mergeSecrets(baseSecrets, {
|
|
1873
|
+
tracker: { github: { host: g.host, pat: g.pat } }
|
|
1874
|
+
});
|
|
1875
|
+
saveSecrets(paths.secretsFile, merged);
|
|
1876
|
+
nextTracker = { type: "github", workspace: g.owner, project: g.repo };
|
|
1877
|
+
success("GitHub credentials saved");
|
|
1878
|
+
info(".squad/secrets.yaml updated (chmod 0600 on POSIX)");
|
|
1879
|
+
} else {
|
|
1880
|
+
const o = overlayTrackerEnv(baseSecrets);
|
|
1881
|
+
const owner = (config2.tracker.workspace ?? "").trim();
|
|
1882
|
+
const repo = (config2.tracker.project ?? "").trim();
|
|
1883
|
+
if (!owner || !repo) {
|
|
1884
|
+
throw githubError();
|
|
1885
|
+
}
|
|
1886
|
+
const candidate = {
|
|
1887
|
+
...config2,
|
|
1888
|
+
tracker: { type: "github", workspace: owner, project: repo }
|
|
1889
|
+
};
|
|
1890
|
+
if (clientFor(candidate, o).error) {
|
|
1891
|
+
throw githubError();
|
|
1892
|
+
}
|
|
1893
|
+
nextTracker = { type: "github", workspace: owner, project: repo };
|
|
1894
|
+
}
|
|
1840
1895
|
} else if (type === "jira") {
|
|
1841
1896
|
if (interactive) {
|
|
1842
1897
|
step("Jira Cloud credentials (stored in .squad/secrets.yaml \u2014 always git-ignored)");
|
|
@@ -1925,6 +1980,15 @@ async function runConfigSetTracker(opts = {}) {
|
|
|
1925
1980
|
r.status !== void 0 ? `Azure DevOps connectivity check: HTTP ${r.status}` : `Azure DevOps connectivity check failed: ${r.detail ?? "unknown"}`
|
|
1926
1981
|
);
|
|
1927
1982
|
}
|
|
1983
|
+
} else if (reloaded.tracker.type === "github") {
|
|
1984
|
+
const r = await probeGitHubConnectivity(s, reloaded);
|
|
1985
|
+
if (r.ok) {
|
|
1986
|
+
info("GitHub connectivity check: OK");
|
|
1987
|
+
} else {
|
|
1988
|
+
warning(
|
|
1989
|
+
r.status !== void 0 ? `GitHub connectivity check: HTTP ${r.status}` : `GitHub connectivity check failed: ${r.detail ?? "unknown"}`
|
|
1990
|
+
);
|
|
1991
|
+
}
|
|
1928
1992
|
}
|
|
1929
1993
|
printTrackerNextSteps(next.tracker.type);
|
|
1930
1994
|
}
|
|
@@ -1937,7 +2001,8 @@ function printTrackerNextSteps(type) {
|
|
|
1937
2001
|
return;
|
|
1938
2002
|
}
|
|
1939
2003
|
info("1) Verify with `squad doctor` \u2014 tracker checks should be green.");
|
|
1940
|
-
|
|
2004
|
+
const idHint = type === "jira" ? "JIRA-123" : type === "github" ? "github-issue-number" : "azure-work-item-id";
|
|
2005
|
+
info(`2) Create a story: squad new-story <feature-slug> --id <${idHint}>`);
|
|
1941
2006
|
info(" squad-kit auto-fetches the title, description, and attachments into the intake.");
|
|
1942
2007
|
info("3) Review the generated intake.md, then run `squad new-plan --api` to generate the plan.");
|
|
1943
2008
|
}
|
|
@@ -6390,7 +6455,7 @@ function mountMetaApi(app, opts) {
|
|
|
6390
6455
|
const config2 = loadConfig(opts.paths.configFile);
|
|
6391
6456
|
const lastRun = await readLastRun(opts.paths);
|
|
6392
6457
|
return c.json({
|
|
6393
|
-
version:
|
|
6458
|
+
version: readInstalledPackage().version,
|
|
6394
6459
|
root: opts.paths.root,
|
|
6395
6460
|
project: config2.project,
|
|
6396
6461
|
planner: config2.planner ? { provider: config2.planner.provider, enabled: config2.planner.enabled } : null,
|
|
@@ -6839,7 +6904,7 @@ function mountDashboardApi(app, opts) {
|
|
|
6839
6904
|
const runs = await listRuns(opts.paths);
|
|
6840
6905
|
const stories = listStories(opts.paths);
|
|
6841
6906
|
return c.json({
|
|
6842
|
-
version:
|
|
6907
|
+
version: readInstalledPackage().version,
|
|
6843
6908
|
root: opts.paths.root,
|
|
6844
6909
|
project: cfg.project,
|
|
6845
6910
|
planner: cfg.planner ? { provider: cfg.planner.provider, enabled: cfg.planner.enabled } : null,
|