@pascal-app/core 1.1.1 → 1.1.2
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/dist/agent-operations/__fixtures__/roof-bearing-cases.d.ts +13453 -13453
- package/dist/agent-operations/batch.d.ts +4 -8
- package/dist/agent-operations/batch.d.ts.map +1 -1
- package/dist/agent-operations/batch.js +7 -19
- package/dist/agent-operations/circulation-spaces.d.ts +3431 -3431
- package/dist/agent-operations/index.d.ts +5715 -9
- package/dist/agent-operations/index.d.ts.map +1 -1
- package/dist/agent-operations/index.js +16 -5
- package/dist/agent-operations/scene-queries.d.ts +2610 -2610
- package/dist/agent-operations/types.d.ts +7 -0
- package/dist/agent-operations/types.d.ts.map +1 -1
- package/dist/agent-operations/usage-checks.js +2 -2
- package/dist/agent-operations/verify-scene.d.ts +7 -3
- package/dist/agent-operations/verify-scene.d.ts.map +1 -1
- package/dist/agent-operations/verify-scene.js +15 -7
- package/dist/building/__fixtures__/wall-opening-cases.d.ts +238 -238
- package/dist/building/level-duplication.d.ts +1274 -1274
- package/dist/commands/structure/zone-wall-merge.d.ts +568 -568
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +2610 -2610
- package/dist/lib/__fixtures__/mezzanine.d.ts +10874 -10874
- package/dist/lib/absorb-wall-separators.d.ts +635 -635
- package/dist/lib/steps.d.ts +8 -0
- package/dist/lib/steps.d.ts.map +1 -0
- package/dist/lib/steps.js +7 -0
- package/dist/spatial/usage-field/findings.d.ts +3 -0
- package/dist/spatial/usage-field/findings.d.ts.map +1 -1
- package/dist/spatial/usage-field/findings.js +17 -5
- package/dist/spatial/usage-field/measure.d.ts +3 -1
- package/dist/spatial/usage-field/measure.d.ts.map +1 -1
- package/dist/spatial/usage-field/measure.js +7 -2
- package/dist/store/actions/node-actions.d.ts +3431 -3431
- package/dist/store/scene-annotations.d.ts +1193 -1193
- package/dist/systems/slab/__fixtures__/floor-step.d.ts +3431 -3431
- package/dist/systems/slab/__fixtures__/raised-room.d.ts +2610 -2610
- package/dist/systems/stair/stair-opening-preview.d.ts +2610 -2610
- package/dist/utils/ensure-scene-openings.d.ts +6215 -6215
- package/dist/utils/floor-plate-migration.d.ts +635 -635
- package/dist/utils/owned-floor-opening-migration.d.ts +635 -635
- package/dist/utils/reconcile-structure-on-load.d.ts +3431 -3431
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { AgentOperation,
|
|
2
|
+
import type { AgentOperation, AgentOperationSteps } from './types.js';
|
|
3
3
|
type BatchInput = {
|
|
4
4
|
calls: {
|
|
5
5
|
tool: string;
|
|
@@ -11,18 +11,14 @@ type Contract = {
|
|
|
11
11
|
name: string;
|
|
12
12
|
input: Record<string, z.ZodType>;
|
|
13
13
|
};
|
|
14
|
-
/** A batch one call at a time: each resume runs the next call, and the last returns the outcome. */
|
|
15
|
-
export type BatchSteps = (...args: Parameters<AgentOperation<BatchInput>>) => Generator<void, AgentOperationOutcome, void>;
|
|
16
14
|
/**
|
|
17
15
|
* `run_batch`: shared tools in order, each on the scene the calls before it left, their changes
|
|
18
16
|
* merged into one set — one undo step, one write on either surface. The user: the model spent a
|
|
19
17
|
* round trip per step on what could be serialised (deleting balcony walls one by one, the same
|
|
20
18
|
* build on every floor). Pre-check and operation refusals follow the same per-call policy.
|
|
21
|
-
* It stops after each call,
|
|
22
|
-
* (`
|
|
19
|
+
* It stops after each call, and where a call that runs in steps (`stepped`) does, so a host that
|
|
20
|
+
* can let other work run meanwhile does (`AGENT_OPERATIONS.run_batch` runs it through in one go).
|
|
23
21
|
*/
|
|
24
|
-
export declare function createBatchSteps(operations: Readonly<Record<string, AgentOperation<never>>>, contracts: readonly Contract[]):
|
|
25
|
-
/** `run_batch` as one synchronous operation: every call, back to back. */
|
|
26
|
-
export declare function createBatchOperation(operations: Readonly<Record<string, AgentOperation<never>>>, contracts: readonly Contract[]): AgentOperation<BatchInput>;
|
|
22
|
+
export declare function createBatchSteps(operations: Readonly<Record<string, AgentOperation<never>>>, contracts: readonly Contract[], stepped?: Readonly<Record<string, AgentOperationSteps<never>>>): AgentOperationSteps<BatchInput>;
|
|
27
23
|
export {};
|
|
28
24
|
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../src/agent-operations/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../src/agent-operations/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAOvB,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAgB,MAAM,SAAS,CAAA;AAEhF,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC5B,CAAA;AACD,KAAK,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAA;CAAE,CAAA;AA8BlE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,EAC3D,SAAS,EAAE,SAAS,QAAQ,EAAE,EAC9B,OAAO,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAM,GACjE,mBAAmB,CAAC,UAAU,CAAC,CAqFjC"}
|
|
@@ -21,10 +21,10 @@ function prepareCall(call, index, operations, contracts) {
|
|
|
21
21
|
* merged into one set — one undo step, one write on either surface. The user: the model spent a
|
|
22
22
|
* round trip per step on what could be serialised (deleting balcony walls one by one, the same
|
|
23
23
|
* build on every floor). Pre-check and operation refusals follow the same per-call policy.
|
|
24
|
-
* It stops after each call,
|
|
25
|
-
* (`
|
|
24
|
+
* It stops after each call, and where a call that runs in steps (`stepped`) does, so a host that
|
|
25
|
+
* can let other work run meanwhile does (`AGENT_OPERATIONS.run_batch` runs it through in one go).
|
|
26
26
|
*/
|
|
27
|
-
export function createBatchSteps(operations, contracts) {
|
|
27
|
+
export function createBatchSteps(operations, contracts, stepped = {}) {
|
|
28
28
|
return function* (nodes, { calls, onRefusal = 'stop' }, context) {
|
|
29
29
|
let working = nodes;
|
|
30
30
|
let workingContext = context;
|
|
@@ -38,10 +38,10 @@ export function createBatchSteps(operations, contracts) {
|
|
|
38
38
|
catalog: workingContext.catalog,
|
|
39
39
|
});
|
|
40
40
|
const { operation, input } = prepareCall(call, index, operations, contracts);
|
|
41
|
-
const {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
const callContext = { ...workingContext, batchCall: index };
|
|
42
|
+
const { result, changes } = Object.hasOwn(stepped, call.tool)
|
|
43
|
+
? yield* stepped[call.tool](working, input, callContext)
|
|
44
|
+
: operation(working, input, callContext);
|
|
45
45
|
if (changes) {
|
|
46
46
|
sets.push(changes);
|
|
47
47
|
working = applySceneChanges(working, changes);
|
|
@@ -104,15 +104,3 @@ export function createBatchSteps(operations, contracts) {
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
/** `run_batch` as one synchronous operation: every call, back to back. */
|
|
108
|
-
export function createBatchOperation(operations, contracts) {
|
|
109
|
-
const steps = createBatchSteps(operations, contracts);
|
|
110
|
-
return (nodes, input, context) => {
|
|
111
|
-
const batch = steps(nodes, input, context);
|
|
112
|
-
for (;;) {
|
|
113
|
-
const step = batch.next();
|
|
114
|
-
if (step.done)
|
|
115
|
-
return step.value;
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
}
|