@agentrica/mcp 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +12 -11
- package/README.md +12 -11
- package/agents/ai_business_product_development_agency/00-common-rules.md +1 -0
- package/agents/ai_cybersecurity_agency/00-common-rules.md +1 -0
- package/agents/ai_privacy_compliance_agency/00-common-rules.md +1 -0
- package/agents/ai_software_agency/00-common-rules.md +7 -0
- package/agents/ai_web_design_agency/00-common-rules.md +2 -0
- package/dist/mcp/src/page/app.js +40 -10
- package/dist/mcp/src/page/index.html +39 -19
- package/dist/mcp/src/page/style.css +13 -2
- package/dist/mcp/src/project.js +11 -3
- package/dist/mcp/src/prompt.js +3 -3
- package/dist/mcp/src/server.js +3 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -24,7 +24,7 @@ You need Node 22 or later, with npm.
|
|
|
24
24
|
**Claude Code**, from your project folder:
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
27
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
On first start npx downloads the package from npm. The version stays the one you set until you change it: role updates do not arrive unless you choose them.
|
|
@@ -36,7 +36,7 @@ On first start npx downloads the package from npm. The version stays the one you
|
|
|
36
36
|
"mcpServers": {
|
|
37
37
|
"agentrica": {
|
|
38
38
|
"command": "npx",
|
|
39
|
-
"args": ["-y", "@agentrica/mcp@0.3.
|
|
39
|
+
"args": ["-y", "@agentrica/mcp@0.3.2"]
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -45,7 +45,7 @@ On first start npx downloads the package from npm. The version stays the one you
|
|
|
45
45
|
**Least privilege (recommended).** Install the package in its own folder and start it with Node's permission model: the server can only read that folder, and Node blocks file writes, network connections and child processes. The server needs none of them, so it works the same; the permissions limit the damage of any future defect.
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
|
-
npm install -g --ignore-scripts @agentrica/mcp@0.3.
|
|
48
|
+
npm install -g --ignore-scripts @agentrica/mcp@0.3.2
|
|
49
49
|
npm root -g
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -72,7 +72,7 @@ Put the task in quotes: Claude Code splits arguments on spaces.
|
|
|
72
72
|
**Squad.** With `--agents` the server loads only the agents you list: agent ids and department codes, comma-separated, case-insensitive. For example the whole software department plus the accessibility agent:
|
|
73
73
|
|
|
74
74
|
```sh
|
|
75
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
75
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2 --agents aisa,aiwda-08
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
The command menu shows only the squad's prompts, and `elenca_agenti` and `agente` see only those agents too. Without `--agents` all 56 agents are available. An unknown id or code stops the server with a message naming it, in the client's logs. In Claude Code prompts do not enter the model's context (we checked with `/context`): a squad makes the menu shorter, it does not save tokens.
|
|
@@ -93,14 +93,13 @@ Number 01 in each department is the director: it coordinates the specialists and
|
|
|
93
93
|
With `--panel` the server also opens a page on your computer where you follow the project and make the choices the agent asks you for, instead of answering in the terminal:
|
|
94
94
|
|
|
95
95
|
```sh
|
|
96
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
96
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2 --panel
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Then ask the agent to open the panel (`open_panel` tool): the page opens in your browser. It
|
|
99
|
+
Then ask the agent to open the panel (`open_panel` tool): the page opens in your browser. It has three pages, with a menu at the top counting pending choices and findings:
|
|
100
100
|
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
- **Fasi** (phases): the project phases, the open phase with backlog and acceptance criteria;
|
|
101
|
+
- **Sessione** (session): pending choices (*Da decidere*, to decide), with options and reasons, whose answer, with an optional note, goes back to the agent; next to them, the Agentrica agents called in this session (*Agenti in uso*, agents in use), with the start of the task;
|
|
102
|
+
- **Piano** (plan): the open phase with backlog and acceptance criteria, and all project phases;
|
|
104
103
|
- **Rilievi** (findings): open findings from phases and audits, by priority and department.
|
|
105
104
|
|
|
106
105
|
With the panel the model has two more tools:
|
|
@@ -117,8 +116,8 @@ If the page is not open, `ask_user` opens it. The client waits for the answer as
|
|
|
117
116
|
**Format of `plan/` and `audit/`.** The panel reads the agentic-starter plan format, in Italian, the same as Agentrica's own [`plan/`](https://github.com/flgisimone/agentrica/tree/main/plan) and [`audit/`](https://github.com/flgisimone/agentrica/tree/main/audit); if something is missing, the page says what.
|
|
118
117
|
|
|
119
118
|
- `plan/README.md` with a `## Fasi` section and a `| Fase | File | Contenuto | Stato |` table, the file as a link (`[14-pannello.md](14-pannello.md)`). The open phase is the first one whose status is neither `completata` nor `sospesa`.
|
|
120
|
-
- In the phase file: `# Title`, a `**Obiettivo**: …` line, `## Backlog` with the `| # | Task | Priorità |` table, `## Criteri di accettazione` and `## Fatto` as lists; a task is done when its id appears in bold under «Fatto» (`- **F14-01** …`). `## Rilievi aperti` is a list, with the priority (`P0`–`P3`) in the text.
|
|
121
|
-
- `audit/<folder>/<file>.json` with `agente` (e.g. `"AICA-02 · …"`, which gives the department) and a `rilievi` list of objects with `id`, `titolo`, `priorita` and optional `stato
|
|
119
|
+
- In the phase file: `# Title`, a `**Obiettivo**: …` line, `## Backlog` with the `| # | Task | Priorità |` table, `## Criteri di accettazione` and `## Fatto` as lists; a task is done when its id appears in bold under «Fatto» (`- **F14-01** …`). `## Rilievi aperti` is a list, with the priority (`P0`–`P3`) in the text; an item that says «risolto» or «chiuso» (resolved, closed; e.g. «Risolto in F6.») stays in the plan but the panel does not show it.
|
|
120
|
+
- `audit/<folder>/<file>.json` with `agente` (e.g. `"AICA-02 · …"`, which gives the department) and a `rilievi` list of objects with `id`, `titolo`, `priorita` and optional `stato`; a finding whose `stato` says «risolto» or «chiuso» is not shown.
|
|
122
121
|
|
|
123
122
|
## Put to the test
|
|
124
123
|
|
|
@@ -138,6 +137,8 @@ The agents' text comes from the `agents/` files of the installed version. To upd
|
|
|
138
137
|
|
|
139
138
|
## Versions
|
|
140
139
|
|
|
140
|
+
- **0.3.2**: the panel has three pages (Sessione, Piano, Rilievi) with a menu counting pending choices and findings; agents and server behaviour unchanged.
|
|
141
|
+
- **0.3.1**: the panel hides closed findings and counts new files separately; the `agente` tool only accepts department codes in ids; common rules with a shared severity scale (P0–P3) and a scale for the software department.
|
|
141
142
|
- **0.3.0**: local panel with `--panel`: phases, backlog, findings, agents in use and choices made from the page (`open_panel` and `ask_user` tools). Without `--panel` nothing changes.
|
|
142
143
|
- **0.2.1**: name `io.github.flgisimone/agentrica` for the official MCP registry; agents and behaviour unchanged.
|
|
143
144
|
- **0.2.0**: `--agents` argument to load only a squad of agents or departments; in an empty project, or when what the role must examine is missing, the agent says so and proposes first steps to confirm, without inventing findings.
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Serve Node 22 o successivo, con npm.
|
|
|
22
22
|
**Claude Code**, dalla cartella del tuo progetto:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
25
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Al primo avvio npx scarica il pacchetto da npm. La versione resta quella indicata finché non la cambi tu: un aggiornamento dei ruoli non arriva senza che tu lo scelga.
|
|
@@ -34,7 +34,7 @@ Al primo avvio npx scarica il pacchetto da npm. La versione resta quella indicat
|
|
|
34
34
|
"mcpServers": {
|
|
35
35
|
"agentrica": {
|
|
36
36
|
"command": "npx",
|
|
37
|
-
"args": ["-y", "@agentrica/mcp@0.3.
|
|
37
|
+
"args": ["-y", "@agentrica/mcp@0.3.2"]
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -43,7 +43,7 @@ Al primo avvio npx scarica il pacchetto da npm. La versione resta quella indicat
|
|
|
43
43
|
**Permessi minimi (consigliato).** Installa il pacchetto in una cartella sua e avvialo con il permission model di Node: il server può solo leggere quella cartella, e Node blocca scritture su file, connessioni di rete e processi figli. Il server non ne ha bisogno, quindi funziona uguale; i permessi limitano i danni di un eventuale difetto futuro.
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
npm install -g --ignore-scripts @agentrica/mcp@0.3.
|
|
46
|
+
npm install -g --ignore-scripts @agentrica/mcp@0.3.2
|
|
47
47
|
npm root -g
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -70,7 +70,7 @@ Metti il compito fra virgolette: Claude Code separa gli argomenti con gli spazi.
|
|
|
70
70
|
**Squadra.** Con `--agents` il server carica solo gli agenti che indichi: id di agenti e sigle di reparti, separati da virgole, senza distinguere maiuscole. Per esempio tutto il reparto software più l'agente dell'accessibilità:
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
73
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2 --agents aisa,aiwda-08
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Nel menu dei comandi restano solo i prompt della squadra, e anche `elenca_agenti` e `agente` vedono solo quelli. Senza `--agents` ci sono tutti i 56 agenti. Un id o una sigla sconosciuti fermano il server con un messaggio che li nomina, nei log del client. In Claude Code i prompt non entrano nel contesto del modello (lo abbiamo verificato con `/context`): la squadra rende il menu più corto, ma non fa risparmiare token.
|
|
@@ -93,14 +93,13 @@ I file degli agenti sono in italiano; l'agente risponde nella lingua in cui gli
|
|
|
93
93
|
Con `--panel` il server apre anche una pagina sul tuo computer da cui segui il progetto e prendi le scelte che l'agente ti chiede, invece di rispondere nel terminale:
|
|
94
94
|
|
|
95
95
|
```sh
|
|
96
|
-
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.
|
|
96
|
+
claude mcp add agentrica -- npx -y @agentrica/mcp@0.3.2 --panel
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Poi chiedi all'agente di aprire il pannello (tool `open_panel`): la pagina si apre nel browser.
|
|
99
|
+
Poi chiedi all'agente di aprire il pannello (tool `open_panel`): la pagina si apre nel browser. Ha tre pagine, con il menu in alto che conta le scelte in attesa e i rilievi:
|
|
100
100
|
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
- **Fasi**: le fasi del progetto, la fase aperta con backlog e criteri di accettazione;
|
|
101
|
+
- **Sessione**: le scelte da prendere (*Da decidere*), con le opzioni e le motivazioni, la cui risposta, con una nota facoltativa, torna all'agente; accanto, gli agenti di Agentrica chiamati in questa sessione (*Agenti in uso*), con l'inizio del compito;
|
|
102
|
+
- **Piano**: la fase in corso con backlog e criteri di accettazione, e tutte le fasi del progetto;
|
|
104
103
|
- **Rilievi**: i rilievi aperti delle fasi e quelli degli audit, per priorità e reparto.
|
|
105
104
|
|
|
106
105
|
Con il pannello il modello ha due tool in più:
|
|
@@ -117,8 +116,8 @@ Se la pagina non è aperta, `ask_user` la apre. Il client aspetta la risposta fi
|
|
|
117
116
|
**Formato di `plan/` e `audit/`.** Il pannello legge il formato dei piani di agentic-starter, lo stesso del [`plan/`](https://github.com/flgisimone/agentrica/tree/main/plan) e dell'[`audit/`](https://github.com/flgisimone/agentrica/tree/main/audit) di Agentrica; se qualcosa manca, la pagina dice cosa.
|
|
118
117
|
|
|
119
118
|
- `plan/README.md` con una sezione `## Fasi` e una tabella `| Fase | File | Contenuto | Stato |`, il file come link (`[14-pannello.md](14-pannello.md)`). La fase aperta è la prima con uno stato diverso da `completata` e `sospesa`.
|
|
120
|
-
- Nel file della fase: `# Titolo`, una riga `**Obiettivo**: …`, `## Backlog` con la tabella `| # | Task | Priorità |`, `## Criteri di accettazione` e `## Fatto` come elenchi; un task è fatto quando il suo id compare in grassetto in «Fatto» (`- **F14-01** …`). `## Rilievi aperti` è un elenco, con la priorità (`P0`–`P3`) nel testo.
|
|
121
|
-
- `audit/<cartella>/<file>.json` con `agente` (es. `"AICA-02 · …"`, da cui il reparto) e un elenco `rilievi` di oggetti con `id`, `titolo`, `priorita` e `stato` facoltativo.
|
|
119
|
+
- Nel file della fase: `# Titolo`, una riga `**Obiettivo**: …`, `## Backlog` con la tabella `| # | Task | Priorità |`, `## Criteri di accettazione` e `## Fatto` come elenchi; un task è fatto quando il suo id compare in grassetto in «Fatto» (`- **F14-01** …`). `## Rilievi aperti` è un elenco, con la priorità (`P0`–`P3`) nel testo; una voce che dice «risolto» o «chiuso» (es. «Risolto in F6.») resta nel piano ma il pannello non la mostra.
|
|
120
|
+
- `audit/<cartella>/<file>.json` con `agente` (es. `"AICA-02 · …"`, da cui il reparto) e un elenco `rilievi` di oggetti con `id`, `titolo`, `priorita` e `stato` facoltativo; un rilievo con uno `stato` che dice «risolto» o «chiuso» non si mostra.
|
|
122
121
|
|
|
123
122
|
## Messi alla prova
|
|
124
123
|
|
|
@@ -138,6 +137,8 @@ Il testo degli agenti viene dai file di `agents/` della versione installata. Per
|
|
|
138
137
|
|
|
139
138
|
## Versioni
|
|
140
139
|
|
|
140
|
+
- **0.3.2**: pannello in tre pagine (Sessione, Piano, Rilievi) con menu e contatori delle scelte in attesa e dei rilievi; agenti e comportamento del server invariati.
|
|
141
|
+
- **0.3.1**: pannello che nasconde i rilievi chiusi e conta a parte i file nuovi; id del tool `agente` limitato alle sigle dei reparti; regole comuni con una scala di gravità condivisa (P0–P3) e una scala per il reparto software.
|
|
141
142
|
- **0.3.0**: pannello locale con `--panel`: fasi, backlog, rilievi, agenti in uso e scelte da prendere dalla pagina (tool `open_panel` e `ask_user`). Senza `--panel` nulla cambia.
|
|
142
143
|
- **0.2.1**: nome `io.github.flgisimone/agentrica` per il registro MCP ufficiale; agenti e comportamento invariati.
|
|
143
144
|
- **0.2.0**: argomento `--agents` per caricare solo una squadra di agenti o reparti; con un progetto vuoto, o senza ciò che il ruolo deve esaminare, l'agente lo dice e propone i primi passi da confermare, senza inventare rilievi.
|
|
@@ -35,5 +35,6 @@ Le analisi non sostituiscono il giudizio del management né consulenze legali, f
|
|
|
35
35
|
|
|
36
36
|
## Dati del progetto e segnalazioni
|
|
37
37
|
- Non inviare codice, documenti o dati del progetto a servizi esterni (siti, API, modelli, strumenti online) senza l'ok esplicito dell'utente.
|
|
38
|
+
- Priorità comuni a tutti i reparti: P0 critica, P1 alta, P2 media, P3 bassa. Nei rilievi scrivi solo la sigla (es. P2), senza etichette aggiunte; le descrizioni del reparto dicono quando usarle.
|
|
38
39
|
- Un rilievo P0 si segnala subito all'utente, senza aspettare la fine dell'attività.
|
|
39
40
|
- Il Chief, la Software Agency e gli altri reparti citati in queste regole sono agenti di Agentrica, non persone dell'organizzazione dell'utente: decisioni e approvazioni restano all'utente o al responsabile umano che indica.
|
|
@@ -37,5 +37,6 @@ Le analisi non sostituiscono CISO, responsabile IT, DPO, legale o incident respo
|
|
|
37
37
|
|
|
38
38
|
## Dati del progetto e segnalazioni
|
|
39
39
|
- Non inviare codice, documenti o dati del progetto a servizi esterni (siti, API, modelli, strumenti online) senza l'ok esplicito dell'utente.
|
|
40
|
+
- Priorità comuni a tutti i reparti: P0 critica, P1 alta, P2 media, P3 bassa. Nei rilievi scrivi solo la sigla (es. P2), senza etichette aggiunte; le descrizioni del reparto dicono quando usarle.
|
|
40
41
|
- Un rilievo P0 si segnala subito all'utente, senza aspettare la fine dell'attività.
|
|
41
42
|
- Il Chief, la Software Agency e gli altri reparti citati in queste regole sono agenti di Agentrica, non persone dell'organizzazione dell'utente: decisioni e approvazioni restano all'utente o al responsabile umano che indica.
|
|
@@ -22,5 +22,6 @@ Le remediation sono raccomandazioni: l'attuazione spetta alla Software Agency pr
|
|
|
22
22
|
|
|
23
23
|
## Dati del progetto e segnalazioni
|
|
24
24
|
- Non inviare codice, documenti o dati del progetto a servizi esterni (siti, API, modelli, strumenti online) senza l'ok esplicito dell'utente.
|
|
25
|
+
- Priorità comuni a tutti i reparti: P0 critica, P1 alta, P2 media, P3 bassa. Nei rilievi scrivi solo la sigla (es. P2), senza etichette aggiunte; le descrizioni del reparto dicono quando usarle.
|
|
25
26
|
- Un rilievo P0 si segnala subito all'utente, senza aspettare la fine dell'attività.
|
|
26
27
|
- Il Chief, la Software Agency e gli altri reparti citati in queste regole sono agenti di Agentrica, non persone dell'organizzazione dell'utente: decisioni e approvazioni restano all'utente o al responsabile umano che indica.
|
|
@@ -16,7 +16,14 @@
|
|
|
16
16
|
- Nel riepilogo finale indica sintesi, file modificati, test, decisioni tecniche, rischi, limiti e attività residue.
|
|
17
17
|
- Merge, deploy e rilascio in produzione richiedono approvazione umana esplicita.
|
|
18
18
|
|
|
19
|
+
## Priorità
|
|
20
|
+
- `P0`: critica, dati persi o esposti, sicurezza compromessa, build o produzione bloccate.
|
|
21
|
+
- `P1`: alta, funzione principale rotta o regressione senza alternativa.
|
|
22
|
+
- `P2`: media, difetto con alternativa, test mancanti su una parte critica, debito che rallenta.
|
|
23
|
+
- `P3`: bassa, pulizia, stile, miglioramento non urgente.
|
|
24
|
+
|
|
19
25
|
## Dati del progetto e segnalazioni
|
|
20
26
|
- Non inviare codice, documenti o dati del progetto a servizi esterni (siti, API, modelli, strumenti online) senza l'ok esplicito dell'utente.
|
|
27
|
+
- Priorità comuni a tutti i reparti: P0 critica, P1 alta, P2 media, P3 bassa. Nei rilievi scrivi solo la sigla (es. P2), senza etichette aggiunte; le descrizioni del reparto dicono quando usarle.
|
|
21
28
|
- Un rilievo P0 si segnala subito all'utente, senza aspettare la fine dell'attività.
|
|
22
29
|
- Il Chief, la Software Agency e gli altri reparti citati in queste regole sono agenti di Agentrica, non persone dell'organizzazione dell'utente: decisioni e approvazioni restano all'utente o al responsabile umano che indica.
|
|
@@ -22,6 +22,7 @@ Tutti gli agenti lavorano in modalità **audit e consulenza**. Non sono agenti d
|
|
|
22
22
|
- `P1`: alta, compromette in modo significativo attività o comprensione.
|
|
23
23
|
- `P2`: media, crea attrito o inefficienza non bloccante.
|
|
24
24
|
- `P3`: bassa, rifinitura o opportunità di miglioramento.
|
|
25
|
+
- Un criterio WCAG di livello A non soddisfatto che impedisce un compito è almeno P1.
|
|
25
26
|
|
|
26
27
|
## Stati
|
|
27
28
|
`Nuova`, `In revisione`, `Confermata`, `Approvata`, `In lavorazione`, `Risolta`, `Verificata`, `Respinta`.
|
|
@@ -68,5 +69,6 @@ Restituire dati validi e strutturati, senza aggiungere campi inventati quando il
|
|
|
68
69
|
|
|
69
70
|
## Dati del progetto e segnalazioni
|
|
70
71
|
- Non inviare codice, documenti o dati del progetto a servizi esterni (siti, API, modelli, strumenti online) senza l'ok esplicito dell'utente.
|
|
72
|
+
- Priorità comuni a tutti i reparti: P0 critica, P1 alta, P2 media, P3 bassa. Nei rilievi scrivi solo la sigla (es. P2), senza etichette aggiunte; le descrizioni del reparto dicono quando usarle.
|
|
71
73
|
- Un rilievo P0 si segnala subito all'utente, senza aspettare la fine dell'attività.
|
|
72
74
|
- Il Chief, la Software Agency e gli altri reparti citati in queste regole sono agenti di Agentrica, non persone dell'organizzazione dell'utente: decisioni e approvazioni restano all'utente o al responsabile umano che indica.
|
package/dist/mcp/src/page/app.js
CHANGED
|
@@ -34,9 +34,14 @@ const time = (iso) => new Date(iso).toLocaleTimeString("it-IT", { hour: "2-digit
|
|
|
34
34
|
const empty = (text) => el("p", { class: "empty" }, text);
|
|
35
35
|
|
|
36
36
|
function renderHeader({ project }) {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
|
|
38
|
+
const files = project.git
|
|
39
|
+
? [
|
|
40
|
+
project.git.changed > 0 && plural(project.git.changed, "file modificato", "file modificati"),
|
|
41
|
+
project.git.untracked > 0 && plural(project.git.untracked, "nuovo", "nuovi"),
|
|
42
|
+
].filter(Boolean)
|
|
43
|
+
: [];
|
|
44
|
+
const git = project.git ? [` · branch ${project.git.branch}`, ...files].join(" · ") : " · non è un repository git";
|
|
40
45
|
$("project").textContent = project.name + git;
|
|
41
46
|
const problems = $("problems");
|
|
42
47
|
problems.hidden = project.problems.length === 0;
|
|
@@ -155,6 +160,7 @@ function renderPhases({ project }) {
|
|
|
155
160
|
? [
|
|
156
161
|
el("h3", {}, inline(open.title), ` — ${open.status}`),
|
|
157
162
|
open.goal && el("p", { class: "goal" }, inline(open.goal)),
|
|
163
|
+
el("h3", {}, "Backlog"),
|
|
158
164
|
open.tasks.length
|
|
159
165
|
? table(
|
|
160
166
|
["Task", "Descrizione", "Priorità", "Stato"],
|
|
@@ -173,15 +179,12 @@ function renderPhases({ project }) {
|
|
|
173
179
|
open.criteria.length > 0 && el("h3", {}, "Criteri di accettazione"),
|
|
174
180
|
open.criteria.length > 0 && el("ul", { class: "criteria" }, open.criteria.map((c) => el("li", {}, inline(c)))),
|
|
175
181
|
]
|
|
176
|
-
: []),
|
|
182
|
+
: [empty("Nessuna fase in corso: tutte le fasi sono completate, sospese o da aprire.")]),
|
|
177
183
|
);
|
|
178
|
-
// Aperto solo senza una fase in corso: altrimenti la tabella completa spinge giù i rilievi.
|
|
179
|
-
const all = $("phases").querySelector("details");
|
|
180
|
-
const wasOpen = all ? all.open : !open;
|
|
181
184
|
$("phases").replaceChildren(
|
|
182
185
|
project.phases.length === 0
|
|
183
186
|
? empty("Nessuna fase trovata in plan/README.md.")
|
|
184
|
-
:
|
|
187
|
+
: table(
|
|
185
188
|
["Fase", "Contenuto", "Stato"],
|
|
186
189
|
project.phases.map((p) =>
|
|
187
190
|
el(
|
|
@@ -192,7 +195,7 @@ function renderPhases({ project }) {
|
|
|
192
195
|
el("td", {}, p.status),
|
|
193
196
|
),
|
|
194
197
|
),
|
|
195
|
-
)
|
|
198
|
+
),
|
|
196
199
|
);
|
|
197
200
|
}
|
|
198
201
|
|
|
@@ -240,13 +243,38 @@ function renderFindings({ project }) {
|
|
|
240
243
|
});
|
|
241
244
|
$("findings").replaceChildren(
|
|
242
245
|
...(shown.length ? groups.filter(Boolean) : [empty(filter ? `Nessun rilievo di ${filter}.` : "Nessun rilievo.")]),
|
|
243
|
-
el("p", { class: "hint" }, "In ogni gruppo prima i «Rilievi aperti» dei file di fase, poi i rilievi degli audit con il loro stato."),
|
|
246
|
+
el("p", { class: "hint" }, "In ogni gruppo prima i «Rilievi aperti» dei file di fase, poi i rilievi degli audit con il loro stato. Quelli segnati come risolti o chiusi non compaiono."),
|
|
244
247
|
);
|
|
245
248
|
}
|
|
246
249
|
|
|
250
|
+
function renderCounts({ project, questions }) {
|
|
251
|
+
const waiting = questions.length;
|
|
252
|
+
const findings = project.findings.length;
|
|
253
|
+
$("count-sessione").textContent = waiting ? String(waiting) : "";
|
|
254
|
+
$("count-rilievi").textContent = String(findings);
|
|
255
|
+
// Il solo numero non dice cosa conta: il nome completo è per i lettori di schermo.
|
|
256
|
+
$("count-sessione").parentElement.setAttribute("aria-label", waiting ? `Sessione, ${waiting} da decidere` : "Sessione");
|
|
257
|
+
$("count-rilievi").parentElement.setAttribute("aria-label", `Rilievi, ${findings} aperti`);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Una vista per volta, scelta dall'hash: avanti e indietro del browser funzionano senza toccare il server.
|
|
261
|
+
const VIEWS = ["sessione", "piano", "rilievi"];
|
|
262
|
+
|
|
263
|
+
function showView(moveFocus) {
|
|
264
|
+
const name = location.hash.slice(1);
|
|
265
|
+
const current = VIEWS.includes(name) ? name : VIEWS[0];
|
|
266
|
+
for (const view of document.querySelectorAll(".view")) view.hidden = view.dataset.view !== current;
|
|
267
|
+
for (const tab of document.querySelectorAll(".tabs a")) {
|
|
268
|
+
if (tab.dataset.view === current) tab.setAttribute("aria-current", "page");
|
|
269
|
+
else tab.removeAttribute("aria-current");
|
|
270
|
+
}
|
|
271
|
+
if (moveFocus) document.querySelector(`#view-${current} h1`).focus();
|
|
272
|
+
}
|
|
273
|
+
|
|
247
274
|
function render() {
|
|
248
275
|
if (!state) return;
|
|
249
276
|
renderHeader(state);
|
|
277
|
+
renderCounts(state);
|
|
250
278
|
renderQuestions(state);
|
|
251
279
|
renderActivity(state);
|
|
252
280
|
renderPhases(state);
|
|
@@ -276,6 +304,8 @@ function connect() {
|
|
|
276
304
|
};
|
|
277
305
|
}
|
|
278
306
|
|
|
307
|
+
window.addEventListener("hashchange", () => showView(true));
|
|
308
|
+
showView(false);
|
|
279
309
|
connect();
|
|
280
310
|
refresh();
|
|
281
311
|
setInterval(() => document.visibilityState === "visible" && refresh(), REFRESH_MS);
|
|
@@ -11,34 +11,54 @@
|
|
|
11
11
|
<body>
|
|
12
12
|
<header class="top">
|
|
13
13
|
<div class="wrap top-row">
|
|
14
|
-
<
|
|
14
|
+
<p class="brand">Agentrica <span aria-hidden="true">·</span> pannello</p>
|
|
15
15
|
<p class="meta" id="project">Caricamento…</p>
|
|
16
16
|
<p class="link" id="link" role="status">Collegamento in corso…</p>
|
|
17
17
|
</div>
|
|
18
|
+
<nav class="wrap tabs" aria-label="Sezioni del pannello">
|
|
19
|
+
<a href="#sessione" data-view="sessione">Sessione <span class="count" id="count-sessione"></span></a>
|
|
20
|
+
<a href="#piano" data-view="piano">Piano</a>
|
|
21
|
+
<a href="#rilievi" data-view="rilievi">Rilievi <span class="count" id="count-rilievi"></span></a>
|
|
22
|
+
</nav>
|
|
18
23
|
</header>
|
|
24
|
+
<div id="announce" class="sr-only" aria-live="polite"></div>
|
|
19
25
|
<main class="wrap">
|
|
20
26
|
<p class="problems" id="problems" hidden></p>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
27
|
+
|
|
28
|
+
<div id="view-sessione" class="view" data-view="sessione">
|
|
29
|
+
<h1 class="sr-only" tabindex="-1">Sessione</h1>
|
|
30
|
+
<div class="live">
|
|
31
|
+
<section aria-labelledby="h-decide" class="card">
|
|
32
|
+
<h2 id="h-decide">Da decidere</h2>
|
|
33
|
+
<div id="questions"></div>
|
|
34
|
+
</section>
|
|
35
|
+
<section aria-labelledby="h-agents" class="card">
|
|
36
|
+
<h2 id="h-agents">Agenti in uso</h2>
|
|
37
|
+
<div id="activity"></div>
|
|
38
|
+
</section>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div id="view-piano" class="view" data-view="piano" hidden>
|
|
43
|
+
<h1 class="sr-only" tabindex="-1">Piano</h1>
|
|
44
|
+
<section aria-labelledby="h-open" class="card">
|
|
45
|
+
<h2 id="h-open">Fase in corso</h2>
|
|
46
|
+
<div id="open-phase"></div>
|
|
47
|
+
</section>
|
|
48
|
+
<section aria-labelledby="h-phases" class="card">
|
|
49
|
+
<h2 id="h-phases">Tutte le fasi</h2>
|
|
50
|
+
<div id="phases"></div>
|
|
26
51
|
</section>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div id="view-rilievi" class="view" data-view="rilievi" hidden>
|
|
55
|
+
<h1 class="sr-only" tabindex="-1">Rilievi</h1>
|
|
56
|
+
<section aria-labelledby="h-findings" class="card">
|
|
57
|
+
<h2 id="h-findings">Rilievi aperti</h2>
|
|
58
|
+
<div id="filters" class="filters" role="group" aria-label="Filtra per reparto"></div>
|
|
59
|
+
<div id="findings"></div>
|
|
30
60
|
</section>
|
|
31
61
|
</div>
|
|
32
|
-
<section aria-labelledby="h-phases" class="card">
|
|
33
|
-
<h2 id="h-phases">Fasi</h2>
|
|
34
|
-
<div id="open-phase"></div>
|
|
35
|
-
<div id="phases"></div>
|
|
36
|
-
</section>
|
|
37
|
-
<section aria-labelledby="h-findings" class="card">
|
|
38
|
-
<h2 id="h-findings">Rilievi</h2>
|
|
39
|
-
<div id="filters" class="filters" role="group" aria-label="Filtra per reparto"></div>
|
|
40
|
-
<div id="findings"></div>
|
|
41
|
-
</section>
|
|
42
62
|
</main>
|
|
43
63
|
</body>
|
|
44
64
|
</html>
|
|
@@ -41,7 +41,7 @@ code { background: var(--secondary); border-radius: 4px; padding: 0 0.25em; }
|
|
|
41
41
|
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
|
|
42
42
|
|
|
43
43
|
.top { border-bottom: 1px solid var(--border); background: var(--card); }
|
|
44
|
-
.top-row { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; padding-block: 12px; }
|
|
44
|
+
.top-row { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; padding-block: 12px 4px; }
|
|
45
45
|
.top p { margin: 0; }
|
|
46
46
|
.brand { font-size: 1rem; font-weight: 700; margin: 0; }
|
|
47
47
|
.meta, .link { color: var(--muted-foreground); }
|
|
@@ -49,7 +49,17 @@ code { background: var(--secondary); border-radius: 4px; padding: 0 0.25em; }
|
|
|
49
49
|
.link[data-state="ok"]::before { content: "● "; color: var(--aiwda); }
|
|
50
50
|
.link[data-state="off"] { color: var(--destructive); }
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
.tabs { display: flex; gap: 4px; overflow-x: auto; }
|
|
53
|
+
.tabs a { color: var(--muted-foreground); text-decoration: none; padding: 10px 14px 8px; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
|
|
54
|
+
.tabs a:hover { color: var(--foreground); }
|
|
55
|
+
.tabs a[aria-current="page"] { color: var(--foreground); border-bottom-color: var(--aisa); }
|
|
56
|
+
.count:not(:empty) { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--secondary); color: var(--foreground); font-size: 0.8rem; text-align: center; }
|
|
57
|
+
#count-sessione:not(:empty) { background: var(--aibpd); color: var(--background); }
|
|
58
|
+
|
|
59
|
+
main.wrap { display: grid; gap: 16px; padding-block: 16px 48px; }
|
|
60
|
+
.view { display: grid; gap: 16px; }
|
|
61
|
+
.view[hidden] { display: none; }
|
|
62
|
+
h1:focus { outline: none; }
|
|
53
63
|
.live { display: grid; gap: 16px; }
|
|
54
64
|
@media (min-width: 960px) { .live { grid-template-columns: 3fr 2fr; align-items: start; } }
|
|
55
65
|
|
|
@@ -89,6 +99,7 @@ th, td { text-align: left; padding: 6px 10px 6px 0; border-top: 1px solid var(--
|
|
|
89
99
|
thead th { border-top: 0; color: var(--muted-foreground); font-weight: 600; font-size: 0.9rem; }
|
|
90
100
|
tr.current td { color: var(--foreground); font-weight: 600; }
|
|
91
101
|
.status-done { color: var(--aiwda); }
|
|
102
|
+
th.mono, td:last-child { white-space: nowrap; }
|
|
92
103
|
.goal { margin: 0 0 8px; }
|
|
93
104
|
ul.criteria { margin: 0; padding-left: 1.2em; }
|
|
94
105
|
|
package/dist/mcp/src/project.js
CHANGED
|
@@ -10,6 +10,11 @@ const MAX_FILE_BYTES = 1_000_000;
|
|
|
10
10
|
const DEPARTMENT = /\b(AIBPD|AICA|AIPCA|AISA|AIWDA)\b/;
|
|
11
11
|
const PRIORITY = /\bP[0-3]\b/;
|
|
12
12
|
const CLOSED = new Set(["completata", "sospesa"]);
|
|
13
|
+
// Un rilievo è chiuso quando il testo (fasi) o lo stato (audit) dice «risolto» o «chiuso», in qualsiasi genere e
|
|
14
|
+
// numero, e non «non risolto»: la voce resta nel piano come storia ma il pannello non la mostra fra gli aperti.
|
|
15
|
+
const CLOSED_FINDING = /(?<!\bnon )\b(risolt|chius)[oaie]\b/i;
|
|
16
|
+
/** true se il testo dice che il rilievo è risolto o chiuso (README del pacchetto, «Formato»). */
|
|
17
|
+
export const isClosedFinding = (text) => CLOSED_FINDING.test(text);
|
|
13
18
|
/** Legge un file di testo sotto `root`, rifiutando link simbolici che escono e file troppo grandi. */
|
|
14
19
|
function readInside(root, path) {
|
|
15
20
|
const real = realpathSync(path);
|
|
@@ -99,7 +104,7 @@ function readPhaseFindings(root, plan, phases) {
|
|
|
99
104
|
return [];
|
|
100
105
|
}
|
|
101
106
|
return bullets(section(text, "Rilievi aperti") ?? [])
|
|
102
|
-
.filter((item) => !/^nessuno\b/i.test(item))
|
|
107
|
+
.filter((item) => !/^nessuno\b/i.test(item) && !isClosedFinding(item))
|
|
103
108
|
.map((item) => ({
|
|
104
109
|
id: "",
|
|
105
110
|
title: item,
|
|
@@ -138,7 +143,9 @@ function readAuditFindings(root, problems) {
|
|
|
138
143
|
return [];
|
|
139
144
|
}
|
|
140
145
|
const department = DEPARTMENT.exec(asText(record.agente))?.[1] ?? null;
|
|
141
|
-
const items = record.rilievi
|
|
146
|
+
const items = record.rilievi
|
|
147
|
+
.filter((item) => typeof item === "object" && item !== null)
|
|
148
|
+
.filter((item) => !isClosedFinding(asText(item.stato)));
|
|
142
149
|
return items.map((item) => ({
|
|
143
150
|
id: asText(item.id),
|
|
144
151
|
title: asText(item.titolo),
|
|
@@ -159,7 +166,8 @@ export async function readGit(root) {
|
|
|
159
166
|
const { stdout } = await run("git", args, { cwd: root, timeout: 2000 });
|
|
160
167
|
const [head = "", ...rest] = stdout.split("\n").filter(Boolean);
|
|
161
168
|
const branch = head.replace(/^## /, "").replace(/^No commits yet on /, "").split("...")[0] ?? "";
|
|
162
|
-
|
|
169
|
+
const untracked = rest.filter((line) => line.startsWith("??")).length;
|
|
170
|
+
return { branch, changed: rest.length - untracked, untracked };
|
|
163
171
|
}
|
|
164
172
|
catch {
|
|
165
173
|
return null;
|
package/dist/mcp/src/prompt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Versione del server, uguale a quella di package.json (lo controlla prompt.test.ts). */
|
|
2
|
-
export const VERSION = "0.3.
|
|
2
|
+
export const VERSION = "0.3.2";
|
|
3
3
|
/** Cerca un agente per id, senza distinguere maiuscole e minuscole («aisa-02» o «AISA-02»). */
|
|
4
4
|
export function findAgent(catalog, id) {
|
|
5
5
|
const wanted = id.toUpperCase();
|
|
@@ -26,7 +26,7 @@ export function agentSummary({ department, agent }) {
|
|
|
26
26
|
*/
|
|
27
27
|
export function selectSquad(catalog, spec) {
|
|
28
28
|
if (spec === undefined)
|
|
29
|
-
return
|
|
29
|
+
return catalog.map(({ director: _, ...d }) => d);
|
|
30
30
|
const names = spec.split(",").map((name) => name.trim()).filter((name) => name !== "");
|
|
31
31
|
if (names.length === 0)
|
|
32
32
|
throw new Error("--agents è vuoto: indica id di agenti o sigle di reparti, es. --agents aisa,aiwda-08");
|
|
@@ -47,7 +47,7 @@ export function selectSquad(catalog, spec) {
|
|
|
47
47
|
if (unknown.length > 0)
|
|
48
48
|
throw new Error(`agente o reparto sconosciuto in --agents: ${unknown.map((n) => JSON.stringify(n)).join(", ")}`);
|
|
49
49
|
return catalog
|
|
50
|
-
.map((d) => ({ ...d, agents: d.agents.filter((a) => wanted.has(a.id)) }))
|
|
50
|
+
.map(({ director: _, ...d }) => ({ ...d, agents: d.agents.filter((a) => wanted.has(a.id)) }))
|
|
51
51
|
.filter((d) => d.agents.length > 0);
|
|
52
52
|
}
|
|
53
53
|
export function agentText({ department, agent }, task) {
|
package/dist/mcp/src/server.js
CHANGED
|
@@ -85,6 +85,8 @@ const server = new McpServer({ name: "agentrica", version: VERSION }, {
|
|
|
85
85
|
});
|
|
86
86
|
const TASK = z.string().max(20_000).optional().describe("Il compito da affidare all'agente nel progetto corrente.");
|
|
87
87
|
const READ_ONLY = { readOnlyHint: true, openWorldHint: false };
|
|
88
|
+
// Id ammesso: una sigla di tutto il catalogo (non solo della squadra, così fuori squadra è «non trovato») e due cifre.
|
|
89
|
+
const ID = new RegExp(`^(?:${full.map((d) => d.code).join("|")})-\\d{2}$`, "i");
|
|
88
90
|
for (const found of all) {
|
|
89
91
|
const title = `${codeName(found.agent)} — ${found.agent.role}`;
|
|
90
92
|
server.registerPrompt(found.agent.id.toLowerCase(), { title, description: agentSummary(found), argsSchema: { compito: TASK } }, ({ compito }) => {
|
|
@@ -115,7 +117,7 @@ server.registerTool("agente", {
|
|
|
115
117
|
title: "Istruzioni di un agente",
|
|
116
118
|
description: "Restituisce le istruzioni complete di un agente (regole comuni del reparto e file di ruolo), da seguire per lavorare come quell'agente.",
|
|
117
119
|
inputSchema: {
|
|
118
|
-
id: z.string().regex(
|
|
120
|
+
id: z.string().regex(ID, "Formato dell'id: SIGLA-NN, es. AISA-02.").describe("Id dell'agente, es. AISA-02."),
|
|
119
121
|
compito: TASK,
|
|
120
122
|
},
|
|
121
123
|
annotations: READ_ONLY,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentrica/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"mcpName": "io.github.flgisimone/agentrica",
|
|
5
5
|
"description": "I 56 agenti IA di Agentrica come server MCP locale (stdio): un prompt per agente e due tool in sola lettura.",
|
|
6
6
|
"license": "MIT",
|