howone 0.2.1 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "howone",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "private": false,
5
5
  "description": "HowOne command line tools for creating app templates.",
6
6
  "type": "module",
@@ -104,7 +104,7 @@ Use `SKILL.md` for the full file index. Typical minimums:
104
104
  | App entity query code | add `04-app-sdk/11-entity-data-access-patterns.md`, `04-app-sdk/12-query-dsl-and-responses.md` after manifest sync |
105
105
  | AI design | `03-ai-capabilities/01-ai-capability-architecture.md`, `03-ai-capabilities/03-service-capability-catalog.md`, `03-ai-capabilities/02-workflow-contract-rules.md` |
106
106
  | AI + saved outputs | add `02-entity-schema/05-ai-persistence-patterns.md` after AI contract is known |
107
- | Bindings after sync | `02-manifest-codegen.md` + relevant `04-app-sdk/` files |
107
+ | Bindings after sync | `02-manifest-codegen.md` + `04-app-sdk/01-client-setup.md` + `04-app-sdk/03-auth.md` + `04-app-sdk/04-react-integration.md` + the operation-specific SDK file |
108
108
 
109
109
  ## Data posture
110
110
 
@@ -126,14 +126,38 @@ Defaults: "my/private" → own; public catalog only when fields are safe; share
126
126
 
127
127
  | Need | Client | Provider |
128
128
  |---|---|---|
129
- | Hosted HowOne login | default `createClient` | hosted |
130
- | Custom login UI | `auth: 'custom'`, provider `auth="none"` | app UI |
131
- | External IdP | headless + adapter | adapter owns token |
132
- | No auth | `auth: 'none'` | |
129
+ | HowOne AI, uploads, or authenticated/private entities | default `createClient` | `HowOneProvider auth="required"`; hosted login |
130
+ | Custom HowOne login UI | `auth: 'custom'`, real OTP/OAuth token flow | `HowOneProvider auth="none"`; app guards routes |
131
+ | External IdP | headless + adapter | `HowOneProvider auth="required"`; adapter owns token |
132
+ | Manifest-approved public entities only | default client or `auth: 'none'` | `HowOneProvider auth="optional"` |
133
+ | No HowOne runtime | no client required | no Provider required |
133
134
 
134
135
  Keep default HowOne brand control unless user asks to hide. Resolve identity through the SDK track
135
136
  when app code depends on the current user.
136
137
 
138
+ ### Runtime activation invariant
139
+
140
+ Contract design and app runtime activation are one delivery chain, not independent completion states.
141
+ When the final app uses any `@howone/sdk` runtime surface—including a synced entity or AI binding,
142
+ public entities, uploads, auth, user/session APIs, or raw SDK requests:
143
+
144
+ 1. Initialize the single app client in `src/lib/sdk.ts` with the generated project/env configuration.
145
+ 2. Import that SDK module before `HowOneProvider` so the Provider sees the selected auth environment.
146
+ 3. Keep `HowOneProvider` around the rendered application root. This is required for every active
147
+ HowOne SDK runtime, including public-only entity applications; replacing scaffold UI must not
148
+ remove it.
149
+ 4. Select the Provider guard from the table above. Do not use `auth="none"` to silence a missing login
150
+ flow for AI, uploads, or authenticated entities.
151
+ 5. For hosted auth, unauthenticated protected use must redirect through HowOne login. For custom auth,
152
+ the app must acquire an actual HowOne token and call `howone.auth.setToken()` before protected SDK
153
+ requests.
154
+ 6. Validate the logged-out path and the authenticated SDK call path. A styled login screen, compiled
155
+ SDK binding, or synced manifest alone does not prove runtime integration.
156
+
157
+ Pure UI/static work may omit this runtime chain only when the application makes no HowOne runtime
158
+ calls. Public-only entity experiences may stay anonymous only when the synced manifest explicitly
159
+ permits the public operation and app code uses `howone.public.entities.*`.
160
+
137
161
  ## Entity workflow (when `02-entity-schema/` in scope)
138
162
 
139
163
  1. Read schema design + operations references.
@@ -177,4 +201,8 @@ capability patch.
177
201
  - [ ] AI requirements verified against catalog when AI in scope
178
202
  - [ ] Manifests synced before SDK codegen
179
203
  - [ ] `src/lib/sdk.ts` is the HowOne entrypoint
