fix(api): rename 'metadata' to 'response_metadata' to avoid Pydantic conflict

The field name 'metadata' conflicts with Pydantic's internal ClassVar.
Renamed to 'response_metadata' throughout:
- Backend: RoutineSuggestion, BatchSuggestion, ShoppingSuggestionResponse
- Frontend: TypeScript types and component usages

This fixes the AttributeError when setting metadata on SQLModel instances.
This commit is contained in:
Piotr Oleszczyk 2026-03-06 16:16:35 +01:00
parent d00e0afeec
commit c8fa80be99
20 changed files with 3802 additions and 23 deletions

View file

@ -0,0 +1,72 @@
---
name: conventional-commit
description: 'Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.'
---
### Instructions
```xml
<description>This file contains a prompt template for generating conventional commit messages. It provides instructions, examples, and formatting guidelines to help users write standardized, descriptive commit messages in accordance with the Conventional Commits specification.</description>
```
### Workflow
**Follow these steps:**
1. Run `git status` to review changed files.
2. Run `git diff` or `git diff --cached` to inspect changes.
3. Stage your changes with `git add <file>`.
4. Construct your commit message using the following XML structure.
5. After generating your commit message, Copilot will automatically run the following command in your integrated terminal (no confirmation needed):
```bash
git commit -m "type(scope): description"
```
6. Just execute this prompt and Copilot will handle the commit for you in the terminal.
### Commit Message Structure
```xml
<commit-message>
<type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert</type>
<scope>()</scope>
<description>A short, imperative summary of the change</description>
<body>(optional: more detailed explanation)</body>
<footer>(optional: e.g. BREAKING CHANGE: details, or issue references)</footer>
</commit-message>
```
### Examples
```xml
<examples>
<example>feat(parser): add ability to parse arrays</example>
<example>fix(ui): correct button alignment</example>
<example>docs: update README with usage instructions</example>
<example>refactor: improve performance of data processing</example>
<example>chore: update dependencies</example>
<example>feat!: send email on registration (BREAKING CHANGE: email service required)</example>
</examples>
```
### Validation
```xml
<validation>
<type>Must be one of the allowed types. See <reference>https://www.conventionalcommits.org/en/v1.0.0/#specification</reference></type>
<scope>Optional, but recommended for clarity.</scope>
<description>Required. Use the imperative mood (e.g., "add", not "added").</description>
<body>Optional. Use for additional context.</body>
<footer>Use for breaking changes or issue references.</footer>
</validation>
```
### Final Step
```xml
<final-step>
<cmd>git commit -m "type(scope): description"</cmd>
<note>Replace with your constructed message. Include body and footer if needed.</note>
</final-step>
```

View file

@ -0,0 +1,177 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View file

@ -0,0 +1,42 @@
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
license: Complete terms in LICENSE.txt
---
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
## Design Thinking
Before coding, understand the context and commit to a BOLD aesthetic direction:
- **Purpose**: What problem does this interface solve? Who uses it?
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
- **Constraints**: Technical requirements (framework, performance, accessibility).
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
- Production-grade and functional
- Visually striking and memorable
- Cohesive with a clear aesthetic point-of-view
- Meticulously refined in every detail
## Frontend Aesthetics Guidelines
Focus on:
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.

View file

