Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2961fea
verify_scene names walls that nearly join: an end short of a wall, a …
AxiomeCG Nov 2, 2026
a0906d3
verify_scene names two rooms on one floor and floor no zone claims
AxiomeCG Nov 2, 2026
3969621
set_code_profile: which building code a project follows
AxiomeCG Nov 2, 2026
aa90429
Usage checks: passages, pockets, clashes, door swings and wall object…
AxiomeCG Nov 2, 2026
cb9250c
verify_scene names the surfaces a room owes: tile, skirting, a floor,…
AxiomeCG Nov 2, 2026
34b907a
Item and door clearance findings name the figures, and stop naming wh…
AxiomeCG Nov 2, 2026
64c82ab
verify_scene names a room no walk from outside reaches
AxiomeCG Nov 2, 2026
2426e86
verify_scene groups what it finds, and the model reads the usage find…
AxiomeCG Nov 2, 2026
61be6d1
verify_scene's description names the room checks
AxiomeCG Nov 2, 2026
915ee0c
run_batch checks each call under the batch's own refusal policy
AxiomeCG Nov 2, 2026
f83cfd5
The room checks name no tool this repository lacks
AxiomeCG Nov 2, 2026
2ce38b9
The design brief reads the request axis by axis, form, facade and roo…
AxiomeCG Nov 2, 2026
0927ca4
The brief's docs say form, facade and rooms, and the tags decide what…
AxiomeCG Nov 2, 2026
dcd3e86
A facade revised to a plainer treatment informs
AxiomeCG Nov 2, 2026
a6839bb
A bed head against a window is no finding at all
AxiomeCG Nov 2, 2026
c6f7407
item_mid_room names the piece by its kind and lets sofas and stools f…
AxiomeCG Nov 2, 2026
632dda0
A flight of three risers or fewer has no going or comfort target
AxiomeCG Nov 2, 2026
2135dfb
A bed with its bedside tables is read along its own head-to-foot axis…
AxiomeCG Nov 2, 2026
a645ffc
The turning-circle finding informs, exact outline or not
AxiomeCG Nov 2, 2026
6001d8b
The building package exports the code table
AxiomeCG Nov 2, 2026
b78ad9a
The agent operations export the room check codes
AxiomeCG Nov 2, 2026
7d4b4cf
The agent operations export the room reader
AxiomeCG Nov 2, 2026
d02bfe0
move_node and duplicate_node: the editor's move and duplicate as shar…
AxiomeCG Nov 2, 2026
6c8772c
The OpenAI tool annotation policy lists set_code_profile, move_node a…
AxiomeCG Nov 2, 2026
798c6bf
author_scene's description states the output limit and that a payload…
AxiomeCG Nov 2, 2026
17e22aa
The pascal-3d workflow states the output limit and that the payload i…
AxiomeCG Nov 2, 2026
3557dee
The pascal-3d skill's author_scene paragraph states facts, not an order
AxiomeCG Nov 2, 2026
7bff976
author_scene's description states what a conversion stores and what a…
AxiomeCG Nov 3, 2026
23fe507
A probation list withholds usage_wall_object_protrudes from verify_scene
AxiomeCG Nov 3, 2026
a52c524
verify_scene drops a whole-room pocket that room_unreachable already …
AxiomeCG Nov 3, 2026
829703b
A doorway limited only by a standard door leaf informs
AxiomeCG Nov 3, 2026
d82c95b
usage_clash: an approximate outline warns from 12 cm
AxiomeCG Nov 3, 2026
fca9219
usage_clash: a bed against a window sill or frame is no finding
AxiomeCG Nov 3, 2026
e220880
Merge upstream/main into the delivery branch
AxiomeCG Nov 3, 2026
67afcff
Move the wall-object check out: usage_wall_object_protrudes and its p…
AxiomeCG Nov 3, 2026
bfe2a50
Move the two wall-face checks out: walls_outside_finish_inside and ro…
AxiomeCG Nov 3, 2026
673923e
Move the brief's end-of-turn findings out: form read-back, revisions …
AxiomeCG Nov 3, 2026
eed3cdf
design_brief: form and facade are optional, and their absence is no l…
AxiomeCG Nov 3, 2026
622ee8d
Move set_code_profile out, with the Australian and French rows only i…
AxiomeCG Nov 3, 2026
d002a8d
catalogue-shapes.ts: one line per polygon, the same data
AxiomeCG Nov 3, 2026
e490b8a
move-duplicate.test.ts imports the MCP SDK v2 packages
AxiomeCG Nov 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/editor/lib/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
nodeRegistry,
registerNode,
} from '@pascal-app/core'
import { sdfChecksFromEnv, setSdfChecks } from '@pascal-app/core/usage-field'
import { registerEditorHostPanel } from '@pascal-app/editor'
import { builtinPlugin } from '@pascal-app/nodes'
import { bonesHostPanel, bonesPlugin } from '@pascal-app/plugin-bones'
Expand All @@ -19,6 +20,10 @@ import { treesHostPanel, treesPlugin } from '@pascal-app/plugin-trees'
import { registerViewerPresentation } from '@pascal-app/viewer'
import { webXRHostPanel, webXRPlugin } from '@webxr/plugin'