204
+ - [ ] App code uses generated SDK bindings instead of direct internal platform HTTP requests
205
+ - [ ] Active HowOne runtime keeps `HowOneProvider` at the app root and initializes the SDK first
206
+ - [ ] AI, uploads, and authenticated entities have a real hosted/custom/headless token path
207
+ - [ ] Public-only anonymous access is backed by manifest public rules and the public SDK namespace
180
208
  - [ ] UI owns visible feedback; no invented platform APIs
@@ -15,13 +15,13 @@ Source: `docs/ai-capability.md`.
15
15
  | User asks for | Use capability family | Typical inputs | Typical outputs |
16
16
  |---|---|---|---|
17
17
  | Latest info, research, source-backed answer | Web search / crawling | `topic`, `prompt`, `url`, `search_level` | `answer`, `sources`, `page_content` |
18
- | Generate artwork/photo/logo/mockup | Image generation | `image_description`, `style_preference`, optional references | `generated_image_url` |
19
- | Edit an image | Image editing | `source_image_url`, `edit_instruction` | `edited_image_url` |
20
- | OCR or visual analysis | Image analysis / OCR | `image_urls`, `analysis_prompt` | `analysis_result` or `extracted_text` |
21
- | Generate short video | Video generation | `video_prompt`, aspect/duration/frame URLs | `video_url` |
18
+ | Generate artwork/photo/logo/mockup | Image generation | `prompt`, optional `reference_img_urls`, size/format | `generated_image_url` or `image_urls` |
19
+ | Edit an image | Image editing | `prompt`, `image_urls`, optional size/format | `edited_image_url` or `image_urls` |
20
+ | OCR or visual analysis | Image analysis / OCR | `prompt`, optional `image_urls` | `analysis_result` or `extracted_text` |
21
+ | Generate short video | Video generation | `prompt`, aspect/duration/frame URLs | `video_url` |
22
22
  | Join clips / extract frames | Video editing | `video_urls` or `video_url` | `video_url` or `image_url` |
23
- | Text to speech | Audio generation | `text_to_generate`, `language`, `voice_hint` | `audio_url` |
24
- | Speech to text | Audio recognition | `source_audio_url`, `language` | `transcript_text`, optional `utterances` |
23
+ | Text to speech | Audio generation | `text_to_generate`, `languages`, `gender`, `audio_hint` | `audio_url` |
24
+ | Speech to text | Audio recognition | `audio_url`, `language`, optional diarization | `transcript_text`, optional `utterances` |
25
25
  | Merge audio | Audio merging | `audio_urls` | `merged_audio_url` |
26
26
  | Stock/index history | Financial data retrieval | `trading_symbol`, `unit`, `start`, `end` | `price_history` |
27
27
  | Literature search/citations | Academic research | `query` | `papers`, `bibtex` |
@@ -29,6 +29,25 @@ Source: `docs/ai-capability.md`.
29
29
 
30
30
  If the requested behavior is not in this table or the detailed sections below, do not invent it.
31
31
 
32
+ ## Detailed Parameter References
33
+
34
+ The sections below establish family-level feasibility. Before designing one of these workflow
35
+ contracts, read its detailed service reference for exact parameter names, allowed values, defaults,
36
+ conditional requirements, outputs, and hard limits:
37
+
38
+ | Capability family | Read |
39
+ |---|---|
40
+ | Audio generation | `../references/audio-generation.md` |
41
+ | Audio recognition | `../references/audio-recognition.md` |
42
+ | Financial data retrieval | `../references/finance.md` |
43
+ | Image editing | `../references/image-editing.md` |
44
+ | Image generation | `../references/image-generation.md` |
45
+ | Video generation | `../references/video-generation.md` |
46
+
47
+ These are workflow-service parameters, not direct `@howone/sdk` method signatures. Translate only
48
+ the product-relevant subset into a loose capability schema, then use the synced AI manifest for app
49
+ bindings.
50
+
32
51
  ## Web Search And Crawling
33
52
 
34
53
  Use for latest information, news, market context, source-backed answers, web page extraction.
@@ -59,10 +78,9 @@ Use for new images from prompts or prompt + reference URLs.
59
78
 
60
79
  Inputs:
61
80
 
62
- - `image_description`: detailed prompt;
63
- - `style_preference`: optional;
64
- - `reference_image_urls`: optional URL array;
65
- - size/format options only when product exposes them.
81
+ - `prompt`: detailed prompt;
82
+ - `reference_img_urls`: optional URL array;
83
+ - optional `image_names`, `size`, and `output_format` when the product exposes them.
66
84
 
