diff --git a/.changeset/rename-npm-packages-squad-scope.md b/.changeset/rename-npm-packages-squad-scope.md new file mode 100644 index 000000000..1955eafad --- /dev/null +++ b/.changeset/rename-npm-packages-squad-scope.md @@ -0,0 +1,6 @@ +--- +"@squad/cli": major +"@squad/sdk": major +--- + +Rename the npm packages from `@bradygaster/squad-cli` and `@bradygaster/squad-sdk` to `@squad/cli` and `@squad/sdk`. `squad upgrade --self` and the update banner detect a legacy global install and remove it before installing the new package, and MCP config entries that use the old package name are still recognized as Squad-managed. Distribution names now come from `scripts/release/distribution-identity.json`, and `scripts/rename-distribution-identity.mjs` rewrites the repository when they change. diff --git a/.copilot/skills/architectural-review/SKILL.md b/.copilot/skills/architectural-review/SKILL.md index 8b8e11347..f309d8dd7 100644 --- a/.copilot/skills/architectural-review/SKILL.md +++ b/.copilot/skills/architectural-review/SKILL.md @@ -30,7 +30,7 @@ squad-sdk → NEVER depends on → squad-cli ``` **Check every new `import` statement in the PR:** -- CLI files may import from SDK (`@bradygaster/squad-sdk`) +- CLI files may import from SDK (`@squad/sdk`) - SDK files must NEVER import from CLI - If a PR adds an SDK import that pulls in CLI code, reject it @@ -70,7 +70,7 @@ When a PR applies a codebase-wide pattern change (e.g., "convert all `fs` calls 1. **Protected Files checked** — None of the protected bootstrap files were converted 2. **Zero-dependency markers scanned** — Files with `— zero dependencies` headers were skipped -3. **Imports resolve** — Every `import { X } from '@bradygaster/squad-sdk'` references an export that actually exists in the SDK barrel file +3. **Imports resolve** — Every `import { X } from '@squad/sdk'` references an export that actually exists in the SDK barrel file 4. **Not blindly applied** — File-specific constraints were respected 5. **Batched testing** — Changes were tested in logical groups, not all 30 files at once @@ -123,7 +123,7 @@ When reviewing changes to `core/` files: **Example 1: Reject — SDK import in bootstrap file** ``` PR adds to detect-squad-dir.ts: - import { FSStorageProvider } from '@bradygaster/squad-sdk'; + import { FSStorageProvider } from '@squad/sdk'; Finding: REJECT — detect-squad-dir.ts is a protected bootstrap file. It runs before the SDK is loaded. This import will crash the CLI at startup. @@ -133,7 +133,7 @@ Recommendation: Use node:fs directly. See Protected Files table. **Example 2: Reject — Reverse dependency** ``` PR adds to packages/squad-sdk/src/storage.ts: - import { detectSquadDir } from '@bradygaster/squad-cli'; + import { detectSquadDir } from '@squad/cli'; Finding: REJECT — SDK must never depend on CLI. Dependency direction is CLI → SDK, not reverse. Move the shared logic to SDK or extract to a diff --git a/.copilot/skills/pr-lifecycle/SKILL.md b/.copilot/skills/pr-lifecycle/SKILL.md index f98221819..c3d85fe26 100644 --- a/.copilot/skills/pr-lifecycle/SKILL.md +++ b/.copilot/skills/pr-lifecycle/SKILL.md @@ -119,7 +119,7 @@ For advanced scenarios (worktrees, multi-repo coordination), see `.copilot/skill Or create manually at `.changeset/{descriptive-name}.md`: ```markdown --- - '@bradygaster/squad-cli': patch + '@squad/cli': patch --- Brief description of the change @@ -372,7 +372,7 @@ npm run build && npm test && npm run lint # Changeset (required — touches packages/squad-sdk/src/) npx changeset add -# Select: @bradygaster/squad-sdk, minor, "Add profile API" +# Select: @squad/sdk, minor, "Add profile API" # Stage and commit git add packages/squad-sdk/src/profile/index.ts packages/squad-sdk/src/index.ts .changeset/ diff --git a/.copilot/skills/protected-files/SKILL.md b/.copilot/skills/protected-files/SKILL.md index 1b35373f9..bc08fb876 100644 --- a/.copilot/skills/protected-files/SKILL.md +++ b/.copilot/skills/protected-files/SKILL.md @@ -40,7 +40,7 @@ The `packages/squad-cli/src/cli/core/` directory contains a mix of early-startup ## Anti-Patterns - Converting all `fs` calls to `StorageProvider` without checking this list first -- Adding `import { X } from '@bradygaster/squad-sdk'` to a bootstrap file +- Adding `import { X } from '@squad/sdk'` to a bootstrap file - Assuming every file in `core/` can safely import SDK code ## Adding New Bootstrap Utilities diff --git a/.copilot/skills/release-process/SKILL.md b/.copilot/skills/release-process/SKILL.md index 629fcf64c..6224a814f 100644 --- a/.copilot/skills/release-process/SKILL.md +++ b/.copilot/skills/release-process/SKILL.md @@ -30,7 +30,7 @@ Before either channel: git fetch origin dev main git merge-base origin/dev origin/main grep '"version"' package.json packages/squad-sdk/package.json packages/squad-cli/package.json -node -p "require('./packages/squad-cli/package.json').dependencies['@bradygaster/squad-sdk']" +node -p "require('./packages/squad-cli/package.json').dependencies['@squad/sdk']" grep -F "## [$VERSION]" CHANGELOG.md SKIP_BUILD_BUMP=1 npm run build npx vitest run @@ -128,10 +128,10 @@ publication. ## Verify ```bash -npm view @bradygaster/squad-sdk dist-tags.preview -npm view @bradygaster/squad-cli dist-tags.preview -npm view @bradygaster/squad-sdk dist-tags.latest -npm view @bradygaster/squad-cli dist-tags.latest +npm view @squad/sdk dist-tags.preview +npm view @squad/cli dist-tags.preview +npm view @squad/sdk dist-tags.latest +npm view @squad/cli dist-tags.latest gh release view "v$VERSION" ``` diff --git a/.github/actions/squad-init/action.yml b/.github/actions/squad-init/action.yml index e2cfb5b8f..b96dfacb8 100644 --- a/.github/actions/squad-init/action.yml +++ b/.github/actions/squad-init/action.yml @@ -4,7 +4,7 @@ # works on runners that cannot reach registry.npmjs.org — self-hosted agents # behind a corporate firewall, locked-down build machines, air-gapped mirrors. # -# This is the npm-free replacement for the `npx @bradygaster/squad-cli init` +# This is the npm-free replacement for the `npx @squad/cli init` # step in the gh-aw activation job (see the limitation documented in #1587, # and the RFC in #1593). # diff --git a/.github/workflows/squad-ci.yml b/.github/workflows/squad-ci.yml index 9fb1a7b34..ebda9eb57 100644 --- a/.github/workflows/squad-ci.yml +++ b/.github/workflows/squad-ci.yml @@ -371,7 +371,7 @@ jobs: sub(/^run:[[:space:]]*/, "", command) if (command ~ /(^|&&|\|\||;)[[:space:]]*((if|then)[[:space:]]+)?([A-Za-z_][A-Za-z0-9_]*=[^[:space:]]+[[:space:]]+)*npm[[:space:]][^#;&|]*publish([[:space:]]|$)/ && command !~ /(^|[[:space:]])(-w|--workspace)(=|[[:space:]]|$)/ && - command !~ /npm publish "\$PACKS_DIR\/bradygaster-squad-(sdk|cli)-\$\{VERSION\}\.tgz"/) { + command !~ /npm publish "\$PACKS_DIR\/(squad-sdk-\$\{VERSION\}\.tgz|squad-cli-\$\{VERSION\}\.tgz)"/) { print NR ":" $0 } } diff --git a/.github/workflows/squad-insider-publish.yml b/.github/workflows/squad-insider-publish.yml index 039ba004b..b92ab284b 100644 --- a/.github/workflows/squad-insider-publish.yml +++ b/.github/workflows/squad-insider-publish.yml @@ -67,8 +67,8 @@ jobs: exit 1 fi echo "✅ npm registry is reachable" - if ! npm view @bradygaster/squad-sdk version 2>/dev/null; then - echo "::warning::Cannot verify @bradygaster/squad-sdk on registry — package may not exist yet or registry is degraded" + if ! npm view @squad/sdk version 2>/dev/null; then + echo "::warning::Cannot verify @squad/sdk on registry — package may not exist yet or registry is degraded" else echo "✅ @bradygaster package namespace is accessible" fi @@ -113,11 +113,11 @@ jobs: # Query npm for the latest insider build number for this base version # Fail hard if npm is unreachable — defaulting to 0 risks republishing an existing version - SDK_VERSIONS=$(npm view @bradygaster/squad-sdk versions --json 2>&1) || { + SDK_VERSIONS=$(npm view @squad/sdk versions --json 2>&1) || { echo "::error::Failed to query npm for squad-sdk versions. Cannot safely compute insider version." exit 1 } - CLI_VERSIONS=$(npm view @bradygaster/squad-cli versions --json 2>&1) || { + CLI_VERSIONS=$(npm view @squad/cli versions --json 2>&1) || { echo "::error::Failed to query npm for squad-cli versions. Cannot safely compute insider version." exit 1 } @@ -160,8 +160,8 @@ jobs: if: ${{ inputs.dry_run == 'true' }} run: | echo "🏜️ DRY RUN — would have published:" - echo " @bradygaster/squad-sdk@${{ steps.version.outputs.insider_version }}" - echo " @bradygaster/squad-cli@${{ steps.version.outputs.insider_version }}" + echo " @squad/sdk@${{ steps.version.outputs.insider_version }}" + echo " @squad/cli@${{ steps.version.outputs.insider_version }}" release: name: Create insider GitHub prerelease diff --git a/.github/workflows/squad-npm-publish.yml b/.github/workflows/squad-npm-publish.yml index 58c1c15de..898ac0d1a 100644 --- a/.github/workflows/squad-npm-publish.yml +++ b/.github/workflows/squad-npm-publish.yml @@ -340,9 +340,9 @@ jobs: [ -n "$NODE_AUTH_TOKEN" ] || { echo "::error::NPM_TOKEN is not configured"; exit 1; } node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" if [ "$SDK_STATE" = present ]; then - npm dist-tag add "@bradygaster/squad-sdk@${VERSION}" "$STAGING_TAG" + npm dist-tag add "@squad/sdk@${VERSION}" "$STAGING_TAG" elif [ "$SDK_STATE" = missing ]; then - npm publish "$PACKS_DIR/bradygaster-squad-sdk-${VERSION}.tgz" --ignore-scripts --access public --provenance --tag "$STAGING_TAG" + npm publish "$PACKS_DIR/squad-sdk-${VERSION}.tgz" --ignore-scripts --access public --provenance --tag "$STAGING_TAG" else echo "::error::SDK registry state must be present or missing, got '$SDK_STATE'"; exit 1 fi @@ -357,9 +357,9 @@ jobs: [ -n "$NODE_AUTH_TOKEN" ] || { echo "::error::NPM_TOKEN is not configured"; exit 1; } node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" if [ "$CLI_STATE" = present ]; then - npm dist-tag add "@bradygaster/squad-cli@${VERSION}" "$STAGING_TAG" + npm dist-tag add "@squad/cli@${VERSION}" "$STAGING_TAG" elif [ "$CLI_STATE" = missing ]; then - npm publish "$PACKS_DIR/bradygaster-squad-cli-${VERSION}.tgz" --ignore-scripts --access public --provenance --tag "$STAGING_TAG" + npm publish "$PACKS_DIR/squad-cli-${VERSION}.tgz" --ignore-scripts --access public --provenance --tag "$STAGING_TAG" else echo "::error::CLI registry state must be present or missing, got '$CLI_STATE'"; exit 1 fi @@ -375,7 +375,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - npm dist-tag add "@bradygaster/squad-sdk@${VERSION}" "$DIST_TAG" + npm dist-tag add "@squad/sdk@${VERSION}" "$DIST_TAG" - name: Promote CLI to the primary channel if: steps.existing.outputs.set_cli_primary == 'true' @@ -384,7 +384,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - npm dist-tag add "@bradygaster/squad-cli@${VERSION}" "$DIST_TAG" + npm dist-tag add "@squad/cli@${VERSION}" "$DIST_TAG" - name: Verify primary channel run: node scripts/release/npm-pair-verify.mjs --version "$VERSION" --tag "$DIST_TAG" --local-packs "$PACKS_DIR/local-packs.json" --out "$RECON_DIR/verify-${DIST_TAG}.json" --max-wait-seconds 900 @@ -396,7 +396,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - npm dist-tag add "@bradygaster/squad-sdk@${VERSION}" preview + npm dist-tag add "@squad/sdk@${VERSION}" preview - name: Add preview alias to CLI if: steps.existing.outputs.set_cli_preview == 'true' @@ -405,7 +405,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - npm dist-tag add "@bradygaster/squad-cli@${VERSION}" preview + npm dist-tag add "@squad/cli@${VERSION}" preview - name: Verify preview alias if: inputs.add_preview_alias && inputs.dist_tag != 'preview' @@ -434,7 +434,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - if npm dist-tag rm @bradygaster/squad-sdk "$STAGING_TAG"; then + if npm dist-tag rm @squad/sdk "$STAGING_TAG"; then echo "outcome=success" >> "$GITHUB_OUTPUT" else status=$? @@ -450,7 +450,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - if npm dist-tag rm @bradygaster/squad-cli "$STAGING_TAG"; then + if npm dist-tag rm @squad/cli "$STAGING_TAG"; then echo "outcome=success" >> "$GITHUB_OUTPUT" else status=$? @@ -642,7 +642,7 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - node scripts/promote-insider-tag.mjs @bradygaster/squad-sdk "$NEW_VERSION" + node scripts/promote-insider-tag.mjs @squad/sdk "$NEW_VERSION" - name: Promote CLI insider dist-tag env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -650,4 +650,4 @@ jobs: run: | set -euo pipefail node "$RELEASE_SCRIPTS_ROOT/assert-publish-identity.mjs" --source-sha "$SOURCE_SHA" --dispatch-sha "${{ github.sha }}" --workflow-sha "${{ github.workflow_sha }}" --tag "$TAG" --evidence-dir "$PACKS_DIR" - node scripts/promote-insider-tag.mjs @bradygaster/squad-cli "$NEW_VERSION" + node scripts/promote-insider-tag.mjs @squad/cli "$NEW_VERSION" diff --git a/.github/workflows/squad-promote.yml b/.github/workflows/squad-promote.yml index 9a6240c27..3d7e5058c 100644 --- a/.github/workflows/squad-promote.yml +++ b/.github/workflows/squad-promote.yml @@ -103,8 +103,8 @@ jobs: fi expected_sdk_dependency=">=${version}" - sdk_dependency="$(node -p "require('./packages/squad-cli/package.json').dependencies['@bradygaster/squad-sdk']")" - lock_dependency="$(node -p "require('./package-lock.json').packages['packages/squad-cli'].dependencies['@bradygaster/squad-sdk']")" + sdk_dependency="$(node -p "require('./packages/squad-cli/package.json').dependencies['@squad/sdk']")" + lock_dependency="$(node -p "require('./package-lock.json').packages['packages/squad-cli'].dependencies['@squad/sdk']")" if [ "${sdk_dependency}" != "${expected_sdk_dependency}" ] || [ "${lock_dependency}" != "${expected_sdk_dependency}" ]; then echo "::error::CLI SDK dependency floors must both be '${expected_sdk_dependency}'." exit 1 @@ -267,8 +267,8 @@ jobs: exit 1 fi done - sdk_dependency="$(node -p "require('./packages/squad-cli/package.json').dependencies['@bradygaster/squad-sdk']")" - lock_dependency="$(node -p "require('./package-lock.json').packages['packages/squad-cli'].dependencies['@bradygaster/squad-sdk']")" + sdk_dependency="$(node -p "require('./packages/squad-cli/package.json').dependencies['@squad/sdk']")" + lock_dependency="$(node -p "require('./package-lock.json').packages['packages/squad-cli'].dependencies['@squad/sdk']")" if [[ "$sdk_dependency" == *-* ]] || [[ "$lock_dependency" == *-* ]]; then echo "::error::Stable promotion cannot retain a prerelease SDK dependency floor." exit 1 diff --git a/.github/workflows/squad-release-verify.yml b/.github/workflows/squad-release-verify.yml index d76b1fb3d..193d52e11 100644 --- a/.github/workflows/squad-release-verify.yml +++ b/.github/workflows/squad-release-verify.yml @@ -43,10 +43,10 @@ on: description: 'Name of the uploaded evidence artifact' value: ${{ jobs.verify.outputs.evidence_artifact }} sdk_sha256: - description: 'sha256 of the packed @bradygaster/squad-sdk tarball' + description: 'sha256 of the packed @squad/sdk tarball' value: ${{ jobs.verify.outputs.sdk_sha256 }} cli_sha256: - description: 'sha256 of the packed @bradygaster/squad-cli tarball' + description: 'sha256 of the packed @squad/cli tarball' value: ${{ jobs.verify.outputs.cli_sha256 }} pull_request: branches: [dev, main] diff --git a/.github/workflows/squad-release.yml b/.github/workflows/squad-release.yml index e72492036..8b70e0ed7 100644 --- a/.github/workflows/squad-release.yml +++ b/.github/workflows/squad-release.yml @@ -6,7 +6,7 @@ name: Squad Release # verification bundle (squad-release-verify.yml) pass at that SHA. # # Preview releases (X.Y.Z-preview.N from dev) publish to the npm `insider` dist-tag by default -# because `squad upgrade --self --insider` resolves `@bradygaster/squad-cli@insider`; `preview` +# because `squad upgrade --self --insider` resolves `@squad/cli@insider`; `preview` # is added as a compatibility alias once both packages verify. Both are inputs so the channel # decision is a one-line change at dispatch time. # diff --git a/.github/workflows/squad-upgrade-matrix.yml b/.github/workflows/squad-upgrade-matrix.yml index 1b250c10a..9b0d4b326 100644 --- a/.github/workflows/squad-upgrade-matrix.yml +++ b/.github/workflows/squad-upgrade-matrix.yml @@ -203,7 +203,7 @@ jobs: target_version="$(node -p 'require("./preview-tarball-matrix-results/registry-preflight.json").version')" test "$target_version" = "$SQUAD_PREVIEW_EXPECTED_VERSION" registry_state="$(node -p 'require("./preview-tarball-matrix-results/registry-preflight.json").aggregate.versionState')" - insider_version="$(node -p 'require("./preview-tarball-matrix-results/registry-preflight.json").packages["@bradygaster/squad-cli"].distTags.values.insider || ""')" + insider_version="$(node -p 'require("./preview-tarball-matrix-results/registry-preflight.json").packages["@squad/cli"].distTags.values.insider || ""')" echo "SQUAD_PREVIEW_TARGET_REGISTRY_STATE=$registry_state" >> "$GITHUB_ENV" echo "SQUAD_PREVIEW_INSIDER_VERSION=$insider_version" >> "$GITHUB_ENV" - name: Run exact preview-tarball matrix diff --git a/.squad-templates/model-selection-reference.md b/.squad-templates/model-selection-reference.md index eb8ec3a35..1c0562c59 100644 --- a/.squad-templates/model-selection-reference.md +++ b/.squad-templates/model-selection-reference.md @@ -2,7 +2,7 @@ ## Per-Agent Model Selection -Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@bradygaster/squad-sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@bradygaster/squad-sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. +Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@squad/sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@squad/sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. Spawn guidance never names a model ID. It reasons in sources and tiers (`premium`, `standard`, `fast`); **Appendix A** is the only place that turns a tier into model IDs. diff --git a/.squad-templates/ralph-reference.md b/.squad-templates/ralph-reference.md index b1b13d877..ae80caae2 100644 --- a/.squad-templates/ralph-reference.md +++ b/.squad-templates/ralph-reference.md @@ -6,7 +6,7 @@ Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph is m **⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous monitoring loop — scan for work, report findings to the coordinator, scan again, repeat — until the board is empty or the user explicitly says "idle" or "stop". This is not optional. If work exists, keep coordinating it. When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).** -**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @bradygaster/squad-cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). +**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @squad/cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). **On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details. @@ -56,7 +56,7 @@ gh pr list --state open --draft --json number,title,author,labels,checks --limit | **Review feedback** | PR has `CHANGES_REQUESTED` review | Report feedback to the coordinator for routing to the PR author agent | | **CI failures** | PR checks failing | Report to the coordinator to route a fix or create a fix issue | | **Approved PRs** | PR approved, CI green, ready for pre-merge review | Report readiness to the coordinator for verification and hand-off to a human; Ralph does not merge or close issues | -| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @bradygaster/squad-cli watch` for persistent polling. | +| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @squad/cli watch` for persistent polling. | ### Authority boundaries @@ -88,9 +88,9 @@ After every 3-5 rounds, pause and report before continuing: Ralph's in-session loop processes work while it exists, then idles. For **persistent polling** between sessions or when you're away from the keyboard, use the `squad watch` CLI command: ```bash -npx @bradygaster/squad-cli watch # polls every 10 minutes (default) -npx @bradygaster/squad-cli watch --interval 5 # polls every 5 minutes -npx @bradygaster/squad-cli watch --interval 30 # polls every 30 minutes +npx @squad/cli watch # polls every 10 minutes (default) +npx @squad/cli watch --interval 5 # polls every 5 minutes +npx @squad/cli watch --interval 30 # polls every 30 minutes ``` This runs as a standalone local process (not inside Copilot) that: @@ -104,7 +104,7 @@ This runs as a standalone local process (not inside Copilot) that: | Layer | When | How | |-------|------|-----| | **In-session** | You're at the keyboard | "Ralph, go" — active loop while work exists | -| **Local watchdog** | You're away but machine is on | `npx @bradygaster/squad-cli watch --interval 10` | +| **Local watchdog** | You're away but machine is on | `npx @squad/cli watch --interval 10` | | **Cloud heartbeat** | Fully unattended | `squad-heartbeat.yml` — event-based only (cron disabled) | ### Ralph State @@ -140,8 +140,8 @@ After the coordinator's step 6 ("Immediately assess: Does anything trigger follo 3. Coordinator-managed agents work → results collected and follow-up assessed 4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause 5. More work found → coordinator acts on it; Ralph continues monitoring -6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @bradygaster/squad-cli watch` for persistent polling) +6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @squad/cli watch` for persistent polling) -**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @bradygaster/squad-cli watch`. +**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @squad/cli watch`. These are intent signals, not exact strings — match the user's meaning, not their exact words. diff --git a/.squad-templates/session-init-reference.md b/.squad-templates/session-init-reference.md index c41207f81..14bc3044a 100644 --- a/.squad-templates/session-init-reference.md +++ b/.squad-templates/session-init-reference.md @@ -85,7 +85,7 @@ it. Skip the npm probe. **Step B — npm probe (on cache miss / stale / version mismatch):** ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If the command does not respond within 5 seconds, diff --git a/.squad-templates/skills/e2e-template-testing/SKILL.md b/.squad-templates/skills/e2e-template-testing/SKILL.md index d1b38d94e..811830142 100644 --- a/.squad-templates/skills/e2e-template-testing/SKILL.md +++ b/.squad-templates/skills/e2e-template-testing/SKILL.md @@ -454,16 +454,16 @@ immediately and report the failure — do **not** attempt workarounds or mark scenarios as SKIPPED. 0. **Clean stale SDK before building.** Before running `npm run build`, remove any - stale published copy of `@bradygaster/squad-sdk` that may have been installed + stale published copy of `@squad/sdk` that may have been installed into `packages/squad-cli/node_modules/`. This local copy shadows the workspace symlink in the root `node_modules/` and causes TypeScript to see the published version instead of the local source. Run from the repo root: ```powershell - $stale = "packages\squad-cli\node_modules\@bradygaster\squad-sdk" + $stale = "packages\squad-cli\node_modules\@squad\sdk" if (Test-Path $stale) { Remove-Item -Recurse -Force $stale; Write-Host "Cleaned stale SDK" } ``` This is safe to run unconditionally — if the path doesn't exist, the command is - a no-op. The root `node_modules\@bradygaster\squad-sdk` workspace symlink remains + a no-op. The root `node_modules\@squad\sdk` workspace symlink remains intact and npm will use it automatically. 1. **Build must succeed.** Run `npm run build` from the repo root. A build failure blocks all scenarios; report `BUILD_FAILED` and stop. diff --git a/.squad-templates/skills/release-process/SKILL.md b/.squad-templates/skills/release-process/SKILL.md index 10172b6fd..4c43be026 100644 --- a/.squad-templates/skills/release-process/SKILL.md +++ b/.squad-templates/skills/release-process/SKILL.md @@ -76,8 +76,8 @@ Choose a unique SemVer version and update all package manifests: ```bash VERSION=0.14.0-preview.1 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -128,7 +128,7 @@ The workflow: Install the resulting preview: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` The same preview is available through `brew install --cask squad-preview` and @@ -214,8 +214,8 @@ Use `insider`, `preview`, or `latest` for `DIST_TAG`: VERSION=0.14.0 DIST_TAG=latest -npm view @bradygaster/squad-sdk "dist-tags.$DIST_TAG" -npm view @bradygaster/squad-cli "dist-tags.$DIST_TAG" +npm view @squad/sdk "dist-tags.$DIST_TAG" +npm view @squad/cli "dist-tags.$DIST_TAG" gh release view "v$VERSION" ``` @@ -277,8 +277,8 @@ Prepare the next development version in a normal PR to `dev`: ```bash NEXT_VERSION=0.15.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/.squad-templates/skills/squad-version-check/SKILL.md b/.squad-templates/skills/squad-version-check/SKILL.md index 5f3fd785d..21cb71b4f 100644 --- a/.squad-templates/skills/squad-version-check/SKILL.md +++ b/.squad-templates/skills/squad-version-check/SKILL.md @@ -1,6 +1,6 @@ --- name: "squad-version-check" -description: "Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." +description: "Internals of how @squad/cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." allowedTools: [] confidence: medium domain: squad-internals @@ -18,13 +18,13 @@ source: "validated in bradygaster/squad#1173 recon (2026-05-26)." ## What This Skill Covers -Reusable knowledge about how `@bradygaster/squad-cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. +Reusable knowledge about how `@squad/cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. --- ## Package & Registry Facts -- **Package name:** `@bradygaster/squad-cli` +- **Package name:** `@squad/cli` - **Registry:** npm (public) - **CLI binary:** `squad` (registered via `package.json#bin.squad`) - **Node version requirement:** Node ≥22.5.0 (ESM-only codebase) @@ -74,9 +74,9 @@ Reads the stamped version back from `squad.agent.md`: ### Self-upgrade path (`selfUpgradeCli()`): Detects npm/pnpm/yarn via `npm_execpath` and `npm_config_user_agent`. Runs: -- npm: `npm install -g @bradygaster/squad-cli@latest` -- pnpm: `pnpm add -g @bradygaster/squad-cli@latest` -- yarn: `yarn global add @bradygaster/squad-cli@latest` +- npm: `npm install -g @squad/cli@latest` +- pnpm: `pnpm add -g @squad/cli@latest` +- yarn: `yarn global add @squad/cli@latest` Use `@insider` tag for insider builds. ### `compareSemver(a, b)` utility (in upgrade.js): @@ -106,7 +106,7 @@ The file is read-only from the upgrade path's perspective. Only the coordinator Use this one-liner from inside a coordinator prompt to fetch dist-tags: ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting. diff --git a/.squad-templates/skills/versioning-policy/SKILL.md b/.squad-templates/skills/versioning-policy/SKILL.md index 59de6f54b..9b5ba4e99 100644 --- a/.squad-templates/skills/versioning-policy/SKILL.md +++ b/.squad-templates/skills/versioning-policy/SKILL.md @@ -8,8 +8,8 @@ source: "earned (PR #640 workspace resolution incident and automated release cha ## Context -Squad publishes `@bradygaster/squad-sdk` and -`@bradygaster/squad-cli` from one npm workspace. Their versions and the root +Squad publishes `@squad/sdk` and +`@squad/cli` from one npm workspace. Their versions and the root version move together. A mismatched prerelease dependency can make npm silently resolve an older registry SDK instead of the local workspace. @@ -52,8 +52,8 @@ For every committed preview version, set both the CLI manifest and lockfile dependency floor to that exact preview: ```bash -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/.squad-templates/workflows/squad-insider-release.yml b/.squad-templates/workflows/squad-insider-release.yml index 36a1121bf..2f09ca669 100644 --- a/.squad-templates/workflows/squad-insider-release.yml +++ b/.squad-templates/workflows/squad-insider-release.yml @@ -50,7 +50,7 @@ jobs: run: | gh release create "${{ steps.version.outputs.insider_tag }}" \ --title "${{ steps.version.outputs.insider_tag }}" \ - --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @bradygaster/squad-cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ + --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @squad/cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ --prerelease - name: Verify release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e94b69ef0..827434804 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,8 +40,8 @@ Squad is an npm workspace monorepo with two packages: ``` squad/ -├── packages/squad-cli/ # CLI tool (@bradygaster/squad-cli) -├── packages/squad-sdk/ # Runtime SDK (@bradygaster/squad-sdk) +├── packages/squad-cli/ # CLI tool (@squad/cli) +├── packages/squad-sdk/ # Runtime SDK (@squad/sdk) ├── src/ # Legacy CLI code (migrating to packages/) ├── dist/ # Compiled output ├── .squad/ # Team state and agent history @@ -89,7 +89,7 @@ git fetch upstream dev npm install ``` -npm workspaces automatically links local packages. `@bradygaster/squad-cli` can import from `@bradygaster/squad-sdk` without publishing. +npm workspaces automatically links local packages. `@squad/cli` can import from `@squad/sdk` without publishing. ### 2. Build @@ -341,7 +341,7 @@ Create a file at `.changeset/your-change-name.md` with frontmatter specifying th ```markdown --- -'@bradygaster/squad-cli': patch +'@squad/cli': patch --- Fix help text rendering for the status command @@ -353,8 +353,8 @@ The frontmatter lists each affected package and its semver bump type. The body i ```markdown --- -"@bradygaster/squad-sdk": minor -"@bradygaster/squad-cli": patch +"@squad/sdk": minor +"@squad/cli": patch --- Add streaming support to agent orchestration. Update CLI to display stream progress. @@ -393,7 +393,7 @@ CI watches for drift: `scripts/check-changeset-drift.mjs` warns on PRs and fails - **dev** — Integration branch on `github/squad`. **All PRs from forks must target this branch**, not `main`. - **user/issue-slug** — Feature branches from users or agents. -> **Note:** The `insider` npm tag (`@bradygaster/squad-cli@insider`) publishes from `dev` via manual workflow dispatch. There is no separate insider branch. +> **Note:** The `insider` npm tag (`@squad/cli@insider`) publishes from `dev` via manual workflow dispatch. There is no separate insider branch. ## Continuous Integration diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0882cb927..18184e13e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -22,7 +22,7 @@ The Insider Program gives you access to cutting-edge features before they ship. Install the insider build from npm using the honor system: ```bash -npm install -g @bradygaster/squad-cli@insider +npm install -g @squad/cli@insider ``` That's it. You're now on insider builds. For Homebrew and WinGet, see the [Insider Program guide](https://github.github.com/squad/docs/insider-program/). diff --git a/Dockerfile b/Dockerfile index 65ed8e562..aeefd44ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ # uid 1001, SIGTERM drain, `squad watch --execute` as the default command). # # The difference from the reference Dockerfile in that page is where the CLI -# comes from: instead of `npm install -g @bradygaster/squad-cli` at image build +# comes from: instead of `npm install -g @squad/cli` at image build # time, this copies a self-contained bundle produced by # scripts/build-standalone.mjs. npm is used only inside the builder stage, so # the final image has no dependency on registry.npmjs.org — matching the goal diff --git a/README.md b/README.md index d38248e71..9918a60c7 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Choose the install method for your platform: | Method | Command | |--------|---------| -| npm (all platforms, Node.js 22.5+) | `npm install -g @bradygaster/squad-cli` | +| npm (all platforms, Node.js 22.5+) | `npm install -g @squad/cli` | | Homebrew (macOS) | `brew install --cask bradygaster/squad/squad` | | WinGet (Windows) | `winget install --id bradygaster.Squad --exact` | | Install script (macOS/Linux, no npm) | See [Standalone Install](https://github.github.com/squad/docs/features/standalone-install/) | @@ -60,6 +60,11 @@ Preview and insider builds are available as `squad-preview` and `squad-insider` Homebrew casks, or as `bradygaster.Squad.Preview` and `bradygaster.Squad.Insider` WinGet packages. +> **Upgrading from `@bradygaster/squad-cli`?** The npm packages are now +> `@squad/cli` and `@squad/sdk`. Run `npm uninstall -g @bradygaster/squad-cli` +> before installing `@squad/cli`; see the +> [Package Rename guide](https://github.github.com/squad/docs/get-started/package-rename/). + Direct archives for macOS, Linux, and Windows are also available from [GitHub Releases](https://github.com/github/squad/releases/latest). @@ -121,7 +126,7 @@ Use the same channel you installed from: | Installed with | Update command | |----------------|----------------| -| npm | `npm install -g @bradygaster/squad-cli@latest` | +| npm | `npm install -g @squad/cli@latest` | | Homebrew | `brew upgrade --cask squad` | | WinGet | `winget upgrade --id bradygaster.Squad --exact` | | Install script | Re-run the [install script](https://github.github.com/squad/docs/features/standalone-install/#macos-and-linux) | @@ -504,7 +509,7 @@ Prefer TypeScript? You can define your team in code instead of markdown. Create ```typescript // squad.config.ts -import { defineSquad, defineTeam, defineAgent } from '@bradygaster/squad-sdk'; +import { defineSquad, defineTeam, defineAgent } from '@squad/sdk'; export default defineSquad({ team: defineTeam({ name: 'Platform Squad', members: ['@edie', '@mcmanus'] }), @@ -522,8 +527,8 @@ Run `squad build` to generate all the markdown. See the [SDK-First Mode Guide](d ## Monorepo Development Squad is a monorepo with two packages: -- **`@bradygaster/squad-sdk`** — Core runtime and library for programmable agent orchestration -- **`@bradygaster/squad-cli`** — Command-line interface that depends on the SDK +- **`@squad/sdk`** — Core runtime and library for programmable agent orchestration +- **`@squad/cli`** — Command-line interface that depends on the SDK ### Building @@ -583,7 +588,7 @@ The SDK provides programmatic control over agent orchestration — custom tools, - [Extensibility guide](docs/src/content/docs/guide/extensibility.md) - [Samples](samples/README.md) — eight working examples from beginner to advanced -For SDK installation: `npm install @bradygaster/squad-sdk` +For SDK installation: `npm install @squad/sdk` --- diff --git a/README.zh.md b/README.zh.md index 37d302a62..f7c9f5cda 100644 --- a/README.zh.md +++ b/README.zh.md @@ -37,7 +37,7 @@ git init | 安装方式 | 命令 | |----------|------| -| npm(所有平台,需要 Node.js 22.5+) | `npm install -g @bradygaster/squad-cli` | +| npm(所有平台,需要 Node.js 22.5+) | `npm install -g @squad/cli` | | Homebrew(macOS) | `brew install --cask bradygaster/squad/squad` | | WinGet(Windows) | `winget install --id bradygaster.Squad --exact` | | 安装脚本(macOS/Linux,无需 npm) | 查看[独立安装指南](https://github.github.com/squad/docs/features/standalone-install/) | @@ -46,6 +46,10 @@ git init `squad-insider` cask,或 WinGet 的 `bradygaster.Squad.Preview`、 `bradygaster.Squad.Insider` 软件包安装。 +> **Upgrading from `@bradygaster/squad-cli`?** npm 包已更名为 `@squad/cli` 和 +> `@squad/sdk`。安装前请先运行 `npm uninstall -g @bradygaster/squad-cli`,详见 +> [Package Rename 指南](https://github.github.com/squad/docs/get-started/package-rename/)。 + 你也可以从 [GitHub Releases](https://github.com/github/squad/releases/latest) 直接下载 macOS、Linux 或 Windows 压缩包。 @@ -100,7 +104,7 @@ Squad 会提议一个团队 — 每个成员的名字都来自一个持久化的 | 安装方式 | 更新命令 | |----------|----------| -| npm | `npm install -g @bradygaster/squad-cli@latest` | +| npm | `npm install -g @squad/cli@latest` | | Homebrew | `brew upgrade --cask squad` | | WinGet | `winget upgrade --id bradygaster.Squad --exact` | | 安装脚本 | 重新运行[安装脚本](https://github.github.com/squad/docs/features/standalone-install/#macos-and-linux) | @@ -271,7 +275,7 @@ Squad 不按人类的时间表工作。当你分配任务时,协调员会同 ```typescript // squad.config.ts -import { defineSquad, defineTeam, defineAgent } from '@bradygaster/squad-sdk'; +import { defineSquad, defineTeam, defineAgent } from '@squad/sdk'; export default defineSquad({ team: defineTeam({ name: 'Platform Squad', members: ['@edie', '@mcmanus'] }), @@ -289,8 +293,8 @@ export default defineSquad({ ## Monorepo 开发 Squad 是一个包含两个包的 monorepo: -- **`@bradygaster/squad-sdk`** — 核心运行时和可编程智能体编排库 -- **`@bradygaster/squad-cli`** — 依赖 SDK 的命令行界面 +- **`@squad/sdk`** — 核心运行时和可编程智能体编排库 +- **`@squad/cli`** — 依赖 SDK 的命令行界面 ### 构建 @@ -350,4 +354,4 @@ SDK 提供对智能体编排的编程控制 —— 自定义工具、钩子流 - [扩展性指南](docs/src/content/docs/guide/extensibility.md) - [示例](samples/README.md) —— 八个从入门到进阶的可运行示例 -SDK 安装:`npm install @bradygaster/squad-sdk` +SDK 安装:`npm install @squad/sdk` diff --git a/cli.js b/cli.js index 45c895631..ac11dc136 100644 --- a/cli.js +++ b/cli.js @@ -5,8 +5,8 @@ if (process.env.npm_execpath) { console.error('\x1b[33m'); console.error('⚠ DEPRECATION NOTICE'); console.error(' npx github:bradygaster/squad is deprecated.'); - console.error(' Switch to: npm install -g @bradygaster/squad-cli@latest'); - console.error(' Or use: npx @bradygaster/squad-cli'); + console.error(' Switch to: npm install -g @squad/cli@latest'); + console.error(' Or use: npx @squad/cli'); console.error('\x1b[0m'); } diff --git a/docs/SQUAD-2.0-OVERVIEW.md b/docs/SQUAD-2.0-OVERVIEW.md index 5790d2ae6..7f4c46312 100644 --- a/docs/SQUAD-2.0-OVERVIEW.md +++ b/docs/SQUAD-2.0-OVERVIEW.md @@ -20,7 +20,7 @@ Squad 2.0 decouples the client host, the conversation backend, and the execution flowchart LR user[Developer] --> client - subgraph CP[Client Plane\n@bradygaster/squad-sdk/client] + subgraph CP[Client Plane\n@squad/sdk/client] client[Host-native adapter\nCopilot / Claude / Kiro / OpenCode / Cursor / Codex / Antigravity] projection[HostProjection\nagent files + MCP config + rules] caps[ClientCapabilities\ncapability tokens + dispatch] @@ -28,7 +28,7 @@ flowchart LR client --> caps end - subgraph BP[Control / Broker Plane\n@bradygaster/squad-sdk/backend] + subgraph BP[Control / Broker Plane\n@squad/sdk/backend] backend[SquadBackend / IConversationBackend] log[Durable ordered event log\nBackendEnvelope + monotonic seq] auth[Capability negotiation\nclient ∩ backend ∩ policy] @@ -52,9 +52,9 @@ flowchart LR backend --> harness ``` -### Plane 1: Client Plane (`@bradygaster/squad-sdk/client`) +### Plane 1: Client Plane (`@squad/sdk/client`) -`@bradygaster/squad-sdk/client` (with `@bradygaster/squad-sdk/clients` retained as a deprecated alias) projects the Squad coordinator into each host's native configuration without owning routing, durable state, or authorization: +`@squad/sdk/client` (with `@squad/sdk/clients` retained as a deprecated alias) projects the Squad coordinator into each host's native configuration without owning routing, durable state, or authorization: | Host (`ClientId`) | Generated files | |---|---| @@ -68,9 +68,9 @@ flowchart LR Persisted `clients[]` in `.squad/config.json` contains only canonical slugs validated by `normalizeClientIds()` and `assertPortableClients()`. -### Plane 2: Control / Broker Plane (`@bradygaster/squad-sdk/backend`) +### Plane 2: Control / Broker Plane (`@squad/sdk/backend`) -> **Experimental Preview — Bring Your Own Server:** `@bradygaster/squad-sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. +> **Experimental Preview — Bring Your Own Server:** `@squad/sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. `SquadBackend` / `IConversationBackend` defines the conversation contract: diff --git a/docs/migration/teams-async-adapter.md b/docs/migration/teams-async-adapter.md index b3ebefc49..165febe89 100644 --- a/docs/migration/teams-async-adapter.md +++ b/docs/migration/teams-async-adapter.md @@ -13,7 +13,7 @@ The Teams adapter (`teams-graph` channel) requires interactive OAuth authenticat ### Before (v0.9.x — synchronous) ```typescript -import { createCommunicationAdapter } from '@bradygaster/squad-sdk'; +import { createCommunicationAdapter } from '@squad/sdk'; const adapter = createCommunicationAdapter(repoRoot); await adapter.postUpdate({ title: 'Hello', body: 'World' }); @@ -22,7 +22,7 @@ await adapter.postUpdate({ title: 'Hello', body: 'World' }); ### After (v0.10.x — async) ```typescript -import { createCommunicationAdapter } from '@bradygaster/squad-sdk'; +import { createCommunicationAdapter } from '@squad/sdk'; const adapter = await createCommunicationAdapter(repoRoot); await adapter.postUpdate({ title: 'Hello', body: 'World' }); diff --git a/docs/proposals/squad-2.0-security-and-isolation.md b/docs/proposals/squad-2.0-security-and-isolation.md index 3af420d8d..8ccc459ff 100644 --- a/docs/proposals/squad-2.0-security-and-isolation.md +++ b/docs/proposals/squad-2.0-security-and-isolation.md @@ -1,7 +1,7 @@ # Squad 2.0 — Security, Threat Model & Isolation **Status:** Proposal, partially implemented · **Owner:** Worf (Security & Reliability) · **Scope:** Client/Backend decoupling and multi-client projections (Claude Code, Kiro, OpenCode, Cursor, GitHub Copilot, OpenAI Codex, Google Antigravity) plus the `DurableSquad` remote backend. -**Contract suite:** `test/squad-20-security-contracts.test.ts` exercises the shipped product modules (`@bradygaster/squad-sdk/backend`, `@bradygaster/squad-sdk/client`, `squad-cli/core/backend-mcp`) for every property marked **Implemented** below. Properties marked **Not implemented** have no test on purpose; they are design intent, not shipped behavior. +**Contract suite:** `test/squad-20-security-contracts.test.ts` exercises the shipped product modules (`@squad/sdk/backend`, `@squad/sdk/client`, `squad-cli/core/backend-mcp`) for every property marked **Implemented** below. Properties marked **Not implemented** have no test on purpose; they are design intent, not shipped behavior. ## 1. Trust model diff --git a/docs/specification/README.md b/docs/specification/README.md index f4a01395b..266967d84 100644 --- a/docs/specification/README.md +++ b/docs/specification/README.md @@ -84,7 +84,7 @@ deviations are summarized here and expanded in the | `squad-automation/v0.1` | `requirements-draft` / requirements | Core, Interop, Coordination | None | None | Local and GitHub schedulers exist | Time, retry, and drift evidence differ | [Automation](automation-v0.1.md) | | `squad-state-memory-requirements/v0.1` | `informative-draft` / informative | Core, Interop | None | None | Several state and memory providers exist | No common authority, recovery, or privacy corpus | [State authority, then memory classification](state-memory-requirements-v0.1.md) | | `squad-portable-bundle/v1.0` | `informative-draft` / observed implementation surface | Core and Interop rules apply conceptually | None | Tested JSON shape; no published schema or manifest | `squad export` and `squad import` round-trip team, routing, decisions, casting, agents, and skills | Bundle `1.0` does not use Core profile grammar; histories, decisions, skills, and casting policy can contain sensitive data | [Coverage and promotion requirements](artifact-inventory.md#portable-export-and-import-bundle) | -| `squad-client-backend-decoupling/v0.2` | `requirements-draft` / requirements | Core, Interop, Coordination, State/Memory Requirements | None | None | Experimental `@bradygaster/squad-sdk/backend` (`LocalSquadBackend`, `DurableHttpSquadBackend`) and the `squad state-mcp --experimental-backend` bridge; no execution harness ships | Opaque harness-supplied approval hashes, client-asserted epochs, unsigned cursors, whole-file JSON snapshots | [Client/backend decoupling](client-backend-decoupling-v0.2.md) | +| `squad-client-backend-decoupling/v0.2` | `requirements-draft` / requirements | Core, Interop, Coordination, State/Memory Requirements | None | None | Experimental `@squad/sdk/backend` (`LocalSquadBackend`, `DurableHttpSquadBackend`) and the `squad state-mcp --experimental-backend` bridge; no execution harness ships | Opaque harness-supplied approval hashes, client-asserted epochs, unsigned cursors, whole-file JSON snapshots | [Client/backend decoupling](client-backend-decoupling-v0.2.md) | | `squad-client-harness-adapters/v0.2` | `requirements-draft` / requirements | Core, Interop, Client/Backend Decoupling | None | None | Seven host projections and the `HarnessAdapter` SPI exist in the SDK; no `HarnessAdapter` implementation ships | Host discovery, approvals, and background execution differ | [Client/harness adapters](client-harness-adapters-v0.2.md) | The machine-readable registry is diff --git a/docs/specification/adr-002-work-claims-and-external-queues.md b/docs/specification/adr-002-work-claims-and-external-queues.md index a241139b2..754a3020e 100644 --- a/docs/specification/adr-002-work-claims-and-external-queues.md +++ b/docs/specification/adr-002-work-claims-and-external-queues.md @@ -188,7 +188,7 @@ gate G7. ### Contract The SDK module is `packages/squad-sdk/src/ralph/claims.ts`, exported as -`@bradygaster/squad-sdk/ralph/claims`. The Git provider is `GitRefClaimProvider` +`@squad/sdk/ralph/claims`. The Git provider is `GitRefClaimProvider` in `ralph/claims-git.ts`, with an injectable `GitTransport` and clock. Watch receives the provider through `WatchContext.claims` and the identity through `WatchContext.executor`; `PlatformAdapter` is unchanged. diff --git a/docs/specification/charter-v0.1.md b/docs/specification/charter-v0.1.md index 3ca95292f..3e6f62d1d 100644 --- a/docs/specification/charter-v0.1.md +++ b/docs/specification/charter-v0.1.md @@ -416,7 +416,7 @@ import { parseCharterMarkdown, serializeCharter, validateCharterConformance, -} from '@bradygaster/squad-sdk/parsers'; +} from '@squad/sdk/parsers'; const validation = validateCharterConformance(markdown, { profile: 'squad-charter/v0.1', diff --git a/docs/specification/client-backend-decoupling-v0.2.md b/docs/specification/client-backend-decoupling-v0.2.md index 22af1c6a8..f05badbb4 100644 --- a/docs/specification/client-backend-decoupling-v0.2.md +++ b/docs/specification/client-backend-decoupling-v0.2.md @@ -11,7 +11,7 @@ **Claimable capabilities:** None **Implementation status:** The contract in this draft is implemented as the -experimental `@bradygaster/squad-sdk/backend` subpath (`LocalSquadBackend`, +experimental `@squad/sdk/backend` subpath (`LocalSquadBackend`, `DurableHttpSquadBackend`, `DefaultHarnessRegistry`) and bridged over MCP by `squad state-mcp --experimental-backend`. Two execution harnesses ship: `claude-agent-sdk` (`ClaudeAgentSdkHarness`), registered by the MCP bridge by @@ -98,7 +98,7 @@ portable conversation protocol. The broker contract lives in one SDK module, `packages/squad-sdk/src/backend/types.ts`, exported from -`@bradygaster/squad-sdk/backend` (stage: `experimental`). That file is the +`@squad/sdk/backend` (stage: `experimental`). That file is the source of truth; the excerpts below are copied from it and trimmed to the members a client author needs. diff --git a/docs/specification/client-harness-adapters-v0.2.md b/docs/specification/client-harness-adapters-v0.2.md index ce2ef8b77..d60dbf40f 100644 --- a/docs/specification/client-harness-adapters-v0.2.md +++ b/docs/specification/client-harness-adapters-v0.2.md @@ -159,7 +159,7 @@ export interface ClientAdapter { The `HarnessAdapter` SPI is defined in `packages/squad-sdk/src/backend/types.ts` and exported from -`@bradygaster/squad-sdk/backend`; the broker (`LocalSquadBackend`) calls it +`@squad/sdk/backend`; the broker (`LocalSquadBackend`) calls it through a `HarnessRegistry`. Copied from the source of truth: ```ts @@ -549,8 +549,8 @@ It contains: - `scripts/squad.mjs`, a launcher every entry above runs through, and `bin/squad`, which puts `squad` on the Bash tool's PATH. The launcher runs, in order: `SQUAD_CLI`; the project's - `node_modules/@bradygaster/squad-cli`; a `squad` on PATH outside the - plugin; `npx -y @bradygaster/squad-cli@`. + `node_modules/@squad/cli`; a `squad` on PATH outside the + plugin; `npx -y @squad/cli@`. The plugin carries no `settings.json`, so installing it at user scope does not change the main agent of other repositories. A repository opts in with @@ -740,12 +740,12 @@ module and keep host projections in one sibling folder per host family. | Concern | Canonical TypeScript path | |---|---| -| backend conversation contracts (experimental) | `packages/squad-sdk/src/backend/` (`@bradygaster/squad-sdk/backend`) | +| backend conversation contracts (experimental) | `packages/squad-sdk/src/backend/` (`@squad/sdk/backend`) | | client and harness adapter SPI | `packages/squad-sdk/src/client/adapter-contract.ts` | | host projection implementations | `packages/squad-sdk/src/client/adapters/` | | execution harness implementations (experimental) | `packages/squad-sdk/src/backend/harnesses/` | -| public client exports | `packages/squad-sdk/src/client/index.ts` (`@bradygaster/squad-sdk/client`) | -| deprecated alias | `@bradygaster/squad-sdk/clients` via `src/clients/index.ts` | +| public client exports | `packages/squad-sdk/src/client/index.ts` (`@squad/sdk/client`) | +| deprecated alias | `@squad/sdk/clients` via `src/clients/index.ts` | This profile fixes the contract locations so backend work, client work, and contract validation can proceed in parallel without rediscovering file layout. diff --git a/docs/src/components/Footer.astro b/docs/src/components/Footer.astro index 6471db835..9e4a25549 100644 --- a/docs/src/components/Footer.astro +++ b/docs/src/components/Footer.astro @@ -25,8 +25,8 @@ const columns = [ { title: 'Resources', links: [ - { label: 'npm — squad-cli', href: 'https://www.npmjs.com/package/@bradygaster/squad-cli', external: true }, - { label: 'npm — squad-sdk', href: 'https://www.npmjs.com/package/@bradygaster/squad-sdk', external: true }, + { label: 'npm — squad-cli', href: 'https://www.npmjs.com/package/@squad/cli', external: true }, + { label: 'npm — squad-sdk', href: 'https://www.npmjs.com/package/@squad/sdk', external: true }, { label: 'GitHub', href: 'https://github.com/github/squad', external: true }, { label: "What's New", href: `${base}docs/whatsnew/` }, ], diff --git a/docs/src/content/docs/concepts/squad-2-0-architecture.md b/docs/src/content/docs/concepts/squad-2-0-architecture.md index 9dca4b297..779ec5425 100644 --- a/docs/src/content/docs/concepts/squad-2-0-architecture.md +++ b/docs/src/content/docs/concepts/squad-2-0-architecture.md @@ -21,13 +21,13 @@ Squad 2.0 separates three concerns that were coupled in Squad 1.x: ```mermaid flowchart LR - subgraph CP[Client Plane\n@bradygaster/squad-sdk/client] + subgraph CP[Client Plane\n@squad/sdk/client] c1[HostProjection workspace files] c2[ClientCapabilities tokens] c3[ClientAdapter + coordinator dispatch] end - subgraph BP[Control / Broker Plane\n@bradygaster/squad-sdk/backend] + subgraph BP[Control / Broker Plane\n@squad/sdk/backend] b1[SquadBackend / IConversationBackend] b2[BackendEnvelope + monotonic seq] b3[Cursor resume + approvals + cancelRun] @@ -42,9 +42,9 @@ flowchart LR CP --> BP --> EP ``` -### Plane 1: Client Plane (`@bradygaster/squad-sdk/client`) +### Plane 1: Client Plane (`@squad/sdk/client`) -The client plane lives in `@bradygaster/squad-sdk/client` (with `@bradygaster/squad-sdk/clients` kept as a deprecated alias). It owns host bootstrap, workspace file projection (`HostProjection`), capability declaration, and coordinator dispatch translation — never durable sequencing or authorization. +The client plane lives in `@squad/sdk/client` (with `@squad/sdk/clients` kept as a deprecated alias). It owns host bootstrap, workspace file projection (`HostProjection`), capability declaration, and coordinator dispatch translation — never durable sequencing or authorization. | Host (`ClientId`) | Generated workspace projection | Coordinator dispatch primitive | |---|---|---| @@ -58,7 +58,7 @@ The client plane lives in `@bradygaster/squad-sdk/client` (with `@bradygaster/sq #### Host capability matrix (`CAPABILITY_TOKENS_BY_HOST`) -Each host adapter declares canonical capability tokens (`@bradygaster/squad-sdk/client`). Runtime capabilities are negotiated at the broker boundary via `effectiveCapabilities = clientCapabilities ∩ backendCapabilities ∩ policyCapabilities`: +Each host adapter declares canonical capability tokens (`@squad/sdk/client`). Runtime capabilities are negotiated at the broker boundary via `effectiveCapabilities = clientCapabilities ∩ backendCapabilities ∩ policyCapabilities`: | Host (`ClientId`) | Runtime capability tokens (`capability-matrix.json`) | Projection tokens | Transport modes | |---|---|---|---| @@ -72,11 +72,11 @@ Each host adapter declares canonical capability tokens (`@bradygaster/squad-sdk/ The adapter profile also defines the normalized `projectWorkspace()` view so hosts describe their root, working directory, anchor file, and MCP config consistently, while `.squad/config.json` persists only canonical portable client slugs in `clients[]`. -### Plane 2: Control / Broker Plane (`@bradygaster/squad-sdk/backend`) +### Plane 2: Control / Broker Plane (`@squad/sdk/backend`) -> **Experimental Preview — Bring Your Own Server:** `@bradygaster/squad-sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. +> **Experimental Preview — Bring Your Own Server:** `@squad/sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. -The control plane lives in `@bradygaster/squad-sdk/backend` and owns conversation truth through `SquadBackend` / `IConversationBackend`: +The control plane lives in `@squad/sdk/backend` and owns conversation truth through `SquadBackend` / `IConversationBackend`: - **Durable ordered event log (`BackendEnvelope`)** with per-conversation monotonic `seq` and `(runId, seq)` idempotency; - **Stable `runId`** independent from turn `seq`, used for `cancelRun(conversationId, runId, reason?)`; @@ -89,7 +89,7 @@ In `squad state-mcp`, the 11 `squad_backend_*` MCP conversation tools are **opt- ### Plane 3: Execution Plane (`HarnessAdapter` SPI) -The execution plane is the experimental `HarnessAdapter` SPI in `@bradygaster/squad-sdk/backend` (`submit`, `subscribe`, `cancel`, `respondApproval`, `describe`, registered via `DefaultHarnessRegistry`). +The execution plane is the experimental `HarnessAdapter` SPI in `@squad/sdk/backend` (`submit`, `subscribe`, `cancel`, `respondApproval`, `describe`, registered via `DefaultHarnessRegistry`). Harnesses translate broker turns into concrete runtime work while the broker enforces: @@ -151,7 +151,7 @@ GitHub Copilot, Claude Code, Kiro, OpenCode, Cursor, OpenAI Codex, and Google An ## Current scope and known limitations - **Default `squad init` / `squad upgrade` is unchanged for Copilot-only repos:** non-Copilot projections and `.gitignore` lines (`.claude/worktrees/`, `NUL`) are strictly opt-in via `--client`. -- **Experimental `/backend` contract:** `@bradygaster/squad-sdk/backend` is exported only from the `./backend` subpath (`BACKEND_CONTRACT_STAGE = 'experimental'`). Server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. +- **Experimental `/backend` contract:** `@squad/sdk/backend` is exported only from the `./backend` subpath (`BACKEND_CONTRACT_STAGE = 'experimental'`). Server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. - **Cooperative epochs and unsigned cursors:** in the local and HTTP client implementation, lease epochs (`X-Lease-Epoch`) are cooperative fencing tokens for ordering/takeover hygiene rather than a cryptographic security boundary, and resume cursors are opaque base64url positions. - **MCP bridge is transcript/event-log only by default:** `squad state-mcp` exposes the 11 `squad_backend_*` tools only when `--experimental-backend` or `SQUAD_EXPERIMENTAL_BACKEND=1` is passed, and bundles no execution `HarnessAdapter` (`executionAvailable: false`; `squad_backend_send_message` returns `unavailable` until a harness is registered). diff --git a/docs/src/content/docs/features/built-in-roles.md b/docs/src/content/docs/features/built-in-roles.md index 6723078af..3f5f63817 100644 --- a/docs/src/content/docs/features/built-in-roles.md +++ b/docs/src/content/docs/features/built-in-roles.md @@ -65,7 +65,7 @@ Look right? [Yes] [Add someone] [Change a role] [Browse all roles] ### In squad.config.ts (SDK Mode) ```typescript -import { useRole, defineSquad } from '@bradygaster/squad-sdk'; +import { useRole, defineSquad } from '@squad/sdk'; export default defineSquad({ agents: [ diff --git a/docs/src/content/docs/features/claude-code-plugin.md b/docs/src/content/docs/features/claude-code-plugin.md index 2231bc416..8d402efd4 100644 --- a/docs/src/content/docs/features/claude-code-plugin.md +++ b/docs/src/content/docs/features/claude-code-plugin.md @@ -3,7 +3,7 @@ Squad ships as a Claude Code plugin. The plugin carries the coordinator, the `squad_state` MCP server, Squad's skills, its slash commands and its governance hooks, so a repository only needs its own team: the member subagents, the `CLAUDE.md` block and two settings. ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli claude plugin marketplace add github/squad claude plugin install squad@squad --scope project squad init --client claude --claude-plugin @@ -53,9 +53,9 @@ The dashboard shuts down after five minutes without transcript activity or a con | Skills | The coordinator's on-demand skills and Squad's template skills, as `/squad:` | | Slash commands | `/squad:ralph`, `/squad:cast`, `/squad:ceremony`, `/squad:status`, `/squad:dashboard` | | Hooks | Squad's advisory governance hooks; they act only when `.squad/config.json` has `"claudeHooks": "advisory"` | -| Squad CLI launcher | The plugin's slash commands, hooks and MCP server run the Squad CLI through the plugin's own launcher. It uses, in order: `SQUAD_CLI`, the project's `node_modules/@bradygaster/squad-cli`, or a `squad` on PATH. It skips a project or PATH install older than the plugin, since an older CLI lacks commands the plugin calls. With no suitable CLI it fails and says how to install one. It downloads and runs the CLI version the plugin was built with through `npx` only when you set `SQUAD_ALLOW_NPX=1`, in your shell or in the `env` block of Claude Code's settings | +| Squad CLI launcher | The plugin's slash commands, hooks and MCP server run the Squad CLI through the plugin's own launcher. It uses, in order: `SQUAD_CLI`, the project's `node_modules/@squad/cli`, or a `squad` on PATH. It skips a project or PATH install older than the plugin, since an older CLI lacks commands the plugin calls. With no suitable CLI it fails and says how to install one. It downloads and runs the CLI version the plugin was built with through `npx` only when you set `SQUAD_ALLOW_NPX=1`, in your shell or in the `env` block of Claude Code's settings | -Claude Code also puts the launcher on the Bash tool's PATH as `squad`, but after your own PATH entries: if you have an older global `squad`, a plain `squad` in Bash runs that one. Update it with `npm install -g @bradygaster/squad-cli`. +Claude Code also puts the launcher on the Bash tool's PATH as `squad`, but after your own PATH entries: if you have an older global `squad`, a plain `squad` in Bash runs that one. Update it with `npm install -g @squad/cli`. Plugin updates arrive through `claude plugin update squad@squad` (or Claude Code's automatic marketplace updates); the per-repository files follow `squad upgrade` as before. diff --git a/docs/src/content/docs/features/coordinator-as-agent-export.md b/docs/src/content/docs/features/coordinator-as-agent-export.md index b8016aca0..6855a4ed5 100644 --- a/docs/src/content/docs/features/coordinator-as-agent-export.md +++ b/docs/src/content/docs/features/coordinator-as-agent-export.md @@ -180,7 +180,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: '22' } - - run: npm install -g @bradygaster/squad-cli + - run: npm install -g @squad/cli - run: squad export agent --check ``` @@ -223,7 +223,7 @@ The export pipeline lives at `packages/squad-sdk/src/repo-native/`: 3. **Frontmatter renderer** — emits valid custom-agent YAML 4. **File writer** — handles safety checks and atomic write -You can use the SDK module directly if you want to embed coordinator export into your own tooling — see `@bradygaster/squad-sdk/repo-native`. +You can use the SDK module directly if you want to embed coordinator export into your own tooling — see `@squad/sdk/repo-native`. --- diff --git a/docs/src/content/docs/features/cost-tracking.md b/docs/src/content/docs/features/cost-tracking.md index cd47baf1a..888dc16c9 100644 --- a/docs/src/content/docs/features/cost-tracking.md +++ b/docs/src/content/docs/features/cost-tracking.md @@ -59,7 +59,7 @@ The current session is the Squad session of the newest record in the ledger. If ## Budget Configuration ```typescript -import { defineSquad, defineAgent, defineBudget } from '@bradygaster/squad-sdk'; +import { defineSquad, defineAgent, defineBudget } from '@squad/sdk'; export default defineSquad({ defaults: { diff --git a/docs/src/content/docs/features/dual-mode-deployment.md b/docs/src/content/docs/features/dual-mode-deployment.md index 41e133156..6c4db44c6 100644 --- a/docs/src/content/docs/features/dual-mode-deployment.md +++ b/docs/src/content/docs/features/dual-mode-deployment.md @@ -69,14 +69,14 @@ The first manifest that exists is loaded; the search stops there (no merging). I ## SDK programmatic access -The new exports from `@bradygaster/squad-sdk/ralph/capabilities`: +The new exports from `@squad/sdk/ralph/capabilities`: ```typescript import { getDeploymentMode, getPodId, type DeploymentMode, -} from '@bradygaster/squad-sdk/ralph/capabilities'; +} from '@squad/sdk/ralph/capabilities'; const mode: DeploymentMode = getDeploymentMode(); // 'agent-per-node' | 'squad-per-pod' const podId: string | undefined = getPodId(); // e.g. 'worker-1', or undefined diff --git a/docs/src/content/docs/features/mcp-frontmatter.md b/docs/src/content/docs/features/mcp-frontmatter.md index 08ba66e6d..f9d1c84e2 100644 --- a/docs/src/content/docs/features/mcp-frontmatter.md +++ b/docs/src/content/docs/features/mcp-frontmatter.md @@ -51,7 +51,7 @@ And `.copilot/mcp-config.json` separately contains: "mcpServers": { "squad_state": { "command": "npx", - "args": ["-y", "@bradygaster/squad-cli@latest", "state-mcp"], + "args": ["-y", "@squad/cli@latest", "state-mcp"], "tools": ["*"] } } @@ -69,7 +69,7 @@ tools: ["*"] mcpServers: squad_state: command: npx - args: ["-y", "@bradygaster/squad-cli@latest", "state-mcp"] + args: ["-y", "@squad/cli@latest", "state-mcp"] tools: ["*"] --- ``` diff --git a/docs/src/content/docs/features/scratch-dir.md b/docs/src/content/docs/features/scratch-dir.md index cf6dbca32..1a821c0ed 100644 --- a/docs/src/content/docs/features/scratch-dir.md +++ b/docs/src/content/docs/features/scratch-dir.md @@ -7,7 +7,7 @@ ls .squad/.scratch/ **Try this to create a scratch file:** ```typescript -import { scratchFile } from '@bradygaster/squad-sdk'; +import { scratchFile } from '@squad/sdk'; const promptPath = scratchFile(squadRoot, 'coordinator-prompt', '.txt', promptContent); ``` @@ -39,7 +39,7 @@ This polluted the working directory and risked accidental commits. Scratch dir s Resolves and creates the scratch directory. ```typescript -import { scratchDir } from '@bradygaster/squad-sdk'; +import { scratchDir } from '@squad/sdk'; const scratchPath = scratchDir('/path/to/repo'); // Returns: /path/to/repo/.squad/.scratch @@ -58,7 +58,7 @@ const scratchPath = scratchDir('/path/to/repo'); Creates a named temp file in scratch dir. ```typescript -import { scratchFile } from '@bradygaster/squad-sdk'; +import { scratchFile } from '@squad/sdk'; const promptPath = scratchFile( '/path/to/repo', diff --git a/docs/src/content/docs/features/security-hardening.md b/docs/src/content/docs/features/security-hardening.md index 8f077331b..244fe182c 100644 --- a/docs/src/content/docs/features/security-hardening.md +++ b/docs/src/content/docs/features/security-hardening.md @@ -282,7 +282,7 @@ See [Agent Framework Integration](/squad/docs/guide/agent-framework-integration/ Squad's `HookPipeline` intercepts tool calls before and after execution. Use pre-hooks to enforce security policy at the tool layer, independent of the agent's prompt instructions — hooks are code; prompts can be ignored. ```typescript -import { HookPipeline, PreToolUseHook, PreToolUseContext, PreToolUseResult } from '@bradygaster/squad-sdk'; +import { HookPipeline, PreToolUseHook, PreToolUseContext, PreToolUseResult } from '@squad/sdk'; // Block writes outside .squad/ // PreToolUseHook signature: (ctx: PreToolUseContext) => PreToolUseResult | Promise diff --git a/docs/src/content/docs/features/self-upgrade.md b/docs/src/content/docs/features/self-upgrade.md index 541b63477..6a516aeb3 100644 --- a/docs/src/content/docs/features/self-upgrade.md +++ b/docs/src/content/docs/features/self-upgrade.md @@ -26,7 +26,7 @@ Squad can upgrade itself to the latest release on its own channel, then you refr 1. **Detects package manager** — auto-detects npm, pnpm, or yarn 2. **Picks the channel** — a prerelease install follows `@insider`, a stable install follows `@latest`; `--insider` forces `@insider` 3. **Guards against downgrades** — the dist-tag is resolved first; if it points at a version older than the one you run, the upgrade is refused unless you pass `--force` -4. **Upgrades package** — runs `npm install -g @bradygaster/squad-cli@` (or pnpm/yarn equivalent) +4. **Upgrades package** — runs `npm install -g @squad/cli@` (or pnpm/yarn equivalent) **Preview first:** @@ -38,7 +38,7 @@ prints the exact command and installs nothing: ``` Dry run — would self-upgrade via npm (insider → 2.0.0-preview.2): - npm install -g @bradygaster/squad-cli@insider + npm install -g @squad/cli@insider Nothing was installed. Run without --dry-run to apply. ``` diff --git a/docs/src/content/docs/features/standalone-install.md b/docs/src/content/docs/features/standalone-install.md index eb5c6b9b1..b3ecb7dd2 100644 --- a/docs/src/content/docs/features/standalone-install.md +++ b/docs/src/content/docs/features/standalone-install.md @@ -9,7 +9,7 @@ CI runners behind a corporate firewall, locked-down build agents, and air-gapped mirrors. It is also simply a faster install for anyone who does not otherwise have a Node toolchain. -`npm install -g @bradygaster/squad-cli` remains fully supported. All install +`npm install -g @squad/cli` remains fully supported. All install methods provide the same Squad CLI; choose based on your platform and whether your environment can reach the npm registry. diff --git a/docs/src/content/docs/features/state-backends.md b/docs/src/content/docs/features/state-backends.md index aab042c83..ee753af35 100644 --- a/docs/src/content/docs/features/state-backends.md +++ b/docs/src/content/docs/features/state-backends.md @@ -145,7 +145,7 @@ import { resolveSquadState, resolveStateBackend, type StateBackend, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; // Option 1: Full context resolution (recommended) // Resolves paths + backend from config + CLI override in one call const ctx = resolveSquadState(process.cwd(), 'two-layer'); @@ -216,7 +216,7 @@ Neither error is success-shaped. A conflict or uncertainty always surfaces as a import { StateKeyConflictError, StateBackendUncertaintyError, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; try { backend.createIfAbsent('sessions/retro-2024-12.md', '# Retro\n'); @@ -293,7 +293,7 @@ The check-then-write pattern above has a TOCTOU race; `createIfAbsent` closes it `createIfAbsent` and the `squad_state_create_if_absent` MCP tool ship in the first release containing this changeset. Consumers must upgrade both -`@bradygaster/squad-sdk` and `@bradygaster/squad-cli` to that release, add +`@squad/sdk` and `@squad/cli` to that release, add `squad_state_create_if_absent` to their MCP tool allowlist, and restart the state MCP server before the tool appears in `tools/list`. diff --git a/docs/src/content/docs/features/storage-provider.md b/docs/src/content/docs/features/storage-provider.md index 3a3dc4721..79c05ee5f 100644 --- a/docs/src/content/docs/features/storage-provider.md +++ b/docs/src/content/docs/features/storage-provider.md @@ -104,7 +104,7 @@ See [State Backends → Atomic Create-if-Absent](/features/state-backends/#atomi Implement the `StorageProvider` interface to plug in any backend. Here's a skeleton: ```typescript -import type { StorageProvider, StorageStats } from '@bradygaster/squad-sdk'; +import type { StorageProvider, StorageStats } from '@squad/sdk'; export class MyCustomStorageProvider implements StorageProvider { async read(filePath: string): Promise { @@ -186,7 +186,7 @@ export class MyCustomStorageProvider implements StorageProvider { Pass it to the runtime: ```typescript -import { SquadClient } from '@bradygaster/squad-sdk'; +import { SquadClient } from '@squad/sdk'; const client = new SquadClient({ storageProvider: new MyCustomStorageProvider(), diff --git a/docs/src/content/docs/features/teams-comms.md b/docs/src/content/docs/features/teams-comms.md index 025f7c15e..31e6ff0ac 100644 --- a/docs/src/content/docs/features/teams-comms.md +++ b/docs/src/content/docs/features/teams-comms.md @@ -5,7 +5,7 @@ description: Bidirectional chat integration between Squad and Microsoft Teams vi # Microsoft Teams Comms Adapter -The Teams adapter lets your squad post updates and read replies through Microsoft Teams, alongside the existing file-based, email, and other comm channels. It ships in `@bradygaster/squad-sdk` as a `CommunicationAdapter` implementation and uses Microsoft Graph API for both 1:1 chats and channel messaging. +The Teams adapter lets your squad post updates and read replies through Microsoft Teams, alongside the existing file-based, email, and other comm channels. It ships in `@squad/sdk` as a `CommunicationAdapter` implementation and uses Microsoft Graph API for both 1:1 chats and channel messaging. > **⚠️ Breaking change in v0.10:** `createCommunicationAdapter` is now async (returns `Promise`). Callers must `await` the result. @@ -78,7 +78,7 @@ The `redirectUri` is the local-only OAuth callback for browser PKCE — it never ## Usage from the SDK ```typescript -import { createCommunicationAdapter } from '@bradygaster/squad-sdk/platform'; +import { createCommunicationAdapter } from '@squad/sdk/platform'; // IMPORTANT: this is async now (breaking change in v0.10) const teams = await createCommunicationAdapter({ channel: 'teams' }); diff --git a/docs/src/content/docs/features/upstream-inheritance.md b/docs/src/content/docs/features/upstream-inheritance.md index 73c7ea308..e31dbf026 100644 --- a/docs/src/content/docs/features/upstream-inheritance.md +++ b/docs/src/content/docs/features/upstream-inheritance.md @@ -302,7 +302,7 @@ Read and parse `upstream.json` from a squad directory. **Example:** ```typescript -import { readUpstreamConfig } from '@bradygaster/squad-sdk'; +import { readUpstreamConfig } from '@squad/sdk'; const config = readUpstreamConfig('.squad'); if (config) { @@ -325,7 +325,7 @@ For each upstream: **Example:** ```typescript -import { resolveUpstreams } from '@bradygaster/squad-sdk'; +import { resolveUpstreams } from '@squad/sdk'; const resolution = resolveUpstreams('.squad'); if (resolution) { diff --git a/docs/src/content/docs/features/vscode.md b/docs/src/content/docs/features/vscode.md index 40c589a2e..d6d623f3e 100644 --- a/docs/src/content/docs/features/vscode.md +++ b/docs/src/content/docs/features/vscode.md @@ -24,7 +24,7 @@ Install the CLI with any method in the [Installation guide](../get-started/installation.md). For example, with npm: ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` Creates `.github/agents/squad.agent.md` and `.squad/templates/`. Then open VS Code and select **Squad** from the agent picker. @@ -165,8 +165,8 @@ if (!isVSCodeMode) { **DO:** Import specific types and functions ```typescript -import type { CastMember, AgentCharter } from '@bradygaster/squad-sdk'; -import { loadConfig, resolveSquad } from '@bradygaster/squad-sdk'; +import type { CastMember, AgentCharter } from '@squad/sdk'; +import { loadConfig, resolveSquad } from '@squad/sdk'; ``` **DON'T:** Import the CLI entry point — this will call `process.exit()` and crash your extension. @@ -174,7 +174,7 @@ import { loadConfig, resolveSquad } from '@bradygaster/squad-sdk'; ### Load Configuration ```typescript -import { loadConfig, resolveSquad } from '@bradygaster/squad-sdk'; +import { loadConfig, resolveSquad } from '@squad/sdk'; try { const squadPath = resolveSquad(workspaceRoot); @@ -189,7 +189,7 @@ try { ### Spawn Agents ```typescript -import { SquadCoordinator } from '@bradygaster/squad-sdk'; +import { SquadCoordinator } from '@squad/sdk'; const coordinator = new SquadCoordinator({ teamRoot: squadPath }); await coordinator.initialize(); @@ -201,7 +201,7 @@ await coordinator.execute(decision, 'refactor this function'); ### Stream Responses ```typescript -import { startStreaming } from '@bradygaster/squad-sdk'; +import { startStreaming } from '@squad/sdk'; const stream = await startStreaming(agentResponse); for await (const chunk of stream) { diff --git a/docs/src/content/docs/get-started/choose-your-interface.md b/docs/src/content/docs/get-started/choose-your-interface.md index 6ab6cd55f..b7e58ae07 100644 --- a/docs/src/content/docs/get-started/choose-your-interface.md +++ b/docs/src/content/docs/get-started/choose-your-interface.md @@ -35,13 +35,13 @@ squad watch squad aspire ``` See [CLI Reference](../reference/cli.md) for all commands. -### SDK (`@bradygaster/squad-sdk`) +### SDK (`@squad/sdk`) Programmatic access for building tools on top of Squad. Typed APIs, routing config, agent lifecycle hooks. ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` ```typescript -import { resolveSquad, loadConfig, SquadCoordinator } from '@bradygaster/squad-sdk'; +import { resolveSquad, loadConfig, SquadCoordinator } from '@squad/sdk'; ``` See [SDK Reference](../reference/sdk.md) for the complete API. ### Copilot Coding Agent (`@copilot`) diff --git a/docs/src/content/docs/get-started/choosing-your-path.md b/docs/src/content/docs/get-started/choosing-your-path.md index 5793bde05..23c3ab581 100644 --- a/docs/src/content/docs/get-started/choosing-your-path.md +++ b/docs/src/content/docs/get-started/choosing-your-path.md @@ -11,7 +11,7 @@ CLI, Copilot agent, or SDK? Pick the right mode for your workflow. Install Squad globally or per-project, then use terminal commands to initialize, route work, and manage your team. ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init squad status squad watch @@ -41,11 +41,11 @@ Squad: Hey Brady, what are you building? Write TypeScript code that spawns agents, routes work, and coordinates teams programmatically. Full access to Squad's internals. ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` ```typescript -import { Coordinator } from '@bradygaster/squad-sdk'; +import { Coordinator } from '@squad/sdk'; const coordinator = new Coordinator(); const result = await coordinator.route('Build a login page'); diff --git a/docs/src/content/docs/get-started/installation.md b/docs/src/content/docs/get-started/installation.md index 2f3d3f4da..85e90274b 100644 --- a/docs/src/content/docs/get-started/installation.md +++ b/docs/src/content/docs/get-started/installation.md @@ -26,13 +26,15 @@ Choose one method for your platform. Use npm when Node.js 22.5 or later is already available: ```bash -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest ``` +Upgrading from the old `@bradygaster/squad-cli` package? Remove it first with `npm uninstall -g @bradygaster/squad-cli`; both packages provide the `squad` command. See [Package Rename](../package-rename/). + To test an on-demand prerelease from `dev`: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` ### macOS or Linux install script @@ -145,11 +147,11 @@ from `.squad/`. The SDK is a Node.js project dependency for building tools on top of Squad: ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` ```typescript -import { defineConfig, loadConfig, resolveSquad } from '@bradygaster/squad-sdk'; +import { defineConfig, loadConfig, resolveSquad } from '@squad/sdk'; ``` See the [SDK Reference](../reference/sdk.md) for the typed configuration, @@ -161,9 +163,9 @@ Update the CLI through the same channel used to install it: | Installed with | Update command | |----------------|----------------| -| npm | `npm install -g @bradygaster/squad-cli@latest` | -| npm preview | `npm install -g @bradygaster/squad-cli@preview` | -| npm insider | `npm install -g @bradygaster/squad-cli@insider` | +| npm | `npm install -g @squad/cli@latest` | +| npm preview | `npm install -g @squad/cli@preview` | +| npm insider | `npm install -g @squad/cli@insider` | | Homebrew | `brew upgrade --cask squad` | | Homebrew preview | `brew upgrade --cask squad-preview` | | Homebrew insider | `brew upgrade --cask squad-insider` | @@ -185,7 +187,7 @@ squad doctor If you use the SDK, update it separately: ```bash -npm install @bradygaster/squad-sdk@latest +npm install @squad/sdk@latest ``` ## Troubleshooting @@ -211,7 +213,7 @@ current directory and its parents; it never falls back to a user-profile directo Update the CLI using its installation channel, then update the SDK: ```bash -npm install @bradygaster/squad-sdk@latest +npm install @squad/sdk@latest ``` ## Next step diff --git a/docs/src/content/docs/get-started/migration.md b/docs/src/content/docs/get-started/migration.md index f6c2b0966..028686397 100644 --- a/docs/src/content/docs/get-started/migration.md +++ b/docs/src/content/docs/get-started/migration.md @@ -24,8 +24,8 @@ | Before | After | |--------|-------| -| `npx github:bradygaster/squad` | `npm install -g @bradygaster/squad-cli` | -| `@bradygaster/create-squad` | `@bradygaster/squad-cli` | +| `npx github:bradygaster/squad` | `npm install -g @squad/cli` | +| `@bradygaster/create-squad` | `@squad/cli` | | `.ai-team/` directory | `.squad/` directory | | v0.5.4 (beta) | v2.0.0 (stable) | @@ -33,16 +33,16 @@ ## Upgrading from v1.x to v2.0 -If you are already on Squad v1.x (`@bradygaster/squad-cli` and `@bradygaster/squad-sdk`), upgrading to v2.0 requires no reinitialization: +If you are already on Squad v1.x (`@squad/cli` and `@squad/sdk`), upgrading to v2.0 requires no reinitialization: ```bash -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest squad upgrade ``` - **Copilot-only projects:** `squad upgrade` without `--client` updates `.github/agents/squad.agent.md` and templates in place without creating files for other AI hosts. -- **Multi-host projections:** Pass `--client claude,kiro,opencode,cursor,codex,antigravity` (or `--client all`) to `squad init` or `squad upgrade` to project your team across all 7 supported hosts; use `uninstallClients()` from `@bradygaster/squad-sdk/client` for byte-preserving rollback. -- **SDK imports:** `@bradygaster/squad-sdk/client` is the canonical subpath for client and host-adapter APIs (`@bradygaster/squad-sdk/clients` is retained as a deprecated alias). Experimental backend APIs live under `@bradygaster/squad-sdk/backend`. +- **Multi-host projections:** Pass `--client claude,kiro,opencode,cursor,codex,antigravity` (or `--client all`) to `squad init` or `squad upgrade` to project your team across all 7 supported hosts; use `uninstallClients()` from `@squad/sdk/client` for byte-preserving rollback. +- **SDK imports:** `@squad/sdk/client` is the canonical subpath for client and host-adapter APIs (`@squad/sdk/clients` is retained as a deprecated alias). Experimental backend APIs live under `@squad/sdk/backend`. - **Full details:** See [Upgrading to Squad 2.0](../scenarios/upgrading.md#upgrading-to-squad-20) and [Using Squad across clients](../scenarios/using-squad-across-clients.md). - **Which old versions are verified:** [Tested upgrade paths](../scenarios/upgrading.md#tested-upgrade-paths) lists every published release (0.9.1 through 1.1.0, pinned npm tarball or GitHub Release bundle) that the CI matrix upgrades on Windows and Linux under each project state shape, with per-row results, every not-applicable cell explained, and the known findings. There is no supported downgrade — see [There is no supported downgrade](../scenarios/upgrading.md#there-is-no-supported-downgrade). @@ -113,12 +113,12 @@ This is the biggest jump. The codebase was rewritten in TypeScript, the `.squad/ **Global (recommended):** ```bash - npm install -g @bradygaster/squad-cli@latest + npm install -g @squad/cli@latest ``` **Local (project dependency):** ```bash - npm install --save-dev @bradygaster/squad-cli@latest + npm install --save-dev @squad/cli@latest ``` 4. **Remove the old `.squad/` directory:** @@ -174,12 +174,12 @@ If you're already on v0.8.x or a later release, this is a simple update. **Global:** ```bash -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest ``` **Local:** ```bash -npm install --save-dev @bradygaster/squad-cli@latest +npm install --save-dev @squad/cli@latest ``` Verify the version: @@ -196,7 +196,7 @@ Your `.squad/` directory is compatible — no reinitialization needed. ## Scenario 4: Was Using @bradygaster/create-squad -The `@bradygaster/create-squad` package is deprecated. It has been replaced by `@bradygaster/squad-cli`. +The `@bradygaster/create-squad` package is deprecated. It has been replaced by `@squad/cli`. ### Switch @@ -205,7 +205,7 @@ The `@bradygaster/create-squad` package is deprecated. It has been replaced by ` npm uninstall -g @bradygaster/create-squad # Install the new package -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` The `squad` command works the same way. Your `.squad/` directory does not need to change if you were already on v0.8.x or later. @@ -229,7 +229,7 @@ With: ```bash # NEW -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` Then use the `squad` command directly. If you had this in scripts or CI/CD workflows, update every reference — see [Scenario 8: Using Squad in CI/CD](#scenario-8-using-squad-in-cicd). @@ -320,7 +320,7 @@ If you run Squad in GitHub Actions or another CI/CD system, update your workflow node-version: '22' - name: Install Squad - run: npm install -g @bradygaster/squad-cli@latest + run: npm install -g @squad/cli@latest - name: Run Squad run: squad doctor && squad status @@ -348,7 +348,7 @@ If you import Squad as a library, the package name and API have changed. npm install @bradygaster/squad # NEW -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` ### Import Change @@ -358,7 +358,7 @@ npm install @bradygaster/squad-sdk import { Squad } from '@bradygaster/squad'; // NEW -import { Squad } from '@bradygaster/squad-sdk'; +import { Squad } from '@squad/sdk'; ``` ### API Notes @@ -376,7 +376,7 @@ import { Squad } from '@bradygaster/squad-sdk'; Squad isn't on your PATH. Install globally: ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` ### npm 404 error when installing @@ -384,10 +384,10 @@ npm install -g @bradygaster/squad-cli You may be using the old package name. Use the correct name: ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` -If the package genuinely isn't published yet, check [the npm page](https://www.npmjs.com/package/@bradygaster/squad-cli) or the [GitHub repo](https://github.com/github/squad) for release status. +If the package genuinely isn't published yet, check [the npm page](https://www.npmjs.com/package/@squad/cli) or the [GitHub repo](https://github.com/github/squad) for release status. ### Permission denied during install @@ -450,8 +450,8 @@ squad --version If it shows an old version: ```bash -npm uninstall -g @bradygaster/squad-cli -npm install -g @bradygaster/squad-cli@latest +npm uninstall -g @squad/cli +npm install -g @squad/cli@latest ``` ### Team roster gone after upgrade @@ -505,7 +505,7 @@ fnm use 22 If you need to downgrade to the previous stable release: ```bash -npm install -g @bradygaster/squad-cli@1.0.1 +npm install -g @squad/cli@1.0.1 ``` ### Warnings diff --git a/docs/src/content/docs/get-started/package-rename.md b/docs/src/content/docs/get-started/package-rename.md new file mode 100644 index 000000000..8836ad904 --- /dev/null +++ b/docs/src/content/docs/get-started/package-rename.md @@ -0,0 +1,50 @@ +# Package Rename: @squad/cli and @squad/sdk + +> Squad's npm packages moved from `@bradygaster/squad-cli` and `@bradygaster/squad-sdk` to `@squad/cli` and `@squad/sdk`. The commands, the `squad` binary, and your `.squad/` team state are unchanged. + +| Before | Now | +|--------|-----| +| `@bradygaster/squad-cli` | `@squad/cli` | +| `@bradygaster/squad-sdk` | `@squad/sdk` | +| `@bradygaster/squad-sdk/` | `@squad/sdk/` | + +Homebrew, WinGet and the standalone binaries keep their current names. + +## Switch a global install + +Both packages provide the `squad` command, so remove the old one first: + +```bash +npm uninstall -g @bradygaster/squad-cli +npm install -g @squad/cli +``` + +With pnpm or yarn: + +```bash +pnpm remove -g @bradygaster/squad-cli && pnpm add -g @squad/cli +yarn global remove @bradygaster/squad-cli && yarn global add @squad/cli +``` + +Once you're running a build that knows about the rename, `squad upgrade --self` does this for you: it detects an install made under the old name and runs the uninstall before installing `@squad/cli`. Use `squad upgrade --self --dry-run` to see the exact command first. + +## Update projects and scripts + +- **npx:** replace `npx @bradygaster/squad-cli …` with `npx @squad/cli …`. +- **SDK dependency:** replace `@bradygaster/squad-sdk` with `@squad/sdk` in `package.json`, and update imports such as `@bradygaster/squad-sdk/client` to `@squad/sdk/client`. +- **MCP configs:** `squad upgrade` rewrites the Squad-managed `squad_state` entry to `npx -y @squad/cli@ state-mcp`. Entries written by older versions under the old name are still recognized as Squad-managed, so they are refreshed or cleaned up rather than treated as user customizations. + +## What happens to the old packages + +The `@bradygaster/*` packages stay on npm and keep working. They'll be marked deprecated, with a message pointing here, only after `@squad/cli` and `@squad/sdk` are published and verified. Nothing is unpublished. + +## For maintainers + +The published identities live in `scripts/release/distribution-identity.json`. To move to a different name, set the new `current` value, add the old value to `legacy`, update the matching constants in `packages/squad-cli/src/cli/core/package-identity.ts`, and run: + +```bash +node scripts/rename-distribution-identity.mjs --write +npm install +``` + +Run `node scripts/rename-distribution-identity.mjs` without `--write` to list any files that still reference a retired name. Changelogs, blog posts, internal launch notes, and live `.squad/` state are left unchanged on purpose. diff --git a/docs/src/content/docs/guide.md b/docs/src/content/docs/guide.md index 53b9c9184..e492df1db 100644 --- a/docs/src/content/docs/guide.md +++ b/docs/src/content/docs/guide.md @@ -56,7 +56,7 @@ Not sure which to use? See [Choose your interface](get-started/choose-your-inter ## Installation ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli ``` Prefer a package manager or cannot reach npm? Install with Homebrew, WinGet, the @@ -223,7 +223,7 @@ Squad automatically picks the right response speed based on your request complex Define your team in TypeScript instead of maintaining markdown files manually. Write a `squad.config.ts` with type-safe builder functions, and `squad build` generates the `.squad/` governance markdown. ```typescript -import { defineSquad, defineTeam, defineAgent, defineRouting } from '@bradygaster/squad-sdk'; +import { defineSquad, defineTeam, defineAgent, defineRouting } from '@squad/sdk'; export default defineSquad({ team: defineTeam({ diff --git a/docs/src/content/docs/guide/agent-framework-integration.md b/docs/src/content/docs/guide/agent-framework-integration.md index 195d2bb6d..d8eb53b51 100644 --- a/docs/src/content/docs/guide/agent-framework-integration.md +++ b/docs/src/content/docs/guide/agent-framework-integration.md @@ -215,7 +215,7 @@ The Copilot CLI runs as a subprocess. It must be present in the deployment envir | Scenario | Recommended approach | |---|---| | Interactive CLI workflow, local dev, prompt scripting | Squad CLI (`squad`, `squad aspire`) | -| TypeScript / JavaScript integration, Copilot SDK extensions | `@bradygaster/squad-sdk` (TypeScript SDK) | +| TypeScript / JavaScript integration, Copilot SDK extensions | `@squad/sdk` (TypeScript SDK) | | .NET durable workflows, multi-model composition, Aspire AppHost | `Squad.Agents.AI` (this guide) | | Embedding multiple teams in one .NET app | `AddKeyedSquadAgent` with per-team keys | diff --git a/docs/src/content/docs/guide/build-autonomous-agent.md b/docs/src/content/docs/guide/build-autonomous-agent.md index 39e9b031d..e5aa963c9 100644 --- a/docs/src/content/docs/guide/build-autonomous-agent.md +++ b/docs/src/content/docs/guide/build-autonomous-agent.md @@ -30,7 +30,7 @@ Create a new directory and initialize it with the Squad SDK dependency: mkdir my-autonomous-agent cd my-autonomous-agent npm init -y -npm install @bradygaster/squad-sdk +npm install @squad/sdk npm install -D typescript ``` @@ -72,7 +72,7 @@ Set `"type": "module"` in your `package.json` and add scripts: Use `defineAgent()` to declare each agent's name, role, and capabilities: ```ts -import { defineAgent } from '@bradygaster/squad-sdk'; +import { defineAgent } from '@squad/sdk'; const docsWriter = defineAgent({ name: 'lori', @@ -111,7 +111,7 @@ import { defineAgent, defineRouting, defineDefaults, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; export default defineSquad({ version: '1.0.0', @@ -167,8 +167,8 @@ Wrap your pipeline in a CLI entry point so you can invoke it from a terminal, cr ```ts #!/usr/bin/env node -import { CastingEngine, CostTracker, SkillRegistry } from '@bradygaster/squad-sdk'; -import type { AgentRole, CastMember } from '@bradygaster/squad-sdk'; +import { CastingEngine, CostTracker, SkillRegistry } from '@squad/sdk'; +import type { AgentRole, CastMember } from '@squad/sdk'; interface Task { id: string; @@ -253,8 +253,8 @@ import { SkillRegistry, StreamingPipeline, selectResponseTier, -} from '@bradygaster/squad-sdk'; -import type { CastMember, AgentRole, ResponseTier, TierContext } from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; +import type { CastMember, AgentRole, ResponseTier, TierContext } from '@squad/sdk'; interface Task { id: string; @@ -369,7 +369,7 @@ import { recordAgentSpawn, recordAgentDuration, recordTokenUsage, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; // Initialize OTel (connects to Aspire dashboard if endpoint is set) const otelEndpoint = process.env['OTEL_EXPORTER_OTLP_ENDPOINT']; @@ -424,8 +424,8 @@ import { CostTracker, SkillRegistry, StreamingPipeline, -} from '@bradygaster/squad-sdk'; -import type { CastMember, AgentRole } from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; +import type { CastMember, AgentRole } from '@squad/sdk'; // Types interface Task { diff --git a/docs/src/content/docs/guide/contributing.md b/docs/src/content/docs/guide/contributing.md index acb50b7b3..8c285acca 100644 --- a/docs/src/content/docs/guide/contributing.md +++ b/docs/src/content/docs/guide/contributing.md @@ -19,8 +19,8 @@ Squad is an npm workspace monorepo with two packages: ``` squad/ -├── packages/squad-cli/ # CLI tool (@bradygaster/squad-cli) -├── packages/squad-sdk/ # Runtime SDK (@bradygaster/squad-sdk) +├── packages/squad-cli/ # CLI tool (@squad/cli) +├── packages/squad-sdk/ # Runtime SDK (@squad/sdk) ├── src/ # Legacy CLI code (migrating to packages/) ├── dist/ # Compiled output ├── .squad/ # Team state and agent history @@ -70,7 +70,7 @@ git fetch upstream dev npm install ``` -npm workspaces automatically links local packages. `@bradygaster/squad-cli` can import from `@bradygaster/squad-sdk` without publishing. +npm workspaces automatically links local packages. `@squad/cli` can import from `@squad/sdk` without publishing. ### 2. Build @@ -231,8 +231,8 @@ Creates a file in `.changeset/` that's merged with your PR. ```markdown --- -"@bradygaster/squad-sdk": patch -"@bradygaster/squad-cli": patch +"@squad/sdk": patch +"@squad/cli": patch --- Update help text and README for npm distribution. Add squad status command to docs. diff --git a/docs/src/content/docs/guide/gh-aw.md b/docs/src/content/docs/guide/gh-aw.md index dc9ee6d11..21599b68a 100644 --- a/docs/src/content/docs/guide/gh-aw.md +++ b/docs/src/content/docs/guide/gh-aw.md @@ -1667,7 +1667,7 @@ or acceptance. Reconciliation similarly retries its lifecycle update idempotentl ### Reading activation records with the SDK -The public `@bradygaster/squad-sdk/casting` subpath exports +The public `@squad/sdk/casting` subpath exports `selectActivationRecord(records, registry, context)`. It is a synchronous reader, not a GitHub API verifier. Supply `ActivationRecord` entries with the exact comment `id` and `body`, the independently frozen `AgentProvenanceRegistry`, and an @@ -1697,7 +1697,7 @@ import { type ActivationSelectionContext, type AgentProvenanceRegistry, type SelectedActivationRecord, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; function inspectActivation( records: readonly ActivationRecord[], diff --git a/docs/src/content/docs/insider-program.md b/docs/src/content/docs/insider-program.md index fa9cac00c..b21852034 100644 --- a/docs/src/content/docs/insider-program.md +++ b/docs/src/content/docs/insider-program.md @@ -41,7 +41,7 @@ merges `dev` directly into `main`. Choose one method: ```bash -npm install -g @bradygaster/squad-cli@insider +npm install -g @squad/cli@insider brew tap bradygaster/squad brew install --cask squad-insider @@ -54,7 +54,7 @@ winget install --id bradygaster.Squad.Insider --exact ### Upgrade Existing Repo to Insider ```bash -npm install -g @bradygaster/squad-cli@insider +npm install -g @squad/cli@insider squad upgrade ``` @@ -111,7 +111,7 @@ Found a bug? We want to hear about it. Want to go back to stable releases? ```bash -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest ``` Homebrew users switch from `squad-insider` to `squad`; WinGet users switch from @@ -146,7 +146,7 @@ Upgrade through npm, Homebrew, or WinGet to fetch the latest snapshot. **A:** Roll back immediately: ```bash -npm install -g @bradygaster/squad-cli@latest # Back to stable +npm install -g @squad/cli@latest # Back to stable squad upgrade # Apply stable version ``` diff --git a/docs/src/content/docs/reference/api-reference.md b/docs/src/content/docs/reference/api-reference.md index 79932ab27..3a24b9bf5 100644 --- a/docs/src/content/docs/reference/api-reference.md +++ b/docs/src/content/docs/reference/api-reference.md @@ -1,6 +1,6 @@ # SDK API Reference -Complete reference for all public exports from `@bradygaster/squad-sdk`. Each section includes types, functions, and usage examples. +Complete reference for all public exports from `@squad/sdk`. Each section includes types, functions, and usage examples. ## Overview @@ -29,7 +29,7 @@ import { initializeOTel, shutdownOTel, getTracer, getMeter, bridgeEventBusToOTel, createOTelTransport, initSquadTelemetry, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; ``` --- @@ -286,8 +286,8 @@ const myTool = defineTool<{ query: string }>({ Manage the built-in tool set. ```typescript -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; -import type { FanOutDependencies } from '@bradygaster/squad-sdk/coordinator'; +import { ToolRegistry } from '@squad/sdk/tools'; +import type { FanOutDependencies } from '@squad/sdk/coordinator'; const registry = new ToolRegistry('./.squad'); const tools = registry.getTools(); @@ -296,7 +296,7 @@ const agentTools = registry.getToolsForAgent(['squad_route', 'squad_decide']); **Constructor:** `new ToolRegistry(squadRoot?, sessionPoolGetter?, storage?, state?, fanOutDepsGetter?)` -- `fanOutDepsGetter` — Required for `squad_route` to spawn sessions via `spawnParallel`. Returns a `FanOutDependencies` object (from `@bradygaster/squad-sdk/coordinator`). Without it, `squad_route` returns `resultType: 'failure'` with `error: 'fan-out-deps-unavailable'`. +- `fanOutDepsGetter` — Required for `squad_route` to spawn sessions via `spawnParallel`. Returns a `FanOutDependencies` object (from `@squad/sdk/coordinator`). Without it, `squad_route` returns `resultType: 'failure'` with `error: 'fan-out-deps-unavailable'`. - `state` — When provided, `squad_route` validates that the target agent exists in the team roster before spawning. - Agent names must match `/^[a-zA-Z0-9_-]+$/`. Spawn errors are sanitized before being returned to the LLM. @@ -319,7 +319,7 @@ Three-layer observability API for traces, metrics, and telemetry. ### Layer 1: Low-Level Control ```typescript -import { initializeOTel, shutdownOTel, getTracer, getMeter } from '@bradygaster/squad-sdk'; +import { initializeOTel, shutdownOTel, getTracer, getMeter } from '@squad/sdk'; await initializeOTel({ endpoint: 'http://localhost:4318', @@ -335,7 +335,7 @@ await shutdownOTel(); ### Layer 2: Mid-Level Bridge ```typescript -import { bridgeEventBusToOTel, createOTelTransport } from '@bradygaster/squad-sdk'; +import { bridgeEventBusToOTel, createOTelTransport } from '@squad/sdk'; const unsubscribe = bridgeEventBusToOTel(eventBus); const transport = createOTelTransport(); @@ -344,7 +344,7 @@ const transport = createOTelTransport(); ### Layer 3: High-Level Convenience ```typescript -import { initSquadTelemetry } from '@bradygaster/squad-sdk'; +import { initSquadTelemetry } from '@squad/sdk'; const telemetry = await initSquadTelemetry({ endpoint: 'http://localhost:4318', diff --git a/docs/src/content/docs/reference/cli.md b/docs/src/content/docs/reference/cli.md index 3169afd37..acf97a532 100644 --- a/docs/src/content/docs/reference/cli.md +++ b/docs/src/content/docs/reference/cli.md @@ -8,7 +8,7 @@ Everything you need to run Squad from the command line — commands, shell inter ```bash # npm (requires Node.js 22.5+) -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli # macOS brew install --cask bradygaster/squad/squad @@ -424,9 +424,9 @@ The doctor always exits cleanly (no error code) because it's a diagnostic tool, ```bash squad --version # Check version -npm install -g @bradygaster/squad-cli@latest # Update -npm install -g @bradygaster/squad-cli@1.2.3 # Pin version -npm install -g @bradygaster/squad-cli@insider # Dev-channel prerelease builds +npm install -g @squad/cli@latest # Update +npm install -g @squad/cli@1.2.3 # Pin version +npm install -g @squad/cli@insider # Dev-channel prerelease builds ``` --- diff --git a/docs/src/content/docs/reference/config.md b/docs/src/content/docs/reference/config.md index 6f84854b2..804cd610e 100644 --- a/docs/src/content/docs/reference/config.md +++ b/docs/src/content/docs/reference/config.md @@ -18,7 +18,7 @@ import { defineTeam, defineAgent, defineRouting, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; export default defineSquad({ version: '1.0.0', diff --git a/docs/src/content/docs/reference/container-image.md b/docs/src/content/docs/reference/container-image.md index af2f93cb5..b62b75bd1 100644 --- a/docs/src/content/docs/reference/container-image.md +++ b/docs/src/content/docs/reference/container-image.md @@ -6,7 +6,7 @@ order: 10 # Container Image — Environment Variable Contract -This page is the canonical reference for running `@bradygaster/squad-cli` in a container. Every environment variable, volume mount, and behavioral expectation is defined here. [Azure Container Apps](../scenarios/azure-container-apps) and [AKS deployment](../scenarios/aks-deployment) pages cross-link to this reference. +This page is the canonical reference for running `@squad/cli` in a container. Every environment variable, volume mount, and behavioral expectation is defined here. [Azure Container Apps](../scenarios/azure-container-apps) and [AKS deployment](../scenarios/aks-deployment) pages cross-link to this reference. --- @@ -108,7 +108,7 @@ COPY --from=deps --chown=squad:squad /build/node_modules ./node_modules COPY --chown=squad:squad .squad/ ./.squad/ # Install squad-cli globally so 'squad' is on PATH -RUN npm install -g @bradygaster/squad-cli --ignore-scripts +RUN npm install -g @squad/cli --ignore-scripts # Drop privileges USER squad diff --git a/docs/src/content/docs/reference/host-feature-matrix.md b/docs/src/content/docs/reference/host-feature-matrix.md index 61057e21c..c5e21787a 100644 --- a/docs/src/content/docs/reference/host-feature-matrix.md +++ b/docs/src/content/docs/reference/host-feature-matrix.md @@ -826,13 +826,13 @@ Depends on: **a, e** (host-independent) · docs: [features/enterprise-platforms] | Host | Capability | Validation | Mechanism | Evidence | |------|------------|------------|-----------|----------| -| `copilot` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `claude` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `kiro` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `opencode` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `cursor` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `codex` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | -| `antigravity` | ✅ supported | 🧪 validated-test | Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `copilot` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `claude` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `kiro` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `opencode` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `cursor` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `codex` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | +| `antigravity` | ✅ supported | 🧪 validated-test | Platform adapters in `@squad/sdk/platform`, consumed by `squad triage\|watch`. | `validated-test:test/platform-adapter.test.ts::*`
`validated-test:test/ralph-commands.test.ts::*` | ### distributed-mesh @@ -938,13 +938,13 @@ Depends on: **c, d** · docs: [concepts/squad-2-0-architecture](/squad/docs/conc | Host | Capability | Validation | Mechanism | Evidence | |------|------------|------------|-----------|----------| -| `copilot` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | -| `claude` | ✅ supported | 🖥️ validated-live | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Plugin measurement (Claude Code 2.1.318, 2026-11-10, #2443): a `squad_state` server supplied by the Squad plugin (`plugin:squad:squad_state`, tools `mcp__plugin_squad_squad_state__*`) connects with no approval prompt and no `--mcp-config`, both interactively and headless (`-p`), from the repo root and from a package subfolder. A project `.mcp.json` server still prompts interactively ("New MCP server found in this project", default "Continue without using this MCP server"); headless `-p` on this version connects it without the flag._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::claude discovers the squad subagents and parses .mcp.json`
`validated-manual:lab:smoke-roster@2026-10-22`
`validated-test:test/squad-20-host-feature-matrix.test.ts::claude --agent squad reads the roster through mcp__squad_state__squad_state_read`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`validated-manual:lab:plugin-mcp-headless@2026-11-10`
`validated-manual:lab:plugin-mcp-interactive@2026-11-10`
`validated-manual:lab:no-copilot-backend-outage@2026-11-13` | -| `kiro` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: kiro quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::kiro validates and lists the squad agent`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | -| `opencode` | ✅ supported | 🖥️ validated-live | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::opencode loads squad as a primary agent and connects the MCP server`
`validated-manual:lab:smoke-roster@2026-10-22`
`validated-test:test/squad-20-host-feature-matrix.test.ts::opencode --agent squad reads the roster through squad_state_squad_state_read`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises` | -| `cursor` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: cursor quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::cursor-agent lists the squad_state server from .cursor/mcp.json (read-only)`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | -| `codex` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _No Codex binary or ChatGPT/API auth on the reference machine; static-only._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::codex loads the project config (trusted), sees squad_state MCP, discovers the squad TOML role, and activates coordinator instructions on spawn`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | -| `antigravity` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: antigravity quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::antigravity discovers the squad agent`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | +| `copilot` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | +| `claude` | ✅ supported | 🖥️ validated-live | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Plugin measurement (Claude Code 2.1.318, 2026-11-10, #2443): a `squad_state` server supplied by the Squad plugin (`plugin:squad:squad_state`, tools `mcp__plugin_squad_squad_state__*`) connects with no approval prompt and no `--mcp-config`, both interactively and headless (`-p`), from the repo root and from a package subfolder. A project `.mcp.json` server still prompts interactively ("New MCP server found in this project", default "Continue without using this MCP server"); headless `-p` on this version connects it without the flag._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::claude discovers the squad subagents and parses .mcp.json`
`validated-manual:lab:smoke-roster@2026-10-22`
`validated-test:test/squad-20-host-feature-matrix.test.ts::claude --agent squad reads the roster through mcp__squad_state__squad_state_read`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`validated-manual:lab:plugin-mcp-headless@2026-11-10`
`validated-manual:lab:plugin-mcp-interactive@2026-11-10`
`validated-manual:lab:no-copilot-backend-outage@2026-11-13` | +| `kiro` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: kiro quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::kiro validates and lists the squad agent`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | +| `opencode` | ✅ supported | 🖥️ validated-live | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::opencode loads squad as a primary agent and connects the MCP server`
`validated-manual:lab:smoke-roster@2026-10-22`
`validated-test:test/squad-20-host-feature-matrix.test.ts::opencode --agent squad reads the roster through squad_state_squad_state_read`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises` | +| `cursor` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: cursor quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::cursor-agent lists the squad_state server from .cursor/mcp.json (read-only)`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | +| `codex` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _No Codex binary or ChatGPT/API auth on the reference machine; static-only._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::codex loads the project config (trusted), sees squad_state MCP, discovers the squad TOML role, and activates coordinator instructions on spawn`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | +| `antigravity` | ✅ supported | 🧪 validated-test | Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes. _Live run blocked on 2026-10-22: antigravity quota/usage limit reached on the reference machine._ | `validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory`
`validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads`
`validated-test:test/clients-real-cli.test.ts::antigravity discovers the squad agent`
`validated-test:test/squad-20-host-feature-matrix.test.ts::squad_state_health names the configured backend (orphan) as the coordinator digest promises`
`static-only` | ### capability-negotiation diff --git a/docs/src/content/docs/reference/integration.md b/docs/src/content/docs/reference/integration.md index 6702d89f4..0bf48670d 100644 --- a/docs/src/content/docs/reference/integration.md +++ b/docs/src/content/docs/reference/integration.md @@ -9,7 +9,7 @@ This guide covers connecting to the Copilot SDK via Squad's adapter layer, manag `SquadClient` wraps `@github/copilot-sdk` with lifecycle management and auto-reconnection: ```typescript -import { SquadClient } from '@bradygaster/squad-sdk'; +import { SquadClient } from '@squad/sdk'; const client = new SquadClient({ port: 3000, @@ -29,7 +29,7 @@ The client tracks connection state via `SquadConnectionState`: `disconnected → Use `SquadClientWithPool` for production workloads — it composes `SquadClient`, `SessionPool`, and `EventBus`: ```typescript -import { SquadClientWithPool } from '@bradygaster/squad-sdk'; +import { SquadClientWithPool } from '@squad/sdk'; const squad = new SquadClientWithPool({ client: clientOptions, diff --git a/docs/src/content/docs/reference/sdk.md b/docs/src/content/docs/reference/sdk.md index 3eaf600b8..7a1463836 100644 --- a/docs/src/content/docs/reference/sdk.md +++ b/docs/src/content/docs/reference/sdk.md @@ -1,29 +1,29 @@ # SDK Reference -This is the curated quick reference for `@bradygaster/squad-sdk`. The SDK provides configuration builders, model selection, agent lifecycle APIs, routing, tools, storage, telemetry, and platform integrations. +This is the curated quick reference for `@squad/sdk`. The SDK provides configuration builders, model selection, agent lifecycle APIs, routing, tools, storage, telemetry, and platform integrations. For every public type and export, see the [generated API reference](./api/). ## Install ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` The package uses ESM and exposes a root entrypoint plus focused subpath entrypoints: | Import path | Use for | |-------------|---------| -| `@bradygaster/squad-sdk` | Resolution, configuration, builders, models, roles, storage, telemetry, and shared types | -| `@bradygaster/squad-sdk/client` | `SquadClient`, `SquadClientWithPool`, `SessionPool`, client events, and multi-host `HostProjection` / `ClientAdapter` APIs (`@bradygaster/squad-sdk/clients` is a deprecated alias) | -| `@bradygaster/squad-sdk/backend` | Experimental `SquadBackend` (`local`, `mcp`, `durable-http`), `HarnessAdapter`, and capability/extension helpers | -| `@bradygaster/squad-sdk/coordinator` | `SquadCoordinator`, fan-out, and response-tier orchestration | -| `@bradygaster/squad-sdk/tools` | `defineTool` and `ToolRegistry` | -| `@bradygaster/squad-sdk/hooks` | `HookPipeline` and hook policy types | -| `@bradygaster/squad-sdk/config` | Configuration schema and model registry APIs | -| `@bradygaster/squad-sdk/casting` | Persona casting and casting history | -| `@bradygaster/squad-sdk/platform` | GitHub, Azure DevOps, and communication adapters | -| `@bradygaster/squad-sdk/state` | State collections and handles | +| `@squad/sdk` | Resolution, configuration, builders, models, roles, storage, telemetry, and shared types | +| `@squad/sdk/client` | `SquadClient`, `SquadClientWithPool`, `SessionPool`, client events, and multi-host `HostProjection` / `ClientAdapter` APIs (`@squad/sdk/clients` is a deprecated alias) | +| `@squad/sdk/backend` | Experimental `SquadBackend` (`local`, `mcp`, `durable-http`), `HarnessAdapter`, and capability/extension helpers | +| `@squad/sdk/coordinator` | `SquadCoordinator`, fan-out, and response-tier orchestration | +| `@squad/sdk/tools` | `defineTool` and `ToolRegistry` | +| `@squad/sdk/hooks` | `HookPipeline` and hook policy types | +| `@squad/sdk/config` | Configuration schema and model registry APIs | +| `@squad/sdk/casting` | Persona casting and casting history | +| `@squad/sdk/platform` | GitHub, Azure DevOps, and communication adapters | +| `@squad/sdk/state` | State collections and handles | ## Configuration @@ -32,7 +32,7 @@ The package uses ESM and exposes a root entrypoint plus focused subpath entrypoi Create a typed configuration object with defaults and editor autocomplete. ```typescript -import { defineConfig } from '@bradygaster/squad-sdk'; +import { defineConfig } from '@squad/sdk'; export default defineConfig({ version: '1.0.0', @@ -79,7 +79,7 @@ The configuration schema includes: Load and validate Squad configuration asynchronously or synchronously. ```typescript -import { loadConfig } from '@bradygaster/squad-sdk'; +import { loadConfig } from '@squad/sdk'; const result = await loadConfig('./.squad'); console.log(result.config.models.defaultModel); @@ -99,7 +99,7 @@ import { defineRouting, defineSquad, defineTeam, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; const squad = defineSquad({ version: '1.0.0', @@ -131,7 +131,7 @@ Available builders are `defineTeam`, `defineAgent`, `defineBudget`, `defineDefau `MODELS` is the runtime source of truth for defaults and fallback chains. ```typescript -import { MODELS } from '@bradygaster/squad-sdk'; +import { MODELS } from '@squad/sdk'; MODELS.DEFAULT; // gpt-5.6-terra, env-overridable MODELS.SELECTOR_DEFAULT; // gpt-5.6-luna @@ -151,7 +151,7 @@ The default model can be changed with `SQUAD_DEFAULT_MODEL`. The fallback chains Cost ceilings are separate from quality tiers. Use `maxCategory` with `lightweight`, `versatile`, or `powerful` when automatic selection must stay within a billing category. ```typescript -import { defineConfig } from '@bradygaster/squad-sdk'; +import { defineConfig } from '@squad/sdk'; export default defineConfig({ models: { @@ -169,7 +169,7 @@ import { ensureSquadPath, resolveSquad, scratchDir, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; const projectSquad = resolveSquad(); const ensured = ensureSquadPath(); @@ -183,7 +183,7 @@ The root package also exports project-key helpers, preset/state resolution, dire Import client APIs from the client subpath. ```typescript -import { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; +import { SquadClientWithPool } from '@squad/sdk/client'; const squad = new SquadClientWithPool({ pool: { maxConcurrent: 5 }, @@ -208,8 +208,8 @@ Use `SquadClient` when you need connection management without the integrated ses Import the coordinator from its subpath. It accepts a validated `SquadConfig` and handles direct responses, route matching, and optional fan-out. ```typescript -import { defineConfig } from '@bradygaster/squad-sdk'; -import { SquadCoordinator } from '@bradygaster/squad-sdk/coordinator'; +import { defineConfig } from '@squad/sdk'; +import { SquadCoordinator } from '@squad/sdk/coordinator'; const config = defineConfig({ team: { name: 'Platform Squad' }, @@ -233,7 +233,7 @@ The coordinator subpath also exports `spawnParallel`, `DirectResponseHandler`, s ### Custom tools ```typescript -import { defineTool, ToolRegistry } from '@bradygaster/squad-sdk/tools'; +import { defineTool, ToolRegistry } from '@squad/sdk/tools'; const searchTool = defineTool<{ query: string }>({ name: 'search_docs', @@ -259,7 +259,7 @@ The built-in tools are `squad_route`, `squad_decide`, `squad_memory`, `squad_sta ### Hook pipeline ```typescript -import { HookPipeline } from '@bradygaster/squad-sdk/hooks'; +import { HookPipeline } from '@squad/sdk/hooks'; const hooks = new HookPipeline(); hooks.addPreToolHook(async (context) => ({ @@ -273,7 +273,7 @@ Hook actions are `allow`, `block`, and `modify`. The hook package also exports p ## Casting and Roles ```typescript -import { CastingEngine } from '@bradygaster/squad-sdk'; +import { CastingEngine } from '@squad/sdk'; const engine = new CastingEngine({ universes: ['The Wire'], @@ -297,7 +297,7 @@ import { initSquadTelemetry, initializeOTel, shutdownOTel, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; await initializeOTel({ endpoint: 'http://localhost:4318', @@ -319,7 +319,7 @@ await shutdownOTel(); `StreamingPipeline` can also track the latest context-window occupancy for each attached session. Runtime `context_usage` events are exact; regular usage events provide an estimate when a model context-window resolver is configured. ```typescript -import { RuntimeEventBus, StreamingPipeline } from '@bradygaster/squad-sdk'; +import { RuntimeEventBus, StreamingPipeline } from '@squad/sdk'; const eventBus = new RuntimeEventBus(); const pipeline = new StreamingPipeline({ @@ -341,16 +341,16 @@ The root package also exports cost tracking, offline mode, runtime events, OpenT ## Client host adapters -`@bradygaster/squad-sdk/client` (and the deprecated alias `@bradygaster/squad-sdk/clients`) projects the host-agnostic Squad coordinator into the files each AI host loads natively across all 7 supported hosts (`GitHub Copilot`, `Claude Code`, `Kiro`, `OpenCode`, `Cursor`, `OpenAI Codex`, and `Google Antigravity`). +`@squad/sdk/client` (and the deprecated alias `@squad/sdk/clients`) projects the host-agnostic Squad coordinator into the files each AI host loads natively across all 7 supported hosts (`GitHub Copilot`, `Claude Code`, `Kiro`, `OpenCode`, `Cursor`, `OpenAI Codex`, and `Google Antigravity`). - `HostProjection` is a pure workspace projection (`project(ctx)`) for `copilot`, `claude`, `kiro`, `opencode`, `cursor`, `codex`, and `antigravity`. Get one with `getHostProjection(id)`; apply with `installClients(ids, ctx)` or remove with `uninstallClients(ids, ctx)`. - `createClientAdapter({ host, ctx, runtime? })` returns the spec-level `ClientAdapter` facade: `describe()`, `projectWorkspace()` and `getCapabilities()` work locally; `submit`, `subscribe`, `cancel` and `respondApproval` delegate to a bound `RuntimeBinding` and otherwise throw `AdapterUnboundError`. - Capabilities are canonical string tokens (`CAPABILITY_TOKENS_BY_HOST`); the boolean `ClientCapabilities` flags are a derived view, and passing conflicting flags throws. Advertised capabilities stay separate from negotiated `effectiveCapabilities` (client ∩ backend ∩ policy). - JSON and TOML config merges only touch Squad's own keys; `normalizeClientIds()` / `assertPortableClients()` keep `clients[]` free of credentials and paths. -## Experimental backend and harness SPI (`@bradygaster/squad-sdk/backend`) +## Experimental backend and harness SPI (`@squad/sdk/backend`) -> **Experimental Preview — Bring Your Own Server:** `@bradygaster/squad-sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. +> **Experimental Preview — Bring Your Own Server:** `@squad/sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. - `createSquadBackend(options)` builds a `SquadBackend` for `kind: 'local'`, `kind: 'mcp'`, or `kind: 'durable-http'`. SDK callers using `kind: 'durable-http'` (or `new DurableHttpSquadBackend(options)`) must explicitly pass an `https://` `baseUrl` (plain `http://` is allowed only for `localhost` / `127.0.0.1` / `::1`) and, when needed, an optional bearer `token`; redirects are never followed. Neither `createSquadBackend` nor `DurableHttpSquadBackend` reads `SQUAD_BACKEND_URL` or `SQUAD_BACKEND_TOKEN` from the environment — automatic environment-variable lookup applies only to the CLI's `squad state-mcp` bridge (`createMcpBackend()`) when the experimental backend tools are enabled. - `SquadBackend` exposes `negotiate`, `createConversation`, `sendMessage`, `getTranscript`, `getTurn`, `readEvents`, `getApprovals`, `respondApproval`, `cancelTurn`, `cancelRun`, and `health`. diff --git a/docs/src/content/docs/reference/tools-and-hooks.md b/docs/src/content/docs/reference/tools-and-hooks.md index 3a53f6839..ade212e37 100644 --- a/docs/src/content/docs/reference/tools-and-hooks.md +++ b/docs/src/content/docs/reference/tools-and-hooks.md @@ -9,7 +9,7 @@ Squad ships with 5 built-in tools and a hook pipeline for policy enforcement. Th `ToolRegistry` manages tool definitions. Each tool has a name, JSON schema, and async handler: ```typescript -import { ToolRegistry, defineTool } from '@bradygaster/squad-sdk'; +import { ToolRegistry, defineTool } from '@squad/sdk'; const registry = new ToolRegistry(); @@ -51,7 +51,7 @@ The handler returns a `ToolResult` with `success` flag and `data` payload. `HookPipeline` intercepts tool calls at two points: before execution (`PreToolUseHook`) and after (`PostToolUseHook`). Hooks return a `HookAction`: `allow`, `block`, or `modify`. ```typescript -import { HookPipeline, PreToolUseHook } from '@bradygaster/squad-sdk'; +import { HookPipeline, PreToolUseHook } from '@squad/sdk'; const auditHook: PreToolUseHook = async (toolName, params, context) => { console.log(`Agent ${context.agentId} calling ${toolName}`); diff --git a/docs/src/content/docs/scenarios/disaster-recovery.md b/docs/src/content/docs/scenarios/disaster-recovery.md index 74a5433be..0cb030cf9 100644 --- a/docs/src/content/docs/scenarios/disaster-recovery.md +++ b/docs/src/content/docs/scenarios/disaster-recovery.md @@ -32,7 +32,7 @@ git checkout .ai-team/ If you haven't committed `.squad/` yet, it's gone. Rebuild: ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` @@ -178,7 +178,7 @@ git checkout HEAD^ .github/agents/squad.agent.md Or reinstall a previous version: ```bash -npm install -g @bradygaster/squad-cli@0.1.5 +npm install -g @squad/cli@0.1.5 ``` **Your team's knowledge is safe.** `.ai-team/` is untouched. diff --git a/docs/src/content/docs/scenarios/keep-my-squad.md b/docs/src/content/docs/scenarios/keep-my-squad.md index 86f67220d..c40ce500d 100644 --- a/docs/src/content/docs/scenarios/keep-my-squad.md +++ b/docs/src/content/docs/scenarios/keep-my-squad.md @@ -69,7 +69,7 @@ Start a new project: mkdir ~/projects/new-mobile-app cd ~/projects/new-mobile-app git init -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` @@ -139,7 +139,7 @@ This is intentional. Skills are **reusable**. Project details are **not**. When Squad releases a new version: ```bash -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest squad upgrade ``` diff --git a/docs/src/content/docs/scenarios/mid-project.md b/docs/src/content/docs/scenarios/mid-project.md index b0fc605bc..7d29a6f62 100644 --- a/docs/src/content/docs/scenarios/mid-project.md +++ b/docs/src/content/docs/scenarios/mid-project.md @@ -28,7 +28,7 @@ You don't have to start from scratch. You don't have to rewrite anything. Instal ```bash cd ~/projects/halfway-done-app -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` diff --git a/docs/src/content/docs/scenarios/multiple-squads.md b/docs/src/content/docs/scenarios/multiple-squads.md index 5a1d8cfd4..e01ff799b 100644 --- a/docs/src/content/docs/scenarios/multiple-squads.md +++ b/docs/src/content/docs/scenarios/multiple-squads.md @@ -70,7 +70,7 @@ Pick the squad whose domain knowledge is closest to your new project. ```bash cd ~/projects/new-platform git init -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` diff --git a/docs/src/content/docs/scenarios/new-project.md b/docs/src/content/docs/scenarios/new-project.md index ebaec5e21..9d1e9c412 100644 --- a/docs/src/content/docs/scenarios/new-project.md +++ b/docs/src/content/docs/scenarios/new-project.md @@ -26,7 +26,7 @@ git init ## 2. Install Squad ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli cd ~/projects/new-project squad init ``` diff --git a/docs/src/content/docs/scenarios/open-source.md b/docs/src/content/docs/scenarios/open-source.md index d9bba103a..6edaca79d 100644 --- a/docs/src/content/docs/scenarios/open-source.md +++ b/docs/src/content/docs/scenarios/open-source.md @@ -37,7 +37,7 @@ Squad helps: ```bash cd ~/projects/my-open-source-lib -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` diff --git a/docs/src/content/docs/scenarios/release-process.md b/docs/src/content/docs/scenarios/release-process.md index b8613427e..573cb8858 100644 --- a/docs/src/content/docs/scenarios/release-process.md +++ b/docs/src/content/docs/scenarios/release-process.md @@ -19,8 +19,8 @@ CLI versions in lockstep: ```bash VERSION=2.0.0-preview.4 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -112,8 +112,8 @@ dependency floor while developing on `dev`. Install the preview from npm with: ```bash -npm install -g @bradygaster/squad-cli@insider # canonical self-upgrade channel -npm install -g @bradygaster/squad-cli@preview # compatibility alias +npm install -g @squad/cli@insider # canonical self-upgrade channel +npm install -g @squad/cli@preview # compatibility alias ``` Homebrew and WinGet are intentionally unavailable for preview.4. @@ -224,17 +224,17 @@ Those paths remain on `dev`; no force push or staging branch is needed. For preview (both tags must point at the version for both packages): ```bash -npm view @bradygaster/squad-sdk dist-tags.insider -npm view @bradygaster/squad-cli dist-tags.insider -npm view @bradygaster/squad-sdk dist-tags.preview -npm view @bradygaster/squad-cli dist-tags.preview +npm view @squad/sdk dist-tags.insider +npm view @squad/cli dist-tags.insider +npm view @squad/sdk dist-tags.preview +npm view @squad/cli dist-tags.preview ``` For stable: ```bash -npm view @bradygaster/squad-sdk dist-tags.latest -npm view @bradygaster/squad-cli dist-tags.latest +npm view @squad/sdk dist-tags.latest +npm view @squad/cli dist-tags.latest ``` The values must equal the release version, and the `npm-publish-reconciliation-*` @@ -282,7 +282,7 @@ Open a normal PR to `dev` that sets the next development version, for example: ```bash NEXT_VERSION=1.3.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/docs/src/content/docs/scenarios/team-portability.md b/docs/src/content/docs/scenarios/team-portability.md index 09fcd9c7c..34d1750c2 100644 --- a/docs/src/content/docs/scenarios/team-portability.md +++ b/docs/src/content/docs/scenarios/team-portability.md @@ -46,7 +46,7 @@ The target repo needs Squad installed before importing: ```bash cd ~/projects/project-beta -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init ``` diff --git a/docs/src/content/docs/scenarios/troubleshooting.md b/docs/src/content/docs/scenarios/troubleshooting.md index 6b625c227..60bc91952 100644 --- a/docs/src/content/docs/scenarios/troubleshooting.md +++ b/docs/src/content/docs/scenarios/troubleshooting.md @@ -160,7 +160,7 @@ declarations, which multiplied the process count. **Cause:** The repository was set up with a Squad version that wrote absolute paths from one machine into `.mcp.json` and `.claude/settings.json`. -**Fix:** run `squad upgrade` once and commit the result. It replaces those paths with `node .squad/squad.mjs`, a launcher that finds the Squad CLI on each machine. If the launcher says no Squad CLI was found, install one (`npm install -g @bradygaster/squad-cli`) or set `SQUAD_ALLOW_NPX=1`. +**Fix:** run `squad upgrade` once and commit the result. It replaces those paths with `node .squad/squad.mjs`, a launcher that finds the Squad CLI on each machine. If the launcher says no Squad CLI was found, install one (`npm install -g @squad/cli`) or set `SQUAD_ALLOW_NPX=1`. --- diff --git a/docs/src/content/docs/scenarios/upgrading.md b/docs/src/content/docs/scenarios/upgrading.md index 697fe54f0..74bde9fc2 100644 --- a/docs/src/content/docs/scenarios/upgrading.md +++ b/docs/src/content/docs/scenarios/upgrading.md @@ -113,23 +113,23 @@ If `.squad/casting/registry.json` was previously hand-edited by an agent or is e - Pre-repair originals are archived at `.squad/casting/handwritten-archive-/`. - If an entry cannot be proven (for example, bare strings without a role/name object or a roster row with no matching charter folder), `squad upgrade` fails closed and prints the exact dropped entries and how to fix them (`npx squad cast --name --role ""`). -### Deprecated `@bradygaster/squad-sdk/clients` alias +### Deprecated `@squad/sdk/clients` alias -If you import host adapter APIs programmatically, update `@bradygaster/squad-sdk/clients` to the canonical `@bradygaster/squad-sdk/client` subpath. The `/clients` subpath remains exported in 2.0 as a deprecated compatibility alias for the same symbols. +If you import host adapter APIs programmatically, update `@squad/sdk/clients` to the canonical `@squad/sdk/client` subpath. The `/clients` subpath remains exported in 2.0 as a deprecated compatibility alias for the same symbols. ### Experimental backend flag (`--experimental-backend`) -`@bradygaster/squad-sdk/backend` (`BACKEND_CONTRACT_STAGE = 'experimental'`) is an opt-in preview surface (DurableSquad Phase 2 server-side integration for remote durable approvals and lease epochs is pending): +`@squad/sdk/backend` (`BACKEND_CONTRACT_STAGE = 'experimental'`) is an opt-in preview surface (DurableSquad Phase 2 server-side integration for remote durable approvals and lease epochs is pending): - In `squad state-mcp`, the 11 `squad_backend_*` MCP conversation tools are disabled by default. Pass `--experimental-backend` or set `SQUAD_EXPERIMENTAL_BACKEND=1` to expose them (`SQUAD_BACKEND_URL` alone does not enable them). -- In SDK code, import `createSquadBackend` / `DurableHttpSquadBackend` from `@bradygaster/squad-sdk/backend` and pass an explicit `https://` `baseUrl` (`http://` only for localhost) and optional `token`. +- In SDK code, import `createSquadBackend` / `DurableHttpSquadBackend` from `@squad/sdk/backend` and pass an explicit `https://` `baseUrl` (`http://` only for localhost) and optional `token`. ### Rolling back client projections (`uninstallClients`) To remove generated host projections and restore shared files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.gitignore`, and shared MCP config files) byte-for-byte outside Squad's managed sections: ```ts -import { uninstallClients } from '@bradygaster/squad-sdk/client'; +import { uninstallClients } from '@squad/sdk/client'; uninstallClients(['claude', 'cursor', 'codex'], { root: process.cwd(), @@ -143,7 +143,7 @@ This is **projection uninstall only**. It does not change the installed CLI, you ### There is no supported downgrade -Never run an older Squad CLI (`npx @bradygaster/squad-cli@`, an old standalone bundle, or a stale global install) against a repository that has been upgraded: +Never run an older Squad CLI (`npx @squad/cli@`, an old standalone bundle, or a stale global install) against a repository that has been upgraded: - Old CLIs have no newer-version guard; a real `squad upgrade` from them rewrites the coordinator, skills, workflows and templates back to the old version. - 0.9.1's `squad upgrade --dry-run` is **not trustworthy**: it performs the downgrade instead of previewing it. Later 0.13.x–1.1.0 CLIs honor `--dry-run` but still preview overwriting Squad-owned files. @@ -159,7 +159,7 @@ Squad 2.0 removes some 1.x features outright; the single record of what was remo ### Downgrading and old CLIs -Squad does not support downgrading in place. Older CLIs have no "newer workspace" guard — a 0.9.x or 1.x `squad upgrade` run against a 2.0 workspace will rewrite Squad-owned files to its own templates without warning, and on 0.9.1 `squad upgrade --dry-run` still writes. To go back, restore `.github/agents/squad.agent.md`, `.github/workflows/squad-*.yml` and `.squad/` from version control, then install the older CLI. Keep the CLI version pinned per repository (`npx @bradygaster/squad-cli@`) when several people work on the same workspace. +Squad does not support downgrading in place. Older CLIs have no "newer workspace" guard — a 0.9.x or 1.x `squad upgrade` run against a 2.0 workspace will rewrite Squad-owned files to its own templates without warning, and on 0.9.1 `squad upgrade --dry-run` still writes. To go back, restore `.github/agents/squad.agent.md`, `.github/workflows/squad-*.yml` and `.squad/` from version control, then install the older CLI. Keep the CLI version pinned per repository (`npx @squad/cli@`) when several people work on the same workspace. --- @@ -169,7 +169,7 @@ Squad does not support downgrading in place. Older CLIs have no "newer workspace ## Tested upgrade paths -Every row below is a pinned, published artifact of an older Squad release driven through `squad init` under a given project state shape, then **upgraded** with the CLI packed from the tree under test (`npm pack` of `@bradygaster/squad-sdk` + `@bradygaster/squad-cli`) by `test/squad-20-upgrade-matrix.test.ts`. A row **passes** only when every non-xfail assertion passed; a row that carries a pinned finding is reported as **pass WITH known … failure (F)**, never as a bare pass; **fail** names the failing checks; **not applicable** cells are each explained individually below (none means "not run"). Machine-readable source: `test-fixtures/spec/suite-v0.2/upgrade-matrix.json` (protocol `upgrade-matrix/v1`). +Every row below is a pinned, published artifact of an older Squad release driven through `squad init` under a given project state shape, then **upgraded** with the CLI packed from the tree under test (`npm pack` of `@squad/sdk` + `@squad/cli`) by `test/squad-20-upgrade-matrix.test.ts`. A row **passes** only when every non-xfail assertion passed; a row that carries a pinned finding is reported as **pass WITH known … failure (F)**, never as a bare pass; **fail** names the failing checks; **not applicable** cells are each explained individually below (none means "not run"). Machine-readable source: `test-fixtures/spec/suite-v0.2/upgrade-matrix.json` (protocol `upgrade-matrix/v1`). ### Three different things @@ -183,12 +183,12 @@ Every row below is a pinned, published artifact of an older Squad release driven ### Runs -All recorded runs executed against **one tree**, commit `9b254ba858abc19ef62e513993d9802312bfe34c`, with harness hash `a9713d320fdb479c…` (sha256 over the suite, renderer, workflow, fs hook and this fixture minus `runs`; the integrity test refuses a recorded run whose harness differs from the committed one, so folding results may change nothing but the runs data). +All recorded runs executed against **one tree**, commit `758861e6bcc66e2466c1cb66d94f654712aec1e6`, with harness hash `48482391aaaf04da…` (sha256 over the suite, renderer, workflow, fs hook and this fixture minus `runs`; the integrity test refuses a recorded run whose harness differs from the committed one, so folding results may change nothing but the runs data). | Platform | Arch | Node | Target | Tree (targetSha) | Trigger | Recorded | Outcome | |----------|------|------|--------|------------------|---------|----------|---------| -| Linux (`linux`) | x64 | v22.23.4 | v2.0.0-preview.4 | `9b254ba858ab` | [pull_request](https://github.com/github/squad/actions/runs/43147851248) | 2026-11-12 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). | -| Windows (`win32`) | x64 | v22.23.4 | v2.0.0-preview.4 | `9b254ba858ab` | [pull_request](https://github.com/github/squad/actions/runs/43147851248) | 2026-11-12 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). | +| Linux (`linux`) | x64 | v22.23.4 | v2.0.0 | `758861e6bcc6` | [pull_request](https://github.com/github/squad/actions/runs/44384646543) | 2026-11-18 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). | +| Windows (`win32`) | x64 | v22.23.5 | v2.0.0 | `758861e6bcc6` | [pull_request](https://github.com/github/squad/actions/runs/44384646543) | 2026-11-18 | 35 rows passed all non-xfail assertions; 4 of them carry a known expected failure (F3: Squad 0.9.1 squad upgrade --dry-run is not dry); 0 rows failed; 7 rows are structurally inapplicable (listed below). | ### Producers (pinned, immutable provenance) @@ -395,12 +395,12 @@ Recorded by the `downgrade-probe` check (dry-run on a copy; the only assertion i | Platform | Producer | Shapes | Observed | |----------|----------|--------|----------| -| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) | +| `linux` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) | | `linux` | 0.13.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | | `linux` | 1.0.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | | `linux` | 1.0.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | | `linux` | 1.1.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | -| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0-preview.4 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) | +| `win32` | 0.9.1 | all 4 shapes | exit 0, last lines "✓ refreshed .squad/templates/ \| Upgrade complete: v2.0.0 → v0.9.1 \| Preserves user state: team.md, decisions/, agents/*/history.md"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …) | | `win32` | 0.13.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | | `win32` | 1.0.0 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | | `win32` | 1.0.1 | all 6 shapes | exit 0, last lines "overwrite ../.github/workflows/squad-triage.yml \| overwrite ../.github/workflows/sync-squad-labels.yml \| Run without --dry-run to apply."; modified nothing | diff --git a/docs/src/content/docs/scenarios/using-squad-across-clients.md b/docs/src/content/docs/scenarios/using-squad-across-clients.md index 378261f20..86c18963a 100644 --- a/docs/src/content/docs/scenarios/using-squad-across-clients.md +++ b/docs/src/content/docs/scenarios/using-squad-across-clients.md @@ -7,7 +7,7 @@ description: Step-by-step guidance for projecting one Squad team into GitHub Cop Squad 2.0 adds host-native client projections across all 7 supported hosts — GitHub Copilot, Claude Code, Kiro, OpenCode, Cursor, OpenAI Codex, and Google Antigravity (`copilot|claude|kiro|opencode|cursor|codex|antigravity|all`) — through `squad init --client ...` and `squad upgrade --client ...`. -One `.squad/` team projects into multiple client hosts without changing the underlying team state or backend contract. Programmatic host projections live in `@bradygaster/squad-sdk/client` (with `@bradygaster/squad-sdk/clients` kept as a deprecated alias). +One `.squad/` team projects into multiple client hosts without changing the underlying team state or backend contract. Programmatic host projections live in `@squad/sdk/client` (with `@squad/sdk/clients` kept as a deprecated alias). ## Quick commands @@ -121,7 +121,7 @@ Squad persists only canonical client ids in `.squad/config.json`: } ``` -That list is projection metadata only, validated by `normalizeClientIds()` and `assertPortableClients()` from `@bradygaster/squad-sdk/client`. It never carries secrets, machine paths, URLs, thread ids, lease tokens, or checkpoint state. +That list is projection metadata only, validated by `normalizeClientIds()` and `assertPortableClients()` from `@squad/sdk/client`. It never carries secrets, machine paths, URLs, thread ids, lease tokens, or checkpoint state. ## Why the merge behavior and rollback matter @@ -130,7 +130,7 @@ Every client adapter uses additive config merging for shared JSON and TOML files To remove a client projection and restore shared files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `.gitignore`, and shared MCP configs) byte-for-byte outside Squad's managed sections, call `uninstallClients`: ```ts -import { uninstallClients } from '@bradygaster/squad-sdk/client'; +import { uninstallClients } from '@squad/sdk/client'; uninstallClients(['claude', 'codex'], { root: process.cwd(), diff --git a/docs/src/content/docs/sdk-first-mode.md b/docs/src/content/docs/sdk-first-mode.md index 15be49f1a..b1a4d356b 100644 --- a/docs/src/content/docs/sdk-first-mode.md +++ b/docs/src/content/docs/sdk-first-mode.md @@ -44,7 +44,7 @@ This replaces manual `.squad/team.md`, `.squad/routing.md`, and agent charters w ### 1. Install the SDK ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` ### 2. Create `squad.config.ts` @@ -55,7 +55,7 @@ import { defineTeam, defineAgent, defineRouting, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; export default defineSquad({ team: defineTeam({ @@ -371,7 +371,7 @@ const telemetry = defineTelemetry({ Define a reusable skill that agents can load on demand. ```typescript -import { defineSkill } from '@bradygaster/squad-sdk'; +import { defineSkill } from '@squad/sdk'; const gitWorkflow = defineSkill({ name: 'git-workflow', @@ -530,7 +530,7 @@ import { defineHooks, defineCasting, defineTelemetry, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; export default defineSquad({ version: '1.0.0', diff --git a/docs/src/content/docs/whatsnew.md b/docs/src/content/docs/whatsnew.md index 5100c8deb..4a5d0033d 100644 --- a/docs/src/content/docs/whatsnew.md +++ b/docs/src/content/docs/whatsnew.md @@ -38,14 +38,14 @@ Standalone archives now vendor Node.js 22.23.4. The official [Node.js October 21 ### v2.0.0-preview.1 — insider channel with preview alias -`v2.0.0-preview.1` is the first Squad 2.0 build. The canonical npm channel is `insider` (`squad upgrade --self --insider` or `npm install -g @bradygaster/squad-cli@insider`), with `preview` retained as a compatibility alias; `latest` stays at v1.1.0 until 2.0.0 ships stable. Before upgrading an existing project read [Upgrading to Squad 2.0](./scenarios/upgrading.md#upgrading-to-squad-20) and the [tested upgrade paths](./scenarios/upgrading.md#tested-upgrade-paths); the full list of breaking changes is in the [table below](#breaking--behavior-changes-v200). +`v2.0.0-preview.1` is the first Squad 2.0 build. The canonical npm channel is `insider` (`squad upgrade --self --insider` or `npm install -g @squad/cli@insider`), with `preview` retained as a compatibility alias; `latest` stays at v1.1.0 until 2.0.0 ships stable. Before upgrading an existing project read [Upgrading to Squad 2.0](./scenarios/upgrading.md#upgrading-to-squad-20) and the [tested upgrade paths](./scenarios/upgrading.md#tested-upgrade-paths); the full list of breaking changes is in the [table below](#breaking--behavior-changes-v200). ### Highlights (v2.0.0) - **Seven AI hosts via `--client`** — `squad init --client ` and `squad upgrade [--dry-run] --client ` project the Squad coordinator and `squad_state` MCP wiring across GitHub Copilot (`copilot`), Claude Code (`claude`), Kiro (`kiro`), OpenCode (`opencode`), Cursor (`cursor`), OpenAI Codex (`codex`), and Google Antigravity (`antigravity`), or `all`, persisting portable slugs in `.squad/config.json` `clients[]` -- **Shared charters & capability negotiation (`@bradygaster/squad-sdk/client`)** — Every host uses one coordinator that dispatches specialists from shared `.squad/agents//charter.md` files; `HostProjection`, `ClientAdapter`, and `CAPABILITY_TOKENS_BY_HOST` negotiate effective capabilities as `client ∩ backend ∩ policy` (`@bradygaster/squad-sdk/clients` remains as a deprecated alias) +- **Shared charters & capability negotiation (`@squad/sdk/client`)** — Every host uses one coordinator that dispatches specialists from shared `.squad/agents//charter.md` files; `HostProjection`, `ClientAdapter`, and `CAPABILITY_TOKENS_BY_HOST` negotiate effective capabilities as `client ∩ backend ∩ policy` (`@squad/sdk/clients` remains as a deprecated alias) - **Transactional casting repair & roster backfill** — `squad upgrade` normalizes handwritten `.squad/casting/registry.json` files per record (preserving retired/inactive agents and extra metadata), backfills empty registries from `team.md` using `.squad/agents//charter.md` folder IDs, archives pre-repair originals under `.squad/casting/handwritten-archive-/`, and fails closed with an explicit `dropped` list when entries cannot be proven -- **Experimental backend & harness SPI (`@bradygaster/squad-sdk/backend`)** — Ships the experimental `SquadBackend` (`LocalSquadBackend`, `DurableHttpSquadBackend`, `createStateBackendStore`) and `HarnessAdapter` / `DefaultHarnessRegistry` contracts plus 11 opt-in `squad_backend_*` MCP tools in `squad state-mcp` (`--experimental-backend` or `SQUAD_EXPERIMENTAL_BACKEND=1`), validated against the `squad-protocol-v2.0-rc1` golden trace (`G1`–`G9`); server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending +- **Experimental backend & harness SPI (`@squad/sdk/backend`)** — Ships the experimental `SquadBackend` (`LocalSquadBackend`, `DurableHttpSquadBackend`, `createStateBackendStore`) and `HarnessAdapter` / `DefaultHarnessRegistry` contracts plus 11 opt-in `squad_backend_*` MCP tools in `squad state-mcp` (`--experimental-backend` or `SQUAD_EXPERIMENTAL_BACKEND=1`), validated against the `squad-protocol-v2.0-rc1` golden trace (`G1`–`G9`); server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending - **Strict opt-in & byte-preserving rollback** — Existing Copilot-only repos see no extra host files or client-specific `.gitignore` entries unless `--client` is passed; shared JSON, TOML, `.gitignore`, and markdown marker merges preserve formatting and roll back byte-for-byte via `uninstallClients` - **Upstream inheritance is real at runtime** — `squad_state_upstreams` (exposed by `squad state-mcp` to every host) resolves `.squad/upstream.json` from locally synced snapshots only (never fetches at session start), with deterministic precedence (local `.squad/` wins, then declared order, depth-first, depth limit 3), cycle detection, soft failure for missing/stale/unavailable sources and `upstream:@` provenance on every inherited skill, decision, routing rule and casting policy; the canonical coordinator gains an *Upstream Inheritance* section and `squad doctor` / `squad status` show the same resolution - **Bridge fixes** — `squad_state_health` names the backend (`local` / `orphan` / `two-layer`), `squad_state_list` without `dir` lists the root on git-backed backends, and Claude Code declares `background-runs` @@ -54,8 +54,8 @@ Standalone archives now vendor Node.js 22.23.4. The official [Node.js October 21 | Area | Change in 2.0.0 | Migration | |------|-----------------|-----------| -| Client SDK import path | `@bradygaster/squad-sdk/client` is canonical; `@bradygaster/squad-sdk/clients` is a deprecated alias | Update imports to `@bradygaster/squad-sdk/client` | -| Experimental backend exports | `@bradygaster/squad-sdk/backend` is exported only from `./backend` (not the root barrel) | Import `SquadBackend` / `HarnessAdapter` from `@bradygaster/squad-sdk/backend` | +| Client SDK import path | `@squad/sdk/client` is canonical; `@squad/sdk/clients` is a deprecated alias | Update imports to `@squad/sdk/client` | +| Experimental backend exports | `@squad/sdk/backend` is exported only from `./backend` (not the root barrel) | Import `SquadBackend` / `HarnessAdapter` from `@squad/sdk/backend` | | `squad state-mcp` backend tools | `squad_backend_*` tools require `--experimental-backend` or `SQUAD_EXPERIMENTAL_BACKEND=1` (`SQUAD_BACKEND_URL` alone does not enable them) | Pass `--experimental-backend` or set `SQUAD_EXPERIMENTAL_BACKEND=1` | | `DurableHttpSquadBackend` options | Requires an explicit `https://` `baseUrl` (`http://` only for localhost) and does not read `SQUAD_BACKEND_URL` in SDK code | Pass `baseUrl` (and optional `token`) explicitly to `createSquadBackend` / `DurableHttpSquadBackend` | | Static config vs. mutable state | `squad_state_write` rejects static team config (`team.md`, `routing.md`, `config.json`, `charter.md`); `.squad/casting/` must not be hand-edited | Edit static files in the workspace and register roster changes with `npx squad cast --name --role ""` | @@ -79,7 +79,7 @@ Standalone archives now vendor Node.js 22.23.4. The official [Node.js October 21 ## v1.0.0 — Stable Release -- **Stable npm packages** — `@bradygaster/squad-cli` and `@bradygaster/squad-sdk` graduated to 1.0 +- **Stable npm packages** — `@squad/cli` and `@squad/sdk` graduated to 1.0 - **No breaking migration** — v1.0.0 stabilized the existing 0.13.1 API and command surface - **Stable documentation** — Removed the blanket alpha disclaimer while preserving genuine preview and feature-specific warnings @@ -137,7 +137,7 @@ Standalone archives now vendor Node.js 22.23.4. The official [Node.js October 21 ## v0.8.2 - **Version alignment** — CLI (0.8.1) and SDK (0.8.0) snapped to 0.8.2 across all packages -- **Published to npm** — `@bradygaster/squad-sdk@0.8.2` and `@bradygaster/squad-cli@0.8.2` +- **Published to npm** — `@squad/sdk@0.8.2` and `@squad/cli@0.8.2` - **Init flow improvements** — Ralph now included in the initial agent set during `squad init`; routing templates no longer reference `@copilot` by default (#337, #338, #339) - **`--sdk` switch** — `squad init --sdk` generates typed `squad.config.ts` with `useRole()` calls (#424) - **`--roles` opt-in** — `squad init --roles` uses the base role catalog instead of fictional universe casting (#412) @@ -170,7 +170,7 @@ Standalone archives now vendor Node.js 22.23.4. The official [Node.js October 21 The big rewrite. Everything moved to TypeScript with a clean SDK + CLI split. - **Full rewrite** — JavaScript → TypeScript with strict mode, ESM modules, Node.js ≥20 -- **SDK + CLI split** — Two npm packages: `@bradygaster/squad-sdk` (runtime, adapter, resolution) and `@bradygaster/squad-cli` (commands, shell, REPL) +- **SDK + CLI split** — Two npm packages: `@squad/sdk` (runtime, adapter, resolution) and `@squad/cli` (commands, shell, REPL) - **npm workspace** — Monorepo with `packages/squad-sdk` and `packages/squad-cli` - **Interactive shell** — `squad` with no args launches rich REPL with streaming, welcome banner, session registry - **OpenTelemetry integration** — 3-layer API (low-level otel.ts, bridge otel-bridge.ts, init otel-init.ts), SquadObserver file watcher, Aspire dashboard support @@ -197,7 +197,7 @@ The big rewrite. Everything moved to TypeScript with a clean SDK + CLI split. - **Initial replatform** — First working TypeScript build - **CLI commands** — init, upgrade, shell, doctor, link -- **npm distribution** — `npm install @bradygaster/squad-cli` +- **npm distribution** — `npm install @squad/cli` - **Branch protection** — `main` requires PR + build check - **Changesets** — Infrastructure for independent package versioning diff --git a/docs/src/navigation.ts b/docs/src/navigation.ts index 9d4af0ca8..2722b92fc 100644 --- a/docs/src/navigation.ts +++ b/docs/src/navigation.ts @@ -132,6 +132,7 @@ export const NAV_SECTIONS: NavSection[] = [ { title: 'Release Process', slug: 'scenarios/release-process' }, { title: 'Upgrading', slug: 'scenarios/upgrading' }, { title: 'Migration Guide', slug: 'get-started/migration' }, + { title: 'Package Rename', slug: 'get-started/package-rename' }, { title: 'Private Repos', slug: 'scenarios/private-repos' }, { title: 'Cross-Org Auth', slug: 'scenarios/cross-org-auth' }, { title: 'Team Portability', slug: 'scenarios/team-portability' }, diff --git a/docs/src/pages/index.astro b/docs/src/pages/index.astro index 655a226a5..05add2e74 100644 --- a/docs/src/pages/index.astro +++ b/docs/src/pages/index.astro @@ -26,7 +26,7 @@ const features = [ ]; const steps = [ - { title: 'Install', body: 'One global install, zero config files required.', cmd: 'npm i -g @bradygaster/squad-cli' }, + { title: 'Install', body: 'One global install, zero config files required.', cmd: 'npm i -g @squad/cli' }, { title: 'Initialize', body: 'Describe your project and Squad generates a team you direct.', cmd: 'squad init' }, { title: 'Build', body: 'Talk to your team — they help you build, test, and prepare changes for review.', cmd: 'copilot --agent squad' }, ]; @@ -74,7 +74,7 @@ const docs = [
- npm i -g @bradygaster/squad-cli + npm i -g @squad/cli @@ -214,7 +214,7 @@ const docs = [ const copyBtn = document.getElementById('copy-install'); if (copyBtn) { copyBtn.onclick = async () => { - await navigator.clipboard.writeText('npm i -g @bradygaster/squad-cli'); + await navigator.clipboard.writeText('npm i -g @squad/cli'); const original = copyBtn.innerHTML; copyBtn.setAttribute('aria-label', 'Copied'); copyBtn.innerHTML = ''; diff --git a/docs/tutorials/durable-backend-and-custom-harness.md b/docs/tutorials/durable-backend-and-custom-harness.md index 8cc1a4cce..6861d835a 100644 --- a/docs/tutorials/durable-backend-and-custom-harness.md +++ b/docs/tutorials/durable-backend-and-custom-harness.md @@ -1,6 +1,6 @@ # Durable backend and custom harness tutorial -> **Experimental Preview — Bring Your Own Server:** `@bradygaster/squad-sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. +> **Experimental Preview — Bring Your Own Server:** `@squad/sdk/backend` is an experimental extension contract (`BACKEND_CONTRACT_STAGE = 'experimental'`). Squad ships the `SquadBackend` / `HarnessAdapter` interfaces, the local file/state-store backend, and the outbound `durable-http` client — it does **not** bundle a remote DurableSquad server, and server-side DurableSquad Phase 2 integration (remote durable approvals and lease-epoch coordination) is pending. Use `durable-http` when connecting to your own external or managed `/v1/conversations` server. > **Canonical Published Docs:** See [Squad 2.0 architecture](../src/content/docs/concepts/squad-2-0-architecture.md) and the [SDK Reference](../src/content/docs/reference/sdk.md) on the published Astro docs site for the architectural overview and API surface. @@ -38,7 +38,7 @@ import { createSquadBackend, type BackendMessage, type ProtocolHello, -} from '@bradygaster/squad-sdk/backend'; +} from '@squad/sdk/backend'; const baseUrl = process.env.SQUAD_BACKEND_URL; if (!baseUrl) throw new Error('SQUAD_BACKEND_URL is required'); @@ -111,7 +111,7 @@ import { type HarnessDescriptor, type HarnessEventEnvelope, type HarnessSubmission, -} from '@bradygaster/squad-sdk/backend'; +} from '@squad/sdk/backend'; import path from 'node:path'; diff --git a/docs/tutorials/multi-client-quickstart.md b/docs/tutorials/multi-client-quickstart.md index bed255d92..33d7ba0a9 100644 --- a/docs/tutorials/multi-client-quickstart.md +++ b/docs/tutorials/multi-client-quickstart.md @@ -2,7 +2,7 @@ > **Canonical Published Guide:** See [Using Squad across clients](../src/content/docs/scenarios/using-squad-across-clients.md) and [Squad 2.0 architecture](../src/content/docs/concepts/squad-2-0-architecture.md) on the published Astro docs site for the complete multi-client guide and architecture reference. -The `--client` flag on `squad init` and `squad upgrade` (backed by `@bradygaster/squad-sdk/client`; `@bradygaster/squad-sdk/clients` is a deprecated alias) projects native coordinator and MCP files for all **7 supported hosts**: GitHub Copilot, Claude Code, Kiro, OpenCode, Cursor, OpenAI Codex, and Google Antigravity (`copilot|claude|kiro|opencode|cursor|codex|antigravity|all`). +The `--client` flag on `squad init` and `squad upgrade` (backed by `@squad/sdk/client`; `@squad/sdk/clients` is a deprecated alias) projects native coordinator and MCP files for all **7 supported hosts**: GitHub Copilot, Claude Code, Kiro, OpenCode, Cursor, OpenAI Codex, and Google Antigravity (`copilot|claude|kiro|opencode|cursor|codex|antigravity|all`). ## Host projection summary @@ -83,10 +83,10 @@ npx squad init --client all npx squad upgrade --client copilot,claude,cursor,codex,antigravity ``` -`.squad/config.json` stores only portable canonical slugs in `clients[]` (enforced by `normalizeClientIds()` and `assertPortableClients()` in `@bradygaster/squad-sdk/client`), and shared JSON/TOML MCP configs are merged additively without overwriting existing servers. +`.squad/config.json` stores only portable canonical slugs in `clients[]` (enforced by `normalizeClientIds()` and `assertPortableClients()` in `@squad/sdk/client`), and shared JSON/TOML MCP configs are merged additively without overwriting existing servers. ```ts -import { installClients, parseClients } from '@bradygaster/squad-sdk/client'; +import { installClients, parseClients } from '@squad/sdk/client'; installClients(parseClients('claude,cursor,codex'), { root: process.cwd(), diff --git a/package-lock.json b/package-lock.json index b13b5c8ee..ed8390910 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "packages/*" ], "dependencies": { - "@bradygaster/squad-sdk": "file:packages/squad-sdk" + "@squad/sdk": "file:packages/squad-sdk" }, "devDependencies": { "@opentelemetry/api": "^1.9.0", @@ -124,14 +124,6 @@ "node": ">=18" } }, - "node_modules/@bradygaster/squad-cli": { - "resolved": "packages/squad-cli", - "link": true - }, - "node_modules/@bradygaster/squad-sdk": { - "resolved": "packages/squad-sdk", - "link": true - }, "node_modules/@cacheable/memory": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", @@ -2542,6 +2534,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@squad/cli": { + "resolved": "packages/squad-cli", + "link": true + }, + "node_modules/@squad/sdk": { + "resolved": "packages/squad-sdk", + "link": true + }, "node_modules/@types/chai": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", @@ -8194,13 +8194,13 @@ } }, "packages/squad-cli": { - "name": "@bradygaster/squad-cli", + "name": "@squad/cli", "version": "2.0.0", "hasInstallScript": true, "license": "MIT", "dependencies": { - "@bradygaster/squad-sdk": ">=2.0.0", "@modelcontextprotocol/sdk": "^1.32.1", + "@squad/sdk": ">=2.0.0", "ink": "^7.1.1", "jsonc-parser": "^3.3.1", "react": "^19.3.0", @@ -8235,7 +8235,7 @@ } }, "packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "2.0.0", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 9ff470cc5..de6526c19 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "packages/*" ], "dependencies": { - "@bradygaster/squad-sdk": "file:packages/squad-sdk" + "@squad/sdk": "file:packages/squad-sdk" }, "overrides": { - "@bradygaster/squad-cli": { - "@bradygaster/squad-sdk": "$@bradygaster/squad-sdk" + "@squad/cli": { + "@squad/sdk": "$@squad/sdk" } }, "scripts": { diff --git a/packages/squad-cli/README.md b/packages/squad-cli/README.md index 1e0d834fb..bbcbe3352 100644 --- a/packages/squad-cli/README.md +++ b/packages/squad-cli/README.md @@ -1,4 +1,4 @@ -# @bradygaster/squad-cli +# @squad/cli The programmable multi-agent CLI for GitHub Copilot. Build an AI team, assign roles, and let them work your repo—automating issue triage, code review, documentation, and more through orchestrated AI agents. @@ -20,18 +20,20 @@ registry. ```bash # Global (recommended) -npm install -g @bradygaster/squad-cli@latest +npm install -g @squad/cli@latest # Project-local -npm install --save-dev @bradygaster/squad-cli +npm install --save-dev @squad/cli # Preview channel -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview # Insider channel (pre-release builds) -npm install -g @bradygaster/squad-cli@insider +npm install -g @squad/cli@insider ``` +Upgrading from `@bradygaster/squad-cli`? Run `npm uninstall -g @bradygaster/squad-cli` first, since both packages provide the `squad` command. See the [Package Rename guide](https://github.github.com/squad/docs/get-started/package-rename/). + ### Install without npm **macOS with Homebrew:** @@ -398,7 +400,7 @@ ensure your Node.js version is 22.5 or later. - **Documentation:** [docs.squad.ai](https://docs.squad.ai) - **CLI Reference:** [docs.squad.ai/reference/cli](https://docs.squad.ai/reference/cli) — detailed command docs -- **SDK:** [@bradygaster/squad-sdk](https://www.npmjs.com/package/@bradygaster/squad-sdk) — programmatic API +- **SDK:** [@squad/sdk](https://www.npmjs.com/package/@squad/sdk) — programmatic API - **GitHub:** [github.com/github/squad](https://github.com/github/squad) - **Issues:** [github.com/github/squad/issues](https://github.com/github/squad/issues) diff --git a/packages/squad-cli/package.json b/packages/squad-cli/package.json index e32de0089..ea68a13fc 100644 --- a/packages/squad-cli/package.json +++ b/packages/squad-cli/package.json @@ -1,5 +1,5 @@ { - "name": "@bradygaster/squad-cli", + "name": "@squad/cli", "version": "2.0.0", "description": "Squad CLI — Command-line interface for the Squad multi-agent runtime", "type": "module", @@ -179,7 +179,7 @@ "node": ">=22.5.0" }, "dependencies": { - "@bradygaster/squad-sdk": ">=2.0.0", + "@squad/sdk": ">=2.0.0", "@modelcontextprotocol/sdk": "^1.32.1", "ink": "^7.1.1", "react": "^19.3.0", diff --git a/packages/squad-cli/src/cli-entry.ts b/packages/squad-cli/src/cli-entry.ts index 4e058855a..9448fe41a 100644 --- a/packages/squad-cli/src/cli-entry.ts +++ b/packages/squad-cli/src/cli-entry.ts @@ -89,8 +89,8 @@ function _handleTopLevelSignal(signal: 'SIGINT' | 'SIGTERM'): void { process.on('SIGINT', () => _handleTopLevelSignal('SIGINT')); process.on('SIGTERM', () => _handleTopLevelSignal('SIGTERM')); -import { FSStorageProvider, resolveSquadState } from '@bradygaster/squad-sdk'; -import type { SquadStateContext, StateBackendType } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, resolveSquadState } from '@squad/sdk'; +import type { SquadStateContext, StateBackendType } from '@squad/sdk'; import path from 'node:path'; import { fatal, fatalNoSquad, SquadError } from './cli/core/errors.js'; import { BOLD, RESET, DIM, RED, GREEN, YELLOW } from './cli/core/output.js'; @@ -101,7 +101,7 @@ import { printCommandHelp, printGenericCommandHelp } from './cli/core/command-he // Lazy-load squad-sdk to avoid triggering @github/copilot-sdk import on Node 24+ // (Issue: copilot-sdk has broken ESM imports - vscode-jsonrpc/node without .js extension) -const lazySquadSdk = () => import('@bradygaster/squad-sdk'); +const lazySquadSdk = () => import('@squad/sdk'); const lazyRunShell = () => import('./cli/shell/index.js'); // Use local version resolver instead of importing VERSION from squad-sdk @@ -304,8 +304,8 @@ async function main(): Promise { console.log(` ${BOLD}--economy${RESET} Activate economy mode for this session (cheaper models)`); console.log(` ${BOLD}--team-root${RESET} Override team root path for resolution`); console.log(`\nInstallation:`); - console.log(` npm install --save-dev @bradygaster/squad-cli`); - console.log(` npm install --save-dev @bradygaster/squad-cli@insider\n`); + console.log(` npm install --save-dev @squad/cli`); + console.log(` npm install --save-dev @squad/cli@insider\n`); return; } @@ -390,8 +390,8 @@ async function main(): Promise { const initStateBackend = (sbIdx !== -1 && args[sbIdx + 1]) ? args[sbIdx + 1] : undefined; runInit(dest, { includeWorkflows: !noWorkflows, sdk, roles, stateBackend: initStateBackend, mcpFrontmatter, clients: initClients, claudePlugin: initClaudePlugin, includeVscodeDefault: !noVscodeDefault }).then(async () => { if (presetName) { - const { seedBuiltinPresets, applyPreset } = await import('@bradygaster/squad-sdk/presets'); - const { resolvePresetsDir, ensureSquadHome } = await import('@bradygaster/squad-sdk/resolution'); + const { seedBuiltinPresets, applyPreset } = await import('@squad/sdk/presets'); + const { resolvePresetsDir, ensureSquadHome } = await import('@squad/sdk/resolution'); const nodePath = await import('node:path'); // Auto-initialize squad home + presets if they don't exist yet @@ -843,7 +843,7 @@ async function main(): Promise { if (args.includes('--init')) { const fileIdx = args.indexOf('--file'); const filePath = (fileIdx !== -1 && args[fileIdx + 1]) ? args[fileIdx + 1]! : 'loop.md'; - const { FSStorageProvider } = await import('@bradygaster/squad-sdk'); + const { FSStorageProvider } = await import('@squad/sdk'); const storage = new FSStorageProvider(); const pathMod = await import('node:path'); const absPath = pathMod.default.resolve(getSquadStartDir(), filePath); diff --git a/packages/squad-cli/src/cli/commands/build.ts b/packages/squad-cli/src/cli/commands/build.ts index e974ef2e0..646fab98f 100644 --- a/packages/squad-cli/src/cli/commands/build.ts +++ b/packages/squad-cli/src/cli/commands/build.ts @@ -20,7 +20,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { pathToFileURL } from 'node:url'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { success, warn, info, dim, BOLD, RESET, YELLOW, GREEN, RED } from '../core/output.js'; import { fatal } from '../core/errors.js'; import { effectiveSquadDir } from '../core/effective-squad-dir.js'; @@ -31,8 +31,8 @@ import type { CeremonyDefinition, ModelPreference, BuilderModelId, -} from '@bradygaster/squad-sdk'; -import type { SkillDefinition as BuilderSkillDefinition } from '@bradygaster/squad-sdk/builders'; +} from '@squad/sdk'; +import type { SkillDefinition as BuilderSkillDefinition } from '@squad/sdk/builders'; // --------------------------------------------------------------------------- // Constants diff --git a/packages/squad-cli/src/cli/commands/cast.ts b/packages/squad-cli/src/cli/commands/cast.ts index 50bd196d6..ec1a15a96 100644 --- a/packages/squad-cli/src/cli/commands/cast.ts +++ b/packages/squad-cli/src/cli/commands/cast.ts @@ -13,16 +13,16 @@ import { generateCharterFromRole, getRoleById, syncTeamCapabilities, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import { acquireCastingRegistryLockAsync, commitCastingRegistryPair, prepareCastingRegistryPairLocked, recoverCastingRegistryTransaction, reconcileAgentProvenanceRegistry, -} from '@bradygaster/squad-sdk/casting'; -import { LocalAgentSource } from '@bradygaster/squad-sdk/config/agent-source'; -import { resolveSquadPaths, resolveExternalStateDir } from '@bradygaster/squad-sdk/resolution'; +} from '@squad/sdk/casting'; +import { LocalAgentSource } from '@squad/sdk/config/agent-source'; +import { resolveSquadPaths, resolveExternalStateDir } from '@squad/sdk/resolution'; import { BOLD, RESET, info, success } from '../core/output.js'; import { fatal, fatalNoSquad } from '../core/errors.js'; import { ensureBuiltinSupportSection } from '../core/cast.js'; diff --git a/packages/squad-cli/src/cli/commands/client.ts b/packages/squad-cli/src/cli/commands/client.ts index f9dfe2ebd..b4b53300e 100644 --- a/packages/squad-cli/src/cli/commands/client.ts +++ b/packages/squad-cli/src/cli/commands/client.ts @@ -18,7 +18,7 @@ import { projectClients, type ClientId, type ProjectionFile, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; import { linkedTeamDir, readClientFlag, readConfiguredClients, readUnknownConfiguredClients, syncClients, reportClientResults, parseClients } from '../core/clients.js'; import { detectSquadDir } from '../core/detect-squad-dir.js'; import { projectSquadStateMcpSpec, resolveCommittedSquadStateMcpSpec } from '../core/mcp-spec.js'; diff --git a/packages/squad-cli/src/cli/commands/config.ts b/packages/squad-cli/src/cli/commands/config.ts index 8ba13142b..399574865 100644 --- a/packages/squad-cli/src/cli/commands/config.ts +++ b/packages/squad-cli/src/cli/commands/config.ts @@ -27,9 +27,9 @@ import { writeAgentContextTierOverrides, VALID_CONTEXT_TIERS, MODEL_CATALOG, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { fatal, fatalNoSquad } from '../core/errors.js'; -import { resolveSquad } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquad } from '@squad/sdk/resolution'; import { BOLD, RESET, GREEN, DIM, RED, YELLOW } from '../core/output.js'; // The SDK resolver is the only squad locator: it stops at the repository root and never diff --git a/packages/squad-cli/src/cli/commands/copilot.ts b/packages/squad-cli/src/cli/commands/copilot.ts index 96e603e14..d522edc7b 100644 --- a/packages/squad-cli/src/cli/commands/copilot.ts +++ b/packages/squad-cli/src/cli/commands/copilot.ts @@ -4,7 +4,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); import { success, dim, bold, info, BOLD, RESET, DIM } from '../core/output.js'; diff --git a/packages/squad-cli/src/cli/commands/cost.ts b/packages/squad-cli/src/cli/commands/cost.ts index b436a75e8..f70fb01bd 100644 --- a/packages/squad-cli/src/cli/commands/cost.ts +++ b/packages/squad-cli/src/cli/commands/cost.ts @@ -5,7 +5,7 @@ import { type UsageLedgerReadResult, type UsageLedgerRecord, type UsageLedgerTurnStart, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import { fatal } from '../core/errors.js'; interface CostArgs { diff --git a/packages/squad-cli/src/cli/commands/cross-squad.ts b/packages/squad-cli/src/cli/commands/cross-squad.ts index 78cd9ac23..e32688d38 100644 --- a/packages/squad-cli/src/cli/commands/cross-squad.ts +++ b/packages/squad-cli/src/cli/commands/cross-squad.ts @@ -27,7 +27,7 @@ import { addRegistryEntry, removeRegistryEntry, type DiscoveredSquad, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; const execFileAsync = promisify(execFile); diff --git a/packages/squad-cli/src/cli/commands/doctor.ts b/packages/squad-cli/src/cli/commands/doctor.ts index 8df11ad03..b15e8f577 100644 --- a/packages/squad-cli/src/cli/commands/doctor.ts +++ b/packages/squad-cli/src/cli/commands/doctor.ts @@ -13,13 +13,13 @@ import path from 'node:path'; import { lstatSync, readFileSync, readdirSync, realpathSync, type Dirent } from 'node:fs'; import { exec, execFileSync } from 'node:child_process'; -import { FSStorageProvider, resolveStateBackend, type StateBackendType } from '@bradygaster/squad-sdk'; -import { detectHistoricalCastingSchema, readCastingRegistryPair } from '@bradygaster/squad-sdk/casting'; -import { resolveSquad, resolveSquadPaths, clearResolveSquadCache } from '@bradygaster/squad-sdk/resolution'; +import { FSStorageProvider, resolveStateBackend, type StateBackendType } from '@squad/sdk'; +import { detectHistoricalCastingSchema, readCastingRegistryPair } from '@squad/sdk/casting'; +import { resolveSquad, resolveSquadPaths, clearResolveSquadCache } from '@squad/sdk/resolution'; import { fatalNoSquad } from '../core/errors.js'; -import { isMutableStateKey, MUTABLE_STATE_PATHS } from '@bradygaster/squad-sdk/tools'; -import { resolveUpstreams } from '@bradygaster/squad-sdk/upstream'; -import { squadRepoLauncherScript } from '@bradygaster/squad-sdk/client'; +import { isMutableStateKey, MUTABLE_STATE_PATHS } from '@squad/sdk/tools'; +import { resolveUpstreams } from '@squad/sdk/upstream'; +import { squadRepoLauncherScript } from '@squad/sdk/client'; import { effectiveSquadDir } from '../core/effective-squad-dir.js'; import { getPackageVersion } from '../core/version.js'; import { @@ -709,7 +709,7 @@ export async function checkSquadStateBridge(cwd: string): Promise { return { name, status: 'fail', - message: `registry mirror cannot resolve the configured dist-tag. Pin @bradygaster/squad-cli@${expectedVersion} exactly, or ${fix.toLowerCase()}`, + message: `registry mirror cannot resolve the configured dist-tag. Pin @squad/cli@${expectedVersion} exactly, or ${fix.toLowerCase()}`, }; } return { diff --git a/packages/squad-cli/src/cli/commands/economy.ts b/packages/squad-cli/src/cli/commands/economy.ts index dc8468d4b..0441c8155 100644 --- a/packages/squad-cli/src/cli/commands/economy.ts +++ b/packages/squad-cli/src/cli/commands/economy.ts @@ -8,9 +8,9 @@ */ import { join } from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; -import { resolveSquad } from '@bradygaster/squad-sdk/resolution'; -import { writeEconomyMode, readEconomyMode } from '@bradygaster/squad-sdk/config'; +import { FSStorageProvider } from '@squad/sdk'; +import { resolveSquad } from '@squad/sdk/resolution'; +import { writeEconomyMode, readEconomyMode } from '@squad/sdk/config'; const storage = new FSStorageProvider(); import { fatal, fatalNoSquad } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/export.ts b/packages/squad-cli/src/cli/commands/export.ts index fa7f2ddd0..73b6d65b5 100644 --- a/packages/squad-cli/src/cli/commands/export.ts +++ b/packages/squad-cli/src/cli/commands/export.ts @@ -4,9 +4,9 @@ */ import path from 'node:path'; -import { FSStorageProvider, exportToRepo, parseRepoString } from '@bradygaster/squad-sdk'; -import { readCastingRegistryPair } from '@bradygaster/squad-sdk/casting'; -import type { RepoSpec } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, exportToRepo, parseRepoString } from '@squad/sdk'; +import { readCastingRegistryPair } from '@squad/sdk/casting'; +import type { RepoSpec } from '@squad/sdk'; import { effectiveSquadDir } from '../core/effective-squad-dir.js'; import { success, warn, info } from '../core/output.js'; import { fatal, fatalNoSquad } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/externalize.ts b/packages/squad-cli/src/cli/commands/externalize.ts index 8ba45382d..0eb8fae09 100644 --- a/packages/squad-cli/src/cli/commands/externalize.ts +++ b/packages/squad-cli/src/cli/commands/externalize.ts @@ -16,7 +16,7 @@ import path from 'node:path'; import { writeFileSync } from 'node:fs'; -import { FSStorageProvider, resolveExternalStateDir, deriveProjectKey } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, resolveExternalStateDir, deriveProjectKey } from '@squad/sdk'; import { fatal } from '../core/errors.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/health.ts b/packages/squad-cli/src/cli/commands/health.ts index 68eaac75c..dcb984e01 100644 --- a/packages/squad-cli/src/cli/commands/health.ts +++ b/packages/squad-cli/src/cli/commands/health.ts @@ -14,13 +14,13 @@ import { verifyStateBackend, type StateBackend, type StateBackendType, -} from '@bradygaster/squad-sdk'; -import { parseCharterMarkdown } from '@bradygaster/squad-sdk/agents'; -import { readCastingRegistryPair } from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk'; +import { parseCharterMarkdown } from '@squad/sdk/agents'; +import { readCastingRegistryPair } from '@squad/sdk/casting'; import { parseRoutingRulesMarkdown, parseTeamMarkdown, -} from '@bradygaster/squad-sdk/parsers'; +} from '@squad/sdk/parsers'; import { effectiveSquadDir } from '../core/effective-squad-dir.js'; import { getPackageVersion } from '../core/version.js'; diff --git a/packages/squad-cli/src/cli/commands/hook.ts b/packages/squad-cli/src/cli/commands/hook.ts index 1d312a344..681e021c9 100644 --- a/packages/squad-cli/src/cli/commands/hook.ts +++ b/packages/squad-cli/src/cli/commands/hook.ts @@ -5,8 +5,8 @@ * Reads the hook event JSON on stdin and prints advisory JSON output. It never blocks: any error * prints nothing and exits 0, so a broken hook cannot stop a session. */ -import { resolveSquadState } from '@bradygaster/squad-sdk'; -import { CLAUDE_HOOK_EVENTS, runClaudeHook } from '@bradygaster/squad-sdk/client'; +import { resolveSquadState } from '@squad/sdk'; +import { CLAUDE_HOOK_EVENTS, runClaudeHook } from '@squad/sdk/client'; import { getPackageVersion } from '../core/version.js'; const STDIN_TIMEOUT_MS = 5_000; diff --git a/packages/squad-cli/src/cli/commands/import.ts b/packages/squad-cli/src/cli/commands/import.ts index 90920b726..5ad23805f 100644 --- a/packages/squad-cli/src/cli/commands/import.ts +++ b/packages/squad-cli/src/cli/commands/import.ts @@ -4,14 +4,14 @@ */ import path from 'node:path'; -import { FSStorageProvider, importFromRepo, parseRepoString } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, importFromRepo, parseRepoString } from '@squad/sdk'; import { acquireCastingRegistryLock, commitCastingRegistryPair, prepareCastingRegistryPairLocked, validateCastingRegistryPairForCommit, -} from '@bradygaster/squad-sdk/casting'; -import type { RepoSpec } from '@bradygaster/squad-sdk'; +} from '@squad/sdk/casting'; +import type { RepoSpec } from '@squad/sdk'; import { detectSquadDir } from '../core/detect-squad-dir.js'; import { success, warn, info } from '../core/output.js'; import { fatal } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/init-remote.ts b/packages/squad-cli/src/cli/commands/init-remote.ts index f5e69be22..fb54cf78f 100644 --- a/packages/squad-cli/src/cli/commands/init-remote.ts +++ b/packages/squad-cli/src/cli/commands/init-remote.ts @@ -10,7 +10,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { fatal } from '../core/errors.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/install-hooks.ts b/packages/squad-cli/src/cli/commands/install-hooks.ts index fa80ce13d..3a74695e6 100644 --- a/packages/squad-cli/src/cli/commands/install-hooks.ts +++ b/packages/squad-cli/src/cli/commands/install-hooks.ts @@ -14,7 +14,7 @@ import { execFileSync } from 'node:child_process'; import path from 'node:path'; import fs from 'node:fs'; -import { addSquadStateGitignoreBlock, FSStorageProvider } from '@bradygaster/squad-sdk'; +import { addSquadStateGitignoreBlock, FSStorageProvider } from '@squad/sdk'; const GREEN = '\x1b[32m'; const YELLOW = '\x1b[33m'; diff --git a/packages/squad-cli/src/cli/commands/link.ts b/packages/squad-cli/src/cli/commands/link.ts index c3946ce0f..8c0f23dcd 100644 --- a/packages/squad-cli/src/cli/commands/link.ts +++ b/packages/squad-cli/src/cli/commands/link.ts @@ -10,7 +10,7 @@ */ import path from 'node:path'; -import { FSStorageProvider, clearResolveSquadCache } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, clearResolveSquadCache } from '@squad/sdk'; import { fatal } from '../core/errors.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/lockout.ts b/packages/squad-cli/src/cli/commands/lockout.ts index 7202822df..9aaed741a 100644 --- a/packages/squad-cli/src/cli/commands/lockout.ts +++ b/packages/squad-cli/src/cli/commands/lockout.ts @@ -2,7 +2,7 @@ * `squad lockout`: record reviewer-lockout transitions (governance-review v0.1 §6) in * `/governance/lockouts.json`, which the Claude Code PreToolUse hook reads. */ -import { resolveSquadState } from '@bradygaster/squad-sdk'; +import { resolveSquadState } from '@squad/sdk'; import { LockoutError, approveRevision, @@ -17,7 +17,7 @@ import { submitRevision, updateLockouts, type LockoutStore, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; const USAGE = `Usage: squad lockout [options] diff --git a/packages/squad-cli/src/cli/commands/loop.ts b/packages/squad-cli/src/cli/commands/loop.ts index fa51e10e8..dfb73b378 100644 --- a/packages/squad-cli/src/cli/commands/loop.ts +++ b/packages/squad-cli/src/cli/commands/loop.ts @@ -22,8 +22,8 @@ import { import { buildCustomAgentCommand } from './watch/agent-spawn.js'; import type { WatchCapability, WatchContext, WatchPhase, CapabilityResult } from './watch/types.js'; import type { WatchConfig } from './watch/config.js'; -import { createPlatformAdapter } from '@bradygaster/squad-sdk/platform'; -import { parseRoster } from '@bradygaster/squad-sdk/ralph/triage'; +import { createPlatformAdapter } from '@squad/sdk/platform'; +import { parseRoster } from '@squad/sdk/ralph/triage'; // ── Types ──────────────────────────────────────────────────────── diff --git a/packages/squad-cli/src/cli/commands/memory.ts b/packages/squad-cli/src/cli/commands/memory.ts index 89d57f0db..ea44bcfbb 100644 --- a/packages/squad-cli/src/cli/commands/memory.ts +++ b/packages/squad-cli/src/cli/commands/memory.ts @@ -4,7 +4,7 @@ import { type MemoryClass, type MemoryLoadGuidance, type SquadStateContext, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import fs from 'node:fs'; import path from 'node:path'; import { SquadError } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/migrate-backend.ts b/packages/squad-cli/src/cli/commands/migrate-backend.ts index d08a9883e..5c8548325 100644 --- a/packages/squad-cli/src/cli/commands/migrate-backend.ts +++ b/packages/squad-cli/src/cli/commands/migrate-backend.ts @@ -19,8 +19,8 @@ import { execFileSync } from 'node:child_process'; import path from 'node:path'; import fs from 'node:fs'; import { installGitHooks, ensureHooksForBackend } from './install-hooks.js'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; -import { addSquadStateGitignoreBlock, removeSquadStateGitignoreBlock } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; +import { addSquadStateGitignoreBlock, removeSquadStateGitignoreBlock } from '@squad/sdk'; const GREEN = '\x1b[32m'; const YELLOW = '\x1b[33m'; diff --git a/packages/squad-cli/src/cli/commands/migrate.ts b/packages/squad-cli/src/cli/commands/migrate.ts index 952a4689d..74473e147 100644 --- a/packages/squad-cli/src/cli/commands/migrate.ts +++ b/packages/squad-cli/src/cli/commands/migrate.ts @@ -4,7 +4,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); import { success, warn, dim, bold, BOLD, RESET, DIM } from '../core/output.js'; @@ -15,7 +15,7 @@ import type { TeamDefinition, RoutingDefinition, CastingDefinition, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; export interface MigrateOptions { to?: 'sdk' | 'markdown'; @@ -290,7 +290,7 @@ function generateSquadConfig( if (casting) { lines.push(" defineCasting,"); } - lines.push("} from '@bradygaster/squad-sdk';"); + lines.push("} from '@squad/sdk';"); lines.push(""); lines.push("/**"); lines.push(" * Squad Configuration"); diff --git a/packages/squad-cli/src/cli/commands/models.ts b/packages/squad-cli/src/cli/commands/models.ts index 7f1bef5cb..fd26ad29c 100644 --- a/packages/squad-cli/src/cli/commands/models.ts +++ b/packages/squad-cli/src/cli/commands/models.ts @@ -23,7 +23,7 @@ import { execFile } from 'node:child_process'; import { promisify } from 'node:util'; import { join } from 'node:path'; import { mkdir, writeFile } from 'node:fs/promises'; -import { MODEL_CATALOG, type ModelInfo, type GitHubModelCategory } from '@bradygaster/squad-sdk/config'; +import { MODEL_CATALOG, type ModelInfo, type GitHubModelCategory } from '@squad/sdk/config'; import { BOLD, RESET, GREEN, DIM, YELLOW } from '../core/output.js'; const execFileAsync = promisify(execFile); diff --git a/packages/squad-cli/src/cli/commands/notes.ts b/packages/squad-cli/src/cli/commands/notes.ts index 171173000..57e99e8c8 100644 --- a/packages/squad-cli/src/cli/commands/notes.ts +++ b/packages/squad-cli/src/cli/commands/notes.ts @@ -19,8 +19,8 @@ import { execFileSync } from 'node:child_process'; import * as path from 'node:path'; -import { resolveStateBackend, TwoLayerBackend, type PromoteNotesResult } from '@bradygaster/squad-sdk'; -import { resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { resolveStateBackend, TwoLayerBackend, type PromoteNotesResult } from '@squad/sdk'; +import { resolveSquadPaths } from '@squad/sdk/resolution'; import { BOLD, RESET, DIM, GREEN, YELLOW, RED } from '../core/output.js'; import { fatal, fatalNoSquad } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/plugin.ts b/packages/squad-cli/src/cli/commands/plugin.ts index eefab8028..05d6f8bce 100644 --- a/packages/squad-cli/src/cli/commands/plugin.ts +++ b/packages/squad-cli/src/cli/commands/plugin.ts @@ -28,7 +28,7 @@ import { type InstalledPluginFile, type PluginComponentKind, type PluginInstallPlanFile, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import { success, warn, info, dim, DIM, BOLD, RESET } from '../core/output.js'; import { fatal } from '../core/errors.js'; import { effectiveSquadDir } from '../core/effective-squad-dir.js'; diff --git a/packages/squad-cli/src/cli/commands/preset.ts b/packages/squad-cli/src/cli/commands/preset.ts index 0a329e669..116063620 100644 --- a/packages/squad-cli/src/cli/commands/preset.ts +++ b/packages/squad-cli/src/cli/commands/preset.ts @@ -22,9 +22,9 @@ import path from 'node:path'; import { execSync } from 'node:child_process'; import fs from 'node:fs'; -import { resolveSquadHome, ensureSquadHome, resolvePresetsDir } from '@bradygaster/squad-sdk/resolution'; -import { listPresets, loadPreset, applyPreset, savePreset, seedBuiltinPresets, installPresetFromSource } from '@bradygaster/squad-sdk/presets'; -import { resolveSquad } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquadHome, ensureSquadHome, resolvePresetsDir } from '@squad/sdk/resolution'; +import { listPresets, loadPreset, applyPreset, savePreset, seedBuiltinPresets, installPresetFromSource } from '@squad/sdk/presets'; +import { resolveSquad } from '@squad/sdk/resolution'; import { success, warn, info, BOLD, RESET, DIM } from '../core/output.js'; import { fatal } from '../core/errors.js'; diff --git a/packages/squad-cli/src/cli/commands/rc.ts b/packages/squad-cli/src/cli/commands/rc.ts index 2da4f3764..2fb1b560a 100644 --- a/packages/squad-cli/src/cli/commands/rc.ts +++ b/packages/squad-cli/src/cli/commands/rc.ts @@ -9,10 +9,10 @@ import path from 'node:path'; // createReadStream retained — streaming not in StorageProvider scope import { createReadStream } from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { FSStorageProvider, RemoteBridge } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, RemoteBridge } from '@squad/sdk'; const storage = new FSStorageProvider(); -import type { RemoteBridgeConfig } from '@bradygaster/squad-sdk'; +import type { RemoteBridgeConfig } from '@squad/sdk'; import { resolveStateDir } from '../core/effective-squad-dir.js'; import { isDevtunnelAvailable, diff --git a/packages/squad-cli/src/cli/commands/roles.ts b/packages/squad-cli/src/cli/commands/roles.ts index f6748d220..6f213594e 100644 --- a/packages/squad-cli/src/cli/commands/roles.ts +++ b/packages/squad-cli/src/cli/commands/roles.ts @@ -1,4 +1,4 @@ -import { listRoles, searchRoles, getCategories } from '@bradygaster/squad-sdk'; +import { listRoles, searchRoles, getCategories } from '@squad/sdk'; type RoleRecord = ReturnType[number]; diff --git a/packages/squad-cli/src/cli/commands/schedule.ts b/packages/squad-cli/src/cli/commands/schedule.ts index 989d9b708..aafbc38f6 100644 --- a/packages/squad-cli/src/cli/commands/schedule.ts +++ b/packages/squad-cli/src/cli/commands/schedule.ts @@ -9,18 +9,18 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); import { detectSquadDir } from '../core/detect-squad-dir.js'; import { success, warn, info, secondary, BOLD, RESET, GREEN, YELLOW, RED, GRAY, DIM } from '../core/output.js'; import { fatal } from '../core/errors.js'; -import type { ScheduleManifest, ScheduleState, ScheduleEntry, ScheduleProvider } from '@bradygaster/squad-sdk/runtime/scheduler'; +import type { ScheduleManifest, ScheduleState, ScheduleEntry, ScheduleProvider } from '@squad/sdk/runtime/scheduler'; // Re-export so tests can mock through this module async function loadSchedulerModule() { - return import('@bradygaster/squad-sdk/runtime/scheduler'); + return import('@squad/sdk/runtime/scheduler'); } function resolveSchedulePath(cwd: string): string { diff --git a/packages/squad-cli/src/cli/commands/start.ts b/packages/squad-cli/src/cli/commands/start.ts index 35c574f60..00d18113f 100644 --- a/packages/squad-cli/src/cli/commands/start.ts +++ b/packages/squad-cli/src/cli/commands/start.ts @@ -13,11 +13,11 @@ import path from 'node:path'; // createReadStream retained — streaming not in StorageProvider scope import { createReadStream } from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { FSStorageProvider, RemoteBridge } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, RemoteBridge } from '@squad/sdk'; import { withAdditionalMcpConfig } from '../core/copilot-invocation.js'; const storage = new FSStorageProvider(); -import type { RemoteBridgeConfig } from '@bradygaster/squad-sdk'; +import type { RemoteBridgeConfig } from '@squad/sdk'; import { isDevtunnelAvailable, createTunnel, diff --git a/packages/squad-cli/src/cli/commands/state-mcp.ts b/packages/squad-cli/src/cli/commands/state-mcp.ts index dd4316087..c69efdceb 100644 --- a/packages/squad-cli/src/cli/commands/state-mcp.ts +++ b/packages/squad-cli/src/cli/commands/state-mcp.ts @@ -2,8 +2,8 @@ import { stdout, stderr } from 'node:process'; import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js'; -import { resolveSquadState } from '@bradygaster/squad-sdk'; -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; +import { resolveSquadState } from '@squad/sdk'; +import { ToolRegistry } from '@squad/sdk/tools'; import { getPackageVersion } from '../core/version.js'; import { callBackendMcpTool, diff --git a/packages/squad-cli/src/cli/commands/streams.ts b/packages/squad-cli/src/cli/commands/streams.ts index 0a2d1cd73..ce3c222f9 100644 --- a/packages/squad-cli/src/cli/commands/streams.ts +++ b/packages/squad-cli/src/cli/commands/streams.ts @@ -9,11 +9,11 @@ import path from 'node:path'; import { spawnSync } from 'node:child_process'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); -import { loadSubSquadsConfig, resolveSubSquad } from '@bradygaster/squad-sdk'; -import type { SubSquadDefinition } from '@bradygaster/squad-sdk'; +import { loadSubSquadsConfig, resolveSubSquad } from '@squad/sdk'; +import type { SubSquadDefinition } from '@squad/sdk'; const BOLD = '\x1b[1m'; const RESET = '\x1b[0m'; diff --git a/packages/squad-cli/src/cli/commands/update-check.ts b/packages/squad-cli/src/cli/commands/update-check.ts index d4ee5952b..c757f09f8 100644 --- a/packages/squad-cli/src/cli/commands/update-check.ts +++ b/packages/squad-cli/src/cli/commands/update-check.ts @@ -10,7 +10,7 @@ * @module cli/commands/update-check */ -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { type CacheData, getCachePath, fetchLatestVersion, writeCache } from '../self-update.js'; import { parseVersion, isNewer, type ReleaseChannel } from '../upgrade.js'; import { getPackageVersion } from '../core/version.js'; diff --git a/packages/squad-cli/src/cli/commands/upstream.ts b/packages/squad-cli/src/cli/commands/upstream.ts index 41c78de2c..e62487ef5 100644 --- a/packages/squad-cli/src/cli/commands/upstream.ts +++ b/packages/squad-cli/src/cli/commands/upstream.ts @@ -12,8 +12,8 @@ import path from 'node:path'; import { execFileSync } from 'node:child_process'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; -import { isSafeUpstreamName } from '@bradygaster/squad-sdk/upstream'; +import { FSStorageProvider } from '@squad/sdk'; +import { isSafeUpstreamName } from '@squad/sdk/upstream'; const storage = new FSStorageProvider(); import { success, warn, info } from '../core/output.js'; @@ -95,7 +95,7 @@ function assertSafeGitSource(source: string): void { fatal(`Refusing git upstream source "${redactGitSource(source)}": ${reason}.`); } } -import type { UpstreamConfig, UpstreamSource } from '@bradygaster/squad-sdk'; +import type { UpstreamConfig, UpstreamSource } from '@squad/sdk'; function readUpstreams(upstreamFile: string): UpstreamConfig { if (!storage.existsSync(upstreamFile)) return { upstreams: [] }; diff --git a/packages/squad-cli/src/cli/commands/watch/agent-spawn.ts b/packages/squad-cli/src/cli/commands/watch/agent-spawn.ts index f2a1d72de..dc1ec3582 100644 --- a/packages/squad-cli/src/cli/commands/watch/agent-spawn.ts +++ b/packages/squad-cli/src/cli/commands/watch/agent-spawn.ts @@ -16,7 +16,7 @@ import os from 'node:os'; import path from 'node:path'; import type { WatchContext } from './types.js'; import { withAdditionalMcpConfig } from '../../core/copilot-invocation.js'; -import { CLAUDE_PLUGIN_AGENT, readClaudePluginMode } from '@bradygaster/squad-sdk/client'; +import { CLAUDE_PLUGIN_AGENT, readClaudePluginMode } from '@squad/sdk/client'; /** True when running on Windows — used to gate `shell: true`. */ export const IS_WINDOWS = process.platform === 'win32'; diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/cleanup.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/cleanup.ts index ade2ea8cb..55114cb7c 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/cleanup.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/cleanup.ts @@ -8,7 +8,7 @@ import path from 'node:path'; import { rmSync } from 'node:fs'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/decision-hygiene.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/decision-hygiene.ts index c582df855..58bcb8506 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/decision-hygiene.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/decision-hygiene.ts @@ -3,7 +3,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; import { buildAgentCommand, spawnWithTimeout } from '../agent-spawn.js'; diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts index fe69d4b12..451487eac 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/execute.ts @@ -6,8 +6,8 @@ import { execFile } from 'node:child_process'; import { existsSync } from 'node:fs'; import path from 'node:path'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; -import type { MachineCapabilities } from '@bradygaster/squad-sdk/ralph/capabilities'; -import { SquadClient, readClaudePluginMode } from '@bradygaster/squad-sdk/client'; +import type { MachineCapabilities } from '@squad/sdk/ralph/capabilities'; +import { SquadClient, readClaudePluginMode } from '@squad/sdk/client'; import { createVerboseLogger } from '../verbose.js'; import { loadAgentCharter } from '../../../shell/spawn.js'; import { @@ -342,7 +342,7 @@ export class ExecuteCapability implements WatchCapability { })); // `needs:*` routing: only issues this machine can handle (no manifest = all pass) - const { filterByCapabilities, loadCapabilities } = await import('@bradygaster/squad-sdk/ralph/capabilities'); + const { filterByCapabilities, loadCapabilities } = await import('@squad/sdk/ralph/capabilities'); let capabilities: MachineCapabilities | null = null; try { capabilities = await loadCapabilities(context.teamRoot); diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.ts index 1ff5268e7..2f78f70c1 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.ts @@ -13,7 +13,7 @@ import { writeFileSync, readFileSync, unlinkSync } from 'node:fs'; import { join } from 'node:path'; import { tmpdir } from 'node:os'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; -import type { MachineCapabilities } from '@bradygaster/squad-sdk/ralph/capabilities'; +import type { MachineCapabilities } from '@squad/sdk/ralph/capabilities'; import type { DispatchMode } from '../config.js'; import { runProcessTreeCommand } from '../agent-spawn.js'; import { createVerboseLogger } from '../verbose.js'; @@ -174,7 +174,7 @@ export class FleetDispatchCapability implements WatchCapability { ...(wi.url ? { url: wi.url } : {}), })); - const { filterByCapabilities, loadCapabilities } = await import('@bradygaster/squad-sdk/ralph/capabilities'); + const { filterByCapabilities, loadCapabilities } = await import('@squad/sdk/ralph/capabilities'); const capabilities: MachineCapabilities | null = await loadCapabilities(context.teamRoot); const { handled } = filterByCapabilities(issues, capabilities); diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/notes-promote.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/notes-promote.ts index 821cd7e15..5e389459f 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/notes-promote.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/notes-promote.ts @@ -13,7 +13,7 @@ */ import * as path from 'node:path'; import { execFileSync } from 'node:child_process'; -import { FSStorageProvider, resolveStateBackend, TwoLayerBackend } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, resolveStateBackend, TwoLayerBackend } from '@squad/sdk'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/watch/capabilities/retro.ts b/packages/squad-cli/src/cli/commands/watch/capabilities/retro.ts index a1369812a..ccb731d78 100644 --- a/packages/squad-cli/src/cli/commands/watch/capabilities/retro.ts +++ b/packages/squad-cli/src/cli/commands/watch/capabilities/retro.ts @@ -3,7 +3,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import type { WatchCapability, WatchContext, PreflightResult, CapabilityResult } from '../types.js'; import { buildAgentCommand, spawnWithTimeout } from '../agent-spawn.js'; diff --git a/packages/squad-cli/src/cli/commands/watch/claim-counters.ts b/packages/squad-cli/src/cli/commands/watch/claim-counters.ts index da49d5b3e..df57e9486 100644 --- a/packages/squad-cli/src/cli/commands/watch/claim-counters.ts +++ b/packages/squad-cli/src/cli/commands/watch/claim-counters.ts @@ -4,7 +4,7 @@ * Pure — no SDK runtime imports, so `squad watch --health` stays light. */ -import type { FinishOutcome } from '@bradygaster/squad-sdk/ralph/claims'; +import type { FinishOutcome } from '@squad/sdk/ralph/claims'; export interface ClaimCounters { /** Claims this executor won. */ diff --git a/packages/squad-cli/src/cli/commands/watch/claim-metrics.ts b/packages/squad-cli/src/cli/commands/watch/claim-metrics.ts index c3fbc0959..5d39f48a5 100644 --- a/packages/squad-cli/src/cli/commands/watch/claim-metrics.ts +++ b/packages/squad-cli/src/cli/commands/watch/claim-metrics.ts @@ -9,8 +9,8 @@ * issue numbers, hostnames, machine ids, or actors. */ -import { getMeter } from '@bradygaster/squad-sdk'; -import type { FinishOutcome, WorkClaimProvider } from '@bradygaster/squad-sdk/ralph/claims'; +import { getMeter } from '@squad/sdk'; +import type { FinishOutcome, WorkClaimProvider } from '@squad/sdk/ralph/claims'; import { cloneClaimCounters, emptyClaimCounters, diff --git a/packages/squad-cli/src/cli/commands/watch/claims.ts b/packages/squad-cli/src/cli/commands/watch/claims.ts index 202be4b59..4450000a4 100644 --- a/packages/squad-cli/src/cli/commands/watch/claims.ts +++ b/packages/squad-cli/src/cli/commands/watch/claims.ts @@ -12,15 +12,15 @@ import { DEFAULT_CLAIM_TTL_MS, NoopClaimProvider, claimTimingError, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; import type { ClaimRecord, ExecutorIdentity, FinishOutcome, WorkClaimProvider, WorkKey, -} from '@bradygaster/squad-sdk/ralph/claims'; -import { getRemoteUrl, parseAzureDevOpsRemote, parseGitHubRemote } from '@bradygaster/squad-sdk/platform'; +} from '@squad/sdk/ralph/claims'; +import { getRemoteUrl, parseAzureDevOpsRemote, parseGitHubRemote } from '@squad/sdk/platform'; import type { WatchContext } from './types.js'; import type { WatchClaimsConfig } from './config.js'; import type { AgentSpawnResult } from './agent-spawn.js'; @@ -95,7 +95,7 @@ export async function createWatchClaimProvider( if (!config || config.provider === 'none') { return new NoopClaimProvider({ identity: opts.identity }); } - const { GitRefClaimProvider } = await import('@bradygaster/squad-sdk/ralph/claims-git'); + const { GitRefClaimProvider } = await import('@squad/sdk/ralph/claims-git'); return new GitRefClaimProvider({ identity: opts.identity, cwd: opts.teamRoot, diff --git a/packages/squad-cli/src/cli/commands/watch/config.ts b/packages/squad-cli/src/cli/commands/watch/config.ts index abe10b2e2..3062127c4 100644 --- a/packages/squad-cli/src/cli/commands/watch/config.ts +++ b/packages/squad-cli/src/cli/commands/watch/config.ts @@ -5,13 +5,13 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; -import type { SquadStateContext, StateBackendType } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; +import type { SquadStateContext, StateBackendType } from '@squad/sdk'; import { DEFAULT_CLAIM_SKEW_MARGIN_MS, DEFAULT_CLAIM_TTL_MS, claimTimingError, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/commands/watch/index.ts b/packages/squad-cli/src/cli/commands/watch/index.ts index bbbf6a948..7963421c3 100644 --- a/packages/squad-cli/src/cli/commands/watch/index.ts +++ b/packages/squad-cli/src/cli/commands/watch/index.ts @@ -10,7 +10,7 @@ import path from 'node:path'; import fs from 'node:fs'; import { execFile, execFileSync } from 'node:child_process'; import { promisify } from 'node:util'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { effectiveSquadDir } from '../../core/effective-squad-dir.js'; import { fatal, fatalNoSquad } from '../../core/errors.js'; import { GREEN, RED, DIM, BOLD, RESET, YELLOW } from '../../core/output.js'; @@ -21,17 +21,17 @@ import { parseRoster, triageIssue, type TriageIssue, -} from '@bradygaster/squad-sdk/ralph/triage'; -import { RalphMonitor } from '@bradygaster/squad-sdk/ralph'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +} from '@squad/sdk/ralph/triage'; +import { RalphMonitor } from '@squad/sdk/ralph'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; import { ghAvailable, ghAuthenticated, ghRateLimitCheck, isRateLimitError } from '../../core/gh-cli.js'; -import type { MachineCapabilities } from '@bradygaster/squad-sdk/ralph/capabilities'; +import type { MachineCapabilities } from '@squad/sdk/ralph/capabilities'; import { PredictiveCircuitBreaker, getTrafficLight, -} from '@bradygaster/squad-sdk/ralph/rate-limiting'; -import { createPlatformAdapter } from '@bradygaster/squad-sdk/platform'; -import type { PlatformAdapter, WorkItem, PullRequest as SdkPullRequest } from '@bradygaster/squad-sdk/platform'; +} from '@squad/sdk/ralph/rate-limiting'; +import { createPlatformAdapter } from '@squad/sdk/platform'; +import type { PlatformAdapter, WorkItem, PullRequest as SdkPullRequest } from '@squad/sdk/platform'; import type { WatchConfig } from './config.js'; import { parseWatchDuration, watchBoundReason } from './bounds.js'; @@ -342,7 +342,7 @@ async function runCheck( vlog?.log(` #${issue.number}: "${issue.title}" [${labels}] assignees=[${assignees}]`); } - const { filterByCapabilities } = await import('@bradygaster/squad-sdk/ralph/capabilities'); + const { filterByCapabilities } = await import('@squad/sdk/ralph/capabilities'); const { handled: capableIssues, skipped: incapableIssues } = filterByCapabilities(issues, capabilities); for (const { issue, missing } of incapableIssues) { @@ -816,7 +816,7 @@ export async function runWatch(dest: string, options: WatchOptions | WatchConfig const modules = parseModuleOwnership(routingContent); // Load machine capabilities (#514) - const { loadCapabilities } = await import('@bradygaster/squad-sdk/ralph/capabilities'); + const { loadCapabilities } = await import('@squad/sdk/ralph/capabilities'); const capabilities = await loadCapabilities(teamRoot); if (capabilities) { console.log(`${DIM}📦 Machine: ${capabilities.machine} — ${capabilities.capabilities.length} capabilities loaded${RESET}`); @@ -878,7 +878,7 @@ export async function runWatch(dest: string, options: WatchOptions | WatchConfig // Work claims (ADR-002): flag > config.json watch.claims > none const { resolveExecutorIdentity, DEFAULT_CLAIM_TTL_MS, DEFAULT_CLAIM_SKEW_MARGIN_MS } = - await import('@bradygaster/squad-sdk/ralph/claims'); + await import('@squad/sdk/ralph/claims'); const { createWatchClaimProvider, describeClaimProvider, resolveWorkRepo } = await import('./claims.js'); // Hostname fallback is pseudonymized, salted with the (unpublished) team root path. const executor = resolveExecutorIdentity({ capabilities, actor: config.authUser, hostnameSalt: path.resolve(teamRoot) }); @@ -909,7 +909,7 @@ export async function runWatch(dest: string, options: WatchOptions | WatchConfig } let claimTelemetry: { shutdown: () => Promise } | undefined; if (claimProvider.guarantees.exclusion !== 'none' && isWatchTelemetryEnabled()) { - const { initSquadTelemetry } = await import('@bradygaster/squad-sdk'); + const { initSquadTelemetry } = await import('@squad/sdk'); const initialized = initializeWatchClaimMetrics( claimProvider, () => initSquadTelemetry({ serviceName: 'squad-watch', mode: 'cli', installTransport: false }), diff --git a/packages/squad-cli/src/cli/commands/watch/types.ts b/packages/squad-cli/src/cli/commands/watch/types.ts index 301fb5788..9f4640f6f 100644 --- a/packages/squad-cli/src/cli/commands/watch/types.ts +++ b/packages/squad-cli/src/cli/commands/watch/types.ts @@ -5,8 +5,8 @@ * main loop stays thin and each feature is testable in isolation. */ -import type { PlatformAdapter } from '@bradygaster/squad-sdk/platform'; -import type { ExecutorIdentity, WorkClaimProvider } from '@bradygaster/squad-sdk/ralph/claims'; +import type { PlatformAdapter } from '@squad/sdk/platform'; +import type { ExecutorIdentity, WorkClaimProvider } from '@squad/sdk/ralph/claims'; import type { WatchClaimMetrics } from './claim-metrics.js'; /** Phase within a single watch round. */ diff --git a/packages/squad-cli/src/cli/copilot-install.ts b/packages/squad-cli/src/cli/copilot-install.ts index 10ceb6dc0..286ba2eba 100644 --- a/packages/squad-cli/src/cli/copilot-install.ts +++ b/packages/squad-cli/src/cli/copilot-install.ts @@ -8,8 +8,8 @@ * @module cli/copilot-install */ -import { initSquad } from '@bradygaster/squad-sdk/config'; -import type { InitOptions, InitResult } from '@bradygaster/squad-sdk/config'; +import { initSquad } from '@squad/sdk/config'; +import type { InitOptions, InitResult } from '@squad/sdk/config'; // ============================================================================ // Types diff --git a/packages/squad-cli/src/cli/core/backend-mcp.ts b/packages/squad-cli/src/cli/core/backend-mcp.ts index 38cc749ee..24947cb2a 100644 --- a/packages/squad-cli/src/cli/core/backend-mcp.ts +++ b/packages/squad-cli/src/cli/core/backend-mcp.ts @@ -1,7 +1,7 @@ import { createHash } from 'node:crypto'; import os from 'node:os'; import path from 'node:path'; -import { resolveSquadState } from '@bradygaster/squad-sdk'; +import { resolveSquadState } from '@squad/sdk'; import { ALL_CONTENT_PART_TYPES, BACKEND_PROTOCOL_VERSION, @@ -18,7 +18,7 @@ import { type BackendMessage, type ProtocolHello, type SquadBackend, -} from '@bradygaster/squad-sdk/backend'; +} from '@squad/sdk/backend'; /** * MCP TRANSPORT ADAPTER over `SquadBackend`. MCP is only a local bridge for diff --git a/packages/squad-cli/src/cli/core/cast.ts b/packages/squad-cli/src/cli/core/cast.ts index 56ee28b27..688ef429a 100644 --- a/packages/squad-cli/src/cli/core/cast.ts +++ b/packages/squad-cli/src/cli/core/cast.ts @@ -4,13 +4,13 @@ */ import { join } from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { getRoleById, generateCharterFromRole, addAgentToConfig, syncTeamCapabilities, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import { CastingEngine, acquireCastingRegistryLockAsync, @@ -21,7 +21,7 @@ import { reconcileAgentProvenanceRegistry, type CastMember as EngineCastMember, type AgentRole as EngineAgentRole, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; import { getTemplatesDir } from './templates.js'; import { hasCopilot, insertCopilotSection } from './team-md.js'; diff --git a/packages/squad-cli/src/cli/core/clients.ts b/packages/squad-cli/src/cli/core/clients.ts index 1ef44085a..dc9b7f84d 100644 --- a/packages/squad-cli/src/cli/core/clients.ts +++ b/packages/squad-cli/src/cli/core/clients.ts @@ -26,9 +26,9 @@ import { resolveInsideRoot, type ApplyResult, type ClientId, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; import { projectSquadStateMcpSpec, resolveCommittedSquadStateMcpSpec } from './mcp-spec.js'; -import { resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquadPaths } from '@squad/sdk/resolution'; import { getPackageVersion } from './version.js'; export { CLIENT_IDS, parseClients, type ClientId }; diff --git a/packages/squad-cli/src/cli/core/effective-squad-dir.ts b/packages/squad-cli/src/cli/core/effective-squad-dir.ts index 0025023ee..2fb302cb7 100644 --- a/packages/squad-cli/src/cli/core/effective-squad-dir.ts +++ b/packages/squad-cli/src/cli/core/effective-squad-dir.ts @@ -11,8 +11,8 @@ import { detectSquadDir, type SquadDirInfo } from './detect-squad-dir.js'; import { loadDirConfig, resolveExternalStateDir, -} from '@bradygaster/squad-sdk'; -import { resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +} from '@squad/sdk'; +import { resolveSquadPaths } from '@squad/sdk/resolution'; /** * Resolve the effective state directory from a local .squad/ path. diff --git a/packages/squad-cli/src/cli/core/email-scrub.ts b/packages/squad-cli/src/cli/core/email-scrub.ts index 74da19b85..7defa1602 100644 --- a/packages/squad-cli/src/cli/core/email-scrub.ts +++ b/packages/squad-cli/src/cli/core/email-scrub.ts @@ -4,7 +4,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/init.ts b/packages/squad-cli/src/cli/core/init.ts index 621306fd9..15c78974f 100644 --- a/packages/squad-cli/src/cli/core/init.ts +++ b/packages/squad-cli/src/cli/core/init.ts @@ -5,13 +5,13 @@ import path from 'node:path'; import { execFileSync } from 'node:child_process'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { detectSquadDir, resolveWorktreeMainCheckout } from './detect-squad-dir.js'; import { success, BOLD, RESET, YELLOW, GREEN, DIM } from './output.js'; import { fatal } from './errors.js'; import { detectProjectType } from './project-type.js'; import { getPackageVersion, stampVersion } from './version.js'; -import { initSquad as sdkInitSquad, cleanupOrphanInitPrompt, clearResolveSquadCache, type InitOptions } from '@bradygaster/squad-sdk'; +import { initSquad as sdkInitSquad, cleanupOrphanInitPrompt, clearResolveSquadCache, type InitOptions } from '@squad/sdk'; import { installGitHooks } from '../commands/install-hooks.js'; import { liftInitMutableStateOntoOrphan } from '../commands/migrate-backend.js'; import { projectSquadStateMcpSpec, resolveCommittedSquadStateMcpSpec } from './mcp-spec.js'; @@ -24,7 +24,7 @@ import { tombstoneStaleSquadStateInProjectMcp, } from './mcp-root.js'; import { applyClientProjectionsForInit, linkedTeamSquadDir, readConfiguredClients, reportClientResults, type ClientId } from './clients.js'; -import { getHostProjection, readClaudePluginMode } from '@bradygaster/squad-sdk/client'; +import { getHostProjection, readClaudePluginMode } from '@squad/sdk/client'; import { readTeamMd, writeTeamMd, @@ -161,7 +161,7 @@ const INIT_LANDMARKS = [ function showDeprecationWarning(): void { console.log(); console.log(`${YELLOW}⚠️ DEPRECATION: .ai-team/ is deprecated and will be removed in v1.0.0${RESET}`); - console.log(`${YELLOW} Run 'npx @bradygaster/squad-cli upgrade --migrate-directory' to migrate to .squad/${RESET}`); + console.log(`${YELLOW} Run 'npx @squad/cli upgrade --migrate-directory' to migrate to .squad/${RESET}`); console.log(`${YELLOW} Details: https://github.com/github/squad/issues/101${RESET}`); console.log(); } diff --git a/packages/squad-cli/src/cli/core/mcp-probe.ts b/packages/squad-cli/src/cli/core/mcp-probe.ts index 53ceb38d7..10943ee44 100644 --- a/packages/squad-cli/src/cli/core/mcp-probe.ts +++ b/packages/squad-cli/src/cli/core/mcp-probe.ts @@ -1,6 +1,6 @@ import { spawn, type ChildProcessWithoutNullStreams } from 'node:child_process'; import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { getSquadStateUserConfigKeys } from './mcp-root.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/mcp-root.ts b/packages/squad-cli/src/cli/core/mcp-root.ts index 652e5fd74..36e8710f4 100644 --- a/packages/squad-cli/src/cli/core/mcp-root.ts +++ b/packages/squad-cli/src/cli/core/mcp-root.ts @@ -32,9 +32,10 @@ import path from 'node:path'; import { realpathSync } from 'node:fs'; import { createHash } from 'node:crypto'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { isMachineSpecificMcpSpec, projectSquadStateMcpSpec, type SquadStateMcpSpec } from './mcp-spec.js'; import { writeManagedText, writeManagedTextAtomic } from './managed-file.js'; +import { KNOWN_CLI_PATH_PATTERN, isKnownCliPackageSpec } from './package-identity.js'; const storage = new FSStorageProvider(); @@ -355,10 +356,11 @@ function isSquadManagedHashedEntry(entry: McpServerEntry): boolean { const args = Array.isArray(entry.args) ? entry.args : []; if (args.at(-1) !== 'state-mcp') return false; if (entry.command === 'npx') { - return args.some(arg => /^@bradygaster\/squad-cli(?:@.+)?$/.test(arg)); + return args.some(arg => isKnownCliPackageSpec(arg)); } if (entry.command === process.execPath || path.basename(entry.command ?? '').toLowerCase() === 'node') { - return args.some(arg => /(?:^|[\\/])@bradygaster[\\/]squad-cli[\\/]dist[\\/]cli-entry\.js$/i.test(arg)); + const installedEntry = new RegExp(`(?:^|[\\\\/])(?:${KNOWN_CLI_PATH_PATTERN})[\\\\/]dist[\\\\/]cli-entry\\.js$`, 'i'); + return args.some(arg => installedEntry.test(arg)); } return /(?:^|[\\/])squad(?:\.exe|\.cmd|\.ps1)?$/i.test(entry.command ?? ''); } diff --git a/packages/squad-cli/src/cli/core/mcp-spec.ts b/packages/squad-cli/src/cli/core/mcp-spec.ts index d05c85062..84aa17198 100644 --- a/packages/squad-cli/src/cli/core/mcp-spec.ts +++ b/packages/squad-cli/src/cli/core/mcp-spec.ts @@ -22,13 +22,14 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; +import { CLI_PACKAGE_NAME } from './package-identity.js'; import { resolveInsideRoot, SQUAD_REPO_LAUNCHER_MARKER, SQUAD_REPO_LAUNCHER_PATH, squadRepoLauncher, squadRepoLauncherArgs, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; export interface SquadStateMcpSpec { command: string; @@ -46,7 +47,7 @@ export interface SquadStateMcpSpec { }; } -const PACKAGE_NAME = '@bradygaster/squad-cli'; +const PACKAGE_NAME = CLI_PACKAGE_NAME; /** Retained as the shared projection hook; direct local specs stay direct. */ export function projectSquadStateMcpSpec( diff --git a/packages/squad-cli/src/cli/core/migrate-directory.ts b/packages/squad-cli/src/cli/core/migrate-directory.ts index a672d1133..25d28cf3a 100644 --- a/packages/squad-cli/src/cli/core/migrate-directory.ts +++ b/packages/squad-cli/src/cli/core/migrate-directory.ts @@ -4,7 +4,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { success, warn, dim, bold } from './output.js'; import { fatal } from './errors.js'; import { scrubEmails } from './email-scrub.js'; diff --git a/packages/squad-cli/src/cli/core/migrations.ts b/packages/squad-cli/src/cli/core/migrations.ts index 3d76ab451..a96125276 100644 --- a/packages/squad-cli/src/cli/core/migrations.ts +++ b/packages/squad-cli/src/cli/core/migrations.ts @@ -5,7 +5,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { success } from './output.js'; import { scrubEmails } from './email-scrub.js'; diff --git a/packages/squad-cli/src/cli/core/nap.ts b/packages/squad-cli/src/cli/core/nap.ts index 603248159..b70d91632 100644 --- a/packages/squad-cli/src/cli/core/nap.ts +++ b/packages/squad-cli/src/cli/core/nap.ts @@ -10,7 +10,7 @@ import { FSStorageProvider, findHeadingLineIndices, isCommittableDestination, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/npm-registry.ts b/packages/squad-cli/src/cli/core/npm-registry.ts index 3b77a001a..826b0803c 100644 --- a/packages/squad-cli/src/cli/core/npm-registry.ts +++ b/packages/squad-cli/src/cli/core/npm-registry.ts @@ -20,7 +20,7 @@ export function _resetNpmRegistryCache(): void { } /** - * Returns true if `@bradygaster/squad-cli@` is reachable on the npm + * Returns true if `@squad/cli@` is reachable on the npm * registry, false on any network failure / 404 / non-publishable response. * * Uses Node's built-in `https` so we don't pull in extra deps. Total budget @@ -36,7 +36,7 @@ export async function isSquadCliVersionPublished( const cached = cache.get(cacheKey); if (cached !== undefined) return cached; - const url = `https://registry.npmjs.org/@bradygaster%2Fsquad-cli/${encodeURIComponent(version)}`; + const url = `https://registry.npmjs.org/@squad%2Fcli/${encodeURIComponent(version)}`; const ok = await new Promise((resolve) => { let settled = false; const finish = (v: boolean) => { diff --git a/packages/squad-cli/src/cli/core/package-identity.ts b/packages/squad-cli/src/cli/core/package-identity.ts new file mode 100644 index 000000000..1b9ee4068 --- /dev/null +++ b/packages/squad-cli/src/cli/core/package-identity.ts @@ -0,0 +1,64 @@ +/** + * Published npm identity of the Squad CLI and SDK — zero dependencies (node: built-ins only). + * + * The values mirror scripts/release/distribution-identity.json. `LEGACY_*` names are retired + * identities that existing global installs, MCP configs and generated agent files may still + * reference; Squad keeps recognizing them so upgrading never strands an install. + */ +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +export const CLI_PACKAGE_NAME = '@squad/cli'; +export const SDK_PACKAGE_NAME = '@squad/sdk'; +export const LEGACY_CLI_PACKAGE_NAMES: readonly string[] = ['@bradygaster/squad-cli']; +export const LEGACY_SDK_PACKAGE_NAMES: readonly string[] = ['@bradygaster/squad-sdk']; + +/** Every name the CLI has been published under, current first. */ +export const KNOWN_CLI_PACKAGE_NAMES: readonly string[] = [CLI_PACKAGE_NAME, ...LEGACY_CLI_PACKAGE_NAMES]; + +const escapeRe = (value: string): string => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + +/** Regex alternation matching any known CLI package name (`@scope/name`). */ +export const KNOWN_CLI_NAME_PATTERN = KNOWN_CLI_PACKAGE_NAMES.map(escapeRe).join('|'); + +/** Same alternation, with the scope separator matching both `/` and `\` (installed paths). */ +export const KNOWN_CLI_PATH_PATTERN = KNOWN_CLI_PACKAGE_NAMES + .map(name => name.split('/').map(escapeRe).join('[\\\\/]')) + .join('|'); + +/** Registry metadata path for a scoped name, e.g. `@squad%2Fcli`. */ +export function registryPackagePath(name: string): string { + return name.replace('/', '%2F'); +} + +/** True when `spec` is `` or `@`. */ +export function isKnownCliPackageSpec(spec: string): boolean { + return new RegExp(`^(?:${KNOWN_CLI_NAME_PATTERN})(?:@.+)?$`).test(spec); +} + +/** True when `name` is a retired CLI identity. */ +export function isLegacyCliPackageName(name: string): boolean { + return LEGACY_CLI_PACKAGE_NAMES.includes(name); +} + +/** + * Name of the CLI package this code was installed as, read from the nearest package.json. + * A 2.x build published under a legacy name reports that name, which lets self-upgrade + * move the install to the current identity. + */ +export function getInstalledCliPackageName(startDir: string = path.dirname(fileURLToPath(import.meta.url))): string { + let dir = startDir; + for (let i = 0; i < 6; i++) { + try { + const pkg = JSON.parse(readFileSync(path.join(dir, 'package.json'), 'utf8')) as { name?: unknown }; + if (typeof pkg.name === 'string' && KNOWN_CLI_PACKAGE_NAMES.includes(pkg.name)) return pkg.name; + } catch { + // Keep walking up. + } + const parent = path.dirname(dir); + if (parent === dir) break; + dir = parent; + } + return CLI_PACKAGE_NAME; +} diff --git a/packages/squad-cli/src/cli/core/project-type.ts b/packages/squad-cli/src/cli/core/project-type.ts index 3656fb4d7..1957b853a 100644 --- a/packages/squad-cli/src/cli/core/project-type.ts +++ b/packages/squad-cli/src/cli/core/project-type.ts @@ -3,7 +3,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/team-md.ts b/packages/squad-cli/src/cli/core/team-md.ts index 5eff469c8..ab9bd2dc3 100644 --- a/packages/squad-cli/src/cli/core/team-md.ts +++ b/packages/squad-cli/src/cli/core/team-md.ts @@ -3,7 +3,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/templates.ts b/packages/squad-cli/src/cli/core/templates.ts index 4880eb0ca..08c6e81d7 100644 --- a/packages/squad-cli/src/cli/core/templates.ts +++ b/packages/squad-cli/src/cli/core/templates.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'; import { dirname, join } from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/core/upgrade.ts b/packages/squad-cli/src/cli/core/upgrade.ts index 4b336c62c..13e22a290 100644 --- a/packages/squad-cli/src/cli/core/upgrade.ts +++ b/packages/squad-cli/src/cli/core/upgrade.ts @@ -7,9 +7,9 @@ import path from 'node:path'; import { execFileSync } from 'node:child_process'; import { fileURLToPath, pathToFileURL } from 'node:url'; -import { FSStorageProvider, stripTeamCapabilitiesBlock, syncTeamCapabilities } from '@bradygaster/squad-sdk'; -import { clearResolveSquadCache, isRetiredProfileTeamRoot } from '@bradygaster/squad-sdk/resolution'; -import { squadRepoLauncherScript } from '@bradygaster/squad-sdk/client'; +import { FSStorageProvider, stripTeamCapabilitiesBlock, syncTeamCapabilities } from '@squad/sdk'; +import { clearResolveSquadCache, isRetiredProfileTeamRoot } from '@squad/sdk/resolution'; +import { squadRepoLauncherScript } from '@squad/sdk/client'; import { backfillCastingRegistryFromTeam, detectHistoricalCastingSchema, @@ -18,7 +18,7 @@ import { preflightCastingRegistryPair, repairHandwrittenCastingRegistry, type RepairResult, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; import { success, warn, info, dim, BOLD, RESET } from './output.js'; import { fatal, fatalNoSquad } from './errors.js'; import { detectSquadDir } from './detect-squad-dir.js'; @@ -26,6 +26,13 @@ import { TEMPLATE_MANIFEST, getTemplatesDir } from './templates.js'; import { runMigrations } from './migrations.js'; import { scrubEmails } from './email-scrub.js'; import { getPackageVersion, stampVersion, readInstalledVersion } from './version.js'; +import { + CLI_PACKAGE_NAME, + KNOWN_CLI_NAME_PATTERN, + getInstalledCliPackageName, + isLegacyCliPackageName, + registryPackagePath, +} from './package-identity.js'; import { projectSquadStateMcpSpec, resolveCommittedSquadStateMcpSpec, type SquadStateMcpSpec } from './mcp-spec.js'; import { copyManagedFile, syncCopilotInstructionsFile, writeManagedText } from './managed-file.js'; export { resolveSquadStateMcpSpec } from './mcp-spec.js'; @@ -79,7 +86,7 @@ export function isLocalOrUnpublishedVersion(version: string): boolean { function buildMcpServerSpecs(isGitHub: boolean, cliVersion?: string): McpServerSpec[] { // Pin the squad-cli package to the currently-installed CLI version so that - // `npx -y @bradygaster/squad-cli state-mcp` does NOT silently resolve to the + // `npx -y @squad/cli state-mcp` does NOT silently resolve to the // npm `latest` dist-tag (which may predate the `state-mcp` command and thus // expose zero tools to Copilot — see MCP-BRIDGE-BROKEN root cause). // @@ -88,9 +95,9 @@ function buildMcpServerSpecs(isGitHub: boolean, cliVersion?: string): McpServerS // string that breaks npx resolution at session start. let pkgSpec: string; if (!cliVersion || isLocalOrUnpublishedVersion(cliVersion)) { - pkgSpec = '@bradygaster/squad-cli@insider'; + pkgSpec = `${CLI_PACKAGE_NAME}@insider`; } else { - pkgSpec = `@bradygaster/squad-cli@${cliVersion}`; + pkgSpec = `${CLI_PACKAGE_NAME}@${cliVersion}`; } const servers: McpServerSpec[] = [ { @@ -336,7 +343,7 @@ export function stripAgentStamps(s: string): string { .replace(//g, '') .replace(/- \*\*Version:\*\* \S+/g, '- **Version:** X') .replace(/`Squad v[^`]+`/g, '`Squad vX`') - .replace(/@bradygaster\/squad-cli@[^\s"'\]]+/g, '@bradygaster/squad-cli@X'); + .replace(new RegExp(`(?:${KNOWN_CLI_NAME_PATTERN})@[^\\s"'\\]]+`, 'g'), `${CLI_PACKAGE_NAME}@X`); } function writeAgentTemplate(agentSrc: string, agentDest: string, cliVersion: string, mcpConfigMode: McpConfigMode, isGitHub: boolean, options?: { dryRun?: boolean; squadDir?: string }): void { @@ -1865,6 +1872,8 @@ export interface SelfUpgradeOptions { currentVersion?: string; /** Override the dist-tag → version lookup; defaults to the public npm registry. */ resolveTagVersion?: SelfUpgradeTagResolver; + /** Package name the running CLI was installed as; defaults to the nearest package.json name. */ + installedPackageName?: string; } export interface SelfUpgradeResult { @@ -1890,14 +1899,23 @@ export function detectSelfUpgradeTag(currentVersion: string): SelfUpgradeTag { return 'latest'; } -/** The exact command `selfUpgradeCli` runs for a package manager and dist-tag. */ -export function selfUpgradeCommand(packageManager: SelfUpgradePackageManager, insiderOrTag: boolean | SelfUpgradeTag): string { +/** + * The exact command `selfUpgradeCli` runs for a package manager and dist-tag. An install made + * under a retired package name is removed first: both packages own the `squad` bin, so + * installing the current name next to it would fail. + */ +export function selfUpgradeCommand( + packageManager: SelfUpgradePackageManager, + insiderOrTag: boolean | SelfUpgradeTag, + installedPackageName: string = CLI_PACKAGE_NAME, +): string { const tag: SelfUpgradeTag = typeof insiderOrTag === 'boolean' ? (insiderOrTag ? 'insider' : 'latest') : insiderOrTag; - const pkg = `@bradygaster/squad-cli@${tag}`; + const pkg = `${CLI_PACKAGE_NAME}@${tag}`; + const legacy = isLegacyCliPackageName(installedPackageName) ? installedPackageName : null; switch (packageManager) { - case 'pnpm': return `pnpm add -g ${pkg}`; - case 'yarn': return `yarn global add ${pkg}`; - default: return `npm install -g ${pkg}`; + case 'pnpm': return `${legacy ? `pnpm remove -g ${legacy} && ` : ''}pnpm add -g ${pkg}`; + case 'yarn': return `${legacy ? `yarn global remove ${legacy} && ` : ''}yarn global add ${pkg}`; + default: return `${legacy ? `npm uninstall -g ${legacy} && ` : ''}npm install -g ${pkg}`; } } @@ -1906,7 +1924,7 @@ export async function resolveSelfUpgradeTagVersion(tag: SelfUpgradeTag): Promise try { const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), 3000); - const res = await fetch('https://registry.npmjs.org/-/package/@bradygaster%2Fsquad-cli/dist-tags', { signal: controller.signal }); + const res = await fetch(`https://registry.npmjs.org/-/package/${registryPackagePath(CLI_PACKAGE_NAME)}/dist-tags`, { signal: controller.signal }); clearTimeout(timer); if (!res.ok) return null; const tags = await res.json() as Record; @@ -1946,7 +1964,7 @@ export async function selfUpgradeCli(options: SelfUpgradeOptions = {}): Promise< const pm = options.packageManager ?? detectPackageManager(); const currentVersion = options.currentVersion ?? getPackageVersion(); const tag: SelfUpgradeTag = options.insider ? 'insider' : detectSelfUpgradeTag(currentVersion); - const cmd = selfUpgradeCommand(pm, tag); + const cmd = selfUpgradeCommand(pm, tag, options.installedPackageName ?? getInstalledCliPackageName()); const resolve = options.resolveTagVersion ?? resolveSelfUpgradeTagVersion; const targetVersion = await resolve(tag); diff --git a/packages/squad-cli/src/cli/core/version.ts b/packages/squad-cli/src/cli/core/version.ts index 2946f7669..144dddaa9 100644 --- a/packages/squad-cli/src/cli/core/version.ts +++ b/packages/squad-cli/src/cli/core/version.ts @@ -4,7 +4,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/self-update.ts b/packages/squad-cli/src/cli/self-update.ts index 3aded55b3..5cf804cd1 100644 --- a/packages/squad-cli/src/cli/self-update.ts +++ b/packages/squad-cli/src/cli/self-update.ts @@ -2,7 +2,7 @@ * Self-update check — Phase 1: background version check with notification. * * Non-blocking startup check that queries the npm registry for the latest - * version of @bradygaster/squad-cli and displays a passive banner when + * version of @squad/cli and displays a passive banner when * an update is available. Results are cached for 24 hours. * * Disable with: SQUAD_NO_UPDATE_CHECK=1 @@ -12,17 +12,25 @@ import path from 'node:path'; import os from 'node:os'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; const storage = new FSStorageProvider(); import { compareVersions } from './upgrade.js'; +import { CLI_PACKAGE_NAME, getInstalledCliPackageName, isLegacyCliPackageName } from './core/package-identity.js'; import { BOLD, RESET, DIM, YELLOW } from './core/output.js'; -const PACKAGE_NAME = '@bradygaster/squad-cli'; +const PACKAGE_NAME = CLI_PACKAGE_NAME; const REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}`; const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours const FETCH_TIMEOUT_MS = 3000; // 3 seconds +/** Upgrade hint; installs under a retired package name must remove it first (same `squad` bin). */ +function updateCommand(): string { + const installed = getInstalledCliPackageName(); + const install = `npm install -g ${PACKAGE_NAME}@latest`; + return isLegacyCliPackageName(installed) ? `npm uninstall -g ${installed} && ${install}` : install; +} + export interface CacheData { latestVersion: string; checkedAt: number; @@ -117,7 +125,7 @@ export async function notifyIfUpdateAvailable(currentVersion: string): Promise 0) { console.log( `\n${YELLOW}⚡${RESET} ${BOLD}Squad v${latest}${RESET} available ${DIM}(you have v${currentVersion})${RESET}` + - `\n Run: ${BOLD}npm install -g @bradygaster/squad-cli@latest${RESET}\n`, + `\n Run: ${BOLD}${updateCommand()}${RESET}\n`, ); } } catch { diff --git a/packages/squad-cli/src/cli/shell/commands.ts b/packages/squad-cli/src/cli/shell/commands.ts index 5a4958962..fae086534 100644 --- a/packages/squad-cli/src/cli/shell/commands.ts +++ b/packages/squad-cli/src/cli/shell/commands.ts @@ -6,7 +6,7 @@ import { listSessions, loadSessionById, type SessionData } from './session-store import { formatAgentLine, getStatusTag } from './agent-status.js'; import type { ShellMessage } from './types.js'; import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { runNapSync, formatNapReport } from '../core/nap.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/shell/coordinator.ts b/packages/squad-cli/src/cli/shell/coordinator.ts index fd14317a2..aefd22f9b 100644 --- a/packages/squad-cli/src/cli/shell/coordinator.ts +++ b/packages/squad-cli/src/cli/shell/coordinator.ts @@ -1,5 +1,5 @@ import { join } from 'node:path'; -import { listRoles, searchRoles, FSStorageProvider, loadDirConfig, resolveExternalStateDir } from '@bradygaster/squad-sdk'; +import { listRoles, searchRoles, FSStorageProvider, loadDirConfig, resolveExternalStateDir } from '@squad/sdk'; import type { ShellMessage } from './types.js'; diff --git a/packages/squad-cli/src/cli/shell/index.ts b/packages/squad-cli/src/cli/shell/index.ts index 7c87f1946..9fb616616 100644 --- a/packages/squad-cli/src/cli/shell/index.ts +++ b/packages/squad-cli/src/cli/shell/index.ts @@ -16,13 +16,13 @@ import { SessionRegistry } from './sessions.js'; import { ShellRenderer } from './render.js'; import { StreamBridge } from './stream-bridge.js'; import { ShellLifecycle, loadWelcomeData } from './lifecycle.js'; -import { SquadClient } from '@bradygaster/squad-sdk/client'; -import type { SquadSession } from '@bradygaster/squad-sdk/client'; -import type { SquadPermissionHandler } from '@bradygaster/squad-sdk/client'; -import { RateLimitError } from '@bradygaster/squad-sdk/adapter/errors'; +import { SquadClient } from '@squad/sdk/client'; +import type { SquadSession } from '@squad/sdk/client'; +import type { SquadPermissionHandler } from '@squad/sdk/client'; +import { RateLimitError } from '@squad/sdk/adapter/errors'; import type { ShellMessage } from './types.js'; -import { DEFAULT_CONTEXT_WARNING_THRESHOLD, FSStorageProvider, initSquadTelemetry, TIMEOUTS, StreamingPipeline, UsageLedger, estimateCost, recordAgentSpawn, recordAgentDuration, recordAgentError, recordAgentDestroy, RuntimeEventBus, resolveSquad, resolveSquadState, loadDirConfig, resolveExternalStateDir } from '@bradygaster/squad-sdk'; -import type { ContextUsageEvent, ContextUtilizationSnapshot, UsageEvent } from '@bradygaster/squad-sdk'; +import { DEFAULT_CONTEXT_WARNING_THRESHOLD, FSStorageProvider, initSquadTelemetry, TIMEOUTS, StreamingPipeline, UsageLedger, estimateCost, recordAgentSpawn, recordAgentDuration, recordAgentError, recordAgentDestroy, RuntimeEventBus, resolveSquad, resolveSquadState, loadDirConfig, resolveExternalStateDir } from '@squad/sdk'; +import type { ContextUsageEvent, ContextUtilizationSnapshot, UsageEvent } from '@squad/sdk'; import { enableShellMetrics, recordShellSessionDuration, recordAgentResponseLatency, recordShellError } from './shell-metrics.js'; import { parseAgentFromDescription } from './agent-name-parser.js'; import { buildCoordinatorPrompt, buildInitModePrompt, parseCoordinatorResponse, hasRosterEntries } from './coordinator.js'; diff --git a/packages/squad-cli/src/cli/shell/lifecycle.ts b/packages/squad-cli/src/cli/shell/lifecycle.ts index b8a7e02a6..08becf672 100644 --- a/packages/squad-cli/src/cli/shell/lifecycle.ts +++ b/packages/squad-cli/src/cli/shell/lifecycle.ts @@ -8,7 +8,7 @@ */ import path from 'node:path'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { resolveStateDir } from '../core/effective-squad-dir.js'; import { linkedTeamSquadDir } from '../core/clients.js'; import { SessionRegistry } from './sessions.js'; diff --git a/packages/squad-cli/src/cli/shell/session-store.ts b/packages/squad-cli/src/cli/shell/session-store.ts index f3ee8ad70..fdc1b4753 100644 --- a/packages/squad-cli/src/cli/shell/session-store.ts +++ b/packages/squad-cli/src/cli/shell/session-store.ts @@ -7,7 +7,7 @@ import { randomUUID } from 'node:crypto'; import { join } from 'node:path'; -import { FSStorageProvider, safeTimestamp } from '@bradygaster/squad-sdk'; +import { FSStorageProvider, safeTimestamp } from '@squad/sdk'; import type { ShellMessage } from './types.js'; const storage = new FSStorageProvider(); diff --git a/packages/squad-cli/src/cli/shell/shell-metrics.ts b/packages/squad-cli/src/cli/shell/shell-metrics.ts index 044c2dd35..a0b20bdf4 100644 --- a/packages/squad-cli/src/cli/shell/shell-metrics.ts +++ b/packages/squad-cli/src/cli/shell/shell-metrics.ts @@ -10,7 +10,7 @@ * @module shell/shell-metrics */ -import { getMeter } from '@bradygaster/squad-sdk'; +import { getMeter } from '@squad/sdk'; // ============================================================================ // Types diff --git a/packages/squad-cli/src/cli/shell/spawn.ts b/packages/squad-cli/src/cli/shell/spawn.ts index 4712fcfb4..6613448b8 100644 --- a/packages/squad-cli/src/cli/shell/spawn.ts +++ b/packages/squad-cli/src/cli/shell/spawn.ts @@ -4,10 +4,10 @@ * Creates SDK sessions via SquadClient, sends the task, and streams the response. */ -import { resolveSquad } from '@bradygaster/squad-sdk/resolution'; -import { SquadClient } from '@bradygaster/squad-sdk/client'; -import type { SquadSession } from '@bradygaster/squad-sdk/client'; -import { SquadState, FSStorageProvider } from '@bradygaster/squad-sdk'; +import { resolveSquad } from '@squad/sdk/resolution'; +import { SquadClient } from '@squad/sdk/client'; +import type { SquadSession } from '@squad/sdk/client'; +import { SquadState, FSStorageProvider } from '@squad/sdk'; import { SessionRegistry } from './sessions.js'; import { dirname } from 'node:path'; diff --git a/packages/squad-cli/src/cli/shell/stream-bridge.ts b/packages/squad-cli/src/cli/shell/stream-bridge.ts index 3df932be7..5e2dab5ee 100644 --- a/packages/squad-cli/src/cli/shell/stream-bridge.ts +++ b/packages/squad-cli/src/cli/shell/stream-bridge.ts @@ -12,7 +12,7 @@ import type { StreamDelta, UsageEvent, ReasoningDelta, -} from '@bradygaster/squad-sdk/runtime/streaming'; +} from '@squad/sdk/runtime/streaming'; import type { SessionRegistry } from './sessions.js'; import type { ShellMessage } from './types.js'; diff --git a/packages/squad-cli/src/cli/upgrade.ts b/packages/squad-cli/src/cli/upgrade.ts index f50f6c592..ba382f790 100644 --- a/packages/squad-cli/src/cli/upgrade.ts +++ b/packages/squad-cli/src/cli/upgrade.ts @@ -8,7 +8,7 @@ * @module cli/upgrade */ -import { MigrationRegistry } from '@bradygaster/squad-sdk/config'; +import { MigrationRegistry } from '@squad/sdk/config'; // ============================================================================ // Types diff --git a/packages/squad-cli/templates/model-selection-reference.md b/packages/squad-cli/templates/model-selection-reference.md index eb8ec3a35..1c0562c59 100644 --- a/packages/squad-cli/templates/model-selection-reference.md +++ b/packages/squad-cli/templates/model-selection-reference.md @@ -2,7 +2,7 @@ ## Per-Agent Model Selection -Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@bradygaster/squad-sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@bradygaster/squad-sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. +Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@squad/sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@squad/sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. Spawn guidance never names a model ID. It reasons in sources and tiers (`premium`, `standard`, `fast`); **Appendix A** is the only place that turns a tier into model IDs. diff --git a/packages/squad-cli/templates/ralph-reference.md b/packages/squad-cli/templates/ralph-reference.md index b1b13d877..ae80caae2 100644 --- a/packages/squad-cli/templates/ralph-reference.md +++ b/packages/squad-cli/templates/ralph-reference.md @@ -6,7 +6,7 @@ Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph is m **⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous monitoring loop — scan for work, report findings to the coordinator, scan again, repeat — until the board is empty or the user explicitly says "idle" or "stop". This is not optional. If work exists, keep coordinating it. When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).** -**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @bradygaster/squad-cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). +**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @squad/cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). **On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details. @@ -56,7 +56,7 @@ gh pr list --state open --draft --json number,title,author,labels,checks --limit | **Review feedback** | PR has `CHANGES_REQUESTED` review | Report feedback to the coordinator for routing to the PR author agent | | **CI failures** | PR checks failing | Report to the coordinator to route a fix or create a fix issue | | **Approved PRs** | PR approved, CI green, ready for pre-merge review | Report readiness to the coordinator for verification and hand-off to a human; Ralph does not merge or close issues | -| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @bradygaster/squad-cli watch` for persistent polling. | +| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @squad/cli watch` for persistent polling. | ### Authority boundaries @@ -88,9 +88,9 @@ After every 3-5 rounds, pause and report before continuing: Ralph's in-session loop processes work while it exists, then idles. For **persistent polling** between sessions or when you're away from the keyboard, use the `squad watch` CLI command: ```bash -npx @bradygaster/squad-cli watch # polls every 10 minutes (default) -npx @bradygaster/squad-cli watch --interval 5 # polls every 5 minutes -npx @bradygaster/squad-cli watch --interval 30 # polls every 30 minutes +npx @squad/cli watch # polls every 10 minutes (default) +npx @squad/cli watch --interval 5 # polls every 5 minutes +npx @squad/cli watch --interval 30 # polls every 30 minutes ``` This runs as a standalone local process (not inside Copilot) that: @@ -104,7 +104,7 @@ This runs as a standalone local process (not inside Copilot) that: | Layer | When | How | |-------|------|-----| | **In-session** | You're at the keyboard | "Ralph, go" — active loop while work exists | -| **Local watchdog** | You're away but machine is on | `npx @bradygaster/squad-cli watch --interval 10` | +| **Local watchdog** | You're away but machine is on | `npx @squad/cli watch --interval 10` | | **Cloud heartbeat** | Fully unattended | `squad-heartbeat.yml` — event-based only (cron disabled) | ### Ralph State @@ -140,8 +140,8 @@ After the coordinator's step 6 ("Immediately assess: Does anything trigger follo 3. Coordinator-managed agents work → results collected and follow-up assessed 4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause 5. More work found → coordinator acts on it; Ralph continues monitoring -6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @bradygaster/squad-cli watch` for persistent polling) +6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @squad/cli watch` for persistent polling) -**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @bradygaster/squad-cli watch`. +**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @squad/cli watch`. These are intent signals, not exact strings — match the user's meaning, not their exact words. diff --git a/packages/squad-cli/templates/session-init-reference.md b/packages/squad-cli/templates/session-init-reference.md index c41207f81..14bc3044a 100644 --- a/packages/squad-cli/templates/session-init-reference.md +++ b/packages/squad-cli/templates/session-init-reference.md @@ -85,7 +85,7 @@ it. Skip the npm probe. **Step B — npm probe (on cache miss / stale / version mismatch):** ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If the command does not respond within 5 seconds, diff --git a/packages/squad-cli/templates/skills/e2e-template-testing/SKILL.md b/packages/squad-cli/templates/skills/e2e-template-testing/SKILL.md index d1b38d94e..811830142 100644 --- a/packages/squad-cli/templates/skills/e2e-template-testing/SKILL.md +++ b/packages/squad-cli/templates/skills/e2e-template-testing/SKILL.md @@ -454,16 +454,16 @@ immediately and report the failure — do **not** attempt workarounds or mark scenarios as SKIPPED. 0. **Clean stale SDK before building.** Before running `npm run build`, remove any - stale published copy of `@bradygaster/squad-sdk` that may have been installed + stale published copy of `@squad/sdk` that may have been installed into `packages/squad-cli/node_modules/`. This local copy shadows the workspace symlink in the root `node_modules/` and causes TypeScript to see the published version instead of the local source. Run from the repo root: ```powershell - $stale = "packages\squad-cli\node_modules\@bradygaster\squad-sdk" + $stale = "packages\squad-cli\node_modules\@squad\sdk" if (Test-Path $stale) { Remove-Item -Recurse -Force $stale; Write-Host "Cleaned stale SDK" } ``` This is safe to run unconditionally — if the path doesn't exist, the command is - a no-op. The root `node_modules\@bradygaster\squad-sdk` workspace symlink remains + a no-op. The root `node_modules\@squad\sdk` workspace symlink remains intact and npm will use it automatically. 1. **Build must succeed.** Run `npm run build` from the repo root. A build failure blocks all scenarios; report `BUILD_FAILED` and stop. diff --git a/packages/squad-cli/templates/skills/release-process/SKILL.md b/packages/squad-cli/templates/skills/release-process/SKILL.md index 10172b6fd..4c43be026 100644 --- a/packages/squad-cli/templates/skills/release-process/SKILL.md +++ b/packages/squad-cli/templates/skills/release-process/SKILL.md @@ -76,8 +76,8 @@ Choose a unique SemVer version and update all package manifests: ```bash VERSION=0.14.0-preview.1 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -128,7 +128,7 @@ The workflow: Install the resulting preview: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` The same preview is available through `brew install --cask squad-preview` and @@ -214,8 +214,8 @@ Use `insider`, `preview`, or `latest` for `DIST_TAG`: VERSION=0.14.0 DIST_TAG=latest -npm view @bradygaster/squad-sdk "dist-tags.$DIST_TAG" -npm view @bradygaster/squad-cli "dist-tags.$DIST_TAG" +npm view @squad/sdk "dist-tags.$DIST_TAG" +npm view @squad/cli "dist-tags.$DIST_TAG" gh release view "v$VERSION" ``` @@ -277,8 +277,8 @@ Prepare the next development version in a normal PR to `dev`: ```bash NEXT_VERSION=0.15.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/packages/squad-cli/templates/skills/squad-version-check/SKILL.md b/packages/squad-cli/templates/skills/squad-version-check/SKILL.md index 5f3fd785d..21cb71b4f 100644 --- a/packages/squad-cli/templates/skills/squad-version-check/SKILL.md +++ b/packages/squad-cli/templates/skills/squad-version-check/SKILL.md @@ -1,6 +1,6 @@ --- name: "squad-version-check" -description: "Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." +description: "Internals of how @squad/cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." allowedTools: [] confidence: medium domain: squad-internals @@ -18,13 +18,13 @@ source: "validated in bradygaster/squad#1173 recon (2026-05-26)." ## What This Skill Covers -Reusable knowledge about how `@bradygaster/squad-cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. +Reusable knowledge about how `@squad/cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. --- ## Package & Registry Facts -- **Package name:** `@bradygaster/squad-cli` +- **Package name:** `@squad/cli` - **Registry:** npm (public) - **CLI binary:** `squad` (registered via `package.json#bin.squad`) - **Node version requirement:** Node ≥22.5.0 (ESM-only codebase) @@ -74,9 +74,9 @@ Reads the stamped version back from `squad.agent.md`: ### Self-upgrade path (`selfUpgradeCli()`): Detects npm/pnpm/yarn via `npm_execpath` and `npm_config_user_agent`. Runs: -- npm: `npm install -g @bradygaster/squad-cli@latest` -- pnpm: `pnpm add -g @bradygaster/squad-cli@latest` -- yarn: `yarn global add @bradygaster/squad-cli@latest` +- npm: `npm install -g @squad/cli@latest` +- pnpm: `pnpm add -g @squad/cli@latest` +- yarn: `yarn global add @squad/cli@latest` Use `@insider` tag for insider builds. ### `compareSemver(a, b)` utility (in upgrade.js): @@ -106,7 +106,7 @@ The file is read-only from the upgrade path's perspective. Only the coordinator Use this one-liner from inside a coordinator prompt to fetch dist-tags: ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting. diff --git a/packages/squad-cli/templates/skills/versioning-policy/SKILL.md b/packages/squad-cli/templates/skills/versioning-policy/SKILL.md index 59de6f54b..9b5ba4e99 100644 --- a/packages/squad-cli/templates/skills/versioning-policy/SKILL.md +++ b/packages/squad-cli/templates/skills/versioning-policy/SKILL.md @@ -8,8 +8,8 @@ source: "earned (PR #640 workspace resolution incident and automated release cha ## Context -Squad publishes `@bradygaster/squad-sdk` and -`@bradygaster/squad-cli` from one npm workspace. Their versions and the root +Squad publishes `@squad/sdk` and +`@squad/cli` from one npm workspace. Their versions and the root version move together. A mismatched prerelease dependency can make npm silently resolve an older registry SDK instead of the local workspace. @@ -52,8 +52,8 @@ For every committed preview version, set both the CLI manifest and lockfile dependency floor to that exact preview: ```bash -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/packages/squad-cli/templates/workflows/squad-insider-release.yml b/packages/squad-cli/templates/workflows/squad-insider-release.yml index 36a1121bf..2f09ca669 100644 --- a/packages/squad-cli/templates/workflows/squad-insider-release.yml +++ b/packages/squad-cli/templates/workflows/squad-insider-release.yml @@ -50,7 +50,7 @@ jobs: run: | gh release create "${{ steps.version.outputs.insider_tag }}" \ --title "${{ steps.version.outputs.insider_tag }}" \ - --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @bradygaster/squad-cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ + --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @squad/cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ --prerelease - name: Verify release diff --git a/packages/squad-sdk/README.md b/packages/squad-sdk/README.md index fd45c64f8..037bd9291 100644 --- a/packages/squad-sdk/README.md +++ b/packages/squad-sdk/README.md @@ -1,4 +1,4 @@ -# @bradygaster/squad-sdk +# @squad/sdk **Programmable multi-agent runtime for GitHub Copilot.** Build AI teams that persist, learn, and coordinate — with real governance, not vibes. @@ -11,7 +11,7 @@ ## Install ```bash -npm install @bradygaster/squad-sdk +npm install @squad/sdk ``` --- @@ -97,8 +97,8 @@ The lead routes a task to DevRel. A new session is created, context is passed, a > **Wiring requirement:** `squad_route` creates sessions via `spawnParallel`, which requires fan-out dependencies. Pass a `fanOutDepsGetter` as the 5th argument to `new ToolRegistry(...)`: > > ```typescript -> import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; -> import type { FanOutDependencies } from '@bradygaster/squad-sdk/coordinator'; +> import { ToolRegistry } from '@squad/sdk/tools'; +> import type { FanOutDependencies } from '@squad/sdk/coordinator'; > > const fanOutDeps: FanOutDependencies = { > compileCharter: async (name) => { /* load agent charter */ }, @@ -249,7 +249,7 @@ Squad separates I/O from business logic. All persistent storage — sessions, st Implement the `StorageProvider` interface: ```typescript -import type { StorageProvider } from '@bradygaster/squad-sdk'; +import type { StorageProvider } from '@squad/sdk'; export class MyCloudStorageProvider implements StorageProvider { async read(filePath: string): Promise { @@ -355,7 +355,7 @@ When agents complete work, record decisions, or hit errors — Ralph knows. If a ## Links - **Repository:** [github.com/github/squad](https://github.com/github/squad) -- **CLI package:** [@bradygaster/squad-cli](https://www.npmjs.com/package/@bradygaster/squad-cli) +- **CLI package:** [@squad/cli](https://www.npmjs.com/package/@squad/cli) - **Issues:** [github.com/github/squad/issues](https://github.com/github/squad/issues) --- diff --git a/packages/squad-sdk/package.json b/packages/squad-sdk/package.json index fa73b828a..828fadf67 100644 --- a/packages/squad-sdk/package.json +++ b/packages/squad-sdk/package.json @@ -1,5 +1,5 @@ { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "2.0.0", "description": "Squad SDK — Programmable multi-agent runtime for GitHub Copilot", "type": "module", diff --git a/packages/squad-sdk/src/agents/model-selector.ts b/packages/squad-sdk/src/agents/model-selector.ts index 89269dbcb..22b0438d3 100644 --- a/packages/squad-sdk/src/agents/model-selector.ts +++ b/packages/squad-sdk/src/agents/model-selector.ts @@ -255,7 +255,7 @@ function buildAvailabilityCheck( /** * Documented provenance-returning entry point for agent model resolution. - * Alias of {@link resolveModel} in `@bradygaster/squad-sdk/agents`; distinct + * Alias of {@link resolveModel} in `@squad/sdk/agents`; distinct * from the root `resolveModel` export, which is a legacy adapter returning * only the model id. */ diff --git a/packages/squad-sdk/src/backend/index.ts b/packages/squad-sdk/src/backend/index.ts index 6c16e7997..1801f5333 100644 --- a/packages/squad-sdk/src/backend/index.ts +++ b/packages/squad-sdk/src/backend/index.ts @@ -1,8 +1,8 @@ /** - * Experimental Squad 2.0 conversation & harness backend subpath (`@bradygaster/squad-sdk/backend`). + * Experimental Squad 2.0 conversation & harness backend subpath (`@squad/sdk/backend`). * * @experimental This surface is exported only from the `./backend` subpath and is not re-exported - * from the root `@bradygaster/squad-sdk` barrel. + * from the root `@squad/sdk` barrel. * @module backend */ diff --git a/packages/squad-sdk/src/backend/types.ts b/packages/squad-sdk/src/backend/types.ts index 0a3d3a8e4..bf171b394 100644 --- a/packages/squad-sdk/src/backend/types.ts +++ b/packages/squad-sdk/src/backend/types.ts @@ -5,7 +5,7 @@ * conversation backend. Local CLI, MCP and remote durable modes all run * through this one contract. * - * @experimental Exported from `@bradygaster/squad-sdk/backend` only while the + * @experimental Exported from `@squad/sdk/backend` only while the * Squad 2.0 conversation and harness contract stabilizes. * @module backend/types */ diff --git a/packages/squad-sdk/src/build/github-dist.ts b/packages/squad-sdk/src/build/github-dist.ts index 4f64441a1..fe414b599 100644 --- a/packages/squad-sdk/src/build/github-dist.ts +++ b/packages/squad-sdk/src/build/github-dist.ts @@ -1,6 +1,6 @@ /** * M4-3: Distribution configuration - * Supports npm distribution (npm install -g @bradygaster/squad-cli). + * Supports npm distribution (npm install -g @squad/cli). */ export interface GitHubDistConfig { @@ -14,7 +14,7 @@ const DEFAULT_CONFIG: GitHubDistConfig = { owner: 'github', repo: 'squad', binaryName: 'squad', - installCommandTemplate: 'npx @bradygaster/squad-cli', + installCommandTemplate: 'npx @squad/cli', }; /** diff --git a/packages/squad-sdk/src/build/install-migration.ts b/packages/squad-sdk/src/build/install-migration.ts index 4ced23e59..348f38caf 100644 --- a/packages/squad-sdk/src/build/install-migration.ts +++ b/packages/squad-sdk/src/build/install-migration.ts @@ -63,11 +63,11 @@ const MIGRATION_STEPS: Record = { ], 'npm-global->npx-github': [ { description: 'Uninstall the global npm package', command: 'npm uninstall -g @bradygaster/squad' }, - { description: 'Use npx to run from npm', command: 'npx @bradygaster/squad-cli' }, + { description: 'Use npx to run from npm', command: 'npx @squad/cli' }, ], 'npm-local->npx-github': [ { description: 'Remove squad from local dependencies', command: 'npm uninstall @bradygaster/squad' }, - { description: 'Use npx to run from npm', command: 'npx @bradygaster/squad-cli' }, + { description: 'Use npx to run from npm', command: 'npx @squad/cli' }, ], }; diff --git a/packages/squad-sdk/src/client/adapters/claude-plugin.ts b/packages/squad-sdk/src/client/adapters/claude-plugin.ts index a0cb7beec..5adee6c85 100644 --- a/packages/squad-sdk/src/client/adapters/claude-plugin.ts +++ b/packages/squad-sdk/src/client/adapters/claude-plugin.ts @@ -40,7 +40,7 @@ export const CLAUDE_PLUGIN_STATIC_FILES: Readonly> = { /** Marketplace name: users install `squad@squad`. */ export const CLAUDE_MARKETPLACE_NAME = 'squad'; -const CLI_PACKAGE = '@bradygaster/squad-cli'; +const CLI_PACKAGE = '@squad/cli'; const REPOSITORY = 'https://github.com/github/squad'; const DESCRIPTION = 'Squad for Claude Code: a coordinator that routes work to a team of specialist subagents, with shared team state in the squad_state MCP server.'; diff --git a/packages/squad-sdk/src/clients/index.ts b/packages/squad-sdk/src/clients/index.ts index 0eb164985..b797a32be 100644 --- a/packages/squad-sdk/src/clients/index.ts +++ b/packages/squad-sdk/src/clients/index.ts @@ -1,6 +1,6 @@ /** * @deprecated Canonical home is ../client/adapters (+ ../client/adapter-contract). - * Kept as a re-export of the exact same symbols for @bradygaster/squad-sdk/clients. + * Kept as a re-export of the exact same symbols for @squad/sdk/clients. * * @module clients */ diff --git a/packages/squad-sdk/src/config/init.ts b/packages/squad-sdk/src/config/init.ts index 417a2d5e4..7384d3850 100644 --- a/packages/squad-sdk/src/config/init.ts +++ b/packages/squad-sdk/src/config/init.ts @@ -425,7 +425,7 @@ function generateSDKBuilderConfig(options: InitOptions): string { const { projectName, projectDescription, agents } = options; // Generate imports - let code = `import {\n defineSquad,\n defineTeam,\n defineAgent,\n} from '@bradygaster/squad-sdk';\n\n`; + let code = `import {\n defineSquad,\n defineTeam,\n defineAgent,\n} from '@squad/sdk';\n\n`; code += `/**\n * Squad Configuration — ${projectName}\n`; if (projectDescription) { @@ -494,7 +494,7 @@ function generateSDKBuilderConfigWithRoles(options: InitOptions): string { if (needsDefineAgent) imports.push('defineAgent'); if (needsUseRole) imports.push('useRole'); - let code = `import {\n${imports.map(i => ` ${i},`).join('\n')}\n} from '@bradygaster/squad-sdk';\n\n`; + let code = `import {\n${imports.map(i => ` ${i},`).join('\n')}\n} from '@squad/sdk';\n\n`; code += `/**\n * Squad Configuration — ${projectName}\n`; if (projectDescription) { @@ -662,12 +662,12 @@ interface McpServerSpec { function buildMcpServerSpecs(isGitHub: boolean, cliVersion?: string): McpServerSpec[] { // Pin the squad-cli package to the currently-installed CLI version so that - // `npx -y @bradygaster/squad-cli state-mcp` does NOT silently resolve to the + // `npx -y @squad/cli state-mcp` does NOT silently resolve to the // npm `latest` dist-tag (which may predate the `state-mcp` command and thus // expose zero tools to Copilot — see MCP-BRIDGE-BROKEN root cause). const pkgSpec = cliVersion && cliVersion !== '0.0.0' - ? `@bradygaster/squad-cli@${cliVersion}` - : '@bradygaster/squad-cli'; + ? `@squad/cli@${cliVersion}` + : '@squad/cli'; const servers: McpServerSpec[] = [ { name: 'squad_state', @@ -1357,13 +1357,13 @@ ${projectDescription ? `- **Description:** ${projectDescription}\n` : ''}- **Cre if (missing.length > 0) { // Manifest/templates drift — fail loudly so v0.10.0-style silent-skip // regressions (#1289) cannot reach users. End-users see this when an - // installed @bradygaster/squad-sdk ships with its templates dir + // installed @squad/sdk ships with its templates dir // missing skills the SDK code knows about — almost always a packaging // bug. The fix is to upgrade to a non-broken SDK version // (`squad upgrade`); the dev-facing sync-skill-templates.mjs script // is referenced only as the contributor-side root cause. throw new Error( - `Skill template drift in installed @bradygaster/squad-sdk: ` + + `Skill template drift in installed @squad/sdk: ` + `MANIFEST_SKILL_NAMES references ${missing.length} skill(s) ` + `missing from the SDK templates dir (${skillsSrc}): ${missing.join(', ')}. ` + `This is a packaging bug — try \`squad upgrade\` or reinstall the SDK; ` + diff --git a/packages/squad-sdk/src/config/models.ts b/packages/squad-sdk/src/config/models.ts index 2109697f1..68e83de52 100644 --- a/packages/squad-sdk/src/config/models.ts +++ b/packages/squad-sdk/src/config/models.ts @@ -1654,7 +1654,7 @@ export function resolveContextTier(options: { /** * Legacy string-returning adapter over the central model resolver - * (`resolveModel` in `@bradygaster/squad-sdk/agents`). It reads persistent + * (`resolveModel` in `@squad/sdk/agents`). It reads persistent * `.squad/config.json` preferences and delegates precedence, the `auto` * sentinel, quality profiles, and economy-mode handling to the central resolver: * config (agentModelOverrides, then defaultModel) > session directive > diff --git a/packages/squad-sdk/src/roles/index.ts b/packages/squad-sdk/src/roles/index.ts index 2229a035f..5e308d698 100644 --- a/packages/squad-sdk/src/roles/index.ts +++ b/packages/squad-sdk/src/roles/index.ts @@ -69,7 +69,7 @@ export function getCategories(): readonly RoleCategory[] { * This is the primary way to use base roles in `squad.config.ts`: * * ```typescript - * import { useRole, defineSquad } from '@bradygaster/squad-sdk'; + * import { useRole, defineSquad } from '@squad/sdk'; * * export default defineSquad({ * agents: [ diff --git a/packages/squad-sdk/templates/model-selection-reference.md b/packages/squad-sdk/templates/model-selection-reference.md index eb8ec3a35..1c0562c59 100644 --- a/packages/squad-sdk/templates/model-selection-reference.md +++ b/packages/squad-sdk/templates/model-selection-reference.md @@ -2,7 +2,7 @@ ## Per-Agent Model Selection -Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@bradygaster/squad-sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@bradygaster/squad-sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. +Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@squad/sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@squad/sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. Spawn guidance never names a model ID. It reasons in sources and tiers (`premium`, `standard`, `fast`); **Appendix A** is the only place that turns a tier into model IDs. diff --git a/packages/squad-sdk/templates/ralph-reference.md b/packages/squad-sdk/templates/ralph-reference.md index b1b13d877..ae80caae2 100644 --- a/packages/squad-sdk/templates/ralph-reference.md +++ b/packages/squad-sdk/templates/ralph-reference.md @@ -6,7 +6,7 @@ Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph is m **⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous monitoring loop — scan for work, report findings to the coordinator, scan again, repeat — until the board is empty or the user explicitly says "idle" or "stop". This is not optional. If work exists, keep coordinating it. When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).** -**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @bradygaster/squad-cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). +**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @squad/cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). **On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details. @@ -56,7 +56,7 @@ gh pr list --state open --draft --json number,title,author,labels,checks --limit | **Review feedback** | PR has `CHANGES_REQUESTED` review | Report feedback to the coordinator for routing to the PR author agent | | **CI failures** | PR checks failing | Report to the coordinator to route a fix or create a fix issue | | **Approved PRs** | PR approved, CI green, ready for pre-merge review | Report readiness to the coordinator for verification and hand-off to a human; Ralph does not merge or close issues | -| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @bradygaster/squad-cli watch` for persistent polling. | +| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @squad/cli watch` for persistent polling. | ### Authority boundaries @@ -88,9 +88,9 @@ After every 3-5 rounds, pause and report before continuing: Ralph's in-session loop processes work while it exists, then idles. For **persistent polling** between sessions or when you're away from the keyboard, use the `squad watch` CLI command: ```bash -npx @bradygaster/squad-cli watch # polls every 10 minutes (default) -npx @bradygaster/squad-cli watch --interval 5 # polls every 5 minutes -npx @bradygaster/squad-cli watch --interval 30 # polls every 30 minutes +npx @squad/cli watch # polls every 10 minutes (default) +npx @squad/cli watch --interval 5 # polls every 5 minutes +npx @squad/cli watch --interval 30 # polls every 30 minutes ``` This runs as a standalone local process (not inside Copilot) that: @@ -104,7 +104,7 @@ This runs as a standalone local process (not inside Copilot) that: | Layer | When | How | |-------|------|-----| | **In-session** | You're at the keyboard | "Ralph, go" — active loop while work exists | -| **Local watchdog** | You're away but machine is on | `npx @bradygaster/squad-cli watch --interval 10` | +| **Local watchdog** | You're away but machine is on | `npx @squad/cli watch --interval 10` | | **Cloud heartbeat** | Fully unattended | `squad-heartbeat.yml` — event-based only (cron disabled) | ### Ralph State @@ -140,8 +140,8 @@ After the coordinator's step 6 ("Immediately assess: Does anything trigger follo 3. Coordinator-managed agents work → results collected and follow-up assessed 4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause 5. More work found → coordinator acts on it; Ralph continues monitoring -6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @bradygaster/squad-cli watch` for persistent polling) +6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @squad/cli watch` for persistent polling) -**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @bradygaster/squad-cli watch`. +**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @squad/cli watch`. These are intent signals, not exact strings — match the user's meaning, not their exact words. diff --git a/packages/squad-sdk/templates/session-init-reference.md b/packages/squad-sdk/templates/session-init-reference.md index c41207f81..14bc3044a 100644 --- a/packages/squad-sdk/templates/session-init-reference.md +++ b/packages/squad-sdk/templates/session-init-reference.md @@ -85,7 +85,7 @@ it. Skip the npm probe. **Step B — npm probe (on cache miss / stale / version mismatch):** ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If the command does not respond within 5 seconds, diff --git a/packages/squad-sdk/templates/skills/e2e-template-testing/SKILL.md b/packages/squad-sdk/templates/skills/e2e-template-testing/SKILL.md index d1b38d94e..811830142 100644 --- a/packages/squad-sdk/templates/skills/e2e-template-testing/SKILL.md +++ b/packages/squad-sdk/templates/skills/e2e-template-testing/SKILL.md @@ -454,16 +454,16 @@ immediately and report the failure — do **not** attempt workarounds or mark scenarios as SKIPPED. 0. **Clean stale SDK before building.** Before running `npm run build`, remove any - stale published copy of `@bradygaster/squad-sdk` that may have been installed + stale published copy of `@squad/sdk` that may have been installed into `packages/squad-cli/node_modules/`. This local copy shadows the workspace symlink in the root `node_modules/` and causes TypeScript to see the published version instead of the local source. Run from the repo root: ```powershell - $stale = "packages\squad-cli\node_modules\@bradygaster\squad-sdk" + $stale = "packages\squad-cli\node_modules\@squad\sdk" if (Test-Path $stale) { Remove-Item -Recurse -Force $stale; Write-Host "Cleaned stale SDK" } ``` This is safe to run unconditionally — if the path doesn't exist, the command is - a no-op. The root `node_modules\@bradygaster\squad-sdk` workspace symlink remains + a no-op. The root `node_modules\@squad\sdk` workspace symlink remains intact and npm will use it automatically. 1. **Build must succeed.** Run `npm run build` from the repo root. A build failure blocks all scenarios; report `BUILD_FAILED` and stop. diff --git a/packages/squad-sdk/templates/skills/release-process/SKILL.md b/packages/squad-sdk/templates/skills/release-process/SKILL.md index 10172b6fd..4c43be026 100644 --- a/packages/squad-sdk/templates/skills/release-process/SKILL.md +++ b/packages/squad-sdk/templates/skills/release-process/SKILL.md @@ -76,8 +76,8 @@ Choose a unique SemVer version and update all package manifests: ```bash VERSION=0.14.0-preview.1 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -128,7 +128,7 @@ The workflow: Install the resulting preview: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` The same preview is available through `brew install --cask squad-preview` and @@ -214,8 +214,8 @@ Use `insider`, `preview`, or `latest` for `DIST_TAG`: VERSION=0.14.0 DIST_TAG=latest -npm view @bradygaster/squad-sdk "dist-tags.$DIST_TAG" -npm view @bradygaster/squad-cli "dist-tags.$DIST_TAG" +npm view @squad/sdk "dist-tags.$DIST_TAG" +npm view @squad/cli "dist-tags.$DIST_TAG" gh release view "v$VERSION" ``` @@ -277,8 +277,8 @@ Prepare the next development version in a normal PR to `dev`: ```bash NEXT_VERSION=0.15.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/packages/squad-sdk/templates/skills/squad-version-check/SKILL.md b/packages/squad-sdk/templates/skills/squad-version-check/SKILL.md index 5f3fd785d..21cb71b4f 100644 --- a/packages/squad-sdk/templates/skills/squad-version-check/SKILL.md +++ b/packages/squad-sdk/templates/skills/squad-version-check/SKILL.md @@ -1,6 +1,6 @@ --- name: "squad-version-check" -description: "Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." +description: "Internals of how @squad/cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." allowedTools: [] confidence: medium domain: squad-internals @@ -18,13 +18,13 @@ source: "validated in bradygaster/squad#1173 recon (2026-05-26)." ## What This Skill Covers -Reusable knowledge about how `@bradygaster/squad-cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. +Reusable knowledge about how `@squad/cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. --- ## Package & Registry Facts -- **Package name:** `@bradygaster/squad-cli` +- **Package name:** `@squad/cli` - **Registry:** npm (public) - **CLI binary:** `squad` (registered via `package.json#bin.squad`) - **Node version requirement:** Node ≥22.5.0 (ESM-only codebase) @@ -74,9 +74,9 @@ Reads the stamped version back from `squad.agent.md`: ### Self-upgrade path (`selfUpgradeCli()`): Detects npm/pnpm/yarn via `npm_execpath` and `npm_config_user_agent`. Runs: -- npm: `npm install -g @bradygaster/squad-cli@latest` -- pnpm: `pnpm add -g @bradygaster/squad-cli@latest` -- yarn: `yarn global add @bradygaster/squad-cli@latest` +- npm: `npm install -g @squad/cli@latest` +- pnpm: `pnpm add -g @squad/cli@latest` +- yarn: `yarn global add @squad/cli@latest` Use `@insider` tag for insider builds. ### `compareSemver(a, b)` utility (in upgrade.js): @@ -106,7 +106,7 @@ The file is read-only from the upgrade path's perspective. Only the coordinator Use this one-liner from inside a coordinator prompt to fetch dist-tags: ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting. diff --git a/packages/squad-sdk/templates/skills/versioning-policy/SKILL.md b/packages/squad-sdk/templates/skills/versioning-policy/SKILL.md index 59de6f54b..9b5ba4e99 100644 --- a/packages/squad-sdk/templates/skills/versioning-policy/SKILL.md +++ b/packages/squad-sdk/templates/skills/versioning-policy/SKILL.md @@ -8,8 +8,8 @@ source: "earned (PR #640 workspace resolution incident and automated release cha ## Context -Squad publishes `@bradygaster/squad-sdk` and -`@bradygaster/squad-cli` from one npm workspace. Their versions and the root +Squad publishes `@squad/sdk` and +`@squad/cli` from one npm workspace. Their versions and the root version move together. A mismatched prerelease dependency can make npm silently resolve an older registry SDK instead of the local workspace. @@ -52,8 +52,8 @@ For every committed preview version, set both the CLI manifest and lockfile dependency floor to that exact preview: ```bash -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/packages/squad-sdk/templates/workflows/squad-insider-release.yml b/packages/squad-sdk/templates/workflows/squad-insider-release.yml index 36a1121bf..2f09ca669 100644 --- a/packages/squad-sdk/templates/workflows/squad-insider-release.yml +++ b/packages/squad-sdk/templates/workflows/squad-insider-release.yml @@ -50,7 +50,7 @@ jobs: run: | gh release create "${{ steps.version.outputs.insider_tag }}" \ --title "${{ steps.version.outputs.insider_tag }}" \ - --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @bradygaster/squad-cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ + --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @squad/cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ --prerelease - name: Verify release diff --git a/plugins/squad/README.md b/plugins/squad/README.md index ab7937411..6f5a89f92 100644 --- a/plugins/squad/README.md +++ b/plugins/squad/README.md @@ -13,7 +13,7 @@ Version 2.0.0. Squad https://github.com/github/squad. - The coordinator's on-demand skills and Squad's template skills (`/squad:`). - Slash commands: `/squad:ralph`, `/squad:cast`, `/squad:ceremony`, `/squad:status`, `/squad:dashboard`. - Squad's advisory governance hooks. They act only when `.squad/config.json` has `"claudeHooks": "advisory"`. -- `squad` on the Bash PATH. The launcher runs, in order: `SQUAD_CLI`, the project's `node_modules/@bradygaster/squad-cli`, or a `squad` on PATH. With none of them it fails and says how to install the CLI; set `SQUAD_ALLOW_NPX=1` to let it run `npx -y @bradygaster/squad-cli@2.0.0` instead. +- `squad` on the Bash PATH. The launcher runs, in order: `SQUAD_CLI`, the project's `node_modules/@squad/cli`, or a `squad` on PATH. With none of them it fails and says how to install the CLI; set `SQUAD_ALLOW_NPX=1` to let it run `npx -y @squad/cli@2.0.0` instead. ## Install @@ -27,7 +27,7 @@ Then, in the repository: Install the Squad CLI in your terminal first (the plugin's Bash PATH is available only inside Claude Code): ```bash -npm install -g @bradygaster/squad-cli +npm install -g @squad/cli squad init --client claude --claude-plugin claude ``` diff --git a/plugins/squad/scripts/squad.mjs b/plugins/squad/scripts/squad.mjs index 8f2e9ceca..f2fe3a674 100755 --- a/plugins/squad/scripts/squad.mjs +++ b/plugins/squad/scripts/squad.mjs @@ -3,10 +3,10 @@ // // Squad plugin launcher. Runs the Squad CLI with this process's arguments, resolved in this order: // 1. SQUAD_CLI (a command, or a .js entry run with this Node) -// 2. the project's own install: node_modules/@bradygaster/squad-cli +// 2. the project's own install: node_modules/@squad/cli // 3. a `squad` on PATH (never this plugin's own bin/) // 4. the CLI that last ran `squad init` or `squad upgrade` on this machine (~/.squad/cli.json) -// 5. npx -y @bradygaster/squad-cli@, only when SQUAD_ALLOW_NPX=1: it downloads and runs +// 5. npx -y @squad/cli@, only when SQUAD_ALLOW_NPX=1: it downloads and runs // code, so it is opt-in. Without it, the launcher fails with install instructions. // 2, 3 and 4 are skipped when their version is older than this plugin's: an older CLI lacks commands the // plugin calls (`dashboard`, `hook --plugin`). The version is read from package.json, BUNDLE-INFO.json @@ -17,7 +17,7 @@ import os from 'node:os'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -const PKG = '@bradygaster/squad-cli'; +const PKG = '@squad/cli'; const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const projectStart = () => process.env.CLAUDE_PROJECT_DIR || process.cwd(); const ownBin = path.join(root, 'bin'); diff --git a/plugins/squad/skills/e2e-template-testing/SKILL.md b/plugins/squad/skills/e2e-template-testing/SKILL.md index 4bf44d57f..6f25f81c7 100644 --- a/plugins/squad/skills/e2e-template-testing/SKILL.md +++ b/plugins/squad/skills/e2e-template-testing/SKILL.md @@ -455,16 +455,16 @@ immediately and report the failure — do **not** attempt workarounds or mark scenarios as SKIPPED. 0. **Clean stale SDK before building.** Before running `npm run build`, remove any - stale published copy of `@bradygaster/squad-sdk` that may have been installed + stale published copy of `@squad/sdk` that may have been installed into `packages/squad-cli/node_modules/`. This local copy shadows the workspace symlink in the root `node_modules/` and causes TypeScript to see the published version instead of the local source. Run from the repo root: ```powershell - $stale = "packages\squad-cli\node_modules\@bradygaster\squad-sdk" + $stale = "packages\squad-cli\node_modules\@squad\sdk" if (Test-Path $stale) { Remove-Item -Recurse -Force $stale; Write-Host "Cleaned stale SDK" } ``` This is safe to run unconditionally — if the path doesn't exist, the command is - a no-op. The root `node_modules\@bradygaster\squad-sdk` workspace symlink remains + a no-op. The root `node_modules\@squad\sdk` workspace symlink remains intact and npm will use it automatically. 1. **Build must succeed.** Run `npm run build` from the repo root. A build failure blocks all scenarios; report `BUILD_FAILED` and stop. diff --git a/plugins/squad/skills/release-process/SKILL.md b/plugins/squad/skills/release-process/SKILL.md index 1fd7b6bf2..f9f69bfd2 100644 --- a/plugins/squad/skills/release-process/SKILL.md +++ b/plugins/squad/skills/release-process/SKILL.md @@ -77,8 +77,8 @@ Choose a unique SemVer version and update all package manifests: ```bash VERSION=0.14.0-preview.1 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -129,7 +129,7 @@ The workflow: Install the resulting preview: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` The same preview is available through `brew install --cask squad-preview` and @@ -215,8 +215,8 @@ Use `insider`, `preview`, or `latest` for `DIST_TAG`: VERSION=0.14.0 DIST_TAG=latest -npm view @bradygaster/squad-sdk "dist-tags.$DIST_TAG" -npm view @bradygaster/squad-cli "dist-tags.$DIST_TAG" +npm view @squad/sdk "dist-tags.$DIST_TAG" +npm view @squad/cli "dist-tags.$DIST_TAG" gh release view "v$VERSION" ``` @@ -278,8 +278,8 @@ Prepare the next development version in a normal PR to `dev`: ```bash NEXT_VERSION=0.15.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/plugins/squad/skills/squad-version-check/SKILL.md b/plugins/squad/skills/squad-version-check/SKILL.md index 0baa86f8c..353e65efc 100644 --- a/plugins/squad/skills/squad-version-check/SKILL.md +++ b/plugins/squad/skills/squad-version-check/SKILL.md @@ -1,6 +1,6 @@ --- name: "squad-version-check" -description: "Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." +description: "Internals of how @squad/cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." allowedTools: [] confidence: medium domain: squad-internals @@ -19,13 +19,13 @@ source: "validated in bradygaster/squad#1173 recon (2026-05-26)." ## What This Skill Covers -Reusable knowledge about how `@bradygaster/squad-cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. +Reusable knowledge about how `@squad/cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. --- ## Package & Registry Facts -- **Package name:** `@bradygaster/squad-cli` +- **Package name:** `@squad/cli` - **Registry:** npm (public) - **CLI binary:** `squad` (registered via `package.json#bin.squad`) - **Node version requirement:** Node ≥22.5.0 (ESM-only codebase) @@ -75,9 +75,9 @@ Reads the stamped version back from `squad.agent.md`: ### Self-upgrade path (`selfUpgradeCli()`): Detects npm/pnpm/yarn via `npm_execpath` and `npm_config_user_agent`. Runs: -- npm: `npm install -g @bradygaster/squad-cli@latest` -- pnpm: `pnpm add -g @bradygaster/squad-cli@latest` -- yarn: `yarn global add @bradygaster/squad-cli@latest` +- npm: `npm install -g @squad/cli@latest` +- pnpm: `pnpm add -g @squad/cli@latest` +- yarn: `yarn global add @squad/cli@latest` Use `@insider` tag for insider builds. ### `compareSemver(a, b)` utility (in upgrade.js): @@ -107,7 +107,7 @@ The file is read-only from the upgrade path's perspective. Only the coordinator Use this one-liner from inside a coordinator prompt to fetch dist-tags: ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting. diff --git a/plugins/squad/skills/versioning-policy/SKILL.md b/plugins/squad/skills/versioning-policy/SKILL.md index 5fd7faa99..fad87691c 100644 --- a/plugins/squad/skills/versioning-policy/SKILL.md +++ b/plugins/squad/skills/versioning-policy/SKILL.md @@ -9,8 +9,8 @@ source: "earned (PR #640 workspace resolution incident and automated release cha ## Context -Squad publishes `@bradygaster/squad-sdk` and -`@bradygaster/squad-cli` from one npm workspace. Their versions and the root +Squad publishes `@squad/sdk` and +`@squad/cli` from one npm workspace. Their versions and the root version move together. A mismatched prerelease dependency can make npm silently resolve an older registry SDK instead of the local workspace. @@ -53,8 +53,8 @@ For every committed preview version, set both the CLI manifest and lockfile dependency floor to that exact preview: ```bash -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/samples/azure-function-squad/package-lock.json b/samples/azure-function-squad/package-lock.json index 64e95c655..6ed21ae27 100644 --- a/samples/azure-function-squad/package-lock.json +++ b/samples/azure-function-squad/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "@azure/functions": "^4.0.0", - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "@types/node": "^22.0.0", @@ -21,7 +21,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.8.21-preview.7", "license": "MIT", "dependencies": { @@ -70,7 +70,7 @@ "node": ">=18.0" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/azure-function-squad/package.json b/samples/azure-function-squad/package.json index 96ce8407a..6ce851906 100644 --- a/samples/azure-function-squad/package.json +++ b/samples/azure-function-squad/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@azure/functions": "^4.0.0", - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "@types/node": "^22.0.0", diff --git a/samples/azure-function-squad/src/squad/config.ts b/samples/azure-function-squad/src/squad/config.ts index 24330691e..a4f5f9bc5 100644 --- a/samples/azure-function-squad/src/squad/config.ts +++ b/samples/azure-function-squad/src/squad/config.ts @@ -13,8 +13,8 @@ import { defineTeam, defineAgent, defineRouting, -} from '@bradygaster/squad-sdk/builders'; -import type { SquadSDKConfig } from '@bradygaster/squad-sdk/builders'; +} from '@squad/sdk/builders'; +import type { SquadSDKConfig } from '@squad/sdk/builders'; // ── Agent Definitions ──────────────────────────────────────────────── diff --git a/samples/hello-squad/docs/PRD.md b/samples/hello-squad/docs/PRD.md index 8df7ff5b8..7af467392 100644 --- a/samples/hello-squad/docs/PRD.md +++ b/samples/hello-squad/docs/PRD.md @@ -20,7 +20,7 @@ Developers new to Squad. No async patterns, no tooling, no governance. Pure SDK **Initial setup — resolve and load:** ```typescript -import { resolveSquad, loadConfig, CastingEngine, onboardAgent } from '@bradygaster/squad-sdk'; +import { resolveSquad, loadConfig, CastingEngine, onboardAgent } from '@squad/sdk'; const squadPath = resolveSquad(); const config = loadConfig(squadPath); diff --git a/samples/hello-squad/index.ts b/samples/hello-squad/index.ts index d484c5e05..28509979d 100644 --- a/samples/hello-squad/index.ts +++ b/samples/hello-squad/index.ts @@ -1,5 +1,5 @@ /** - * hello-squad — Beginner sample for @bradygaster/squad-sdk + * hello-squad — Beginner sample for @squad/sdk * * Demonstrates: * 1. resolveSquad() — locate or create a .squad/ directory @@ -16,8 +16,8 @@ import { CastingEngine, CastingHistory, onboardAgent, -} from '@bradygaster/squad-sdk'; -import type { CastMember, AgentRole } from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; +import type { CastMember, AgentRole } from '@squad/sdk'; // ── Helpers ────────────────────────────────────────────────────────── diff --git a/samples/hello-squad/package-lock.json b/samples/hello-squad/package-lock.json index d53e1b74a..07e4784f2 100644 --- a/samples/hello-squad/package-lock.json +++ b/samples/hello-squad/package-lock.json @@ -8,7 +8,7 @@ "name": "hello-squad", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", @@ -17,7 +17,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -49,7 +49,7 @@ "ws": "^8.22.0" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/hello-squad/package.json b/samples/hello-squad/package.json index a499b03fa..83f784bdb 100644 --- a/samples/hello-squad/package.json +++ b/samples/hello-squad/package.json @@ -3,13 +3,13 @@ "version": "1.0.0", "private": true, "type": "module", - "description": "Hello Squad — beginner sample for @bradygaster/squad-sdk", + "description": "Hello Squad — beginner sample for @squad/sdk", "scripts": { "start": "npx tsx index.ts", "test": "vitest run" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", diff --git a/samples/hello-squad/tests/hello-squad.test.ts b/samples/hello-squad/tests/hello-squad.test.ts index b7a6328c4..f324facc8 100644 --- a/samples/hello-squad/tests/hello-squad.test.ts +++ b/samples/hello-squad/tests/hello-squad.test.ts @@ -14,8 +14,8 @@ import { CastingEngine, CastingHistory, onboardAgent, -} from '@bradygaster/squad-sdk'; -import type { CastMember, AgentRole } from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; +import type { CastMember, AgentRole } from '@squad/sdk'; const TEST_ROOT = join(tmpdir(), 'hello-squad-test-' + Date.now()); const SQUAD_DIR = join(TEST_ROOT, '.squad'); diff --git a/samples/hook-governance/docs/PRD.md b/samples/hook-governance/docs/PRD.md index 2e1c7f169..1f039cee9 100644 --- a/samples/hook-governance/docs/PRD.md +++ b/samples/hook-governance/docs/PRD.md @@ -22,7 +22,7 @@ Architects and leads who need governance proof-of-concept. DevOps teams implemen **Initialize HookPipeline with policy:** ```typescript -import { HookPipeline, ReviewerLockoutHook } from '@bradygaster/squad-sdk'; +import { HookPipeline, ReviewerLockoutHook } from '@squad/sdk'; const pipeline = new HookPipeline({ allowedWritePaths: ['src/**/*.ts', 'docs/**', '.squad/**'], diff --git a/samples/hook-governance/index.ts b/samples/hook-governance/index.ts index 6dd9f4f88..9bbc3a624 100644 --- a/samples/hook-governance/index.ts +++ b/samples/hook-governance/index.ts @@ -1,5 +1,5 @@ /** - * hook-governance — Beginner sample for @bradygaster/squad-sdk Hook Pipeline + * hook-governance — Beginner sample for @squad/sdk Hook Pipeline * * Demonstrates the four governance hooks: * 1. File-Write Guards — block writes outside safe zones @@ -11,11 +11,11 @@ import { HookPipeline, ReviewerLockoutHook, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; import type { PreToolUseContext, PostToolUseContext, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; // ── Helpers ────────────────────────────────────────────────────────── diff --git a/samples/hook-governance/package-lock.json b/samples/hook-governance/package-lock.json index 9a1546e4a..f036d27c9 100644 --- a/samples/hook-governance/package-lock.json +++ b/samples/hook-governance/package-lock.json @@ -8,7 +8,7 @@ "name": "hook-governance", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", @@ -17,7 +17,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "1.0.0", "license": "MIT", "dependencies": { @@ -49,7 +49,7 @@ "ws": "^8.22.0" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/hook-governance/package.json b/samples/hook-governance/package.json index 9845fc0f5..d412016b9 100644 --- a/samples/hook-governance/package.json +++ b/samples/hook-governance/package.json @@ -3,13 +3,13 @@ "version": "1.0.0", "private": true, "type": "module", - "description": "Hook Governance — beginner sample for @bradygaster/squad-sdk hook pipeline", + "description": "Hook Governance — beginner sample for @squad/sdk hook pipeline", "scripts": { "start": "npx tsx index.ts", "test": "vitest run" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", diff --git a/samples/hook-governance/tests/hook-governance.test.ts b/samples/hook-governance/tests/hook-governance.test.ts index 1540ab783..af23dec0d 100644 --- a/samples/hook-governance/tests/hook-governance.test.ts +++ b/samples/hook-governance/tests/hook-governance.test.ts @@ -8,11 +8,11 @@ import { describe, it, expect } from 'vitest'; import { HookPipeline, ReviewerLockoutHook, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; import type { PreToolUseContext, PostToolUseContext, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; // ── Helpers ────────────────────────────────────────────────────────── diff --git a/samples/knock-knock/index.ts b/samples/knock-knock/index.ts index 333a08a9c..f3ea5f13b 100644 --- a/samples/knock-knock/index.ts +++ b/samples/knock-knock/index.ts @@ -8,9 +8,9 @@ * GITHUB_TOKEN required. */ -import { CastingEngine, StreamingPipeline } from '@bradygaster/squad-sdk'; -import type { StreamDelta } from '@bradygaster/squad-sdk'; -import { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; +import { CastingEngine, StreamingPipeline } from '@squad/sdk'; +import type { StreamDelta } from '@squad/sdk'; +import { SquadClientWithPool } from '@squad/sdk/client'; // ── Agent Setup ────────────────────────────────────────────────────── diff --git a/samples/knock-knock/package-lock.json b/samples/knock-knock/package-lock.json index 0913e31d6..058a0eea5 100644 --- a/samples/knock-knock/package-lock.json +++ b/samples/knock-knock/package-lock.json @@ -8,7 +8,7 @@ "name": "knock-knock", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", @@ -16,7 +16,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.8.18-preview", "license": "MIT", "dependencies": { @@ -51,7 +51,7 @@ } } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/knock-knock/package.json b/samples/knock-knock/package.json index a0a1f2b2b..37fdf68e3 100644 --- a/samples/knock-knock/package.json +++ b/samples/knock-knock/package.json @@ -8,7 +8,7 @@ "start": "npx tsx index.ts" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", diff --git a/samples/rock-paper-scissors/index.ts b/samples/rock-paper-scissors/index.ts index 5a4e5889b..94746ea29 100644 --- a/samples/rock-paper-scissors/index.ts +++ b/samples/rock-paper-scissors/index.ts @@ -7,8 +7,8 @@ * GITHUB_TOKEN required. */ -import { StreamingPipeline } from '@bradygaster/squad-sdk'; -import { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; +import { StreamingPipeline } from '@squad/sdk'; +import { SquadClientWithPool } from '@squad/sdk/client'; import { PLAYERS, SCOREKEEPER_PROMPT, type PlayerStrategy } from './prompts.js'; // ── Game State ─────────────────────────────────────────────────────── diff --git a/samples/rock-paper-scissors/package-lock.json b/samples/rock-paper-scissors/package-lock.json index 38f70fe9e..61a97b5c3 100644 --- a/samples/rock-paper-scissors/package-lock.json +++ b/samples/rock-paper-scissors/package-lock.json @@ -8,7 +8,7 @@ "name": "rock-paper-scissors", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", @@ -16,7 +16,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.8.18-preview.1", "license": "MIT", "dependencies": { @@ -51,7 +51,7 @@ } } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/rock-paper-scissors/package.json b/samples/rock-paper-scissors/package.json index 6c5ab5c0a..a4ca5482a 100644 --- a/samples/rock-paper-scissors/package.json +++ b/samples/rock-paper-scissors/package.json @@ -8,7 +8,7 @@ "start": "npx tsx index.ts" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "tsx": "^4.0.0", diff --git a/samples/skill-discovery/TEST-SCRIPT.md b/samples/skill-discovery/TEST-SCRIPT.md index ddef159cc..a9197cab8 100644 --- a/samples/skill-discovery/TEST-SCRIPT.md +++ b/samples/skill-discovery/TEST-SCRIPT.md @@ -63,7 +63,7 @@ During demo output, verify: In a Node.js REPL or script: ```typescript -import { loadSkillsFromDirectory } from '@bradygaster/squad-sdk/skills'; +import { loadSkillsFromDirectory } from '@squad/sdk/skills'; const skills = loadSkillsFromDirectory('/nonexistent/path'); console.log(skills); // Should be [] ``` diff --git a/samples/skill-discovery/docs/PRD.md b/samples/skill-discovery/docs/PRD.md index 134ec89be..72e2186dd 100644 --- a/samples/skill-discovery/docs/PRD.md +++ b/samples/skill-discovery/docs/PRD.md @@ -73,7 +73,7 @@ import { SkillRegistry, loadSkillsFromDirectory, parseSkillFile -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; import * as fs from 'node:fs'; import * as path from 'node:path'; diff --git a/samples/skill-discovery/index.ts b/samples/skill-discovery/index.ts index ce5f3baf8..7b76b1a2d 100644 --- a/samples/skill-discovery/index.ts +++ b/samples/skill-discovery/index.ts @@ -17,7 +17,7 @@ import { loadSkillsFromDirectory, parseSkillFile, parseFrontmatter, -} from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/skills'; // ── Helpers ────────────────────────────────────────────── diff --git a/samples/skill-discovery/package.json b/samples/skill-discovery/package.json index bf3c26c64..f95b5e105 100644 --- a/samples/skill-discovery/package.json +++ b/samples/skill-discovery/package.json @@ -9,6 +9,6 @@ "test": "npx vitest run --config vitest.config.ts" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" } } diff --git a/samples/skill-discovery/tests/skill-discovery.test.ts b/samples/skill-discovery/tests/skill-discovery.test.ts index 978b0ce56..bf5e3b499 100644 --- a/samples/skill-discovery/tests/skill-discovery.test.ts +++ b/samples/skill-discovery/tests/skill-discovery.test.ts @@ -14,8 +14,8 @@ import { loadSkillsFromDirectory, parseSkillFile, parseFrontmatter, -} from '@bradygaster/squad-sdk/skills'; -import type { SkillDefinition, SkillMatch } from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/skills'; +import type { SkillDefinition, SkillMatch } from '@squad/sdk/skills'; // ── Fixtures ───────────────────────────────────────────── diff --git a/samples/storage-provider-azure/README.md b/samples/storage-provider-azure/README.md index ab63ac304..bd9eb58bf 100644 --- a/samples/storage-provider-azure/README.md +++ b/samples/storage-provider-azure/README.md @@ -182,7 +182,7 @@ Done! ✨ | --- | --- | | `azure-blob-storage-provider.ts` | Full `StorageProvider` implementation backed by Azure Blob Storage | | `index.ts` | Demo script that exercises every method and prints results | -| `package.json` | Dependencies: `@azure/storage-blob`, `@azure/identity`, `@bradygaster/squad-sdk` | +| `package.json` | Dependencies: `@azure/storage-blob`, `@azure/identity`, `@squad/sdk` | | `scripts/create-storage.sh` | Creates an Azure resource group + storage account with full-access connection string | | `scripts/delete-storage.sh` | Deletes the resource group and all resources inside it | diff --git a/samples/storage-provider-azure/azure-blob-storage-provider.ts b/samples/storage-provider-azure/azure-blob-storage-provider.ts index 3fb6c6144..304064245 100644 --- a/samples/storage-provider-azure/azure-blob-storage-provider.ts +++ b/samples/storage-provider-azure/azure-blob-storage-provider.ts @@ -1,6 +1,6 @@ import { ContainerClient } from '@azure/storage-blob'; -import type { StorageProvider, StorageStats } from '@bradygaster/squad-sdk'; -import { StateKeyConflictError, StateBackendUncertaintyError } from '@bradygaster/squad-sdk'; +import type { StorageProvider, StorageStats } from '@squad/sdk'; +import { StateKeyConflictError, StateBackendUncertaintyError } from '@squad/sdk'; /** * Azure Blob Storage implementation of StorageProvider. diff --git a/samples/storage-provider-azure/package-lock.json b/samples/storage-provider-azure/package-lock.json index 7f2217e27..7f81796ad 100644 --- a/samples/storage-provider-azure/package-lock.json +++ b/samples/storage-provider-azure/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@azure/identity": "^4.5.0", "@azure/storage-blob": "^12.26.0", - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "cross-env": "^7.0.3", @@ -18,7 +18,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.11.0", "license": "MIT", "dependencies": { @@ -317,7 +317,7 @@ "node": ">=20.0.0" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/storage-provider-azure/package.json b/samples/storage-provider-azure/package.json index e62d0952e..4580805fe 100644 --- a/samples/storage-provider-azure/package.json +++ b/samples/storage-provider-azure/package.json @@ -15,7 +15,7 @@ }, "private": true, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk", + "@squad/sdk": "file:../../packages/squad-sdk", "@azure/storage-blob": "^12.26.0", "@azure/identity": "^4.5.0" }, diff --git a/samples/storage-provider-sqlite/README.md b/samples/storage-provider-sqlite/README.md index 74bbfdfff..bf02770a0 100644 --- a/samples/storage-provider-sqlite/README.md +++ b/samples/storage-provider-sqlite/README.md @@ -1,6 +1,6 @@ # SQLite StorageProvider sample -This sample demonstrates `SQLiteStorageProvider` from `@bradygaster/squad-sdk` — a portable, single-file storage backend powered by [sql.js](https://github.com/nicolewhite/sql.js/) (SQLite compiled to WASM). No native dependencies required. +This sample demonstrates `SQLiteStorageProvider` from `@squad/sdk` — a portable, single-file storage backend powered by [sql.js](https://github.com/nicolewhite/sql.js/) (SQLite compiled to WASM). No native dependencies required. ## Prerequisites diff --git a/samples/storage-provider-sqlite/index.ts b/samples/storage-provider-sqlite/index.ts index 07a79730d..36fb0d6ab 100644 --- a/samples/storage-provider-sqlite/index.ts +++ b/samples/storage-provider-sqlite/index.ts @@ -6,7 +6,7 @@ * Keep DB after run: npm run demo -- --keep */ -import { SQLiteStorageProvider } from '@bradygaster/squad-sdk'; +import { SQLiteStorageProvider } from '@squad/sdk'; import { existsSync, statSync, unlinkSync } from 'fs'; const DB_PATH = './squad-demo.db'; diff --git a/samples/storage-provider-sqlite/package-lock.json b/samples/storage-provider-sqlite/package-lock.json index c2c56fef3..0bb378e1b 100644 --- a/samples/storage-provider-sqlite/package-lock.json +++ b/samples/storage-provider-sqlite/package-lock.json @@ -8,7 +8,7 @@ "name": "storage-provider-sqlite-sample", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk", + "@squad/sdk": "file:../../packages/squad-sdk", "sql.js": "^1.11.0" }, "devDependencies": { @@ -16,7 +16,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.10.0", "license": "MIT", "dependencies": { @@ -48,7 +48,7 @@ "ws": "^8.21.0" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/storage-provider-sqlite/package.json b/samples/storage-provider-sqlite/package.json index 09f541f3b..c1ba9f5f3 100644 --- a/samples/storage-provider-sqlite/package.json +++ b/samples/storage-provider-sqlite/package.json @@ -1,7 +1,7 @@ { "name": "storage-provider-sqlite-sample", "version": "1.0.0", - "description": "Demonstrates using SQLiteStorageProvider from @bradygaster/squad-sdk", + "description": "Demonstrates using SQLiteStorageProvider from @squad/sdk", "type": "module", "scripts": { "demo": "npx tsx index.ts", @@ -9,7 +9,7 @@ "clean": "rm -f squad-demo.db" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk", + "@squad/sdk": "file:../../packages/squad-sdk", "sql.js": "^1.11.0" }, "devDependencies": { diff --git a/samples/streaming-chat/docs/PRD.md b/samples/streaming-chat/docs/PRD.md index c9a920e2e..1dd37414c 100644 --- a/samples/streaming-chat/docs/PRD.md +++ b/samples/streaming-chat/docs/PRD.md @@ -21,7 +21,7 @@ Developers building interactive squad applications (Discord bots, chat CLIs, web **Initialize client and event pipeline:** ```typescript -import { SquadClient, StreamingPipeline, EventBus } from '@bradygaster/squad-sdk'; +import { SquadClient, StreamingPipeline, EventBus } from '@squad/sdk'; const client = new SquadClient({ squadPath: '.squad' }); const eventBus = new EventBus(); diff --git a/samples/streaming-chat/index.ts b/samples/streaming-chat/index.ts index 6df11c62e..99e3b8c20 100644 --- a/samples/streaming-chat/index.ts +++ b/samples/streaming-chat/index.ts @@ -12,11 +12,11 @@ import * as readline from 'node:readline'; // SDK barrel exports: CastingEngine, StreamingPipeline -import { CastingEngine, StreamingPipeline } from '@bradygaster/squad-sdk'; -import type { StreamDelta } from '@bradygaster/squad-sdk'; +import { CastingEngine, StreamingPipeline } from '@squad/sdk'; +import type { StreamDelta } from '@squad/sdk'; // Client sub-path exports: SquadClientWithPool, EventBus -import { SquadClientWithPool, EventBus } from '@bradygaster/squad-sdk/client'; +import { SquadClientWithPool, EventBus } from '@squad/sdk/client'; // ──────────────────────────────────────────────────────────────────────────── // Agent definitions diff --git a/samples/streaming-chat/package-lock.json b/samples/streaming-chat/package-lock.json index 734cf9148..0d13d2f49 100644 --- a/samples/streaming-chat/package-lock.json +++ b/samples/streaming-chat/package-lock.json @@ -8,7 +8,7 @@ "name": "streaming-chat-sample", "version": "1.0.0", "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "@types/node": "^22.0.0", @@ -21,7 +21,7 @@ } }, "../../packages/squad-sdk": { - "name": "@bradygaster/squad-sdk", + "name": "@squad/sdk", "version": "0.11.0", "license": "MIT", "dependencies": { @@ -53,7 +53,7 @@ "ws": "^8.21.1" } }, - "node_modules/@bradygaster/squad-sdk": { + "node_modules/@squad/sdk": { "resolved": "../../packages/squad-sdk", "link": true }, diff --git a/samples/streaming-chat/package.json b/samples/streaming-chat/package.json index de86f58fc..5f56fd275 100644 --- a/samples/streaming-chat/package.json +++ b/samples/streaming-chat/package.json @@ -10,7 +10,7 @@ "test": "vitest run" }, "dependencies": { - "@bradygaster/squad-sdk": "file:../../packages/squad-sdk" + "@squad/sdk": "file:../../packages/squad-sdk" }, "devDependencies": { "@types/node": "^22.0.0", diff --git a/samples/streaming-chat/tests/streaming-chat.test.ts b/samples/streaming-chat/tests/streaming-chat.test.ts index dff281db0..3d996692f 100644 --- a/samples/streaming-chat/tests/streaming-chat.test.ts +++ b/samples/streaming-chat/tests/streaming-chat.test.ts @@ -6,9 +6,9 @@ */ import { describe, it, expect, beforeEach } from 'vitest'; -import { CastingEngine, StreamingPipeline } from '@bradygaster/squad-sdk'; -import type { StreamDelta } from '@bradygaster/squad-sdk'; -import { EventBus } from '@bradygaster/squad-sdk/client'; +import { CastingEngine, StreamingPipeline } from '@squad/sdk'; +import type { StreamDelta } from '@squad/sdk'; +import { EventBus } from '@squad/sdk/client'; // ── Inline the lightweight helpers from index.ts for unit-testing ── diff --git a/scripts/build-standalone.mjs b/scripts/build-standalone.mjs index 0ac1edb87..c30bdfc86 100644 --- a/scripts/build-standalone.mjs +++ b/scripts/build-standalone.mjs @@ -165,8 +165,8 @@ function installApp(appDir, tarballs, version, includeOptional) { private: true, type: 'module', dependencies: { - '@bradygaster/squad-cli': `file:${path.basename(tarballs['squad-cli'])}`, - '@bradygaster/squad-sdk': `file:${path.basename(tarballs['squad-sdk'])}`, + '@squad/cli': `file:${path.basename(tarballs['squad-cli'])}`, + '@squad/sdk': `file:${path.basename(tarballs['squad-sdk'])}`, }, }, null, 2)}\n`, ); @@ -314,7 +314,7 @@ function vendorRuntime(bundleDir, platform, arch, version, stagingDir) { return ext; } -const CLI_ENTRY = 'app/node_modules/@bradygaster/squad-cli/dist/cli-entry.js'; +const CLI_ENTRY = 'app/node_modules/@squad/cli/dist/cli-entry.js'; /** * Script embedded into the Windows `squad.exe` single executable. diff --git a/scripts/bump-build.mjs b/scripts/bump-build.mjs index 90ff7e5d7..6b1fa76a4 100644 --- a/scripts/bump-build.mjs +++ b/scripts/bump-build.mjs @@ -96,12 +96,12 @@ try { entry.version = newVersion; lockChanged = true; } - // Also bump the CLI's @bradygaster/squad-sdk dependency floor so it + // Also bump the CLI's @squad/sdk dependency floor so it // resolves the freshly-built SDK rather than the previous version. - if (key === 'packages/squad-cli' && entry?.dependencies?.['@bradygaster/squad-sdk']) { + if (key === 'packages/squad-cli' && entry?.dependencies?.['@squad/sdk']) { const desired = `>=${newVersion}`; - if (entry.dependencies['@bradygaster/squad-sdk'] !== desired) { - entry.dependencies['@bradygaster/squad-sdk'] = desired; + if (entry.dependencies['@squad/sdk'] !== desired) { + entry.dependencies['@squad/sdk'] = desired; lockChanged = true; } } diff --git a/scripts/generate-api-docs.mjs b/scripts/generate-api-docs.mjs index 3dd32f8a9..2208e343d 100644 --- a/scripts/generate-api-docs.mjs +++ b/scripts/generate-api-docs.mjs @@ -124,14 +124,14 @@ const total = classCount + ifaceCount + fnCount + typeCount + varCount; let landing = `--- title: SDK API reference -description: Auto-generated TypeScript API reference for @bradygaster/squad-sdk. +description: Auto-generated TypeScript API reference for @squad/sdk. --- # SDK API reference > ⚠️ **Experimental** — Squad is alpha software. APIs may change between releases. -Auto-generated from the \`@bradygaster/squad-sdk\` TypeScript source using [TypeDoc](https://typedoc.org/). +Auto-generated from the \`@squad/sdk\` TypeScript source using [TypeDoc](https://typedoc.org/). This reference covers **${total}** public exports: ${classCount} classes, ${ifaceCount} interfaces, ${fnCount} functions, ${typeCount} type aliases, and ${varCount} variables. To regenerate, run: diff --git a/scripts/promote-insider-tag.mjs b/scripts/promote-insider-tag.mjs index 3e7ce4fd6..162e826ad 100644 --- a/scripts/promote-insider-tag.mjs +++ b/scripts/promote-insider-tag.mjs @@ -27,7 +27,7 @@ * Usage: * node scripts/promote-insider-tag.mjs * Example: - * node scripts/promote-insider-tag.mjs @bradygaster/squad-cli 0.11.0 + * node scripts/promote-insider-tag.mjs @squad/cli 0.11.0 * * Exit codes: * 0 - success (either promoted, or already up to date; both are no-op safe) diff --git a/scripts/release/assert-publish-identity.mjs b/scripts/release/assert-publish-identity.mjs index 0c46953af..50b4d5335 100644 --- a/scripts/release/assert-publish-identity.mjs +++ b/scripts/release/assert-publish-identity.mjs @@ -86,7 +86,7 @@ if (evidenceDir) { const reportPath = path.join(evidenceDir, 'pack-evidence.json'); if (!existsSync(reportPath)) throw new Error(`Missing ${reportPath}`); const report = JSON.parse(readFileSync(reportPath, 'utf8')); - for (const name of ['@bradygaster/squad-sdk', '@bradygaster/squad-cli']) { + for (const name of ['@squad/sdk', '@squad/cli']) { const entry = report.packages?.[name]; if (!entry?.filename || !/^[0-9a-f]{64}$/.test(entry.sha256 ?? '')) { throw new Error(`Invalid evidence entry for ${name}`); diff --git a/scripts/release/build-manifest.mjs b/scripts/release/build-manifest.mjs index b98443308..c9d9a407f 100644 --- a/scripts/release/build-manifest.mjs +++ b/scripts/release/build-manifest.mjs @@ -25,6 +25,7 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const HERE = path.dirname(fileURLToPath(import.meta.url)); +const LEGACY_SDK_NAMES = JSON.parse(readFileSync(new URL('./distribution-identity.json', import.meta.url), 'utf8')).npm.sdk.legacy; const ROOT = path.resolve(HERE, '..', '..'); const SCHEMA_VERSION = 'squad-2.0-verification-manifest/v2'; const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; @@ -130,7 +131,7 @@ export function buildManifest(opts) { const recon = evidenceDir && existsSync(path.join(evidenceDir, 'test-reconciliation.json')) ? readJson(path.join(evidenceDir, 'test-reconciliation.json')) : null; const pkgEntry = (p, name) => { const t = pack?.packages?.[name]; - return { name: p.name, version: p.version, exportsCount: Object.keys(p.exports ?? {}).length, sdkDependency: p.dependencies?.['@bradygaster/squad-sdk'] ?? null, tarball: t ? { filename: t.filename, bytes: t.bytes, sha256: t.sha256, integrity: t.integrity, fileCount: t.fileCount, exportTargetsMissing: t.exportTargets.missing.length, privacyHits: t.privacy.hits.length, privacyAllowlisted: t.privacy.allowlisted.length } : null }; + return { name: p.name, version: p.version, exportsCount: Object.keys(p.exports ?? {}).length, sdkDependency: p.dependencies?.['@squad/sdk'] ?? null, tarball: t ? { filename: t.filename, bytes: t.bytes, sha256: t.sha256, integrity: t.integrity, fileCount: t.fileCount, exportTargetsMissing: t.exportTargets.missing.length, privacyHits: t.privacy.hits.length, privacyAllowlisted: t.privacy.allowlisted.length } : null }; }; const citedRun = inputs.stack.citedCiRun; @@ -156,7 +157,7 @@ export function buildManifest(opts) { citedRun: { id: citedRun.id, url: citedRun.url, headSha: citedRun.headSha, matchesTarget: citedRun.headSha === sha, conclusion: opts.citedConclusion ?? null, consoleSummary: citedRun.consoleSummary }, thisRun: process.env.GITHUB_RUN_ID ? { id: process.env.GITHUB_RUN_ID, url: `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`, workflow: process.env.GITHUB_WORKFLOW ?? '', attempt: process.env.GITHUB_RUN_ATTEMPT ?? '1' } : null, }, - packages: { '@bradygaster/squad-sdk': pkgEntry(sdk, '@bradygaster/squad-sdk'), '@bradygaster/squad-cli': pkgEntry(cli, '@bradygaster/squad-cli') }, + packages: { '@squad/sdk': pkgEntry(sdk, '@squad/sdk'), '@squad/cli': pkgEntry(cli, '@squad/cli') }, lockfiles: { files: lockReport.files.length, registryEntries: lockReport.entries, violations: lockReport.violations.length, deniedPatterns: lockReport.deniedPatterns, ok: lockReport.ok, externalNpmCi: npmCi }, tests: recon ? { source: 'vitest JSON report of this run (scripts/release/test-reconciliation.mjs)', platform: recon.summary.platform, numTotalTests: recon.summary.numTotalTests, byStatus: recon.summary.byStatus, byCategory: recon.summary.byCategory, countsSum: recon.summary.countsSum, unlistedTests: recon.summary.unlistedTests, skippedFiles: recon.summary.skippedFiles, reconciliationFile: 'test-reconciliation.json' } : { source: `console summary of cited CI run ${citedRun.id} (no vitest JSON report available to this generator)`, numTotalTests: citedRun.consoleSummary.testsTotal, byStatus: { passed: citedRun.consoleSummary.testsPassed, xfail: citedRun.consoleSummary.expectedFailures, skipped: citedRun.consoleSummary.testsSkipped, todo: citedRun.consoleSummary.todos }, byCategory: {}, countsSum: citedRun.consoleSummary.testsPassed + citedRun.consoleSummary.expectedFailures + citedRun.consoleSummary.testsSkipped + citedRun.consoleSummary.todos === citedRun.consoleSummary.testsTotal, unlistedTests: citedRun.consoleSummary.testsTotal - (citedRun.consoleSummary.testsPassed + citedRun.consoleSummary.expectedFailures + citedRun.consoleSummary.testsSkipped + citedRun.consoleSummary.todos), skippedFiles: [], reconciliationFile: null }, @@ -166,7 +167,7 @@ export function buildManifest(opts) { citedCiRun: { url: citedRun.url, headSha: citedRun.headSha, matchesTarget: citedRun.headSha === sha, conclusion: opts.citedConclusion ?? null }, regressionTests: { titlesCited: items.reduce((a, i) => a + i.regressionTests.length, 0), titlesDefinedInTree: items.reduce((a, i) => a + i.regressionTests.filter((t) => t.definedIn).length, 0), titlesExecutedInReport: items.reduce((a, i) => a + i.regressionTests.filter((t) => t.executedInCitedReport === true).length, 0), reportAvailable: reportTitles !== null }, }, - comparison: { baselineManifest: opts.baseline ? path.basename(opts.baseline) : null, baselineCommit, diffStat, firstParentCommits: firstParent, closureItemsBefore: baselineCarried, closureItemsCarriedNow: closure.carried, packageVersions: baseline ? { before: baseline.packages?.['@bradygaster/squad-sdk']?.version ?? baseline.packages?.['squad-sdk']?.version ?? null, now: sdk.version } : null, verdict: baselineCarried !== null ? `${closure.carried}/${closure.trackedItems} closure items carried at ${sha.slice(0, 8)} (baseline recorded ${baselineCarried}); ${closure.contentEvidencePresent} with code-level evidence, ${closure.presenceOnly} presence-only.` : null }, + comparison: { baselineManifest: opts.baseline ? path.basename(opts.baseline) : null, baselineCommit, diffStat, firstParentCommits: firstParent, closureItemsBefore: baselineCarried, closureItemsCarriedNow: closure.carried, packageVersions: baseline ? { before: [sdk.name, ...LEGACY_SDK_NAMES, 'squad-sdk'].map((n) => baseline.packages?.[n]?.version).find(Boolean) ?? null, now: sdk.version } : null, verdict: baselineCarried !== null ? `${closure.carried}/${closure.trackedItems} closure items carried at ${sha.slice(0, 8)} (baseline recorded ${baselineCarried}); ${closure.contentEvidencePresent} with code-level evidence, ${closure.presenceOnly} presence-only.` : null }, artifacts: ['pack-evidence.json', 'test-reconciliation.json', 'npm-ci.json', 'lockfile-registry.json', 'policy-gates.json', 'provenance.json', 'manifest.schema.json'].filter((f) => f === 'provenance.json' || f === 'manifest.schema.json' || (evidenceDir && existsSync(path.join(evidenceDir, f)))), }; return manifest; diff --git a/scripts/release/classify-npm-registry.mjs b/scripts/release/classify-npm-registry.mjs index 25322145e..9f37602ff 100644 --- a/scripts/release/classify-npm-registry.mjs +++ b/scripts/release/classify-npm-registry.mjs @@ -5,8 +5,8 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; export const PACKAGE_KEYS = [ - ['sdk', '@bradygaster/squad-sdk'], - ['cli', '@bradygaster/squad-cli'], + ['sdk', '@squad/sdk'], + ['cli', '@squad/cli'], ]; export function classifyRegistryVersion({ diff --git a/scripts/release/closure-items.json b/scripts/release/closure-items.json index aff7cbd25..ebd4ea443 100644 --- a/scripts/release/closure-items.json +++ b/scripts/release/closure-items.json @@ -139,7 +139,7 @@ ], "anchor": "--client", "sourceEvidence": "`squad-cli/src/cli-entry.ts`", - "lockingTests": "`clients.ts: imports from @bradygaster/squad-sdk/client, merges repeated --client flags…`; Brady `2. every --client help line fits 80 columns`" + "lockingTests": "`clients.ts: imports from @squad/sdk/client, merges repeated --client flags…`; Brady `2. every --client help line fits 80 columns`" }, { "id": "2238-T09", diff --git a/scripts/release/distribution-identity.json b/scripts/release/distribution-identity.json new file mode 100644 index 000000000..32e7dc2ab --- /dev/null +++ b/scripts/release/distribution-identity.json @@ -0,0 +1,25 @@ +{ + "$comment": "Single source of truth for Squad's published distribution identities. `current` is what this tree builds and publishes; `legacy` lists retired identities that existing installs and generated configs may still reference. To change an identity, edit `current` (moving the old value into `legacy`) and run `node scripts/rename-distribution-identity.mjs --write --from ` for each renamed entry. See docs/src/content/docs/get-started/package-rename.md.", + "npm": { + "cli": { + "current": "@squad/cli", + "legacy": ["@bradygaster/squad-cli"] + }, + "sdk": { + "current": "@squad/sdk", + "legacy": ["@bradygaster/squad-sdk"] + } + }, + "homebrew": { + "tap": { + "current": "bradygaster/homebrew-squad", + "legacy": [] + } + }, + "winget": { + "identifier": { + "current": "bradygaster.Squad", + "legacy": [] + } + } +} diff --git a/scripts/release/emit-pack-evidence-hashes.mjs b/scripts/release/emit-pack-evidence-hashes.mjs index fa1087ef3..656b76542 100644 --- a/scripts/release/emit-pack-evidence-hashes.mjs +++ b/scripts/release/emit-pack-evidence-hashes.mjs @@ -5,5 +5,5 @@ import path from 'node:path'; const evidence = JSON.parse(readFileSync(path.join(process.env.EVIDENCE_DIR, 'pack-evidence.json'), 'utf8')); appendFileSync( process.env.GITHUB_OUTPUT, - `sdk_sha256=${evidence.packages['@bradygaster/squad-sdk'].sha256}\ncli_sha256=${evidence.packages['@bradygaster/squad-cli'].sha256}\n`, + `sdk_sha256=${evidence.packages['@squad/sdk'].sha256}\ncli_sha256=${evidence.packages['@squad/cli'].sha256}\n`, ); diff --git a/scripts/release/manifest.schema.json b/scripts/release/manifest.schema.json index 4dbd1ce58..e62875c47 100644 --- a/scripts/release/manifest.schema.json +++ b/scripts/release/manifest.schema.json @@ -36,10 +36,10 @@ } }, "packages": { - "type": "object", "additionalProperties": false, "required": ["@bradygaster/squad-sdk", "@bradygaster/squad-cli"], + "type": "object", "additionalProperties": false, "required": ["@squad/sdk", "@squad/cli"], "properties": { - "@bradygaster/squad-sdk": { "$ref": "#/$defs/package" }, - "@bradygaster/squad-cli": { "$ref": "#/$defs/package" } + "@squad/sdk": { "$ref": "#/$defs/package" }, + "@squad/cli": { "$ref": "#/$defs/package" } } }, "lockfiles": { diff --git a/scripts/release/npm-pair-verify.mjs b/scripts/release/npm-pair-verify.mjs index 3d7b4bb2f..ce2c16676 100644 --- a/scripts/release/npm-pair-verify.mjs +++ b/scripts/release/npm-pair-verify.mjs @@ -2,11 +2,11 @@ /** * Verify the Squad npm package PAIR on the public registry with bounded backoff. * - * For @bradygaster/squad-sdk and @bradygaster/squad-cli at --version: + * For @squad/sdk and @squad/cli at --version: * - `npm view @ version dist.integrity dist.shasum` must return the version and * the integrity recorded for the locally packed tarball (--local-packs from the publish job), * - `npm view dist-tags.` must equal the version, - * - with --install-check: `npm install -g --prefix @bradygaster/squad-cli@` from an + * - with --install-check: `npm install -g --prefix @squad/cli@` from an * isolated HOME must install CLI and SDK at exactly and `--version` must print it. * * Registry reads that never converge within --max-wait-seconds are reported as UNKNOWN, not as @@ -21,7 +21,7 @@ import { tmpdir } from 'node:os'; import path from 'node:path'; const REGISTRY = process.env.PUBLIC_REGISTRY ?? 'https://registry.npmjs.org/'; -const PACKAGES = ['@bradygaster/squad-sdk', '@bradygaster/squad-cli']; +const PACKAGES = ['@squad/sdk', '@squad/cli']; const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; function arg(k, dflt) { const i = process.argv.indexOf(k); return i >= 0 ? process.argv[i + 1] : dflt; } @@ -70,15 +70,15 @@ function installCheckRun() { writeFileSync(rc, ''); const env = { ...process.env, HOME: home, USERPROFILE: home, NPM_CONFIG_USERCONFIG: rc, NPM_CONFIG_CACHE: path.join(root, 'cache'), NODE_AUTH_TOKEN: '' }; try { - const r = spawnSync(npm, ['install', '-g', '--prefix', prefix, '--no-audit', '--no-fund', '--ignore-scripts', `--registry=${REGISTRY}`, `@bradygaster/squad-cli@${tag}`], { env, encoding: 'utf8', shell: process.platform === 'win32' }); + const r = spawnSync(npm, ['install', '-g', '--prefix', prefix, '--no-audit', '--no-fund', '--ignore-scripts', `--registry=${REGISTRY}`, `@squad/cli@${tag}`], { env, encoding: 'utf8', shell: process.platform === 'win32' }); if (r.status !== 0) return { ok: false, error: (r.stderr || r.stdout || '').slice(-800) }; const modules = process.platform === 'win32' ? path.join(prefix, 'node_modules') : path.join(prefix, 'lib', 'node_modules'); - const cliPkg = JSON.parse(readFileSync(path.join(modules, '@bradygaster', 'squad-cli', 'package.json'), 'utf8')); - const sdkPath = [path.join(modules, '@bradygaster', 'squad-sdk', 'package.json'), path.join(modules, '@bradygaster', 'squad-cli', 'node_modules', '@bradygaster', 'squad-sdk', 'package.json')].find(existsSync); + const cliPkg = JSON.parse(readFileSync(path.join(modules, '@squad', 'cli', 'package.json'), 'utf8')); + const sdkPath = [path.join(modules, '@squad', 'sdk', 'package.json'), path.join(modules, '@squad', 'cli', 'node_modules', '@squad', 'sdk', 'package.json')].find(existsSync); const sdkPkg = sdkPath ? JSON.parse(readFileSync(sdkPath, 'utf8')) : null; - const ver = spawnSync(process.execPath, [path.join(modules, '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'), '--version'], { env, encoding: 'utf8' }); - const ok = cliPkg.version === version && sdkPkg?.version === version && cliPkg.dependencies?.['@bradygaster/squad-sdk'] === version && (ver.stdout || '').includes(version); - return { ok, cliVersion: cliPkg.version, sdkVersion: sdkPkg?.version ?? null, cliSdkDependency: cliPkg.dependencies?.['@bradygaster/squad-sdk'] ?? null, versionOutput: (ver.stdout || ver.stderr || '').trim().slice(0, 200) }; + const ver = spawnSync(process.execPath, [path.join(modules, '@squad', 'cli', 'dist', 'cli-entry.js'), '--version'], { env, encoding: 'utf8' }); + const ok = cliPkg.version === version && sdkPkg?.version === version && cliPkg.dependencies?.['@squad/sdk'] === version && (ver.stdout || '').includes(version); + return { ok, cliVersion: cliPkg.version, sdkVersion: sdkPkg?.version ?? null, cliSdkDependency: cliPkg.dependencies?.['@squad/sdk'] ?? null, versionOutput: (ver.stdout || ver.stderr || '').trim().slice(0, 200) }; } catch (e) { return { ok: false, error: String(e).slice(0, 800) }; } finally { diff --git a/scripts/release/override-standalone-package-versions.mjs b/scripts/release/override-standalone-package-versions.mjs index 45ea91041..db6ea6c18 100644 --- a/scripts/release/override-standalone-package-versions.mjs +++ b/scripts/release/override-standalone-package-versions.mjs @@ -15,7 +15,7 @@ for (const file of [ const pkg = JSON.parse(readFileSync(file, 'utf8')); pkg.version = version; if (file === 'packages/squad-cli/package.json') { - pkg.dependencies['@bradygaster/squad-sdk'] = version; + pkg.dependencies['@squad/sdk'] = version; } writeFileSync(file, `${JSON.stringify(pkg, null, 2)}\n`); } diff --git a/scripts/release/pack-evidence.mjs b/scripts/release/pack-evidence.mjs index 7d481a2d9..7d221d8e3 100644 --- a/scripts/release/pack-evidence.mjs +++ b/scripts/release/pack-evidence.mjs @@ -2,7 +2,7 @@ /** * Pack evidence for a Squad release. * - * Packs @bradygaster/squad-sdk and @bradygaster/squad-cli from the current tree into an + * Packs @squad/sdk and @squad/cli from the current tree into an * evidence directory and records, per package: * - the tarball file name, byte size, sha256 and the npm `integrity` (sha512) / `shasum` * - the `npm pack --dry-run --json` file list @@ -27,7 +27,7 @@ import { fileURLToPath } from 'node:url'; const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..'); const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; -export const PACKAGES = Object.freeze({ '@bradygaster/squad-sdk': 'packages/squad-sdk', '@bradygaster/squad-cli': 'packages/squad-cli' }); +export const PACKAGES = Object.freeze({ '@squad/sdk': 'packages/squad-sdk', '@squad/cli': 'packages/squad-cli' }); /** * Denied content patterns. Each hit must be allowlisted explicitly or the scan fails. @@ -149,9 +149,9 @@ export function packEvidence({ root = ROOT, outDir, expectVersion, expectSdkDep, if (!existsSync(path.join(pkgDir, 'dist'))) { result.problems.push(`${name}: dist/ missing; run npm run build first`); continue; } const manifestPath = path.join(pkgDir, 'package.json'); const originalManifest = readFileSync(manifestPath, 'utf8'); - if (pinSdkDepExact && name === '@bradygaster/squad-cli') { + if (pinSdkDepExact && name === '@squad/cli') { const manifest = JSON.parse(originalManifest); - manifest.dependencies['@bradygaster/squad-sdk'] = manifest.version; + manifest.dependencies['@squad/sdk'] = manifest.version; writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n'); } let dry; let packed; @@ -159,7 +159,7 @@ export function packEvidence({ root = ROOT, outDir, expectVersion, expectSdkDep, dry = JSON.parse(execFileSync(npm, ['pack', '--dry-run', '--json', '--ignore-scripts'], { cwd: pkgDir, encoding: 'utf8', shell: process.platform === 'win32', stdio: ['ignore', 'pipe', 'ignore'], maxBuffer: 64 * 1024 * 1024 }))[0]; packed = JSON.parse(execFileSync(npm, ['pack', '--json', '--ignore-scripts', '--pack-destination', outDir], { cwd: pkgDir, encoding: 'utf8', shell: process.platform === 'win32', stdio: ['ignore', 'pipe', 'ignore'], maxBuffer: 64 * 1024 * 1024 }))[0]; } finally { - if (pinSdkDepExact && name === '@bradygaster/squad-cli') writeFileSync(manifestPath, originalManifest); + if (pinSdkDepExact && name === '@squad/cli') writeFileSync(manifestPath, originalManifest); } const tarball = path.join(outDir, packed.filename); const bytes = readFileSync(tarball); @@ -177,7 +177,7 @@ export function packEvidence({ root = ROOT, outDir, expectVersion, expectSdkDep, rmSync(extract, { recursive: true, force: true }); } - const sdkDep = manifest.dependencies?.['@bradygaster/squad-sdk'] ?? null; + const sdkDep = manifest.dependencies?.['@squad/sdk'] ?? null; const entry = { name, dir, filename: packed.filename, bytes: bytes.length, sha256: sha256(bytes), integrity: packed.integrity, shasum: packed.shasum, fileCount: files.length, unpackedSize: packed.unpackedSize, files, @@ -189,7 +189,7 @@ export function packEvidence({ root = ROOT, outDir, expectVersion, expectSdkDep, if (expectVersion && manifest.version !== expectVersion) result.problems.push(`${name}: tarball package.json version ${manifest.version} != ${expectVersion}`); if (manifest.name !== name) result.problems.push(`${name}: tarball package.json name is ${manifest.name}`); if (manifest.private) result.problems.push(`${name}: tarball package.json is private`); - if (name === '@bradygaster/squad-cli') { + if (name === '@squad/cli') { if (expectSdkDepExact && sdkDep !== manifest.version) result.problems.push(`${name}: SDK dependency ${sdkDep} is not the exact pin ${manifest.version}`); else if (expectSdkDep && sdkDep !== expectSdkDep) result.problems.push(`${name}: SDK dependency ${sdkDep} != ${expectSdkDep}`); } diff --git a/scripts/release/policy-gates.mjs b/scripts/release/policy-gates.mjs index f1e874f12..5346e69fb 100644 --- a/scripts/release/policy-gates.mjs +++ b/scripts/release/policy-gates.mjs @@ -7,15 +7,15 @@ * repository-variable escape hatches: * * workspace-integrity root/SDK/CLI versions identical; lockfile workspace entries match; - * no stale registry-resolved @bradygaster/squad-* entries; CLI->SDK + * no stale registry-resolved SDK/CLI entries (current or legacy names); CLI->SDK * dependency floor is '>=' for prereleases and has no * prerelease suffix for stable versions (package.json AND lockfile) * prerelease-guard every workspace version is X.Y.Z, X.Y.Z-preview.N or X.Y.Z-insider.N * node-security-floor standalone defaults meet the published minimum for their Node major * publish-policy every `npm ... publish` is workspace-scoped or one of the two exact * verified tarball paths used by squad-npm-publish.yml - * publish-allowlist the publishable workspaces are exactly @bradygaster/squad-sdk and - * @bradygaster/squad-cli; the root stays private + * publish-allowlist the publishable workspaces are exactly @squad/sdk and + * @squad/cli; the root stays private * changelog-heading CHANGELOG.md has `## []`; whatsnew has `## v` * changeset-drain release mode: no pending .changeset fragments remain; * ci mode (pull_request): pending fragments are allowed and must be @@ -38,16 +38,28 @@ import { const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..'); -export const PUBLISH_ALLOWLIST = Object.freeze(['@bradygaster/squad-sdk', '@bradygaster/squad-cli']); -export const PUBLISH_ALLOWLIST_DIRS = Object.freeze({ '@bradygaster/squad-sdk': 'packages/squad-sdk', '@bradygaster/squad-cli': 'packages/squad-cli' }); +export const PUBLISH_ALLOWLIST = Object.freeze(['@squad/sdk', '@squad/cli']); +export const PUBLISH_ALLOWLIST_DIRS = Object.freeze({ '@squad/sdk': 'packages/squad-sdk', '@squad/cli': 'packages/squad-cli' }); export const SANCTIONED_VERSION = /^\d+\.\d+\.\d+(-(preview|insider)(\.\d+)?)?$/; // Mirrors test/publish-policy.test.ts and the awk program in squad-ci.yml. const NPM_PUBLISH_COMMAND = /(?:^|&&|\|\||;)\s*(?:(?:if|then)\s+)?(?:[A-Za-z_][A-Za-z0-9_]*=\S+\s+)*npm\s+[^#;&|]*\bpublish\b[^#;&|]*/; const WORKSPACE_FLAG = /(?:^|\s)(?:-w|--workspace)(?:=|\s|$)/; -const VERIFIED_TARBALL = /npm\s+publish\s+"\$PACKS_DIR\/bradygaster-squad-(?:sdk|cli)-\$\{VERSION\}\.tgz"(?:\s|$)/; - const readJson = (root, rel) => JSON.parse(readFileSync(path.join(root, rel), 'utf8')); +const DISTRIBUTION_IDENTITY = JSON.parse(readFileSync(new URL('./distribution-identity.json', import.meta.url), 'utf8')); +const WORKSPACE_PACKAGE_NAMES = [DISTRIBUTION_IDENTITY.npm.cli, DISTRIBUTION_IDENTITY.npm.sdk] + .flatMap((entry) => [entry.current, ...entry.legacy]); + +// `npm pack` names a scoped package's tarball `--.tgz` (e.g. @squad/cli -> squad-cli-2.0.0.tgz). +export function packTarballPrefix(packageName) { + return packageName.replace(/^@/, '').replace('/', '-'); +} +const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +export const VERIFIED_TARBALL = new RegExp( + `npm\\s+publish\\s+"\\$PACKS_DIR\\/(?:${[DISTRIBUTION_IDENTITY.npm.sdk.current, DISTRIBUTION_IDENTITY.npm.cli.current] + .map((name) => `${escapeRegExp(packTarballPrefix(name))}-\\$\\{VERSION\\}\\.tgz`) + .join('|')})"(?:\\s|$)`, +); function workflowInputDefault(text, trigger, input) { const lines = text.split(/\r?\n/); @@ -94,7 +106,7 @@ export function runPolicyGates({ root = ROOT, mode = 'ci' } = {}) { { const problems = []; for (const [key, val] of Object.entries(lock.packages ?? {})) { - if (key.includes('node_modules/@bradygaster/squad-') && val.resolved && /^https?:/.test(val.resolved)) problems.push(`stale registry entry ${key} -> ${val.resolved}`); + if (WORKSPACE_PACKAGE_NAMES.some((name) => key.endsWith(`node_modules/${name}`)) && val.resolved && /^https?:/.test(val.resolved)) problems.push(`stale registry entry ${key} -> ${val.resolved}`); } const expectedVersions = [ ['package.json', rootPkg.version], ['packages/squad-sdk/package.json', sdk.version], ['packages/squad-cli/package.json', cli.version], @@ -102,8 +114,8 @@ export function runPolicyGates({ root = ROOT, mode = 'ci' } = {}) { ['package-lock.json packages/squad-sdk', lock.packages?.['packages/squad-sdk']?.version], ['package-lock.json packages/squad-cli', lock.packages?.['packages/squad-cli']?.version], ]; for (const [where, v] of expectedVersions) if (v !== version) problems.push(`${where} is '${v}', root is '${version}'`); - const dep = cli.dependencies?.['@bradygaster/squad-sdk']; - const lockDep = lock.packages?.['packages/squad-cli']?.dependencies?.['@bradygaster/squad-sdk']; + const dep = cli.dependencies?.['@squad/sdk']; + const lockDep = lock.packages?.['packages/squad-cli']?.dependencies?.['@squad/sdk']; if (version.includes('-')) { const expected = `>=${version}`; if (dep !== expected) problems.push(`CLI package.json SDK dependency is '${dep}', expected '${expected}'`); diff --git a/scripts/release/registry-preflight.mjs b/scripts/release/registry-preflight.mjs index f49a80aca..0ca5aa3b9 100644 --- a/scripts/release/registry-preflight.mjs +++ b/scripts/release/registry-preflight.mjs @@ -291,7 +291,7 @@ if (isMain) { for (const [, name] of PACKAGE_KEYS) { if (packed.packages?.[name]?.integrity) local[name] = { integrity: packed.packages[name].integrity }; } - version ??= packed.packages?.['@bradygaster/squad-cli']?.manifest?.version; + version ??= packed.packages?.['@squad/cli']?.manifest?.version; } if (cliTarball || sdkTarball) { if (!cliTarball || !sdkTarball) throw new Error('--cli-tarball and --sdk-tarball must be supplied together'); @@ -300,8 +300,8 @@ if (isMain) { if (cliVersion !== sdkVersion) throw new Error(`CLI tarball version ${cliVersion} != SDK tarball version ${sdkVersion}`); if (version && version !== cliVersion) throw new Error(`requested version ${version} != tarball version ${cliVersion}`); version = cliVersion; - local['@bradygaster/squad-cli'] = { integrity: tarballIntegrity(cliTarball) }; - local['@bradygaster/squad-sdk'] = { integrity: tarballIntegrity(sdkTarball) }; + local['@squad/cli'] = { integrity: tarballIntegrity(cliTarball) }; + local['@squad/sdk'] = { integrity: tarballIntegrity(sdkTarball) }; } if (!version) throw new Error('Missing --version, --pack-evidence, or exact tarball pair'); diff --git a/scripts/release/set-package-versions.mjs b/scripts/release/set-package-versions.mjs index 86c192b77..31704c21f 100644 --- a/scripts/release/set-package-versions.mjs +++ b/scripts/release/set-package-versions.mjs @@ -11,8 +11,8 @@ for (const file of files) { const pkg = JSON.parse(readFileSync(file, 'utf8')); pkg.version = version; if (file === 'packages/squad-cli/package.json' && process.env.PIN_SDK_DEPENDENCY === 'true') { - pkg.dependencies['@bradygaster/squad-sdk'] = version; - console.log(` pinned @bradygaster/squad-sdk dep → ${version}`); + pkg.dependencies['@squad/sdk'] = version; + console.log(` pinned @squad/sdk dep → ${version}`); } writeFileSync(file, `${JSON.stringify(pkg, null, 2)}\n`); console.log(`${file} → ${version}`); diff --git a/scripts/release/smoke-sdk-exports.mjs b/scripts/release/smoke-sdk-exports.mjs index ddc3c5350..c1e55aa03 100644 --- a/scripts/release/smoke-sdk-exports.mjs +++ b/scripts/release/smoke-sdk-exports.mjs @@ -7,7 +7,7 @@ const pkg = JSON.parse(readFileSync('packages/squad-sdk/package.json', 'utf8')); const failures = []; let passed = 0; for (const [subpath, targets] of Object.entries(pkg.exports ?? {})) { - const importPath = subpath === '.' ? '@bradygaster/squad-sdk' : `@bradygaster/squad-sdk/${subpath.slice(2)}`; + const importPath = subpath === '.' ? '@squad/sdk' : `@squad/sdk/${subpath.slice(2)}`; const filePath = typeof targets === 'string' ? targets : (targets.import ?? targets.default); if (!filePath) { failures.push({ subpath, importPath, error: 'No import target defined' }); diff --git a/scripts/release/verify-draft-release-assets.mjs b/scripts/release/verify-draft-release-assets.mjs index 254209d65..39b1f7b40 100644 --- a/scripts/release/verify-draft-release-assets.mjs +++ b/scripts/release/verify-draft-release-assets.mjs @@ -71,8 +71,8 @@ export function verifyDraftReleaseAssets({ const checksums = parseChecksumManifest(immutableBytes.toString('utf8')); const packEvidence = JSON.parse(readFileSync(packEvidencePath, 'utf8')); const npmEntries = [ - packEvidence.packages?.['@bradygaster/squad-sdk'], - packEvidence.packages?.['@bradygaster/squad-cli'], + packEvidence.packages?.['@squad/sdk'], + packEvidence.packages?.['@squad/cli'], ]; for (const entry of npmEntries) { if (!entry?.filename || !/^[0-9a-f]{64}$/.test(entry.sha256 ?? '')) { diff --git a/scripts/release/verify-preview-evidence.mjs b/scripts/release/verify-preview-evidence.mjs index 1a13718a9..b162d73e4 100644 --- a/scripts/release/verify-preview-evidence.mjs +++ b/scripts/release/verify-preview-evidence.mjs @@ -5,8 +5,8 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const PACKAGES = [ - ['@bradygaster/squad-cli', 'cli'], - ['@bradygaster/squad-sdk', 'sdk'], + ['@squad/cli', 'cli'], + ['@squad/sdk', 'sdk'], ]; function sha256(bytes) { @@ -36,12 +36,12 @@ export function verifyPreviewEvidence(options) { requireEqual(required(options, 'evidenceArtifact'), expectedArtifact, 'evidence artifact name'); const sourceManifests = { - '@bradygaster/squad-cli': readJson(required(options, 'cliPackageJson')), - '@bradygaster/squad-sdk': readJson(required(options, 'sdkPackageJson')), + '@squad/cli': readJson(required(options, 'cliPackageJson')), + '@squad/sdk': readJson(required(options, 'sdkPackageJson')), }; - const expectedVersion = sourceManifests['@bradygaster/squad-cli'].version; - requireEqual(sourceManifests['@bradygaster/squad-sdk'].version, expectedVersion, 'target source package versions'); - const sourceSdkDependency = sourceManifests['@bradygaster/squad-cli'].dependencies?.['@bradygaster/squad-sdk']; + const expectedVersion = sourceManifests['@squad/cli'].version; + requireEqual(sourceManifests['@squad/sdk'].version, expectedVersion, 'target source package versions'); + const sourceSdkDependency = sourceManifests['@squad/cli'].dependencies?.['@squad/sdk']; if (![expectedVersion, `>=${expectedVersion}`].includes(sourceSdkDependency)) { throw new Error(`target source CLI SDK dependency: expected ${expectedVersion} or >=${expectedVersion}, got ${sourceSdkDependency ?? ''}`); } @@ -78,7 +78,7 @@ export function verifyPreviewEvidence(options) { requireEqual(packed.manifest?.name, name, `${name} packed manifest name`); requireEqual(packed.manifest?.version, expectedVersion, `${name} packed version`); requireEqual(manifested.version, expectedVersion, `${name} verification manifest version`); - if (name === '@bradygaster/squad-cli') { + if (name === '@squad/cli') { requireEqual(packed.manifest?.sdkDependency, expectedVersion, `${name} packed SDK dependency`); requireEqual(manifested.sdkDependency, sourceSdkDependency, `${name} verification manifest SDK dependency`); } diff --git a/scripts/release/verify-publish-evidence.mjs b/scripts/release/verify-publish-evidence.mjs index 0353b61ee..5c0c0d1c3 100644 --- a/scripts/release/verify-publish-evidence.mjs +++ b/scripts/release/verify-publish-evidence.mjs @@ -24,7 +24,7 @@ export function verifyPublishEvidence({ } const report = JSON.parse(readFileSync(path.join(evidenceDir, 'pack-evidence.json'), 'utf8')); if (!report.ok) throw new Error('pack-evidence.json does not report ok=true'); - const expected = ['@bradygaster/squad-sdk', '@bradygaster/squad-cli']; + const expected = ['@squad/sdk', '@squad/cli']; const tgzs = readdirSync(evidenceDir).filter((file) => file.endsWith('.tgz')).sort(); if (tgzs.length !== 2) throw new Error(`evidence must contain exactly two tarballs, found ${tgzs.join(', ')}`); const local = {}; @@ -32,7 +32,7 @@ export function verifyPublishEvidence({ const entry = report.packages?.[name]; if (!entry) throw new Error(`missing evidence for ${name}`); if (entry.manifest?.version !== version) throw new Error(`${name} evidence version ${entry.manifest?.version} != ${version}`); - if (name.endsWith('squad-cli') && entry.manifest?.sdkDependency !== version) { + if (name === expected[1] && entry.manifest?.sdkDependency !== version) { throw new Error(`CLI evidence does not pin SDK exactly to ${version}`); } if (!entry.privacy?.denyPatterns?.includes('email-upn')) throw new Error(`${name} evidence lacks the email-upn privacy rule`); diff --git a/scripts/release/workspace-lockfile.mjs b/scripts/release/workspace-lockfile.mjs index 23ec04946..1cf6eefef 100644 --- a/scripts/release/workspace-lockfile.mjs +++ b/scripts/release/workspace-lockfile.mjs @@ -4,8 +4,10 @@ import { readFileSync, writeFileSync } from 'node:fs'; const mode = process.argv[2]; const lock = JSON.parse(readFileSync('package-lock.json', 'utf8')); const packages = lock.packages ?? {}; +const identity = JSON.parse(readFileSync(new URL('./distribution-identity.json', import.meta.url), 'utf8')); +const workspaceNames = [identity.npm.cli, identity.npm.sdk].flatMap((entry) => [entry.current, ...entry.legacy]); const stale = Object.keys(packages).filter((key) => - key.includes('/node_modules/@bradygaster/squad-') + workspaceNames.some((name) => key.endsWith(`/node_modules/${name}`)) && packages[key].resolved?.startsWith('https://')); if (mode === 'fix') { @@ -31,8 +33,8 @@ if (mode === 'fix') { if (new Set([root.version, sdk.version, cli.version]).size !== 1) { throw new Error('Root, SDK, and CLI versions must match.'); } - const dependency = cli.dependencies?.['@bradygaster/squad-sdk']; - const lockDependency = packages['packages/squad-cli']?.dependencies?.['@bradygaster/squad-sdk']; + const dependency = cli.dependencies?.['@squad/sdk']; + const lockDependency = packages['packages/squad-cli']?.dependencies?.['@squad/sdk']; if (sdk.version.includes('-')) { const expected = `>=${sdk.version}`; if (dependency !== expected || lockDependency !== expected) { diff --git a/scripts/rename-distribution-identity.mjs b/scripts/rename-distribution-identity.mjs new file mode 100644 index 000000000..fc3022522 --- /dev/null +++ b/scripts/rename-distribution-identity.mjs @@ -0,0 +1,177 @@ +#!/usr/bin/env node +/** + * Rewrite Squad's distribution identities across the tracked tree. + * + * Reads scripts/release/distribution-identity.json and replaces every retired + * identity passed with --from (default: every `legacy` entry) by its `current` + * value. npm names are rewritten in all the forms the tree uses: plain specs, + * subpaths, regex-escaped and Windows paths, URL-encoded registry paths, + * path.join() segments and `npm pack` tarball file names. + * + * Historical records (changelogs, blog posts, internal launch notes, live team + * state, published-artifact evidence) are left untouched on purpose, and so are + * the compatibility shims that must keep recognizing the retired names. + * + * node scripts/rename-distribution-identity.mjs # report only (exit 1 if anything remains) + * node scripts/rename-distribution-identity.mjs --write # apply + * node scripts/rename-distribution-identity.mjs --write --from @squad/cli + */ +import { execFileSync } from 'node:child_process'; +import { readFileSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); +const IDENTITY_PATH = path.join(ROOT, 'scripts', 'release', 'distribution-identity.json'); + +/** Paths that record history or must keep recognizing retired identities. */ +export const PRESERVED_PATHS = [ + /(^|\/)CHANGELOG\.md$/, + /^docs\/src\/content\/blog\//, + /^docs\/_internal\//, + /^\.squad\//, + /^\.github\/aw\//, + /^test-fixtures\/spec\/suite-v0\.2\/preview-tarball-matrix\.json$/, + /^test-fixtures\/spec\/suite-v0\.2\/upgrade-matrix\.json$/, + /^scripts\/release\/distribution-identity\.json$/, + /^scripts\/rename-distribution-identity\.mjs$/, + /^packages\/squad-cli\/src\/cli\/core\/package-identity\.ts$/, + /^docs\/src\/content\/docs\/get-started\/package-rename\.md$/, + /^test\/package-identity\.test\.ts$/, + /^\.changeset\//, + // Samples pinned to an already-published SDK release (^0.8.0) keep the name it was published under. + /^samples\/(?:cost-aware-router|autonomous-pipeline)\//, +]; + +/** Migration instructions must keep naming the retired package (e.g. `npm uninstall -g `). */ +export const KEEP_LINE = /\b(?:npm uninstall|pnpm remove|yarn global remove) -g\b|\byarn global remove\b|\bUpgrading from\b/i; + +const BINARY_EXT = /\.(png|jpe?g|gif|ico|webp|svg|woff2?|ttf|eot|zip|tgz|gz|exe|dll|pdf|mp4|mov|wasm)$/i; + +const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + +function splitNpmName(name) { + const m = /^(@[^/]+)\/(.+)$/.exec(name); + if (!m) throw new Error(`Expected a scoped npm name, got ${name}`); + return { scope: m[1], bare: m[2] }; +} + +/** Build [regex, replacement] pairs for one npm identity change. */ +export function npmRules(from, to) { + const f = splitNpmName(from); + const t = splitNpmName(to); + const rules = []; + // Separator spellings found in source, tests, docs and workflows; longest first. + const seps = ['[\\\\/]', '\\\\/', '\\/', '\\\\', '\\', '%2F', '%2f', '/']; + for (const sep of seps) { + rules.push([ + new RegExp(`${escapeRe(f.scope)}${escapeRe(sep)}${escapeRe(f.bare)}(?![A-Za-z0-9_])`, 'g'), + `${t.scope}${sep}${t.bare}`, + ]); + } + // path.join('node_modules', '@scope', 'name') segments. + rules.push([ + new RegExp(`(['"\`])${escapeRe(f.scope)}\\1(\\s*,\\s*)(['"\`])${escapeRe(f.bare)}\\3`, 'g'), + `$1${t.scope}$1$2$3${t.bare}$3`, + ]); + // `npm pack` tarball names: @scope/name -> scope-name-.tgz + rules.push([ + new RegExp(`(?` short forms. */ +export function homebrewRules(from, to) { + const fm = /^([^/]+)\/homebrew-(.+)$/.exec(from); + const tm = /^([^/]+)\/homebrew-(.+)$/.exec(to); + if (!fm || !tm) throw new Error(`Expected owner/homebrew-name taps, got ${from} -> ${to}`); + const fShort = `${fm[1]}/${fm[2]}`; + const tShort = `${tm[1]}/${tm[2]}`; + return [ + [new RegExp(escapeRe(from), 'g'), to], + [new RegExp(`(brew tap\\s+)${escapeRe(fShort)}(?![A-Za-z0-9_/-])`, 'g'), `$1${tShort}`], + [new RegExp(`(--cask\\s+)${escapeRe(fShort)}/`, 'g'), `$1${tShort}/`], + ]; +} + +export function wingetRules(from, to) { + return [[new RegExp(`(? onlyFrom.length === 0 || onlyFrom.includes(name); + const rules = []; + for (const entry of Object.values(identity.npm)) { + for (const old of entry.legacy) if (want(old) && old !== entry.current) rules.push(...npmRules(old, entry.current)); + } + for (const old of identity.homebrew.tap.legacy) { + if (want(old) && old !== identity.homebrew.tap.current) rules.push(...homebrewRules(old, identity.homebrew.tap.current)); + } + for (const old of identity.winget.identifier.legacy) { + if (want(old) && old !== identity.winget.identifier.current) rules.push(...wingetRules(old, identity.winget.identifier.current)); + } + return rules; +} + +/** Generated blocks rendered from preserved evidence (see scripts/render-upgrade-matrix.mjs). */ +export const KEEP_BLOCKS = [/[\s\S]*?/g]; + +export function applyRules(text, rules) { + const kept = []; + const keep = (s) => `\u0000KEEP${kept.push(s) - 1}\u0000`; + let masked = text; + for (const re of KEEP_BLOCKS) masked = masked.replace(re, keep); + let out = masked + .split('\n') + .map((line) => (KEEP_LINE.test(line) ? keep(line) : line)) + .join('\n'); + for (const [re, replacement] of rules) out = out.replace(re, replacement); + return out.replace(/\u0000KEEP(\d+)\u0000/g, (_, i) => kept[Number(i)]); +} + +export function isPreserved(file) { + return PRESERVED_PATHS.some((re) => re.test(file)); +} + +function main(argv) { + const write = argv.includes('--write'); + const onlyFrom = []; + for (let i = 0; i < argv.length; i++) if (argv[i] === '--from' && argv[i + 1]) onlyFrom.push(argv[++i]); + const rules = buildRules(loadIdentity(), onlyFrom); + if (rules.length === 0) { + console.log('No retired identities to rewrite.'); + return 0; + } + const files = execFileSync('git', ['ls-files', '-z'], { cwd: ROOT, encoding: 'utf8' }).split('\0').filter(Boolean); + const changed = []; + for (const file of files) { + if (isPreserved(file) || BINARY_EXT.test(file)) continue; + const abs = path.join(ROOT, file); + let text; + try { + text = readFileSync(abs, 'utf8'); + } catch { + continue; + } + if (text.includes('\0')) continue; + const next = applyRules(text, rules); + if (next !== text) { + changed.push(file); + if (write) writeFileSync(abs, next); + } + } + for (const file of changed) console.log(`${write ? 'rewrote' : 'would rewrite'} ${file}`); + console.log(`${changed.length} file(s) ${write ? 'rewritten' : 'still reference retired identities'}.`); + return write || changed.length === 0 ? 0 : 1; +} + +if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) { + process.exitCode = main(process.argv.slice(2)); +} diff --git a/scripts/render-upgrade-matrix.mjs b/scripts/render-upgrade-matrix.mjs index d1eb0e267..2f00406f1 100644 --- a/scripts/render-upgrade-matrix.mjs +++ b/scripts/render-upgrade-matrix.mjs @@ -24,6 +24,7 @@ export const END = ''; const PLATFORM_LABEL = { win32: 'Windows', linux: 'Linux', darwin: 'macOS' }; const STATUS_ICON = { pass: '✅', fail: '🔴', skipped: '⏭️' }; +const IDENTITY = JSON.parse(fs.readFileSync(path.join(ROOT, 'scripts', 'release', 'distribution-identity.json'), 'utf8')); const esc = (s) => String(s ?? '').replace(/\|/g, '\\|').replace(/\r?\n/g, ' '); @@ -129,7 +130,7 @@ export function renderSection(matrix) { lines.push(''); lines.push('## Tested upgrade paths'); lines.push(''); - lines.push(`Every row below is a pinned, published artifact of an older Squad release driven through \`squad init\` under a given project state shape, then **upgraded** with the CLI packed from the tree under test (\`npm pack\` of \`@bradygaster/squad-sdk\` + \`@bradygaster/squad-cli\`) by \`test/squad-20-upgrade-matrix.test.ts\`. A row **passes** only when every non-xfail assertion passed; a row that carries a pinned finding is reported as **pass WITH known … failure (F)**, never as a bare pass; **fail** names the failing checks; **not applicable** cells are each explained individually below (none means "not run"). Machine-readable source: \`${path.relative(ROOT, MATRIX_PATH).replace(/\\/g, '/')}\` (protocol \`${matrix.protocol}\`).`); + lines.push(`Every row below is a pinned, published artifact of an older Squad release driven through \`squad init\` under a given project state shape, then **upgraded** with the CLI packed from the tree under test (\`npm pack\` of \`${IDENTITY.npm.sdk.current}\` + \`${IDENTITY.npm.cli.current}\`) by \`test/squad-20-upgrade-matrix.test.ts\`. A row **passes** only when every non-xfail assertion passed; a row that carries a pinned finding is reported as **pass WITH known … failure (F)**, never as a bare pass; **fail** names the failing checks; **not applicable** cells are each explained individually below (none means "not run"). Machine-readable source: \`${path.relative(ROOT, MATRIX_PATH).replace(/\\/g, '/')}\` (protocol \`${matrix.protocol}\`).`); lines.push(''); lines.push('### Three different things'); lines.push(''); diff --git a/scripts/run-benchmarks.mjs b/scripts/run-benchmarks.mjs index 2a610fe59..0b0110f06 100644 --- a/scripts/run-benchmarks.mjs +++ b/scripts/run-benchmarks.mjs @@ -2,7 +2,7 @@ /** * scripts/run-benchmarks.mjs * - * Foundation runner for the existing @bradygaster/squad-sdk BenchmarkSuite. + * Foundation runner for the existing @squad/sdk BenchmarkSuite. * * Why this script exists * ---------------------- diff --git a/scripts/verify-team-isolation.mjs b/scripts/verify-team-isolation.mjs index ec6d685ed..f9f709c16 100644 --- a/scripts/verify-team-isolation.mjs +++ b/scripts/verify-team-isolation.mjs @@ -21,6 +21,9 @@ import { tmpdir } from 'node:os'; const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..'); const NODE_MODULES = join(ROOT, 'node_modules'); const SYNTHETIC_MARKER = 'QUARTZ_NAVIGATOR_SYNTHETIC_TEAM'; +const [SDK_SCOPE, SDK_BARE] = JSON.parse( + readFileSync(join(ROOT, 'scripts', 'release', 'distribution-identity.json'), 'utf8'), +).npm.sdk.current.split('/'); if (!existsSync(NODE_MODULES)) { throw new Error('node_modules is required; restore the locked dependencies before running this check'); @@ -57,7 +60,7 @@ function linkDependencies(destination) { const source = join(NODE_MODULES, entry.name); const target = join(destinationModules, entry.name); - if (entry.name !== '@bradygaster') { + if (entry.name !== SDK_SCOPE) { symlinkSync(source, target, entry.isDirectory() ? 'dir' : 'file'); continue; } @@ -65,7 +68,7 @@ function linkDependencies(destination) { mkdirSync(target); for (const scopedEntry of readdirSync(source, { withFileTypes: true })) { const scopedTarget = join(target, scopedEntry.name); - if (scopedEntry.name === 'squad-sdk') { + if (scopedEntry.name === SDK_BARE) { symlinkSync(join(destination, 'packages', 'squad-sdk'), scopedTarget, 'dir'); } else { symlinkSync( diff --git a/templates/model-selection-reference.md b/templates/model-selection-reference.md index eb8ec3a35..1c0562c59 100644 --- a/templates/model-selection-reference.md +++ b/templates/model-selection-reference.md @@ -2,7 +2,7 @@ ## Per-Agent Model Selection -Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@bradygaster/squad-sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@bradygaster/squad-sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. +Before spawning an agent, resolve its model with the central resolver (`resolveAgentModel` from `@squad/sdk/agents`, also exported there under its original name `resolveModel`; it returns the model with its `source` and `rationale`). The root `@squad/sdk` export `resolveModel` is a legacy adapter over the same resolver that reads `.squad/config.json` and returns only the model ID. Apply the precedence below; first match wins. Every result carries a **source** and a **rationale**, and both appear in the spawn acknowledgment. Spawn guidance never names a model ID. It reasons in sources and tiers (`premium`, `standard`, `fast`); **Appendix A** is the only place that turns a tier into model IDs. diff --git a/templates/ralph-reference.md b/templates/ralph-reference.md index b1b13d877..ae80caae2 100644 --- a/templates/ralph-reference.md +++ b/templates/ralph-reference.md @@ -6,7 +6,7 @@ Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph is m **⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous monitoring loop — scan for work, report findings to the coordinator, scan again, repeat — until the board is empty or the user explicitly says "idle" or "stop". This is not optional. If work exists, keep coordinating it. When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).** -**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @bradygaster/squad-cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). +**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @squad/cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch). **On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details. @@ -56,7 +56,7 @@ gh pr list --state open --draft --json number,title,author,labels,checks --limit | **Review feedback** | PR has `CHANGES_REQUESTED` review | Report feedback to the coordinator for routing to the PR author agent | | **CI failures** | PR checks failing | Report to the coordinator to route a fix or create a fix issue | | **Approved PRs** | PR approved, CI green, ready for pre-merge review | Report readiness to the coordinator for verification and hand-off to a human; Ralph does not merge or close issues | -| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @bradygaster/squad-cli watch` for persistent polling. | +| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @squad/cli watch` for persistent polling. | ### Authority boundaries @@ -88,9 +88,9 @@ After every 3-5 rounds, pause and report before continuing: Ralph's in-session loop processes work while it exists, then idles. For **persistent polling** between sessions or when you're away from the keyboard, use the `squad watch` CLI command: ```bash -npx @bradygaster/squad-cli watch # polls every 10 minutes (default) -npx @bradygaster/squad-cli watch --interval 5 # polls every 5 minutes -npx @bradygaster/squad-cli watch --interval 30 # polls every 30 minutes +npx @squad/cli watch # polls every 10 minutes (default) +npx @squad/cli watch --interval 5 # polls every 5 minutes +npx @squad/cli watch --interval 30 # polls every 30 minutes ``` This runs as a standalone local process (not inside Copilot) that: @@ -104,7 +104,7 @@ This runs as a standalone local process (not inside Copilot) that: | Layer | When | How | |-------|------|-----| | **In-session** | You're at the keyboard | "Ralph, go" — active loop while work exists | -| **Local watchdog** | You're away but machine is on | `npx @bradygaster/squad-cli watch --interval 10` | +| **Local watchdog** | You're away but machine is on | `npx @squad/cli watch --interval 10` | | **Cloud heartbeat** | Fully unattended | `squad-heartbeat.yml` — event-based only (cron disabled) | ### Ralph State @@ -140,8 +140,8 @@ After the coordinator's step 6 ("Immediately assess: Does anything trigger follo 3. Coordinator-managed agents work → results collected and follow-up assessed 4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause 5. More work found → coordinator acts on it; Ralph continues monitoring -6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @bradygaster/squad-cli watch` for persistent polling) +6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @squad/cli watch` for persistent polling) -**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @bradygaster/squad-cli watch`. +**Ralph does NOT ask "should I continue?" — Ralph KEEPS MONITORING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx @squad/cli watch`. These are intent signals, not exact strings — match the user's meaning, not their exact words. diff --git a/templates/session-init-reference.md b/templates/session-init-reference.md index c41207f81..14bc3044a 100644 --- a/templates/session-init-reference.md +++ b/templates/session-init-reference.md @@ -85,7 +85,7 @@ it. Skip the npm probe. **Step B — npm probe (on cache miss / stale / version mismatch):** ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If the command does not respond within 5 seconds, diff --git a/templates/skills/e2e-template-testing/SKILL.md b/templates/skills/e2e-template-testing/SKILL.md index d1b38d94e..811830142 100644 --- a/templates/skills/e2e-template-testing/SKILL.md +++ b/templates/skills/e2e-template-testing/SKILL.md @@ -454,16 +454,16 @@ immediately and report the failure — do **not** attempt workarounds or mark scenarios as SKIPPED. 0. **Clean stale SDK before building.** Before running `npm run build`, remove any - stale published copy of `@bradygaster/squad-sdk` that may have been installed + stale published copy of `@squad/sdk` that may have been installed into `packages/squad-cli/node_modules/`. This local copy shadows the workspace symlink in the root `node_modules/` and causes TypeScript to see the published version instead of the local source. Run from the repo root: ```powershell - $stale = "packages\squad-cli\node_modules\@bradygaster\squad-sdk" + $stale = "packages\squad-cli\node_modules\@squad\sdk" if (Test-Path $stale) { Remove-Item -Recurse -Force $stale; Write-Host "Cleaned stale SDK" } ``` This is safe to run unconditionally — if the path doesn't exist, the command is - a no-op. The root `node_modules\@bradygaster\squad-sdk` workspace symlink remains + a no-op. The root `node_modules\@squad\sdk` workspace symlink remains intact and npm will use it automatically. 1. **Build must succeed.** Run `npm run build` from the repo root. A build failure blocks all scenarios; report `BUILD_FAILED` and stop. diff --git a/templates/skills/release-process/SKILL.md b/templates/skills/release-process/SKILL.md index 10172b6fd..4c43be026 100644 --- a/templates/skills/release-process/SKILL.md +++ b/templates/skills/release-process/SKILL.md @@ -76,8 +76,8 @@ Choose a unique SemVer version and update all package manifests: ```bash VERSION=0.14.0-preview.1 npm version "$VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` @@ -128,7 +128,7 @@ The workflow: Install the resulting preview: ```bash -npm install -g @bradygaster/squad-cli@preview +npm install -g @squad/cli@preview ``` The same preview is available through `brew install --cask squad-preview` and @@ -214,8 +214,8 @@ Use `insider`, `preview`, or `latest` for `DIST_TAG`: VERSION=0.14.0 DIST_TAG=latest -npm view @bradygaster/squad-sdk "dist-tags.$DIST_TAG" -npm view @bradygaster/squad-cli "dist-tags.$DIST_TAG" +npm view @squad/sdk "dist-tags.$DIST_TAG" +npm view @squad/cli "dist-tags.$DIST_TAG" gh release view "v$VERSION" ``` @@ -277,8 +277,8 @@ Prepare the next development version in a normal PR to `dev`: ```bash NEXT_VERSION=0.15.0-preview.1 npm version "$NEXT_VERSION" --workspaces --include-workspace-root --no-git-tag-version -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$NEXT_VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$NEXT_VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/templates/skills/squad-version-check/SKILL.md b/templates/skills/squad-version-check/SKILL.md index 5f3fd785d..21cb71b4f 100644 --- a/templates/skills/squad-version-check/SKILL.md +++ b/templates/skills/squad-version-check/SKILL.md @@ -1,6 +1,6 @@ --- name: "squad-version-check" -description: "Internals of how @bradygaster/squad-cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." +description: "Internals of how @squad/cli stamps its version, how `squad upgrade` works (what it preserves vs overwrites), and how to probe the npm registry for the latest version from a coordinator prompt." allowedTools: [] confidence: medium domain: squad-internals @@ -18,13 +18,13 @@ source: "validated in bradygaster/squad#1173 recon (2026-05-26)." ## What This Skill Covers -Reusable knowledge about how `@bradygaster/squad-cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. +Reusable knowledge about how `@squad/cli` stamps its version into `squad.agent.md`, how `squad upgrade` works, what it preserves vs. overwrites, and how to probe the npm registry for the latest version from a coordinator prompt. --- ## Package & Registry Facts -- **Package name:** `@bradygaster/squad-cli` +- **Package name:** `@squad/cli` - **Registry:** npm (public) - **CLI binary:** `squad` (registered via `package.json#bin.squad`) - **Node version requirement:** Node ≥22.5.0 (ESM-only codebase) @@ -74,9 +74,9 @@ Reads the stamped version back from `squad.agent.md`: ### Self-upgrade path (`selfUpgradeCli()`): Detects npm/pnpm/yarn via `npm_execpath` and `npm_config_user_agent`. Runs: -- npm: `npm install -g @bradygaster/squad-cli@latest` -- pnpm: `pnpm add -g @bradygaster/squad-cli@latest` -- yarn: `yarn global add @bradygaster/squad-cli@latest` +- npm: `npm install -g @squad/cli@latest` +- pnpm: `pnpm add -g @squad/cli@latest` +- yarn: `yarn global add @squad/cli@latest` Use `@insider` tag for insider builds. ### `compareSemver(a, b)` utility (in upgrade.js): @@ -106,7 +106,7 @@ The file is read-only from the upgrade path's perspective. Only the coordinator Use this one-liner from inside a coordinator prompt to fetch dist-tags: ``` -npm view @bradygaster/squad-cli dist-tags --json +npm view @squad/cli dist-tags --json ``` - Timeout: **5 seconds.** If no response within 5 seconds, abandon and show normal greeting. diff --git a/templates/skills/versioning-policy/SKILL.md b/templates/skills/versioning-policy/SKILL.md index 59de6f54b..9b5ba4e99 100644 --- a/templates/skills/versioning-policy/SKILL.md +++ b/templates/skills/versioning-policy/SKILL.md @@ -8,8 +8,8 @@ source: "earned (PR #640 workspace resolution incident and automated release cha ## Context -Squad publishes `@bradygaster/squad-sdk` and -`@bradygaster/squad-cli` from one npm workspace. Their versions and the root +Squad publishes `@squad/sdk` and +`@squad/cli` from one npm workspace. Their versions and the root version move together. A mismatched prerelease dependency can make npm silently resolve an older registry SDK instead of the local workspace. @@ -52,8 +52,8 @@ For every committed preview version, set both the CLI manifest and lockfile dependency floor to that exact preview: ```bash -npm pkg set "dependencies.@bradygaster/squad-sdk=>=$VERSION" \ - --workspace @bradygaster/squad-cli +npm pkg set "dependencies.@squad/sdk=>=$VERSION" \ + --workspace @squad/cli npm install --package-lock-only ``` diff --git a/templates/workflows/squad-insider-release.yml b/templates/workflows/squad-insider-release.yml index 36a1121bf..2f09ca669 100644 --- a/templates/workflows/squad-insider-release.yml +++ b/templates/workflows/squad-insider-release.yml @@ -50,7 +50,7 @@ jobs: run: | gh release create "${{ steps.version.outputs.insider_tag }}" \ --title "${{ steps.version.outputs.insider_tag }}" \ - --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @bradygaster/squad-cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ + --notes "This is an insider/development build of Squad. Install with:\`\`\`bash\nnpm install -g @squad/cli@${{ steps.version.outputs.insider_tag }}\n\`\`\`\n\n**Note:** Insider builds may be unstable and are intended for early adopters and testing only." \ --prerelease - name: Verify release diff --git a/test-fixtures/spec/suite-v0.2/host-feature-matrix.json b/test-fixtures/spec/suite-v0.2/host-feature-matrix.json index 9746211ef..84ab51229 100644 --- a/test-fixtures/spec/suite-v0.2/host-feature-matrix.json +++ b/test-fixtures/spec/suite-v0.2/host-feature-matrix.json @@ -3636,7 +3636,7 @@ "copilot": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3645,7 +3645,7 @@ "claude": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3654,7 +3654,7 @@ "kiro": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3663,7 +3663,7 @@ "opencode": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3672,7 +3672,7 @@ "cursor": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3681,7 +3681,7 @@ "codex": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -3690,7 +3690,7 @@ "antigravity": { "capability": "supported", "validation": "validated-test", - "mechanism": "Platform adapters in `@bradygaster/squad-sdk/platform`, consumed by `squad triage|watch`.", + "mechanism": "Platform adapters in `@squad/sdk/platform`, consumed by `squad triage|watch`.", "evidence": [ "validated-test:test/platform-adapter.test.ts::*", "validated-test:test/ralph-commands.test.ts::*" @@ -4204,7 +4204,7 @@ "copilot": { "capability": "supported", "validation": "validated-test", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4215,7 +4215,7 @@ "claude": { "capability": "supported", "validation": "validated-live", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4232,7 +4232,7 @@ "kiro": { "capability": "supported", "validation": "validated-test", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4245,7 +4245,7 @@ "opencode": { "capability": "supported", "validation": "validated-live", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4258,7 +4258,7 @@ "cursor": { "capability": "supported", "validation": "validated-test", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4271,7 +4271,7 @@ "codex": { "capability": "supported", "validation": "validated-test", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", @@ -4284,7 +4284,7 @@ "antigravity": { "capability": "supported", "validation": "validated-test", - "mechanism": "Projected launch spec `npx -y @bradygaster/squad-cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", + "mechanism": "Projected launch spec `npx -y @squad/cli@ state-mcp` (or standalone binary); digest §4 documents the host prefixes.", "evidence": [ "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::executes squad_state tools against the workspace .squad directory", "validated-test:test/squad-20-real-clients-stdio.e2e.test.ts::writes the host config and agent files each client reads", diff --git a/test-fixtures/spec/suite-v0.2/upgrade-matrix.json b/test-fixtures/spec/suite-v0.2/upgrade-matrix.json index b4730598e..969a3fa21 100644 --- a/test-fixtures/spec/suite-v0.2/upgrade-matrix.json +++ b/test-fixtures/spec/suite-v0.2/upgrade-matrix.json @@ -327,12 +327,12 @@ "platform": "linux", "arch": "x64", "node": "v22.23.4", - "target": "2.0.0-preview.4", - "targetSha": "9b254ba858abc19ef62e513993d9802312bfe34c", - "harnessHash": "a9713d320fdb479ced9cd311f36cf33bbd70d5733afb1617cd740831ce6767f8", + "target": "2.0.0", + "targetSha": "758861e6bcc66e2466c1cb66d94f654712aec1e6", + "harnessHash": "48482391aaaf04da4f099f0d100e7a57dcb5e61f2c47858e368337343729d52a", "event": "pull_request", - "runUrl": "https://github.com/github/squad/actions/runs/43147851248", - "recordedAt": "2026-11-12T03:25:33.018Z", + "runUrl": "https://github.com/github/squad/actions/runs/44384646543", + "recordedAt": "2026-11-18T19:52:21.569Z", "results": [ { "producer": "0.9.1", @@ -440,8 +440,8 @@ } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, @@ -521,17 +521,17 @@ } ], "notes": [ - "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "plain upgrade changed 231 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+227)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, { - "producer": "0.9.1", + "producer": "0.13.1", "source": "npm", - "shape": "profile", + "shape": "default", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", + "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ { "id": "producer-artifact-verified", @@ -576,8 +576,7 @@ }, { "id": "downgrade-probe", - "status": "xfail", - "detail": "dry-run MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)" + "status": "pass" }, { "id": "clients-projected", @@ -597,13 +596,13 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", - "downgrade-probe: F3" + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", + "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { @@ -681,17 +680,17 @@ } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, { - "producer": "0.13.1", + "producer": "0.9.1", "source": "npm", - "shape": "default", + "shape": "profile", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", + "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", "checks": [ { "id": "producer-artifact-verified", @@ -736,7 +735,8 @@ }, { "id": "downgrade-probe", - "status": "pass" + "status": "xfail", + "detail": "dry-run MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)" }, { "id": "clients-projected", @@ -756,19 +756,19 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", - "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 68 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "downgrade-probe: F3" ] }, { "producer": "0.13.1", "source": "npm", - "shape": "profile", + "shape": "ai-team", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -802,8 +802,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -835,12 +834,12 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "producer wrote teamRoot=/squad at init", - "plain upgrade changed 151 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+147)", + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -857,7 +856,7 @@ { "producer": "0.13.1", "source": "npm", - "shape": "legacy-casting", + "shape": "profile", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -924,19 +923,19 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", + "producer wrote teamRoot=/squad at init", + "plain upgrade changed 156 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+152)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "0.13.1", "source": "npm", - "shape": "ai-team", + "shape": "legacy-casting", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -970,7 +969,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -1007,14 +1007,14 @@ } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "0.13.1", "source": "npm", - "shape": "two-layer", + "shape": "orphan", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -1086,14 +1086,14 @@ } ], "notes": [ - "plain upgrade changed 148 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+144); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 153 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+149); squad-state blobs for 3 seeded path(s) identical", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "0.13.1", "source": "npm", - "shape": "orphan", + "shape": "two-layer", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -1165,14 +1165,14 @@ } ], "notes": [ - "plain upgrade changed 148 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+144); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 153 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+149); squad-state blobs for 3 seeded path(s) identical", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.0.0", "source": "npm", - "shape": "default", + "shape": "legacy-casting", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ @@ -1244,14 +1244,14 @@ } ], "notes": [ - "plain upgrade changed 84 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+80)", + "plain upgrade changed 103 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+99)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.0.0", "source": "npm", - "shape": "profile", + "shape": "default", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ @@ -1318,12 +1318,12 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "producer wrote teamRoot=/squad at init", - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", + "plain upgrade changed 98 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+94)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -1340,7 +1340,7 @@ { "producer": "1.0.0", "source": "npm", - "shape": "legacy-casting", + "shape": "profile", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ @@ -1407,12 +1407,12 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 89 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+85)", + "producer wrote teamRoot=/squad at init", + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -1491,7 +1491,7 @@ } ], "notes": [ - "plain upgrade changed 82 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+78); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 96 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+92); squad-state blobs for 3 seeded path(s) identical", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -1570,16 +1570,16 @@ } ], "notes": [ - "plain upgrade changed 82 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+78); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 96 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+92); squad-state blobs for 3 seeded path(s) identical", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { - "producer": "1.0.0", - "source": "npm", - "shape": "ai-team", + "producer": "1.0.1", + "source": "github-release", + "shape": "profile", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", + "provenance": "github-release: github/squad@v1.0.1 asset squad-linux-x64.tar.gz id 610330551 sha256 283a1893be9ddad11056dcc8bd0673eff6b48a789bbf523b3f7ec31994d27ac7 (bundled node 22.20.0)", "checks": [ { "id": "producer-artifact-verified", @@ -1611,7 +1611,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -1643,19 +1644,19 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 84 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+80)", - "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "producer wrote teamRoot=/squad at init", + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", + "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.0.1", "source": "github-release", - "shape": "default", + "shape": "legacy-casting", "status": "pass", "provenance": "github-release: github/squad@v1.0.1 asset squad-linux-x64.tar.gz id 610330551 sha256 283a1893be9ddad11056dcc8bd0673eff6b48a789bbf523b3f7ec31994d27ac7 (bundled node 22.20.0)", "checks": [ @@ -1727,14 +1728,14 @@ } ], "notes": [ - "plain upgrade changed 84 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+80)", + "plain upgrade changed 103 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+99)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.0.1", "source": "github-release", - "shape": "profile", + "shape": "default", "status": "pass", "provenance": "github-release: github/squad@v1.0.1 asset squad-linux-x64.tar.gz id 610330551 sha256 283a1893be9ddad11056dcc8bd0673eff6b48a789bbf523b3f7ec31994d27ac7 (bundled node 22.20.0)", "checks": [ @@ -1801,12 +1802,12 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "producer wrote teamRoot=/squad at init", - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", + "plain upgrade changed 98 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+94)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -1821,11 +1822,11 @@ "notes": [] }, { - "producer": "1.0.1", - "source": "github-release", - "shape": "legacy-casting", + "producer": "1.0.0", + "source": "npm", + "shape": "ai-team", "status": "pass", - "provenance": "github-release: github/squad@v1.0.1 asset squad-linux-x64.tar.gz id 610330551 sha256 283a1893be9ddad11056dcc8bd0673eff6b48a789bbf523b3f7ec31994d27ac7 (bundled node 22.20.0)", + "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ { "id": "producer-artifact-verified", @@ -1857,8 +1858,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -1895,8 +1895,8 @@ } ], "notes": [ - "plain upgrade changed 89 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+85)", - "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 98 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+94)", + "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { @@ -1974,7 +1974,7 @@ } ], "notes": [ - "plain upgrade changed 82 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+78); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 96 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+92); squad-state blobs for 3 seeded path(s) identical", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -2052,7 +2052,7 @@ } ], "notes": [ - "plain upgrade changed 84 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+80)", + "plain upgrade changed 98 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+94)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -2131,14 +2131,14 @@ } ], "notes": [ - "plain upgrade changed 82 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+78); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 96 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+92); squad-state blobs for 3 seeded path(s) identical", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.1.0", "source": "github-release", - "shape": "default", + "shape": "profile", "status": "pass", "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", "checks": [ @@ -2205,19 +2205,19 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 54 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+50)", + "producer wrote teamRoot=/squad at init", + "plain upgrade changed 75 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+71)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.1.0", "source": "github-release", - "shape": "legacy-casting", + "shape": "default", "status": "pass", "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", "checks": [ @@ -2289,7 +2289,7 @@ } ], "notes": [ - "plain upgrade changed 59 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+55)", + "plain upgrade changed 74 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+70)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -2306,7 +2306,7 @@ { "producer": "1.1.0", "source": "github-release", - "shape": "profile", + "shape": "legacy-casting", "status": "pass", "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", "checks": [ @@ -2373,21 +2373,21 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "producer wrote teamRoot=/squad at init", - "plain upgrade changed 55 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+51)", + "plain upgrade changed 79 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+75)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { - "producer": "1.1.0", - "source": "github-release", - "shape": "ai-team", + "producer": "HEAD", + "source": "pack", + "shape": "default", "status": "pass", - "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2419,7 +2419,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -2431,7 +2432,8 @@ }, { "id": "downgrade-probe", - "status": "pass" + "status": "skipped", + "detail": "producer is the target version" }, { "id": "clients-projected", @@ -2456,14 +2458,13 @@ } ], "notes": [ - "plain upgrade changed 54 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+50)", - "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 12 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+8)" ] }, { "producer": "1.1.0", "source": "github-release", - "shape": "two-layer", + "shape": "ai-team", "status": "pass", "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", "checks": [ @@ -2497,8 +2498,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -2535,7 +2535,7 @@ } ], "notes": [ - "plain upgrade changed 52 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+48); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 74 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+70)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -2614,16 +2614,16 @@ } ], "notes": [ - "plain upgrade changed 52 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+48); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 72 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+68); squad-state blobs for 3 seeded path(s) identical", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { - "producer": "HEAD", - "source": "pack", - "shape": "profile", + "producer": "1.1.0", + "source": "github-release", + "shape": "two-layer", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "github-release: github/squad@v1.1.0 asset squad-linux-x64.tar.gz id 659607641 sha256 2de647a3feaef334051eb1b3084acba37a511818aad029a16abfe32fadb41aff (bundled node 22.20.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2668,8 +2668,7 @@ }, { "id": "downgrade-probe", - "status": "skipped", - "detail": "producer is the target version" + "status": "pass" }, { "id": "clients-projected", @@ -2689,19 +2688,21 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "plain upgrade changed 12 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+8)" + "plain upgrade changed 72 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+68); squad-state blobs for 3 seeded path(s) identical", + "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "HEAD", "source": "pack", - "shape": "default", + "shape": "profile", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2767,8 +2768,7 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ @@ -2780,7 +2780,7 @@ "source": "pack", "shape": "legacy-casting", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2857,9 +2857,9 @@ { "producer": "HEAD", "source": "pack", - "shape": "ai-team", + "shape": "orphan", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2891,7 +2891,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -2929,15 +2930,15 @@ } ], "notes": [ - "plain upgrade changed 12 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+8)" + "plain upgrade changed 15 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+11); squad-state blobs for 3 seeded path(s) identical" ] }, { "producer": "HEAD", "source": "pack", - "shape": "orphan", + "shape": "ai-team", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -2969,8 +2970,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -3008,7 +3008,7 @@ } ], "notes": [ - "plain upgrade changed 15 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+11); squad-state blobs for 3 seeded path(s) identical" + "plain upgrade changed 12 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-insider-release.yml, .github/workflows/squad-label-enforce.yml … (+8)" ] }, { @@ -3016,7 +3016,7 @@ "source": "pack", "shape": "two-layer", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -3095,7 +3095,7 @@ "source": "pack", "shape": "upstream", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -3174,13 +3174,13 @@ { "platform": "win32", "arch": "x64", - "node": "v22.23.4", - "target": "2.0.0-preview.4", - "targetSha": "9b254ba858abc19ef62e513993d9802312bfe34c", - "harnessHash": "a9713d320fdb479ced9cd311f36cf33bbd70d5733afb1617cd740831ce6767f8", + "node": "v22.23.5", + "target": "2.0.0", + "targetSha": "758861e6bcc66e2466c1cb66d94f654712aec1e6", + "harnessHash": "48482391aaaf04da4f099f0d100e7a57dcb5e61f2c47858e368337343729d52a", "event": "pull_request", - "runUrl": "https://github.com/github/squad/actions/runs/43147851248", - "recordedAt": "2026-11-12T03:28:29.483Z", + "runUrl": "https://github.com/github/squad/actions/runs/44384646543", + "recordedAt": "2026-11-18T19:55:42.199Z", "results": [ { "producer": "0.9.1", @@ -3215,7 +3215,7 @@ { "producer": "0.9.1", "source": "npm", - "shape": "legacy-casting", + "shape": "profile", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", "checks": [ @@ -3283,22 +3283,21 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, { - "producer": "0.13.1", + "producer": "0.9.1", "source": "npm", - "shape": "default", + "shape": "ai-team", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", + "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", "checks": [ { "id": "producer-artifact-verified", @@ -3330,8 +3329,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -3343,7 +3341,8 @@ }, { "id": "downgrade-probe", - "status": "pass" + "status": "xfail", + "detail": "dry-run MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)" }, { "id": "clients-projected", @@ -3368,14 +3367,15 @@ } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", - "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "downgrade-probe: F3" ] }, { "producer": "0.9.1", "source": "npm", - "shape": "default", + "shape": "legacy-casting", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", "checks": [ @@ -3448,15 +3448,15 @@ } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "plain upgrade changed 231 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+227)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, { "producer": "0.9.1", "source": "npm", - "shape": "profile", + "shape": "default", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", "checks": [ @@ -3524,21 +3524,22 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", + "plain upgrade changed 230 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+226)", + "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", "downgrade-probe: F3" ] }, { - "producer": "0.9.1", + "producer": "0.13.1", "source": "npm", - "shape": "ai-team", + "shape": "default", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@0.9.1 sha512-TcZqRbJk3XBg4N8Y5/5OWJeA52ARAMuzk4MGtB0bfdr87e7iJRV6lJEw8+OIYz9IQ+1JxN/Q30dZDALMOcdi2w==; @bradygaster/squad-sdk@0.9.1 sha512-1KqZ2N6Lt/B4uYlU/Su9JjA1s/7ng0OAEb9CZrkRk19YSPi6tg7K5QWdTKl5gY/gp8zPAJqfjVffOwrZwGlzmw==", + "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ { "id": "producer-artifact-verified", @@ -3570,7 +3571,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -3582,8 +3584,7 @@ }, { "id": "downgrade-probe", - "status": "xfail", - "detail": "dry-run MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)" + "status": "pass" }, { "id": "clients-projected", @@ -3608,15 +3609,14 @@ } ], "notes": [ - "plain upgrade changed 229 working-tree path(s), all Squad-owned: .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md, .copilot/skills/ci-validation-gates/SKILL.md … (+225)", - "old 0.9.1 upgrade --dry-run on upgraded project: exit 0, last lines \"\u001b[32m✓\u001b[0m refreshed .squad/templates/ | Upgrade complete: v2.0.0-preview.4 → v0.9.1 | \u001b[2mPreserves user state: team.md, decisions/, agents/*/history.md\u001b[0m\"; MODIFIED 67 files (20 coordinator/templates/workflows, e.g. .copilot/skills/agent-collaboration/SKILL.md, .copilot/skills/agent-conduct/SKILL.md, .copilot/skills/architectural-proposals/SKILL.md …)", - "downgrade-probe: F3" + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", + "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "0.13.1", "source": "npm", - "shape": "profile", + "shape": "legacy-casting", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -3683,12 +3683,12 @@ }, { "id": "profile-untouched", - "status": "pass" + "status": "skipped", + "detail": "no profile squad seeded in this shape" } ], "notes": [ - "producer wrote teamRoot=\\squad at init", - "plain upgrade changed 151 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+147)", + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -3705,7 +3705,7 @@ { "producer": "0.13.1", "source": "npm", - "shape": "legacy-casting", + "shape": "profile", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@0.13.1 sha512-ogfx2nhyx6fqMyqlaI5tDnOzUbRdh+a6Uh/rMQ0aNJwAXnvQp4N37Xp/eOTyB5CxcB7E34NBtAfCxyXbWSiS8w==; @bradygaster/squad-sdk@0.13.1 sha512-1Jt6c9kahJq1JCcE77j/50D79YcXVG6Rt1genuLJ3O9J2SKTZKemlbvHgftkc5LgGH22DkWqHh5zLNEQ/p+ukA==", "checks": [ @@ -3772,12 +3772,12 @@ }, { "id": "profile-untouched", - "status": "skipped", - "detail": "no profile squad seeded in this shape" + "status": "pass" } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", + "producer wrote teamRoot=\\squad at init", + "plain upgrade changed 156 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+152)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -3855,7 +3855,7 @@ } ], "notes": [ - "plain upgrade changed 150 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+146)", + "plain upgrade changed 155 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+151)", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -3934,7 +3934,7 @@ } ], "notes": [ - "plain upgrade changed 148 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+144); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 153 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+149); squad-state blobs for 3 seeded path(s) identical", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4013,7 +4013,7 @@ } ], "notes": [ - "plain upgrade changed 148 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+144); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 153 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+149); squad-state blobs for 3 seeded path(s) identical", "old 0.13.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4092,7 +4092,7 @@ } ], "notes": [ - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4171,7 +4171,7 @@ ], "notes": [ "producer wrote teamRoot=\\squad at init", - "plain upgrade changed 86 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+82)", + "plain upgrade changed 100 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+96)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4260,7 +4260,7 @@ } ], "notes": [ - "plain upgrade changed 90 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+86)", + "plain upgrade changed 104 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+100)", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4339,14 +4339,14 @@ } ], "notes": [ - "plain upgrade changed 83 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+79); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 97 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+93); squad-state blobs for 3 seeded path(s) identical", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { "producer": "1.0.0", "source": "npm", - "shape": "ai-team", + "shape": "two-layer", "status": "pass", "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ @@ -4380,7 +4380,8 @@ }, { "id": "ai-team-migrated", - "status": "pass" + "status": "skipped", + "detail": "not an .ai-team shape" }, { "id": "team-root-absent", @@ -4417,16 +4418,16 @@ } ], "notes": [ - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", + "plain upgrade changed 97 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+93); squad-state blobs for 3 seeded path(s) identical", "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { - "producer": "1.0.1", - "source": "github-release", - "shape": "default", + "producer": "1.0.0", + "source": "npm", + "shape": "ai-team", "status": "pass", - "provenance": "github-release: github/squad@v1.0.1 asset squad-win32-x64.zip id 610330559 sha256 f38a8f85e60982dba340187b761488f01de1aec68ea50c1b85725783d32df2fe (bundled node 22.20.0)", + "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", "checks": [ { "id": "producer-artifact-verified", @@ -4458,8 +4459,7 @@ }, { "id": "ai-team-migrated", - "status": "skipped", - "detail": "not an .ai-team shape" + "status": "pass" }, { "id": "team-root-absent", @@ -4496,16 +4496,16 @@ } ], "notes": [ - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", - "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", + "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { - "producer": "1.0.0", - "source": "npm", - "shape": "two-layer", + "producer": "1.0.1", + "source": "github-release", + "shape": "default", "status": "pass", - "provenance": "npm: @bradygaster/squad-cli@1.0.0 sha512-mnZXnA+GAtp4KSLf7a4Zw0BpeOaHFAxYV5oxAy58ancZ9C2LguUGbcTxWIG0djM96XWET8K9fcncif3Vm6Z9RQ==; @bradygaster/squad-sdk@1.0.0 sha512-9f4NthJaQDq6ifXU3f6VfsZz2bbWs2u57fHhXKtDgDMSvZ3Xq8FPjMvddxhRvseWqaSlkYcWsag3M/lzTtKaJA==", + "provenance": "github-release: github/squad@v1.0.1 asset squad-win32-x64.zip id 610330559 sha256 f38a8f85e60982dba340187b761488f01de1aec68ea50c1b85725783d32df2fe (bundled node 22.20.0)", "checks": [ { "id": "producer-artifact-verified", @@ -4575,8 +4575,8 @@ } ], "notes": [ - "plain upgrade changed 83 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+79); squad-state blobs for 3 seeded path(s) identical", - "old 1.0.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", + "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, { @@ -4654,7 +4654,7 @@ ], "notes": [ "producer wrote teamRoot=\\squad at init", - "plain upgrade changed 86 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+82)", + "plain upgrade changed 100 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+96)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4743,7 +4743,7 @@ } ], "notes": [ - "plain upgrade changed 90 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+86)", + "plain upgrade changed 104 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+100)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4821,7 +4821,7 @@ } ], "notes": [ - "plain upgrade changed 85 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+81)", + "plain upgrade changed 99 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+95)", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4900,7 +4900,7 @@ } ], "notes": [ - "plain upgrade changed 58 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+54)", + "plain upgrade changed 78 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+74)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -4979,7 +4979,7 @@ } ], "notes": [ - "plain upgrade changed 83 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+79); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 97 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+93); squad-state blobs for 3 seeded path(s) identical", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5058,7 +5058,7 @@ } ], "notes": [ - "plain upgrade changed 83 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+79); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 97 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+93); squad-state blobs for 3 seeded path(s) identical", "old 1.0.1 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5137,7 +5137,7 @@ ], "notes": [ "producer wrote teamRoot=\\squad at init", - "plain upgrade changed 59 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+55)", + "plain upgrade changed 79 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+75)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5226,7 +5226,7 @@ } ], "notes": [ - "plain upgrade changed 63 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+59)", + "plain upgrade changed 83 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+79)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5304,7 +5304,7 @@ } ], "notes": [ - "plain upgrade changed 58 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+54)", + "plain upgrade changed 78 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+74)", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5383,7 +5383,7 @@ } ], "notes": [ - "plain upgrade changed 56 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+52); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 76 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+72); squad-state blobs for 3 seeded path(s) identical", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5462,7 +5462,7 @@ } ], "notes": [ - "plain upgrade changed 56 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+52); squad-state blobs for 3 seeded path(s) identical", + "plain upgrade changed 76 working-tree path(s), all Squad-owned: .gitattributes, .github/agents/squad.agent.md, .github/agents/squad.agent.md.local-backup, .github/skills/coordinator-response-mode/SKILL.md … (+72); squad-state blobs for 3 seeded path(s) identical", "old 1.1.0 upgrade --dry-run on upgraded project: exit 0, last lines \"overwrite ../.github/workflows/squad-triage.yml | overwrite ../.github/workflows/sync-squad-labels.yml | Run without --dry-run to apply.\"; modified nothing" ] }, @@ -5471,7 +5471,7 @@ "source": "pack", "shape": "default", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5550,7 +5550,7 @@ "source": "pack", "shape": "profile", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5628,7 +5628,7 @@ "source": "pack", "shape": "legacy-casting", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5707,7 +5707,7 @@ "source": "pack", "shape": "ai-team", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5785,7 +5785,7 @@ "source": "pack", "shape": "orphan", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5862,9 +5862,9 @@ { "producer": "HEAD", "source": "pack", - "shape": "two-layer", + "shape": "upstream", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5903,6 +5903,10 @@ "id": "team-root-absent", "status": "pass" }, + { + "id": "user-config-preserved", + "status": "pass" + }, { "id": "idempotent-second-upgrade", "status": "pass" @@ -5916,10 +5920,6 @@ "id": "clients-projected", "status": "pass" }, - { - "id": "user-config-preserved", - "status": "pass" - }, { "id": "doctor", "status": "pass" @@ -5935,15 +5935,15 @@ } ], "notes": [ - "plain upgrade changed 20 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-heartbeat.yml, .github/workflows/squad-insider-release.yml … (+16); squad-state blobs for 3 seeded path(s) identical" + "plain upgrade changed 17 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-heartbeat.yml, .github/workflows/squad-insider-release.yml … (+13)" ] }, { "producer": "HEAD", "source": "pack", - "shape": "upstream", + "shape": "two-layer", "status": "pass", - "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 9b254ba858abc19ef62e513993d9802312bfe34c (v2.0.0-preview.4)", + "provenance": "pack: npm pack of packages/squad-sdk + packages/squad-cli at 758861e6bcc66e2466c1cb66d94f654712aec1e6 (v2.0.0)", "checks": [ { "id": "producer-artifact-verified", @@ -5982,10 +5982,6 @@ "id": "team-root-absent", "status": "pass" }, - { - "id": "user-config-preserved", - "status": "pass" - }, { "id": "idempotent-second-upgrade", "status": "pass" @@ -5999,6 +5995,10 @@ "id": "clients-projected", "status": "pass" }, + { + "id": "user-config-preserved", + "status": "pass" + }, { "id": "doctor", "status": "pass" @@ -6014,7 +6014,7 @@ } ], "notes": [ - "plain upgrade changed 17 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-heartbeat.yml, .github/workflows/squad-insider-release.yml … (+13)" + "plain upgrade changed 20 working-tree path(s), all Squad-owned: .github/workflows/squad-ci.yml, .github/workflows/squad-docs.yml, .github/workflows/squad-heartbeat.yml, .github/workflows/squad-insider-release.yml … (+16); squad-state blobs for 3 seeded path(s) identical" ] } ] diff --git a/test/adapter-client.test.ts b/test/adapter-client.test.ts index a80542ffd..488e2e65b 100644 --- a/test/adapter-client.test.ts +++ b/test/adapter-client.test.ts @@ -6,7 +6,7 @@ */ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import { SquadClient, type SquadClientOptions } from '@bradygaster/squad-sdk/client'; +import { SquadClient, type SquadClientOptions } from '@squad/sdk/client'; import { CopilotClient } from '@github/copilot-sdk'; // Mock CopilotClient diff --git a/test/agent-doc.test.ts b/test/agent-doc.test.ts index 7abb1da53..4a7cd5ecc 100644 --- a/test/agent-doc.test.ts +++ b/test/agent-doc.test.ts @@ -6,14 +6,14 @@ import { describe, it, expect } from 'vitest'; import { parseAgentDoc, type AgentDocMetadata, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { syncDocToConfig, syncConfigToDoc, detectDrift, type DriftReport, -} from '@bradygaster/squad-sdk/config'; -import { defineConfig, type SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; +import { defineConfig, type SquadConfig } from '@squad/sdk/config'; // --------------------------------------------------------------------------- // Helpers diff --git a/test/agent-name-extraction.test.ts b/test/agent-name-extraction.test.ts index 13316a933..0b4ffcd8d 100644 --- a/test/agent-name-extraction.test.ts +++ b/test/agent-name-extraction.test.ts @@ -8,7 +8,7 @@ */ import { describe, it, expect } from 'vitest'; -import { parseAgentFromDescription } from '@bradygaster/squad-cli/shell/agent-name-parser'; +import { parseAgentFromDescription } from '@squad/cli/shell/agent-name-parser'; const KNOWN = ['eecom', 'flight', 'scribe', 'fido', 'vox', 'dsky', 'pao']; diff --git a/test/agent-session-manager.test.ts b/test/agent-session-manager.test.ts index a17ea1530..2120bae8e 100644 --- a/test/agent-session-manager.test.ts +++ b/test/agent-session-manager.test.ts @@ -15,7 +15,7 @@ import { AgentSessionManager, type AgentCharter, type AgentSessionInfo, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; // --- Mock EventBus (matches client/event-bus.ts interface) --- diff --git a/test/agent-source-github.test.ts b/test/agent-source-github.test.ts index 6252c126c..f27b49687 100644 --- a/test/agent-source-github.test.ts +++ b/test/agent-source-github.test.ts @@ -9,7 +9,7 @@ import { type AgentManifest, type AgentDefinition, parseCharterMetadata, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Mock fetcher helper --- diff --git a/test/agents.test.ts b/test/agents.test.ts index 02180b12a..2d8337677 100644 --- a/test/agents.test.ts +++ b/test/agents.test.ts @@ -7,9 +7,9 @@ import { compileCharter, parseCharterMarkdown, type CharterCompileOptions, -} from '@bradygaster/squad-sdk/agents'; -import { resolveModel, type ModelResolutionOptions } from '@bradygaster/squad-sdk/agents'; -import { ConfigurationError } from '@bradygaster/squad-sdk/adapter/errors'; +} from '@squad/sdk/agents'; +import { resolveModel, type ModelResolutionOptions } from '@squad/sdk/agents'; +import { ConfigurationError } from '@squad/sdk/adapter/errors'; describe('Charter Compilation (M1-8)', () => { describe('compileCharter', () => { diff --git a/test/aspire-command.test.ts b/test/aspire-command.test.ts index d4fb2db36..a5dddde81 100644 --- a/test/aspire-command.test.ts +++ b/test/aspire-command.test.ts @@ -16,13 +16,13 @@ describe('squad aspire command', () => { }); it('module exports runAspire function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/aspire'); + const mod = await import('@squad/cli/commands/aspire'); expect(typeof mod.runAspire).toBe('function'); }); it('AspireOptions accepts docker and port', async () => { // Type-level test — if this compiles, the interface is correct - const mod = await import('@bradygaster/squad-cli/commands/aspire'); + const mod = await import('@squad/cli/commands/aspire'); expect(mod.runAspire).toBeDefined(); }); }); diff --git a/test/aspire-integration.test.ts b/test/aspire-integration.test.ts index e1b2a8618..3a626abdc 100644 --- a/test/aspire-integration.test.ts +++ b/test/aspire-integration.test.ts @@ -475,13 +475,13 @@ describe.skipIf(SKIP_REASON !== null)( // Test 3: squad aspire command lifecycle // ------------------------------------------------------------------ it('squad aspire command exists and exports runAspire', async () => { - const mod = await import('@bradygaster/squad-cli/commands/aspire'); + const mod = await import('@squad/cli/commands/aspire'); expect(typeof mod.runAspire).toBe('function'); }); it('squad aspire command has AspireOptions with docker flag', async () => { // Type-level validation: if this compiles, the interface is correct - const mod = await import('@bradygaster/squad-cli/commands/aspire'); + const mod = await import('@squad/cli/commands/aspire'); const opts: Parameters[0] = { docker: true, port: 18888 }; expect(opts.docker).toBe(true); }); diff --git a/test/backend.test.ts b/test/backend.test.ts index e65dd2979..30556e001 100644 --- a/test/backend.test.ts +++ b/test/backend.test.ts @@ -1145,7 +1145,7 @@ describe('PR review round 4: reclaimer death and outbox write-through', () => { }); describe('Layer 3 review recommendations & bug fixes', () => { - it('marks /backend as experimental and does not re-export backend symbols from root @bradygaster/squad-sdk', async () => { + it('marks /backend as experimental and does not re-export backend symbols from root @squad/sdk', async () => { expect(BACKEND_CONTRACT_STAGE).toBe('experimental'); const rootSdk = await import('../packages/squad-sdk/src/index.js'); expect(rootSdk).not.toHaveProperty('createSquadBackend'); diff --git a/test/benchmarks.test.ts b/test/benchmarks.test.ts index c7a2c1e3a..0ae830dec 100644 --- a/test/benchmarks.test.ts +++ b/test/benchmarks.test.ts @@ -10,7 +10,7 @@ import { type BenchmarkResult, type BenchmarkReport, type TimingResult, -} from '@bradygaster/squad-sdk/runtime/benchmarks'; +} from '@squad/sdk/runtime/benchmarks'; // ============================================================================ // percentile helper diff --git a/test/bundle.test.ts b/test/bundle.test.ts index 0b158487a..f9ca39ad6 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -15,7 +15,7 @@ import { getBundleTargets, validateBundleOutput, type BundleConfig, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; import { generatePackageJson, @@ -23,7 +23,7 @@ import { getPublishFiles, getDefaultExports, type NpmPackageConfig, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; import { generateInstallScript, @@ -32,7 +32,7 @@ import { generateNpxEntryPoint, getDefaultDistConfig, type GitHubDistConfig, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; // ─── M4-1: Bundle strategy ────────────────────────────────────────────── @@ -410,7 +410,7 @@ describe('github-dist', () => { owner: 'github', repo: 'squad', binaryName: 'squad', - installCommandTemplate: 'npx @bradygaster/squad-cli', + installCommandTemplate: 'npx @squad/cli', }; it('validates a proper version', () => { @@ -453,12 +453,12 @@ describe('github-dist', () => { describe('getInstallCommand', () => { it('returns npx command with defaults', () => { const cmd = getInstallCommand(); - expect(cmd).toBe('npx @bradygaster/squad-cli'); + expect(cmd).toBe('npx @squad/cli'); }); it('substitutes custom owner/repo', () => { const cmd = getInstallCommand({ owner: 'acme', repo: 'tool' }); - expect(cmd).toBe('npx @bradygaster/squad-cli'); + expect(cmd).toBe('npx @squad/cli'); }); it('uses custom template', () => { diff --git a/test/capabilities.test.ts b/test/capabilities.test.ts index 8bd2b6248..93116a8e7 100644 --- a/test/capabilities.test.ts +++ b/test/capabilities.test.ts @@ -8,7 +8,7 @@ import { getPodId, generatePodCapabilitiesPath, type MachineCapabilities, -} from '@bradygaster/squad-sdk/ralph/capabilities'; +} from '@squad/sdk/ralph/capabilities'; import { existsSync, mkdirSync, writeFileSync, rmSync } from 'node:fs'; import path from 'node:path'; import os from 'node:os'; diff --git a/test/casting-handwritten-repair.test.ts b/test/casting-handwritten-repair.test.ts index 115f6590e..27fdf42ab 100644 --- a/test/casting-handwritten-repair.test.ts +++ b/test/casting-handwritten-repair.test.ts @@ -13,9 +13,9 @@ import { parseTeamRoster, readCastingRegistryPair, repairHandwrittenCastingRegistry, -} from '@bradygaster/squad-sdk/casting'; -import { isInteractiveSession, runInit } from '@bradygaster/squad-cli/core/init'; -import { ensureCastingDefaults, runUpgrade } from '@bradygaster/squad-cli/core/upgrade'; +} from '@squad/sdk/casting'; +import { isInteractiveSession, runInit } from '@squad/cli/core/init'; +import { ensureCastingDefaults, runUpgrade } from '@squad/cli/core/upgrade'; const MANIFEST = 'registry-history.commit.json'; const JOURNAL = 'registry-history.transaction.json'; diff --git a/test/casting-history.test.ts b/test/casting-history.test.ts index 06a627fee..1050e95e1 100644 --- a/test/casting-history.test.ts +++ b/test/casting-history.test.ts @@ -7,12 +7,12 @@ import { CastingHistory, type CastingRecord, type SerializedCastingHistory, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; import { CastingEngine, type CastMember, type CastingConfig, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; // --- helpers --- diff --git a/test/casting-registry-template.test.ts b/test/casting-registry-template.test.ts index d26ce9c5e..8952b9ba3 100644 --- a/test/casting-registry-template.test.ts +++ b/test/casting-registry-template.test.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'node:fs'; import { resolve } from 'node:path'; import { describe, expect, it } from 'vitest'; -import { parseAgentProvenanceRegistry } from '@bradygaster/squad-sdk/casting'; +import { parseAgentProvenanceRegistry } from '@squad/sdk/casting'; const LOCATIONS = [ '.squad-templates/casting-registry.json', diff --git a/test/casting.test.ts b/test/casting.test.ts index 1b7255382..e4c290d84 100644 --- a/test/casting.test.ts +++ b/test/casting.test.ts @@ -12,7 +12,7 @@ import { type CastMember, type AgentRole, type UniverseId, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; const castingRoots: string[] = []; @@ -259,7 +259,7 @@ describe('CastingEngine', () => { describe('CastingRegistry (legacy)', () => { it('should be importable for backward compat', async () => { - const { CastingRegistry } = await import('@bradygaster/squad-sdk/casting'); + const { CastingRegistry } = await import('@squad/sdk/casting'); const reg = new CastingRegistry({ castingDir: '.squad/casting' }); expect(reg.getAllEntries()).toEqual([]); expect(reg.getByRole('lead')).toBeUndefined(); @@ -301,7 +301,7 @@ describe('CastingRegistry (legacy)', () => { ])('fails closed on a $name', async ({ write, expected }) => { const dir = castingDir(); write(dir); - const { CastingRegistry } = await import('@bradygaster/squad-sdk/casting'); + const { CastingRegistry } = await import('@squad/sdk/casting'); await expect(new CastingRegistry({ castingDir: dir }).load()).rejects.toThrow(expected); }); }); diff --git a/test/catalog-refresh.test.ts b/test/catalog-refresh.test.ts index 0b8b32663..4cf8659b1 100644 --- a/test/catalog-refresh.test.ts +++ b/test/catalog-refresh.test.ts @@ -15,8 +15,8 @@ import { readFileSync } from 'node:fs'; import { join, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import { globSync } from 'node:fs'; -import { MODEL_CATALOG, DEFAULT_FALLBACK_CHAINS } from '@bradygaster/squad-sdk/config'; -import { MODELS } from '@bradygaster/squad-sdk/runtime/constants'; +import { MODEL_CATALOG, DEFAULT_FALLBACK_CHAINS } from '@squad/sdk/config'; +import { MODELS } from '@squad/sdk/runtime/constants'; /** * Model IDs verified as NOT picker-reachable via the copilot-cli models API diff --git a/test/charter-compiler.test.ts b/test/charter-compiler.test.ts index af13230d5..97acaca3e 100644 --- a/test/charter-compiler.test.ts +++ b/test/charter-compiler.test.ts @@ -18,7 +18,7 @@ import { compileCharter, compileCharterFull, type CharterCompileOptions, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; // --- Fixtures --- diff --git a/test/charter-spec.test.ts b/test/charter-spec.test.ts index 19ded50ac..eff366a7d 100644 --- a/test/charter-spec.test.ts +++ b/test/charter-spec.test.ts @@ -19,7 +19,7 @@ import { type CharterCapability, type CharterDiagnostic, type ParsedCharter, -} from '@bradygaster/squad-sdk/parsers'; +} from '@squad/sdk/parsers'; type ValidationApi = 'conformance'; type SerializationMode = 'canonical' | 'legacy' | 'preserve'; diff --git a/test/claude-hooks.test.ts b/test/claude-hooks.test.ts index 1da0ca4b8..d3bd7d723 100644 --- a/test/claude-hooks.test.ts +++ b/test/claude-hooks.test.ts @@ -132,13 +132,13 @@ describe('Claude hooks in .claude/settings.json', () => { it('opted in, adds one Squad handler per event that runs the MCP launcher with `hook claude `', () => { config({ claudeHooks: 'advisory' }); - installClients(['claude'], { root, mcp: { command: 'npx', args: ['-y', '@bradygaster/squad-cli@1.2.3', 'state-mcp'] } }); + installClients(['claude'], { root, mcp: { command: 'npx', args: ['-y', '@squad/cli@1.2.3', 'state-mcp'] } }); const hooks = JSON.parse(fs.readFileSync(settingsAbs(), 'utf8')).hooks; expect(Object.keys(hooks)).toEqual(['SessionStart', 'SubagentStart', 'PreToolUse', 'PostToolUse', 'Stop']); expect(hooks.PreToolUse).toEqual([ { matcher: 'Edit|MultiEdit|Write|NotebookEdit', - hooks: [{ type: 'command', command: 'npx', args: ['-y', '@bradygaster/squad-cli@1.2.3', 'hook', 'claude', 'PreToolUse'], timeout: 15 }], + hooks: [{ type: 'command', command: 'npx', args: ['-y', '@squad/cli@1.2.3', 'hook', 'claude', 'PreToolUse'], timeout: 15 }], }, ]); expect(JSON.stringify(hooks)).not.toContain('permissionDecision'); diff --git a/test/claude-plugin.test.ts b/test/claude-plugin.test.ts index 33665c09a..58c3b82a7 100644 --- a/test/claude-plugin.test.ts +++ b/test/claude-plugin.test.ts @@ -221,7 +221,7 @@ describe('Claude plugin: launcher', () => { it("prefers the project's installed CLI over PATH and npx", () => { const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'squad-plugin-')); try { - const entry = path.join(dir, 'node_modules', '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'); + const entry = path.join(dir, 'node_modules', '@squad', 'cli', 'dist', 'cli-entry.js'); fs.mkdirSync(path.dirname(entry), { recursive: true }); fs.writeFileSync(entry, 'console.log("local:" + process.argv.slice(2).join("|"));\n'); const r = run({ CLAUDE_PROJECT_DIR: dir }, os.tmpdir()); @@ -250,16 +250,16 @@ describe('Claude plugin: launcher', () => { } /** A global install: /lib/node_modules//bin/squad, linked from bin/squad. */ function globalCli(version: string) { - const pkg = path.join(dir, 'lib', 'node_modules', '@bradygaster', 'squad-cli'); + const pkg = path.join(dir, 'lib', 'node_modules', '@squad', 'cli'); stub(path.join(pkg, 'bin', 'squad'), `global@${version}`); - fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@bradygaster/squad-cli', version })); + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@squad/cli', version })); fs.symlinkSync(path.join(pkg, 'bin', 'squad'), path.join(bin, 'squad')); } const go = (env: Record = {}) => run({ PATH: `${bin}:/usr/bin:/bin`, SQUAD_ALLOW_NPX: '1', ...env }, dir).stdout.trim(); it('falls through an older squad on PATH to npx of the plugin version', () => { globalCli('2.0.0-preview.3'); - expect(go()).toBe(`npx:-y @bradygaster/squad-cli@${committedVersion} one two words`); + expect(go()).toBe(`npx:-y @squad/cli@${committedVersion} one two words`); }); it('runs npx only when SQUAD_ALLOW_NPX is set; otherwise fails with install instructions', () => { @@ -270,7 +270,7 @@ describe('Claude plugin: launcher', () => { const r = run(env, dir); expect(r.status, String(allow)).toBe(1); expect(r.stdout).toBe(''); // npx never ran - expect(r.stderr).toContain(`npm install -g @bradygaster/squad-cli@${committedVersion}`); + expect(r.stderr).toContain(`npm install -g @squad/cli@${committedVersion}`); expect(r.stderr).toContain('SQUAD_ALLOW_NPX=1'); } for (const allow of ['1', 'true']) expect(go({ SQUAD_ALLOW_NPX: allow })).toMatch(/^npx:/); @@ -290,18 +290,18 @@ describe('Claude plugin: launcher', () => { stub(path.join(bundleDir, 'squad'), `bundle@preview.3`); fs.writeFileSync(path.join(bundleDir, 'BUNDLE-INFO.json'), JSON.stringify({ squadVersion: '2.0.0-preview.3' })); fs.symlinkSync(path.join(bundleDir, 'squad'), path.join(bin, 'squad')); - expect(go()).toBe(`npx:-y @bradygaster/squad-cli@${committedVersion} one two words`); + expect(go()).toBe(`npx:-y @squad/cli@${committedVersion} one two words`); // A bundle at or past the plugin version is used. fs.writeFileSync(path.join(bundleDir, 'BUNDLE-INFO.json'), JSON.stringify({ squadVersion: committedVersion })); expect(go()).toBe(`bundle@preview.3:one two words`); }); it("skips an older project install, and orders prereleases by semver", () => { - const pkg = path.join(dir, 'node_modules', '@bradygaster', 'squad-cli'); + const pkg = path.join(dir, 'node_modules', '@squad', 'cli'); fs.mkdirSync(path.join(pkg, 'dist'), { recursive: true }); fs.writeFileSync(path.join(pkg, 'dist', 'cli-entry.js'), 'console.log("local")\n'); const local = (version: string) => { - fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@bradygaster/squad-cli', version })); + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@squad/cli', version })); return go({ CLAUDE_PROJECT_DIR: dir }); }; const [core, pre = ''] = committedVersion.split('-'); diff --git a/test/claude-projection-v3-plugin.test.ts b/test/claude-projection-v3-plugin.test.ts index 80982109e..0e241909b 100644 --- a/test/claude-projection-v3-plugin.test.ts +++ b/test/claude-projection-v3-plugin.test.ts @@ -353,7 +353,7 @@ describe('Claude projection v3: plugin mode install', () => { fs.mkdirSync(abs('bin')); fs.mkdirSync(abs('project')); write('global/squad.CMD', 'this shim must not execute'); - write('global/node_modules/@bradygaster/squad-cli/dist/cli-entry.js', 'console.log(JSON.stringify(process.argv.slice(2)))'); + write('global/node_modules/@squad/cli/dist/cli-entry.js', 'console.log(JSON.stringify(process.argv.slice(2)))'); const args = ['two words', 'literal&token', 'literal"quote']; const run = () => spawnSync(process.execPath, [abs('scripts/squad.mjs'), ...args], { cwd: root, encoding: 'utf8', env: { PATH: abs('global'), PATHEXT: '.CMD', CLAUDE_PROJECT_DIR: abs('project'), SQUAD_ALLOW_NPX: '1', SQUAD_HOME: abs('no-squad-home') }, diff --git a/test/cli-packaging-smoke.test.ts b/test/cli-packaging-smoke.test.ts index 63adb2063..9abc5d949 100644 --- a/test/cli-packaging-smoke.test.ts +++ b/test/cli-packaging-smoke.test.ts @@ -108,8 +108,8 @@ describe('CLI packaging smoke test', { timeout: 120_000 }, () => { const cliEntryPath = join( tempDir, 'node_modules', - '@bradygaster', - 'squad-cli', + '@squad', + 'cli', 'dist', 'cli-entry.js', ); @@ -215,7 +215,7 @@ describe('CLI packaging smoke test', { timeout: 120_000 }, () => { return [ join(cli.tempDir, 'node_modules', dependency), - join(cli.tempDir, 'node_modules', '@bradygaster', 'squad-cli', 'node_modules', dependency), + join(cli.tempDir, 'node_modules', '@squad', 'cli', 'node_modules', dependency), ].find(path => existsSync(path)); } @@ -226,7 +226,7 @@ describe('CLI packaging smoke test', { timeout: 120_000 }, () => { it('squad-cli has no file: dependencies (breaks global installs)', () => { expect(installedCli).toBeDefined(); - const pkgPath = join(installedCli!.tempDir, 'node_modules', '@bradygaster', 'squad-cli', 'package.json'); + const pkgPath = join(installedCli!.tempDir, 'node_modules', '@squad', 'cli', 'package.json'); const pkg = JSON.parse(readFileSync(pkgPath, 'utf8')); const deps = pkg.dependencies || {}; for (const [name, version] of Object.entries(deps)) { @@ -237,10 +237,10 @@ describe('CLI packaging smoke test', { timeout: 120_000 }, () => { it('squad-sdk resolves as a real package (not a workspace link)', () => { expect(installedCli).toBeDefined(); - const sdkPkg = join(installedCli!.tempDir, 'node_modules', '@bradygaster', 'squad-sdk', 'package.json'); + const sdkPkg = join(installedCli!.tempDir, 'node_modules', '@squad', 'sdk', 'package.json'); expect(existsSync(sdkPkg), 'squad-sdk not installed as dependency of squad-cli').toBe(true); const pkg = JSON.parse(readFileSync(sdkPkg, 'utf8')); - expect(pkg.name).toBe('@bradygaster/squad-sdk'); + expect(pkg.name).toBe('@squad/sdk'); }); // ============================================================================ diff --git a/test/cli.test.ts b/test/cli.test.ts index 38a98ab6d..f4edb1979 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -20,24 +20,24 @@ import { setVersionFetcher, setPackageJsonReader, setPackageJsonWriter, -} from '@bradygaster/squad-cli/upgrade'; +} from '@squad/cli/upgrade'; import type { UpdateInfo, UpgradeOptions, SDKUpgradeOptions, ReleaseChannel, -} from '@bradygaster/squad-cli/upgrade'; -import { MigrationRegistry } from '@bradygaster/squad-sdk/config'; +} from '@squad/cli/upgrade'; +import { MigrationRegistry } from '@squad/sdk/config'; import { detectCopilotEnvironment, getInstallInstructions, installFromCopilot, -} from '@bradygaster/squad-cli/copilot-install'; +} from '@squad/cli/copilot-install'; import type { CopilotEnvironment, InstallConfig, EnvironmentIndicators, -} from '@bradygaster/squad-cli/copilot-install'; +} from '@squad/cli/copilot-install'; // ============================================================================ // Upgrade — version parsing & comparison diff --git a/test/cli/cast.test.ts b/test/cli/cast.test.ts index b60b004ce..ab01ea52c 100644 --- a/test/cli/cast.test.ts +++ b/test/cli/cast.test.ts @@ -67,7 +67,7 @@ describe('squad cast', () => { // Suppress console output during test const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(TEST_ROOT); // If the bug were present (passing paths.teamDir = .squad/ to LocalAgentSource), @@ -88,7 +88,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(TEST_ROOT); const output = logSpy.mock.calls.map(c => c.join(' ')).join('\n'); @@ -108,7 +108,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(nestedDir); const output = logSpy.mock.calls.map(c => c.join(' ')).join('\n'); @@ -140,7 +140,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(projectRoot); const output = logSpy.mock.calls.map(c => c.join(' ')).join('\n'); @@ -167,7 +167,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(projectRoot); const output = logSpy.mock.calls.map(c => c.join(' ')).join('\n'); @@ -207,7 +207,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCast } = await import('@squad/cli/commands/cast'); await runCast(TEST_ROOT); const output = logSpy.mock.calls.map(c => c.join(' ')).join('\n'); @@ -231,7 +231,7 @@ describe('squad cast', () => { const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCastAdd, runCast } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd, runCast } = await import('@squad/cli/commands/cast'); const created = await runCastAdd(TEST_ROOT, { name: 'Probe', role: 'developer' }); expect(created.agentId).toBe('probe'); @@ -296,7 +296,7 @@ describe('squad cast', () => { it('lists the built-ins once, outside ## Members, after casting members into an init roster', async () => { const sq = await scaffoldInitShape(INIT_TEAM_MD); vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCastAdd } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd } = await import('@squad/cli/commands/cast'); await runCastAdd(TEST_ROOT, { name: 'Penny', role: 'Lead' }); await runCastAdd(TEST_ROOT, { name: 'Tally', role: 'Tester' }); @@ -324,7 +324,7 @@ describe('squad cast', () => { INIT_TEAM_MD.replace('|------|------|---------|--------|\n', `|------|------|---------|--------|\n${allRows}\n`), ); vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCastAdd } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd } = await import('@squad/cli/commands/cast'); await runCastAdd(TEST_ROOT, { name: 'Penny', role: 'Lead' }); const teamMd = await readFile(join(sq, 'team.md'), 'utf-8'); @@ -340,7 +340,7 @@ describe('squad cast', () => { INIT_TEAM_MD.replace('|------|------|---------|--------|\n', '|------|------|---------|--------|\n| Ralph | Work Monitor | — | 🔄 Monitor |\n'), ); vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCastAdd } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd } = await import('@squad/cli/commands/cast'); await runCastAdd(TEST_ROOT, { name: 'Penny', role: 'Lead' }); const teamMd = await readFile(join(sq, 'team.md'), 'utf-8'); @@ -352,7 +352,7 @@ describe('squad cast', () => { it('adds rows only for built-ins whose charter exists', async () => { const sq = await scaffoldInitShape(INIT_TEAM_MD, ['scribe']); vi.spyOn(console, 'log').mockImplementation(() => {}); - const { runCastAdd } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd } = await import('@squad/cli/commands/cast'); await runCastAdd(TEST_ROOT, { name: 'Penny', role: 'Lead' }); const teamMd = await readFile(join(sq, 'team.md'), 'utf-8'); @@ -363,7 +363,7 @@ describe('squad cast', () => { it('rejects missing --name or --role with SquadError (#2191)', async () => { await scaffold(TEST_ROOT); - const { runCastAdd } = await import('@bradygaster/squad-cli/commands/cast'); + const { runCastAdd } = await import('@squad/cli/commands/cast'); await expect(runCastAdd(TEST_ROOT, { name: 'Probe', role: '' })).rejects.toThrow( /Usage: squad cast --name --role /, diff --git a/test/cli/copilot-bridge.test.ts b/test/cli/copilot-bridge.test.ts index 80bc70a33..9b6efc11d 100644 --- a/test/cli/copilot-bridge.test.ts +++ b/test/cli/copilot-bridge.test.ts @@ -9,13 +9,13 @@ import { describe, it, expect } from 'vitest'; describe('CLI: copilot-bridge command', () => { it('module exports CopilotBridge class', async () => { - const mod = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const mod = await import('@squad/cli/commands/copilot-bridge'); expect(typeof mod.CopilotBridge).toBe('function'); expect(typeof mod.CopilotBridge.checkCompatibility).toBe('function'); }); it('CopilotBridge can be instantiated with config', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd() }); expect(bridge).toBeDefined(); expect(typeof bridge.start).toBe('function'); @@ -27,40 +27,40 @@ describe('CLI: copilot-bridge command', () => { }); it('isRunning returns false before start', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd() }); expect(bridge.isRunning()).toBe(false); }); it('accepts optional agent in config', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd(), agent: 'test-agent' }); expect(bridge).toBeDefined(); expect(bridge.isRunning()).toBe(false); }); it('stop is safe to call when not running', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd() }); expect(() => bridge.stop()).not.toThrow(); }); it('sendPrompt is safe to call when not initialized', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd() }); // Should log error but not throw expect(() => bridge.sendPrompt('test')).not.toThrow(); }); it('onMessage accepts a callback', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); const bridge = new CopilotBridge({ cwd: process.cwd() }); const cb = (_line: string) => {}; expect(() => bridge.onMessage(cb)).not.toThrow(); }); it('checkCompatibility is a static async method', async () => { - const { CopilotBridge } = await import('@bradygaster/squad-cli/commands/copilot-bridge'); + const { CopilotBridge } = await import('@squad/cli/commands/copilot-bridge'); expect(typeof CopilotBridge.checkCompatibility).toBe('function'); // Verify it returns a promise (don't await — spawns real processes) expect(CopilotBridge.checkCompatibility.constructor.name).toBe('AsyncFunction'); diff --git a/test/cli/copilot.test.ts b/test/cli/copilot.test.ts index 6c9d9dd9e..7f33b1cc7 100644 --- a/test/cli/copilot.test.ts +++ b/test/cli/copilot.test.ts @@ -18,25 +18,25 @@ describe('CLI: copilot command', () => { }); it('module exports runCopilot function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/copilot'); + const mod = await import('@squad/cli/commands/copilot'); expect(typeof mod.runCopilot).toBe('function'); }); it('module exports CopilotFlags interface (verifiable via function)', async () => { - const mod = await import('@bradygaster/squad-cli/commands/copilot'); + const mod = await import('@squad/cli/commands/copilot'); // runCopilot(dest, flags) — 2 parameters expect(mod.runCopilot.length).toBe(2); }); it('throws when no squad directory exists', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); mkdirSync(TEST_ROOT, { recursive: true }); await expect(runCopilot(TEST_ROOT, {})).rejects.toThrow(/squad/i); }); it('handles --off flag when copilot is not on team', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); mkdirSync(join(TEST_ROOT, '.squad'), { recursive: true }); writeFileSync(join(TEST_ROOT, '.squad', 'team.md'), '# Team\n\n## Members\n'); @@ -45,7 +45,7 @@ describe('CLI: copilot command', () => { }); it('adds copilot section to team.md', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); mkdirSync(join(TEST_ROOT, '.squad'), { recursive: true }); writeFileSync(join(TEST_ROOT, '.squad', 'team.md'), '# Team\n\n## Members\n'); @@ -56,7 +56,7 @@ describe('CLI: copilot command', () => { }); it('reports already-on-team when copilot exists without --auto-assign', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); mkdirSync(join(TEST_ROOT, '.squad'), { recursive: true }); writeFileSync(join(TEST_ROOT, '.squad', 'team.md'), '# Team\n\n## 🤖 Coding Agent\n@copilot\n'); @@ -106,7 +106,7 @@ describe('CLI: copilot with externalized state (#1397)', () => { }); it('adds copilot to the external team.md, not a local copy', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); await runCopilot(TEST_ROOT, {}); @@ -117,7 +117,7 @@ describe('CLI: copilot with externalized state (#1397)', () => { }); it('removes copilot from the external team.md with --off', async () => { - const { runCopilot } = await import('@bradygaster/squad-cli/commands/copilot'); + const { runCopilot } = await import('@squad/cli/commands/copilot'); await runCopilot(TEST_ROOT, {}); await runCopilot(TEST_ROOT, { off: true }); diff --git a/test/cli/doctor.test.ts b/test/cli/doctor.test.ts index a6d5677d7..794bbaf8e 100644 --- a/test/cli/doctor.test.ts +++ b/test/cli/doctor.test.ts @@ -19,12 +19,12 @@ import { checkGitSyncHooks, checkSquadStateBridge, checkHistoryArchiveIntegrity, -} from '@bradygaster/squad-cli/commands/doctor'; -import type { DoctorCheck } from '@bradygaster/squad-cli/commands/doctor'; -import { clearResolveSquadCache } from '@bradygaster/squad-sdk/resolution'; -import { FSStorageProvider, OrphanBranchBackend } from '@bradygaster/squad-sdk'; +} from '@squad/cli/commands/doctor'; +import type { DoctorCheck } from '@squad/cli/commands/doctor'; +import { clearResolveSquadCache } from '@squad/sdk/resolution'; +import { FSStorageProvider, OrphanBranchBackend } from '@squad/sdk'; import { getPackageVersion } from '../../packages/squad-cli/src/cli/core/version.js'; -import { ensureCastingRegistryPair } from '@bradygaster/squad-sdk/casting'; +import { ensureCastingRegistryPair } from '@squad/sdk/casting'; const TEST_ROOT = join(process.cwd(), `.test-doctor-${randomBytes(4).toString('hex')}`); const TEST_PROFILE = join(process.cwd(), `.test-doctor-profile-${randomBytes(4).toString('hex')}`); @@ -292,7 +292,7 @@ describe('squad doctor', () => { const check = await checkSquadStateBridge(TEST_ROOT); expect(check.status).toBe('fail'); - expect(check.message).toContain(`@bradygaster/squad-cli@${getPackageVersion()}`); + expect(check.message).toContain(`@squad/cli@${getPackageVersion()}`); expect(check.message).toContain('dist-tag'); }); diff --git a/test/cli/export-import.test.ts b/test/cli/export-import.test.ts index 762f7cff3..e61763c06 100644 --- a/test/cli/export-import.test.ts +++ b/test/cli/export-import.test.ts @@ -9,13 +9,13 @@ import { join } from 'path'; import { existsSync } from 'fs'; import { randomBytes } from 'crypto'; import { tmpdir } from 'os'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runExport } from '@bradygaster/squad-cli/commands/export'; -import { runImport } from '@bradygaster/squad-cli/commands/import'; +import { runInit } from '@squad/cli/core/init'; +import { runExport } from '@squad/cli/commands/export'; +import { runImport } from '@squad/cli/commands/import'; import { commitCastingRegistryPair, readCastingRegistryPair, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; const EXT_ROOT = join(tmpdir(), `.test-cli-export-ext-${randomBytes(4).toString('hex')}`); const EXT_GLOBAL = join(tmpdir(), `.test-cli-export-ext-global-${randomBytes(4).toString('hex')}`); diff --git a/test/cli/health-command.test.ts b/test/cli/health-command.test.ts index 6cba11c16..c0955c981 100644 --- a/test/cli/health-command.test.ts +++ b/test/cli/health-command.test.ts @@ -23,7 +23,7 @@ const { mockResolveStateBackend, mockVerifyStateBackend } = vi.hoisted(() => ({ mockVerifyStateBackend: vi.fn(), })); -vi.mock('@bradygaster/squad-sdk', async () => { +vi.mock('@squad/sdk', async () => { const fs = await import('node:fs'); const pathModule = await import('node:path'); return { diff --git a/test/cli/health-legacy.test.ts b/test/cli/health-legacy.test.ts index 04123d07a..94739b21e 100644 --- a/test/cli/health-legacy.test.ts +++ b/test/cli/health-legacy.test.ts @@ -23,8 +23,8 @@ import { import { tmpdir } from 'node:os'; import path from 'node:path'; import { runSquadHealth, type HealthCheckId, type HealthReport } from '../../packages/squad-cli/src/cli/commands/health.js'; -import { parseRoutingRulesMarkdown } from '@bradygaster/squad-sdk/parsers'; -import { parseCharterMarkdown } from '@bradygaster/squad-sdk/agents'; +import { parseRoutingRulesMarkdown } from '@squad/sdk/parsers'; +import { parseCharterMarkdown } from '@squad/sdk/agents'; let repoRoot: string; diff --git a/test/cli/init-remote.test.ts b/test/cli/init-remote.test.ts index 6443c5b21..b12d916e7 100644 --- a/test/cli/init-remote.test.ts +++ b/test/cli/init-remote.test.ts @@ -27,12 +27,12 @@ describe('CLI: init-remote command', () => { }); it('module exports writeRemoteConfig function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/init-remote'); + const mod = await import('@squad/cli/commands/init-remote'); expect(typeof mod.writeRemoteConfig).toBe('function'); }); it('creates .squad/config.json with correct structure', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); const configPath = join(PROJECT_DIR, '.squad', 'config.json'); @@ -45,7 +45,7 @@ describe('CLI: init-remote command', () => { }); it('creates .squad directory if missing', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); expect(existsSync(join(PROJECT_DIR, '.squad'))).toBe(false); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); @@ -54,7 +54,7 @@ describe('CLI: init-remote command', () => { }); it('stores a relative path from project to team repo', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); const config = JSON.parse( @@ -66,7 +66,7 @@ describe('CLI: init-remote command', () => { }); it('adds .squad/config.json to .gitignore', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); const gitignorePath = join(PROJECT_DIR, '.gitignore'); @@ -76,7 +76,7 @@ describe('CLI: init-remote command', () => { }); it('does not duplicate gitignore entry', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); @@ -86,7 +86,7 @@ describe('CLI: init-remote command', () => { }); it('overwrites existing config.json on re-run', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); const secondTeam = join(TEST_ROOT, 'second-team'); @@ -100,7 +100,7 @@ describe('CLI: init-remote command', () => { }); it('preserves existing .gitignore content', async () => { - const { writeRemoteConfig } = await import('@bradygaster/squad-cli/commands/init-remote'); + const { writeRemoteConfig } = await import('@squad/cli/commands/init-remote'); writeFileSync(join(PROJECT_DIR, '.gitignore'), 'dist/\n'); writeRemoteConfig(PROJECT_DIR, TEAM_DIR); diff --git a/test/cli/init-upgrade-parity.test.ts b/test/cli/init-upgrade-parity.test.ts index a7c3f3039..b7b58fdc0 100644 --- a/test/cli/init-upgrade-parity.test.ts +++ b/test/cli/init-upgrade-parity.test.ts @@ -14,16 +14,16 @@ import { join } from 'path'; import { existsSync } from 'fs'; import { randomBytes } from 'crypto'; import { tmpdir } from 'os'; -import { runInit } from '@bradygaster/squad-cli/core/init'; +import { runInit } from '@squad/cli/core/init'; import { runUpgrade, ensureGitattributes, ensureDirectories, -} from '@bradygaster/squad-cli/core/upgrade'; +} from '@squad/cli/core/upgrade'; import { commitCastingRegistryPair, readCastingRegistryPair, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; const TEST_ROOT = join( tmpdir(), diff --git a/test/cli/init.test.ts b/test/cli/init.test.ts index c1aadf472..eae52428c 100644 --- a/test/cli/init.test.ts +++ b/test/cli/init.test.ts @@ -9,8 +9,8 @@ import { join } from 'path'; import { existsSync } from 'fs'; import { tmpdir } from 'os'; import { randomBytes } from 'crypto'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { getPackageVersion, stampVersion } from '@bradygaster/squad-cli/core/version'; +import { runInit } from '@squad/cli/core/init'; +import { getPackageVersion, stampVersion } from '@squad/cli/core/version'; const TEST_ROOT = join(tmpdir(), `.test-cli-init-${randomBytes(4).toString('hex')}`); const TEST_HOME = join(tmpdir(), `.test-cli-init-home-${randomBytes(4).toString('hex')}`); @@ -227,10 +227,10 @@ describe('CLI: init command', () => { expect(content).toContain('mcp-servers:'); expect(content).toContain(' squad_state:'); expect(content).toContain(' type: local'); - // args may be pinned (`@bradygaster/squad-cli@`) or unpinned + // args may be pinned (`@squad/cli@`) or unpinned // depending on whether getPackageVersion() resolved a real version at // test time. Either shape is acceptable here. - expect(content).toMatch(/args:\s*\['-y',\s*'@bradygaster\/squad-cli(@[^']+)?',\s*'state-mcp'\]/); + expect(content).toMatch(/args:\s*\['-y',\s*'@squad\/cli(@[^']+)?',\s*'state-mcp'\]/); expect(content).toContain(' tools: ["*"]'); const frontmatterEnd = content.indexOf('\n---', 4); expect(frontmatterEnd).toBeGreaterThan(0); diff --git a/test/cli/legacy-casting-upgrade.test.ts b/test/cli/legacy-casting-upgrade.test.ts index 2a9625110..b6eb41c94 100644 --- a/test/cli/legacy-casting-upgrade.test.ts +++ b/test/cli/legacy-casting-upgrade.test.ts @@ -3,10 +3,10 @@ import { execFileSync } from 'node:child_process'; import { join } from 'node:path'; import { tmpdir } from 'node:os'; import { afterEach, beforeEach, describe, expect, it } from 'vitest'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runUpgrade } from '@bradygaster/squad-cli/core/upgrade'; -import { getPackageVersion } from '@bradygaster/squad-cli/core/version'; -import { _setCastingDurabilityHooksForTesting, readCastingRegistryPair } from '@bradygaster/squad-sdk/casting'; +import { runInit } from '@squad/cli/core/init'; +import { runUpgrade } from '@squad/cli/core/upgrade'; +import { getPackageVersion } from '@squad/cli/core/version'; +import { _setCastingDurabilityHooksForTesting, readCastingRegistryPair } from '@squad/sdk/casting'; const registryRaw = readFileSync(join(process.cwd(), 'test', 'fixtures', 'casting-legacy', 'registry.json'), 'utf8'); const historyRaw = readFileSync(join(process.cwd(), 'test', 'fixtures', 'casting-legacy', 'history.json'), 'utf8'); diff --git a/test/cli/link.test.ts b/test/cli/link.test.ts index f1d2561e6..4b46dfd26 100644 --- a/test/cli/link.test.ts +++ b/test/cli/link.test.ts @@ -27,12 +27,12 @@ describe('CLI: link command', () => { }); it('module exports runLink function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/link'); + const mod = await import('@squad/cli/commands/link'); expect(typeof mod.runLink).toBe('function'); }); it('creates .squad/config.json with relative teamRoot', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); runLink(PROJECT_DIR, TEAM_DIR); const configPath = join(PROJECT_DIR, '.squad', 'config.json'); @@ -45,7 +45,7 @@ describe('CLI: link command', () => { }); it('creates .squad directory if it does not exist', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); expect(existsSync(join(PROJECT_DIR, '.squad'))).toBe(false); runLink(PROJECT_DIR, TEAM_DIR); @@ -54,7 +54,7 @@ describe('CLI: link command', () => { }); it('adds .squad/config.json to .gitignore', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); runLink(PROJECT_DIR, TEAM_DIR); const gitignorePath = join(PROJECT_DIR, '.gitignore'); @@ -64,7 +64,7 @@ describe('CLI: link command', () => { }); it('does not duplicate .gitignore entry on re-link', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); runLink(PROJECT_DIR, TEAM_DIR); runLink(PROJECT_DIR, TEAM_DIR); @@ -74,7 +74,7 @@ describe('CLI: link command', () => { }); it('preserves existing .gitignore content', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); writeFileSync(join(PROJECT_DIR, '.gitignore'), 'node_modules/\n'); runLink(PROJECT_DIR, TEAM_DIR); @@ -85,27 +85,27 @@ describe('CLI: link command', () => { }); it('throws on non-existent target path', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); const bogus = join(TEST_ROOT, 'does-not-exist'); expect(() => runLink(PROJECT_DIR, bogus)).toThrow(/does not exist/i); }); it('throws when target is a file, not a directory', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); const filePath = join(TEST_ROOT, 'a-file.txt'); writeFileSync(filePath, 'not a dir'); expect(() => runLink(PROJECT_DIR, filePath)).toThrow(/not a directory/i); }); it('throws when target has no .squad/ or .ai-team/ directory', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); const emptyDir = join(TEST_ROOT, 'empty-team'); mkdirSync(emptyDir, { recursive: true }); expect(() => runLink(PROJECT_DIR, emptyDir)).toThrow(/does not contain/i); }); it('accepts target with .ai-team/ directory', async () => { - const { runLink } = await import('@bradygaster/squad-cli/commands/link'); + const { runLink } = await import('@squad/cli/commands/link'); const aiTeamDir = join(TEST_ROOT, 'ai-team-repo'); mkdirSync(join(aiTeamDir, '.ai-team'), { recursive: true }); diff --git a/test/cli/loop.test.ts b/test/cli/loop.test.ts index b8137c75c..a4b57bb16 100644 --- a/test/cli/loop.test.ts +++ b/test/cli/loop.test.ts @@ -18,7 +18,7 @@ import { } from '../../packages/squad-cli/src/cli/commands/loop.js'; import { detectSquadDir } from '../../packages/squad-cli/src/cli/core/detect-squad-dir.js'; import { createDefaultRegistry } from '../../packages/squad-cli/src/cli/commands/watch/index.js'; -import { parseRoster } from '@bradygaster/squad-sdk/ralph/triage'; +import { parseRoster } from '@squad/sdk/ralph/triage'; // ── Module Mocks (hoisted by vitest) ───────────────────────────── @@ -40,11 +40,11 @@ vi.mock('../../packages/squad-cli/src/cli/commands/watch/index.js', () => ({ CapabilityRegistry: vi.fn(), })); -vi.mock('@bradygaster/squad-sdk/platform', () => ({ +vi.mock('@squad/sdk/platform', () => ({ createPlatformAdapter: vi.fn(), })); -vi.mock('@bradygaster/squad-sdk/ralph/triage', () => ({ +vi.mock('@squad/sdk/ralph/triage', () => ({ parseRoster: vi.fn(), })); diff --git a/test/cli/patch-esm-imports.test.ts b/test/cli/patch-esm-imports.test.ts index 07ca5ae7a..1a9483f2d 100644 --- a/test/cli/patch-esm-imports.test.ts +++ b/test/cli/patch-esm-imports.test.ts @@ -15,7 +15,7 @@ import { pathToFileURL } from 'url'; import { existsSync } from 'fs'; import { tmpdir } from 'os'; import { randomBytes } from 'crypto'; -import { ensureEsmImportsPatched } from '@bradygaster/squad-cli/core/upgrade'; +import { ensureEsmImportsPatched } from '@squad/cli/core/upgrade'; const SCRIPT_URL = pathToFileURL( join(process.cwd(), 'packages', 'squad-cli', 'scripts', 'patch-esm-imports.mjs'), diff --git a/test/cli/preview2-cli-fixes.test.ts b/test/cli/preview2-cli-fixes.test.ts index b1b163538..b96b8a019 100644 --- a/test/cli/preview2-cli-fixes.test.ts +++ b/test/cli/preview2-cli-fixes.test.ts @@ -11,12 +11,12 @@ import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSyn import { tmpdir } from 'node:os'; import path, { join } from 'node:path'; import { createHash, randomBytes } from 'node:crypto'; -import { teamRootIsThisProject, getDoctorMode } from '@bradygaster/squad-cli/commands/doctor'; +import { teamRootIsThisProject, getDoctorMode } from '@squad/cli/commands/doctor'; import { runClientCommand, listClients } from '../../packages/squad-cli/src/cli/commands/client.js'; -import { runUpdateCheck, UPDATE_CHECK_MAX_CACHE_AGE_MS } from '@bradygaster/squad-cli/commands/update-check'; +import { runUpdateCheck, UPDATE_CHECK_MAX_CACHE_AGE_MS } from '@squad/cli/commands/update-check'; import { getCachePath } from '../../packages/squad-cli/src/cli/self-update.js'; -import { readProjectLabel, runUpgrade } from '@bradygaster/squad-cli/core/upgrade'; -import { runInit } from '@bradygaster/squad-cli/core/init'; +import { readProjectLabel, runUpgrade } from '@squad/cli/core/upgrade'; +import { runInit } from '@squad/cli/core/init'; describe('squad doctor mode for a relative teamRoot pointing at this project (#2299)', () => { let cwd: string; diff --git a/test/cli/rai-rename-git.test.ts b/test/cli/rai-rename-git.test.ts index 4d6e72be5..2f9c7a7b2 100644 --- a/test/cli/rai-rename-git.test.ts +++ b/test/cli/rai-rename-git.test.ts @@ -10,7 +10,7 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync import { join } from 'node:path'; import { tmpdir } from 'node:os'; import { randomBytes } from 'node:crypto'; -import { migrateLegacyRaiAgent } from '@bradygaster/squad-cli/core/upgrade'; +import { migrateLegacyRaiAgent } from '@squad/cli/core/upgrade'; function git(cwd: string, ...args: string[]): string { return execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim(); diff --git a/test/cli/rc-tunnel.test.ts b/test/cli/rc-tunnel.test.ts index 333816448..71933e1c3 100644 --- a/test/cli/rc-tunnel.test.ts +++ b/test/cli/rc-tunnel.test.ts @@ -10,44 +10,44 @@ import os from 'node:os'; describe('CLI: rc-tunnel command', () => { it('module exports isDevtunnelAvailable function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const mod = await import('@squad/cli/commands/rc-tunnel'); expect(typeof mod.isDevtunnelAvailable).toBe('function'); }); it('module exports createTunnel function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const mod = await import('@squad/cli/commands/rc-tunnel'); expect(typeof mod.createTunnel).toBe('function'); }); it('module exports destroyTunnel function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const mod = await import('@squad/cli/commands/rc-tunnel'); expect(typeof mod.destroyTunnel).toBe('function'); }); it('module exports getMachineId function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const mod = await import('@squad/cli/commands/rc-tunnel'); expect(typeof mod.getMachineId).toBe('function'); }); it('module exports getGitInfo function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const mod = await import('@squad/cli/commands/rc-tunnel'); expect(typeof mod.getGitInfo).toBe('function'); }); it('isDevtunnelAvailable returns a boolean', async () => { - const { isDevtunnelAvailable } = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const { isDevtunnelAvailable } = await import('@squad/cli/commands/rc-tunnel'); const result = isDevtunnelAvailable(); expect(typeof result).toBe('boolean'); }); it('getMachineId returns the system hostname', async () => { - const { getMachineId } = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const { getMachineId } = await import('@squad/cli/commands/rc-tunnel'); const id = getMachineId(); expect(id).toBe(os.hostname()); }); it('getGitInfo returns repo and branch from cwd', async () => { - const { getGitInfo } = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const { getGitInfo } = await import('@squad/cli/commands/rc-tunnel'); const info = getGitInfo(process.cwd()); expect(info).toHaveProperty('repo'); expect(info).toHaveProperty('branch'); @@ -56,14 +56,14 @@ describe('CLI: rc-tunnel command', () => { }); it('getGitInfo returns "unknown" for non-git directories', async () => { - const { getGitInfo } = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const { getGitInfo } = await import('@squad/cli/commands/rc-tunnel'); const info = getGitInfo(os.tmpdir()); expect(info.repo).toBe('unknown'); expect(info.branch).toBe('unknown'); }); it('destroyTunnel does not throw when no tunnel active', async () => { - const { destroyTunnel } = await import('@bradygaster/squad-cli/commands/rc-tunnel'); + const { destroyTunnel } = await import('@squad/cli/commands/rc-tunnel'); expect(() => destroyTunnel()).not.toThrow(); }); }); diff --git a/test/cli/rc.test.ts b/test/cli/rc.test.ts index 1eaf17d15..e8feb0b66 100644 --- a/test/cli/rc.test.ts +++ b/test/cli/rc.test.ts @@ -13,18 +13,18 @@ import os from 'node:os'; describe('CLI: rc command', () => { describe('Module exports', () => { it('module exports runRC function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); expect(typeof mod.runRC).toBe('function'); }); it('module exports RCOptions interface (verifiable via function arity)', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); // runRC(cwd, options) — should accept 2 parameters expect(mod.runRC.length).toBe(2); }); it('module has no unexpected default export', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); // ESM module should have named exports, no default expect(mod.default).toBeUndefined(); }); @@ -32,20 +32,20 @@ describe('CLI: rc command', () => { describe('RCOptions interface validation', () => { it('accepts tunnel option', async () => { - const { RCOptions } = await import('@bradygaster/squad-cli/commands/rc') as any; + const { RCOptions } = await import('@squad/cli/commands/rc') as any; // TypeScript interface — verify shape through runRC signature // This is a compile-time check, but we can verify runtime behavior - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); expect(mod.runRC).toBeDefined(); }); it('accepts port option', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); expect(mod.runRC).toBeDefined(); }); it('accepts optional path option', async () => { - const mod = await import('@bradygaster/squad-cli/commands/rc'); + const mod = await import('@squad/cli/commands/rc'); expect(mod.runRC).toBeDefined(); }); }); @@ -441,7 +441,7 @@ describe('CLI: rc command', () => { ); expect(rcSource).toContain('import { FSStorageProvider, RemoteBridge }'); - expect(rcSource).toContain('@bradygaster/squad-sdk'); + expect(rcSource).toContain('@squad/sdk'); }); it('imports tunnel utilities', () => { @@ -490,7 +490,7 @@ describe('loadRosterAgents — externalized state (#1398)', () => { }); it('reads the roster from local .squad when state is not externalized', async () => { - const { loadRosterAgents } = await import('@bradygaster/squad-cli/commands/rc'); + const { loadRosterAgents } = await import('@squad/cli/commands/rc'); fs.writeFileSync(path.join(ROOT, '.squad', 'team.md'), ROSTER_MD); const agents = loadRosterAgents(path.join(ROOT, '.squad')); @@ -502,7 +502,7 @@ describe('loadRosterAgents — externalized state (#1398)', () => { }); it('follows the stateLocation marker to the external team.md', async () => { - const { loadRosterAgents } = await import('@bradygaster/squad-cli/commands/rc'); + const { loadRosterAgents } = await import('@squad/cli/commands/rc'); // Point resolveGlobalSquadPath() inside EXT_GLOBAL (not the real user dir) if (process.platform === 'win32') { diff --git a/test/cli/remote-mode.test.ts b/test/cli/remote-mode.test.ts index c1abbb329..87fa3415a 100644 --- a/test/cli/remote-mode.test.ts +++ b/test/cli/remote-mode.test.ts @@ -7,9 +7,9 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { mkdirSync, rmSync, existsSync, readFileSync, writeFileSync } from 'node:fs'; import { join, relative, isAbsolute } from 'node:path'; import { randomBytes } from 'node:crypto'; -import { runLink } from '@bradygaster/squad-cli/commands/link'; -import { writeRemoteConfig } from '@bradygaster/squad-cli/commands/init-remote'; -import { resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { runLink } from '@squad/cli/commands/link'; +import { writeRemoteConfig } from '@squad/cli/commands/init-remote'; +import { resolveSquadPaths } from '@squad/sdk/resolution'; const TMP = join(process.cwd(), `.test-remote-mode-${randomBytes(4).toString('hex')}`); diff --git a/test/cli/roster.test.ts b/test/cli/roster.test.ts index 9df285777..b999b3c30 100644 --- a/test/cli/roster.test.ts +++ b/test/cli/roster.test.ts @@ -15,8 +15,8 @@ import { } from 'node:fs'; import { tmpdir } from 'node:os'; import path from 'node:path'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runUpgrade } from '@bradygaster/squad-cli/core/upgrade'; +import { runInit } from '@squad/cli/core/init'; +import { runUpgrade } from '@squad/cli/core/upgrade'; import { CLIENT_IDS, type ClientContext } from '../../packages/squad-sdk/src/client/index.js'; import { uninstallClients } from '../../packages/squad-sdk/src/client/adapters/index.js'; import { runRosterCommand } from '../../packages/squad-cli/src/cli/commands/roster.js'; diff --git a/test/cli/scrub-emails.test.ts b/test/cli/scrub-emails.test.ts index c7f1afa31..14f91becf 100644 --- a/test/cli/scrub-emails.test.ts +++ b/test/cli/scrub-emails.test.ts @@ -9,8 +9,8 @@ import { join } from 'path'; import { existsSync } from 'fs'; import { randomBytes } from 'crypto'; import { tmpdir } from 'os'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { scrubEmails } from '@bradygaster/squad-cli/core/email-scrub'; +import { runInit } from '@squad/cli/core/init'; +import { scrubEmails } from '@squad/cli/core/email-scrub'; const TEST_ROOT = join(tmpdir(), `.test-cli-scrub-${randomBytes(4).toString('hex')}`); diff --git a/test/cli/start.test.ts b/test/cli/start.test.ts index 1a5db82ce..d04deab05 100644 --- a/test/cli/start.test.ts +++ b/test/cli/start.test.ts @@ -14,18 +14,18 @@ afterEach(() => { describe('CLI: start command', () => { it('module exports runStart function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/start'); + const mod = await import('@squad/cli/commands/start'); expect(typeof mod.runStart).toBe('function'); }); it('module exports StartOptions type (verifiable via function arity)', async () => { - const mod = await import('@bradygaster/squad-cli/commands/start'); + const mod = await import('@squad/cli/commands/start'); // runStart(cwd, options) — should accept 2 parameters expect(mod.runStart.length).toBe(2); }); it('module has no unexpected default export', async () => { - const mod = await import('@bradygaster/squad-cli/commands/start'); + const mod = await import('@squad/cli/commands/start'); // ESM module should have named exports, no default expect(mod.default).toBeUndefined(); }); @@ -55,7 +55,7 @@ describe('CLI: start command - node-pty requirement (issue #711)', () => { throw exitSignal; }) as never); - vi.doMock('@bradygaster/squad-sdk', () => { + vi.doMock('@squad/sdk', () => { class FSStorageProvider { existsSync(): boolean { return false; diff --git a/test/cli/state-mcp.test.ts b/test/cli/state-mcp.test.ts index 8ef8adf54..83ae1f828 100644 --- a/test/cli/state-mcp.test.ts +++ b/test/cli/state-mcp.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { clearResolveSquadCache } from '@bradygaster/squad-sdk'; +import { clearResolveSquadCache } from '@squad/sdk'; import { execFileSync } from 'node:child_process'; import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; diff --git a/test/cli/upgrade-idempotent.test.ts b/test/cli/upgrade-idempotent.test.ts index da89901d5..08d2b1cfc 100644 --- a/test/cli/upgrade-idempotent.test.ts +++ b/test/cli/upgrade-idempotent.test.ts @@ -13,7 +13,7 @@ import { createHash } from 'node:crypto'; import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync, rmSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { randomBytes } from 'node:crypto'; -import { runInit } from '@bradygaster/squad-cli/core/init'; +import { runInit } from '@squad/cli/core/init'; import { runUpgrade, ensureGitignore, @@ -22,9 +22,9 @@ import { selfUpgradeCli, detectSelfUpgradeTag, planUpgradeFiles, -} from '@bradygaster/squad-cli/core/upgrade'; +} from '@squad/cli/core/upgrade'; import { getTemplatesDir } from '../../packages/squad-cli/src/cli/core/templates.js'; -import { getPackageVersion } from '@bradygaster/squad-cli/core/version'; +import { getPackageVersion } from '@squad/cli/core/version'; import { readShippedManifest, writeVerifiedBackup, @@ -405,8 +405,8 @@ describe('squad upgrade --self: dry-run installs nothing, follows the installed expect(exec).not.toHaveBeenCalled(); expect(result.performed).toBe(false); expect(result.tag).toBe('insider'); - expect(result.command).toBe('npm install -g @bradygaster/squad-cli@insider'); - expect(logs.join('\n')).toContain('npm install -g @bradygaster/squad-cli@insider'); + expect(result.command).toBe('npm install -g @squad/cli@insider'); + expect(logs.join('\n')).toContain('npm install -g @squad/cli@insider'); expect(logs.join('\n')).toMatch(/Nothing was installed/); }); @@ -417,7 +417,7 @@ describe('squad upgrade --self: dry-run installs nothing, follows the installed resolveTagVersion: async (tag) => (tag === 'insider' ? '2.0.0-preview.2' : '1.1.0'), }); expect(result.tag).toBe('insider'); - expect(exec).toHaveBeenCalledWith('npm install -g @bradygaster/squad-cli@insider', { stdio: 'inherit' }); + expect(exec).toHaveBeenCalledWith('npm install -g @squad/cli@insider', { stdio: 'inherit' }); expect(exec).not.toHaveBeenCalledWith(expect.stringContaining('@latest'), expect.anything()); }); @@ -426,7 +426,7 @@ describe('squad upgrade --self: dry-run installs nothing, follows the installed const result = await selfUpgradeCli({ packageManager: 'pnpm', exec, currentVersion: '1.0.1', resolveTagVersion: async () => '1.1.0' }); expect(result.tag).toBe('latest'); expect(result.targetVersion).toBe('1.1.0'); - expect(exec).toHaveBeenCalledWith('pnpm add -g @bradygaster/squad-cli@latest', { stdio: 'inherit' }); + expect(exec).toHaveBeenCalledWith('pnpm add -g @squad/cli@latest', { stdio: 'inherit' }); }); it('refuses a downgrade (resolved target older than installed) and runs nothing', async () => { diff --git a/test/cli/upgrade-portability.test.ts b/test/cli/upgrade-portability.test.ts index 730511db6..b70fac980 100644 --- a/test/cli/upgrade-portability.test.ts +++ b/test/cli/upgrade-portability.test.ts @@ -6,10 +6,10 @@ import { runInit } from '../../packages/squad-cli/src/cli/core/init.js'; import { runUpgrade } from '../../packages/squad-cli/src/cli/core/upgrade.js'; import { getPackageVersion } from '../../packages/squad-cli/src/cli/core/version.js'; import { STANDALONE_HOME_ENV } from '../../packages/squad-cli/src/cli/core/mcp-spec.js'; -import { squadRepoLauncherArgs } from '@bradygaster/squad-sdk/client'; +import { squadRepoLauncherArgs } from '@squad/sdk/client'; import { getTemplatesDir } from '../../packages/squad-cli/src/cli/core/templates.js'; import { copyManagedFile, writeManagedText } from '../../packages/squad-cli/src/cli/core/managed-file.js'; -import { TEAM_CAPABILITIES_BEGIN } from '@bradygaster/squad-sdk/config'; +import { TEAM_CAPABILITIES_BEGIN } from '@squad/sdk/config'; let root: string; const originalStandalone = process.env[STANDALONE_HOME_ENV]; @@ -58,7 +58,7 @@ describe('upgrade portability and destination newlines', () => { const version = getPackageVersion(); const fallback = { command: 'npx', - args: ['-y', `@bradygaster/squad-cli@${version}`, 'state-mcp'], + args: ['-y', `@squad/cli@${version}`, 'state-mcp'], }; expect(config.mcpServers.custom).toEqual(custom); expect(config.mcpServers.squad_state.env).toEqual({ EXTRA: 'keep' }); diff --git a/test/cli/upgrade.test.ts b/test/cli/upgrade.test.ts index b724e2b22..dcecdf801 100644 --- a/test/cli/upgrade.test.ts +++ b/test/cli/upgrade.test.ts @@ -9,9 +9,9 @@ import { join } from 'path'; import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync, chmodSync, renameSync } from 'fs'; import { tmpdir } from 'os'; import { randomBytes } from 'crypto'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runUpgrade, ensureGitattributes, ensureGitignore, ensureDirectories, ensureCastingDefaults, selfUpgradeCli, selfUpgradeCommand, detectPackageManager, migrateLegacyRaiAgent } from '@bradygaster/squad-cli/core/upgrade'; -import { getPackageVersion } from '@bradygaster/squad-cli/core/version'; +import { runInit } from '@squad/cli/core/init'; +import { runUpgrade, ensureGitattributes, ensureGitignore, ensureDirectories, ensureCastingDefaults, selfUpgradeCli, selfUpgradeCommand, detectPackageManager, migrateLegacyRaiAgent } from '@squad/cli/core/upgrade'; +import { getPackageVersion } from '@squad/cli/core/version'; const TEST_ROOT = join(tmpdir(), `.test-cli-upgrade-${randomBytes(4).toString('hex')}`); const TEST_HOME = join(tmpdir(), `.test-cli-upgrade-home-${randomBytes(4).toString('hex')}`); @@ -171,7 +171,7 @@ describe('CLI: upgrade command', () => { // After MCP-BRIDGE-BROKEN fix the args MUST pin the CLI version so npx // does not silently resolve to the npm `latest` dist-tag (which lacks the // state-mcp command). Match a regex rather than literal version. - expect(upgraded).toMatch(/args: \['-y', '@bradygaster\/squad-cli@[^']+', 'state-mcp'\]/); + expect(upgraded).toMatch(/args: \['-y', '@squad\/cli@[^']+', 'state-mcp'\]/); expect(upgraded).toContain(' EXAMPLE-github:'); expect(upgraded).toContain(" args: ['-y', '@anthropic/github-mcp-server']"); expect(upgraded).toContain(' GITHUB_TOKEN: ${GITHUB_TOKEN}'); @@ -536,9 +536,9 @@ describe('CLI: upgrade command', () => { describe('selfUpgradeCli shells out with the correct package manager and dist-tag', () => { const EXPECTED: Record<'npm' | 'pnpm' | 'yarn', Record<'latest' | 'insider', string>> = { - npm: { latest: 'npm install -g @bradygaster/squad-cli@latest', insider: 'npm install -g @bradygaster/squad-cli@insider' }, - pnpm: { latest: 'pnpm add -g @bradygaster/squad-cli@latest', insider: 'pnpm add -g @bradygaster/squad-cli@insider' }, - yarn: { latest: 'yarn global add @bradygaster/squad-cli@latest', insider: 'yarn global add @bradygaster/squad-cli@insider' }, + npm: { latest: 'npm install -g @squad/cli@latest', insider: 'npm install -g @squad/cli@insider' }, + pnpm: { latest: 'pnpm add -g @squad/cli@latest', insider: 'pnpm add -g @squad/cli@insider' }, + yarn: { latest: 'yarn global add @squad/cli@latest', insider: 'yarn global add @squad/cli@insider' }, }; for (const pm of ['npm', 'pnpm', 'yarn'] as const) { @@ -581,12 +581,12 @@ describe('CLI: upgrade command', () => { it('surfaces package-manager failures as a thrown error with the retry command (no false success)', async () => { const eacces = Object.assign(new Error('EACCES: permission denied'), { code: 'EACCES' }); await expect(selfUpgradeCli({ packageManager: 'npm', currentVersion: '1.0.0', resolveTagVersion: async () => null, exec: () => { throw eacces; } })) - .rejects.toThrow(/Self-upgrade failed: Permission denied\. Try: sudo npm install -g @bradygaster\/squad-cli@latest/); + .rejects.toThrow(/Self-upgrade failed: Permission denied\. Try: sudo npm install -g @squad\/cli@latest/); const ebusy = Object.assign(new Error('EBUSY: resource busy'), { code: 'EBUSY' }); await expect(selfUpgradeCli({ insider: true, packageManager: 'pnpm', currentVersion: '1.0.0', resolveTagVersion: async () => null, exec: () => { throw ebusy; } })) - .rejects.toThrow(/in use .*pnpm add -g @bradygaster\/squad-cli@insider/); + .rejects.toThrow(/in use .*pnpm add -g @squad\/cli@insider/); await expect(selfUpgradeCli({ packageManager: 'yarn', currentVersion: '1.0.0', resolveTagVersion: async () => null, exec: () => { throw new Error('boom'); } })) - .rejects.toThrow(/Upgrade failed\. Try running manually: yarn global add @bradygaster\/squad-cli@latest/); + .rejects.toThrow(/Upgrade failed\. Try running manually: yarn global add @squad\/cli@latest/); }); }); @@ -684,7 +684,7 @@ describe('CLI: upgrade command', () => { mcpServers: { squad_state: { command: '"npx"', - args: ['-y', '@bradygaster/squad-cli@0.9.1', 'state-mcp'], + args: ['-y', '@squad/cli@0.9.1', 'state-mcp'], }, }, })); diff --git a/test/cli/watch-capabilities.test.ts b/test/cli/watch-capabilities.test.ts index 9075cffcc..67c8c36f3 100644 --- a/test/cli/watch-capabilities.test.ts +++ b/test/cli/watch-capabilities.test.ts @@ -50,11 +50,11 @@ const { // ── Module mocks ──────────────────────────────────────────────────── -vi.mock('@bradygaster/squad-sdk', () => ({ +vi.mock('@squad/sdk', () => ({ FSStorageProvider: vi.fn(function () { return mockStorage; }), })); -vi.mock('@bradygaster/squad-sdk/client', () => ({ +vi.mock('@squad/sdk/client', () => ({ SquadClient: vi.fn(function () { return { listModels: mockListModels, diff --git a/test/cli/watch-circuit-breaker.test.ts b/test/cli/watch-circuit-breaker.test.ts index 6d4b86c0b..45f89b5d6 100644 --- a/test/cli/watch-circuit-breaker.test.ts +++ b/test/cli/watch-circuit-breaker.test.ts @@ -16,7 +16,7 @@ import { describe, it, expect } from 'vitest'; import { PredictiveCircuitBreaker, getTrafficLight, -} from '@bradygaster/squad-sdk/ralph/rate-limiting'; +} from '@squad/sdk/ralph/rate-limiting'; // Re-declare the state shape to test serialization contract interface CircuitBreakerState { diff --git a/test/cli/watch-claim-telemetry.test.ts b/test/cli/watch-claim-telemetry.test.ts index 1ba024b8c..91e128817 100644 --- a/test/cli/watch-claim-telemetry.test.ts +++ b/test/cli/watch-claim-telemetry.test.ts @@ -15,7 +15,7 @@ import { type ClaimRecord, type ExecutorIdentity, type WorkClaimProvider, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; interface SpyCounter { add: Mock } const instruments = new Map(); @@ -27,7 +27,7 @@ const spyMeter = { }), }; -vi.mock('@bradygaster/squad-sdk', async (importOriginal) => ({ +vi.mock('@squad/sdk', async (importOriginal) => ({ ...(await importOriginal>()), getMeter: () => spyMeter, })); diff --git a/test/cli/watch-claims.test.ts b/test/cli/watch-claims.test.ts index 05a570296..07b99171c 100644 --- a/test/cli/watch-claims.test.ts +++ b/test/cli/watch-claims.test.ts @@ -11,7 +11,7 @@ import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'; import fs from 'node:fs'; import path from 'node:path'; import { randomUUID } from 'node:crypto'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { FSStorageProvider } from '@squad/sdk'; import { InMemoryClaimProvider, InMemoryClaimStore, @@ -21,7 +21,7 @@ import { type FinishOutcome, type WorkClaimProvider, type WorkKey, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; import { ExecuteCapability } from '../../packages/squad-cli/src/cli/commands/watch/capabilities/execute.js'; import { FleetDispatchCapability } from '../../packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.js'; import type { WatchContext } from '../../packages/squad-cli/src/cli/commands/watch/types.js'; diff --git a/test/cli/watch-double-pick.test.ts b/test/cli/watch-double-pick.test.ts index 641a8ac09..8a9e1c60c 100644 --- a/test/cli/watch-double-pick.test.ts +++ b/test/cli/watch-double-pick.test.ts @@ -29,8 +29,8 @@ import { InMemoryClaimStore, type ExecutorIdentity, type WorkClaimProvider, -} from '@bradygaster/squad-sdk/ralph/claims'; -import { GitRefClaimProvider } from '@bradygaster/squad-sdk/ralph/claims-git'; +} from '@squad/sdk/ralph/claims'; +import { GitRefClaimProvider } from '@squad/sdk/ralph/claims-git'; import { ExecuteCapability } from '../../packages/squad-cli/src/cli/commands/watch/capabilities/execute.js'; import { FleetDispatchCapability } from '../../packages/squad-cli/src/cli/commands/watch/capabilities/fleet-dispatch.js'; import type { WatchContext } from '../../packages/squad-cli/src/cli/commands/watch/types.js'; diff --git a/test/cli/watch-health.test.ts b/test/cli/watch-health.test.ts index bc44810ed..ae604c6fc 100644 --- a/test/cli/watch-health.test.ts +++ b/test/cli/watch-health.test.ts @@ -17,7 +17,7 @@ import { getPidPath, isProcessAlive, type WatchPidInfo, -} from '@bradygaster/squad-cli/commands/watch'; +} from '@squad/cli/commands/watch'; /** Create a temp directory with a .squad subdirectory for testing. */ function makeTempTeamRoot(): string { diff --git a/test/cli/watch.test.ts b/test/cli/watch.test.ts index ebff395af..741967c66 100644 --- a/test/cli/watch.test.ts +++ b/test/cli/watch.test.ts @@ -9,24 +9,24 @@ import { describe, it, expect } from 'vitest'; describe('CLI: watch command', () => { it('module exports runWatch function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/watch'); + const mod = await import('@squad/cli/commands/watch'); expect(typeof mod.runWatch).toBe('function'); }); it('module exports reportBoard function', async () => { - const mod = await import('@bradygaster/squad-cli/commands/watch'); + const mod = await import('@squad/cli/commands/watch'); expect(typeof mod.reportBoard).toBe('function'); }); it('module exports BoardState interface (via type checking)', async () => { // If the module loads and exports are accessible, types are correctly defined - const mod = await import('@bradygaster/squad-cli/commands/watch'); + const mod = await import('@squad/cli/commands/watch'); expect(mod).toHaveProperty('runWatch'); expect(mod).toHaveProperty('reportBoard'); }); it('reportBoard handles empty board state', async () => { - const { reportBoard } = await import('@bradygaster/squad-cli/commands/watch'); + const { reportBoard } = await import('@squad/cli/commands/watch'); const emptyState = { untriaged: 0, assigned: 0, @@ -41,7 +41,7 @@ describe('CLI: watch command', () => { }); it('reportBoard handles populated board state', async () => { - const { reportBoard } = await import('@bradygaster/squad-cli/commands/watch'); + const { reportBoard } = await import('@squad/cli/commands/watch'); const state = { untriaged: 3, assigned: 2, @@ -55,7 +55,7 @@ describe('CLI: watch command', () => { }); it('reportBoard accepts any positive round number', async () => { - const { reportBoard } = await import('@bradygaster/squad-cli/commands/watch'); + const { reportBoard } = await import('@squad/cli/commands/watch'); const state = { untriaged: 1, assigned: 0, diff --git a/test/client.test.ts b/test/client.test.ts index 1890583ab..73bd102c2 100644 --- a/test/client.test.ts +++ b/test/client.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; -import { SessionPool, DEFAULT_POOL_CONFIG } from '@bradygaster/squad-sdk/client'; -import { EventBus } from '@bradygaster/squad-sdk/client'; +import { SquadClientWithPool } from '@squad/sdk/client'; +import { SessionPool, DEFAULT_POOL_CONFIG } from '@squad/sdk/client'; +import { EventBus } from '@squad/sdk/client'; // Mock the SDK CopilotClient to avoid import.meta.resolve issues in tests vi.mock('@github/copilot-sdk', () => ({ diff --git a/test/clients.test.ts b/test/clients.test.ts index baf01571f..ad5ddf05d 100644 --- a/test/clients.test.ts +++ b/test/clients.test.ts @@ -934,13 +934,13 @@ describe('Layer 1 review recommendations & hardening', () => { expect(removeTomlTable(dottedTopLevel, 'mcp_servers.squad_state')).toBe(''); }); - it('clients.ts: imports from @bradygaster/squad-sdk/client, merges repeated --client flags, preserves unknown IDs, and rejects symlinked .squad', async () => { + it('clients.ts: imports from @squad/sdk/client, merges repeated --client flags, preserves unknown IDs, and rejects symlinked .squad', async () => { const cliClientsSource = fs.readFileSync( path.resolve(__dirname, '../packages/squad-cli/src/cli/core/clients.ts'), 'utf8', ); - expect(cliClientsSource).toContain("from '@bradygaster/squad-sdk/client'"); - expect(cliClientsSource).not.toContain("from '@bradygaster/squad-sdk/clients'"); + expect(cliClientsSource).toContain("from '@squad/sdk/client'"); + expect(cliClientsSource).not.toContain("from '@squad/sdk/clients'"); // Repeated --client flags are merged expect(readClientFlag(['init', '--client', 'claude', '--client', 'opencode'])).toEqual(['claude', 'opencode']); diff --git a/test/compat-v041.test.ts b/test/compat-v041.test.ts index 9ebc8d21e..714a22774 100644 --- a/test/compat-v041.test.ts +++ b/test/compat-v041.test.ts @@ -14,10 +14,10 @@ import { parseRoutingMarkdown, matchIssueLabels, type CompiledRouter, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Casting --- -import { CastingEngine, type CastMember } from '@bradygaster/squad-sdk/casting'; +import { CastingEngine, type CastMember } from '@squad/sdk/casting'; // --- Config --- import { @@ -26,10 +26,10 @@ import { validateConfigDetailed, loadConfigSync, type SquadConfig, -} from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/runtime'; // --- Tools --- -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; +import { ToolRegistry } from '@squad/sdk/tools'; // --- Hooks --- import { @@ -37,10 +37,10 @@ import { ReviewerLockoutHook, DEFAULT_BLOCKED_COMMANDS, type PreToolUseContext, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; // --- Event Bus --- -import { EventBus, type SquadEvent, type SquadEventType } from '@bradygaster/squad-sdk/runtime/event-bus'; +import { EventBus, type SquadEvent, type SquadEventType } from '@squad/sdk/runtime/event-bus'; // --- Models --- import { @@ -50,19 +50,19 @@ import { getModelInfo, getFallbackChain, isModelAvailable, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Skills --- -import { SkillRegistry, parseFrontmatter, parseSkillFile } from '@bradygaster/squad-sdk/skills'; +import { SkillRegistry, parseFrontmatter, parseSkillFile } from '@squad/sdk/skills'; // --- Streaming --- -import { StreamingPipeline, type UsageEvent } from '@bradygaster/squad-sdk/runtime/streaming'; +import { StreamingPipeline, type UsageEvent } from '@squad/sdk/runtime/streaming'; // --- Agent doc --- -import { parseAgentDoc } from '@bradygaster/squad-sdk/config'; +import { parseAgentDoc } from '@squad/sdk/config'; // --- Migration --- -import { MigrationRegistry, compareSemVer, parseSemVer } from '@bradygaster/squad-sdk/config'; +import { MigrationRegistry, compareSemVer, parseSemVer } from '@squad/sdk/config'; import * as fs from 'node:fs'; import * as path from 'node:path'; diff --git a/test/config-integration.test.ts b/test/config-integration.test.ts index fb016a3f1..6e8f6d2b0 100644 --- a/test/config-integration.test.ts +++ b/test/config-integration.test.ts @@ -12,21 +12,21 @@ import { AgentRegistry, parseCharterMetadata, type AgentDefinition, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { compileCharter, compileCharterFull, parseCharterMarkdown, type CharterCompileOptions, type CharterConfigOverrides, -} from '@bradygaster/squad-sdk/agents'; -import { resolveModel } from '@bradygaster/squad-sdk/agents'; -import { HookPipeline } from '@bradygaster/squad-sdk/hooks'; -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; +} from '@squad/sdk/agents'; +import { resolveModel } from '@squad/sdk/agents'; +import { HookPipeline } from '@squad/sdk/hooks'; +import { ToolRegistry } from '@squad/sdk/tools'; import { defineConfig, validateConfig as validateSchemaConfig, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { validateConfig as validateRuntimeConfig, validateConfigDetailed, @@ -34,16 +34,16 @@ import { discoverConfigFile, DEFAULT_CONFIG as RUNTIME_DEFAULT, ConfigValidationError, -} from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/runtime'; import { ModelRegistry, MODEL_CATALOG, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { parseRoutingMarkdown, compileRoutingRules, matchRoute, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --------------------------------------------------------------------------- // Shared fixture helpers diff --git a/test/config-schema.test.ts b/test/config-schema.test.ts index 091b64df0..f22cf7b31 100644 --- a/test/config-schema.test.ts +++ b/test/config-schema.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect } from 'vitest'; import { validateConfigDetailed, DEFAULT_CONFIG as RUNTIME_DEFAULT_CONFIG, -} from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/runtime'; import { SquadConfig, AgentConfig, @@ -16,7 +16,7 @@ import { GitHubAgentSource, MarketplaceAgentSource, AgentRegistry, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; describe('Configuration Schema', () => { describe('DEFAULT_CONFIG', () => { diff --git a/test/config.test.ts b/test/config.test.ts index ed774d617..ef9f2b95f 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -11,7 +11,7 @@ import { ConfigValidationError, DEFAULT_CONFIG, type SquadConfig -} from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/runtime'; import { writeFileSync, mkdirSync, rmSync } from 'fs'; import { join } from 'path'; diff --git a/test/consumer-imports.test.ts b/test/consumer-imports.test.ts index 8d140a718..b00d6b90c 100644 --- a/test/consumer-imports.test.ts +++ b/test/consumer-imports.test.ts @@ -4,7 +4,7 @@ describe('Consumer-perspective imports', () => { describe('main barrel exports', () => { it('exports key parser functions', async () => { const { parseTeamMarkdown, parseDecisionsMarkdown, parseRoutingMarkdown } = - await import('@bradygaster/squad-sdk'); + await import('@squad/sdk'); expect(typeof parseTeamMarkdown).toBe('function'); expect(typeof parseDecisionsMarkdown).toBe('function'); expect(typeof parseRoutingMarkdown).toBe('function'); @@ -12,7 +12,7 @@ describe('Consumer-perspective imports', () => { it('exports CLI functions', async () => { const { runInit, runExport, runImport, scrubEmails } = - await import('@bradygaster/squad-cli'); + await import('@squad/cli'); expect(typeof runInit).toBe('function'); expect(typeof runExport).toBe('function'); expect(typeof runImport).toBe('function'); @@ -20,7 +20,7 @@ describe('Consumer-perspective imports', () => { }, 15_000); it('exports VERSION as a string', async () => { - const { VERSION } = await import('@bradygaster/squad-sdk'); + const { VERSION } = await import('@squad/sdk'); expect(typeof VERSION).toBe('string'); expect(VERSION.length).toBeGreaterThan(0); }); @@ -29,7 +29,7 @@ describe('Consumer-perspective imports', () => { describe('parsers barrel exports', () => { it('exports parser functions from parsers barrel', async () => { const { parseTeamMarkdown, parseCharterMarkdown } = - await import('@bradygaster/squad-sdk/parsers'); + await import('@squad/sdk/parsers'); expect(typeof parseTeamMarkdown).toBe('function'); expect(typeof parseCharterMarkdown).toBe('function'); }); @@ -37,7 +37,7 @@ describe('Consumer-perspective imports', () => { describe('types barrel', () => { it('has zero runtime exports (pure type re-exports)', async () => { - const types = await import('@bradygaster/squad-sdk/types'); + const types = await import('@squad/sdk/types'); // type-only re-exports produce no runtime values expect(Object.keys(types).length).toBe(0); }); @@ -46,7 +46,7 @@ describe('Consumer-perspective imports', () => { describe('side-effect-free import', () => { it('importing the barrel does NOT trigger CLI behavior', async () => { const argvBefore = [...process.argv]; - await import('@bradygaster/squad-sdk'); + await import('@squad/sdk'); // process.argv unchanged — no CLI side effects expect(process.argv).toEqual(argvBefore); // The test completing without hanging or exiting proves the import is clean @@ -56,7 +56,7 @@ describe('Consumer-perspective imports', () => { describe('skills barrel exports', () => { it('exports SkillScriptLoader, resolveSkillPath, and defineHandler from skills barrel', async () => { const { SkillScriptLoader, resolveSkillPath, defineHandler } = - await import('@bradygaster/squad-sdk/skills'); + await import('@squad/sdk/skills'); expect(typeof SkillScriptLoader).toBe('function'); expect(typeof resolveSkillPath).toBe('function'); expect(typeof defineHandler).toBe('function'); diff --git a/test/coordinator-routing.test.ts b/test/coordinator-routing.test.ts index 1e53e0a1a..d1b8ea959 100644 --- a/test/coordinator-routing.test.ts +++ b/test/coordinator-routing.test.ts @@ -16,8 +16,8 @@ import { Coordinator, type CoordinatorConfig, type RoutingDecision, -} from '@bradygaster/squad-sdk/coordinator'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +} from '@squad/sdk/coordinator'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // --- Helpers --- diff --git a/test/coordinator.test.ts b/test/coordinator.test.ts index 08386abad..83f50d528 100644 --- a/test/coordinator.test.ts +++ b/test/coordinator.test.ts @@ -6,16 +6,16 @@ import { SquadCoordinator, type SquadCoordinatorOptions, type CoordinatorResult, -} from '@bradygaster/squad-sdk/coordinator'; -import type { CoordinatorContext } from '@bradygaster/squad-sdk/coordinator'; -import { DirectResponseHandler } from '@bradygaster/squad-sdk/coordinator'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; -import { DEFAULT_CONFIG, type SquadConfig } from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/coordinator'; +import type { CoordinatorContext } from '@squad/sdk/coordinator'; +import { DirectResponseHandler } from '@squad/sdk/coordinator'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; +import { DEFAULT_CONFIG, type SquadConfig } from '@squad/sdk/runtime'; import { compileRoutingRules, type CompiledRouter, -} from '@bradygaster/squad-sdk/config'; -import type { FanOutDependencies, SpawnResult } from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/config'; +import type { FanOutDependencies, SpawnResult } from '@squad/sdk/coordinator'; import { resolveModel, ModelFallbackExecutor, @@ -23,9 +23,9 @@ import { isTierFallbackAllowed, type ResolvedModel, type ModelTier, -} from '@bradygaster/squad-sdk/agents'; -import { MODEL_CATALOG } from '@bradygaster/squad-sdk/config'; -import { MODELS } from '@bradygaster/squad-sdk'; +} from '@squad/sdk/agents'; +import { MODEL_CATALOG } from '@squad/sdk/config'; +import { MODELS } from '@squad/sdk'; import { readFileSync } from 'node:fs'; import { resolve } from 'node:path'; diff --git a/test/crlf-normalization.test.ts b/test/crlf-normalization.test.ts index ec0644238..a3167c607 100644 --- a/test/crlf-normalization.test.ts +++ b/test/crlf-normalization.test.ts @@ -14,10 +14,10 @@ import { randomUUID } from 'node:crypto'; import { parseTeamMarkdown, parseDecisionsMarkdown, -} from '@bradygaster/squad-sdk/config'; -import { parseRoutingMarkdown } from '@bradygaster/squad-sdk/config'; -import { parseCharterMarkdown } from '@bradygaster/squad-sdk/agents'; -import { loadSkillsFromDirectory } from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/config'; +import { parseRoutingMarkdown } from '@squad/sdk/config'; +import { parseCharterMarkdown } from '@squad/sdk/agents'; +import { loadSkillsFromDirectory } from '@squad/sdk/skills'; // --------------------------------------------------------------------------- // Helper: convert all \n to \r\n so we can replay happy-path inputs as CRLF diff --git a/test/cross-package-exports.test.ts b/test/cross-package-exports.test.ts index ba10674df..0c1e239d6 100644 --- a/test/cross-package-exports.test.ts +++ b/test/cross-package-exports.test.ts @@ -11,7 +11,7 @@ * module and assert every named export the CLI relies on is defined. * * Maintenance: - * When a new import from @bradygaster/squad-sdk is added to squad-cli, + * When a new import from @squad/sdk is added to squad-cli, * add a corresponding assertion here. The grep one-liner in the test * description shows how to audit. * @@ -32,12 +32,12 @@ function expectExports(mod: Record, names: string[], subpath: s } } -// ─── Root barrel: @bradygaster/squad-sdk ───────────────────────────────── +// ─── Root barrel: @squad/sdk ───────────────────────────────── describe('cross-package exports — CLI → SDK', () => { - describe('@bradygaster/squad-sdk (root barrel)', () => { + describe('@squad/sdk (root barrel)', () => { it('exports FSStorageProvider and core runtime symbols', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expectExports(sdk, [ 'FSStorageProvider', 'SquadState', @@ -58,11 +58,11 @@ describe('cross-package exports — CLI → SDK', () => { 'readSquadRegistry', 'addRegistryEntry', 'removeRegistryEntry', - ], '@bradygaster/squad-sdk'); + ], '@squad/sdk'); }); it('exports role helpers', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expectExports(sdk, [ 'listRoles', 'searchRoles', @@ -70,27 +70,27 @@ describe('cross-package exports — CLI → SDK', () => { 'getRoleById', 'generateCharterFromRole', 'addAgentToConfig', - ], '@bradygaster/squad-sdk'); + ], '@squad/sdk'); }); it('exports init helpers', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expectExports(sdk, [ 'initSquad', 'cleanupOrphanInitPrompt', - ], '@bradygaster/squad-sdk'); + ], '@squad/sdk'); }); it('exports external-state helpers', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expectExports(sdk, [ 'resolveExternalStateDir', 'deriveProjectKey', - ], '@bradygaster/squad-sdk'); + ], '@squad/sdk'); }); it('exports cross-squad helpers', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expectExports(sdk, [ 'discoverSquads', 'formatDiscoveryTable', @@ -98,121 +98,121 @@ describe('cross-package exports — CLI → SDK', () => { 'buildDelegationArgs', 'loadSubSquadsConfig', 'resolveSubSquad', - ], '@bradygaster/squad-sdk'); + ], '@squad/sdk'); }); it('exports RemoteBridge', async () => { - const sdk = await import('@bradygaster/squad-sdk'); - expectExports(sdk, ['RemoteBridge'], '@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); + expectExports(sdk, ['RemoteBridge'], '@squad/sdk'); }); }); // ─── Subpath: /config ────────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/config', () => { + describe('@squad/sdk/config', () => { it('exports config helpers used by CLI', async () => { - const mod = await import('@bradygaster/squad-sdk/config'); + const mod = await import('@squad/sdk/config'); expectExports(mod, [ 'initSquad', 'MigrationRegistry', 'writeEconomyMode', 'readEconomyMode', - ], '@bradygaster/squad-sdk/config'); + ], '@squad/sdk/config'); }); }); // ─── Subpath: /config/agent-source ───────────────────────────────────── - describe('@bradygaster/squad-sdk/config/agent-source', () => { + describe('@squad/sdk/config/agent-source', () => { it('exports LocalAgentSource', async () => { - const mod = await import('@bradygaster/squad-sdk/config/agent-source'); - expectExports(mod, ['LocalAgentSource'], '@bradygaster/squad-sdk/config/agent-source'); + const mod = await import('@squad/sdk/config/agent-source'); + expectExports(mod, ['LocalAgentSource'], '@squad/sdk/config/agent-source'); }); }); // ─── Subpath: /resolution ────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/resolution', () => { + describe('@squad/sdk/resolution', () => { it('exports resolution helpers', async () => { - const mod = await import('@bradygaster/squad-sdk/resolution'); + const mod = await import('@squad/sdk/resolution'); expectExports(mod, [ 'resolveSquad', 'resolveSquadPaths', 'resolveGlobalSquadPath', - ], '@bradygaster/squad-sdk/resolution'); + ], '@squad/sdk/resolution'); }); }); // ─── Subpath: /client ────────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/client', () => { + describe('@squad/sdk/client', () => { it('exports SquadClient', async () => { - const mod = await import('@bradygaster/squad-sdk/client'); - expectExports(mod, ['SquadClient'], '@bradygaster/squad-sdk/client'); + const mod = await import('@squad/sdk/client'); + expectExports(mod, ['SquadClient'], '@squad/sdk/client'); }); }); // ─── Subpath: /adapter/errors ────────────────────────────────────────── - describe('@bradygaster/squad-sdk/adapter/errors', () => { + describe('@squad/sdk/adapter/errors', () => { it('exports RateLimitError', async () => { - const mod = await import('@bradygaster/squad-sdk/adapter/errors'); - expectExports(mod, ['RateLimitError'], '@bradygaster/squad-sdk/adapter/errors'); + const mod = await import('@squad/sdk/adapter/errors'); + expectExports(mod, ['RateLimitError'], '@squad/sdk/adapter/errors'); }); }); // ─── Subpath: /casting ───────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/casting', () => { + describe('@squad/sdk/casting', () => { it('exports CastingEngine', async () => { - const mod = await import('@bradygaster/squad-sdk/casting'); - expectExports(mod, ['CastingEngine'], '@bradygaster/squad-sdk/casting'); + const mod = await import('@squad/sdk/casting'); + expectExports(mod, ['CastingEngine'], '@squad/sdk/casting'); }); }); // ─── Subpath: /platform ──────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/platform', () => { + describe('@squad/sdk/platform', () => { it('exports createPlatformAdapter', async () => { - const mod = await import('@bradygaster/squad-sdk/platform'); - expectExports(mod, ['createPlatformAdapter'], '@bradygaster/squad-sdk/platform'); + const mod = await import('@squad/sdk/platform'); + expectExports(mod, ['createPlatformAdapter'], '@squad/sdk/platform'); }); }); // ─── Subpath: /ralph ─────────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/ralph', () => { + describe('@squad/sdk/ralph', () => { it('exports RalphMonitor', async () => { - const mod = await import('@bradygaster/squad-sdk/ralph'); - expectExports(mod, ['RalphMonitor'], '@bradygaster/squad-sdk/ralph'); + const mod = await import('@squad/sdk/ralph'); + expectExports(mod, ['RalphMonitor'], '@squad/sdk/ralph'); }); }); - describe('@bradygaster/squad-sdk/ralph/triage', () => { + describe('@squad/sdk/ralph/triage', () => { it('exports triage helpers', async () => { - const mod = await import('@bradygaster/squad-sdk/ralph/triage'); + const mod = await import('@squad/sdk/ralph/triage'); expectExports(mod, [ 'parseRoster', 'parseRoutingRules', 'parseModuleOwnership', 'triageIssue', - ], '@bradygaster/squad-sdk/ralph/triage'); + ], '@squad/sdk/ralph/triage'); }); }); - describe('@bradygaster/squad-sdk/ralph/rate-limiting', () => { + describe('@squad/sdk/ralph/rate-limiting', () => { it('exports rate-limiting helpers', async () => { - const mod = await import('@bradygaster/squad-sdk/ralph/rate-limiting'); + const mod = await import('@squad/sdk/ralph/rate-limiting'); expectExports(mod, [ 'PredictiveCircuitBreaker', 'getTrafficLight', - ], '@bradygaster/squad-sdk/ralph/rate-limiting'); + ], '@squad/sdk/ralph/rate-limiting'); }); }); - describe('@bradygaster/squad-sdk/ralph/claims', () => { + describe('@squad/sdk/ralph/claims', () => { it('exports the work claim contract', async () => { - const mod = await import('@bradygaster/squad-sdk/ralph/claims'); + const mod = await import('@squad/sdk/ralph/claims'); expectExports(mod, [ 'workKeyToString', 'resolveExecutorIdentity', @@ -221,13 +221,13 @@ describe('cross-package exports — CLI → SDK', () => { 'InMemoryClaimStore', 'DEFAULT_CLAIM_TTL_MS', 'DEFAULT_CLAIM_SKEW_MARGIN_MS', - ], '@bradygaster/squad-sdk/ralph/claims'); + ], '@squad/sdk/ralph/claims'); }); }); - describe('@bradygaster/squad-sdk/ralph/claims-git', () => { + describe('@squad/sdk/ralph/claims-git', () => { it('exports the Git-ref claim provider', async () => { - const mod = await import('@bradygaster/squad-sdk/ralph/claims-git'); + const mod = await import('@squad/sdk/ralph/claims-git'); expectExports(mod, [ 'GitRefClaimProvider', 'GitClaimUnavailableError', @@ -236,16 +236,16 @@ describe('cross-package exports — CLI → SDK', () => { 'decodeClaimRecord', 'DEFAULT_CLAIM_REF_PREFIX', 'FALLBACK_CLAIM_REF_PREFIX', - ], '@bradygaster/squad-sdk/ralph/claims-git'); + ], '@squad/sdk/ralph/claims-git'); }); }); // ─── Subpath: /runtime/* ─────────────────────────────────────────────── - describe('@bradygaster/squad-sdk/runtime/event-bus', () => { + describe('@squad/sdk/runtime/event-bus', () => { it('exports EventBus', async () => { - const mod = await import('@bradygaster/squad-sdk/runtime/event-bus'); - expectExports(mod, ['EventBus'], '@bradygaster/squad-sdk/runtime/event-bus'); + const mod = await import('@squad/sdk/runtime/event-bus'); + expectExports(mod, ['EventBus'], '@squad/sdk/runtime/event-bus'); }); }); @@ -259,7 +259,7 @@ describe('cross-package exports — CLI → SDK', () => { // In CI / installed scenarios, find it under node_modules. const candidates = [ resolve(process.cwd(), 'packages', 'squad-sdk'), - resolve(process.cwd(), 'node_modules', '@bradygaster', 'squad-sdk'), + resolve(process.cwd(), 'node_modules', '@squad', 'sdk'), ]; const sdkRoot = candidates.find( (p) => existsSync(resolve(p, 'package.json')), diff --git a/test/detect-squad-dir-zero-deps.test.ts b/test/detect-squad-dir-zero-deps.test.ts index 12e8426e2..876583dd1 100644 --- a/test/detect-squad-dir-zero-deps.test.ts +++ b/test/detect-squad-dir-zero-deps.test.ts @@ -2,7 +2,7 @@ * Regression guard — detect-squad-dir.ts must stay zero-dependency. * * The StorageProvider refactor (26047dc5) accidentally converted this - * bootstrap utility to depend on @bradygaster/squad-sdk. This file runs + * bootstrap utility to depend on @squad/sdk. This file runs * before the SDK is loaded, so it must only use node built-ins. */ @@ -24,12 +24,12 @@ const SOURCE_PATH = resolve( describe('detect-squad-dir zero-dependency guard', () => { const source = readFileSync(SOURCE_PATH, 'utf-8'); - it('must not import from @bradygaster/squad-sdk', () => { - expect(source).not.toMatch(/from\s+['"]@bradygaster\/squad-sdk(?:\/[^'"]+)?['"]/); + it('must not import from @squad/sdk', () => { + expect(source).not.toMatch(/from\s+['"]@squad\/sdk(?:\/[^'"]+)?['"]/); }); - it('must not require @bradygaster/squad-sdk', () => { - expect(source).not.toMatch(/require\s*\(\s*['"]@bradygaster\/squad-sdk(?:\/[^'"]+)?['"]\s*\)/); + it('must not require @squad/sdk', () => { + expect(source).not.toMatch(/require\s*\(\s*['"]@squad\/sdk(?:\/[^'"]+)?['"]\s*\)/); }); it('should import from node:fs for filesystem operations', () => { diff --git a/test/direct-response.test.ts b/test/direct-response.test.ts index c1a7357d1..720a60bb6 100644 --- a/test/direct-response.test.ts +++ b/test/direct-response.test.ts @@ -6,9 +6,9 @@ import { DirectResponseHandler, type CoordinatorContext, type DirectResponsePattern, -} from '@bradygaster/squad-sdk/coordinator'; -import { DEFAULT_CONFIG, type SquadConfig } from '@bradygaster/squad-sdk/runtime'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +} from '@squad/sdk/coordinator'; +import { DEFAULT_CONFIG, type SquadConfig } from '@squad/sdk/runtime'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // --- Helpers --- diff --git a/test/docs-site-location.test.ts b/test/docs-site-location.test.ts index dd97fcf81..7a662d849 100644 --- a/test/docs-site-location.test.ts +++ b/test/docs-site-location.test.ts @@ -210,7 +210,7 @@ describe('old-repository pattern', () => { }); it.each([ - ['the npm scope', 'npm install -g @bradygaster/squad-cli@insider'], + ['the npm scope', 'npm install -g @squad/cli@insider'], ['another repository whose name starts with squad', 'https://github.com/bradygaster/squadron'], ['a work reference', 'Ported from bradygaster/squad#131'], ['a look-alike host', 'https://mygithub.com/bradygaster/squad'], diff --git a/test/dual-root-resolver.test.ts b/test/dual-root-resolver.test.ts index 385331164..7b1f61c64 100644 --- a/test/dual-root-resolver.test.ts +++ b/test/dual-root-resolver.test.ts @@ -7,7 +7,7 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; import { mkdirSync, rmSync, existsSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; import { randomBytes } from 'node:crypto'; -import { resolveSquadPaths, clearResolveSquadCache } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquadPaths, clearResolveSquadCache } from '@squad/sdk/resolution'; const TMP = join(process.cwd(), `.test-dual-root-${randomBytes(4).toString('hex')}`); diff --git a/test/e2e-migration.test.ts b/test/e2e-migration.test.ts index 41d805117..5a7d3023e 100644 --- a/test/e2e-migration.test.ts +++ b/test/e2e-migration.test.ts @@ -16,7 +16,7 @@ import { compareSemVer, type Migration, type MigrationResult, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { migrateMarkdownToConfig, parseTeamMarkdown, @@ -24,18 +24,18 @@ import { generateConfigFromParsed, type MarkdownParseResult, type MarkdownMigrationOptions, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { exportSquadConfig, serializeBundle, type ExportBundle, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { importSquadConfig, deserializeBundle, validateBundle, -} from '@bradygaster/squad-sdk/sharing'; -import { DEFAULT_CONFIG, type SquadConfig } from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/sharing'; +import { DEFAULT_CONFIG, type SquadConfig } from '@squad/sdk/runtime'; // ============================================================================ // Helpers diff --git a/test/economy-mode.test.ts b/test/economy-mode.test.ts index 9a8ec2145..79a8bedd8 100644 --- a/test/economy-mode.test.ts +++ b/test/economy-mode.test.ts @@ -17,10 +17,10 @@ import { writeEconomyMode, applyEconomyMode, ECONOMY_MODEL_MAP, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { resolveModel as sdkResolveModel, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; import { runEconomy } from '../packages/squad-cli/src/cli/commands/economy.js'; let squadDir: string; diff --git a/test/effective-squad-dir.test.ts b/test/effective-squad-dir.test.ts index 4330fd292..2d280f887 100644 --- a/test/effective-squad-dir.test.ts +++ b/test/effective-squad-dir.test.ts @@ -7,7 +7,7 @@ import { mkdirSync, rmSync, existsSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; import { randomBytes } from 'node:crypto'; import { resolveStateDir, effectiveSquadDir } from '../packages/squad-cli/src/cli/core/effective-squad-dir.js'; -import { resolveGlobalSquadPath } from '@bradygaster/squad-sdk/resolution'; +import { resolveGlobalSquadPath } from '@squad/sdk/resolution'; const TMP = join(process.cwd(), `.test-effective-squad-dir-${randomBytes(4).toString('hex')}`); diff --git a/test/ensure-squad-path-dual.test.ts b/test/ensure-squad-path-dual.test.ts index 4f64b7a54..f4509de02 100644 --- a/test/ensure-squad-path-dual.test.ts +++ b/test/ensure-squad-path-dual.test.ts @@ -6,8 +6,8 @@ import { describe, it, expect } from 'vitest'; import { join } from 'node:path'; import { tmpdir } from 'node:os'; -import { ensureSquadPathDual, ensureSquadPathResolved } from '@bradygaster/squad-sdk/resolution'; -import type { ResolvedSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { ensureSquadPathDual, ensureSquadPathResolved } from '@squad/sdk/resolution'; +import type { ResolvedSquadPaths } from '@squad/sdk/resolution'; // Use fixed absolute paths for deterministic tests (no filesystem needed — pure validation) const PROJECT_DIR = join(process.cwd(), 'project', '.squad'); diff --git a/test/error-messages.test.ts b/test/error-messages.test.ts index af71bfe00..55b656d6a 100644 --- a/test/error-messages.test.ts +++ b/test/error-messages.test.ts @@ -13,7 +13,7 @@ import { rateLimitGuidance, extractRetryAfter, formatGuidance, -} from '@bradygaster/squad-cli/shell/error-messages'; +} from '@squad/cli/shell/error-messages'; describe('error-messages', () => { // ---------- sdkDisconnectGuidance ---------- diff --git a/test/errors.test.ts b/test/errors.test.ts index 4b1574b29..33c7941d7 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -21,7 +21,7 @@ import { ErrorCategory, TelemetryCollector, type ErrorContext, -} from '@bradygaster/squad-sdk/adapter/errors'; +} from '@squad/sdk/adapter/errors'; describe('SquadError — Base Error', () => { it('should construct with all required fields', () => { diff --git a/test/event-bus.test.ts b/test/event-bus.test.ts index 0b57b8149..1c3adfca0 100644 --- a/test/event-bus.test.ts +++ b/test/event-bus.test.ts @@ -6,9 +6,9 @@ */ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import { EventBus as ClientEventBus } from '@bradygaster/squad-sdk/client'; -import { EventBus as RuntimeEventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; -import { createSquadEvent, isSquadEventOfType } from '@bradygaster/squad-sdk/runtime/event-payloads'; +import { EventBus as ClientEventBus } from '@squad/sdk/client'; +import { EventBus as RuntimeEventBus } from '@squad/sdk/runtime/event-bus'; +import { createSquadEvent, isSquadEventOfType } from '@squad/sdk/runtime/event-payloads'; describe('ClientEventBus', () => { let bus: ClientEventBus; diff --git a/test/external-state.test.ts b/test/external-state.test.ts index 7e5c5a4fc..cc888620c 100644 --- a/test/external-state.test.ts +++ b/test/external-state.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; -import { resolveExternalStateDir, deriveProjectKey } from '@bradygaster/squad-sdk'; +import { resolveExternalStateDir, deriveProjectKey } from '@squad/sdk'; import { mkdirSync, rmSync, existsSync, writeFileSync, readFileSync, readdirSync } from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -73,7 +73,7 @@ describe('resolveExternalStateDir', () => { describe('SquadDirConfig stateLocation', () => { it('loadDirConfig parses stateLocation: external', async () => { - const { loadDirConfig } = await import('@bradygaster/squad-sdk'); + const { loadDirConfig } = await import('@squad/sdk'); const configDir = path.join(TEST_ROOT, '.squad'); mkdirSync(configDir, { recursive: true }); @@ -91,7 +91,7 @@ describe('SquadDirConfig stateLocation', () => { }); it('loadDirConfig defaults stateLocation to undefined (local)', async () => { - const { loadDirConfig } = await import('@bradygaster/squad-sdk'); + const { loadDirConfig } = await import('@squad/sdk'); const configDir = path.join(TEST_ROOT, '.squad2'); mkdirSync(configDir, { recursive: true }); diff --git a/test/fact-checker-role.test.ts b/test/fact-checker-role.test.ts index c3c097e78..1141ca066 100644 --- a/test/fact-checker-role.test.ts +++ b/test/fact-checker-role.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { getRoleById, listRoles } from '@bradygaster/squad-sdk/roles'; +import { getRoleById, listRoles } from '@squad/sdk/roles'; import { existsSync, readFileSync } from 'node:fs'; import path from 'node:path'; diff --git a/test/fan-out.test.ts b/test/fan-out.test.ts index 542ce40c2..235ac0702 100644 --- a/test/fan-out.test.ts +++ b/test/fan-out.test.ts @@ -15,10 +15,10 @@ import { type AgentSpawnConfig, type SpawnResult, type FanOutDependencies, -} from '@bradygaster/squad-sdk/coordinator'; -import { EventBus } from '@bradygaster/squad-sdk/client'; -import { SessionPool } from '@bradygaster/squad-sdk/client'; -import type { AgentCharter } from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/coordinator'; +import { EventBus } from '@squad/sdk/client'; +import { SessionPool } from '@squad/sdk/client'; +import type { AgentCharter } from '@squad/sdk/agents'; describe('spawnParallel', () => { let mockDeps: FanOutDependencies; diff --git a/test/feature-audit.test.ts b/test/feature-audit.test.ts index 78416d6ae..1a0f7164f 100644 --- a/test/feature-audit.test.ts +++ b/test/feature-audit.test.ts @@ -9,8 +9,8 @@ import { generateAuditMarkdown, type FeatureAuditReport, type FeatureStatus, -} from '@bradygaster/squad-sdk/config'; -import { DEFAULT_CONFIG, defineConfig, type SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; +import { DEFAULT_CONFIG, defineConfig, type SquadConfig } from '@squad/sdk/config'; // --- helpers --- diff --git a/test/feature-parity.test.ts b/test/feature-parity.test.ts index f9be9b59c..0ba65a76b 100644 --- a/test/feature-parity.test.ts +++ b/test/feature-parity.test.ts @@ -10,24 +10,24 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { SquadCoordinator, type CoordinatorResult, -} from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/coordinator'; import { DirectResponseHandler, type CoordinatorContext, -} from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/coordinator'; import { selectResponseTier, getTier, type TierName, -} from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/coordinator'; import { compileRoutingRules, matchRoute, parseRoutingMarkdown, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Casting --- -import { CastingEngine, type CastingConfig, type AgentRole } from '@bradygaster/squad-sdk/casting'; +import { CastingEngine, type CastingConfig, type AgentRole } from '@squad/sdk/casting'; // --- Skills --- import { @@ -35,14 +35,14 @@ import { parseSkillFile, parseFrontmatter, type SkillDefinition, -} from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/skills'; // --- Streaming --- import { StreamingPipeline, type StreamDelta, type UsageEvent, -} from '@bradygaster/squad-sdk/runtime/streaming'; +} from '@squad/sdk/runtime/streaming'; // --- Config --- import { @@ -50,16 +50,16 @@ import { validateConfig, validateConfigDetailed, type SquadConfig, -} from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/runtime'; import { defineConfig, validateConfig as validateSchemaConfig, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { MigrationRegistry, parseSemVer, compareSemVer, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Legacy fallback --- import { @@ -67,7 +67,7 @@ import { loadLegacyAgentMd, mergeLegacyWithConfig, type LegacyConfig, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Models --- import { @@ -76,24 +76,24 @@ import { inferTierFromModel, isTierFallbackAllowed, type ResolvedModel, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; import { ModelRegistry, MODEL_CATALOG, DEFAULT_FALLBACK_CHAINS, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // --- Event bus --- -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // --- Hooks --- -import { HookPipeline, type PolicyConfig } from '@bradygaster/squad-sdk/hooks'; +import { HookPipeline, type PolicyConfig } from '@squad/sdk/hooks'; // --- Tools --- -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; +import { ToolRegistry } from '@squad/sdk/tools'; // --- Agents --- -import { parseAgentDoc } from '@bradygaster/squad-sdk/config'; +import { parseAgentDoc } from '@squad/sdk/config'; import * as fs from 'node:fs'; import * as path from 'node:path'; diff --git a/test/first-run-gating.test.ts b/test/first-run-gating.test.ts index 8be3bc40e..da0f33332 100644 --- a/test/first-run-gating.test.ts +++ b/test/first-run-gating.test.ts @@ -17,7 +17,7 @@ import React from 'react'; import { render } from 'ink-testing-library'; import { Text } from 'ink'; -import type { ShellMessage } from '@bradygaster/squad-cli/shell/types'; +import type { ShellMessage } from '@squad/cli/shell/types'; const h = React.createElement; diff --git a/test/fixtures/squad-init-approved.json b/test/fixtures/squad-init-approved.json index 8cda7274b..c81ad499f 100644 --- a/test/fixtures/squad-init-approved.json +++ b/test/fixtures/squad-init-approved.json @@ -5,7 +5,7 @@ ".github/actions/squad-init/action.yml": { "gitBlob": "8c73caa756924de659f9cb3b90d8d43adfd56169", "sha256": "c759c5425c710db59a1a33f4a59f53117a2f2e25c1f0df4e41f27507afd82aa8", - "content": "# Composite action: install Squad from a standalone bundle and initialize a team.\n#\n# Installs the Squad CLI from a GitHub Release asset rather than npm, so this\n# works on runners that cannot reach registry.npmjs.org — self-hosted agents\n# behind a corporate firewall, locked-down build machines, air-gapped mirrors.\n#\n# This is the npm-free replacement for the `npx @bradygaster/squad-cli init`\n# step in the gh-aw activation job (see the limitation documented in #1587,\n# and the RFC in #1593).\n#\n# Usage:\n# - uses: bradygaster/squad/.github/actions/squad-init@\n# with:\n# version: 'v0.11.0' # default: latest release\n# preset: 'default' # default: default\n# state-backend: 'local' # default: local\n#\n# Every input is optional; the defaults match what the gh-aw shared component\n# runs today.\n\nname: 'Squad Init (npm-free)'\ndescription: 'Install Squad from a standalone release bundle and run squad init — no npm registry access required'\n\ninputs:\n version:\n description: 'Squad release tag to install (e.g. v0.11.0). Defaults to the latest release.'\n required: false\n default: 'latest'\n preset:\n description: 'Preset passed to squad init'\n required: false\n default: 'default'\n state-backend:\n description: 'State backend passed to squad init: local, or a backend supported by your Squad version'\n required: false\n default: 'local'\n install-prefix:\n description: 'Install prefix for the bundle. The launcher is linked into /bin.'\n required: false\n default: ''\n repository:\n description: 'Repository to download release assets from. Point this at an internal mirror when github.com is unreachable.'\n required: false\n default: 'bradygaster/squad'\n skip-init:\n description: 'Install the CLI but do not run squad init'\n required: false\n default: 'false'\n working-directory:\n description: 'Directory to run squad init in'\n required: false\n default: '.'\n\noutputs:\n squad-path:\n description: 'Absolute path to the installed squad launcher'\n value: ${{ steps.install.outputs.squad-path }}\n version:\n description: 'Squad version that was installed'\n value: ${{ steps.install.outputs.version }}\n\nruns:\n using: 'composite'\n steps:\n - name: Validate inputs\n shell: bash\n env:\n INPUT_VERSION: ${{ inputs.version }}\n INPUT_PRESET: ${{ inputs.preset }}\n INPUT_BACKEND: ${{ inputs.state-backend }}\n INPUT_REPO: ${{ inputs.repository }}\n INPUT_SKIP_INIT: ${{ inputs.skip-init }}\n run: |\n set -euo pipefail\n # These values reach a shell command below, so constrain them tightly.\n if ! echo \"${INPUT_VERSION}\" | LC_ALL=C grep -qE '^(latest|v?[0-9]+\\.[0-9]+\\.[0-9]+[A-Za-z0-9.-]*)$'; then\n echo \"::error::version must be 'latest' or a semver tag (e.g. v0.11.0)\"\n exit 1\n fi\n for pair in \"preset:${INPUT_PRESET}\" \"state-backend:${INPUT_BACKEND}\"; do\n name=\"${pair%%:*}\"; value=\"${pair#*:}\"\n if ! echo \"${value}\" | LC_ALL=C grep -qE '^[A-Za-z0-9_.-]+$'; then\n echo \"::error::${name} contains invalid characters (only alphanumeric, ., -, _ allowed)\"\n exit 1\n fi\n done\n if ! echo \"${INPUT_REPO}\" | LC_ALL=C grep -qE '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$'; then\n echo \"::error::repository must be in owner/repo form\"\n exit 1\n fi\n if [ \"${INPUT_SKIP_INIT}\" != \"true\" ] && [ \"${INPUT_SKIP_INIT}\" != \"false\" ]; then\n echo \"::error::skip-init must be 'true' or 'false'\"\n exit 1\n fi\n\n - name: Install Squad from release bundle\n id: install\n shell: bash\n env:\n INPUT_VERSION: ${{ inputs.version }}\n INPUT_PREFIX: ${{ inputs.install-prefix }}\n INPUT_REPO: ${{ inputs.repository }}\n ACTION_PATH: ${{ github.action_path }}\n run: |\n set -euo pipefail\n prefix=\"${INPUT_PREFIX:-${HOME}/.squad-standalone}\"\n\n # Run the installer that shipped with this action rather than fetching\n # it from a branch head. Consumers pin this action to a SHA, so the\n # installer is pinned with it — no unpinned remote code execution, and\n # no drift between the installer and the release it is installing.\n #\n # github.action_path is /.github/actions/squad-init when the\n # action is used from a repo reference, so the repo root is three\n # levels up. Resolve it explicitly and verify rather than trusting the\n # relative walk.\n repo_root=\"$(cd \"${ACTION_PATH}/../../..\" && pwd)\"\n installer=\"${repo_root}/scripts/install.sh\"\n if [ ! -f \"${installer}\" ]; then\n echo \"::error::install.sh not found at ${installer}. Resolved repo root '${repo_root}' from action path '${ACTION_PATH}'.\"\n exit 1\n fi\n\n VERSION=\"${INPUT_VERSION}\" PREFIX=\"${prefix}\" REPO=\"${INPUT_REPO}\" \\\n sh \"${installer}\"\n\n squad_bin=\"${prefix}/bin/squad\"\n if [ ! -x \"${squad_bin}\" ]; then\n echo \"::error::squad was not installed at ${squad_bin}\"\n exit 1\n fi\n\n echo \"${prefix}/bin\" >> \"${GITHUB_PATH}\"\n echo \"squad-path=${squad_bin}\" >> \"${GITHUB_OUTPUT}\"\n echo \"version=$(\"${squad_bin}\" --version)\" >> \"${GITHUB_OUTPUT}\"\n\n - name: Verify no npm registry dependency\n shell: bash\n env:\n SQUAD_BIN: ${{ steps.install.outputs.squad-path }}\n run: |\n set -euo pipefail\n # The whole point of this action is that the installed CLI runs without\n # the npm registry. Prove the binary is self-contained before we rely\n # on it, rather than discovering it mid-init.\n \"${SQUAD_BIN}\" --version > /dev/null\n echo \"Squad $(\"${SQUAD_BIN}\" --version) installed and runnable without npm\"\n\n - name: Run squad init\n if: inputs.skip-init != 'true'\n shell: bash\n working-directory: ${{ inputs.working-directory }}\n env:\n SQUAD_BIN: ${{ steps.install.outputs.squad-path }}\n INPUT_PRESET: ${{ inputs.preset }}\n INPUT_BACKEND: ${{ inputs.state-backend }}\n run: |\n set -euo pipefail\n \"${SQUAD_BIN}\" init --preset \"${INPUT_PRESET}\" --state-backend \"${INPUT_BACKEND}\"\n\n - name: Verify npm-free MCP wiring\n if: inputs.skip-init != 'true'\n shell: bash\n working-directory: ${{ inputs.working-directory }}\n env:\n SQUAD_VERSION: ${{ steps.install.outputs.version }}\n run: |\n set -euo pipefail\n if [ ! -f .squad/team.md ]; then\n echo \"::error::squad init completed but .squad/team.md is missing\"\n exit 1\n fi\n\n # An npx-based squad_state entry is unrunnable on the firewalled\n # runners this action exists for, and it fails at Copilot start rather\n # than here — so fail the build now instead of warning.\n if [ -f .mcp.json ] && grep -q '\"npx\"' .mcp.json; then\n echo \"::error::.mcp.json references npx — squad_state will not start without npm registry access. Expected the standalone launcher path.\"\n cat .mcp.json\n exit 1\n fi\n\n {\n echo \"### Squad ${SQUAD_VERSION} initialized\"\n echo \"\"\n echo \"Installed from a standalone release bundle — no npm registry access used.\"\n echo \"\"\n echo \"\\`.mcp.json\\` points at the bundled launcher (no npx).\"\n } >> \"${GITHUB_STEP_SUMMARY}\"\n" + "content": "# Composite action: install Squad from a standalone bundle and initialize a team.\n#\n# Installs the Squad CLI from a GitHub Release asset rather than npm, so this\n# works on runners that cannot reach registry.npmjs.org — self-hosted agents\n# behind a corporate firewall, locked-down build machines, air-gapped mirrors.\n#\n# This is the npm-free replacement for the `npx @squad/cli init`\n# step in the gh-aw activation job (see the limitation documented in #1587,\n# and the RFC in #1593).\n#\n# Usage:\n# - uses: bradygaster/squad/.github/actions/squad-init@\n# with:\n# version: 'v0.11.0' # default: latest release\n# preset: 'default' # default: default\n# state-backend: 'local' # default: local\n#\n# Every input is optional; the defaults match what the gh-aw shared component\n# runs today.\n\nname: 'Squad Init (npm-free)'\ndescription: 'Install Squad from a standalone release bundle and run squad init — no npm registry access required'\n\ninputs:\n version:\n description: 'Squad release tag to install (e.g. v0.11.0). Defaults to the latest release.'\n required: false\n default: 'latest'\n preset:\n description: 'Preset passed to squad init'\n required: false\n default: 'default'\n state-backend:\n description: 'State backend passed to squad init: local, or a backend supported by your Squad version'\n required: false\n default: 'local'\n install-prefix:\n description: 'Install prefix for the bundle. The launcher is linked into /bin.'\n required: false\n default: ''\n repository:\n description: 'Repository to download release assets from. Point this at an internal mirror when github.com is unreachable.'\n required: false\n default: 'bradygaster/squad'\n skip-init:\n description: 'Install the CLI but do not run squad init'\n required: false\n default: 'false'\n working-directory:\n description: 'Directory to run squad init in'\n required: false\n default: '.'\n\noutputs:\n squad-path:\n description: 'Absolute path to the installed squad launcher'\n value: ${{ steps.install.outputs.squad-path }}\n version:\n description: 'Squad version that was installed'\n value: ${{ steps.install.outputs.version }}\n\nruns:\n using: 'composite'\n steps:\n - name: Validate inputs\n shell: bash\n env:\n INPUT_VERSION: ${{ inputs.version }}\n INPUT_PRESET: ${{ inputs.preset }}\n INPUT_BACKEND: ${{ inputs.state-backend }}\n INPUT_REPO: ${{ inputs.repository }}\n INPUT_SKIP_INIT: ${{ inputs.skip-init }}\n run: |\n set -euo pipefail\n # These values reach a shell command below, so constrain them tightly.\n if ! echo \"${INPUT_VERSION}\" | LC_ALL=C grep -qE '^(latest|v?[0-9]+\\.[0-9]+\\.[0-9]+[A-Za-z0-9.-]*)$'; then\n echo \"::error::version must be 'latest' or a semver tag (e.g. v0.11.0)\"\n exit 1\n fi\n for pair in \"preset:${INPUT_PRESET}\" \"state-backend:${INPUT_BACKEND}\"; do\n name=\"${pair%%:*}\"; value=\"${pair#*:}\"\n if ! echo \"${value}\" | LC_ALL=C grep -qE '^[A-Za-z0-9_.-]+$'; then\n echo \"::error::${name} contains invalid characters (only alphanumeric, ., -, _ allowed)\"\n exit 1\n fi\n done\n if ! echo \"${INPUT_REPO}\" | LC_ALL=C grep -qE '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$'; then\n echo \"::error::repository must be in owner/repo form\"\n exit 1\n fi\n if [ \"${INPUT_SKIP_INIT}\" != \"true\" ] && [ \"${INPUT_SKIP_INIT}\" != \"false\" ]; then\n echo \"::error::skip-init must be 'true' or 'false'\"\n exit 1\n fi\n\n - name: Install Squad from release bundle\n id: install\n shell: bash\n env:\n INPUT_VERSION: ${{ inputs.version }}\n INPUT_PREFIX: ${{ inputs.install-prefix }}\n INPUT_REPO: ${{ inputs.repository }}\n ACTION_PATH: ${{ github.action_path }}\n run: |\n set -euo pipefail\n prefix=\"${INPUT_PREFIX:-${HOME}/.squad-standalone}\"\n\n # Run the installer that shipped with this action rather than fetching\n # it from a branch head. Consumers pin this action to a SHA, so the\n # installer is pinned with it — no unpinned remote code execution, and\n # no drift between the installer and the release it is installing.\n #\n # github.action_path is /.github/actions/squad-init when the\n # action is used from a repo reference, so the repo root is three\n # levels up. Resolve it explicitly and verify rather than trusting the\n # relative walk.\n repo_root=\"$(cd \"${ACTION_PATH}/../../..\" && pwd)\"\n installer=\"${repo_root}/scripts/install.sh\"\n if [ ! -f \"${installer}\" ]; then\n echo \"::error::install.sh not found at ${installer}. Resolved repo root '${repo_root}' from action path '${ACTION_PATH}'.\"\n exit 1\n fi\n\n VERSION=\"${INPUT_VERSION}\" PREFIX=\"${prefix}\" REPO=\"${INPUT_REPO}\" \\\n sh \"${installer}\"\n\n squad_bin=\"${prefix}/bin/squad\"\n if [ ! -x \"${squad_bin}\" ]; then\n echo \"::error::squad was not installed at ${squad_bin}\"\n exit 1\n fi\n\n echo \"${prefix}/bin\" >> \"${GITHUB_PATH}\"\n echo \"squad-path=${squad_bin}\" >> \"${GITHUB_OUTPUT}\"\n echo \"version=$(\"${squad_bin}\" --version)\" >> \"${GITHUB_OUTPUT}\"\n\n - name: Verify no npm registry dependency\n shell: bash\n env:\n SQUAD_BIN: ${{ steps.install.outputs.squad-path }}\n run: |\n set -euo pipefail\n # The whole point of this action is that the installed CLI runs without\n # the npm registry. Prove the binary is self-contained before we rely\n # on it, rather than discovering it mid-init.\n \"${SQUAD_BIN}\" --version > /dev/null\n echo \"Squad $(\"${SQUAD_BIN}\" --version) installed and runnable without npm\"\n\n - name: Run squad init\n if: inputs.skip-init != 'true'\n shell: bash\n working-directory: ${{ inputs.working-directory }}\n env:\n SQUAD_BIN: ${{ steps.install.outputs.squad-path }}\n INPUT_PRESET: ${{ inputs.preset }}\n INPUT_BACKEND: ${{ inputs.state-backend }}\n run: |\n set -euo pipefail\n \"${SQUAD_BIN}\" init --preset \"${INPUT_PRESET}\" --state-backend \"${INPUT_BACKEND}\"\n\n - name: Verify npm-free MCP wiring\n if: inputs.skip-init != 'true'\n shell: bash\n working-directory: ${{ inputs.working-directory }}\n env:\n SQUAD_VERSION: ${{ steps.install.outputs.version }}\n run: |\n set -euo pipefail\n if [ ! -f .squad/team.md ]; then\n echo \"::error::squad init completed but .squad/team.md is missing\"\n exit 1\n fi\n\n # An npx-based squad_state entry is unrunnable on the firewalled\n # runners this action exists for, and it fails at Copilot start rather\n # than here — so fail the build now instead of warning.\n if [ -f .mcp.json ] && grep -q '\"npx\"' .mcp.json; then\n echo \"::error::.mcp.json references npx — squad_state will not start without npm registry access. Expected the standalone launcher path.\"\n cat .mcp.json\n exit 1\n fi\n\n {\n echo \"### Squad ${SQUAD_VERSION} initialized\"\n echo \"\"\n echo \"Installed from a standalone release bundle — no npm registry access used.\"\n echo \"\"\n echo \"\\`.mcp.json\\` points at the bundled launcher (no npx).\"\n } >> \"${GITHUB_STEP_SUMMARY}\"\n" }, "scripts/install.sh": { "gitBlob": "4376697dd5993917a9342754a42a683e8d96d0dc", diff --git a/test/gh-aw-enlistment-skill.test.ts b/test/gh-aw-enlistment-skill.test.ts index a72d52fd7..fde411ac1 100644 --- a/test/gh-aw-enlistment-skill.test.ts +++ b/test/gh-aw-enlistment-skill.test.ts @@ -23,7 +23,7 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, write import { execFileSync, spawnSync } from 'node:child_process'; import { resolve, dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { parseSkillFile } from '@bradygaster/squad-sdk/skills'; +import { parseSkillFile } from '@squad/sdk/skills'; import { LEGACY_OWNERSHIP_DESTINATIONS, LEGACY_PACKAGE_NAMES, diff --git a/test/gh-aw-quality.test.ts b/test/gh-aw-quality.test.ts index 179e8f681..aa389d92e 100644 --- a/test/gh-aw-quality.test.ts +++ b/test/gh-aw-quality.test.ts @@ -1954,7 +1954,7 @@ describe('gh-aw: compiled workflow shell input security contract', () => { expect(compiled).toContain('SQUAD_CLI_VERSION: ${{ steps.squad-cli.outputs.version }}'); expect(compiled).toContain('squad health --json'); expect(compiled).not.toContain('npm install --global'); - expect(compiled).not.toContain('npx --yes "@bradygaster/squad-cli@'); + expect(compiled).not.toContain('npx --yes "@squad/cli@'); }, 20000); it('emits no attacker-controlled event text in any compiled run: block', () => { @@ -3622,7 +3622,7 @@ describe('gh-aw: shared bootstrap health-before-dispatch contract (#1605)', () = expect(sharedContent).not.toContain('squad-release'); expect(sharedContent).toContain('SQUAD_CLI_VERSION: ${{ steps.squad-cli.outputs.version }}'); expect(sharedContent).not.toContain('npm install --global'); - expect(sharedContent).not.toContain('npx --yes "@bradygaster/squad-cli@'); + expect(sharedContent).not.toContain('npx --yes "@squad/cli@'); }); it('continue-on-error on the restore step does not shield health failure from stopping dispatch', () => { diff --git a/test/helpers/claim-provider-contract.ts b/test/helpers/claim-provider-contract.ts index 4630d8985..00c9aedc6 100644 --- a/test/helpers/claim-provider-contract.ts +++ b/test/helpers/claim-provider-contract.ts @@ -22,7 +22,7 @@ import type { ExecutorIdentity, WorkClaimProvider, WorkKey, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; export interface ClaimProviderHarness { /** A provider acting as `identity`. All providers from one harness share one backend. */ diff --git a/test/history-shadow.test.ts b/test/history-shadow.test.ts index ccb0651dd..f2ddf8c0b 100644 --- a/test/history-shadow.test.ts +++ b/test/history-shadow.test.ts @@ -17,7 +17,7 @@ import { readHistory, deleteHistoryShadow, shadowExists, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; let tmpDir: string; diff --git a/test/hooks-security.test.ts b/test/hooks-security.test.ts index 59193fce4..5752f7383 100644 --- a/test/hooks-security.test.ts +++ b/test/hooks-security.test.ts @@ -13,7 +13,7 @@ import { PolicyConfig, PreToolUseContext, PostToolUseContext, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; describe('Secret Leak Mitigation (Issue #267)', () => { describe('A. .env File Read Blocking (PreToolUseHook)', () => { @@ -233,7 +233,7 @@ describe('Secret Leak Mitigation (Issue #267)', () => { // Placeholder test to document expected API it('should export scanFileForSecrets utility', () => { // TODO: Uncomment when implemented - // const { scanFileForSecrets } = await import('@bradygaster/squad-sdk/hooks'); + // const { scanFileForSecrets } = await import('@squad/sdk/hooks'); // expect(typeof scanFileForSecrets).toBe('function'); expect(true).toBe(true); // Placeholder }); diff --git a/test/hooks.test.ts b/test/hooks.test.ts index 5b62bff23..fdcca21f1 100644 --- a/test/hooks.test.ts +++ b/test/hooks.test.ts @@ -10,7 +10,7 @@ import { PreToolUseContext, PostToolUseContext, DEFAULT_BLOCKED_COMMANDS, -} from '@bradygaster/squad-sdk/hooks'; +} from '@squad/sdk/hooks'; describe('HookPipeline', () => { describe('File-write guard', () => { diff --git a/test/i18n.test.ts b/test/i18n.test.ts index 6a613ac06..769c8be92 100644 --- a/test/i18n.test.ts +++ b/test/i18n.test.ts @@ -9,8 +9,8 @@ import { auditAccessibility, type MessageCatalog, type AccessibilityReport, -} from '@bradygaster/squad-sdk/runtime/i18n'; -import type { SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/runtime/i18n'; +import type { SquadConfig } from '@squad/sdk/config'; function makeConfig(overrides: Partial = {}): SquadConfig { return { diff --git a/test/init-scaffolding.test.ts b/test/init-scaffolding.test.ts index 97d84aefc..2c244f53b 100644 --- a/test/init-scaffolding.test.ts +++ b/test/init-scaffolding.test.ts @@ -13,12 +13,12 @@ import { existsSync } from 'fs'; import { tmpdir } from 'os'; import { randomBytes } from 'crypto'; import { execFileSync } from 'child_process'; -import { initSquad } from '@bradygaster/squad-sdk'; -import type { InitOptions } from '@bradygaster/squad-sdk'; -import { parseAgentProvenanceRegistry } from '@bradygaster/squad-sdk/casting'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runDoctor } from '@bradygaster/squad-cli/commands/doctor'; -import type { DoctorCheck } from '@bradygaster/squad-cli/commands/doctor'; +import { initSquad } from '@squad/sdk'; +import type { InitOptions } from '@squad/sdk'; +import { parseAgentProvenanceRegistry } from '@squad/sdk/casting'; +import { runInit } from '@squad/cli/core/init'; +import { runDoctor } from '@squad/cli/commands/doctor'; +import type { DoctorCheck } from '@squad/cli/commands/doctor'; // Sandbox lives in the OS temp dir, NOT inside the repository (#1796). // runInit()/initSquad() walk upward to find the enclosing git root when the @@ -420,7 +420,7 @@ describe('squad.agent.md template handling (#730)', () => { }); it('initSquad stamps only the greeting placeholder or a valid SemVer literal', async () => { - const { FSStorageProvider } = await import('@bradygaster/squad-sdk'); + const { FSStorageProvider } = await import('@squad/sdk'); const realStorage = new FSStorageProvider(); const version = '2.3.4-beta.1+build.7'; const preservedText = [ @@ -463,7 +463,7 @@ describe('squad.agent.md template handling (#730)', () => { }); it('initSquad returns warning when squad.agent.md template is missing', async () => { - const { FSStorageProvider } = await import('@bradygaster/squad-sdk'); + const { FSStorageProvider } = await import('@squad/sdk'); const realStorage = new FSStorageProvider(); // Create a proxy storage that hides squad.agent.md.template diff --git a/test/init-sdk.test.ts b/test/init-sdk.test.ts index 1aa57e4ee..b9f5942f3 100644 --- a/test/init-sdk.test.ts +++ b/test/init-sdk.test.ts @@ -80,8 +80,8 @@ describe('squad init --sdk flag', () => { // Assert: file contains 'defineAgent' expect(configContent).toContain('defineAgent'); - // Assert: file imports from '@bradygaster/squad-sdk' - expect(configContent).toContain('@bradygaster/squad-sdk'); + // Assert: file imports from '@squad/sdk' + expect(configContent).toContain('@squad/sdk'); // Assert: .squad/ directory also created expect(existsSync(join(tempDir, '.squad'))).toBe(true); @@ -276,7 +276,7 @@ describe('squad init --sdk flag', () => { // Should import useRole expect(configContent).toContain('useRole'); - expect(configContent).toContain('@bradygaster/squad-sdk'); + expect(configContent).toContain('@squad/sdk'); // Should have useRole() calls for starter team expect(configContent).toMatch(/useRole\s*\(\s*'lead'/); diff --git a/test/init.test.ts b/test/init.test.ts index cac06e0ab..68290c721 100644 --- a/test/init.test.ts +++ b/test/init.test.ts @@ -9,10 +9,10 @@ import { mkdir, mkdtemp, rm, readFile, writeFile } from 'fs/promises'; import { join } from 'path'; import { existsSync } from 'fs'; import { tmpdir } from 'node:os'; -import { initSquad, MANIFEST_SKILL_NAMES } from '@bradygaster/squad-sdk/config'; -import { onboardAgent, addAgentToConfig } from '@bradygaster/squad-sdk/agents'; -import type { InitOptions, InitAgentSpec } from '@bradygaster/squad-sdk/config'; -import type { OnboardOptions } from '@bradygaster/squad-sdk/agents'; +import { initSquad, MANIFEST_SKILL_NAMES } from '@squad/sdk/config'; +import { onboardAgent, addAgentToConfig } from '@squad/sdk/agents'; +import type { InitOptions, InitAgentSpec } from '@squad/sdk/config'; +import type { OnboardOptions } from '@squad/sdk/agents'; let TEST_ROOT: string; diff --git a/test/install.test.ts b/test/install.test.ts index 348b62a85..c12f89fe9 100644 --- a/test/install.test.ts +++ b/test/install.test.ts @@ -9,19 +9,19 @@ import { validatePipelineConfig, getDefaultSteps, type CIPipelineConfig, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; import { parseConventionalCommit, bumpVersion, stampVersion, generateChangelog, type CommitInfo, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; import { detectInstallMethod, migrateInstallPath, generateMigrationInstructions, -} from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; // --- Helpers --- diff --git a/test/integration.test.ts b/test/integration.test.ts index 62779c3aa..c12d81e9c 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -10,18 +10,18 @@ */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; -import { ToolRegistry, defineTool, type RouteRequest, type DecisionRecord, type MemoryEntry } from '@bradygaster/squad-sdk/tools'; +import { ToolRegistry, defineTool, type RouteRequest, type DecisionRecord, type MemoryEntry } from '@squad/sdk/tools'; import { HookPipeline, ReviewerLockoutHook, PolicyConfig, PreToolUseContext, PostToolUseContext, -} from '@bradygaster/squad-sdk/hooks'; -import { compileCharter, type CharterCompileOptions } from '@bradygaster/squad-sdk/agents'; -import { resolveModel, type ModelResolutionOptions, type TaskType } from '@bradygaster/squad-sdk/agents'; -import { EventBus, type SquadEvent } from '@bradygaster/squad-sdk/runtime/event-bus'; -import { SquadClient } from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/hooks'; +import { compileCharter, type CharterCompileOptions } from '@squad/sdk/agents'; +import { resolveModel, type ModelResolutionOptions, type TaskType } from '@squad/sdk/agents'; +import { EventBus, type SquadEvent } from '@squad/sdk/runtime/event-bus'; +import { SquadClient } from '@squad/sdk/client'; import { SquadError, ErrorFactory, @@ -29,7 +29,7 @@ import { ErrorSeverity, TelemetryCollector, RateLimitError, -} from '@bradygaster/squad-sdk/adapter/errors'; +} from '@squad/sdk/adapter/errors'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { randomUUID } from 'node:crypto'; diff --git a/test/launcher-argv.test.ts b/test/launcher-argv.test.ts index b18adb1c4..5f55c15f8 100644 --- a/test/launcher-argv.test.ts +++ b/test/launcher-argv.test.ts @@ -14,10 +14,10 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import { spawnSync } from 'node:child_process'; -import { squadRepoLauncher } from '@bradygaster/squad-sdk/client'; +import { squadRepoLauncher } from '@squad/sdk/client'; const win = process.platform === 'win32'; -const PKG = ['@bradygaster', 'squad-cli']; +const PKG = ['@squad', 'cli']; /** Arguments cmd.exe or a shell would rewrite, split or expand. */ const HOSTILE = [ diff --git a/test/lifecycle.test.ts b/test/lifecycle.test.ts index fd3fa2e10..b4a4768ec 100644 --- a/test/lifecycle.test.ts +++ b/test/lifecycle.test.ts @@ -15,10 +15,10 @@ import { readHistory, shadowExists, deleteHistoryShadow, -} from '@bradygaster/squad-sdk/agents'; -import { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; -import { MODELS } from '@bradygaster/squad-sdk'; +} from '@squad/sdk/agents'; +import { SquadClientWithPool } from '@squad/sdk/client'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; +import { MODELS } from '@squad/sdk'; describe('Agent Lifecycle Manager', () => { let tempDir: string; diff --git a/test/marketplace-advanced.test.ts b/test/marketplace-advanced.test.ts index 26c79a5a5..2b09b56a6 100644 --- a/test/marketplace-advanced.test.ts +++ b/test/marketplace-advanced.test.ts @@ -4,9 +4,9 @@ */ import { describe, it, expect, beforeEach } from 'vitest'; -import type { SquadConfig } from '@bradygaster/squad-sdk/config'; -import type { MarketplaceManifest } from '@bradygaster/squad-sdk/marketplace'; -import { ManifestCategory } from '@bradygaster/squad-sdk/marketplace'; +import type { SquadConfig } from '@squad/sdk/config'; +import type { MarketplaceManifest } from '@squad/sdk/marketplace'; +import { ManifestCategory } from '@squad/sdk/marketplace'; import { searchMarketplace, validateEntry, @@ -14,21 +14,21 @@ import { type MarketplaceEntry, type MarketplaceIndex, type MarketplaceSearchQuery, -} from '@bradygaster/squad-sdk/marketplace'; +} from '@squad/sdk/marketplace'; import { MarketplaceBrowser, formatEntryList, formatEntryDetails, type MarketplaceFetcher, -} from '@bradygaster/squad-sdk/marketplace'; -import { MarketplaceBackend } from '@bradygaster/squad-sdk/marketplace'; +} from '@squad/sdk/marketplace'; +import { MarketplaceBackend } from '@squad/sdk/marketplace'; import { validateRemoteAgent, quarantineAgent, generateSecurityReport, SECURITY_RULES, type RemoteAgentDefinition, -} from '@bradygaster/squad-sdk/marketplace'; +} from '@squad/sdk/marketplace'; // --- Helpers --- diff --git a/test/marketplace-integration.test.ts b/test/marketplace-integration.test.ts index d1c75bea3..d9a989265 100644 --- a/test/marketplace-integration.test.ts +++ b/test/marketplace-integration.test.ts @@ -9,8 +9,8 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { randomUUID } from 'node:crypto'; -import type { SquadConfig, AgentConfig } from '@bradygaster/squad-sdk/config'; -import { defineConfig, validateConfig } from '@bradygaster/squad-sdk/config'; +import type { SquadConfig, AgentConfig } from '@squad/sdk/config'; +import { defineConfig, validateConfig } from '@squad/sdk/config'; import { ManifestCategory, validateManifest, @@ -23,7 +23,7 @@ import { validatePackageContents, type MarketplaceManifest, type ExtensionEvent, -} from '@bradygaster/squad-sdk/marketplace'; +} from '@squad/sdk/marketplace'; import { LocalAgentSource, GitHubAgentSource, @@ -33,8 +33,8 @@ import { type AgentManifest, type AgentDefinition, type GitHubFetcher, -} from '@bradygaster/squad-sdk/config'; -import { SkillRegistry, type SkillDefinition } from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/config'; +import { SkillRegistry, type SkillDefinition } from '@squad/sdk/skills'; // ─── Helpers ──────────────────────────────────────────────────────────────── diff --git a/test/marketplace.test.ts b/test/marketplace.test.ts index d940b61d2..051320d10 100644 --- a/test/marketplace.test.ts +++ b/test/marketplace.test.ts @@ -18,8 +18,8 @@ import { validatePackageContents, type MarketplaceManifest, type ExtensionEvent, -} from '@bradygaster/squad-sdk/marketplace'; -import type { SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/marketplace'; +import type { SquadConfig } from '@squad/sdk/config'; // --- Helpers --- diff --git a/test/mcp-root-write.test.ts b/test/mcp-root-write.test.ts index d0eabf2c8..764c32a1a 100644 --- a/test/mcp-root-write.test.ts +++ b/test/mcp-root-write.test.ts @@ -33,7 +33,7 @@ import type { SquadStateMcpSpec } from '../packages/squad-cli/src/cli/core/mcp-s const PINNED_SPEC: SquadStateMcpSpec = { source: 'pinned', command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.9.6-preview.14', 'state-mcp'], + args: ['-y', '@squad/cli@0.9.6-preview.14', 'state-mcp'], }; function legacySimpleHash(input: string): string { @@ -137,7 +137,7 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { squad_state: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.0.1-old', 'state-mcp'], + args: ['-y', '@squad/cli@0.0.1-old', 'state-mcp'], env: { npm_config_registry: 'https://internal-proxy.example/npm/', npm_config_allow_remote: 'all', @@ -296,17 +296,17 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { [key]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], env: {}, tools: ['*'], }, ...Object.fromEntries(legacyKeys.map(legacyKey => [legacyKey, { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.9.6', 'state-mcp'], + args: ['-y', '@squad/cli@0.9.6', 'state-mcp'], }])), [otherKey]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, custom: { command: 'custom-mcp', args: [] }, }, @@ -343,11 +343,11 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { [legacyKey]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, [unrelatedKey]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, }, }, null, 2) + '\n'); @@ -380,11 +380,11 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { [legacyKey]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, [unrelatedKey]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, }, }, null, 2) + '\n'); @@ -427,7 +427,7 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { [key]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, }, }, null, 2) + '\n'; @@ -453,7 +453,7 @@ describe('iter-8 mcp-root: repo-root .mcp.json writer + project tombstone', () = mcpServers: { [key]: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.10.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.10.0', 'state-mcp'], }, custom: { command: 'custom-mcp', args: [] }, }, diff --git a/test/mcp-spec-init.test.ts b/test/mcp-spec-init.test.ts index 252195506..e13fefa14 100644 --- a/test/mcp-spec-init.test.ts +++ b/test/mcp-spec-init.test.ts @@ -40,7 +40,7 @@ describe('resolveSquadStateMcpSpec', () => { expect(spec.command).toBe('npx'); expect(spec.args).toEqual([ '-y', - '@bradygaster/squad-cli@0.9.6-preview.42', + '@squad/cli@0.9.6-preview.42', 'state-mcp', ]); }); @@ -51,11 +51,11 @@ describe('resolveSquadStateMcpSpec', () => { localEntryCheck: () => null, }); expect(spec.source).toBe('pinned'); - expect(spec.args[1]).toBe('@bradygaster/squad-cli@0.0.0'); + expect(spec.args[1]).toBe('@squad/cli@0.0.0'); }); it('uses the installed cli entry directly without npx or cmd wrappers', async () => { - const entry = path.resolve('node_modules/@bradygaster/squad-cli/dist/cli-entry.js'); + const entry = path.resolve('node_modules/@squad/cli/dist/cli-entry.js'); const spec = await resolveSquadStateMcpSpec('2.0.0-preview.1', { standaloneCheck: () => null, localEntryCheck: () => entry, @@ -66,7 +66,7 @@ describe('resolveSquadStateMcpSpec', () => { source: 'local-entry', fallback: { command: 'npx', - args: ['-y', '@bradygaster/squad-cli@2.0.0-preview.1', 'state-mcp'], + args: ['-y', '@squad/cli@2.0.0-preview.1', 'state-mcp'], }, }); }); @@ -186,9 +186,9 @@ describe('project MCP launch portability', () => { expect(projectSquadStateMcpSpec(local, platform)).toEqual(local); expect(local.command).toBe('C:\\example\\bundle\\squad.exe'); expect(projectSquadStateMcpSpec({ - command: 'npx', args: ['-y', '@bradygaster/squad-cli@1.0.1', 'state-mcp'], source: 'pinned', + command: 'npx', args: ['-y', '@squad/cli@1.0.1', 'state-mcp'], source: 'pinned', }, platform)).toEqual({ - command: 'npx', args: ['-y', '@bradygaster/squad-cli@1.0.1', 'state-mcp'], source: 'pinned', + command: 'npx', args: ['-y', '@squad/cli@1.0.1', 'state-mcp'], source: 'pinned', }); }); diff --git a/test/migrate.test.ts b/test/migrate.test.ts index 6ce425dc4..b8ba570d3 100644 --- a/test/migrate.test.ts +++ b/test/migrate.test.ts @@ -91,7 +91,7 @@ describe('squad migrate', () => { async function createSdkSquad(targetDir: string) { await createMarkdownSquad(targetDir); - const configTs = `import { defineSquad, defineTeam, defineAgent } from '@bradygaster/squad-sdk'; + const configTs = `import { defineSquad, defineTeam, defineAgent } from '@squad/sdk'; export default defineSquad({ team: defineTeam({ diff --git a/test/migration.test.ts b/test/migration.test.ts index b095567b8..884d53044 100644 --- a/test/migration.test.ts +++ b/test/migration.test.ts @@ -4,7 +4,7 @@ import { parseSemVer, compareSemVer, type Migration, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { parseTeamMarkdown, parseRoutingRulesMarkdown, @@ -12,7 +12,7 @@ import { migrateMarkdownToConfig, generateConfigFromParsed, type MarkdownParseResult, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // ============================================================================ // Migration Registry diff --git a/test/migrations.test.ts b/test/migrations.test.ts index 5268d2f2c..78248c797 100644 --- a/test/migrations.test.ts +++ b/test/migrations.test.ts @@ -4,7 +4,7 @@ import { migration_0_5_to_0_6, getRegisteredMigrations, createDefaultRegistry, -} from '@bradygaster/squad-sdk/config/migrations'; +} from '@squad/sdk/config/migrations'; // ============================================================================ // getRegisteredMigrations diff --git a/test/model-fallback.test.ts b/test/model-fallback.test.ts index 1e4d4e1d8..99c344dd2 100644 --- a/test/model-fallback.test.ts +++ b/test/model-fallback.test.ts @@ -12,13 +12,13 @@ import { ModelRegistry, MODEL_CATALOG, DEFAULT_FALLBACK_CHAINS, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { resolveAgentModel, ModelFallbackExecutor, type ModelResolutionOptions, -} from '@bradygaster/squad-sdk/agents'; -import { MODELS } from '@bradygaster/squad-sdk/runtime/constants'; +} from '@squad/sdk/agents'; +import { MODELS } from '@squad/sdk/runtime/constants'; // ============================================================================ // Cross-tier fallback: standard chain tries all models in order diff --git a/test/model-hydrafusion.test.ts b/test/model-hydrafusion.test.ts index daeec109d..9eed94376 100644 --- a/test/model-hydrafusion.test.ts +++ b/test/model-hydrafusion.test.ts @@ -25,7 +25,7 @@ import { readModelProfile, writeModelProfile, resolveModel as adapterResolveModel, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { resolveAgentModel, buildCatalogCategoryMap, @@ -34,10 +34,10 @@ import { AgentLifecycleManager, type ModelResolutionOptions, type TaskType, -} from '@bradygaster/squad-sdk/agents'; -import { MODELS } from '@bradygaster/squad-sdk/runtime/constants'; -import type { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +} from '@squad/sdk/agents'; +import { MODELS } from '@squad/sdk/runtime/constants'; +import type { SquadClientWithPool } from '@squad/sdk/client'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; const HF = 'hydrafusion'; const HF_MAX = 'hydrafusion-max'; diff --git a/test/model-preference.test.ts b/test/model-preference.test.ts index 081158248..a07e65c36 100644 --- a/test/model-preference.test.ts +++ b/test/model-preference.test.ts @@ -32,7 +32,7 @@ import { clampContextTier, CATEGORY_ORDER, type GitHubModelCategory, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { resolveAgentModel, resolveModel as centralResolveModel, @@ -40,8 +40,8 @@ import { buildCatalogCategoryMap, type ModelResolutionOptions, type ResolvedModel, -} from '@bradygaster/squad-sdk/agents'; -import { MODELS } from '@bradygaster/squad-sdk'; +} from '@squad/sdk/agents'; +import { MODELS } from '@squad/sdk'; // Temp directory for each test let squadDir: string; @@ -1252,14 +1252,14 @@ describe('legacy config resolveModel delegates to the central resolver (#1720)', }); describe('documented resolver entry point (#1720)', () => { - it('@bradygaster/squad-sdk/agents exports resolveAgentModel as the same function as its resolveModel', () => { - expect(typeof resolveAgentModel, '@bradygaster/squad-sdk/agents must export resolveAgentModel').toBe('function'); + it('@squad/sdk/agents exports resolveAgentModel as the same function as its resolveModel', () => { + expect(typeof resolveAgentModel, '@squad/sdk/agents must export resolveAgentModel').toBe('function'); expect(resolveAgentModel, 'resolveAgentModel must be an alias of the agents resolveModel, not a fork').toBe(centralResolveModel); }); it('model-selection-reference names the subpath that exports resolveAgentModel with provenance', async () => { const reference = readFileSync(join(import.meta.dirname, '..', '.squad-templates', 'model-selection-reference.md'), 'utf8'); - const match = reference.match(/`resolveAgentModel` (?:from|in) `(@bradygaster\/squad-sdk[^`]*)`/); + const match = reference.match(/`resolveAgentModel` (?:from|in) `(@squad\/sdk[^`]*)`/); expect(match, 'model-selection-reference.md must name the module that exports resolveAgentModel').toBeTruthy(); const mod = (await import(match![1]!)) as { resolveAgentModel?: (o: unknown) => unknown }; expect(typeof mod.resolveAgentModel, `${match![1]} must export resolveAgentModel`).toBe('function'); diff --git a/test/model-quality-profiles.test.ts b/test/model-quality-profiles.test.ts index 5593d73fc..d938ba222 100644 --- a/test/model-quality-profiles.test.ts +++ b/test/model-quality-profiles.test.ts @@ -22,17 +22,17 @@ import { resolveModel as adapterResolveModel, readModelProfile, writeModelProfile, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; import { resolveAgentModel, buildCatalogCategoryMap, AgentLifecycleManager, type ModelResolutionOptions, type TaskType, -} from '@bradygaster/squad-sdk/agents'; -import { MODELS } from '@bradygaster/squad-sdk/runtime/constants'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; -import type { SquadClientWithPool } from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/agents'; +import { MODELS } from '@squad/sdk/runtime/constants'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; +import type { SquadClientWithPool } from '@squad/sdk/client'; const STALE_IDS = ['claude-opus-4.7', 'claude-opus-4.6', 'claude-sonnet-4.6', 'claude-sonnet-4.5', 'gemini-3.1-pro']; const NEVER_RECOMMENDED = ['gpt-5.6-sol-fast', 'hydrafusion', 'hydrafusion-max']; diff --git a/test/model-selector-policy.test.ts b/test/model-selector-policy.test.ts index 6cf7b35fa..e82b24e23 100644 --- a/test/model-selector-policy.test.ts +++ b/test/model-selector-policy.test.ts @@ -18,8 +18,8 @@ import { pruneChainToCeiling, ModelFallbackExecutor, type ResolvedModel, -} from '@bradygaster/squad-sdk/agents'; -import type { GitHubModelCategory } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/agents'; +import type { GitHubModelCategory } from '@squad/sdk/config'; describe('cost policy — resolveModel integration', () => { it('AC5: implicit over-ceiling selection is downgraded deterministically', () => { diff --git a/test/models-refresh.test.ts b/test/models-refresh.test.ts index ab754d57b..d90759174 100644 --- a/test/models-refresh.test.ts +++ b/test/models-refresh.test.ts @@ -17,7 +17,7 @@ import { normalizeDisplayName, type RefreshDeps, } from '../packages/squad-cli/src/cli/commands/models.js'; -import type { ModelInfo } from '@bradygaster/squad-sdk/config'; +import type { ModelInfo } from '@squad/sdk/config'; const SEED: ModelInfo[] = [ { id: 'claude-sonnet-4.6', tier: 'standard', provider: 'anthropic', family: 'claude', githubCategory: 'versatile' }, diff --git a/test/models.test.ts b/test/models.test.ts index 2c976d841..6d386b88a 100644 --- a/test/models.test.ts +++ b/test/models.test.ts @@ -10,7 +10,7 @@ import { getModelInfo, getFallbackChain, isModelAvailable -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; describe('MODEL_CATALOG', () => { it('contains all model tiers', () => { diff --git a/test/npm-registry-fallback.test.ts b/test/npm-registry-fallback.test.ts index 5e37b2e07..640d8344b 100644 --- a/test/npm-registry-fallback.test.ts +++ b/test/npm-registry-fallback.test.ts @@ -44,7 +44,7 @@ describe('resolveSquadStateMcpSpec: deterministic exact fallback', () => { }); expect(spec).toEqual({ command: 'npx', - args: ['-y', '@bradygaster/squad-cli@0.0.0', 'state-mcp'], + args: ['-y', '@squad/cli@0.0.0', 'state-mcp'], source: 'pinned', }); }); diff --git a/test/npm-registry-reconciliation.test.ts b/test/npm-registry-reconciliation.test.ts index daa2d83af..9e6107f8f 100644 --- a/test/npm-registry-reconciliation.test.ts +++ b/test/npm-registry-reconciliation.test.ts @@ -16,8 +16,8 @@ const result = (status: number | null, stdout = '', stderr = '', signal: string stderr, signal, }); -const SDK = '@bradygaster/squad-sdk'; -const CLI = '@bradygaster/squad-cli'; +const SDK = '@squad/sdk'; +const CLI = '@squad/cli'; const versions = (sdk: string, cli: string) => ({ [SDK]: { state: sdk }, [CLI]: { state: cli }, @@ -104,7 +104,7 @@ function executeScenario(scenario: RegistryScenario) { describe('npm pre-publish registry reconciliation', () => { it('classifies only an explicit 404 as missing', () => { const state = classifyRegistryVersion({ - name: '@bradygaster/squad-sdk', + name: '@squad/sdk', version: VERSION, localIntegrity: INTEGRITY, registry: 'https://registry.npmjs.org/', @@ -121,7 +121,7 @@ describe('npm pre-publish registry reconciliation', () => { result(1, '', 'generic registry failure'), ]) { const state = classifyRegistryVersion({ - name: '@bradygaster/squad-sdk', + name: '@squad/sdk', version: VERSION, localIntegrity: INTEGRITY, registry: 'https://registry.npmjs.org/', @@ -169,7 +169,7 @@ describe('npm pre-publish registry reconciliation', () => { it('accepts a present version only when registry integrity matches the verified tarball', () => { const state = classifyRegistryVersion({ - name: '@bradygaster/squad-sdk', + name: '@squad/sdk', version: VERSION, localIntegrity: INTEGRITY, registry: 'https://registry.npmjs.org/', @@ -316,7 +316,7 @@ describe('npm pre-publish registry reconciliation', () => { it('classifies mismatching integrity as conflict and the workflow entry point fails closed', () => { const state = classifyRegistryVersion({ - name: '@bradygaster/squad-sdk', + name: '@squad/sdk', version: VERSION, localIntegrity: INTEGRITY, registry: 'https://registry.npmjs.org/', @@ -332,8 +332,8 @@ describe('npm pre-publish registry reconciliation', () => { mkdirSync(packsDir); mkdirSync(reconDir); writeFileSync(path.join(packsDir, 'local-packs.json'), JSON.stringify({ - '@bradygaster/squad-sdk': { integrity: INTEGRITY }, - '@bradygaster/squad-cli': { integrity: INTEGRITY }, + '@squad/sdk': { integrity: INTEGRITY }, + '@squad/cli': { integrity: INTEGRITY }, })); try { expect(() => runRegistryClassification({ diff --git a/test/offline.test.ts b/test/offline.test.ts index 2574c4737..db937788a 100644 --- a/test/offline.test.ts +++ b/test/offline.test.ts @@ -8,7 +8,7 @@ import { detectConnectivity, OfflineManager, type PendingOperation, -} from '@bradygaster/squad-sdk/runtime/offline'; +} from '@squad/sdk/runtime/offline'; // --- Helpers --- diff --git a/test/otel-agent-traces.test.ts b/test/otel-agent-traces.test.ts index a491ee185..30986990c 100644 --- a/test/otel-agent-traces.test.ts +++ b/test/otel-agent-traces.test.ts @@ -19,7 +19,7 @@ import { trace, SpanStatusCode } from '@opentelemetry/api'; import { AgentSessionManager, type AgentCharter, -} from '@bradygaster/squad-sdk/agents'; +} from '@squad/sdk/agents'; // --------------------------------------------------------------------------- // Test OTel infrastructure diff --git a/test/otel-bridge.test.ts b/test/otel-bridge.test.ts index c40d75f70..c0d643bc4 100644 --- a/test/otel-bridge.test.ts +++ b/test/otel-bridge.test.ts @@ -15,8 +15,8 @@ import { BasicTracerProvider, } from '@opentelemetry/sdk-trace-base'; import { trace, SpanStatusCode } from '@opentelemetry/api'; -import { createOTelTransport } from '@bradygaster/squad-sdk/runtime/otel-bridge'; -import type { TelemetryEvent } from '@bradygaster/squad-sdk/runtime/telemetry'; +import { createOTelTransport } from '@squad/sdk/runtime/otel-bridge'; +import type { TelemetryEvent } from '@squad/sdk/runtime/telemetry'; // --------------------------------------------------------------------------- // Test OTel infrastructure diff --git a/test/otel-coordinator-traces.test.ts b/test/otel-coordinator-traces.test.ts index d125284ed..a8176568a 100644 --- a/test/otel-coordinator-traces.test.ts +++ b/test/otel-coordinator-traces.test.ts @@ -18,7 +18,7 @@ import { trace } from '@opentelemetry/api'; import { Coordinator, type CoordinatorConfig, -} from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/coordinator'; // --------------------------------------------------------------------------- // Test OTel infrastructure diff --git a/test/otel-export.test.ts b/test/otel-export.test.ts index bfba6dabe..a47dd5bdf 100644 --- a/test/otel-export.test.ts +++ b/test/otel-export.test.ts @@ -16,8 +16,8 @@ import { BasicTracerProvider, } from '@opentelemetry/sdk-trace-base'; import { trace, SpanStatusCode } from '@opentelemetry/api'; -import { getTracer, shutdownOTel } from '@bradygaster/squad-sdk/runtime/otel'; -import { initAgentModeTelemetry } from '@bradygaster/squad-sdk'; +import { getTracer, shutdownOTel } from '@squad/sdk/runtime/otel'; +import { initAgentModeTelemetry } from '@squad/sdk'; // --------------------------------------------------------------------------- // Test infrastructure — in-memory exporter diff --git a/test/otel-integration-e2e.test.ts b/test/otel-integration-e2e.test.ts index 263e23cec..aac278840 100644 --- a/test/otel-integration-e2e.test.ts +++ b/test/otel-integration-e2e.test.ts @@ -18,10 +18,10 @@ import { } from '@opentelemetry/sdk-trace-base'; import { trace, context, SpanStatusCode } from '@opentelemetry/api'; import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks'; -import { createOTelTransport } from '@bradygaster/squad-sdk/runtime/otel-bridge'; -import type { TelemetryEvent } from '@bradygaster/squad-sdk/runtime/telemetry'; -import { TelemetryCollector, setTelemetryTransport } from '@bradygaster/squad-sdk/runtime/telemetry'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +import { createOTelTransport } from '@squad/sdk/runtime/otel-bridge'; +import type { TelemetryEvent } from '@squad/sdk/runtime/telemetry'; +import { TelemetryCollector, setTelemetryTransport } from '@squad/sdk/runtime/telemetry'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // =========================================================================== // Test OTel infrastructure @@ -239,8 +239,8 @@ describe('OTel Integration — zero-overhead when unconfigured', () => { it('metric operations are safe no-ops without provider', async () => { trace.disable(); - const { getTracer, getMeter } = await vi.importActual( - '@bradygaster/squad-sdk/runtime/otel', + const { getTracer, getMeter } = await vi.importActual( + '@squad/sdk/runtime/otel', ); const tracer = getTracer('test'); expect(() => tracer.startSpan('noop').end()).not.toThrow(); @@ -257,7 +257,7 @@ describe('OTel Integration — zero-overhead when unconfigured', () => { describe('OTel Integration — metrics across operations', () => { it('StreamingPipeline processes usage events and tracks data', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); pipeline.attachToSession('sess-e2e'); @@ -280,7 +280,7 @@ describe('OTel Integration — metrics across operations', () => { }); it('StreamingPipeline TTFT tracking works with message_delta events', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); pipeline.attachToSession('sess-ttft'); @@ -317,7 +317,7 @@ describe('OTel Integration — metrics across operations', () => { }); it('StreamingPipeline ignores events from unattached sessions', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); await pipeline.processEvent({ @@ -335,7 +335,7 @@ describe('OTel Integration — metrics across operations', () => { }); it('multiple sessions accumulate metrics independently', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); pipeline.attachToSession('sess-a'); pipeline.attachToSession('sess-b'); diff --git a/test/otel-metric-wiring.test.ts b/test/otel-metric-wiring.test.ts index e568c2e8d..2341ab22d 100644 --- a/test/otel-metric-wiring.test.ts +++ b/test/otel-metric-wiring.test.ts @@ -21,7 +21,7 @@ const mockRecordSessionClosed = vi.fn(); const mockRecordSessionError = vi.fn(); const mockResetMetrics = vi.fn(); -vi.mock('@bradygaster/squad-sdk/runtime/otel-metrics', () => ({ +vi.mock('@squad/sdk/runtime/otel-metrics', () => ({ recordTokenUsage: mockRecordTokenUsage, recordAgentSpawn: mockRecordAgentSpawn, recordAgentDuration: mockRecordAgentDuration, @@ -49,13 +49,13 @@ describe('OTel Metric Wiring — Streaming Pipeline', () => { it('streaming module imports recordTokenUsage from otel-metrics', async () => { // Verify the import chain resolves — this is a compile-time/module-resolution test - const streamingModule = await import('@bradygaster/squad-sdk/runtime/streaming'); + const streamingModule = await import('@squad/sdk/runtime/streaming'); expect(streamingModule).toBeDefined(); expect(streamingModule.StreamingPipeline).toBeDefined(); }); it('StreamingPipeline.processEvent calls recordTokenUsage for usage events', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); @@ -79,7 +79,7 @@ describe('OTel Metric Wiring — Streaming Pipeline', () => { }); it('StreamingPipeline.processEvent does NOT call recordTokenUsage for non-usage events', async () => { - const { StreamingPipeline } = await import('@bradygaster/squad-sdk/runtime/streaming'); + const { StreamingPipeline } = await import('@squad/sdk/runtime/streaming'); const pipeline = new StreamingPipeline(); pipeline.attachToSession('sess-1'); @@ -102,7 +102,7 @@ describe('OTel Metric Wiring — Streaming Pipeline', () => { describe('OTel Metric Wiring — Module Resolution', () => { it('otel-metrics exports are accessible from the main barrel', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expect(typeof sdk.recordTokenUsage).toBe('function'); expect(typeof sdk.recordAgentSpawn).toBe('function'); expect(typeof sdk.recordAgentDuration).toBe('function'); @@ -120,7 +120,7 @@ describe('OTel Metric Wiring — Module Resolution', () => { }); it('otel-metrics subpath export resolves', async () => { - const metricsModule = await import('@bradygaster/squad-sdk/runtime/otel-metrics'); + const metricsModule = await import('@squad/sdk/runtime/otel-metrics'); expect(metricsModule).toBeDefined(); }); }); diff --git a/test/otel-metrics.test.ts b/test/otel-metrics.test.ts index ca47b4acb..e6f52e86a 100644 --- a/test/otel-metrics.test.ts +++ b/test/otel-metrics.test.ts @@ -26,7 +26,7 @@ import { recordResponseDuration, recordTokensPerSecond, _resetMetrics, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; // --------------------------------------------------------------------------- // Mock the OTel provider's getMeter to return spy instruments @@ -65,7 +65,7 @@ function createSpyMeter(): SpyMeter { let spyMeter: SpyMeter; -vi.mock('@bradygaster/squad-sdk/runtime/otel', () => ({ +vi.mock('@squad/sdk/runtime/otel', () => ({ getMeter: () => spyMeter, })); diff --git a/test/otel-provider.test.ts b/test/otel-provider.test.ts index 73ba94da8..7ece2d5a7 100644 --- a/test/otel-provider.test.ts +++ b/test/otel-provider.test.ts @@ -20,7 +20,7 @@ import { getTracer, getMeter, shutdownOTel, -} from '@bradygaster/squad-sdk/runtime/otel'; +} from '@squad/sdk/runtime/otel'; // --------------------------------------------------------------------------- // Helpers: save/restore env diff --git a/test/package-exports.test.ts b/test/package-exports.test.ts index bc8771781..c9a3f89c9 100644 --- a/test/package-exports.test.ts +++ b/test/package-exports.test.ts @@ -2,25 +2,25 @@ import { describe, it, expect } from 'vitest'; describe('SDK package exports', () => { it('exports VERSION from root', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expect(sdk.VERSION).toBeDefined(); expect(typeof sdk.VERSION).toBe('string'); }); it('exports from /config subpath', async () => { - const config = await import('@bradygaster/squad-sdk/config'); + const config = await import('@squad/sdk/config'); expect(config).toBeDefined(); // config barrel re-exports schema, routing, models, etc. expect(config.DEFAULT_CONFIG).toBeDefined(); }); it('exports from /resolution subpath', async () => { - const resolution = await import('@bradygaster/squad-sdk/resolution'); + const resolution = await import('@squad/sdk/resolution'); expect(resolution.resolveSquad).toBeDefined(); }); it('exports from /parsers subpath', async () => { - const parsers = await import('@bradygaster/squad-sdk/parsers'); + const parsers = await import('@squad/sdk/parsers'); expect(parsers).toBeDefined(); expect(parsers.parseTeamMarkdown).toBeDefined(); }); @@ -28,22 +28,22 @@ describe('SDK package exports', () => { it('exports from /types subpath', async () => { // types subpath uses export type only — no runtime values // just verify the module resolves without error - const types = await import('@bradygaster/squad-sdk/types'); + const types = await import('@squad/sdk/types'); expect(types).toBeDefined(); }); it('exports from /agents subpath', async () => { - const agents = await import('@bradygaster/squad-sdk/agents'); + const agents = await import('@squad/sdk/agents'); expect(agents).toBeDefined(); }); it('exports from /skills subpath', async () => { - const skills = await import('@bradygaster/squad-sdk/skills'); + const skills = await import('@squad/sdk/skills'); expect(skills).toBeDefined(); }); it('exports from /tools subpath', async () => { - const tools = await import('@bradygaster/squad-sdk/tools'); + const tools = await import('@squad/sdk/tools'); expect(tools).toBeDefined(); }); }); diff --git a/test/package-identity.test.ts b/test/package-identity.test.ts new file mode 100644 index 000000000..0c539d222 --- /dev/null +++ b/test/package-identity.test.ts @@ -0,0 +1,81 @@ +import { describe, expect, it } from 'vitest'; +import { execFileSync } from 'node:child_process'; +import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { + CLI_PACKAGE_NAME, + SDK_PACKAGE_NAME, + LEGACY_CLI_PACKAGE_NAMES, + LEGACY_SDK_PACKAGE_NAMES, + getInstalledCliPackageName, + isKnownCliPackageSpec, + registryPackagePath, +} from '../packages/squad-cli/src/cli/core/package-identity.js'; +import { selfUpgradeCommand, stripAgentStamps } from '../packages/squad-cli/src/cli/core/upgrade.js'; +// @ts-expect-error -- plain ESM script without type declarations +import { applyRules, npmRules } from '../scripts/rename-distribution-identity.mjs'; + +const identity = JSON.parse(readFileSync(join(process.cwd(), 'scripts/release/distribution-identity.json'), 'utf8')); +const legacyCli = identity.npm.cli.legacy[0] as string; + +describe('distribution identity', () => { + it('runtime package names match scripts/release/distribution-identity.json', () => { + expect(CLI_PACKAGE_NAME).toBe(identity.npm.cli.current); + expect(SDK_PACKAGE_NAME).toBe(identity.npm.sdk.current); + expect([...LEGACY_CLI_PACKAGE_NAMES]).toEqual(identity.npm.cli.legacy); + expect([...LEGACY_SDK_PACKAGE_NAMES]).toEqual(identity.npm.sdk.legacy); + }); + + it('workspace package.json names match the identity file', () => { + const read = (p: string) => JSON.parse(readFileSync(join(process.cwd(), p), 'utf8')); + expect(read('packages/squad-cli/package.json').name).toBe(identity.npm.cli.current); + expect(read('packages/squad-sdk/package.json').name).toBe(identity.npm.sdk.current); + }); + + it('the repository has no leftover retired package names outside preserved paths', () => { + expect(() => execFileSync(process.execPath, ['scripts/rename-distribution-identity.mjs'], { stdio: 'pipe' })).not.toThrow(); + }); +}); + +describe('legacy CLI install migration', () => { + it.each([ + ['npm', `npm uninstall -g ${legacyCli} && npm install -g ${CLI_PACKAGE_NAME}@latest`], + ['pnpm', `pnpm remove -g ${legacyCli} && pnpm add -g ${CLI_PACKAGE_NAME}@latest`], + ['yarn', `yarn global remove ${legacyCli} && yarn global add ${CLI_PACKAGE_NAME}@latest`], + ] as const)('%s self-upgrade removes the legacy package before installing the new one', (pm, expected) => { + expect(selfUpgradeCommand(pm, 'latest', legacyCli)).toBe(expected); + expect(selfUpgradeCommand(pm, 'latest')).not.toContain('&&'); + }); + + it('recognizes legacy MCP package specs and normalizes legacy agent stamps', () => { + expect(isKnownCliPackageSpec(`${legacyCli}@1.1.0`)).toBe(true); + expect(isKnownCliPackageSpec(`${CLI_PACKAGE_NAME}@2.0.0`)).toBe(true); + expect(isKnownCliPackageSpec(`${CLI_PACKAGE_NAME}-extra@2.0.0`)).toBe(false); + expect(stripAgentStamps(`npx -y ${legacyCli}@1.1.0 state-mcp`)).toBe(stripAgentStamps(`npx -y ${CLI_PACKAGE_NAME}@2.0.0 state-mcp`)); + }); + + it('detects the installed CLI package name from the nearest package.json', () => { + const root = mkdtempSync(join(tmpdir(), 'squad-identity-')); + try { + const dist = join(root, 'dist', 'cli', 'core'); + mkdirSync(dist, { recursive: true }); + writeFileSync(join(root, 'package.json'), JSON.stringify({ name: legacyCli })); + expect(getInstalledCliPackageName(dist)).toBe(legacyCli); + } finally { + rmSync(root, { recursive: true, force: true }); + } + }); + + it('encodes scoped names for registry URLs', () => { + expect(registryPackagePath(CLI_PACKAGE_NAME)).toBe(CLI_PACKAGE_NAME.replace('/', '%2F')); + }); +}); + +describe('rename codemod', () => { + it('rewrites package references but keeps legacy names in migration instructions', () => { + const rules = npmRules(legacyCli, CLI_PACKAGE_NAME); + const input = `npx -y ${legacyCli}@1.2 state-mcp\nnpm uninstall -g ${legacyCli}\n`; + expect(applyRules(input, rules)).toBe(`npx -y ${CLI_PACKAGE_NAME}@1.2 state-mcp\nnpm uninstall -g ${legacyCli}\n`); + }); +}); diff --git a/test/parser-contracts.test.ts b/test/parser-contracts.test.ts index 80f2a415a..8890643a2 100644 --- a/test/parser-contracts.test.ts +++ b/test/parser-contracts.test.ts @@ -14,10 +14,10 @@ import { randomUUID } from 'node:crypto'; import { parseTeamMarkdown, parseDecisionsMarkdown, -} from '@bradygaster/squad-sdk/config'; -import { parseRoutingMarkdown } from '@bradygaster/squad-sdk/config'; -import { parseCharterMarkdown } from '@bradygaster/squad-sdk/agents'; -import { loadSkillsFromDirectory } from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/config'; +import { parseRoutingMarkdown } from '@squad/sdk/config'; +import { parseCharterMarkdown } from '@squad/sdk/agents'; +import { loadSkillsFromDirectory } from '@squad/sdk/skills'; // =========================================================================== // Return shape tests (5) diff --git a/test/portable-launch.test.ts b/test/portable-launch.test.ts index d05e9a75c..62166d5ab 100644 --- a/test/portable-launch.test.ts +++ b/test/portable-launch.test.ts @@ -16,7 +16,7 @@ import { squadRepoLauncher, squadRepoLauncherArgs, SQUAD_REPO_LAUNCHER_MARKER, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; import { committedSquadStateMcpSpec, isTransientCliEntry, @@ -27,7 +27,7 @@ import { } from '../packages/squad-cli/src/cli/core/mcp-spec.js'; import { checkPortableSquadLaunch } from '../packages/squad-cli/src/cli/commands/doctor.js'; -const fallback = { command: 'npx' as const, args: ['-y', '@bradygaster/squad-cli@9.9.9', 'state-mcp'] }; +const fallback = { command: 'npx' as const, args: ['-y', '@squad/cli@9.9.9', 'state-mcp'] }; const localEntry: SquadStateMcpSpec = { command: '/opt/node/bin/node', args: ['/home/someone/squad/dist/cli-entry.js', 'state-mcp'], @@ -102,16 +102,16 @@ describe('committed spec (#2462)', () => { it('keeps exact-version npx for a CLI running from a package runner cache (Copilot review)', () => { for (const entry of [ - '/home/u/.npm/_npx/0a1b2c/node_modules/@bradygaster/squad-cli/dist/cli-entry.js', - 'C:\\Users\\u\\AppData\\Local\\npm-cache\\_npx\\0a1b\\node_modules\\@bradygaster\\squad-cli\\dist\\cli-entry.js', - '/home/u/.cache/pnpm/dlx/abc/node_modules/@bradygaster/squad-cli/dist/cli-entry.js', - '/tmp/xfs-1a2b3c/dlx-5555/node_modules/@bradygaster/squad-cli/dist/cli-entry.js', + '/home/u/.npm/_npx/0a1b2c/node_modules/@squad/cli/dist/cli-entry.js', + 'C:\\Users\\u\\AppData\\Local\\npm-cache\\_npx\\0a1b\\node_modules\\@squad\\cli\\dist\\cli-entry.js', + '/home/u/.cache/pnpm/dlx/abc/node_modules/@squad/cli/dist/cli-entry.js', + '/tmp/xfs-1a2b3c/dlx-5555/node_modules/@squad/cli/dist/cli-entry.js', ]) { expect(isTransientCliEntry(entry), entry).toBe(true); expect(committedSquadStateMcpSpec({ ...localEntry, args: [entry, 'state-mcp'] }, '.squad')) .toEqual({ command: 'npx', args: fallback.args, source: 'pinned' }); } - expect(isTransientCliEntry('/usr/local/lib/node_modules/@bradygaster/squad-cli/dist/cli-entry.js')).toBe(false); + expect(isTransientCliEntry('/usr/local/lib/node_modules/@squad/cli/dist/cli-entry.js')).toBe(false); expect(isTransientCliEntry('/home/u/src/dlxtools/squad/dist/cli-entry.js')).toBe(false); }); @@ -176,11 +176,11 @@ describe('Claude hooks through the repository launcher (#2462)', () => { }); describe('the repository launcher script (#2462)', () => { - /** A fake CLI that prints its argv, at `/node_modules/@bradygaster/squad-cli`. */ + /** A fake CLI that prints its argv, at `/node_modules/@squad/cli`. */ function fakeCli(dir: string, version: string): void { - const pkg = path.join(dir, 'node_modules', '@bradygaster', 'squad-cli'); + const pkg = path.join(dir, 'node_modules', '@squad', 'cli'); fs.mkdirSync(path.join(pkg, 'dist'), { recursive: true }); - fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@bradygaster/squad-cli', version })); + fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@squad/cli', version })); fs.writeFileSync(path.join(pkg, 'dist', 'cli-entry.js'), `console.log('fake ${version}', JSON.stringify(process.argv.slice(2)));\n`); } @@ -264,7 +264,7 @@ describe('the repository launcher script (#2462)', () => { const out = run(['state-mcp']); expect(out.status).toBe(1); expect(out.stderr).toContain('no Squad CLI 2.0.0 or newer found'); - expect(out.stderr).toContain('npm install -g @bradygaster/squad-cli@2.0.0'); + expect(out.stderr).toContain('npm install -g @squad/cli@2.0.0'); }); it('falls back to the CLI recorded on this machine, and skips an older one', async () => { @@ -272,7 +272,7 @@ describe('the repository launcher script (#2462)', () => { const other = path.join(root, 'other-machine-dir'); fakeCli(other, '2.0.2'); const home = path.join(root, 'squad-home'); - const entry = path.join(other, 'node_modules', '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'); + const entry = path.join(other, 'node_modules', '@squad', 'cli', 'dist', 'cli-entry.js'); recordSquadCli(entry, '2.0.2', { SQUAD_HOME: home }); expect(JSON.parse(fs.readFileSync(path.join(home, 'cli.json'), 'utf8'))).toEqual({ entry, version: '2.0.2' }); expect(run(['state-mcp'], { SQUAD_HOME: home }).stdout.trim()).toBe('fake 2.0.2 ["state-mcp"]'); diff --git a/test/presets.test.ts b/test/presets.test.ts index 52b8b9e50..6d4501a6f 100644 --- a/test/presets.test.ts +++ b/test/presets.test.ts @@ -15,14 +15,14 @@ import { join } from 'node:path'; import { randomBytes } from 'node:crypto'; import { spawn } from 'node:child_process'; import { hostname, tmpdir } from 'node:os'; -import { resolveSquadHome, ensureSquadHome, resolvePresetsDir } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquadHome, ensureSquadHome, resolvePresetsDir } from '@squad/sdk/resolution'; import { listPresets, loadPreset, applyPreset, savePreset, seedBuiltinPresets, -} from '@bradygaster/squad-sdk/presets'; +} from '@squad/sdk/presets'; import { CastingCommitInDoubtError, commitCastingRegistryPair, @@ -30,7 +30,7 @@ import { readCastingRegistryPair, reconcileAgentProvenanceRegistry, recoverCastingRegistryTransaction, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; import { _setPresetRegistryHooksForTesting, scaffoldPresetIntoSquad, @@ -1982,7 +1982,7 @@ describe('savePreset()', () => { // the same code path via resolveInstallSource — splitting the git clone // into a small helper so it can be stubbed is a separate follow-up. -import { installPresetFromSource } from '@bradygaster/squad-sdk/presets'; +import { installPresetFromSource } from '@squad/sdk/presets'; describe('installPresetFromSource() — local paths', () => { const originalEnv = process.env['SQUAD_HOME']; diff --git a/test/profile-boundary.test.ts b/test/profile-boundary.test.ts index 8d1f2e9fa..e2dafd284 100644 --- a/test/profile-boundary.test.ts +++ b/test/profile-boundary.test.ts @@ -14,7 +14,7 @@ import { execFileSync } from 'node:child_process'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; -import { clearResolveSquadCache, isRetiredProfileTeamRoot, resolveGlobalSquadPath, resolveSquad, resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { clearResolveSquadCache, isRetiredProfileTeamRoot, resolveGlobalSquadPath, resolveSquad, resolveSquadPaths } from '@squad/sdk/resolution'; let tmp: string; let fakeHome: string; diff --git a/test/profile-squad-tombstone.test.ts b/test/profile-squad-tombstone.test.ts index 5315f80a1..7faf29dc8 100644 --- a/test/profile-squad-tombstone.test.ts +++ b/test/profile-squad-tombstone.test.ts @@ -18,12 +18,12 @@ import { createHash } from 'node:crypto'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runUpgrade } from '@bradygaster/squad-cli/core/upgrade'; -import { runCastAdd } from '@bradygaster/squad-cli/commands/cast'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; -import { installClients, uninstallClients } from '@bradygaster/squad-sdk/client'; -import { clearResolveSquadCache, resolveGlobalSquadPath, resolveSquad, resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { runInit } from '@squad/cli/core/init'; +import { runUpgrade } from '@squad/cli/core/upgrade'; +import { runCastAdd } from '@squad/cli/commands/cast'; +import { FSStorageProvider } from '@squad/sdk'; +import { installClients, uninstallClients } from '@squad/sdk/client'; +import { clearResolveSquadCache, resolveGlobalSquadPath, resolveSquad, resolveSquadPaths } from '@squad/sdk/resolution'; let tmp: string; let configHome: string; diff --git a/test/promote-insider-tag-spawn.test.ts b/test/promote-insider-tag-spawn.test.ts index 5b7c13734..812a2b6a3 100644 --- a/test/promote-insider-tag-spawn.test.ts +++ b/test/promote-insider-tag-spawn.test.ts @@ -20,18 +20,18 @@ describe('promoteInsiderTag npm command flow (Issue #1497)', () => { .mockReturnValueOnce({ status: 0, stdout: '{"insider":"0.12.0"}\n', stderr: '' }) .mockReturnValueOnce({ status: 0, stdout: '', stderr: '' }); - promoteInsiderTag('@bradygaster/squad-sdk', '0.13.0'); + promoteInsiderTag('@squad/sdk', '0.13.0'); expect(spawnSyncMock).toHaveBeenNthCalledWith( 1, expect.stringMatching(/^npm(?:\.cmd)?$/), - ['view', '@bradygaster/squad-sdk@0.13.0', 'version', '--json'], + ['view', '@squad/sdk@0.13.0', 'version', '--json'], expect.any(Object), ); expect(spawnSyncMock).toHaveBeenNthCalledWith( 3, expect.stringMatching(/^npm(?:\.cmd)?$/), - ['dist-tag', 'add', '@bradygaster/squad-sdk@0.13.0', 'insider'], + ['dist-tag', 'add', '@squad/sdk@0.13.0', 'insider'], expect.any(Object), ); }); @@ -39,14 +39,14 @@ describe('promoteInsiderTag npm command flow (Issue #1497)', () => { it('does not promote an unpublished package version', () => { spawnSyncMock.mockReturnValueOnce({ status: 1, stdout: '', stderr: 'E404 not found' }); - expect(() => promoteInsiderTag('@bradygaster/squad-cli', '0.13.0')).toThrow( - /npm view failed for @bradygaster\/squad-cli@0\.13\.0/, + expect(() => promoteInsiderTag('@squad/cli', '0.13.0')).toThrow( + /npm view failed for @squad\/cli@0\.13\.0/, ); expect(spawnSyncMock).toHaveBeenCalledTimes(1); expect(spawnSyncMock.mock.calls[0][1]).toEqual([ 'view', - '@bradygaster/squad-cli@0.13.0', + '@squad/cli@0.13.0', 'version', '--json', ]); @@ -58,8 +58,8 @@ describe('promoteInsiderTag npm command flow (Issue #1497)', () => { .mockReturnValueOnce({ status: 0, stdout: '{"insider":"0.12.0"}\n', stderr: '' }) .mockReturnValueOnce({ status: 1, stdout: '', stderr: 'permission denied' }); - expect(() => promoteInsiderTag('@bradygaster/squad-sdk', '0.13.0')).toThrow( - /npm dist-tag add failed for @bradygaster\/squad-sdk@0\.13\.0/, + expect(() => promoteInsiderTag('@squad/sdk', '0.13.0')).toThrow( + /npm dist-tag add failed for @squad\/sdk@0\.13\.0/, ); expect(spawnSyncMock).toHaveBeenCalledTimes(3); diff --git a/test/promote-insider-tag.test.ts b/test/promote-insider-tag.test.ts index 88839a8bd..42614e65a 100644 --- a/test/promote-insider-tag.test.ts +++ b/test/promote-insider-tag.test.ts @@ -124,7 +124,7 @@ describe('publish workflow insider promotion graph (Issue #1497, superseded by p expect(promotion).toContain('needs: [prepare, publish]'); expect(promotion).toContain("needs.prepare.outputs.stable_release == 'true'"); expect(promotion).toContain("needs.publish.outputs.outcome == 'COMPLETE'"); - expect(promotion).toContain('@bradygaster/squad-sdk'); - expect(promotion).toContain('@bradygaster/squad-cli'); + expect(promotion).toContain('@squad/sdk'); + expect(promotion).toContain('@squad/cli'); }); }); diff --git a/test/publish-policy.test.ts b/test/publish-policy.test.ts index 3813a1a64..300756959 100644 --- a/test/publish-policy.test.ts +++ b/test/publish-policy.test.ts @@ -12,14 +12,14 @@ import { describe, it, expect } from 'vitest'; import { readdirSync, readFileSync } from 'node:fs'; import { join } from 'node:path'; +// Single source for the verified-tarball allowance, derived from scripts/release/distribution-identity.json. +import { VERIFIED_TARBALL } from '../scripts/release/policy-gates.mjs'; // ─── Core lint function (mirrors CI shell logic) ──────────────────────── const NPM_PUBLISH_COMMAND = /(?:^|&&|\|\||;)\s*(?:(?:if|then)\s+)?(?:[A-Za-z_][A-Za-z0-9_]*=\S+\s+)*npm\s+[^#;&|]*\bpublish\b[^#;&|]*/; const WORKSPACE_FLAG = /(?:^|\s)(?:-w|--workspace)(?:=|\s|$)/; -const VERIFIED_TARBALL = - /npm\s+publish\s+"\$PACKS_DIR\/bradygaster-squad-(?:sdk|cli)-\$\{VERSION\}\.tgz"(?:\s|$)/; /** * Returns true if the line contains a workspace-scoped npm publish @@ -65,8 +65,8 @@ describe('publish-policy lint logic', () => { 'npm --workspace packages/squad-cli publish --tag insider', 'cd packages/sdk && npm --workspace=packages/squad-sdk publish', 'run: npm publish --workspace packages/squad-cli', - 'npm publish "$PACKS_DIR/bradygaster-squad-sdk-${VERSION}.tgz" --ignore-scripts --access public --provenance', - 'npm publish "$PACKS_DIR/bradygaster-squad-cli-${VERSION}.tgz" --ignore-scripts --access public --provenance', + 'npm publish "$PACKS_DIR/squad-sdk-${VERSION}.tgz" --ignore-scripts --access public --provenance', + 'npm publish "$PACKS_DIR/squad-cli-${VERSION}.tgz" --ignore-scripts --access public --provenance', ]; for (const line of goodLines) { @@ -194,14 +194,14 @@ describe('publish-policy: release recovery after staging cleanup failure', () => /if: success\(\) && steps\.existing\.outputs\.stage_pair == 'true'/, ); expect(sdkCleanup).toMatch( - /assert-publish-identity\.mjs[\s\S]*?if npm dist-tag rm @bradygaster\/squad-sdk[\s\S]*?outcome=failure[\s\S]*?exit_code=\$status/, + /assert-publish-identity\.mjs[\s\S]*?if npm dist-tag rm @squad\/sdk[\s\S]*?outcome=failure[\s\S]*?exit_code=\$status/, ); expect(cliCleanup).toMatch(/id: remove-cli-staging-tag/); expect(cliCleanup).toMatch( /if: success\(\) && steps\.existing\.outputs\.stage_pair == 'true'/, ); expect(cliCleanup).toMatch( - /assert-publish-identity\.mjs[\s\S]*?if npm dist-tag rm @bradygaster\/squad-cli[\s\S]*?outcome=failure[\s\S]*?exit_code=\$status/, + /assert-publish-identity\.mjs[\s\S]*?if npm dist-tag rm @squad\/cli[\s\S]*?outcome=failure[\s\S]*?exit_code=\$status/, ); expect(cleanupEvidence).toMatch( /SDK_CLEANUP_OUTCOME: \$\{\{ steps\.remove-sdk-staging-tag\.outputs\.outcome[\s\S]*?CLI_CLEANUP_OUTCOME: \$\{\{ steps\.remove-cli-staging-tag\.outputs\.outcome[\s\S]*?staging-tag-cleanup\.json[\s\S]*?::warning::Could not remove/, diff --git a/test/ralph-claims-git.test.ts b/test/ralph-claims-git.test.ts index bbf2618bb..161d0d177 100644 --- a/test/ralph-claims-git.test.ts +++ b/test/ralph-claims-git.test.ts @@ -44,8 +44,8 @@ import { decodeClaimRecord, encodeClaimRecord, type GitTransport, -} from '@bradygaster/squad-sdk/ralph/claims-git'; -import type { ClaimRecord, ExecutorIdentity, WorkClaimProvider, WorkKey } from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims-git'; +import type { ClaimRecord, ExecutorIdentity, WorkClaimProvider, WorkKey } from '@squad/sdk/ralph/claims'; import { describeClaimProviderContract, manualClock, testIdentity } from './helpers/claim-provider-contract.js'; const hasGit = (() => { diff --git a/test/ralph-claims.test.ts b/test/ralph-claims.test.ts index d83f98ef1..f4e79d358 100644 --- a/test/ralph-claims.test.ts +++ b/test/ralph-claims.test.ts @@ -16,7 +16,7 @@ import { normalizeWorkKey, resolveExecutorIdentity, workKeyToString, -} from '@bradygaster/squad-sdk/ralph/claims'; +} from '@squad/sdk/ralph/claims'; import { describeClaimProviderContract, manualClock, testIdentity } from './helpers/claim-provider-contract.js'; describeClaimProviderContract('NoopClaimProvider', () => { diff --git a/test/rate-limiting.test.ts b/test/rate-limiting.test.ts index 78b472c83..d9df04012 100644 --- a/test/rate-limiting.test.ts +++ b/test/rate-limiting.test.ts @@ -8,7 +8,7 @@ import { consumeQuota, type RatePool, type AgentPriority, -} from '@bradygaster/squad-sdk/ralph/rate-limiting'; +} from '@squad/sdk/ralph/rate-limiting'; describe('getTrafficLight', () => { it('returns green when >20% remaining', () => { diff --git a/test/registry-preflight.test.ts b/test/registry-preflight.test.ts index 163b7d6a9..28061c931 100644 --- a/test/registry-preflight.test.ts +++ b/test/registry-preflight.test.ts @@ -18,7 +18,7 @@ const result = (status: number | null, stdout = '', stderr = '') => ({ status, s describe('read-only registry preflight', () => { it('records only explicit package, tag-ref, and release absence responses as absent', () => { expect(classifyPackageVersion({ - name: '@bradygaster/squad-cli', + name: '@squad/cli', version: VERSION, registry: REGISTRY, spawn: () => result(1, '', 'npm error code E404\n404 Not Found'), @@ -41,13 +41,13 @@ describe('read-only registry preflight', () => { it('records TLS, git transport, and malformed responses as UNKNOWN', () => { expect(classifyPackageVersion({ - name: '@bradygaster/squad-cli', + name: '@squad/cli', version: VERSION, registry: REGISTRY, spawn: () => result(1, '', 'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE'), }).state).toBe('UNKNOWN'); expect(readDistTags({ - name: '@bradygaster/squad-cli', + name: '@squad/cli', registry: REGISTRY, spawn: () => result(0, '{broken'), })).toMatchObject({ @@ -97,7 +97,7 @@ describe('read-only registry preflight', () => { githubRef: { state: '404', ref: `refs/tags/v${VERSION}` }, }); expect(evidence.githubRelease.state).toBe('404'); - for (const name of ['@bradygaster/squad-cli', '@bradygaster/squad-sdk']) { + for (const name of ['@squad/cli', '@squad/sdk']) { expect(evidence.packages[name].version.state).toBe('404'); expect(evidence.packages[name].distTags.values).toEqual({ insider: '2.0.0-preview.3', diff --git a/test/release-pack-install.test.ts b/test/release-pack-install.test.ts index d6b7aca8a..de3952a47 100644 --- a/test/release-pack-install.test.ts +++ b/test/release-pack-install.test.ts @@ -2,7 +2,7 @@ * Release gate: self-upgrade shaped install of the EXACT packed tarballs into an isolated global * prefix (`npm install -g --prefix `), never the real global prefix. * - * `selfUpgradeCli` runs `npm install -g @bradygaster/squad-cli@`; the only difference here is + * `selfUpgradeCli` runs `npm install -g @squad/cli@`; the only difference here is * that the package specs are the tarballs produced by scripts/release/pack-evidence.mjs, so the * test proves the pair (CLI tarball + SDK tarball it depends on) installs, exposes the `squad` bin * and reports the release version, without touching the registry for the Squad packages. @@ -24,8 +24,8 @@ describe('release gate: isolated-prefix install of the packed CLI + SDK pair', ( it.skipIf(!ENABLED)('npm install -g --prefix yields the release version and the squad bin', () => { expect(existsSync(EVIDENCE_DIR), `SQUAD_RELEASE_EVIDENCE_DIR=${EVIDENCE_DIR} must exist`).toBe(true); const tarballs = readdirSync(EVIDENCE_DIR).filter((f) => f.endsWith('.tgz')); - const sdk = tarballs.find((f) => f.startsWith('bradygaster-squad-sdk-')); - const cli = tarballs.find((f) => f.startsWith('bradygaster-squad-cli-')); + const sdk = tarballs.find((f) => f.startsWith('squad-sdk-')); + const cli = tarballs.find((f) => f.startsWith('squad-cli-')); expect(sdk, 'SDK tarball present').toBeDefined(); expect(cli, 'CLI tarball present').toBeDefined(); const expectedVersion = JSON.parse(readFileSync(join(process.cwd(), 'packages', 'squad-cli', 'package.json'), 'utf8')).version as string; @@ -40,16 +40,16 @@ describe('release gate: isolated-prefix install of the packed CLI + SDK pair', ( execFileSync(npm, ['install', '-g', '--prefix', prefix, '--no-audit', '--no-fund', '--ignore-scripts', join(EVIDENCE_DIR, sdk!), join(EVIDENCE_DIR, cli!)], { env, stdio: 'inherit', shell: process.platform === 'win32' }); const modules = process.platform === 'win32' ? join(prefix, 'node_modules') : join(prefix, 'lib', 'node_modules'); - const cliPkg = JSON.parse(readFileSync(join(modules, '@bradygaster', 'squad-cli', 'package.json'), 'utf8')); + const cliPkg = JSON.parse(readFileSync(join(modules, '@squad', 'cli', 'package.json'), 'utf8')); expect(cliPkg.version).toBe(expectedVersion); // The SDK must be the packed one (hoisted or nested), at the same release version. - const sdkCandidates = [join(modules, '@bradygaster', 'squad-sdk', 'package.json'), join(modules, '@bradygaster', 'squad-cli', 'node_modules', '@bradygaster', 'squad-sdk', 'package.json')].filter(existsSync); + const sdkCandidates = [join(modules, '@squad', 'sdk', 'package.json'), join(modules, '@squad', 'cli', 'node_modules', '@squad', 'sdk', 'package.json')].filter(existsSync); expect(sdkCandidates.length, 'packed SDK installed').toBeGreaterThan(0); expect(JSON.parse(readFileSync(sdkCandidates[0]!, 'utf8')).version).toBe(expectedVersion); const bin = process.platform === 'win32' ? join(prefix, 'squad.cmd') : join(prefix, 'bin', 'squad'); expect(existsSync(bin), `global bin shim ${bin}`).toBe(true); - const out = execFileSync(process.execPath, [join(modules, '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'), '--version'], { env, encoding: 'utf8' }); + const out = execFileSync(process.execPath, [join(modules, '@squad', 'cli', 'dist', 'cli-entry.js'), '--version'], { env, encoding: 'utf8' }); expect(out).toContain(expectedVersion); } finally { rmSync(root, { recursive: true, force: true, maxRetries: 3, retryDelay: 200 }); diff --git a/test/release-policy-changeset-drain.test.ts b/test/release-policy-changeset-drain.test.ts index e8a6a0684..fb625a16e 100644 --- a/test/release-policy-changeset-drain.test.ts +++ b/test/release-policy-changeset-drain.test.ts @@ -29,8 +29,8 @@ function fixtureRoot(changesets: Record): string { return dir; } -const GOOD = '---\n"@bradygaster/squad-cli": patch\n---\n\nFix the thing.\n'; -const GOOD_TWO = '---\n"@bradygaster/squad-sdk": minor\n"@bradygaster/squad-cli": patch\n---\n\nAdd a thing.\n'; +const GOOD = '---\n"@squad/cli": patch\n---\n\nFix the thing.\n'; +const GOOD_TWO = '---\n"@squad/sdk": minor\n"@squad/cli": patch\n---\n\nAdd a thing.\n'; const drain = (root: string, mode: 'ci' | 'release') => runPolicyGates({ root, mode }).gates.find((g) => g.id === 'changeset-drain')!; const nodeFloor = (root: string) => runPolicyGates({ root, mode: 'ci' }).gates.find((g) => g.id === 'node-security-floor')!; @@ -63,15 +63,15 @@ describe('policy gate changeset-drain is branch/event-aware', () => { const root = fixtureRoot({ 'no-frontmatter.md': 'Just prose.\n', 'wrong-pkg.md': '---\n"@bradygaster/create-squad": patch\n---\n\nx\n', - 'bad-bump.md': '---\n"@bradygaster/squad-cli": huge\n---\n\nx\n', - 'empty.md': '---\n"@bradygaster/squad-cli": patch\n---\n\n \n', + 'bad-bump.md': '---\n"@squad/cli": huge\n---\n\nx\n', + 'empty.md': '---\n"@squad/cli": patch\n---\n\n \n', }); try { const gate = drain(root, 'ci'); expect(gate.ok).toBe(false); expect(gate.detail).toContain('no-frontmatter.md: missing frontmatter block'); expect(gate.detail).toContain("wrong-pkg.md: package '@bradygaster/create-squad' is not publishable"); - expect(gate.detail).toContain("bad-bump.md: bump 'huge' for @bradygaster/squad-cli is not patch|minor|major"); + expect(gate.detail).toContain("bad-bump.md: bump 'huge' for @squad/cli is not patch|minor|major"); expect(gate.detail).toContain('empty.md: empty summary'); expect(validateChangeset(root, 'no-frontmatter.md')).toEqual(['missing frontmatter block (--- ... ---)']); } finally { diff --git a/test/release.test.ts b/test/release.test.ts index 30b196c2e..fdf74ad1d 100644 --- a/test/release.test.ts +++ b/test/release.test.ts @@ -19,8 +19,8 @@ import { type ReleaseArtifact, type ReleaseValidationError, type ReleaseChecklistItem, -} from '@bradygaster/squad-sdk/build'; -import type { CommitInfo } from '@bradygaster/squad-sdk/build'; +} from '@squad/sdk/build'; +import type { CommitInfo } from '@squad/sdk/build'; // ─── Helpers ──────────────────────────────────────────────────────────── diff --git a/test/remote-control.test.ts b/test/remote-control.test.ts index fcadc33f0..432ecfdc8 100644 --- a/test/remote-control.test.ts +++ b/test/remote-control.test.ts @@ -19,7 +19,7 @@ import { RC_PROTOCOL_VERSION, serializeEvent, parseCommand, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; describe('Protocol', () => { it('serializes events to JSON', () => { diff --git a/test/repl-ux-fixes.test.ts b/test/repl-ux-fixes.test.ts index 570fd9de2..b0ff2d515 100644 --- a/test/repl-ux-fixes.test.ts +++ b/test/repl-ux-fixes.test.ts @@ -18,16 +18,16 @@ import { Text } from 'ink'; import { buildCoordinatorPrompt, formatConversationContext, -} from '@bradygaster/squad-cli/shell/coordinator'; -import type { CoordinatorConfig } from '@bradygaster/squad-cli/shell/coordinator'; +} from '@squad/cli/shell/coordinator'; +import type { CoordinatorConfig } from '@squad/cli/shell/coordinator'; import { createSession, loadLatestSession, saveSession, -} from '@bradygaster/squad-cli/shell/session-store'; -import type { SessionData } from '@bradygaster/squad-cli/shell/session-store'; +} from '@squad/cli/shell/session-store'; +import type { SessionData } from '@squad/cli/shell/session-store'; import { MessageStream } from '../packages/squad-cli/src/cli/shell/components/MessageStream.js'; -import type { ShellMessage, AgentSession } from '@bradygaster/squad-cli/shell/types'; +import type { ShellMessage, AgentSession } from '@squad/cli/shell/types'; const h = React.createElement; diff --git a/test/repo-sync.test.ts b/test/repo-sync.test.ts index 6cdad72a5..381990f7a 100644 --- a/test/repo-sync.test.ts +++ b/test/repo-sync.test.ts @@ -8,8 +8,8 @@ import { importFromRepo, parseRepoString, validateRepoPath, -} from '@bradygaster/squad-sdk/sharing'; -import type { RepoSyncOperations } from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; +import type { RepoSyncOperations } from '@squad/sdk/sharing'; // ── Mock operations ──────────────────────────────────────────────── diff --git a/test/resolution.test.ts b/test/resolution.test.ts index 4b87ed0cd..7db9e1f67 100644 --- a/test/resolution.test.ts +++ b/test/resolution.test.ts @@ -7,7 +7,7 @@ import { mkdirSync, rmSync, existsSync, writeFileSync } from 'node:fs'; import { join } from 'node:path'; import { randomBytes } from 'node:crypto'; import { tmpdir } from 'node:os'; -import { resolveSquad, resolveGlobalSquadPath, ensureSquadPath, clearResolveSquadCache } from '@bradygaster/squad-sdk/resolution'; +import { resolveSquad, resolveGlobalSquadPath, ensureSquadPath, clearResolveSquadCache } from '@squad/sdk/resolution'; const TMP = join(process.cwd(), `.test-resolution-${randomBytes(4).toString('hex')}`); diff --git a/test/resolve-cache.test.ts b/test/resolve-cache.test.ts index bef20e589..05062b020 100644 --- a/test/resolve-cache.test.ts +++ b/test/resolve-cache.test.ts @@ -20,8 +20,8 @@ import { tmpdir } from 'node:os'; import { resolveSquad, clearResolveSquadCache, -} from '@bradygaster/squad-sdk/resolution'; -import * as resolutionModule from '@bradygaster/squad-sdk/resolution'; +} from '@squad/sdk/resolution'; +import * as resolutionModule from '@squad/sdk/resolution'; const TMP = join(tmpdir(), `squad-cache-${randomBytes(4).toString('hex')}`); @@ -136,7 +136,7 @@ describe('resolveSquad cache', () => { }); it('exports clearResolveSquadCache from the SDK barrel', async () => { - const sdk = await import('@bradygaster/squad-sdk'); + const sdk = await import('@squad/sdk'); expect(typeof sdk.clearResolveSquadCache).toBe('function'); // It should be the SAME function reference as the resolution module's export expect(sdk.clearResolveSquadCache).toBe(resolutionModule.clearResolveSquadCache); diff --git a/test/response-tiers.test.ts b/test/response-tiers.test.ts index d9a50d518..0df1fcf66 100644 --- a/test/response-tiers.test.ts +++ b/test/response-tiers.test.ts @@ -9,8 +9,8 @@ import { type ResponseTier, type TierName, type TierContext, -} from '@bradygaster/squad-sdk/coordinator'; -import { DEFAULT_CONFIG, defineConfig, type SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/coordinator'; +import { DEFAULT_CONFIG, defineConfig, type SquadConfig } from '@squad/sdk/config'; // --- getTier --- diff --git a/test/rework.test.ts b/test/rework.test.ts index 7e91ce502..ed6a6838a 100644 --- a/test/rework.test.ts +++ b/test/rework.test.ts @@ -17,7 +17,7 @@ import { type PrReview, type PrCommit, type PrReworkResult, -} from '@bradygaster/squad-sdk'; +} from '@squad/sdk'; // --------------------------------------------------------------------------- // calculatePrRework @@ -296,7 +296,7 @@ function createSpyMeter(): SpyMeter { let spyMeter: SpyMeter; -vi.mock('@bradygaster/squad-sdk/runtime/otel', () => ({ +vi.mock('@squad/sdk/runtime/otel', () => ({ getMeter: () => spyMeter, })); diff --git a/test/routing.test.ts b/test/routing.test.ts index e38b2753d..e77340f33 100644 --- a/test/routing.test.ts +++ b/test/routing.test.ts @@ -8,8 +8,8 @@ import { compileRoutingRules, matchRoute, matchIssueLabels -} from '@bradygaster/squad-sdk/config'; -import type { RoutingConfig, IssueRoutingRule } from '@bradygaster/squad-sdk/runtime'; +} from '@squad/sdk/config'; +import type { RoutingConfig, IssueRoutingRule } from '@squad/sdk/runtime'; describe('parseRoutingMarkdown', () => { it('parses basic routing table', () => { diff --git a/test/scratch-dir.test.ts b/test/scratch-dir.test.ts index e93d23cb9..da66821de 100644 --- a/test/scratch-dir.test.ts +++ b/test/scratch-dir.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { scratchDir, scratchFile } from '@bradygaster/squad-sdk'; +import { scratchDir, scratchFile } from '@squad/sdk'; import { mkdirSync, rmSync, existsSync, readFileSync } from 'node:fs'; import path from 'node:path'; import os from 'node:os'; diff --git a/test/scripts/crlf-worktree-repair.test.ts b/test/scripts/crlf-worktree-repair.test.ts index 13cf9fce4..8189b2048 100644 --- a/test/scripts/crlf-worktree-repair.test.ts +++ b/test/scripts/crlf-worktree-repair.test.ts @@ -16,7 +16,7 @@ import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { afterEach, describe, expect, it } from 'vitest'; -import { checkWorktreeEol } from '@bradygaster/squad-cli/commands/doctor'; +import { checkWorktreeEol } from '@squad/cli/commands/doctor'; import { listContentModified, listWorktreeCrlf } from '../../scripts/check-shebang-eol.mjs'; import { repair } from '../../scripts/fix-crlf-worktree.mjs'; diff --git a/test/sdk-real-session.test.ts b/test/sdk-real-session.test.ts index 64c5c8d7f..374643f6b 100644 --- a/test/sdk-real-session.test.ts +++ b/test/sdk-real-session.test.ts @@ -13,7 +13,7 @@ import { describe, it, expect } from 'vitest'; import { CopilotSession } from '@github/copilot-sdk'; -import { normalizeToolNameForCopilot } from '@bradygaster/squad-sdk/client'; +import { normalizeToolNameForCopilot } from '@squad/sdk/client'; import type { MessageConnection } from 'vscode-jsonrpc/node'; import type { Tool } from '@github/copilot-sdk'; diff --git a/test/sdk/squad-decide-inbox.test.ts b/test/sdk/squad-decide-inbox.test.ts index fe9ff0319..0e265bdc7 100644 --- a/test/sdk/squad-decide-inbox.test.ts +++ b/test/sdk/squad-decide-inbox.test.ts @@ -9,8 +9,8 @@ */ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { ToolRegistry, resolveDecisionInboxDir, isMutableStateKey, type DecisionRecord } from '@bradygaster/squad-sdk/tools'; -import { FSStorageProvider } from '@bradygaster/squad-sdk'; +import { ToolRegistry, resolveDecisionInboxDir, isMutableStateKey, type DecisionRecord } from '@squad/sdk/tools'; +import { FSStorageProvider } from '@squad/sdk'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { randomUUID } from 'node:crypto'; diff --git a/test/sdk/squad-route.test.ts b/test/sdk/squad-route.test.ts index ca9e3417f..ad65225f4 100644 --- a/test/sdk/squad-route.test.ts +++ b/test/sdk/squad-route.test.ts @@ -20,10 +20,10 @@ */ import { describe, it, expect, vi } from 'vitest'; -import { ToolRegistry, type RouteRequest } from '@bradygaster/squad-sdk/tools'; -import { SessionPool, EventBus } from '@bradygaster/squad-sdk/client'; -import type { FanOutDependencies } from '@bradygaster/squad-sdk/coordinator'; -import type { AgentCharter } from '@bradygaster/squad-sdk/agents'; +import { ToolRegistry, type RouteRequest } from '@squad/sdk/tools'; +import { SessionPool, EventBus } from '@squad/sdk/client'; +import type { FanOutDependencies } from '@squad/sdk/coordinator'; +import type { AgentCharter } from '@squad/sdk/agents'; /** * Build mocked FanOutDependencies wired only at the documented public boundary diff --git a/test/self-upgrade.test.ts b/test/self-upgrade.test.ts index 24a8adf70..ba2fa8818 100644 --- a/test/self-upgrade.test.ts +++ b/test/self-upgrade.test.ts @@ -44,7 +44,7 @@ describe('squad upgrade --self', () => { path.join(process.cwd(), 'packages', 'squad-cli', 'src', 'cli', 'core', 'upgrade.ts'), 'utf-8', ); - expect(upgradeSource).toContain("@bradygaster/squad-cli"); + expect(upgradeSource).toContain("@squad/cli"); expect(upgradeSource).toContain("'insider'"); expect(upgradeSource).toContain("'latest'"); }); diff --git a/test/session-adapter.test.ts b/test/session-adapter.test.ts index 20d572bed..883087bee 100644 --- a/test/session-adapter.test.ts +++ b/test/session-adapter.test.ts @@ -45,7 +45,7 @@ function createMockCopilotSession(sessionId = 'test-session-42') { // We test the adapter indirectly by importing SquadClient and stubbing internals. // The adapter is constructed inside createSession(), so we mock the CopilotClient. -import { SquadClient } from '@bradygaster/squad-sdk/client'; +import { SquadClient } from '@squad/sdk/client'; describe('CopilotSessionAdapter (via SquadClient)', () => { /** Helper: create a SquadClient wired to our mock */ diff --git a/test/session-store.test.ts b/test/session-store.test.ts index 01362aa4a..f597e32af 100644 --- a/test/session-store.test.ts +++ b/test/session-store.test.ts @@ -13,9 +13,9 @@ import { loadLatestSession, listSessions, loadSessionById, -} from '@bradygaster/squad-cli/shell/session-store'; -import type { SessionData } from '@bradygaster/squad-cli/shell/session-store'; -import type { ShellMessage } from '@bradygaster/squad-cli/shell/types'; +} from '@squad/cli/shell/session-store'; +import type { SessionData } from '@squad/cli/shell/session-store'; +import type { ShellMessage } from '@squad/cli/shell/types'; let tmpRoot: string; diff --git a/test/session-traces.test.ts b/test/session-traces.test.ts index 33026f995..1d1295cdd 100644 --- a/test/session-traces.test.ts +++ b/test/session-traces.test.ts @@ -8,13 +8,13 @@ */ import { describe, it, expect, beforeEach, vi } from 'vitest'; -import { SquadClient } from '@bradygaster/squad-sdk/client'; +import { SquadClient } from '@squad/sdk/client'; import { CopilotClient } from '@github/copilot-sdk'; import { StreamingPipeline, type StreamDelta, type UsageEvent, -} from '@bradygaster/squad-sdk/runtime/streaming'; +} from '@squad/sdk/runtime/streaming'; // Mock CopilotClient vi.mock('@github/copilot-sdk', () => { @@ -56,8 +56,8 @@ vi.mock('@github/copilot-sdk', () => { }); // Mock otel-metrics to verify they're called -vi.mock('@bradygaster/squad-sdk/runtime/otel-metrics', async (importOriginal) => { - const orig = await importOriginal(); +vi.mock('@squad/sdk/runtime/otel-metrics', async (importOriginal) => { + const orig = await importOriginal(); return { ...orig, recordTimeToFirstToken: vi.fn(), @@ -71,7 +71,7 @@ import { recordTimeToFirstToken, recordResponseDuration, recordTokensPerSecond, -} from '@bradygaster/squad-sdk/runtime/otel-metrics'; +} from '@squad/sdk/runtime/otel-metrics'; // ============================================================================ // #259 — SquadClient.sendMessage() diff --git a/test/sharing-advanced.test.ts b/test/sharing-advanced.test.ts index a271b54b3..0bb4fcfd4 100644 --- a/test/sharing-advanced.test.ts +++ b/test/sharing-advanced.test.ts @@ -12,7 +12,7 @@ import { clearVersionStore, type VersionPin, type AgentVersionResolver, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { configureAgentRepo, listRepoAgents, @@ -20,14 +20,14 @@ import { pushAgent, type AgentRepoConfig, type AgentRepoOperations, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { AgentCache, DEFAULT_AGENT_TTL, DEFAULT_SKILL_TTL, type CacheEntry, type CacheStats, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { detectConflicts, resolveConflicts, @@ -35,9 +35,9 @@ import { type IncomingBundle, type Conflict, type ConflictStrategy, -} from '@bradygaster/squad-sdk/sharing'; -import type { AgentDefinition } from '@bradygaster/squad-sdk/config'; -import type { SquadConfig } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/sharing'; +import type { AgentDefinition } from '@squad/sdk/config'; +import type { SquadConfig } from '@squad/sdk/config'; // ===== Helpers ===== diff --git a/test/sharing.test.ts b/test/sharing.test.ts index 2a014f8bb..460bec18a 100644 --- a/test/sharing.test.ts +++ b/test/sharing.test.ts @@ -11,18 +11,18 @@ import { anonymizeContent, type ExportBundle, type ExportOptions, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { importSquadConfig, deserializeBundle, validateBundle, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; import { splitHistory, mergeHistory, type AgentHistory, type HistoryEntry, -} from '@bradygaster/squad-sdk/sharing'; +} from '@squad/sdk/sharing'; // --- Helpers --- diff --git a/test/shell-integration.test.ts b/test/shell-integration.test.ts index 2d1545314..831357eda 100644 --- a/test/shell-integration.test.ts +++ b/test/shell-integration.test.ts @@ -13,15 +13,15 @@ import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; -import { SessionRegistry } from '@bradygaster/squad-cli/shell/sessions'; -import { ShellLifecycle, type LifecycleOptions, type DiscoveredAgent } from '@bradygaster/squad-cli/shell/lifecycle'; -import { ShellRenderer } from '@bradygaster/squad-cli/shell/render'; -import { parseInput, type ParsedInput, type MessageType } from '@bradygaster/squad-cli/shell/router'; +import { SessionRegistry } from '@squad/cli/shell/sessions'; +import { ShellLifecycle, type LifecycleOptions, type DiscoveredAgent } from '@squad/cli/shell/lifecycle'; +import { ShellRenderer } from '@squad/cli/shell/render'; +import { parseInput, type ParsedInput, type MessageType } from '@squad/cli/shell/router'; import { parseCoordinatorResponse, formatConversationContext, type RoutingDecision, -} from '@bradygaster/squad-cli/shell/coordinator'; +} from '@squad/cli/shell/coordinator'; // ============================================================================ // Helpers diff --git a/test/shell-metrics.test.ts b/test/shell-metrics.test.ts index 640f81f33..1396f35ed 100644 --- a/test/shell-metrics.test.ts +++ b/test/shell-metrics.test.ts @@ -47,7 +47,7 @@ function createSpyMeter(): SpyMeter { let spyMeter: SpyMeter; -vi.mock('@bradygaster/squad-sdk', () => ({ +vi.mock('@squad/sdk', () => ({ getMeter: () => spyMeter, })); @@ -59,7 +59,7 @@ import { recordShellError, isShellTelemetryEnabled, _resetShellMetrics, -} from '@bradygaster/squad-cli/shell/shell-metrics'; +} from '@squad/cli/shell/shell-metrics'; // --------------------------------------------------------------------------- // Helpers diff --git a/test/shell-polish.test.ts b/test/shell-polish.test.ts index 46f98f926..3bdd6f5d0 100644 --- a/test/shell-polish.test.ts +++ b/test/shell-polish.test.ts @@ -14,17 +14,17 @@ import { describe, it, expect } from 'vitest'; import { createCompleter } from '../packages/squad-cli/src/cli/shell/autocomplete.js'; -import { executeCommand, type CommandContext } from '@bradygaster/squad-cli/shell/commands'; -import { parseInput } from '@bradygaster/squad-cli/shell/router'; -import { SessionRegistry } from '@bradygaster/squad-cli/shell/sessions'; -import { ShellRenderer } from '@bradygaster/squad-cli/shell/render'; +import { executeCommand, type CommandContext } from '@squad/cli/shell/commands'; +import { parseInput } from '@squad/cli/shell/router'; +import { SessionRegistry } from '@squad/cli/shell/sessions'; +import { ShellRenderer } from '@squad/cli/shell/render'; import { timeoutGuidance, unknownCommandGuidance, genericGuidance, formatGuidance, -} from '@bradygaster/squad-cli/shell/error-messages'; -import { StreamBridge } from '@bradygaster/squad-cli/shell/stream-bridge'; +} from '@squad/cli/shell/error-messages'; +import { StreamBridge } from '@squad/cli/shell/stream-bridge'; // ============================================================================ // 1. Autocomplete — all slash commands present diff --git a/test/shell.test.ts b/test/shell.test.ts index 8c3867b06..141c76a62 100644 --- a/test/shell.test.ts +++ b/test/shell.test.ts @@ -8,21 +8,21 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { join } from 'node:path'; -import { SessionRegistry } from '@bradygaster/squad-cli/shell/sessions'; +import { SessionRegistry } from '@squad/cli/shell/sessions'; import { loadAgentCharter, buildAgentPrompt, -} from '@bradygaster/squad-cli/shell/spawn'; +} from '@squad/cli/shell/spawn'; import { buildCoordinatorPrompt, parseCoordinatorResponse, formatConversationContext, -} from '@bradygaster/squad-cli/shell/coordinator'; -import { ShellLifecycle } from '@bradygaster/squad-cli/shell/lifecycle'; -import { StreamBridge } from '@bradygaster/squad-cli/shell/stream-bridge'; -import { ShellRenderer } from '@bradygaster/squad-cli/shell/render'; -import type { ShellMessage } from '@bradygaster/squad-cli/shell/types'; -import type { StreamDelta, UsageEvent, ReasoningDelta } from '@bradygaster/squad-sdk/runtime/streaming'; +} from '@squad/cli/shell/coordinator'; +import { ShellLifecycle } from '@squad/cli/shell/lifecycle'; +import { StreamBridge } from '@squad/cli/shell/stream-bridge'; +import { ShellRenderer } from '@squad/cli/shell/render'; +import type { ShellMessage } from '@squad/cli/shell/types'; +import type { StreamDelta, UsageEvent, ReasoningDelta } from '@squad/sdk/runtime/streaming'; const FIXTURES = join(process.cwd(), 'test-fixtures'); diff --git a/test/skill-script-loader.test.ts b/test/skill-script-loader.test.ts index 581901922..e6ff964ad 100644 --- a/test/skill-script-loader.test.ts +++ b/test/skill-script-loader.test.ts @@ -9,9 +9,9 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; import { randomUUID } from 'node:crypto'; import { pathToFileURL } from 'node:url'; -import { SkillScriptLoader, resolveSkillPath } from '@bradygaster/squad-sdk/skills'; -import type { LoadResult } from '@bradygaster/squad-sdk/skills'; -import { ToolRegistry } from '@bradygaster/squad-sdk/tools'; +import { SkillScriptLoader, resolveSkillPath } from '@squad/sdk/skills'; +import type { LoadResult } from '@squad/sdk/skills'; +import { ToolRegistry } from '@squad/sdk/tools'; // --- Test fixtures and helpers --- diff --git a/test/skill-source.test.ts b/test/skill-source.test.ts index f8d2fb20e..af493a11b 100644 --- a/test/skill-source.test.ts +++ b/test/skill-source.test.ts @@ -12,8 +12,8 @@ import { SkillSourceRegistry, type SkillSource, type SkillManifest, -} from '@bradygaster/squad-sdk/skills'; -import type { GitHubFetcher } from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/skills'; +import type { GitHubFetcher } from '@squad/sdk/config'; // --- Helpers --- diff --git a/test/skills.test.ts b/test/skills.test.ts index 3daace399..d2ec99a24 100644 --- a/test/skills.test.ts +++ b/test/skills.test.ts @@ -13,7 +13,7 @@ import { parseFrontmatter, parseSkillFile, loadSkillsFromDirectory, -} from '@bradygaster/squad-sdk/skills'; +} from '@squad/sdk/skills'; // --- Helpers --- diff --git a/test/spawn-backend.test.ts b/test/spawn-backend.test.ts index a0d4d7b5c..67f74ee2f 100644 --- a/test/spawn-backend.test.ts +++ b/test/spawn-backend.test.ts @@ -4,7 +4,7 @@ import { TaskSpawnBackend, type CreateSessionFn, type SpawnHandle, -} from '@bradygaster/squad-sdk/coordinator'; +} from '@squad/sdk/coordinator'; describe('spawn backends', () => { it('TaskSpawnBackend creates a real session and sends the initial prompt', async () => { diff --git a/test/speed-gates.test.ts b/test/speed-gates.test.ts index 1caa7977b..4ebbc54cd 100644 --- a/test/speed-gates.test.ts +++ b/test/speed-gates.test.ts @@ -12,9 +12,9 @@ import { resolve } from 'node:path'; import { existsSync, mkdirSync, rmSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { TerminalHarness } from './acceptance/harness.js'; -import { parseInput } from '@bradygaster/squad-cli/shell/router'; -import { isInitNoColor } from '@bradygaster/squad-cli/core/init'; -import { loadWelcomeData } from '@bradygaster/squad-cli/shell/lifecycle'; +import { parseInput } from '@squad/cli/shell/router'; +import { isInitNoColor } from '@squad/cli/core/init'; +import { loadWelcomeData } from '@squad/cli/shell/lifecycle'; import { withGhostRetry } from '../packages/squad-cli/src/cli/shell/index.js'; // ============================================================================ diff --git a/test/squad-20-all-scenarios.e2e.test.ts b/test/squad-20-all-scenarios.e2e.test.ts index 584f1b968..8a1f52620 100644 --- a/test/squad-20-all-scenarios.e2e.test.ts +++ b/test/squad-20-all-scenarios.e2e.test.ts @@ -4,12 +4,12 @@ import os from 'node:os'; import path from 'node:path'; // keep the real SDK (squad upgrade code imports much of it); only resolveSquadState is stubbed -vi.mock('@bradygaster/squad-sdk', async (importOriginal) => ({ +vi.mock('@squad/sdk', async (importOriginal) => ({ ...(await importOriginal>()), resolveSquadState: vi.fn(), })); -import { resolveSquadState } from '@bradygaster/squad-sdk'; +import { resolveSquadState } from '@squad/sdk'; import { BACKEND_CONTRACT_STAGE, BACKEND_PROTOCOL_VERSION, @@ -24,7 +24,7 @@ import { type HarnessAdapter, type HarnessEventEnvelope, type SquadBackend, -} from '@bradygaster/squad-sdk/backend'; +} from '@squad/sdk/backend'; import { BLOCK_BEGIN, CLIENT_IDS, @@ -43,7 +43,7 @@ import { type ClientContext, type ClientId, type RuntimeBinding, -} from '@bradygaster/squad-sdk/clients'; +} from '@squad/sdk/clients'; import { backfillCastingRegistryFromTeam, ensureCastingRegistryPair, @@ -52,7 +52,7 @@ import { parseAgentProvenanceRegistry, readCastingRegistryPair, repairHandwrittenCastingRegistry, -} from '@bradygaster/squad-sdk/casting'; +} from '@squad/sdk/casting'; import { ensureCastingDefaults, ensureGitattributes, ensureGitignore, runUpgrade } from '../packages/squad-cli/src/cli/core/upgrade.js'; import { isInteractiveSession, runInit } from '../packages/squad-cli/src/cli/core/init.js'; import { persistClients } from '../packages/squad-cli/src/cli/core/clients.js'; @@ -63,7 +63,7 @@ import type { HarnessAdapter as CRHarness, HarnessEventEnvelope as CRHarnessEvent, SquadBackend as CRBackend, -} from '@bradygaster/squad-sdk/backend'; +} from '@squad/sdk/backend'; const SUITE = path.resolve(__dirname, '..', 'test-fixtures', 'spec', 'suite-v0.2'); const matrix = JSON.parse(fs.readFileSync(path.join(SUITE, 'capability-matrix.json'), 'utf8')) as { @@ -181,7 +181,7 @@ describe('Scenario 1: client projections and --client', () => { let root: string; const ctx = (over: Partial = {}): ClientContext => ({ root, - mcp: { command: 'npx', args: ['-y', '@bradygaster/squad-cli', 'state-mcp'] }, + mcp: { command: 'npx', args: ['-y', '@squad/cli', 'state-mcp'] }, ...over, }); beforeEach(() => { root = fs.mkdtempSync(path.join(os.tmpdir(), 'squad20-clients-')); }); @@ -777,7 +777,7 @@ describe('RC1→stable exit 1: upgrade and rollback from a v0.1 workspace', () = })); const ctx = (): ClientContext => ({ root, - mcp: { command: 'npx', args: ['-y', '@bradygaster/squad-cli', 'state-mcp'] }, + mcp: { command: 'npx', args: ['-y', '@squad/cli', 'state-mcp'] }, }); const readJson = (rel: string) => JSON.parse(fs.readFileSync(path.join(root, rel), 'utf8')); @@ -1151,8 +1151,8 @@ describe('RC1→stable exit 3: clean-room client and harness against the public it('exposes the required runtime surface through the public package exports', async () => { const rootIndexSrc = fs.readFileSync(path.resolve(__dirname, '..', 'packages/squad-sdk/src/index.ts'), 'utf8'); - const backendPkg = await import('@bradygaster/squad-sdk/backend'); - const clientsPkg = await import('@bradygaster/squad-sdk/clients'); + const backendPkg = await import('@squad/sdk/backend'); + const clientsPkg = await import('@squad/sdk/clients'); expect(BACKEND_CONTRACT_STAGE).toBe('experimental'); expect(backendPkg.BACKEND_CONTRACT_STAGE).toBe('experimental'); expect(rootIndexSrc).not.toMatch(/\.\/backend\//); @@ -1169,8 +1169,8 @@ describe('RC1→stable exit 3: clean-room client and harness against the public }); it('declares capabilities per matrix and negotiates the expected intersection for all five clients', async () => { - const { createSquadBackend: create } = await import('@bradygaster/squad-sdk/backend'); - const { getClientAdapter: adapterOf, CLIENT_IDS: ids } = await import('@bradygaster/squad-sdk/clients'); + const { createSquadBackend: create } = await import('@squad/sdk/backend'); + const { getClientAdapter: adapterOf, CLIENT_IDS: ids } = await import('@squad/sdk/clients'); const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'squad20-cleanroom-caps-')); try { const backend = create({ kind: 'local', squadDir: dir }); @@ -1186,7 +1186,7 @@ describe('RC1→stable exit 3: clean-room client and harness against the public }); it.each(['file-backed local', 'durable-http'] as const)('executes golden-trace.json end to end (%s)', async (mode) => { - const { createSquadBackend: create, DefaultHarnessRegistry: Registry } = await import('@bradygaster/squad-sdk/backend'); + const { createSquadBackend: create, DefaultHarnessRegistry: Registry } = await import('@squad/sdk/backend'); const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'squad20-cleanroom-')); try { const approval = ev('approval.requested'); @@ -1720,9 +1720,9 @@ describe('claude .gitignore marker block is projected and rolled back', () => { }); }); describe('client adapter contract is exposed canonically and through the deprecated /clients alias', () => { - it('@bradygaster/squad-sdk/client and /clients export the same adapter symbols', async () => { - const canonical = await import('@bradygaster/squad-sdk/client'); - const alias = await import('@bradygaster/squad-sdk/clients'); + it('@squad/sdk/client and /clients export the same adapter symbols', async () => { + const canonical = await import('@squad/sdk/client'); + const alias = await import('@squad/sdk/clients'); for (const name of ['createClientAdapter', 'AdapterUnboundError', 'CAPABILITY_TOKENS_BY_HOST', 'capabilityFlagsFromTokens', 'resolveEffectiveCapabilityTokens', 'getClientAdapter', 'installClients', 'CLIENT_IDS']) { expect(canonical, name).toHaveProperty(name); @@ -1731,7 +1731,7 @@ describe('client adapter contract is exposed canonically and through the depreca }); it('R3-12: CAPABILITY_TOKENS_BY_HOST carries the full capability-matrix baseline for all 7 hosts', async () => { - const { CAPABILITY_TOKENS_BY_HOST, resolveEffectiveCapabilityTokens } = await import('@bradygaster/squad-sdk/client'); + const { CAPABILITY_TOKENS_BY_HOST, resolveEffectiveCapabilityTokens } = await import('@squad/sdk/client'); const projection = new Set(['native-hooks', 'steering-files']); for (const id of CLIENT_IDS) { const declared = CAPABILITY_TOKENS_BY_HOST[id]; @@ -1749,7 +1749,7 @@ describe('client adapter contract is exposed canonically and through the depreca }); it('every host declares tokens that map onto the capability flags consistently', async () => { - const { CAPABILITY_TOKENS_BY_HOST, capabilityFlagsFromTokens } = await import('@bradygaster/squad-sdk/client'); + const { CAPABILITY_TOKENS_BY_HOST, capabilityFlagsFromTokens } = await import('@squad/sdk/client'); expect(Object.keys(CAPABILITY_TOKENS_BY_HOST).sort()).toEqual([...CLIENT_IDS].sort()); for (const id of CLIENT_IDS) { const flags = capabilityFlagsFromTokens(CAPABILITY_TOKENS_BY_HOST[id], getClientAdapter(id).capabilities.transportModes); @@ -2005,7 +2005,7 @@ describe('Brady re-review 13 defect repros', () => { }); it('11. TOML [[array_table]] boundaries and quoted keys survive upsert/remove', async () => { - const { upsertTomlTable, removeTomlTable } = await import('@bradygaster/squad-sdk/client'); + const { upsertTomlTable, removeTomlTable } = await import('@squad/sdk/client'); const doc = '[mcp_servers.squad_state]\n"command" = "old"\n\n[[skills.config]]\npath = "/a"\n'; const out = upsertTomlTable(doc, 'mcp_servers.squad_state', { command: '"squad"' }); expect(out.match(/command\s*=/g)).toHaveLength(1); @@ -2014,7 +2014,7 @@ describe('Brady re-review 13 defect repros', () => { }); it('12. capability tokens match capability-matrix.json for all 7 hosts', async () => { - const { CAPABILITY_TOKENS_BY_HOST } = await import('@bradygaster/squad-sdk/client'); + const { CAPABILITY_TOKENS_BY_HOST } = await import('@squad/sdk/client'); for (const id of CLIENT_IDS) { expect(CAPABILITY_TOKENS_BY_HOST[id].filter(t => !['native-hooks', 'steering-files'].includes(t)).sort()).toEqual([...matrix.clients[id]!.clientCapabilities].sort()); } @@ -2077,7 +2077,7 @@ describe('Open review threads on #2239', () => { mcpServers: { squad_state: { command: '"npx"', - args: ['-y', '@bradygaster/squad-cli@0.9.1', 'state-mcp'], + args: ['-y', '@squad/cli@0.9.1', 'state-mcp'], }, }, }, null, 2)); diff --git a/test/squad-20-pack-smoke.test.ts b/test/squad-20-pack-smoke.test.ts index 45c7d2bf7..fc7508ad0 100644 --- a/test/squad-20-pack-smoke.test.ts +++ b/test/squad-20-pack-smoke.test.ts @@ -1,10 +1,10 @@ /** * Squad 2.0 Packed Clean-Install & v1.1.0 → 2.0 Upgrade/Rollback Smoke Test * - * Packs `@bradygaster/squad-sdk` and `@bradygaster/squad-cli` via `npm pack`, + * Packs `@squad/sdk` and `@squad/cli` via `npm pack`, * unpacks the published tarball artifacts into an isolated directory, and verifies: * 1. Tarball contents include `/client`, `/clients`, `/backend`, `templates/`, and `dist/cli-entry.js` without leaking `.squad/`. - * 2. Subpath exports (`@bradygaster/squad-sdk/client`, `/clients`, `/backend`) resolve from the packed artifact. + * 2. Subpath exports (`@squad/sdk/client`, `/clients`, `/backend`) resolve from the packed artifact. * 3. Clean `squad init --client claude,codex` from the packed CLI scaffolds `.squad/` and host projections. * 4. Upgrading a v1.1.0 workspace with `squad upgrade --client all --force` repairs a handwritten casting registry, * preserves user `.squad/` state and `.mcp.json` / `CLAUDE.md` content, projects all 7 hosts, and rolls back @@ -55,7 +55,7 @@ describe('Squad 2.0 npm pack clean-install and v1.1.0 → 2.0 upgrade/rollback s const sdkTarball = packPkg(sdkDir); const cliTarball = packPkg(cliDir); - // Unpack both tarballs into stagingDir/node_modules/@bradygaster/{squad-sdk,squad-cli} + // Unpack both tarballs into stagingDir/node_modules/@squad/{sdk,cli} const unpackInto = (tarball: string, destDir: string) => { const extractTmp = mkdtempSync(join(stagingDir, 'extract-')); execFileSync('tar', ['-xzf', tarball, '-C', extractTmp], { stdio: 'ignore' }); @@ -64,8 +64,8 @@ describe('Squad 2.0 npm pack clean-install and v1.1.0 → 2.0 upgrade/rollback s rmSync(extractTmp, { recursive: true, force: true }); }; - const unpackedSdk = join(stagingDir, 'node_modules', '@bradygaster', 'squad-sdk'); - const unpackedCli = join(stagingDir, 'node_modules', '@bradygaster', 'squad-cli'); + const unpackedSdk = join(stagingDir, 'node_modules', '@squad', 'sdk'); + const unpackedCli = join(stagingDir, 'node_modules', '@squad', 'cli'); unpackInto(sdkTarball, unpackedSdk); unpackInto(cliTarball, unpackedCli); @@ -95,8 +95,8 @@ describe('Squad 2.0 npm pack clean-install and v1.1.0 → 2.0 upgrade/rollback s }); it('packs dist/client, dist/clients, dist/backend, templates, and cli-entry.js without leaking .squad state', () => { - const unpackedSdk = join(stagingDir, 'node_modules', '@bradygaster', 'squad-sdk'); - const unpackedCli = join(stagingDir, 'node_modules', '@bradygaster', 'squad-cli'); + const unpackedSdk = join(stagingDir, 'node_modules', '@squad', 'sdk'); + const unpackedCli = join(stagingDir, 'node_modules', '@squad', 'cli'); for (const rel of [ 'dist/index.js', @@ -113,11 +113,11 @@ describe('Squad 2.0 npm pack clean-install and v1.1.0 → 2.0 upgrade/rollback s expect(existsSync(join(unpackedCli, '.squad'))).toBe(false); }); - it('resolves @bradygaster/squad-sdk/client, /clients, and /backend from the packed artifact', () => { + it('resolves @squad/sdk/client, /clients, and /backend from the packed artifact', () => { const script = [ - 'const client = await import("@bradygaster/squad-sdk/client");', - 'const clients = await import("@bradygaster/squad-sdk/clients");', - 'const backend = await import("@bradygaster/squad-sdk/backend");', + 'const client = await import("@squad/sdk/client");', + 'const clients = await import("@squad/sdk/clients");', + 'const backend = await import("@squad/sdk/backend");', 'if (client.installClients !== clients.installClients) throw new Error("alias mismatch");', 'if (backend.BACKEND_CONTRACT_STAGE !== "experimental") throw new Error("unexpected stage");', 'console.log(JSON.stringify({ clients: client.CLIENT_IDS, stage: backend.BACKEND_CONTRACT_STAGE }));', @@ -244,7 +244,7 @@ describe('Squad 2.0 npm pack clean-install and v1.1.0 → 2.0 upgrade/rollback s // 4. Byte-preserving rollback via uninstallClients from the packed SDK const rollbackScript = [ - 'import { uninstallClients, CLIENT_IDS } from "@bradygaster/squad-sdk/client";', + 'import { uninstallClients, CLIENT_IDS } from "@squad/sdk/client";', `const res = uninstallClients(CLIENT_IDS, { root: ${JSON.stringify(v110Repo)}, mcp: { command: "squad", args: ["state-mcp"] } });`, 'if (res.some(r => r.action === "error")) throw new Error(JSON.stringify(res));', ].join(' '); diff --git a/test/squad-20-preview-tarball-matrix.test.ts b/test/squad-20-preview-tarball-matrix.test.ts index 8e32213e0..e0060b4eb 100644 --- a/test/squad-20-preview-tarball-matrix.test.ts +++ b/test/squad-20-preview-tarball-matrix.test.ts @@ -246,7 +246,13 @@ describe('upgrade-matrix.json integrity', () => { if (p.source === 'npm') { expect('registry' in p.artifacts, `${p.version}: npm producer needs artifacts.registry`).toBe(true); const reg = (p.artifacts as { registry: Record }).registry; - for (const name of ['@bradygaster/squad-cli', '@bradygaster/squad-sdk']) { + // Producers are pinned under the npm names they were published with (current or legacy). + const identity = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'scripts', 'release', 'distribution-identity.json'), 'utf8')) as { + npm: Record<'cli' | 'sdk', { current: string; legacy: string[] }>; + }; + const pairs = [identity.npm.cli, identity.npm.sdk].map((e) => [e.current, ...e.legacy]); + const names = pairs.map((candidates) => candidates.find((n) => n in reg) ?? candidates[0]); + for (const name of names) { const a = reg[name]; expect(a, `${p.version}: missing pinned ${name}`).toBeDefined(); expect(a!.version, `${p.version}: ${name} must be pinned to the exact producer version`).toBe(p.version); @@ -695,7 +701,7 @@ async function npmCmd(args: string[], cwd: string, env: NodeJS.ProcessEnv): Prom } /** - * npm producer: fetch the exact pinned tarballs of @bradygaster/squad-cli and @bradygaster/squad-sdk + * npm producer: fetch the exact pinned tarballs of @squad/cli and @squad/sdk * (`npm pack`, through whatever registry npm is configured for), verify sha1 + sha512 against the * fixture (mismatch → FAIL, not skip), then install both tarballs into an isolated prefix so the old * CLI runs against the SDK version it shipped with — never a floating `>=` resolution. @@ -703,7 +709,7 @@ async function npmCmd(args: string[], cwd: string, env: NodeJS.ProcessEnv): Prom async function resolveNpmProducer(spec: ProducerSpec): Promise { const reg = (spec.artifacts as { registry: Record }).registry; const dir = path.join(CACHE_ROOT, 'producers', `npm-${spec.version}`); - const entry = path.join(dir, 'node_modules', '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'); + const entry = path.join(dir, 'node_modules', '@squad', 'cli', 'dist', 'cli-entry.js'); const registry = process.env['NPM_CONFIG_REGISTRY'] ?? process.env['npm_config_registry']; const provenance = Object.entries(reg).map(([n, a]) => `${n}@${a.version} ${a.integrity}`).join('; '); const verifiedMarker = path.join(dir, '.verified'); @@ -736,10 +742,10 @@ async function resolveNpmProducer(spec: ProducerSpec): Promise { rmrf(dir); return { spec, exec: null, skipReason: `npm install of the verified ${spec.version} tarballs failed: ${tail(installed.stderr || installed.stdout, 2) || `exit ${installed.code}`}` }; } - const sdkVersion = readJson<{ version: string }>(path.join(dir, 'node_modules', '@bradygaster', 'squad-sdk', 'package.json'))?.version; - if (sdkVersion !== reg['@bradygaster/squad-sdk']!.version) { + const sdkVersion = readJson<{ version: string }>(path.join(dir, 'node_modules', '@squad', 'sdk', 'package.json'))?.version; + if (sdkVersion !== reg['@squad/sdk']!.version) { rmrf(dir); - return { spec, exec: null, failReason: `installed @bradygaster/squad-sdk@${sdkVersion ?? '?'} instead of the pinned ${reg['@bradygaster/squad-sdk']!.version}` }; + return { spec, exec: null, failReason: `installed @squad/sdk@${sdkVersion ?? '?'} instead of the pinned ${reg['@squad/sdk']!.version}` }; } fs.writeFileSync(verifiedMarker, provenance + '\n'); } @@ -838,12 +844,12 @@ describe.skipIf(!ENABLED)('exact preview tarballs × old-version × OS × state- fs.renameSync(path.join(tmp, 'package'), dest); rmrf(tmp); }; - unpack(sdkTarball, path.join(staging, 'node_modules', '@bradygaster', 'squad-sdk')); - unpack(cliTarball, path.join(staging, 'node_modules', '@bradygaster', 'squad-cli')); + unpack(sdkTarball, path.join(staging, 'node_modules', '@squad', 'sdk')); + unpack(cliTarball, path.join(staging, 'node_modules', '@squad', 'cli')); fs.writeFileSync(path.join(staging, 'package.json'), JSON.stringify({ name: 'squad-preview-matrix-consumer', private: true, type: 'module' }, null, 2) + '\n'); - const sdkDir = path.join(staging, 'node_modules', '@bradygaster', 'squad-sdk'); - const cliDir = path.join(staging, 'node_modules', '@bradygaster', 'squad-cli'); + const sdkDir = path.join(staging, 'node_modules', '@squad', 'sdk'); + const cliDir = path.join(staging, 'node_modules', '@squad', 'cli'); const sdkManifest = readJson<{ version: string; exports?: Record }>(path.join(sdkDir, 'package.json'))!; const cliManifest = readJson<{ version: string; exports?: Record }>(path.join(cliDir, 'package.json'))!; newVersion = cliManifest.version; @@ -863,7 +869,7 @@ describe.skipIf(!ENABLED)('exact preview tarballs × old-version × OS × state- const exportProblems = [...validateExportTargets(cliDir, cliManifest.exports), ...validateExportTargets(sdkDir, sdkManifest.exports)]; const version = await run(newCli.file, [...newCli.args, '--version'], { cwd: staging, env: { ...process.env, ...newCli.env }, timeout: 30_000 }); const selfUpgradeScript = [ - 'import { selfUpgradeCli, selfUpgradeCommand } from "@bradygaster/squad-cli/core/upgrade";', + 'import { selfUpgradeCli, selfUpgradeCommand } from "@squad/cli/core/upgrade";', `const currentVersion = ${JSON.stringify(expectedVersion)};`, `const insiderVersion = ${JSON.stringify(insiderVersion)};`, 'const got = [];', @@ -877,9 +883,9 @@ describe.skipIf(!ENABLED)('exact preview tarballs × old-version × OS × state- ].join(' '); const selfUpgrade = await run(process.execPath, ['--input-type=module', '-e', selfUpgradeScript], { cwd: staging, env: { ...process.env, ...newCli.env }, timeout: 30_000 }); const expectedCommands = new Map([ - ['npm', { latest: 'npm install -g @bradygaster/squad-cli@latest', insider: 'npm install -g @bradygaster/squad-cli@insider' }], - ['pnpm', { latest: 'pnpm add -g @bradygaster/squad-cli@latest', insider: 'pnpm add -g @bradygaster/squad-cli@insider' }], - ['yarn', { latest: 'yarn global add @bradygaster/squad-cli@latest', insider: 'yarn global add @bradygaster/squad-cli@insider' }], + ['npm', { latest: 'npm install -g @squad/cli@latest', insider: 'npm install -g @squad/cli@insider' }], + ['pnpm', { latest: 'pnpm add -g @squad/cli@latest', insider: 'pnpm add -g @squad/cli@insider' }], + ['yarn', { latest: 'yarn global add @squad/cli@latest', insider: 'yarn global add @squad/cli@insider' }], ]); type SelfUpgradeProbe = { pm: string; @@ -1336,7 +1342,7 @@ describe.skipIf(!ENABLED)('exact preview tarballs × old-version × OS × state- s.notes.push(`plain upgrade changed ${delta.length} working-tree path(s), all Squad-owned: ${delta.length <= 6 ? delta.join(', ') : `${delta.slice(0, 4).join(', ')} … (+${delta.length - 4})`}${branchBefore ? `; squad-state blobs for ${Object.keys(branchSeeded).length} seeded path(s) identical` : ''}`); const castingScript = [ - 'import { readCastingRegistryPair } from "@bradygaster/squad-sdk/casting";', + 'import { readCastingRegistryPair } from "@squad/sdk/casting";', `const pair = readCastingRegistryPair(${JSON.stringify(path.join(project, '.squad', 'casting'))});`, 'const reg = pair.registry; const agents = reg && reg.agents ? Object.keys(reg.agents) : [];', 'if (!reg || typeof reg.revision !== "number" || !pair.history) throw new Error("registry/history pair invalid: " + JSON.stringify({ hasRegistry: !!reg, revision: reg && reg.revision, hasHistory: !!pair.history }));', @@ -1453,7 +1459,7 @@ describe.skipIf(!ENABLED)('exact preview tarballs × old-version × OS × state- // installed into shared MCP configs are removed, (b) remove every host projection and every // Squad-owned entry from host configs, and (c) leave .squad/ user state untouched. const uninstallScript = [ - 'import { uninstallClients, CLIENT_IDS } from "@bradygaster/squad-sdk/client";', + 'import { uninstallClients, CLIENT_IDS } from "@squad/sdk/client";', `const res = uninstallClients(CLIENT_IDS, { root: ${JSON.stringify(project)}, mcp: { command: "squad", args: ["state-mcp"] } });`, 'const errors = res.filter(r => r.action === "error"); if (errors.length) throw new Error(JSON.stringify(errors));', ].join(' '); diff --git a/test/squad-20-real-clients-stdio.e2e.test.ts b/test/squad-20-real-clients-stdio.e2e.test.ts index 0a59f9a53..e8f8f65c2 100644 --- a/test/squad-20-real-clients-stdio.e2e.test.ts +++ b/test/squad-20-real-clients-stdio.e2e.test.ts @@ -51,8 +51,8 @@ const SDK_SRC = ${JSON.stringify(SDK_SRC)}; const isFile = (p) => fs.existsSync(p) && fs.statSync(p).isFile(); const hit = (f) => ({ url: pathToFileURL(f).href, shortCircuit: true }); export async function resolve(spec, ctx, next) { - if (spec === '@bradygaster/squad-sdk') return hit(path.join(SDK_SRC, 'index.ts')); - const m = /^@bradygaster\\/squad-sdk\\/(.+)$/.exec(spec); + if (spec === '@squad/sdk') return hit(path.join(SDK_SRC, 'index.ts')); + const m = /^@squad\\/sdk\\/(.+)$/.exec(spec); if (m) for (const c of [m[1] + '/index.ts', m[1] + '.ts']) if (isFile(path.join(SDK_SRC, c))) return hit(path.join(SDK_SRC, c)); if ((spec.startsWith('./') || spec.startsWith('../')) && spec.endsWith('.js') && ctx.parentURL && ctx.parentURL.startsWith('file:')) { const f = fileURLToPath(new URL(spec.slice(0, -3) + '.ts', ctx.parentURL)); diff --git a/test/squad-20-security-contracts.test.ts b/test/squad-20-security-contracts.test.ts index 2d6358d0f..23543866c 100644 --- a/test/squad-20-security-contracts.test.ts +++ b/test/squad-20-security-contracts.test.ts @@ -2,8 +2,8 @@ * Squad 2.0 security & isolation contract suite. * Spec: docs/proposals/squad-2.0-security-and-isolation.md * - * Every test here exercises SHIPPED product code (`@bradygaster/squad-sdk/backend`, - * `@bradygaster/squad-sdk/client`, `squad-cli/core/backend-mcp`). Properties the proposal lists + * Every test here exercises SHIPPED product code (`@squad/sdk/backend`, + * `@squad/sdk/client`, `squad-cli/core/backend-mcp`). Properties the proposal lists * under "Future work / not implemented" have no test here on purpose: a test that only proves * its own fixture is not evidence. */ @@ -161,7 +161,7 @@ describe('G1 path containment: client projections (resolveInsideRoot)', () => { // ---------- G2: MCP config merge ---------- describe('G2 MCP config merge (mergeMcpServer / installClients)', () => { - const launch = { command: 'npx', args: ['-y', '@bradygaster/squad-cli', 'state-mcp'] }; + const launch = { command: 'npx', args: ['-y', '@squad/cli', 'state-mcp'] }; const ctx = (): ClientContext => ({ root, mcp: launch }); it('preserves unrelated servers and top-level keys', () => { diff --git a/test/squad-20-upgrade-matrix.test.ts b/test/squad-20-upgrade-matrix.test.ts index 30e5caa28..1bb7f3e43 100644 --- a/test/squad-20-upgrade-matrix.test.ts +++ b/test/squad-20-upgrade-matrix.test.ts @@ -51,6 +51,17 @@ const RENDERER = pathToFileURL(path.join(ROOT, 'scripts', 'render-upgrade-matrix const ENABLED = process.env['SQUAD_UPGRADE_MATRIX'] === '1'; const PLATFORM = process.platform; +// Package names come from the distribution identity file: the tree under test is packed under the +// current names, while pinned npm producers were published under whichever identity was current then. +interface IdentityEntry { current: string; legacy: string[] } +const IDENTITY = JSON.parse(fs.readFileSync(path.join(ROOT, 'scripts', 'release', 'distribution-identity.json'), 'utf8')) as { npm: { cli: IdentityEntry; sdk: IdentityEntry } }; +const CLI_PKG = IDENTITY.npm.cli.current; +const SDK_PKG = IDENTITY.npm.sdk.current; +const KNOWN_CLI_PKGS = [CLI_PKG, ...IDENTITY.npm.cli.legacy]; +const KNOWN_SDK_PKGS = [SDK_PKG, ...IDENTITY.npm.sdk.legacy]; +const pinnedPackage = (reg: Record, known: string[]): string | undefined => known.find((n) => n in reg); +const installedPackageDir = (prefix: string, name: string): string => path.join(prefix, 'node_modules', ...name.split('/')); + // ─── fixture types ─────────────────────────────────────────────────────────── type CheckStatus = 'pass' | 'fail' | 'xfail' | 'xpass' | 'skipped'; @@ -196,9 +207,10 @@ describe('upgrade-matrix.json integrity', () => { if (p.source === 'npm') { expect('registry' in p.artifacts, `${p.version}: npm producer needs artifacts.registry`).toBe(true); const reg = (p.artifacts as { registry: Record }).registry; - for (const name of ['@bradygaster/squad-cli', '@bradygaster/squad-sdk']) { - const a = reg[name]; - expect(a, `${p.version}: missing pinned ${name}`).toBeDefined(); + for (const known of [KNOWN_CLI_PKGS, KNOWN_SDK_PKGS]) { + const name = pinnedPackage(reg, known); + expect(name, `${p.version}: missing pinned ${known.join(' | ')}`).toBeDefined(); + const a = reg[name!]; expect(a!.version, `${p.version}: ${name} must be pinned to the exact producer version`).toBe(p.version); expect(a!.shasum, `${p.version}: ${name} sha1 shasum`).toMatch(/^[0-9a-f]{40}$/); expect(a!.integrity, `${p.version}: ${name} sha512 integrity`).toMatch(/^sha512-[A-Za-z0-9+/]{86}==$/); @@ -602,7 +614,7 @@ async function npmCmd(args: string[], cwd: string, env: NodeJS.ProcessEnv): Prom } /** - * npm producer: fetch the exact pinned tarballs of @bradygaster/squad-cli and @bradygaster/squad-sdk + * npm producer: fetch the exact pinned CLI + SDK tarballs, under the names they were published as * (`npm pack`, through whatever registry npm is configured for), verify sha1 + sha512 against the * fixture (mismatch → FAIL, not skip), then install both tarballs into an isolated prefix so the old * CLI runs against the SDK version it shipped with — never a floating `>=` resolution. @@ -610,7 +622,10 @@ async function npmCmd(args: string[], cwd: string, env: NodeJS.ProcessEnv): Prom async function resolveNpmProducer(spec: ProducerSpec): Promise { const reg = (spec.artifacts as { registry: Record }).registry; const dir = path.join(CACHE_ROOT, 'producers', `npm-${spec.version}`); - const entry = path.join(dir, 'node_modules', '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js'); + const cliPkg = pinnedPackage(reg, KNOWN_CLI_PKGS); + const sdkPkg = pinnedPackage(reg, KNOWN_SDK_PKGS); + if (!cliPkg || !sdkPkg) return { spec, exec: null, failReason: `${spec.version}: fixture pins no known CLI/SDK package (${Object.keys(reg).join(', ')})` }; + const entry = path.join(installedPackageDir(dir, cliPkg), 'dist', 'cli-entry.js'); const registry = process.env['NPM_CONFIG_REGISTRY'] ?? process.env['npm_config_registry']; const provenance = Object.entries(reg).map(([n, a]) => `${n}@${a.version} ${a.integrity}`).join('; '); const verifiedMarker = path.join(dir, '.verified'); @@ -643,10 +658,10 @@ async function resolveNpmProducer(spec: ProducerSpec): Promise { rmrf(dir); return { spec, exec: null, skipReason: `npm install of the verified ${spec.version} tarballs failed: ${tail(installed.stderr || installed.stdout, 2) || `exit ${installed.code}`}` }; } - const sdkVersion = readJson<{ version: string }>(path.join(dir, 'node_modules', '@bradygaster', 'squad-sdk', 'package.json'))?.version; - if (sdkVersion !== reg['@bradygaster/squad-sdk']!.version) { + const sdkVersion = readJson<{ version: string }>(path.join(installedPackageDir(dir, sdkPkg), 'package.json'))?.version; + if (sdkVersion !== reg[sdkPkg]!.version) { rmrf(dir); - return { spec, exec: null, failReason: `installed @bradygaster/squad-sdk@${sdkVersion ?? '?'} instead of the pinned ${reg['@bradygaster/squad-sdk']!.version}` }; + return { spec, exec: null, failReason: `installed ${sdkPkg}@${sdkVersion ?? '?'} instead of the pinned ${reg[sdkPkg]!.version}` }; } fs.writeFileSync(verifiedMarker, provenance + '\n'); } @@ -740,13 +755,13 @@ describe.skipIf(!ENABLED)('old-version × OS × state-shape upgrade matrix (SQUA fs.renameSync(path.join(tmp, 'package'), dest); rmrf(tmp); }; - unpack(pack(sdkDir), path.join(staging, 'node_modules', '@bradygaster', 'squad-sdk')); - unpack(pack(cliDir), path.join(staging, 'node_modules', '@bradygaster', 'squad-cli')); + unpack(pack(sdkDir), installedPackageDir(staging, SDK_PKG)); + unpack(pack(cliDir), installedPackageDir(staging, CLI_PKG)); fs.writeFileSync(path.join(staging, 'package.json'), JSON.stringify({ name: 'squad-upgrade-matrix-consumer', private: true, type: 'module' }, null, 2) + '\n'); - newVersion = (readJson<{ version: string }>(path.join(staging, 'node_modules', '@bradygaster', 'squad-cli', 'package.json')))!.version; + newVersion = (readJson<{ version: string }>(path.join(installedPackageDir(staging, CLI_PKG), 'package.json')))!.version; newCli = { file: process.execPath, - args: [path.join(staging, 'node_modules', '@bradygaster', 'squad-cli', 'dist', 'cli-entry.js')], + args: [path.join(installedPackageDir(staging, CLI_PKG), 'dist', 'cli-entry.js')], env: { NODE_PATH: [path.join(staging, 'node_modules'), path.join(ROOT, 'node_modules')].join(path.delimiter) }, }; @@ -1137,7 +1152,7 @@ describe.skipIf(!ENABLED)('old-version × OS × state-shape upgrade matrix (SQUA s.notes.push(`plain upgrade changed ${delta.length} working-tree path(s), all Squad-owned: ${delta.length <= 6 ? delta.join(', ') : `${delta.slice(0, 4).join(', ')} … (+${delta.length - 4})`}${branchBefore ? `; squad-state blobs for ${Object.keys(branchSeeded).length} seeded path(s) identical` : ''}`); const castingScript = [ - 'import { readCastingRegistryPair } from "@bradygaster/squad-sdk/casting";', + `import { readCastingRegistryPair } from "${SDK_PKG}/casting";`, `const pair = readCastingRegistryPair(${JSON.stringify(path.join(project, '.squad', 'casting'))});`, 'const reg = pair.registry; const agents = reg && reg.agents ? Object.keys(reg.agents) : [];', 'if (!reg || typeof reg.revision !== "number" || !pair.history) throw new Error("registry/history pair invalid: " + JSON.stringify({ hasRegistry: !!reg, revision: reg && reg.revision, hasHistory: !!pair.history }));', @@ -1231,7 +1246,7 @@ describe.skipIf(!ENABLED)('old-version × OS × state-shape upgrade matrix (SQUA // installed into shared MCP configs are removed, (b) remove every host projection and every // Squad-owned entry from host configs, and (c) leave .squad/ user state untouched. const uninstallScript = [ - 'import { uninstallClients, CLIENT_IDS } from "@bradygaster/squad-sdk/client";', + `import { uninstallClients, CLIENT_IDS } from "${SDK_PKG}/client";`, `const res = uninstallClients(CLIENT_IDS, { root: ${JSON.stringify(project)}, mcp: { command: "squad", args: ["state-mcp"] } });`, 'const errors = res.filter(r => r.action === "error"); if (errors.length) throw new Error(JSON.stringify(errors));', ].join(' '); diff --git a/test/squad-observer.test.ts b/test/squad-observer.test.ts index 673dae6cf..5f058f7df 100644 --- a/test/squad-observer.test.ts +++ b/test/squad-observer.test.ts @@ -14,8 +14,8 @@ import { BasicTracerProvider, } from '@opentelemetry/sdk-trace-base'; import { trace } from '@opentelemetry/api'; -import { SquadObserver, classifyFile } from '@bradygaster/squad-sdk/runtime/squad-observer'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +import { SquadObserver, classifyFile } from '@squad/sdk/runtime/squad-observer'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // --------------------------------------------------------------------------- // Test OTel infrastructure diff --git a/test/standalone-release-workflow.test.ts b/test/standalone-release-workflow.test.ts index ae3a3915a..15520f8b1 100644 --- a/test/standalone-release-workflow.test.ts +++ b/test/standalone-release-workflow.test.ts @@ -625,8 +625,8 @@ describe('reusable npm publication', () => { expect(serialized(publishJob())).not.toContain('npm ci'); expect(serialized(publishJob())).not.toContain(' run build'); expect(serialized(publishJob())).not.toContain('npm pack'); - expect(stepNamed(publishJob(), 'Stage SDK from the exact verified tarball').run).toContain('npm publish "$PACKS_DIR/bradygaster-squad-sdk-${VERSION}.tgz" --ignore-scripts'); - expect(stepNamed(publishJob(), 'Stage CLI from the exact verified tarball').run).toContain('npm publish "$PACKS_DIR/bradygaster-squad-cli-${VERSION}.tgz" --ignore-scripts'); + expect(stepNamed(publishJob(), 'Stage SDK from the exact verified tarball').run).toContain('npm publish "$PACKS_DIR/squad-sdk-${VERSION}.tgz" --ignore-scripts'); + expect(stepNamed(publishJob(), 'Stage CLI from the exact verified tarball').run).toContain('npm publish "$PACKS_DIR/squad-cli-${VERSION}.tgz" --ignore-scripts'); expect(npmPublishWorkflow.jobs.prepare.permissions).toEqual({ contents: 'read', actions: 'read' }); expect(npmPublishWorkflow.jobs.prepare).not.toHaveProperty('env.NODE_AUTH_TOKEN'); }); @@ -656,11 +656,11 @@ describe('reusable npm publication', () => { expect(classifyNpmRegistryScript).toContain('/\\bE404\\b|404 Not Found/i'); expect(classifyNpmRegistryScript).toContain("state: 'unknown'"); expect(classifyNpmRegistryScript).toContain("state: 'conflict'"); - expect(stepNamed(publishJob(), order[1]).run).toContain('bradygaster-squad-sdk-${VERSION}.tgz'); - expect(stepNamed(publishJob(), order[2]).run).toContain('bradygaster-squad-cli-${VERSION}.tgz'); + expect(stepNamed(publishJob(), order[1]).run).toContain('squad-sdk-${VERSION}.tgz'); + expect(stepNamed(publishJob(), order[2]).run).toContain('squad-cli-${VERSION}.tgz'); expect(stepNamed(publishJob(), order[3]).run).toContain('--install-check'); - expect(stepNamed(publishJob(), order[4]).run).toContain('npm dist-tag add "@bradygaster/squad-sdk@${VERSION}" "$DIST_TAG"'); - expect(stepNamed(publishJob(), order[5]).run).toContain('npm dist-tag add "@bradygaster/squad-cli@${VERSION}" "$DIST_TAG"'); + expect(stepNamed(publishJob(), order[4]).run).toContain('npm dist-tag add "@squad/sdk@${VERSION}" "$DIST_TAG"'); + expect(stepNamed(publishJob(), order[5]).run).toContain('npm dist-tag add "@squad/cli@${VERSION}" "$DIST_TAG"'); expect(stepNamed(publishJob(), 'Stage SDK from the exact verified tarball').if) .toBe("steps.existing.outputs.stage_pair == 'true'"); expect(stepNamed(publishJob(), 'Stage CLI from the exact verified tarball').if) @@ -717,8 +717,8 @@ describe('reusable npm publication', () => { const promotion = npmPublishWorkflow.jobs['promote-insider-tag']; expect(promotion.needs).toEqual(['prepare', 'publish']); expect(promotion.if).toBe("needs.prepare.outputs.stable_release == 'true' && needs.publish.outputs.outcome == 'COMPLETE'"); - expect(serialized(promotion)).toContain('@bradygaster/squad-sdk'); - expect(serialized(promotion)).toContain('@bradygaster/squad-cli'); + expect(serialized(promotion)).toContain('@squad/sdk'); + expect(serialized(promotion)).toContain('@squad/cli'); expect(npmPublishWorkflow.jobs).not.toHaveProperty('promote-insider-tag-sdk'); expect(npmPublishWorkflow.jobs).not.toHaveProperty('promote-insider-tag-cli'); }); @@ -782,7 +782,7 @@ describe('insider publication', () => { expect(override.run).toContain('override-standalone-package-versions.mjs'); expect(overrideStandaloneVersionsScript).toContain('-insider\\.'); expect(overrideStandaloneVersionsScript).toContain('pkg.version = version'); - expect(overrideStandaloneVersionsScript).toContain("pkg.dependencies['@bradygaster/squad-sdk'] = version"); + expect(overrideStandaloneVersionsScript).toContain("pkg.dependencies['@squad/sdk'] = version"); }); }); @@ -796,7 +796,7 @@ describe('public installation guidance', () => { expect(combined).toContain('bradygaster.Squad.Insider'); for (const [file, content] of publicCliDocs) { expect(content, file).not.toMatch( - /\bnpx\s+(?:--yes\s+|-y\s+)?(?:@bradygaster\/squad-cli|squad\b)/, + /\bnpx\s+(?:--yes\s+|-y\s+)?(?:@squad\/cli|squad\b)/, ); } }); @@ -1122,7 +1122,7 @@ describe('automated package publication', () => { 'standalone GitHub Release bundle with checksum verification', ); expect(ghAwGuide).toContain('a merged Cast'); - expect(ghAwGuide).not.toContain('Installs `@bradygaster/squad-cli`'); + expect(ghAwGuide).not.toContain('Installs `@squad/cli`'); expect(ghAwGuide).not.toContain('State does not persist across runs.'); expect(ghAwGuide).not.toContain('`create-issue` safe-output has a max of 75'); }); diff --git a/test/streaming.test.ts b/test/streaming.test.ts index 4404585cc..2096c0dc4 100644 --- a/test/streaming.test.ts +++ b/test/streaming.test.ts @@ -6,9 +6,9 @@ import { type StreamDelta, type UsageEvent, type ReasoningDelta, -} from '@bradygaster/squad-sdk'; -import { CostTracker } from '@bradygaster/squad-sdk/runtime/cost-tracker'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; +} from '@squad/sdk'; +import { CostTracker } from '@squad/sdk/runtime/cost-tracker'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; // ============================================================================ // StreamingPipeline diff --git a/test/telemetry-auto-wiring.test.ts b/test/telemetry-auto-wiring.test.ts index b7b95005c..8b97986e6 100644 --- a/test/telemetry-auto-wiring.test.ts +++ b/test/telemetry-auto-wiring.test.ts @@ -7,13 +7,13 @@ import { describe, it, expect, beforeEach, afterEach } from 'vitest'; -import { initSquadTelemetry } from '@bradygaster/squad-sdk/runtime/otel-init'; -import type { SquadTelemetryHandle } from '@bradygaster/squad-sdk/runtime/otel-init'; -import { EventBus } from '@bradygaster/squad-sdk/runtime/event-bus'; -import { CostTracker } from '@bradygaster/squad-sdk/runtime/cost-tracker'; -import { estimateCost } from '@bradygaster/squad-sdk/config/models'; -import { MODEL_CATALOG } from '@bradygaster/squad-sdk/config/models'; -import type { ModelPricing } from '@bradygaster/squad-sdk/config/models'; +import { initSquadTelemetry } from '@squad/sdk/runtime/otel-init'; +import type { SquadTelemetryHandle } from '@squad/sdk/runtime/otel-init'; +import { EventBus } from '@squad/sdk/runtime/event-bus'; +import { CostTracker } from '@squad/sdk/runtime/cost-tracker'; +import { estimateCost } from '@squad/sdk/config/models'; +import { MODEL_CATALOG } from '@squad/sdk/config/models'; +import type { ModelPricing } from '@squad/sdk/config/models'; // ============================================================================ // initSquadTelemetry — auto-wiring diff --git a/test/telemetry.test.ts b/test/telemetry.test.ts index 7d061c6e3..08e4f2a02 100644 --- a/test/telemetry.test.ts +++ b/test/telemetry.test.ts @@ -9,8 +9,8 @@ import { TelemetryCollector, shouldNotifyUpdate, setTelemetryTransport, -} from '@bradygaster/squad-sdk/runtime/telemetry'; -import type { TelemetryEvent, TelemetryConfig } from '@bradygaster/squad-sdk/runtime/telemetry'; +} from '@squad/sdk/runtime/telemetry'; +import type { TelemetryEvent, TelemetryConfig } from '@squad/sdk/runtime/telemetry'; // ============================================================================ // TelemetryCollector — consent diff --git a/test/template-sync.test.ts b/test/template-sync.test.ts index f6a944074..aac8ca931 100644 --- a/test/template-sync.test.ts +++ b/test/template-sync.test.ts @@ -18,7 +18,7 @@ import { readFileSync, existsSync, readdirSync } from 'node:fs'; import { resolve, dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { execSync } from 'node:child_process'; -import { parseAgentProvenanceRegistry } from '@bradygaster/squad-sdk/casting'; +import { parseAgentProvenanceRegistry } from '@squad/sdk/casting'; const __dirname = dirname(fileURLToPath(import.meta.url)); const ROOT = resolve(__dirname, '..'); diff --git a/test/tool-name-normalization.test.ts b/test/tool-name-normalization.test.ts index 088234ead..f7080e1af 100644 --- a/test/tool-name-normalization.test.ts +++ b/test/tool-name-normalization.test.ts @@ -12,9 +12,9 @@ import { normalizeToolNameForCopilot, normalizeToolsInConfig, SquadClient, -} from '@bradygaster/squad-sdk/client'; +} from '@squad/sdk/client'; import { CopilotClient } from '@github/copilot-sdk'; -import type { SquadSessionConfig, SquadTool } from '@bradygaster/squad-sdk/adapter'; +import type { SquadSessionConfig, SquadTool } from '@squad/sdk/adapter'; // --------------------------------------------------------------------------- // Mock CopilotClient — mirrors adapter-client.test.ts stub diff --git a/test/tools.test.ts b/test/tools.test.ts index 7213c7a0d..2e4e7cb1e 100644 --- a/test/tools.test.ts +++ b/test/tools.test.ts @@ -10,10 +10,10 @@ */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; -import { ToolRegistry, defineTool, sanitizeArgs, isMutableStateKey, type RouteRequest, type DecisionRecord, type MemoryEntry } from '@bradygaster/squad-sdk/tools'; -import { SessionPool, EventBus } from '@bradygaster/squad-sdk/client'; -import type { FanOutDependencies } from '@bradygaster/squad-sdk/coordinator'; -import type { AgentCharter } from '@bradygaster/squad-sdk/agents'; +import { ToolRegistry, defineTool, sanitizeArgs, isMutableStateKey, type RouteRequest, type DecisionRecord, type MemoryEntry } from '@squad/sdk/tools'; +import { SessionPool, EventBus } from '@squad/sdk/client'; +import type { FanOutDependencies } from '@squad/sdk/coordinator'; +import type { AgentCharter } from '@squad/sdk/agents'; import * as fs from 'node:fs'; import * as path from 'node:path'; import { randomUUID } from 'node:crypto'; diff --git a/test/type-extensions.test.ts b/test/type-extensions.test.ts index 7e8499aad..16f18e642 100644 --- a/test/type-extensions.test.ts +++ b/test/type-extensions.test.ts @@ -10,7 +10,7 @@ import { describe, it, expect } from 'vitest'; import { parseTeamMarkdown, parseDecisionsMarkdown, -} from '@bradygaster/squad-sdk/config'; +} from '@squad/sdk/config'; // =========================================================================== // ParsedDecision extensions (#222) — 8 tests diff --git a/test/upgrade-eperm-false-success.test.ts b/test/upgrade-eperm-false-success.test.ts index eee4aaa3f..caceb0f15 100644 --- a/test/upgrade-eperm-false-success.test.ts +++ b/test/upgrade-eperm-false-success.test.ts @@ -1,7 +1,7 @@ /** * Regression test for UPGRADE-EPERM-FALSE-SUCCESS. * - * Before the fix: when `npm install -g @bradygaster/squad-cli` failed (EPERM / + * Before the fix: when `npm install -g @squad/cli` failed (EPERM / * EACCES / EBUSY), `selfUpgradeCli` swallowed the error and returned normally, * causing the caller in cli-entry.ts to unconditionally print * `✅ Upgraded. Please restart your terminal...` and exit 0 — contradicting diff --git a/test/upgrade-profile-teamroot.test.ts b/test/upgrade-profile-teamroot.test.ts index 50dbcdeb1..0bb0ea885 100644 --- a/test/upgrade-profile-teamroot.test.ts +++ b/test/upgrade-profile-teamroot.test.ts @@ -15,11 +15,11 @@ import { createHash } from 'node:crypto'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; -import { runInit } from '@bradygaster/squad-cli/core/init'; -import { runUpgrade, stripAgentStamps } from '@bradygaster/squad-cli/core/upgrade'; -import { runDoctor } from '@bradygaster/squad-cli/commands/doctor'; -import { stampVersion } from '@bradygaster/squad-cli/core/version'; -import { clearResolveSquadCache, isRetiredProfileTeamRoot, resolveGlobalSquadPath, resolveSquadPaths } from '@bradygaster/squad-sdk/resolution'; +import { runInit } from '@squad/cli/core/init'; +import { runUpgrade, stripAgentStamps } from '@squad/cli/core/upgrade'; +import { runDoctor } from '@squad/cli/commands/doctor'; +import { stampVersion } from '@squad/cli/core/version'; +import { clearResolveSquadCache, isRetiredProfileTeamRoot, resolveGlobalSquadPath, resolveSquadPaths } from '@squad/sdk/resolution'; let tmp: string; let configHome: string; @@ -247,8 +247,8 @@ describe('UM-F2: version stamps are not customizations', () => { }); it('stripAgentStamps normalizes every stamp form the upgrader writes', () => { - const a = '\n- **Version:** 1.0.0\nRun `Squad v1.0.0`\n pkg: @bradygaster/squad-cli@1.0.0\n\nbody\n'; - const b = '\n- **Version:** 2.0.0-preview.1\nRun `Squad v2.0.0-preview.1`\n pkg: @bradygaster/squad-cli@2.0.0-preview.1\nbody\n'; + const a = '\n- **Version:** 1.0.0\nRun `Squad v1.0.0`\n pkg: @squad/cli@1.0.0\n\nbody\n'; + const b = '\n- **Version:** 2.0.0-preview.1\nRun `Squad v2.0.0-preview.1`\n pkg: @squad/cli@2.0.0-preview.1\nbody\n'; expect(stripAgentStamps(a)).toBe(stripAgentStamps(b)); expect(stripAgentStamps(a + 'USER EDIT\n')).not.toBe(stripAgentStamps(b)); }); diff --git a/test/upgrade-state-backend.test.ts b/test/upgrade-state-backend.test.ts index c92009778..a83d6c042 100644 --- a/test/upgrade-state-backend.test.ts +++ b/test/upgrade-state-backend.test.ts @@ -17,7 +17,7 @@ import os from 'node:os'; import path from 'node:path'; import { execFileSync } from 'node:child_process'; import { migrateStateBackend, ensureOrphanBranch, liftInitMutableStateOntoOrphan } from '../packages/squad-cli/src/cli/commands/migrate-backend.js'; -import { LocalMemoryStore, FSStorageProvider } from '@bradygaster/squad-sdk'; +import { LocalMemoryStore, FSStorageProvider } from '@squad/sdk'; import { OrphanBranchBackend } from '../packages/squad-sdk/src/state-backend.js'; import { createStateMcpToolRegistry } from '../packages/squad-cli/src/cli/commands/state-mcp.js'; diff --git a/test/verify-draft-release-assets.test.ts b/test/verify-draft-release-assets.test.ts index a63244156..472c1d988 100644 --- a/test/verify-draft-release-assets.test.ts +++ b/test/verify-draft-release-assets.test.ts @@ -25,11 +25,11 @@ function fixture() { writeFileSync(path.join(draftAssetsDir, filename), content); } const sdk = { - filename: `bradygaster-squad-sdk-${VERSION}.tgz`, + filename: `squad-sdk-${VERSION}.tgz`, sha256: sha256('sdk'), }; const cli = { - filename: `bradygaster-squad-cli-${VERSION}.tgz`, + filename: `squad-cli-${VERSION}.tgz`, sha256: sha256('cli'), }; const checksums = [ @@ -43,8 +43,8 @@ function fixture() { writeFileSync(path.join(draftAssetsDir, 'SHA256SUMS.txt'), checksums); writeFileSync(packEvidencePath, JSON.stringify({ packages: { - '@bradygaster/squad-sdk': sdk, - '@bradygaster/squad-cli': cli, + '@squad/sdk': sdk, + '@squad/cli': cli, }, })); return { @@ -117,9 +117,9 @@ describe('draft release asset verification', () => { it('rejects missing, extra, and mismatched npm checksum bindings', () => { for (const mutate of [ - (text: string) => text.replace(/^.+bradygaster-squad-cli.+\n/m, ''), + (text: string) => text.replace(/^.+squad-cli.+\n/m, ''), (text: string) => `${text}${'a'.repeat(64)} unexpected.tgz\n`, - (text: string) => text.replace(/^[0-9a-f]{64}( bradygaster-squad-sdk)/m, `${'f'.repeat(64)}$1`), + (text: string) => text.replace(/^[0-9a-f]{64}( squad-sdk)/m, `${'f'.repeat(64)}$1`), ]) { const item = fixture(); try { diff --git a/test/verify-preview-evidence.test.ts b/test/verify-preview-evidence.test.ts index 5698c6d4d..4a4e42bf4 100644 --- a/test/verify-preview-evidence.test.ts +++ b/test/verify-preview-evidence.test.ts @@ -20,23 +20,22 @@ function fixture() { const cliPackageJson = path.join(root, 'cli-package.json'); const sdkPackageJson = path.join(root, 'sdk-package.json'); writeFileSync(cliPackageJson, JSON.stringify({ - name: '@bradygaster/squad-cli', + name: '@squad/cli', version: VERSION, - dependencies: { '@bradygaster/squad-sdk': VERSION }, + dependencies: { '@squad/sdk': VERSION }, })); - writeFileSync(sdkPackageJson, JSON.stringify({ name: '@bradygaster/squad-sdk', version: VERSION })); + writeFileSync(sdkPackageJson, JSON.stringify({ name: '@squad/sdk', version: VERSION })); const packages: Record> = {}; const manifestPackages: Record> = {}; - for (const [name, shortName] of [ - ['@bradygaster/squad-cli', 'cli'], - ['@bradygaster/squad-sdk', 'sdk'], + for (const [name, filename] of [ + ['@squad/cli', `squad-cli-${VERSION}.tgz`], + ['@squad/sdk', `squad-sdk-${VERSION}.tgz`], ]) { - const filename = `bradygaster-squad-${shortName}-${VERSION}.tgz`; const bytes = Buffer.from(`${name} exact tarball bytes`); const digest = sha256(bytes); writeFileSync(path.join(evidenceDir, filename), bytes); - const sdkDependency = name === '@bradygaster/squad-cli' ? VERSION : null; + const sdkDependency = name === '@squad/cli' ? VERSION : null; packages[name] = { name, filename, sha256: digest, manifest: { name, version: VERSION, sdkDependency } }; manifestPackages[name] = { version: VERSION, sdkDependency, tarball: { filename, sha256: digest } }; } @@ -58,8 +57,8 @@ function fixture() { evidenceDir, cliPackageJson, sdkPackageJson, - cliSha256: pack.packages['@bradygaster/squad-cli'].sha256, - sdkSha256: pack.packages['@bradygaster/squad-sdk'].sha256, + cliSha256: pack.packages['@squad/cli'].sha256, + sdkSha256: pack.packages['@squad/sdk'].sha256, }; } diff --git a/test/verify-publish-evidence.test.ts b/test/verify-publish-evidence.test.ts index 203252756..f981fe2ea 100644 --- a/test/verify-publish-evidence.test.ts +++ b/test/verify-publish-evidence.test.ts @@ -17,8 +17,8 @@ describe('verified publish evidence handoff', () => { mkdirSync(publishDir); const packages: Record> = {}; for (const [name, filename, bytes] of [ - ['@bradygaster/squad-sdk', 'sdk.tgz', Buffer.from('sdk')], - ['@bradygaster/squad-cli', 'cli.tgz', Buffer.from('cli')], + ['@squad/sdk', 'sdk.tgz', Buffer.from('sdk')], + ['@squad/cli', 'cli.tgz', Buffer.from('cli')], ] as const) { const sha256 = createHash('sha256').update(bytes).digest('hex'); writeFileSync(path.join(evidenceDir, filename), bytes); diff --git a/test/watch-run-bounds-runtime.test.ts b/test/watch-run-bounds-runtime.test.ts index 499119ba3..c830a2ba0 100644 --- a/test/watch-run-bounds-runtime.test.ts +++ b/test/watch-run-bounds-runtime.test.ts @@ -11,7 +11,7 @@ const mocks = vi.hoisted(() => ({ emit: vi.fn(async () => {}), })); -vi.mock('@bradygaster/squad-sdk/platform', () => ({ +vi.mock('@squad/sdk/platform', () => ({ getRemoteUrl: () => undefined, createPlatformAdapter: () => ({ type: 'github', @@ -19,25 +19,25 @@ vi.mock('@bradygaster/squad-sdk/platform', () => ({ listPullRequests: async () => [], }), })); -vi.mock('@bradygaster/squad-sdk/ralph/triage', () => ({ +vi.mock('@squad/sdk/ralph/triage', () => ({ parseRoster: () => [{ name: 'Test', label: 'squad:test' }], parseRoutingRules: () => [], parseModuleOwnership: () => [], triageIssue: () => null, })); -vi.mock('@bradygaster/squad-sdk/ralph/capabilities', () => ({ +vi.mock('@squad/sdk/ralph/capabilities', () => ({ loadCapabilities: async () => null, filterByCapabilities: (issues: unknown[]) => ({ handled: issues, skipped: [] }), getPodId: () => undefined, })); -vi.mock('@bradygaster/squad-sdk/ralph', () => ({ +vi.mock('@squad/sdk/ralph', () => ({ RalphMonitor: class { start = async () => {}; stop = mocks.monitorStop; healthCheck = async () => {}; }, })); -vi.mock('@bradygaster/squad-sdk/runtime/event-bus', () => ({ +vi.mock('@squad/sdk/runtime/event-bus', () => ({ EventBus: class { emit = mocks.emit; }, })); vi.mock('../packages/squad-cli/src/cli/core/gh-cli.js', () => ({ diff --git a/test/worktree.test.ts b/test/worktree.test.ts index fb0c51001..b4c855489 100644 --- a/test/worktree.test.ts +++ b/test/worktree.test.ts @@ -31,8 +31,8 @@ import { import { join } from 'node:path'; import { tmpdir } from 'node:os'; -import { resolveSquad } from '@bradygaster/squad-sdk/resolution'; -import { detectSquadDir } from '@bradygaster/squad-cli/core/detect-squad-dir'; +import { resolveSquad } from '@squad/sdk/resolution'; +import { detectSquadDir } from '@squad/cli/core/detect-squad-dir'; // --------------------------------------------------------------------------- // Test suite diff --git a/vitest.config.ts b/vitest.config.ts index dfbf604d5..18ce54e28 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,11 +2,11 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ resolve: { - // Force vitest to resolve @bradygaster/squad-sdk from the workspace root, + // Force vitest to resolve @squad/sdk from the workspace root, // not from a duplicate copy under packages/squad-cli/node_modules/. - // Without this, vi.mock('@bradygaster/squad-sdk') targets the root copy + // Without this, vi.mock('@squad/sdk') targets the root copy // but the code under test imports from the duplicate — bypassing the mock. - dedupe: ['@bradygaster/squad-sdk'], + dedupe: ['@squad/sdk'], }, test: { include: ['test/**/*.test.ts'],