@salsita-ai/sdk 0.50.0-develop.2331d4a6b7 → 0.50.0-develop.42cf9563b0
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/README.md +19 -11
- package/dist/application-spec/errors/diagnostic-codes.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +6 -0
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/configurator-domain-code.js +11 -8
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.d.ts +3 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +70 -66
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-phx-globals.js +3 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec.js +5 -5
- package/dist/application-spec/generate-application/code/templates/domain.js +2 -2
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.d.ts +11 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +8 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +3 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +39 -16
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +4 -2
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +3 -1
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +2 -2
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +2 -0
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +1 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +14 -0
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.js +1 -0
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +1 -0
- package/dist/application-spec/generate-application/runtime/sections/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +3 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/merge/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/index.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-actions.d.ts +11 -0
- package/dist/application-spec/parse-application-files/merge/merged-actions.js +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.d.ts +2 -0
- package/dist/application-spec/parse-application-files/merge/merged-spec.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/index.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.d.ts +18 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-actions.js +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +14 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +2 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/resolve/resolve-import-modules.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/application-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.d.ts +4 -2
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.d.ts +23 -0
- package/dist/application-spec/parse-application-files/spec/common/schema-ref-resolver.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/names/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +35 -0
- package/dist/application-spec/parse-application-files/spec/sections/actions.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.d.ts +3 -14
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-field-type.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +12 -3
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.d.ts +5 -3
- package/dist/application-spec/parse-application-files/spec/sections/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/docs/index.json +12 -2
- package/dist/docs/other-features/domain-actions.mdx +418 -0
- package/dist/docs/phoenix/admin.mdx +2 -2
- package/dist/docs/phoenix/best-practices.mdx +1 -0
- package/dist/docs/phoenix/finalization.mdx +1 -1
- package/dist/docs/phoenix/integration/headless-mode-external.mdx +5 -5
- package/dist/docs/phoenix/integration/widget-mode-external.mdx +5 -5
- package/dist/docs/phoenix/phoenix-cli.mdx +55 -17
- package/dist/docs/phoenix/project-structure.mdx +4 -1
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +3 -2
- package/dist/domain/actions/action-factory.d.ts +10 -0
- package/dist/domain/actions/action-factory.js +1 -0
- package/dist/domain/actions/prepare-action-implementations.d.ts +15 -0
- package/dist/domain/actions/prepare-action-implementations.js +5 -0
- package/dist/domain/application/application-config.d.ts +3 -1
- package/dist/domain/application/assistant-mutations.d.ts +15 -14
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/core/action.d.ts +67 -0
- package/dist/domain/core/action.js +1 -0
- package/dist/domain/core/domain-factory.d.ts +4 -0
- package/dist/domain/core/index.d.ts +1 -0
- package/dist/domain/domain-builder.d.ts +7 -0
- package/dist/domain/domain-builder.js +1 -1
- package/dist/domain/domain-context/action-system/action-system.d.ts +40 -0
- package/dist/domain/domain-context/action-system/action-system.js +1 -0
- package/dist/domain/domain-context/domain-context-systems.d.ts +5 -2
- package/dist/domain/domain-context/index.d.ts +1 -0
- package/dist/domain/domain-context/index.js +1 -1
- package/dist/domain/domain-runtime/domain-context/domain-context.js +1 -1
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +4 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +12 -0
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +15 -1
- package/dist/domain/index.d.ts +2 -0
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +6 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +7 -3
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/phoenix/application-spec/generate-assistant-prompt.d.ts +2 -2
- package/dist/phoenix/application-spec/generate-assistant-prompt.js +1 -1
- package/dist/phoenix/cli.js +1 -1
- package/dist/phoenix/commands/build.d.ts +5 -0
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/feedback.d.ts +2 -1
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/services/index.d.ts +1 -0
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/phx-banner-plugin.d.ts +32 -0
- package/dist/phoenix/services/phx-banner-plugin.js +1 -0
- package/dist/phoenix/services/phx-licenses-plugin.d.ts +55 -0
- package/dist/phoenix/services/phx-licenses-plugin.js +8 -0
- package/dist/phoenix/services/vite-config.d.ts +2 -0
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/utils/index.d.ts +1 -0
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/read-git-commit.d.ts +14 -0
- package/dist/phoenix/utils/read-git-commit.js +1 -0
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +12 -0
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
# Domain Actions
|
|
2
|
+
|
|
3
|
+
- [Use case](#use-case)
|
|
4
|
+
- [Declare the action](#declare-the-action)
|
|
5
|
+
- [Implement it](#implement-it)
|
|
6
|
+
- [Run it from the UI](#run-it-from-the-ui)
|
|
7
|
+
- [Expose it to the assistant](#expose-it-to-the-assistant)
|
|
8
|
+
- [Known gaps](#known-gaps)
|
|
9
|
+
- [Example](#example)
|
|
10
|
+
|
|
11
|
+
## Use case
|
|
12
|
+
|
|
13
|
+
A plate carries holes, and a hole can be nudged by an offset as long as it stays on the plate. The arrow buttons of a selected hole and the AI assistant both make this change, so the rule ("stay on the plate") has to live in one place.
|
|
14
|
+
|
|
15
|
+
An **action** is that place: a named domain operation you declare once under `actions:`, implement in `src/actions/` with generated parameter and result types, and run from any control through `actionSystem.prepareAction()`. The same action is exposed to the assistant as a custom mutation by naming it under `assistant.actions`. Use an action whenever a change is more than writing one field: a swap, a move among siblings, a change that touches several entities at once.
|
|
16
|
+
|
|
17
|
+
## Declare the action
|
|
18
|
+
|
|
19
|
+
`params` and `result` are maps of named JSON schemas, with the same `phx:` refs, `references`, `tsType` and `import` as entity shapes. A param whose schema allows `null` is optional; every other param is required. A result member typed `phx:$DomainEntity` is the enhanced entity after the change.
|
|
20
|
+
|
|
21
|
+
```yaml
|
|
22
|
+
actions:
|
|
23
|
+
nudgeHole:
|
|
24
|
+
description: Moves a hole by an offset on the plate; the move fails when the hole would leave the plate
|
|
25
|
+
params:
|
|
26
|
+
holeId:
|
|
27
|
+
$ref: phx:DomainEntityId
|
|
28
|
+
references: Hole
|
|
29
|
+
description: The hole to move
|
|
30
|
+
dx:
|
|
31
|
+
type: integer
|
|
32
|
+
description: Offset along the x axis, in plate units
|
|
33
|
+
dy:
|
|
34
|
+
type: integer
|
|
35
|
+
description: Offset along the y axis, in plate units
|
|
36
|
+
result:
|
|
37
|
+
hole:
|
|
38
|
+
$ref: phx:$DomainEntity
|
|
39
|
+
references: Hole
|
|
40
|
+
description: The hole at its new position
|
|
41
|
+
plate:
|
|
42
|
+
$ref: phx:$DomainEntity
|
|
43
|
+
references: Plate
|
|
44
|
+
description: The plate after the move
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Generation derives the types `ActionTypes`, `ActionName`, `ActionParams<'nudgeHole'>` and `ActionResult<'nudgeHole'>` from it: here `ActionParams<'nudgeHole'>` is `{ holeId: Hole['id']; dx: number; dy: number }` and `ActionResult<'nudgeHole'>` is `{ hole: $Hole; plate: $Plate }`. The `description` of the action, of a param and of a result member becomes the doc comment of its generated property, so it shows in the editor wherever the action is implemented or called.
|
|
48
|
+
|
|
49
|
+
## Implement it
|
|
50
|
+
|
|
51
|
+
A file in `src/actions/` default-exports `phx.domain.implementActions({...})` with any subset of the declared actions. The implementation receives the validated parameters, the state the action runs on, and a context with the `expressionContext`, the domain `systems`, `getIdSequence()` for entities it creates and the typed `updates` factory. It returns the updates it wants applied and `readResult`, which reads the result from the state those updates produced, including whatever the transformers added. It never stages or commits anything.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// src/actions/nudge-hole.ts
|
|
55
|
+
export default phx.domain.implementActions({
|
|
56
|
+
nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
|
|
57
|
+
// `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
|
|
58
|
+
const hole = state.entities.find(entity => entity.id === holeId)
|
|
59
|
+
|
|
60
|
+
if (hole?.type !== 'Hole') {
|
|
61
|
+
throw new Error(
|
|
62
|
+
`"${holeId}" is not a hole of the plate, so it cannot be nudged. Query the plate's holes and use an id they return.`
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const x = hole.x + dx
|
|
67
|
+
const y = hole.y + dy
|
|
68
|
+
|
|
69
|
+
if (Math.abs(x) > 150 || Math.abs(y) > 150) {
|
|
70
|
+
throw new Error(
|
|
71
|
+
`Nudging "${holeId}" by (${dx}, ${dy}) would put it at (${x}, ${y}), outside the plate. Keep both coordinates between -150 and 150.`
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
updates: [updates.DomainEntityModification({ entityId: hole.id, stateDelta: { x, y }, updateTag: 'nudgeHole' })],
|
|
77
|
+
readResult: ({ state: nudged }) => ({
|
|
78
|
+
hole: domain.get$Entity(holeId, nudged),
|
|
79
|
+
plate: domain.getRoot$Entity(nudged),
|
|
80
|
+
}),
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Throw to reject a call: the message reaches the user through the control's hint and the assistant through the failed mutation, so say what went wrong and what to send instead. An action declared without an implementation, or an implementation of a name the spec does not declare, is a type error. A declared action without an implementation also stops the domain from initializing, and under `phoenix dev` the editor reports it as a `MISSING_ACTION_IMPLEMENTATIONS` diagnostic and does not apply the change; an implementation of an undeclared name is logged.
|
|
87
|
+
|
|
88
|
+
## Run it from the UI
|
|
89
|
+
|
|
90
|
+
`phx.frontend.useDomain().actionSystem.prepareAction(name, args, state)` validates `args` against the declared params and returns `{ updates, readResult }`. Hand the updates to `useUpdateControl()` like any other change: it dry-runs them for hints and commits them on click.
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
|
|
94
|
+
const { actionSystem } = phx.frontend.useDomain()
|
|
95
|
+
const state = phx.frontend.useCommittedState()
|
|
96
|
+
const prepare = phx.frontend.useUpdateControl()
|
|
97
|
+
|
|
98
|
+
const left = prepare(actionSystem.prepareAction('nudgeHole', { holeId: entityId, dx: -20, dy: 0 }, state).updates)
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Button disabled={left.disabled} title={left.hints} onClick={left.update}>
|
|
102
|
+
←
|
|
103
|
+
</Button>
|
|
104
|
+
)
|
|
105
|
+
})
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`prepareAction` throws for arguments that do not fit the params, for an unknown action and for whatever the implementation rejects, so a control that may ask for an impossible move catches the error and shows its message, as the example's control does.
|
|
109
|
+
|
|
110
|
+
## Expose it to the assistant
|
|
111
|
+
|
|
112
|
+
Naming the action under `assistant.actions` adds a `Mutation` field with one argument per param and a `<Name>Result` type whose entity members are traversable edges. `as` renames the field, `description` replaces the action's.
|
|
113
|
+
|
|
114
|
+
```yaml
|
|
115
|
+
assistant:
|
|
116
|
+
actions:
|
|
117
|
+
nudgeHole:
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```graphql
|
|
121
|
+
type Mutation {
|
|
122
|
+
nudgeHole(holeId: ID!, dx: Int!, dy: Int!): NudgeHoleResult!
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
type NudgeHoleResult {
|
|
126
|
+
hole: Hole!
|
|
127
|
+
plate: Plate!
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The field runs the same `prepareAction`, applies the updates through the same validation as every other mutation, and fails with the action's message when the call is rejected.
|
|
132
|
+
|
|
133
|
+
## Known gaps
|
|
134
|
+
|
|
135
|
+
- `references` on a `phx:DomainEntityId` param types the parameter and the GraphQL argument, but at runtime any entity id passes the params check: the implementation verifies that the id names an entity of the expected type, as the example does.
|
|
136
|
+
- Actions exist in the configurator domain only; the admin domain declares none.
|
|
137
|
+
- The result of `readResult` is not validated at runtime: the generated TypeScript type and the GraphQL coercion are the checks.
|
|
138
|
+
- The assistant cannot dry-run a custom mutation the way it dry-runs recipes and field options.
|
|
139
|
+
- `useDomain()` types `prepareAction` with the generic action map, so the name and the arguments are not checked against your `ActionTypes` at that call site; the implementation side is fully typed.
|
|
140
|
+
|
|
141
|
+
## Example
|
|
142
|
+
|
|
143
|
+
Select a hole and nudge it with the arrows. A move that would leave the plate is disabled with the action's message.
|
|
144
|
+
|
|
145
|
+
## Complete Implementation
|
|
146
|
+
|
|
147
|
+
{/* AUTO-GENERATED SECTION: This section is automatically updated by 'phoenix story build' */}
|
|
148
|
+
|
|
149
|
+
<details>
|
|
150
|
+
<summary>Click to view the complete implementation files</summary>
|
|
151
|
+
|
|
152
|
+
### ./spec/domain.yaml
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
model:
|
|
156
|
+
latest:
|
|
157
|
+
entityTypes:
|
|
158
|
+
- Plate
|
|
159
|
+
- Hole
|
|
160
|
+
aliases:
|
|
161
|
+
RootEntity:
|
|
162
|
+
- Plate
|
|
163
|
+
shapes:
|
|
164
|
+
Hole:
|
|
165
|
+
x:
|
|
166
|
+
type: number
|
|
167
|
+
y:
|
|
168
|
+
type: number
|
|
169
|
+
|
|
170
|
+
relations:
|
|
171
|
+
Plate:
|
|
172
|
+
$holes:
|
|
173
|
+
kind: allOfType
|
|
174
|
+
target: Hole
|
|
175
|
+
cardinality: 0-N
|
|
176
|
+
composedOf: true
|
|
177
|
+
Hole:
|
|
178
|
+
$plate:
|
|
179
|
+
kind: allOfType
|
|
180
|
+
target: Plate
|
|
181
|
+
cardinality: 1-1
|
|
182
|
+
composedOf: false
|
|
183
|
+
|
|
184
|
+
expressions:
|
|
185
|
+
Hole:
|
|
186
|
+
$radius:
|
|
187
|
+
type: number
|
|
188
|
+
|
|
189
|
+
# A named domain operation: declared once, implemented in src/actions/, run by the NudgeControl
|
|
190
|
+
# element and by the assistant alike.
|
|
191
|
+
actions:
|
|
192
|
+
nudgeHole:
|
|
193
|
+
description: Moves a hole by an offset on the plate; the move fails when the hole would leave the plate
|
|
194
|
+
params:
|
|
195
|
+
holeId:
|
|
196
|
+
$ref: phx:DomainEntityId
|
|
197
|
+
references: Hole
|
|
198
|
+
description: The hole to move
|
|
199
|
+
dx:
|
|
200
|
+
type: integer
|
|
201
|
+
description: Offset along the x axis, in plate units
|
|
202
|
+
dy:
|
|
203
|
+
type: integer
|
|
204
|
+
description: Offset along the y axis, in plate units
|
|
205
|
+
result:
|
|
206
|
+
hole:
|
|
207
|
+
$ref: phx:$DomainEntity
|
|
208
|
+
references: Hole
|
|
209
|
+
description: The hole at its new position
|
|
210
|
+
plate:
|
|
211
|
+
$ref: phx:$DomainEntity
|
|
212
|
+
references: Plate
|
|
213
|
+
description: The plate after the move
|
|
214
|
+
|
|
215
|
+
assistant:
|
|
216
|
+
ai:
|
|
217
|
+
provider: openai
|
|
218
|
+
model: balanced
|
|
219
|
+
reasoning: low
|
|
220
|
+
entities:
|
|
221
|
+
Plate:
|
|
222
|
+
$holes:
|
|
223
|
+
description: The holes of the plate
|
|
224
|
+
Hole:
|
|
225
|
+
x:
|
|
226
|
+
y:
|
|
227
|
+
actions:
|
|
228
|
+
nudgeHole:
|
|
229
|
+
|
|
230
|
+
presets:
|
|
231
|
+
- rootEntityType: 'Plate'
|
|
232
|
+
initialDomainEntities:
|
|
233
|
+
- id: 'Plate-1'
|
|
234
|
+
type: 'Plate'
|
|
235
|
+
- id: 'Hole-1'
|
|
236
|
+
type: 'Hole'
|
|
237
|
+
x: -60
|
|
238
|
+
y: 40
|
|
239
|
+
- id: 'Hole-2'
|
|
240
|
+
type: 'Hole'
|
|
241
|
+
x: 70
|
|
242
|
+
y: -50
|
|
243
|
+
|
|
244
|
+
components:
|
|
245
|
+
Plate:
|
|
246
|
+
applicationConfig:
|
|
247
|
+
main:
|
|
248
|
+
layout: 'universal'
|
|
249
|
+
staticPerspectiveCamera:
|
|
250
|
+
main:
|
|
251
|
+
distance: 400
|
|
252
|
+
priority: 1
|
|
253
|
+
polarAngle: 1.2
|
|
254
|
+
azimuthAngle: -0.2
|
|
255
|
+
sceneEntityProperties:
|
|
256
|
+
main:
|
|
257
|
+
offsetX: -100
|
|
258
|
+
offsetY: -100
|
|
259
|
+
offsetZ: -10
|
|
260
|
+
sceneEntityObject:
|
|
261
|
+
Plate:
|
|
262
|
+
object:
|
|
263
|
+
$read: $render
|
|
264
|
+
detail:
|
|
265
|
+
main:
|
|
266
|
+
title: 'Plate'
|
|
267
|
+
subtitle: 'A plate with holes'
|
|
268
|
+
description: 'Select a hole to nudge it.'
|
|
269
|
+
Hole:
|
|
270
|
+
sceneEntityProperties:
|
|
271
|
+
main:
|
|
272
|
+
offsetX:
|
|
273
|
+
$read: x
|
|
274
|
+
offsetY:
|
|
275
|
+
$read: y
|
|
276
|
+
sceneEntitySelectHotspot:
|
|
277
|
+
main:
|
|
278
|
+
offsetX: 15
|
|
279
|
+
offsetY: 15
|
|
280
|
+
offsetZ: 30
|
|
281
|
+
detail:
|
|
282
|
+
main:
|
|
283
|
+
title: 'Hole'
|
|
284
|
+
subtitle: 'A hole in the plate'
|
|
285
|
+
description: 'Nudge it with the arrows; a hole cannot leave the plate.'
|
|
286
|
+
propertyPage:
|
|
287
|
+
main:
|
|
288
|
+
children:
|
|
289
|
+
- kind: propertyContainerGroup
|
|
290
|
+
props:
|
|
291
|
+
spacing: large
|
|
292
|
+
children:
|
|
293
|
+
- kind: customElement
|
|
294
|
+
props:
|
|
295
|
+
name: NudgeControl
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### ./src/actions/nudge-hole.ts
|
|
299
|
+
|
|
300
|
+
```ts
|
|
301
|
+
import { phx } from '../../.phoenix/phx.js'
|
|
302
|
+
|
|
303
|
+
/** How far a hole may sit from the plate's center on either axis, in plate units. */
|
|
304
|
+
const REACH = 150
|
|
305
|
+
|
|
306
|
+
export default phx.domain.implementActions({
|
|
307
|
+
nudgeHole: ({ holeId, dx, dy }, state, { systems: { domain }, updates }) => {
|
|
308
|
+
// `references: Hole` types the id, but any entity id passes the runtime check, so the entity is verified here.
|
|
309
|
+
const hole = state.entities.find(entity => entity.id === holeId)
|
|
310
|
+
|
|
311
|
+
if (hole?.type !== 'Hole') {
|
|
312
|
+
throw new Error(
|
|
313
|
+
`"${holeId}" is not a hole of the plate, so it cannot be nudged. Query the plate's holes and use an id they return.`
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const x = hole.x + dx
|
|
318
|
+
const y = hole.y + dy
|
|
319
|
+
|
|
320
|
+
if (Math.abs(x) > REACH || Math.abs(y) > REACH) {
|
|
321
|
+
throw new Error(
|
|
322
|
+
`Nudging "${holeId}" by (${dx}, ${dy}) would put it at (${x}, ${y}), outside the plate. Keep both coordinates between ${-REACH} and ${REACH}.`
|
|
323
|
+
)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return {
|
|
327
|
+
updates: [updates.DomainEntityModification({ entityId: hole.id, stateDelta: { x, y }, updateTag: 'nudgeHole' })],
|
|
328
|
+
readResult: ({ state: nudged }) => ({
|
|
329
|
+
hole: domain.get$Entity(holeId, nudged),
|
|
330
|
+
plate: domain.getRoot$Entity(nudged),
|
|
331
|
+
}),
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
})
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### ./src/elements/NudgeControl.tsx
|
|
338
|
+
|
|
339
|
+
```tsx
|
|
340
|
+
import { Button, Stack } from '@mui/material'
|
|
341
|
+
|
|
342
|
+
import { PropertyContainer } from '@salsita-ai/sdk/ui'
|
|
343
|
+
|
|
344
|
+
import { phx } from '../../.phoenix/phx.js'
|
|
345
|
+
|
|
346
|
+
const STEP = 20
|
|
347
|
+
|
|
348
|
+
/** Nudges the selected hole with the same `nudgeHole` action the assistant calls, one step at a time. */
|
|
349
|
+
export default phx.frontend.createCustomPhoenixEntityElement('NudgeControl', ({ entityId }) => {
|
|
350
|
+
const { actionSystem } = phx.frontend.useDomain()
|
|
351
|
+
const state = phx.frontend.useCommittedState()
|
|
352
|
+
const prepare = phx.frontend.useUpdateControl()
|
|
353
|
+
const hole = state.entities.find(entity => entity.id === entityId)
|
|
354
|
+
|
|
355
|
+
if (hole?.type !== 'Hole') {
|
|
356
|
+
return <></>
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// An action throws when the move leaves the plate; the button for that direction is then disabled with the message.
|
|
360
|
+
const nudge = (dx: number, dy: number) => {
|
|
361
|
+
try {
|
|
362
|
+
return prepare(actionSystem.prepareAction('nudgeHole', { holeId: hole.id, dx, dy }, state).updates)
|
|
363
|
+
} catch (error) {
|
|
364
|
+
return { disabled: true, hints: error instanceof Error ? error.message : String(error), update: () => {} }
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const directions = [
|
|
369
|
+
{ label: '←', dx: -STEP, dy: 0 },
|
|
370
|
+
{ label: '→', dx: STEP, dy: 0 },
|
|
371
|
+
{ label: '↑', dx: 0, dy: STEP },
|
|
372
|
+
{ label: '↓', dx: 0, dy: -STEP },
|
|
373
|
+
]
|
|
374
|
+
|
|
375
|
+
return (
|
|
376
|
+
<PropertyContainer.Item title="Nudge" description={`Moves the hole by ${STEP} units.`}>
|
|
377
|
+
<Stack direction="row" spacing={1}>
|
|
378
|
+
{directions.map(({ label, dx, dy }) => {
|
|
379
|
+
const control = nudge(dx, dy)
|
|
380
|
+
|
|
381
|
+
return (
|
|
382
|
+
<Button
|
|
383
|
+
key={label}
|
|
384
|
+
variant="outlined"
|
|
385
|
+
disabled={control.disabled}
|
|
386
|
+
title={control.hints ?? undefined}
|
|
387
|
+
onClick={event => {
|
|
388
|
+
event.stopPropagation()
|
|
389
|
+
control.update()
|
|
390
|
+
}}
|
|
391
|
+
>
|
|
392
|
+
{label}
|
|
393
|
+
</Button>
|
|
394
|
+
)
|
|
395
|
+
})}
|
|
396
|
+
</Stack>
|
|
397
|
+
</PropertyContainer.Item>
|
|
398
|
+
)
|
|
399
|
+
})
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### ./src/expressions/plate.ts
|
|
403
|
+
|
|
404
|
+
```ts
|
|
405
|
+
import { createPlate } from '../../../../common/plate-rendering.js'
|
|
406
|
+
import { phx } from '../../.phoenix/phx.js'
|
|
407
|
+
|
|
408
|
+
export default phx.domain.implementCustomExpressions({
|
|
409
|
+
Hole: {
|
|
410
|
+
$radius: () => 10,
|
|
411
|
+
},
|
|
412
|
+
Plate: {
|
|
413
|
+
$render: plate => createPlate({ features: plate.$holes }),
|
|
414
|
+
},
|
|
415
|
+
})
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
</details>
|
|
@@ -421,7 +421,7 @@ export const handler = webhookBuilder
|
|
|
421
421
|
|
|
422
422
|
The publishing workflow validates admin state, transforms entities, and stores JSON to S3. Configurators access published data via `ctx.publishedData` in expressions.
|
|
423
423
|
|
|
424
|
-
For implementation examples, see `packages/demos/demo-
|
|
424
|
+
For implementation examples, see `packages/demos/demo-catalog-builder/src/handlers/map-published-chunked-data.ts`.
|
|
425
425
|
|
|
426
426
|
For technical details about data transformation and storage, see [Data Sources - Published Data](?path=/docs/phoenix-data-sources--docs#published-data).
|
|
427
427
|
|
|
@@ -515,4 +515,4 @@ Ready to implement admin functionality in your Phoenix project? Here's what to e
|
|
|
515
515
|
- **[Sessions and Access](?path=/docs/phoenix-sessions-and-access--docs)** - Understand admin authentication and permissions
|
|
516
516
|
- **[Connected Data Sources](?path=/docs/phoenix-connected-data-sources--docs)** - Wire `$data` entries to Google Sheets or Excel; requires the embedded admin mode
|
|
517
517
|
|
|
518
|
-
For hands-on examples, check out the
|
|
518
|
+
For hands-on examples, check out the Catalog Builder demo (`packages/demos/demo-catalog-builder/`), which shows spec-driven admin pages over connected and generated data, custom catalog pages beside them, admin model migrations, and the publishing workflow.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
1. **YAML is king** - 99% of configuration should be in spec/\*.yaml files
|
|
6
6
|
2. **Custom code locations** (in order of preference):
|
|
7
7
|
- `src/expressions/` - Computed/derived properties
|
|
8
|
+
- `src/actions/` - Named domain operations declared under `actions:`
|
|
8
9
|
- `src/invariants/` - Business rule constraints
|
|
9
10
|
- `src/transformers/` - Automatic state fixers
|
|
10
11
|
- `src/handlers/` - Event & lifecycle handlers
|
|
@@ -355,4 +355,4 @@ Now that you understand finalization workflows, explore these related topics:
|
|
|
355
355
|
- **[Admin](?path=/docs/phoenix-admin--docs)** - Learn about admin finalization and published data generation
|
|
356
356
|
- **[Best Practices](?path=/docs/phoenix-best-practices--docs)** - Follow proven patterns for finalization implementation
|
|
357
357
|
|
|
358
|
-
For hands-on practice, explore the
|
|
358
|
+
For hands-on practice, explore the Precision demo (`packages/demos/demo-precision/`) for finalization resources — PDF, CSV, images, email attachments and callbacks — and the Catalog Builder demo (`packages/demos/demo-catalog-builder/`) for the finalization data lifecycle and access links.
|
|
@@ -51,11 +51,11 @@ For details on the server-side token exchange, see [Authentication](?path=/docs/
|
|
|
51
51
|
|
|
52
52
|
The `power` attribute controls the configurator's state:
|
|
53
53
|
|
|
54
|
-
| Value | Behavior
|
|
55
|
-
| ----------- |
|
|
56
|
-
| `"off"` | Completely inactive. No rendering, no session, no network requests beyond loading the bundle.
|
|
57
|
-
| `"standby"` | Session initialized
|
|
58
|
-
| `"on"` | Fully active and visible.
|
|
54
|
+
| Value | Behavior |
|
|
55
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
56
|
+
| `"off"` | Completely inactive. No rendering, no session, no network requests beyond loading the bundle. |
|
|
57
|
+
| `"standby"` | Session initialized and any textures listed in `resourcesConfig.prefetchTextureUrls` prefetched; nothing is rendered and no models are loaded. Faster power-on, but consumes bandwidth and counts toward session quotas. |
|
|
58
|
+
| `"on"` | Fully active and visible. |
|
|
59
59
|
|
|
60
60
|
A typical flow: power on at login (`"standby"`), then toggle between `"on"` and `"standby"` as the user opens and closes the configurator. Use `"off"` only before the user has authenticated.
|
|
61
61
|
|
|
@@ -28,11 +28,11 @@ The configurator fills its parent container. Set a height on the element or a wr
|
|
|
28
28
|
|
|
29
29
|
The `power` attribute controls whether the configurator is active. It accepts three values:
|
|
30
30
|
|
|
31
|
-
| Value | Behavior
|
|
32
|
-
| ----------- |
|
|
33
|
-
| `"off"` | Configurator is completely inactive. No rendering, no session initialization, no network requests beyond loading the bundle. Lowest resource usage.
|
|
34
|
-
| `"standby"` | Configurator initializes its session and
|
|
35
|
-
| `"on"` | Configurator is fully active and visible.
|
|
31
|
+
| Value | Behavior |
|
|
32
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| `"off"` | Configurator is completely inactive. No rendering, no session initialization, no network requests beyond loading the bundle. Lowest resource usage. |
|
|
34
|
+
| `"standby"` | Configurator initializes its session and prefetches any textures listed in `resourcesConfig.prefetchTextureUrls`, but does not render or load models. Subsequent power-on is faster, but consumes bandwidth and counts toward monthly session quotas. |
|
|
35
|
+
| `"on"` | Configurator is fully active and visible. |
|
|
36
36
|
|
|
37
37
|
### Choosing the Initial Power
|
|
38
38
|
|
|
@@ -327,15 +327,49 @@ as restart-required unless their feature documentation explicitly states live-up
|
|
|
327
327
|
|
|
328
328
|
Builds the project for production deployment.
|
|
329
329
|
|
|
330
|
-
| Flag
|
|
331
|
-
|
|
|
332
|
-
| `--onlyFrontend`
|
|
333
|
-
| `--onlyWebhook`
|
|
334
|
-
| `--force` / `-f`
|
|
335
|
-
| `--
|
|
330
|
+
| Flag | Env Variable | Default | Description |
|
|
331
|
+
| ----------------- | --------------- | ------- | --------------------------------------------------- |
|
|
332
|
+
| `--onlyFrontend` | — | — | Build only the frontend bundle |
|
|
333
|
+
| `--onlyWebhook` | — | — | Build only webhooks |
|
|
334
|
+
| `--force` / `-f` | `FORCE_REBUILD` | `false` | Force full rebuild, skip cache |
|
|
335
|
+
| `--banner <text>` | — | — | Replaces the application line of the banner comment |
|
|
336
|
+
| `--debug` | `DEBUG` | `false` | Verbose logging |
|
|
336
337
|
|
|
337
338
|
The build target can also be controlled via `BUILD_TARGET` env (`frontend`, `webhook`, or `both`).
|
|
338
339
|
|
|
340
|
+
#### Banner comment
|
|
341
|
+
|
|
342
|
+
Every JavaScript file the frontend build emits (the configurator, admin and embedded bundles, and the editor's entry and lazy chunks) starts with a comment that identifies the build, so `head -n 5 <bundle.js>` tells two deployed bundles of nearly the same size apart:
|
|
343
|
+
|
|
344
|
+
```js
|
|
345
|
+
/*!
|
|
346
|
+
* App version: 1.2.3; Commit: 9fd79ce0f4c1a2b3d4e5f60718293a4b5c6d7e8f
|
|
347
|
+
* Built with Salsita SDK 3.4.0. Copyright (c) Salsita s.r.o. All rights reserved.
|
|
348
|
+
* Third-party licences: THIRD-PARTY-LICENSES.txt
|
|
349
|
+
*/
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
The first line is the application's. By default it holds `applicationVersion` from `spec/application.yaml` and the commit checked out in the project, read with `git rev-parse HEAD`. Where git cannot read a commit for the project (no checkout, git missing or refusing the repository, or the project's `package.json` is not tracked by the repository around it), the line holds the version only and `--debug` logs it; this is the case for a platform build from uploaded sources.
|
|
353
|
+
|
|
354
|
+
`--banner <text>` replaces that line with your own text, for example when CI knows a release name the spec does not:
|
|
355
|
+
|
|
356
|
+
```sh
|
|
357
|
+
pnpm phoenix build --banner "Release: ${RELEASE_NAME}; Commit: ${COMMIT_SHA}"
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
The line is **public**: it ships in every bundle. The default publishes the application version and the commit SHA; pass `--banner ""` to leave the line out, and never put a secret or internal detail in your own text. The text is written as comment text only. Each line of a multi-line value (or each repeated `--banner`) becomes its own comment line and `*/` is written as `*\/`. There is no environment-variable fallback, and the option has no effect on webhook output or with `--onlyWebhook`. Lazy chunks keep their hashed file name when only the banner text changes.
|
|
361
|
+
|
|
362
|
+
The banner and the licences file below are produced by the application-spec pipeline; the legacy pipeline's build ignores `--banner`.
|
|
363
|
+
|
|
364
|
+
#### Third-party licences
|
|
365
|
+
|
|
366
|
+
The frontend build writes `.phoenix/dist/frontend/THIRD-PARTY-LICENSES.txt` next to the bundles and the banner comment points to it. It lists every third-party package whose code or styles are in any of the frontend bundles, once each, sorted by name and version, with the package's version, the licence declared in its `package.json` and the text of its licence file (`LICENSE*`, `LICENCE*` or `COPYING*`). A package that ships no licence file is listed without the text. Your project's own source is not listed.
|
|
367
|
+
|
|
368
|
+
Deploy the file together with the bundles, so the notices those licences ask for travel with every copy. The build lists licences; it does not judge whether a licence suits your product. Two kinds of package are not in the list, so add their notices yourself when you use them:
|
|
369
|
+
|
|
370
|
+
- packages used only inside a web worker, which are bundled separately;
|
|
371
|
+
- packages a stylesheet reaches on its own, through CSS `@import`, Sass `@use` or `url()`. A stylesheet imported from JavaScript or TypeScript (`import 'some-font/index.css'`) is listed.
|
|
372
|
+
|
|
339
373
|
#### Bundle-size budgets
|
|
340
374
|
|
|
341
375
|
Application-spec projects can set gzip-size limits for the standalone configurator and webhook bundles. Add the optional `budgets` section to a spec YAML file:
|
|
@@ -596,26 +630,30 @@ Revokes the token on the server and removes it from the credentials file. `--reg
|
|
|
596
630
|
|
|
597
631
|
Validates the spec, adds the pnpm settings `phoenix init` writes to `pnpm-workspace.yaml` when they are missing, packs and uploads the project, starts its build on the server and follows it until the configurator is live. Before the upload the server compares the domain model with the deployed one: a model that changed under an already deployed model version is refused with the reason, and needs a new model version and a [migration](?path=/docs/phoenix-migrations--docs). Once the build starts it prints `Follow the build in Studio: <url>`, the build's page in the Studio you signed in through; a sign-in stored by an older CLI has no Studio URL, so sign in again to get the link. `--region` or `--serverUrl` selects the server, as for `login`; `--no-wait` returns as soon as the build starts.
|
|
598
632
|
|
|
599
|
-
### `phoenix feedback
|
|
633
|
+
### `phoenix feedback [message]`
|
|
600
634
|
|
|
601
635
|
Sends feedback about the SDK, the CLI, the documentation or Studio to the Phoenix team. It needs `phoenix login`: the server records the workspace, user and API token of the sign-in, so the message itself needs no introduction.
|
|
602
636
|
|
|
603
637
|
```bash
|
|
604
638
|
phoenix feedback "phoenix build reports a missing entity when a module file is empty" --type bug
|
|
639
|
+
phoenix feedback --file report.txt --type bug
|
|
605
640
|
```
|
|
606
641
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
|
610
|
-
|
|
|
611
|
-
| `--
|
|
612
|
-
| `--
|
|
613
|
-
| `--
|
|
614
|
-
| `--
|
|
642
|
+
Pass the message as the argument for a short note, or `--file` for a longer report: the content of the file is the message, read as UTF-8, so quotes, backticks and new lines arrive unchanged. Giving both, or neither, is an error.
|
|
643
|
+
|
|
644
|
+
| Flag | Env | Default | Description |
|
|
645
|
+
| ---------------------- | -------------- | ----------------------------- | --------------------------------------------------------- |
|
|
646
|
+
| `--file` | — | — | Text file that holds the message, instead of the argument |
|
|
647
|
+
| `--type` | — | `other` | What the feedback is about: `bug`, `idea` or `other` |
|
|
648
|
+
| `--contact` | — | — | How to reach you, when you want a reply |
|
|
649
|
+
| `--agent` | — | — | Name of the coding agent that writes the feedback |
|
|
650
|
+
| `--projectSlug` / `-p` | `PROJECT_SLUG` | `project` of the spec, if any | Workspace project the feedback is about |
|
|
651
|
+
| `--region` | — | `eu` | Phoenix region of the workspace: `eu` or `us` |
|
|
652
|
+
| `--serverUrl` / `-su` | — | the region's server | Phoenix server URL, for a local or custom server |
|
|
615
653
|
|
|
616
|
-
A message holds at most
|
|
654
|
+
A message holds at most 100,000 characters, from the argument or from the file. Besides the message and the flags, the CLI sends only the SDK version, the operating system and the Node.js version; no file of the project is attached, and the Phoenix team reads a build's sources through the build's page in Studio. The project must belong to the signed-in workspace, otherwise the server refuses the feedback; without a project, the feedback is sent on its own.
|
|
617
655
|
|
|
618
|
-
Generated projects carry the `phoenix-feedback` agent skill. It tells coding agents when to draft feedback, to show you the draft and send it only after you approve it, and what
|
|
656
|
+
Generated projects carry the `phoenix-feedback` agent skill. It tells coding agents when to draft feedback, to show you the draft and send it only after you approve it, and how to write a report: the build id with its Studio page link, the live configurator link, what the agent was doing, what happened and what was expected, the exact error or output, the workaround and a condensed conversation log. When you say you are done, or a deploy went live and you confirm the run is finished, the agent asks you to evaluate the run, one question at a time: minutes spent, then a score from 0 to 10 for the agent's guidance, the configurator's functionality, its UX, the quality of the 3D, the UI visuals and the overall result, then your comments. It never picks a score for you and sends nothing when you decline. Secrets, credentials and personal data never go into a message; file paths, spec and code snippets and your own words may, once you approved the draft that contains them. The command needs a server with API 1.40.0 or newer; a message over 5000 characters needs API 1.43.0 or newer.
|
|
619
657
|
|
|
620
658
|
## Next Steps
|
|
621
659
|
|
|
@@ -40,6 +40,7 @@ project-root/
|
|
|
40
40
|
| `components/` | Phoenix system components (ECS) |
|
|
41
41
|
| `elements/` | Page elements (pages, providers) |
|
|
42
42
|
| `expressions/` | Domain logic expressions |
|
|
43
|
+
| `actions/` | Implementations of the domain actions declared under `actions:` |
|
|
43
44
|
| `invariants/` | Domain constraints |
|
|
44
45
|
| `transformers/` | Data transformation logic |
|
|
45
46
|
| `handlers/` | Event & lifecycle handlers |
|
|
@@ -249,6 +250,7 @@ project-root/
|
|
|
249
250
|
│ ├── components/ # Phoenix system components (ECS)
|
|
250
251
|
│ ├── elements/ # UI elements (pages, providers)
|
|
251
252
|
│ ├── expressions/ # Domain logic expressions
|
|
253
|
+
│ ├── actions/ # Domain action implementations
|
|
252
254
|
│ ├── invariants/ # Domain constraints
|
|
253
255
|
│ ├── transformers/ # Data transformation logic
|
|
254
256
|
│ ├── handlers/ # Event & lifecycle handlers
|
|
@@ -362,6 +364,7 @@ Domain logic files define the business rules and computed properties of your con
|
|
|
362
364
|
| Purpose | Location | Example Files |
|
|
363
365
|
| ------------ | ------------------- | ---------------------------------------------- |
|
|
364
366
|
| Expressions | `src/expressions/` | `table.ts`, `legs.ts`, `module.ts` |
|
|
367
|
+
| Actions | `src/actions/` | `move-part.ts`, `swap-cabinets.ts` |
|
|
365
368
|
| Invariants | `src/invariants/` | `top.ts`, `legs.ts` |
|
|
366
369
|
| Transformers | `src/transformers/` | `fix-table-top-material-update-transformer.ts` |
|
|
367
370
|
| Migrations | `src/migrations/` | `v2.ts`, `v3.ts`, `v4.ts` |
|
|
@@ -510,7 +513,7 @@ The `application.yaml` file contains global application-level settings. These fi
|
|
|
510
513
|
| Field | Type | Description |
|
|
511
514
|
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
512
515
|
| `project` | `string` | Server project `phoenix dev` develops in: a project slug, or `default` for the default project of the signed-in workspace. Read only by the CLI; overridden by `--projectSlug` and `PROJECT_SLUG` |
|
|
513
|
-
| `applicationVersion` | `string` | Semantic version (`x.y.z`) exported as `ApplicationVersion` constant
|
|
516
|
+
| `applicationVersion` | `string` | Semantic version (`x.y.z`) exported as `ApplicationVersion` constant, stored on the deployment record and named in the banner comment of built bundles |
|
|
514
517
|
| `webComponentTag` | `string` | Custom HTML web component tag name for embedding |
|
|
515
518
|
| `pageTitle` | `string` | Browser page title |
|
|
516
519
|
|
|
@@ -94,9 +94,10 @@ Studio's **Builds & deployments** page lists your builds and shows which one you
|
|
|
94
94
|
Tell us what is broken, confusing or missing, from wherever you are:
|
|
95
95
|
|
|
96
96
|
- In Studio, **Send beta feedback** in the sidebar opens a short form.
|
|
97
|
-
- In the terminal, `pnpm phoenix feedback "<message>" --type bug|idea|other` sends it with your sign-in. See the [CLI reference](?path=/docs/phoenix-phoenix-cli--docs).
|
|
97
|
+
- In the terminal, `pnpm phoenix feedback "<message>" --type bug|idea|other` sends it with your sign-in, and `--file <path>` sends a text file instead of the argument. See the [CLI reference](?path=/docs/phoenix-phoenix-cli--docs).
|
|
98
|
+
- On a build's page in Studio, **Download sources** downloads the archive `phoenix deploy` uploaded for that build, so a report only needs to name the build.
|
|
98
99
|
|
|
99
|
-
Coding agents working in your project use the same command, guided by the generated `phoenix-feedback` skill. They never send on their own: an agent shows you a draft, right away when the problem is crucial and otherwise at the end of the task, and sends it only after you approve it.
|
|
100
|
+
Coding agents working in your project use the same command, guided by the generated `phoenix-feedback` skill. They never send on their own: an agent shows you a draft, right away when the problem is crucial and otherwise at the end of the task, and sends it only after you approve it. A report names the build with its Studio page link and the live configurator, says what the agent was doing, what happened and what it expected, quotes the exact error and ends with a condensed conversation log. Agents are told never to include secrets, credentials or personal data; parts of your project and your own words go in only through a draft you approved. When you are done with the configurator, the agent also asks you, once per conversation, to evaluate the run: minutes spent, then scores from 0 to 10 for the agent's guidance, functionality, UX, 3D quality, UI visuals and the overall result, and your comments. It asks one question at a time, never picks a score for you, tells you the answers go to the Phoenix team, shows the message and sends it only after you approve it.
|
|
100
101
|
|
|
101
102
|
## Known limits
|
|
102
103
|
|