Skip to content

Commit fa0600a

Browse files
authored
fix: repair pro installer activation commands [Story PRO-13.5]
Fix Pro installer recovery/setup command hints, publish-surface package versions, legacy activation compatibility docs/tests, and Pro Integration private submodule auth.\n\nValidated with focused local checks plus green GitHub CI, including Pro Integration.
1 parent 4ff4c32 commit fa0600a

15 files changed

Lines changed: 134 additions & 73 deletions

File tree

.github/workflows/pro-integration.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,20 @@ jobs:
7979
if: steps.token-check.outputs.skip != 'true'
8080
uses: actions/checkout@v6
8181
with:
82-
token: ${{ secrets.PRO_SUBMODULE_TOKEN }}
83-
submodules: 'recursive'
82+
token: ${{ secrets.GITHUB_TOKEN }}
83+
submodules: false
84+
85+
- name: Initialize Pro submodule
86+
if: steps.token-check.outputs.skip != 'true'
87+
env:
88+
PRO_SUBMODULE_TOKEN: ${{ secrets.PRO_SUBMODULE_TOKEN }}
89+
run: |
90+
echo "::add-mask::$PRO_SUBMODULE_TOKEN"
91+
export GIT_CONFIG_COUNT=1
92+
export GIT_CONFIG_KEY_0="url.https://x-access-token:${PRO_SUBMODULE_TOKEN}@github.com/SynkraAI/.insteadOf"
93+
export GIT_CONFIG_VALUE_0="https://github.com/SynkraAI/"
94+
git submodule sync --recursive
95+
git submodule update --init --recursive
8496
8597
- name: Setup Node.js
8698
if: steps.token-check.outputs.skip != 'true'

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,7 @@ Para saber como acessar, ativar, recuperar conta e validar as squads Pro, consul
618618
### Instalação
619619

620620
```bash
621-
npx aiox-pro install
622-
npx aiox-pro setup
621+
npx -y -p @aiox-squads/core@latest aiox pro setup
623622
```
624623

625624
### Identificação Estável de Máquina (>= 5.0.8)

docs/guides/aiox-pro-access.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ Se o instalador responder que não encontrou acesso para o email, o problema é
1515
No projeto onde você quer usar o Pro:
1616

1717
```bash
18-
npx aiox-pro install
19-
npx aiox-pro setup
18+
npx -y -p @aiox-squads/core@latest aiox pro setup
2019
```
2120

2221
O setup guiado oferece dois caminhos:
@@ -29,24 +28,24 @@ Em automação/CI, use variáveis de ambiente:
2928
```bash
3029
export AIOX_PRO_EMAIL="seu-email@exemplo.com"
3130
export AIOX_PRO_PASSWORD="sua-senha"
32-
npx aiox-pro setup
31+
npx -y -p @aiox-squads/core@latest aiox pro setup
3332
```
3433

3534
Ou, para chave legada:
3635

3736
```bash
3837
export AIOX_PRO_KEY="PRO-XXXX-XXXX-XXXX-XXXX"
39-
npx aiox-pro setup
38+
npx -y -p @aiox-squads/core@latest aiox pro setup
4039
```
4140

4241
## Verificar o acesso
4342

4443
Depois de instalar:
4544

4645
```bash
47-
npx aiox-pro status
48-
npx aiox-pro features
49-
npx aiox-pro validate
46+
npx -y -p @aiox-squads/core@latest aiox pro status
47+
npx -y -p @aiox-squads/core@latest aiox pro features
48+
npx -y -p @aiox-squads/core@latest aiox pro validate
5049
```
5150

5251
Esses comandos verificam a licença, listam recursos Pro disponíveis e forçam uma revalidação online quando necessário.
@@ -58,7 +57,7 @@ As squads Pro são entregues pelo pacote Pro privado e sincronizadas pelo instal
5857
Se as squads não aparecerem depois de uma instalação bem-sucedida, rode:
5958

6059
```bash
61-
npx aiox-pro update
60+
npx -y -p @aiox-squads/core@latest aiox pro update
6261
npm run sync:ide
6362
```
6463

@@ -67,7 +66,7 @@ npm run sync:ide
6766
Para recuperar senha ou licença:
6867

6968
```bash
70-
npx aiox-pro recover
69+
npx -y @aiox-squads/aiox-pro-cli@latest recover
7170
```
7271

