Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
## [Unreleased]

### Fixed
- `squad init` no longer runs `git init` automatically when initialized inside a monorepo subdirectory (#939). It now shows a warning and suggests running from the git root instead.
- Azure DevOps adapter (`az` CLI calls) now use `shell: true` on Windows so `.cmd` wrapper scripts resolve correctly (#941).
- **Nap archival budget** (#123) — account for separator newlines in decision archival budget calculation

### Added — Full Work Monitor for squad watch (#708)
Expand Down Expand Up @@ -316,3 +318,4 @@ All notable changes to this project will be documented in this file.
- Changesets infrastructure for independent package versioning



6 changes: 1 addition & 5 deletions packages/squad-cli/src/cli/core/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,7 @@ export async function runInit(dest: string, options: RunInitOptions = {}): Promi
console.log();
console.log(`${DIM}Copilot resolves .github/agents/ from the git root, not from here.${RESET}`);
console.log(`${DIM}The Squad agent won't be visible to copilot in this folder.${RESET}`);
console.log();
// Auto-fix: run git init to create a repo boundary here
console.log(`${CYAN}${BOLD}→${RESET} Running ${CYAN}git init${RESET} to create a repo boundary...`);
execFileSync('git', ['init'], { cwd: dest, encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
console.log(`${GREEN}${BOLD}✓${RESET} Initialized git repo at ${normalDest}`);
console.log(`${DIM}Consider running squad init from the git root instead.${RESET}`);
console.log();
}
} catch {
Expand Down
12 changes: 7 additions & 5 deletions packages/squad-sdk/src/platform/azure-devops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
* @module platform/azure-devops
*/

import { execFileSync, execSync } from 'node:child_process';
import { execFileSync } from 'node:child_process';
import type { PlatformAdapter, PlatformType, WorkItem, PullRequest } from './types.js';

const IS_WINDOWS = process.platform === 'win32';
const EXEC_OPTS: { encoding: 'utf-8'; stdio: ['pipe', 'pipe', 'pipe'] } = { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] };
const AZ_OPTS = { ...EXEC_OPTS, shell: IS_WINDOWS };

/** Descriptor for a work item type returned by process template introspection. */
export interface WorkItemTypeInfo {
Expand All @@ -22,7 +24,7 @@ export interface WorkItemTypeInfo {
/** Check whether the az CLI with devops extension is available */
function assertAzCliAvailable(): void {
try {
execSync('az devops -h', EXEC_OPTS);
execFileSync('az', ['devops', '-h'], AZ_OPTS);
} catch {
throw new Error(
'Azure DevOps CLI not found. Install it with:\n' +
Expand Down Expand Up @@ -67,7 +69,7 @@ export function getAvailableWorkItemTypes(org: string, project: string): WorkIte
'--org', orgUrl,
'--project', project,
'--output', 'json',
], { ...EXEC_OPTS, timeout: 3_000 }).trim();
], { ...AZ_OPTS, timeout: 3_000 }).trim();

const types = parseJson<Array<{
name?: string;
Expand Down Expand Up @@ -158,7 +160,7 @@ export class AzureDevOpsAdapter implements PlatformAdapter {
}

private az(args: string[]): string {
return execFileSync('az', args, EXEC_OPTS).trim();
return execFileSync('az', args, AZ_OPTS).trim();
}

async listWorkItems(options: { tags?: string[]; state?: string; limit?: number }): Promise<WorkItem[]> {
Expand Down Expand Up @@ -433,7 +435,7 @@ export class AzureDevOpsAdapter implements PlatformAdapter {

try {
const orgUrl = `https://dev.azure.com/${targetOrg}`;
execFileSync('az', ['devops', 'configure', '--defaults', `organization=${orgUrl}`], EXEC_OPTS);
execFileSync('az', ['devops', 'configure', '--defaults', `organization=${orgUrl}`], AZ_OPTS);
} catch {
// az CLI might not be installed — non-fatal
}
Expand Down
Loading