@ -0,0 +1,162 @@
---
name: gemini-api-dev
description: Use this skill when building applications with Gemini models, Gemini API, working with multimodal content (text, images, audio, video), implementing function calling, using structured outputs, or needing current model specifications. Covers SDK usage (google-genai for Python, @google/genai for JavaScript/TypeScript, com.google.genai:google-genai for Java, google.golang.org/genai for Go), model selection, and API capabilities.
---
# Gemini API Development Skill
## Overview
The Gemini API provides access to Google's most advanced AI models. Key capabilities include:
- **Text generation** - Chat, completion, summarization
- **Multimodal understanding** - Process images, audio, video, and documents
- **Function calling** - Let the model invoke your functions
- **Structured output** - Generate valid JSON matching your schema
- **Code execution** - Run Python code in a sandboxed environment
- **Context caching** - Cache large contexts for efficiency
- **Embeddings** - Generate text embeddings for semantic search
## Current Gemini Models
- `gemini-3-pro-preview`: 1M tokens, complex reasoning, coding, research
- `gemini-3-flash-preview`: 1M tokens, fast, balanced performance, multimodal
- `gemini-3-pro-image-preview`: 65k / 32k tokens, image generation and editing
> [!IMPORTANT]
> Models like `gemini-2.5-*`, `gemini-2.0-*`, `gemini-1.5-*` are legacy and deprecated. Use the new models above. Your knowledge is outdated.
## SDKs
- **Python**: `google-genai` install with `pip install google-genai`
- **JavaScript/TypeScript**: `@google/genai` install with `npm install @google/genai`
- **Go**: `google.golang.org/genai` install with `go get google.golang.org/genai`
- **Java**:
- groupId: `com.google.genai`, artifactId: `google-genai`
- Latest version can be found here: https://central.sonatype.com/artifact/com.google.genai/google-genai/versions (let's call it `LAST_VERSION`)
- Install in `build.gradle`:
```
implementation("com.google.genai:google-genai:${LAST_VERSION}")
```
- Install Maven dependency in `pom.xml`:
```
<dependency>
<groupId>com.google.genai</groupId>
<artifactId>google-genai</artifactId>
<version>${LAST_VERSION}</version>
</dependency>
```
> [!WARNING]
> Legacy SDKs `google-generativeai` (Python) and `@google/generative-ai` (JS) are deprecated. Migrate to the new SDKs above urgently by following the Migration Guide.
## Quick Start
### Python
```python
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Explain quantum computing"
)
print(response.text)
```
### JavaScript/TypeScript
```typescript
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
model: "gemini-3-flash-preview",
contents: "Explain quantum computing"
});
console.log(response.text);
```
### Go
```go
package main
import (
"context"
"fmt"
"log"
"google.golang.org/genai"
)
func main() {
ctx := context.Background()
client, err := genai.NewClient(ctx, nil)
if err != nil {
log.Fatal(err)
}
resp, err := client.Models.GenerateContent(ctx, "gemini-3-flash-preview", genai.Text("Explain quantum computing"), nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp.Text)
}
```
### Java
```java
import com.google.genai.Client;
import com.google.genai.types.GenerateContentResponse;
public class GenerateTextFromTextInput {
public static void main(String[] args) {
Client client = new Client();
GenerateContentResponse response =
client.models.generateContent(
"gemini-3-flash-preview",
"Explain quantum computing",
null);
System.out.println(response.text());
}
}
```
## API spec (source of truth)
**Always use the latest REST API discovery spec as the source of truth for API definitions** (request/response schemas, parameters, methods). Fetch the spec when implementing or debugging API integration:
- **v1beta** (default): `https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta`
Use this unless the integration is explicitly pinned to v1. The official SDKs (google-genai, @google/genai, google.golang.org/genai) target v1beta.
- **v1**: `https://generativelanguage.googleapis.com/$discovery/rest?version=v1`
Use only when the integration is specifically set to v1.
When in doubt, use v1beta. Refer to the spec for exact field names, types, and supported operations.
## How to use the Gemini API
For detailed API documentation, fetch from the official docs index:
**llms.txt URL**: `https://ai.google.dev/gemini-api/docs/llms.txt`
This index contains links to all documentation pages in `.md.txt` format. Use web fetch tools to:
1. Fetch `llms.txt` to discover available documentation pages
2. Fetch specific pages (e.g., `https://ai.google.dev/gemini-api/docs/function-calling.md.txt`)
### Key Documentation Pages
> [!IMPORTANT]
> Those are not all the documentation pages. Use the `llms.txt` index to discover available documentation pages
- [Models](https://ai.google.dev/gemini-api/docs/models.md.txt)
- [Google AI Studio quickstart](https://ai.google.dev/gemini-api/docs/ai-studio-quickstart.md.txt)
- [Nano Banana image generation](https://ai.google.dev/gemini-api/docs/image-generation.md.txt)
- [Function calling with the Gemini API](https://ai.google.dev/gemini-api/docs/function-calling.md.txt)
- [Structured outputs](https://ai.google.dev/gemini-api/docs/structured-output.md.txt)
- [Text generation](https://ai.google.dev/gemini-api/docs/text-generation.md.txt)
- [Image understanding](https://ai.google.dev/gemini-api/docs/image-understanding.md.txt)
- [Embeddings](https://ai.google.dev/gemini-api/docs/embeddings.md.txt)
- [Interactions API](https://ai.google.dev/gemini-api/docs/interactions.md.txt)
- [SDK migration guide](https://ai.google.dev/gemini-api/docs/migrate.md.txt)

View file

@ -0,0 +1,66 @@
---
name: svelte-code-writer
description: CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (.svelte) or Svelte module (.svelte.ts/.svelte.js). If possible, this skill should be executed within the svelte-file-editor agent for optimal results.
---
# Svelte 5 Code Writer
## CLI Tools
You have access to `@sveltejs/mcp` CLI for Svelte-specific assistance. Use these commands via `npx`:
### List Documentation Sections
```bash
npx @sveltejs/mcp list-sections
```
Lists all available Svelte 5 and SvelteKit documentation sections with titles and paths.
### Get Documentation
```bash
npx @sveltejs/mcp get-documentation "<section1>,<section2>,..."
```
Retrieves full documentation for specified sections. Use after `list-sections` to fetch relevant docs.
**Example:**
```bash
npx @sveltejs/mcp get-documentation "$state,$derived,$effect"
```
### Svelte Autofixer
```bash
npx @sveltejs/mcp svelte-autofixer "<code_or_path>" [options]
```
Analyzes Svelte code and suggests fixes for common issues.
**Options:**
- `--async` - Enable async Svelte mode (default: false)
- `--svelte-version` - Target version: 4 or 5 (default: 5)
**Examples:**
```bash
# Analyze inline code (escape $ as \$)
npx @sveltejs/mcp svelte-autofixer '<script>let count = \$state(0);</script>'
# Analyze a file
npx @sveltejs/mcp svelte-autofixer ./src/lib/Component.svelte
# Target Svelte 4
npx @sveltejs/mcp svelte-autofixer ./Component.svelte --svelte-version 4
```
**Important:** When passing code with runes (`$state`, `$derived`, etc.) via the terminal, escape the `$` character as `\$` to prevent shell variable substitution.
## Workflow
1. **Uncertain about syntax?** Run `list-sections` then `get-documentation` for relevant topics
2. **Reviewing/debugging?** Run `svelte-autofixer` on the code to detect issues
3. **Always validate** - Run `svelte-autofixer` before finalizing any Svelte component

View file

@ -0,0 +1 @@
../../.agents/skills/conventional-commit

View file

@ -0,0 +1 @@
../../.agents/skills/frontend-design

View file

@ -0,0 +1 @@
../../.agents/skills/gemini-api-dev

View file

@ -0,0 +1 @@
../../.agents/skills/svelte-code-writer

@ -0,0 +1 @@
Subproject commit e3ed0dd3a3671e80a0210a7fd58390b33515a211

View file

@ -0,0 +1 @@
[ 86ms] [ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://localhost:5173/favicon.ico:0

View file

@ -0,0 +1 @@
[ 553ms] [ERROR] Failed to load resource: the server responded with a status of 404 (Not Found) @ http://192.168.101.82/favicon.ico:0

3216
ai_call_log.json Normal file

File diff suppressed because one or more lines are too long

View file

@ -270,7 +270,7 @@ class ShoppingSuggestionResponse(PydanticBase):
# Phase 3: Observability fields # Phase 3: Observability fields
validation_warnings: list[str] | None = None validation_warnings: list[str] | None = None
auto_fixes_applied: list[str] | None = None auto_fixes_applied: list[str] | None = None
metadata: "ResponseMetadata | None" = None response_metadata: "ResponseMetadata | None" = None
class _ProductSuggestionOut(PydanticBase): class _ProductSuggestionOut(PydanticBase):
@ -1120,6 +1120,6 @@ def suggest_shopping(session: Session = Depends(get_session)):
if validation_result.auto_fixes: if validation_result.auto_fixes:
shopping_response.auto_fixes_applied = validation_result.auto_fixes shopping_response.auto_fixes_applied = validation_result.auto_fixes
shopping_response.metadata = _build_response_metadata(session, log_id) shopping_response.response_metadata = _build_response_metadata(session, log_id)
return shopping_response return shopping_response

View file

@ -160,7 +160,7 @@ class RoutineSuggestion(SQLModel):
# Phase 3: Observability fields # Phase 3: Observability fields
validation_warnings: Optional[list[str]] = None validation_warnings: Optional[list[str]] = None
auto_fixes_applied: Optional[list[str]] = None auto_fixes_applied: Optional[list[str]] = None
metadata: Optional[ResponseMetadata] = None response_metadata: Optional[ResponseMetadata] = None
class SuggestBatchRequest(SQLModel): class SuggestBatchRequest(SQLModel):
@ -184,7 +184,7 @@ class BatchSuggestion(SQLModel):
# Phase 3: Observability fields # Phase 3: Observability fields
validation_warnings: Optional[list[str]] = None validation_warnings: Optional[list[str]] = None
auto_fixes_applied: Optional[list[str]] = None auto_fixes_applied: Optional[list[str]] = None
metadata: Optional[ResponseMetadata] = None response_metadata: Optional[ResponseMetadata] = None
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
@ -855,7 +855,7 @@ def suggest_routine(
if validation_result.auto_fixes: if validation_result.auto_fixes:
suggestion.auto_fixes_applied = validation_result.auto_fixes suggestion.auto_fixes_applied = validation_result.auto_fixes
suggestion.metadata = _build_response_metadata(session, log_id) suggestion.response_metadata = _build_response_metadata(session, log_id)
return suggestion return suggestion
@ -1033,7 +1033,7 @@ def suggest_batch(
if validation_result.auto_fixes: if validation_result.auto_fixes:
batch_suggestion.auto_fixes_applied = validation_result.auto_fixes batch_suggestion.auto_fixes_applied = validation_result.auto_fixes
batch_suggestion.metadata = _build_response_metadata(session, log_id) batch_suggestion.response_metadata = _build_response_metadata(session, log_id)
return batch_suggestion return batch_suggestion

View file

@ -263,7 +263,7 @@ export interface RoutineSuggestion {
// Phase 3: Observability fields // Phase 3: Observability fields
validation_warnings?: string[]; validation_warnings?: string[];
auto_fixes_applied?: string[]; auto_fixes_applied?: string[];
metadata?: ResponseMetadata; response_metadata?: ResponseMetadata;
} }
export interface DayPlan { export interface DayPlan {
@ -279,7 +279,7 @@ export interface BatchSuggestion {
// Phase 3: Observability fields // Phase 3: Observability fields
validation_warnings?: string[]; validation_warnings?: string[];
auto_fixes_applied?: string[]; auto_fixes_applied?: string[];
metadata?: ResponseMetadata; response_metadata?: ResponseMetadata;
} }
// ─── Shopping suggestion types ─────────────────────────────────────────────── // ─── Shopping suggestion types ───────────────────────────────────────────────
@ -300,7 +300,7 @@ export interface ShoppingSuggestionResponse {
// Phase 3: Observability fields // Phase 3: Observability fields
validation_warnings?: string[]; validation_warnings?: string[];
auto_fixes_applied?: string[]; auto_fixes_applied?: string[];
metadata?: ResponseMetadata; response_metadata?: ResponseMetadata;
} }
// ─── Health types ──────────────────────────────────────────────────────────── // ─── Health types ────────────────────────────────────────────────────────────

View file

@ -20,7 +20,7 @@
// Phase 3: Observability state // Phase 3: Observability state
let validationWarnings = $state<string[] | undefined>(undefined); let validationWarnings = $state<string[] | undefined>(undefined);
let autoFixes = $state<string[] | undefined>(undefined); let autoFixes = $state<string[] | undefined>(undefined);
let metadata = $state<ResponseMetadata | undefined>(undefined); let responseMetadata = $state<ResponseMetadata | undefined>(undefined);
function enhanceForm() { function enhanceForm() {
loading = true; loading = true;
@ -33,7 +33,7 @@
// Phase 3: Extract observability data // Phase 3: Extract observability data
validationWarnings = result.data.validation_warnings as string[] | undefined; validationWarnings = result.data.validation_warnings as string[] | undefined;
autoFixes = result.data.auto_fixes_applied as string[] | undefined; autoFixes = result.data.auto_fixes_applied as string[] | undefined;
metadata = result.data.metadata as ResponseMetadata | undefined; responseMetadata = result.data.response_metadata as ResponseMetadata | undefined;
errorMsg = null; errorMsg = null;
} else if (result.type === 'failure') { } else if (result.type === 'failure') {
errorMsg = (result.data?.error as string) ?? m["suggest_errorDefault"](); errorMsg = (result.data?.error as string) ?? m["suggest_errorDefault"]();
@ -93,11 +93,11 @@
{#if validationWarnings} {#if validationWarnings}
<ValidationWarningsAlert warnings={validationWarnings} /> <ValidationWarningsAlert warnings={validationWarnings} />
{/if} {/if}
{#if metadata?.reasoning_chain} {#if responseMetadata?.reasoning_chain}
<ReasoningChainViewer reasoningChain={metadata.reasoning_chain} /> <ReasoningChainViewer reasoningChain={responseMetadata.reasoning_chain} />
{/if} {/if}
{#if metadata} {#if responseMetadata}
<MetadataDebugPanel {metadata} /> <MetadataDebugPanel metadata={responseMetadata} />
{/if} {/if}
</div> </div>

View file

@ -227,11 +227,11 @@
{#if suggestion.validation_warnings} {#if suggestion.validation_warnings}
<ValidationWarningsAlert warnings={suggestion.validation_warnings} /> <ValidationWarningsAlert warnings={suggestion.validation_warnings} />
{/if} {/if}
{#if suggestion.metadata?.reasoning_chain} {#if suggestion.response_metadata?.reasoning_chain}
<ReasoningChainViewer reasoningChain={suggestion.metadata.reasoning_chain} /> <ReasoningChainViewer reasoningChain={suggestion.response_metadata.reasoning_chain} />
{/if} {/if}
{#if suggestion.metadata} {#if suggestion.response_metadata}
<MetadataDebugPanel metadata={suggestion.metadata} /> <MetadataDebugPanel metadata={suggestion.response_metadata} />
{/if} {/if}
<!-- Steps --> <!-- Steps -->
@ -349,11 +349,11 @@
{#if batch.validation_warnings} {#if batch.validation_warnings}
<ValidationWarningsAlert warnings={batch.validation_warnings} /> <ValidationWarningsAlert warnings={batch.validation_warnings} />
{/if} {/if}
{#if batch.metadata?.reasoning_chain} {#if batch.response_metadata?.reasoning_chain}
<ReasoningChainViewer reasoningChain={batch.metadata.reasoning_chain} /> <ReasoningChainViewer reasoningChain={batch.response_metadata.reasoning_chain} />
{/if} {/if}
{#if batch.metadata} {#if batch.response_metadata}
<MetadataDebugPanel metadata={batch.metadata} /> <MetadataDebugPanel metadata={batch.response_metadata} />
{/if} {/if}
<!-- Day cards --> <!-- Day cards -->

12
opencode.json Normal file
View file

@ -0,0 +1,12 @@
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"Playwright": {
"type": "local",
"command": [
"npx",
"@playwright/mcp@latest"
]
}
}
}

25
skills-lock.json Normal file
View file

@ -0,0 +1,25 @@
{
"version": 1,
"skills": {
"conventional-commit": {
"source": "github/awesome-copilot",
"sourceType": "github",
"computedHash": "f29c9486cede6c7b2df0cfb0a2e4aa67446552b991bcf17d1b309e903171f03d"
},
"frontend-design": {
"source": "anthropics/skills",
"sourceType": "github",
"computedHash": "063a0e6448123cd359ad0044cc46b0e490cc7964d45ef4bb9fd842bd2ffbca67"
},
"gemini-api-dev": {
"source": "google-gemini/gemini-skills",
"sourceType": "github",
"computedHash": "8ff8d320f21bff9dc980b8249743f39df11c80e07da3b2c5ab070d8ea9bdab46"
},
"svelte-code-writer": {
"source": "sveltejs/mcp",
"sourceType": "github",
"computedHash": "c0e2cce9855f8e312cbb0a05aef164b4659c672d7723e4e598ffa6bc94890542"
}
}
}