@abelxiaoxing/cadence 2.0.50 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +72 -76
- package/README.es.md +71 -75
- package/README.fr.md +72 -76
- package/README.ja.md +83 -101
- package/README.ko.md +81 -97
- package/README.md +69 -82
- package/README.pt-BR.md +72 -76
- package/README.ru.md +72 -77
- package/README.zh-CN.md +72 -79
- package/docs/conversation-mode.md +26 -6
- package/docs/history.md +15 -2
- package/docs/reuse-and-distribution.md +1 -0
- package/package.json +8 -2
- package/src/cadence-instructions.ts +5 -5
- package/src/cadence-mode.ts +49 -7
- package/src/coordinator-tools.mjs +39 -5
- package/src/model-preview.mjs +4 -1
- package/src/native-build.ts +1 -1
- package/src/sdk-worker.mjs +80 -59
- package/src/service/contracts/models.ts +6 -0
- package/src/service/contracts/workbench.ts +218 -17
- package/src/service/contracts/workflow.ts +309 -30
- package/src/service/knowledge-store.ts +496 -0
- package/src/service/project-knowledge.ts +539 -0
- package/src/service/workflow-git.ts +773 -0
- package/src/service-host.mjs +4588 -2279
- package/src/session-entries.mjs +3 -1
- package/src/session-file.mjs +26 -0
- package/src/session-rename.mjs +94 -0
- package/src/session-sharing.ts +3 -1
- package/src/worker-inputs.mjs +144 -0
- package/src/worker-toolkit.mjs +26 -1
- package/web/dist/assets/cadence.css +1 -1
- package/web/dist/assets/cadence.js +31 -22
- package/web/dist/manifest.json +7 -7
package/README.md
CHANGED
|
@@ -2,112 +2,101 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [Português (Brasil)](README.pt-BR.md) · [Русский](README.ru.md)
|
|
4
4
|
|
|
5
|
-
Cadence turns [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) into a conversation-driven engineering workflow.
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Cadence turns [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) into a conversation-driven engineering workflow: enter `/cadence [goal]`, agree on the result once, and a persistent owner builds, recovers and verifies it.
|
|
6
|
+
Use it from the terminal or the optional WebUI.
|
|
7
|
+
|
|
8
|
+
## How it works
|
|
9
|
+
|
|
10
|
+
```mermaid
|
|
11
|
+
flowchart TD
|
|
12
|
+
A["/cadence goal"] --> B["Investigate (readonly)"]
|
|
13
|
+
B --> C["Align, then approve once"]
|
|
14
|
+
C --> D["Independent assignments run in parallel worktrees"]
|
|
15
|
+
D --> E["Real checks + automatic Agent review"]
|
|
16
|
+
E -->|"pass"| F["Local merge into your branch"]
|
|
17
|
+
E -->|"fail"| G["Self-revise"]
|
|
18
|
+
G --> D
|
|
19
|
+
F --> H["Curate knowledge (fixed budget)"]
|
|
20
|
+
H -.-> B
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart LR
|
|
25
|
+
A["Check fails"] --> B["Repair"] --> C["Re-plan the route"] --> D["Recorded deviation"] --> E["Stop only for outside conditions"]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
flowchart LR
|
|
30
|
+
T["Pi terminal"] <-->|"attach / detach"| O[("Persistent owner")]
|
|
31
|
+
W["WebUI<br/>board · branches · steer"] <-->|"attach / detach"| O
|
|
32
|
+
O --> X["Workers in worktrees"] --> Y["Your branch"]
|
|
33
|
+
O -.-> K[".cadence/ knowledge"]
|
|
34
|
+
```
|
|
8
35
|
|
|
9
36
|
## Why Cadence
|
|
10
37
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Cadence is a trusted assistant, **not a sandbox**: its agents use host tools in the approved checkout or worktree, so use it on code you can review and recover.
|
|
38
|
+
| | |
|
|
39
|
+
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| **Work outlives the window** | Clients only attach and detach; the owner keeps running. |
|
|
41
|
+
| **Nothing changes before approval** | Readonly investigation, then one readable agreement you confirm. |
|
|
42
|
+
| **Results you can trust** | Real checks and independent review; model prose never counts as a pass. |
|
|
43
|
+
| **Finishes on its own** | After approval it repairs, re-plans or records a deviation, and stops only for conditions outside the repository. |
|
|
44
|
+
| **Faster by design** | Independent assignments run side by side in their own worktrees. |
|
|
45
|
+
| **Knowledge compounds** | A route table and a fixed budget: workers read what matches their code, new lessons replace stale ones. |
|
|
46
|
+
| **WebUI that shows and steers** | Assignment board, revisions, deviations, branches, thinking, and steer or queue a message mid-reply. |
|
|
47
|
+
| **One history** | Browser conversations are the project's Pi sessions; continue in either place. |
|
|
48
|
+
|
|
49
|
+
> Cadence is a trusted assistant, **not a sandbox**: its agents use host tools in the approved checkout or worktree.
|
|
50
|
+
> Use it on code you can review and recover.
|
|
25
51
|
|
|
26
52
|
## Install
|
|
27
53
|
|
|
28
|
-
|
|
54
|
+
Requires Node `>=22.19.0` and Pi logged in to a model provider; Cadence reuses Pi's login.
|
|
29
55
|
|
|
30
56
|
```sh
|
|
31
57
|
npm install -g @abelxiaoxing/cadence
|
|
32
58
|
pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
59
|
+
cadence server install # optional WebUI and boot service
|
|
33
60
|
```
|
|
34
61
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
The last command lets Pi load the same copy for `/cadence`, so one npm upgrade updates both.
|
|
38
|
-
The port and token live in `~/.pi/agent/cadence/.env`; anyone with the token can use your workspace, so keep the link private.
|
|
62
|
+
`cadence server install` prints a private link (`http://127.0.0.1:17423/?token=…`).
|
|
63
|
+
The token grants access to your workspace: keep the link private.
|
|
39
64
|
|
|
40
65
|
## Use
|
|
41
66
|
|
|
42
|
-
###
|
|
43
|
-
|
|
44
|
-
1. Open the printed link once; the browser then remembers you.
|
|
45
|
-
If you lose it, `cadence token-link --reveal` prints it again.
|
|
46
|
-
2. Choose a working folder with the lower-right button; recent folders are in the same picker.
|
|
47
|
-
First use offers this choice directly in the conversation; later visits restore your last available folder.
|
|
48
|
-
Saved model preferences are reused on Send; choose once if none is available.
|
|
49
|
-
3. Send `/cadence [goal]` once to enter Cadence in this conversation; continue with normal messages to investigate and clarify requirements.
|
|
50
|
-
4. Review the complete inline plan and click **Implement this plan** (or send `按计划实施`).
|
|
51
|
-
The owner implements, diagnoses failures, adjusts the route, updates approved project knowledge and verifies delivery without routine reconfirmation.
|
|
52
|
-
5. Follow actual progress and local merge results in the conversation; open any subagent's full context from the lower-left **Subagents** dock.
|
|
53
|
-
Refresh and completion keep Cadence on; **Exit Cadence** only exits the mode, while **Cancel workflow — request stop** requests cancellation.
|
|
67
|
+
### Browser
|
|
54
68
|
|
|
55
|
-
|
|
56
|
-
|
|
69
|
+
1. Open the printed link once (`cadence token-link --reveal` prints it again).
|
|
70
|
+
2. Pick a working folder with the lower-right button.
|
|
71
|
+
3. Send `/cadence [goal]`, then answer the clarifying questions.
|
|
72
|
+
4. Click **Implement this plan** and follow the board and the **Subagents** dock.
|
|
73
|
+
Images can be pasted or dropped ([details](docs/conversation-mode.md#images-in-the-webui)).
|
|
57
74
|
|
|
58
|
-
###
|
|
75
|
+
### Terminal
|
|
59
76
|
|
|
60
|
-
Enter `/cadence <goal>` once in
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Relevant project documents are injected into workers and updated from verified lessons, without a separate knowledge-management command.
|
|
66
|
-
|
|
67
|
-
**Completing a goal leaves the conversation in Cadence mode.**
|
|
68
|
-
No repeated command is needed.
|
|
69
|
-
Type `exit cadence` or `退出 Cadence` to leave; departure does not cancel accepted work.
|
|
70
|
-
Native use starts/reuses a local project owner on demand, without installing a system service.
|
|
71
|
-
Model preferences are remembered in `~/.pi/agent/cadence/settings.json`; authentication stays with Pi.
|
|
72
|
-
|
|
73
|
-
See [Conversation mode](docs/conversation-mode.md) for exact approval, worktree prerequisites and cancellation.
|
|
74
|
-
`/cadence-history [run-id]`: readonly run details and retained history; no service startup or task execution.
|
|
75
|
-
See [History and diagnostics](docs/history.md).
|
|
76
|
-
Browser approval is separately bound to the displayed plan and conversation; authentication alone never authorizes execution.
|
|
77
|
-
|
|
78
|
-
### More projects
|
|
77
|
+
Enter `/cadence <goal>` once in a trusted project's Pi conversation; the mode stays on after a goal completes.
|
|
78
|
+
`exit cadence` or `退出 Cadence` leaves it and never cancels accepted work.
|
|
79
|
+
`/cadence-history [run-id]` is readonly.
|
|
80
|
+
`CADENCE_PARALLEL` (default 4) sets concurrent workers.
|
|
81
|
+
Details: [conversation mode](docs/conversation-mode.md), [history](docs/history.md).
|
|
79
82
|
|
|
80
83
|
```sh
|
|
81
|
-
cadence project open /absolute/project
|
|
82
|
-
cadence project open /absolute/new-project --create
|
|
84
|
+
cadence project open /absolute/project # one owner, port and history per project
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
Each project gets its own owner, port and history, and the command prints its private link.
|
|
86
|
-
In the WebUI, selecting a folder only changes the conversation context; Send starts or reuses its owner when needed.
|
|
87
|
-
Switching folders never stops work in the previous one.
|
|
88
|
-
|
|
89
|
-
### Checks
|
|
90
|
-
|
|
91
|
-
Checks are declared in the exact plan you approve, including baseline and acceptance commands.
|
|
92
|
-
Their actual outcomes remain separate from automatic Agent review.
|
|
93
|
-
|
|
94
87
|
## Manage the service
|
|
95
88
|
|
|
96
89
|
```sh
|
|
97
90
|
cadence server status
|
|
98
91
|
cadence server restart # after an upgrade or a .env / models.json change
|
|
99
|
-
cadence server upgrade #
|
|
100
|
-
cadence server stop
|
|
101
|
-
cadence server uninstall #
|
|
102
|
-
cadence doctor #
|
|
92
|
+
cadence server upgrade # fetch, install, restart; rolls back if the new version fails
|
|
93
|
+
cadence server stop
|
|
94
|
+
cadence server uninstall # before npm uninstall -g
|
|
95
|
+
cadence doctor # leftovers and recent recoveries; --fix for the rest
|
|
103
96
|
```
|
|
104
97
|
|
|
105
|
-
A power loss
|
|
106
|
-
|
|
107
|
-
Upgrade with `cadence server upgrade` or from the WebUI's Cadence service dialog: it fetches the release while Cadence keeps running and puts the previous version back if the new one does not start.
|
|
108
|
-
Restart, stop and uninstall stop running work in order rather than leaving it detached.
|
|
109
|
-
Uninstall removes only the service definition; projects, history and Pi settings stay.
|
|
110
|
-
Linux root and named services, remote HTTPS access and automatic recovery are covered in [service management](docs/service-management.md) and [remote access](docs/remote-access.md).
|
|
98
|
+
A crash or power loss needs no cleanup: the next start recovers and says what it did.
|
|
99
|
+
See [service management](docs/service-management.md) and [remote access](docs/remote-access.md).
|
|
111
100
|
|
|
112
101
|
## Development
|
|
113
102
|
|
|
@@ -119,11 +108,9 @@ bun install
|
|
|
119
108
|
bun run verify
|
|
120
109
|
```
|
|
121
110
|
|
|
122
|
-
|
|
123
|
-
`verify` is the single development and release gate: fast checks only, with no browser requirement.
|
|
124
|
-
It needs an official Node build and a private temporary directory; see [verification](engineering/verification.md).
|
|
111
|
+
Guidance by area is in [engineering/](engineering/) and [AGENTS.md](AGENTS.md). `verify` is the single fast gate; it needs an official Node build and a private temporary directory ([verification](engineering/verification.md)).
|
|
125
112
|
|
|
126
113
|
## License
|
|
127
114
|
|
|
128
|
-
|
|
129
|
-
Bundled adaptations, fonts and vendors keep their own licenses
|
|
115
|
+
MIT.
|
|
116
|
+
Bundled adaptations, fonts and vendors keep their own licenses: [reuse and distribution](docs/reuse-and-distribution.md), [third-party notices](THIRD_PARTY_NOTICES.md).
|
package/README.pt-BR.md
CHANGED
|
@@ -2,119 +2,115 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [Português (Brasil)](README.pt-BR.md) · [Русский](README.ru.md)
|
|
4
4
|
|
|
5
|
-
O Cadence transforma o [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) em um
|
|
6
|
-
|
|
5
|
+
O Cadence transforma o [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) em um fluxo de engenharia guiado por conversa: digite `/cadence [objetivo]`, combine o resultado uma vez e um owner persistente implementa, se recupera e verifica.
|
|
6
|
+
No terminal ou na WebUI opcional.
|
|
7
|
+
|
|
8
|
+
## Como funciona
|
|
9
|
+
|
|
10
|
+
```mermaid
|
|
11
|
+
flowchart TD
|
|
12
|
+
A["/cadence objetivo"] --> B["Investigar somente leitura"]
|
|
13
|
+
B --> C["Alinhar e aprovar uma vez"]
|
|
14
|
+
C --> D["Tarefas independentes em worktrees paralelos"]
|
|
15
|
+
D --> E["Verificações reais + revisão automática de Agent"]
|
|
16
|
+
E -->|"passa"| F["Merge local na sua branch"]
|
|
17
|
+
E -->|"falha"| G["Autocorreção"]
|
|
18
|
+
G --> D
|
|
19
|
+
F --> H["Curar conhecimento (orçamento fixo)"]
|
|
20
|
+
H -.-> B
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart LR
|
|
25
|
+
A["Verificação falha"] --> B["Reparar"] --> C["Replanejar a rota"] --> D["Desvio registrado"] --> E["Parar só por condições externas"]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
flowchart LR
|
|
30
|
+
T["Terminal do Pi"] <-->|"conectar / desconectar"| O[("Owner persistente")]
|
|
31
|
+
W["WebUI<br/>quadro · branches · intervir"] <-->|"conectar / desconectar"| O
|
|
32
|
+
O --> X["Workers em worktrees"] --> Y["Sua branch"]
|
|
33
|
+
O -.-> K["Conhecimento .cadence/"]
|
|
34
|
+
```
|
|
7
35
|
|
|
8
36
|
## Por que o Cadence
|
|
9
37
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
O Cadence é um assistente confiável, **não uma caixa de areia**: seus agentes editam sua cópia de trabalho diretamente com as ferramentas do host, então use-o apenas em código que você possa revisar e recuperar.
|
|
38
|
+
| | |
|
|
39
|
+
| --------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| **O trabalho sobrevive à janela** | Os clientes só conectam e desconectam; o owner continua. |
|
|
41
|
+
| **Nada muda antes da aprovação** | Investigação somente leitura e um acordo legível que você confirma. |
|
|
42
|
+
| **Resultados confiáveis** | Verificações reais e revisão independente; texto do modelo nunca conta como aprovado. |
|
|
43
|
+
| **Termina sozinho** | Após aprovar, repara, replaneja ou registra um desvio, e só para por condições fora do repositório. |
|
|
44
|
+
| **Mais rápido por desenho** | Tarefas independentes rodam lado a lado em worktrees próprios. |
|
|
45
|
+
| **O conhecimento se acumula** | Tabela de rotas e orçamento fixo: workers leem o que corresponde e lições novas substituem as obsoletas. |
|
|
46
|
+
| **WebUI que mostra e conduz** | Quadro de tarefas, revisões, desvios, branches, raciocínio; intervir ou enfileirar mensagem durante a resposta. |
|
|
47
|
+
| **Um só histórico** | As conversas do navegador são as sessões do Pi do projeto; continue em qualquer lugar. |
|
|
48
|
+
|
|
49
|
+
> O Cadence é um assistente confiável, **não um sandbox**: seus agentes usam ferramentas do host no checkout ou worktree aprovado.
|
|
50
|
+
> Use em código que você possa revisar e recuperar.
|
|
24
51
|
|
|
25
52
|
## Instalação
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
Requer Node `>=22.19.0` e o Pi com login em um provedor de modelos; o Cadence reutiliza o login do Pi.
|
|
28
55
|
|
|
29
56
|
```sh
|
|
30
57
|
npm install -g @abelxiaoxing/cadence
|
|
31
58
|
pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
59
|
+
cadence server install # WebUI e serviço de inicialização opcionais
|
|
32
60
|
```
|
|
33
61
|
|
|
34
|
-
`cadence server install`
|
|
35
|
-
O
|
|
36
|
-
A porta e o token ficam em `~/.pi/agent/cadence/.env`; qualquer pessoa com o token pode usar seu espaço de trabalho, então mantenha o link privado.
|
|
62
|
+
`cadence server install` mostra um link privado (`http://127.0.0.1:17423/?token=…`).
|
|
63
|
+
O token dá acesso ao seu workspace: mantenha o link privado.
|
|
37
64
|
|
|
38
65
|
## Uso
|
|
39
66
|
|
|
40
|
-
###
|
|
41
|
-
|
|
42
|
-
1. Abra o link impresso uma vez; o navegador então se lembra de você.
|
|
43
|
-
Se você o perder, `cadence token-link --reveal` o imprime de novo.
|
|
44
|
-
2. Escolha uma pasta de projeto.
|
|
45
|
-
A preferência de modelo salva é reutilizada ao enviar; escolha uma vez se ela não existir.
|
|
46
|
-
3. Envie `/cadence [objetivo]` uma vez.
|
|
47
|
-
Esta conversa permanece no modo Cadence; esclareça os requisitos com mensagens normais.
|
|
48
|
-
4. Revise o plano completo e clique em **Implement this plan**.
|
|
49
|
-
Implementação, verificações, recuperação automática e entrega local acordada são automáticos.
|
|
50
|
-
5. Acompanhe o progresso na conversa; abra os registros dos subagentes no painel **Subagents**, no canto inferior esquerdo.
|
|
51
|
-
Atualizar a página ou concluir um objetivo não desativa o modo.
|
|
52
|
-
**Exit Cadence** sai do modo; **Cancel workflow — request stop** solicita o cancelamento.
|
|
67
|
+
### Navegador
|
|
53
68
|
|
|
54
|
-
|
|
69
|
+
1. Abra o link exibido uma vez (`cadence token-link --reveal` mostra de novo).
|
|
70
|
+
2. Escolha uma pasta de trabalho no botão inferior direito.
|
|
71
|
+
3. Envie `/cadence [objetivo]` e responda às perguntas.
|
|
72
|
+
4. Clique em **Implement this plan** e acompanhe o quadro e o dock **Subagents**.
|
|
73
|
+
Imagens por colar ou arrastar ([detalhes](docs/conversation-mode.md#images-in-the-webui)).
|
|
55
74
|
|
|
56
|
-
###
|
|
75
|
+
### Terminal
|
|
57
76
|
|
|
58
|
-
Digite `/cadence <objetivo>` uma vez
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Digite `exit cadence` para sair; sair não cancela trabalho aceito.
|
|
64
|
-
As preferências de modelo são mantidas entre projetos em `~/.pi/agent/cadence/settings.json`.
|
|
65
|
-
|
|
66
|
-
O proprietário local inicia sob demanda; o serviço do sistema é opcional para WebUI/inicialização automática.
|
|
67
|
-
|
|
68
|
-
`/cadence-history [run-id]`: readonly run details and retained history; no service startup or task execution.
|
|
69
|
-
See [History and diagnostics](docs/history.md).
|
|
70
|
-
[Conversation mode](docs/conversation-mode.md): native/browser approval, limits and worktree setup.
|
|
71
|
-
Browser authentication is not execution consent.
|
|
72
|
-
|
|
73
|
-
### Mais projetos
|
|
77
|
+
Digite `/cadence <objetivo>` uma vez na conversa do Pi de um projeto confiável; o modo continua ativo após concluir.
|
|
78
|
+
`exit cadence` ou `退出 Cadence` sai sem cancelar o trabalho aceito.
|
|
79
|
+
`/cadence-history [run-id]` é somente leitura.
|
|
80
|
+
`CADENCE_PARALLEL` (padrão 4) define os workers simultâneos.
|
|
81
|
+
Detalhes: [modo conversa](docs/conversation-mode.md), [histórico](docs/history.md).
|
|
74
82
|
|
|
75
83
|
```sh
|
|
76
|
-
cadence project open /absolute/project
|
|
77
|
-
cadence project open /absolute/new-project --create
|
|
84
|
+
cadence project open /absolute/project # um owner, porta e histórico por projeto
|
|
78
85
|
```
|
|
79
86
|
|
|
80
|
-
Cada projeto recebe seu próprio owner, porta e histórico, e o comando imprime seu link privado; o seletor de pastas da interface web abre projetos da mesma maneira.
|
|
81
|
-
Abrir outro projeto nunca interrompe o trabalho no anterior.
|
|
82
|
-
|
|
83
|
-
### Verificações
|
|
84
|
-
|
|
85
|
-
Os comandos de verificação constam do plano aprovado, incluindo verificações iniciais e de aceitação.
|
|
86
|
-
Os resultados reais permanecem separados da revisão automática do agente.
|
|
87
|
-
|
|
88
87
|
## Gerenciar o serviço
|
|
89
88
|
|
|
90
89
|
```sh
|
|
91
90
|
cadence server status
|
|
92
|
-
cadence server restart # após
|
|
93
|
-
cadence server upgrade
|
|
94
|
-
cadence server stop
|
|
95
|
-
cadence server uninstall #
|
|
91
|
+
cadence server restart # após atualizar ou alterar .env / models.json
|
|
92
|
+
cadence server upgrade # baixar, instalar, reiniciar; volta atrás se a nova versão falhar
|
|
93
|
+
cadence server stop
|
|
94
|
+
cadence server uninstall # antes de npm uninstall -g
|
|
95
|
+
cadence doctor # restos e recuperações recentes; --fix para o resto
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Uninstall remove apenas a definição do serviço; projetos, histórico e configurações do Pi permanecem.
|
|
101
|
-
Serviços root e nomeados do Linux, acesso HTTPS remoto e recuperação estão cobertos em [gerenciamento do serviço](docs/service-management.md) e [acesso remoto](docs/remote-access.md).
|
|
98
|
+
Falha ou queda de energia não exige limpeza: a próxima inicialização se recupera e diz o que fez.
|
|
99
|
+
Veja [gerenciamento do serviço](docs/service-management.md) e [acesso remoto](docs/remote-access.md).
|
|
102
100
|
|
|
103
101
|
## Desenvolvimento
|
|
104
102
|
|
|
105
|
-
O Pi também
|
|
106
|
-
O Cadence requer Pi 1.5.0 ou um host 1.x compatível;
|
|
103
|
+
O Pi também carrega um checkout local ou tarball empacotado: adicione o caminho absoluto ou relativo a `packages` do Pi, ou teste `pi -e ./cadence`.
|
|
104
|
+
O Cadence requer o Pi 1.5.0 ou um host 1.x compatível; pins de desenvolvimento e runtimes testados não são promessas de compatibilidade universal.
|
|
107
105
|
|
|
108
106
|
```sh
|
|
109
107
|
bun install
|
|
110
108
|
bun run verify
|
|
111
109
|
```
|
|
112
110
|
|
|
113
|
-
|
|
114
|
-
`verify` é a única verificação para desenvolvimento e publicação: apenas verificações rápidas, sem navegador.
|
|
115
|
-
Exige um build oficial do Node e um diretório temporário privado; veja [verificação](engineering/verification.md).
|
|
111
|
+
Guias por área em [engineering/](engineering/) e [AGENTS.md](AGENTS.md). `verify` é o único portão rápido; exige um build oficial do Node e um diretório temporário privado ([verificação](engineering/verification.md)).
|
|
116
112
|
|
|
117
113
|
## Licença
|
|
118
114
|
|
|
119
|
-
|
|
120
|
-
Adaptações, fontes e
|
|
115
|
+
MIT.
|
|
116
|
+
Adaptações, fontes e componentes de terceiros incluídos mantêm suas licenças: [reutilização e distribuição](docs/reuse-and-distribution.md), [avisos de terceiros](THIRD_PARTY_NOTICES.md).
|
package/README.ru.md
CHANGED
|
@@ -2,121 +2,116 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [Português (Brasil)](README.pt-BR.md) · [Русский](README.ru.md)
|
|
4
4
|
|
|
5
|
-
Cadence превращает [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) в
|
|
6
|
-
|
|
5
|
+
Cadence превращает [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) в инженерный процесс, управляемый диалогом: введите `/cadence [цель]`, один раз согласуйте результат, и постоянный owner реализует, восстанавливается и проверяет.
|
|
6
|
+
В терминале или в необязательном WebUI.
|
|
7
|
+
|
|
8
|
+
## Как это работает
|
|
9
|
+
|
|
10
|
+
```mermaid
|
|
11
|
+
flowchart TD
|
|
12
|
+
A["/cadence цель"] --> B["Исследование только для чтения"]
|
|
13
|
+
B --> C["Согласовать и одобрить один раз"]
|
|
14
|
+
C --> D["Независимые задачи параллельно в worktree"]
|
|
15
|
+
D --> E["Реальные проверки + автоматическое Agent-ревью"]
|
|
16
|
+
E -->|"успех"| F["Локальное слияние в вашу ветку"]
|
|
17
|
+
E -->|"сбой"| G["Самокоррекция"]
|
|
18
|
+
G --> D
|
|
19
|
+
F --> H["Ведение знаний (фиксированный бюджет)"]
|
|
20
|
+
H -.-> B
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart LR
|
|
25
|
+
A["Проверка не пройдена"] --> B["Починить"] --> C["Перепланировать маршрут"] --> D["Зафиксированное отклонение"] --> E["Остановка только из-за внешних условий"]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
flowchart LR
|
|
30
|
+
T["Терминал Pi"] <-->|"подключение / отключение"| O[("Постоянный owner")]
|
|
31
|
+
W["WebUI<br/>доска · ветки · вмешательство"] <-->|"подключение / отключение"| O
|
|
32
|
+
O --> X["Worker-ы в worktree"] --> Y["Ваша ветка"]
|
|
33
|
+
O -.-> K["Знания .cadence/"]
|
|
34
|
+
```
|
|
7
35
|
|
|
8
36
|
## Почему Cadence
|
|
9
37
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Cadence — это доверенный ассистент, **а не песочница**: его агенты редактируют вашу рабочую копию напрямую инструментами хоста, поэтому используйте его только для кода, который вы можете просмотреть и восстановить.
|
|
38
|
+
| | |
|
|
39
|
+
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
40
|
+
| **Работа переживает окно** | Клиенты только подключаются и отключаются; owner продолжает работать. |
|
|
41
|
+
| **До одобрения ничего не меняется** | Сначала исследование только для чтения, затем понятное соглашение, которое вы подтверждаете. |
|
|
42
|
+
| **Надёжный результат** | Реальные проверки и независимое ревью; текст модели никогда не считается успехом. |
|
|
43
|
+
| **Доводит до конца сам** | После одобрения чинит, перепланирует или фиксирует отклонение и останавливается лишь из-за условий вне репозитория. |
|
|
44
|
+
| **Быстрее по устройству** | Независимые задачи идут параллельно в своих worktree. |
|
|
45
|
+
| **Знания накапливаются** | Таблица маршрутов и фиксированный бюджет: worker-ы читают нужное, новые уроки вытесняют устаревшие. |
|
|
46
|
+
| **WebUI, который показывает и направляет** | Доска задач, ревизии, отклонения, ветки, рассуждения; можно вмешаться или поставить сообщение в очередь прямо во время ответа. |
|
|
47
|
+
| **Одна история** | Диалоги в браузере — это сессии Pi проекта; продолжайте где удобно. |
|
|
48
|
+
|
|
49
|
+
> Cadence — доверенный помощник, **не песочница**: его агенты используют инструменты хоста в одобренном checkout или worktree.
|
|
50
|
+
> Применяйте на коде, который вы можете проверить и восстановить.
|
|
24
51
|
|
|
25
52
|
## Установка
|
|
26
53
|
|
|
27
|
-
|
|
54
|
+
Нужны Node `>=22.19.0` и Pi с входом у провайдера моделей; Cadence использует вход Pi.
|
|
28
55
|
|
|
29
56
|
```sh
|
|
30
57
|
npm install -g @abelxiaoxing/cadence
|
|
31
58
|
pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
59
|
+
cadence server install # необязательные WebUI и служба автозапуска
|
|
32
60
|
```
|
|
33
61
|
|
|
34
|
-
`cadence server install`
|
|
35
|
-
|
|
36
|
-
Порт и токен хранятся в `~/.pi/agent/cadence/.env`; любой, у кого есть токен, может использовать ваше рабочее пространство, поэтому держите ссылку в секрете.
|
|
62
|
+
`cadence server install` выводит приватную ссылку (`http://127.0.0.1:17423/?token=…`).
|
|
63
|
+
Токен даёт доступ к вашему рабочему пространству: не публикуйте ссылку.
|
|
37
64
|
|
|
38
65
|
## Использование
|
|
39
66
|
|
|
40
|
-
###
|
|
41
|
-
|
|
42
|
-
1. Откройте напечатанную ссылку один раз; затем браузер запомнит вас.
|
|
43
|
-
Если вы её потеряете, `cadence token-link --reveal` печатает её снова.
|
|
44
|
-
2. Выберите папку проекта.
|
|
45
|
-
При отправке используется сохранённая модель; если её нет, выберите модель один раз.
|
|
46
|
-
3. Один раз отправьте `/cadence [цель]`.
|
|
47
|
-
Разговор остаётся в режиме Cadence; уточняйте требования обычными сообщениями.
|
|
48
|
-
4. Проверьте полный план и нажмите **Implement this plan**.
|
|
49
|
-
Реализация, проверки, автоматическое восстановление и согласованная локальная интеграция выполняются автоматически.
|
|
50
|
-
5. Следите за ходом работы в разговоре; записи субагентов открываются из панели **Subagents** слева внизу.
|
|
51
|
-
Обновление страницы и завершение цели не выключают режим.
|
|
52
|
-
**Exit Cadence** выходит из режима; **Cancel workflow — request stop** запрашивает отмену работы.
|
|
67
|
+
### Браузер
|
|
53
68
|
|
|
54
|
-
|
|
69
|
+
1. Один раз откройте выведенную ссылку (`cadence token-link --reveal` покажет её снова).
|
|
70
|
+
2. Выберите рабочую папку кнопкой справа внизу.
|
|
71
|
+
3. Отправьте `/cadence [цель]` и ответьте на уточняющие вопросы.
|
|
72
|
+
4. Нажмите **Implement this plan** и следите за доской и панелью **Subagents**.
|
|
73
|
+
Изображения — вставкой или перетаскиванием ([подробнее](docs/conversation-mode.md#images-in-the-webui)).
|
|
55
74
|
|
|
56
|
-
###
|
|
75
|
+
### Терминал
|
|
57
76
|
|
|
58
|
-
Введите `/cadence <цель>` один раз
|
|
59
|
-
Cadence
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Команда `exit cadence` выходит из режима, но не отменяет принятую работу.
|
|
64
|
-
Настройки модели сохраняются между проектами в `~/.pi/agent/cadence/settings.json`.
|
|
65
|
-
|
|
66
|
-
Локальный владелец запускается по требованию; системная служба нужна только для дополнительного WebUI и автозапуска.
|
|
67
|
-
|
|
68
|
-
`/cadence-history [run-id]`: readonly run details and retained history; no service startup or task execution.
|
|
69
|
-
See [History and diagnostics](docs/history.md).
|
|
70
|
-
[Conversation mode](docs/conversation-mode.md): native/browser approval, limits and worktree setup.
|
|
71
|
-
Browser authentication is not execution consent.
|
|
72
|
-
|
|
73
|
-
### Другие проекты
|
|
77
|
+
Введите `/cadence <цель>` один раз в диалоге Pi доверенного проекта; режим остаётся после завершения цели.
|
|
78
|
+
`exit cadence` или `退出 Cadence` выходит из режима, не отменяя принятую работу.
|
|
79
|
+
`/cadence-history [run-id]` — только чтение.
|
|
80
|
+
`CADENCE_PARALLEL` (по умолчанию 4) задаёт число одновременных worker-ов.
|
|
81
|
+
Подробнее: [режим диалога](docs/conversation-mode.md), [история](docs/history.md).
|
|
74
82
|
|
|
75
83
|
```sh
|
|
76
|
-
cadence project open /absolute/project
|
|
77
|
-
cadence project open /absolute/new-project --create
|
|
84
|
+
cadence project open /absolute/project # свой owner, порт и история у каждого проекта
|
|
78
85
|
```
|
|
79
86
|
|
|
80
|
-
Каждый проект получает своего owner, порт и историю, и команда печатает его приватную ссылку; выборщик папок веб-интерфейса открывает проекты тем же способом.
|
|
81
|
-
Открытие другого проекта никогда не останавливает работу в предыдущем.
|
|
82
|
-
|
|
83
|
-
### Проверки
|
|
84
|
-
|
|
85
|
-
Команды исходных и приёмочных проверок указываются в явно одобренном плане.
|
|
86
|
-
Их фактические результаты отделены от автоматической проверки агентом.
|
|
87
|
-
|
|
88
87
|
## Управление службой
|
|
89
88
|
|
|
90
89
|
```sh
|
|
91
90
|
cadence server status
|
|
92
91
|
cadence server restart # после обновления или изменения .env / models.json
|
|
93
|
-
cadence server upgrade
|
|
94
|
-
cadence server stop
|
|
95
|
-
cadence server uninstall #
|
|
92
|
+
cadence server upgrade # загрузить, установить, перезапустить; откат, если новая версия не запустилась
|
|
93
|
+
cadence server stop
|
|
94
|
+
cadence server uninstall # перед npm uninstall -g
|
|
95
|
+
cadence doctor # остатки и недавние восстановления; --fix для остального
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
Корневые и именованные службы Linux, удалённый HTTPS-доступ и восстановление описаны в [управлении службой](docs/service-management.md) и [удалённом доступе](docs/remote-access.md).
|
|
98
|
+
После сбоя или отключения питания чистка не нужна: следующий запуск восстановится и сообщит, что сделал.
|
|
99
|
+
См.
|
|
100
|
+
[управление службой](docs/service-management.md) и [удалённый доступ](docs/remote-access.md).
|
|
102
101
|
|
|
103
102
|
## Разработка
|
|
104
103
|
|
|
105
|
-
Pi
|
|
106
|
-
Cadence требует Pi 1.5.0 или совместимый хост 1.x;
|
|
104
|
+
Pi может загрузить и локальный checkout, или упакованный tarball: добавьте его абсолютный или относительный путь в `packages` Pi либо попробуйте `pi -e ./cadence`.
|
|
105
|
+
Cadence требует Pi 1.5.0 или совместимый хост 1.x; закреплённые версии и проверенные среды не являются универсальными обещаниями совместимости.
|
|
107
106
|
|
|
108
107
|
```sh
|
|
109
108
|
bun install
|
|
110
109
|
bun run verify
|
|
111
110
|
```
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
Индекс проекта в [AGENTS.md](AGENTS.md) указывает, какой файл покрывает какой код.
|
|
115
|
-
`verify` — единственная проверка для разработки и публикации: только быстрые проверки, без браузера.
|
|
116
|
-
Нужны официальная сборка Node и приватный временный каталог; см.
|
|
117
|
-
[проверки](engineering/verification.md).
|
|
112
|
+
Руководства по областям: [engineering/](engineering/) и [AGENTS.md](AGENTS.md). `verify` — единственный быстрый барьер; нужны официальная сборка Node и приватный временный каталог ([проверка](engineering/verification.md)).
|
|
118
113
|
|
|
119
114
|
## Лицензия
|
|
120
115
|
|
|
121
|
-
|
|
122
|
-
Включённые адаптации, шрифты и
|
|
116
|
+
MIT.
|
|
117
|
+
Включённые адаптации, шрифты и сторонние компоненты сохраняют свои лицензии: [повторное использование и распространение](docs/reuse-and-distribution.md), [уведомления третьих сторон](THIRD_PARTY_NOTICES.md).
|