howone 0.2.2 → 0.2.5

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/templates/vite/.howone/skills/howone/01-architect/01-app-generation.md +36 -7
  3. package/templates/vite/.howone/skills/howone/01-architect/02-manifest-codegen.md +121 -436
  4. package/templates/vite/.howone/skills/howone/03-ai-capabilities/03-service-capability-catalog.md +37 -19
  5. package/templates/vite/.howone/skills/howone/03-ai-capabilities/04-workflow-operations.md +14 -5
  6. package/templates/vite/.howone/skills/howone/04-app-sdk/01-client-setup.md +94 -261
  7. package/templates/vite/.howone/skills/howone/04-app-sdk/02-entity-operations.md +85 -465
  8. package/templates/vite/.howone/skills/howone/04-app-sdk/03-auth.md +11 -7
  9. package/templates/vite/.howone/skills/howone/04-app-sdk/04-react-integration.md +84 -137
  10. package/templates/vite/.howone/skills/howone/04-app-sdk/05-file-upload.md +66 -273
  11. package/templates/vite/.howone/skills/howone/04-app-sdk/06-raw-http.md +72 -249
  12. package/templates/vite/.howone/skills/howone/04-app-sdk/07-ai-action-calls.md +135 -499
  13. package/templates/vite/.howone/skills/howone/04-app-sdk/08-ai-manifest-handoff.md +49 -196
  14. package/templates/vite/.howone/skills/howone/04-app-sdk/09-extension-boundaries.md +4 -4
  15. package/templates/vite/.howone/skills/howone/04-app-sdk/10-workflow-execute-sse.md +94 -61
  16. package/templates/vite/.howone/skills/howone/04-app-sdk/11-entity-data-access-patterns.md +4 -3
  17. package/templates/vite/.howone/skills/howone/SKILL.md +110 -4
  18. package/templates/vite/.howone/skills/howone/references/audio-generation.md +30 -0
  19. package/templates/vite/.howone/skills/howone/references/audio-recognition.md +30 -0
  20. package/templates/vite/.howone/skills/howone/references/common-errors.md +27 -0
  21. package/templates/vite/.howone/skills/howone/references/finance.md +28 -0
  22. package/templates/vite/.howone/skills/howone/references/image-editing.md +30 -0
  23. package/templates/vite/.howone/skills/howone/references/image-generation.md +30 -0
  24. package/templates/vite/.howone/skills/howone/references/version-evidence.md +47 -0
  25. package/templates/vite/.howone/skills/howone/references/video-generation.md +35 -0
  26. package/templates/vite/.howone/skills/howone/scripts/verify-project.mjs +151 -0
  27. package/templates/vite/package.json +1 -1
  28. package/templates/vite/src/App.tsx +9 -5
  29. package/templates/vite/src/lib/sdk.ts +7 -5
  30. package/templates/vite/bun.lock +0 -1478
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "howone",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
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,39 @@ 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 client={howone}>`; hosted guard is inherited |
130
+ | Custom HowOne login UI | `auth: 'custom'`, real OTP/OAuth token flow | `<HowOneProvider client={howone}>`; custom guard is inherited |
131
+ | External IdP | headless + adapter | `<HowOneProvider client={howone}>`; adapter owns token |
132
+ | Manifest-approved public entities only | `auth: 'none'` or explicit public client | `<HowOneProvider client={howone}>` with no required guard |
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` and pass the composed client so the Provider sees
146
+ the selected environment and instance-scoped auth state.
147
+ 3. Keep `HowOneProvider` around the rendered application root. This is required for every active
148
+ HowOne SDK runtime, including public-only entity applications; replacing scaffold UI must not
149
+ remove it.
150
+ 4. Select the Provider guard from the table above. Do not use `auth="none"` to silence a missing login
151
+ flow for AI, uploads, or authenticated entities.
152
+ 5. For hosted auth, unauthenticated protected use must redirect through HowOne login. For custom auth,
153
+ the app must acquire an actual HowOne token and call `howone.auth.setToken()` before protected SDK
154
+ requests.
155
+ 6. Validate the logged-out path and the authenticated SDK call path. A styled login screen, compiled
156
+ SDK binding, or synced manifest alone does not prove runtime integration.
157
+
158
+ Pure UI/static work may omit this runtime chain only when the application makes no HowOne runtime
159
+ calls. Public-only entity experiences may stay anonymous only when the synced manifest explicitly
160
+ permits the public operation and app code uses `howone.public.entities.*`.
161
+
137
162
  ## Entity workflow (when `02-entity-schema/` in scope)
138
163
 
139
164
  1. Read schema design + operations references.
@@ -151,8 +176,8 @@ without default) need explicit user alignment before applying the final patch.
151
176
  1. Read architecture + **catalog** (feasibility) + contract rules; use playbooks when they match.
152
177
  2. Apply one complete capability patch → `sync_ai_artifacts`.
153
178
  3. External workflow create/update per workflow-operations reference; keep job/request IDs from tool results.
154
- 4. Wait for the terminal result. A successful update promotes its new workflow ID in the backend capability version.
155
- 5. Run `sync_ai_artifacts` again, then read `{appRoot}/.howone/ai/manifest.json`.
179
+ 4. Treat submission as asynchronous pending work, not a pause boundary. Continue independent app source, UI, persistence, and state implementation instead of ending the run to wait.
180
+ 5. After the terminal result becomes available, run `sync_ai_artifacts` again, then read `{appRoot}/.howone/ai/manifest.json`. A successful update promotes its new workflow ID in the backend capability version.
156
181
  6. Stop AI design. Read SDK references only if implementing app calls.
157
182
  7. If persistence required: entity workflow after output contract is fixed.
158
183
 
@@ -177,4 +202,8 @@ capability patch.
177
202
  - [ ] AI requirements verified against catalog when AI in scope
178
203
  - [ ] Manifests synced before SDK codegen
179
204
  - [ ] `src/lib/sdk.ts` is the HowOne entrypoint
205
+ - [ ] App code uses generated SDK bindings instead of direct internal platform HTTP requests
206
+ - [ ] Active HowOne runtime keeps `HowOneProvider` at the app root and initializes the SDK first
207
+ - [ ] AI, uploads, and authenticated entities have a real hosted/custom/headless token path
208
+ - [ ] Public-only anonymous access is backed by manifest public rules and the public SDK namespace
180
209
  - [ ] UI owns visible feedback; no invented platform APIs