@tangle-network/agent-app 0.26.0 → 0.28.0
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/DesignCanvas-AOIVN3SJ.js +12 -0
- package/dist/DesignCanvasEditor-TN7CWUJW.js +13 -0
- package/dist/{TimelineEditor-JDG54OBP.js → TimelineEditor-Z7C6BFP5.js} +2 -2
- package/dist/{apply-Cp8c3K9D.d.ts → apply-Gk4raT2j.d.ts} +3 -1
- package/dist/brand-extraction/index.d.ts +212 -0
- package/dist/brand-extraction/index.js +446 -0
- package/dist/brand-extraction/index.js.map +1 -0
- package/dist/{chunk-AFDROJ64.js → chunk-2QI7XV2T.js} +1 -1
- package/dist/chunk-2QI7XV2T.js.map +1 -0
- package/dist/{chunk-LUE4HO5C.js → chunk-4IQMTTNE.js} +10 -10
- package/dist/chunk-4IQMTTNE.js.map +1 -0
- package/dist/{chunk-FSUR2752.js → chunk-7I37CO5D.js} +274 -388
- package/dist/chunk-7I37CO5D.js.map +1 -0
- package/dist/{chunk-5RT6KY4G.js → chunk-GQRL6VNU.js} +1 -1
- package/dist/chunk-GQRL6VNU.js.map +1 -0
- package/dist/{chunk-SCG5JJ4C.js → chunk-HFC4BTWJ.js} +32 -4
- package/dist/chunk-HFC4BTWJ.js.map +1 -0
- package/dist/{chunk-7QCIYDGC.js → chunk-IOREXWLM.js} +2 -2
- package/dist/chunk-J7JNV5BH.js +14 -0
- package/dist/chunk-J7JNV5BH.js.map +1 -0
- package/dist/{chunk-6UOE5CTA.js → chunk-JT6HHO5P.js} +5 -10
- package/dist/chunk-JT6HHO5P.js.map +1 -0
- package/dist/{chunk-JZAJE3JL.js → chunk-M2EBUDZ7.js} +19 -5
- package/dist/chunk-M2EBUDZ7.js.map +1 -0
- package/dist/{chunk-RJ2ZHK5D.js → chunk-S6WS2B32.js} +132 -7
- package/dist/chunk-S6WS2B32.js.map +1 -0
- package/dist/chunk-SQV7NUEM.js +136 -0
- package/dist/chunk-SQV7NUEM.js.map +1 -0
- package/dist/chunk-UAKFCMWK.js +1 -0
- package/dist/chunk-UAKFCMWK.js.map +1 -0
- package/dist/chunk-V5XZKHCL.js +296 -0
- package/dist/chunk-V5XZKHCL.js.map +1 -0
- package/dist/chunk-XWJXZ6WE.js +604 -0
- package/dist/chunk-XWJXZ6WE.js.map +1 -0
- package/dist/chunk-Y2SZVW35.js +125 -0
- package/dist/chunk-Y2SZVW35.js.map +1 -0
- package/dist/{chunk-LPAVBGVY.js → chunk-YEWTVDDT.js} +399 -860
- package/dist/chunk-YEWTVDDT.js.map +1 -0
- package/dist/{chunk-UDXMR3AD.js → chunk-YNALYIQ3.js} +56 -18
- package/dist/chunk-YNALYIQ3.js.map +1 -0
- package/dist/command-stack-CkjelfK_.d.ts +267 -0
- package/dist/design-canvas/drizzle.d.ts +2 -2
- package/dist/design-canvas/index.d.ts +7 -6
- package/dist/design-canvas/index.js +3 -2
- package/dist/design-canvas-react/engine.d.ts +349 -0
- package/dist/design-canvas-react/engine.js +86 -0
- package/dist/design-canvas-react/engine.js.map +1 -0
- package/dist/design-canvas-react/index.d.ts +80 -618
- package/dist/design-canvas-react/index.js +85 -172
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.d.ts +6 -0
- package/dist/design-canvas-react/lazy.js +9 -0
- package/dist/design-canvas-react/lazy.js.map +1 -0
- package/dist/{export-presets-Dl5Aa5xj.d.ts → export-presets-DAsU5Wal.d.ts} +2 -143
- package/dist/flow-types-Cb_AblZs.d.ts +25 -0
- package/dist/index.d.ts +11 -8
- package/dist/index.js +21 -8
- package/dist/lazy-BHHqS8-j.d.ts +72 -0
- package/dist/missions/index.d.ts +12 -0
- package/dist/missions/index.js +1 -1
- package/dist/{model-BHLN208Z.d.ts → model-BBwyOuWG.d.ts} +3 -1
- package/dist/operations-DLIvvD00.d.ts +144 -0
- package/dist/platform/index.js +1 -1
- package/dist/runtime/index.d.ts +33 -33
- package/dist/runtime/index.js +1 -1
- package/dist/sequences/index.d.ts +1 -1
- package/dist/sequences/index.js +2 -1
- package/dist/sequences-react/index.d.ts +15 -1
- package/dist/sequences-react/index.js +2 -2
- package/dist/{store-CUStmtdH.d.ts → store-CFyxgTlD.d.ts} +1 -1
- package/dist/theme/index.d.ts +80 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/tailwind-preset.d.ts +65 -0
- package/dist/theme/tailwind-preset.js +33 -0
- package/dist/theme/tailwind-preset.js.map +1 -0
- package/dist/theme/tokens.css +95 -0
- package/dist/trace/index.d.ts +2 -18
- package/dist/trace/index.js +2 -2
- package/dist/web/index.d.ts +25 -2
- package/dist/web/index.js +3 -1
- package/dist/web-react/index.d.ts +71 -31
- package/dist/web-react/index.js +625 -486
- package/dist/web-react/index.js.map +1 -1
- package/package.json +33 -3
- package/dist/DesignCanvas-MA5EH324.js +0 -10
- package/dist/DesignCanvasEditor-YLCO7I5I.js +0 -9
- package/dist/chunk-5RT6KY4G.js.map +0 -1
- package/dist/chunk-6UOE5CTA.js.map +0 -1
- package/dist/chunk-AFDROJ64.js.map +0 -1
- package/dist/chunk-FSUR2752.js.map +0 -1
- package/dist/chunk-JZAJE3JL.js.map +0 -1
- package/dist/chunk-LPAVBGVY.js.map +0 -1
- package/dist/chunk-LUE4HO5C.js.map +0 -1
- package/dist/chunk-RJ2ZHK5D.js.map +0 -1
- package/dist/chunk-SCG5JJ4C.js.map +0 -1
- package/dist/chunk-UDXMR3AD.js.map +0 -1
- /package/dist/{DesignCanvas-MA5EH324.js.map → DesignCanvas-AOIVN3SJ.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-YLCO7I5I.js.map → DesignCanvasEditor-TN7CWUJW.js.map} +0 -0
- /package/dist/{TimelineEditor-JDG54OBP.js.map → TimelineEditor-Z7C6BFP5.js.map} +0 -0
- /package/dist/{chunk-7QCIYDGC.js.map → chunk-IOREXWLM.js.map} +0 -0
|
@@ -1,145 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The design-canvas operation union — the ONE mutation vocabulary shared by
|
|
5
|
-
* the editor's command stack (human edits, undo/redo), the MCP tool
|
|
6
|
-
* dispatcher (agent edits), and programmatic automation (template
|
|
7
|
-
* instantiation, data sync). Every state change the editor can express is an
|
|
8
|
-
* operation here; anything not expressible here does not happen to a
|
|
9
|
-
* document. That closure is the automation contract: replaying a decision
|
|
10
|
-
* log reproduces the document.
|
|
11
|
-
*
|
|
12
|
-
* Attribute patches are validated per element kind in ./validate before
|
|
13
|
-
* ./apply mutates the document; both run server-side on every path.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/** Per-kind attribute patch. `kind` is immutable after creation; ids are
|
|
17
|
-
* immutable always. Validation rejects attrs foreign to the target's kind. */
|
|
18
|
-
type SceneAttrsPatch = Partial<Omit<SceneElement, 'id' | 'kind' | 'children'>> & {
|
|
19
|
-
text?: string;
|
|
20
|
-
width?: number;
|
|
21
|
-
height?: number;
|
|
22
|
-
points?: number[];
|
|
23
|
-
fill?: string;
|
|
24
|
-
stroke?: string;
|
|
25
|
-
strokeWidth?: number;
|
|
26
|
-
cornerRadius?: number;
|
|
27
|
-
dash?: number[];
|
|
28
|
-
fontFamily?: string;
|
|
29
|
-
fontSize?: number;
|
|
30
|
-
fontStyle?: 'normal' | 'bold' | 'italic' | 'bold italic';
|
|
31
|
-
align?: 'left' | 'center' | 'right';
|
|
32
|
-
lineHeight?: number;
|
|
33
|
-
letterSpacing?: number;
|
|
34
|
-
src?: string;
|
|
35
|
-
posterSrc?: string;
|
|
36
|
-
fit?: 'fill' | 'cover' | 'contain';
|
|
37
|
-
};
|
|
38
|
-
interface AddElementOperation {
|
|
39
|
-
type: 'add_element';
|
|
40
|
-
pageId: string;
|
|
41
|
-
/** Complete element including caller-minted id (reconciled like sequences
|
|
42
|
-
* clips when the server re-mints). */
|
|
43
|
-
element: SceneElement;
|
|
44
|
-
/** Insertion z-index; omitted → top. */
|
|
45
|
-
index?: number;
|
|
46
|
-
/** Parent group; omitted → page root. */
|
|
47
|
-
parentGroupId?: string;
|
|
48
|
-
}
|
|
49
|
-
interface SetAttrsOperation {
|
|
50
|
-
type: 'set_attrs';
|
|
51
|
-
pageId: string;
|
|
52
|
-
elementId: string;
|
|
53
|
-
attrs: SceneAttrsPatch;
|
|
54
|
-
}
|
|
55
|
-
interface ReorderElementOperation {
|
|
56
|
-
type: 'reorder_element';
|
|
57
|
-
pageId: string;
|
|
58
|
-
elementId: string;
|
|
59
|
-
/** Target index within the element's CURRENT owner (page root or group). */
|
|
60
|
-
toIndex: number;
|
|
61
|
-
}
|
|
62
|
-
interface DeleteElementOperation {
|
|
63
|
-
type: 'delete_element';
|
|
64
|
-
pageId: string;
|
|
65
|
-
elementId: string;
|
|
66
|
-
}
|
|
67
|
-
interface GroupElementsOperation {
|
|
68
|
-
type: 'group_elements';
|
|
69
|
-
pageId: string;
|
|
70
|
-
/** ≥ 2 sibling elements (same owner); grouped in their current z-order. */
|
|
71
|
-
elementIds: string[];
|
|
72
|
-
/** Caller-minted id for the new group. */
|
|
73
|
-
groupId: string;
|
|
74
|
-
name?: string;
|
|
75
|
-
}
|
|
76
|
-
interface UngroupElementOperation {
|
|
77
|
-
type: 'ungroup_element';
|
|
78
|
-
pageId: string;
|
|
79
|
-
groupId: string;
|
|
80
|
-
}
|
|
81
|
-
interface AddPageOperation {
|
|
82
|
-
type: 'add_page';
|
|
83
|
-
/** Caller-minted page id. */
|
|
84
|
-
pageId: string;
|
|
85
|
-
options?: NewPageOptions;
|
|
86
|
-
/** Position in the page list; omitted → end. */
|
|
87
|
-
index?: number;
|
|
88
|
-
}
|
|
89
|
-
interface DuplicatePageOperation {
|
|
90
|
-
type: 'duplicate_page';
|
|
91
|
-
sourcePageId: string;
|
|
92
|
-
/** Caller-minted id for the copy; element ids are re-minted server-side. */
|
|
93
|
-
pageId: string;
|
|
94
|
-
}
|
|
95
|
-
interface DeletePageOperation {
|
|
96
|
-
type: 'delete_page';
|
|
97
|
-
pageId: string;
|
|
98
|
-
}
|
|
99
|
-
interface ReorderPageOperation {
|
|
100
|
-
type: 'reorder_page';
|
|
101
|
-
pageId: string;
|
|
102
|
-
toIndex: number;
|
|
103
|
-
}
|
|
104
|
-
interface SetPagePropsOperation {
|
|
105
|
-
type: 'set_page_props';
|
|
106
|
-
pageId: string;
|
|
107
|
-
name?: string;
|
|
108
|
-
width?: number;
|
|
109
|
-
height?: number;
|
|
110
|
-
background?: string;
|
|
111
|
-
/** null clears bleed; omitted leaves unchanged. */
|
|
112
|
-
bleed?: PageBleed | null;
|
|
113
|
-
}
|
|
114
|
-
interface SetPageGuidesOperation {
|
|
115
|
-
type: 'set_page_guides';
|
|
116
|
-
pageId: string;
|
|
117
|
-
guides: PageGuides;
|
|
118
|
-
}
|
|
119
|
-
interface BindSlotOperation {
|
|
120
|
-
type: 'bind_slot';
|
|
121
|
-
pageId: string;
|
|
122
|
-
elementId: string;
|
|
123
|
-
/** null unbinds. Slot names are unique document-wide. */
|
|
124
|
-
slot: string | null;
|
|
125
|
-
}
|
|
126
|
-
/** Fill slots with data — text slots take strings, image/video slots take
|
|
127
|
-
* src URLs. Unknown slot names throw; partial application is allowed. */
|
|
128
|
-
interface ApplyDataOperation {
|
|
129
|
-
type: 'apply_data';
|
|
130
|
-
bindings: Record<string, string>;
|
|
131
|
-
}
|
|
132
|
-
interface SetDocumentTitleOperation {
|
|
133
|
-
type: 'set_document_title';
|
|
134
|
-
title: string;
|
|
135
|
-
}
|
|
136
|
-
type SceneOperation = AddElementOperation | SetAttrsOperation | ReorderElementOperation | DeleteElementOperation | GroupElementsOperation | UngroupElementOperation | AddPageOperation | DuplicatePageOperation | DeletePageOperation | ReorderPageOperation | SetPagePropsOperation | SetPageGuidesOperation | BindSlotOperation | ApplyDataOperation | SetDocumentTitleOperation;
|
|
137
|
-
interface ScenePlan {
|
|
138
|
-
summary: string;
|
|
139
|
-
operations: SceneOperation[];
|
|
140
|
-
}
|
|
141
|
-
type SceneOperationType = SceneOperation['type'];
|
|
142
|
-
declare const SCENE_OPERATION_TYPES: readonly SceneOperationType[];
|
|
1
|
+
import { g as ScenePage, B as Bounds } from './model-BBwyOuWG.js';
|
|
143
2
|
|
|
144
3
|
/**
|
|
145
4
|
* Page size presets, channel-size output presets, and export math for the
|
|
@@ -281,4 +140,4 @@ declare function scalePageForChannelPreset(page: Pick<ScenePage, 'width' | 'heig
|
|
|
281
140
|
*/
|
|
282
141
|
declare function bleedAwareExportRect(page: Pick<ScenePage, 'width' | 'height' | 'bleed'>): Bounds;
|
|
283
142
|
|
|
284
|
-
export {
|
|
143
|
+
export { CHANNEL_PRESETS as C, EXPORT_PRESETS as E, SIZE_PRESETS as S, type ChannelPreset as a, type ChannelPresetId as b, type ChannelScaleResult as c, type ExportCropRect as d, type ExportFormat as e, type ExportPreset as f, type SizePreset as g, bleedAwareExportBounds as h, bleedAwareExportRect as i, findPreset as j, scalePageForChannelPreset as k, matchPreset as m, requireChannelPreset as r, scaleForPreset as s };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared FlowSpan / FlowTrace data shapes — the LEAF both the trace barrel
|
|
3
|
+
* (`./index`, which builds + renders them) and the delegation converters
|
|
4
|
+
* (`./mission-flow`, which emit them) import, so neither has to reach back
|
|
5
|
+
* through the barrel. The barrel re-exports these names unchanged.
|
|
6
|
+
*/
|
|
7
|
+
interface FlowSpan {
|
|
8
|
+
kind: 'pipeline' | 'model' | 'tool';
|
|
9
|
+
name: string;
|
|
10
|
+
startMs: number;
|
|
11
|
+
endMs: number;
|
|
12
|
+
approx?: boolean;
|
|
13
|
+
meta?: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
interface FlowTrace {
|
|
16
|
+
spans: FlowSpan[];
|
|
17
|
+
totalMs: number;
|
|
18
|
+
promptTokens: number;
|
|
19
|
+
completionTokens: number;
|
|
20
|
+
/** Computed when per-token pricing is supplied. */
|
|
21
|
+
costUsd?: number;
|
|
22
|
+
toolCalls: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { FlowSpan as F, FlowTrace as a };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { C as CreateMcpToolHandlerOptions, M as MCP_PROTOCOL_VERSIONS, a as McpP
|
|
|
5
5
|
export { A as AddCitationArgs, a as AddCitationResult, b as AppToolContext, c as AppToolHandlers, d as AppToolOutcome, e as AppToolProducedEvent, f as AppToolTaxonomy, R as RenderUiArgs, g as RenderUiResult, S as ScheduleFollowupArgs, h as ScheduleFollowupResult, i as SubmitProposalArgs, j as SubmitProposalResult } from './types-2rOJo8Hc.js';
|
|
6
6
|
export { BuildDelegationOptions, DELEGATION_MCP_SERVER_KEY, DELEGATION_TOOLS, DelegationMcpServer, buildDelegationMcpServer, delegationMcpForConfig } from './delegation/index.js';
|
|
7
7
|
export { BrokerToken, BrokerTokenMinter, BrokerTokenProvider, BrokerTokenProviderOptions, ConsentUrlInput, buildConsentUrl, createBrokerTokenProvider } from './tangle/index.js';
|
|
8
|
+
export { C as CatalogModel, M as ModelCatalog, R as RouterModel, _ as __resetCatalogCache, b as buildCatalog, f as fetchModelCatalog, n as normalizeModelId } from './model-catalog-BEAEVDaa.js';
|
|
9
|
+
export { C as CreateTangleRouterModelConfigOptions, D as DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR, a as DEFAULT_TANGLE_ROUTER_BASE_URL, R as ResolveModelOptions, b as ResolveUserTangleExecutionKeyForUserOptions, c as ResolveUserTangleExecutionKeyOptions, d as ResolvedTangleExecutionKey, T as TangleBillingEnforcementOptions, e as TangleExecutionEnvironment, f as TangleExecutionKeyError, g as TangleExecutionKeyErrorCode, h as TangleExecutionKeyHttpError, i as TangleExecutionKeySource, j as TangleModelConfig, k as createTangleRouterModelConfig, l as isTangleBillingEnforcementDisabled, m as isTangleExecutionKeyError, r as resolveTangleExecutionEnvironment, n as resolveTangleModelConfig, o as resolveUserTangleExecutionKey, p as resolveUserTangleExecutionKeyForUser, t as tangleExecutionKeyHttpError } from './model-CKzniMMr.js';
|
|
8
10
|
export { AgentRuntime, AgentRuntimeModelConfig, AgentTurnOptions, AnySurfaceKind, CertifiedDelivery, CertifiedDeliveryConfig, CreateAgentRuntimeOptions, LoopEvent, OpenAICompatStreamTurnOptions, OpenAIStreamChunk, ResolvedAgentProfile, SurfaceKindDefinition, SurfaceMcpServer, SurfaceMergeBase, SurfaceOverlay, SurfacePermissionValue, SurfaceRegistry, createAgentRuntime, createCertifiedDelivery, createOpenAICompatStreamTurn, createSurfaceRegistry, defineSurfaceKind, mergeSurfaceOverlay, toLoopEvents } from './runtime/index.js';
|
|
9
11
|
export { createTokenRecallChecker, producedFromToolEvents } from './eval/index.js';
|
|
10
12
|
export { KnowledgeRequirementSpec, KnowledgeSignal, KnowledgeStateAccessor, SatisfiedByRule, buildKnowledgeRequirements, deriveSignals } from './knowledge/index.js';
|
|
@@ -19,21 +21,22 @@ export { HubExecClient, HubExecClientOptions, HubExecErrorCode, HubExecResult, H
|
|
|
19
21
|
export { CompleteMissionInput, CreateMissionInput, DEFAULT_MISSION_STEP_KINDS, InMemoryMissionStore, MISSION_CONTROL_CHANNEL_ID, MissionApprovalsPort, MissionAuditEvent, MissionConcurrencyError, MissionCostLedger, MissionEngine, MissionEngineOptions, MissionEventSink, MissionGateKind, MissionGateOptions, MissionGateProposal, MissionOutcome, MissionPlanRunOptions, MissionProposalResolution, MissionRecord, MissionService, MissionServiceOptions, MissionState, MissionStatus, MissionStep, MissionStepState, MissionStepStatus, MissionStorePort, MissionStreamEvent, MissionStreamStatus, MissionStreamStep, MissionStreamStepStatus, MissionUpdateGuard, MissionUpdatePatch, ParseMissionBlocksOptions, ParsedMission, ParsedMissionStep, PlanOutcome, RetryableStepError, SandboxDispatch, SandboxDispatchDoneResult, SandboxDispatchInProgressResult, SandboxDispatchInput, SandboxDispatchResult, SetStepStatusPatch, StepGateClassification, StepOutcome, applyMissionEvent, asMissionStreamEvent, budgetGateProposalId, buildAgentMissionPlan, createInMemoryMissionStore, createMissionEngine, createMissionService, isMissionStopRequested, isMissionTerminal, mergeMissionState, noopEventSink, parseMissionBlocks, parseSessionStreamEnvelope, reduceMissionEvents, stepGateProposalId, volumeGateProposalId } from './missions/index.js';
|
|
20
22
|
export { S as StepAgentActivity, W as WithAgentActivity, s as stepAgentActivity } from './agent-activity-C8ZG0F0M.js';
|
|
21
23
|
export { AppToolDescriptor, AuthenticatedSandboxUser, BuildAppToolMcpServersOptions, DEFAULT_SANDBOX_RESOURCES, EnsureWorkspaceSandboxOptions, LivenessProbeConfig, MemberSyncSeam, Outcome, ProfileComposeOptions, ProviderResolutionConfig, ResolvedModel, SandboxApiCredentials, SandboxBuildContext, SandboxClientCredentials, SandboxPermissionLevel, SandboxResourceConfig, SandboxRestoreSpec, SandboxRuntimeConfig, SandboxRuntimeConnection, SandboxScope, SandboxStepTransition, SandboxTerminalTokenOptions, SandboxTerminalTokenResult, SandboxTerminalTokenSubject, SandboxTerminalWsMatch, ScopedTokenResult, SecretStore, StreamSandboxPromptOptions, TerminalProxyIdentity, WorkspaceSandboxConnectionArgs, WorkspaceSandboxConnectionHandlerOptions, WorkspaceSandboxEnsureContext, WorkspaceSandboxInstanceLike, WorkspaceSandboxManager, WorkspaceSandboxManagerOptions, WorkspaceSandboxRuntimeProxyArgs, WorkspaceSandboxRuntimeProxyHandlerOptions, WorkspaceSandboxTerminalUpgradeHandlerOptions, attachReasoningEffort, bearerSubprotocolToken, bearerToken, buildAppToolMcpServers, buildSandboxRuntimeProxyHeaders, classifySeveredStream, createSandboxTerminalToken, createWorkspaceSandboxConnectionHandler, createWorkspaceSandboxManager, createWorkspaceSandboxRuntimeProxyHandler, createWorkspaceSandboxTerminalUpgradeHandler, deleteSecret, detectInteractiveQuestion, driveSandboxTurn, encodeSandboxRuntimePath, ensureWorkspaceSandbox, flattenHistory, getClient, isSandboxTerminalWsUpgrade, isTerminalPromptEvent, matchSandboxTerminalWsPath, mergeExtraMcp, mintSandboxScopedToken, mintTerminalProxyToken, readSecret, resetClientCache, resolveModel, runSandboxPrompt, secretStoreFromClient, splitDeferredProfileFiles, storeSecret, streamSandboxPrompt, syncSandboxMemberAdd, syncSandboxMemberRemove, syncSandboxMemberRole, terminalTokenFromRequest, verifySandboxTerminalToken, verifyTerminalProxyToken, writeProfileFilesToBox } from './sandbox/index.js';
|
|
22
|
-
export { CookieOptions, JsonObject, KvLike, RateLimitResult, RequestContext, SecurityHeaderOptions, addSecurityHeaders, checkRateLimit, clearCookieHeader, extractRequestContext, parseJsonObjectBody, readCookieValue, requireString, serializeCookie } from './web/index.js';
|
|
24
|
+
export { CookieOptions, JsonObject, KvLike, RateLimitResult, RequestContext, SecurityHeaderOptions, addSecurityHeaders, assertMediaUrl, checkRateLimit, clearCookieHeader, extractRequestContext, parseJsonObjectBody, readCookieValue, requireString, serializeCookie } from './web/index.js';
|
|
23
25
|
export { BuildRedactedDocumentOptions, DEFAULT_REDACTION_PATTERNS, RedactForIngestionOptions, RedactedDocSegment, RedactedDocument, RedactionPattern, RedactionSpan, RevealResult, RevealSpanOptions, buildRedactedDocument, detectSpans, maskSpans, redactForIngestion, revealSpan } from './redact/index.js';
|
|
24
26
|
export { ApprovalEvent, ApprovalEventSchema, AssetContentMap, AssetFormat, AssetSpec, AssetStatus, AssetVariant, BrandTokens, BrandTokensSchema, ConversionMetrics, ConversionMetricsSchema, CopyContent, CopyContentSchema, CopyPlatform, EmailBodySection, EmailContent, EmailContentSchema, EmailCtaSection, EmailDividerSection, EmailFeatureSection, EmailHeroSection, EmailSection, EmailTestimonialSection, ImageBackground, ImageContent, ImageContentSchema, ImageImageLayer, ImageLayer, ImageLayerType, ImageLogoLayer, ImageShapeLayer, ImageSlide, ImageTextLayer, VideoCaption, VideoContent, VideoContentSchema, VideoCountdownScene, VideoImageRevealScene, VideoScene, VideoSlideScene, VideoTextAnimationScene, parseAssetSpec, safeParseAssetSpec } from './assets/index.js';
|
|
25
|
-
export {
|
|
27
|
+
export { AgentAppTheme, CanvasRenderPalette, darkTheme, lightTheme, themeColor, themeToCssVars } from './theme/index.js';
|
|
28
|
+
export { DistributionSummary, LoopTraceEventLike, MissionFlowStep, MissionTraceContext, StepSpanContext, TimedEvent, buildFlowTrace, childSpanContext, composeMissionFlowTrace, createMissionTraceContext, delegationActivityToFlowSpans, loopTraceEventsToFlowSpans, renderHistogram, renderWaterfall, stepActivityFlowTrace, summarize, timedEventsFromLines, traceEnv } from './trace/index.js';
|
|
26
29
|
export { M as MIN_SEQUENCE_CLIP_FRAMES, N as NewSequenceClip, a as NewSequenceDecision, b as NewSequenceTrack, S as SequenceClip, c as SequenceClipMedia, d as SequenceClipPatch, e as SequenceDecision, f as SequenceExportFormat, g as SequenceExportRecord, h as SequenceExportStatus, i as SequenceFrameSnapshot, j as SequenceMediaKind, k as SequenceMeta, l as SequenceStatus, m as SequenceStore, n as SequenceStoreScope, o as SequenceTimeline, p as SequenceTrack, q as SequenceTrackKind, T as TimelineClipBounds, r as TimelineInterval, s as assertClipFitsSequence, t as chooseCaptionPlacement, u as clampClipDuration, v as clampClipStart, w as formatSeconds, x as formatTimecode, y as framesToSeconds, z as secondsToFrames, A as snapshotFrame, B as trackIntervals } from './store-gckrNq-g.js';
|
|
27
|
-
export { A as AddCaptionOperation, C as CaptionTargetResolution, a as CreateTrackOperation, D as DeleteClipOperation, E as ExtendSequenceOperation, M as MoveClipOperation, P as PlaceClipOperation, Q as QueueExportOperation, S as SEQUENCE_OPERATION_TYPES, b as SequenceApplyResult, c as SequenceOperation, d as SequenceOperationContext, e as SequenceOperationType, f as SequencePlan, g as SetClipDisabledOperation, h as SetClipTextOperation, i as SplitClipOperation, T as TrimClipOperation, j as applySequenceOperation, k as applySequenceOperations, l as assertSequenceMediaUrl, m as captionTrackNameForLanguage, n as lastClipEndFrame, p as parseSequenceOperations, r as resolveCaptionPlacement, o as resolveCaptionTarget, q as resolvePlaceClipTrack, v as validateAddCaption, s as validateCreateTrack, t as validateDeleteClip, u as validateExtendSequence, w as validateMoveClip, x as validatePlaceClip, y as validateQueueExport, z as validateSequenceOperation, B as validateSequenceOperations, F as validateSetClipDisabled, G as validateSetClipText, H as validateSplitClip, I as validateTrimClip } from './apply-
|
|
30
|
+
export { A as AddCaptionOperation, C as CaptionTargetResolution, a as CreateTrackOperation, D as DeleteClipOperation, E as ExtendSequenceOperation, M as MoveClipOperation, P as PlaceClipOperation, Q as QueueExportOperation, S as SEQUENCE_OPERATION_TYPES, b as SequenceApplyResult, c as SequenceOperation, d as SequenceOperationContext, e as SequenceOperationType, f as SequencePlan, g as SetClipDisabledOperation, h as SetClipTextOperation, i as SplitClipOperation, T as TrimClipOperation, j as applySequenceOperation, k as applySequenceOperations, l as assertSequenceMediaUrl, m as captionTrackNameForLanguage, n as lastClipEndFrame, p as parseSequenceOperations, r as resolveCaptionPlacement, o as resolveCaptionTarget, q as resolvePlaceClipTrack, v as validateAddCaption, s as validateCreateTrack, t as validateDeleteClip, u as validateExtendSequence, w as validateMoveClip, x as validatePlaceClip, y as validateQueueExport, z as validateSequenceOperation, B as validateSequenceOperations, F as validateSetClipDisabled, G as validateSetClipText, H as validateSplitClip, I as validateTrimClip } from './apply-Gk4raT2j.js';
|
|
28
31
|
export { BuildCaptionChunksOptions, BuildSequencesMcpServerEntryOptions, CaptionChunk, CaptionCoverageEntry, CaptionExportOptions, ContactSheetEntry, ContactSheetManifest, CreateSequencesMcpHandlerOptions, DEFAULT_SEQUENCES_MCP_DESCRIPTION, LanguageFanoutOptions, MAX_CAPTION_BATCH, OtioClip, OtioExternalReference, OtioGap, OtioMissingReference, OtioRationalTime, OtioStack, OtioTimeRange, OtioTimeline, OtioTrack, SEQUENCES_MCP_PROTOCOL_VERSIONS, SEQUENCE_EXPORT_FORMATS, SEQUENCE_MCP_TOOLS, SEQUENCE_MEDIA_KINDS, SEQUENCE_TRACK_KINDS, SequenceMcpToolDefinition, SequenceMcpToolEnv, SequencesMcpServerInfo, TranscriptSegment, buildCaptionChunks, buildContactSheetManifest, buildEdl, buildOtio, buildSequencesMcpServerEntry, buildSrt, buildVtt, captionCoverage, createSequencesMcpHandler, findSequenceMcpTool, normalizeLanguageTag, planLanguageFanout } from './sequences/index.js';
|
|
29
|
-
export { B as Bounds, E as EllipseElement, G as GroupElement, I as ImageElement, L as LineElement, N as NewPageOptions, P as PageBleed, a as PageGuides, R as RectElement, S as SCENE_ELEMENT_KINDS, b as SCENE_SCHEMA_VERSION, c as SceneDocument, d as SceneElement, e as SceneElementBase, f as SceneElementKind, g as ScenePage, h as SceneSettings, T as TextElement, V as VideoElement, i as assertColor, j as assertFinite, k as assertPositiveFinite, l as assertSceneMediaSrc, m as boundsIntersect, n as collectSlots, o as createEmptyDocument, p as createPage, q as elementAabb, r as elementExtent, s as estimateTextHeight, t as findElement, u as requireElement, v as requirePage } from './model-
|
|
30
|
-
export { A as AddElementOperation, a as AddPageOperation, b as ApplyDataOperation, B as BindSlotOperation,
|
|
31
|
-
export { N as NewSceneDecision, S as SceneDecision, a as SceneDocumentRecord, b as SceneExportFormat, c as SceneExportRecord, d as SceneStore, e as SceneStoreScope } from './store-
|
|
32
|
+
export { B as Bounds, E as EllipseElement, G as GroupElement, I as ImageElement, L as LineElement, N as NewPageOptions, P as PageBleed, a as PageGuides, R as RectElement, S as SCENE_ELEMENT_KINDS, b as SCENE_SCHEMA_VERSION, c as SceneDocument, d as SceneElement, e as SceneElementBase, f as SceneElementKind, g as ScenePage, h as SceneSettings, T as TextElement, V as VideoElement, i as assertColor, j as assertFinite, k as assertPositiveFinite, l as assertSceneMediaSrc, m as boundsIntersect, n as collectSlots, o as createEmptyDocument, p as createPage, q as elementAabb, r as elementExtent, s as estimateTextHeight, t as findElement, u as requireElement, v as requirePage } from './model-BBwyOuWG.js';
|
|
33
|
+
export { A as AddElementOperation, a as AddPageOperation, b as ApplyDataOperation, B as BindSlotOperation, D as DeleteElementOperation, c as DeletePageOperation, d as DuplicatePageOperation, G as GroupElementsOperation, R as ReorderElementOperation, e as ReorderPageOperation, S as SCENE_OPERATION_TYPES, f as SceneAttrsPatch, g as SceneOperation, h as SceneOperationType, i as ScenePlan, j as SetAttrsOperation, k as SetDocumentTitleOperation, l as SetPageGuidesOperation, m as SetPagePropsOperation, U as UngroupElementOperation } from './operations-DLIvvD00.js';
|
|
34
|
+
export { N as NewSceneDecision, S as SceneDecision, a as SceneDocumentRecord, b as SceneExportFormat, c as SceneExportRecord, d as SceneStore, e as SceneStoreScope } from './store-CFyxgTlD.js';
|
|
32
35
|
export { ApplySceneOptions, BuildDesignCanvasMcpServerEntryOptions, CANVAS_ELEMENT_KINDS, CANVAS_MCP_TOOLS, CANVAS_MCP_TOOL_NAMES, CreateDesignCanvasMcpHandlerOptions, DEFAULT_DESIGN_CANVAS_MCP_DESCRIPTION, DesignCanvasMcpServerInfo, DesignCanvasMcpToolEnv, InstantiateOptions, SceneApplyResult, SlotFillKind, TemplateSlot, applyBindingsToDocument, applySceneOperation, applySceneOperations, buildDesignCanvasMcpServerEntry, createDesignCanvasMcpHandler, findCanvasMcpTool, instantiateTemplate, listTemplateSlots, storeApplyScenePlan, validateBindings, validateSceneOperation, validateSceneOperations, validateSlotValue } from './design-canvas/index.js';
|
|
36
|
+
export { C as CHANNEL_PRESETS, a as ChannelPreset, b as ChannelPresetId, c as ChannelScaleResult, E as EXPORT_PRESETS, d as ExportCropRect, e as ExportFormat, f as ExportPreset, S as SIZE_PRESETS, g as SizePreset, h as bleedAwareExportBounds, i as bleedAwareExportRect, j as findPreset, m as matchPreset, r as requireChannelPreset, s as scaleForPreset, k as scalePageForChannelPreset } from './export-presets-DAsU5Wal.js';
|
|
33
37
|
export { RunToolLoopOptions as AppToolLoopOptions, ToolLoopAssistantToolCall as LoopAssistantToolCall, ToolLoopMessage as LoopMessage, ToolLoopCall as LoopToolCall, StreamToolLoopOptions as StreamAppToolLoopOptions, StreamToolLoopYield as StreamLoopYield, ToolLoopEvent, ToolLoopResult, ToolLoopStopReason, runToolLoop as runAppToolLoop, streamToolLoop as streamAppToolLoop } from '@tangle-network/agent-runtime';
|
|
34
|
-
export { C as CatalogModel, M as ModelCatalog, R as RouterModel, _ as __resetCatalogCache, b as buildCatalog, f as fetchModelCatalog, n as normalizeModelId } from './model-catalog-BEAEVDaa.js';
|
|
35
38
|
export { CompletionRequirement, CompletionVerdict, CorrectnessChecker, ProducedState, RuntimeEventLike, SatisfiedBy, TaskGold, createLlmCorrectnessChecker, extractProducedState, verifyCompletion, weightedComposite } from '@tangle-network/agent-eval';
|
|
36
|
-
export {
|
|
39
|
+
export { F as FlowSpan, a as FlowTrace } from './flow-types-Cb_AblZs.js';
|
|
37
40
|
export { StorageConfig } from '@tangle-network/sandbox';
|
|
38
41
|
import '@tangle-network/agent-runtime/intelligence';
|
|
39
42
|
import '@tangle-network/agent-knowledge';
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
instantiateTemplate,
|
|
12
12
|
listTemplateSlots,
|
|
13
13
|
validateBindings
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IOREXWLM.js";
|
|
15
15
|
import {
|
|
16
16
|
CHANNEL_PRESETS,
|
|
17
17
|
EXPORT_PRESETS,
|
|
@@ -45,7 +45,14 @@ import {
|
|
|
45
45
|
validateSceneOperation,
|
|
46
46
|
validateSceneOperations,
|
|
47
47
|
validateSlotValue
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-M2EBUDZ7.js";
|
|
49
|
+
import "./chunk-UAKFCMWK.js";
|
|
50
|
+
import {
|
|
51
|
+
darkTheme,
|
|
52
|
+
lightTheme,
|
|
53
|
+
themeColor,
|
|
54
|
+
themeToCssVars
|
|
55
|
+
} from "./chunk-Y2SZVW35.js";
|
|
49
56
|
import {
|
|
50
57
|
DEFAULT_REDACTION_PATTERNS,
|
|
51
58
|
buildRedactedDocument,
|
|
@@ -63,13 +70,13 @@ import {
|
|
|
63
70
|
summarize,
|
|
64
71
|
timedEventsFromLines,
|
|
65
72
|
traceEnv
|
|
66
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-GQRL6VNU.js";
|
|
67
74
|
import {
|
|
68
75
|
composeMissionFlowTrace,
|
|
69
76
|
delegationActivityToFlowSpans,
|
|
70
77
|
loopTraceEventsToFlowSpans,
|
|
71
78
|
stepActivityFlowTrace
|
|
72
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-2QI7XV2T.js";
|
|
73
80
|
import {
|
|
74
81
|
ApprovalEventSchema,
|
|
75
82
|
BrandTokensSchema,
|
|
@@ -124,7 +131,7 @@ import {
|
|
|
124
131
|
validateSetClipText,
|
|
125
132
|
validateSplitClip,
|
|
126
133
|
validateTrimClip
|
|
127
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-JT6HHO5P.js";
|
|
128
135
|
import {
|
|
129
136
|
MIN_SEQUENCE_CLIP_FRAMES,
|
|
130
137
|
assertClipFitsSequence,
|
|
@@ -218,9 +225,10 @@ import {
|
|
|
218
225
|
stepAgentActivity,
|
|
219
226
|
stepGateProposalId,
|
|
220
227
|
volumeGateProposalId
|
|
221
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-YNALYIQ3.js";
|
|
222
229
|
import {
|
|
223
230
|
addSecurityHeaders,
|
|
231
|
+
assertMediaUrl,
|
|
224
232
|
checkRateLimit,
|
|
225
233
|
clearCookieHeader,
|
|
226
234
|
extractRequestContext,
|
|
@@ -228,7 +236,7 @@ import {
|
|
|
228
236
|
readCookieValue,
|
|
229
237
|
requireString,
|
|
230
238
|
serializeCookie
|
|
231
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-HFC4BTWJ.js";
|
|
232
240
|
import {
|
|
233
241
|
createKnowledgeLoop,
|
|
234
242
|
createReviewerDecider,
|
|
@@ -333,7 +341,7 @@ import {
|
|
|
333
341
|
runToolLoop,
|
|
334
342
|
streamToolLoop,
|
|
335
343
|
toLoopEvents
|
|
336
|
-
} from "./chunk-
|
|
344
|
+
} from "./chunk-4IQMTTNE.js";
|
|
337
345
|
import {
|
|
338
346
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
339
347
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
|
@@ -435,6 +443,7 @@ export {
|
|
|
435
443
|
assertColor,
|
|
436
444
|
assertFinite,
|
|
437
445
|
assertHarnessModelCompatible,
|
|
446
|
+
assertMediaUrl,
|
|
438
447
|
assertPositiveFinite,
|
|
439
448
|
assertSceneMediaSrc,
|
|
440
449
|
assertSequenceMediaUrl,
|
|
@@ -519,6 +528,7 @@ export {
|
|
|
519
528
|
createWorkspaceSandboxManager,
|
|
520
529
|
createWorkspaceSandboxRuntimeProxyHandler,
|
|
521
530
|
createWorkspaceSandboxTerminalUpgradeHandler,
|
|
531
|
+
darkTheme,
|
|
522
532
|
decodeHexKey,
|
|
523
533
|
decryptAesGcm,
|
|
524
534
|
decryptBytes,
|
|
@@ -570,6 +580,7 @@ export {
|
|
|
570
580
|
isTangleExecutionKeyError,
|
|
571
581
|
isTerminalPromptEvent,
|
|
572
582
|
lastClipEndFrame,
|
|
583
|
+
lightTheme,
|
|
573
584
|
listTemplateSlots,
|
|
574
585
|
loopTraceEventsToFlowSpans,
|
|
575
586
|
maskSpans,
|
|
@@ -654,6 +665,8 @@ export {
|
|
|
654
665
|
syncSandboxMemberRole,
|
|
655
666
|
tangleExecutionKeyHttpError,
|
|
656
667
|
terminalTokenFromRequest,
|
|
668
|
+
themeColor,
|
|
669
|
+
themeToCssVars,
|
|
657
670
|
timedEventsFromLines,
|
|
658
671
|
toLoopEvents,
|
|
659
672
|
traceEnv,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { c as SceneDocument } from './model-BBwyOuWG.js';
|
|
3
|
+
import { D as DesignCanvasProps, c as createSceneCommandStack, E as ExportTriggerOptions } from './command-stack-CkjelfK_.js';
|
|
4
|
+
|
|
5
|
+
/** Callers inject a workspace renderer so this chrome stays Konva-free. The
|
|
6
|
+
* workspace occupies the scrollable area between the rulers and the bottom bar. */
|
|
7
|
+
interface DesignCanvasFullProps extends DesignCanvasProps {
|
|
8
|
+
/**
|
|
9
|
+
* Render the Konva canvas workspace into the slot this shell provides.
|
|
10
|
+
* The shell passes viewport dimensions, view-state, and the shared command
|
|
11
|
+
* stack so `WorkspaceView` can commit gestures through the same stack the
|
|
12
|
+
* chrome uses for undo/redo and layers-panel selection.
|
|
13
|
+
*
|
|
14
|
+
* `onFitRef` is a ref the workspace fills with a fit-page callback; the
|
|
15
|
+
* shell calls it when the user presses F or clicks the Fit button.
|
|
16
|
+
*/
|
|
17
|
+
renderWorkspace(ctx: {
|
|
18
|
+
document: SceneDocument;
|
|
19
|
+
activePageId: string;
|
|
20
|
+
selectedElementIds: string[];
|
|
21
|
+
zoom: number;
|
|
22
|
+
panX: number;
|
|
23
|
+
panY: number;
|
|
24
|
+
gridEnabled: boolean;
|
|
25
|
+
gridSize: number;
|
|
26
|
+
snapEnabled: boolean;
|
|
27
|
+
showBleed: boolean;
|
|
28
|
+
canWrite: boolean;
|
|
29
|
+
/** The chrome's command stack. Pass to WorkspaceView so gestures, undo,
|
|
30
|
+
* and layers-panel selection share a single state machine. */
|
|
31
|
+
stack: ReturnType<typeof createSceneCommandStack>;
|
|
32
|
+
activePage: SceneDocument['pages'][number] | undefined;
|
|
33
|
+
onFitRef: React.MutableRefObject<(() => void) | null>;
|
|
34
|
+
/** A ref the workspace fills with an export callback. The chrome's Export
|
|
35
|
+
* control calls it with the chosen format/scale; the workspace renders the
|
|
36
|
+
* Konva stage to a data URL and forwards the result to `onExport`. Filled
|
|
37
|
+
* only when `onExport` is wired (the workspace skips it otherwise). */
|
|
38
|
+
onExportRef: React.MutableRefObject<((opts: ExportTriggerOptions) => void) | null>;
|
|
39
|
+
/** Forwarded from DesignCanvasProps. Default true: WorkspaceView fits the
|
|
40
|
+
* active page to the viewport once, on the first non-zero measurement. */
|
|
41
|
+
fitOnMount?: boolean;
|
|
42
|
+
/** Forwarded from DesignCanvasProps. Fires once after the first real
|
|
43
|
+
* measurement, after the initial fit is applied (or skipped). */
|
|
44
|
+
onReady?(): void;
|
|
45
|
+
/** Forwarded from DesignCanvasProps. The Konva render palette; the
|
|
46
|
+
* Konva-free chrome passes it straight through to the workspace. */
|
|
47
|
+
render?: DesignCanvasProps['render'];
|
|
48
|
+
onZoomChange(zoom: number): void;
|
|
49
|
+
onPanChange(panX: number, panY: number): void;
|
|
50
|
+
onSelectElements(ids: string[], additive: boolean): void;
|
|
51
|
+
}): React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Generates page thumbnails for the PagesStrip. Injected by the integrator
|
|
54
|
+
* (who has Konva access) so the chrome doesn't import Konva directly.
|
|
55
|
+
*/
|
|
56
|
+
renderThumbnail(page: SceneDocument['pages'][number]): Promise<string | null>;
|
|
57
|
+
}
|
|
58
|
+
declare function DesignCanvas({ document: initialDocument, rev: initialRev, canWrite, mode, onApplyOperations, onSelectionChange, renderAgentPanel, renderSidePanel, onExport, exportDefaults, className, fitOnMount, onReady, render, renderWorkspace, renderThumbnail, }: DesignCanvasFullProps): react.JSX.Element;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Mount this component to get the full editor: toolbar, rulers, layers panel,
|
|
62
|
+
* pages strip, zoom controls, and the Konva canvas — all sharing one command
|
|
63
|
+
* stack so undo/redo and selection are coherent across every surface.
|
|
64
|
+
*/
|
|
65
|
+
declare function DesignCanvasEditor(props: DesignCanvasProps): react.JSX.Element;
|
|
66
|
+
|
|
67
|
+
/** Batteries-included editor: chrome + workspace on one shared stack. */
|
|
68
|
+
declare const DesignCanvasLazy: react.LazyExoticComponent<typeof DesignCanvasEditor>;
|
|
69
|
+
/** Raw chrome only — use when supplying a custom renderWorkspace/renderThumbnail. */
|
|
70
|
+
declare const DesignCanvasChromeLazy: react.LazyExoticComponent<typeof DesignCanvas>;
|
|
71
|
+
|
|
72
|
+
export { DesignCanvas as D, DesignCanvasChromeLazy as a, DesignCanvasEditor as b, type DesignCanvasFullProps as c, DesignCanvasLazy as d };
|
package/dist/missions/index.d.ts
CHANGED
|
@@ -179,6 +179,18 @@ interface SetStepStatusPatch {
|
|
|
179
179
|
sublabel?: string;
|
|
180
180
|
resultRef?: string;
|
|
181
181
|
error?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Spend committed ATOMICALLY with the step transition. Folding the cost into
|
|
184
|
+
* the SAME guarded write makes step completion the per-step idempotency key:
|
|
185
|
+
* a same-status replay (the step is already `done`) short-circuits as a no-op
|
|
186
|
+
* BEFORE the write, so the charge lands exactly once even when an engine
|
|
187
|
+
* RESUME re-dispatches a step whose cost previously committed. `deltaUsd` is
|
|
188
|
+
* the marginal spend; `ledgerDelta` carries the token/wall/llm breakdown.
|
|
189
|
+
*/
|
|
190
|
+
cost?: {
|
|
191
|
+
deltaUsd: number;
|
|
192
|
+
ledgerDelta?: Partial<MissionCostLedger>;
|
|
193
|
+
};
|
|
182
194
|
}
|
|
183
195
|
interface CompleteMissionInput {
|
|
184
196
|
ok: boolean;
|
package/dist/missions/index.js
CHANGED
|
@@ -177,7 +177,9 @@ declare function assertPositiveFinite(value: number, label: string): void;
|
|
|
177
177
|
declare function assertFinite(value: number, label: string): void;
|
|
178
178
|
declare function assertColor(value: string, label: string): void;
|
|
179
179
|
/** Media boundary rule shared with sequences: remote http(s) or a rooted
|
|
180
|
-
* /api/ path — never sandbox-local files or data: blobs.
|
|
180
|
+
* /api/ path — never sandbox-local files or data:/blob: blobs. Delegates to the
|
|
181
|
+
* canonical `assertMediaUrl` boundary in `../web`; the two surfaces share ONE
|
|
182
|
+
* rule (trims, named-rejects local/inline schemes) so they cannot drift. */
|
|
181
183
|
declare function assertSceneMediaSrc(value: string, label: string): void;
|
|
182
184
|
|
|
183
185
|
export { type Bounds as B, type EllipseElement as E, type GroupElement as G, type ImageElement as I, type LineElement as L, type NewPageOptions as N, type PageBleed as P, type RectElement as R, SCENE_ELEMENT_KINDS as S, type TextElement as T, type VideoElement as V, type PageGuides as a, SCENE_SCHEMA_VERSION as b, type SceneDocument as c, type SceneElement as d, type SceneElementBase as e, type SceneElementKind as f, type ScenePage as g, type SceneSettings as h, assertColor as i, assertFinite as j, assertPositiveFinite as k, assertSceneMediaSrc as l, boundsIntersect as m, collectSlots as n, createEmptyDocument as o, createPage as p, elementAabb as q, elementExtent as r, estimateTextHeight as s, findElement as t, requireElement as u, requirePage as v };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { d as SceneElement, N as NewPageOptions, P as PageBleed, a as PageGuides } from './model-BBwyOuWG.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The design-canvas operation union — the ONE mutation vocabulary shared by
|
|
5
|
+
* the editor's command stack (human edits, undo/redo), the MCP tool
|
|
6
|
+
* dispatcher (agent edits), and programmatic automation (template
|
|
7
|
+
* instantiation, data sync). Every state change the editor can express is an
|
|
8
|
+
* operation here; anything not expressible here does not happen to a
|
|
9
|
+
* document. That closure is the automation contract: replaying a decision
|
|
10
|
+
* log reproduces the document.
|
|
11
|
+
*
|
|
12
|
+
* Attribute patches are validated per element kind in ./validate before
|
|
13
|
+
* ./apply mutates the document; both run server-side on every path.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Per-kind attribute patch. `kind` is immutable after creation; ids are
|
|
17
|
+
* immutable always. Validation rejects attrs foreign to the target's kind. */
|
|
18
|
+
type SceneAttrsPatch = Partial<Omit<SceneElement, 'id' | 'kind' | 'children'>> & {
|
|
19
|
+
text?: string;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
points?: number[];
|
|
23
|
+
fill?: string;
|
|
24
|
+
stroke?: string;
|
|
25
|
+
strokeWidth?: number;
|
|
26
|
+
cornerRadius?: number;
|
|
27
|
+
dash?: number[];
|
|
28
|
+
fontFamily?: string;
|
|
29
|
+
fontSize?: number;
|
|
30
|
+
fontStyle?: 'normal' | 'bold' | 'italic' | 'bold italic';
|
|
31
|
+
align?: 'left' | 'center' | 'right';
|
|
32
|
+
lineHeight?: number;
|
|
33
|
+
letterSpacing?: number;
|
|
34
|
+
src?: string;
|
|
35
|
+
posterSrc?: string;
|
|
36
|
+
fit?: 'fill' | 'cover' | 'contain';
|
|
37
|
+
};
|
|
38
|
+
interface AddElementOperation {
|
|
39
|
+
type: 'add_element';
|
|
40
|
+
pageId: string;
|
|
41
|
+
/** Complete element including caller-minted id (reconciled like sequences
|
|
42
|
+
* clips when the server re-mints). */
|
|
43
|
+
element: SceneElement;
|
|
44
|
+
/** Insertion z-index; omitted → top. */
|
|
45
|
+
index?: number;
|
|
46
|
+
/** Parent group; omitted → page root. */
|
|
47
|
+
parentGroupId?: string;
|
|
48
|
+
}
|
|
49
|
+
interface SetAttrsOperation {
|
|
50
|
+
type: 'set_attrs';
|
|
51
|
+
pageId: string;
|
|
52
|
+
elementId: string;
|
|
53
|
+
attrs: SceneAttrsPatch;
|
|
54
|
+
}
|
|
55
|
+
interface ReorderElementOperation {
|
|
56
|
+
type: 'reorder_element';
|
|
57
|
+
pageId: string;
|
|
58
|
+
elementId: string;
|
|
59
|
+
/** Target index within the element's CURRENT owner (page root or group). */
|
|
60
|
+
toIndex: number;
|
|
61
|
+
}
|
|
62
|
+
interface DeleteElementOperation {
|
|
63
|
+
type: 'delete_element';
|
|
64
|
+
pageId: string;
|
|
65
|
+
elementId: string;
|
|
66
|
+
}
|
|
67
|
+
interface GroupElementsOperation {
|
|
68
|
+
type: 'group_elements';
|
|
69
|
+
pageId: string;
|
|
70
|
+
/** ≥ 2 sibling elements (same owner); grouped in their current z-order. */
|
|
71
|
+
elementIds: string[];
|
|
72
|
+
/** Caller-minted id for the new group. */
|
|
73
|
+
groupId: string;
|
|
74
|
+
name?: string;
|
|
75
|
+
}
|
|
76
|
+
interface UngroupElementOperation {
|
|
77
|
+
type: 'ungroup_element';
|
|
78
|
+
pageId: string;
|
|
79
|
+
groupId: string;
|
|
80
|
+
}
|
|
81
|
+
interface AddPageOperation {
|
|
82
|
+
type: 'add_page';
|
|
83
|
+
/** Caller-minted page id. */
|
|
84
|
+
pageId: string;
|
|
85
|
+
options?: NewPageOptions;
|
|
86
|
+
/** Position in the page list; omitted → end. */
|
|
87
|
+
index?: number;
|
|
88
|
+
}
|
|
89
|
+
interface DuplicatePageOperation {
|
|
90
|
+
type: 'duplicate_page';
|
|
91
|
+
sourcePageId: string;
|
|
92
|
+
/** Caller-minted id for the copy; element ids are re-minted server-side. */
|
|
93
|
+
pageId: string;
|
|
94
|
+
}
|
|
95
|
+
interface DeletePageOperation {
|
|
96
|
+
type: 'delete_page';
|
|
97
|
+
pageId: string;
|
|
98
|
+
}
|
|
99
|
+
interface ReorderPageOperation {
|
|
100
|
+
type: 'reorder_page';
|
|
101
|
+
pageId: string;
|
|
102
|
+
toIndex: number;
|
|
103
|
+
}
|
|
104
|
+
interface SetPagePropsOperation {
|
|
105
|
+
type: 'set_page_props';
|
|
106
|
+
pageId: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
width?: number;
|
|
109
|
+
height?: number;
|
|
110
|
+
background?: string;
|
|
111
|
+
/** null clears bleed; omitted leaves unchanged. */
|
|
112
|
+
bleed?: PageBleed | null;
|
|
113
|
+
}
|
|
114
|
+
interface SetPageGuidesOperation {
|
|
115
|
+
type: 'set_page_guides';
|
|
116
|
+
pageId: string;
|
|
117
|
+
guides: PageGuides;
|
|
118
|
+
}
|
|
119
|
+
interface BindSlotOperation {
|
|
120
|
+
type: 'bind_slot';
|
|
121
|
+
pageId: string;
|
|
122
|
+
elementId: string;
|
|
123
|
+
/** null unbinds. Slot names are unique document-wide. */
|
|
124
|
+
slot: string | null;
|
|
125
|
+
}
|
|
126
|
+
/** Fill slots with data — text slots take strings, image/video slots take
|
|
127
|
+
* src URLs. Unknown slot names throw; partial application is allowed. */
|
|
128
|
+
interface ApplyDataOperation {
|
|
129
|
+
type: 'apply_data';
|
|
130
|
+
bindings: Record<string, string>;
|
|
131
|
+
}
|
|
132
|
+
interface SetDocumentTitleOperation {
|
|
133
|
+
type: 'set_document_title';
|
|
134
|
+
title: string;
|
|
135
|
+
}
|
|
136
|
+
type SceneOperation = AddElementOperation | SetAttrsOperation | ReorderElementOperation | DeleteElementOperation | GroupElementsOperation | UngroupElementOperation | AddPageOperation | DuplicatePageOperation | DeletePageOperation | ReorderPageOperation | SetPagePropsOperation | SetPageGuidesOperation | BindSlotOperation | ApplyDataOperation | SetDocumentTitleOperation;
|
|
137
|
+
interface ScenePlan {
|
|
138
|
+
summary: string;
|
|
139
|
+
operations: SceneOperation[];
|
|
140
|
+
}
|
|
141
|
+
type SceneOperationType = SceneOperation['type'];
|
|
142
|
+
declare const SCENE_OPERATION_TYPES: readonly SceneOperationType[];
|
|
143
|
+
|
|
144
|
+
export { type AddElementOperation as A, type BindSlotOperation as B, type DeleteElementOperation as D, type GroupElementsOperation as G, type ReorderElementOperation as R, SCENE_OPERATION_TYPES as S, type UngroupElementOperation as U, type AddPageOperation as a, type ApplyDataOperation as b, type DeletePageOperation as c, type DuplicatePageOperation as d, type ReorderPageOperation as e, type SceneAttrsPatch as f, type SceneOperation as g, type SceneOperationType as h, type ScenePlan as i, type SetAttrsOperation as j, type SetDocumentTitleOperation as k, type SetPageGuidesOperation as l, type SetPagePropsOperation as m };
|