7372
Se o email comprado não for reconhecido, ou se a conta existir mas a ativação falhar, o fluxo operacional correto é acionar `@devops` com um destes comandos:
@@ -80,7 +79,7 @@ Se o email comprado não for reconhecido, ou se a conta existir mas a ativação
8079
## Erros comuns
8180

8281
- `No AIOX Pro access found for this email.`: o email ainda não tem entitlement Pro ou foi digitado diferente do cadastro.
83-
- `AIOX Pro is not installed.`: rode `npx aiox-pro install` antes de status/validate.
82+
- `AIOX Pro is not installed.`: rode `npx -y -p @aiox-squads/core@latest aiox pro setup` antes de status/validate.
8483
- `Invalid key format`: a chave legada precisa seguir o formato `PRO-XXXX-XXXX-XXXX-XXXX`.
8584
- Falha em CI sem prompt interativo: defina `AIOX_PRO_EMAIL` + `AIOX_PRO_PASSWORD` ou `AIOX_PRO_KEY`.
8685

docs/guides/pro/install-gate-setup.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Comprar Licença -> Validar -> Baixar artefato assinado -> Usar Features Pro
1818

1919
| Pacote | Tipo | Propósito |
2020
|--------|------|-----------|
21-
| `aiox-pro` | CLI (1.8 KB) | Comandos de instalação e gerenciamento |
21+
| `@aiox-squads/aiox-pro-cli` | CLI | Comandos de recuperação e compatibilidade |
2222
| `@aiox-squads/pro` | Artefato premium | Pacote Pro canônico, entregue ao cliente pelo artifact broker autenticado |
2323

2424
---
@@ -27,13 +27,13 @@ Comprar Licença -> Validar -> Baixar artefato assinado -> Usar Features Pro
2727

2828
```bash
2929
# Instalar AIOX Pro (instala o pacote Pro compatível automaticamente)
30-
npx aiox-pro install
30+
npx -y -p @aiox-squads/core@latest aiox pro setup
3131

32-
# Ativar sua licenca
33-
npx aiox-pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
32+
# Ativar sua licença por chave legada
33+
npx -y -p @aiox-squads/core@latest aiox pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
3434

35-
# Verificar ativacao
36-
npx aiox-pro status
35+
# Verificar ativação
36+
npx -y -p @aiox-squads/core@latest aiox pro status
3737
```
3838

3939
---
@@ -48,23 +48,23 @@ npx aiox-pro status
4848
### Passo 1: Instalar AIOX Pro
4949

5050
```bash
51-
npx aiox-pro install
51+
npx -y -p @aiox-squads/core@latest aiox pro setup
5252
```
5353

5454
Isso valida sua licença e instala o artefato canônico `@aiox-squads/pro` no projeto. O cliente não precisa de acesso direto ao pacote privado/restrito no npm.
5555

5656
**Se você já tem o artefato Pro instalado por outro fluxo autorizado**, rode novamente o bootstrap para revalidar e re-scaffoldar o conteúdo Pro:
5757

5858
```bash
59-
npx aiox-pro install
59+
npx -y -p @aiox-squads/core@latest aiox pro setup
6060
```
6161

6262
### Passo 2: Ativar Licenca
6363

6464
Apos a compra, voce recebera uma chave no formato `PRO-XXXX-XXXX-XXXX-XXXX`.
6565

6666
```bash
67-
npx aiox-pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
67+
npx -y -p @aiox-squads/core@latest aiox pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
6868
```
6969

7070
Esse comando:
@@ -76,10 +76,10 @@ Esse comando:
7676

7777
```bash
7878
# Status da licenca
79-
npx aiox-pro status
79+
npx -y -p @aiox-squads/core@latest aiox pro status
8080

8181
# Listar features disponiveis
82-
npx aiox-pro features
82+
npx -y -p @aiox-squads/core@latest aiox pro features
8383
```
8484

8585
---
@@ -88,13 +88,13 @@ npx aiox-pro features
8888