67
85
  Outputs:
68
86
 
@@ -82,8 +100,8 @@ Use for modifying existing images.
82
100
 
83
101
  Inputs:
84
102
 
85
- - `source_image_url` or `source_image_urls`;
86
- - `edit_instruction`;
103
+ - `image_urls`: one or more source image URLs;
104
+ - `prompt`: edit instruction;
87
105
  - optional output size/format.
88
106
 
89
107
  Outputs:
@@ -106,7 +124,7 @@ Use for visual understanding, image comparison, text extraction, quality review.
106
124
  Inputs:
107
125
 
108
126
  - `image_urls`;
109
- - `analysis_prompt` or `ocr_instruction`.
127
+ - `prompt`: analysis question or OCR instruction.
110
128
 
111
129
  Outputs:
112
130
 
@@ -125,8 +143,8 @@ Use for short video clips from text or image frames.
125
143
 
126
144
  Inputs:
127
145
 
128
- - `video_prompt`;
129
- - optional `first_frame_url`, `last_frame_url`, `reference_image_urls`;
146
+ - `prompt`;
147
+ - optional `first_frame_url`, `last_frame_url`, `reference_images`;
130
148
  - optional `aspect_ratio`, `duration`, `negative_prompt`, `generate_audio`.
131
149
 
132
150
  Outputs:
@@ -165,10 +183,10 @@ Use for text-to-speech.
165
183
  Inputs:
166
184
 
167
185
  - `text_to_generate`;
168
- - `language` or `languages`;
186
+ - `languages`;
169
187
  - `gender`;
170
188
  - `audio_hint`;
171
- - optional output format/name.
189
+ - optional `audio_output` with output format/name.
172
190
 
173
191
  Outputs:
174
192
 
@@ -186,9 +204,9 @@ Use for speech-to-text.
186
204
 
187
205
  Inputs:
188
206
 
189
- - `source_audio_url`;
207
+ - `audio_url`;
190
208
  - optional `language`;
191
- - optional speaker diarization setting.
209
+ - optional `with_speaker_info` for speaker diarization.
192
210
 
193
211
  Outputs:
194
212
 
@@ -66,7 +66,7 @@ Tool behavior:
66
66
 