// Usage checks (passages, turning circles, flow widths) are off unless the build says so; Next
// inlines the NEXT_PUBLIC_ mirror of the server's PASCAL_SDF_CHECKS.
setSdfChecks(sdfChecksFromEnv(process.env.NEXT_PUBLIC_PASCAL_SDF_CHECKS))

// Idempotency guards: HMR can reload this module, but `registerNode`
// throws on duplicate kinds. Flags live in the module closure so they
// reset on a hard reload but survive within a session.
Expand Down
5 changes: 5 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"import": "./dist/registry/index.js",
"default": "./dist/registry/index.js"
},
"./usage-field": {
"types": "./dist/spatial/usage-field/index.d.ts",
"import": "./dist/spatial/usage-field/index.js",
"default": "./dist/spatial/usage-field/index.js"
},
"./zone-colors": {
"types": "./dist/lib/zone-colors.d.ts",
"import": "./dist/lib/zone-colors.js",
Expand Down
588 changes: 521 additions & 67 deletions packages/core/src/agent-operations/__fixtures__/design-brief-cases.ts

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions packages/core/src/agent-operations/__fixtures__/dressing-scenes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import { building, graph, storey } from '../../coherence/__fixtures__/enclosure-scenes'
import { type AnyNode, ItemNode, WallNode, ZoneNode } from '../../schema'

/**
* Two rooms side by side for the room-dressing rules, with a wall that both look at: a salon
* (zone_salon, 0..4 m) and a bath (zone_bath, 4..8 m), 3 m deep, walls 2.5 m high. The south wall
* runs the whole 8 m, so a stretch of one face belongs to each room; the partition wall_p has a room
* on each of its faces. Plan axes: x east, z south.
*
* wall_w 0,3 -> 0,0 salon wall_s 0,0 -> 8,0 both (t 0..0.5 salon, 0.5..1 bath)
* wall_an 4,3 -> 0,3 salon wall_p 4,0 -> 4,3 both
* wall_e 8,0 -> 8,3 bath wall_bn 8,3 -> 4,3 bath
*/

export const WALL_HEIGHT = 2.5

type Pt = [number, number]

export const SALON: Pt[] = [
[0, 0],
[4, 0],
[4, 3],
[0, 3],
]
export const BATH: Pt[] = [
[4, 0],
[8, 0],
[8, 3],
[4, 3],
]

const WALLS: [id: string, start: Pt, end: Pt][] = [
['wall_s', [0, 0], [8, 0]],
['wall_p', [4, 0], [4, 3]],
['wall_an', [4, 3], [0, 3]],
['wall_w', [0, 3], [0, 0]],
['wall_e', [8, 0], [8, 3]],
['wall_bn', [8, 3], [4, 3]],
]

export type DressingOptions = {
/** Fields merged into walls by id before they are parsed (a hand-drawn region, a trim, a curtain wall). */
walls?: Record<string, Record<string, unknown>>
/** Fields set on walls by id as they are, past the schema (a face script is too large to build). */
raw?: Record<string, Record<string, unknown>>
/** Items standing in the level, by id: [category, plan x, plan z, size w, d] */
items?: Record<string, [category: string, x: number, z: number, width: number, depth: number, name?: string]>
/** Fields merged into the rooms by id before they are parsed (a wall finish for the room). */
zones?: Record<string, Record<string, unknown>>
/** Nodes added as they are (a cabinet run and its modules). */
extra?: AnyNode[]
}

export function twoRooms({
walls = {},
raw = {},
zones = {},
items = {},
extra = [],
}: DressingOptions = {}) {
const nodes: AnyNode[] = [building(), storey(3)]
for (const [id, start, end] of WALLS)
nodes.push({
...WallNode.parse({
id,
parentId: 'level_0',
start,
end,
height: WALL_HEIGHT,
thickness: 0.1,
...walls[id],
}),
...raw[id],
} as AnyNode)
nodes.push(
ZoneNode.parse({
id: 'zone_salon',
parentId: 'level_0',
name: 'Salon',
polygon: SALON,
spaceRole: 'room',
boundaryWallIds: ['wall_s', 'wall_p', 'wall_an', 'wall_w'],
...zones.zone_salon,
}),
ZoneNode.parse({
id: 'zone_bath',
parentId: 'level_0',
name: 'Salle de bains',
polygon: BATH,
spaceRole: 'room',
boundaryWallIds: ['wall_s', 'wall_e', 'wall_bn', 'wall_p'],
...zones.zone_bath,
}),
)
for (const [id, [category, x, z, width, depth, name]] of Object.entries(items))
nodes.push(
ItemNode.parse({
id,
parentId: 'level_0',
name: name ?? category,
position: [x, 0, z],
asset: {
id: `asset_${id}`,
category,
name: name ?? category,
thumbnail: '',
src: 'https://example.com/x.glb',
dimensions: [width, 2, depth],
},
}),
)
return graph(...nodes, ...extra)
}
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ export const NOT_LENGTHS = new Set([
'author_scene.payload.levels[].lights[].intensity',
'author_scene.payload.levels[].lights[].softness',
'author_scene.payload.levels[].lights[].glow.strength',
// move_node reads its sill/bottom height in metres and its yaw in degrees, as its description
// says; the one notation (N1) is still owed on them.
'move_node.y',
'move_node.rotation',
// Coordinates, in level metres.
'add_column.x',
'add_column.y',
Expand Down
188 changes: 188 additions & 0 deletions packages/core/src/agent-operations/__fixtures__/room-check-scenes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
import { building, graph, rectangleWalls, storey } from '../../coherence/__fixtures__/enclosure-scenes'
import { type AnyNode, CeilingNode, ItemNode, SlabNode, WallNode, ZoneNode } from '../../schema'

/**
* Houses of rooms side by side, for the room checks: each room is four walls, its zone, the floor
* plate under it and the pieces standing in it. A room is what a check reads: a name, a floor and a wall finish, whether
* its walls carry skirting, and the pieces as [category, design] (a catalog item) with, for an item an
* agent authored, the script that made it and its size, finishes and name.
*/

/** An item an agent authored: the script that made it, which a copy for another room shares. */
export type Authored = {
script?: string
size?: [number, number, number]
slots?: Record<string, string>
name?: string
/** Where it stands in its room, metres from the room's north-west corner; absent, in the row of pieces. */
at?: [number, number]
}
export type PieceSpec = [category: string, design: string, authored?: Authored]

export type RoomSpec = {
name: string
/** A finish ref; null writes none, so the floor shows the default. */
floor?: string | null
/** A finish ref; null writes none, so the wall faces show the default. */
walls?: string | null
/** A finish ref for the outside face of its walls (paint by default); null writes none. */
outside?: string | null
/** `some`: the north and east walls only. */
skirting?: boolean | 'some'
/** A ceiling over the room: `default` leaves its surface unwritten, a ref paints it; absent, no ceiling. */
ceiling?: 'default' | string
/** What is under the room: its own plate (the default), a drawn slab it was taken from, or nothing. */
under?: 'plate' | 'drawn' | 'none'
/** Paint regions on the faces that look in: one wall (0 north, 1 east, 2 south, 3 west) or all four. */
regions?: { wall?: number; u0?: number; u1?: number; v0?: number; v1?: number; finish: string }[]
pieces?: PieceSpec[]
/** Designs placed with place_design, by recipe name. */
designs?: string[]
}

const ROOM = 4
const PITCH = 5

export const TILE = 'library:flooring-tiles3'
export const MARBLE = 'library:flooring-statuarettowhite'
export const PARQUET = 'library:wood-woodparquet14'
export const PAINT = 'library:preset-softwhite'

const piece = (
id: string,
[category, design, authored]: PieceSpec,
at: [number, number, number],
): ItemNode => {
const node = ItemNode.parse({
id,
parentId: 'level_0',
name: authored?.name ?? `${category} ${id}`,
position: at,
...(authored?.slots ? { slots: authored.slots } : {}),
asset: {
id: design,
category,
name: category,
thumbnail: '',
src: 'https://example.com/x.glb',
dimensions: authored?.size ?? [0.5, 0.5, 0.5],
},
})
return authored?.script
? ({ ...node, source: { kind: 'script', script: authored.script, params: {} } } as ItemNode)
: node
}

/** A placed design, as the store holds it: a recipe and its parameters, standing on the floor. */
const design = (id: string, recipe: string, at: [number, number, number]) =>
({
object: 'node',
type: 'procedural-item',
id,
parentId: 'level_0',
visible: true,
metadata: {},
name: recipe,
recipe: { name: recipe },
parameters: {},
slots: {},
position: at,
rotation: [0, 0, 0],
children: [],
attachments: {},
}) as unknown as AnyNode

export function house(...rooms: RoomSpec[]) {
const nodes: AnyNode[] = [building(), storey(3)]
rooms.forEach((room, index) => {
const x0 = index * PITCH
const walls = rectangleWalls('level_0', [x0, 0, x0 + ROOM, ROOM], undefined, 'interior', `wall_r${index}`)
nodes.push(
...walls.map((wall, at) =>
WallNode.parse({
...wall,
...(room.outside === null ? {} : { slots: { b: room.outside ?? PAINT } }),
...(room.skirting === true || (room.skirting === 'some' && at < 2)
? { skirting: { enabled: true, sides: 'both' } }
: {}),
faceRegions: (room.regions ?? [])
.filter((region) => region.wall === undefined || region.wall === at)
.map(({ wall: _wall, ...region }, n) => ({ id: `region_${at}_${n}`, face: 'a', ...region })),
}),
),
...(room.under === 'none'
? []
: [
SlabNode.parse({
id: `slab_${index}`,
parentId: 'level_0',
polygon: [
[x0, 0],
[x0 + ROOM, 0],
[x0 + ROOM, ROOM],
[x0, ROOM],
],
...(room.under === 'drawn' ? {} : { zoneIds: [`zone_${index}`], plateRole: 'base' }),
}),
]),
...(room.ceiling
? [
CeilingNode.parse({
id: `ceiling_${index}`,
parentId: 'level_0',
polygon: [
[x0, 0],
[x0 + ROOM, 0],
[x0 + ROOM, ROOM],
[x0, ROOM],
],
zoneId: `zone_${index}`,
...(room.ceiling === 'default' ? {} : { slots: { surface: room.ceiling } }),
}),
]
: []),
ZoneNode.parse({
id: `zone_${index}`,
parentId: 'level_0',
name: room.name,
polygon: [
[x0, 0],
[x0 + ROOM, 0],
[x0 + ROOM, ROOM],
[x0, ROOM],
],
spaceRole: 'room',
autoFromWalls: true,
boundaryWallIds: walls.map((wall) => wall.id),
floor: {
...(room.floor === null ? {} : { finish: room.floor ?? PARQUET }),
...(room.under === 'drawn' ? { sourceSlabId: `slab_${index}` } : {}),
},
...(room.walls === null ? {} : { wallMaterial: room.walls ?? PAINT }),
}),
...(room.designs ?? []).map((recipe, at) =>
design(`procedural-item_${index}_${at}`, recipe, [x0 + 1 + (at % 3), 0, 3]),
),
...(room.pieces ?? []).map((spec, at) =>
piece(
`item_${index}_${at}`,
spec,
spec[2]?.at
? [x0 + spec[2].at[0], 0, spec[2].at[1]]
: [x0 + 1 + (at % 3), 0, 1 + Math.floor(at / 3)],
),
),
)
})
return graph(...nodes)
}

const BED: [string, string] = ['bed', 'bed-a']
const NIGHTSTAND: [string, string] = ['nightstand', 'nightstand-a']
const WARDROBE: [string, string] = ['wardrobe', 'wardrobe-a']
export const BEDROOM_SET: [string, string][] = [BED, NIGHTSTAND, WARDROBE]
export const BATH_SET: [string, string][] = [
['toilets', 'toilet'],
['sinks', 'sink'],
['showers', 'shower'],
]
Loading
Loading