@ifc-lite/mcp 0.26.2 → 0.27.1
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 +9 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js.map +1 -1
- package/dist/headless-backend-align.d.ts +1 -4
- package/dist/headless-backend-align.d.ts.map +1 -1
- package/dist/headless-backend-align.js +0 -11
- package/dist/headless-backend-align.js.map +1 -1
- package/dist/headless-backend.d.ts +4 -72
- package/dist/headless-backend.d.ts.map +1 -1
- package/dist/headless-backend.js +9 -313
- package/dist/headless-backend.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +14 -21
- package/dist/loader.js.map +1 -1
- package/dist/resources/providers.js +1 -1
- package/dist/resources/providers.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/diff-authored-keys.d.ts +1 -1
- package/dist/tools/diff-authored-keys.d.ts.map +1 -1
- package/dist/tools/diff-authored-keys.js +1 -1
- package/dist/tools/diff-authored-keys.js.map +1 -1
- package/dist/tools/diff-content.d.ts +1 -1
- package/dist/tools/diff-content.d.ts.map +1 -1
- package/dist/tools/diff-content.js +1 -1
- package/dist/tools/diff-content.js.map +1 -1
- package/dist/tools/diff-entity-scope.d.ts +1 -1
- package/dist/tools/diff-entity-scope.d.ts.map +1 -1
- package/dist/tools/diff-fingerprints.d.ts +1 -1
- package/dist/tools/diff-fingerprints.d.ts.map +1 -1
- package/dist/tools/diff-fingerprints.js +1 -1
- package/dist/tools/diff-fingerprints.js.map +1 -1
- package/dist/tools/diff.js +1 -1
- package/dist/tools/diff.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +10 -3
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/entity-create.js +1 -1
- package/dist/tools/entity-create.js.map +1 -1
- package/dist/tools/export.d.ts.map +1 -1
- package/dist/tools/export.js +36 -46
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/flow-ai.js +1 -1
- package/dist/tools/flow-ai.js.map +1 -1
- package/dist/tools/flow-host.d.ts.map +1 -1
- package/dist/tools/flow-host.js +7 -2
- package/dist/tools/flow-host.js.map +1 -1
- package/dist/tools/flow.js +1 -1
- package/dist/tools/flow.js.map +1 -1
- package/dist/tools/layer-store.d.ts.map +1 -1
- package/dist/tools/layer-store.js +8 -7
- package/dist/tools/layer-store.js.map +1 -1
- package/dist/tools/mutate.d.ts.map +1 -1
- package/dist/tools/mutate.js +8 -2
- package/dist/tools/mutate.js.map +1 -1
- package/dist/tools/query.js +1 -1
- package/dist/tools/query.js.map +1 -1
- package/dist/tools/review-captures.d.ts.map +1 -1
- package/dist/tools/review-captures.js +2 -1
- package/dist/tools/review-captures.js.map +1 -1
- package/dist/tools/review-findings.d.ts.map +1 -1
- package/dist/tools/review-findings.js +13 -5
- package/dist/tools/review-findings.js.map +1 -1
- package/dist/tools/util.d.ts +11 -0
- package/dist/tools/util.d.ts.map +1 -1
- package/dist/tools/util.js +24 -1
- package/dist/tools/util.js.map +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tools/validation.js +1 -3
- package/dist/tools/validation.js.map +1 -1
- package/package.json +18 -18
- package/dist/authored-attribute-value.d.ts +0 -3
- package/dist/authored-attribute-value.d.ts.map +0 -1
- package/dist/authored-attribute-value.js +0 -34
- package/dist/authored-attribute-value.js.map +0 -1
- package/dist/backend-query-relationships.d.ts +0 -5
- package/dist/backend-query-relationships.d.ts.map +0 -1
- package/dist/backend-query-relationships.js +0 -55
- package/dist/backend-query-relationships.js.map +0 -1
- package/dist/backend-query.d.ts +0 -48
- package/dist/backend-query.d.ts.map +0 -1
- package/dist/backend-query.js +0 -383
- package/dist/backend-query.js.map +0 -1
- package/dist/effective-entity-membership.d.ts +0 -8
- package/dist/effective-entity-membership.d.ts.map +0 -1
- package/dist/effective-entity-membership.js +0 -23
- package/dist/effective-entity-membership.js.map +0 -1
- package/dist/headless-backend-cost-store.d.ts +0 -14
- package/dist/headless-backend-cost-store.d.ts.map +0 -1
- package/dist/headless-backend-cost-store.js +0 -20
- package/dist/headless-backend-cost-store.js.map +0 -1
- package/dist/headless-backend-modelling.d.ts +0 -50
- package/dist/headless-backend-modelling.d.ts.map +0 -1
- package/dist/headless-backend-modelling.js +0 -128
- package/dist/headless-backend-modelling.js.map +0 -1
- package/dist/headless-backend-room.d.ts +0 -8
- package/dist/headless-backend-room.d.ts.map +0 -1
- package/dist/headless-backend-room.js +0 -24
- package/dist/headless-backend-room.js.map +0 -1
- package/dist/headless-backend-store-stubs.d.ts +0 -13
- package/dist/headless-backend-store-stubs.d.ts.map +0 -1
- package/dist/headless-backend-store-stubs.js +0 -9
- package/dist/headless-backend-store-stubs.js.map +0 -1
- package/dist/headless-backend-store.d.ts +0 -8
- package/dist/headless-backend-store.d.ts.map +0 -1
- package/dist/headless-backend-store.js +0 -38
- package/dist/headless-backend-store.js.map +0 -1
- package/dist/headless-backend-structural-store.d.ts +0 -21
- package/dist/headless-backend-structural-store.d.ts.map +0 -1
- package/dist/headless-backend-structural-store.js +0 -20
- package/dist/headless-backend-structural-store.js.map +0 -1
- package/dist/headless-backend-structural.d.ts +0 -4
- package/dist/headless-backend-structural.d.ts.map +0 -1
- package/dist/headless-backend-structural.js +0 -24
- package/dist/headless-backend-structural.js.map +0 -1
- package/dist/overlay.d.ts +0 -166
- package/dist/overlay.d.ts.map +0 -1
- package/dist/overlay.js +0 -285
- package/dist/overlay.js.map +0 -1
- package/dist/schema-tables.d.ts +0 -42
- package/dist/schema-tables.d.ts.map +0 -1
- package/dist/schema-tables.js +0 -77
- package/dist/schema-tables.js.map +0 -1
package/dist/backend-query.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The read half of `HeadlessLikeBackend`, with the session's pending mutations
|
|
3
|
-
* folded in (#2004).
|
|
4
|
-
*
|
|
5
|
-
* `MutablePropertyView` is an overlay: the parsed store's buffer and index are
|
|
6
|
-
* never touched, and the edits only materialise in `StepExporter`. Every read
|
|
7
|
-
* that went straight to the store therefore answered about the file *as parsed*,
|
|
8
|
-
* so an agent that edited and then read back to confirm was told its edit had
|
|
9
|
-
* not happened — and the natural recovery from that is to edit again.
|
|
10
|
-
*
|
|
11
|
-
* The fold lives here rather than in the tools because this is the one
|
|
12
|
-
* chokepoint they all pass through: `get_entity`, `query_entities`,
|
|
13
|
-
* `get_entities_bulk`, `count_entities` and `properties_unique` all go through
|
|
14
|
-
* `bim.*`, which is this adapter. Folding at tool level would mean each tool
|
|
15
|
-
* re-implementing it — and `query_entities`' property filters would have to
|
|
16
|
-
* re-implement the *filter*, which is exactly where a half-fold does the most
|
|
17
|
-
* damage: a query for the value just written must find it.
|
|
18
|
-
*
|
|
19
|
-
* `related` folds too (#2014), and with it every containment answer the SDK
|
|
20
|
-
* builds on top of it — `bim.storey`, `bim.path`, `bim.contains`,
|
|
21
|
-
* `bim.decomposes`. A queued `IfcRelContainedInSpatialStructure` is how an agent
|
|
22
|
-
* places something over MCP, so ignoring it was ignoring a write.
|
|
23
|
-
*
|
|
24
|
-
* Exact `relationships().relations` rows are folded through the same overlay.
|
|
25
|
-
* Legacy projections and geometry rebuild on `model_load` after a save.
|
|
26
|
-
*/
|
|
27
|
-
import type { QueryBackendMethods } from '@ifc-lite/sdk';
|
|
28
|
-
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
29
|
-
import { expandTypes, isQueryableObjectType } from '@ifc-lite/parser';
|
|
30
|
-
import { type MutablePropertyView } from '@ifc-lite/mutations';
|
|
31
|
-
import type { PendingOverlay } from './overlay.js';
|
|
32
|
-
export { expandTypes };
|
|
33
|
-
/**
|
|
34
|
-
* Which classes an unfiltered query answers with.
|
|
35
|
-
*
|
|
36
|
-
* Thin alias: the predicate is schema logic and lives in `@ifc-lite/parser`, so
|
|
37
|
-
* the CLI and MCP backends cannot drift apart on it. Kept as a named export
|
|
38
|
-
* here because both packages already publish it under this name.
|
|
39
|
-
*/
|
|
40
|
-
export declare const isProductType: typeof isQueryableObjectType;
|
|
41
|
-
/**
|
|
42
|
-
* Build the query adapter over a store, folding whatever `overlay()` returns at
|
|
43
|
-
* call time. `overlay` is a getter, not a value: the backend creates its
|
|
44
|
-
* `MutablePropertyView` lazily on the first mutation, so a session that is only
|
|
45
|
-
* ever read gets `null` on every call and keeps the original store-only path.
|
|
46
|
-
*/
|
|
47
|
-
export declare function createQueryAdapter(store: IfcDataStore, modelId: string, overlay: () => PendingOverlay | null, mutationView: () => MutablePropertyView | null): QueryBackendMethods;
|
|
48
|
-
//# sourceMappingURL=backend-query.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend-query.d.ts","sourceRoot":"","sources":["../src/backend-query.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAWV,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAOL,WAAW,EAGX,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1F,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,cAAc,CAAC;AAMlE,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,8BAAwB,CAAC;AAenD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,cAAc,GAAG,IAAI,EACpC,YAAY,EAAE,MAAM,mBAAmB,GAAG,IAAI,GAC7C,mBAAmB,CAgUrB"}
|
package/dist/backend-query.js
DELETED
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
import { extractAllEntityAttributes, extractClassificationsOnDemand, extractDocumentsOnDemand, extractMaterialsOnDemand, extractRelationshipsOnDemand, extractExactRelatedIds, expandTypes, QUERY_REL_TYPE_MAP, extractTypePropertiesOnDemand, isQueryableObjectType, } from '@ifc-lite/parser';
|
|
5
|
-
import { attributeNamesForSchema } from './schema-tables.js';
|
|
6
|
-
import { EntityNode, matchesPropertyFilter } from '@ifc-lite/query';
|
|
7
|
-
import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
|
|
8
|
-
import { authoredValue } from './authored-attribute-value.js';
|
|
9
|
-
import { foldRelationshipRows } from './backend-query-relationships.js';
|
|
10
|
-
// `expandTypes` used to be defined here; it now comes from `@ifc-lite/parser`,
|
|
11
|
-
// shared with the other query backends (see `query-backend-maps.ts`). Re-exported
|
|
12
|
-
// so this module's consumers are unaffected by where it lives.
|
|
13
|
-
export { expandTypes };
|
|
14
|
-
/**
|
|
15
|
-
* Which classes an unfiltered query answers with.
|
|
16
|
-
*
|
|
17
|
-
* Thin alias: the predicate is schema logic and lives in `@ifc-lite/parser`, so
|
|
18
|
-
* the CLI and MCP backends cannot drift apart on it. Kept as a named export
|
|
19
|
-
* here because both packages already publish it under this name.
|
|
20
|
-
*/
|
|
21
|
-
export const isProductType = isQueryableObjectType;
|
|
22
|
-
function createdEntityData(created, ref, store) {
|
|
23
|
-
const names = attributeNamesForSchema(created.ifcType, store.schemaVersion);
|
|
24
|
-
const objectType = authoredValue(created.attributes[names.indexOf('ObjectType')]);
|
|
25
|
-
return {
|
|
26
|
-
ref,
|
|
27
|
-
globalId: created.globalId,
|
|
28
|
-
name: created.name ?? '',
|
|
29
|
-
type: created.ifcType,
|
|
30
|
-
description: created.description ?? '',
|
|
31
|
-
objectType: typeof objectType === 'string' ? objectType : '',
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Build the query adapter over a store, folding whatever `overlay()` returns at
|
|
36
|
-
* call time. `overlay` is a getter, not a value: the backend creates its
|
|
37
|
-
* `MutablePropertyView` lazily on the first mutation, so a session that is only
|
|
38
|
-
* ever read gets `null` on every call and keeps the original store-only path.
|
|
39
|
-
*/
|
|
40
|
-
export function createQueryAdapter(store, modelId, overlay, mutationView) {
|
|
41
|
-
function entityData(ref) {
|
|
42
|
-
const pending = overlay();
|
|
43
|
-
if (pending?.deleted.has(ref.expressId))
|
|
44
|
-
return null;
|
|
45
|
-
const created = pending?.createdEntity(ref.expressId);
|
|
46
|
-
if (created) {
|
|
47
|
-
const data = createdEntityData(created, ref, store);
|
|
48
|
-
return { ...data, type: pending?.effectiveType(ref.expressId) ?? data.type };
|
|
49
|
-
}
|
|
50
|
-
// @raw-entity-enumeration-ok tombstones and overlay-created ids returned above; this point probe only checks the remaining parsed source
|
|
51
|
-
if (!store.entityIndex.byId.has(ref.expressId))
|
|
52
|
-
return null;
|
|
53
|
-
const node = new EntityNode(store, ref.expressId);
|
|
54
|
-
const type = node.type;
|
|
55
|
-
if (!type || type === 'Unknown')
|
|
56
|
-
return null;
|
|
57
|
-
return withOverrides({
|
|
58
|
-
ref,
|
|
59
|
-
globalId: node.globalId,
|
|
60
|
-
name: node.name,
|
|
61
|
-
type: pending?.effectiveType(ref.expressId) ?? type,
|
|
62
|
-
description: node.description,
|
|
63
|
-
objectType: node.objectType,
|
|
64
|
-
}, pending, ref.expressId);
|
|
65
|
-
}
|
|
66
|
-
function withOverrides(data, pending, expressId) {
|
|
67
|
-
if (!pending)
|
|
68
|
-
return data;
|
|
69
|
-
const overrides = pending.attributes(expressId);
|
|
70
|
-
const positional = pending.positionalAttributes(expressId);
|
|
71
|
-
if (overrides.size === 0 && positional.size === 0 && !pending.effectiveType(expressId))
|
|
72
|
-
return data;
|
|
73
|
-
const next = {
|
|
74
|
-
...data,
|
|
75
|
-
type: pending.effectiveType(expressId) ?? data.type,
|
|
76
|
-
name: overrides.get('Name') ?? data.name,
|
|
77
|
-
description: overrides.get('Description') ?? data.description,
|
|
78
|
-
objectType: overrides.get('ObjectType') ?? data.objectType,
|
|
79
|
-
};
|
|
80
|
-
// Positional slots are named by the effective class (a queued retype wins).
|
|
81
|
-
const effectiveType = pending.effectiveType(expressId);
|
|
82
|
-
const exactType = effectiveType ?? (store.entities.getTypeName(expressId) || data.type);
|
|
83
|
-
const names = attributeNamesForSchema(exactType, store.schemaVersion);
|
|
84
|
-
if (effectiveType && names.length > 0 && !names.includes('ObjectType'))
|
|
85
|
-
next.objectType = '';
|
|
86
|
-
for (const [index, value] of positional) {
|
|
87
|
-
const authored = authoredValue(value);
|
|
88
|
-
const isUnset = value == null || (typeof value === 'string' && ['', '$', '*'].includes(value.trim()));
|
|
89
|
-
const text = typeof authored === 'string' ? authored : isUnset ? '' : null;
|
|
90
|
-
if (text === null)
|
|
91
|
-
continue;
|
|
92
|
-
if (names[index] === 'Name')
|
|
93
|
-
next.name = text;
|
|
94
|
-
else if (names[index] === 'Description')
|
|
95
|
-
next.description = text;
|
|
96
|
-
else if (names[index] === 'ObjectType')
|
|
97
|
-
next.objectType = text;
|
|
98
|
-
}
|
|
99
|
-
return next;
|
|
100
|
-
}
|
|
101
|
-
function properties(ref, captured) {
|
|
102
|
-
// `captured` lets a caller that already has the overlay pass it in rather
|
|
103
|
-
// than have it rebuilt per entity — the filter loop in `entities()` runs
|
|
104
|
-
// this once per candidate row.
|
|
105
|
-
const pending = captured !== undefined ? captured : overlay();
|
|
106
|
-
// An entity this session deleted answers nothing, as `entityData` and
|
|
107
|
-
// `entities` already have it answer nothing (#2014 review).
|
|
108
|
-
if (pending?.deleted.has(ref.expressId))
|
|
109
|
-
return [];
|
|
110
|
-
// `getForEntity` reads the same on-demand extraction the store would, then
|
|
111
|
-
// applies the overlay on top — so it is the whole answer, not the delta.
|
|
112
|
-
const psets = pending
|
|
113
|
-
? pending.propertySets(ref.expressId)
|
|
114
|
-
: new EntityNode(store, ref.expressId).properties();
|
|
115
|
-
return psets.map((pset) => ({
|
|
116
|
-
name: pset.name,
|
|
117
|
-
globalId: pset.globalId,
|
|
118
|
-
properties: pset.properties.map((p) => ({ name: p.name, type: p.type, value: p.value })),
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
function quantities(ref) {
|
|
122
|
-
const pending = overlay();
|
|
123
|
-
if (pending?.deleted.has(ref.expressId))
|
|
124
|
-
return [];
|
|
125
|
-
const qsets = pending
|
|
126
|
-
? pending.quantitySets(ref.expressId)
|
|
127
|
-
: new EntityNode(store, ref.expressId).quantities();
|
|
128
|
-
return qsets.map((qset) => ({
|
|
129
|
-
name: qset.name,
|
|
130
|
-
quantities: qset.quantities.map((q) => ({ name: q.name, type: q.type, value: q.value })),
|
|
131
|
-
}));
|
|
132
|
-
}
|
|
133
|
-
function attributes(ref) {
|
|
134
|
-
const pending = overlay();
|
|
135
|
-
if (pending?.deleted.has(ref.expressId))
|
|
136
|
-
return [];
|
|
137
|
-
const created = pending?.createdEntity(ref.expressId);
|
|
138
|
-
const base = created
|
|
139
|
-
// Not in the store, so there is nothing to extract: name the authored
|
|
140
|
-
// positional list from the schema instead. Cross-schema, because a created
|
|
141
|
-
// IFC2X3 or IFC4X3 class is not in the IFC4 codegen pin (#2003).
|
|
142
|
-
? namedAuthoredAttributes(created)
|
|
143
|
-
: extractAllEntityAttributes(store, ref.expressId);
|
|
144
|
-
if (!pending)
|
|
145
|
-
return base;
|
|
146
|
-
const overrides = pending.attributes(ref.expressId);
|
|
147
|
-
const positional = pending.positionalAttributes(ref.expressId);
|
|
148
|
-
if (overrides.size === 0 && positional.size === 0)
|
|
149
|
-
return base;
|
|
150
|
-
// Overwrite what the base carries, then append what it does not. The append
|
|
151
|
-
// is the half that was missing (#2014): `extractAllEntityAttributes` omits
|
|
152
|
-
// an attribute whose stored value is `$`, so setting a previously-unset
|
|
153
|
-
// `Description` changed the top-level field while this list still denied it
|
|
154
|
-
// — one payload contradicting itself. Appended names go last; the list is
|
|
155
|
-
// name-keyed and its order is not positional (the base already drops nulls).
|
|
156
|
-
const merged = new Map(base.map((attribute) => [attribute.name, attribute.value]));
|
|
157
|
-
const writes = new Map(overrides);
|
|
158
|
-
const exactType = created?.ifcType ?? store.entities.getTypeName(ref.expressId);
|
|
159
|
-
const names = attributeNamesForSchema(exactType, store.schemaVersion);
|
|
160
|
-
for (const [index, value] of positional) {
|
|
161
|
-
const name = names[index];
|
|
162
|
-
if (name)
|
|
163
|
-
writes.set(name, value);
|
|
164
|
-
}
|
|
165
|
-
for (const [name, value] of writes) {
|
|
166
|
-
const authored = authoredValue(value);
|
|
167
|
-
if (authored === undefined)
|
|
168
|
-
merged.delete(name);
|
|
169
|
-
else
|
|
170
|
-
merged.set(name, authored);
|
|
171
|
-
}
|
|
172
|
-
return [...merged].map(([name, value]) => ({ name, value }));
|
|
173
|
-
}
|
|
174
|
-
function namedAuthoredAttributes(created) {
|
|
175
|
-
// The *model's* schema, not the IFC4 pin. `IfcRelCoversSpaces` names slot 4
|
|
176
|
-
// `RelatedSpace` in IFC2X3 and `RelatingSpace` in IFC4, so the pinned answer
|
|
177
|
-
// reported a name the file would not serialise. Falls back to the parser's
|
|
178
|
-
// cross-schema list when the declared schema does not carry the class.
|
|
179
|
-
const names = attributeNamesForSchema(created.ifcType, store.schemaVersion);
|
|
180
|
-
const out = [];
|
|
181
|
-
for (let i = 0; i < created.attributes.length; i++) {
|
|
182
|
-
const value = authoredValue(created.attributes[i]);
|
|
183
|
-
if (value === undefined)
|
|
184
|
-
continue;
|
|
185
|
-
// No synthetic `Attribute7` names: `bim.attributes` is a list of IFC
|
|
186
|
-
// EXPRESS attribute names, and an invented one is not one. A payload
|
|
187
|
-
// longer than the schema knows about is the caller's to explain.
|
|
188
|
-
const name = names[i];
|
|
189
|
-
if (name === undefined)
|
|
190
|
-
continue;
|
|
191
|
-
out.push({ name, value });
|
|
192
|
-
}
|
|
193
|
-
return out;
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
entities(descriptor) {
|
|
197
|
-
const pending = overlay();
|
|
198
|
-
const requested = descriptor.types && descriptor.types.length > 0
|
|
199
|
-
? expandTypes(descriptor.types, store.schemaVersion)
|
|
200
|
-
: null;
|
|
201
|
-
const results = [];
|
|
202
|
-
for (const { expressId, type, overlayCreated } of iterateEffectiveEntityIds(store, mutationView(), requested ?? undefined)) {
|
|
203
|
-
if (!requested && !isProductType(type))
|
|
204
|
-
continue;
|
|
205
|
-
const ref = { modelId, expressId };
|
|
206
|
-
if (overlayCreated) {
|
|
207
|
-
const created = pending?.createdEntity(expressId);
|
|
208
|
-
if (!created)
|
|
209
|
-
throw new Error(`Missing pending entity #${expressId} during enumeration`);
|
|
210
|
-
results.push(withOverrides(createdEntityData(created, ref, store), pending, expressId));
|
|
211
|
-
continue;
|
|
212
|
-
}
|
|
213
|
-
const node = new EntityNode(store, expressId);
|
|
214
|
-
results.push(withOverrides({
|
|
215
|
-
ref,
|
|
216
|
-
globalId: node.globalId,
|
|
217
|
-
name: node.name,
|
|
218
|
-
type: node.type,
|
|
219
|
-
description: node.description,
|
|
220
|
-
objectType: node.objectType,
|
|
221
|
-
}, pending, expressId));
|
|
222
|
-
}
|
|
223
|
-
let filtered = results;
|
|
224
|
-
if (descriptor.filters && descriptor.filters.length > 0) {
|
|
225
|
-
const propsCache = new Map();
|
|
226
|
-
const cachedProps = (ref) => {
|
|
227
|
-
let cached = propsCache.get(ref.expressId);
|
|
228
|
-
if (!cached) {
|
|
229
|
-
cached = properties(ref, pending);
|
|
230
|
-
propsCache.set(ref.expressId, cached);
|
|
231
|
-
}
|
|
232
|
-
return cached;
|
|
233
|
-
};
|
|
234
|
-
// A `Qto_` filter (or any psetName with no matching property set)
|
|
235
|
-
// falls back to quantity sets — see `matchesPropertyFilter` in
|
|
236
|
-
// `@ifc-lite/query`'s `property-filter-match.ts`. Without this, a
|
|
237
|
-
// `Qto_WallBaseQuantities.NetVolume>1` filter (e.g. from the `#4094`
|
|
238
|
-
// selector adapter's `.select()`/`selector` param) silently matched
|
|
239
|
-
// zero entities even when the quantity was present.
|
|
240
|
-
const qsetsCache = new Map();
|
|
241
|
-
const cachedQuantities = (ref) => {
|
|
242
|
-
let cached = qsetsCache.get(ref.expressId);
|
|
243
|
-
if (!cached) {
|
|
244
|
-
cached = quantities(ref);
|
|
245
|
-
qsetsCache.set(ref.expressId, cached);
|
|
246
|
-
}
|
|
247
|
-
return cached;
|
|
248
|
-
};
|
|
249
|
-
for (const filter of descriptor.filters) {
|
|
250
|
-
filtered = filtered.filter((entity) => matchesPropertyFilter(cachedProps(entity.ref), filter, cachedQuantities(entity.ref)));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// `&&` alone lets a NaN offset/limit through silently: every NaN
|
|
254
|
-
// comparison is false, so `descriptor.offset > 0` was falsy and the
|
|
255
|
-
// guard did nothing -- a caller that computed a bad value (e.g.
|
|
256
|
-
// `Number(userInput)` on a non-numeric string) got back MORE rows
|
|
257
|
-
// than asked for, with no error. The same falsy-zero shape made
|
|
258
|
-
// `limit: 0` ("no rows") silently mean "every row" instead. Fail
|
|
259
|
-
// loudly on a non-finite or negative value instead of quietly
|
|
260
|
-
// serving the wrong slice, matching the misconfigured-caller
|
|
261
|
-
// convention this adapter already uses elsewhere (see the `add*`
|
|
262
|
-
// stubs in headless-backend.ts). `limit: 0` is now a deliberate
|
|
263
|
-
// empty result.
|
|
264
|
-
//
|
|
265
|
-
// No built-in MCP tool reaches this today: `query_entities`
|
|
266
|
-
// (tools/query.ts) validates `limit`/`offset` as JSON-Schema
|
|
267
|
-
// integers before its handler runs and does its own pagination via
|
|
268
|
-
// `paginate()` rather than chaining `.limit()/.offset()` on the
|
|
269
|
-
// query builder. This guards the public SDK path instead --
|
|
270
|
-
// `HeadlessLikeBackend` is exported from `./index.js` and
|
|
271
|
-
// `./browser.js` for programmatic use, and an embedder driving it
|
|
272
|
-
// through `@ifc-lite/sdk`'s fluent `QueryBuilder` reaches
|
|
273
|
-
// `descriptor.limit`/`descriptor.offset` directly. Same shape as
|
|
274
|
-
// the CLI's `headless-backend.ts` (#2298) -- a parallel
|
|
275
|
-
// implementation, not a shared import, so it needed its own fix.
|
|
276
|
-
if (descriptor.offset != null) {
|
|
277
|
-
if (!Number.isFinite(descriptor.offset) || descriptor.offset < 0) {
|
|
278
|
-
throw new Error(`Invalid offset: ${descriptor.offset} (must be a non-negative finite number)`);
|
|
279
|
-
}
|
|
280
|
-
if (descriptor.offset > 0)
|
|
281
|
-
filtered = filtered.slice(descriptor.offset);
|
|
282
|
-
}
|
|
283
|
-
if (descriptor.limit != null) {
|
|
284
|
-
if (!Number.isFinite(descriptor.limit) || descriptor.limit < 0) {
|
|
285
|
-
throw new Error(`Invalid limit: ${descriptor.limit} (must be a non-negative finite number)`);
|
|
286
|
-
}
|
|
287
|
-
filtered = filtered.slice(0, descriptor.limit);
|
|
288
|
-
}
|
|
289
|
-
return filtered;
|
|
290
|
-
},
|
|
291
|
-
// Headless contexts have no interactive viewer filter, so there is never an
|
|
292
|
-
// "active filter" to report (issue #1107).
|
|
293
|
-
entitiesMatchingActiveFilter: () => null,
|
|
294
|
-
entityData,
|
|
295
|
-
attributes,
|
|
296
|
-
properties: (ref) => properties(ref),
|
|
297
|
-
quantities,
|
|
298
|
-
classifications(ref) {
|
|
299
|
-
return extractClassificationsOnDemand(store, ref.expressId);
|
|
300
|
-
},
|
|
301
|
-
materials(ref) {
|
|
302
|
-
return extractMaterialsOnDemand(store, ref.expressId);
|
|
303
|
-
},
|
|
304
|
-
typeProperties(ref) {
|
|
305
|
-
const info = extractTypePropertiesOnDemand(store, ref.expressId);
|
|
306
|
-
if (!info)
|
|
307
|
-
return null;
|
|
308
|
-
return {
|
|
309
|
-
typeName: info.typeName,
|
|
310
|
-
typeId: info.typeId,
|
|
311
|
-
properties: info.properties.map((pset) => ({
|
|
312
|
-
name: pset.name,
|
|
313
|
-
globalId: pset.globalId,
|
|
314
|
-
properties: pset.properties.map((p) => ({ name: p.name, type: p.type, value: p.value })),
|
|
315
|
-
})),
|
|
316
|
-
};
|
|
317
|
-
},
|
|
318
|
-
documents(ref) {
|
|
319
|
-
return extractDocumentsOnDemand(store, ref.expressId);
|
|
320
|
-
},
|
|
321
|
-
relationships(ref) {
|
|
322
|
-
const result = extractRelationshipsOnDemand(store, ref.expressId);
|
|
323
|
-
const pending = overlay();
|
|
324
|
-
if (!pending)
|
|
325
|
-
return result;
|
|
326
|
-
return foldRelationshipRows(result, pending, ref, entityData);
|
|
327
|
-
},
|
|
328
|
-
/**
|
|
329
|
-
* Containment, aggregation and typing, with the session's queued edits
|
|
330
|
-
* applied (#2014).
|
|
331
|
-
*
|
|
332
|
-
* This is the seam every containment answer already passes through:
|
|
333
|
-
* `bim.storey`, `bim.path`, `bim.contains`, `bim.decomposes` and
|
|
334
|
-
* `bim.containedIn` are all thin wrappers over it. Folding here is what
|
|
335
|
-
* stopped `query_entities(in_storey)` from dropping an entity that the same
|
|
336
|
-
* session had just created *and* placed with a queued
|
|
337
|
-
* `IfcRelContainedInSpatialStructure` — a query that returns an entity
|
|
338
|
-
* without the filter and drops it with one reads as a wrong storey rather
|
|
339
|
-
* than a missing fold.
|
|
340
|
-
*
|
|
341
|
-
* Three rules, in order:
|
|
342
|
-
*
|
|
343
|
-
* 1. A parsed edge is dropped when the session deleted the `IfcRel…` record
|
|
344
|
-
* that produced it. The graph carries `relationshipId` per edge, so this
|
|
345
|
-
* is exact rather than inferred.
|
|
346
|
-
* 2. An edge to or from a tombstoned entity is dropped. Deleting a storey
|
|
347
|
-
* has to stop answering "this wall is in that storey".
|
|
348
|
-
* 3. Queued relationships are added. Deleting a queued relationship forgets
|
|
349
|
-
* it outright, so there is no tombstone case to handle on this side.
|
|
350
|
-
*
|
|
351
|
-
* `forward` walks Relating → Related (a storey to its elements, a whole to
|
|
352
|
-
* its parts); `inverse` walks back.
|
|
353
|
-
*/
|
|
354
|
-
related(ref, relType, direction) {
|
|
355
|
-
const relEnum = QUERY_REL_TYPE_MAP[relType];
|
|
356
|
-
if (relEnum === undefined)
|
|
357
|
-
return [];
|
|
358
|
-
const pending = overlay();
|
|
359
|
-
// A deleted entity relates to nothing (#2014 review).
|
|
360
|
-
if (pending?.deleted.has(ref.expressId))
|
|
361
|
-
return [];
|
|
362
|
-
const out = [];
|
|
363
|
-
const seen = new Set();
|
|
364
|
-
const take = (expressId) => {
|
|
365
|
-
if (pending?.deleted.has(expressId) || seen.has(expressId))
|
|
366
|
-
return;
|
|
367
|
-
seen.add(expressId);
|
|
368
|
-
out.push(expressId);
|
|
369
|
-
};
|
|
370
|
-
const isDeleted = pending
|
|
371
|
-
? (id) => pending.deleted.has(id) || pending.supersededRelationshipIds.has(id)
|
|
372
|
-
: () => false;
|
|
373
|
-
for (const id of extractExactRelatedIds(store, ref.expressId, relType, direction, isDeleted))
|
|
374
|
-
take(id);
|
|
375
|
-
for (const edge of pending?.relationshipEdges(ref.expressId, relType) ?? []) {
|
|
376
|
-
if (edge.direction === direction)
|
|
377
|
-
take(edge.targetId);
|
|
378
|
-
}
|
|
379
|
-
return out.map((expressId) => ({ modelId: ref.modelId, expressId }));
|
|
380
|
-
},
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
//# sourceMappingURL=backend-query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend-query.js","sourceRoot":"","sources":["../src/backend-query.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA4C/D,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,wBAAwB,EACxB,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;A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;YAChB,KAAK,MAAM,EAAE,IAAI,sBAAsB,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;gBAAE,IAAI,CAAC,EAAE,CAAC,CAAC;YACvG,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;gBAC5E,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;oBAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxD,CAAC;YACD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;QAC/E,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Adapt the MCP session overlay to the shared effective-entity boundary. */
|
|
2
|
-
import type { EffectiveEntityOverlay } from '@ifc-lite/data';
|
|
3
|
-
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
4
|
-
import type { PendingOverlay } from './overlay.js';
|
|
5
|
-
export declare function pendingEntityMembership(overlay: PendingOverlay | null): EffectiveEntityOverlay | null;
|
|
6
|
-
/** IFCX has columnar rows but no STEP type buckets; give the shared iterator its source domain. */
|
|
7
|
-
export declare function effectiveSourceIds(store: IfcDataStore): Iterable<number> | undefined;
|
|
8
|
-
//# sourceMappingURL=effective-entity-membership.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effective-entity-membership.d.ts","sourceRoot":"","sources":["../src/effective-entity-membership.ts"],"names":[],"mappings":"AAIA,6EAA6E;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,sBAAsB,GAAG,IAAI,CAYrG;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,CAGpF"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
export function pendingEntityMembership(overlay) {
|
|
5
|
-
if (!overlay)
|
|
6
|
-
return null;
|
|
7
|
-
return {
|
|
8
|
-
isDeleted: (id) => overlay.deleted.has(id),
|
|
9
|
-
getTombstones: () => overlay.deleted,
|
|
10
|
-
getTypeMutations: () => overlay.getTypeMutations?.() ?? overlay.typeMutations?.() ?? new Map(),
|
|
11
|
-
getNewEntities: () => overlay.createdAll.map((entity) => ({ expressId: entity.expressId, type: entity.ifcType })),
|
|
12
|
-
getNewEntity: (id) => {
|
|
13
|
-
const entity = overlay.createdEntity(id);
|
|
14
|
-
return entity ? { type: entity.ifcType } : null;
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
/** IFCX has columnar rows but no STEP type buckets; give the shared iterator its source domain. */
|
|
19
|
-
export function effectiveSourceIds(store) {
|
|
20
|
-
// @raw-entity-enumeration-ok detect an indexless IFCX source; its columnar IDs are passed through the canonical accessor
|
|
21
|
-
return store.entityIndex.byType.size === 0 ? store.entities.expressId : undefined;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=effective-entity-membership.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"effective-entity-membership.js","sourceRoot":"","sources":["../src/effective-entity-membership.ts"],"names":[],"mappings":"A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
|
|
4
|
-
* MCP v0.1 headless backend (#4857 PR A) — the same convention
|
|
5
|
-
* `headless-backend.ts`'s `addColumn`/`addWall`/etc. already use: agent flows
|
|
6
|
-
* go through `entity_create` with raw attributes, not the high-level
|
|
7
|
-
* builders, so these throw loudly rather than silently no-op. `bim.cost`
|
|
8
|
-
* READS already observe whatever `entity_create` authors, once the model's
|
|
9
|
-
* `MutablePropertyView` is threaded into `createCostBackend` — see
|
|
10
|
-
* `headless-backend.ts`'s `this.cost` construction.
|
|
11
|
-
*/
|
|
12
|
-
import type { CostStoreBackendMethods } from '@ifc-lite/sdk';
|
|
13
|
-
export declare function costStoreStubs(): CostStoreBackendMethods;
|
|
14
|
-
//# sourceMappingURL=headless-backend-cost-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-backend-cost-store.d.ts","sourceRoot":"","sources":["../src/headless-backend-cost-store.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAM7D,wBAAgB,cAAc,IAAI,uBAAuB,CAYxD"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
-
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
const unsupported = (method) => () => {
|
|
5
|
-
throw new Error(`${method} not supported in MCP v0.1; use entity_create`);
|
|
6
|
-
};
|
|
7
|
-
export function costStoreStubs() {
|
|
8
|
-
return {
|
|
9
|
-
addCostSchedule: unsupported('addCostSchedule'),
|
|
10
|
-
addCostItem: unsupported('addCostItem'),
|
|
11
|
-
addCostValue: unsupported('addCostValue'),
|
|
12
|
-
addCostQuantity: unsupported('addCostQuantity'),
|
|
13
|
-
nestCostItems: unsupported('nestCostItems'),
|
|
14
|
-
assignCostItemsToSchedule: unsupported('assignCostItemsToSchedule'),
|
|
15
|
-
assignToCostItem: unsupported('assignToCostItem'),
|
|
16
|
-
setCostItemValues: unsupported('setCostItemValues'),
|
|
17
|
-
removeCostEntity: unsupported('removeCostEntity'),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=headless-backend-cost-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-backend-cost-store.js","sourceRoot":"","sources":["../src/headless-backend-cost-store.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgB/D,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,GAAU,EAAE;IAClD,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,+CAA+C,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,UAAU,cAAc;IAC5B,OAAO;QACL,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC;QAC/C,WAAW,EAAE,WAAW,CAAC,aAAa,CAAC;QACvC,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC;QACzC,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC;QAC/C,aAAa,EAAE,WAAW,CAAC,eAAe,CAAC;QAC3C,yBAAyB,EAAE,WAAW,CAAC,2BAA2B,CAAC;QACnE,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAAC;QACjD,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC;QACnD,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAAC;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/** Ordinary creation, placement and wall joins use the shared SDK factories (#6232 D5).
|
|
2
|
-
* Shared compound recording preserves every earlier overlay record for undo. */
|
|
3
|
-
import { type ModellingStoreModelResolver } from '@ifc-lite/sdk';
|
|
4
|
-
export declare function createRecordedModellingBackend(resolve: ModellingStoreModelResolver): {
|
|
5
|
-
transformElements: (modelId: string, expressIds: readonly number[], operation: import("@ifc-lite/create").StoreyTransformOp) => import("@ifc-lite/sdk").EntityRef[];
|
|
6
|
-
setElementSize: (ref: import("@ifc-lite/sdk").EntityRef, patch: import("@ifc-lite/sdk").PhysicalSizePatch) => import("@ifc-lite/sdk").EntityRef[];
|
|
7
|
-
resizeWall: (ref: import("@ifc-lite/sdk").EntityRef, start: [number, number, number], end: [number, number, number], options?: {
|
|
8
|
-
moveJoinedEnds?: boolean;
|
|
9
|
-
} | undefined) => import("@ifc-lite/sdk").EntityRef[];
|
|
10
|
-
splitElements: (modelId: string, requests: readonly import("@ifc-lite/create").ElementSplitRequest[]) => {
|
|
11
|
-
source: import("@ifc-lite/sdk").EntityRef;
|
|
12
|
-
added: import("@ifc-lite/sdk").EntityRef;
|
|
13
|
-
left: import("@ifc-lite/sdk").EntityRef;
|
|
14
|
-
right: import("@ifc-lite/sdk").EntityRef;
|
|
15
|
-
}[];
|
|
16
|
-
trimExtendElement: (ref: import("@ifc-lite/sdk").EntityRef, params: import("@ifc-lite/create").ElementTrimExtendParams) => import("@ifc-lite/sdk").EntityRef[];
|
|
17
|
-
copyElements: (modelId: string, expressIds: readonly number[], transforms: readonly import("@ifc-lite/create").CopyTransform[]) => import("@ifc-lite/sdk").EntityRef[];
|
|
18
|
-
duplicateElement: (ref: import("@ifc-lite/sdk").EntityRef, options: {
|
|
19
|
-
offset: [number, number, number];
|
|
20
|
-
Name?: string;
|
|
21
|
-
}) => import("@ifc-lite/sdk").EntityRef;
|
|
22
|
-
arrayElements: (modelId: string, expressIds: readonly number[], params: import("@ifc-lite/create").CopyArrayParams) => import("@ifc-lite/sdk").EntityRef[];
|
|
23
|
-
editHostedElement: (ref: import("@ifc-lite/sdk").EntityRef, patch: import("@ifc-lite/create").HostedElementEdit) => import("@ifc-lite/sdk").EntityRef;
|
|
24
|
-
addCurtainWall: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").CurtainWallInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
25
|
-
addGrid: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").GridInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
26
|
-
addColumnOnGrid: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").ColumnInStoreParams | import("@ifc-lite/create").ProfiledColumnInStoreParams, binding: import("@ifc-lite/create").GridColumnBinding) => import("@ifc-lite/sdk").EntityRef;
|
|
27
|
-
replaceElement: (ref: import("@ifc-lite/sdk").EntityRef, storeyExpressId: number, element: import("@ifc-lite/create").InStoreReplacementElement) => import("@ifc-lite/sdk").EntityRef;
|
|
28
|
-
removeStair: (ref: Parameters<NonNullable<((ref: import("@ifc-lite/sdk").EntityRef) => boolean) | undefined>>[0]) => boolean;
|
|
29
|
-
addStair: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").StairInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
30
|
-
addRailing: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").RailingInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
31
|
-
addElementType: (modelId: string, params: import("@ifc-lite/create").ElementTypeInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
32
|
-
assignType: (modelId: string, typeExpressId: number, objectExpressIds: number[]) => import("@ifc-lite/sdk").EntityRef;
|
|
33
|
-
addMaterial: (modelId: string, params: import("@ifc-lite/create").MaterialInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
34
|
-
addMaterialLayerSet: (modelId: string, params: import("@ifc-lite/create").MaterialLayerSetInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
35
|
-
addMaterialLayerSetUsage: (modelId: string, params: import("@ifc-lite/create").MaterialLayerSetUsageInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
36
|
-
assignMaterial: (modelId: string, materialExpressId: number, objectExpressIds: number[]) => import("@ifc-lite/sdk").EntityRef;
|
|
37
|
-
addOpening: (modelId: string, hostExpressId: number, params: import("@ifc-lite/create").OpeningInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
38
|
-
addHostedDoor: (modelId: string, hostExpressId: number, params: import("@ifc-lite/create").HostedDoorInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
39
|
-
addHostedWindow: (modelId: string, hostExpressId: number, params: import("@ifc-lite/create").HostedWindowInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
40
|
-
joinWalls: (modelId: string, aExpressId: number, bExpressId: number, options?: import("@ifc-lite/create").WallJoinApplyOptions | undefined) => import("@ifc-lite/sdk").EntityRef;
|
|
41
|
-
addWall: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddWallInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
42
|
-
addColumn: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/create").ProfiledColumnInStoreParams | import("@ifc-lite/sdk").AddColumnInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
43
|
-
addSlab: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddSlabInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
44
|
-
addBeam: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddBeamInStoreParams | import("@ifc-lite/create").ProfiledBeamInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
45
|
-
addSpace: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddSpaceInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
46
|
-
addRoof: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddRoofInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
47
|
-
addPlate: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddPlateInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
48
|
-
addMember: (modelId: string, storeyExpressId: number, params: import("@ifc-lite/sdk").AddMemberInStoreParams | import("@ifc-lite/create").ProfiledMemberInStoreParams) => import("@ifc-lite/sdk").EntityRef;
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=headless-backend-modelling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-backend-modelling.d.ts","sourceRoot":"","sources":["../src/headless-backend-modelling.ts"],"names":[],"mappings":"AAIA;gFACgF;AAChF,OAAO,EAAsF,KAAK,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAGrJ,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;uBAsE5D,UAAU,CAAC,WAAW,mEAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;EAkCxE"}
|