8989
| Comando | Descricao |
9090
|---------|-----------|
91-
| `npx aiox-pro install` | Instala o pacote AIOX Pro compatível no projeto |
92-
| `npx aiox-pro activate --key KEY` | Ativa uma chave de licenca |
93-
| `npx aiox-pro status` | Mostra status da licenca atual |
94-
| `npx aiox-pro features` | Lista todas as features pro e disponibilidade |
95-
| `npx aiox-pro validate` | Forca revalidacao online da licenca |
96-
| `npx aiox-pro deactivate` | Desativa a licenca nesta maquina |
97-
| `npx aiox-pro help` | Mostra todos os comandos |
91+
| `npx -y -p @aiox-squads/core@latest aiox pro setup` | Instala o pacote AIOX Pro compatível no projeto |
92+
| `npx -y -p @aiox-squads/core@latest aiox pro activate --key KEY` | Ativa uma chave de licença |
93+
| `npx -y -p @aiox-squads/core@latest aiox pro status` | Mostra status da licença atual |
94+
| `npx -y -p @aiox-squads/core@latest aiox pro features` | Lista todas as features Pro e disponibilidade |
95+
| `npx -y -p @aiox-squads/core@latest aiox pro validate` | Força revalidação online da licença |
96+
| `npx -y -p @aiox-squads/core@latest aiox pro deactivate` | Desativa a licença nesta máquina |
97+
| `npx -y -p @aiox-squads/core@latest aiox pro help` | Mostra todos os comandos |
9898

9999
---
100100

@@ -107,9 +107,9 @@ Apos a instalacao e ativacao, o AIOX Pro funciona offline:
107107
- Verificacao de features 100% local no dia a dia
108108

109109
A internet so e necessaria para:
110-
1. Ativacao inicial (`npx aiox-pro activate`)
110+
1. Ativação inicial (`npx -y -p @aiox-squads/core@latest aiox pro activate`)
111111
2. Revalidacao periodica (automatica a cada 30 dias)
112-
3. Desativacao (`npx aiox-pro deactivate`)
112+
3. Desativação (`npx -y -p @aiox-squads/core@latest aiox pro deactivate`)
113113

114114
---
115115

@@ -120,17 +120,17 @@ Para pipelines, instale e ative usando secrets de ambiente:
120120
**GitHub Actions:**
121121
```yaml
122122
- name: Install AIOX Pro
123-
run: npx aiox-pro install
123+
run: npx -y -p @aiox-squads/core@latest aiox pro setup
124124

125125
- name: Activate License
126-
run: npx aiox-pro activate --key ${{ secrets.AIOX_PRO_LICENSE_KEY }}
126+
run: npx -y -p @aiox-squads/core@latest aiox pro activate --key ${{ secrets.AIOX_PRO_LICENSE_KEY }}
127127
```
128128
129129
**GitLab CI:**
130130
```yaml
131131
before_script:
132-
- npx aiox-pro install
133-
- npx aiox-pro activate --key ${AIOX_PRO_LICENSE_KEY}
132+
- npx -y -p @aiox-squads/core@latest aiox pro setup
133+
- npx -y -p @aiox-squads/core@latest aiox pro activate --key ${AIOX_PRO_LICENSE_KEY}
134134
```
135135
136136
---
@@ -153,7 +153,7 @@ License activation failed: Invalid key format
153153
License activation failed: Maximum seats exceeded
154154
```
155155
156-
- Desative a licenca na outra maquina: `npx aiox-pro deactivate`
156+
- Desative a licença na outra máquina: `npx -y -p @aiox-squads/core@latest aiox pro deactivate`
157157
- Ou contate support para aumentar o limite de seats
158158
159159
### Erro de rede na ativacao
@@ -173,7 +173,7 @@ License activation failed: ECONNREFUSED
173173
```
174174
┌─────────────────┐ ┌─────────────────────────────────┐ ┌──────────┐
175175
│ Cliente (CLI) │────>│ License Server (Vercel) │────>│ Supabase │
176-
npx aiox-pro │<────│ aiox-license-server.vercel.app │<────│ Database │
176+
│ aiox pro │<────│ aiox-license-server.vercel.app │<────│ Database │
177177
└─────────────────┘ └─────────────────────────────────┘ └──────────┘
178178
179179

docs/guides/workflows/pro-developer-workflow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ ls pro/package.json
119119
### Customer Pro Setup
120120

121121
```bash
122-
npx aiox-pro setup
122+
npx -y -p @aiox-squads/core@latest aiox pro setup
123123
```
124124

125125
The setup flow uses email/password authentication. Normal customers do not need npm org access or `NPM_TOKEN`.
126126

127127
Troubleshooting:
128128

