@cogenta/cli 0.6.0 → 0.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,100 @@
1
1
  # @cogenta/cli
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`13a7989`](https://github.com/cogenta-cms/cogenta/commit/13a79891c3e0c64137ac74e838c4a30fc03e9f7f) Thanks [@georgesmomo](https://github.com/georgesmomo)! - The LLM tuning floor every provider client falls back to — `maxOutputTokens` (8000), `requestTimeoutMs` (180s), `maxCorrectionAttempts` (3) — used to be plain TypeScript constants in `@cogenta/agents` (`FALLBACK_MAX_OUTPUT_TOKENS`, `FALLBACK_MAX_CORRECTION_ATTEMPTS`, `DEFAULT_PROVIDER_REQUEST_TIMEOUT_MS`), invisible and unreachable from the admin, only ever mentioned as static hint text on `/admin/providers` ("laissez vide pour le défaut (8000)"). An admin who wanted to change that floor for every provider at once had no way to.
8
+
9
+ They are now real, persisted, admin-editable site settings — `assistant.defaultMaxOutputTokens`, `assistant.defaultRequestTimeoutSeconds`, `assistant.defaultMaxCorrectionAttempts` (`@cogenta/schema`'s `SITE_SETTINGS_REGISTRY`, `group: 'assistant'`) — with the exact same bounds as the existing per-provider override validation (`TUNING_BOUNDS` in `@cogenta/agents`'s `providers/store.ts`), so the two can never silently disagree on what a valid value is.
10
+
11
+ - **`@cogenta/agents` — breaking**: `ProviderClient.maxOutputTokens`/`.requestTimeoutMs`/`.maxCorrectionAttempts` are now always concrete numbers, never `undefined` — every resolved adapter (`createAnthropicClient`/`createOpenAiClient`/`createGoogleClient`) now requires a `defaults: ProviderTuningDefaults` field on its config, merged in whenever the admin has not set a per-provider override. `createProviderRegistry(config, defaults)` takes this floor as a new required second argument. New exports: `ProviderTuningDefaults`, `resolveProviderTuningDefaults(store)` (reads the three site settings from a live `SiteSettingsStore`), and `staticProviderTuningDefaults()` (the registry's own declared defaults, for the rare caller with no site database to read from at all — `cogenta skin generate`, `npm create cogenta`'s key-validation step). The six duplicated local `DEFAULT_MAX_ATTEMPTS` constants scattered across `runtime/loop.ts`, `theme-creator/propose-theme.ts`, `site-plan/analyse-brief.ts`, `site-plan/content-model.ts`, `site-plan/demo-content.ts`, `skin/generate.ts` are gone — each now trusts `client.maxCorrectionAttempts` directly, since it can no longer be absent.
12
+ - **`@cogenta/cli`**: `buildAgentRuntime` (`agent-runtime.ts`) takes a new required `siteSettings: SiteSettingsStore` option; `createLiveProviderRegistry` re-resolves the three site-wide defaults, alongside the per-provider config, on every `refresh()` — the same "no restart needed" guarantee an edit to a per-provider override already had, though a change to *only* the site-wide floor (with no accompanying provider-config write) still needs a restart to take effect, an honest known gap. `theme-wiring.ts` and `assistant.ts`'s own provider resolution read the same live setting. `cogenta skin generate` (no database at all) uses the registry's static defaults instead.
13
+ - **Admin**: `/admin/providers` gains a "Réglages par défaut" card (generic `SiteSettingsField` rendering, zero bespoke UI) above the provider list; the per-provider tuning form's hint text no longer names a hardcoded number, and instead points at that card.
14
+
15
+ - [`89e7579`](https://github.com/cogenta-cms/cogenta/commit/89e7579129712a5978ff57b884151731f5c340ea) Thanks [@georgesmomo](https://github.com/georgesmomo)! - Fiche feedback, two bugs reported live from the same test session: "je ne sais pas si le
16
+ traitement est en cours ou pas" (no feedback during a long agent run or theme generation),
17
+ and a reference screenshot attached to "personnalise le theme actuel pour qu'il soit comme
18
+ cette capture" that only ever changed accent colors, never the layout it showed.
19
+
20
+ **The reference-image bug, fixed**: `propose-theme.ts`'s `chooseTheme()` step already
21
+ received an attached image, but `generateSkinCandidates()` (the step that actually
22
+ produces the color/font/spacing tokens) never did — `generateSkin` had zero image support
23
+ at all. `@cogenta/agents`'s `GenerateSkinOptions`/`GenerateSkinCandidatesOptions` gain an
24
+ optional `images: readonly ChatImagePart[]`, threaded through to the model call alongside
25
+ an explicit "derive the colour palette from it" instruction when present.
26
+
27
+ **What is still a genuine limit, not fixed here**: a theme's page *structure* (which
28
+ blocks render where) is owned by the installed theme package's own render code — contract
29
+ D only ever describes tokens (color, font, spacing, radius, shadow, motion). No amount of
30
+ image analysis can turn a token-generation call into a layout generator; that would be a
31
+ different, much larger feature.
32
+
33
+ **Live progress**: new `@cogenta/agents` module `progress/` — `ProgressReporter`,
34
+ `ProgressEvent`, `createProgressJobStore<TResult>()` (in-memory, per-process; a progress
35
+ job is short-lived and watched by one open tab, unlike `@cogenta/core`'s durable `queue`).
36
+ `RunAgentLoopInput.onProgress`/`RunAgentOptions.onProgress` report `"Thinking…"`,
37
+ `"Calling tool "X"…"`, retry attempts, and tool outcomes as the agent loop runs — the same
38
+ engine behind both agent chat and every other agent, so instrumenting it once covers both.
39
+ `GenerateSkinCandidatesOptions.onProgress` and `ProposeThemeCandidatesInput.onProgress`
40
+ report each design direction as it starts/finishes. `RetryOptions.onRetry` is a new hook
41
+ `retryModelCall` invokes before backing off.
42
+
43
+ `@cogenta/core` gains two error codes, `AGENT_RUN_JOB_UNKNOWN` and
44
+ `THEME_GENERATE_JOB_UNKNOWN` (mapped to 404).
45
+
46
+ `@cogenta/api` adds three watchable job route pairs, additive alongside the existing
47
+ synchronous ones (nothing is removed or changed for a caller that doesn't care about
48
+ progress): `POST/GET /api/agents/:name/conversation/jobs[/:jobId]`,
49
+ `POST/GET /api/agents/:name/run/jobs[/:jobId]`, `POST/GET /api/theme/generate/jobs[/:jobId]`.
50
+ `AgentsRouterOptions`/`ThemeRouterOptions` gain an optional `progressJobs` store; without
51
+ one, only the job routes are unavailable — the pre-existing synchronous routes are
52
+ untouched.
53
+
54
+ `@cogenta/cli` wires `createProgressJobStore()` into `cogenta serve`'s agents and theme
55
+ routers, and forwards `onProgress` through `agent-runtime.ts`'s `AgentRunnerLike` adapter
56
+ (a real gap caught by an e2e test: the adapter's `run()` silently dropped the parameter
57
+ before this fix).
58
+
59
+ Admin UI (private, no changeset): the floating chat widget and the theme generator
60
+ workshop both poll their job's `GET` endpoint and render a live, growing progress list
61
+ (`data-testid="agent-chat-progress"` / `"theme-generator-progress"`, both `aria-live="polite"`)
62
+ instead of a static "thinking…" placeholder.
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies [[`13a7989`](https://github.com/cogenta-cms/cogenta/commit/13a79891c3e0c64137ac74e838c4a30fc03e9f7f), [`89e7579`](https://github.com/cogenta-cms/cogenta/commit/89e7579129712a5978ff57b884151731f5c340ea)]:
67
+ - @cogenta/schema@0.5.0
68
+ - @cogenta/agents@0.5.0
69
+ - @cogenta/core@0.7.0
70
+ - @cogenta/api@2.2.0
71
+ - @cogenta/auth@0.5.1
72
+ - @cogenta/blocks@1.0.2
73
+ - @cogenta/export@0.2.2
74
+ - @cogenta/import@0.2.2
75
+ - @cogenta/plugins@0.3.2
76
+ - @cogenta/seo@0.3.2
77
+ - @cogenta/agents-builtin@0.3.1
78
+ - @cogenta/channels@0.3.2
79
+ - @cogenta/mcp@0.3.1
80
+ - @cogenta/analytics@0.3.2
81
+ - @cogenta/comments@0.2.2
82
+ - @cogenta/commerce@0.4.1
83
+ - @cogenta/forms@0.2.2
84
+ - @cogenta/observability@0.2.2
85
+ - @cogenta/render@0.2.2
86
+ - @cogenta/theme-association@0.3.1
87
+ - @cogenta/theme-blog@0.3.1
88
+ - @cogenta/theme-canonical@1.1.1
89
+ - @cogenta/theme-docs@0.3.1
90
+ - @cogenta/theme-ecommerce@1.1.1
91
+ - @cogenta/theme-entreprise@1.1.1
92
+ - @cogenta/theme-kit@0.3.1
93
+ - @cogenta/theme-magazine@1.1.1
94
+ - @cogenta/theme-portfolio@1.1.1
95
+ - @cogenta/theme-restaurant@0.3.1
96
+ - @cogenta/theme-saas@0.3.1
97
+
3
98
  ## 0.6.0
4
99
 
5
100
  ### Minor Changes