spike: generate the assistant's API client from the OpenAPI document
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, openapi
- Ambito
- backend-api-design
Direzione di ricerca
Start by reading assistant/src/TaskFlow.Mcp/Api/ApiModels.cs and TaskFlowApiClient.cs to list the operations and DTOs in use; compare them with the OpenAPI document and the generated web client under TaskFlow.Web/src/api/client/**. Prototype the task endpoints with a candidate option, then measure source size, plugin publish size, build needs, CI changes, and test impact. Finish with the comparison table, prototype test results, recommendation, and any required follow-up issues.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Found while reviewing the assistant-builder agent for #400 (piece 8). The assistant's HTTP client and its DTOs are written by hand to mirror TaskFlow.Api, while the web client is generated from the API's OpenAPI document. This spike asks whether the assistant's client should be generated too.
What I found
assistant/src/TaskFlow.Mcp/Api/holds 341 lines:ApiModels.cs(101),TaskFlowApiClient.cs(221) andTaskFlowApiException.cs(19). None of it is generated.- The web client (
TaskFlow.Web/src/api/client/**) is generated from/openapi/v1.jsonwithopenapi-tsand committed. The backend builder regenerates it when the API surface changes, so a stale web client is caught at the source. - Nothing equivalent protects the assistant. When the API changes a DTO or endpoint, the assistant mirror is updated by hand, by the assistant builder, from the brief. A change nobody remembers shows up only as a runtime error from a tool or as a failing test, if one exists.
assistant/is a separate solution (its own.sln,Directory.Build.propsand.editorconfig) that ships as a plugin binary, so any option has to respect that boundary and the published size.
Scope
- Read the client and models and list which API operations and DTOs the assistant actually uses (a subset of the API).
- Compare these options on a prototype of one endpoint family (the task endpoints are a good candidate):
- Generate a C# client from the OpenAPI document (Kiota, NSwag, openapi-generator or the Microsoft OpenAPI client tooling). Check generated size, how it fits
ToolGuardandTaskFlowApiException, and how little of it the assistant needs. - Reference the API's DTOs directly (a shared project or a project reference). Check what it does to the separate solution and the plugin publish.
- Keep the hand-written client and add a contract test that compares it to the OpenAPI document and fails on drift.
- Keep things as they are.
- Generate a C# client from the OpenAPI document (Kiota, NSwag, openapi-generator or the Microsoft OpenAPI client tooling). Check generated size, how it fits
- For each option, measure or estimate: lines of source kept in the repo, publish size of the plugin binary, build-time needs (a running API or a committed spec file), CI changes, and test impact. The assistant has about 480 tests.
- Say how each option changes the pipeline from #400: who regenerates the assistant client, and in which stage, if it is generated.
- Note how this interacts with #428, the enum casing spike. If responses use PascalCase enum names, a generated client's enum handling depends on that decision.
- Recommend one option.
Acceptance criteria
- A comparison table is posted on this issue, with the measurements from scope item 3 for at least three options.
- The prototype for the leading option builds and the existing task tool tests still pass against it, or the issue says why it was dropped.
- A recommendation is recorded. If generation is recommended, follow-up issues are opened for the migration and for the pipeline change; if not, the issue says what keeps the mirror honest (for example the contract test).
Out of scope
- Migrating the assistant to the generated client. This issue produces a decision and follow-up issues.
- The web client, which is already generated.
- The timezone offset representation (a separate spike).
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 0
- Merge medio
- 2h 2m
- PR unite (30g)
- 98
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nevridge/TaskFlow
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nevridge/TaskFlow
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
juandresrodca/AdminForge#54 ·
-
要トリアージ 辞書
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
yksr-melt/Meltype#1625 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Docs typoAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
MonoGame/docs.monogame.github.io#328 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
space-wizards/RobustToolbox#7197 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation high priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lachydotmcg/capri-desktop#201 ·
I maintainer di solito rispondono entro 1 giorno