129-
- `Pro content source not found`: rerun `npx aiox-pro setup` and choose the email login/create-account flow.
129+
- `Pro content source not found`: rerun `npx -y -p @aiox-squads/core@latest aiox pro setup` and choose the email login/create-account flow.
130130
- `Pro artifact download failed`: retry after a few minutes; the signed URL is short-lived.
131131
- `Pro artifact sha256 mismatch`: stop and contact support. Do not scaffold from the downloaded artifact.
132132
- `No active Pro subscription`: confirm the email used for login matches the Pro purchase.

docs/stories/epic-pro-13/STORY-PRO-13.5-PRIVATE-PRO-DISTRIBUTION-HARDENING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,19 @@ Implementation should preserve the open-core boundary:
357357
Expected implementation touchpoints:
358358

359359
- `package.json`
360+
- `package-lock.json`
360361
- `bin/utils/validate-publish.js`
361362
- `packages/installer/src/wizard/pro-setup.js`
362363
- `packages/installer/src/pro/pro-scaffolder.js`
363364
- `packages/aiox-pro-cli/bin/aiox-pro.js`
365+
- `packages/aiox-pro-cli/package.json`
366+
- `packages/installer/package.json`
364367
- `packages/installer/src/wizard/i18n.js`
368+
- `.github/workflows/pro-integration.yml`
365369
- `docs/PUBLISHING.md`
370+
- `README.md`
371+
- `docs/guides/aiox-pro-access.md`
372+
- `docs/guides/pro/install-gate-setup.md`
366373
- `docs/guides/workflows/pro-developer-workflow.md`
367374
- `tests/pro-wizard.test.js`
368375
- `tests/installer/pro-setup-auth.test.js`
@@ -456,13 +463,25 @@ Expected implementation touchpoints:
456463
- 2026-05-09: Published `@aiox-squads/core@5.1.17`; npm `latest` resolves to `5.1.17`; clean install smoke confirms `aiox --version` returns `5.1.17`, the installed public package has zero `pro/` paths, and the installer default points to Pro artifact `0.4.2`.
457464
- 2026-05-08: GitHub CI follow-up fixed: `tests/pro-wizard.test.js` interactive license-key retry test now stubs the license client instead of reaching the real inline HTTP fallback, removing the Node 18 timeout while preserving prompt/retry assertions.
458465
- 2026-05-08: Merged `origin/main` and addressed CodeRabbit actionable comments: legacy `npm notice` size-prefixed pack output is normalized before `pro/` checks, `aiox-pro install/setup/wizard -k` is accepted, artifact download has an abort timeout, and artifact-installed Pro package cleanup runs on scaffold failures.
466+
- 2026-05-12: Student install incident triage confirmed the unscoped `npx aiox-pro recover/install/setup` path is invalid for fresh machines; installer and docs now point recovery to `npx -y @aiox-squads/aiox-pro-cli@latest recover` and setup to `npx -y -p @aiox-squads/core@latest aiox pro setup`.
467+
- 2026-05-12: `@aiox-squads/installer` bumped to `3.3.2` and `@aiox-squads/aiox-pro-cli` bumped to `0.2.1` so @devops can publish the signed-artifact installer and scoped CLI command fix.
468+
- 2026-05-12: GitHub Pro Integration checkout fixed to use `GITHUB_TOKEN` for the `aiox-core` PR merge ref and reserve `PRO_SUBMODULE_TOKEN` for private Pro submodule initialization only.
469+
- 2026-05-12: CodeRabbit PR follow-up applied: Pro Integration now injects the credentialized submodule URL through process-scoped `GIT_CONFIG_*` environment variables, and Pro wizard tests use repository-absolute package imports.
459470
- Validation evidence:
460471
- `node -c packages/installer/src/wizard/pro-setup.js && node -c packages/aiox-pro-cli/bin/aiox-pro.js && node -c bin/utils/validate-publish.js`
461472
- `node -c packages/installer/src/pro/pro-scaffolder.js && node -c pro/license/license-api.js && node -c .aiox-core/cli/commands/pro/index.js`
462473
- `npm --prefix pro ci --ignore-scripts --no-audit --no-fund && npm --prefix pro run validate:publish-surface`
463474
- `npm run validate:publish`
464475
- `npm run typecheck`
465476
- `npm test -- --runInBand tests/pro-wizard.test.js tests/installer/pro-setup-auth.test.js tests/installer/pro-scaffolder.test.js tests/cli/validate-publish.test.js tests/pro/pro-updater.test.js tests/pro-recover.test.js`
477+
- `node -c packages/installer/src/wizard/i18n.js && node -c packages/installer/src/wizard/pro-setup.js && node -c packages/installer/src/pro/pro-scaffolder.js && node -c packages/aiox-pro-cli/bin/aiox-pro.js`
478+
- `npm test -- --runInBand tests/pro-wizard.test.js tests/installer/pro-setup-auth.test.js tests/pro-recover.test.js tests/installer/pro-scaffolder.test.js`
479+
- `npm pack --workspace @aiox-squads/aiox-pro-cli --dry-run --json`
480+
- `npm pack --workspace @aiox-squads/installer --dry-run --json`
481+
- `npm run validate:publish`
482+
- `npx yaml-lint .github/workflows/pro-integration.yml`
483+
- `npm test -- --runInBand tests/pro-wizard.test.js`
484+
- `npx eslint tests/pro-wizard.test.js`
466485
- `npx jest --runInBand tests/license/license-api.test.js --testPathIgnorePatterns='node_modules'`
467486
- full smoke matrix saved in `outputs/qa/2026-05-pro-13-5-smoke.json`
468487
- Pro artifact upload evidence saved in `outputs/qa/2026-05-pro-13-5-pro-artifact-0.4.1.json`

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/aiox-pro-cli/bin/aiox-pro.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* aiox-pro CLI
55
*
66
* Thin CLI wrapper for AIOX Pro setup and delegated commands.
7-
* Provides a clean npx interface: npx aiox-pro install
7+
* Provides a clean npx interface: npx @aiox-squads/aiox-pro-cli install
88
*
99
* Commands:
1010
* install Run authenticated Pro setup in the current project
@@ -121,7 +121,7 @@ function showHelp() {
121121
aiox-pro v${VERSION} — AIOX Pro CLI
122122
123123
Usage:
124-
npx aiox-pro <command> [options]
124+
npx -y @aiox-squads/aiox-pro-cli@latest <command> [options]
125125
126126
Commands:
127127
install Run authenticated Pro setup in the current project
@@ -137,14 +137,14 @@ Commands:
137137
help Show this help message
138138
139139
Examples:
140-
npx aiox-pro install
141-
npx aiox-pro update
142-
npx aiox-pro setup
143-
npx aiox-pro wizard --key PRO-XXXX-XXXX-XXXX-XXXX
144-
npx aiox-pro install -k PRO-XXXX-XXXX-XXXX-XXXX
145-
npx aiox-pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
146-
npx aiox-pro status
147-
npx aiox-pro recover
140+
npx -y @aiox-squads/aiox-pro-cli@latest install
141+
npx -y @aiox-squads/aiox-pro-cli@latest update
142+
npx -y @aiox-squads/aiox-pro-cli@latest setup
143+
npx -y @aiox-squads/aiox-pro-cli@latest wizard --key PRO-XXXX-XXXX-XXXX-XXXX
144+
npx -y @aiox-squads/aiox-pro-cli@latest install -k PRO-XXXX-XXXX-XXXX-XXXX
145+
npx -y @aiox-squads/aiox-pro-cli@latest activate --key PRO-XXXX-XXXX-XXXX-XXXX
146+
npx -y @aiox-squads/aiox-pro-cli@latest status
147+
npx -y @aiox-squads/aiox-pro-cli@latest recover
148148
149149
Documentation: https://synkra.ai/pro/docs
150150
`);

packages/aiox-pro-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aiox-squads/aiox-pro-cli",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "CLI for AIOX Pro — install, activate and manage your license",
55
"bin": {
66
"aiox-pro": "bin/aiox-pro.js"
@@ -10,7 +10,7 @@
1010
"src/"
1111
],
1212
"dependencies": {
13-
"@aiox-squads/installer": "^3.3.0",
13+
"@aiox-squads/installer": "^3.3.2",
1414
"open": "^10.0.0"
1515
},
1616
"keywords": [

packages/installer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aiox-squads/installer",
3-
"version": "3.3.1",
3+
"version": "3.3.2",
44
"description": "AIOX Installer - Automated setup wizard for AIOX projects (greenfield & brownfield)",
55
"main": "src/index.js",
66
"bin": {

0 commit comments

Comments
 (0)