67
67
  ```text
68
68
  previous config = current manifest capability.workflowId
69
- new config = freshly generated UUID sent as config_id
69
+ new config = freshly generated UUID sent as new_config_id
70
70
  mode = update
71
71
  original_config_id = previous config sent to EAX
72
72
  workflow code = regenerated by EAX from the current capability contract and updatePrompt
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: howone
3
- description: 'Use when deciding whether HowOne can satisfy a user request, or when the task touches HowOne platform contracts or app runtime: backend dynamic entity schemas, public/private access, database-backed persisted data, AI capabilities/workflows, external-ai workflow create/update/status, .howone manifests, src/lib/sdk.ts, auth/uploads, or app code that calls @howone/sdk/howone.*. Do not use for UI-only edits with no HowOne data, AI, auth, upload, manifest, or SDK surface.'
3
+ description: 'Use when deciding whether HowOne can satisfy a user request, or when the task touches HowOne platform contracts or app runtime: backend dynamic entity schemas, public/private access, database-backed persisted data, AI capabilities/workflows (including image, video, audio, speech recognition, and financial data), external-ai workflow create/update/status, .howone manifests, src/lib/sdk.ts, auth/uploads, or app code that calls @howone/sdk/howone.*. Do not use for UI-only edits with no HowOne data, AI, auth, upload, manifest, or SDK surface.'
4
4
  ---
5
5
 
6
6
  # HowOne
@@ -56,11 +56,38 @@ Then read the minimum track files:
56
56
  | Backend contract | `02-entity-schema/01-schema-design.md`, `02-entity-schema/02-schema-operations.md` |
57
57
  | AI contract | `03-ai-capabilities/01-ai-capability-architecture.md`, `03-ai-capabilities/02-workflow-contract-rules.md`, `03-ai-capabilities/03-service-capability-catalog.md` |
58
58
  | External AI workflow submit/update | `03-ai-capabilities/04-workflow-operations.md` |
59
- | SDK binding/code | `01-architect/02-manifest-codegen.md` plus the relevant `04-app-sdk/` file |
59
+ | Image, video, audio, speech, or finance workflow | The matching file under `references/` from the detailed capability table below |
60
+ | SDK binding/code | `01-architect/02-manifest-codegen.md`, `04-app-sdk/01-client-setup.md`, `04-app-sdk/03-auth.md`, `04-app-sdk/04-react-integration.md`, plus the operation-specific SDK file |
60
61
  | AI output persistence | Backend required reads plus `02-entity-schema/05-ai-persistence-patterns.md` after AI output schema is known |
61
62
 
62
63
  Do not load all references preemptively.
63
64
 
65
+ ### Detailed Capability Routing
66
+
67
+ After `03-ai-capabilities/03-service-capability-catalog.md` confirms the workflow family, read
68
+ exactly the matching detailed reference before designing or changing its contract:
69
+
70
+ | User-visible AI behavior | Detailed service reference |
71
+ |---|---|
72
+ | Generate speech, narration, voiceover, or multilingual TTS | `references/audio-generation.md` |
73
+ | Transcribe recordings, produce meeting text, or identify speakers | `references/audio-recognition.md` |
74
+ | Retrieve historical stock or index prices | `references/finance.md` |
75
+ | Edit, transform, remove, replace, or combine image content | `references/image-editing.md` |
76
+ | Generate an image from text or reference images | `references/image-generation.md` |
77
+ | Generate a short video from text, frames, or reference images | `references/video-generation.md` |
78
+
79
+ The detailed references describe workflow-service operation parameters and limits. Use them to
80
+ avoid unsupported values and impossible combinations. They are not app SDK signatures:
81
+
82
+ 1. Expose only the inputs the product actually needs in the capability contract.
83
+ 2. Preserve closed enums, URL requirements, conditional requirements, and hard limits.
84
+ 3. Use product-oriented field names only when their descriptions map unambiguously to the service
85
+ parameter; never invent a service parameter.
86
+ 4. Return only the minimal product result from the workflow. Do not copy service metadata into the
87
+ output schema unless the UI or persistence contract uses it.
88
+ 5. After apply/sync/finalization, treat `.howone/ai/manifest.json` as the only source for SDK names,
89
+ schemas, and workflow IDs.
90
+
64
91
  ## Tool Flow
65
92
 
66
93
  Backend contract:
@@ -83,9 +110,35 @@ approved patch.
83
110
  SDK/code:
84
111
 
85
112
  ```text
