@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
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
|
+
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';
|
|
2
|
+
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';
|
|
1
3
|
import * as _tangle_network_agent_runtime from '@tangle-network/agent-runtime';
|
|
2
4
|
import { ToolLoopMessage, ToolLoopResult, StreamToolLoopYield, ToolLoopCall } from '@tangle-network/agent-runtime';
|
|
3
5
|
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';
|
|
4
|
-
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';
|
|
5
|
-
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';
|
|
6
6
|
import { b as AppToolContext, e as AppToolProducedEvent, f as AppToolTaxonomy, c as AppToolHandlers, d as AppToolOutcome } from '../types-2rOJo8Hc.js';
|
|
7
7
|
import { CertifiedProfile } from '@tangle-network/agent-runtime/intelligence';
|
|
8
8
|
import { A as AppToolMcpServer } from '../mcp-BShTlESm.js';
|
|
9
9
|
import '../auth-BlS9GWfL.js';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Events the app's OpenAI-compat stream adapter ({@link toLoopEvents}) yields.
|
|
13
|
+
*
|
|
14
|
+
* This is the app's own `Raw` event type for the streaming loop — the canonical
|
|
15
|
+
* `streamToolLoop<Raw>` is generic over it. It widens the substrate's
|
|
16
|
+
* tool-loop event with `reasoning` (DeepSeek/router `reasoning_content` /
|
|
17
|
+
* `thinking` deltas, rendered as thinking sections) and `usage` (per-message
|
|
18
|
+
* token accounting) — neither belongs in the substrate's loop contract, so they
|
|
19
|
+
* stay here. The adapter maps each into the `streamTurn` seam; `text` and
|
|
20
|
+
* `tool_call` drive the loop, `reasoning` / `usage` pass through to the UI.
|
|
21
|
+
*/
|
|
22
|
+
type LoopEvent = {
|
|
23
|
+
type: 'text';
|
|
24
|
+
text: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'reasoning';
|
|
27
|
+
text: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'tool_call';
|
|
30
|
+
call: _tangle_network_agent_runtime.ToolLoopCall;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'usage';
|
|
33
|
+
usage: {
|
|
34
|
+
promptTokens: number;
|
|
35
|
+
completionTokens: number;
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
type: 'other';
|
|
39
|
+
event: unknown;
|
|
40
|
+
};
|
|
41
|
+
|
|
11
42
|
/**
|
|
12
43
|
* OpenAI-compatible stream → `LoopEvent` adapter, for NON-sandbox copilots.
|
|
13
44
|
*
|
|
@@ -356,35 +387,4 @@ interface SurfaceMergeBase {
|
|
|
356
387
|
*/
|
|
357
388
|
declare function mergeSurfaceOverlay<TBase extends SurfaceMergeBase>(base: TBase, overlay: SurfaceOverlay): TBase & SurfaceMergeBase;
|
|
358
389
|
|
|
359
|
-
/**
|
|
360
|
-
* Events the app's OpenAI-compat stream adapter ({@link toLoopEvents}) yields.
|
|
361
|
-
*
|
|
362
|
-
* This is the app's own `Raw` event type for the streaming loop — the canonical
|
|
363
|
-
* `streamToolLoop<Raw>` is generic over it. It widens the substrate's
|
|
364
|
-
* tool-loop event with `reasoning` (DeepSeek/router `reasoning_content` /
|
|
365
|
-
* `thinking` deltas, rendered as thinking sections) and `usage` (per-message
|
|
366
|
-
* token accounting) — neither belongs in the substrate's loop contract, so they
|
|
367
|
-
* stay here. The adapter maps each into the `streamTurn` seam; `text` and
|
|
368
|
-
* `tool_call` drive the loop, `reasoning` / `usage` pass through to the UI.
|
|
369
|
-
*/
|
|
370
|
-
type LoopEvent = {
|
|
371
|
-
type: 'text';
|
|
372
|
-
text: string;
|
|
373
|
-
} | {
|
|
374
|
-
type: 'reasoning';
|
|
375
|
-
text: string;
|
|
376
|
-
} | {
|
|
377
|
-
type: 'tool_call';
|
|
378
|
-
call: _tangle_network_agent_runtime.ToolLoopCall;
|
|
379
|
-
} | {
|
|
380
|
-
type: 'usage';
|
|
381
|
-
usage: {
|
|
382
|
-
promptTokens: number;
|
|
383
|
-
completionTokens: number;
|
|
384
|
-
};
|
|
385
|
-
} | {
|
|
386
|
-
type: 'other';
|
|
387
|
-
event: unknown;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
390
|
export { type AgentRuntime, type AgentRuntimeModelConfig, type AgentTurnOptions, type AnySurfaceKind, type CertifiedDelivery, type CertifiedDeliveryConfig, type CreateAgentRuntimeOptions, type LoopEvent, type OpenAICompatStreamTurnOptions, type OpenAIStreamChunk, type ResolvedAgentProfile, type SurfaceKindDefinition, type SurfaceMcpServer, type SurfaceMergeBase, type SurfaceOverlay, type SurfacePermissionValue, type SurfaceRegistry, createAgentRuntime, createCertifiedDelivery, createOpenAICompatStreamTurn, createSurfaceRegistry, defineSurfaceKind, mergeSurfaceOverlay, toLoopEvents };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as SequenceMediaKind, o as SequenceTimeline, r as TimelineInterval, m as SequenceStore } from '../store-gckrNq-g.js';
|
|
2
2
|
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, k as SequenceMeta, l as SequenceStatus, n as SequenceStoreScope, p as SequenceTrack, q as SequenceTrackKind, T as TimelineClipBounds, 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';
|
|
3
|
-
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-
|
|
3
|
+
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';
|
|
4
4
|
import { c as ToolHeaderNames } from '../auth-BlS9GWfL.js';
|
|
5
5
|
import { A as AppToolMcpServer } from '../mcp-BShTlESm.js';
|
|
6
6
|
import { b as AppToolContext } from '../types-2rOJo8Hc.js';
|
package/dist/sequences/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
validateSetClipText,
|
|
42
42
|
validateSplitClip,
|
|
43
43
|
validateTrimClip
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-JT6HHO5P.js";
|
|
45
45
|
import {
|
|
46
46
|
MIN_SEQUENCE_CLIP_FRAMES,
|
|
47
47
|
assertClipFitsSequence,
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
snapshotFrame,
|
|
56
56
|
trackIntervals
|
|
57
57
|
} from "../chunk-ZYBWGSAZ.js";
|
|
58
|
+
import "../chunk-HFC4BTWJ.js";
|
|
58
59
|
import "../chunk-A76ZHWNF.js";
|
|
59
60
|
export {
|
|
60
61
|
DEFAULT_SEQUENCES_MCP_DESCRIPTION,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SequenceOperation, b as SequenceApplyResult } from '../apply-
|
|
1
|
+
import { c as SequenceOperation, b as SequenceApplyResult } from '../apply-Gk4raT2j.js';
|
|
2
2
|
import { o as SequenceTimeline, S as SequenceClip, p as SequenceTrack } from '../store-gckrNq-g.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import react__default from 'react';
|
|
@@ -543,6 +543,9 @@ interface TimelineClipChipProps {
|
|
|
543
543
|
sequenceDurationFrames: number;
|
|
544
544
|
selected: boolean;
|
|
545
545
|
canWrite: boolean;
|
|
546
|
+
/** Roving-tabindex: exactly one chip per editor carries tabIndex 0 so the
|
|
547
|
+
* clip set is a single Tab stop; arrows move focus across the others. */
|
|
548
|
+
tabbable: boolean;
|
|
546
549
|
frameProvider: VideoFrameProvider;
|
|
547
550
|
/** Snap a candidate move (both clip edges considered); editor closes over
|
|
548
551
|
* the engine's snap points. */
|
|
@@ -564,6 +567,12 @@ interface TimelineClipChipProps {
|
|
|
564
567
|
};
|
|
565
568
|
onSnapPointChange(point: SnapPoint | null): void;
|
|
566
569
|
onSelect(clipId: string, additive: boolean): void;
|
|
570
|
+
/** Keyboard delete of the focused clip (one command on the stack), routed
|
|
571
|
+
* through the same locked-track guard as the transport Delete key. */
|
|
572
|
+
onRequestDelete(clipId: string): void;
|
|
573
|
+
/** Move keyboard focus to the previous/next clip in DOM order (roving
|
|
574
|
+
* tabindex); the editor owns the ordered chip set. */
|
|
575
|
+
onFocusStep(clipId: string, direction: -1 | 1): void;
|
|
567
576
|
onCommitMove(input: ClipMoveCommit): void;
|
|
568
577
|
onCommitTrim(input: ClipTrimCommit): void;
|
|
569
578
|
onCommitText(input: {
|
|
@@ -580,6 +589,9 @@ interface TimelineTrackRowProps {
|
|
|
580
589
|
zoom: number;
|
|
581
590
|
sequenceDurationFrames: number;
|
|
582
591
|
selectedClipIds: ReadonlySet<string>;
|
|
592
|
+
/** The single clip that carries tabIndex 0 (roving tabindex); null seeds the
|
|
593
|
+
* first chip in the editor as the lone Tab stop. */
|
|
594
|
+
tabbableClipId: string | null;
|
|
583
595
|
canWrite: boolean;
|
|
584
596
|
frameProvider: VideoFrameProvider;
|
|
585
597
|
snapMove(candidate: {
|
|
@@ -599,6 +611,8 @@ interface TimelineTrackRowProps {
|
|
|
599
611
|
};
|
|
600
612
|
onSnapPointChange(point: SnapPoint | null): void;
|
|
601
613
|
onSelectClip(clipId: string, additive: boolean): void;
|
|
614
|
+
onRequestDeleteClip(clipId: string): void;
|
|
615
|
+
onFocusStepClip(clipId: string, direction: -1 | 1): void;
|
|
602
616
|
onCommitMove(input: ClipMoveCommit): void;
|
|
603
617
|
onCommitTrim(input: ClipTrimCommit): void;
|
|
604
618
|
onCommitText(input: {
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
trimClipCommand,
|
|
48
48
|
trimEndDrag,
|
|
49
49
|
trimStartDrag
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-S6WS2B32.js";
|
|
51
51
|
import "../chunk-ZYBWGSAZ.js";
|
|
52
52
|
|
|
53
53
|
// src/sequences-react/media/transcription.ts
|
|
@@ -182,7 +182,7 @@ function createWhisperTranscriptionProvider(opts) {
|
|
|
182
182
|
|
|
183
183
|
// src/sequences-react/lazy.tsx
|
|
184
184
|
import React from "react";
|
|
185
|
-
var SequenceTimelineEditorLazy = React.lazy(() => import("../TimelineEditor-
|
|
185
|
+
var SequenceTimelineEditorLazy = React.lazy(() => import("../TimelineEditor-Z7C6BFP5.js"));
|
|
186
186
|
export {
|
|
187
187
|
COMMAND_HISTORY_LIMIT,
|
|
188
188
|
DEFAULT_MAX_MEDIA_ELEMENTS,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed mirror of tokens.css for runtime/JS theming. The canonical source is
|
|
3
|
+
* tokens.css (`import '@tangle-network/agent-app/styles'`); this module is for
|
|
4
|
+
* apps that compute theme variables in JS, or read color values where CSS
|
|
5
|
+
* custom properties cannot reach — notably Konva canvas render code, which
|
|
6
|
+
* paints to a bitmap and cannot resolve `var(--…)`.
|
|
7
|
+
*
|
|
8
|
+
* Values are shadcn-style HSL channel triples ("H S% L%"); wrap with `color()`.
|
|
9
|
+
*/
|
|
10
|
+
interface AgentAppTheme {
|
|
11
|
+
background: string;
|
|
12
|
+
foreground: string;
|
|
13
|
+
card: string;
|
|
14
|
+
cardForeground: string;
|
|
15
|
+
popover: string;
|
|
16
|
+
popoverForeground: string;
|
|
17
|
+
primary: string;
|
|
18
|
+
primaryForeground: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
secondaryForeground: string;
|
|
21
|
+
muted: string;
|
|
22
|
+
mutedForeground: string;
|
|
23
|
+
accent: string;
|
|
24
|
+
accentForeground: string;
|
|
25
|
+
destructive: string;
|
|
26
|
+
destructiveForeground: string;
|
|
27
|
+
border: string;
|
|
28
|
+
input: string;
|
|
29
|
+
ring: string;
|
|
30
|
+
success: string;
|
|
31
|
+
successForeground: string;
|
|
32
|
+
warning: string;
|
|
33
|
+
warningForeground: string;
|
|
34
|
+
/** Full CSS color (not a triple) — the canvas/scene backdrop. */
|
|
35
|
+
canvasBackdrop: string;
|
|
36
|
+
/** Konva render palette — full hex colors the bitmap canvas paints with
|
|
37
|
+
* (it cannot resolve `var(--…)`). NOT emitted by themeToCssVars. */
|
|
38
|
+
canvasRender: CanvasRenderPalette;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Colors the Konva design-canvas paints directly. Konva renders to a bitmap
|
|
42
|
+
* and cannot read CSS custom properties, so these are full hex strings sourced
|
|
43
|
+
* from the active theme and threaded through the canvas components.
|
|
44
|
+
*/
|
|
45
|
+
interface CanvasRenderPalette {
|
|
46
|
+
/** Grid line color (GridLayer). */
|
|
47
|
+
grid: string;
|
|
48
|
+
/** Grid-snap guide line (SnapGuidesOverlay, kind 'grid'). */
|
|
49
|
+
snapGrid: string;
|
|
50
|
+
/** Saved ruler-guide snap line (kind 'guide'). */
|
|
51
|
+
snapGuide: string;
|
|
52
|
+
/** Page edge/center snap line (kinds 'page-edge'/'page-center'). */
|
|
53
|
+
snapPage: string;
|
|
54
|
+
/** Element edge/center snap line (kinds 'element-edge'/'element-center'). */
|
|
55
|
+
snapElement: string;
|
|
56
|
+
/** Transformer border + anchor stroke (SelectionLayer). */
|
|
57
|
+
selectionStroke: string;
|
|
58
|
+
/** Transformer anchor fill (SelectionLayer). */
|
|
59
|
+
selectionAnchorFill: string;
|
|
60
|
+
/** Video placeholder fill (ElementNode VideoNode). */
|
|
61
|
+
placeholderFill: string;
|
|
62
|
+
/** Video placeholder stroke (ElementNode VideoNode). */
|
|
63
|
+
placeholderStroke: string;
|
|
64
|
+
/** Broken/loading image placeholder fill (ElementNode ImageNode). */
|
|
65
|
+
brokenFill: string;
|
|
66
|
+
/** Broken/loading image placeholder stroke (ElementNode ImageNode). */
|
|
67
|
+
brokenStroke: string;
|
|
68
|
+
}
|
|
69
|
+
declare const lightTheme: AgentAppTheme;
|
|
70
|
+
declare const darkTheme: AgentAppTheme;
|
|
71
|
+
/** Wrap a channel triple in `hsl()`; pass through values already in a color form. */
|
|
72
|
+
declare function themeColor(value: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* Map a theme to the full CSS-variable set (shadcn triples + canvas/sequences
|
|
75
|
+
* aliases + canvas surface). Apply at runtime to scope a theme without loading
|
|
76
|
+
* tokens.css: `Object.assign(el.style, themeToCssVars(darkTheme))`.
|
|
77
|
+
*/
|
|
78
|
+
declare function themeToCssVars(theme: AgentAppTheme): Record<string, string>;
|
|
79
|
+
|
|
80
|
+
export { type AgentAppTheme, type CanvasRenderPalette, darkTheme, lightTheme, themeColor, themeToCssVars };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tailwind preset mapping the shadcn semantic color names used by web-react
|
|
3
|
+
* (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in
|
|
4
|
+
* tokens.css — so a consuming app themes every agent-app surface from one source.
|
|
5
|
+
*
|
|
6
|
+
* // tailwind.config.{js,ts}
|
|
7
|
+
* import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'
|
|
8
|
+
* export default { presets: [agentAppPreset], content: [...] }
|
|
9
|
+
*
|
|
10
|
+
* Pair with `import '@tangle-network/agent-app/styles'` for the variable values.
|
|
11
|
+
* design-canvas/sequences need no preset — they consume vars via arbitrary
|
|
12
|
+
* values (bg-[var(--bg-input)]), which Tailwind supports without color config.
|
|
13
|
+
*/
|
|
14
|
+
declare const agentAppPreset: {
|
|
15
|
+
darkMode: [string, string];
|
|
16
|
+
theme: {
|
|
17
|
+
extend: {
|
|
18
|
+
colors: {
|
|
19
|
+
background: string;
|
|
20
|
+
foreground: string;
|
|
21
|
+
border: string;
|
|
22
|
+
input: string;
|
|
23
|
+
ring: string;
|
|
24
|
+
success: {
|
|
25
|
+
DEFAULT: string;
|
|
26
|
+
foreground: string;
|
|
27
|
+
};
|
|
28
|
+
warning: {
|
|
29
|
+
DEFAULT: string;
|
|
30
|
+
foreground: string;
|
|
31
|
+
};
|
|
32
|
+
card: {
|
|
33
|
+
DEFAULT: string;
|
|
34
|
+
foreground: string;
|
|
35
|
+
};
|
|
36
|
+
popover: {
|
|
37
|
+
DEFAULT: string;
|
|
38
|
+
foreground: string;
|
|
39
|
+
};
|
|
40
|
+
primary: {
|
|
41
|
+
DEFAULT: string;
|
|
42
|
+
foreground: string;
|
|
43
|
+
};
|
|
44
|
+
secondary: {
|
|
45
|
+
DEFAULT: string;
|
|
46
|
+
foreground: string;
|
|
47
|
+
};
|
|
48
|
+
muted: {
|
|
49
|
+
DEFAULT: string;
|
|
50
|
+
foreground: string;
|
|
51
|
+
};
|
|
52
|
+
accent: {
|
|
53
|
+
DEFAULT: string;
|
|
54
|
+
foreground: string;
|
|
55
|
+
};
|
|
56
|
+
destructive: {
|
|
57
|
+
DEFAULT: string;
|
|
58
|
+
foreground: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { agentAppPreset as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/theme/tailwind-preset.ts
|
|
2
|
+
var withForeground = (name) => ({
|
|
3
|
+
DEFAULT: `hsl(var(--${name}))`,
|
|
4
|
+
foreground: `hsl(var(--${name}-foreground))`
|
|
5
|
+
});
|
|
6
|
+
var agentAppPreset = {
|
|
7
|
+
darkMode: ["class", '[data-theme="dark"]'],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
colors: {
|
|
11
|
+
background: "hsl(var(--background))",
|
|
12
|
+
foreground: "hsl(var(--foreground))",
|
|
13
|
+
border: "hsl(var(--border))",
|
|
14
|
+
input: "hsl(var(--input))",
|
|
15
|
+
ring: "hsl(var(--ring))",
|
|
16
|
+
success: withForeground("success"),
|
|
17
|
+
warning: withForeground("warning"),
|
|
18
|
+
card: withForeground("card"),
|
|
19
|
+
popover: withForeground("popover"),
|
|
20
|
+
primary: withForeground("primary"),
|
|
21
|
+
secondary: withForeground("secondary"),
|
|
22
|
+
muted: withForeground("muted"),
|
|
23
|
+
accent: withForeground("accent"),
|
|
24
|
+
destructive: withForeground("destructive")
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var tailwind_preset_default = agentAppPreset;
|
|
30
|
+
export {
|
|
31
|
+
tailwind_preset_default as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=tailwind-preset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind preset mapping the shadcn semantic color names used by web-react\n * (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in\n * tokens.css — so a consuming app themes every agent-app surface from one source.\n *\n * // tailwind.config.{js,ts}\n * import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'\n * export default { presets: [agentAppPreset], content: [...] }\n *\n * Pair with `import '@tangle-network/agent-app/styles'` for the variable values.\n * design-canvas/sequences need no preset — they consume vars via arbitrary\n * values (bg-[var(--bg-input)]), which Tailwind supports without color config.\n */\n\nconst withForeground = (name: string) => ({\n DEFAULT: `hsl(var(--${name}))`,\n foreground: `hsl(var(--${name}-foreground))`,\n})\n\nconst agentAppPreset = {\n darkMode: ['class', '[data-theme=\"dark\"]'] as [string, string],\n theme: {\n extend: {\n colors: {\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n success: withForeground('success'),\n warning: withForeground('warning'),\n card: withForeground('card'),\n popover: withForeground('popover'),\n primary: withForeground('primary'),\n secondary: withForeground('secondary'),\n muted: withForeground('muted'),\n accent: withForeground('accent'),\n destructive: withForeground('destructive'),\n },\n },\n },\n}\n\nexport default agentAppPreset\n"],"mappings":";AAcA,IAAM,iBAAiB,CAAC,UAAkB;AAAA,EACxC,SAAS,aAAa,IAAI;AAAA,EAC1B,YAAY,aAAa,IAAI;AAC/B;AAEA,IAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC,SAAS,qBAAqB;AAAA,EACzC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,MAAM,eAAe,MAAM;AAAA,QAC3B,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,WAAW,eAAe,WAAW;AAAA,QACrC,OAAO,eAAe,OAAO;AAAA,QAC7B,QAAQ,eAAe,QAAQ;AAAA,QAC/B,aAAa,eAAe,aAAa;AAAA,MAC3C;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,0BAAQ;","names":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agent-app design tokens — the single source of truth for theming every React
|
|
3
|
+
* surface (design-canvas-react, sequences-react, web-react).
|
|
4
|
+
*
|
|
5
|
+
* Import once at your app root: import '@tangle-network/agent-app/styles'
|
|
6
|
+
* Dark mode: set `data-theme="dark"` (or class `dark`) on a parent element.
|
|
7
|
+
*
|
|
8
|
+
* Two vocabularies resolve to ONE set of channel triples:
|
|
9
|
+
* - shadcn semantic names (--card, --foreground, --muted-foreground, …) —
|
|
10
|
+
* consumed by web-react via Tailwind classes (bg-card, text-foreground).
|
|
11
|
+
* Wire them with the Tailwind preset: import '@tangle-network/agent-app/tailwind-preset'.
|
|
12
|
+
* - canvas/sequences alias names (--bg-input, --text-primary, …) — full
|
|
13
|
+
* colors consumed directly via Tailwind arbitrary values (bg-[var(--bg-input)]).
|
|
14
|
+
* These need no Tailwind config; tokens.css alone is enough.
|
|
15
|
+
*
|
|
16
|
+
* The aliases reference the triples, so redefining only the triples in the dark
|
|
17
|
+
* scope re-themes both vocabularies through the cascade.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
/* shadcn channel triples — "H S% L%", consumed as hsl(var(--name)) */
|
|
22
|
+
--background: 0 0% 100%;
|
|
23
|
+
--foreground: 222 47% 11%;
|
|
24
|
+
--card: 0 0% 100%;
|
|
25
|
+
--card-foreground: 222 47% 11%;
|
|
26
|
+
--popover: 0 0% 100%;
|
|
27
|
+
--popover-foreground: 222 47% 11%;
|
|
28
|
+
--primary: 221 83% 47%;
|
|
29
|
+
--primary-foreground: 0 0% 100%;
|
|
30
|
+
--secondary: 210 40% 96%;
|
|
31
|
+
--secondary-foreground: 222 47% 30%;
|
|
32
|
+
--muted: 210 40% 96%;
|
|
33
|
+
/* 44% L (was 47%) so muted text clears WCAG AA even on subtly tinted surfaces
|
|
34
|
+
(e.g. the failed tool card's 5%-red wash); ~4.7:1 on white. */
|
|
35
|
+
--muted-foreground: 215 16% 44%;
|
|
36
|
+
--accent: 210 40% 96%;
|
|
37
|
+
--accent-foreground: 222 47% 11%;
|
|
38
|
+
--destructive: 0 72% 45%;
|
|
39
|
+
--destructive-foreground: 0 0% 100%;
|
|
40
|
+
--border: 214 32% 91%;
|
|
41
|
+
--input: 214 32% 91%;
|
|
42
|
+
--ring: 221 83% 53%;
|
|
43
|
+
/* note: --primary below is darkened from 53% → 47% L so the brand blue clears
|
|
44
|
+
WCAG AA (4.5:1) when used AS TEXT on a light surface; --ring stays at the
|
|
45
|
+
brighter 53% (a 2px focus ring only needs 3:1 non-text contrast). */
|
|
46
|
+
/* status colors — dark enough on light surfaces to clear AA as text (used by
|
|
47
|
+
chips, dots, and solid buttons via the Tailwind preset's success/warning). */
|
|
48
|
+
--success: 142 72% 29%;
|
|
49
|
+
--success-foreground: 0 0% 100%;
|
|
50
|
+
--warning: 38 92% 32%;
|
|
51
|
+
--warning-foreground: 38 92% 12%;
|
|
52
|
+
|
|
53
|
+
/* canvas/sequences aliases — full colors, resolve to the triples above */
|
|
54
|
+
--bg-input: hsl(var(--card));
|
|
55
|
+
--text-primary: hsl(var(--foreground));
|
|
56
|
+
--text-secondary: hsl(var(--secondary-foreground));
|
|
57
|
+
--text-muted: hsl(var(--muted-foreground));
|
|
58
|
+
--text-danger: hsl(var(--destructive));
|
|
59
|
+
--text-warning: hsl(var(--warning));
|
|
60
|
+
--border-default: hsl(var(--border));
|
|
61
|
+
--brand-primary: hsl(var(--primary));
|
|
62
|
+
|
|
63
|
+
/* canvas-only surfaces (not part of the shadcn vocabulary). Name matches the
|
|
64
|
+
`--canvas-backdrop` the design-canvas Workspace references (with a #1a1a1a fallback). */
|
|
65
|
+
--canvas-backdrop: hsl(220 13% 91%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-theme='dark'],
|
|
69
|
+
.dark {
|
|
70
|
+
--background: 222 47% 7%;
|
|
71
|
+
--foreground: 210 40% 98%;
|
|
72
|
+
--card: 222 47% 11%;
|
|
73
|
+
--card-foreground: 210 40% 98%;
|
|
74
|
+
--popover: 222 47% 11%;
|
|
75
|
+
--popover-foreground: 210 40% 98%;
|
|
76
|
+
--primary: 217 91% 72%;
|
|
77
|
+
--primary-foreground: 222 47% 11%;
|
|
78
|
+
--secondary: 217 33% 17%;
|
|
79
|
+
--secondary-foreground: 210 40% 90%;
|
|
80
|
+
--muted: 217 33% 17%;
|
|
81
|
+
--muted-foreground: 215 20% 65%;
|
|
82
|
+
--accent: 217 33% 17%;
|
|
83
|
+
--accent-foreground: 210 40% 98%;
|
|
84
|
+
--destructive: 0 78% 67%;
|
|
85
|
+
--destructive-foreground: 0 0% 12%;
|
|
86
|
+
--border: 217 33% 20%;
|
|
87
|
+
--input: 217 33% 20%;
|
|
88
|
+
--ring: 217 91% 60%;
|
|
89
|
+
--success: 142 60% 50%;
|
|
90
|
+
--success-foreground: 142 80% 12%;
|
|
91
|
+
--warning: 38 95% 58%;
|
|
92
|
+
--warning-foreground: 38 92% 12%;
|
|
93
|
+
|
|
94
|
+
--canvas-backdrop: hsl(0 0% 10%);
|
|
95
|
+
}
|
package/dist/trace/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as FlowTrace, F as FlowSpan } from '../flow-types-Cb_AblZs.js';
|
|
1
2
|
import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -154,23 +155,6 @@ interface TimedEvent {
|
|
|
154
155
|
t: number;
|
|
155
156
|
event: Record<string, unknown>;
|
|
156
157
|
}
|
|
157
|
-
interface FlowSpan {
|
|
158
|
-
kind: 'pipeline' | 'model' | 'tool';
|
|
159
|
-
name: string;
|
|
160
|
-
startMs: number;
|
|
161
|
-
endMs: number;
|
|
162
|
-
approx?: boolean;
|
|
163
|
-
meta?: Record<string, unknown>;
|
|
164
|
-
}
|
|
165
|
-
interface FlowTrace {
|
|
166
|
-
spans: FlowSpan[];
|
|
167
|
-
totalMs: number;
|
|
168
|
-
promptTokens: number;
|
|
169
|
-
completionTokens: number;
|
|
170
|
-
/** Computed when per-token pricing is supplied. */
|
|
171
|
-
costUsd?: number;
|
|
172
|
-
toolCalls: number;
|
|
173
|
-
}
|
|
174
158
|
/** Parse stored turn-event lines (JSON strings with `_t`) into TimedEvents. */
|
|
175
159
|
declare function timedEventsFromLines(lines: string[]): TimedEvent[];
|
|
176
160
|
/**
|
|
@@ -204,4 +188,4 @@ declare function renderHistogram(values: number[], opts?: {
|
|
|
204
188
|
format?: (v: number) => string;
|
|
205
189
|
}): string;
|
|
206
190
|
|
|
207
|
-
export { type DistributionSummary,
|
|
191
|
+
export { type DistributionSummary, FlowSpan, FlowTrace, type LoopTraceEventLike, type MissionFlowStep, type MissionTraceContext, type StepSpanContext, type TimedEvent, buildFlowTrace, childSpanContext, composeMissionFlowTrace, createMissionTraceContext, delegationActivityToFlowSpans, loopTraceEventsToFlowSpans, renderHistogram, renderWaterfall, stepActivityFlowTrace, summarize, timedEventsFromLines, traceEnv };
|
package/dist/trace/index.js
CHANGED
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
summarize,
|
|
8
8
|
timedEventsFromLines,
|
|
9
9
|
traceEnv
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-GQRL6VNU.js";
|
|
11
11
|
import {
|
|
12
12
|
composeMissionFlowTrace,
|
|
13
13
|
delegationActivityToFlowSpans,
|
|
14
14
|
loopTraceEventsToFlowSpans,
|
|
15
15
|
stepActivityFlowTrace
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-2QI7XV2T.js";
|
|
17
17
|
export {
|
|
18
18
|
buildFlowTrace,
|
|
19
19
|
childSpanContext,
|
package/dist/web/index.d.ts
CHANGED
|
@@ -33,7 +33,18 @@ interface RateLimitResult {
|
|
|
33
33
|
resetAt: number;
|
|
34
34
|
}
|
|
35
35
|
/** KV-backed sliding-window rate limit. Stores recent timestamps per key,
|
|
36
|
-
* prunes the window, allows until `limit` is hit.
|
|
36
|
+
* prunes the window, allows until `limit` is hit.
|
|
37
|
+
*
|
|
38
|
+
* Read-modify-write is best-effort, NOT atomic: KV has no compare-and-swap, so
|
|
39
|
+
* two requests racing on the same key can each read the same pre-state and both
|
|
40
|
+
* write — a concurrent burst can momentarily admit up to one extra request per
|
|
41
|
+
* racing writer. This is acceptable for coarse abuse limiting; it is NOT a hard
|
|
42
|
+
* quota gate.
|
|
43
|
+
*
|
|
44
|
+
* Fail-CLOSED on unreadable state: corrupt/non-array KV (a poisoned or
|
|
45
|
+
* truncated value) is treated as a full window, so a tampered key cannot reset
|
|
46
|
+
* the count and bypass the limiter. A bare `JSON.parse` here would throw and
|
|
47
|
+
* abort the request handler, silently disabling the limit (fail-open). */
|
|
37
48
|
declare function checkRateLimit(kv: KvLike, key: string, limit: number, windowSeconds: number): Promise<RateLimitResult>;
|
|
38
49
|
interface CookieOptions {
|
|
39
50
|
name: string;
|
|
@@ -68,5 +79,17 @@ interface SecurityHeaderOptions {
|
|
|
68
79
|
* referrer-policy, XSS) + optional product disclaimer/retention. The security
|
|
69
80
|
* set is generic; the disclaimer/retention are the product's. */
|
|
70
81
|
declare function addSecurityHeaders(response: Response, opts?: SecurityHeaderOptions): Response;
|
|
82
|
+
/**
|
|
83
|
+
* Canonical media-reference boundary shared by every surface that persists a
|
|
84
|
+
* media url (sequences clips, design-canvas image/video src). The ONE rule:
|
|
85
|
+
* remote `http(s)` or a rooted `/api/` path are allowed; everything else is
|
|
86
|
+
* rejected, with a named reason for known-bad local/inline schemes so the
|
|
87
|
+
* thrown message is actionable for an LLM planner. The url is trimmed before
|
|
88
|
+
* the scheme check so leading whitespace cannot smuggle a rejected scheme past
|
|
89
|
+
* a naive `startsWith`.
|
|
90
|
+
*
|
|
91
|
+
* @param what - noun for the error message (e.g. 'media url', 'src').
|
|
92
|
+
*/
|
|
93
|
+
declare function assertMediaUrl(url: string, what?: string): void;
|
|
71
94
|
|
|
72
|
-
export { type CookieOptions, type JsonObject, type KvLike, type RateLimitResult, type RequestContext, type SecurityHeaderOptions, addSecurityHeaders, checkRateLimit, clearCookieHeader, extractRequestContext, parseJsonObjectBody, readCookieValue, requireString, serializeCookie };
|
|
95
|
+
export { type CookieOptions, type JsonObject, type KvLike, type RateLimitResult, type RequestContext, type SecurityHeaderOptions, addSecurityHeaders, assertMediaUrl, checkRateLimit, clearCookieHeader, extractRequestContext, parseJsonObjectBody, readCookieValue, requireString, serializeCookie };
|
package/dist/web/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addSecurityHeaders,
|
|
3
|
+
assertMediaUrl,
|
|
3
4
|
checkRateLimit,
|
|
4
5
|
clearCookieHeader,
|
|
5
6
|
extractRequestContext,
|
|
@@ -7,9 +8,10 @@ import {
|
|
|
7
8
|
readCookieValue,
|
|
8
9
|
requireString,
|
|
9
10
|
serializeCookie
|
|
10
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-HFC4BTWJ.js";
|
|
11
12
|
export {
|
|
12
13
|
addSecurityHeaders,
|
|
14
|
+
assertMediaUrl,
|
|
13
15
|
checkRateLimit,
|
|
14
16
|
clearCookieHeader,
|
|
15
17
|
extractRequestContext,
|