86
- read synced manifests -> update src/lib/sdk.ts -> implement UI/server code using src/lib/sdk.ts imports
113
+ read synced manifests -> choose auth posture -> update src/lib/sdk.ts -> install HowOneProvider
114
+ -> implement UI calls using src/lib/sdk.ts imports -> validate auth and runtime wiring
87
115
  ```
88
116
 
117
+ ## App Runtime Activation Gate
118
+
119
+ Classify runtime activation before editing the application shell:
120
+
121
+ - Pure UI/static code with no HowOne data, AI, upload, auth, manifest, or SDK call does not require
122
+ `HowOneProvider` and must not add login merely because the template supports it.
123
+ - Any app code that uses any `@howone/sdk` runtime surface—including entities, public entities, AI
124
+ actions, uploads, auth, user/session APIs, or raw SDK requests—activates the HowOne runtime. Keep
125
+ one module-level client in `src/lib/sdk.ts`, import it before Provider initialization, and wrap the
126
+ application root in `HowOneProvider`.
127
+ - HowOne AI, uploads, and `howone.entities.*` authenticated/private access require a real token path.
128
+ Default to hosted auth with `HowOneProvider auth="required"` unless the product explicitly requires
129
+ a custom or external login experience.
130
+ - A custom HowOne login requires `createClient({ auth: 'custom', loginPath })`, a real OTP/OAuth flow
131
+ that writes the returned token through `howone.auth.setToken()`, and `HowOneProvider auth="none"`
132
+ with app-owned route guards. A login-looking screen without token acquisition is not completion.
133
+ - An app that uses only manifest-approved `howone.public.entities.*` access may use
134
+ `HowOneProvider auth="optional"`; do not force login for a deliberately public experience.
135
+
136
+ Do not delete the scaffold Provider while replacing `App.tsx` or `main.tsx` when the HowOne runtime
137
+ is active. Before completion, verify the Provider still wraps the rendered app, the SDK module is
138
+ initialized first, unauthenticated protected use reaches the selected login flow, and authenticated
139
+ AI/entity/upload requests obtain the SDK-managed token. Never replace a missing token path with mock
140
+ data, local-only persistence, or unauthenticated fallback behavior.
141
+
89
142
  ## Source Of Truth
90
143
 
91
144
  - Backend fields/access/indexes: `{appRoot}/.howone/database/manifest.json` after sync.
@@ -123,6 +176,9 @@ read synced manifests -> update src/lib/sdk.ts -> implement UI/server code using
123
176
  | `03-ai-capabilities/04-workflow-operations.md` | External workflow create/update/status |
124
177
  | `03-ai-capabilities/05-ai-feature-playbooks.md` | Reusable AI product patterns |
125
178
 
179
+ Detailed workflow-service parameters live under `references/` and are routed by the table above.
180
+ Do not read unrelated capability references.
181
+
126
182
  ### SDK
127
183
 
128
184
  | File | Use |
@@ -144,6 +200,16 @@ read synced manifests -> update src/lib/sdk.ts -> implement UI/server code using
144
200
 
145
201
  - Backend and AI design references must not include SDK implementation work.
146
202
  - SDK references must not invent backend or AI contracts; they consume synced manifests.
203
+ - App code must consume HowOne backend and AI capabilities through the generated bindings exported
204
+ by `src/lib/sdk.ts`. Do not replace SDK entity/action calls with direct requests to internal
205
+ platform endpoints.
206
+ - An active HowOne app runtime must include `src/lib/sdk.ts`, `HowOneProvider`, and the auth posture
207
+ required by its AI/entity/upload access. Contract creation without usable authenticated app wiring
208
+ is incomplete.
147
209
  - AI workflows must not perform database CRUD; persistence is app code through entities.
210
+ - Detailed capability references constrain workflow design; they do not replace synced manifests or
211
+ define direct app SDK calls.
212
+ - Never copy all service parameters or technical response metadata into a capability contract by
213
+ default. Model only the product inputs and outputs while preserving service limits.
148
214
  - Explicit user-owned integrations are app code, not a platform gap.
149
215
  - Platform gap means missing HowOne contract/tool/catalog support, not an unsupported technology name.
@@ -0,0 +1,30 @@
1
+ # Audio Generation
2
+
3
+ Generates single-speaker audio (text-to-speech) from text, with configurable language, gender, and a natural-language voice hint. Supports multilingual audio by mixing Chinese and English in the same text. For multi-speaker dialogue, call this tool once per speaker and merge the results separately.
4
+
5
+ Use this file for workflow-service feasibility and parameter constraints. Do not expose every
6
+ parameter or raw response field in the app capability contract. Select the product-relevant subset,
7
+ then normalize the workflow output to the minimal URL/data fields the app consumes.
8
+
9
+ ## Parameters
10
+
11
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
12
+ |---|---|---|---|---|
13
+ | text_to_generate | string | Yes | — | — |
14
+ | languages | array[string] | No | items: `en-US`, `zh-CN`, `en-GB`, `en-AU`, `ja-JP`, `es-ES`; multilingual mixing only supported for zh/en | `['en-US']` |
15
+ | gender | string | No | `male`, `female` | `female` |
16
+ | audio_hint | string | No | must be written in English regardless of input/target language | — |
17
+ | audio_output | object | No | object with `audio_name` (string, ASCII only) and `audio_format` (`mp3`, `wav`) | audio_name auto-generated; audio_format `mp3` |
18
+
19
+ ## Service Output
20
+
21
+ The operation returns `success`, `audio_url`, `audio_metadata`, `voice_name`, and `emotion` when
22
+ available. A normal app capability should usually return only `audio_url` unless the product renders
23
+ or persists another field.
24
+
25
+ ## Constraints
26
+
27
+ - Use one speaker per call. Generate each speaker separately and use audio merging for dialogue.
28
+ - Only Chinese and English can be mixed in one multilingual request.
29
+ - Write `audio_hint` in English. Describe role, gender, language style, emotion, and scenario.
30
+ - Use URL outputs; do not request inline audio bytes or base64.
@@ -0,0 +1,30 @@
1
+ # Audio Recognition
2
+
3
+ Transcribes an audio file to text (speech-to-text), optionally with inverse text normalization and speaker diarization. Use for transcription, meeting minutes, or extracting text content from voice recordings.
4
+
5
+ Use this file for workflow-service feasibility and parameter constraints. The app capability may use
6
+ a clearer product field such as `source_audio_url`, but its description must map to the service
7
+ `audio_url` input. Never pass browser `File`, raw bytes, or base64 into the workflow.
8
+
9
+ ## Parameters
10
+
11
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
12
+ |---|---|---|---|---|
13
+ | audio_url | string | Yes | — | — |
14
+ | audio_format | string | No | e.g. `wav`, `mp3` | `mp3` |
15
+ | language | string | No | `en-US`, `zh-CN`, `en-GB`, `en-AU`, `ja-JP`, `es-ES` | `en-US` |
16
+ | use_itn | boolean | No | `true`, `false` | `true` |
17
+ | with_speaker_info | boolean | No | `true`, `false` | `false` |
18
+
19
+ ## Service Output
20
+
21
+ The operation returns `success`, `text`, and optional `utterances` with timestamps and speaker
22
+ identification. A capability contract should rename `text` to an unambiguous product result such as
23
+ `transcript_text`; include `utterances` only when the UI uses diarization.
24
+
25
+ ## Constraints
26
+
27
+ - `audio_url` must be reachable by the workflow service.
28
+ - Maximum processing wait time is 300 seconds.
29
+ - A single audio packet is limited to 2 MB; do not promise support for arbitrary large inputs.
30
+ - Silent audio may return empty text. Speaker quality depends on recording clarity.
@@ -0,0 +1,28 @@
1
+ # Finance
2
+
3
+ Retrieves historical price and volume (open, high, low, close, volume) for stocks and market indices within a UTC time range. Supports US stocks, international stocks, and market indices. Does not provide company fundamentals, news, or real-time streaming data.
4
+
5
+ Use this file for historical market-data workflow feasibility and exact parameter constraints. Do
6
+ not reclassify live quotes, fundamentals, earnings, or news as this capability.
7
+
8
+ ## Parameters
9
+
10
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
11
+ |---|---|---|---|---|
12
+ | trading_symbol | string | Yes | trading symbol (e.g. `AAPL`, `SHEL.L`, `^GSPC`) or company/index name (e.g. `Apple`, `S&P 500`) | — |
13
+ | unit | string | Yes | `daily`, `minute`; market indices only support `daily` | — |
14
+ | start | string | Yes | UTC; `YYYY-MM-DD` for `daily` unit, `YYYY-MM-DDTHH:MM:SSZ` for `minute` unit | — |
15
+ | end | string | Yes | UTC, inclusive; `YYYY-MM-DD` for `daily` unit, `YYYY-MM-DDTHH:MM:SSZ` for `minute` unit; must be ≥ `start` | — |
16
+
17
+ ## Service Output
18
+
19
+ The operation returns `data` containing date/datetime, open, high, low, close, and volume records,
20
+ plus the resolved `trading_symbol` and an optional `warning`. Name the app-facing result according
21
+ to the product, for example `price_history`, while retaining the resolved symbol when it matters.
22
+
23
+ ## Constraints
24
+
25
+ - This is historical retrieval, not real-time streaming.
26
+ - Market indices such as `^GSPC` and `^DJI` support `daily` only.
27
+ - Prefer exact exchange-qualified tickers; company-name resolution is fuzzy.
28
+ - Availability depends on trading hours and provider coverage.
@@ -0,0 +1,30 @@
1
+ # Image Editing
2
+
3
+ Edits, transforms, or combines one or more existing images based on a natural language prompt. Supports basic operations (resize, rotate, crop, color adjustment, grayscale, blur, sharpen) and AI-powered operations (background removal/replacement, face swap, object removal/addition, style transfer, enhancement, image merging), which can be chained together.
4
+
5
+ Use this file for workflow-service feasibility and parameter constraints. `prompt` and `image_urls`
6
+ are service operation parameters; the app capability may expose product-oriented names such as
7
+ `edit_instruction` and `source_image_urls` when their descriptions preserve the mapping.
8
+
9
+ ## Parameters
10
+
11
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
12
+ |---|---|---|---|---|
13
+ | prompt | string | Yes | — | — |
14
+ | image_urls | array[string] | Yes | HTTP(S) or Supabase URLs; use array format even for a single image | — |
15
+ | image_names | array[string] | No | ASCII only; use array format even for a single image | auto-generated |
16
+ | size | string | No | `WxH` format (e.g. `512x512`, `1024x768`); applies to all edited images | original dimensions preserved |
17
+ | output_format | string | No | `png`, `jpeg`, `webp` | original format preserved |
18
+
19
+ ## Service Output
20
+
21
+ The operation returns `success`, `images` (each with `image_url` and `image_metadata`), and optional
22
+ `warnings`. A single-result app flow should normally return one `edited_image_url`; return an array
23
+ only when the product supports multiple edited outputs.
24
+
25
+ ## Constraints
26
+
27
+ - Require at least one reachable HTTP(S) image URL, even for operations described as text edits.
28
+ - Refer to inputs by position or visible content in `prompt`, not by repeating their URLs.
29
+ - Put output dimensions in `size`, not in `prompt`.
30
+ - Prefer focused edits. Chained complex edits can reduce quality.
@@ -0,0 +1,30 @@
1
+ # Image Generation
2
+
3
+ Generates images from a natural language prompt, optionally guided by reference images for text-and-image(s)-to-image generation. Produces illustrations, photographs, artwork, diagrams, logos, mockups, and other visual content.
4
+
5
+ Use this file for workflow-service feasibility and parameter constraints. `prompt`,
6
+ `reference_img_urls`, and the output controls are service operation parameters. Expose only the
7
+ subset that the product lets users control.
8
+
9
+ ## Parameters
10
+
11
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
12
+ |---|---|---|---|---|
13
+ | prompt | string | Yes | — | — |
14
+ | image_names | array[string] | No | ASCII only; use array format even for a single image | — |
15
+ | size | string | No | `WxH` format (e.g. `1024x768`); applies to all generated images | — |
16
+ | output_format | string | No | `png`, `jpeg`, `webp` | — |
17
+ | reference_img_urls | array[string] | No | list of image URLs to provide as reference | — |
18
+
19
+ ## Service Output
20
+
21
+ The operation returns `success`, `images` (each with `image_url` and `image_metadata`), and optional
22
+ `warnings`. Most app capabilities should normalize this to one `generated_image_url`; use an array
23
+ only when multiple generated images are an explicit product feature.
24
+
25
+ ## Constraints
26
+
27
+ - Put scene, style, composition, and content in `prompt`; put dimensions in `size`.
28
+ - Refer to reference images by position or content, not by URL text inside the prompt.
29
+ - Prefer one image per request. Two or three are possible but less consistent.
30
+ - Reference images guide style/content and do not guarantee pixel-perfect reproduction.
@@ -0,0 +1,35 @@
1
+ # Video Generation
2
+
3
+ Generates a video from a text prompt, with optional image-to-video (first/last frame), reference images for style guidance, and optional synchronized audio.
4
+
5
+ Use this file for workflow-service feasibility and parameter constraints. Keep the app capability
6
+ contract smaller than the service operation unless the product genuinely exposes every control.
7
+
8
+ ## Parameters
9
+
10
+ | Parameter | Type | Required | Allowed Values / Constraints | Default |
11
+ |---|---|---|---|---|
12
+ | prompt | string | Yes | — | — |
13
+ | video_name | string | No | ASCII characters only | auto-generated |
14
+ | aspect_ratio | string | No | `16:9`, `9:16`, `4:3`, `3:4`, `1:1`, `21:9` | `16:9` |
15
+ | resolution | string | No | `480p`, `720p`, `1080p` | `720p` |
16
+ | duration | integer | No | 4-10 seconds | 4 |
17
+ | first_frame_url | string | No | image URL, for image-to-video (starting frame) | — |
18
+ | last_frame_url | string | No | requires `first_frame_url` to be set | — |
19
+ | reference_images | array[string] | No | up to 3 image URLs | — |
20
+ | negative_prompt | string | No | — | — |
21
+ | generate_audio | boolean | No | `true`, `false` | `false` |
22
+
23
+ ## Service Output
24
+
25
+ The operation returns `success`, `video_url`, `video_metadata`, and the selected `model`. A normal
26
+ app capability should return only `video_url` unless technical metadata is visible or persisted.
27
+
28
+ ## Constraints
29
+
30
+ - `last_frame_url` is valid only when `first_frame_url` is also present.
31
+ - Use at most 3 `reference_images`.
32
+ - Generate 4-10 second clips. Build longer output from multiple clips plus video concatenation.
33
+ - Use `first_frame_url` for stronger character/style consistency across clips.
34
+ - When `generate_audio` is true, describe dialogue, sound effects, ambience, and music in `prompt`;
35
+ one speaker per clip is the most reliable.